@emilgroup/translation-sdk-node 1.8.1-beta.1 → 1.8.1-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/translation-api.ts +348 -8
  4. package/dist/api/translation-api.d.ts +194 -8
  5. package/dist/api/translation-api.js +297 -6
  6. package/dist/models/get-product-translations-response-class.d.ts +25 -0
  7. package/dist/models/get-product-translations-response-class.js +15 -0
  8. package/dist/models/index.d.ts +6 -0
  9. package/dist/models/index.js +6 -0
  10. package/dist/models/new-translation-class.d.ts +36 -0
  11. package/dist/models/new-translation-class.js +15 -0
  12. package/dist/models/refresh-product-languages-response-class.d.ts +31 -0
  13. package/dist/models/refresh-product-languages-response-class.js +15 -0
  14. package/dist/models/save-product-translations-request-dto.d.ts +53 -0
  15. package/dist/models/save-product-translations-request-dto.js +37 -0
  16. package/dist/models/skipped-translation-class.d.ts +36 -0
  17. package/dist/models/skipped-translation-class.js +15 -0
  18. package/dist/models/translatable-field-class.d.ts +54 -0
  19. package/dist/models/translatable-field-class.js +15 -0
  20. package/dist/models/upload-product-translations-response-class.d.ts +13 -0
  21. package/models/get-product-translations-response-class.ts +31 -0
  22. package/models/index.ts +6 -0
  23. package/models/new-translation-class.ts +42 -0
  24. package/models/refresh-product-languages-response-class.ts +37 -0
  25. package/models/save-product-translations-request-dto.ts +62 -0
  26. package/models/skipped-translation-class.ts +42 -0
  27. package/models/translatable-field-class.ts +60 -0
  28. package/models/upload-product-translations-response-class.ts +13 -0
  29. package/package.json +1 -1
