@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/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Platform API
6
6
  * 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)
7
7
  *
8
- * The version of the OpenAPI document: 0.6.0
8
+ * The version of the OpenAPI document: 0.8.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -54,10 +54,11 @@ const OrdersApiAxiosParamCreator = function (configuration) {
54
54
  * @param {string} platformId The platform identifier
55
55
  * @param {string} start Start of date range to filter by when orders were placed
56
56
  * @param {string} [end] End of date range to filter by when orders were placed
57
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
57
58
  * @param {*} [options] Override http request option.
58
59
  * @throws {RequiredError}
59
60
  */
60
- 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 = {}) {
61
+ 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 = {}) {
61
62
  // verify required parameter 'project' is not null or undefined
62
63
  (0, common_1.assertParamExists)('exportOrders', 'project', project);
63
64
  // verify required parameter 'platformId' is not null or undefined
@@ -93,6 +94,141 @@ const OrdersApiAxiosParamCreator = function (configuration) {
93
94
  end.toISOString() :
94
95
  end;
95
96
  }
97
+ if (search !== undefined) {
98
+ localVarQueryParameter['search'] = search;
99
+ }
100
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
101
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
102
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
103
+ return {
104
+ url: (0, common_1.toPathString)(localVarUrlObj),
105
+ options: localVarRequestOptions,
106
+ };
107
+ }),
108
+ /**
109
+ * Get a fulfillment for a platform by a given fulfillment ID.
110
+ * @summary Get fulfillment
111
+ * @param {string} project Project unique identifier
112
+ * @param {string} platformId The platform identifier
113
+ * @param {string} fulfillmentId The fulfillment identifier
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ 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 = {}) {
118
+ // verify required parameter 'project' is not null or undefined
119
+ (0, common_1.assertParamExists)('getFulfillment', 'project', project);
120
+ // verify required parameter 'platformId' is not null or undefined
121
+ (0, common_1.assertParamExists)('getFulfillment', 'platformId', platformId);
122
+ // verify required parameter 'fulfillmentId' is not null or undefined
123
+ (0, common_1.assertParamExists)('getFulfillment', 'fulfillmentId', fulfillmentId);
124
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
125
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
126
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
127
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
128
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
129
+ let baseOptions;
130
+ if (configuration) {
131
+ baseOptions = configuration.baseOptions;
132
+ }
133
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
134
+ const localVarHeaderParameter = {};
135
+ const localVarQueryParameter = {};
136
+ // authentication session-oauth required
137
+ // oauth required
138
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
139
+ // authentication api-key required
140
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
141
+ if (project !== undefined) {
142
+ localVarQueryParameter['project'] = project;
143
+ }
144
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
145
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
146
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
147
+ return {
148
+ url: (0, common_1.toPathString)(localVarUrlObj),
149
+ options: localVarRequestOptions,
150
+ };
151
+ }),
152
+ /**
153
+ * Get an order for a platform by a given order ID.
154
+ * @summary Get order
155
+ * @param {string} project Project unique identifier
156
+ * @param {string} platformId The platform identifier
157
+ * @param {string} orderId The order identifier
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ 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 = {}) {
162
+ // verify required parameter 'project' is not null or undefined
163
+ (0, common_1.assertParamExists)('getOrder', 'project', project);
164
+ // verify required parameter 'platformId' is not null or undefined
165
+ (0, common_1.assertParamExists)('getOrder', 'platformId', platformId);
166
+ // verify required parameter 'orderId' is not null or undefined
167
+ (0, common_1.assertParamExists)('getOrder', 'orderId', orderId);
168
+ const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
169
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
170
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
171
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
172
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
173
+ let baseOptions;
174
+ if (configuration) {
175
+ baseOptions = configuration.baseOptions;
176
+ }
177
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
178
+ const localVarHeaderParameter = {};
179
+ const localVarQueryParameter = {};
180
+ // authentication session-oauth required
181
+ // oauth required
182
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
183
+ // authentication api-key required
184
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
185
+ if (project !== undefined) {
186
+ localVarQueryParameter['project'] = project;
187
+ }
188
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
191
+ return {
192
+ url: (0, common_1.toPathString)(localVarUrlObj),
193
+ options: localVarRequestOptions,
194
+ };
195
+ }),
196
+ /**
197
+ * List available fulfillers for a given fulfillment
198
+ * @summary List available fulfillers
199
+ * @param {string} project Project unique identifier
200
+ * @param {string} platformId The platform identifier
201
+ * @param {string} fulfillmentId The fulfillment identifier
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ 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 = {}) {
206
+ // verify required parameter 'project' is not null or undefined
207
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'project', project);
208
+ // verify required parameter 'platformId' is not null or undefined
209
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'platformId', platformId);
210
+ // verify required parameter 'fulfillmentId' is not null or undefined
211
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'fulfillmentId', fulfillmentId);
212
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
213
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
214
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
215
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
216
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
217
+ let baseOptions;
218
+ if (configuration) {
219
+ baseOptions = configuration.baseOptions;
220
+ }
221
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
222
+ const localVarHeaderParameter = {};
223
+ const localVarQueryParameter = {};
224
+ // authentication session-oauth required
225
+ // oauth required
226
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
227
+ // authentication api-key required
228
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
229
+ if (project !== undefined) {
230
+ localVarQueryParameter['project'] = project;
231
+ }
96
232
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
97
233
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
234
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -165,6 +301,55 @@ const OrdersApiAxiosParamCreator = function (configuration) {
165
301
  options: localVarRequestOptions,
166
302
  };
167
303
  }),
304
+ /**
305
+ * Update a fulfillment that belongs to an order placed through the platform
306
+ * @summary Update fulfillment
307
+ * @param {string} project Project unique identifier
308
+ * @param {string} platformId The platform identifier
309
+ * @param {string} fulfillmentId The fulfillment identifier
310
+ * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ 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 = {}) {
315
+ // verify required parameter 'project' is not null or undefined
316
+ (0, common_1.assertParamExists)('updateFulfillment', 'project', project);
317
+ // verify required parameter 'platformId' is not null or undefined
318
+ (0, common_1.assertParamExists)('updateFulfillment', 'platformId', platformId);
319
+ // verify required parameter 'fulfillmentId' is not null or undefined
320
+ (0, common_1.assertParamExists)('updateFulfillment', 'fulfillmentId', fulfillmentId);
321
+ // verify required parameter 'updateFulfillmentRequest' is not null or undefined
322
+ (0, common_1.assertParamExists)('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest);
323
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
324
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
325
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
326
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
327
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
328
+ let baseOptions;
329
+ if (configuration) {
330
+ baseOptions = configuration.baseOptions;
331
+ }
332
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
333
+ const localVarHeaderParameter = {};
334
+ const localVarQueryParameter = {};
335
+ // authentication session-oauth required
336
+ // oauth required
337
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
338
+ // authentication api-key required
339
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
340
+ if (project !== undefined) {
341
+ localVarQueryParameter['project'] = project;
342
+ }
343
+ localVarHeaderParameter['Content-Type'] = 'application/json';
344
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
345
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
346
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
347
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFulfillmentRequest, localVarRequestOptions, configuration);
348
+ return {
349
+ url: (0, common_1.toPathString)(localVarUrlObj),
350
+ options: localVarRequestOptions,
351
+ };
352
+ }),
168
353
  };
169
354
  };
170
355
  exports.OrdersApiAxiosParamCreator = OrdersApiAxiosParamCreator;
@@ -182,18 +367,73 @@ const OrdersApiFp = function (configuration) {
182
367
  * @param {string} platformId The platform identifier
183
368
  * @param {string} start Start of date range to filter by when orders were placed
184
369
  * @param {string} [end] End of date range to filter by when orders were placed
370
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
185
371
  * @param {*} [options] Override http request option.
186
372
  * @throws {RequiredError}
187
373
  */
