@emilgroup/translation-sdk-node 1.8.1-beta.1 → 1.8.1-beta.3
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 +245 -8
- package/dist/api/translation-api.d.ts +138 -8
- package/dist/api/translation-api.js +205 -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 +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.3 --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.3
|
|
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};
|
|
@@ -317,11 +373,11 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
317
373
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
318
374
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
319
375
|
* @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.
|
|
320
|
-
* @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>
|
|
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, language</i>
|
|
321
377
|
* @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>
|
|
322
378
|
* @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>
|
|
323
379
|
* @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/>
|
|
324
|
-
* @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>
|
|
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, language</i>
|
|
325
381
|
* @param {*} [options] Override http request option.
|
|
326
382
|
* @throws {RequiredError}
|
|
327
383
|
*/
|
|
@@ -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
|
|
@@ -579,11 +699,11 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
579
699
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
580
700
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
581
701
|
* @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.
|
|
582
|
-
* @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>
|
|
702
|
+
* @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>
|
|
583
703
|
* @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>
|
|
584
704
|
* @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>
|
|
585
705
|
* @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/>
|
|
586
|
-
* @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>
|
|
706
|
+
* @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>
|
|
587
707
|
* @param {*} [options] Override http request option.
|
|
588
708
|
* @throws {RequiredError}
|
|
589
709
|
*/
|
|
@@ -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
|
|
@@ -695,17 +840,29 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
695
840
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
696
841
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
697
842
|
* @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.
|
|
698
|
-
* @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>
|
|
843
|
+
* @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>
|
|
699
844
|
* @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>
|
|
700
845
|
* @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>
|
|
701
846
|
* @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/>
|
|
702
|
-
* @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>
|
|
847
|
+
* @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>
|
|
703
848
|
* @param {*} [options] Override http request option.
|
|
704
849
|
* @throws {RequiredError}
|
|
705
850
|
*/
|
|
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
|
|
@@ -915,7 +1100,7 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
915
1100
|
readonly pageToken?: string
|
|
916
1101
|
|
|
917
1102
|
/**
|
|
918
|
-
* 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>
|
|
1103
|
+
* 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>
|
|
919
1104
|
* @type {string}
|
|
920
1105
|
* @memberof TranslationApiListTranslations
|
|
921
1106
|
*/
|
|
@@ -943,13 +1128,41 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
943
1128
|
readonly expand?: string
|
|
944
1129
|
|
|
945
1130
|
/**
|
|
946
|
-
* 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>
|
|
1131
|
+
* 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>
|
|
947
1132
|
* @type {string}
|
|
948
1133
|
* @memberof TranslationApiListTranslations
|
|
949
1134
|
*/
|
|
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
|