@teemill/platform 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/api.ts +1234 -50
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +868 -1
- package/dist/api.js +454 -2
- 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 +868 -1
- package/dist/esm/api.js +449 -1
- 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/api.ts
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.4.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -23,6 +23,61 @@ import type { RequestArgs } from './base';
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* A person\'s address.
|
|
28
|
+
* @export
|
|
29
|
+
* @interface Address
|
|
30
|
+
*/
|
|
31
|
+
export interface Address {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof Address
|
|
36
|
+
*/
|
|
37
|
+
'contactName': string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof Address
|
|
42
|
+
*/
|
|
43
|
+
'company'?: string;
|
|
44
|
+
/**
|
|
45
|
+
* First line of the address.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof Address
|
|
48
|
+
*/
|
|
49
|
+
'line1': string;
|
|
50
|
+
/**
|
|
51
|
+
* Second line of the address.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof Address
|
|
54
|
+
*/
|
|
55
|
+
'line2'?: string;
|
|
56
|
+
/**
|
|
57
|
+
* City of the address.
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof Address
|
|
60
|
+
*/
|
|
61
|
+
'city': string;
|
|
62
|
+
/**
|
|
63
|
+
* Postal code of the address.
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof Address
|
|
66
|
+
*/
|
|
67
|
+
'postalCode'?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Country of the address (ISO 3166-1 alpha-2).
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof Address
|
|
72
|
+
*/
|
|
73
|
+
'country': string;
|
|
74
|
+
/**
|
|
75
|
+
* State of the address.
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof Address
|
|
78
|
+
*/
|
|
79
|
+
'state'?: string;
|
|
80
|
+
}
|
|
26
81
|
/**
|
|
27
82
|
*
|
|
28
83
|
* @export
|
|
@@ -42,6 +97,379 @@ export interface ApiError {
|
|
|
42
97
|
*/
|
|
43
98
|
'message': string;
|
|
44
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Order recipient contact information, used only for courier tracking/updates.
|
|
102
|
+
* @export
|
|
103
|
+
* @interface ContactInformation
|
|
104
|
+
*/
|
|
105
|
+
export interface ContactInformation {
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof ContactInformation
|
|
110
|
+
*/
|
|
111
|
+
'email': string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof ContactInformation
|
|
116
|
+
*/
|
|
117
|
+
'phone'?: string | null;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @export
|
|
122
|
+
* @interface DeliveryEstimates
|
|
123
|
+
*/
|
|
124
|
+
export interface DeliveryEstimates {
|
|
125
|
+
/**
|
|
126
|
+
* ISO 8601 Timestamp
|
|
127
|
+
* @type {string}
|
|
128
|
+
* @memberof DeliveryEstimates
|
|
129
|
+
*/
|
|
130
|
+
'min'?: string;
|
|
131
|
+
/**
|
|
132
|
+
* ISO 8601 Timestamp
|
|
133
|
+
* @type {string}
|
|
134
|
+
* @memberof DeliveryEstimates
|
|
135
|
+
*/
|
|
136
|
+
'max'?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @export
|
|
141
|
+
* @interface ExportOrders202Response
|
|
142
|
+
*/
|
|
143
|
+
export interface ExportOrders202Response {
|
|
144
|
+
/**
|
|
145
|
+
* A message describing the export status
|
|
146
|
+
* @type {string}
|
|
147
|
+
* @memberof ExportOrders202Response
|
|
148
|
+
*/
|
|
149
|
+
'message'?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @export
|
|
154
|
+
* @interface Fulfillment
|
|
155
|
+
*/
|
|
156
|
+
export interface Fulfillment {
|
|
157
|
+
/**
|
|
158
|
+
* Unique fulfillment id
|
|
159
|
+
* @type {string}
|
|
160
|
+
* @memberof Fulfillment
|
|
161
|
+
*/
|
|
162
|
+
'id'?: string;
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @type {OrderStatus}
|
|
166
|
+
* @memberof Fulfillment
|
|
167
|
+
*/
|
|
168
|
+
'status'?: OrderStatus;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @type {Array<FulfillmentItem>}
|
|
172
|
+
* @memberof Fulfillment
|
|
173
|
+
*/
|
|
174
|
+
'items'?: Array<FulfillmentItem>;
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @type {OrderTracking}
|
|
178
|
+
* @memberof Fulfillment
|
|
179
|
+
*/
|
|
180
|
+
'tracking'?: OrderTracking | null;
|
|
181
|
+
/**
|
|
182
|
+
* Shipping method currently set
|
|
183
|
+
* @type {ShippingMethod}
|
|
184
|
+
* @memberof Fulfillment
|
|
185
|
+
*/
|
|
186
|
+
'shippingMethod'?: ShippingMethod;
|
|
187
|
+
/**
|
|
188
|
+
* Shipping methods available for this fulfillment. One of these should be used to confirm the fulfillment.
|
|
189
|
+
* @type {Array<ShippingMethod>}
|
|
190
|
+
* @memberof Fulfillment
|
|
191
|
+
*/
|
|
192
|
+
'availableShippingMethods'?: Array<ShippingMethod>;
|
|
193
|
+
/**
|
|
194
|
+
* Weight of the package being shipped in grams
|
|
195
|
+
* @type {number}
|
|
196
|
+
* @memberof Fulfillment
|
|
197
|
+
*/
|
|
198
|
+
'packageWeight'?: number;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @export
|
|
205
|
+
* @interface FulfillmentItem
|
|
206
|
+
*/
|
|
207
|
+
export interface FulfillmentItem {
|
|
208
|
+
/**
|
|
209
|
+
* Unique fulfillment item id
|
|
210
|
+
* @type {string}
|
|
211
|
+
* @memberof FulfillmentItem
|
|
212
|
+
*/
|
|
213
|
+
'id'?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Id of the order item being fulfilled
|
|
216
|
+
* @type {string}
|
|
217
|
+
* @memberof FulfillmentItem
|
|
218
|
+
*/
|
|
219
|
+
'itemId'?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Number of this item being fulfilled
|
|
222
|
+
* @type {number}
|
|
223
|
+
* @memberof FulfillmentItem
|
|
224
|
+
*/
|
|
225
|
+
'quantity'?: number;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @export
|
|
230
|
+
* @interface Order
|
|
231
|
+
*/
|
|
232
|
+
export interface Order {
|
|
233
|
+
/**
|
|
234
|
+
* Unique object identifier
|
|
235
|
+
* @type {string}
|
|
236
|
+
* @memberof Order
|
|
237
|
+
*/
|
|
238
|
+
'id'?: string;
|
|
239
|
+
/**
|
|
240
|
+
* A reference to the resource location
|
|
241
|
+
* @type {string}
|
|
242
|
+
* @memberof Order
|
|
243
|
+
*/
|
|
244
|
+
'ref'?: string;
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @type {OrderStatus}
|
|
248
|
+
* @memberof Order
|
|
249
|
+
*/
|
|
250
|
+
'status'?: OrderStatus;
|
|
251
|
+
/**
|
|
252
|
+
*
|
|
253
|
+
* @type {ContactInformation}
|
|
254
|
+
* @memberof Order
|
|
255
|
+
*/
|
|
256
|
+
'contactInformation': ContactInformation;
|
|
257
|
+
/**
|
|
258
|
+
*
|
|
259
|
+
* @type {Address}
|
|
260
|
+
* @memberof Order
|
|
261
|
+
*/
|
|
262
|
+
'shippingAddress': Address;
|
|
263
|
+
/**
|
|
264
|
+
* ISO 8601 Timestamp
|
|
265
|
+
* @type {string}
|
|
266
|
+
* @memberof Order
|
|
267
|
+
*/
|
|
268
|
+
'createdAt'?: string;
|
|
269
|
+
/**
|
|
270
|
+
* ISO 8601 Timestamp
|
|
271
|
+
* @type {string}
|
|
272
|
+
* @memberof Order
|
|
273
|
+
*/
|
|
274
|
+
'updatedAt'?: string;
|
|
275
|
+
/**
|
|
276
|
+
* A custom reference to the merchant\'s order that will be displayed on the shipping label.
|
|
277
|
+
* @type {string}
|
|
278
|
+
* @memberof Order
|
|
279
|
+
*/
|
|
280
|
+
'merchantReference'?: string | null;
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* @type {Array<Fulfillment>}
|
|
284
|
+
* @memberof Order
|
|
285
|
+
*/
|
|
286
|
+
'fulfillments'?: Array<Fulfillment>;
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
* @type {Array<OrderItem>}
|
|
290
|
+
* @memberof Order
|
|
291
|
+
*/
|
|
292
|
+
'items': Array<OrderItem>;
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @type {Price}
|
|
296
|
+
* @memberof Order
|
|
297
|
+
*/
|
|
298
|
+
'totalPrice'?: Price;
|
|
299
|
+
/**
|
|
300
|
+
*
|
|
301
|
+
* @type {Price}
|
|
302
|
+
* @memberof Order
|
|
303
|
+
*/
|
|
304
|
+
'taxPrice'?: Price;
|
|
305
|
+
/**
|
|
306
|
+
*
|
|
307
|
+
* @type {Price}
|
|
308
|
+
* @memberof Order
|
|
309
|
+
*/
|
|
310
|
+
'subtotalPrice'?: Price;
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* @type {Price}
|
|
314
|
+
* @memberof Order
|
|
315
|
+
*/
|
|
316
|
+
'discountPrice'?: Price;
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @type {Price}
|
|
320
|
+
* @memberof Order
|
|
321
|
+
*/
|
|
322
|
+
'shippingPrice'?: Price;
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
* @type {Origin}
|
|
326
|
+
* @memberof Order
|
|
327
|
+
*/
|
|
328
|
+
'origin'?: Origin;
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @type {Array<StatusHistoryItem>}
|
|
332
|
+
* @memberof Order
|
|
333
|
+
*/
|
|
334
|
+
'statusHistory'?: Array<StatusHistoryItem>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
*
|
|
340
|
+
* @export
|
|
341
|
+
* @interface OrderItem
|
|
342
|
+
*/
|
|
343
|
+
export interface OrderItem {
|
|
344
|
+
/**
|
|
345
|
+
* Unique object identifier
|
|
346
|
+
* @type {string}
|
|
347
|
+
* @memberof OrderItem
|
|
348
|
+
*/
|
|
349
|
+
'id'?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Reference URL to the order item variant
|
|
352
|
+
* @type {string}
|
|
353
|
+
* @memberof OrderItem
|
|
354
|
+
*/
|
|
355
|
+
'variantRef': string;
|
|
356
|
+
/**
|
|
357
|
+
*
|
|
358
|
+
* @type {number}
|
|
359
|
+
* @memberof OrderItem
|
|
360
|
+
*/
|
|
361
|
+
'quantity': number;
|
|
362
|
+
/**
|
|
363
|
+
*
|
|
364
|
+
* @type {Price}
|
|
365
|
+
* @memberof OrderItem
|
|
366
|
+
*/
|
|
367
|
+
'totalPrice'?: Price;
|
|
368
|
+
/**
|
|
369
|
+
* This is an estimate until the order has been confirmed
|
|
370
|
+
* @type {Price}
|
|
371
|
+
* @memberof OrderItem
|
|
372
|
+
*/
|
|
373
|
+
'taxPrice'?: Price;
|
|
374
|
+
/**
|
|
375
|
+
*
|
|
376
|
+
* @type {Price}
|
|
377
|
+
* @memberof OrderItem
|
|
378
|
+
*/
|
|
379
|
+
'subtotalPrice'?: Price;
|
|
380
|
+
/**
|
|
381
|
+
*
|
|
382
|
+
* @type {Price}
|
|
383
|
+
* @memberof OrderItem
|
|
384
|
+
*/
|
|
385
|
+
'discountPrice'?: Price;
|
|
386
|
+
/**
|
|
387
|
+
* The price you charged the recipient for each item. It\'s highly recommended if you have international orders as it aids customs issues.
|
|
388
|
+
* @type {Price}
|
|
389
|
+
* @memberof OrderItem
|
|
390
|
+
*/
|
|
391
|
+
'recipientCost'?: Price;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
*
|
|
395
|
+
* @export
|
|
396
|
+
* @enum {string}
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
export const OrderStatus = {
|
|
400
|
+
New: 'new',
|
|
401
|
+
Paid: 'paid',
|
|
402
|
+
Processing: 'processing',
|
|
403
|
+
Complete: 'complete',
|
|
404
|
+
Refunded: 'refunded'
|
|
405
|
+
} as const;
|
|
406
|
+
|
|
407
|
+
export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus];
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
*
|
|
412
|
+
* @export
|
|
413
|
+
* @interface OrderTracking
|
|
414
|
+
*/
|
|
415
|
+
export interface OrderTracking {
|
|
416
|
+
/**
|
|
417
|
+
*
|
|
418
|
+
* @type {string}
|
|
419
|
+
* @memberof OrderTracking
|
|
420
|
+
*/
|
|
421
|
+
'courier'?: string;
|
|
422
|
+
/**
|
|
423
|
+
*
|
|
424
|
+
* @type {string}
|
|
425
|
+
* @memberof OrderTracking
|
|
426
|
+
*/
|
|
427
|
+
'code'?: string;
|
|
428
|
+
/**
|
|
429
|
+
*
|
|
430
|
+
* @type {string}
|
|
431
|
+
* @memberof OrderTracking
|
|
432
|
+
*/
|
|
433
|
+
'url'?: string;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
*
|
|
437
|
+
* @export
|
|
438
|
+
* @interface OrdersResponse
|
|
439
|
+
*/
|
|
440
|
+
export interface OrdersResponse {
|
|
441
|
+
/**
|
|
442
|
+
*
|
|
443
|
+
* @type {Array<Order>}
|
|
444
|
+
* @memberof OrdersResponse
|
|
445
|
+
*/
|
|
446
|
+
'orders'?: Array<Order>;
|
|
447
|
+
/**
|
|
448
|
+
*
|
|
449
|
+
* @type {number}
|
|
450
|
+
* @memberof OrdersResponse
|
|
451
|
+
*/
|
|
452
|
+
'nextPageToken'?: number;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
*
|
|
456
|
+
* @export
|
|
457
|
+
* @interface Origin
|
|
458
|
+
*/
|
|
459
|
+
export interface Origin {
|
|
460
|
+
/**
|
|
461
|
+
*
|
|
462
|
+
* @type {string}
|
|
463
|
+
* @memberof Origin
|
|
464
|
+
*/
|
|
465
|
+
'code'?: string;
|
|
466
|
+
/**
|
|
467
|
+
*
|
|
468
|
+
* @type {boolean}
|
|
469
|
+
* @memberof Origin
|
|
470
|
+
*/
|
|
471
|
+
'isPaid'?: boolean;
|
|
472
|
+
}
|
|
45
473
|
/**
|
|
46
474
|
*
|
|
47
475
|
* @export
|
|
@@ -51,86 +479,595 @@ export interface Platform {
|
|
|
51
479
|
/**
|
|
52
480
|
*
|
|
53
481
|
* @type {string}
|
|
54
|
-
* @memberof Platform
|
|
482
|
+
* @memberof Platform
|
|
483
|
+
*/
|
|
484
|
+
'id': string;
|
|
485
|
+
/**
|
|
486
|
+
*
|
|
487
|
+
* @type {string}
|
|
488
|
+
* @memberof Platform
|
|
489
|
+
*/
|
|
490
|
+
'name': string;
|
|
491
|
+
/**
|
|
492
|
+
*
|
|
493
|
+
* @type {Array<string>}
|
|
494
|
+
* @memberof Platform
|
|
495
|
+
*/
|
|
496
|
+
'domains': Array<string>;
|
|
497
|
+
/**
|
|
498
|
+
*
|
|
499
|
+
* @type {Array<PlatformLogo>}
|
|
500
|
+
* @memberof Platform
|
|
501
|
+
*/
|
|
502
|
+
'logos': Array<PlatformLogo>;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* @export
|
|
507
|
+
* @interface PlatformLogo
|
|
508
|
+
*/
|
|
509
|
+
export interface PlatformLogo {
|
|
510
|
+
/**
|
|
511
|
+
*
|
|
512
|
+
* @type {string}
|
|
513
|
+
* @memberof PlatformLogo
|
|
514
|
+
*/
|
|
515
|
+
'url': string;
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* @type {{ [key: string]: string; }}
|
|
519
|
+
* @memberof PlatformLogo
|
|
520
|
+
*/
|
|
521
|
+
'meta': { [key: string]: string; };
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Standard price definition that defines the amount and currency.
|
|
525
|
+
* @export
|
|
526
|
+
* @interface Price
|
|
527
|
+
*/
|
|
528
|
+
export interface Price {
|
|
529
|
+
/**
|
|
530
|
+
* Price including tax in the specified currency.
|
|
531
|
+
* @type {string}
|
|
532
|
+
* @memberof Price
|
|
533
|
+
*/
|
|
534
|
+
'amount'?: string;
|
|
535
|
+
/**
|
|
536
|
+
* Currency code for the currency the price is valued in.
|
|
537
|
+
* @type {string}
|
|
538
|
+
* @memberof Price
|
|
539
|
+
*/
|
|
540
|
+
'currencyCode'?: string;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* @export
|
|
545
|
+
* @interface ShippingMethod
|
|
546
|
+
*/
|
|
547
|
+
export interface ShippingMethod {
|
|
548
|
+
/**
|
|
549
|
+
* Unique object identifier
|
|
550
|
+
* @type {string}
|
|
551
|
+
* @memberof ShippingMethod
|
|
552
|
+
*/
|
|
553
|
+
'id'?: string;
|
|
554
|
+
/**
|
|
555
|
+
*
|
|
556
|
+
* @type {string}
|
|
557
|
+
* @memberof ShippingMethod
|
|
558
|
+
*/
|
|
559
|
+
'name'?: string;
|
|
560
|
+
/**
|
|
561
|
+
*
|
|
562
|
+
* @type {string}
|
|
563
|
+
* @memberof ShippingMethod
|
|
564
|
+
*/
|
|
565
|
+
'description'?: string;
|
|
566
|
+
/**
|
|
567
|
+
*
|
|
568
|
+
* @type {DeliveryEstimates}
|
|
569
|
+
* @memberof ShippingMethod
|
|
570
|
+
*/
|
|
571
|
+
'deliveryEstimates'?: DeliveryEstimates;
|
|
572
|
+
/**
|
|
573
|
+
*
|
|
574
|
+
* @type {Price}
|
|
575
|
+
* @memberof ShippingMethod
|
|
576
|
+
*/
|
|
577
|
+
'totalPrice'?: Price;
|
|
578
|
+
/**
|
|
579
|
+
*
|
|
580
|
+
* @type {Price}
|
|
581
|
+
* @memberof ShippingMethod
|
|
582
|
+
*/
|
|
583
|
+
'taxPrice'?: Price;
|
|
584
|
+
/**
|
|
585
|
+
*
|
|
586
|
+
* @type {Price}
|
|
587
|
+
* @memberof ShippingMethod
|
|
588
|
+
*/
|
|
589
|
+
'subtotalPrice'?: Price;
|
|
590
|
+
/**
|
|
591
|
+
*
|
|
592
|
+
* @type {Price}
|
|
593
|
+
* @memberof ShippingMethod
|
|
594
|
+
*/
|
|
595
|
+
'discountPrice'?: Price;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
*
|
|
599
|
+
* @export
|
|
600
|
+
* @interface StatusHistoryItem
|
|
601
|
+
*/
|
|
602
|
+
export interface StatusHistoryItem {
|
|
603
|
+
/**
|
|
604
|
+
*
|
|
605
|
+
* @type {OrderStatus}
|
|
606
|
+
* @memberof StatusHistoryItem
|
|
607
|
+
*/
|
|
608
|
+
'status'?: OrderStatus;
|
|
609
|
+
/**
|
|
610
|
+
* ISO 8601 Timestamp
|
|
611
|
+
* @type {string}
|
|
612
|
+
* @memberof StatusHistoryItem
|
|
613
|
+
*/
|
|
614
|
+
'createdAt'?: string;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
*
|
|
620
|
+
* @export
|
|
621
|
+
* @interface UpdatePlatformRequest
|
|
622
|
+
*/
|
|
623
|
+
export interface UpdatePlatformRequest {
|
|
624
|
+
/**
|
|
625
|
+
*
|
|
626
|
+
* @type {Array<PlatformLogo>}
|
|
627
|
+
* @memberof UpdatePlatformRequest
|
|
628
|
+
*/
|
|
629
|
+
'logos'?: Array<PlatformLogo>;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
*
|
|
633
|
+
* @export
|
|
634
|
+
* @interface ValidationError
|
|
635
|
+
*/
|
|
636
|
+
export interface ValidationError {
|
|
637
|
+
/**
|
|
638
|
+
*
|
|
639
|
+
* @type {string}
|
|
640
|
+
* @memberof ValidationError
|
|
641
|
+
*/
|
|
642
|
+
'message': string;
|
|
643
|
+
/**
|
|
644
|
+
*
|
|
645
|
+
* @type {{ [key: string]: Array<string>; }}
|
|
646
|
+
* @memberof ValidationError
|
|
647
|
+
*/
|
|
648
|
+
'errors': { [key: string]: Array<string>; };
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* OrdersApi - axios parameter creator
|
|
653
|
+
* @export
|
|
654
|
+
*/
|
|
655
|
+
export const OrdersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
656
|
+
return {
|
|
657
|
+
/**
|
|
658
|
+
* Export orders as a CSV file
|
|
659
|
+
* @summary Export orders
|
|
660
|
+
* @param {string} project Project unique identifier
|
|
661
|
+
* @param {string} platformId The platform identifier
|
|
662
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
663
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
664
|
+
* @param {*} [options] Override http request option.
|
|
665
|
+
* @throws {RequiredError}
|
|
666
|
+
*/
|
|
667
|
+
exportOrders: async (project: string, platformId: string, start: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
668
|
+
// verify required parameter 'project' is not null or undefined
|
|
669
|
+
assertParamExists('exportOrders', 'project', project)
|
|
670
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
671
|
+
assertParamExists('exportOrders', 'platformId', platformId)
|
|
672
|
+
// verify required parameter 'start' is not null or undefined
|
|
673
|
+
assertParamExists('exportOrders', 'start', start)
|
|
674
|
+
const localVarPath = `/v1/platform/{platformId}/orders/export`
|
|
675
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
676
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
677
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
678
|
+
let baseOptions;
|
|
679
|
+
if (configuration) {
|
|
680
|
+
baseOptions = configuration.baseOptions;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
684
|
+
const localVarHeaderParameter = {} as any;
|
|
685
|
+
const localVarQueryParameter = {} as any;
|
|
686
|
+
|
|
687
|
+
// authentication session-oauth required
|
|
688
|
+
// oauth required
|
|
689
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
690
|
+
|
|
691
|
+
// authentication api-key required
|
|
692
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
693
|
+
|
|
694
|
+
if (project !== undefined) {
|
|
695
|
+
localVarQueryParameter['project'] = project;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
if (start !== undefined) {
|
|
699
|
+
localVarQueryParameter['start'] = (start as any instanceof Date) ?
|
|
700
|
+
(start as any).toISOString() :
|
|
701
|
+
start;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
if (end !== undefined) {
|
|
705
|
+
localVarQueryParameter['end'] = (end as any instanceof Date) ?
|
|
706
|
+
(end as any).toISOString() :
|
|
707
|
+
end;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
713
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
714
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
715
|
+
|
|
716
|
+
return {
|
|
717
|
+
url: toPathString(localVarUrlObj),
|
|
718
|
+
options: localVarRequestOptions,
|
|
719
|
+
};
|
|
720
|
+
},
|
|
721
|
+
/**
|
|
722
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
723
|
+
* @summary List orders
|
|
724
|
+
* @param {string} project Project unique identifier
|
|
725
|
+
* @param {string} platformId The platform identifier
|
|
726
|
+
* @param {number} [pageToken] Page reference token
|
|
727
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
728
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
729
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
730
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
731
|
+
* @param {*} [options] Override http request option.
|
|
732
|
+
* @throws {RequiredError}
|
|
733
|
+
*/
|
|
734
|
+
listOrders: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
735
|
+
// verify required parameter 'project' is not null or undefined
|
|
736
|
+
assertParamExists('listOrders', 'project', project)
|
|
737
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
738
|
+
assertParamExists('listOrders', 'platformId', platformId)
|
|
739
|
+
const localVarPath = `/v1/platform/{platformId}/orders`
|
|
740
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
741
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
742
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
743
|
+
let baseOptions;
|
|
744
|
+
if (configuration) {
|
|
745
|
+
baseOptions = configuration.baseOptions;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
749
|
+
const localVarHeaderParameter = {} as any;
|
|
750
|
+
const localVarQueryParameter = {} as any;
|
|
751
|
+
|
|
752
|
+
// authentication session-oauth required
|
|
753
|
+
// oauth required
|
|
754
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
755
|
+
|
|
756
|
+
// authentication api-key required
|
|
757
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
758
|
+
|
|
759
|
+
if (project !== undefined) {
|
|
760
|
+
localVarQueryParameter['project'] = project;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
if (pageToken !== undefined) {
|
|
764
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
if (pageSize !== undefined) {
|
|
768
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
if (search !== undefined) {
|
|
772
|
+
localVarQueryParameter['search'] = search;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
if (start !== undefined) {
|
|
776
|
+
localVarQueryParameter['start'] = (start as any instanceof Date) ?
|
|
777
|
+
(start as any).toISOString() :
|
|
778
|
+
start;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if (end !== undefined) {
|
|
782
|
+
localVarQueryParameter['end'] = (end as any instanceof Date) ?
|
|
783
|
+
(end as any).toISOString() :
|
|
784
|
+
end;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
790
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
791
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
792
|
+
|
|
793
|
+
return {
|
|
794
|
+
url: toPathString(localVarUrlObj),
|
|
795
|
+
options: localVarRequestOptions,
|
|
796
|
+
};
|
|
797
|
+
},
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* OrdersApi - functional programming interface
|
|
803
|
+
* @export
|
|
804
|
+
*/
|
|
805
|
+
export const OrdersApiFp = function(configuration?: Configuration) {
|
|
806
|
+
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration)
|
|
807
|
+
return {
|
|
808
|
+
/**
|
|
809
|
+
* Export orders as a CSV file
|
|
810
|
+
* @summary Export orders
|
|
811
|
+
* @param {string} project Project unique identifier
|
|
812
|
+
* @param {string} platformId The platform identifier
|
|
813
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
814
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
815
|
+
* @param {*} [options] Override http request option.
|
|
816
|
+
* @throws {RequiredError}
|
|
817
|
+
*/
|
|
818
|
+
async exportOrders(project: string, platformId: string, start: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
819
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
|
|
820
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
821
|
+
const localVarOperationServerBasePath = operationServerMap['OrdersApi.exportOrders']?.[localVarOperationServerIndex]?.url;
|
|
822
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
823
|
+
},
|
|
824
|
+
/**
|
|
825
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
826
|
+
* @summary List orders
|
|
827
|
+
* @param {string} project Project unique identifier
|
|
828
|
+
* @param {string} platformId The platform identifier
|
|
829
|
+
* @param {number} [pageToken] Page reference token
|
|
830
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
831
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
832
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
833
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
834
|
+
* @param {*} [options] Override http request option.
|
|
835
|
+
* @throws {RequiredError}
|
|
836
|
+
*/
|
|
837
|
+
async listOrders(project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>> {
|
|
838
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(project, platformId, pageToken, pageSize, search, start, end, options);
|
|
839
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
840
|
+
const localVarOperationServerBasePath = operationServerMap['OrdersApi.listOrders']?.[localVarOperationServerIndex]?.url;
|
|
841
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
842
|
+
},
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* OrdersApi - factory interface
|
|
848
|
+
* @export
|
|
849
|
+
*/
|
|
850
|
+
export const OrdersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
851
|
+
const localVarFp = OrdersApiFp(configuration)
|
|
852
|
+
return {
|
|
853
|
+
/**
|
|
854
|
+
* Export orders as a CSV file
|
|
855
|
+
* @summary Export orders
|
|
856
|
+
* @param {OrdersApiExportOrdersRequest} requestParameters Request parameters.
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
exportOrders(requestParameters: OrdersApiExportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
861
|
+
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
862
|
+
},
|
|
863
|
+
/**
|
|
864
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
865
|
+
* @summary List orders
|
|
866
|
+
* @param {OrdersApiListOrdersRequest} requestParameters Request parameters.
|
|
867
|
+
* @param {*} [options] Override http request option.
|
|
868
|
+
* @throws {RequiredError}
|
|
869
|
+
*/
|
|
870
|
+
listOrders(requestParameters: OrdersApiListOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse> {
|
|
871
|
+
return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
872
|
+
},
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Request parameters for exportOrders operation in OrdersApi.
|
|
878
|
+
* @export
|
|
879
|
+
* @interface OrdersApiExportOrdersRequest
|
|
880
|
+
*/
|
|
881
|
+
export interface OrdersApiExportOrdersRequest {
|
|
882
|
+
/**
|
|
883
|
+
* Project unique identifier
|
|
884
|
+
* @type {string}
|
|
885
|
+
* @memberof OrdersApiExportOrders
|
|
886
|
+
*/
|
|
887
|
+
readonly project: string
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* The platform identifier
|
|
891
|
+
* @type {string}
|
|
892
|
+
* @memberof OrdersApiExportOrders
|
|
893
|
+
*/
|
|
894
|
+
readonly platformId: string
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Start of date range to filter by when orders were placed
|
|
898
|
+
* @type {string}
|
|
899
|
+
* @memberof OrdersApiExportOrders
|
|
900
|
+
*/
|
|
901
|
+
readonly start: string
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* End of date range to filter by when orders were placed
|
|
905
|
+
* @type {string}
|
|
906
|
+
* @memberof OrdersApiExportOrders
|
|
907
|
+
*/
|
|
908
|
+
readonly end?: string
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Request parameters for listOrders operation in OrdersApi.
|
|
913
|
+
* @export
|
|
914
|
+
* @interface OrdersApiListOrdersRequest
|
|
915
|
+
*/
|
|
916
|
+
export interface OrdersApiListOrdersRequest {
|
|
917
|
+
/**
|
|
918
|
+
* Project unique identifier
|
|
919
|
+
* @type {string}
|
|
920
|
+
* @memberof OrdersApiListOrders
|
|
55
921
|
*/
|
|
56
|
-
|
|
922
|
+
readonly project: string
|
|
923
|
+
|
|
57
924
|
/**
|
|
58
|
-
*
|
|
925
|
+
* The platform identifier
|
|
59
926
|
* @type {string}
|
|
60
|
-
* @memberof
|
|
927
|
+
* @memberof OrdersApiListOrders
|
|
61
928
|
*/
|
|
62
|
-
|
|
929
|
+
readonly platformId: string
|
|
930
|
+
|
|
63
931
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @type {
|
|
66
|
-
* @memberof
|
|
932
|
+
* Page reference token
|
|
933
|
+
* @type {number}
|
|
934
|
+
* @memberof OrdersApiListOrders
|
|
67
935
|
*/
|
|
68
|
-
|
|
936
|
+
readonly pageToken?: number
|
|
937
|
+
|
|
69
938
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @type {
|
|
72
|
-
* @memberof
|
|
939
|
+
* Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
940
|
+
* @type {number}
|
|
941
|
+
* @memberof OrdersApiListOrders
|
|
73
942
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @export
|
|
79
|
-
* @interface PlatformLogo
|
|
80
|
-
*/
|
|
81
|
-
export interface PlatformLogo {
|
|
943
|
+
readonly pageSize?: number
|
|
944
|
+
|
|
82
945
|
/**
|
|
83
|
-
*
|
|
946
|
+
* Search term to filter based on order reference, customer name and email
|
|
84
947
|
* @type {string}
|
|
85
|
-
* @memberof
|
|
948
|
+
* @memberof OrdersApiListOrders
|
|
86
949
|
*/
|
|
87
|
-
|
|
950
|
+
readonly search?: string
|
|
951
|
+
|
|
88
952
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {
|
|
91
|
-
* @memberof
|
|
953
|
+
* Start of date range to filter by when orders were placed
|
|
954
|
+
* @type {string}
|
|
955
|
+
* @memberof OrdersApiListOrders
|
|
92
956
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
* @export
|
|
98
|
-
* @interface UpdatePlatformRequest
|
|
99
|
-
*/
|
|
100
|
-
export interface UpdatePlatformRequest {
|
|
957
|
+
readonly start?: string
|
|
958
|
+
|
|
101
959
|
/**
|
|
102
|
-
*
|
|
103
|
-
* @type {
|
|
104
|
-
* @memberof
|
|
960
|
+
* End of date range to filter by when orders were placed
|
|
961
|
+
* @type {string}
|
|
962
|
+
* @memberof OrdersApiListOrders
|
|
105
963
|
*/
|
|
106
|
-
|
|
964
|
+
readonly end?: string
|
|
107
965
|
}
|
|
966
|
+
|
|
108
967
|
/**
|
|
109
|
-
*
|
|
968
|
+
* OrdersApi - object-oriented interface
|
|
110
969
|
* @export
|
|
111
|
-
* @
|
|
970
|
+
* @class OrdersApi
|
|
971
|
+
* @extends {BaseAPI}
|
|
112
972
|
*/
|
|
113
|
-
export
|
|
973
|
+
export class OrdersApi extends BaseAPI {
|
|
114
974
|
/**
|
|
115
|
-
*
|
|
116
|
-
* @
|
|
117
|
-
* @
|
|
975
|
+
* Export orders as a CSV file
|
|
976
|
+
* @summary Export orders
|
|
977
|
+
* @param {OrdersApiExportOrdersRequest} requestParameters Request parameters.
|
|
978
|
+
* @param {*} [options] Override http request option.
|
|
979
|
+
* @throws {RequiredError}
|
|
980
|
+
* @memberof OrdersApi
|
|
118
981
|
*/
|
|
119
|
-
|
|
982
|
+
public exportOrders(requestParameters: OrdersApiExportOrdersRequest, options?: RawAxiosRequestConfig) {
|
|
983
|
+
return OrdersApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
984
|
+
}
|
|
985
|
+
|
|
120
986
|
/**
|
|
121
|
-
*
|
|
122
|
-
* @
|
|
123
|
-
* @
|
|
987
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
988
|
+
* @summary List orders
|
|
989
|
+
* @param {OrdersApiListOrdersRequest} requestParameters Request parameters.
|
|
990
|
+
* @param {*} [options] Override http request option.
|
|
991
|
+
* @throws {RequiredError}
|
|
992
|
+
* @memberof OrdersApi
|
|
124
993
|
*/
|
|
125
|
-
|
|
994
|
+
public listOrders(requestParameters: OrdersApiListOrdersRequest, options?: RawAxiosRequestConfig) {
|
|
995
|
+
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));
|
|
996
|
+
}
|
|
126
997
|
}
|
|
127
998
|
|
|
999
|
+
|
|
1000
|
+
|
|
128
1001
|
/**
|
|
129
1002
|
* PlatformApi - axios parameter creator
|
|
130
1003
|
* @export
|
|
131
1004
|
*/
|
|
132
1005
|
export const PlatformApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
133
1006
|
return {
|
|
1007
|
+
/**
|
|
1008
|
+
* Export orders as a CSV file
|
|
1009
|
+
* @summary Export orders
|
|
1010
|
+
* @param {string} project Project unique identifier
|
|
1011
|
+
* @param {string} platformId The platform identifier
|
|
1012
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
1013
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1014
|
+
* @param {*} [options] Override http request option.
|
|
1015
|
+
* @throws {RequiredError}
|
|
1016
|
+
*/
|
|
1017
|
+
exportOrders: async (project: string, platformId: string, start: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1018
|
+
// verify required parameter 'project' is not null or undefined
|
|
1019
|
+
assertParamExists('exportOrders', 'project', project)
|
|
1020
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1021
|
+
assertParamExists('exportOrders', 'platformId', platformId)
|
|
1022
|
+
// verify required parameter 'start' is not null or undefined
|
|
1023
|
+
assertParamExists('exportOrders', 'start', start)
|
|
1024
|
+
const localVarPath = `/v1/platform/{platformId}/orders/export`
|
|
1025
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
1026
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1027
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1028
|
+
let baseOptions;
|
|
1029
|
+
if (configuration) {
|
|
1030
|
+
baseOptions = configuration.baseOptions;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1034
|
+
const localVarHeaderParameter = {} as any;
|
|
1035
|
+
const localVarQueryParameter = {} as any;
|
|
1036
|
+
|
|
1037
|
+
// authentication session-oauth required
|
|
1038
|
+
// oauth required
|
|
1039
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
1040
|
+
|
|
1041
|
+
// authentication api-key required
|
|
1042
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
1043
|
+
|
|
1044
|
+
if (project !== undefined) {
|
|
1045
|
+
localVarQueryParameter['project'] = project;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
if (start !== undefined) {
|
|
1049
|
+
localVarQueryParameter['start'] = (start as any instanceof Date) ?
|
|
1050
|
+
(start as any).toISOString() :
|
|
1051
|
+
start;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (end !== undefined) {
|
|
1055
|
+
localVarQueryParameter['end'] = (end as any instanceof Date) ?
|
|
1056
|
+
(end as any).toISOString() :
|
|
1057
|
+
end;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1063
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1064
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1065
|
+
|
|
1066
|
+
return {
|
|
1067
|
+
url: toPathString(localVarUrlObj),
|
|
1068
|
+
options: localVarRequestOptions,
|
|
1069
|
+
};
|
|
1070
|
+
},
|
|
134
1071
|
/**
|
|
135
1072
|
*
|
|
136
1073
|
* @summary Get platform details
|
|
@@ -166,6 +1103,83 @@ export const PlatformApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
166
1103
|
|
|
167
1104
|
|
|
168
1105
|
|
|
1106
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1107
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1108
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1109
|
+
|
|
1110
|
+
return {
|
|
1111
|
+
url: toPathString(localVarUrlObj),
|
|
1112
|
+
options: localVarRequestOptions,
|
|
1113
|
+
};
|
|
1114
|
+
},
|
|
1115
|
+
/**
|
|
1116
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1117
|
+
* @summary List orders
|
|
1118
|
+
* @param {string} project Project unique identifier
|
|
1119
|
+
* @param {string} platformId The platform identifier
|
|
1120
|
+
* @param {number} [pageToken] Page reference token
|
|
1121
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
1122
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
1123
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
1124
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1125
|
+
* @param {*} [options] Override http request option.
|
|
1126
|
+
* @throws {RequiredError}
|
|
1127
|
+
*/
|
|
1128
|
+
listOrders: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1129
|
+
// verify required parameter 'project' is not null or undefined
|
|
1130
|
+
assertParamExists('listOrders', 'project', project)
|
|
1131
|
+
// verify required parameter 'platformId' is not null or undefined
|
|
1132
|
+
assertParamExists('listOrders', 'platformId', platformId)
|
|
1133
|
+
const localVarPath = `/v1/platform/{platformId}/orders`
|
|
1134
|
+
.replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
|
|
1135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1136
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1137
|
+
let baseOptions;
|
|
1138
|
+
if (configuration) {
|
|
1139
|
+
baseOptions = configuration.baseOptions;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1143
|
+
const localVarHeaderParameter = {} as any;
|
|
1144
|
+
const localVarQueryParameter = {} as any;
|
|
1145
|
+
|
|
1146
|
+
// authentication session-oauth required
|
|
1147
|
+
// oauth required
|
|
1148
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
1149
|
+
|
|
1150
|
+
// authentication api-key required
|
|
1151
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
1152
|
+
|
|
1153
|
+
if (project !== undefined) {
|
|
1154
|
+
localVarQueryParameter['project'] = project;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
if (pageToken !== undefined) {
|
|
1158
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
if (pageSize !== undefined) {
|
|
1162
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
if (search !== undefined) {
|
|
1166
|
+
localVarQueryParameter['search'] = search;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
if (start !== undefined) {
|
|
1170
|
+
localVarQueryParameter['start'] = (start as any instanceof Date) ?
|
|
1171
|
+
(start as any).toISOString() :
|
|
1172
|
+
start;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
if (end !== undefined) {
|
|
1176
|
+
localVarQueryParameter['end'] = (end as any instanceof Date) ?
|
|
1177
|
+
(end as any).toISOString() :
|
|
1178
|
+
end;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
169
1183
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
170
1184
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
171
1185
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -235,6 +1249,22 @@ export const PlatformApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
235
1249
|
export const PlatformApiFp = function(configuration?: Configuration) {
|
|
236
1250
|
const localVarAxiosParamCreator = PlatformApiAxiosParamCreator(configuration)
|
|
237
1251
|
return {
|
|
1252
|
+
/**
|
|
1253
|
+
* Export orders as a CSV file
|
|
1254
|
+
* @summary Export orders
|
|
1255
|
+
* @param {string} project Project unique identifier
|
|
1256
|
+
* @param {string} platformId The platform identifier
|
|
1257
|
+
* @param {string} start Start of date range to filter by when orders were placed
|
|
1258
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1259
|
+
* @param {*} [options] Override http request option.
|
|
1260
|
+
* @throws {RequiredError}
|
|
1261
|
+
*/
|
|
1262
|
+
async exportOrders(project: string, platformId: string, start: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
1263
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exportOrders(project, platformId, start, end, options);
|
|
1264
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1265
|
+
const localVarOperationServerBasePath = operationServerMap['PlatformApi.exportOrders']?.[localVarOperationServerIndex]?.url;
|
|
1266
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1267
|
+
},
|
|
238
1268
|
/**
|
|
239
1269
|
*
|
|
240
1270
|
* @summary Get platform details
|
|
@@ -248,6 +1278,25 @@ export const PlatformApiFp = function(configuration?: Configuration) {
|
|
|
248
1278
|
const localVarOperationServerBasePath = operationServerMap['PlatformApi.getPlatform']?.[localVarOperationServerIndex]?.url;
|
|
249
1279
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
250
1280
|
},
|
|
1281
|
+
/**
|
|
1282
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1283
|
+
* @summary List orders
|
|
1284
|
+
* @param {string} project Project unique identifier
|
|
1285
|
+
* @param {string} platformId The platform identifier
|
|
1286
|
+
* @param {number} [pageToken] Page reference token
|
|
1287
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
1288
|
+
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
1289
|
+
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
1290
|
+
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1291
|
+
* @param {*} [options] Override http request option.
|
|
1292
|
+
* @throws {RequiredError}
|
|
1293
|
+
*/
|
|
1294
|
+
async listOrders(project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>> {
|
|
1295
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(project, platformId, pageToken, pageSize, search, start, end, options);
|
|
1296
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1297
|
+
const localVarOperationServerBasePath = operationServerMap['PlatformApi.listOrders']?.[localVarOperationServerIndex]?.url;
|
|
1298
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1299
|
+
},
|
|
251
1300
|
/**
|
|
252
1301
|
*
|
|
253
1302
|
* @summary Update platform
|
|
@@ -272,6 +1321,16 @@ export const PlatformApiFp = function(configuration?: Configuration) {
|
|
|
272
1321
|
export const PlatformApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
273
1322
|
const localVarFp = PlatformApiFp(configuration)
|
|
274
1323
|
return {
|
|
1324
|
+
/**
|
|
1325
|
+
* Export orders as a CSV file
|
|
1326
|
+
* @summary Export orders
|
|
1327
|
+
* @param {PlatformApiExportOrdersRequest} requestParameters Request parameters.
|
|
1328
|
+
* @param {*} [options] Override http request option.
|
|
1329
|
+
* @throws {RequiredError}
|
|
1330
|
+
*/
|
|
1331
|
+
exportOrders(requestParameters: PlatformApiExportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
1332
|
+
return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
1333
|
+
},
|
|
275
1334
|
/**
|
|
276
1335
|
*
|
|
277
1336
|
* @summary Get platform details
|
|
@@ -282,6 +1341,16 @@ export const PlatformApiFactory = function (configuration?: Configuration, baseP
|
|
|
282
1341
|
getPlatform(requestParameters: PlatformApiGetPlatformRequest, options?: RawAxiosRequestConfig): AxiosPromise<Platform> {
|
|
283
1342
|
return localVarFp.getPlatform(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
284
1343
|
},
|
|
1344
|
+
/**
|
|
1345
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1346
|
+
* @summary List orders
|
|
1347
|
+
* @param {PlatformApiListOrdersRequest} requestParameters Request parameters.
|
|
1348
|
+
* @param {*} [options] Override http request option.
|
|
1349
|
+
* @throws {RequiredError}
|
|
1350
|
+
*/
|
|
1351
|
+
listOrders(requestParameters: PlatformApiListOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse> {
|
|
1352
|
+
return localVarFp.listOrders(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
|
|
1353
|
+
},
|
|
285
1354
|
/**
|
|
286
1355
|
*
|
|
287
1356
|
* @summary Update platform
|
|
@@ -295,6 +1364,41 @@ export const PlatformApiFactory = function (configuration?: Configuration, baseP
|
|
|
295
1364
|
};
|
|
296
1365
|
};
|
|
297
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* Request parameters for exportOrders operation in PlatformApi.
|
|
1369
|
+
* @export
|
|
1370
|
+
* @interface PlatformApiExportOrdersRequest
|
|
1371
|
+
*/
|
|
1372
|
+
export interface PlatformApiExportOrdersRequest {
|
|
1373
|
+
/**
|
|
1374
|
+
* Project unique identifier
|
|
1375
|
+
* @type {string}
|
|
1376
|
+
* @memberof PlatformApiExportOrders
|
|
1377
|
+
*/
|
|
1378
|
+
readonly project: string
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* The platform identifier
|
|
1382
|
+
* @type {string}
|
|
1383
|
+
* @memberof PlatformApiExportOrders
|
|
1384
|
+
*/
|
|
1385
|
+
readonly platformId: string
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Start of date range to filter by when orders were placed
|
|
1389
|
+
* @type {string}
|
|
1390
|
+
* @memberof PlatformApiExportOrders
|
|
1391
|
+
*/
|
|
1392
|
+
readonly start: string
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* End of date range to filter by when orders were placed
|
|
1396
|
+
* @type {string}
|
|
1397
|
+
* @memberof PlatformApiExportOrders
|
|
1398
|
+
*/
|
|
1399
|
+
readonly end?: string
|
|
1400
|
+
}
|
|
1401
|
+
|
|
298
1402
|
/**
|
|
299
1403
|
* Request parameters for getPlatform operation in PlatformApi.
|
|
300
1404
|
* @export
|
|
@@ -309,6 +1413,62 @@ export interface PlatformApiGetPlatformRequest {
|
|
|
309
1413
|
readonly project: string
|
|
310
1414
|
}
|
|
311
1415
|
|
|
1416
|
+
/**
|
|
1417
|
+
* Request parameters for listOrders operation in PlatformApi.
|
|
1418
|
+
* @export
|
|
1419
|
+
* @interface PlatformApiListOrdersRequest
|
|
1420
|
+
*/
|
|
1421
|
+
export interface PlatformApiListOrdersRequest {
|
|
1422
|
+
/**
|
|
1423
|
+
* Project unique identifier
|
|
1424
|
+
* @type {string}
|
|
1425
|
+
* @memberof PlatformApiListOrders
|
|
1426
|
+
*/
|
|
1427
|
+
readonly project: string
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* The platform identifier
|
|
1431
|
+
* @type {string}
|
|
1432
|
+
* @memberof PlatformApiListOrders
|
|
1433
|
+
*/
|
|
1434
|
+
readonly platformId: string
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* Page reference token
|
|
1438
|
+
* @type {number}
|
|
1439
|
+
* @memberof PlatformApiListOrders
|
|
1440
|
+
*/
|
|
1441
|
+
readonly pageToken?: number
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
1445
|
+
* @type {number}
|
|
1446
|
+
* @memberof PlatformApiListOrders
|
|
1447
|
+
*/
|
|
1448
|
+
readonly pageSize?: number
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Search term to filter based on order reference, customer name and email
|
|
1452
|
+
* @type {string}
|
|
1453
|
+
* @memberof PlatformApiListOrders
|
|
1454
|
+
*/
|
|
1455
|
+
readonly search?: string
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Start of date range to filter by when orders were placed
|
|
1459
|
+
* @type {string}
|
|
1460
|
+
* @memberof PlatformApiListOrders
|
|
1461
|
+
*/
|
|
1462
|
+
readonly start?: string
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* End of date range to filter by when orders were placed
|
|
1466
|
+
* @type {string}
|
|
1467
|
+
* @memberof PlatformApiListOrders
|
|
1468
|
+
*/
|
|
1469
|
+
readonly end?: string
|
|
1470
|
+
}
|
|
1471
|
+
|
|
312
1472
|
/**
|
|
313
1473
|
* Request parameters for updatePlatform operation in PlatformApi.
|
|
314
1474
|
* @export
|
|
@@ -337,6 +1497,18 @@ export interface PlatformApiUpdatePlatformRequest {
|
|
|
337
1497
|
* @extends {BaseAPI}
|
|
338
1498
|
*/
|
|
339
1499
|
export class PlatformApi extends BaseAPI {
|
|
1500
|
+
/**
|
|
1501
|
+
* Export orders as a CSV file
|
|
1502
|
+
* @summary Export orders
|
|
1503
|
+
* @param {PlatformApiExportOrdersRequest} requestParameters Request parameters.
|
|
1504
|
+
* @param {*} [options] Override http request option.
|
|
1505
|
+
* @throws {RequiredError}
|
|
1506
|
+
* @memberof PlatformApi
|
|
1507
|
+
*/
|
|
1508
|
+
public exportOrders(requestParameters: PlatformApiExportOrdersRequest, options?: RawAxiosRequestConfig) {
|
|
1509
|
+
return PlatformApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
|
|
1510
|
+
}
|
|
1511
|
+
|
|
340
1512
|
/**
|
|
341
1513
|
*
|
|
342
1514
|
* @summary Get platform details
|
|
@@ -349,6 +1521,18 @@ export class PlatformApi extends BaseAPI {
|
|
|
349
1521
|
return PlatformApiFp(this.configuration).getPlatform(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
350
1522
|
}
|
|
351
1523
|
|
|
1524
|
+
/**
|
|
1525
|
+
* Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
|
|
1526
|
+
* @summary List orders
|
|
1527
|
+
* @param {PlatformApiListOrdersRequest} requestParameters Request parameters.
|
|
1528
|
+
* @param {*} [options] Override http request option.
|
|
1529
|
+
* @throws {RequiredError}
|
|
1530
|
+
* @memberof PlatformApi
|
|
1531
|
+
*/
|
|
1532
|
+
public listOrders(requestParameters: PlatformApiListOrdersRequest, options?: RawAxiosRequestConfig) {
|
|
1533
|
+
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));
|
|
1534
|
+
}
|
|
1535
|
+
|
|
352
1536
|
/**
|
|
353
1537
|
*
|
|
354
1538
|
* @summary Update platform
|