188
- exportOrders(project, platformId, start, end, options) {
374
+ exportOrders(project, platformId, start, end, search, options) {
189
375
  return __awaiter(this, void 0, void 0, function* () {
190
376
  var _a, _b, _c;
191
- const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
377
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, search, options);
192
378
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
193
379
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.exportOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
194
380
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
195
381
  });
196
382
  },
383
+ /**
384
+ * Get a fulfillment for a platform by a given fulfillment ID.
385
+ * @summary Get fulfillment
386
+ * @param {string} project Project unique identifier
387
+ * @param {string} platformId The platform identifier
388
+ * @param {string} fulfillmentId The fulfillment identifier
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ getFulfillment(project, platformId, fulfillmentId, options) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ var _a, _b, _c;
395
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFulfillment(project, platformId, fulfillmentId, options);
396
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
397
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
398
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
399
+ });
400
+ },
401
+ /**
402
+ * Get an order for a platform by a given order ID.
403
+ * @summary Get order
404
+ * @param {string} project Project unique identifier
405
+ * @param {string} platformId The platform identifier
406
+ * @param {string} orderId The order identifier
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ getOrder(project, platformId, orderId, options) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ var _a, _b, _c;
413
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(project, platformId, orderId, options);
414
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
415
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
416
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
417
+ });
418
+ },
419
+ /**
420
+ * List available fulfillers for a given fulfillment
421
+ * @summary List available fulfillers
422
+ * @param {string} project Project unique identifier
423
+ * @param {string} platformId The platform identifier
424
+ * @param {string} fulfillmentId The fulfillment identifier
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ listAvailableFulfillers(project, platformId, fulfillmentId, options) {
429
+ return __awaiter(this, void 0, void 0, function* () {
430
+ var _a, _b, _c;
431
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailableFulfillers(project, platformId, fulfillmentId, options);
432
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
433
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.listAvailableFulfillers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
434
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
435
+ });
436
+ },
197
437
  /**
198
438
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
199
439
  * @summary List orders
@@ -216,6 +456,25 @@ const OrdersApiFp = function (configuration) {
216
456
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
217
457
  });
218
458
  },
459
+ /**
460
+ * Update a fulfillment that belongs to an order placed through the platform
461
+ * @summary Update fulfillment
462
+ * @param {string} project Project unique identifier
463
+ * @param {string} platformId The platform identifier
464
+ * @param {string} fulfillmentId The fulfillment identifier
465
+ * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options) {
470
+ return __awaiter(this, void 0, void 0, function* () {
471
+ var _a, _b, _c;
472
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options);
473
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
474
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.updateFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
475
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
476
+ });
477
+ },
219
478
  };
220
479
  };
221
480
  exports.OrdersApiFp = OrdersApiFp;
@@ -234,7 +493,37 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
234
493
  * @throws {RequiredError}
235
494
  */
