import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class FileImportsService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Upload file content * @param projectId The unique identifier of the project. * @param formData * @returns any Success * @throws ApiError */ uploadFileContent(projectId: string, formData: { params: string; files: Array; }): CancelablePromise<{ /** * The unique identifier of the async task */ id: string; /** * The date and time when the async task was started */ started_at: string; /** * The number of completed events in the async task */ completed_events: number; /** * The total number of events in the async task that will complete */ total_events: number; /** * If the task failed, this will contain the error message */ error_msg?: string; /** * The date and time when the async task was completed */ completed_at?: string; /** * The current status of the async task */ status: 'pending' | 'running' | 'completed' | 'failed'; file_upload?: { /** * List of files that was successfully uploaded */ sucess_files: Array<{ /** * The name of the file that was uploaded */ file_name: string; /** * The language code associated with the file */ language_code: string; /** * The number of keys that was extracted from the file */ number_of_keys: number; }>; /** * List of files that failed to be uploaded */ failed_files: Array<{ file_name: string; reason: string; }>; /** * Statistics about the created keys */ created_keys: { /** * Ids if all the keys that was created */ all_created_key_ids: Array; all_updated_key_ids: Array; /** * Total number of translations that changed */ total_number_of_changed_translations: number; }; }; key_creation?: { /** * Statistics about the created keys */ created_keys: { /** * Ids if all the keys that was created */ all_created_key_ids: Array; all_updated_key_ids: Array; /** * Total number of translations that changed */ total_number_of_changed_translations: number; }; /** * List of keys that failed to be created */ failures: Array<{ code: string; reason: string; }>; }; preview_data_github_pull?: { /** * How many new keys were created */ number_of_new_keys: number; /** * The files involved in the pull */ files: Array<{ /** * The locale of the file */ locale: string; /** * Was the file found in the repository */ found: boolean; /** * How many translations was found in the file */ number_of_keys: number; /** * The name of the file */ file_name: string; }>; /** * Warnings that occurred during the pull */ warnings: Array; }; }>; /** * Upload file content in body * @param projectId The unique identifier of the project. * @param requestBody * @returns any Success * @throws ApiError */ uploadFileContentInBody(projectId: string, requestBody: { files: Array<{ /** * The name of the file to be uploaded */ file_name: string; /** * The content file to be uploaded */ file_content: string; /** * The locale of the file to be uploaded, only one locale per file. If not provided, the system will try to detect the locale from the file name which may lead to mismatches */ locale: string; }>; params: { /** * If true, AI will translate missing translations to all languages in the project after the upload is completed. */ ai_translate_to_all_missing_languages?: boolean; /** * If true, the server will overwrite existing translations with the same key by translations provided in the request. */ allow_overwrite?: boolean; /** * If true, no new keys will be created, only translations for existing keys will be updated. */ disable_create?: boolean; /** * If true, translations included in the upload will be marked as reviewed upon upload. */ source_select_as_reviewed?: boolean; }; }): CancelablePromise<{ /** * The unique identifier of the async task */ id: string; /** * The date and time when the async task was started */ started_at: string; /** * The number of completed events in the async task */ completed_events: number; /** * The total number of events in the async task that will complete */ total_events: number; /** * If the task failed, this will contain the error message */ error_msg?: string; /** * The date and time when the async task was completed */ completed_at?: string; /** * The current status of the async task */ status: 'pending' | 'running' | 'completed' | 'failed'; file_upload?: { /** * List of files that was successfully uploaded */ sucess_files: Array<{ /** * The name of the file that was uploaded */ file_name: string; /** * The language code associated with the file */ language_code: string; /** * The number of keys that was extracted from the file */ number_of_keys: number; }>; /** * List of files that failed to be uploaded */ failed_files: Array<{ file_name: string; reason: string; }>; /** * Statistics about the created keys */ created_keys: { /** * Ids if all the keys that was created */ all_created_key_ids: Array; all_updated_key_ids: Array; /** * Total number of translations that changed */ total_number_of_changed_translations: number; }; }; key_creation?: { /** * Statistics about the created keys */ created_keys: { /** * Ids if all the keys that was created */ all_created_key_ids: Array; all_updated_key_ids: Array; /** * Total number of translations that changed */ total_number_of_changed_translations: number; }; /** * List of keys that failed to be created */ failures: Array<{ code: string; reason: string; }>; }; preview_data_github_pull?: { /** * How many new keys were created */ number_of_new_keys: number; /** * The files involved in the pull */ files: Array<{ /** * The locale of the file */ locale: string; /** * Was the file found in the repository */ found: boolean; /** * How many translations was found in the file */ number_of_keys: number; /** * The name of the file */ file_name: string; }>; /** * Warnings that occurred during the pull */ warnings: Array; }; }>; } //# sourceMappingURL=FileImportsService.d.ts.map