@emilgroup/translation-sdk-node 1.8.1-beta.2 → 1.8.1-beta.4
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 +4 -0
- package/README.md +2 -2
- package/api/translation-api.ts +237 -0
- package/dist/api/translation-api.d.ts +130 -0
- package/dist/api/translation-api.js +199 -0
- 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 +4 -0
- package/dist/models/index.js +4 -0
- package/dist/models/new-translation-class.d.ts +36 -0
- package/dist/models/new-translation-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/translatable-field-class.d.ts +42 -0
- package/dist/models/translatable-field-class.js +15 -0
- package/models/get-product-translations-response-class.ts +31 -0
- package/models/index.ts +4 -0
- package/models/new-translation-class.ts +42 -0
- package/models/save-product-translations-request-dto.ts +62 -0
- package/models/translatable-field-class.ts +48 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -13,12 +13,16 @@ index.ts
|
|
|
13
13
|
models/create-product-language-request-dto.ts
|
|
14
14
|
models/create-product-language-response-class.ts
|
|
15
15
|
models/get-product-language-response-class.ts
|
|
16
|
+
models/get-product-translations-response-class.ts
|
|
16
17
|
models/index.ts
|
|
17
18
|
models/inline-response200.ts
|
|
18
19
|
models/inline-response503.ts
|
|
19
20
|
models/list-product-languages-response-class.ts
|
|
20
21
|
models/list-translations-response-class.ts
|
|
22
|
+
models/new-translation-class.ts
|
|
21
23
|
models/product-language-class.ts
|
|
24
|
+
models/save-product-translations-request-dto.ts
|
|
25
|
+
models/translatable-field-class.ts
|
|
22
26
|
models/translation-class.ts
|
|
23
27
|
models/update-product-language-request-dto.ts
|
|
24
28
|
models/update-product-language-response-class.ts
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/translation-sdk-node@1.8.1-beta.
|
|
20
|
+
npm install @emilgroup/translation-sdk-node@1.8.1-beta.4 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/translation-sdk-node@1.8.1-beta.
|
|
24
|
+
yarn add @emilgroup/translation-sdk-node@1.8.1-beta.4
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `TranslationApi`.
|
package/api/translation-api.ts
CHANGED
|
@@ -27,10 +27,14 @@ import { CreateProductLanguageResponseClass } from '../models';
|
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { GetProductLanguageResponseClass } from '../models';
|
|
29
29
|
// @ts-ignore
|
|
30
|
+
import { GetProductTranslationsResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
30
32
|
import { ListProductLanguagesResponseClass } from '../models';
|
|
31
33
|
// @ts-ignore
|
|
32
34
|
import { ListTranslationsResponseClass } from '../models';
|
|
33
35
|
// @ts-ignore
|
|
36
|
+
import { SaveProductTranslationsRequestDto } from '../models';
|
|
37
|
+
// @ts-ignore
|
|
34
38
|
import { UpdateProductLanguageRequestDto } from '../models';
|
|
35
39
|
// @ts-ignore
|
|
36
40
|
import { UpdateProductLanguageResponseClass } from '../models';
|
|
@@ -226,6 +230,58 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
226
230
|
|
|
227
231
|
|
|
228
232
|
|
|
233
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
234
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
235
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
url: toPathString(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions,
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* 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\"
|
|
244
|
+
* @summary Retrieve the product translations
|
|
245
|
+
* @param {string} productSlug
|
|
246
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
247
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
getProductTranslations: async (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> => {
|
|
252
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
253
|
+
assertParamExists('getProductTranslations', 'productSlug', productSlug)
|
|
254
|
+
// verify required parameter 'language' is not null or undefined
|
|
255
|
+
assertParamExists('getProductTranslations', 'language', language)
|
|
256
|
+
const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
|
|
257
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
258
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
259
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
260
|
+
let baseOptions;
|
|
261
|
+
let baseAccessToken;
|
|
262
|
+
if (configuration) {
|
|
263
|
+
baseOptions = configuration.baseOptions;
|
|
264
|
+
baseAccessToken = configuration.accessToken;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
268
|
+
const localVarHeaderParameter = {} as any;
|
|
269
|
+
const localVarQueryParameter = {} as any;
|
|
270
|
+
|
|
271
|
+
// authentication bearer required
|
|
272
|
+
// http bearer authentication required
|
|
273
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
274
|
+
|
|
275
|
+
if (language !== undefined) {
|
|
276
|
+
localVarQueryParameter['language'] = language;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
280
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
229
285
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
230
286
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
231
287
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -387,6 +443,57 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
387
443
|
options: localVarRequestOptions,
|
|
388
444
|
};
|
|
389
445
|
},
|
|
446
|
+
/**
|
|
447
|
+
* 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\"
|
|
448
|
+
* @summary Create the product translations
|
|
449
|
+
* @param {string} productSlug
|
|
450
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
451
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
452
|
+
* @param {*} [options] Override http request option.
|
|
453
|
+
* @throws {RequiredError}
|
|
454
|
+
*/
|
|
455
|
+
saveProductTranslations: async (productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
456
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
457
|
+
assertParamExists('saveProductTranslations', 'productSlug', productSlug)
|
|
458
|
+
// verify required parameter 'saveProductTranslationsRequestDto' is not null or undefined
|
|
459
|
+
assertParamExists('saveProductTranslations', 'saveProductTranslationsRequestDto', saveProductTranslationsRequestDto)
|
|
460
|
+
const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
|
|
461
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
462
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
463
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
464
|
+
let baseOptions;
|
|
465
|
+
let baseAccessToken;
|
|
466
|
+
if (configuration) {
|
|
467
|
+
baseOptions = configuration.baseOptions;
|
|
468
|
+
baseAccessToken = configuration.accessToken;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
472
|
+
const localVarHeaderParameter = {} as any;
|
|
473
|
+
const localVarQueryParameter = {} as any;
|
|
474
|
+
|
|
475
|
+
// authentication bearer required
|
|
476
|
+
// http bearer authentication required
|
|
477
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
478
|
+
|
|
479
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
480
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
486
|
+
|
|
487
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
488
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
489
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
490
|
+
localVarRequestOptions.data = serializeDataIfNeeded(saveProductTranslationsRequestDto, localVarRequestOptions, configuration)
|
|
491
|
+
|
|
492
|
+
return {
|
|
493
|
+
url: toPathString(localVarUrlObj),
|
|
494
|
+
options: localVarRequestOptions,
|
|
495
|
+
};
|
|
496
|
+
},
|
|
390
497
|
/**
|
|
391
498
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
392
499
|
* @summary Update the product language
|
|
@@ -555,6 +662,19 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
555
662
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductLanguage(id, authorization, options);
|
|
556
663
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
557
664
|
},
|
|
665
|
+
/**
|
|
666
|
+
* 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\"
|
|
667
|
+
* @summary Retrieve the product translations
|
|
668
|
+
* @param {string} productSlug
|
|
669
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
670
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
671
|
+
* @param {*} [options] Override http request option.
|
|
672
|
+
* @throws {RequiredError}
|
|
673
|
+
*/
|
|
674
|
+
async 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>> {
|
|
675
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductTranslations(productSlug, language, authorization, options);
|
|
676
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
677
|
+
},
|
|
558
678
|
/**
|
|
559
679
|
* 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\"
|
|
560
680
|
* @summary List product languages
|
|
@@ -591,6 +711,19 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
591
711
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
592
712
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
593
713
|
},
|
|
714
|
+
/**
|
|
715
|
+
* 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\"
|
|
716
|
+
* @summary Create the product translations
|
|
717
|
+
* @param {string} productSlug
|
|
718
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
719
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
720
|
+
* @param {*} [options] Override http request option.
|
|
721
|
+
* @throws {RequiredError}
|
|
722
|
+
*/
|
|
723
|
+
async saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadProductTranslationsResponseClass>> {
|
|
724
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options);
|
|
725
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
726
|
+
},
|
|
594
727
|
/**
|
|
595
728
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
596
729
|
* @summary Update the product language
|
|
@@ -672,6 +805,18 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
672
805
|
getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass> {
|
|
673
806
|
return localVarFp.getProductLanguage(id, authorization, options).then((request) => request(axios, basePath));
|
|
674
807
|
},
|
|
808
|
+
/**
|
|
809
|
+
* 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\"
|
|
810
|
+
* @summary Retrieve the product translations
|
|
811
|
+
* @param {string} productSlug
|
|
812
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
813
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
814
|
+
* @param {*} [options] Override http request option.
|
|
815
|
+
* @throws {RequiredError}
|
|
816
|
+
*/
|
|
817
|
+
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> {
|
|
818
|
+
return localVarFp.getProductTranslations(productSlug, language, authorization, options).then((request) => request(axios, basePath));
|
|
819
|
+
},
|
|
675
820
|
/**
|
|
676
821
|
* 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\"
|
|
677
822
|
* @summary List product languages
|
|
@@ -706,6 +851,18 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
706
851
|
listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTranslationsResponseClass> {
|
|
707
852
|
return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
708
853
|
},
|
|
854
|
+
/**
|
|
855
|
+
* 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\"
|
|
856
|
+
* @summary Create the product translations
|
|
857
|
+
* @param {string} productSlug
|
|
858
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
859
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
860
|
+
* @param {*} [options] Override http request option.
|
|
861
|
+
* @throws {RequiredError}
|
|
862
|
+
*/
|
|
863
|
+
saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: any): AxiosPromise<UploadProductTranslationsResponseClass> {
|
|
864
|
+
return localVarFp.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
865
|
+
},
|
|
709
866
|
/**
|
|
710
867
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
711
868
|
* @summary Update the product language
|
|
@@ -824,6 +981,34 @@ export interface TranslationApiGetProductLanguageRequest {
|
|
|
824
981
|
readonly authorization?: string
|
|
825
982
|
}
|
|
826
983
|
|
|
984
|
+
/**
|
|
985
|
+
* Request parameters for getProductTranslations operation in TranslationApi.
|
|
986
|
+
* @export
|
|
987
|
+
* @interface TranslationApiGetProductTranslationsRequest
|
|
988
|
+
*/
|
|
989
|
+
export interface TranslationApiGetProductTranslationsRequest {
|
|
990
|
+
/**
|
|
991
|
+
*
|
|
992
|
+
* @type {string}
|
|
993
|
+
* @memberof TranslationApiGetProductTranslations
|
|
994
|
+
*/
|
|
995
|
+
readonly productSlug: string
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
*
|
|
999
|
+
* @type {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'}
|
|
1000
|
+
* @memberof TranslationApiGetProductTranslations
|
|
1001
|
+
*/
|
|
1002
|
+
readonly language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1006
|
+
* @type {string}
|
|
1007
|
+
* @memberof TranslationApiGetProductTranslations
|
|
1008
|
+
*/
|
|
1009
|
+
readonly authorization?: string
|
|
1010
|
+
}
|
|
1011
|
+
|
|
827
1012
|
/**
|
|
828
1013
|
* Request parameters for listProductLanguages operation in TranslationApi.
|
|
829
1014
|
* @export
|
|
@@ -950,6 +1135,34 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
950
1135
|
readonly filters?: string
|
|
951
1136
|
}
|
|
952
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* Request parameters for saveProductTranslations operation in TranslationApi.
|
|
1140
|
+
* @export
|
|
1141
|
+
* @interface TranslationApiSaveProductTranslationsRequest
|
|
1142
|
+
*/
|
|
1143
|
+
export interface TranslationApiSaveProductTranslationsRequest {
|
|
1144
|
+
/**
|
|
1145
|
+
*
|
|
1146
|
+
* @type {string}
|
|
1147
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1148
|
+
*/
|
|
1149
|
+
readonly productSlug: string
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
*
|
|
1153
|
+
* @type {SaveProductTranslationsRequestDto}
|
|
1154
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1155
|
+
*/
|
|
1156
|
+
readonly saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1160
|
+
* @type {string}
|
|
1161
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1162
|
+
*/
|
|
1163
|
+
readonly authorization?: string
|
|
1164
|
+
}
|
|
1165
|
+
|
|
953
1166
|
/**
|
|
954
1167
|
* Request parameters for updateProductLanguage operation in TranslationApi.
|
|
955
1168
|
* @export
|
|
@@ -1061,6 +1274,18 @@ export class TranslationApi extends BaseAPI {
|
|
|
1061
1274
|
return TranslationApiFp(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1062
1275
|
}
|
|
1063
1276
|
|
|
1277
|
+
/**
|
|
1278
|
+
* 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\"
|
|
1279
|
+
* @summary Retrieve the product translations
|
|
1280
|
+
* @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
|
|
1281
|
+
* @param {*} [options] Override http request option.
|
|
1282
|
+
* @throws {RequiredError}
|
|
1283
|
+
* @memberof TranslationApi
|
|
1284
|
+
*/
|
|
1285
|
+
public getProductTranslations(requestParameters: TranslationApiGetProductTranslationsRequest, options?: AxiosRequestConfig) {
|
|
1286
|
+
return TranslationApiFp(this.configuration).getProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1064
1289
|
/**
|
|
1065
1290
|
* 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\"
|
|
1066
1291
|
* @summary List product languages
|
|
@@ -1085,6 +1310,18 @@ export class TranslationApi extends BaseAPI {
|
|
|
1085
1310
|
return TranslationApiFp(this.configuration).listTranslations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1086
1311
|
}
|
|
1087
1312
|
|
|
1313
|
+
/**
|
|
1314
|
+
* 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\"
|
|
1315
|
+
* @summary Create the product translations
|
|
1316
|
+
* @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
|
|
1317
|
+
* @param {*} [options] Override http request option.
|
|
1318
|
+
* @throws {RequiredError}
|
|
1319
|
+
* @memberof TranslationApi
|
|
1320
|
+
*/
|
|
1321
|
+
public saveProductTranslations(requestParameters: TranslationApiSaveProductTranslationsRequest, options?: AxiosRequestConfig) {
|
|
1322
|
+
return TranslationApiFp(this.configuration).saveProductTranslations(requestParameters.productSlug, requestParameters.saveProductTranslationsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1088
1325
|
/**
|
|
1089
1326
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
1090
1327
|
* @summary Update the product language
|
|
@@ -15,8 +15,10 @@ 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 { SaveProductTranslationsRequestDto } from '../models';
|
|
20
22
|
import { UpdateProductLanguageRequestDto } from '../models';
|
|
21
23
|
import { UpdateProductLanguageResponseClass } from '../models';
|
|
22
24
|
import { UploadProductTranslationsResponseClass } from '../models';
|
|
@@ -62,6 +64,16 @@ export declare const TranslationApiAxiosParamCreator: (configuration?: Configura
|
|
|
62
64
|
* @throws {RequiredError}
|
|
63
65
|
*/
|
|
64
66
|
getProductLanguage: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
67
|
+
/**
|
|
68
|
+
* 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\"
|
|
69
|
+
* @summary Retrieve the product translations
|
|
70
|
+
* @param {string} productSlug
|
|
71
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
72
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
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
77
|
/**
|
|
66
78
|
* 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
79
|
* @summary List product languages
|
|
@@ -92,6 +104,16 @@ export declare const TranslationApiAxiosParamCreator: (configuration?: Configura
|
|
|
92
104
|
* @throws {RequiredError}
|
|
93
105
|
*/
|
|
94
106
|
listTranslations: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
107
|
+
/**
|
|
108
|
+
* 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\"
|
|
109
|
+
* @summary Create the product translations
|
|
110
|
+
* @param {string} productSlug
|
|
111
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
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
|
+
saveProductTranslations: (productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
95
117
|
/**
|
|
96
118
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
97
119
|
* @summary Update the product language
|
|
@@ -155,6 +177,16 @@ export declare const TranslationApiFp: (configuration?: Configuration) => {
|
|
|
155
177
|
* @throws {RequiredError}
|
|
156
178
|
*/
|
|
157
179
|
getProductLanguage(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductLanguageResponseClass>>;
|
|
180
|
+
/**
|
|
181
|
+
* 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\"
|
|
182
|
+
* @summary Retrieve the product translations
|
|
183
|
+
* @param {string} productSlug
|
|
184
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
185
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
186
|
+
* @param {*} [options] Override http request option.
|
|
187
|
+
* @throws {RequiredError}
|
|
188
|
+
*/
|
|
189
|
+
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
190
|
/**
|
|
159
191
|
* 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
192
|
* @summary List product languages
|
|
@@ -185,6 +217,16 @@ export declare const TranslationApiFp: (configuration?: Configuration) => {
|
|
|
185
217
|
* @throws {RequiredError}
|
|
186
218
|
*/
|
|
187
219
|
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>>;
|
|
220
|
+
/**
|
|
221
|
+
* 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\"
|
|
222
|
+
* @summary Create the product translations
|
|
223
|
+
* @param {string} productSlug
|
|
224
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
225
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadProductTranslationsResponseClass>>;
|
|
188
230
|
/**
|
|
189
231
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
190
232
|
* @summary Update the product language
|
|
@@ -248,6 +290,16 @@ export declare const TranslationApiFactory: (configuration?: Configuration, base
|
|
|
248
290
|
* @throws {RequiredError}
|
|
249
291
|
*/
|
|
250
292
|
getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass>;
|
|
293
|
+
/**
|
|
294
|
+
* 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\"
|
|
295
|
+
* @summary Retrieve the product translations
|
|
296
|
+
* @param {string} productSlug
|
|
297
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
298
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
299
|
+
* @param {*} [options] Override http request option.
|
|
300
|
+
* @throws {RequiredError}
|
|
301
|
+
*/
|
|
302
|
+
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
303
|
/**
|
|
252
304
|
* 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
305
|
* @summary List product languages
|
|
@@ -278,6 +330,16 @@ export declare const TranslationApiFactory: (configuration?: Configuration, base
|
|
|
278
330
|
* @throws {RequiredError}
|
|
279
331
|
*/
|
|
280
332
|
listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTranslationsResponseClass>;
|
|
333
|
+
/**
|
|
334
|
+
* 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\"
|
|
335
|
+
* @summary Create the product translations
|
|
336
|
+
* @param {string} productSlug
|
|
337
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
338
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: any): AxiosPromise<UploadProductTranslationsResponseClass>;
|
|
281
343
|
/**
|
|
282
344
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
283
345
|
* @summary Update the product language
|
|
@@ -381,6 +443,31 @@ export interface TranslationApiGetProductLanguageRequest {
|
|
|
381
443
|
*/
|
|
382
444
|
readonly authorization?: string;
|
|
383
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Request parameters for getProductTranslations operation in TranslationApi.
|
|
448
|
+
* @export
|
|
449
|
+
* @interface TranslationApiGetProductTranslationsRequest
|
|
450
|
+
*/
|
|
451
|
+
export interface TranslationApiGetProductTranslationsRequest {
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @type {string}
|
|
455
|
+
* @memberof TranslationApiGetProductTranslations
|
|
456
|
+
*/
|
|
457
|
+
readonly productSlug: string;
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* @type {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'}
|
|
461
|
+
* @memberof TranslationApiGetProductTranslations
|
|
462
|
+
*/
|
|
463
|
+
readonly language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian';
|
|
464
|
+
/**
|
|
465
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
466
|
+
* @type {string}
|
|
467
|
+
* @memberof TranslationApiGetProductTranslations
|
|
468
|
+
*/
|
|
469
|
+
readonly authorization?: string;
|
|
470
|
+
}
|
|
384
471
|
/**
|
|
385
472
|
* Request parameters for listProductLanguages operation in TranslationApi.
|
|
386
473
|
* @export
|
|
@@ -491,6 +578,31 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
491
578
|
*/
|
|
492
579
|
readonly filters?: string;
|
|
493
580
|
}
|
|
581
|
+
/**
|
|
582
|
+
* Request parameters for saveProductTranslations operation in TranslationApi.
|
|
583
|
+
* @export
|
|
584
|
+
* @interface TranslationApiSaveProductTranslationsRequest
|
|
585
|
+
*/
|
|
586
|
+
export interface TranslationApiSaveProductTranslationsRequest {
|
|
587
|
+
/**
|
|
588
|
+
*
|
|
589
|
+
* @type {string}
|
|
590
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
591
|
+
*/
|
|
592
|
+
readonly productSlug: string;
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
* @type {SaveProductTranslationsRequestDto}
|
|
596
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
597
|
+
*/
|
|
598
|
+
readonly saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto;
|
|
599
|
+
/**
|
|
600
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
601
|
+
* @type {string}
|
|
602
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
603
|
+
*/
|
|
604
|
+
readonly authorization?: string;
|
|
605
|
+
}
|
|
494
606
|
/**
|
|
495
607
|
* Request parameters for updateProductLanguage operation in TranslationApi.
|
|
496
608
|
* @export
|
|
@@ -584,6 +696,15 @@ export declare class TranslationApi extends BaseAPI {
|
|
|
584
696
|
* @memberof TranslationApi
|
|
585
697
|
*/
|
|
586
698
|
getProductLanguage(requestParameters: TranslationApiGetProductLanguageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductLanguageResponseClass, any, {}>>;
|
|
699
|
+
/**
|
|
700
|
+
* 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\"
|
|
701
|
+
* @summary Retrieve the product translations
|
|
702
|
+
* @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
|
|
703
|
+
* @param {*} [options] Override http request option.
|
|
704
|
+
* @throws {RequiredError}
|
|
705
|
+
* @memberof TranslationApi
|
|
706
|
+
*/
|
|
707
|
+
getProductTranslations(requestParameters: TranslationApiGetProductTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetProductTranslationsResponseClass, any, {}>>;
|
|
587
708
|
/**
|
|
588
709
|
* 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
710
|
* @summary List product languages
|
|
@@ -602,6 +723,15 @@ export declare class TranslationApi extends BaseAPI {
|
|
|
602
723
|
* @memberof TranslationApi
|
|
603
724
|
*/
|
|
604
725
|
listTranslations(requestParameters?: TranslationApiListTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTranslationsResponseClass, any, {}>>;
|
|
726
|
+
/**
|
|
727
|
+
* 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\"
|
|
728
|
+
* @summary Create the product translations
|
|
729
|
+
* @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
|
|
730
|
+
* @param {*} [options] Override http request option.
|
|
731
|
+
* @throws {RequiredError}
|
|
732
|
+
* @memberof TranslationApi
|
|
733
|
+
*/
|
|
734
|
+
saveProductTranslations(requestParameters: TranslationApiSaveProductTranslationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UploadProductTranslationsResponseClass, any, {}>>;
|
|
605
735
|
/**
|
|
606
736
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
607
737
|
* @summary Update the product language
|