236
495
  exportOrders(requestParameters, options) {
237
- return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
496
+ return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
497
+ },
498
+ /**
499
+ * Get a fulfillment for a platform by a given fulfillment ID.
500
+ * @summary Get fulfillment
501
+ * @param {OrdersApiGetFulfillmentRequest} requestParameters Request parameters.
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ getFulfillment(requestParameters, options) {
506
+ return localVarFp.getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
507
+ },
508
+ /**
509
+ * Get an order for a platform by a given order ID.
510
+ * @summary Get order
511
+ * @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ getOrder(requestParameters, options) {
516
+ return localVarFp.getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(axios, basePath));
517
+ },
518
+ /**
519
+ * List available fulfillers for a given fulfillment
520
+ * @summary List available fulfillers
521
+ * @param {OrdersApiListAvailableFulfillersRequest} requestParameters Request parameters.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ listAvailableFulfillers(requestParameters, options) {
526
+ return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
238
527
  },
239
528
  /**
240
529
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
@@ -246,6 +535,16 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
246
535
  listOrders(requestParameters, options) {
247
536
  return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
248
537
  },
538
+ /**
539
+ * Update a fulfillment that belongs to an order placed through the platform
540
+ * @summary Update fulfillment
541
+ * @param {OrdersApiUpdateFulfillmentRequest} requestParameters Request parameters.
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ */
545
+ updateFulfillment(requestParameters, options) {
546
+ return localVarFp.updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(axios, basePath));
547
+ },
249
548
  };