@@ -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-node@1.8.1-beta.1 --save
20
+ npm install @emilgroup/translation-sdk-node@1.8.1-beta.11 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/translation-sdk-node@1.8.1-beta.1
24
+ yarn add @emilgroup/translation-sdk-node@1.8.1-beta.11
25
25
  ```
26
26
 
27
27
  And then you can import `TranslationApi`.
@@ -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';
@@ -226,6 +232,58 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
226
232
 
227
233
 
228
234
 
235
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
238
+
239
+ return {
240
+ url: toPathString(localVarUrlObj),
241
+ options: localVarRequestOptions,
242
+ };
243
+ },
244
+ /**
245
+ * 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\"
246
+ * @summary Retrieve the product translations
247
+ * @param {string} productSlug
248
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ 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> => {
254
+ // verify required parameter 'productSlug' is not null or undefined
255
+ assertParamExists('getProductTranslations', 'productSlug', productSlug)
256
+ // verify required parameter 'language' is not null or undefined
257
+ assertParamExists('getProductTranslations', 'language', language)
258
+ const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
259
+ .replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
260
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
261
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
262
+ let baseOptions;
263
+ let baseAccessToken;
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ baseAccessToken = configuration.accessToken;
267
+ }
268
+
269
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
270
+ const localVarHeaderParameter = {} as any;
271
+ const localVarQueryParameter = {} as any;
272
+
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
276
+
277
+ if (language !== undefined) {
278
+ localVarQueryParameter['language'] = language;
279
+ }
280
+
281
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
282
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
283
+ }
284
+
285
+
286
+
229
287
  setSearchParams(localVarUrlObj, localVarQueryParameter);
230
288
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
289
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -317,11 +375,11 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
317
375
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
318
376
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
319
377
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
378
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
321
379
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: key&lt;/i&gt;
322
380
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, key&lt;/i&gt;
323
381
  * @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.&lt;br/&gt; &lt;br/&gt;
324
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
382
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
325
383
  * @param {*} [options] Override http request option.
326
384
  * @throws {RequiredError}
327
385
  */
@@ -387,6 +445,102 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
387
445
  options: localVarRequestOptions,
388
446
  };
389
447
  },
448
+ /**
449
+ * 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\"
450
+ * @summary Retrieve the refreshed product languages
451
+ * @param {string} productSlug Slug of the product.
452
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ refreshProductLanguages: async (productSlug: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
457
+ // verify required parameter 'productSlug' is not null or undefined
458
+ assertParamExists('refreshProductLanguages', 'productSlug', productSlug)
459
+ const localVarPath = `/translationservice/v1/product/{productSlug}/languages`
460
+ .replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
461
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
462
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
463
+ let baseOptions;
464
+ let baseAccessToken;
465
+ if (configuration) {
466
+ baseOptions = configuration.baseOptions;
467
+ baseAccessToken = configuration.accessToken;
468
+ }
469
+
470
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
471
+ const localVarHeaderParameter = {} as any;
472
+ const localVarQueryParameter = {} as any;
473
+
474
+ // authentication bearer required
475
+ // http bearer authentication required
476
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
477
+
478
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
479
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
480
+ }
481
+
482
+
483
+
484
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
485
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
486
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
487
+
488
+ return {
489
+ url: toPathString(localVarUrlObj),
490
+ options: localVarRequestOptions,
491
+ };
492
+ },
493
+ /**
494
+ * 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\"
495
+ * @summary Create the product translations
496
+ * @param {string} productSlug
497
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
498
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ saveProductTranslations: async (productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
503
+ // verify required parameter 'productSlug' is not null or undefined
504
+ assertParamExists('saveProductTranslations', 'productSlug', productSlug)
505
+ // verify required parameter 'saveProductTranslationsRequestDto' is not null or undefined
506
+ assertParamExists('saveProductTranslations', 'saveProductTranslationsRequestDto', saveProductTranslationsRequestDto)
507
+ const localVarPath = `/translationservice/v1/product/{productSlug}/translations`
508
+ .replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
509
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
510
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
511
+ let baseOptions;
512
+ let baseAccessToken;
513
+ if (configuration) {
514
+ baseOptions = configuration.baseOptions;
515
+ baseAccessToken = configuration.accessToken;
516
+ }
517
+
518
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
519
+ const localVarHeaderParameter = {} as any;
520
+ const localVarQueryParameter = {} as any;
521
+
522
+ // authentication bearer required
523
+ // http bearer authentication required
524
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
525
+
526
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
527
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
528
+ }
529
+
530
+
531
+
532
+ localVarHeaderParameter['Content-Type'] = 'application/json';
533
+
534
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
535
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
536
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
537
+ localVarRequestOptions.data = serializeDataIfNeeded(saveProductTranslationsRequestDto, localVarRequestOptions, configuration)
538
+
539
+ return {
540
+ url: toPathString(localVarUrlObj),
541
+ options: localVarRequestOptions,
542
+ };
543
+ },
390
544
  /**
391
545
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
392
546
  * @summary Update the product language
@@ -555,6 +709,19 @@ export const TranslationApiFp = function(configuration?: Configuration) {
555
709
  const localVarAxiosArgs = await localVarAxiosParamCreator.getProductLanguage(id, authorization, options);
556
710
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
557
711
  },
712
+ /**
713
+ * 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\"
714
+ * @summary Retrieve the product translations
715
+ * @param {string} productSlug
716
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
717
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
718
+ * @param {*} [options] Override http request option.
719
+ * @throws {RequiredError}
720
+ */
721
+ 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>> {
722
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductTranslations(productSlug, language, authorization, options);
723
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
724
+ },
558
725
  /**
559
726
  * 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
727
  * @summary List product languages
@@ -579,11 +746,11 @@ export const TranslationApiFp = function(configuration?: Configuration) {
579
746
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
580
747
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
581
748
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
749
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
583
750
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: key&lt;/i&gt;
584
751
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, key&lt;/i&gt;
585
752
  * @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.&lt;br/&gt; &lt;br/&gt;
586
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
753
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
587
754
  * @param {*} [options] Override http request option.
588
755
  * @throws {RequiredError}
589
756
  */
@@ -591,6 +758,31 @@ export const TranslationApiFp = function(configuration?: Configuration) {
591
758
  const localVarAxiosArgs = await localVarAxiosParamCreator.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
592
759
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
593
760
  },
761
+ /**
762
+ * 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\"
763
+ * @summary Retrieve the refreshed product languages
764
+ * @param {string} productSlug Slug of the product.
765
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ */
769
+ async refreshProductLanguages(productSlug: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RefreshProductLanguagesResponseClass>> {
770
+ const localVarAxiosArgs = await localVarAxiosParamCreator.refreshProductLanguages(productSlug, authorization, options);
771
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
772
+ },
773
+ /**
774
+ * 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\"
775
+ * @summary Create the product translations
776
+ * @param {string} productSlug
777
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
778
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ async saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadProductTranslationsResponseClass>> {
783
+ const localVarAxiosArgs = await localVarAxiosParamCreator.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options);
784
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
785
+ },
594
786
  /**
595
787
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
596
788
  * @summary Update the product language
@@ -672,6 +864,18 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
672
864
  getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass> {
673
865
  return localVarFp.getProductLanguage(id, authorization, options).then((request) => request(axios, basePath));
674
866
  },
867
+ /**
868
+ * 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\"
869
+ * @summary Retrieve the product translations
870
+ * @param {string} productSlug
871
+ * @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
872
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
873
+ * @param {*} [options] Override http request option.
874
+ * @throws {RequiredError}
875
+ */
876
+ 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> {
877
+ return localVarFp.getProductTranslations(productSlug, language, authorization, options).then((request) => request(axios, basePath));
878
+ },
675
879
  /**
676
880
  * 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
881
  * @summary List product languages
@@ -695,17 +899,40 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
695
899
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
696
900
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
697
901
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
902
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
699
903
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: key&lt;/i&gt;
700
904
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, key&lt;/i&gt;
701
905
  * @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.&lt;br/&gt; &lt;br/&gt;
702
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
906
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
703
907
  * @param {*} [options] Override http request option.
704
908
  * @throws {RequiredError}
705
909
  */
706
910
  listTranslations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListTranslationsResponseClass> {
707
911
  return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
708
912
  },
913
+ /**
914
+ * 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\"
915
+ * @summary Retrieve the refreshed product languages
916
+ * @param {string} productSlug Slug of the product.
917
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
918
+ * @param {*} [options] Override http request option.
919
+ * @throws {RequiredError}
920
+ */
921
+ refreshProductLanguages(productSlug: string, authorization?: string, options?: any): AxiosPromise<RefreshProductLanguagesResponseClass> {
922
+ return localVarFp.refreshProductLanguages(productSlug, authorization, options).then((request) => request(axios, basePath));
923
+ },
924
+ /**
925
+ * 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\"
926
+ * @summary Create the product translations
927
+ * @param {string} productSlug
928
+ * @param {SaveProductTranslationsRequestDto} saveProductTranslationsRequestDto
929
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ */
933
+ saveProductTranslations(productSlug: string, saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto, authorization?: string, options?: any): AxiosPromise<UploadProductTranslationsResponseClass> {
934
+ return localVarFp.saveProductTranslations(productSlug, saveProductTranslationsRequestDto, authorization, options).then((request) => request(axios, basePath));
935
+ },
709
936
  /**
710
937
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
711
938
  * @summary Update the product language
@@ -824,6 +1051,34 @@ export interface TranslationApiGetProductLanguageRequest {
824
1051
  readonly authorization?: string
825
1052
  }
826
1053
 
1054
+ /**
1055
+ * Request parameters for getProductTranslations operation in TranslationApi.
1056
+ * @export
1057
+ * @interface TranslationApiGetProductTranslationsRequest
1058
+ */
1059
+ export interface TranslationApiGetProductTranslationsRequest {
1060
+ /**
1061
+ *
1062
+ * @type {string}
1063
+ * @memberof TranslationApiGetProductTranslations
1064
+ */
1065
+ readonly productSlug: string
1066
+
1067
+ /**
1068
+ *
1069
+ * @type {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'}
1070
+ * @memberof TranslationApiGetProductTranslations
1071
+ */
1072
+ readonly language: 'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'
1073
+
1074
+ /**
1075
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1076
+ * @type {string}
1077
+ * @memberof TranslationApiGetProductTranslations
1078
+ */
1079
+ readonly authorization?: string
1080
+ }
1081
+
827
1082
  /**
828
1083
  * Request parameters for listProductLanguages operation in TranslationApi.
829
1084
  * @export
@@ -915,7 +1170,7 @@ export interface TranslationApiListTranslationsRequest {
915
1170
  readonly pageToken?: string
916
1171
 
917
1172
  /**
918
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
1173
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
919
1174
  * @type {string}
920
1175
  * @memberof TranslationApiListTranslations
921
1176
  */
@@ -943,13 +1198,62 @@ export interface TranslationApiListTranslationsRequest {
943
1198
  readonly expand?: string
944
1199
 
945
1200
  /**
946
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key&lt;/i&gt;
1201
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: key, language&lt;/i&gt;
947
1202
  * @type {string}
948
1203
  * @memberof TranslationApiListTranslations
949
1204
  */
950
1205
  readonly filters?: string
951
1206
  }
952
1207
 
1208
+ /**
1209
+ * Request parameters for refreshProductLanguages operation in TranslationApi.
1210
+ * @export
1211
+ * @interface TranslationApiRefreshProductLanguagesRequest
1212
+ */
1213
+ export interface TranslationApiRefreshProductLanguagesRequest {
1214
+ /**
1215
+ * Slug of the product.
1216
+ * @type {string}
1217
+ * @memberof TranslationApiRefreshProductLanguages
1218
+ */
1219
+ readonly productSlug: string
1220
+
1221
+ /**
1222
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1223
+ * @type {string}
1224
+ * @memberof TranslationApiRefreshProductLanguages
1225
+ */
1226
+ readonly authorization?: string
1227
+ }
1228
+
1229
+ /**
1230
+ * Request parameters for saveProductTranslations operation in TranslationApi.
1231
+ * @export
1232
+ * @interface TranslationApiSaveProductTranslationsRequest
1233
+ */
1234
+ export interface TranslationApiSaveProductTranslationsRequest {
1235
+ /**
1236
+ *
1237
+ * @type {string}
1238
+ * @memberof TranslationApiSaveProductTranslations
1239
+ */
1240
+ readonly productSlug: string
1241
+
1242
+ /**
1243
+ *
1244
+ * @type {SaveProductTranslationsRequestDto}
1245
+ * @memberof TranslationApiSaveProductTranslations
1246
+ */
1247
+ readonly saveProductTranslationsRequestDto: SaveProductTranslationsRequestDto
1248
+
1249
+ /**
1250
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1251
+ * @type {string}
1252
+ * @memberof TranslationApiSaveProductTranslations
1253
+ */
1254
+ readonly authorization?: string
1255
+ }
1256
+
953
1257
  /**
954
1258
  * Request parameters for updateProductLanguage operation in TranslationApi.
955
1259
  * @export
@@ -1061,6 +1365,18 @@ export class TranslationApi extends BaseAPI {
1061
1365
  return TranslationApiFp(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1062
1366
  }
1063
1367
 
1368
+ /**
1369
+ * 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\"
1370
+ * @summary Retrieve the product translations
1371
+ * @param {TranslationApiGetProductTranslationsRequest} requestParameters Request parameters.
1372
+ * @param {*} [options] Override http request option.
1373
+ * @throws {RequiredError}
1374
+ * @memberof TranslationApi
1375
+ */
1376
+ public getProductTranslations(requestParameters: TranslationApiGetProductTranslationsRequest, options?: AxiosRequestConfig) {
1377
+ return TranslationApiFp(this.configuration).getProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1378
+ }
1379
+
1064
1380
  /**
1065
1381
  * 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
1382
  * @summary List product languages
@@ -1085,6 +1401,30 @@ export class TranslationApi extends BaseAPI {
1085
1401
  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
1402
  }
1087
1403
 
1404
+ /**
1405
+ * 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\"
1406
+ * @summary Retrieve the refreshed product languages
1407
+ * @param {TranslationApiRefreshProductLanguagesRequest} requestParameters Request parameters.
1408
+ * @param {*} [options] Override http request option.
1409
+ * @throws {RequiredError}
1410
+ * @memberof TranslationApi
1411
+ */
1412
+ public refreshProductLanguages(requestParameters: TranslationApiRefreshProductLanguagesRequest, options?: AxiosRequestConfig) {
1413
+ return TranslationApiFp(this.configuration).refreshProductLanguages(requestParameters.productSlug, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1414
+ }
1415
+
1416
+ /**
1417
+ * 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\"
1418
+ * @summary Create the product translations
1419
+ * @param {TranslationApiSaveProductTranslationsRequest} requestParameters Request parameters.
1420
+ * @param {*} [options] Override http request option.
1421
+ * @throws {RequiredError}
1422
+ * @memberof TranslationApi
1423
+ */
1424
+ public saveProductTranslations(requestParameters: TranslationApiSaveProductTranslationsRequest, options?: AxiosRequestConfig) {
1425
+ return TranslationApiFp(this.configuration).saveProductTranslations(requestParameters.productSlug, requestParameters.saveProductTranslationsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1426
+ }
1427
+
1088
1428
  /**
1089
1429
  * This updates the product language with the specified id. **Required Permissions** \"translation-management.translations.update\"
1090
1430
  * @summary Update the product language