@emilgroup/translation-sdk 1.10.0 → 1.10.1-beta.10

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 +348 -8
  4. package/dist/api/translation-api.d.ts +194 -8
  5. package/dist/api/translation-api.js +297 -6
  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 +25 -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 +31 -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
@@ -291,6 +291,60 @@ var TranslationApiAxiosParamCreator = function (configuration) {
291
291
  });
292
292
  });
293
293
  },
294
+ /**
295
+ * 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\"
296
+ * @summary Retrieve the product translations
297
+ * @param {string} productSlug
298
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
299
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ getProductTranslations: function (productSlug, language, authorization, options) {
304
+ if (options === void 0) { options = {}; }
305
+ return __awaiter(_this, void 0, void 0, function () {
306
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
307
+ return __generator(this, function (_a) {
308
+ switch (_a.label) {
309
+ case 0:
310
+ // verify required parameter 'productSlug' is not null or undefined
311
+ (0, common_1.assertParamExists)('getProductTranslations', 'productSlug', productSlug);
312
+ // verify required parameter 'language' is not null or undefined
313
+ (0, common_1.assertParamExists)('getProductTranslations', 'language', language);
314
+ localVarPath = "/translationservice/v1/product/{productSlug}/translations"
315
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
316
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
317
+ if (configuration) {
318
+ baseOptions = configuration.baseOptions;
319
+ baseAccessToken = configuration.accessToken;
320
+ }
321
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
322
+ localVarHeaderParameter = {};
323
+ localVarQueryParameter = {};
324
+ // authentication bearer required
325
+ // http bearer authentication required
326
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
327
+ case 1:
328
+ // authentication bearer required
329
+ // http bearer authentication required
330
+ _a.sent();
331
+ if (language !== undefined) {
332
+ localVarQueryParameter['language'] = language;
333
+ }
334
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
335
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
336
+ }
337
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
338
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
339
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
340
+ return [2 /*return*/, {
341
+ url: (0, common_1.toPathString)(localVarUrlObj),
342
+ options: localVarRequestOptions,
343
+ }];
344
+ }
345
+ });
346
+ });
347
+ },
294
348
  /**
295
349
  * 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\"
296
350
  * @summary List product languages
@@ -369,11 +423,11 @@ var TranslationApiAxiosParamCreator = function (configuration) {
369
423
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
370
424
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
371
425
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
372
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key</i>
426
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key, language</i>
373
427
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: key</i>
374
428
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, key</i>
375
429
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
376
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key</i>
430
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key, language</i>
377
431
  * @param {*} [options] Override http request option.
378
432
  * @throws {RequiredError}
379
433
  */
@@ -435,6 +489,107 @@ var TranslationApiAxiosParamCreator = function (configuration) {
435
489
  });
436
490
  });
437
491
  },