250
549
  };
251
550
  exports.OrdersApiFactory = OrdersApiFactory;
@@ -265,7 +564,40 @@ class OrdersApi extends base_1.BaseAPI {
265
564
  * @memberof OrdersApi
266
565
  */
267
566
  exportOrders(requestParameters, options) {
268
- return (0, exports.OrdersApiFp)(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
567
+ return (0, exports.OrdersApiFp)(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
568
+ }
569
+ /**
570
+ * Get a fulfillment for a platform by a given fulfillment ID.
571
+ * @summary Get fulfillment
572
+ * @param {OrdersApiGetFulfillmentRequest} requestParameters Request parameters.
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ * @memberof OrdersApi
576
+ */
577
+ getFulfillment(requestParameters, options) {
578
+ return (0, exports.OrdersApiFp)(this.configuration).getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
579
+ }
580
+ /**
581
+ * Get an order for a platform by a given order ID.
582
+ * @summary Get order
583
+ * @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
584
+ * @param {*} [options] Override http request option.
585
+ * @throws {RequiredError}
586
+ * @memberof OrdersApi
587
+ */
588
+ getOrder(requestParameters, options) {
589
+ return (0, exports.OrdersApiFp)(this.configuration).getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
590
+ }
591
+ /**
592
+ * List available fulfillers for a given fulfillment
593
+ * @summary List available fulfillers
594
+ * @param {OrdersApiListAvailableFulfillersRequest} requestParameters Request parameters.
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ * @memberof OrdersApi
598
+ */
599
+ listAvailableFulfillers(requestParameters, options) {
600
+ return (0, exports.OrdersApiFp)(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
269
601
  }
270
602
  /**
271
603
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
@@ -278,6 +610,17 @@ class OrdersApi extends base_1.BaseAPI {
278
610
  listOrders(requestParameters, options) {
279
611
  return (0, exports.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));
280
612
  }
613
+ /**
614
+ * Update a fulfillment that belongs to an order placed through the platform
615
+ * @summary Update fulfillment
616
+ * @param {OrdersApiUpdateFulfillmentRequest} requestParameters Request parameters.
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ * @memberof OrdersApi
620
+ */
621
+ updateFulfillment(requestParameters, options) {
622
+ return (0, exports.OrdersApiFp)(this.configuration).updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(this.axios, this.basePath));
623
+ }
281
624
  }
282
625
  exports.OrdersApi = OrdersApi;
283
626
  /**
@@ -293,10 +636,11 @@ const PlatformApiAxiosParamCreator = function (configuration) {
293
636
  * @param {string} platformId The platform identifier
294
637
  * @param {string} start Start of date range to filter by when orders were placed
295
638
  * @param {string} [end] End of date range to filter by when orders were placed
639
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
296
640
  * @param {*} [options] Override http request option.
297
641
  * @throws {RequiredError}
298
642
  */
299
- 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 = {}) {
643
+ 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 = {}) {
300
644
  // verify required parameter 'project' is not null or undefined
301
645
  (0, common_1.assertParamExists)('exportOrders', 'project', project);
302
646
  // verify required parameter 'platformId' is not null or undefined
@@ -332,6 +676,97 @@ const PlatformApiAxiosParamCreator = function (configuration) {
332
676
  end.toISOString() :
333
677
  end;
334
678
  }
679
+ if (search !== undefined) {
680
+ localVarQueryParameter['search'] = search;
681
+ }
682
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
683
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
684
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
685
+ return {
686
+ url: (0, common_1.toPathString)(localVarUrlObj),
687
+ options: localVarRequestOptions,
688
+ };
689
+ }),
690
+ /**
691
+ * Get a fulfillment for a platform by a given fulfillment ID.
692
+ * @summary Get fulfillment
693
+ * @param {string} project Project unique identifier
694
+ * @param {string} platformId The platform identifier
695
+ * @param {string} fulfillmentId The fulfillment identifier
696
+ * @param {*} [options] Override http request option.
697
+ * @throws {RequiredError}
698
+ */
699
+ 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 = {}) {
700
+ // verify required parameter 'project' is not null or undefined
701
+ (0, common_1.assertParamExists)('getFulfillment', 'project', project);
702
+ // verify required parameter 'platformId' is not null or undefined
703
+ (0, common_1.assertParamExists)('getFulfillment', 'platformId', platformId);
704
+ // verify required parameter 'fulfillmentId' is not null or undefined
705
+ (0, common_1.assertParamExists)('getFulfillment', 'fulfillmentId', fulfillmentId);
706
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
707
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
708
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
709
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
710
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
711
+ let baseOptions;
712
+ if (configuration) {
713
+ baseOptions = configuration.baseOptions;
714
+ }
715
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
716
+ const localVarHeaderParameter = {};
717
+ const localVarQueryParameter = {};
718
+ // authentication session-oauth required
719
+ // oauth required
720
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
721
+ // authentication api-key required
722
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
723
+ if (project !== undefined) {
724
+ localVarQueryParameter['project'] = project;
725
+ }
726
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
727
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
728
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
729
+ return {
730
+ url: (0, common_1.toPathString)(localVarUrlObj),
731
+ options: localVarRequestOptions,
732
+ };
733
+ }),
734
+ /**
735
+ * Get an order for a platform by a given order ID.
736
+ * @summary Get order
737
+ * @param {string} project Project unique identifier
738
+ * @param {string} platformId The platform identifier
739
+ * @param {string} orderId The order identifier
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ 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 = {}) {
744
+ // verify required parameter 'project' is not null or undefined
745
+ (0, common_1.assertParamExists)('getOrder', 'project', project);
746
+ // verify required parameter 'platformId' is not null or undefined
747
+ (0, common_1.assertParamExists)('getOrder', 'platformId', platformId);
748
+ // verify required parameter 'orderId' is not null or undefined
749
+ (0, common_1.assertParamExists)('getOrder', 'orderId', orderId);
750
+ const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
751
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
752
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
753
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
754
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
755
+ let baseOptions;
756
+ if (configuration) {
757
+ baseOptions = configuration.baseOptions;
758
+ }
759
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
760
+ const localVarHeaderParameter = {};
761
+ const localVarQueryParameter = {};
762
+ // authentication session-oauth required
763
+ // oauth required
764
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
765
+ // authentication api-key required
766
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
767
+ if (project !== undefined) {
768
+ localVarQueryParameter['project'] = project;
769
+ }
335
770
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
336
771
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
772
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -376,6 +811,50 @@ const PlatformApiAxiosParamCreator = function (configuration) {
376
811
  options: localVarRequestOptions,
377
812
  };
378
813
  }),
814
+ /**
815
+ * List available fulfillers for a given fulfillment
816
+ * @summary List available fulfillers
817
+ * @param {string} project Project unique identifier
818
+ * @param {string} platformId The platform identifier
819
+ * @param {string} fulfillmentId The fulfillment identifier
820
+ * @param {*} [options] Override http request option.
821
+ * @throws {RequiredError}
822
+ */
823
+ 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 = {}) {
824
+ // verify required parameter 'project' is not null or undefined
825
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'project', project);
826
+ // verify required parameter 'platformId' is not null or undefined
827
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'platformId', platformId);
828
+ // verify required parameter 'fulfillmentId' is not null or undefined
829
+ (0, common_1.assertParamExists)('listAvailableFulfillers', 'fulfillmentId', fulfillmentId);
830
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
831
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
832
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
833
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
834
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
835
+ let baseOptions;
836
+ if (configuration) {
837
+ baseOptions = configuration.baseOptions;
838
+ }
839
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
840
+ const localVarHeaderParameter = {};
841
+ const localVarQueryParameter = {};
842
+ // authentication session-oauth required
843
+ // oauth required
844
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
845
+ // authentication api-key required
846
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
847
+ if (project !== undefined) {
848
+ localVarQueryParameter['project'] = project;
849
+ }
850
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
851
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
852
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
853
+ return {
854
+ url: (0, common_1.toPathString)(localVarUrlObj),
855
+ options: localVarRequestOptions,
856
+ };
857
+ }),
379
858
  /**
380
859
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
381
860
  * @summary List orders
@@ -440,6 +919,55 @@ const PlatformApiAxiosParamCreator = function (configuration) {
440
919
  options: localVarRequestOptions,
441
920
  };
442
921
  }),
922
+ /**
923
+ * Update a fulfillment that belongs to an order placed through the platform
924
+ * @summary Update fulfillment
925
+ * @param {string} project Project unique identifier
926
+ * @param {string} platformId The platform identifier
927
+ * @param {string} fulfillmentId The fulfillment identifier
928
+ * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
929
+ * @param {*} [options] Override http request option.
930
+ * @throws {RequiredError}
931
+ */
932
+ 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 = {}) {
933
+ // verify required parameter 'project' is not null or undefined
934
+ (0, common_1.assertParamExists)('updateFulfillment', 'project', project);
935
+ // verify required parameter 'platformId' is not null or undefined
936
+ (0, common_1.assertParamExists)('updateFulfillment', 'platformId', platformId);
937
+ // verify required parameter 'fulfillmentId' is not null or undefined
938
+ (0, common_1.assertParamExists)('updateFulfillment', 'fulfillmentId', fulfillmentId);
939
+ // verify required parameter 'updateFulfillmentRequest' is not null or undefined
940
+ (0, common_1.assertParamExists)('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest);
941
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
942
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
943
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
944
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
945
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
946
+ let baseOptions;
947
+ if (configuration) {
948
+ baseOptions = configuration.baseOptions;
949
+ }
950
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
951
+ const localVarHeaderParameter = {};
952
+ const localVarQueryParameter = {};
953
+ // authentication session-oauth required
954
+ // oauth required
955
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
956
+ // authentication api-key required
957
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
958
+ if (project !== undefined) {
959
+ localVarQueryParameter['project'] = project;
960
+ }
961
+ localVarHeaderParameter['Content-Type'] = 'application/json';
962
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
963
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
964
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
965
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFulfillmentRequest, localVarRequestOptions, configuration);
966
+ return {
967
+ url: (0, common_1.toPathString)(localVarUrlObj),
968
+ options: localVarRequestOptions,
969
+ };
970
+ }),
443
971
  /**
444
972
  *
445
973
  * @summary Update platform
@@ -498,18 +1026,55 @@ const PlatformApiFp = function (configuration) {
498
1026
  * @param {string} platformId The platform identifier
499
1027
  * @param {string} start Start of date range to filter by when orders were placed
500
1028
  * @param {string} [end] End of date range to filter by when orders were placed
1029
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
501
1030
  * @param {*} [options] Override http request option.
502
1031
  * @throws {RequiredError}
503
1032
  */
