@emilgroup/translation-sdk 1.10.0 → 1.10.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/.openapi-generator/FILES
CHANGED
|
@@ -13,12 +13,18 @@ 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/refresh-product-languages-response-class.ts
|
|
25
|
+
models/save-product-translations-request-dto.ts
|
|
26
|
+
models/skipped-translation-class.ts
|
|
27
|
+
models/translatable-field-class.ts
|
|
22
28
|
models/translation-class.ts
|
|
23
29
|
models/update-product-language-request-dto.ts
|
|
24
30
|
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@1.10.
|
|
20
|
+
npm install @emilgroup/translation-sdk@1.10.1-beta.10 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/translation-sdk@1.10.
|
|
24
|
+
yarn add @emilgroup/translation-sdk@1.10.1-beta.10
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `TranslationApi`.
|
package/api/translation-api.ts
CHANGED
|
@@ -27,10 +27,16 @@ 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 { RefreshProductLanguagesResponseClass } from '../models';
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
import { SaveProductTranslationsRequestDto } from '../models';
|
|
39
|
+
// @ts-ignore
|
|
34
40
|
import { UpdateProductLanguageRequestDto } from '../models';
|
|
35
41
|
// @ts-ignore
|
|
36
42
|
import { UpdateProductLanguageResponseClass } from '../models';
|
|
@@ -222,6 +228,58 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
222
228
|
|
|
223
229
|
|
|
224
230
|
|
|
231
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
233
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
url: toPathString(localVarUrlObj),
|
|
237
|
+
options: localVarRequestOptions,
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
/**
|
|
241
|
+
* 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\"
|
|
242
|
+
* @summary Retrieve the product translations
|
|
243
|
+
* @param {string} productSlug
|
|
244
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
245
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
*/
|
|
249
|
+
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> => {
|
|
250
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
251
|
+
assertParamExists('getProductTranslations', 'productSlug', productSlug)
|
|
252
|
+
// verify required parameter 'language' is not null or undefined
|
|
253
|
+
assertParamExists('getProductTranslations', 'language', language)
|
|
254
|
+
const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
|
|
255
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
256
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
257
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
258
|
+
let baseOptions;
|
|
259
|
+
let baseAccessToken;
|
|
260
|
+
if (configuration) {
|
|
261
|
+
baseOptions = configuration.baseOptions;
|
|
262
|
+
baseAccessToken = configuration.accessToken;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
266
|
+
const localVarHeaderParameter = {} as any;
|
|
267
|
+
const localVarQueryParameter = {} as any;
|
|
268
|
+
|
|
269
|
+
// authentication bearer required
|
|
270
|
+
// http bearer authentication required
|
|
271
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
272
|
+
|
|
273
|
+
if (language !== undefined) {
|
|
274
|
+
localVarQueryParameter['language'] = language;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
278
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
225
283
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
226
284
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
227
285
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -313,11 +371,11 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
313
371
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
314
372
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
315
373
|
* @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.
|
|
316
|
-
* @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>
|
|
374
|
+
* @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>
|
|
317
375
|
* @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>
|
|
318
376
|
* @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>
|
|
319
377
|
* @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/>
|
|
320
|
-
* @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>
|
|
378
|
+
* @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>
|
|
321
379
|
* @param {*} [options] Override http request option.
|
|
322
380
|
* @throws {RequiredError}
|
|
323
381
|
*/
|
|
@@ -383,6 +441,102 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
383
441
|
options: localVarRequestOptions,
|
|
384
442
|
};
|
|
385
443
|
},
|
|
444
|
+
/**
|
|
445
|
+
* 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\"
|
|
446
|
+
* @summary Retrieve the refreshed product languages
|
|
447
|
+
* @param {string} productSlug Slug of the product.
|
|
448
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
refreshProductLanguages: async (productSlug: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
453
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
454
|
+
assertParamExists('refreshProductLanguages', 'productSlug', productSlug)
|
|
455
|
+
const localVarPath = `/translationservice/v1/product/{productSlug}/languages`
|
|
456
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
457
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
458
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
459
|
+
let baseOptions;
|
|
460
|
+
let baseAccessToken;
|
|
461
|
+
if (configuration) {
|
|
462
|
+
baseOptions = configuration.baseOptions;
|
|
463
|
+
baseAccessToken = configuration.accessToken;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
467
|
+
const localVarHeaderParameter = {} as any;
|
|
468
|
+
const localVarQueryParameter = {} as any;
|
|
469
|
+
|
|
470
|
+
// authentication bearer required
|
|
471
|
+
// http bearer authentication required
|
|
472
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
473
|
+
|
|
474
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
475
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
481
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
482
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
483
|
+
|
|
484
|
+
return {
|
|
485
|
+
url: toPathString(localVarUrlObj),
|
|
486
|
+
options: localVarRequestOptions,
|
|
487
|
+
};
|
|
488
|
+
},
|
|
489
|
+
/**
|
|
490
|
+
* 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\"
|
|
491
|
+
* @summary Create the product translations
|
|
492
|
+
* @param {string} productSlug
|
|
493
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
494
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
495
|
+
* @param {*} [options] Override http request option.
|
|
496
|
+
* @throws {RequiredError}
|
|
497
|
+
*/
|
|
498
|
+
saveProductTranslations: async (productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
499
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
500
|
+
assertParamExists('saveProductTranslations', 'productSlug', productSlug)
|
|
501
|
+
// verify required parameter 'saveProductTranslationsRequestDto' is not null or undefined
|
|
502
|
+
assertParamExists('saveProductTranslations', 'saveProductTranslationsRequestDto', saveProductTranslationsRequestDto)
|
|
503
|
+
const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
|
|
504
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
505
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
506
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
507
|
+
let baseOptions;
|
|
508
|
+
let baseAccessToken;
|
|
509
|
+
if (configuration) {
|
|
510
|
+
baseOptions = configuration.baseOptions;
|
|
511
|
+
baseAccessToken = configuration.accessToken;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
515
|
+
const localVarHeaderParameter = {} as any;
|
|
516
|
+
const localVarQueryParameter = {} as any;
|
|
517
|
+
|
|
518
|
+
// authentication bearer required
|
|
519
|
+
// http bearer authentication required
|
|
520
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
521
|
+
|
|
522
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
523
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
529
|
+
|
|
530
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
531
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
532
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
533
|
+
localVarRequestOptions.data = serializeDataIfNeeded(saveProductTranslationsRequestDto, localVarRequestOptions, configuration)
|
|
534
|
+
|
|
535
|
+
return {
|
|
536
|
+
url: toPathString(localVarUrlObj),
|
|
537
|
+
options: localVarRequestOptions,
|
|
538
|
+
};
|
|
539
|
+
},
|
|
386
540
|
/**
|
|
387
541
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
388
542
|
* @summary Update the product language
|
|
@@ -550,6 +704,19 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
550
704
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductLanguage(id, authorization, options);
|
|
551
705
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
552
706
|
},
|
|
707
|
+
/**
|
|
708
|
+
* 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\"
|
|
709
|
+
* @summary Retrieve the product translations
|
|
710
|
+
* @param {string} productSlug
|
|
711
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
712
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
713
|
+
* @param {*} [options] Override http request option.
|
|
714
|
+
* @throws {RequiredError}
|
|
715
|
+
*/
|
|
716
|
+
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>> {
|
|
717
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductTranslations(productSlug, language, authorization, options);
|
|
718
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
719
|
+
},
|
|
553
720
|
/**
|
|
554
721
|
* 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\"
|
|
555
722
|
* @summary List product languages
|
|
@@ -574,11 +741,11 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
574
741
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
575
742
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
576
743
|
* @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.
|
|
577
|
-
* @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>
|
|
744
|
+
* @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>
|
|
578
745
|
* @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>
|
|
579
746
|
* @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>
|
|
580
747
|
* @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/>
|
|
581
|
-
* @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>
|
|
748
|
+
* @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>
|
|
582
749
|
* @param {*} [options] Override http request option.
|
|
583
750
|
* @throws {RequiredError}
|
|
584
751
|
*/
|
|
@@ -586,6 +753,31 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
586
753
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
587
754
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
588
755
|
},
|
|
756
|
+
/**
|
|
757
|
+
* 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\"
|
|
758
|
+
* @summary Retrieve the refreshed product languages
|
|
759
|
+
* @param {string} productSlug Slug of the product.
|
|
760
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
761
|
+
* @param {*} [options] Override http request option.
|
|
762
|
+
* @throws {RequiredError}
|
|
763
|
+
*/
|
|
764
|
+
async refreshProductLanguages(productSlug: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RefreshProductLanguagesResponseClass>> {
|
|
765
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.refreshProductLanguages(productSlug, authorization, options);
|
|
766
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
767
|
+
},
|
|
768
|
+
/**
|
|
769
|
+
* 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\"
|
|
770
|
+
* @summary Create the product translations
|
|
771
|
+
* @param {string} productSlug
|
|
772
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
773
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
774
|
+
* @param {*} [options] Override http request option.
|
|
775
|
+
* @throws {RequiredError}
|
|
776
|
+
*/
|
|
777
|
+
async saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadProductTranslationsResponseClass>> {
|
|
778
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options);
|
|
779
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
780
|
+
},
|
|
589
781
|
/**
|
|
590
782
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
591
783
|
* @summary Update the product language
|
|
@@ -667,6 +859,18 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
667
859
|
getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass> {
|
|
668
860
|
return localVarFp.getProductLanguage(id, authorization, options).then((request) => request(axios, basePath));
|
|
669
861
|
},
|
|
862
|
+
/**
|
|
863
|
+
* 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\"
|
|
864
|
+
* @summary Retrieve the product translations
|
|
865
|
+
* @param {string} productSlug
|
|
866
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
867
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
868
|
+
* @param {*} [options] Override http request option.
|
|
869
|
+
* @throws {RequiredError}
|
|
870
|
+
*/
|
|
871
|
+
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> {
|
|
872
|
+
return localVarFp.getProductTranslations(productSlug, language, authorization, options).then((request) => request(axios, basePath));
|
|
873
|
+
},
|
|
670
874
|
/**
|
|
671
875
|
* 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\"
|
|
672
876
|
* @summary List product languages
|
|
@@ -690,17 +894,40 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
690
894
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
691
895
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
692
896
|
* @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.
|
|
693
|
-
* @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>
|
|
897
|
+
* @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>
|
|
694
898
|
* @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>
|
|
695
899
|
* @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>
|
|
696
900
|
* @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/>
|
|
697
|
-
* @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>
|
|
901
|
+
* @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>
|
|
698
902
|
* @param {*} [options] Override http request option.
|
|
699
903
|
* @throws {RequiredError}
|
|
700
904
|
*/
|
|
701
905
|
listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTranslationsResponseClass> {
|
|
702
906
|
return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
703
907
|
},
|
|
908
|
+
/**
|
|
909
|
+
* 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\"
|
|
910
|
+
* @summary Retrieve the refreshed product languages
|
|
911
|
+
* @param {string} productSlug Slug of the product.
|
|
912
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
913
|
+
* @param {*} [options] Override http request option.
|
|
914
|
+
* @throws {RequiredError}
|
|
915
|
+
*/
|
|
916
|
+
refreshProductLanguages(productSlug: string, authorization?: string, options?: any): AxiosPromise<RefreshProductLanguagesResponseClass> {
|
|
917
|
+
return localVarFp.refreshProductLanguages(productSlug, authorization, options).then((request) => request(axios, basePath));
|
|
918
|
+
},
|
|
919
|
+
/**
|
|
920
|
+
* 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\"
|
|
921
|
+
* @summary Create the product translations
|
|
922
|
+
* @param {string} productSlug
|
|
923
|
+
* @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
|
|
924
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
925
|
+
* @param {*} [options] Override http request option.
|
|
926
|
+
* @throws {RequiredError}
|
|
927
|
+
*/
|
|
928
|
+
saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: any): AxiosPromise<UploadProductTranslationsResponseClass> {
|
|
929
|
+
return localVarFp.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
930
|
+
},
|
|
704
931
|
/**
|
|
705
932
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
706
933
|
* @summary Update the product language
|
|
@@ -819,6 +1046,34 @@ export interface TranslationApiGetProductLanguageRequest {
|
|
|
819
1046
|
readonly authorization?: string
|
|
820
1047
|
}
|
|
821
1048
|
|
|
1049
|
+
/**
|
|
1050
|
+
* Request parameters for getProductTranslations operation in TranslationApi.
|
|
1051
|
+
* @export
|
|
1052
|
+
* @interface TranslationApiGetProductTranslationsRequest
|
|
1053
|
+
*/
|
|
1054
|
+
export interface TranslationApiGetProductTranslationsRequest {
|
|
1055
|
+
/**
|
|
1056
|
+
*
|
|
1057
|
+
* @type {string}
|
|
1058
|
+
* @memberof TranslationApiGetProductTranslations
|
|
1059
|
+
*/
|
|
1060
|
+
readonly productSlug: string
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
*
|
|
1064
|
+
* @type {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'}
|
|
1065
|
+
* @memberof TranslationApiGetProductTranslations
|
|
1066
|
+
*/
|
|
1067
|
+
readonly language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1071
|
+
* @type {string}
|
|
1072
|
+
* @memberof TranslationApiGetProductTranslations
|
|
1073
|
+
*/
|
|
1074
|
+
readonly authorization?: string
|
|
1075
|
+
}
|
|
1076
|
+
|
|
822
1077
|
/**
|
|
823
1078
|
* Request parameters for listProductLanguages operation in TranslationApi.
|
|
824
1079
|
* @export
|
|
@@ -910,7 +1165,7 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
910
1165
|
readonly pageToken?: string
|
|
911
1166
|
|
|
912
1167
|
/**
|
|
913
|
-
* 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>
|
|
1168
|
+
* 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>
|
|
914
1169
|
* @type {string}
|
|
915
1170
|
* @memberof TranslationApiListTranslations
|
|
916
1171
|
*/
|
|
@@ -938,13 +1193,62 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
938
1193
|
readonly expand?: string
|
|
939
1194
|
|
|
940
1195
|
/**
|
|
941
|
-
* 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>
|
|
1196
|
+
* 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>
|
|
942
1197
|
* @type {string}
|
|
943
1198
|
* @memberof TranslationApiListTranslations
|
|
944
1199
|
*/
|
|
945
1200
|
readonly filters?: string
|
|
946
1201
|
}
|
|
947
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* Request parameters for refreshProductLanguages operation in TranslationApi.
|
|
1205
|
+
* @export
|
|
1206
|
+
* @interface TranslationApiRefreshProductLanguagesRequest
|
|
1207
|
+
*/
|
|
1208
|
+
export interface TranslationApiRefreshProductLanguagesRequest {
|
|
1209
|
+
/**
|
|
1210
|
+
* Slug of the product.
|
|
1211
|
+
* @type {string}
|
|
1212
|
+
* @memberof TranslationApiRefreshProductLanguages
|
|
1213
|
+
*/
|
|
1214
|
+
readonly productSlug: string
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1218
|
+
* @type {string}
|
|
1219
|
+
* @memberof TranslationApiRefreshProductLanguages
|
|
1220
|
+
*/
|
|
1221
|
+
readonly authorization?: string
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Request parameters for saveProductTranslations operation in TranslationApi.
|
|
1226
|
+
* @export
|
|
1227
|
+
* @interface TranslationApiSaveProductTranslationsRequest
|
|
1228
|
+
*/
|
|
1229
|
+
export interface TranslationApiSaveProductTranslationsRequest {
|
|
1230
|
+
/**
|
|
1231
|
+
*
|
|
1232
|
+
* @type {string}
|
|
1233
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1234
|
+
*/
|
|
1235
|
+
readonly productSlug: string
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
*
|
|
1239
|
+
* @type {SaveProductTranslationsRequestDto}
|
|
1240
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1241
|
+
*/
|
|
1242
|
+
readonly saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1246
|
+
* @type {string}
|
|
1247
|
+
* @memberof TranslationApiSaveProductTranslations
|
|
1248
|
+
*/
|
|
1249
|
+
readonly authorization?: string
|
|
1250
|
+
}
|
|
1251
|
+
|
|
948
1252
|
/**
|
|
949
1253
|
* Request parameters for updateProductLanguage operation in TranslationApi.
|
|
950
1254
|
* @export
|
|
@@ -1056,6 +1360,18 @@ export class TranslationApi extends BaseAPI {
|
|
|
1056
1360
|
return TranslationApiFp(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1057
1361
|
}
|
|
1058
1362
|
|
|
1363
|
+
/**
|
|
1364
|
+
* 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\"
|
|
1365
|
+
* @summary Retrieve the product translations
|
|
1366
|
+
* @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
|
|
1367
|
+
* @param {*} [options] Override http request option.
|
|
1368
|
+
* @throws {RequiredError}
|
|
1369
|
+
* @memberof TranslationApi
|
|
1370
|
+
*/
|
|
1371
|
+
public getProductTranslations(requestParameters: TranslationApiGetProductTranslationsRequest, options?: AxiosRequestConfig) {
|
|
1372
|
+
return TranslationApiFp(this.configuration).getProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1059
1375
|
/**
|
|
1060
1376
|
* 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\"
|
|
1061
1377
|
* @summary List product languages
|
|
@@ -1080,6 +1396,30 @@ export class TranslationApi extends BaseAPI {
|
|
|
1080
1396
|
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));
|
|
1081
1397
|
}
|
|
1082
1398
|
|
|
1399
|
+
/**
|
|
1400
|
+
* 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\"
|
|
1401
|
+
* @summary Retrieve the refreshed product languages
|
|
1402
|
+
* @param {TranslationApiRefreshProductLanguagesRequest} requestParameters Request parameters.
|
|
1403
|
+
* @param {*} [options] Override http request option.
|
|
1404
|
+
* @throws {RequiredError}
|
|
1405
|
+
* @memberof TranslationApi
|
|
1406
|
+
*/
|
|
1407
|
+
public refreshProductLanguages(requestParameters: TranslationApiRefreshProductLanguagesRequest, options?: AxiosRequestConfig) {
|
|
1408
|
+
return TranslationApiFp(this.configuration).refreshProductLanguages(requestParameters.productSlug, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* 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\"
|
|
1413
|
+
* @summary Create the product translations
|
|
1414
|
+
* @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
|
|
1415
|
+
* @param {*} [options] Override http request option.
|
|
1416
|
+
* @throws {RequiredError}
|
|
1417
|
+
* @memberof TranslationApi
|
|
1418
|
+
*/
|
|
1419
|
+
public saveProductTranslations(requestParameters: TranslationApiSaveProductTranslationsRequest, options?: AxiosRequestConfig) {
|
|
1420
|
+
return TranslationApiFp(this.configuration).saveProductTranslations(requestParameters.productSlug, requestParameters.saveProductTranslationsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1083
1423
|
/**
|
|
1084
1424
|
* This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
|
|
1085
1425
|
* @summary Update the product language
|