@teemill/orders 1.5.5 → 1.6.1

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