504
- exportOrders(project, platformId, start, end, options) {
1033
+ exportOrders(project, platformId, start, end, search, options) {
505
1034
  return __awaiter(this, void 0, void 0, function* () {
506
1035
  var _a, _b, _c;
507
- const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
1036
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.exportOrders(project, platformId, start, end, search, options);
508
1037
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
509
1038
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.exportOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
510
1039
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
511
1040
  });
512
1041
  },
1042
+ /**
1043
+ * Get a fulfillment for a platform by a given fulfillment ID.
1044
+ * @summary Get fulfillment
1045
+ * @param {string} project Project unique identifier
1046
+ * @param {string} platformId The platform identifier
1047
+ * @param {string} fulfillmentId The fulfillment identifier
1048
+ * @param {*} [options] Override http request option.
1049
+ * @throws {RequiredError}
1050
+ */
1051
+ getFulfillment(project, platformId, fulfillmentId, options) {
1052
+ return __awaiter(this, void 0, void 0, function* () {
1053
+ var _a, _b, _c;
1054
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFulfillment(project, platformId, fulfillmentId, options);
1055
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1056
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.getFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1057
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1058
+ });
1059
+ },
1060
+ /**
1061
+ * Get an order for a platform by a given order ID.
1062
+ * @summary Get order
1063
+ * @param {string} project Project unique identifier
1064
+ * @param {string} platformId The platform identifier
1065
+ * @param {string} orderId The order identifier
1066
+ * @param {*} [options] Override http request option.
1067
+ * @throws {RequiredError}
1068
+ */
1069
+ getOrder(project, platformId, orderId, options) {
1070
+ return __awaiter(this, void 0, void 0, function* () {
1071
+ var _a, _b, _c;
1072
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(project, platformId, orderId, options);
1073
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1074
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1075
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1076
+ });
1077
+ },
513
1078
  /**
514
1079
  *
515
1080
  * @summary Get platform details
@@ -526,6 +1091,24 @@ const PlatformApiFp = function (configuration) {
526
1091
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
527
1092
  });
528
1093
  },
1094
+ /**
1095
+ * List available fulfillers for a given fulfillment
1096
+ * @summary List available fulfillers
1097
+ * @param {string} project Project unique identifier
1098
+ * @param {string} platformId The platform identifier
1099
+ * @param {string} fulfillmentId The fulfillment identifier
1100
+ * @param {*} [options] Override http request option.
1101
+ * @throws {RequiredError}
1102
+ */
1103
+ listAvailableFulfillers(project, platformId, fulfillmentId, options) {
1104
+ return __awaiter(this, void 0, void 0, function* () {
1105
+ var _a, _b, _c;
1106
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailableFulfillers(project, platformId, fulfillmentId, options);
1107
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1108
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.listAvailableFulfillers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1109
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1110
+ });
1111
+ },
529
1112
  /**
530
1113
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
531
1114
  * @summary List orders
@@ -548,6 +1131,25 @@ const PlatformApiFp = function (configuration) {
548
1131
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
549
1132
  });
550
1133
  },
1134
+ /**
1135
+ * Update a fulfillment that belongs to an order placed through the platform
1136
+ * @summary Update fulfillment
1137
+ * @param {string} project Project unique identifier
1138
+ * @param {string} platformId The platform identifier
1139
+ * @param {string} fulfillmentId The fulfillment identifier
1140
+ * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
1141
+ * @param {*} [options] Override http request option.
1142
+ * @throws {RequiredError}
1143
+ */
1144
+ updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options) {
1145
+ return __awaiter(this, void 0, void 0, function* () {
1146
+ var _a, _b, _c;
1147
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFulfillment(project, platformId, fulfillmentId, updateFulfillmentRequest, options);
1148
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1149
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PlatformApi.updateFulfillment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1150
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1151
+ });
1152
+ },
551
1153
  /**
552
1154
  *
553
1155
  * @summary Update platform
@@ -583,7 +1185,27 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
583
1185
  * @throws {RequiredError}
584
1186
  */
