import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class TranslationsService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * All translations for code * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @returns any Success * @throws ApiError */ getAllTranslationsForCode(projectId: string, codeId: string): CancelablePromise<{ /** * The unique identifier of the key */ id: string; /** * The translations associated with the key */ translations: Array<{ /** * The unique identifier of the translation */ language_code: string; /** * Whether the translation has been reviewed */ reviewed: boolean; /** * Number of resolved and unresolved comments for the translation */ comments: { resolved: number; unresolved: number; }; /** * The translation values for the translation, can be multiple if plural is used, or if multiple locales is used */ values: Array<{ /** * The locale of the translation */ locale: string; /** * Plural form for the translation value. Note if not plural is used, default is 'other' */ plural_type: 'other' | 'zero' | 'one' | 'two' | 'few' | 'many'; /** * The translated text */ translation: string; /** * When the translation was last updated */ updated_at?: string; /** * Email of the user who updated the translation */ updated_by?: string; }>; }>; }>; /** * Translations for code and locale * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @returns any Success * @throws ApiError */ getTranslationForCodeAndLocale(projectId: string, codeId: string, locale: string): CancelablePromise<{ /** * The unique identifier of the translation */ language_code: string; /** * Whether the translation has been reviewed */ reviewed: boolean; /** * Number of resolved and unresolved comments for the translation */ comments: { resolved: number; unresolved: number; }; /** * The translation values for the translation, can be multiple if plural is used, or if multiple locales is used */ values: Array<{ /** * The locale of the translation */ locale: string; /** * Plural form for the translation value. Note if not plural is used, default is 'other' */ plural_type: 'other' | 'zero' | 'one' | 'two' | 'few' | 'many'; /** * The translated text */ translation: string; /** * When the translation was last updated */ updated_at?: string; /** * Email of the user who updated the translation */ updated_by?: string; }>; }>; /** * Put translation * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param requestBody * @returns any Success * @throws ApiError */ putTranslation(projectId: string, codeId: string, locale: string, requestBody: { /** * The translated text */ translation: string; /** * Plural form for the translation value. Note if not plural is used, default is 'other' */ plural_type?: 'other' | 'zero' | 'one' | 'two' | 'few' | 'many'; }): CancelablePromise<{ /** * The locale of the translation */ locale: string; /** * Plural form for the translation value. Note if not plural is used, default is 'other' */ plural_type: 'other' | 'zero' | 'one' | 'two' | 'few' | 'many'; /** * The translated text */ translation: string; /** * When the translation was last updated */ updated_at?: string; /** * Email of the user who updated the translation */ updated_by?: string; }>; /** * Review translation * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param requestBody * @returns any Success * @throws ApiError */ reviewTranslation(projectId: string, codeId: string, locale: string, requestBody: { /** * Whether the translation has been reviewed */ reviewed: boolean; }): CancelablePromise<{ /** * Whether the translation has been reviewed */ reviewed: boolean; }>; /** * Create comment * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param requestBody * @returns any Success * @throws ApiError */ createComment(projectId: string, codeId: string, locale: string, requestBody: { /** * The comment text */ comment: string; }): CancelablePromise<{ /** * The comment text */ comment: string; }>; /** * Get all comments * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param page * @param pageSize * @returns any Success * @throws ApiError */ getAllComments(projectId: string, codeId: string, locale: string, page: number, pageSize: number): CancelablePromise<{ metadata: { fetched_at: string; total_count: number; total_pages: number; current_page: number; page_size: number; }; data: Array<{ id: string; /** * The comment text */ comment: string; /** * When the comment was created */ created_at: string; /** * If the comment has been resolved */ resolved: boolean; /** * When the comment was resolved */ resolved_at?: string; /** * The user who resolved the comment */ resolved_by?: { email: string; name: string; }; /** * The user who created the comment */ created_by?: { email: string; name: string; }; }>; }>; /** * Delete * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param commentId * @returns any Success * @throws ApiError */ deleteComment(projectId: string, codeId: string, locale: string, commentId: string): CancelablePromise; /** * Resolve comment * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param commentId * @returns any Success * @throws ApiError */ resolveComment(projectId: string, codeId: string, locale: string, commentId: string): CancelablePromise<{ id: string; /** * The comment text */ comment: string; /** * When the comment was created */ created_at: string; /** * If the comment has been resolved */ resolved: boolean; /** * When the comment was resolved */ resolved_at?: string; /** * The user who resolved the comment */ resolved_by?: { email: string; name: string; }; /** * The user who created the comment */ created_by?: { email: string; name: string; }; }>; /** * Get translation history * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @param page * @param pageSize * @returns any Success * @throws ApiError */ getTranslationHistory(projectId: string, codeId: string, locale: string, pluralType: string, page: number, pageSize: number): CancelablePromise<{ metadata: { fetched_at: string; total_count: number; total_pages: number; current_page: number; page_size: number; }; data: Array<{ /** * When the change was made */ changed_at?: string; /** * Email of the user who made the change */ changed_by_user_email: string; /** * Which type of change event it was */ type: 'value' | 'review'; /** * The new value after the change, if type = 'value' */ value?: string; /** * The new reviewed status after the change, if type = 'review' */ is_reviewed?: boolean; }>; }>; /** * Get all QA issues for a translation * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @param page * @param pageSize * @returns any Success * @throws ApiError */ getAllQaIssuesForTranslation(projectId: string, codeId: string, locale: string, pluralType: string, page: number, pageSize: number): CancelablePromise<{ metadata: { fetched_at: string; total_count: number; total_pages: number; current_page: number; page_size: number; }; data: Array<{ /** * The uniuqe identifier of the Qa */ id: string; /** * To which key the issue is related */ key_id: string; /** * The full locale for the issue */ locale: string; /** * The text of the issue. If spelling, it is the word */ issue_text: string; /** * Description of the issue */ issue_type: (0 | 1 | 2 | 3 | 4); /** * Location of the issue in the translation */ issue_location?: { start_char: number; end_char: number; }; }>; }>; /** * Dismiss all QA issues for a translation * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @returns any Success * @throws ApiError */ dismissAllQaIssuesForTranslation(projectId: string, codeId: string, locale: string, pluralType: string): CancelablePromise; /** * Dismiss QA issue * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @param qaPk * @returns any Success * @throws ApiError */ dismissQaIssue(projectId: string, codeId: string, locale: string, pluralType: string, qaPk: string): CancelablePromise; /** * Ignore similar QA issue for the locale * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @param qaPk * @returns any Success * @throws ApiError */ ignoreSimilarQaIssueForLocale(projectId: string, codeId: string, locale: string, pluralType: string, qaPk: string): CancelablePromise; /** * Get translation suggestions * @param projectId The unique identifier of the project. * @param codeId The unique identifier of the code/key. * @param locale The locale, eg "en". * @param pluralType * @returns any Success * @throws ApiError */ getTranslationSuggestions(projectId: string, codeId: string, locale: string, pluralType: string): CancelablePromise<{ /** * A list of suggested values returned */ suggestions: Array; /** * If there was an error generating the suggestion, they will be returned here */ error?: string; }>; } //# sourceMappingURL=TranslationsService.d.ts.map