492
+ /**
493
+ * 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\"
494
+ * @summary Retrieve the refreshed product languages
495
+ * @param {string} productSlug Slug of the product.
496
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ refreshProductLanguages: function (productSlug, authorization, options) {
501
+ if (options === void 0) { options = {}; }
502
+ return __awaiter(_this, void 0, void 0, function () {
503
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
504
+ return __generator(this, function (_a) {
505
+ switch (_a.label) {
506
+ case 0:
507
+ // verify required parameter 'productSlug' is not null or undefined
508
+ (0, common_1.assertParamExists)('refreshProductLanguages', 'productSlug', productSlug);
509
+ localVarPath = "/translationservice/v1/product/{productSlug}/languages"
510
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
511
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
512
+ if (configuration) {
513
+ baseOptions = configuration.baseOptions;
514
+ baseAccessToken = configuration.accessToken;
515
+ }
516
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
517
+ localVarHeaderParameter = {};
518
+ localVarQueryParameter = {};
519
+ // authentication bearer required
520
+ // http bearer authentication required
521
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
522
+ case 1:
523
+ // authentication bearer required
524
+ // http bearer authentication required
525
+ _a.sent();
526
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
527
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
528
+ }
529
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
530
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
531
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
532
+ return [2 /*return*/, {
533
+ url: (0, common_1.toPathString)(localVarUrlObj),
534
+ options: localVarRequestOptions,
535
+ }];
536
+ }
537
+ });
538
+ });
539
+ },
540
+ /**
541
+ * 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\"
542
+ * @summary Create the product translations
543
+ * @param {string} productSlug
544
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
545
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
550
+ if (options === void 0) { options = {}; }
551
+ return __awaiter(_this, void 0, void 0, function () {
552
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
553
+ return __generator(this, function (_a) {
554
+ switch (_a.label) {
555
+ case 0:
556
+ // verify required parameter 'productSlug' is not null or undefined
557
+ (0, common_1.assertParamExists)('saveProductTranslations', 'productSlug', productSlug);
558
+ // verify required parameter 'saveProductTranslationsRequestDto' is not null or undefined
559
+ (0, common_1.assertParamExists)('saveProductTranslations', 'saveProductTranslationsRequestDto', saveProductTranslationsRequestDto);
560
+ localVarPath = "/translationservice/v1/product/{productSlug}/translations"
561
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
562
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
563
+ if (configuration) {
564
+ baseOptions = configuration.baseOptions;
565
+ baseAccessToken = configuration.accessToken;
566
+ }
567
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
568
+ localVarHeaderParameter = {};
569
+ localVarQueryParameter = {};
570
+ // authentication bearer required
571
+ // http bearer authentication required
572
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
573
+ case 1:
574
+ // authentication bearer required
575
+ // http bearer authentication required
576
+ _a.sent();
577
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
578
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
579
+ }
580
+ localVarHeaderParameter['Content-Type'] = 'application/json';
581
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
582
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
583
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
584
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(saveProductTranslationsRequestDto, localVarRequestOptions, configuration);
585
+ return [2 /*return*/, {
586
+ url: (0, common_1.toPathString)(localVarUrlObj),
587
+ options: localVarRequestOptions,
588
+ }];
589
+ }
590
+ });
591
+ });
592
+ },
438
593
  /**
439
594
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
440
595
  * @summary Update the product language
@@ -639,6 +794,28 @@ var TranslationApiFp = function (configuration) {
639
794
  });
640
795
  });
641
796
  },
797
+ /**
798
+ * 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\"
799
+ * @summary Retrieve the product translations
800
+ * @param {string} productSlug
801
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
802
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
803
+ * @param {*} [options] Override http request option.
804
+ * @throws {RequiredError}
805
+ */
806
+ getProductTranslations: function (productSlug, language, authorization, options) {
807
+ return __awaiter(this, void 0, void 0, function () {
808
+ var localVarAxiosArgs;
809
+ return __generator(this, function (_a) {
810
+ switch (_a.label) {
811
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductTranslations(productSlug, language, authorization, options)];
812
+ case 1:
813
+ localVarAxiosArgs = _a.sent();
814
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
815
+ }
816
+ });
817
+ });
818
+ },
642
819
  /**
643
820
  * 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\"
644
821
  * @summary List product languages
@@ -672,11 +849,11 @@ var TranslationApiFp = function (configuration) {
672
849
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
673
850
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
674
851
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
675
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key</i>
852
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key, language</i>
676
853
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: key</i>
677
854
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, key</i>
678
855
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
679
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key</i>
856
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key, language</i>
680
857
  * @param {*} [options] Override http request option.
681
858
  * @throws {RequiredError}
682
859
  */
@@ -693,6 +870,49 @@ var TranslationApiFp = function (configuration) {
693
870
  });
694
871
  });
695
872
  },
873
+ /**
874
+ * 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\"
875
+ * @summary Retrieve the refreshed product languages
876
+ * @param {string} productSlug Slug of the product.
877
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
878
+ * @param {*} [options] Override http request option.
879
+ * @throws {RequiredError}
880
+ */
881
+ refreshProductLanguages: function (productSlug, authorization, options) {
882
+ return __awaiter(this, void 0, void 0, function () {
883
+ var localVarAxiosArgs;
884
+ return __generator(this, function (_a) {
885
+ switch (_a.label) {
886
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshProductLanguages(productSlug, authorization, options)];
887
+ case 1:
888
+ localVarAxiosArgs = _a.sent();
889
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
890
+ }
891
+ });
892
+ });
893
+ },
894
+ /**
895
+ * 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\"
896
+ * @summary Create the product translations
897
+ * @param {string} productSlug
898
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
899
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
900
+ * @param {*} [options] Override http request option.
901
+ * @throws {RequiredError}
902
+ */
903
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
904
+ return __awaiter(this, void 0, void 0, function () {
905
+ var localVarAxiosArgs;
906
+ return __generator(this, function (_a) {
907
+ switch (_a.label) {
908
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options)];
909
+ case 1:
910
+ localVarAxiosArgs = _a.sent();
911
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
912
+ }
913
+ });
914
+ });
915
+ },
696
916
  /**
697
917
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
698
918
  * @summary Update the product language
@@ -792,6 +1012,18 @@ var TranslationApiFactory = function (configuration, basePath, axios) {
792
1012
  getProductLanguage: function (id, authorization, options) {
793
1013
  return localVarFp.getProductLanguage(id, authorization, options).then(function (request) { return request(axios, basePath); });
794
1014
  },
1015
+ /**
1016
+ * 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\"
1017
+ * @summary Retrieve the product translations
1018
+ * @param {string} productSlug
1019
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
1020
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1021
+ * @param {*} [options] Override http request option.
1022
+ * @throws {RequiredError}
1023
+ */
1024
+ getProductTranslations: function (productSlug, language, authorization, options) {
1025
+ return localVarFp.getProductTranslations(productSlug, language, authorization, options).then(function (request) { return request(axios, basePath); });
1026
+ },
795
1027
  /**
796
1028
  * 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\"
797
1029
  * @summary List product languages
@@ -815,17 +1047,40 @@ var TranslationApiFactory = function (configuration, basePath, axios) {
815
1047
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
816
1048
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
817
1049
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
818
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key</i>
1050
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: key, language</i>
819
1051
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: key</i>
820
1052
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, key</i>
821
1053
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
822
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key</i>
1054
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: key, language</i>
823
1055
  * @param {*} [options] Override http request option.
824
1056
  * @throws {RequiredError}
825
1057
  */
