@moonbase.sh/api 0.2.112 → 0.2.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -798,79 +798,15 @@ declare class CustomerEndpoints {
798
798
  declare const pricingVariationSchema: z.ZodObject<{
799
799
  id: z.ZodString;
800
800
  name: z.ZodString;
801
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
802
801
  price: z.ZodRecord<z.ZodString, z.ZodNumber>;
803
- hasDiscount: z.ZodBoolean;
804
- discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
805
- type: z.ZodLiteral<"PercentageOffDiscount">;
806
- name: z.ZodString;
807
- description: z.ZodOptional<z.ZodString>;
808
- percentage: z.ZodNumber;
809
- total: z.ZodRecord<z.ZodString, z.ZodNumber>;
810
- }, "strip", z.ZodTypeAny, {
811
- type: "PercentageOffDiscount";
812
- name: string;
813
- percentage: number;
814
- total: Record<string, number>;
815
- description?: string | undefined;
816
- }, {
817
- type: "PercentageOffDiscount";
818
- name: string;
819
- percentage: number;
820
- total: Record<string, number>;
821
- description?: string | undefined;
822
- }>, z.ZodObject<{
823
- type: z.ZodLiteral<"FlatAmountOffDiscount">;
824
- name: z.ZodString;
825
- description: z.ZodOptional<z.ZodString>;
826
- total: z.ZodRecord<z.ZodString, z.ZodNumber>;
827
- }, "strip", z.ZodTypeAny, {
828
- type: "FlatAmountOffDiscount";
829
- name: string;
830
- total: Record<string, number>;
831
- description?: string | undefined;
832
- }, {
833
- type: "FlatAmountOffDiscount";
834
- name: string;
835
- total: Record<string, number>;
836
- description?: string | undefined;
837
- }>]>>;
838
802
  }, "strip", z.ZodTypeAny, {
839
803
  id: string;
840
804
  name: string;
841
- originalPrice: Record<string, number>;
842
805
  price: Record<string, number>;
843
- hasDiscount: boolean;
844
- discount?: {
845
- type: "PercentageOffDiscount";
846
- name: string;
847
- percentage: number;
848
- total: Record<string, number>;
849
- description?: string | undefined;
850
- } | {
851
- type: "FlatAmountOffDiscount";
852
- name: string;
853
- total: Record<string, number>;
854
- description?: string | undefined;
855
- } | undefined;
856
806
  }, {
857
807
  id: string;
858
808
  name: string;
859
- originalPrice: Record<string, number>;
860
809
  price: Record<string, number>;
861
- hasDiscount: boolean;
862
- discount?: {
863
- type: "PercentageOffDiscount";
864
- name: string;
865
- percentage: number;
866
- total: Record<string, number>;
867
- description?: string | undefined;
868
- } | {
869
- type: "FlatAmountOffDiscount";
870
- name: string;
871
- total: Record<string, number>;
872
- description?: string | undefined;
873
- } | undefined;
874
810
  }>;
875
811
 
876
812
  type PricingVariation = z.infer<typeof pricingVariationSchema>;
@@ -878,6 +814,7 @@ interface Page<T> {
878
814
  items: Array<T>;
879
815
  hasMore: boolean;
880
816
  next: string | null;
817
+ getNext: () => Promise<Page<T>>;
881
818
  }
