@emilgroup/translation-sdk-node 1.8.0 → 1.8.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.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/translation-api.ts +348 -8
- package/dist/api/translation-api.d.ts +194 -8
- package/dist/api/translation-api.js +297 -6
- package/dist/models/get-product-translations-response-class.d.ts +25 -0
- package/dist/models/get-product-translations-response-class.js +15 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/new-translation-class.d.ts +36 -0
- package/dist/models/new-translation-class.js +15 -0
- package/dist/models/refresh-product-languages-response-class.d.ts +25 -0
- package/dist/models/refresh-product-languages-response-class.js +15 -0
- package/dist/models/save-product-translations-request-dto.d.ts +53 -0
- package/dist/models/save-product-translations-request-dto.js +37 -0
- package/dist/models/skipped-translation-class.d.ts +36 -0
- package/dist/models/skipped-translation-class.js +15 -0
- package/dist/models/translatable-field-class.d.ts +54 -0
- package/dist/models/translatable-field-class.js +15 -0
- package/dist/models/upload-product-translations-response-class.d.ts +13 -0
- package/models/get-product-translations-response-class.ts +31 -0
- package/models/index.ts +6 -0
- package/models/new-translation-class.ts +42 -0
- package/models/refresh-product-languages-response-class.ts +31 -0
- package/models/save-product-translations-request-dto.ts +62 -0
- package/models/skipped-translation-class.ts +42 -0
- package/models/translatable-field-class.ts +60 -0
- package/models/upload-product-translations-response-class.ts +13 -0
- package/package.json +1 -1
|
@@ -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
|
|
@@ -373,11 +427,11 @@ var TranslationApiAxiosParamCreator = function (configuration) {
|
|
|
373
427
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
374
428
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
375
429
|
* @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.
|
|
376
|
-
* @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>
|
|
430
|
+
* @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>
|
|
377
431
|
* @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>
|
|
378
432
|
* @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>
|
|
379
433
|
* @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/>
|
|
380
|
-
* @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>
|
|
434
|
+
* @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>
|
|
381
435
|
* @param {*} [options] Override http request option.
|
|
382
436
|
* @throws {RequiredError}
|
|
383
437
|
*/
|
|
@@ -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
|
|
@@ -677,11 +854,11 @@ var TranslationApiFp = function (configuration) {
|
|
|
677
854
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
678
855
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
679
856
|
* @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.
|
|
680
|
-
* @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>
|
|
857
|
+
* @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>
|
|
681
858
|
* @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>
|
|
682
859
|
* @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>
|
|
683
860
|
* @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/>
|
|
684
|
-
* @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>
|
|
861
|
+
* @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>
|
|
685
862
|
* @param {*} [options] Override http request option.
|
|
686
863
|
* @throws {RequiredError}
|
|
687
864
|
*/
|
|
@@ -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
|
|
@@ -820,17 +1052,40 @@ var TranslationApiFactory = function (configuration, basePath, axios) {
|
|
|
820
1052
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
821
1053
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
822
1054
|
* @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.
|
|
823
|
-
* @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>
|
|
1055
|
+
* @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>
|
|
824
1056
|
* @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>
|
|
825
1057
|
* @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>
|
|
826
1058
|
* @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/>
|
|
827
|
-
* @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>
|
|
1059
|
+
* @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>
|
|
828
1060
|
* @param {*} [options] Override http request option.
|
|
829
1061
|
* @throws {RequiredError}
|
|
830
1062
|
*/
|
|
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
|
+
}
|
|
@@ -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 });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -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];
|