826
1058
  listTranslations: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
827
1059
  return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
828
1060
  },
1061
+ /**
1062
+ * 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\"
1063
+ * @summary Retrieve the refreshed product languages
1064
+ * @param {string} productSlug Slug of the product.
1065
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1066
+ * @param {*} [options] Override http request option.
1067
+ * @throws {RequiredError}
1068
+ */
1069
+ refreshProductLanguages: function (productSlug, authorization, options) {
1070
+ return localVarFp.refreshProductLanguages(productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
1071
+ },
1072
+ /**
1073
+ * 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\"
1074
+ * @summary Create the product translations
1075
+ * @param {string} productSlug
1076
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
1077
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ */
1081
+ saveProductTranslations: function (productSlug, saveProductTranslationsRequestDto, authorization, options) {
1082
+ return localVarFp.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1083
+ },
829
1084
  /**
830
1085
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
831
1086
  * @summary Update the product language
@@ -912,6 +1167,18 @@ var TranslationApi = /** @class */ (function (_super) {
912
1167
  var _this = this;
913
1168
  return (0, exports.TranslationApiFp)(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
914
1169
  };
1170
+ /**
1171
+ * 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\"
1172
+ * @summary Retrieve the product translations
1173
+ * @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
1174
+ * @param {*} [options] Override http request option.
1175
+ * @throws {RequiredError}
1176
+ * @memberof TranslationApi
1177
+ */
1178
+ TranslationApi.prototype.getProductTranslations = function (requestParameters, options) {
1179
+ var _this = this;
1180
+ return (0, exports.TranslationApiFp)(this.configuration).getProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1181
+ };
915
1182
  /**
916
1183
  * 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\"
917
1184
  * @summary List product languages
@@ -938,6 +1205,30 @@ var TranslationApi = /** @class */ (function (_super) {
938
1205
  if (requestParameters === void 0) { requestParameters = {}; }
939
1206
  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); });
940
1207
  };
1208
+ /**
1209
+ * 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\"
1210
+ * @summary Retrieve the refreshed product languages
1211
+ * @param {TranslationApiRefreshProductLanguagesRequest} requestParameters Request parameters.
1212
+ * @param {*} [options] Override http request option.
1213
+ * @throws {RequiredError}
1214
+ * @memberof TranslationApi
1215
+ */
1216
+ TranslationApi.prototype.refreshProductLanguages = function (requestParameters, options) {
1217
+ var _this = this;
1218
+ return (0, exports.TranslationApiFp)(this.configuration).refreshProductLanguages(requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1219
+ };
1220
+ /**
1221
+ * 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\"
1222
+ * @summary Create the product translations
1223
+ * @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ * @memberof TranslationApi
1227
+ */
1228
+ TranslationApi.prototype.saveProductTranslations = function (requestParameters, options) {
1229
+ var _this = this;
1230
+ return (0, exports.TranslationApiFp)(this.configuration).saveProductTranslations(requestParameters.productSlug, requestParameters.saveProductTranslationsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1231
+ };
941
1232
  /**
942
1233
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
943
1234
  * @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
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL TranslationService
6
+ * The EMIL TranslationService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,17 @@
1
1
  export * from './create-product-language-request-dto';
2
2
  export * from './create-product-language-response-class';
3
3
  export * from './get-product-language-response-class';
4
+ export * from './get-product-translations-response-class';
4
5
  export * from './inline-response200';
5
6
  export * from './inline-response503';
6
7
  export * from './list-product-languages-response-class';
7
8
  export * from './list-translations-response-class';
9
+ export * from './new-translation-class';
8
10
  export * from './product-language-class';
11
+ export * from './refresh-product-languages-response-class';
12
+ export * from './save-product-translations-request-dto';
13
+ export * from './skipped-translation-class';
14
+ export * from './translatable-field-class';
9
15
  export * from './translation-class';
10
16
  export * from './update-product-language-request-dto';
11
17
  export * from './update-product-language-response-class';
@@ -17,11 +17,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-product-language-request-dto"), exports);
18
18
  __exportStar(require("./create-product-language-response-class"), exports);
19
19
  __exportStar(require("./get-product-language-response-class"), exports);
20
+ __exportStar(require("./get-product-translations-response-class"), exports);
20
21
  __exportStar(require("./inline-response200"), exports);
21
22
  __exportStar(require("./inline-response503"), exports);
22
23
  __exportStar(require("./list-product-languages-response-class"), exports);
23
24
  __exportStar(require("./list-translations-response-class"), exports);
25
+ __exportStar(require("./new-translation-class"), exports);
24
26
  __exportStar(require("./product-language-class"), exports);
27
+ __exportStar(require("./refresh-product-languages-response-class"), exports);
28
+ __exportStar(require("./save-product-translations-request-dto"), exports);
29
+ __exportStar(require("./skipped-translation-class"), exports);
30
+ __exportStar(require("./translatable-field-class"), exports);
25
31
  __exportStar(require("./translation-class"), exports);
26
32
  __exportStar(require("./update-product-language-request-dto"), exports);
27
33
  __exportStar(require("./update-product-language-response-class"), exports);
@@ -0,0 +1,36 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface NewTranslationClass
16
+ */
17
+ export interface NewTranslationClass {
18
+ /**
19
+ * Identifier of the translated field
20
+ * @type {string}
21
+ * @memberof NewTranslationClass
22
+ */
23
+ 'key': string;
24
+ /**
25
+ * Language of the translation
26
+ * @type {string}
27
+ * @memberof NewTranslationClass
28
+ */
29
+ 'language': string;
30
+ /**
31
+ * Translated value
32
+ * @type {string}
33
+ * @memberof NewTranslationClass
34
+ */
35
+ 'value': string;
36
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL TranslationService
6
+ * The EMIL TranslationService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 { ProductLanguageClass } from './product-language-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RefreshProductLanguagesResponseClass
17
+ */
18
+ export interface RefreshProductLanguagesResponseClass {
19
+ /**
20
+ * The list of product languages.
21
+ * @type {Array<ProductLanguageClass>}
22
+ * @memberof RefreshProductLanguagesResponseClass
23
+ */
24
+ 'items': Array<ProductLanguageClass>;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL TranslationService
6
+ * The EMIL TranslationService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,53 @@
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 { NewTranslationClass } from './new-translation-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SaveProductTranslationsRequestDto
17
+ */
18
+ export interface SaveProductTranslationsRequestDto {
19
+ /**
20
+ * Language of the product\'s translations
21
+ * @type {string}
22
+ * @memberof SaveProductTranslationsRequestDto
23
+ */
24
+ 'language': SaveProductTranslationsRequestDtoLanguageEnum;
25
+ /**
26
+ * Translations to create or update, keyed by translation key
27
+ * @type {Array<NewTranslationClass>}
28
+ * @memberof SaveProductTranslationsRequestDto
29
+ */
30
+ 'translations': Array<NewTranslationClass>;
31
+ }
32
+ export declare const SaveProductTranslationsRequestDtoLanguageEnum: {
33
+ readonly German: "German";
34
+ readonly English: "English";
35
+ readonly Polish: "Polish";
36
+ readonly French: "French";
37
+ readonly Italian: "Italian";
38
+ readonly Spanish: "Spanish";
39
+ readonly Portuguese: "Portuguese";
40
+ readonly Russian: "Russian";
41
+ readonly Japanese: "Japanese";
42
+ readonly Chinese: "Chinese";
43
+ readonly Korean: "Korean";
44
+ readonly Turkish: "Turkish";
45
+ readonly Arabic: "Arabic";
46
+ readonly Hindi: "Hindi";
47
+ readonly Indonesian: "Indonesian";
48
+ readonly Thai: "Thai";
49
+ readonly Vietnamese: "Vietnamese";
50
+ readonly Persian: "Persian";
51
+ readonly Romanian: "Romanian";
52
+ };
53
+ export type SaveProductTranslationsRequestDtoLanguageEnum = typeof SaveProductTranslationsRequestDtoLanguageEnum[keyof typeof SaveProductTranslationsRequestDtoLanguageEnum];