@teemill/platform 0.6.0 → 0.8.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 +1113 -85
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +605 -39
- package/dist/api.js +697 -11
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +605 -39
- package/dist/esm/api.js +697 -11
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Platform API
|
|
5
5
|
* Manage Your podOS platform Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.8.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -51,10 +51,11 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
51
51
|
* @param {string} platformId The platform identifier
|
|
52
52
|
* @param {string} start Start of date range to filter by when orders were placed
|
|
53
53
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
54
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
54
55
|
* @param {*} [options] Override http request option.
|
|
55
56
|
* @throws {RequiredError}
|
|
56
57
|
*/
|
|
57
|
-
exportOrders: (project_1, platformId_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, platformId_1, start_1, end_1, ...args_1], void 0, function* (project, platformId, start, end, options = {}) {
|
|
58
|
+
exportOrders: (project_1, platformId_1, start_1, end_1, search_1, ...args_1) => __awaiter(this, [project_1, platformId_1, start_1, end_1, search_1, ...args_1], void 0, function* (project, platformId, start, end, search, options = {}) {
|
|
58
59
|
// verify required parameter 'project' is not null or undefined
|
|
59
60
|
assertParamExists('exportOrders', 'project', project);
|
|
60
61
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -90,6 +91,141 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
90
91
|
end.toISOString() :
|
|
91
92
|
end;
|
|
92
93
|
}
|
|
94
|
+
if (search !== undefined) {
|
|
95
|
+
localVarQueryParameter['search'] = search;
|
|
96
|
+
}
|
|
97
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
98
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
99
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
100
|
+
return {
|
|
101
|
+
url: toPathString(localVarUrlObj),
|
|
102
|
+
options: localVarRequestOptions,
|
|
103
|
+
};
|
|
104
|
+
}),
|
|
105
|
+
/**
|
|
106
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
107
|
+
* @summary Get fulfillment
|
|
108
|
+
* @param {string} project Project unique identifier
|
|
109
|
+
* @param {string} platformId The platform identifier
|
|
110
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
*/
|
|
114
|
+
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 = {}) {
|
|
115
|
+
// verify required parameter 'project' is not null or undefined
|
|
116
|
+
assertParamExists('getFulfillment', 'project', project);
|
|
117
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
118
|
+
assertParamExists('getFulfillment', 'platformId', platformId);
|
|
119
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
120
|
+
assertParamExists('getFulfillment', 'fulfillmentId', fulfillmentId);
|
|
121
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
|
|
122
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
123
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
124
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
125
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
126
|
+
let baseOptions;
|
|
127
|
+
if (configuration) {
|
|
128
|
+
baseOptions = configuration.baseOptions;
|
|
129
|
+
}
|
|
130
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
131
|
+
const localVarHeaderParameter = {};
|
|
132
|
+
const localVarQueryParameter = {};
|
|
133
|
+
// authentication session-oauth required
|
|
134
|
+
// oauth required
|
|
135
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
136
|
+
// authentication api-key required
|
|
137
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
138
|
+
if (project !== undefined) {
|
|
139
|
+
localVarQueryParameter['project'] = project;
|
|
140
|
+
}
|
|
141
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
142
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
143
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
144
|
+
return {
|
|
145
|
+
url: toPathString(localVarUrlObj),
|
|
146
|
+
options: localVarRequestOptions,
|
|
147
|
+
};
|
|
148
|
+
}),
|
|
149
|
+
/**
|
|
150
|
+
* Get an order for a platform by a given order ID.
|
|
151
|
+
* @summary Get order
|
|
152
|
+
* @param {string} project Project unique identifier
|
|
153
|
+
* @param {string} platformId The platform identifier
|
|
154
|
+
* @param {string} orderId The order identifier
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
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 = {}) {
|
|
159
|
+
// verify required parameter 'project' is not null or undefined
|
|
160
|
+
assertParamExists('getOrder', 'project', project);
|
|
161
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
162
|
+
assertParamExists('getOrder', 'platformId', platformId);
|
|
163
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
164
|
+
assertParamExists('getOrder', 'orderId', orderId);
|
|
165
|
+
const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
|
|
166
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
167
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
168
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
169
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
170
|
+
let baseOptions;
|
|
171
|
+
if (configuration) {
|
|
172
|
+
baseOptions = configuration.baseOptions;
|
|
173
|
+
}
|
|
174
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
175
|
+
const localVarHeaderParameter = {};
|
|
176
|
+
const localVarQueryParameter = {};
|
|
177
|
+
// authentication session-oauth required
|
|
178
|
+
// oauth required
|
|
179
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
180
|
+
// authentication api-key required
|
|
181
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
182
|
+
if (project !== undefined) {
|
|
183
|
+
localVarQueryParameter['project'] = project;
|
|
184
|
+
}
|
|
185
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
186
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
187
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
188
|
+
return {
|
|
189
|
+
url: toPathString(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
};
|
|
192
|
+
}),
|
|
193
|
+
/**
|
|
194
|
+
* List available fulfillers for a given fulfillment
|
|
195
|
+
* @summary List available fulfillers
|
|
196
|
+
* @param {string} project Project unique identifier
|
|
197
|
+
* @param {string} platformId The platform identifier
|
|
198
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
199
|
+
* @param {*} [options] Override http request option.
|
|
200
|
+
* @throws {RequiredError}
|
|
201
|
+
*/
|
|
202
|
+
listAvailableFulfillers: (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 = {}) {
|
|
203
|
+
// verify required parameter 'project' is not null or undefined
|
|
204
|
+
assertParamExists('listAvailableFulfillers', 'project', project);
|
|
205
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
206
|
+
assertParamExists('listAvailableFulfillers', 'platformId', platformId);
|
|
207
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
208
|
+
assertParamExists('listAvailableFulfillers', 'fulfillmentId', fulfillmentId);
|
|
209
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
|
|
210
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
211
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
212
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
213
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
214
|
+
let baseOptions;
|
|
215
|
+
if (configuration) {
|
|
216
|
+
baseOptions = configuration.baseOptions;
|
|
217
|
+
}
|
|
218
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
219
|
+
const localVarHeaderParameter = {};
|
|
220
|
+
const localVarQueryParameter = {};
|
|
221
|
+
// authentication session-oauth required
|
|
222
|
+
// oauth required
|
|
223
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
224
|
+
// authentication api-key required
|
|
225
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
226
|
+
if (project !== undefined) {
|
|
227
|
+
localVarQueryParameter['project'] = project;
|
|
228
|
+
}
|
|
93
229
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
94
230
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
95
231
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -162,6 +298,55 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
162
298
|
options: localVarRequestOptions,
|
|
163
299
|
};
|
|
164
300
|
}),
|
|
301
|
+
/**
|
|
302
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
303
|
+
* @summary Update fulfillment
|
|
304
|
+
* @param {string} project Project unique identifier
|
|
305
|
+
* @param {string} platformId The platform identifier
|
|
306
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
307
|
+
* @param {UpdateFulfillmentRequest} updateFulfillmentRequest
|
|
308
|
+
* @param {*} [options] Override http request option.
|
|
309
|
+
* @throws {RequiredError}
|
|
310
|
+
*/
|
|
311
|
+
updateFulfillment: (project_1, platformId_1, fulfillmentId_1, updateFulfillmentRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, fulfillmentId_1, updateFulfillmentRequest_1, ...args_1], void 0, function* (project, platformId, fulfillmentId, updateFulfillmentRequest, options = {}) {
|
|
312
|
+
// verify required parameter 'project' is not null or undefined
|
|
313
|
+
assertParamExists('updateFulfillment', 'project', project);
|
|
314
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
315
|
+
assertParamExists('updateFulfillment', 'platformId', platformId);
|
|
316
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
317
|
+
assertParamExists('updateFulfillment', 'fulfillmentId', fulfillmentId);
|
|
318
|
+
// verify required parameter 'updateFulfillmentRequest' is not null or undefined
|
|
319
|
+
assertParamExists('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest);
|
|
320
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
|
|
321
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
322
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
323
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
324
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
325
|
+
let baseOptions;
|
|
326
|
+
if (configuration) {
|
|
327
|
+
baseOptions = configuration.baseOptions;
|
|
328
|
+
}
|
|
329
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
330
|
+
const localVarHeaderParameter = {};
|
|
331
|
+
const localVarQueryParameter = {};
|
|
332
|
+
// authentication session-oauth required
|
|
333
|
+
// oauth required
|
|
334
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
335
|
+
// authentication api-key required
|
|
336
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
337
|
+
if (project !== undefined) {
|
|
338
|
+
localVarQueryParameter['project'] = project;
|
|
339
|
+
}
|
|
340
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
341
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
342
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
343
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
344
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateFulfillmentRequest, localVarRequestOptions, configuration);
|
|
345
|
+
return {
|
|
346
|
+
url: toPathString(localVarUrlObj),
|
|
347
|
+
options: localVarRequestOptions,
|
|
348
|
+
};
|
|
349
|
+
}),
|
|
165
350
|
};
|
|
166
351
|
};
|
|
167
352
|
/**
|
|
@@ -178,18 +363,73 @@ export const OrdersApiFp = function (configuration) {
|
|
|
178
363
|
* @param {string} platformId The platform identifier
|
|
179
364
|
* @param {string} start Start of date range to filter by when orders were placed
|
|
180
365
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
366
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
181
367
|
* @param {*} [options] Override http request option.
|
|
182
368
|
* @throws {RequiredError}
|
|
183
369
|
*/
|
|
184
|
-
exportOrders(project, platformId, start, end, options) {
|
|
370
|
+
exportOrders(project, platformId, start, end, search, options) {
|
|
185
371
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
372
|
var _a, _b, _c;
|
|
187
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
|
|
373
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, search, options);
|
|
188
374
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
189
375
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.exportOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
190
376
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
191
377
|
});
|
|
192
378
|
},
|
|
379
|
+
/**
|
|
380
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
381
|
+
* @summary Get fulfillment
|
|
382
|
+
* @param {string} project Project unique identifier
|
|
383
|
+
* @param {string} platformId The platform identifier
|
|
384
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
385
|
+
* @param {*} [options] Override http request option.
|
|
386
|
+
* @throws {RequiredError}
|
|
387
|
+
*/
|
|
388
|
+
getFulfillment(project, platformId, fulfillmentId, options) {
|
|
389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
390
|
+
var _a, _b, _c;
|
|
391
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFulfillment(project, platformId, fulfillmentId, options);
|
|
392
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
393
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.getFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
394
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
395
|
+
});
|
|
396
|
+
},
|
|
397
|
+
/**
|
|
398
|
+
* Get an order for a platform by a given order ID.
|
|
399
|
+
* @summary Get order
|
|
400
|
+
* @param {string} project Project unique identifier
|
|
401
|
+
* @param {string} platformId The platform identifier
|
|
402
|
+
* @param {string} orderId The order identifier
|
|
403
|
+
* @param {*} [options] Override http request option.
|
|
404
|
+
* @throws {RequiredError}
|
|
405
|
+
*/
|
|
406
|
+
getOrder(project, platformId, orderId, options) {
|
|
407
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
408
|
+
var _a, _b, _c;
|
|
409
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(project, platformId, orderId, options);
|
|
410
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
411
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
412
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
/**
|
|
416
|
+
* List available fulfillers for a given fulfillment
|
|
417
|
+
* @summary List available fulfillers
|
|
418
|
+
* @param {string} project Project unique identifier
|
|
419
|
+
* @param {string} platformId The platform identifier
|
|
420
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
421
|
+
* @param {*} [options] Override http request option.
|
|
422
|
+
* @throws {RequiredError}
|
|
423
|
+
*/
|
|
424
|
+
listAvailableFulfillers(project, platformId, fulfillmentId, options) {
|
|
425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
+
var _a, _b, _c;
|
|
427
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailableFulfillers(project, platformId, fulfillmentId, options);
|
|
428
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
429
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.listAvailableFulfillers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
430
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
431
|
+
});
|
|
432
|
+
},
|
|
193
433
|
/**
|
|
194
434
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
195
435
|
* @summary List orders
|
|
@@ -212,6 +452,25 @@ export const OrdersApiFp = function (configuration) {
|
|
|
212
452
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
213
453
|
});
|
|
214
454
|
},
|
|
455
|
+
/**
|
|
456
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
457
|
+
* @summary Update fulfillment
|
|
458
|
+
* @param {string} project Project unique identifier
|
|
459
|
+
* @param {string} platformId The platform identifier
|
|
460
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
461
|
+
* @param {UpdateFulfillmentRequest} updateFulfillmentRequest
|
|
462
|
+
* @param {*} [options] Override http request option.
|
|
463
|
+
* @throws {RequiredError}
|
|
464
|
+
*/
|
|
465
|
+
updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options) {
|
|
466
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
467
|
+
var _a, _b, _c;
|
|
468
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options);
|
|
469
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
470
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.updateFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
471
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
472
|
+
});
|
|
473
|
+
},
|
|
215
474
|
};
|
|
216
475
|
};
|
|
217
476
|
/**
|
|
@@ -229,7 +488,37 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
229
488
|
* @throws {RequiredError}
|
|
230
489
|
*/
|
|
231
490
|
exportOrders(requestParameters, options) {
|
|
232
|
-
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
491
|
+
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
|
|
492
|
+
},
|
|
493
|
+
/**
|
|
494
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
495
|
+
* @summary Get fulfillment
|
|
496
|
+
* @param {OrdersApiGetFulfillmentRequest} requestParameters Request parameters.
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
*/
|
|
500
|
+
getFulfillment(requestParameters, options) {
|
|
501
|
+
return localVarFp.getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
|
|
502
|
+
},
|
|
503
|
+
/**
|
|
504
|
+
* Get an order for a platform by a given order ID.
|
|
505
|
+
* @summary Get order
|
|
506
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
507
|
+
* @param {*} [options] Override http request option.
|
|
508
|
+
* @throws {RequiredError}
|
|
509
|
+
*/
|
|
510
|
+
getOrder(requestParameters, options) {
|
|
511
|
+
return localVarFp.getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
512
|
+
},
|
|
513
|
+
/**
|
|
514
|
+
* List available fulfillers for a given fulfillment
|
|
515
|
+
* @summary List available fulfillers
|
|
516
|
+
* @param {OrdersApiListAvailableFulfillersRequest} requestParameters Request parameters.
|
|
517
|
+
* @param {*} [options] Override http request option.
|
|
518
|
+
* @throws {RequiredError}
|
|
519
|
+
*/
|
|
520
|
+
listAvailableFulfillers(requestParameters, options) {
|
|
521
|
+
return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
|
|
233
522
|
},
|
|
234
523
|
/**
|
|
235
524
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
@@ -241,6 +530,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
241
530
|
listOrders(requestParameters, options) {
|
|
242
531
|
return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
243
532
|
},
|
|
533
|
+
/**
|
|
534
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
535
|
+
* @summary Update fulfillment
|
|
536
|
+
* @param {OrdersApiUpdateFulfillmentRequest} requestParameters Request parameters.
|
|
537
|
+
* @param {*} [options] Override http request option.
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
*/
|
|
540
|
+
updateFulfillment(requestParameters, options) {
|
|
541
|
+
return localVarFp.updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(axios, basePath));
|
|
542
|
+
},
|
|
244
543
|
};
|
|
245
544
|
};
|
|
246
545
|
/**
|
|
@@ -259,7 +558,40 @@ export class OrdersApi extends BaseAPI {
|
|
|
259
558
|
* @memberof OrdersApi
|
|
260
559
|
*/
|
|
261
560
|
exportOrders(requestParameters, options) {
|
|
262
|
-
return OrdersApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
561
|
+
return OrdersApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
565
|
+
* @summary Get fulfillment
|
|
566
|
+
* @param {OrdersApiGetFulfillmentRequest} requestParameters Request parameters.
|
|
567
|
+
* @param {*} [options] Override http request option.
|
|
568
|
+
* @throws {RequiredError}
|
|
569
|
+
* @memberof OrdersApi
|
|
570
|
+
*/
|
|
571
|
+
getFulfillment(requestParameters, options) {
|
|
572
|
+
return OrdersApiFp(this.configuration).getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Get an order for a platform by a given order ID.
|
|
576
|
+
* @summary Get order
|
|
577
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
578
|
+
* @param {*} [options] Override http request option.
|
|
579
|
+
* @throws {RequiredError}
|
|
580
|
+
* @memberof OrdersApi
|
|
581
|
+
*/
|
|
582
|
+
getOrder(requestParameters, options) {
|
|
583
|
+
return OrdersApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* List available fulfillers for a given fulfillment
|
|
587
|
+
* @summary List available fulfillers
|
|
588
|
+
* @param {OrdersApiListAvailableFulfillersRequest} requestParameters Request parameters.
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
* @memberof OrdersApi
|
|
592
|
+
*/
|
|
593
|
+
listAvailableFulfillers(requestParameters, options) {
|
|
594
|
+
return OrdersApiFp(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
|
|
263
595
|
}
|
|
264
596
|
/**
|
|
265
597
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
@@ -272,6 +604,17 @@ export class OrdersApi extends BaseAPI {
|
|
|
272
604
|
listOrders(requestParameters, options) {
|
|
273
605
|
return OrdersApiFp(this.configuration).listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
274
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
609
|
+
* @summary Update fulfillment
|
|
610
|
+
* @param {OrdersApiUpdateFulfillmentRequest} requestParameters Request parameters.
|
|
611
|
+
* @param {*} [options] Override http request option.
|
|
612
|
+
* @throws {RequiredError}
|
|
613
|
+
* @memberof OrdersApi
|
|
614
|
+
*/
|
|
615
|
+
updateFulfillment(requestParameters, options) {
|
|
616
|
+
return OrdersApiFp(this.configuration).updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
617
|
+
}
|
|
275
618
|
}
|
|
276
619
|
/**
|
|
277
620
|
* PlatformApi - axios parameter creator
|
|
@@ -286,10 +629,11 @@ export const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
286
629
|
* @param {string} platformId The platform identifier
|
|
287
630
|
* @param {string} start Start of date range to filter by when orders were placed
|
|
288
631
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
632
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
289
633
|
* @param {*} [options] Override http request option.
|
|
290
634
|
* @throws {RequiredError}
|
|
291
635
|
*/
|
|
292
|
-
exportOrders: (project_1, platformId_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, platformId_1, start_1, end_1, ...args_1], void 0, function* (project, platformId, start, end, options = {}) {
|
|
636
|
+
exportOrders: (project_1, platformId_1, start_1, end_1, search_1, ...args_1) => __awaiter(this, [project_1, platformId_1, start_1, end_1, search_1, ...args_1], void 0, function* (project, platformId, start, end, search, options = {}) {
|
|
293
637
|
// verify required parameter 'project' is not null or undefined
|
|
294
638
|
assertParamExists('exportOrders', 'project', project);
|
|
295
639
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -325,6 +669,97 @@ export const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
325
669
|
end.toISOString() :
|
|
326
670
|
end;
|
|
327
671
|
}
|
|
672
|
+
if (search !== undefined) {
|
|
673
|
+
localVarQueryParameter['search'] = search;
|
|
674
|
+
}
|
|
675
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
676
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
677
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
678
|
+
return {
|
|
679
|
+
url: toPathString(localVarUrlObj),
|
|
680
|
+
options: localVarRequestOptions,
|
|
681
|
+
};
|
|
682
|
+
}),
|
|
683
|
+
/**
|
|
684
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
685
|
+
* @summary Get fulfillment
|
|
686
|
+
* @param {string} project Project unique identifier
|
|
687
|
+
* @param {string} platformId The platform identifier
|
|
688
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
689
|
+
* @param {*} [options] Override http request option.
|
|
690
|
+
* @throws {RequiredError}
|
|
691
|
+
*/
|
|
692
|
+
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 = {}) {
|
|
693
|
+
// verify required parameter 'project' is not null or undefined
|
|
694
|
+
assertParamExists('getFulfillment', 'project', project);
|
|
695
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
696
|
+
assertParamExists('getFulfillment', 'platformId', platformId);
|
|
697
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
698
|
+
assertParamExists('getFulfillment', 'fulfillmentId', fulfillmentId);
|
|
699
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
|
|
700
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
701
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
702
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
703
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
704
|
+
let baseOptions;
|
|
705
|
+
if (configuration) {
|
|
706
|
+
baseOptions = configuration.baseOptions;
|
|
707
|
+
}
|
|
708
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
709
|
+
const localVarHeaderParameter = {};
|
|
710
|
+
const localVarQueryParameter = {};
|
|
711
|
+
// authentication session-oauth required
|
|
712
|
+
// oauth required
|
|
713
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
714
|
+
// authentication api-key required
|
|
715
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
716
|
+
if (project !== undefined) {
|
|
717
|
+
localVarQueryParameter['project'] = project;
|
|
718
|
+
}
|
|
719
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
720
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
721
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
722
|
+
return {
|
|
723
|
+
url: toPathString(localVarUrlObj),
|
|
724
|
+
options: localVarRequestOptions,
|
|
725
|
+
};
|
|
726
|
+
}),
|
|
727
|
+
/**
|
|
728
|
+
* Get an order for a platform by a given order ID.
|
|
729
|
+
* @summary Get order
|
|
730
|
+
* @param {string} project Project unique identifier
|
|
731
|
+
* @param {string} platformId The platform identifier
|
|
732
|
+
* @param {string} orderId The order identifier
|
|
733
|
+
* @param {*} [options] Override http request option.
|
|
734
|
+
* @throws {RequiredError}
|
|
735
|
+
*/
|
|
736
|
+
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 = {}) {
|
|
737
|
+
// verify required parameter 'project' is not null or undefined
|
|
738
|
+
assertParamExists('getOrder', 'project', project);
|
|
739
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
740
|
+
assertParamExists('getOrder', 'platformId', platformId);
|
|
741
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
742
|
+
assertParamExists('getOrder', 'orderId', orderId);
|
|
743
|
+
const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
|
|
744
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
745
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
746
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
747
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
748
|
+
let baseOptions;
|
|
749
|
+
if (configuration) {
|
|
750
|
+
baseOptions = configuration.baseOptions;
|
|
751
|
+
}
|
|
752
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
753
|
+
const localVarHeaderParameter = {};
|
|
754
|
+
const localVarQueryParameter = {};
|
|
755
|
+
// authentication session-oauth required
|
|
756
|
+
// oauth required
|
|
757
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
758
|
+
// authentication api-key required
|
|
759
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
760
|
+
if (project !== undefined) {
|
|
761
|
+
localVarQueryParameter['project'] = project;
|
|
762
|
+
}
|
|
328
763
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
329
764
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
330
765
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -369,6 +804,50 @@ export const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
369
804
|
options: localVarRequestOptions,
|
|
370
805
|
};
|
|
371
806
|
}),
|
|
807
|
+
/**
|
|
808
|
+
* List available fulfillers for a given fulfillment
|
|
809
|
+
* @summary List available fulfillers
|
|
810
|
+
* @param {string} project Project unique identifier
|
|
811
|
+
* @param {string} platformId The platform identifier
|
|
812
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
813
|
+
* @param {*} [options] Override http request option.
|
|
814
|
+
* @throws {RequiredError}
|
|
815
|
+
*/
|
|
816
|
+
listAvailableFulfillers: (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 = {}) {
|
|
817
|
+
// verify required parameter 'project' is not null or undefined
|
|
818
|
+
assertParamExists('listAvailableFulfillers', 'project', project);
|
|
819
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
820
|
+
assertParamExists('listAvailableFulfillers', 'platformId', platformId);
|
|
821
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
822
|
+
assertParamExists('listAvailableFulfillers', 'fulfillmentId', fulfillmentId);
|
|
823
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
|
|
824
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
825
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
826
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
827
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
828
|
+
let baseOptions;
|
|
829
|
+
if (configuration) {
|
|
830
|
+
baseOptions = configuration.baseOptions;
|
|
831
|
+
}
|
|
832
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
833
|
+
const localVarHeaderParameter = {};
|
|
834
|
+
const localVarQueryParameter = {};
|
|
835
|
+
// authentication session-oauth required
|
|
836
|
+
// oauth required
|
|
837
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
838
|
+
// authentication api-key required
|
|
839
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
840
|
+
if (project !== undefined) {
|
|
841
|
+
localVarQueryParameter['project'] = project;
|
|
842
|
+
}
|
|
843
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
844
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
845
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
846
|
+
return {
|
|
847
|
+
url: toPathString(localVarUrlObj),
|
|
848
|
+
options: localVarRequestOptions,
|
|
849
|
+
};
|
|
850
|
+
}),
|
|
372
851
|
/**
|
|
373
852
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
374
853
|
* @summary List orders
|
|
@@ -433,6 +912,55 @@ export const PlatformApiAxiosParamCreator = function (configuration) {
|
|
|
433
912
|
options: localVarRequestOptions,
|
|
434
913
|
};
|
|
435
914
|
}),
|
|
915
|
+
/**
|
|
916
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
917
|
+
* @summary Update fulfillment
|
|
918
|
+
* @param {string} project Project unique identifier
|
|
919
|
+
* @param {string} platformId The platform identifier
|
|
920
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
921
|
+
* @param {UpdateFulfillmentRequest} updateFulfillmentRequest
|
|
922
|
+
* @param {*} [options] Override http request option.
|
|
923
|
+
* @throws {RequiredError}
|
|
924
|
+
*/
|
|
925
|
+
updateFulfillment: (project_1, platformId_1, fulfillmentId_1, updateFulfillmentRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, fulfillmentId_1, updateFulfillmentRequest_1, ...args_1], void 0, function* (project, platformId, fulfillmentId, updateFulfillmentRequest, options = {}) {
|
|
926
|
+
// verify required parameter 'project' is not null or undefined
|
|
927
|
+
assertParamExists('updateFulfillment', 'project', project);
|
|
928
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
929
|
+
assertParamExists('updateFulfillment', 'platformId', platformId);
|
|
930
|
+
// verify required parameter 'fulfillmentId' is not null or undefined
|
|
931
|
+
assertParamExists('updateFulfillment', 'fulfillmentId', fulfillmentId);
|
|
932
|
+
// verify required parameter 'updateFulfillmentRequest' is not null or undefined
|
|
933
|
+
assertParamExists('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest);
|
|
934
|
+
const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
|
|
935
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
|
|
936
|
+
.replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
|
|
937
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
938
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
939
|
+
let baseOptions;
|
|
940
|
+
if (configuration) {
|
|
941
|
+
baseOptions = configuration.baseOptions;
|
|
942
|
+
}
|
|
943
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
944
|
+
const localVarHeaderParameter = {};
|
|
945
|
+
const localVarQueryParameter = {};
|
|
946
|
+
// authentication session-oauth required
|
|
947
|
+
// oauth required
|
|
948
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
949
|
+
// authentication api-key required
|
|
950
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
951
|
+
if (project !== undefined) {
|
|
952
|
+
localVarQueryParameter['project'] = project;
|
|
953
|
+
}
|
|
954
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
955
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
956
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
957
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
958
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateFulfillmentRequest, localVarRequestOptions, configuration);
|
|
959
|
+
return {
|
|
960
|
+
url: toPathString(localVarUrlObj),
|
|
961
|
+
options: localVarRequestOptions,
|
|
962
|
+
};
|
|
963
|
+
}),
|
|
436
964
|
/**
|
|
437
965
|
*
|
|
438
966
|
* @summary Update platform
|
|
@@ -490,18 +1018,55 @@ export const PlatformApiFp = function (configuration) {
|
|
|
490
1018
|
* @param {string} platformId The platform identifier
|
|
491
1019
|
* @param {string} start Start of date range to filter by when orders were placed
|
|
492
1020
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1021
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
493
1022
|
* @param {*} [options] Override http request option.
|
|
494
1023
|
* @throws {RequiredError}
|
|
495
1024
|
*/
|
|
496
|
-
exportOrders(project, platformId, start, end, options) {
|
|
1025
|
+
exportOrders(project, platformId, start, end, search, options) {
|
|
497
1026
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
1027
|
var _a, _b, _c;
|
|
499
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
|
|
1028
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, search, options);
|
|
500
1029
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
501
1030
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlatformApi.exportOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
502
1031
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
503
1032
|
});
|
|
504
1033
|
},
|
|
1034
|
+
/**
|
|
1035
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1036
|
+
* @summary Get fulfillment
|
|
1037
|
+
* @param {string} project Project unique identifier
|
|
1038
|
+
* @param {string} platformId The platform identifier
|
|
1039
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
1040
|
+
* @param {*} [options] Override http request option.
|
|
1041
|
+
* @throws {RequiredError}
|
|
1042
|
+
*/
|
|
1043
|
+
getFulfillment(project, platformId, fulfillmentId, options) {
|
|
1044
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1045
|
+
var _a, _b, _c;
|
|
1046
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFulfillment(project, platformId, fulfillmentId, options);
|
|
1047
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1048
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlatformApi.getFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1049
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1050
|
+
});
|
|
1051
|
+
},
|
|
1052
|
+
/**
|
|
1053
|
+
* Get an order for a platform by a given order ID.
|
|
1054
|
+
* @summary Get order
|
|
1055
|
+
* @param {string} project Project unique identifier
|
|
1056
|
+
* @param {string} platformId The platform identifier
|
|
1057
|
+
* @param {string} orderId The order identifier
|
|
1058
|
+
* @param {*} [options] Override http request option.
|
|
1059
|
+
* @throws {RequiredError}
|
|
1060
|
+
*/
|
|
1061
|
+
getOrder(project, platformId, orderId, options) {
|
|
1062
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1063
|
+
var _a, _b, _c;
|
|
1064
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(project, platformId, orderId, options);
|
|
1065
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1066
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlatformApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1067
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1068
|
+
});
|
|
1069
|
+
},
|
|
505
1070
|
/**
|
|
506
1071
|
*
|
|
507
1072
|
* @summary Get platform details
|
|
@@ -518,6 +1083,24 @@ export const PlatformApiFp = function (configuration) {
|
|
|
518
1083
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
519
1084
|
});
|
|
520
1085
|
},
|
|
1086
|
+
/**
|
|
1087
|
+
* List available fulfillers for a given fulfillment
|
|
1088
|
+
* @summary List available fulfillers
|
|
1089
|
+
* @param {string} project Project unique identifier
|
|
1090
|
+
* @param {string} platformId The platform identifier
|
|
1091
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
1092
|
+
* @param {*} [options] Override http request option.
|
|
1093
|
+
* @throws {RequiredError}
|
|
1094
|
+
*/
|
|
1095
|
+
listAvailableFulfillers(project, platformId, fulfillmentId, options) {
|
|
1096
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1097
|
+
var _a, _b, _c;
|
|
1098
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailableFulfillers(project, platformId, fulfillmentId, options);
|
|
1099
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1100
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlatformApi.listAvailableFulfillers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1101
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1102
|
+
});
|
|
1103
|
+
},
|
|
521
1104
|
/**
|
|
522
1105
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
523
1106
|
* @summary List orders
|
|
@@ -540,6 +1123,25 @@ export const PlatformApiFp = function (configuration) {
|
|
|
540
1123
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
541
1124
|
});
|
|
542
1125
|
},
|
|
1126
|
+
/**
|
|
1127
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
1128
|
+
* @summary Update fulfillment
|
|
1129
|
+
* @param {string} project Project unique identifier
|
|
1130
|
+
* @param {string} platformId The platform identifier
|
|
1131
|
+
* @param {string} fulfillmentId The fulfillment identifier
|
|
1132
|
+
* @param {UpdateFulfillmentRequest} updateFulfillmentRequest
|
|
1133
|
+
* @param {*} [options] Override http request option.
|
|
1134
|
+
* @throws {RequiredError}
|
|
1135
|
+
*/
|
|
1136
|
+
updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options) {
|
|
1137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1138
|
+
var _a, _b, _c;
|
|
1139
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options);
|
|
1140
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1141
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlatformApi.updateFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1142
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1143
|
+
});
|
|
1144
|
+
},
|
|
543
1145
|
/**
|
|
544
1146
|
*
|
|
545
1147
|
* @summary Update platform
|
|
@@ -574,7 +1176,27 @@ export const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
574
1176
|
* @throws {RequiredError}
|
|
575
1177
|
*/
|
|
576
1178
|
exportOrders(requestParameters, options) {
|
|
577
|
-
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
1179
|
+
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
|
|
1180
|
+
},
|
|
1181
|
+
/**
|
|
1182
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1183
|
+
* @summary Get fulfillment
|
|
1184
|
+
* @param {PlatformApiGetFulfillmentRequest} requestParameters Request parameters.
|
|
1185
|
+
* @param {*} [options] Override http request option.
|
|
1186
|
+
* @throws {RequiredError}
|
|
1187
|
+
*/
|
|
1188
|
+
getFulfillment(requestParameters, options) {
|
|
1189
|
+
return localVarFp.getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
|
|
1190
|
+
},
|
|
1191
|
+
/**
|
|
1192
|
+
* Get an order for a platform by a given order ID.
|
|
1193
|
+
* @summary Get order
|
|
1194
|
+
* @param {PlatformApiGetOrderRequest} requestParameters Request parameters.
|
|
1195
|
+
* @param {*} [options] Override http request option.
|
|
1196
|
+
* @throws {RequiredError}
|
|
1197
|
+
*/
|
|
1198
|
+
getOrder(requestParameters, options) {
|
|
1199
|
+
return localVarFp.getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
578
1200
|
},
|
|
579
1201
|
/**
|
|
580
1202
|
*
|
|
@@ -586,6 +1208,16 @@ export const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
586
1208
|
getPlatform(requestParameters, options) {
|
|
587
1209
|
return localVarFp.getPlatform(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
588
1210
|
},
|
|
1211
|
+
/**
|
|
1212
|
+
* List available fulfillers for a given fulfillment
|
|
1213
|
+
* @summary List available fulfillers
|
|
1214
|
+
* @param {PlatformApiListAvailableFulfillersRequest} requestParameters Request parameters.
|
|
1215
|
+
* @param {*} [options] Override http request option.
|
|
1216
|
+
* @throws {RequiredError}
|
|
1217
|
+
*/
|
|
1218
|
+
listAvailableFulfillers(requestParameters, options) {
|
|
1219
|
+
return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
|
|
1220
|
+
},
|
|
589
1221
|
/**
|
|
590
1222
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
591
1223
|
* @summary List orders
|
|
@@ -596,6 +1228,16 @@ export const PlatformApiFactory = function (configuration, basePath, axios) {
|
|
|
596
1228
|
listOrders(requestParameters, options) {
|
|
597
1229
|
return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
598
1230
|
},
|
|
1231
|
+
/**
|
|
1232
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
1233
|
+
* @summary Update fulfillment
|
|
1234
|
+
* @param {PlatformApiUpdateFulfillmentRequest} requestParameters Request parameters.
|
|
1235
|
+
* @param {*} [options] Override http request option.
|
|
1236
|
+
* @throws {RequiredError}
|
|
1237
|
+
*/
|
|
1238
|
+
updateFulfillment(requestParameters, options) {
|
|
1239
|
+
return localVarFp.updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(axios, basePath));
|
|
1240
|
+
},
|
|
599
1241
|
/**
|
|
600
1242
|
*
|
|
601
1243
|
* @summary Update platform
|
|
@@ -624,7 +1266,29 @@ export class PlatformApi extends BaseAPI {
|
|
|
624
1266
|
* @memberof PlatformApi
|
|
625
1267
|
*/
|
|
626
1268
|
exportOrders(requestParameters, options) {
|
|
627
|
-
return PlatformApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
1269
|
+
return PlatformApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Get a fulfillment for a platform by a given fulfillment ID.
|
|
1273
|
+
* @summary Get fulfillment
|
|
1274
|
+
* @param {PlatformApiGetFulfillmentRequest} requestParameters Request parameters.
|
|
1275
|
+
* @param {*} [options] Override http request option.
|
|
1276
|
+
* @throws {RequiredError}
|
|
1277
|
+
* @memberof PlatformApi
|
|
1278
|
+
*/
|
|
1279
|
+
getFulfillment(requestParameters, options) {
|
|
1280
|
+
return PlatformApiFp(this.configuration).getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* Get an order for a platform by a given order ID.
|
|
1284
|
+
* @summary Get order
|
|
1285
|
+
* @param {PlatformApiGetOrderRequest} requestParameters Request parameters.
|
|
1286
|
+
* @param {*} [options] Override http request option.
|
|
1287
|
+
* @throws {RequiredError}
|
|
1288
|
+
* @memberof PlatformApi
|
|
1289
|
+
*/
|
|
1290
|
+
getOrder(requestParameters, options) {
|
|
1291
|
+
return PlatformApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
|
628
1292
|
}
|
|
629
1293
|
/**
|
|
630
1294
|
*
|
|
@@ -637,6 +1301,17 @@ export class PlatformApi extends BaseAPI {
|
|
|
637
1301
|
getPlatform(requestParameters, options) {
|
|
638
1302
|
return PlatformApiFp(this.configuration).getPlatform(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
639
1303
|
}
|
|
1304
|
+
/**
|
|
1305
|
+
* List available fulfillers for a given fulfillment
|
|
1306
|
+
* @summary List available fulfillers
|
|
1307
|
+
* @param {PlatformApiListAvailableFulfillersRequest} requestParameters Request parameters.
|
|
1308
|
+
* @param {*} [options] Override http request option.
|
|
1309
|
+
* @throws {RequiredError}
|
|
1310
|
+
* @memberof PlatformApi
|
|
1311
|
+
*/
|
|
1312
|
+
listAvailableFulfillers(requestParameters, options) {
|
|
1313
|
+
return PlatformApiFp(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1314
|
+
}
|
|
640
1315
|
/**
|
|
641
1316
|
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
642
1317
|
* @summary List orders
|
|
@@ -648,6 +1323,17 @@ export class PlatformApi extends BaseAPI {
|
|
|
648
1323
|
listOrders(requestParameters, options) {
|
|
649
1324
|
return PlatformApiFp(this.configuration).listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
650
1325
|
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Update a fulfillment that belongs to an order placed through the platform
|
|
1328
|
+
* @summary Update fulfillment
|
|
1329
|
+
* @param {PlatformApiUpdateFulfillmentRequest} requestParameters Request parameters.
|
|
1330
|
+
* @param {*} [options] Override http request option.
|
|
1331
|
+
* @throws {RequiredError}
|
|
1332
|
+
* @memberof PlatformApi
|
|
1333
|
+
*/
|
|
1334
|
+
updateFulfillment(requestParameters, options) {
|
|
1335
|
+
return PlatformApiFp(this.configuration).updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1336
|
+
}
|
|
651
1337
|
/**
|
|
652
1338
|
*
|
|
653
1339
|
* @summary Update platform
|