Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListQaCheckIssuesOptions interface limits the use of API capabilities #382

Open
Passiday opened this issue Mar 25, 2024 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Passiday
Copy link

Passiday commented Mar 25, 2024

ListQaCheckIssuesOptions interface that is used in the listQaCheckIssues method of TranslationStatus class does not let to use the API to it's full potential: the API allows passing several comma-separated values in "category" and "validation" parameters, but this JavaScript implementation lets user to select only one value.

API endpoint docs: https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.getMany

I don't dare to submit a patch, but a possible solution would be to allow passing an array of Category (or Validation) type values:

    interface ListQaCheckIssuesOptions extends PaginationOptions {
        category?: Category | [Category];
        validation?: Validation | [Validation];
        languageIds?: string;
    }

.. and then updating the listQaCheckIssues method accordingly, to handle the array values.

@andrii-bodnar andrii-bodnar added good first issue Good for newcomers enhancement New feature or request labels Mar 26, 2024
@andrii-bodnar
Copy link
Member

Hi @Passiday, thanks for pointing this out!

I think the suggested solution would be great, it also doesn't break backward compatibility, which is important in this case. We can add a TODO there to remember about it and leave an array type in the future major release.

@yevheniyJ what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants