@emilgroup/translation-sdk 1.0.0 → 1.1.0
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 +1 -0
- package/README.md +2 -2
- package/api/translation-api.ts +58 -121
- package/dist/api/translation-api.d.ts +40 -84
- package/dist/api/translation-api.js +46 -75
- package/dist/models/get-product-language-response-class.d.ts +25 -0
- package/dist/models/get-product-language-response-class.js +15 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/models/get-product-language-response-class.ts +31 -0
- package/models/index.ts +1 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -11,6 +11,7 @@ git_push.sh
|
|
|
11
11
|
index.ts
|
|
12
12
|
models/create-product-language-request-dto.ts
|
|
13
13
|
models/create-product-language-response-class.ts
|
|
14
|
+
models/get-product-language-response-class.ts
|
|
14
15
|
models/index.ts
|
|
15
16
|
models/list-product-languages-response-class.ts
|
|
16
17
|
models/list-translations-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.
|
|
20
|
+
npm install @emilgroup/translation-sdk@1.1.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/translation-sdk@1.
|
|
24
|
+
yarn add @emilgroup/translation-sdk@1.1.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `TranslationApi`.
|
package/api/translation-api.ts
CHANGED
|
@@ -25,6 +25,8 @@ import { CreateProductLanguageRequestDto } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CreateProductLanguageResponseClass } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { GetProductLanguageResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
28
30
|
import { ListProductLanguagesResponseClass } from '../models';
|
|
29
31
|
// @ts-ignore
|
|
30
32
|
import { ListTranslationsResponseClass } from '../models';
|
|
@@ -47,19 +49,15 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
47
49
|
/**
|
|
48
50
|
* This creates a product language.
|
|
49
51
|
* @summary Create the product language
|
|
50
|
-
* @param {string} productSlug
|
|
51
52
|
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
52
53
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
53
54
|
* @param {*} [options] Override http request option.
|
|
54
55
|
* @throws {RequiredError}
|
|
55
56
|
*/
|
|
56
|
-
createProductLanguage: async (
|
|
57
|
-
// verify required parameter 'productSlug' is not null or undefined
|
|
58
|
-
assertParamExists('createProductLanguage', 'productSlug', productSlug)
|
|
57
|
+
createProductLanguage: async (createProductLanguageRequestDto: CreateProductLanguageRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
59
58
|
// verify required parameter 'createProductLanguageRequestDto' is not null or undefined
|
|
60
59
|
assertParamExists('createProductLanguage', 'createProductLanguageRequestDto', createProductLanguageRequestDto)
|
|
61
|
-
const localVarPath = `/translationservice/v1/
|
|
62
|
-
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
60
|
+
const localVarPath = `/translationservice/v1/languages`;
|
|
63
61
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
64
62
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
65
63
|
let baseOptions;
|
|
@@ -106,7 +104,7 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
106
104
|
deleteProductLanguage: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
107
105
|
// verify required parameter 'id' is not null or undefined
|
|
108
106
|
assertParamExists('deleteProductLanguage', 'id', id)
|
|
109
|
-
const localVarPath = `/translationservice/v1/
|
|
107
|
+
const localVarPath = `/translationservice/v1/languages/{id}`
|
|
110
108
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
111
109
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
112
110
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -196,19 +194,15 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
196
194
|
* This gets a product language.
|
|
197
195
|
* @summary Retrieve the product language
|
|
198
196
|
* @param {number} id Id of the product language.
|
|
199
|
-
* @param {string} productSlug Product slug of the product.
|
|
200
197
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
201
198
|
* @param {*} [options] Override http request option.
|
|
202
199
|
* @throws {RequiredError}
|
|
203
200
|
*/
|
|
204
|
-
getProductLanguage: async (id: number,
|
|
201
|
+
getProductLanguage: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
205
202
|
// verify required parameter 'id' is not null or undefined
|
|
206
203
|
assertParamExists('getProductLanguage', 'id', id)
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const localVarPath = `/translationservice/v1/product/{productSlug}/language/{id}`
|
|
210
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
211
|
-
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
204
|
+
const localVarPath = `/translationservice/v1/languages/{id}`
|
|
205
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
212
206
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
213
207
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
214
208
|
let baseOptions;
|
|
@@ -244,22 +238,18 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
244
238
|
/**
|
|
245
239
|
* This lists the product languages.
|
|
246
240
|
* @summary List product languages
|
|
247
|
-
* @param {string} productSlug Product slug of the product.
|
|
248
241
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
249
|
-
* @param {
|
|
250
|
-
* @param {
|
|
251
|
-
* @param {
|
|
242
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
243
|
+
* @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.
|
|
244
|
+
* @param {'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
252
245
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
253
|
-
* @param {
|
|
254
|
-
* @param {
|
|
246
|
+
* @param {'0' | '1' | '2' | '3' | '4' | '5'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
247
|
+
* @param {number} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
255
248
|
* @param {*} [options] Override http request option.
|
|
256
249
|
* @throws {RequiredError}
|
|
257
250
|
*/
|
|
258
|
-
listProductLanguages: async (
|
|
259
|
-
|
|
260
|
-
assertParamExists('listProductLanguages', 'productSlug', productSlug)
|
|
261
|
-
const localVarPath = `/translationservice/v1/product/{productSlug}/language`
|
|
262
|
-
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
251
|
+
listProductLanguages: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt', search?: any, order?: '0' | '1' | '2' | '3' | '4' | '5', expand?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
252
|
+
const localVarPath = `/translationservice/v1/languages`;
|
|
263
253
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
264
254
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
265
255
|
let baseOptions;
|
|
@@ -390,23 +380,15 @@ export const TranslationApiAxiosParamCreator = function (configuration?: Configu
|
|
|
390
380
|
/**
|
|
391
381
|
* This updates the product language with the specified id.
|
|
392
382
|
* @summary Update the product language
|
|
393
|
-
* @param {number} id Id of the product language.
|
|
394
|
-
* @param {string} productSlug Product slug of the product.
|
|
395
383
|
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
396
384
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
397
385
|
* @param {*} [options] Override http request option.
|
|
398
386
|
* @throws {RequiredError}
|
|
399
387
|
*/
|
|
400
|
-
updateProductLanguage: async (
|
|
401
|
-
// verify required parameter 'id' is not null or undefined
|
|
402
|
-
assertParamExists('updateProductLanguage', 'id', id)
|
|
403
|
-
// verify required parameter 'productSlug' is not null or undefined
|
|
404
|
-
assertParamExists('updateProductLanguage', 'productSlug', productSlug)
|
|
388
|
+
updateProductLanguage: async (updateProductLanguageRequestDto: UpdateProductLanguageRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
405
389
|
// verify required parameter 'updateProductLanguageRequestDto' is not null or undefined
|
|
406
390
|
assertParamExists('updateProductLanguage', 'updateProductLanguageRequestDto', updateProductLanguageRequestDto)
|
|
407
|
-
const localVarPath = `/translationservice/v1/
|
|
408
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
|
409
|
-
.replace(`{${"product slug"}}`, encodeURIComponent(String(productSlug)));
|
|
391
|
+
const localVarPath = `/translationservice/v1/languages`;
|
|
410
392
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
411
393
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
412
394
|
let baseOptions;
|
|
@@ -516,14 +498,13 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
516
498
|
/**
|
|
517
499
|
* This creates a product language.
|
|
518
500
|
* @summary Create the product language
|
|
519
|
-
* @param {string} productSlug
|
|
520
501
|
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
521
502
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
522
503
|
* @param {*} [options] Override http request option.
|
|
523
504
|
* @throws {RequiredError}
|
|
524
505
|
*/
|
|
525
|
-
async createProductLanguage(
|
|
526
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createProductLanguage(
|
|
506
|
+
async createProductLanguage(createProductLanguageRequestDto: CreateProductLanguageRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateProductLanguageResponseClass>> {
|
|
507
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createProductLanguage(createProductLanguageRequestDto, authorization, options);
|
|
527
508
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
528
509
|
},
|
|
529
510
|
/**
|
|
@@ -555,31 +536,29 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
555
536
|
* This gets a product language.
|
|
556
537
|
* @summary Retrieve the product language
|
|
557
538
|
* @param {number} id Id of the product language.
|
|
558
|
-
* @param {string} productSlug Product slug of the product.
|
|
559
539
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
560
540
|
* @param {*} [options] Override http request option.
|
|
561
541
|
* @throws {RequiredError}
|
|
562
542
|
*/
|
|
563
|
-
async getProductLanguage(id: number,
|
|
564
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductLanguage(id,
|
|
543
|
+
async getProductLanguage(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductLanguageResponseClass>> {
|
|
544
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductLanguage(id, authorization, options);
|
|
565
545
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
566
546
|
},
|
|
567
547
|
/**
|
|
568
548
|
* This lists the product languages.
|
|
569
549
|
* @summary List product languages
|
|
570
|
-
* @param {string} productSlug Product slug of the product.
|
|
571
550
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
572
|
-
* @param {
|
|
573
|
-
* @param {
|
|
574
|
-
* @param {
|
|
551
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
552
|
+
* @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.
|
|
553
|
+
* @param {'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
575
554
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
576
|
-
* @param {
|
|
577
|
-
* @param {
|
|
555
|
+
* @param {'0' | '1' | '2' | '3' | '4' | '5'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
556
|
+
* @param {number} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
578
557
|
* @param {*} [options] Override http request option.
|
|
579
558
|
* @throws {RequiredError}
|
|
580
559
|
*/
|
|
581
|
-
async listProductLanguages(
|
|
582
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listProductLanguages(
|
|
560
|
+
async listProductLanguages(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt', search?: any, order?: '0' | '1' | '2' | '3' | '4' | '5', expand?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductLanguagesResponseClass>> {
|
|
561
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listProductLanguages(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
583
562
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
584
563
|
},
|
|
585
564
|
/**
|
|
@@ -602,15 +581,13 @@ export const TranslationApiFp = function(configuration?: Configuration) {
|
|
|
602
581
|
/**
|
|
603
582
|
* This updates the product language with the specified id.
|
|
604
583
|
* @summary Update the product language
|
|
605
|
-
* @param {number} id Id of the product language.
|
|
606
|
-
* @param {string} productSlug Product slug of the product.
|
|
607
584
|
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
608
585
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
609
586
|
* @param {*} [options] Override http request option.
|
|
610
587
|
* @throws {RequiredError}
|
|
611
588
|
*/
|
|
612
|
-
async updateProductLanguage(
|
|
613
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductLanguage(
|
|
589
|
+
async updateProductLanguage(updateProductLanguageRequestDto: UpdateProductLanguageRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateProductLanguageResponseClass>> {
|
|
590
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductLanguage(updateProductLanguageRequestDto, authorization, options);
|
|
614
591
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
615
592
|
},
|
|
616
593
|
/**
|
|
@@ -640,14 +617,13 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
640
617
|
/**
|
|
641
618
|
* This creates a product language.
|
|
642
619
|
* @summary Create the product language
|
|
643
|
-
* @param {string} productSlug
|
|
644
620
|
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
645
621
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
646
622
|
* @param {*} [options] Override http request option.
|
|
647
623
|
* @throws {RequiredError}
|
|
648
624
|
*/
|
|
649
|
-
createProductLanguage(
|
|
650
|
-
return localVarFp.createProductLanguage(
|
|
625
|
+
createProductLanguage(createProductLanguageRequestDto: CreateProductLanguageRequestDto, authorization?: string, options?: any): AxiosPromise<CreateProductLanguageResponseClass> {
|
|
626
|
+
return localVarFp.createProductLanguage(createProductLanguageRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
651
627
|
},
|
|
652
628
|
/**
|
|
653
629
|
* Permanently deletes the product language. Supply the unique id that was returned when you created the product language and this will delete it.
|
|
@@ -676,30 +652,28 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
676
652
|
* This gets a product language.
|
|
677
653
|
* @summary Retrieve the product language
|
|
678
654
|
* @param {number} id Id of the product language.
|
|
679
|
-
* @param {string} productSlug Product slug of the product.
|
|
680
655
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
681
656
|
* @param {*} [options] Override http request option.
|
|
682
657
|
* @throws {RequiredError}
|
|
683
658
|
*/
|
|
684
|
-
getProductLanguage(id: number,
|
|
685
|
-
return localVarFp.getProductLanguage(id,
|
|
659
|
+
getProductLanguage(id: number, authorization?: string, options?: any): AxiosPromise<GetProductLanguageResponseClass> {
|
|
660
|
+
return localVarFp.getProductLanguage(id, authorization, options).then((request) => request(axios, basePath));
|
|
686
661
|
},
|
|
687
662
|
/**
|
|
688
663
|
* This lists the product languages.
|
|
689
664
|
* @summary List product languages
|
|
690
|
-
* @param {string} productSlug Product slug of the product.
|
|
691
665
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
692
|
-
* @param {
|
|
693
|
-
* @param {
|
|
694
|
-
* @param {
|
|
666
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
667
|
+
* @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.
|
|
668
|
+
* @param {'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
695
669
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
696
|
-
* @param {
|
|
697
|
-
* @param {
|
|
670
|
+
* @param {'0' | '1' | '2' | '3' | '4' | '5'} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
671
|
+
* @param {number} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
698
672
|
* @param {*} [options] Override http request option.
|
|
699
673
|
* @throws {RequiredError}
|
|
700
674
|
*/
|
|
701
|
-
listProductLanguages(
|
|
702
|
-
return localVarFp.listProductLanguages(
|
|
675
|
+
listProductLanguages(authorization?: string, pageSize?: number, pageToken?: string, filter?: 'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt', search?: any, order?: '0' | '1' | '2' | '3' | '4' | '5', expand?: number, options?: any): AxiosPromise<ListProductLanguagesResponseClass> {
|
|
676
|
+
return localVarFp.listProductLanguages(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
703
677
|
},
|
|
704
678
|
/**
|
|
705
679
|
* Returns a list of translations you have previously created. The translations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -720,15 +694,13 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
720
694
|
/**
|
|
721
695
|
* This updates the product language with the specified id.
|
|
722
696
|
* @summary Update the product language
|
|
723
|
-
* @param {number} id Id of the product language.
|
|
724
|
-
* @param {string} productSlug Product slug of the product.
|
|
725
697
|
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
726
698
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
727
699
|
* @param {*} [options] Override http request option.
|
|
728
700
|
* @throws {RequiredError}
|
|
729
701
|
*/
|
|
730
|
-
updateProductLanguage(
|
|
731
|
-
return localVarFp.updateProductLanguage(
|
|
702
|
+
updateProductLanguage(updateProductLanguageRequestDto: UpdateProductLanguageRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateProductLanguageResponseClass> {
|
|
703
|
+
return localVarFp.updateProductLanguage(updateProductLanguageRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
732
704
|
},
|
|
733
705
|
/**
|
|
734
706
|
* This uploads the translations for a given product.
|
|
@@ -752,13 +724,6 @@ export const TranslationApiFactory = function (configuration?: Configuration, ba
|
|
|
752
724
|
* @interface TranslationApiCreateProductLanguageRequest
|
|
753
725
|
*/
|
|
754
726
|
export interface TranslationApiCreateProductLanguageRequest {
|
|
755
|
-
/**
|
|
756
|
-
*
|
|
757
|
-
* @type {string}
|
|
758
|
-
* @memberof TranslationApiCreateProductLanguage
|
|
759
|
-
*/
|
|
760
|
-
readonly productSlug: string
|
|
761
|
-
|
|
762
727
|
/**
|
|
763
728
|
*
|
|
764
729
|
* @type {CreateProductLanguageRequestDto}
|
|
@@ -836,13 +801,6 @@ export interface TranslationApiGetProductLanguageRequest {
|
|
|
836
801
|
*/
|
|
837
802
|
readonly id: number
|
|
838
803
|
|
|
839
|
-
/**
|
|
840
|
-
* Product slug of the product.
|
|
841
|
-
* @type {string}
|
|
842
|
-
* @memberof TranslationApiGetProductLanguage
|
|
843
|
-
*/
|
|
844
|
-
readonly productSlug: string
|
|
845
|
-
|
|
846
804
|
/**
|
|
847
805
|
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
848
806
|
* @type {string}
|
|
@@ -857,13 +815,6 @@ export interface TranslationApiGetProductLanguageRequest {
|
|
|
857
815
|
* @interface TranslationApiListProductLanguagesRequest
|
|
858
816
|
*/
|
|
859
817
|
export interface TranslationApiListProductLanguagesRequest {
|
|
860
|
-
/**
|
|
861
|
-
* Product slug of the product.
|
|
862
|
-
* @type {string}
|
|
863
|
-
* @memberof TranslationApiListProductLanguages
|
|
864
|
-
*/
|
|
865
|
-
readonly productSlug: string
|
|
866
|
-
|
|
867
818
|
/**
|
|
868
819
|
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
869
820
|
* @type {string}
|
|
@@ -873,24 +824,24 @@ export interface TranslationApiListProductLanguagesRequest {
|
|
|
873
824
|
|
|
874
825
|
/**
|
|
875
826
|
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
876
|
-
* @type {
|
|
827
|
+
* @type {number}
|
|
877
828
|
* @memberof TranslationApiListProductLanguages
|
|
878
829
|
*/
|
|
879
|
-
readonly pageSize?:
|
|
830
|
+
readonly pageSize?: number
|
|
880
831
|
|
|
881
832
|
/**
|
|
882
833
|
* 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.
|
|
883
|
-
* @type {
|
|
834
|
+
* @type {string}
|
|
884
835
|
* @memberof TranslationApiListProductLanguages
|
|
885
836
|
*/
|
|
886
|
-
readonly pageToken?:
|
|
837
|
+
readonly pageToken?: string
|
|
887
838
|
|
|
888
839
|
/**
|
|
889
840
|
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
890
|
-
* @type {
|
|
841
|
+
* @type {'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt'}
|
|
891
842
|
* @memberof TranslationApiListProductLanguages
|
|
892
843
|
*/
|
|
893
|
-
readonly filter?:
|
|
844
|
+
readonly filter?: 'id' | 'productSlug' | 'language' | 'isActive' | 'translationStatus' | 'createdAt' | 'updateAt'
|
|
894
845
|
|
|
895
846
|
/**
|
|
896
847
|
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
@@ -901,17 +852,17 @@ export interface TranslationApiListProductLanguagesRequest {
|
|
|
901
852
|
|
|
902
853
|
/**
|
|
903
854
|
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
904
|
-
* @type {
|
|
855
|
+
* @type {'0' | '1' | '2' | '3' | '4' | '5'}
|
|
905
856
|
* @memberof TranslationApiListProductLanguages
|
|
906
857
|
*/
|
|
907
|
-
readonly order?:
|
|
858
|
+
readonly order?: '0' | '1' | '2' | '3' | '4' | '5'
|
|
908
859
|
|
|
909
860
|
/**
|
|
910
861
|
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
911
|
-
* @type {
|
|
862
|
+
* @type {number}
|
|
912
863
|
* @memberof TranslationApiListProductLanguages
|
|
913
864
|
*/
|
|
914
|
-
readonly expand?:
|
|
865
|
+
readonly expand?: number
|
|
915
866
|
}
|
|
916
867
|
|
|
917
868
|
/**
|
|
@@ -976,20 +927,6 @@ export interface TranslationApiListTranslationsRequest {
|
|
|
976
927
|
* @interface TranslationApiUpdateProductLanguageRequest
|
|
977
928
|
*/
|
|
978
929
|
export interface TranslationApiUpdateProductLanguageRequest {
|
|
979
|
-
/**
|
|
980
|
-
* Id of the product language.
|
|
981
|
-
* @type {number}
|
|
982
|
-
* @memberof TranslationApiUpdateProductLanguage
|
|
983
|
-
*/
|
|
984
|
-
readonly id: number
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* Product slug of the product.
|
|
988
|
-
* @type {string}
|
|
989
|
-
* @memberof TranslationApiUpdateProductLanguage
|
|
990
|
-
*/
|
|
991
|
-
readonly productSlug: string
|
|
992
|
-
|
|
993
930
|
/**
|
|
994
931
|
*
|
|
995
932
|
* @type {UpdateProductLanguageRequestDto}
|
|
@@ -1056,7 +993,7 @@ export class TranslationApi extends BaseAPI {
|
|
|
1056
993
|
* @memberof TranslationApi
|
|
1057
994
|
*/
|
|
1058
995
|
public createProductLanguage(requestParameters: TranslationApiCreateProductLanguageRequest, options?: AxiosRequestConfig) {
|
|
1059
|
-
return TranslationApiFp(this.configuration).createProductLanguage(requestParameters.
|
|
996
|
+
return TranslationApiFp(this.configuration).createProductLanguage(requestParameters.createProductLanguageRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1060
997
|
}
|
|
1061
998
|
|
|
1062
999
|
/**
|
|
@@ -1092,7 +1029,7 @@ export class TranslationApi extends BaseAPI {
|
|
|
1092
1029
|
* @memberof TranslationApi
|
|
1093
1030
|
*/
|
|
1094
1031
|
public getProductLanguage(requestParameters: TranslationApiGetProductLanguageRequest, options?: AxiosRequestConfig) {
|
|
1095
|
-
return TranslationApiFp(this.configuration).getProductLanguage(requestParameters.id, requestParameters.
|
|
1032
|
+
return TranslationApiFp(this.configuration).getProductLanguage(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1096
1033
|
}
|
|
1097
1034
|
|
|
1098
1035
|
/**
|
|
@@ -1103,8 +1040,8 @@ export class TranslationApi extends BaseAPI {
|
|
|
1103
1040
|
* @throws {RequiredError}
|
|
1104
1041
|
* @memberof TranslationApi
|
|
1105
1042
|
*/
|
|
1106
|
-
public listProductLanguages(requestParameters: TranslationApiListProductLanguagesRequest, options?: AxiosRequestConfig) {
|
|
1107
|
-
return TranslationApiFp(this.configuration).listProductLanguages(requestParameters.
|
|
1043
|
+
public listProductLanguages(requestParameters: TranslationApiListProductLanguagesRequest = {}, options?: AxiosRequestConfig) {
|
|
1044
|
+
return TranslationApiFp(this.configuration).listProductLanguages(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
1108
1045
|
}
|
|
1109
1046
|
|
|
1110
1047
|
/**
|
|
@@ -1128,7 +1065,7 @@ export class TranslationApi extends BaseAPI {
|
|
|
1128
1065
|
* @memberof TranslationApi
|
|
1129
1066
|
*/
|
|
1130
1067
|
public updateProductLanguage(requestParameters: TranslationApiUpdateProductLanguageRequest, options?: AxiosRequestConfig) {
|
|
1131
|
-
return TranslationApiFp(this.configuration).updateProductLanguage(requestParameters.
|
|
1068
|
+
return TranslationApiFp(this.configuration).updateProductLanguage(requestParameters.updateProductLanguageRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1132
1069
|
}
|
|
1133
1070
|
|
|
1134
1071
|
/**
|