@emilgroup/translation-sdk-node 1.8.1-beta.2 → 1.8.1-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/translation-api.ts +340 -0
  4. package/dist/api/translation-api.d.ts +186 -0
  5. package/dist/api/translation-api.js +291 -0
  6. package/dist/models/get-product-translations-response-class.d.ts +25 -0
  7. package/dist/models/get-product-translations-response-class.js +15 -0
  8. package/dist/models/index.d.ts +6 -0
  9. package/dist/models/index.js +6 -0
  10. package/dist/models/new-translation-class.d.ts +36 -0
  11. package/dist/models/new-translation-class.js +15 -0
  12. package/dist/models/refresh-product-languages-response-class.d.ts +31 -0
  13. package/dist/models/refresh-product-languages-response-class.js +15 -0
  14. package/dist/models/save-product-translations-request-dto.d.ts +53 -0
  15. package/dist/models/save-product-translations-request-dto.js +37 -0
  16. package/dist/models/skipped-translation-class.d.ts +36 -0
  17. package/dist/models/skipped-translation-class.js +15 -0
  18. package/dist/models/translatable-field-class.d.ts +54 -0
  19. package/dist/models/translatable-field-class.js +15 -0
  20. package/dist/models/upload-product-translations-response-class.d.ts +13 -0
  21. package/models/get-product-translations-response-class.ts +31 -0
  22. package/models/index.ts +6 -0
  23. package/models/new-translation-class.ts +42 -0
  24. package/models/refresh-product-languages-response-class.ts +37 -0
  25. package/models/save-product-translations-request-dto.ts +62 -0
  26. package/models/skipped-translation-class.ts +42 -0
  27. package/models/translatable-field-class.ts +60 -0
  28. package/models/upload-product-translations-response-class.ts +13 -0
  29. package/package.json +1 -1
@@ -15,8 +15,11 @@ import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CreateProductLanguageRequestDto } from '../models';
16
16
  import { CreateProductLanguageResponseClass } from '../models';
17
17
  import { GetProductLanguageResponseClass } from '../models';
18
+ import { GetProductTranslationsResponseClass } from '../models';
18
19
  import { ListProductLanguagesResponseClass } from '../models';
19
20
  import { ListTranslationsResponseClass } from '../models';
21
+ import { RefreshProductLanguagesResponseClass } from '../models';
22
+ import { SaveProductTranslationsRequestDto } from '../models';
20
23
  import { UpdateProductLanguageRequestDto } from '../models';
21
24
  import { UpdateProductLanguageResponseClass } from '../models';
22
25
  import { UploadProductTranslationsResponseClass } from '../models';