882
819
  interface Quantifiable<T> {
883
820
  value: T;
@@ -1211,6 +1148,1868 @@ declare class LicenseEndpoints {
1211
1148
  revokeActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
1212
1149
  }
1213
1150
 
1151
+ declare const orderSchema: z.ZodObject<{
1152
+ id: z.ZodString;
1153
+ status: z.ZodNativeEnum<typeof OrderStatus>;
1154
+ currency: z.ZodString;
1155
+ completedAt: z.ZodOptional<z.ZodDate>;
1156
+ isRefunded: z.ZodBoolean;
1157
+ refundedAt: z.ZodOptional<z.ZodDate>;
1158
+ isDisputed: z.ZodBoolean;
1159
+ total: z.ZodOptional<z.ZodObject<{
1160
+ original: z.ZodObject<{
1161
+ currency: z.ZodString;
1162
+ amount: z.ZodNumber;
1163
+ }, "strip", z.ZodTypeAny, {
1164
+ currency: string;
1165
+ amount: number;
1166
+ }, {
1167
+ currency: string;
1168
+ amount: number;
1169
+ }>;
1170
+ discount: z.ZodObject<{
1171
+ currency: z.ZodString;
1172
+ amount: z.ZodNumber;
1173
+ }, "strip", z.ZodTypeAny, {
1174
+ currency: string;
1175
+ amount: number;
1176
+ }, {
1177
+ currency: string;
1178
+ amount: number;
1179
+ }>;
1180
+ subtotal: z.ZodObject<{
1181
+ currency: z.ZodString;
1182
+ amount: z.ZodNumber;
1183
+ }, "strip", z.ZodTypeAny, {
1184
+ currency: string;
1185
+ amount: number;
1186
+ }, {
1187
+ currency: string;
1188
+ amount: number;
1189
+ }>;
1190
+ taxes: z.ZodObject<{
1191
+ currency: z.ZodString;
1192
+ amount: z.ZodNumber;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ currency: string;
1195
+ amount: number;
1196
+ }, {
1197
+ currency: string;
1198
+ amount: number;
1199
+ }>;
1200
+ due: z.ZodObject<{
1201
+ currency: z.ZodString;
1202
+ amount: z.ZodNumber;
1203
+ }, "strip", z.ZodTypeAny, {
1204
+ currency: string;
1205
+ amount: number;
1206
+ }, {
1207
+ currency: string;
1208
+ amount: number;
1209
+ }>;
1210
+ }, "strip", z.ZodTypeAny, {
1211
+ discount: {
1212
+ currency: string;
1213
+ amount: number;
1214
+ };
1215
+ original: {
1216
+ currency: string;
1217
+ amount: number;
1218
+ };
1219
+ subtotal: {
1220
+ currency: string;
1221
+ amount: number;
1222
+ };
1223
+ due: {
1224
+ currency: string;
1225
+ amount: number;
1226
+ };
1227
+ taxes: {
1228
+ currency: string;
1229
+ amount: number;
1230
+ };
1231
+ }, {
1232
+ discount: {
1233
+ currency: string;
1234
+ amount: number;
1235
+ };
1236
+ original: {
1237
+ currency: string;
1238
+ amount: number;
1239
+ };
1240
+ subtotal: {
1241
+ currency: string;
1242
+ amount: number;
1243
+ };
1244
+ due: {
1245
+ currency: string;
1246
+ amount: number;
1247
+ };
1248
+ taxes: {
1249
+ currency: string;
1250
+ amount: number;
1251
+ };
1252
+ }>>;
1253
+ payout: z.ZodOptional<z.ZodObject<{
1254
+ subtotal: z.ZodObject<{
1255
+ currency: z.ZodString;
1256
+ amount: z.ZodNumber;
1257
+ }, "strip", z.ZodTypeAny, {
1258
+ currency: string;
1259
+ amount: number;
1260
+ }, {
1261
+ currency: string;
1262
+ amount: number;
1263
+ }>;
1264
+ taxes: z.ZodObject<{
1265
+ currency: z.ZodString;
1266
+ amount: z.ZodNumber;
1267
+ }, "strip", z.ZodTypeAny, {
1268
+ currency: string;
1269
+ amount: number;
1270
+ }, {
1271
+ currency: string;
1272
+ amount: number;
1273
+ }>;
1274
+ platformFees: z.ZodObject<{
1275
+ currency: z.ZodString;
1276
+ amount: z.ZodNumber;
1277
+ }, "strip", z.ZodTypeAny, {
1278
+ currency: string;
1279
+ amount: number;
1280
+ }, {
1281
+ currency: string;
1282
+ amount: number;
1283
+ }>;
1284
+ due: z.ZodObject<{
1285
+ currency: z.ZodString;
1286
+ amount: z.ZodNumber;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ currency: string;
1289
+ amount: number;
1290
+ }, {
1291
+ currency: string;
1292
+ amount: number;
1293
+ }>;
1294
+ feeBreakdown: z.ZodArray<z.ZodString, "many">;
1295
+ }, "strip", z.ZodTypeAny, {
1296
+ subtotal: {
1297
+ currency: string;
1298
+ amount: number;
1299
+ };
1300
+ due: {
1301
+ currency: string;
1302
+ amount: number;
1303
+ };
1304
+ taxes: {
1305
+ currency: string;
1306
+ amount: number;
1307
+ };
1308
+ platformFees: {
1309
+ currency: string;
1310
+ amount: number;
1311
+ };
1312
+ feeBreakdown: string[];
1313
+ }, {
1314
+ subtotal: {
1315
+ currency: string;
1316
+ amount: number;
1317
+ };
1318
+ due: {
1319
+ currency: string;
1320
+ amount: number;
1321
+ };
1322
+ taxes: {
1323
+ currency: string;
1324
+ amount: number;
1325
+ };
1326
+ platformFees: {
1327
+ currency: string;
1328
+ amount: number;
1329
+ };
1330
+ feeBreakdown: string[];
1331
+ }>>;
1332
+ merchantPayout: z.ZodOptional<z.ZodObject<{
1333
+ currency: z.ZodString;
1334
+ amount: z.ZodNumber;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ currency: string;
1337
+ amount: number;
1338
+ }, {
1339
+ currency: string;
1340
+ amount: number;
1341
+ }>>;
1342
+ affiliatePayouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1343
+ payout: z.ZodObject<{
1344
+ currency: z.ZodString;
1345
+ amount: z.ZodNumber;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ currency: string;
1348
+ amount: number;
1349
+ }, {
1350
+ currency: string;
1351
+ amount: number;
1352
+ }>;
1353
+ affiliateId: z.ZodString;
1354
+ contractId: z.ZodString;
1355
+ }, "strip", z.ZodTypeAny, {
1356
+ payout: {
1357
+ currency: string;
1358
+ amount: number;
1359
+ };
1360
+ affiliateId: string;
1361
+ contractId: string;
1362
+ }, {
1363
+ payout: {
1364
+ currency: string;
1365
+ amount: number;
1366
+ };
1367
+ affiliateId: string;
1368
+ contractId: string;
1369
+ }>, "many">>;
1370
+ initialUTM: z.ZodOptional<z.ZodObject<{
1371
+ referrer: z.ZodOptional<z.ZodString>;
1372
+ source: z.ZodOptional<z.ZodString>;
1373
+ medium: z.ZodOptional<z.ZodString>;
1374
+ campaign: z.ZodOptional<z.ZodString>;
1375
+ term: z.ZodOptional<z.ZodString>;
1376
+ content: z.ZodOptional<z.ZodString>;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ referrer?: string | undefined;
1379
+ source?: string | undefined;
1380
+ medium?: string | undefined;
1381
+ campaign?: string | undefined;
1382
+ term?: string | undefined;
1383
+ content?: string | undefined;
1384
+ }, {
1385
+ referrer?: string | undefined;
1386
+ source?: string | undefined;
1387
+ medium?: string | undefined;
1388
+ campaign?: string | undefined;
1389
+ term?: string | undefined;
1390
+ content?: string | undefined;
1391
+ }>>;
1392
+ currentUTM: z.ZodOptional<z.ZodObject<{
1393
+ referrer: z.ZodOptional<z.ZodString>;
1394
+ source: z.ZodOptional<z.ZodString>;
1395
+ medium: z.ZodOptional<z.ZodString>;
1396
+ campaign: z.ZodOptional<z.ZodString>;
1397
+ term: z.ZodOptional<z.ZodString>;
1398
+ content: z.ZodOptional<z.ZodString>;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ referrer?: string | undefined;
1401
+ source?: string | undefined;
1402
+ medium?: string | undefined;
1403
+ campaign?: string | undefined;
1404
+ term?: string | undefined;
1405
+ content?: string | undefined;
1406
+ }, {
1407
+ referrer?: string | undefined;
1408
+ source?: string | undefined;
1409
+ medium?: string | undefined;
1410
+ campaign?: string | undefined;
1411
+ term?: string | undefined;
1412
+ content?: string | undefined;
1413
+ }>>;
1414
+ customer: z.ZodOptional<z.ZodObject<{
1415
+ name: z.ZodNullable<z.ZodString>;
1416
+ businessName: z.ZodNullable<z.ZodString>;
1417
+ taxId: z.ZodNullable<z.ZodString>;
1418
+ email: z.ZodNullable<z.ZodString>;
1419
+ address: z.ZodNullable<z.ZodObject<{
1420
+ countryCode: z.ZodString;
1421
+ streetAddress1: z.ZodString;
1422
+ streetAddress2: z.ZodNullable<z.ZodString>;
1423
+ locality: z.ZodNullable<z.ZodString>;
1424
+ region: z.ZodNullable<z.ZodString>;
1425
+ postCode: z.ZodString;
1426
+ }, "strip", z.ZodTypeAny, {
1427
+ countryCode: string;
1428
+ streetAddress1: string;
1429
+ streetAddress2: string | null;
1430
+ locality: string | null;
1431
+ region: string | null;
1432
+ postCode: string;
1433
+ }, {
1434
+ countryCode: string;
1435
+ streetAddress1: string;
1436
+ streetAddress2: string | null;
1437
+ locality: string | null;
1438
+ region: string | null;
1439
+ postCode: string;
1440
+ }>>;
1441
+ }, "strip", z.ZodTypeAny, {
1442
+ name: string | null;
1443
+ businessName: string | null;
1444
+ taxId: string | null;
1445
+ email: string | null;
1446
+ address: {
1447
+ countryCode: string;
1448
+ streetAddress1: string;
1449
+ streetAddress2: string | null;
1450
+ locality: string | null;
1451
+ region: string | null;
1452
+ postCode: string;
1453
+ } | null;
1454
+ }, {
1455
+ name: string | null;
1456
+ businessName: string | null;
1457
+ taxId: string | null;
1458
+ email: string | null;
1459
+ address: {
1460
+ countryCode: string;
1461
+ streetAddress1: string;
1462
+ streetAddress2: string | null;
1463
+ locality: string | null;
1464
+ region: string | null;
1465
+ postCode: string;
1466
+ } | null;
1467
+ }>>;
1468
+ couponsApplied: z.ZodArray<z.ZodObject<{
1469
+ code: z.ZodString;
1470
+ name: z.ZodString;
1471
+ description: z.ZodString;
1472
+ }, "strip", z.ZodTypeAny, {
1473
+ code: string;
1474
+ name: string;
1475
+ description: string;
1476
+ }, {
1477
+ code: string;
1478
+ name: string;
1479
+ description: string;
1480
+ }>, "many">;
1481
+ items: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1482
+ type: z.ZodLiteral<"Product">;
1483
+ productId: z.ZodString;
1484
+ quantity: z.ZodNumber;
1485
+ variationId: z.ZodString;
1486
+ price: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1487
+ total: z.ZodOptional<z.ZodObject<{
1488
+ original: z.ZodObject<{
1489
+ currency: z.ZodString;
1490
+ amount: z.ZodNumber;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ currency: string;
1493
+ amount: number;
1494
+ }, {
1495
+ currency: string;
1496
+ amount: number;
1497
+ }>;
1498
+ discount: z.ZodObject<{
1499
+ currency: z.ZodString;
1500
+ amount: z.ZodNumber;
1501
+ }, "strip", z.ZodTypeAny, {
1502
+ currency: string;
1503
+ amount: number;
1504
+ }, {
1505
+ currency: string;
1506
+ amount: number;
1507
+ }>;
1508
+ subtotal: z.ZodObject<{
1509
+ currency: z.ZodString;
1510
+ amount: z.ZodNumber;
1511
+ }, "strip", z.ZodTypeAny, {
1512
+ currency: string;
1513
+ amount: number;
1514
+ }, {
1515
+ currency: string;
1516
+ amount: number;
1517
+ }>;
1518
+ due: z.ZodObject<{
1519
+ currency: z.ZodString;
1520
+ amount: z.ZodNumber;
1521
+ }, "strip", z.ZodTypeAny, {
1522
+ currency: string;
1523
+ amount: number;
1524
+ }, {
1525
+ currency: string;
1526
+ amount: number;
1527
+ }>;
1528
+ }, "strip", z.ZodTypeAny, {
1529
+ discount: {
1530
+ currency: string;
1531
+ amount: number;
1532
+ };
1533
+ original: {
1534
+ currency: string;
1535
+ amount: number;
1536
+ };
1537
+ subtotal: {
1538
+ currency: string;
1539
+ amount: number;
1540
+ };
1541
+ due: {
1542
+ currency: string;
1543
+ amount: number;
1544
+ };
1545
+ }, {
1546
+ discount: {
1547
+ currency: string;
1548
+ amount: number;
1549
+ };
1550
+ original: {
1551
+ currency: string;
1552
+ amount: number;
1553
+ };
1554
+ subtotal: {
1555
+ currency: string;
1556
+ amount: number;
1557
+ };
1558
+ due: {
1559
+ currency: string;
1560
+ amount: number;
1561
+ };
1562
+ }>>;
1563
+ payout: z.ZodOptional<z.ZodObject<{
1564
+ subtotal: z.ZodObject<{
1565
+ currency: z.ZodString;
1566
+ amount: z.ZodNumber;
1567
+ }, "strip", z.ZodTypeAny, {
1568
+ currency: string;
1569
+ amount: number;
1570
+ }, {
1571
+ currency: string;
1572
+ amount: number;
1573
+ }>;
1574
+ taxes: z.ZodObject<{
1575
+ currency: z.ZodString;
1576
+ amount: z.ZodNumber;
1577
+ }, "strip", z.ZodTypeAny, {
1578
+ currency: string;
1579
+ amount: number;
1580
+ }, {
1581
+ currency: string;
1582
+ amount: number;
1583
+ }>;
1584
+ platformFees: z.ZodObject<{
1585
+ currency: z.ZodString;
1586
+ amount: z.ZodNumber;
1587
+ }, "strip", z.ZodTypeAny, {
1588
+ currency: string;
1589
+ amount: number;
1590
+ }, {
1591
+ currency: string;
1592
+ amount: number;
1593
+ }>;
1594
+ due: z.ZodObject<{
1595
+ currency: z.ZodString;
1596
+ amount: z.ZodNumber;
1597
+ }, "strip", z.ZodTypeAny, {
1598
+ currency: string;
1599
+ amount: number;
1600
+ }, {
1601
+ currency: string;
1602
+ amount: number;
1603
+ }>;
1604
+ }, "strip", z.ZodTypeAny, {
1605
+ subtotal: {
1606
+ currency: string;
1607
+ amount: number;
1608
+ };
1609
+ due: {
1610
+ currency: string;
1611
+ amount: number;
1612
+ };
1613
+ taxes: {
1614
+ currency: string;
1615
+ amount: number;
1616
+ };
1617
+ platformFees: {
1618
+ currency: string;
1619
+ amount: number;
1620
+ };
1621
+ }, {
1622
+ subtotal: {
1623
+ currency: string;
1624
+ amount: number;
1625
+ };
1626
+ due: {
1627
+ currency: string;
1628
+ amount: number;
1629
+ };
1630
+ taxes: {
1631
+ currency: string;
1632
+ amount: number;
1633
+ };
1634
+ platformFees: {
1635
+ currency: string;
1636
+ amount: number;
1637
+ };
1638
+ }>>;
1639
+ affiliatePayouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1640
+ payout: z.ZodObject<{
1641
+ currency: z.ZodString;
1642
+ amount: z.ZodNumber;
1643
+ }, "strip", z.ZodTypeAny, {
1644
+ currency: string;
1645
+ amount: number;
1646
+ }, {
1647
+ currency: string;
1648
+ amount: number;
1649
+ }>;
1650
+ affiliateId: z.ZodString;
1651
+ contractId: z.ZodString;
1652
+ }, "strip", z.ZodTypeAny, {
1653
+ payout: {
1654
+ currency: string;
1655
+ amount: number;
1656
+ };
1657
+ affiliateId: string;
1658
+ contractId: string;
1659
+ }, {
1660
+ payout: {
1661
+ currency: string;
1662
+ amount: number;
1663
+ };
1664
+ affiliateId: string;
1665
+ contractId: string;
1666
+ }>, "many">>;
1667
+ variation: z.ZodOptional<z.ZodObject<{
1668
+ id: z.ZodString;
1669
+ name: z.ZodString;
1670
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
1671
+ }, "strip", z.ZodTypeAny, {
1672
+ id: string;
1673
+ name: string;
1674
+ price: Record<string, number>;
1675
+ }, {
1676
+ id: string;
1677
+ name: string;
1678
+ price: Record<string, number>;
1679
+ }>>;
1680
+ appliedDiscount: z.ZodOptional<z.ZodObject<{
1681
+ name: z.ZodString;
1682
+ description: z.ZodNullable<z.ZodString>;
1683
+ discount: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1684
+ type: z.ZodLiteral<"PercentageOffDiscount">;
1685
+ percentage: z.ZodNumber;
1686
+ }, "strip", z.ZodTypeAny, {
1687
+ type: "PercentageOffDiscount";
1688
+ percentage: number;
1689
+ }, {
1690
+ type: "PercentageOffDiscount";
1691
+ percentage: number;
1692
+ }>, z.ZodObject<{
1693
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
1694
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
1695
+ }, "strip", z.ZodTypeAny, {
1696
+ type: "FlatAmountOffDiscount";
1697
+ total: Record<string, number>;
1698
+ }, {
1699
+ type: "FlatAmountOffDiscount";
1700
+ total: Record<string, number>;
1701
+ }>]>;
1702
+ applicableVariationIds: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
1703
+ validity: z.ZodNullable<z.ZodObject<{
1704
+ from: z.ZodNullable<z.ZodDate>;
1705
+ to: z.ZodNullable<z.ZodDate>;
1706
+ }, "strip", z.ZodTypeAny, {
1707
+ from: Date | null;
1708
+ to: Date | null;
1709
+ }, {
1710
+ from: Date | null;
1711
+ to: Date | null;
1712
+ }>>;
1713
+ }, "strip", z.ZodTypeAny, {
1714
+ name: string;
1715
+ description: string | null;
1716
+ discount: {
1717
+ type: "PercentageOffDiscount";
1718
+ percentage: number;
1719
+ } | {
1720
+ type: "FlatAmountOffDiscount";
1721
+ total: Record<string, number>;
1722
+ };
1723
+ applicableVariationIds: string[] | null;
1724
+ validity: {
1725
+ from: Date | null;
1726
+ to: Date | null;
1727
+ } | null;
1728
+ }, {
1729
+ name: string;
1730
+ description: string | null;
1731
+ discount: {
1732
+ type: "PercentageOffDiscount";
1733
+ percentage: number;
1734
+ } | {
1735
+ type: "FlatAmountOffDiscount";
1736
+ total: Record<string, number>;
1737
+ };
1738
+ applicableVariationIds: string[] | null;
1739
+ validity: {
1740
+ from: Date | null;
1741
+ to: Date | null;
1742
+ } | null;
1743
+ }>>;
1744
+ fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1745
+ type: z.ZodLiteral<"License">;
1746
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1747
+ }, "strip", z.ZodTypeAny, {
1748
+ type: "License";
1749
+ licenseIds: string[];
1750
+ }, {
1751
+ type: "License";
1752
+ licenseIds: string[];
1753
+ }>, z.ZodObject<{
1754
+ type: z.ZodLiteral<"Bundle">;
1755
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
1756
+ licenseIds: z.ZodArray<z.ZodString, "many">;
1757
+ }, "strip", z.ZodTypeAny, {
1758
+ licenseIds: string[];
1759
+ }, {
1760
+ licenseIds: string[];
1761
+ }>>;
1762
+ }, "strip", z.ZodTypeAny, {
1763
+ type: "Bundle";
1764
+ productLicenses: Record<string, {
1765
+ licenseIds: string[];
1766
+ }>;
1767
+ }, {
1768
+ type: "Bundle";
1769
+ productLicenses: Record<string, {
1770
+ licenseIds: string[];
1771
+ }>;
1772
+ }>]>>;
1773
+ }, "strip", z.ZodTypeAny, {
1774
+ type: "Product";
1775
+ productId: string;
1776
+ quantity: number;
1777
+ variationId: string;
1778
+ total?: {
1779
+ discount: {
1780
+ currency: string;
1781
+ amount: number;
1782
+ };
1783
+ original: {
1784
+ currency: string;
1785
+ amount: number;
1786
+ };
1787
+ subtotal: {
1788
+ currency: string;
1789
+ amount: number;
1790
+ };
1791
+ due: {
1792
+ currency: string;
1793
+ amount: number;
1794
+ };
1795
+ } | undefined;
1796
+ price?: Record<string, number> | undefined;
1797
+ payout?: {
1798
+ subtotal: {
1799
+ currency: string;
1800
+ amount: number;
1801
+ };
1802
+ due: {
1803
+ currency: string;
1804
+ amount: number;
1805
+ };
1806
+ taxes: {
1807
+ currency: string;
1808
+ amount: number;
1809
+ };
1810
+ platformFees: {
1811
+ currency: string;
1812
+ amount: number;
1813
+ };
1814
+ } | undefined;
1815
+ affiliatePayouts?: {
1816
+ payout: {
1817
+ currency: string;
1818
+ amount: number;
1819
+ };
1820
+ affiliateId: string;
1821
+ contractId: string;
1822
+ }[] | undefined;
1823
+ variation?: {
1824
+ id: string;
1825
+ name: string;
1826
+ price: Record<string, number>;
1827
+ } | undefined;
1828
+ appliedDiscount?: {
1829
+ name: string;
1830
+ description: string | null;
1831
+ discount: {
1832
+ type: "PercentageOffDiscount";
1833
+ percentage: number;
1834
+ } | {
1835
+ type: "FlatAmountOffDiscount";
1836
+ total: Record<string, number>;
1837
+ };
1838
+ applicableVariationIds: string[] | null;
1839
+ validity: {
1840
+ from: Date | null;
1841
+ to: Date | null;
1842
+ } | null;
1843
+ } | undefined;
1844
+ fulfillment?: {
1845
+ type: "License";
1846
+ licenseIds: string[];
1847
+ } | {
1848
+ type: "Bundle";
1849
+ productLicenses: Record<string, {
1850
+ licenseIds: string[];
1851
+ }>;
1852
+ } | undefined;
1853
+ }, {
1854
+ type: "Product";
1855
+ productId: string;
1856
+ quantity: number;
1857
+ variationId: string;
1858
+ total?: {
1859
+ discount: {
1860
+ currency: string;
1861
+ amount: number;
1862
+ };
1863
+ original: {
1864
+ currency: string;
1865
+ amount: number;
1866
+ };
1867
+ subtotal: {
1868
+ currency: string;
1869
+ amount: number;
1870
+ };
1871
+ due: {
1872
+ currency: string;
1873
+ amount: number;
1874
+ };
1875
+ } | undefined;
1876
+ price?: Record<string, number> | undefined;
1877
+ payout?: {
1878
+ subtotal: {
1879
+ currency: string;
1880
+ amount: number;
1881
+ };
1882
+ due: {
1883
+ currency: string;
1884
+ amount: number;
1885
+ };
1886
+ taxes: {
1887
+ currency: string;
1888
+ amount: number;
1889
+ };
1890
+ platformFees: {
1891
+ currency: string;
1892
+ amount: number;
1893
+ };
1894
+ } | undefined;
1895
+ affiliatePayouts?: {
1896
+ payout: {
1897
+ currency: string;
1898
+ amount: number;
1899
+ };
1900
+ affiliateId: string;
1901
+ contractId: string;
1902
+ }[] | undefined;
1903
+ variation?: {
1904
+ id: string;
1905
+ name: string;
1906
+ price: Record<string, number>;
1907
+ } | undefined;
1908
+ appliedDiscount?: {
1909
+ name: string;
1910
+ description: string | null;
1911
+ discount: {
1912
+ type: "PercentageOffDiscount";
1913
+ percentage: number;
1914
+ } | {
1915
+ type: "FlatAmountOffDiscount";
1916
+ total: Record<string, number>;
1917
+ };
1918
+ applicableVariationIds: string[] | null;
1919
+ validity: {
1920
+ from: Date | null;
1921
+ to: Date | null;
1922
+ } | null;
1923
+ } | undefined;
1924
+ fulfillment?: {
1925
+ type: "License";
1926
+ licenseIds: string[];
1927
+ } | {
1928
+ type: "Bundle";
1929
+ productLicenses: Record<string, {
1930
+ licenseIds: string[];
1931
+ }>;
1932
+ } | undefined;
1933
+ }>, z.ZodObject<{
1934
+ type: z.ZodLiteral<"Bundle">;
1935
+ bundleId: z.ZodString;
1936
+ quantity: z.ZodNumber;
1937
+ variationId: z.ZodString;
1938
+ price: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1939
+ total: z.ZodOptional<z.ZodObject<{
1940
+ original: z.ZodObject<{
1941
+ currency: z.ZodString;
1942
+ amount: z.ZodNumber;
1943
+ }, "strip", z.ZodTypeAny, {
1944
+ currency: string;
1945
+ amount: number;
1946
+ }, {
1947
+ currency: string;
1948
+ amount: number;
1949
+ }>;
1950
+ discount: z.ZodObject<{
1951
+ currency: z.ZodString;
1952
+ amount: z.ZodNumber;
1953
+ }, "strip", z.ZodTypeAny, {
1954
+ currency: string;
1955
+ amount: number;
1956
+ }, {
1957
+ currency: string;
1958
+ amount: number;
1959
+ }>;
1960
+ subtotal: z.ZodObject<{
1961
+ currency: z.ZodString;
1962
+ amount: z.ZodNumber;
1963
+ }, "strip", z.ZodTypeAny, {
1964
+ currency: string;
1965
+ amount: number;
1966
+ }, {
1967
+ currency: string;
1968
+ amount: number;
1969
+ }>;
1970
+ due: z.ZodObject<{
1971
+ currency: z.ZodString;
1972
+ amount: z.ZodNumber;
1973
+ }, "strip", z.ZodTypeAny, {
1974
+ currency: string;
1975
+ amount: number;
1976
+ }, {
1977
+ currency: string;
1978
+ amount: number;
1979
+ }>;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ discount: {
1982
+ currency: string;
1983
+ amount: number;
1984
+ };
1985
+ original: {
1986
+ currency: string;
1987
+ amount: number;
1988
+ };
1989
+ subtotal: {
1990
+ currency: string;
1991
+ amount: number;
1992
+ };
1993
+ due: {
1994
+ currency: string;
1995
+ amount: number;
1996
+ };
1997
+ }, {
1998
+ discount: {
1999
+ currency: string;
2000
+ amount: number;
2001
+ };
2002
+ original: {
2003
+ currency: string;
2004
+ amount: number;
2005
+ };
2006
+ subtotal: {
2007
+ currency: string;
2008
+ amount: number;
2009
+ };
2010
+ due: {
2011
+ currency: string;
2012
+ amount: number;
2013
+ };
2014
+ }>>;
2015
+ payout: z.ZodOptional<z.ZodObject<{
2016
+ subtotal: z.ZodObject<{
2017
+ currency: z.ZodString;
2018
+ amount: z.ZodNumber;
2019
+ }, "strip", z.ZodTypeAny, {
2020
+ currency: string;
2021
+ amount: number;
2022
+ }, {
2023
+ currency: string;
2024
+ amount: number;
2025
+ }>;
2026
+ taxes: z.ZodObject<{
2027
+ currency: z.ZodString;
2028
+ amount: z.ZodNumber;
2029
+ }, "strip", z.ZodTypeAny, {
2030
+ currency: string;
2031
+ amount: number;
2032
+ }, {
2033
+ currency: string;
2034
+ amount: number;
2035
+ }>;
2036
+ platformFees: z.ZodObject<{
2037
+ currency: z.ZodString;
2038
+ amount: z.ZodNumber;
2039
+ }, "strip", z.ZodTypeAny, {
2040
+ currency: string;
2041
+ amount: number;
2042
+ }, {
2043
+ currency: string;
2044
+ amount: number;
2045
+ }>;
2046
+ due: z.ZodObject<{
2047
+ currency: z.ZodString;
2048
+ amount: z.ZodNumber;
2049
+ }, "strip", z.ZodTypeAny, {
2050
+ currency: string;
2051
+ amount: number;
2052
+ }, {
2053
+ currency: string;
2054
+ amount: number;
2055
+ }>;
2056
+ }, "strip", z.ZodTypeAny, {
2057
+ subtotal: {
2058
+ currency: string;
2059
+ amount: number;
2060
+ };
2061
+ due: {
2062
+ currency: string;
2063
+ amount: number;
2064
+ };
2065
+ taxes: {
2066
+ currency: string;
2067
+ amount: number;
2068
+ };
2069
+ platformFees: {
2070
+ currency: string;
2071
+ amount: number;
2072
+ };
2073
+ }, {
2074
+ subtotal: {
2075
+ currency: string;
2076
+ amount: number;
2077
+ };
2078
+ due: {
2079
+ currency: string;
2080
+ amount: number;
2081
+ };
2082
+ taxes: {
2083
+ currency: string;
2084
+ amount: number;
2085
+ };
2086
+ platformFees: {
2087
+ currency: string;
2088
+ amount: number;
2089
+ };
2090
+ }>>;
2091
+ affiliatePayouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2092
+ payout: z.ZodObject<{
2093
+ currency: z.ZodString;
2094
+ amount: z.ZodNumber;
2095
+ }, "strip", z.ZodTypeAny, {
2096
+ currency: string;
2097
+ amount: number;
2098
+ }, {
2099
+ currency: string;
2100
+ amount: number;
2101
+ }>;
2102
+ affiliateId: z.ZodString;
2103
+ contractId: z.ZodString;
2104
+ }, "strip", z.ZodTypeAny, {
2105
+ payout: {
2106
+ currency: string;
2107
+ amount: number;
2108
+ };
2109
+ affiliateId: string;
2110
+ contractId: string;
2111
+ }, {
2112
+ payout: {
2113
+ currency: string;
2114
+ amount: number;
2115
+ };
2116
+ affiliateId: string;
2117
+ contractId: string;
2118
+ }>, "many">>;
2119
+ variation: z.ZodOptional<z.ZodObject<{
2120
+ id: z.ZodString;
2121
+ name: z.ZodString;
2122
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
2123
+ }, "strip", z.ZodTypeAny, {
2124
+ id: string;
2125
+ name: string;
2126
+ price: Record<string, number>;
2127
+ }, {
2128
+ id: string;
2129
+ name: string;
2130
+ price: Record<string, number>;
2131
+ }>>;
2132
+ appliedDiscount: z.ZodOptional<z.ZodObject<{
2133
+ name: z.ZodString;
2134
+ description: z.ZodNullable<z.ZodString>;
2135
+ discount: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2136
+ type: z.ZodLiteral<"PercentageOffDiscount">;
2137
+ percentage: z.ZodNumber;
2138
+ }, "strip", z.ZodTypeAny, {
2139
+ type: "PercentageOffDiscount";
2140
+ percentage: number;
2141
+ }, {
2142
+ type: "PercentageOffDiscount";
2143
+ percentage: number;
2144
+ }>, z.ZodObject<{
2145
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
2146
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
2147
+ }, "strip", z.ZodTypeAny, {
2148
+ type: "FlatAmountOffDiscount";
2149
+ total: Record<string, number>;
2150
+ }, {
2151
+ type: "FlatAmountOffDiscount";
2152
+ total: Record<string, number>;
2153
+ }>]>;
2154
+ applicableVariationIds: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
2155
+ validity: z.ZodNullable<z.ZodObject<{
2156
+ from: z.ZodNullable<z.ZodDate>;
2157
+ to: z.ZodNullable<z.ZodDate>;
2158
+ }, "strip", z.ZodTypeAny, {
2159
+ from: Date | null;
2160
+ to: Date | null;
2161
+ }, {
2162
+ from: Date | null;
2163
+ to: Date | null;
2164
+ }>>;
2165
+ }, "strip", z.ZodTypeAny, {
2166
+ name: string;
2167
+ description: string | null;
2168
+ discount: {
2169
+ type: "PercentageOffDiscount";
2170
+ percentage: number;
2171
+ } | {
2172
+ type: "FlatAmountOffDiscount";
2173
+ total: Record<string, number>;
2174
+ };
2175
+ applicableVariationIds: string[] | null;
2176
+ validity: {
2177
+ from: Date | null;
2178
+ to: Date | null;
2179
+ } | null;
2180
+ }, {
2181
+ name: string;
2182
+ description: string | null;
2183
+ discount: {
2184
+ type: "PercentageOffDiscount";
2185
+ percentage: number;
2186
+ } | {
2187
+ type: "FlatAmountOffDiscount";
2188
+ total: Record<string, number>;
2189
+ };
2190
+ applicableVariationIds: string[] | null;
2191
+ validity: {
2192
+ from: Date | null;
2193
+ to: Date | null;
2194
+ } | null;
2195
+ }>>;
2196
+ fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2197
+ type: z.ZodLiteral<"License">;
2198
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2199
+ }, "strip", z.ZodTypeAny, {
2200
+ type: "License";
2201
+ licenseIds: string[];
2202
+ }, {
2203
+ type: "License";
2204
+ licenseIds: string[];
2205
+ }>, z.ZodObject<{
2206
+ type: z.ZodLiteral<"Bundle">;
2207
+ productLicenses: z.ZodRecord<z.ZodString, z.ZodObject<{
2208
+ licenseIds: z.ZodArray<z.ZodString, "many">;
2209
+ }, "strip", z.ZodTypeAny, {
2210
+ licenseIds: string[];
2211
+ }, {
2212
+ licenseIds: string[];
2213
+ }>>;
2214
+ }, "strip", z.ZodTypeAny, {
2215
+ type: "Bundle";
2216
+ productLicenses: Record<string, {
2217
+ licenseIds: string[];
2218
+ }>;
2219
+ }, {
2220
+ type: "Bundle";
2221
+ productLicenses: Record<string, {
2222
+ licenseIds: string[];
2223
+ }>;
2224
+ }>]>>;
2225
+ }, "strip", z.ZodTypeAny, {
2226
+ type: "Bundle";
2227
+ quantity: number;
2228
+ variationId: string;
2229
+ bundleId: string;
2230
+ total?: {
2231
+ discount: {
2232
+ currency: string;
2233
+ amount: number;
2234
+ };
2235
+ original: {
2236
+ currency: string;
2237
+ amount: number;
2238
+ };
2239
+ subtotal: {
2240
+ currency: string;
2241
+ amount: number;
2242
+ };
2243
+ due: {
2244
+ currency: string;
2245
+ amount: number;
2246
+ };
2247
+ } | undefined;
2248
+ price?: Record<string, number> | undefined;
2249
+ payout?: {
2250
+ subtotal: {
2251
+ currency: string;
2252
+ amount: number;
2253
+ };
2254
+ due: {
2255
+ currency: string;
2256
+ amount: number;
2257
+ };
2258
+ taxes: {
2259
+ currency: string;
2260
+ amount: number;
2261
+ };
2262
+ platformFees: {
2263
+ currency: string;
2264
+ amount: number;
2265
+ };
2266
+ } | undefined;
2267
+ affiliatePayouts?: {
2268
+ payout: {
2269
+ currency: string;
2270
+ amount: number;
2271
+ };
2272
+ affiliateId: string;
2273
+ contractId: string;
2274
+ }[] | undefined;
2275
+ variation?: {
2276
+ id: string;
2277
+ name: string;
2278
+ price: Record<string, number>;
2279
+ } | undefined;
2280
+ appliedDiscount?: {
2281
+ name: string;
2282
+ description: string | null;
2283
+ discount: {
2284
+ type: "PercentageOffDiscount";
2285
+ percentage: number;
2286
+ } | {
2287
+ type: "FlatAmountOffDiscount";
2288
+ total: Record<string, number>;
2289
+ };
2290
+ applicableVariationIds: string[] | null;
2291
+ validity: {
2292
+ from: Date | null;
2293
+ to: Date | null;
2294
+ } | null;
2295
+ } | undefined;
2296
+ fulfillment?: {
2297
+ type: "License";
2298
+ licenseIds: string[];
2299
+ } | {
2300
+ type: "Bundle";
2301
+ productLicenses: Record<string, {
2302
+ licenseIds: string[];
2303
+ }>;
2304
+ } | undefined;
2305
+ }, {
2306
+ type: "Bundle";
2307
+ quantity: number;
2308
+ variationId: string;
2309
+ bundleId: string;
2310
+ total?: {
2311
+ discount: {
2312
+ currency: string;
2313
+ amount: number;
2314
+ };
2315
+ original: {
2316
+ currency: string;
2317
+ amount: number;
2318
+ };
2319
+ subtotal: {
2320
+ currency: string;
2321
+ amount: number;
2322
+ };
2323
+ due: {
2324
+ currency: string;
2325
+ amount: number;
2326
+ };
2327
+ } | undefined;
2328
+ price?: Record<string, number> | undefined;
2329
+ payout?: {
2330
+ subtotal: {
2331
+ currency: string;
2332
+ amount: number;
2333
+ };
2334
+ due: {
2335
+ currency: string;
2336
+ amount: number;
2337
+ };
2338
+ taxes: {
2339
+ currency: string;
2340
+ amount: number;
2341
+ };
2342
+ platformFees: {
2343
+ currency: string;
2344
+ amount: number;
2345
+ };
2346
+ } | undefined;
2347
+ affiliatePayouts?: {
2348
+ payout: {
2349
+ currency: string;
2350
+ amount: number;
2351
+ };
2352
+ affiliateId: string;
2353
+ contractId: string;
2354
+ }[] | undefined;
2355
+ variation?: {
2356
+ id: string;
2357
+ name: string;
2358
+ price: Record<string, number>;
2359
+ } | undefined;
2360
+ appliedDiscount?: {
2361
+ name: string;
2362
+ description: string | null;
2363
+ discount: {
2364
+ type: "PercentageOffDiscount";
2365
+ percentage: number;
2366
+ } | {
2367
+ type: "FlatAmountOffDiscount";
2368
+ total: Record<string, number>;
2369
+ };
2370
+ applicableVariationIds: string[] | null;
2371
+ validity: {
2372
+ from: Date | null;
2373
+ to: Date | null;
2374
+ } | null;
2375
+ } | undefined;
2376
+ fulfillment?: {
2377
+ type: "License";
2378
+ licenseIds: string[];
2379
+ } | {
2380
+ type: "Bundle";
2381
+ productLicenses: Record<string, {
2382
+ licenseIds: string[];
2383
+ }>;
2384
+ } | undefined;
2385
+ }>]>, "many">;
2386
+ lastUpdated: z.ZodObject<{
2387
+ at: z.ZodDate;
2388
+ by: z.ZodObject<{
2389
+ id: z.ZodString;
2390
+ name: z.ZodString;
2391
+ email: z.ZodString;
2392
+ }, "strip", z.ZodTypeAny, {
2393
+ id: string;
2394
+ name: string;
2395
+ email: string;
2396
+ }, {
2397
+ id: string;
2398
+ name: string;
2399
+ email: string;
2400
+ }>;
2401
+ }, "strip", z.ZodTypeAny, {
2402
+ at: Date;
2403
+ by: {
2404
+ id: string;
2405
+ name: string;
2406
+ email: string;
2407
+ };
2408
+ }, {
2409
+ at: Date;
2410
+ by: {
2411
+ id: string;
2412
+ name: string;
2413
+ email: string;
2414
+ };
2415
+ }>;
2416
+ created: z.ZodObject<{
2417
+ at: z.ZodDate;
2418
+ by: z.ZodObject<{
2419
+ id: z.ZodString;
2420
+ name: z.ZodString;
2421
+ email: z.ZodString;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ id: string;
2424
+ name: string;
2425
+ email: string;
2426
+ }, {
2427
+ id: string;
2428
+ name: string;
2429
+ email: string;
2430
+ }>;
2431
+ }, "strip", z.ZodTypeAny, {
2432
+ at: Date;
2433
+ by: {
2434
+ id: string;
2435
+ name: string;
2436
+ email: string;
2437
+ };
2438
+ }, {
2439
+ at: Date;
2440
+ by: {
2441
+ id: string;
2442
+ name: string;
2443
+ email: string;
2444
+ };
2445
+ }>;
2446
+ }, "strip", z.ZodTypeAny, {
2447
+ status: OrderStatus;
2448
+ id: string;
2449
+ currency: string;
2450
+ items: ({
2451
+ type: "Product";
2452
+ productId: string;
2453
+ quantity: number;
2454
+ variationId: string;
2455
+ total?: {
2456
+ discount: {
2457
+ currency: string;
2458
+ amount: number;
2459
+ };
2460
+ original: {
2461
+ currency: string;
2462
+ amount: number;
2463
+ };
2464
+ subtotal: {
2465
+ currency: string;
2466
+ amount: number;
2467
+ };
2468
+ due: {
2469
+ currency: string;
2470
+ amount: number;
2471
+ };
2472
+ } | undefined;
2473
+ price?: Record<string, number> | undefined;
2474
+ payout?: {
2475
+ subtotal: {
2476
+ currency: string;
2477
+ amount: number;
2478
+ };
2479
+ due: {
2480
+ currency: string;
2481
+ amount: number;
2482
+ };
2483
+ taxes: {
2484
+ currency: string;
2485
+ amount: number;
2486
+ };
2487
+ platformFees: {
2488
+ currency: string;
2489
+ amount: number;
2490
+ };
2491
+ } | undefined;
2492
+ affiliatePayouts?: {
2493
+ payout: {
2494
+ currency: string;
2495
+ amount: number;
2496
+ };
2497
+ affiliateId: string;
2498
+ contractId: string;
2499
+ }[] | undefined;
2500
+ variation?: {
2501
+ id: string;
2502
+ name: string;
2503
+ price: Record<string, number>;
2504
+ } | undefined;
2505
+ appliedDiscount?: {
2506
+ name: string;
2507
+ description: string | null;
2508
+ discount: {
2509
+ type: "PercentageOffDiscount";
2510
+ percentage: number;
2511
+ } | {
2512
+ type: "FlatAmountOffDiscount";
2513
+ total: Record<string, number>;
2514
+ };
2515
+ applicableVariationIds: string[] | null;
2516
+ validity: {
2517
+ from: Date | null;
2518
+ to: Date | null;
2519
+ } | null;
2520
+ } | undefined;
2521
+ fulfillment?: {
2522
+ type: "License";
2523
+ licenseIds: string[];
2524
+ } | {
2525
+ type: "Bundle";
2526
+ productLicenses: Record<string, {
2527
+ licenseIds: string[];
2528
+ }>;
2529
+ } | undefined;
2530
+ } | {
2531
+ type: "Bundle";
2532
+ quantity: number;
2533
+ variationId: string;
2534
+ bundleId: string;
2535
+ total?: {
2536
+ discount: {
2537
+ currency: string;
2538
+ amount: number;
2539
+ };
2540
+ original: {
2541
+ currency: string;
2542
+ amount: number;
2543
+ };
2544
+ subtotal: {
2545
+ currency: string;
2546
+ amount: number;
2547
+ };
2548
+ due: {
2549
+ currency: string;
2550
+ amount: number;
2551
+ };
2552
+ } | undefined;
2553
+ price?: Record<string, number> | undefined;
2554
+ payout?: {
2555
+ subtotal: {
2556
+ currency: string;
2557
+ amount: number;
2558
+ };
2559
+ due: {
2560
+ currency: string;
2561
+ amount: number;
2562
+ };
2563
+ taxes: {
2564
+ currency: string;
2565
+ amount: number;
2566
+ };
2567
+ platformFees: {
2568
+ currency: string;
2569
+ amount: number;
2570
+ };
2571
+ } | undefined;
2572
+ affiliatePayouts?: {
2573
+ payout: {
2574
+ currency: string;
2575
+ amount: number;
2576
+ };
2577
+ affiliateId: string;
2578
+ contractId: string;
2579
+ }[] | undefined;
2580
+ variation?: {
2581
+ id: string;
2582
+ name: string;
2583
+ price: Record<string, number>;
2584
+ } | undefined;
2585
+ appliedDiscount?: {
2586
+ name: string;
2587
+ description: string | null;
2588
+ discount: {
2589
+ type: "PercentageOffDiscount";
2590
+ percentage: number;
2591
+ } | {
2592
+ type: "FlatAmountOffDiscount";
2593
+ total: Record<string, number>;
2594
+ };
2595
+ applicableVariationIds: string[] | null;
2596
+ validity: {
2597
+ from: Date | null;
2598
+ to: Date | null;
2599
+ } | null;
2600
+ } | undefined;
2601
+ fulfillment?: {
2602
+ type: "License";
2603
+ licenseIds: string[];
2604
+ } | {
2605
+ type: "Bundle";
2606
+ productLicenses: Record<string, {
2607
+ licenseIds: string[];
2608
+ }>;
2609
+ } | undefined;
2610
+ })[];
2611
+ isRefunded: boolean;
2612
+ isDisputed: boolean;
2613
+ couponsApplied: {
2614
+ code: string;
2615
+ name: string;
2616
+ description: string;
2617
+ }[];
2618
+ lastUpdated: {
2619
+ at: Date;
2620
+ by: {
2621
+ id: string;
2622
+ name: string;
2623
+ email: string;
2624
+ };
2625
+ };
2626
+ created: {
2627
+ at: Date;
2628
+ by: {
2629
+ id: string;
2630
+ name: string;
2631
+ email: string;
2632
+ };
2633
+ };
2634
+ customer?: {
2635
+ name: string | null;
2636
+ businessName: string | null;
2637
+ taxId: string | null;
2638
+ email: string | null;
2639
+ address: {
2640
+ countryCode: string;
2641
+ streetAddress1: string;
2642
+ streetAddress2: string | null;
2643
+ locality: string | null;
2644
+ region: string | null;
2645
+ postCode: string;
2646
+ } | null;
2647
+ } | undefined;
2648
+ total?: {
2649
+ discount: {
2650
+ currency: string;
2651
+ amount: number;
2652
+ };
2653
+ original: {
2654
+ currency: string;
2655
+ amount: number;
2656
+ };
2657
+ subtotal: {
2658
+ currency: string;
2659
+ amount: number;
2660
+ };
2661
+ due: {
2662
+ currency: string;
2663
+ amount: number;
2664
+ };
2665
+ taxes: {
2666
+ currency: string;
2667
+ amount: number;
2668
+ };
2669
+ } | undefined;
2670
+ payout?: {
2671
+ subtotal: {
2672
+ currency: string;
2673
+ amount: number;
2674
+ };
2675
+ due: {
2676
+ currency: string;
2677
+ amount: number;
2678
+ };
2679
+ taxes: {
2680
+ currency: string;
2681
+ amount: number;
2682
+ };
2683
+ platformFees: {
2684
+ currency: string;
2685
+ amount: number;
2686
+ };
2687
+ feeBreakdown: string[];
2688
+ } | undefined;
2689
+ affiliatePayouts?: {
2690
+ payout: {
2691
+ currency: string;
2692
+ amount: number;
2693
+ };
2694
+ affiliateId: string;
2695
+ contractId: string;
2696
+ }[] | undefined;
2697
+ completedAt?: Date | undefined;
2698
+ refundedAt?: Date | undefined;
2699
+ merchantPayout?: {
2700
+ currency: string;
2701
+ amount: number;
2702
+ } | undefined;
2703
+ initialUTM?: {
2704
+ referrer?: string | undefined;
2705
+ source?: string | undefined;
2706
+ medium?: string | undefined;
2707
+ campaign?: string | undefined;
2708
+ term?: string | undefined;
2709
+ content?: string | undefined;
2710
+ } | undefined;
2711
+ currentUTM?: {
2712
+ referrer?: string | undefined;
2713
+ source?: string | undefined;
2714
+ medium?: string | undefined;
2715
+ campaign?: string | undefined;
2716
+ term?: string | undefined;
2717
+ content?: string | undefined;
2718
+ } | undefined;
2719
+ }, {
2720
+ status: OrderStatus;
2721
+ id: string;
2722
+ currency: string;
2723
+ items: ({
2724
+ type: "Product";
2725
+ productId: string;
2726
+ quantity: number;
2727
+ variationId: string;
2728
+ total?: {
2729
+ discount: {
2730
+ currency: string;
2731
+ amount: number;
2732
+ };
2733
+ original: {
2734
+ currency: string;
2735
+ amount: number;
2736
+ };
2737
+ subtotal: {
2738
+ currency: string;
2739
+ amount: number;
2740
+ };
2741
+ due: {
2742
+ currency: string;
2743
+ amount: number;
2744
+ };
2745
+ } | undefined;
2746
+ price?: Record<string, number> | undefined;
2747
+ payout?: {
2748
+ subtotal: {
2749
+ currency: string;
2750
+ amount: number;
2751
+ };
2752
+ due: {
2753
+ currency: string;
2754
+ amount: number;
2755
+ };
2756
+ taxes: {
2757
+ currency: string;
2758
+ amount: number;
2759
+ };
2760
+ platformFees: {
2761
+ currency: string;
2762
+ amount: number;
2763
+ };
2764
+ } | undefined;
2765
+ affiliatePayouts?: {
2766
+ payout: {
2767
+ currency: string;
2768
+ amount: number;
2769
+ };
2770
+ affiliateId: string;
2771
+ contractId: string;
2772
+ }[] | undefined;
2773
+ variation?: {
2774
+ id: string;
2775
+ name: string;
2776
+ price: Record<string, number>;
2777
+ } | undefined;
2778
+ appliedDiscount?: {
2779
+ name: string;
2780
+ description: string | null;
2781
+ discount: {
2782
+ type: "PercentageOffDiscount";
2783
+ percentage: number;
2784
+ } | {
2785
+ type: "FlatAmountOffDiscount";
2786
+ total: Record<string, number>;
2787
+ };
2788
+ applicableVariationIds: string[] | null;
2789
+ validity: {
2790
+ from: Date | null;
2791
+ to: Date | null;
2792
+ } | null;
2793
+ } | undefined;
2794
+ fulfillment?: {
2795
+ type: "License";
2796
+ licenseIds: string[];
2797
+ } | {
2798
+ type: "Bundle";
2799
+ productLicenses: Record<string, {
2800
+ licenseIds: string[];
2801
+ }>;
2802
+ } | undefined;
2803
+ } | {
2804
+ type: "Bundle";
2805
+ quantity: number;
2806
+ variationId: string;
2807
+ bundleId: string;
2808
+ total?: {
2809
+ discount: {
2810
+ currency: string;
2811
+ amount: number;
2812
+ };
2813
+ original: {
2814
+ currency: string;
2815
+ amount: number;
2816
+ };
2817
+ subtotal: {
2818
+ currency: string;
2819
+ amount: number;
2820
+ };
2821
+ due: {
2822
+ currency: string;
2823
+ amount: number;
2824
+ };
2825
+ } | undefined;
2826
+ price?: Record<string, number> | undefined;
2827
+ payout?: {
2828
+ subtotal: {
2829
+ currency: string;
2830
+ amount: number;
2831
+ };
2832
+ due: {
2833
+ currency: string;
2834
+ amount: number;
2835
+ };
2836
+ taxes: {
2837
+ currency: string;
2838
+ amount: number;
2839
+ };
2840
+ platformFees: {
2841
+ currency: string;
2842
+ amount: number;
2843
+ };
2844
+ } | undefined;
2845
+ affiliatePayouts?: {
2846
+ payout: {
2847
+ currency: string;
2848
+ amount: number;
2849
+ };
2850
+ affiliateId: string;
2851
+ contractId: string;
2852
+ }[] | undefined;
2853
+ variation?: {
2854
+ id: string;
2855
+ name: string;
2856
+ price: Record<string, number>;
2857
+ } | undefined;
2858
+ appliedDiscount?: {
2859
+ name: string;
2860
+ description: string | null;
2861
+ discount: {
2862
+ type: "PercentageOffDiscount";
2863
+ percentage: number;
2864
+ } | {
2865
+ type: "FlatAmountOffDiscount";
2866
+ total: Record<string, number>;
2867
+ };
2868
+ applicableVariationIds: string[] | null;
2869
+ validity: {
2870
+ from: Date | null;
2871
+ to: Date | null;
2872
+ } | null;
2873
+ } | undefined;
2874
+ fulfillment?: {
2875
+ type: "License";
2876
+ licenseIds: string[];
2877
+ } | {
2878
+ type: "Bundle";
2879
+ productLicenses: Record<string, {
2880
+ licenseIds: string[];
2881
+ }>;
2882
+ } | undefined;
2883
+ })[];
2884
+ isRefunded: boolean;
2885
+ isDisputed: boolean;
2886
+ couponsApplied: {
2887
+ code: string;
2888
+ name: string;
2889
+ description: string;
2890
+ }[];
2891
+ lastUpdated: {
2892
+ at: Date;
2893
+ by: {
2894
+ id: string;
2895
+ name: string;
2896
+ email: string;
2897
+ };
2898
+ };
2899
+ created: {
2900
+ at: Date;
2901
+ by: {
2902
+ id: string;
2903
+ name: string;
2904
+ email: string;
2905
+ };
2906
+ };
2907
+ customer?: {
2908
+ name: string | null;
2909
+ businessName: string | null;
2910
+ taxId: string | null;
2911
+ email: string | null;
2912
+ address: {
2913
+ countryCode: string;
2914
+ streetAddress1: string;
2915
+ streetAddress2: string | null;
2916
+ locality: string | null;
2917
+ region: string | null;
2918
+ postCode: string;
2919
+ } | null;
2920
+ } | undefined;
2921
+ total?: {
2922
+ discount: {
2923
+ currency: string;
2924
+ amount: number;
2925
+ };
2926
+ original: {
2927
+ currency: string;
2928
+ amount: number;
2929
+ };
2930
+ subtotal: {
2931
+ currency: string;
2932
+ amount: number;
2933
+ };
2934
+ due: {
2935
+ currency: string;
2936
+ amount: number;
2937
+ };
2938
+ taxes: {
2939
+ currency: string;
2940
+ amount: number;
2941
+ };
2942
+ } | undefined;
2943
+ payout?: {
2944
+ subtotal: {
2945
+ currency: string;
2946
+ amount: number;
2947
+ };
2948
+ due: {
2949
+ currency: string;
2950
+ amount: number;
2951
+ };
2952
+ taxes: {
2953
+ currency: string;
2954
+ amount: number;
2955
+ };
2956
+ platformFees: {
2957
+ currency: string;
2958
+ amount: number;
2959
+ };
2960
+ feeBreakdown: string[];
2961
+ } | undefined;
2962
+ affiliatePayouts?: {
2963
+ payout: {
2964
+ currency: string;
2965
+ amount: number;
2966
+ };
2967
+ affiliateId: string;
2968
+ contractId: string;
2969
+ }[] | undefined;
2970
+ completedAt?: Date | undefined;
2971
+ refundedAt?: Date | undefined;
2972
+ merchantPayout?: {
2973
+ currency: string;
2974
+ amount: number;
2975
+ } | undefined;
2976
+ initialUTM?: {
2977
+ referrer?: string | undefined;
2978
+ source?: string | undefined;
2979
+ medium?: string | undefined;
2980
+ campaign?: string | undefined;
2981
+ term?: string | undefined;
2982
+ content?: string | undefined;
2983
+ } | undefined;
2984
+ currentUTM?: {
2985
+ referrer?: string | undefined;
2986
+ source?: string | undefined;
2987
+ medium?: string | undefined;
2988
+ campaign?: string | undefined;
2989
+ term?: string | undefined;
2990
+ content?: string | undefined;
2991
+ } | undefined;
2992
+ }>;
2993
+
2994
+ declare enum OrderStatus {
2995
+ Open = "Open",
2996
+ PaymentProcessing = "PaymentProcessing",
2997
+ Completed = "Completed",
2998
+ Failed = "Failed"
2999
+ }
3000
+ type Order = z.infer<typeof orderSchema>;
3001
+
3002
+ declare class OrderEndpoints {
3003
+ private api;
3004
+ constructor(api: MoonbaseApi);
3005
+ query(opts: {
3006
+ paginationToken?: string;
3007
+ status: OrderStatus;
3008
+ pageSize?: number;
3009
+ }): Promise<Page<Order>>;
3010
+ get(id: string): Promise<Order>;
3011
+ }
3012
+
1214
3013
  declare const productSchema: z.ZodObject<{
1215
3014
  id: z.ZodString;
1216
3015
  name: z.ZodString;
@@ -1764,6 +3563,7 @@ declare class MoonbaseClient {
1764
3563
  products: ProductEndpoints;
1765
3564
  trials: TrialEndpoints;
1766
3565
  vouchers: VoucherEndpoints;
3566
+ orders: OrderEndpoints;
1767
3567
  }
1768
3568
 
1769
- export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Page, type PricingVariation, type Product, ProductStatus, type Quantifiable, type Trial, TrialStatus, type Voucher };
3569
+ export { ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Bundle, ConflictError, type CreateVoucherRequest, type Customer, type ImportCustomerRequest, type ImportLicenseRequest, type ImportTrialRequest, type License, type LicenseActivation, LicenseStatus, MoonbaseClient, type MoonbaseConfiguration, MoonbaseError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type Order, OrderStatus, type Page, type PricingVariation, type Product, ProductStatus, type Quantifiable, type Trial, TrialStatus, type Voucher };