@usethrottle/api-client 3.0.0 → 4.0.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.
@@ -103,7 +103,7 @@ export declare class OrdersService {
103
103
  itemsRemaining?: number;
104
104
  } | null;
105
105
  type?: 'one_time' | 'recurring' | 'mixed';
106
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
106
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
107
107
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
108
108
  currency?: string;
109
109
  /**
@@ -128,6 +128,13 @@ export declare class OrdersService {
128
128
  * Amount in cents (e.g. 1999 = $19.99)
129
129
  */
130
130
  total?: number;
131
+ /**
132
+ * Amount in cents (e.g. 1999 = $19.99)
133
+ */
134
+ compAmount?: number;
135
+ compReason?: string | null;
136
+ compedAt?: string | null;
137
+ compedBy?: string | null;
131
138
  /**
132
139
  * Arbitrary key-value metadata
133
140
  */
@@ -176,6 +183,7 @@ export declare class OrdersService {
176
183
  email?: string;
177
184
  firstName?: string | null;
178
185
  lastName?: string | null;
186
+ company?: string | null;
179
187
  } | null;
180
188
  cancelledAt?: string | null;
181
189
  completedAt?: string | null;
@@ -208,7 +216,7 @@ export declare class OrdersService {
208
216
  * @returns any Default Response
209
217
  * @throws ApiError
210
218
  */
211
- static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided', type?: 'one_time' | 'recurring' | 'mixed', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
219
+ static getApiV1Orders(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed', paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired', type?: 'one_time' | 'recurring' | 'mixed', source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine', q?: string, customerId?: string, subscriptionId?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
212
220
  data?: Array<{
213
221
  id?: string;
214
222
  workspaceId?: string;
@@ -223,7 +231,7 @@ export declare class OrdersService {
223
231
  itemsRemaining?: number;
224
232
  } | null;
225
233
  type?: 'one_time' | 'recurring' | 'mixed';
226
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
234
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
227
235
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
228
236
  currency?: string;
229
237
  /**
@@ -248,6 +256,13 @@ export declare class OrdersService {
248
256
  * Amount in cents (e.g. 1999 = $19.99)
249
257
  */
250
258
  total?: number;
259
+ /**
260
+ * Amount in cents (e.g. 1999 = $19.99)
261
+ */
262
+ compAmount?: number;
263
+ compReason?: string | null;
264
+ compedAt?: string | null;
265
+ compedBy?: string | null;
251
266
  /**
252
267
  * Arbitrary key-value metadata
253
268
  */
@@ -296,6 +311,7 @@ export declare class OrdersService {
296
311
  email?: string;
297
312
  firstName?: string | null;
298
313
  lastName?: string | null;
314
+ company?: string | null;
299
315
  } | null;
300
316
  cancelledAt?: string | null;
301
317
  completedAt?: string | null;
@@ -340,7 +356,7 @@ export declare class OrdersService {
340
356
  itemsRemaining?: number;
341
357
  } | null;
342
358
  type?: 'one_time' | 'recurring' | 'mixed';
343
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
359
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
344
360
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
345
361
  currency?: string;
346
362
  /**
@@ -365,6 +381,13 @@ export declare class OrdersService {
365
381
  * Amount in cents (e.g. 1999 = $19.99)
366
382
  */
367
383
  total?: number;
384
+ /**
385
+ * Amount in cents (e.g. 1999 = $19.99)
386
+ */
387
+ compAmount?: number;
388
+ compReason?: string | null;
389
+ compedAt?: string | null;
390
+ compedBy?: string | null;
368
391
  /**
369
392
  * Arbitrary key-value metadata
370
393
  */
@@ -413,6 +436,7 @@ export declare class OrdersService {
413
436
  email?: string;
414
437
  firstName?: string | null;
415
438
  lastName?: string | null;
439
+ company?: string | null;
416
440
  } | null;
417
441
  cancelledAt?: string | null;
418
442
  completedAt?: string | null;
@@ -495,7 +519,7 @@ export declare class OrdersService {
495
519
  itemsRemaining?: number;
496
520
  } | null;
497
521
  type?: 'one_time' | 'recurring' | 'mixed';
498
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
522
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
499
523
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
500
524
  currency?: string;
501
525
  /**
@@ -520,6 +544,13 @@ export declare class OrdersService {
520
544
  * Amount in cents (e.g. 1999 = $19.99)
521
545
  */
522
546
  total?: number;
547
+ /**
548
+ * Amount in cents (e.g. 1999 = $19.99)
549
+ */
550
+ compAmount?: number;
551
+ compReason?: string | null;
552
+ compedAt?: string | null;
553
+ compedBy?: string | null;
523
554
  /**
524
555
  * Arbitrary key-value metadata
525
556
  */
@@ -568,6 +599,7 @@ export declare class OrdersService {
568
599
  email?: string;
569
600
  firstName?: string | null;
570
601
  lastName?: string | null;
602
+ company?: string | null;
571
603
  } | null;
572
604
  cancelledAt?: string | null;
573
605
  completedAt?: string | null;
@@ -605,7 +637,7 @@ export declare class OrdersService {
605
637
  itemsRemaining?: number;
606
638
  } | null;
607
639
  type?: 'one_time' | 'recurring' | 'mixed';
608
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
640
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
609
641
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
610
642
  currency?: string;
611
643
  /**
@@ -630,6 +662,13 @@ export declare class OrdersService {
630
662
  * Amount in cents (e.g. 1999 = $19.99)
631
663
  */
632
664
  total?: number;
665
+ /**
666
+ * Amount in cents (e.g. 1999 = $19.99)
667
+ */
668
+ compAmount?: number;
669
+ compReason?: string | null;
670
+ compedAt?: string | null;
671
+ compedBy?: string | null;
633
672
  /**
634
673
  * Arbitrary key-value metadata
635
674
  */
@@ -678,6 +717,7 @@ export declare class OrdersService {
678
717
  email?: string;
679
718
  firstName?: string | null;
680
719
  lastName?: string | null;
720
+ company?: string | null;
681
721
  } | null;
682
722
  cancelledAt?: string | null;
683
723
  completedAt?: string | null;
@@ -718,7 +758,7 @@ export declare class OrdersService {
718
758
  itemsRemaining?: number;
719
759
  } | null;
720
760
  type?: 'one_time' | 'recurring' | 'mixed';
721
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
761
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
722
762
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
723
763
  currency?: string;
724
764
  /**
@@ -743,6 +783,13 @@ export declare class OrdersService {
743
783
  * Amount in cents (e.g. 1999 = $19.99)
744
784
  */
745
785
  total?: number;
786
+ /**
787
+ * Amount in cents (e.g. 1999 = $19.99)
788
+ */
789
+ compAmount?: number;
790
+ compReason?: string | null;
791
+ compedAt?: string | null;
792
+ compedBy?: string | null;
746
793
  /**
747
794
  * Arbitrary key-value metadata
748
795
  */
@@ -791,6 +838,7 @@ export declare class OrdersService {
791
838
  email?: string;
792
839
  firstName?: string | null;
793
840
  lastName?: string | null;
841
+ company?: string | null;
794
842
  } | null;
795
843
  cancelledAt?: string | null;
796
844
  completedAt?: string | null;
@@ -831,7 +879,7 @@ export declare class OrdersService {
831
879
  itemsRemaining?: number;
832
880
  } | null;
833
881
  type?: 'one_time' | 'recurring' | 'mixed';
834
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
882
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
835
883
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
836
884
  currency?: string;
837
885
  /**
@@ -856,6 +904,13 @@ export declare class OrdersService {
856
904
  * Amount in cents (e.g. 1999 = $19.99)
857
905
  */
858
906
  total?: number;
907
+ /**
908
+ * Amount in cents (e.g. 1999 = $19.99)
909
+ */
910
+ compAmount?: number;
911
+ compReason?: string | null;
912
+ compedAt?: string | null;
913
+ compedBy?: string | null;
859
914
  /**
860
915
  * Arbitrary key-value metadata
861
916
  */
@@ -904,6 +959,7 @@ export declare class OrdersService {
904
959
  email?: string;
905
960
  firstName?: string | null;
906
961
  lastName?: string | null;
962
+ company?: string | null;
907
963
  } | null;
908
964
  cancelledAt?: string | null;
909
965
  completedAt?: string | null;
@@ -945,7 +1001,7 @@ export declare class OrdersService {
945
1001
  itemsRemaining?: number;
946
1002
  } | null;
947
1003
  type?: 'one_time' | 'recurring' | 'mixed';
948
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
1004
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
949
1005
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
950
1006
  currency?: string;
951
1007
  /**
@@ -970,6 +1026,13 @@ export declare class OrdersService {
970
1026
  * Amount in cents (e.g. 1999 = $19.99)
971
1027
  */
972
1028
  total?: number;
1029
+ /**
1030
+ * Amount in cents (e.g. 1999 = $19.99)
1031
+ */
1032
+ compAmount?: number;
1033
+ compReason?: string | null;
1034
+ compedAt?: string | null;
1035
+ compedBy?: string | null;
973
1036
  /**
974
1037
  * Arbitrary key-value metadata
975
1038
  */
@@ -1018,6 +1081,7 @@ export declare class OrdersService {
1018
1081
  email?: string;
1019
1082
  firstName?: string | null;
1020
1083
  lastName?: string | null;
1084
+ company?: string | null;
1021
1085
  } | null;
1022
1086
  cancelledAt?: string | null;
1023
1087
  completedAt?: string | null;
@@ -1068,7 +1132,7 @@ export declare class OrdersService {
1068
1132
  itemsRemaining?: number;
1069
1133
  } | null;
1070
1134
  type?: 'one_time' | 'recurring' | 'mixed';
1071
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
1135
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
1072
1136
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
1073
1137
  currency?: string;
1074
1138
  /**
@@ -1093,6 +1157,13 @@ export declare class OrdersService {
1093
1157
  * Amount in cents (e.g. 1999 = $19.99)
1094
1158
  */
1095
1159
  total?: number;
1160
+ /**
1161
+ * Amount in cents (e.g. 1999 = $19.99)
1162
+ */
1163
+ compAmount?: number;
1164
+ compReason?: string | null;
1165
+ compedAt?: string | null;
1166
+ compedBy?: string | null;
1096
1167
  /**
1097
1168
  * Arbitrary key-value metadata
1098
1169
  */
@@ -1141,6 +1212,255 @@ export declare class OrdersService {
1141
1212
  email?: string;
1142
1213
  firstName?: string | null;
1143
1214
  lastName?: string | null;
1215
+ company?: string | null;
1216
+ } | null;
1217
+ cancelledAt?: string | null;
1218
+ completedAt?: string | null;
1219
+ closedAt?: string | null;
1220
+ createdAt?: string;
1221
+ updatedAt?: string;
1222
+ };
1223
+ meta?: {
1224
+ requestId?: string;
1225
+ pagination?: {
1226
+ cursor?: string | null;
1227
+ hasMore?: boolean;
1228
+ };
1229
+ };
1230
+ }>;
1231
+ /**
1232
+ * Write off the order's remaining balance. Money already captured stays captured; the buyer is never charged and no processor is contacted. `compAmount` is set to the balance outstanding and `total` drops by the same amount, so `paymentStatus` settles at `captured` and `displayStatus` reads "… · Comped".
1233
+ * @param id
1234
+ * @param requestBody
1235
+ * @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
1236
+ * @returns any Default Response
1237
+ * @throws ApiError
1238
+ */
1239
+ static postApiV1OrdersComp(id: string, requestBody: {
1240
+ reason: string;
1241
+ }, xThrottleEnvironmentId?: string): CancelablePromise<{
1242
+ data?: {
1243
+ id?: string;
1244
+ workspaceId?: string;
1245
+ discountId?: string | null;
1246
+ discountCode?: string | null;
1247
+ orderNumber?: string;
1248
+ status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
1249
+ displayStatus?: string;
1250
+ fulfillmentSummary?: {
1251
+ itemsTotal?: number;
1252
+ itemsFulfilled?: number;
1253
+ itemsRemaining?: number;
1254
+ } | null;
1255
+ type?: 'one_time' | 'recurring' | 'mixed';
1256
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
1257
+ source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
1258
+ currency?: string;
1259
+ /**
1260
+ * Amount in cents (e.g. 1999 = $19.99)
1261
+ */
1262
+ subtotal?: number;
1263
+ /**
1264
+ * Amount in cents (e.g. 1999 = $19.99)
1265
+ */
1266
+ taxTotal?: number;
1267
+ buyerVatNumber?: string | null;
1268
+ taxReverseCharge?: boolean;
1269
+ /**
1270
+ * Amount in cents (e.g. 1999 = $19.99)
1271
+ */
1272
+ discountTotal?: number;
1273
+ /**
1274
+ * Amount in cents (e.g. 1999 = $19.99)
1275
+ */
1276
+ shippingTotal?: number;
1277
+ /**
1278
+ * Amount in cents (e.g. 1999 = $19.99)
1279
+ */
1280
+ total?: number;
1281
+ /**
1282
+ * Amount in cents (e.g. 1999 = $19.99)
1283
+ */
1284
+ compAmount?: number;
1285
+ compReason?: string | null;
1286
+ compedAt?: string | null;
1287
+ compedBy?: string | null;
1288
+ /**
1289
+ * Arbitrary key-value metadata
1290
+ */
1291
+ metadata?: Record<string, any>;
1292
+ billingAddress?: {
1293
+ firstName?: string;
1294
+ lastName?: string;
1295
+ /**
1296
+ * Optional. Business name for B2B addresses.
1297
+ */
1298
+ company?: string;
1299
+ addressLine1?: string;
1300
+ addressLine2?: string;
1301
+ city?: string;
1302
+ stateProvince?: string;
1303
+ postalCode?: string;
1304
+ /**
1305
+ * ISO 3166-1 alpha-2
1306
+ */
1307
+ countryCode?: string;
1308
+ phone?: string;
1309
+ email?: string;
1310
+ } | null;
1311
+ shippingAddress?: {
1312
+ firstName?: string;
1313
+ lastName?: string;
1314
+ /**
1315
+ * Optional. Business name for B2B addresses.
1316
+ */
1317
+ company?: string;
1318
+ addressLine1?: string;
1319
+ addressLine2?: string;
1320
+ city?: string;
1321
+ stateProvince?: string;
1322
+ postalCode?: string;
1323
+ /**
1324
+ * ISO 3166-1 alpha-2
1325
+ */
1326
+ countryCode?: string;
1327
+ phone?: string;
1328
+ email?: string;
1329
+ } | null;
1330
+ customerId?: string | null;
1331
+ customer?: {
1332
+ id?: string;
1333
+ email?: string;
1334
+ firstName?: string | null;
1335
+ lastName?: string | null;
1336
+ company?: string | null;
1337
+ } | null;
1338
+ cancelledAt?: string | null;
1339
+ completedAt?: string | null;
1340
+ closedAt?: string | null;
1341
+ createdAt?: string;
1342
+ updatedAt?: string;
1343
+ /**
1344
+ * Payment settlement performed by the comp: voids of anything still claiming the waived balance — open authorizations, and unpaid Net-N invoices, whose buyers are also emailed. Captured money is never touched. Failures never undo the comp.
1345
+ */
1346
+ paymentActions?: Array<{
1347
+ paymentId?: string;
1348
+ action?: 'void';
1349
+ status?: 'succeeded' | 'failed';
1350
+ error?: string;
1351
+ }>;
1352
+ };
1353
+ meta?: {
1354
+ requestId?: string;
1355
+ pagination?: {
1356
+ cursor?: string | null;
1357
+ hasMore?: boolean;
1358
+ };
1359
+ };
1360
+ }>;
1361
+ /**
1362
+ * Undo a comp. The order owes what it owed again: `compAmount` returns to 0, `total` is restored, and `paymentStatus` falls back out of `captured` on its own. Side effects of the comp are NOT rewound: an authorization voided at the processor cannot be un-voided, so collecting the restored balance needs a new payment, and a tax document voided or returned at the provider needs a manual re-file (`POST /v1/tax-documents/{id}/retry`).
1363
+ * @param id
1364
+ * @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
1365
+ * @returns any Default Response
1366
+ * @throws ApiError
1367
+ */
1368
+ static postApiV1OrdersCompReverse(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
1369
+ data?: {
1370
+ id?: string;
1371
+ workspaceId?: string;
1372
+ discountId?: string | null;
1373
+ discountCode?: string | null;
1374
+ orderNumber?: string;
1375
+ status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
1376
+ displayStatus?: string;
1377
+ fulfillmentSummary?: {
1378
+ itemsTotal?: number;
1379
+ itemsFulfilled?: number;
1380
+ itemsRemaining?: number;
1381
+ } | null;
1382
+ type?: 'one_time' | 'recurring' | 'mixed';
1383
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
1384
+ source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
1385
+ currency?: string;
1386
+ /**
1387
+ * Amount in cents (e.g. 1999 = $19.99)
1388
+ */
1389
+ subtotal?: number;
1390
+ /**
1391
+ * Amount in cents (e.g. 1999 = $19.99)
1392
+ */
1393
+ taxTotal?: number;
1394
+ buyerVatNumber?: string | null;
1395
+ taxReverseCharge?: boolean;
1396
+ /**
1397
+ * Amount in cents (e.g. 1999 = $19.99)
1398
+ */
1399
+ discountTotal?: number;
1400
+ /**
1401
+ * Amount in cents (e.g. 1999 = $19.99)
1402
+ */
1403
+ shippingTotal?: number;
1404
+ /**
1405
+ * Amount in cents (e.g. 1999 = $19.99)
1406
+ */
1407
+ total?: number;
1408
+ /**
1409
+ * Amount in cents (e.g. 1999 = $19.99)
1410
+ */
1411
+ compAmount?: number;
1412
+ compReason?: string | null;
1413
+ compedAt?: string | null;
1414
+ compedBy?: string | null;
1415
+ /**
1416
+ * Arbitrary key-value metadata
1417
+ */
1418
+ metadata?: Record<string, any>;
1419
+ billingAddress?: {
1420
+ firstName?: string;
1421
+ lastName?: string;
1422
+ /**
1423
+ * Optional. Business name for B2B addresses.
1424
+ */
1425
+ company?: string;
1426
+ addressLine1?: string;
1427
+ addressLine2?: string;
1428
+ city?: string;
1429
+ stateProvince?: string;
1430
+ postalCode?: string;
1431
+ /**
1432
+ * ISO 3166-1 alpha-2
1433
+ */
1434
+ countryCode?: string;
1435
+ phone?: string;
1436
+ email?: string;
1437
+ } | null;
1438
+ shippingAddress?: {
1439
+ firstName?: string;
1440
+ lastName?: string;
1441
+ /**
1442
+ * Optional. Business name for B2B addresses.
1443
+ */
1444
+ company?: string;
1445
+ addressLine1?: string;
1446
+ addressLine2?: string;
1447
+ city?: string;
1448
+ stateProvince?: string;
1449
+ postalCode?: string;
1450
+ /**
1451
+ * ISO 3166-1 alpha-2
1452
+ */
1453
+ countryCode?: string;
1454
+ phone?: string;
1455
+ email?: string;
1456
+ } | null;
1457
+ customerId?: string | null;
1458
+ customer?: {
1459
+ id?: string;
1460
+ email?: string;
1461
+ firstName?: string | null;
1462
+ lastName?: string | null;
1463
+ company?: string | null;
1144
1464
  } | null;
1145
1465
  cancelledAt?: string | null;
1146
1466
  completedAt?: string | null;
@@ -1182,6 +1502,37 @@ export declare class OrdersService {
1182
1502
  };
1183
1503
  };
1184
1504
  }>;
1505
+ /**
1506
+ * Everything that happened to this order, newest first: status changes, payment attempts (including declines, which write no status-history row), and fulfillment events. One row shape for every source.
1507
+ * @param id
1508
+ * @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
1509
+ * @param limit
1510
+ * @param cursor
1511
+ * @returns any Default Response
1512
+ * @throws ApiError
1513
+ */
1514
+ static getApiV1OrdersTimeline(id: string, xThrottleEnvironmentId?: string, limit?: number, cursor?: string): CancelablePromise<{
1515
+ data?: Array<{
1516
+ id: string;
1517
+ at: string;
1518
+ kind: 'status' | 'payment' | 'fulfillment';
1519
+ title: string;
1520
+ detail?: string;
1521
+ amount?: number;
1522
+ currency?: string;
1523
+ source: 'manual' | 'state_machine' | 'fulfillment' | 'payment' | 'migration' | 'provider';
1524
+ actorType?: 'user' | 'system' | 'integration' | 'api_key';
1525
+ actorName?: string;
1526
+ reason?: string;
1527
+ }>;
1528
+ meta?: {
1529
+ requestId?: string;
1530
+ pagination?: {
1531
+ cursor?: string | null;
1532
+ hasMore?: boolean;
1533
+ };
1534
+ };
1535
+ }>;
1185
1536
  /**
1186
1537
  * Close a fulfilled order (archive it from active views)
1187
1538
  * @param id
@@ -1204,7 +1555,7 @@ export declare class OrdersService {
1204
1555
  itemsRemaining?: number;
1205
1556
  } | null;
1206
1557
  type?: 'one_time' | 'recurring' | 'mixed';
1207
- paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided';
1558
+ paymentStatus?: 'pending' | 'authorized' | 'captured' | 'partially_paid' | 'partially_refunded' | 'refunded' | 'failed' | 'voided' | 'processing' | 'disputed' | 'expired';
1208
1559
  source?: 'web' | 'mobile' | 'pos' | 'api' | 'subscription_engine';
1209
1560
  currency?: string;
1210
1561
  /**
@@ -1229,6 +1580,13 @@ export declare class OrdersService {
1229
1580
  * Amount in cents (e.g. 1999 = $19.99)
1230
1581
  */
1231
1582
  total?: number;
1583
+ /**
1584
+ * Amount in cents (e.g. 1999 = $19.99)
1585
+ */
1586
+ compAmount?: number;
1587
+ compReason?: string | null;
1588
+ compedAt?: string | null;
1589
+ compedBy?: string | null;
1232
1590
  /**
1233
1591
  * Arbitrary key-value metadata
1234
1592
  */
@@ -1277,6 +1635,7 @@ export declare class OrdersService {
1277
1635
  email?: string;
1278
1636
  firstName?: string | null;
1279
1637
  lastName?: string | null;
1638
+ company?: string | null;
1280
1639
  } | null;
1281
1640
  cancelledAt?: string | null;
1282
1641
  completedAt?: string | null;
@@ -1322,8 +1681,13 @@ export declare class OrdersService {
1322
1681
  */
1323
1682
  capturedAmount?: number | null;
1324
1683
  currency?: string;
1325
- status?: 'pending' | 'authorized' | 'captured' | 'failed' | 'voided' | 'refunded' | 'partially_refunded';
1326
- method?: 'card' | 'bank_transfer' | 'wallet' | 'cash' | 'external' | 'manual' | 'net30';
1684
+ status?: 'pending' | 'authorized' | 'processing' | 'captured' | 'failed' | 'voided' | 'expired' | 'refunded' | 'partially_refunded';
1685
+ errorCode?: string | null;
1686
+ /**
1687
+ * Why the payment failed. For a manually-marked failure this is the reason the merchant gave.
1688
+ */
1689
+ errorMessage?: string | null;
1690
+ method?: 'card' | 'bank_transfer' | 'wallet' | 'cash' | 'cheque' | 'external' | 'manual' | 'net30';
1327
1691
  netN?: number;
1328
1692
  netNSource?: 'customer_override' | 'cart_override' | 'global_default';
1329
1693
  authorizedAt?: string | null;