@emilgroup/translation-sdk-node 1.0.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 +23 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +68 -0
- package/api/translation-api.ts +1145 -0
- package/api.ts +31 -0
- package/base.ts +284 -0
- package/common.ts +199 -0
- package/configuration.ts +109 -0
- package/dist/api/translation-api.d.ts +649 -0
- package/dist/api/translation-api.js +989 -0
- package/dist/api.d.ts +12 -0
- package/dist/api.js +30 -0
- package/dist/base.d.ts +77 -0
- package/dist/base.js +393 -0
- package/dist/common.d.ts +92 -0
- package/dist/common.js +277 -0
- package/dist/configuration.d.ts +90 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/create-product-language-request-dto.d.ts +58 -0
- package/dist/models/create-product-language-request-dto.js +37 -0
- package/dist/models/create-product-language-response-class.d.ts +25 -0
- package/dist/models/create-product-language-response-class.js +15 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +25 -0
- package/dist/models/list-product-languages-response-class.d.ts +31 -0
- package/dist/models/list-product-languages-response-class.js +15 -0
- package/dist/models/list-translations-response-class.d.ts +31 -0
- package/dist/models/list-translations-response-class.js +15 -0
- package/dist/models/product-language-class.d.ts +82 -0
- package/dist/models/product-language-class.js +37 -0
- package/dist/models/translation-class.d.ts +54 -0
- package/dist/models/translation-class.js +15 -0
- package/dist/models/update-product-language-request-dto.d.ts +58 -0
- package/dist/models/update-product-language-request-dto.js +37 -0
- package/dist/models/update-product-language-response-class.d.ts +25 -0
- package/dist/models/update-product-language-response-class.js +15 -0
- package/dist/models/upload-product-translations-response-class.d.ts +25 -0
- package/dist/models/upload-product-translations-response-class.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-product-language-request-dto.ts +67 -0
- package/models/create-product-language-response-class.ts +31 -0
- package/models/index.ts +9 -0
- package/models/list-product-languages-response-class.ts +37 -0
- package/models/list-translations-response-class.ts +37 -0
- package/models/product-language-class.ts +91 -0
- package/models/translation-class.ts +60 -0
- package/models/update-product-language-request-dto.ts +67 -0
- package/models/update-product-language-response-class.ts +31 -0
- package/models/upload-product-translations-response-class.ts +31 -0
- package/package.json +29 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL TranslationService
|
|
6
|
+
* The EMIL TranslationService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.TranslationApi = exports.TranslationApiFactory = exports.TranslationApiFp = exports.TranslationApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* TranslationApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var TranslationApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* This creates a product language.
|
|
101
|
+
* @summary Create the product language
|
|
102
|
+
* @param {string} productSlug
|
|
103
|
+
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
104
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
createProductLanguage: function (productSlug, createProductLanguageRequestDto, authorization, options) {
|
|
109
|
+
if (options === void 0) { options = {}; }
|
|
110
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0:
|
|
115
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('createProductLanguage', 'productSlug', productSlug);
|
|
117
|
+
// verify required parameter 'createProductLanguageRequestDto' is not null or undefined
|
|
118
|
+
(0, common_1.assertParamExists)('createProductLanguage', 'createProductLanguageRequestDto', createProductLanguageRequestDto);
|
|
119
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/language"
|
|
120
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
121
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
122
|
+
if (configuration) {
|
|
123
|
+
baseOptions = configuration.baseOptions;
|
|
124
|
+
baseAccessToken = configuration.accessToken;
|
|
125
|
+
}
|
|
126
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
127
|
+
localVarHeaderParameter = {};
|
|
128
|
+
localVarQueryParameter = {};
|
|
129
|
+
// authentication bearer required
|
|
130
|
+
// http bearer authentication required
|
|
131
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
132
|
+
case 1:
|
|
133
|
+
// authentication bearer required
|
|
134
|
+
// http bearer authentication required
|
|
135
|
+
_a.sent();
|
|
136
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
137
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
138
|
+
}
|
|
139
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductLanguageRequestDto, localVarRequestOptions, configuration);
|
|
144
|
+
return [2 /*return*/, {
|
|
145
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
|
+
options: localVarRequestOptions,
|
|
147
|
+
}];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Permanently deletes the product language. Supply the unique id that was returned when you created the product language and this will delete it.
|
|
154
|
+
* @summary Delete the product language
|
|
155
|
+
* @param {number} id Id of the product language.
|
|
156
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
*/
|
|
160
|
+
deleteProductLanguage: function (id, authorization, options) {
|
|
161
|
+
if (options === void 0) { options = {}; }
|
|
162
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
163
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
164
|
+
return __generator(this, function (_a) {
|
|
165
|
+
switch (_a.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
// verify required parameter 'id' is not null or undefined
|
|
168
|
+
(0, common_1.assertParamExists)('deleteProductLanguage', 'id', id);
|
|
169
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/language/{id}"
|
|
170
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
171
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
172
|
+
if (configuration) {
|
|
173
|
+
baseOptions = configuration.baseOptions;
|
|
174
|
+
baseAccessToken = configuration.accessToken;
|
|
175
|
+
}
|
|
176
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
177
|
+
localVarHeaderParameter = {};
|
|
178
|
+
localVarQueryParameter = {};
|
|
179
|
+
// authentication bearer required
|
|
180
|
+
// http bearer authentication required
|
|
181
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
182
|
+
case 1:
|
|
183
|
+
// authentication bearer required
|
|
184
|
+
// http bearer authentication required
|
|
185
|
+
_a.sent();
|
|
186
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
187
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
188
|
+
}
|
|
189
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
190
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
192
|
+
return [2 /*return*/, {
|
|
193
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
194
|
+
options: localVarRequestOptions,
|
|
195
|
+
}];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* This downloads the list of translatable fields for a given product.
|
|
202
|
+
* @summary Retrieve the product translations
|
|
203
|
+
* @param {string} productSlug
|
|
204
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
205
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
downloadProductTranslations: function (productSlug, language, authorization, options) {
|
|
210
|
+
if (options === void 0) { options = {}; }
|
|
211
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
212
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
213
|
+
return __generator(this, function (_a) {
|
|
214
|
+
switch (_a.label) {
|
|
215
|
+
case 0:
|
|
216
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
217
|
+
(0, common_1.assertParamExists)('downloadProductTranslations', 'productSlug', productSlug);
|
|
218
|
+
// verify required parameter 'language' is not null or undefined
|
|
219
|
+
(0, common_1.assertParamExists)('downloadProductTranslations', 'language', language);
|
|
220
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/download"
|
|
221
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
222
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
223
|
+
if (configuration) {
|
|
224
|
+
baseOptions = configuration.baseOptions;
|
|
225
|
+
baseAccessToken = configuration.accessToken;
|
|
226
|
+
}
|
|
227
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
228
|
+
localVarHeaderParameter = {};
|
|
229
|
+
localVarQueryParameter = {};
|
|
230
|
+
// authentication bearer required
|
|
231
|
+
// http bearer authentication required
|
|
232
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
233
|
+
case 1:
|
|
234
|
+
// authentication bearer required
|
|
235
|
+
// http bearer authentication required
|
|
236
|
+
_a.sent();
|
|
237
|
+
if (language !== undefined) {
|
|
238
|
+
localVarQueryParameter['language'] = language;
|
|
239
|
+
}
|
|
240
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
241
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
242
|
+
}
|
|
243
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
244
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
245
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
246
|
+
return [2 /*return*/, {
|
|
247
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
248
|
+
options: localVarRequestOptions,
|
|
249
|
+
}];
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* This gets a product language.
|
|
256
|
+
* @summary Retrieve the product language
|
|
257
|
+
* @param {number} id Id of the product language.
|
|
258
|
+
* @param {string} productSlug Product slug of the product.
|
|
259
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
getProductLanguage: function (id, productSlug, authorization, options) {
|
|
264
|
+
if (options === void 0) { options = {}; }
|
|
265
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
266
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
267
|
+
return __generator(this, function (_a) {
|
|
268
|
+
switch (_a.label) {
|
|
269
|
+
case 0:
|
|
270
|
+
// verify required parameter 'id' is not null or undefined
|
|
271
|
+
(0, common_1.assertParamExists)('getProductLanguage', 'id', id);
|
|
272
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
273
|
+
(0, common_1.assertParamExists)('getProductLanguage', 'productSlug', productSlug);
|
|
274
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/language/{id}"
|
|
275
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)))
|
|
276
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
277
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
278
|
+
if (configuration) {
|
|
279
|
+
baseOptions = configuration.baseOptions;
|
|
280
|
+
baseAccessToken = configuration.accessToken;
|
|
281
|
+
}
|
|
282
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
283
|
+
localVarHeaderParameter = {};
|
|
284
|
+
localVarQueryParameter = {};
|
|
285
|
+
// authentication bearer required
|
|
286
|
+
// http bearer authentication required
|
|
287
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
288
|
+
case 1:
|
|
289
|
+
// authentication bearer required
|
|
290
|
+
// http bearer authentication required
|
|
291
|
+
_a.sent();
|
|
292
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
293
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
294
|
+
}
|
|
295
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
296
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
297
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
298
|
+
return [2 /*return*/, {
|
|
299
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
300
|
+
options: localVarRequestOptions,
|
|
301
|
+
}];
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
},
|
|
306
|
+
/**
|
|
307
|
+
* This lists the product languages.
|
|
308
|
+
* @summary List product languages
|
|
309
|
+
* @param {string} productSlug Product slug of the product.
|
|
310
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
311
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
312
|
+
* @param {any} [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.
|
|
313
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
314
|
+
* @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.
|
|
315
|
+
* @param {any} [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.
|
|
316
|
+
* @param {any} [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.
|
|
317
|
+
* @param {*} [options] Override http request option.
|
|
318
|
+
* @throws {RequiredError}
|
|
319
|
+
*/
|
|
320
|
+
listProductLanguages: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
321
|
+
if (options === void 0) { options = {}; }
|
|
322
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
323
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
324
|
+
return __generator(this, function (_a) {
|
|
325
|
+
switch (_a.label) {
|
|
326
|
+
case 0:
|
|
327
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
328
|
+
(0, common_1.assertParamExists)('listProductLanguages', 'productSlug', productSlug);
|
|
329
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/language"
|
|
330
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
331
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
332
|
+
if (configuration) {
|
|
333
|
+
baseOptions = configuration.baseOptions;
|
|
334
|
+
baseAccessToken = configuration.accessToken;
|
|
335
|
+
}
|
|
336
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
337
|
+
localVarHeaderParameter = {};
|
|
338
|
+
localVarQueryParameter = {};
|
|
339
|
+
// authentication bearer required
|
|
340
|
+
// http bearer authentication required
|
|
341
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
342
|
+
case 1:
|
|
343
|
+
// authentication bearer required
|
|
344
|
+
// http bearer authentication required
|
|
345
|
+
_a.sent();
|
|
346
|
+
if (pageSize !== undefined) {
|
|
347
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
348
|
+
}
|
|
349
|
+
if (pageToken !== undefined) {
|
|
350
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
351
|
+
}
|
|
352
|
+
if (filter !== undefined) {
|
|
353
|
+
localVarQueryParameter['filter'] = filter;
|
|
354
|
+
}
|
|
355
|
+
if (search !== undefined) {
|
|
356
|
+
localVarQueryParameter['search'] = search;
|
|
357
|
+
}
|
|
358
|
+
if (order !== undefined) {
|
|
359
|
+
localVarQueryParameter['order'] = order;
|
|
360
|
+
}
|
|
361
|
+
if (expand !== undefined) {
|
|
362
|
+
localVarQueryParameter['expand'] = expand;
|
|
363
|
+
}
|
|
364
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
365
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
366
|
+
}
|
|
367
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
368
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
369
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
370
|
+
return [2 /*return*/, {
|
|
371
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
372
|
+
options: localVarRequestOptions,
|
|
373
|
+
}];
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
* 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.
|
|
380
|
+
* @summary List translations
|
|
381
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
382
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
383
|
+
* @param {any} [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.
|
|
384
|
+
* @param {'key'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
385
|
+
* @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.
|
|
386
|
+
* @param {'0' | '1' | '2'} [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.
|
|
387
|
+
* @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.
|
|
388
|
+
* @param {*} [options] Override http request option.
|
|
389
|
+
* @throws {RequiredError}
|
|
390
|
+
*/
|
|
391
|
+
listTranslations: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
392
|
+
if (options === void 0) { options = {}; }
|
|
393
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
394
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
395
|
+
return __generator(this, function (_a) {
|
|
396
|
+
switch (_a.label) {
|
|
397
|
+
case 0:
|
|
398
|
+
localVarPath = "/translationservice/v1/translations";
|
|
399
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
400
|
+
if (configuration) {
|
|
401
|
+
baseOptions = configuration.baseOptions;
|
|
402
|
+
baseAccessToken = configuration.accessToken;
|
|
403
|
+
}
|
|
404
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
405
|
+
localVarHeaderParameter = {};
|
|
406
|
+
localVarQueryParameter = {};
|
|
407
|
+
// authentication bearer required
|
|
408
|
+
// http bearer authentication required
|
|
409
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
410
|
+
case 1:
|
|
411
|
+
// authentication bearer required
|
|
412
|
+
// http bearer authentication required
|
|
413
|
+
_a.sent();
|
|
414
|
+
if (pageSize !== undefined) {
|
|
415
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
416
|
+
}
|
|
417
|
+
if (pageToken !== undefined) {
|
|
418
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
419
|
+
}
|
|
420
|
+
if (filter !== undefined) {
|
|
421
|
+
localVarQueryParameter['filter'] = filter;
|
|
422
|
+
}
|
|
423
|
+
if (search !== undefined) {
|
|
424
|
+
localVarQueryParameter['search'] = search;
|
|
425
|
+
}
|
|
426
|
+
if (order !== undefined) {
|
|
427
|
+
localVarQueryParameter['order'] = order;
|
|
428
|
+
}
|
|
429
|
+
if (expand !== undefined) {
|
|
430
|
+
localVarQueryParameter['expand'] = expand;
|
|
431
|
+
}
|
|
432
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
433
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
434
|
+
}
|
|
435
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
436
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
437
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
438
|
+
return [2 /*return*/, {
|
|
439
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
440
|
+
options: localVarRequestOptions,
|
|
441
|
+
}];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
},
|
|
446
|
+
/**
|
|
447
|
+
* This updates the product language with the specified id.
|
|
448
|
+
* @summary Update the product language
|
|
449
|
+
* @param {number} id Id of the product language.
|
|
450
|
+
* @param {string} productSlug Product slug of the product.
|
|
451
|
+
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
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
|
+
updateProductLanguage: function (id, productSlug, updateProductLanguageRequestDto, authorization, options) {
|
|
457
|
+
if (options === void 0) { options = {}; }
|
|
458
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
459
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
460
|
+
return __generator(this, function (_a) {
|
|
461
|
+
switch (_a.label) {
|
|
462
|
+
case 0:
|
|
463
|
+
// verify required parameter 'id' is not null or undefined
|
|
464
|
+
(0, common_1.assertParamExists)('updateProductLanguage', 'id', id);
|
|
465
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
466
|
+
(0, common_1.assertParamExists)('updateProductLanguage', 'productSlug', productSlug);
|
|
467
|
+
// verify required parameter 'updateProductLanguageRequestDto' is not null or undefined
|
|
468
|
+
(0, common_1.assertParamExists)('updateProductLanguage', 'updateProductLanguageRequestDto', updateProductLanguageRequestDto);
|
|
469
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/language/{id}"
|
|
470
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)))
|
|
471
|
+
.replace("{".concat("product slug", "}"), encodeURIComponent(String(productSlug)));
|
|
472
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
473
|
+
if (configuration) {
|
|
474
|
+
baseOptions = configuration.baseOptions;
|
|
475
|
+
baseAccessToken = configuration.accessToken;
|
|
476
|
+
}
|
|
477
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
478
|
+
localVarHeaderParameter = {};
|
|
479
|
+
localVarQueryParameter = {};
|
|
480
|
+
// authentication bearer required
|
|
481
|
+
// http bearer authentication required
|
|
482
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
483
|
+
case 1:
|
|
484
|
+
// authentication bearer required
|
|
485
|
+
// http bearer authentication required
|
|
486
|
+
_a.sent();
|
|
487
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
488
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
489
|
+
}
|
|
490
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
491
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
492
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
493
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
494
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductLanguageRequestDto, localVarRequestOptions, configuration);
|
|
495
|
+
return [2 /*return*/, {
|
|
496
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
497
|
+
options: localVarRequestOptions,
|
|
498
|
+
}];
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
},
|
|
503
|
+
/**
|
|
504
|
+
* This uploads the translations for a given product.
|
|
505
|
+
* @summary Create the product translations
|
|
506
|
+
* @param {string} productSlug
|
|
507
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
508
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
509
|
+
* @param {any} [file]
|
|
510
|
+
* @param {*} [options] Override http request option.
|
|
511
|
+
* @throws {RequiredError}
|
|
512
|
+
*/
|
|
513
|
+
uploadProductTranslations: function (productSlug, language, authorization, file, options) {
|
|
514
|
+
if (options === void 0) { options = {}; }
|
|
515
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
516
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
|
|
517
|
+
return __generator(this, function (_a) {
|
|
518
|
+
switch (_a.label) {
|
|
519
|
+
case 0:
|
|
520
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
521
|
+
(0, common_1.assertParamExists)('uploadProductTranslations', 'productSlug', productSlug);
|
|
522
|
+
// verify required parameter 'language' is not null or undefined
|
|
523
|
+
(0, common_1.assertParamExists)('uploadProductTranslations', 'language', language);
|
|
524
|
+
localVarPath = "/translationservice/v1/product/{productSlug}/upload"
|
|
525
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
526
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
527
|
+
if (configuration) {
|
|
528
|
+
baseOptions = configuration.baseOptions;
|
|
529
|
+
baseAccessToken = configuration.accessToken;
|
|
530
|
+
}
|
|
531
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
532
|
+
localVarHeaderParameter = {};
|
|
533
|
+
localVarQueryParameter = {};
|
|
534
|
+
localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
535
|
+
// authentication bearer required
|
|
536
|
+
// http bearer authentication required
|
|
537
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
538
|
+
case 1:
|
|
539
|
+
// authentication bearer required
|
|
540
|
+
// http bearer authentication required
|
|
541
|
+
_a.sent();
|
|
542
|
+
if (language !== undefined) {
|
|
543
|
+
localVarQueryParameter['language'] = language;
|
|
544
|
+
}
|
|
545
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
546
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
547
|
+
}
|
|
548
|
+
if (file !== undefined) {
|
|
549
|
+
localVarFormParams.append('file', file);
|
|
550
|
+
}
|
|
551
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
|
|
552
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
553
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
554
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
555
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
556
|
+
return [2 /*return*/, {
|
|
557
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
558
|
+
options: localVarRequestOptions,
|
|
559
|
+
}];
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
},
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
exports.TranslationApiAxiosParamCreator = TranslationApiAxiosParamCreator;
|
|
567
|
+
/**
|
|
568
|
+
* TranslationApi - functional programming interface
|
|
569
|
+
* @export
|
|
570
|
+
*/
|
|
571
|
+
var TranslationApiFp = function (configuration) {
|
|
572
|
+
var localVarAxiosParamCreator = (0, exports.TranslationApiAxiosParamCreator)(configuration);
|
|
573
|
+
return {
|
|
574
|
+
/**
|
|
575
|
+
* This creates a product language.
|
|
576
|
+
* @summary Create the product language
|
|
577
|
+
* @param {string} productSlug
|
|
578
|
+
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
579
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
*/
|
|
583
|
+
createProductLanguage: function (productSlug, createProductLanguageRequestDto, authorization, options) {
|
|
584
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
585
|
+
var localVarAxiosArgs;
|
|
586
|
+
return __generator(this, function (_a) {
|
|
587
|
+
switch (_a.label) {
|
|
588
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProductLanguage(productSlug, createProductLanguageRequestDto, authorization, options)];
|
|
589
|
+
case 1:
|
|
590
|
+
localVarAxiosArgs = _a.sent();
|
|
591
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
});
|
|
595
|
+
},
|
|
596
|
+
/**
|
|
597
|
+
* Permanently deletes the product language. Supply the unique id that was returned when you created the product language and this will delete it.
|
|
598
|
+
* @summary Delete the product language
|
|
599
|
+
* @param {number} id Id of the product language.
|
|
600
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
601
|
+
* @param {*} [options] Override http request option.
|
|
602
|
+
* @throws {RequiredError}
|
|
603
|
+
*/
|
|
604
|
+
deleteProductLanguage: function (id, authorization, options) {
|
|
605
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
606
|
+
var localVarAxiosArgs;
|
|
607
|
+
return __generator(this, function (_a) {
|
|
608
|
+
switch (_a.label) {
|
|
609
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProductLanguage(id, authorization, options)];
|
|
610
|
+
case 1:
|
|
611
|
+
localVarAxiosArgs = _a.sent();
|
|
612
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
});
|
|
616
|
+
},
|
|
617
|
+
/**
|
|
618
|
+
* This downloads the list of translatable fields for a given product.
|
|
619
|
+
* @summary Retrieve the product translations
|
|
620
|
+
* @param {string} productSlug
|
|
621
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
622
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
623
|
+
* @param {*} [options] Override http request option.
|
|
624
|
+
* @throws {RequiredError}
|
|
625
|
+
*/
|
|
626
|
+
downloadProductTranslations: function (productSlug, language, authorization, options) {
|
|
627
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
628
|
+
var localVarAxiosArgs;
|
|
629
|
+
return __generator(this, function (_a) {
|
|
630
|
+
switch (_a.label) {
|
|
631
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductTranslations(productSlug, language, authorization, options)];
|
|
632
|
+
case 1:
|
|
633
|
+
localVarAxiosArgs = _a.sent();
|
|
634
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
});
|
|
638
|
+
},
|
|
639
|
+
/**
|
|
640
|
+
* This gets a product language.
|
|
641
|
+
* @summary Retrieve the product language
|
|
642
|
+
* @param {number} id Id of the product language.
|
|
643
|
+
* @param {string} productSlug Product slug of the product.
|
|
644
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
645
|
+
* @param {*} [options] Override http request option.
|
|
646
|
+
* @throws {RequiredError}
|
|
647
|
+
*/
|
|
648
|
+
getProductLanguage: function (id, productSlug, authorization, options) {
|
|
649
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
650
|
+
var localVarAxiosArgs;
|
|
651
|
+
return __generator(this, function (_a) {
|
|
652
|
+
switch (_a.label) {
|
|
653
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductLanguage(id, productSlug, authorization, options)];
|
|
654
|
+
case 1:
|
|
655
|
+
localVarAxiosArgs = _a.sent();
|
|
656
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
});
|
|
660
|
+
},
|
|
661
|
+
/**
|
|
662
|
+
* This lists the product languages.
|
|
663
|
+
* @summary List product languages
|
|
664
|
+
* @param {string} productSlug Product slug of the product.
|
|
665
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
666
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
667
|
+
* @param {any} [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 {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
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.
|
|
670
|
+
* @param {any} [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 {any} [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.
|
|
672
|
+
* @param {*} [options] Override http request option.
|
|
673
|
+
* @throws {RequiredError}
|
|
674
|
+
*/
|
|
675
|
+
listProductLanguages: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
677
|
+
var localVarAxiosArgs;
|
|
678
|
+
return __generator(this, function (_a) {
|
|
679
|
+
switch (_a.label) {
|
|
680
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductLanguages(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
681
|
+
case 1:
|
|
682
|
+
localVarAxiosArgs = _a.sent();
|
|
683
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
},
|
|
688
|
+
/**
|
|
689
|
+
* 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.
|
|
690
|
+
* @summary List translations
|
|
691
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
692
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
693
|
+
* @param {any} [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.
|
|
694
|
+
* @param {'key'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
695
|
+
* @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 {'0' | '1' | '2'} [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.
|
|
697
|
+
* @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
|
+
* @param {*} [options] Override http request option.
|
|
699
|
+
* @throws {RequiredError}
|
|
700
|
+
*/
|
|
701
|
+
listTranslations: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
702
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
703
|
+
var localVarAxiosArgs;
|
|
704
|
+
return __generator(this, function (_a) {
|
|
705
|
+
switch (_a.label) {
|
|
706
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
707
|
+
case 1:
|
|
708
|
+
localVarAxiosArgs = _a.sent();
|
|
709
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
},
|
|
714
|
+
/**
|
|
715
|
+
* This updates the product language with the specified id.
|
|
716
|
+
* @summary Update the product language
|
|
717
|
+
* @param {number} id Id of the product language.
|
|
718
|
+
* @param {string} productSlug Product slug of the product.
|
|
719
|
+
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
720
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
721
|
+
* @param {*} [options] Override http request option.
|
|
722
|
+
* @throws {RequiredError}
|
|
723
|
+
*/
|
|
724
|
+
updateProductLanguage: function (id, productSlug, updateProductLanguageRequestDto, authorization, options) {
|
|
725
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
726
|
+
var localVarAxiosArgs;
|
|
727
|
+
return __generator(this, function (_a) {
|
|
728
|
+
switch (_a.label) {
|
|
729
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateProductLanguage(id, productSlug, updateProductLanguageRequestDto, authorization, options)];
|
|
730
|
+
case 1:
|
|
731
|
+
localVarAxiosArgs = _a.sent();
|
|
732
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
},
|
|
737
|
+
/**
|
|
738
|
+
* This uploads the translations for a given product.
|
|
739
|
+
* @summary Create the product translations
|
|
740
|
+
* @param {string} productSlug
|
|
741
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
742
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
743
|
+
* @param {any} [file]
|
|
744
|
+
* @param {*} [options] Override http request option.
|
|
745
|
+
* @throws {RequiredError}
|
|
746
|
+
*/
|
|
747
|
+
uploadProductTranslations: function (productSlug, language, authorization, file, options) {
|
|
748
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
749
|
+
var localVarAxiosArgs;
|
|
750
|
+
return __generator(this, function (_a) {
|
|
751
|
+
switch (_a.label) {
|
|
752
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadProductTranslations(productSlug, language, authorization, file, options)];
|
|
753
|
+
case 1:
|
|
754
|
+
localVarAxiosArgs = _a.sent();
|
|
755
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
756
|
+
}
|
|
757
|
+
});
|
|
758
|
+
});
|
|
759
|
+
},
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
exports.TranslationApiFp = TranslationApiFp;
|
|
763
|
+
/**
|
|
764
|
+
* TranslationApi - factory interface
|
|
765
|
+
* @export
|
|
766
|
+
*/
|
|
767
|
+
var TranslationApiFactory = function (configuration, basePath, axios) {
|
|
768
|
+
var localVarFp = (0, exports.TranslationApiFp)(configuration);
|
|
769
|
+
return {
|
|
770
|
+
/**
|
|
771
|
+
* This creates a product language.
|
|
772
|
+
* @summary Create the product language
|
|
773
|
+
* @param {string} productSlug
|
|
774
|
+
* @param {CreateProductLanguageRequestDto} createProductLanguageRequestDto
|
|
775
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
*/
|
|
779
|
+
createProductLanguage: function (productSlug, createProductLanguageRequestDto, authorization, options) {
|
|
780
|
+
return localVarFp.createProductLanguage(productSlug, createProductLanguageRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
* Permanently deletes the product language. Supply the unique id that was returned when you created the product language and this will delete it.
|
|
784
|
+
* @summary Delete the product language
|
|
785
|
+
* @param {number} id Id of the product language.
|
|
786
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
787
|
+
* @param {*} [options] Override http request option.
|
|
788
|
+
* @throws {RequiredError}
|
|
789
|
+
*/
|
|
790
|
+
deleteProductLanguage: function (id, authorization, options) {
|
|
791
|
+
return localVarFp.deleteProductLanguage(id, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
792
|
+
},
|
|
793
|
+
/**
|
|
794
|
+
* This downloads the list of translatable fields for a given product.
|
|
795
|
+
* @summary Retrieve the product translations
|
|
796
|
+
* @param {string} productSlug
|
|
797
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
798
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
799
|
+
* @param {*} [options] Override http request option.
|
|
800
|
+
* @throws {RequiredError}
|
|
801
|
+
*/
|
|
802
|
+
downloadProductTranslations: function (productSlug, language, authorization, options) {
|
|
803
|
+
return localVarFp.downloadProductTranslations(productSlug, language, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
804
|
+
},
|
|
805
|
+
/**
|
|
806
|
+
* This gets a product language.
|
|
807
|
+
* @summary Retrieve the product language
|
|
808
|
+
* @param {number} id Id of the product language.
|
|
809
|
+
* @param {string} productSlug Product slug of the product.
|
|
810
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
811
|
+
* @param {*} [options] Override http request option.
|
|
812
|
+
* @throws {RequiredError}
|
|
813
|
+
*/
|
|
814
|
+
getProductLanguage: function (id, productSlug, authorization, options) {
|
|
815
|
+
return localVarFp.getProductLanguage(id, productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
816
|
+
},
|
|
817
|
+
/**
|
|
818
|
+
* This lists the product languages.
|
|
819
|
+
* @summary List product languages
|
|
820
|
+
* @param {string} productSlug Product slug of the product.
|
|
821
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
822
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
823
|
+
* @param {any} [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.
|
|
824
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
825
|
+
* @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.
|
|
826
|
+
* @param {any} [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.
|
|
827
|
+
* @param {any} [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.
|
|
828
|
+
* @param {*} [options] Override http request option.
|
|
829
|
+
* @throws {RequiredError}
|
|
830
|
+
*/
|
|
831
|
+
listProductLanguages: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
832
|
+
return localVarFp.listProductLanguages(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* 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.
|
|
836
|
+
* @summary List translations
|
|
837
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
838
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
839
|
+
* @param {any} [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.
|
|
840
|
+
* @param {'key'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
841
|
+
* @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.
|
|
842
|
+
* @param {'0' | '1' | '2'} [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.
|
|
843
|
+
* @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.
|
|
844
|
+
* @param {*} [options] Override http request option.
|
|
845
|
+
* @throws {RequiredError}
|
|
846
|
+
*/
|
|
847
|
+
listTranslations: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
848
|
+
return localVarFp.listTranslations(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
849
|
+
},
|
|
850
|
+
/**
|
|
851
|
+
* This updates the product language with the specified id.
|
|
852
|
+
* @summary Update the product language
|
|
853
|
+
* @param {number} id Id of the product language.
|
|
854
|
+
* @param {string} productSlug Product slug of the product.
|
|
855
|
+
* @param {UpdateProductLanguageRequestDto} updateProductLanguageRequestDto
|
|
856
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
updateProductLanguage: function (id, productSlug, updateProductLanguageRequestDto, authorization, options) {
|
|
861
|
+
return localVarFp.updateProductLanguage(id, productSlug, updateProductLanguageRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
862
|
+
},
|
|
863
|
+
/**
|
|
864
|
+
* This uploads the translations for a given product.
|
|
865
|
+
* @summary Create the product translations
|
|
866
|
+
* @param {string} productSlug
|
|
867
|
+
* @param {'German' | 'English' | 'Polish' | 'French' | 'Italian' | 'Spanish' | 'Portuguese' | 'Russian' | 'Japanese' | 'Chinese' | 'Korean' | 'Turkish' | 'Arabic' | 'Hindi' | 'Indonesian' | 'Thai' | 'Vietnamese' | 'Persian' | 'Romanian'} language
|
|
868
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
869
|
+
* @param {any} [file]
|
|
870
|
+
* @param {*} [options] Override http request option.
|
|
871
|
+
* @throws {RequiredError}
|
|
872
|
+
*/
|
|
873
|
+
uploadProductTranslations: function (productSlug, language, authorization, file, options) {
|
|
874
|
+
return localVarFp.uploadProductTranslations(productSlug, language, authorization, file, options).then(function (request) { return request(axios, basePath); });
|
|
875
|
+
},
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
exports.TranslationApiFactory = TranslationApiFactory;
|
|
879
|
+
/**
|
|
880
|
+
* TranslationApi - object-oriented interface
|
|
881
|
+
* @export
|
|
882
|
+
* @class TranslationApi
|
|
883
|
+
* @extends {BaseAPI}
|
|
884
|
+
*/
|
|
885
|
+
var TranslationApi = /** @class */ (function (_super) {
|
|
886
|
+
__extends(TranslationApi, _super);
|
|
887
|
+
function TranslationApi() {
|
|
888
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* This creates a product language.
|
|
892
|
+
* @summary Create the product language
|
|
893
|
+
* @param {TranslationApiCreateProductLanguageRequest} requestParameters Request parameters.
|
|
894
|
+
* @param {*} [options] Override http request option.
|
|
895
|
+
* @throws {RequiredError}
|
|
896
|
+
* @memberof TranslationApi
|
|
897
|
+
*/
|
|
898
|
+
TranslationApi.prototype.createProductLanguage = function (requestParameters, options) {
|
|
899
|
+
var _this = this;
|
|
900
|
+
return (0, exports.TranslationApiFp)(this.configuration).createProductLanguage(requestParameters.productSlug, requestParameters.createProductLanguageRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
901
|
+
};
|
|
902
|
+
/**
|
|
903
|
+
* Permanently deletes the product language. Supply the unique id that was returned when you created the product language and this will delete it.
|
|
904
|
+
* @summary Delete the product language
|
|
905
|
+
* @param {TranslationApiDeleteProductLanguageRequest} requestParameters Request parameters.
|
|
906
|
+
* @param {*} [options] Override http request option.
|
|
907
|
+
* @throws {RequiredError}
|
|
908
|
+
* @memberof TranslationApi
|
|
909
|
+
*/
|
|
910
|
+
TranslationApi.prototype.deleteProductLanguage = function (requestParameters, options) {
|
|
911
|
+
var _this = this;
|
|
912
|
+
return (0, exports.TranslationApiFp)(this.configuration).deleteProductLanguage(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* This downloads the list of translatable fields for a given product.
|
|
916
|
+
* @summary Retrieve the product translations
|
|
917
|
+
* @param {TranslationApiDownloadProductTranslationsRequest} requestParameters Request parameters.
|
|
918
|
+
* @param {*} [options] Override http request option.
|
|
919
|
+
* @throws {RequiredError}
|
|
920
|
+
* @memberof TranslationApi
|
|
921
|
+
*/
|
|
922
|
+
TranslationApi.prototype.downloadProductTranslations = function (requestParameters, options) {
|
|
923
|
+
var _this = this;
|
|
924
|
+
return (0, exports.TranslationApiFp)(this.configuration).downloadProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* This gets a product language.
|
|
928
|
+
* @summary Retrieve the product language
|
|
929
|
+
* @param {TranslationApiGetProductLanguageRequest} requestParameters Request parameters.
|
|
930
|
+
* @param {*} [options] Override http request option.
|
|
931
|
+
* @throws {RequiredError}
|
|
932
|
+
* @memberof TranslationApi
|
|
933
|
+
*/
|
|
934
|
+
TranslationApi.prototype.getProductLanguage = function (requestParameters, options) {
|
|
935
|
+
var _this = this;
|
|
936
|
+
return (0, exports.TranslationApiFp)(this.configuration).getProductLanguage(requestParameters.id, requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* This lists the product languages.
|
|
940
|
+
* @summary List product languages
|
|
941
|
+
* @param {TranslationApiListProductLanguagesRequest} requestParameters Request parameters.
|
|
942
|
+
* @param {*} [options] Override http request option.
|
|
943
|
+
* @throws {RequiredError}
|
|
944
|
+
* @memberof TranslationApi
|
|
945
|
+
*/
|
|
946
|
+
TranslationApi.prototype.listProductLanguages = function (requestParameters, options) {
|
|
947
|
+
var _this = this;
|
|
948
|
+
return (0, exports.TranslationApiFp)(this.configuration).listProductLanguages(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* 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.
|
|
952
|
+
* @summary List translations
|
|
953
|
+
* @param {TranslationApiListTranslationsRequest} requestParameters Request parameters.
|
|
954
|
+
* @param {*} [options] Override http request option.
|
|
955
|
+
* @throws {RequiredError}
|
|
956
|
+
* @memberof TranslationApi
|
|
957
|
+
*/
|
|
958
|
+
TranslationApi.prototype.listTranslations = function (requestParameters, options) {
|
|
959
|
+
var _this = this;
|
|
960
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
961
|
+
return (0, exports.TranslationApiFp)(this.configuration).listTranslations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
962
|
+
};
|
|
963
|
+
/**
|
|
964
|
+
* This updates the product language with the specified id.
|
|
965
|
+
* @summary Update the product language
|
|
966
|
+
* @param {TranslationApiUpdateProductLanguageRequest} requestParameters Request parameters.
|
|
967
|
+
* @param {*} [options] Override http request option.
|
|
968
|
+
* @throws {RequiredError}
|
|
969
|
+
* @memberof TranslationApi
|
|
970
|
+
*/
|
|
971
|
+
TranslationApi.prototype.updateProductLanguage = function (requestParameters, options) {
|
|
972
|
+
var _this = this;
|
|
973
|
+
return (0, exports.TranslationApiFp)(this.configuration).updateProductLanguage(requestParameters.id, requestParameters.productSlug, requestParameters.updateProductLanguageRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
974
|
+
};
|
|
975
|
+
/**
|
|
976
|
+
* This uploads the translations for a given product.
|
|
977
|
+
* @summary Create the product translations
|
|
978
|
+
* @param {TranslationApiUploadProductTranslationsRequest} requestParameters Request parameters.
|
|
979
|
+
* @param {*} [options] Override http request option.
|
|
980
|
+
* @throws {RequiredError}
|
|
981
|
+
* @memberof TranslationApi
|
|
982
|
+
*/
|
|
983
|
+
TranslationApi.prototype.uploadProductTranslations = function (requestParameters, options) {
|
|
984
|
+
var _this = this;
|
|
985
|
+
return (0, exports.TranslationApiFp)(this.configuration).uploadProductTranslations(requestParameters.productSlug, requestParameters.language, requestParameters.authorization, requestParameters.file, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
986
|
+
};
|
|
987
|
+
return TranslationApi;
|
|
988
|
+
}(base_1.BaseAPI));
|
|
989
|
+
exports.TranslationApi = TranslationApi;
|