585
1187
  exportOrders(requestParameters, options) {
586
- return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
1188
+ return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
1189
+ },
1190
+ /**
1191
+ * Get a fulfillment for a platform by a given fulfillment ID.
1192
+ * @summary Get fulfillment
1193
+ * @param {PlatformApiGetFulfillmentRequest} requestParameters Request parameters.
1194
+ * @param {*} [options] Override http request option.
1195
+ * @throws {RequiredError}
1196
+ */
1197
+ getFulfillment(requestParameters, options) {
1198
+ return localVarFp.getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
1199
+ },
1200
+ /**
1201
+ * Get an order for a platform by a given order ID.
1202
+ * @summary Get order
1203
+ * @param {PlatformApiGetOrderRequest} requestParameters Request parameters.
1204
+ * @param {*} [options] Override http request option.
1205
+ * @throws {RequiredError}
1206
+ */
1207
+ getOrder(requestParameters, options) {
1208
+ return localVarFp.getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(axios, basePath));
587
1209
  },
588
1210
  /**
589
1211
  *
@@ -595,6 +1217,16 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
595
1217
  getPlatform(requestParameters, options) {
596
1218
  return localVarFp.getPlatform(requestParameters.project, options).then((request) => request(axios, basePath));
597
1219
  },
1220
+ /**
1221
+ * List available fulfillers for a given fulfillment
1222
+ * @summary List available fulfillers
1223
+ * @param {PlatformApiListAvailableFulfillersRequest} requestParameters Request parameters.
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ listAvailableFulfillers(requestParameters, options) {
1228
+ return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
1229
+ },
598
1230
  /**
599
1231
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
600
1232
  * @summary List orders
@@ -605,6 +1237,16 @@ const PlatformApiFactory = function (configuration, basePath, axios) {
605
1237
  listOrders(requestParameters, options) {
606
1238
  return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
607
1239
  },
1240
+ /**
1241
+ * Update a fulfillment that belongs to an order placed through the platform
1242
+ * @summary Update fulfillment
1243
+ * @param {PlatformApiUpdateFulfillmentRequest} requestParameters Request parameters.
1244
+ * @param {*} [options] Override http request option.
1245
+ * @throws {RequiredError}
1246
+ */
1247
+ updateFulfillment(requestParameters, options) {
1248
+ return localVarFp.updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(axios, basePath));
1249
+ },
608
1250
  /**
609
1251
  *
610
1252
  * @summary Update platform
@@ -634,7 +1276,29 @@ class PlatformApi extends base_1.BaseAPI {
634
1276
  * @memberof PlatformApi
635
1277
  */