@@ -62,6 +65,16 @@ export declare const TranslationApiAxiosParamCreator: (configuration?: Configura
62
65
  * @throws {RequiredError}
63
66
  */
64
67
  getProductLanguage: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
68
+ /**
69
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
70
+ * @summary Retrieve the product translations
71
+ * @param {string} productSlug
72
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
73
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ getProductTranslations: (productSlug: string, language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
65
78
  /**
66
79
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
67
80
  * @summary List product languages
@@ -92,6 +105,25 @@ export declare const TranslationApiAxiosParamCreator: (configuration?: Configura
92
105
  * @throws {RequiredError}
93
106
  */
94
107
  listTranslations: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
108
+ /**
109
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
110
+ * @summary Retrieve the refreshed product languages
111
+ * @param {string} productSlug Slug of the product.
112
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ refreshProductLanguages: (productSlug: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
117
+ /**
118
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
119
+ * @summary Create the product translations
120
+ * @param {string} productSlug
121
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
122
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ saveProductTranslations: (productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
95
127
  /**
96
128
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
97
129
  * @summary Update the product language
@@ -155,6 +187,16 @@ export declare const TranslationApiFp: (configuration?: Configuration) => {
155
187
  * @throws {RequiredError}
156
188
  */
157
189
  getProductLanguage(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductLanguageResponseClass>>;
190
+ /**
191
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
192
+ * @summary Retrieve the product translations
193
+ * @param {string} productSlug
194
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
195
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ getProductTranslations(productSlug: string, language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductTranslationsResponseClass>>;
158
200
  /**
159
201
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
160
202
  * @summary List product languages
@@ -185,6 +227,25 @@ export declare const TranslationApiFp: (configuration?: Configuration) => {
185
227
  * @throws {RequiredError}
186
228
  */
187
229
  listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListTranslationsResponseClass>>;
230
+ /**
231
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
232
+ * @summary Retrieve the refreshed product languages
233
+ * @param {string} productSlug Slug of the product.
234
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
235
+ * @param {*} [options] Override http request option.
236
+ * @throws {RequiredError}
237
+ */
238
+ refreshProductLanguages(productSlug: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RefreshProductLanguagesResponseClass>>;
239
+ /**
240
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
241
+ * @summary Create the product translations
242
+ * @param {string} productSlug
243
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
244
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadProductTranslationsResponseClass>>;
188
249
  /**
189
250
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
190
251
  * @summary Update the product language
@@ -248,6 +309,16 @@ export declare const TranslationApiFactory: (configuration?: Configuration, base
248
309
  * @throws {RequiredError}
249
310
  */
250
311
  getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass>;
312
+ /**
313
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
314
+ * @summary Retrieve the product translations
315
+ * @param {string} productSlug
316
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
317
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ getProductTranslations(productSlug: string, language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian', authorization?: string, options?: any): AxiosPromise<GetProductTranslationsResponseClass>;
251
322
  /**
252
323
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
253
324
  * @summary List product languages
@@ -278,6 +349,25 @@ export declare const TranslationApiFactory: (configuration?: Configuration, base
278
349
  * @throws {RequiredError}
279
350
  */
280
351
  listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTranslationsResponseClass>;
352
+ /**
353
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
354
+ * @summary Retrieve the refreshed product languages
355
+ * @param {string} productSlug Slug of the product.
356
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
357
+ * @param {*} [options] Override http request option.
358
+ * @throws {RequiredError}
359
+ */
360
+ refreshProductLanguages(productSlug: string, authorization?: string, options?: any): AxiosPromise<RefreshProductLanguagesResponseClass>;
361
+ /**
362
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
363
+ * @summary Create the product translations
364
+ * @param {string} productSlug
365
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
366
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: any): AxiosPromise<UploadProductTranslationsResponseClass>;
281
371
  /**
282
372
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
283
373
  * @summary Update the product language
@@ -381,6 +471,31 @@ export interface TranslationApiGetProductLanguageRequest {
381
471
  */
382
472
  readonly authorization?: string;
383
473
  }
474
+ /**
475
+ * Request parameters for getProductTranslations operation in TranslationApi.
476
+ * @export
477
+ * @interface TranslationApiGetProductTranslationsRequest
478
+ */
479
+ export interface TranslationApiGetProductTranslationsRequest {
480
+ /**
481
+ *
482
+ * @type {string}
483
+ * @memberof TranslationApiGetProductTranslations
484
+ */
485
+ readonly productSlug: string;
486
+ /**
487
+ *
488
+ * @type {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'}
489
+ * @memberof TranslationApiGetProductTranslations
490
+ */
491
+ readonly language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian';
492
+ /**
493
+ * Bearer Token: provided by the login endpoint under the name accessToken.
494
+ * @type {string}
495
+ * @memberof TranslationApiGetProductTranslations
496
+ */
497
+ readonly authorization?: string;
498
+ }
384
499
  /**
385
500
  * Request parameters for listProductLanguages operation in TranslationApi.
386
501
  * @export
@@ -491,6 +606,50 @@ export interface TranslationApiListTranslationsRequest {
491
606
  */
492
607
  readonly filters?: string;
493
608
  }
609
+ /**
610
+ * Request parameters for refreshProductLanguages operation in TranslationApi.
611
+ * @export
612
+ * @interface TranslationApiRefreshProductLanguagesRequest
613
+ */
614
+ export interface TranslationApiRefreshProductLanguagesRequest {
615
+ /**
616
+ * Slug of the product.
617
+ * @type {string}
618
+ * @memberof TranslationApiRefreshProductLanguages
619
+ */
620
+ readonly productSlug: string;
621
+ /**
622
+ * Bearer Token: provided by the login endpoint under the name accessToken.
623
+ * @type {string}
624
+ * @memberof TranslationApiRefreshProductLanguages
625
+ */
626
+ readonly authorization?: string;
627
+ }
628
+ /**
629
+ * Request parameters for saveProductTranslations operation in TranslationApi.
630
+ * @export
631
+ * @interface TranslationApiSaveProductTranslationsRequest
632
+ */
633
+ export interface TranslationApiSaveProductTranslationsRequest {
634
+ /**
635
+ *
636
+ * @type {string}
637
+ * @memberof TranslationApiSaveProductTranslations
638
+ */
639
+ readonly productSlug: string;
640
+ /**
641
+ *
642
+ * @type {SaveProductTranslationsRequestDto}
643
+ * @memberof TranslationApiSaveProductTranslations
644
+ */
645
+ readonly saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto;
646
+ /**
647
+ * Bearer Token: provided by the login endpoint under the name accessToken.
648
+ * @type {string}
649
+ * @memberof TranslationApiSaveProductTranslations
650
+ */
651
+ readonly authorization?: string;
652
+ }
494
653
  /**
495
654
  * Request parameters for updateProductLanguage operation in TranslationApi.
496
655
  * @export
@@ -584,6 +743,15 @@ export declare class TranslationApi extends BaseAPI {
584
743
  * @memberof TranslationApi
585
744
  */
586
745
  getProductLanguage(requestParameters: TranslationApiGetProductLanguageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductLanguageResponseClass, any, {}>>;
746
+ /**
747
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
748
+ * @summary Retrieve the product translations
749
+ * @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ * @memberof TranslationApi
753
+ */
754
+ getProductTranslations(requestParameters: TranslationApiGetProductTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductTranslationsResponseClass, any, {}>>;
587
755
  /**
588
756
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
589
757
  * @summary List product languages
@@ -602,6 +770,24 @@ export declare class TranslationApi extends BaseAPI {
602
770
  * @memberof TranslationApi
603
771
  */
604
772
  listTranslations(requestParameters?: TranslationApiListTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTranslationsResponseClass, any, {}>>;
773
+ /**
774
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
775
+ * @summary Retrieve the refreshed product languages
776
+ * @param {TranslationApiRefreshProductLanguagesRequest} requestParameters Request parameters.
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ * @memberof TranslationApi
780
+ */
781
+ refreshProductLanguages(requestParameters: TranslationApiRefreshProductLanguagesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RefreshProductLanguagesResponseClass, any, {}>>;
782
+ /**
783
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
784
+ * @summary Create the product translations
785
+ * @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
786
+ * @param {*} [options] Override http request option.
787
+ * @throws {RequiredError}
788
+ * @memberof TranslationApi
789
+ */
790
+ saveProductTranslations(requestParameters: TranslationApiSaveProductTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UploadProductTranslationsResponseClass, any, {}>>;
605
791
  /**
606
792
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
607
793
  * @summary Update the product language
@@ -295,6 +295,60 @@ var TranslationApiAxiosParamCreator = function (configuration) {
295
295
  });
296
296
  });
297
297
  },
298
+ /**
299
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
300
+ * @summary Retrieve the product translations
301
+ * @param {string} productSlug
302
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
303
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ getProductTranslations: function (productSlug, language, authorization, options) {
308
+ if (options === void 0) { options = {}; }
309
+ return __awaiter(_this, void 0, void 0, function () {
310
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
311
+ return __generator(this, function (_a) {
312
+ switch (_a.label) {
313
+ case 0:
314
+ // verify required parameter 'productSlug' is not null or undefined
315
+ (0, common_1.assertParamExists)('getProductTranslations', 'productSlug', productSlug);
316
+ // verify required parameter 'language' is not null or undefined
317
+ (0, common_1.assertParamExists)('getProductTranslations', 'language', language);
318
+ localVarPath = "/translationservice/v1/product/{productSlug}/translations"
319
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
320
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
321
+ if (configuration) {
322
+ baseOptions = configuration.baseOptions;
323
+ baseAccessToken = configuration.accessToken;
324
+ }
325
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
326
+ localVarHeaderParameter = {};
327
+ localVarQueryParameter = {};
328
+ // authentication bearer required
329
+ // http bearer authentication required
330
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
331
+ case 1:
332
+ // authentication bearer required
333
+ // http bearer authentication required
334
+ _a.sent();
335
+ if (language !== undefined) {
336
+ localVarQueryParameter['language'] = language;
337
+ }
338
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
339
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
340
+ }
341
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
342
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
343
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
344
+ return [2 /*return*/, {
345
+ url: (0, common_1.toPathString)(localVarUrlObj),
346
+ options: localVarRequestOptions,
347
+ }];
348
+ }
349
+ });
350
+ });
351
+ },
298
352
  /**
299
353
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
300
354
  * @summary List product languages
@@ -439,6 +493,107 @@ var TranslationApiAxiosParamCreator = function (configuration) {
439
493
  });
440
494
  });
441
495
  },
496
+ /**
497
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
498
+ * @summary Retrieve the refreshed product languages
499
+ * @param {string} productSlug Slug of the product.
500
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ refreshProductLanguages: function (productSlug, authorization, options) {
505
+ if (options === void 0) { options = {}; }
506
+ return __awaiter(_this, void 0, void 0, function () {
507
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
508
+ return __generator(this, function (_a) {
509
+ switch (_a.label) {
510
+ case 0:
511
+ // verify required parameter 'productSlug' is not null or undefined
512
+ (0, common_1.assertParamExists)('refreshProductLanguages', 'productSlug', productSlug);
513
+ localVarPath = "/translationservice/v1/product/{productSlug}/languages"
514
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
515
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
516
+ if (configuration) {
517
+ baseOptions = configuration.baseOptions;
518
+ baseAccessToken = configuration.accessToken;
519
+ }
520
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
521
+ localVarHeaderParameter = {};
522
+ localVarQueryParameter = {};
523
+ // authentication bearer required
524
+ // http bearer authentication required
525
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
526
+ case 1:
527
+ // authentication bearer required
528
+ // http bearer authentication required
529
+ _a.sent();
530
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
531
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
532
+ }
533
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
534
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
535
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
536
+ return [2 /*return*/, {
537
+ url: (0, common_1.toPathString)(localVarUrlObj),
538
+ options: localVarRequestOptions,
539
+ }];
540
+ }
541
+ });
542
+ });
543
+ },
544
+ /**
545
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
546
+ * @summary Create the product translations
547
+ * @param {string} productSlug
548
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
549
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ */
553
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
554
+ if (options === void 0) { options = {}; }
555
+ return __awaiter(_this, void 0, void 0, function () {
556
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
557
+ return __generator(this, function (_a) {
558
+ switch (_a.label) {
559
+ case 0:
560
+ // verify required parameter 'productSlug' is not null or undefined
561
+ (0, common_1.assertParamExists)('saveProductTranslations', 'productSlug', productSlug);
562
+ // verify required parameter 'saveProductTranslationsRequestDto' is not null or undefined
563
+ (0, common_1.assertParamExists)('saveProductTranslations', 'saveProductTranslationsRequestDto', saveProductTranslationsRequestDto);
564
+ localVarPath = "/translationservice/v1/product/{productSlug}/translations"
565
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
566
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
567
+ if (configuration) {
568
+ baseOptions = configuration.baseOptions;
569
+ baseAccessToken = configuration.accessToken;
570
+ }
571
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
572
+ localVarHeaderParameter = {};
573
+ localVarQueryParameter = {};
574
+ // authentication bearer required
575
+ // http bearer authentication required
576
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
577
+ case 1:
578
+ // authentication bearer required
579
+ // http bearer authentication required
580
+ _a.sent();
581
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
582
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
583
+ }
584
+ localVarHeaderParameter['Content-Type'] = 'application/json';
585
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
586
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
587
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
588
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(saveProductTranslationsRequestDto, localVarRequestOptions, configuration);
589
+ return [2 /*return*/, {
590
+ url: (0, common_1.toPathString)(localVarUrlObj),
591
+ options: localVarRequestOptions,
592
+ }];
593
+ }
594
+ });
595
+ });
596
+ },
442
597
  /**
443
598
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
444
599
  * @summary Update the product language
@@ -644,6 +799,28 @@ var TranslationApiFp = function (configuration) {
644
799
  });
645
800
  });
646
801
  },
802
+ /**
803
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
804
+ * @summary Retrieve the product translations
805
+ * @param {string} productSlug
806
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
807
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
808
+ * @param {*} [options] Override http request option.
809
+ * @throws {RequiredError}
810
+ */
811
+ getProductTranslations: function (productSlug, language, authorization, options) {
812
+ return __awaiter(this, void 0, void 0, function () {
813
+ var localVarAxiosArgs;
814
+ return __generator(this, function (_a) {
815
+ switch (_a.label) {
816
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductTranslations(productSlug, language, authorization, options)];
817
+ case 1:
818
+ localVarAxiosArgs = _a.sent();
819
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
820
+ }
821
+ });
822
+ });
823
+ },
647
824
  /**
648
825
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
649
826
  * @summary List product languages
@@ -698,6 +875,49 @@ var TranslationApiFp = function (configuration) {
698
875
  });
699
876
  });
700
877
  },
878
+ /**
879
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
880
+ * @summary Retrieve the refreshed product languages
881
+ * @param {string} productSlug Slug of the product.
882
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
883
+ * @param {*} [options] Override http request option.
884
+ * @throws {RequiredError}
885
+ */
886
+ refreshProductLanguages: function (productSlug, authorization, options) {
887
+ return __awaiter(this, void 0, void 0, function () {
888
+ var localVarAxiosArgs;
889
+ return __generator(this, function (_a) {
890
+ switch (_a.label) {
891
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshProductLanguages(productSlug, authorization, options)];
892
+ case 1:
893
+ localVarAxiosArgs = _a.sent();
894
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
895
+ }
896
+ });
897
+ });
898
+ },
899
+ /**
900
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
901
+ * @summary Create the product translations
902
+ * @param {string} productSlug
903
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
904
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
905
+ * @param {*} [options] Override http request option.
906
+ * @throws {RequiredError}
907
+ */
908
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
909
+ return __awaiter(this, void 0, void 0, function () {
910
+ var localVarAxiosArgs;
911
+ return __generator(this, function (_a) {
912
+ switch (_a.label) {
913
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options)];
914
+ case 1:
915
+ localVarAxiosArgs = _a.sent();
916
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
917
+ }
918
+ });
919
+ });
920
+ },
701
921
  /**
702
922
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
703
923
  * @summary Update the product language
@@ -797,6 +1017,18 @@ var TranslationApiFactory = function (configuration, basePath, axios) {
797
1017
  getProductLanguage: function (id, authorization, options) {
798
1018
  return localVarFp.getProductLanguage(id, authorization, options).then(function (request) { return request(axios, basePath); });
799
1019
  },
1020
+ /**
1021
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
1022
+ * @summary Retrieve the product translations
1023
+ * @param {string} productSlug
1024
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
1025
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1026
+ * @param {*} [options] Override http request option.
1027
+ * @throws {RequiredError}
1028
+ */
1029
+ getProductTranslations: function (productSlug, language, authorization, options) {
1030
+ return localVarFp.getProductTranslations(productSlug, language, authorization, options).then(function (request) { return request(axios, basePath); });
1031
+ },
800
1032
  /**
801
1033
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
802
1034
  * @summary List product languages
@@ -831,6 +1063,29 @@ var TranslationApiFactory = function (configuration, basePath, axios) {
831
1063
  listTranslations: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
832
1064
  return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
833
1065
  },
1066
+ /**
1067
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
1068
+ * @summary Retrieve the refreshed product languages
1069
+ * @param {string} productSlug Slug of the product.
1070
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ refreshProductLanguages: function (productSlug, authorization, options) {
1075
+ return localVarFp.refreshProductLanguages(productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
1076
+ },
1077
+ /**
1078
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
1079
+ * @summary Create the product translations
1080
+ * @param {string} productSlug
1081
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
1082
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ */
1086
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
1087
+ return localVarFp.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1088
+ },
834
1089
  /**
835
1090
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
836
1091
  * @summary Update the product language
@@ -917,6 +1172,18 @@ var TranslationApi = /** @class */ (function (_super) {
917
1172
  var _this = this;
918
1173
  return (0, exports.TranslationApiFp)(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
919
1174
  };
1175
+ /**
1176
+ * This returns a product\'s translatable fields together with their current translations as JSON. Same data as the XLSX download, for editing in the UI. **Required Permissions** \"translation-management.translations.view\"
1177
+ * @summary Retrieve the product translations
1178
+ * @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
1179
+ * @param {*} [options] Override http request option.
1180
+ * @throws {RequiredError}
1181
+ * @memberof TranslationApi
1182
+ */
1183
+ TranslationApi.prototype.getProductTranslations = function (requestParameters, options) {
1184
+ var _this = this;
1185
+ return (0, exports.TranslationApiFp)(this.configuration).getProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1186
+ };
920
1187
  /**
921
1188
  * Returns a list of product languages you have previously created. The product languages are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"translation-management.translations.view\"
922
1189
  * @summary List product languages
@@ -943,6 +1210,30 @@ var TranslationApi = /** @class */ (function (_super) {
943
1210
  if (requestParameters === void 0) { requestParameters = {}; }
944
1211
  return (0, exports.TranslationApiFp)(this.configuration).listTranslations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
945
1212
  };
1213
+ /**
1214
+ * This returns a product\'s languages with every translation count recomputed first. The plain list answers from the stored counts, which are only rewritten when somebody saves or downloads translations. **Required Permissions** \"translation-management.translations.view\"
1215
+ * @summary Retrieve the refreshed product languages
1216
+ * @param {TranslationApiRefreshProductLanguagesRequest} requestParameters Request parameters.
1217
+ * @param {*} [options] Override http request option.
1218
+ * @throws {RequiredError}
1219
+ * @memberof TranslationApi
1220
+ */
1221
+ TranslationApi.prototype.refreshProductLanguages = function (requestParameters, options) {
1222
+ var _this = this;
1223
+ return (0, exports.TranslationApiFp)(this.configuration).refreshProductLanguages(requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1224
+ };
1225
+ /**
1226
+ * This creates or updates translations for a product from JSON. Same store as the XLSX upload. An empty value removes an existing translation. **Required Permissions** \"translation-management.translations.create\"
1227
+ * @summary Create the product translations
1228
+ * @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ * @memberof TranslationApi
1232
+ */
1233
+ TranslationApi.prototype.saveProductTranslations = function (requestParameters, options) {
1234
+ var _this = this;
1235
+ return (0, exports.TranslationApiFp)(this.configuration).saveProductTranslations(requestParameters.productSlug, requestParameters.saveProductTranslationsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1236
+ };
946
1237
  /**
947
1238
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
948
1239
  * @summary Update the product language
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL TranslationService
3
+ * The EMIL TranslationService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { TranslatableFieldClass } from './translatable-field-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GetProductTranslationsResponseClass
17
+ */
18
+ export interface GetProductTranslationsResponseClass {
19
+ /**
20
+ * The list of translatableFields.
21
+ * @type {Array<TranslatableFieldClass>}
22
+ * @memberof GetProductTranslationsResponseClass
23
+ */
24
+ 'translations': Array<TranslatableFieldClass>;
25
+ }