@teemill/platform 0.9.0 → 0.11.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/README.md +2 -2
- package/api.ts +2252 -110
- package/base.ts +3 -3
- package/common.ts +3 -3
- package/configuration.ts +10 -4
- package/dist/api.d.ts +1594 -59
- package/dist/api.js +1001 -25
- package/dist/base.d.ts +3 -3
- package/dist/base.js +3 -3
- package/dist/common.d.ts +3 -3
- package/dist/common.js +3 -3
- package/dist/configuration.d.ts +3 -3
- package/dist/configuration.js +5 -4
- package/dist/esm/api.d.ts +1594 -59
- package/dist/esm/api.js +988 -24
- package/dist/esm/base.d.ts +3 -3
- package/dist/esm/base.js +3 -3
- package/dist/esm/common.d.ts +3 -3
- package/dist/esm/common.js +3 -3
- package/dist/esm/configuration.d.ts +3 -3
- package/dist/esm/configuration.js +5 -4
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/index.ts +3 -3
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Platform API
|
|
6
|
-
* Manage Your podOS platform
|
|
6
|
+
* Manage Your podOS platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.11.0
|
|
7
9
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.9.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.PlatformApi = exports.PlatformApiFactory = exports.PlatformApiFp = exports.PlatformApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.OrderStatus = void 0;
|
|
25
|
+
exports.VariantsApi = exports.VariantsApiFactory = exports.VariantsApiFp = exports.VariantsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.PlatformApi = exports.PlatformApiFactory = exports.PlatformApiFp = exports.PlatformApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.CustomersApi = exports.CustomersApiFactory = exports.CustomersApiFp = exports.CustomersApiAxiosParamCreator = exports.VariantAttributeThumbnailTypeEnum = exports.ProductAttributeValuesInnerThumbnailTypeEnum = exports.OutputFileFormatEnum = exports.OutputPositionEnum = exports.OrderStatus = void 0;
|
|
26
26
|
const axios_1 = require("axios");
|
|
27
27
|
// Some imports not used depending on template conditions
|
|
28
28
|
// @ts-ignore
|
|
@@ -41,6 +41,311 @@ exports.OrderStatus = {
|
|
|
41
41
|
Complete: 'complete',
|
|
42
42
|
Refunded: 'refunded'
|
|
43
43
|
};
|
|
44
|
+
exports.OutputPositionEnum = {
|
|
45
|
+
Center: 'center',
|
|
46
|
+
Top: 'top',
|
|
47
|
+
Left: 'left',
|
|
48
|
+
Bottom: 'bottom',
|
|
49
|
+
Right: 'right',
|
|
50
|
+
RightTop: 'right-top',
|
|
51
|
+
RightBottom: 'right-bottom',
|
|
52
|
+
LeftTop: 'left-top',
|
|
53
|
+
LeftBottom: 'left-bottom'
|
|
54
|
+
};
|
|
55
|
+
exports.OutputFileFormatEnum = {
|
|
56
|
+
Png: 'png',
|
|
57
|
+
Jpg: 'jpg',
|
|
58
|
+
Jpeg: 'jpeg',
|
|
59
|
+
Webp: 'webp',
|
|
60
|
+
Pdf: 'pdf'
|
|
61
|
+
};
|
|
62
|
+
exports.ProductAttributeValuesInnerThumbnailTypeEnum = {
|
|
63
|
+
Text: 'text',
|
|
64
|
+
Color: 'color',
|
|
65
|
+
Image: 'image'
|
|
66
|
+
};
|
|
67
|
+
exports.VariantAttributeThumbnailTypeEnum = {
|
|
68
|
+
Text: 'text',
|
|
69
|
+
Color: 'color',
|
|
70
|
+
Image: 'image'
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* CustomersApi - axios parameter creator
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
const CustomersApiAxiosParamCreator = function (configuration) {
|
|
77
|
+
return {
|
|
78
|
+
/**
|
|
79
|
+
* Export customers as a CSV file
|
|
80
|
+
* @summary Export customers
|
|
81
|
+
* @param {string} project Project unique identifier
|
|
82
|
+
* @param {string} platformId The platform identifier
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
exportCustomers: (project_1, platformId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, ...args_1], void 0, function* (project, platformId, options = {}) {
|
|
87
|
+
// verify required parameter 'project' is not null or undefined
|
|
88
|
+
(0, common_1.assertParamExists)('exportCustomers', 'project', project);
|
|
89
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
90
|
+
(0, common_1.assertParamExists)('exportCustomers', 'platformId', platformId);
|
|
91
|
+
const localVarPath = `/v1/platform/{platformId}/customers/export`
|
|
92
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
93
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
94
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
95
|
+
let baseOptions;
|
|
96
|
+
if (configuration) {
|
|
97
|
+
baseOptions = configuration.baseOptions;
|
|
98
|
+
}
|
|
99
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
100
|
+
const localVarHeaderParameter = {};
|
|
101
|
+
const localVarQueryParameter = {};
|
|
102
|
+
// authentication session-oauth required
|
|
103
|
+
// oauth required
|
|
104
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
105
|
+
// authentication api-key required
|
|
106
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
107
|
+
if (project !== undefined) {
|
|
108
|
+
localVarQueryParameter['project'] = project;
|
|
109
|
+
}
|
|
110
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
112
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
113
|
+
return {
|
|
114
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
115
|
+
options: localVarRequestOptions,
|
|
116
|
+
};
|
|
117
|
+
}),
|
|
118
|
+
/**
|
|
119
|
+
* Get a customer for a platform by a given customer ID.
|
|
120
|
+
* @summary Get customer
|
|
121
|
+
* @param {string} project Project unique identifier
|
|
122
|
+
* @param {string} platformId The platform identifier
|
|
123
|
+
* @param {string} customerId The customer identifier
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
getCustomer: (project_1, platformId_1, customerId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, customerId_1, ...args_1], void 0, function* (project, platformId, customerId, options = {}) {
|
|
128
|
+
// verify required parameter 'project' is not null or undefined
|
|
129
|
+
(0, common_1.assertParamExists)('getCustomer', 'project', project);
|
|
130
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
131
|
+
(0, common_1.assertParamExists)('getCustomer', 'platformId', platformId);
|
|
132
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
133
|
+
(0, common_1.assertParamExists)('getCustomer', 'customerId', customerId);
|
|
134
|
+
const localVarPath = `/v1/platform/{platformId}/customers/{customerId}`
|
|
135
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
136
|
+
.replace(`{${"customerId"}}`, encodeURIComponent(String(customerId)));
|
|
137
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
138
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
139
|
+
let baseOptions;
|
|
140
|
+
if (configuration) {
|
|
141
|
+
baseOptions = configuration.baseOptions;
|
|
142
|
+
}
|
|
143
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
144
|
+
const localVarHeaderParameter = {};
|
|
145
|
+
const localVarQueryParameter = {};
|
|
146
|
+
// authentication session-oauth required
|
|
147
|
+
// oauth required
|
|
148
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
149
|
+
// authentication api-key required
|
|
150
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
151
|
+
if (project !== undefined) {
|
|
152
|
+
localVarQueryParameter['project'] = project;
|
|
153
|
+
}
|
|
154
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
157
|
+
return {
|
|
158
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
159
|
+
options: localVarRequestOptions,
|
|
160
|
+
};
|
|
161
|
+
}),
|
|
162
|
+
/**
|
|
163
|
+
* List customers for a platform
|
|
164
|
+
* @summary List customers
|
|
165
|
+
* @param {string} project Project unique identifier
|
|
166
|
+
* @param {string} platformId The platform identifier
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
*/
|
|
170
|
+
listCustomers: (project_1, platformId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, ...args_1], void 0, function* (project, platformId, options = {}) {
|
|
171
|
+
// verify required parameter 'project' is not null or undefined
|
|
172
|
+
(0, common_1.assertParamExists)('listCustomers', 'project', project);
|
|
173
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
174
|
+
(0, common_1.assertParamExists)('listCustomers', 'platformId', platformId);
|
|
175
|
+
const localVarPath = `/v1/platform/{platformId}/customers`
|
|
176
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
177
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
178
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
179
|
+
let baseOptions;
|
|
180
|
+
if (configuration) {
|
|
181
|
+
baseOptions = configuration.baseOptions;
|
|
182
|
+
}
|
|
183
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
184
|
+
const localVarHeaderParameter = {};
|
|
185
|
+
const localVarQueryParameter = {};
|
|
186
|
+
// authentication session-oauth required
|
|
187
|
+
// oauth required
|
|
188
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
189
|
+
// authentication api-key required
|
|
190
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
191
|
+
if (project !== undefined) {
|
|
192
|
+
localVarQueryParameter['project'] = project;
|
|
193
|
+
}
|
|
194
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
197
|
+
return {
|
|
198
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
199
|
+
options: localVarRequestOptions,
|
|
200
|
+
};
|
|
201
|
+
}),
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
|
|
205
|
+
/**
|
|
206
|
+
* CustomersApi - functional programming interface
|
|
207
|
+
* @export
|
|
208
|
+
*/
|
|
209
|
+
const CustomersApiFp = function (configuration) {
|
|
210
|
+
const localVarAxiosParamCreator = (0, exports.CustomersApiAxiosParamCreator)(configuration);
|
|
211
|
+
return {
|
|
212
|
+
/**
|
|
213
|
+
* Export customers as a CSV file
|
|
214
|
+
* @summary Export customers
|
|
215
|
+
* @param {string} project Project unique identifier
|
|
216
|
+
* @param {string} platformId The platform identifier
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
exportCustomers(project, platformId, options) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
var _a, _b, _c;
|
|
223
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, options);
|
|
224
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
225
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CustomersApi.exportCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
226
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
/**
|
|
230
|
+
* Get a customer for a platform by a given customer ID.
|
|
231
|
+
* @summary Get customer
|
|
232
|
+
* @param {string} project Project unique identifier
|
|
233
|
+
* @param {string} platformId The platform identifier
|
|
234
|
+
* @param {string} customerId The customer identifier
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
getCustomer(project, platformId, customerId, options) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
var _a, _b, _c;
|
|
241
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomer(project, platformId, customerId, options);
|
|
242
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
243
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CustomersApi.getCustomer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
244
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
/**
|
|
248
|
+
* List customers for a platform
|
|
249
|
+
* @summary List customers
|
|
250
|
+
* @param {string} project Project unique identifier
|
|
251
|
+
* @param {string} platformId The platform identifier
|
|
252
|
+
* @param {*} [options] Override http request option.
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
listCustomers(project, platformId, options) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
var _a, _b, _c;
|
|
258
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, options);
|
|
259
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
260
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CustomersApi.listCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
261
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
exports.CustomersApiFp = CustomersApiFp;
|
|
267
|
+
/**
|
|
268
|
+
* CustomersApi - factory interface
|
|
269
|
+
* @export
|
|
270
|
+
*/
|
|
271
|
+
const CustomersApiFactory = function (configuration, basePath, axios) {
|
|
272
|
+
const localVarFp = (0, exports.CustomersApiFp)(configuration);
|
|
273
|
+
return {
|
|
274
|
+
/**
|
|
275
|
+
* Export customers as a CSV file
|
|
276
|
+
* @summary Export customers
|
|
277
|
+
* @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
|
|
278
|
+
* @param {*} [options] Override http request option.
|
|
279
|
+
* @throws {RequiredError}
|
|
280
|
+
*/
|
|
281
|
+
exportCustomers(requestParameters, options) {
|
|
282
|
+
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
* Get a customer for a platform by a given customer ID.
|
|
286
|
+
* @summary Get customer
|
|
287
|
+
* @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
*/
|
|
291
|
+
getCustomer(requestParameters, options) {
|
|
292
|
+
return localVarFp.getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(axios, basePath));
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
* List customers for a platform
|
|
296
|
+
* @summary List customers
|
|
297
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
298
|
+
* @param {*} [options] Override http request option.
|
|
299
|
+
* @throws {RequiredError}
|
|
300
|
+
*/
|
|
301
|
+
listCustomers(requestParameters, options) {
|
|
302
|
+
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
exports.CustomersApiFactory = CustomersApiFactory;
|
|
307
|
+
/**
|
|
308
|
+
* CustomersApi - object-oriented interface
|
|
309
|
+
* @export
|
|
310
|
+
* @class CustomersApi
|
|
311
|
+
* @extends {BaseAPI}
|
|
312
|
+
*/
|
|
313
|
+
class CustomersApi extends base_1.BaseAPI {
|
|
314
|
+
/**
|
|
315
|
+
* Export customers as a CSV file
|
|
316
|
+
* @summary Export customers
|
|
317
|
+
* @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
* @memberof CustomersApi
|
|
321
|
+
*/
|
|
322
|
+
exportCustomers(requestParameters, options) {
|
|
323
|
+
return (0, exports.CustomersApiFp)(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Get a customer for a platform by a given customer ID.
|
|
327
|
+
* @summary Get customer
|
|
328
|
+
* @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
* @memberof CustomersApi
|
|
332
|
+
*/
|
|
333
|
+
getCustomer(requestParameters, options) {
|
|
334
|
+
return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* List customers for a platform
|
|
338
|
+
* @summary List customers
|
|
339
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
* @memberof CustomersApi
|
|
343
|
+
*/
|
|
344
|
+
listCustomers(requestParameters, options) {
|
|
345
|
+
return (0, exports.CustomersApiFp)(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
exports.CustomersApi = CustomersApi;
|
|
44
349
|
/**
|
|
45
350
|
* OrdersApi - axios parameter creator
|
|
46
351
|
* @export
|
|
@@ -629,6 +934,46 @@ exports.OrdersApi = OrdersApi;
|
|
|
629
934
|
*/
|
|
630
935
|
const PlatformApiAxiosParamCreator = function (configuration) {
|
|
631
936
|
return {
|
|
937
|
+
/**
|
|
938
|
+
* Export customers as a CSV file
|
|
939
|
+
* @summary Export customers
|
|
940
|
+
* @param {string} project Project unique identifier
|
|
941
|
+
* @param {string} platformId The platform identifier
|
|
942
|
+
* @param {*} [options] Override http request option.
|
|
943
|
+
* @throws {RequiredError}
|
|
944
|
+
*/
|
|
945
|
+
exportCustomers: (project_1, platformId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, ...args_1], void 0, function* (project, platformId, options = {}) {
|
|
946
|
+
// verify required parameter 'project' is not null or undefined
|
|
947
|
+
(0, common_1.assertParamExists)('exportCustomers', 'project', project);
|
|
948
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
949
|
+
(0, common_1.assertParamExists)('exportCustomers', 'platformId', platformId);
|
|
950
|
+
const localVarPath = `/v1/platform/{platformId}/customers/export`
|
|
951
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
952
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
953
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
954
|
+
let baseOptions;
|
|
955
|
+
if (configuration) {
|
|
956
|
+
baseOptions = configuration.baseOptions;
|
|
957
|
+
}
|
|
958
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
959
|
+
const localVarHeaderParameter = {};
|
|
960
|
+
const localVarQueryParameter = {};
|
|
961
|
+
// authentication session-oauth required
|
|
962
|
+
// oauth required
|
|
963
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
964
|
+
// authentication api-key required
|
|
965
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
966
|
+
if (project !== undefined) {
|
|
967
|
+
localVarQueryParameter['project'] = project;
|
|
968
|
+
}
|
|
969
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
970
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
971
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
972
|
+
return {
|
|
973
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
974
|
+
options: localVarRequestOptions,
|
|
975
|
+
};
|
|
976
|
+
}),
|
|
632
977
|
/**
|
|
633
978
|
* Export orders as a CSV file
|
|
634
979
|
* @summary Export orders
|
|
@@ -688,24 +1033,24 @@ const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
688
1033
|
};
|
|
689
1034
|
}),
|
|
690
1035
|
/**
|
|
691
|
-
* Get a
|
|
692
|
-
* @summary Get
|
|
1036
|
+
* Get a customer for a platform by a given customer ID.
|
|
1037
|
+
* @summary Get customer
|
|
693
1038
|
* @param {string} project Project unique identifier
|
|
694
1039
|
* @param {string} platformId The platform identifier
|
|
695
|
-
* @param {string}
|
|
1040
|
+
* @param {string} customerId The customer identifier
|
|
696
1041
|
* @param {*} [options] Override http request option.
|
|
697
1042
|
* @throws {RequiredError}
|
|
698
1043
|
*/
|
|
699
|
-
|
|
1044
|
+
getCustomer: (project_1, platformId_1, customerId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, customerId_1, ...args_1], void 0, function* (project, platformId, customerId, options = {}) {
|
|
700
1045
|
// verify required parameter 'project' is not null or undefined
|
|
701
|
-
(0, common_1.assertParamExists)('
|
|
1046
|
+
(0, common_1.assertParamExists)('getCustomer', 'project', project);
|
|
702
1047
|
// verify required parameter 'platformId' is not null or undefined
|
|
703
|
-
(0, common_1.assertParamExists)('
|
|
704
|
-
// verify required parameter '
|
|
705
|
-
(0, common_1.assertParamExists)('
|
|
706
|
-
const localVarPath = `/v1/platform/{platformId}/
|
|
1048
|
+
(0, common_1.assertParamExists)('getCustomer', 'platformId', platformId);
|
|
1049
|
+
// verify required parameter 'customerId' is not null or undefined
|
|
1050
|
+
(0, common_1.assertParamExists)('getCustomer', 'customerId', customerId);
|
|
1051
|
+
const localVarPath = `/v1/platform/{platformId}/customers/{customerId}`
|
|
707
1052
|
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
708
|
-
.replace(`{${"
|
|
1053
|
+
.replace(`{${"customerId"}}`, encodeURIComponent(String(customerId)));
|
|
709
1054
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
710
1055
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
711
1056
|
let baseOptions;
|
|
@@ -732,24 +1077,68 @@ const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
732
1077
|
};
|
|
733
1078
|
}),
|
|
734
1079
|
/**
|
|
735
|
-
* Get
|
|
736
|
-
* @summary Get
|
|
1080
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1081
|
+
* @summary Get fulfillment
|
|
737
1082
|
* @param {string} project Project unique identifier
|
|
738
1083
|
* @param {string} platformId The platform identifier
|
|
739
|
-
* @param {string}
|
|
1084
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
740
1085
|
* @param {*} [options] Override http request option.
|
|
741
1086
|
* @throws {RequiredError}
|
|
742
1087
|
*/
|
|
743
|
-
|
|
1088
|
+
getFulfillment: (project_1, platformId_1, fulfillmentId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, fulfillmentId_1, ...args_1], void 0, function* (project, platformId, fulfillmentId, options = {}) {
|
|
744
1089
|
// verify required parameter 'project' is not null or undefined
|
|
745
|
-
(0, common_1.assertParamExists)('
|
|
1090
|
+
(0, common_1.assertParamExists)('getFulfillment', 'project', project);
|
|
746
1091
|
// verify required parameter 'platformId' is not null or undefined
|
|
747
|
-
(0, common_1.assertParamExists)('
|
|
748
|
-
// verify required parameter '
|
|
749
|
-
(0, common_1.assertParamExists)('
|
|
750
|
-
const localVarPath = `/v1/platform/{platformId}/
|
|
751
|
-
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
752
|
-
.replace(`{${"
|
|
1092
|
+
(0, common_1.assertParamExists)('getFulfillment', 'platformId', platformId);
|
|
1093
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
1094
|
+
(0, common_1.assertParamExists)('getFulfillment', 'fulfillmentId', fulfillmentId);
|
|
1095
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
|
|
1096
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
1097
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
1098
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1099
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1100
|
+
let baseOptions;
|
|
1101
|
+
if (configuration) {
|
|
1102
|
+
baseOptions = configuration.baseOptions;
|
|
1103
|
+
}
|
|
1104
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1105
|
+
const localVarHeaderParameter = {};
|
|
1106
|
+
const localVarQueryParameter = {};
|
|
1107
|
+
// authentication session-oauth required
|
|
1108
|
+
// oauth required
|
|
1109
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1110
|
+
// authentication api-key required
|
|
1111
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1112
|
+
if (project !== undefined) {
|
|
1113
|
+
localVarQueryParameter['project'] = project;
|
|
1114
|
+
}
|
|
1115
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1116
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1117
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1118
|
+
return {
|
|
1119
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1120
|
+
options: localVarRequestOptions,
|
|
1121
|
+
};
|
|
1122
|
+
}),
|
|
1123
|
+
/**
|
|
1124
|
+
* Get an order for a platform by a given order ID.
|
|
1125
|
+
* @summary Get order
|
|
1126
|
+
* @param {string} project Project unique identifier
|
|
1127
|
+
* @param {string} platformId The platform identifier
|
|
1128
|
+
* @param {string} orderId The order identifier
|
|
1129
|
+
* @param {*} [options] Override http request option.
|
|
1130
|
+
* @throws {RequiredError}
|
|
1131
|
+
*/
|
|
1132
|
+
getOrder: (project_1, platformId_1, orderId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, orderId_1, ...args_1], void 0, function* (project, platformId, orderId, options = {}) {
|
|
1133
|
+
// verify required parameter 'project' is not null or undefined
|
|
1134
|
+
(0, common_1.assertParamExists)('getOrder', 'project', project);
|
|
1135
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1136
|
+
(0, common_1.assertParamExists)('getOrder', 'platformId', platformId);
|
|
1137
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
1138
|
+
(0, common_1.assertParamExists)('getOrder', 'orderId', orderId);
|
|
1139
|
+
const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
|
|
1140
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
1141
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
753
1142
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
754
1143
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
755
1144
|
let baseOptions;
|
|
@@ -855,6 +1244,46 @@ const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
855
1244
|
options: localVarRequestOptions,
|
|
856
1245
|
};
|
|
857
1246
|
}),
|
|
1247
|
+
/**
|
|
1248
|
+
* List customers for a platform
|
|
1249
|
+
* @summary List customers
|
|
1250
|
+
* @param {string} project Project unique identifier
|
|
1251
|
+
* @param {string} platformId The platform identifier
|
|
1252
|
+
* @param {*} [options] Override http request option.
|
|
1253
|
+
* @throws {RequiredError}
|
|
1254
|
+
*/
|
|
1255
|
+
listCustomers: (project_1, platformId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, ...args_1], void 0, function* (project, platformId, options = {}) {
|
|
1256
|
+
// verify required parameter 'project' is not null or undefined
|
|
1257
|
+
(0, common_1.assertParamExists)('listCustomers', 'project', project);
|
|
1258
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1259
|
+
(0, common_1.assertParamExists)('listCustomers', 'platformId', platformId);
|
|
1260
|
+
const localVarPath = `/v1/platform/{platformId}/customers`
|
|
1261
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
1262
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1263
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1264
|
+
let baseOptions;
|
|
1265
|
+
if (configuration) {
|
|
1266
|
+
baseOptions = configuration.baseOptions;
|
|
1267
|
+
}
|
|
1268
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1269
|
+
const localVarHeaderParameter = {};
|
|
1270
|
+
const localVarQueryParameter = {};
|
|
1271
|
+
// authentication session-oauth required
|
|
1272
|
+
// oauth required
|
|
1273
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1274
|
+
// authentication api-key required
|
|
1275
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1276
|
+
if (project !== undefined) {
|
|
1277
|
+
localVarQueryParameter['project'] = project;
|
|
1278
|
+
}
|
|
1279
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1280
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1281
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1282
|
+
return {
|
|
1283
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1284
|
+
options: localVarRequestOptions,
|
|
1285
|
+
};
|
|
1286
|
+
}),
|
|
858
1287
|
/**
|
|
859
1288
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
860
1289
|
* @summary List orders
|
|
@@ -1009,6 +1438,104 @@ const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
1009
1438
|
options: localVarRequestOptions,
|
|
1010
1439
|
};
|
|
1011
1440
|
}),
|
|
1441
|
+
/**
|
|
1442
|
+
* Updates the warehouse product and its variants
|
|
1443
|
+
* @summary Update warehouse product
|
|
1444
|
+
* @param {string} project Project unique identifier
|
|
1445
|
+
* @param {string} platformId The platform identifier
|
|
1446
|
+
* @param {string} productId Products unique identifier
|
|
1447
|
+
* @param {UpdateProductRequest} updateProductRequest Update a platform warehouse product
|
|
1448
|
+
* @param {*} [options] Override http request option.
|
|
1449
|
+
* @throws {RequiredError}
|
|
1450
|
+
*/
|
|
1451
|
+
updateProduct: (project_1, platformId_1, productId_1, updateProductRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, productId_1, updateProductRequest_1, ...args_1], void 0, function* (project, platformId, productId, updateProductRequest, options = {}) {
|
|
1452
|
+
// verify required parameter 'project' is not null or undefined
|
|
1453
|
+
(0, common_1.assertParamExists)('updateProduct', 'project', project);
|
|
1454
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1455
|
+
(0, common_1.assertParamExists)('updateProduct', 'platformId', platformId);
|
|
1456
|
+
// verify required parameter 'productId' is not null or undefined
|
|
1457
|
+
(0, common_1.assertParamExists)('updateProduct', 'productId', productId);
|
|
1458
|
+
// verify required parameter 'updateProductRequest' is not null or undefined
|
|
1459
|
+
(0, common_1.assertParamExists)('updateProduct', 'updateProductRequest', updateProductRequest);
|
|
1460
|
+
const localVarPath = `/v1/platform/{platformId}/warehouse/products/{productId}`
|
|
1461
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
1462
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
1463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1464
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1465
|
+
let baseOptions;
|
|
1466
|
+
if (configuration) {
|
|
1467
|
+
baseOptions = configuration.baseOptions;
|
|
1468
|
+
}
|
|
1469
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
1470
|
+
const localVarHeaderParameter = {};
|
|
1471
|
+
const localVarQueryParameter = {};
|
|
1472
|
+
// authentication session-oauth required
|
|
1473
|
+
// oauth required
|
|
1474
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1475
|
+
// authentication api-key required
|
|
1476
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1477
|
+
if (project !== undefined) {
|
|
1478
|
+
localVarQueryParameter['project'] = project;
|
|
1479
|
+
}
|
|
1480
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1481
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1482
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1483
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1484
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductRequest, localVarRequestOptions, configuration);
|
|
1485
|
+
return {
|
|
1486
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1487
|
+
options: localVarRequestOptions,
|
|
1488
|
+
};
|
|
1489
|
+
}),
|
|
1490
|
+
/**
|
|
1491
|
+
* Updates the warehouse variant
|
|
1492
|
+
* @summary Update warehouse variant
|
|
1493
|
+
* @param {string} project Project unique identifier
|
|
1494
|
+
* @param {string} platformId The platform identifier
|
|
1495
|
+
* @param {string} variantId Variants unique identifier
|
|
1496
|
+
* @param {UpdateVariantRequest} updateVariantRequest Update a platform warehouse variant
|
|
1497
|
+
* @param {*} [options] Override http request option.
|
|
1498
|
+
* @throws {RequiredError}
|
|
1499
|
+
*/
|
|
1500
|
+
updateVariant: (project_1, platformId_1, variantId_1, updateVariantRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, variantId_1, updateVariantRequest_1, ...args_1], void 0, function* (project, platformId, variantId, updateVariantRequest, options = {}) {
|
|
1501
|
+
// verify required parameter 'project' is not null or undefined
|
|
1502
|
+
(0, common_1.assertParamExists)('updateVariant', 'project', project);
|
|
1503
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1504
|
+
(0, common_1.assertParamExists)('updateVariant', 'platformId', platformId);
|
|
1505
|
+
// verify required parameter 'variantId' is not null or undefined
|
|
1506
|
+
(0, common_1.assertParamExists)('updateVariant', 'variantId', variantId);
|
|
1507
|
+
// verify required parameter 'updateVariantRequest' is not null or undefined
|
|
1508
|
+
(0, common_1.assertParamExists)('updateVariant', 'updateVariantRequest', updateVariantRequest);
|
|
1509
|
+
const localVarPath = `/v1/platform/{platformId}/warehouse/variants/{variantId}`
|
|
1510
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
1511
|
+
.replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
|
|
1512
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1513
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1514
|
+
let baseOptions;
|
|
1515
|
+
if (configuration) {
|
|
1516
|
+
baseOptions = configuration.baseOptions;
|
|
1517
|
+
}
|
|
1518
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
1519
|
+
const localVarHeaderParameter = {};
|
|
1520
|
+
const localVarQueryParameter = {};
|
|
1521
|
+
// authentication session-oauth required
|
|
1522
|
+
// oauth required
|
|
1523
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1524
|
+
// authentication api-key required
|
|
1525
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1526
|
+
if (project !== undefined) {
|
|
1527
|
+
localVarQueryParameter['project'] = project;
|
|
1528
|
+
}
|
|
1529
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1530
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1531
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1532
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1533
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateVariantRequest, localVarRequestOptions, configuration);
|
|
1534
|
+
return {
|
|
1535
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1536
|
+
options: localVarRequestOptions,
|
|
1537
|
+
};
|
|
1538
|
+
}),
|
|
1012
1539
|
};
|
|
1013
1540
|
};
|
|
1014
1541
|
exports.PlatformApiAxiosParamCreator = PlatformApiAxiosParamCreator;
|
|
@@ -1019,6 +1546,23 @@ exports.PlatformApiAxiosParamCreator = PlatformApiAxiosParamCreator;
|
|
|
1019
1546
|
const PlatformApiFp = function (configuration) {
|
|
1020
1547
|
const localVarAxiosParamCreator = (0, exports.PlatformApiAxiosParamCreator)(configuration);
|
|
1021
1548
|
return {
|
|
1549
|
+
/**
|
|
1550
|
+
* Export customers as a CSV file
|
|
1551
|
+
* @summary Export customers
|
|
1552
|
+
* @param {string} project Project unique identifier
|
|
1553
|
+
* @param {string} platformId The platform identifier
|
|
1554
|
+
* @param {*} [options] Override http request option.
|
|
1555
|
+
* @throws {RequiredError}
|
|
1556
|
+
*/
|
|
1557
|
+
exportCustomers(project, platformId, options) {
|
|
1558
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1559
|
+
var _a, _b, _c;
|
|
1560
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, options);
|
|
1561
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1562
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.exportCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1563
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1564
|
+
});
|
|
1565
|
+
},
|
|
1022
1566
|
/**
|
|
1023
1567
|
* Export orders as a CSV file
|
|
1024
1568
|
* @summary Export orders
|
|
@@ -1039,6 +1583,24 @@ const PlatformApiFp = function (configuration) {
|
|
|
1039
1583
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1040
1584
|
});
|
|
1041
1585
|
},
|
|
1586
|
+
/**
|
|
1587
|
+
* Get a customer for a platform by a given customer ID.
|
|
1588
|
+
* @summary Get customer
|
|
1589
|
+
* @param {string} project Project unique identifier
|
|
1590
|
+
* @param {string} platformId The platform identifier
|
|
1591
|
+
* @param {string} customerId The customer identifier
|
|
1592
|
+
* @param {*} [options] Override http request option.
|
|
1593
|
+
* @throws {RequiredError}
|
|
1594
|
+
*/
|
|
1595
|
+
getCustomer(project, platformId, customerId, options) {
|
|
1596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1597
|
+
var _a, _b, _c;
|
|
1598
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomer(project, platformId, customerId, options);
|
|
1599
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1600
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.getCustomer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1601
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1602
|
+
});
|
|
1603
|
+
},
|
|
1042
1604
|
/**
|
|
1043
1605
|
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1044
1606
|
* @summary Get fulfillment
|
|
@@ -1109,6 +1671,23 @@ const PlatformApiFp = function (configuration) {
|
|
|
1109
1671
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1110
1672
|
});
|
|
1111
1673
|
},
|
|
1674
|
+
/**
|
|
1675
|
+
* List customers for a platform
|
|
1676
|
+
* @summary List customers
|
|
1677
|
+
* @param {string} project Project unique identifier
|
|
1678
|
+
* @param {string} platformId The platform identifier
|
|
1679
|
+
* @param {*} [options] Override http request option.
|
|
1680
|
+
* @throws {RequiredError}
|
|
1681
|
+
*/
|
|
1682
|
+
listCustomers(project, platformId, options) {
|
|
1683
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1684
|
+
var _a, _b, _c;
|
|
1685
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, options);
|
|
1686
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1687
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.listCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1688
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1689
|
+
});
|
|
1690
|
+
},
|
|
1112
1691
|
/**
|
|
1113
1692
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1114
1693
|
* @summary List orders
|
|
@@ -1167,6 +1746,44 @@ const PlatformApiFp = function (configuration) {
|
|
|
1167
1746
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1168
1747
|
});
|
|
1169
1748
|
},
|
|
1749
|
+
/**
|
|
1750
|
+
* Updates the warehouse product and its variants
|
|
1751
|
+
* @summary Update warehouse product
|
|
1752
|
+
* @param {string} project Project unique identifier
|
|
1753
|
+
* @param {string} platformId The platform identifier
|
|
1754
|
+
* @param {string} productId Products unique identifier
|
|
1755
|
+
* @param {UpdateProductRequest} updateProductRequest Update a platform warehouse product
|
|
1756
|
+
* @param {*} [options] Override http request option.
|
|
1757
|
+
* @throws {RequiredError}
|
|
1758
|
+
*/
|
|
1759
|
+
updateProduct(project, platformId, productId, updateProductRequest, options) {
|
|
1760
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1761
|
+
var _a, _b, _c;
|
|
1762
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateProduct(project, platformId, productId, updateProductRequest, options);
|
|
1763
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1764
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.updateProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1765
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1766
|
+
});
|
|
1767
|
+
},
|
|
1768
|
+
/**
|
|
1769
|
+
* Updates the warehouse variant
|
|
1770
|
+
* @summary Update warehouse variant
|
|
1771
|
+
* @param {string} project Project unique identifier
|
|
1772
|
+
* @param {string} platformId The platform identifier
|
|
1773
|
+
* @param {string} variantId Variants unique identifier
|
|
1774
|
+
* @param {UpdateVariantRequest} updateVariantRequest Update a platform warehouse variant
|
|
1775
|
+
* @param {*} [options] Override http request option.
|
|
1776
|
+
* @throws {RequiredError}
|
|
1777
|
+
*/
|
|
1778
|
+
updateVariant(project, platformId, variantId, updateVariantRequest, options) {
|
|
1779
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1780
|
+
var _a, _b, _c;
|
|
1781
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateVariant(project, platformId, variantId, updateVariantRequest, options);
|
|
1782
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1783
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.updateVariant']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1784
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1785
|
+
});
|
|
1786
|
+
},
|
|
1170
1787
|
};
|
|
1171
1788
|
};
|
|
1172
1789
|
exports.PlatformApiFp = PlatformApiFp;
|
|
@@ -1177,6 +1794,16 @@ exports.PlatformApiFp = PlatformApiFp;
|
|
|
1177
1794
|
const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
1178
1795
|
const localVarFp = (0, exports.PlatformApiFp)(configuration);
|
|
1179
1796
|
return {
|
|
1797
|
+
/**
|
|
1798
|
+
* Export customers as a CSV file
|
|
1799
|
+
* @summary Export customers
|
|
1800
|
+
* @param {PlatformApiExportCustomersRequest} requestParameters Request parameters.
|
|
1801
|
+
* @param {*} [options] Override http request option.
|
|
1802
|
+
* @throws {RequiredError}
|
|
1803
|
+
*/
|
|
1804
|
+
exportCustomers(requestParameters, options) {
|
|
1805
|
+
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
|
|
1806
|
+
},
|
|
1180
1807
|
/**
|
|
1181
1808
|
* Export orders as a CSV file
|
|
1182
1809
|
* @summary Export orders
|
|
@@ -1187,6 +1814,16 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
1187
1814
|
exportOrders(requestParameters, options) {
|
|
1188
1815
|
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
|
|
1189
1816
|
},
|
|
1817
|
+
/**
|
|
1818
|
+
* Get a customer for a platform by a given customer ID.
|
|
1819
|
+
* @summary Get customer
|
|
1820
|
+
* @param {PlatformApiGetCustomerRequest} requestParameters Request parameters.
|
|
1821
|
+
* @param {*} [options] Override http request option.
|
|
1822
|
+
* @throws {RequiredError}
|
|
1823
|
+
*/
|
|
1824
|
+
getCustomer(requestParameters, options) {
|
|
1825
|
+
return localVarFp.getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(axios, basePath));
|
|
1826
|
+
},
|
|
1190
1827
|
/**
|
|
1191
1828
|
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1192
1829
|
* @summary Get fulfillment
|
|
@@ -1227,6 +1864,16 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
1227
1864
|
listAvailableFulfillers(requestParameters, options) {
|
|
1228
1865
|
return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
|
|
1229
1866
|
},
|
|
1867
|
+
/**
|
|
1868
|
+
* List customers for a platform
|
|
1869
|
+
* @summary List customers
|
|
1870
|
+
* @param {PlatformApiListCustomersRequest} requestParameters Request parameters.
|
|
1871
|
+
* @param {*} [options] Override http request option.
|
|
1872
|
+
* @throws {RequiredError}
|
|
1873
|
+
*/
|
|
1874
|
+
listCustomers(requestParameters, options) {
|
|
1875
|
+
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
|
|
1876
|
+
},
|
|
1230
1877
|
/**
|
|
1231
1878
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1232
1879
|
* @summary List orders
|
|
@@ -1257,6 +1904,26 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
1257
1904
|
updatePlatform(requestParameters, options) {
|
|
1258
1905
|
return localVarFp.updatePlatform(requestParameters.project, requestParameters.updatePlatformRequest, options).then((request) => request(axios, basePath));
|
|
1259
1906
|
},
|
|
1907
|
+
/**
|
|
1908
|
+
* Updates the warehouse product and its variants
|
|
1909
|
+
* @summary Update warehouse product
|
|
1910
|
+
* @param {PlatformApiUpdateProductRequest} requestParameters Request parameters.
|
|
1911
|
+
* @param {*} [options] Override http request option.
|
|
1912
|
+
* @throws {RequiredError}
|
|
1913
|
+
*/
|
|
1914
|
+
updateProduct(requestParameters, options) {
|
|
1915
|
+
return localVarFp.updateProduct(requestParameters.project, requestParameters.platformId, requestParameters.productId, requestParameters.updateProductRequest, options).then((request) => request(axios, basePath));
|
|
1916
|
+
},
|
|
1917
|
+
/**
|
|
1918
|
+
* Updates the warehouse variant
|
|
1919
|
+
* @summary Update warehouse variant
|
|
1920
|
+
* @param {PlatformApiUpdateVariantRequest} requestParameters Request parameters.
|
|
1921
|
+
* @param {*} [options] Override http request option.
|
|
1922
|
+
* @throws {RequiredError}
|
|
1923
|
+
*/
|
|
1924
|
+
updateVariant(requestParameters, options) {
|
|
1925
|
+
return localVarFp.updateVariant(requestParameters.project, requestParameters.platformId, requestParameters.variantId, requestParameters.updateVariantRequest, options).then((request) => request(axios, basePath));
|
|
1926
|
+
},
|
|
1260
1927
|
};
|
|
1261
1928
|
};
|
|
1262
1929
|
exports.PlatformApiFactory = PlatformApiFactory;
|
|
@@ -1267,6 +1934,17 @@ exports.PlatformApiFactory = PlatformApiFactory;
|
|
|
1267
1934
|
* @extends {BaseAPI}
|
|
1268
1935
|
*/
|
|
1269
1936
|
class PlatformApi extends base_1.BaseAPI {
|
|
1937
|
+
/**
|
|
1938
|
+
* Export customers as a CSV file
|
|
1939
|
+
* @summary Export customers
|
|
1940
|
+
* @param {PlatformApiExportCustomersRequest} requestParameters Request parameters.
|
|
1941
|
+
* @param {*} [options] Override http request option.
|
|
1942
|
+
* @throws {RequiredError}
|
|
1943
|
+
* @memberof PlatformApi
|
|
1944
|
+
*/
|
|
1945
|
+
exportCustomers(requestParameters, options) {
|
|
1946
|
+
return (0, exports.PlatformApiFp)(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
|
|
1947
|
+
}
|
|
1270
1948
|
/**
|
|
1271
1949
|
* Export orders as a CSV file
|
|
1272
1950
|
* @summary Export orders
|
|
@@ -1278,6 +1956,17 @@ class PlatformApi extends base_1.BaseAPI {
|
|
|
1278
1956
|
exportOrders(requestParameters, options) {
|
|
1279
1957
|
return (0, exports.PlatformApiFp)(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
|
|
1280
1958
|
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Get a customer for a platform by a given customer ID.
|
|
1961
|
+
* @summary Get customer
|
|
1962
|
+
* @param {PlatformApiGetCustomerRequest} requestParameters Request parameters.
|
|
1963
|
+
* @param {*} [options] Override http request option.
|
|
1964
|
+
* @throws {RequiredError}
|
|
1965
|
+
* @memberof PlatformApi
|
|
1966
|
+
*/
|
|
1967
|
+
getCustomer(requestParameters, options) {
|
|
1968
|
+
return (0, exports.PlatformApiFp)(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
|
|
1969
|
+
}
|
|
1281
1970
|
/**
|
|
1282
1971
|
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1283
1972
|
* @summary Get fulfillment
|
|
@@ -1322,6 +2011,17 @@ class PlatformApi extends base_1.BaseAPI {
|
|
|
1322
2011
|
listAvailableFulfillers(requestParameters, options) {
|
|
1323
2012
|
return (0, exports.PlatformApiFp)(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1324
2013
|
}
|
|
2014
|
+
/**
|
|
2015
|
+
* List customers for a platform
|
|
2016
|
+
* @summary List customers
|
|
2017
|
+
* @param {PlatformApiListCustomersRequest} requestParameters Request parameters.
|
|
2018
|
+
* @param {*} [options] Override http request option.
|
|
2019
|
+
* @throws {RequiredError}
|
|
2020
|
+
* @memberof PlatformApi
|
|
2021
|
+
*/
|
|
2022
|
+
listCustomers(requestParameters, options) {
|
|
2023
|
+
return (0, exports.PlatformApiFp)(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
|
|
2024
|
+
}
|
|
1325
2025
|
/**
|
|
1326
2026
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1327
2027
|
* @summary List orders
|
|
@@ -1355,5 +2055,281 @@ class PlatformApi extends base_1.BaseAPI {
|
|
|
1355
2055
|
updatePlatform(requestParameters, options) {
|
|
1356
2056
|
return (0, exports.PlatformApiFp)(this.configuration).updatePlatform(requestParameters.project, requestParameters.updatePlatformRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1357
2057
|
}
|
|
2058
|
+
/**
|
|
2059
|
+
* Updates the warehouse product and its variants
|
|
2060
|
+
* @summary Update warehouse product
|
|
2061
|
+
* @param {PlatformApiUpdateProductRequest} requestParameters Request parameters.
|
|
2062
|
+
* @param {*} [options] Override http request option.
|
|
2063
|
+
* @throws {RequiredError}
|
|
2064
|
+
* @memberof PlatformApi
|
|
2065
|
+
*/
|
|
2066
|
+
updateProduct(requestParameters, options) {
|
|
2067
|
+
return (0, exports.PlatformApiFp)(this.configuration).updateProduct(requestParameters.project, requestParameters.platformId, requestParameters.productId, requestParameters.updateProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2068
|
+
}
|
|
2069
|
+
/**
|
|
2070
|
+
* Updates the warehouse variant
|
|
2071
|
+
* @summary Update warehouse variant
|
|
2072
|
+
* @param {PlatformApiUpdateVariantRequest} requestParameters Request parameters.
|
|
2073
|
+
* @param {*} [options] Override http request option.
|
|
2074
|
+
* @throws {RequiredError}
|
|
2075
|
+
* @memberof PlatformApi
|
|
2076
|
+
*/
|
|
2077
|
+
updateVariant(requestParameters, options) {
|
|
2078
|
+
return (0, exports.PlatformApiFp)(this.configuration).updateVariant(requestParameters.project, requestParameters.platformId, requestParameters.variantId, requestParameters.updateVariantRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2079
|
+
}
|
|
1358
2080
|
}
|
|
1359
2081
|
exports.PlatformApi = PlatformApi;
|
|
2082
|
+
/**
|
|
2083
|
+
* ProductsApi - axios parameter creator
|
|
2084
|
+
* @export
|
|
2085
|
+
*/
|
|
2086
|
+
const ProductsApiAxiosParamCreator = function (configuration) {
|
|
2087
|
+
return {
|
|
2088
|
+
/**
|
|
2089
|
+
* Updates the warehouse product and its variants
|
|
2090
|
+
* @summary Update warehouse product
|
|
2091
|
+
* @param {string} project Project unique identifier
|
|
2092
|
+
* @param {string} platformId The platform identifier
|
|
2093
|
+
* @param {string} productId Products unique identifier
|
|
2094
|
+
* @param {UpdateProductRequest} updateProductRequest Update a platform warehouse product
|
|
2095
|
+
* @param {*} [options] Override http request option.
|
|
2096
|
+
* @throws {RequiredError}
|
|
2097
|
+
*/
|
|
2098
|
+
updateProduct: (project_1, platformId_1, productId_1, updateProductRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, productId_1, updateProductRequest_1, ...args_1], void 0, function* (project, platformId, productId, updateProductRequest, options = {}) {
|
|
2099
|
+
// verify required parameter 'project' is not null or undefined
|
|
2100
|
+
(0, common_1.assertParamExists)('updateProduct', 'project', project);
|
|
2101
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
2102
|
+
(0, common_1.assertParamExists)('updateProduct', 'platformId', platformId);
|
|
2103
|
+
// verify required parameter 'productId' is not null or undefined
|
|
2104
|
+
(0, common_1.assertParamExists)('updateProduct', 'productId', productId);
|
|
2105
|
+
// verify required parameter 'updateProductRequest' is not null or undefined
|
|
2106
|
+
(0, common_1.assertParamExists)('updateProduct', 'updateProductRequest', updateProductRequest);
|
|
2107
|
+
const localVarPath = `/v1/platform/{platformId}/warehouse/products/{productId}`
|
|
2108
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
2109
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
2110
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2111
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2112
|
+
let baseOptions;
|
|
2113
|
+
if (configuration) {
|
|
2114
|
+
baseOptions = configuration.baseOptions;
|
|
2115
|
+
}
|
|
2116
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
2117
|
+
const localVarHeaderParameter = {};
|
|
2118
|
+
const localVarQueryParameter = {};
|
|
2119
|
+
// authentication session-oauth required
|
|
2120
|
+
// oauth required
|
|
2121
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
2122
|
+
// authentication api-key required
|
|
2123
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
2124
|
+
if (project !== undefined) {
|
|
2125
|
+
localVarQueryParameter['project'] = project;
|
|
2126
|
+
}
|
|
2127
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2128
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2129
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2130
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2131
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductRequest, localVarRequestOptions, configuration);
|
|
2132
|
+
return {
|
|
2133
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2134
|
+
options: localVarRequestOptions,
|
|
2135
|
+
};
|
|
2136
|
+
}),
|
|
2137
|
+
};
|
|
2138
|
+
};
|
|
2139
|
+
exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
|
|
2140
|
+
/**
|
|
2141
|
+
* ProductsApi - functional programming interface
|
|
2142
|
+
* @export
|
|
2143
|
+
*/
|
|
2144
|
+
const ProductsApiFp = function (configuration) {
|
|
2145
|
+
const localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
|
|
2146
|
+
return {
|
|
2147
|
+
/**
|
|
2148
|
+
* Updates the warehouse product and its variants
|
|
2149
|
+
* @summary Update warehouse product
|
|
2150
|
+
* @param {string} project Project unique identifier
|
|
2151
|
+
* @param {string} platformId The platform identifier
|
|
2152
|
+
* @param {string} productId Products unique identifier
|
|
2153
|
+
* @param {UpdateProductRequest} updateProductRequest Update a platform warehouse product
|
|
2154
|
+
* @param {*} [options] Override http request option.
|
|
2155
|
+
* @throws {RequiredError}
|
|
2156
|
+
*/
|
|
2157
|
+
updateProduct(project, platformId, productId, updateProductRequest, options) {
|
|
2158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2159
|
+
var _a, _b, _c;
|
|
2160
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateProduct(project, platformId, productId, updateProductRequest, options);
|
|
2161
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2162
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.updateProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2163
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2164
|
+
});
|
|
2165
|
+
},
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
exports.ProductsApiFp = ProductsApiFp;
|
|
2169
|
+
/**
|
|
2170
|
+
* ProductsApi - factory interface
|
|
2171
|
+
* @export
|
|
2172
|
+
*/
|
|
2173
|
+
const ProductsApiFactory = function (configuration, basePath, axios) {
|
|
2174
|
+
const localVarFp = (0, exports.ProductsApiFp)(configuration);
|
|
2175
|
+
return {
|
|
2176
|
+
/**
|
|
2177
|
+
* Updates the warehouse product and its variants
|
|
2178
|
+
* @summary Update warehouse product
|
|
2179
|
+
* @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
|
|
2180
|
+
* @param {*} [options] Override http request option.
|
|
2181
|
+
* @throws {RequiredError}
|
|
2182
|
+
*/
|
|
2183
|
+
updateProduct(requestParameters, options) {
|
|
2184
|
+
return localVarFp.updateProduct(requestParameters.project, requestParameters.platformId, requestParameters.productId, requestParameters.updateProductRequest, options).then((request) => request(axios, basePath));
|
|
2185
|
+
},
|
|
2186
|
+
};
|
|
2187
|
+
};
|
|
2188
|
+
exports.ProductsApiFactory = ProductsApiFactory;
|
|
2189
|
+
/**
|
|
2190
|
+
* ProductsApi - object-oriented interface
|
|
2191
|
+
* @export
|
|
2192
|
+
* @class ProductsApi
|
|
2193
|
+
* @extends {BaseAPI}
|
|
2194
|
+
*/
|
|
2195
|
+
class ProductsApi extends base_1.BaseAPI {
|
|
2196
|
+
/**
|
|
2197
|
+
* Updates the warehouse product and its variants
|
|
2198
|
+
* @summary Update warehouse product
|
|
2199
|
+
* @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
|
|
2200
|
+
* @param {*} [options] Override http request option.
|
|
2201
|
+
* @throws {RequiredError}
|
|
2202
|
+
* @memberof ProductsApi
|
|
2203
|
+
*/
|
|
2204
|
+
updateProduct(requestParameters, options) {
|
|
2205
|
+
return (0, exports.ProductsApiFp)(this.configuration).updateProduct(requestParameters.project, requestParameters.platformId, requestParameters.productId, requestParameters.updateProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
exports.ProductsApi = ProductsApi;
|
|
2209
|
+
/**
|
|
2210
|
+
* VariantsApi - axios parameter creator
|
|
2211
|
+
* @export
|
|
2212
|
+
*/
|
|
2213
|
+
const VariantsApiAxiosParamCreator = function (configuration) {
|
|
2214
|
+
return {
|
|
2215
|
+
/**
|
|
2216
|
+
* Updates the warehouse variant
|
|
2217
|
+
* @summary Update warehouse variant
|
|
2218
|
+
* @param {string} project Project unique identifier
|
|
2219
|
+
* @param {string} platformId The platform identifier
|
|
2220
|
+
* @param {string} variantId Variants unique identifier
|
|
2221
|
+
* @param {UpdateVariantRequest} updateVariantRequest Update a platform warehouse variant
|
|
2222
|
+
* @param {*} [options] Override http request option.
|
|
2223
|
+
* @throws {RequiredError}
|
|
2224
|
+
*/
|
|
2225
|
+
updateVariant: (project_1, platformId_1, variantId_1, updateVariantRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, variantId_1, updateVariantRequest_1, ...args_1], void 0, function* (project, platformId, variantId, updateVariantRequest, options = {}) {
|
|
2226
|
+
// verify required parameter 'project' is not null or undefined
|
|
2227
|
+
(0, common_1.assertParamExists)('updateVariant', 'project', project);
|
|
2228
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
2229
|
+
(0, common_1.assertParamExists)('updateVariant', 'platformId', platformId);
|
|
2230
|
+
// verify required parameter 'variantId' is not null or undefined
|
|
2231
|
+
(0, common_1.assertParamExists)('updateVariant', 'variantId', variantId);
|
|
2232
|
+
// verify required parameter 'updateVariantRequest' is not null or undefined
|
|
2233
|
+
(0, common_1.assertParamExists)('updateVariant', 'updateVariantRequest', updateVariantRequest);
|
|
2234
|
+
const localVarPath = `/v1/platform/{platformId}/warehouse/variants/{variantId}`
|
|
2235
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
2236
|
+
.replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
|
|
2237
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2238
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2239
|
+
let baseOptions;
|
|
2240
|
+
if (configuration) {
|
|
2241
|
+
baseOptions = configuration.baseOptions;
|
|
2242
|
+
}
|
|
2243
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
2244
|
+
const localVarHeaderParameter = {};
|
|
2245
|
+
const localVarQueryParameter = {};
|
|
2246
|
+
// authentication session-oauth required
|
|
2247
|
+
// oauth required
|
|
2248
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
2249
|
+
// authentication api-key required
|
|
2250
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
2251
|
+
if (project !== undefined) {
|
|
2252
|
+
localVarQueryParameter['project'] = project;
|
|
2253
|
+
}
|
|
2254
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2255
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2256
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2257
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2258
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateVariantRequest, localVarRequestOptions, configuration);
|
|
2259
|
+
return {
|
|
2260
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2261
|
+
options: localVarRequestOptions,
|
|
2262
|
+
};
|
|
2263
|
+
}),
|
|
2264
|
+
};
|
|
2265
|
+
};
|
|
2266
|
+
exports.VariantsApiAxiosParamCreator = VariantsApiAxiosParamCreator;
|
|
2267
|
+
/**
|
|
2268
|
+
* VariantsApi - functional programming interface
|
|
2269
|
+
* @export
|
|
2270
|
+
*/
|
|
2271
|
+
const VariantsApiFp = function (configuration) {
|
|
2272
|
+
const localVarAxiosParamCreator = (0, exports.VariantsApiAxiosParamCreator)(configuration);
|
|
2273
|
+
return {
|
|
2274
|
+
/**
|
|
2275
|
+
* Updates the warehouse variant
|
|
2276
|
+
* @summary Update warehouse variant
|
|
2277
|
+
* @param {string} project Project unique identifier
|
|
2278
|
+
* @param {string} platformId The platform identifier
|
|
2279
|
+
* @param {string} variantId Variants unique identifier
|
|
2280
|
+
* @param {UpdateVariantRequest} updateVariantRequest Update a platform warehouse variant
|
|
2281
|
+
* @param {*} [options] Override http request option.
|
|
2282
|
+
* @throws {RequiredError}
|
|
2283
|
+
*/
|
|
2284
|
+
updateVariant(project, platformId, variantId, updateVariantRequest, options) {
|
|
2285
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2286
|
+
var _a, _b, _c;
|
|
2287
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateVariant(project, platformId, variantId, updateVariantRequest, options);
|
|
2288
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2289
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['VariantsApi.updateVariant']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2290
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2291
|
+
});
|
|
2292
|
+
},
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
exports.VariantsApiFp = VariantsApiFp;
|
|
2296
|
+
/**
|
|
2297
|
+
* VariantsApi - factory interface
|
|
2298
|
+
* @export
|
|
2299
|
+
*/
|
|
2300
|
+
const VariantsApiFactory = function (configuration, basePath, axios) {
|
|
2301
|
+
const localVarFp = (0, exports.VariantsApiFp)(configuration);
|
|
2302
|
+
return {
|
|
2303
|
+
/**
|
|
2304
|
+
* Updates the warehouse variant
|
|
2305
|
+
* @summary Update warehouse variant
|
|
2306
|
+
* @param {VariantsApiUpdateVariantRequest} requestParameters Request parameters.
|
|
2307
|
+
* @param {*} [options] Override http request option.
|
|
2308
|
+
* @throws {RequiredError}
|
|
2309
|
+
*/
|
|
2310
|
+
updateVariant(requestParameters, options) {
|
|
2311
|
+
return localVarFp.updateVariant(requestParameters.project, requestParameters.platformId, requestParameters.variantId, requestParameters.updateVariantRequest, options).then((request) => request(axios, basePath));
|
|
2312
|
+
},
|
|
2313
|
+
};
|
|
2314
|
+
};
|
|
2315
|
+
exports.VariantsApiFactory = VariantsApiFactory;
|
|
2316
|
+
/**
|
|
2317
|
+
* VariantsApi - object-oriented interface
|
|
2318
|
+
* @export
|
|
2319
|
+
* @class VariantsApi
|
|
2320
|
+
* @extends {BaseAPI}
|
|
2321
|
+
*/
|
|
2322
|
+
class VariantsApi extends base_1.BaseAPI {
|
|
2323
|
+
/**
|
|
2324
|
+
* Updates the warehouse variant
|
|
2325
|
+
* @summary Update warehouse variant
|
|
2326
|
+
* @param {VariantsApiUpdateVariantRequest} requestParameters Request parameters.
|
|
2327
|
+
* @param {*} [options] Override http request option.
|
|
2328
|
+
* @throws {RequiredError}
|
|
2329
|
+
* @memberof VariantsApi
|
|
2330
|
+
*/
|
|
2331
|
+
updateVariant(requestParameters, options) {
|
|
2332
|
+
return (0, exports.VariantsApiFp)(this.configuration).updateVariant(requestParameters.project, requestParameters.platformId, requestParameters.variantId, requestParameters.updateVariantRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
exports.VariantsApi = VariantsApi;
|