636
1278
  exportOrders(requestParameters, options) {
637
- return (0, exports.PlatformApiFp)(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
1279
+ 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
+ }
1281
+ /**
1282
+ * Get a fulfillment for a platform by a given fulfillment ID.
1283
+ * @summary Get fulfillment
1284
+ * @param {PlatformApiGetFulfillmentRequest} requestParameters Request parameters.
1285
+ * @param {*} [options] Override http request option.
1286
+ * @throws {RequiredError}
1287
+ * @memberof PlatformApi
1288
+ */
1289
+ getFulfillment(requestParameters, options) {
1290
+ return (0, exports.PlatformApiFp)(this.configuration).getFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
1291
+ }
1292
+ /**
1293
+ * Get an order for a platform by a given order ID.
1294
+ * @summary Get order
1295
+ * @param {PlatformApiGetOrderRequest} requestParameters Request parameters.
1296
+ * @param {*} [options] Override http request option.
1297
+ * @throws {RequiredError}
1298
+ * @memberof PlatformApi
1299
+ */
1300
+ getOrder(requestParameters, options) {
1301
+ return (0, exports.PlatformApiFp)(this.configuration).getOrder(requestParameters.project, requestParameters.platformId, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
638
1302
  }
639
1303
  /**
640
1304
  *
@@ -647,6 +1311,17 @@ class PlatformApi extends base_1.BaseAPI {
647
1311
  getPlatform(requestParameters, options) {
648
1312
  return (0, exports.PlatformApiFp)(this.configuration).getPlatform(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
649
1313
  }
1314
+ /**
1315
+ * List available fulfillers for a given fulfillment
1316
+ * @summary List available fulfillers
1317
+ * @param {PlatformApiListAvailableFulfillersRequest} requestParameters Request parameters.
1318
+ * @param {*} [options] Override http request option.
1319
+ * @throws {RequiredError}
1320
+ * @memberof PlatformApi
1321
+ */
1322
+ listAvailableFulfillers(requestParameters, options) {
1323
+ return (0, exports.PlatformApiFp)(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
1324
+ }
650
1325
  /**
651
1326
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
652
1327
  * @summary List orders
@@ -658,6 +1333,17 @@ class PlatformApi extends base_1.BaseAPI {
658
1333
  listOrders(requestParameters, options) {
659
1334
  return (0, exports.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));
660
1335
  }
1336
+ /**
1337
+ * Update a fulfillment that belongs to an order placed through the platform
1338
+ * @summary Update fulfillment
1339
+ * @param {PlatformApiUpdateFulfillmentRequest} requestParameters Request parameters.
1340
+ * @param {*} [options] Override http request option.
1341
+ * @throws {RequiredError}
1342
+ * @memberof PlatformApi
1343
+ */
1344
+ updateFulfillment(requestParameters, options) {
1345
+ return (0, exports.PlatformApiFp)(this.configuration).updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(this.axios, this.basePath));
1346
+ }
661
1347
  /**
662
1348
  *
663
1349
  * @summary Update platform