@cimplify/sdk 0.102.0 → 0.103.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.
Files changed (68) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +23 -22
  4. package/dist/advanced.mjs +4 -3
  5. package/dist/{chunk-DCMXUKDQ.mjs → chunk-C2JSNJUC.mjs} +404 -95
  6. package/dist/chunk-CNN7Z2IP.js +125 -0
  7. package/dist/{chunk-DKLHCZ5M.mjs → chunk-GERXZQSX.mjs} +487 -11
  8. package/dist/chunk-GOHSXBKW.mjs +105 -0
  9. package/dist/{chunk-4KNFBPV2.mjs → chunk-H7ACMHM3.mjs} +32 -14
  10. package/dist/{chunk-Z3K2D3TE.mjs → chunk-J6PNHDHL.mjs} +453 -483
  11. package/dist/{chunk-NIOUSKQQ.js → chunk-JG5CQNCB.js} +5 -0
  12. package/dist/{chunk-YER7DIOM.js → chunk-JSWJ4XDE.js} +471 -519
  13. package/dist/{chunk-DLW3RWRK.mjs → chunk-M4URVKHE.mjs} +46 -12
  14. package/dist/{chunk-WMEC5JWN.js → chunk-NNG6IFFX.js} +50 -13
  15. package/dist/{chunk-LOWSMGRT.js → chunk-QOWPGS7Z.js} +34 -16
  16. package/dist/{chunk-YDA46OZ6.js → chunk-R6OLQ33I.js} +560 -80
  17. package/dist/{chunk-EAZGA7LD.js → chunk-VIL6IQCG.js} +406 -97
  18. package/dist/{chunk-O3YUHLZL.mjs → chunk-VNPEYLB2.mjs} +5 -0
  19. package/dist/{client-B40KFazg.d.ts → client-BfpNjJ_a.d.mts} +90 -299
  20. package/dist/{client-BizGfqB7.d.mts → client-DHBwvh7U.d.ts} +90 -299
  21. package/dist/{client-BdErclfU.d.mts → client-DpqRobY9.d.mts} +2 -2
  22. package/dist/{client-nsiMwuC1.d.ts → client-Dqg2mc-7.d.ts} +2 -2
  23. package/dist/{index-DpmnI__D.d.mts → index-C8uDqLwJ.d.ts} +14 -4
  24. package/dist/{index-nEyXWIyR.d.ts → index-e2y6AK70.d.mts} +14 -4
  25. package/dist/index.d.mts +81 -8
  26. package/dist/index.d.ts +81 -8
  27. package/dist/index.js +202 -169
  28. package/dist/index.mjs +6 -5
  29. package/dist/link-cuNVYc2s.d.mts +297 -0
  30. package/dist/link-cuNVYc2s.d.ts +297 -0
  31. package/dist/mock/cli.mjs +410 -94
  32. package/dist/mock/library.js +410 -94
  33. package/dist/mock/library.mjs +410 -94
  34. package/dist/mock/msw.js +410 -94
  35. package/dist/mock/msw.mjs +410 -94
  36. package/dist/{product-Byf0unSy.d.mts → payment-H5LoIvXU.d.mts} +189 -7
  37. package/dist/{product-Byf0unSy.d.ts → payment-H5LoIvXU.d.ts} +189 -7
  38. package/dist/{price-CS4E5zLS.d.mts → price-BvePgDXe.d.mts} +1 -1
  39. package/dist/{price-BstChV9a.d.ts → price-C2RqscMY.d.ts} +1 -1
  40. package/dist/react.d.mts +4 -4
  41. package/dist/react.d.ts +4 -4
  42. package/dist/react.js +141 -140
  43. package/dist/react.mjs +5 -4
  44. package/dist/{server-DqbZh8Bk.d.mts → server-C7FyLdrz.d.mts} +11 -9
  45. package/dist/{server-Cj40R2ZD.d.ts → server-DoXIpSd7.d.ts} +11 -9
  46. package/dist/server.d.mts +4 -4
  47. package/dist/server.d.ts +4 -4
  48. package/dist/server.js +11 -10
  49. package/dist/server.mjs +5 -4
  50. package/dist/testing/msw.d.mts +2 -2
  51. package/dist/testing/msw.d.ts +2 -2
  52. package/dist/testing/msw.js +4 -3
  53. package/dist/testing/msw.mjs +3 -2
  54. package/dist/testing/suite.d.mts +6 -6
  55. package/dist/testing/suite.d.ts +6 -6
  56. package/dist/testing/suite.js +26 -25
  57. package/dist/testing/suite.mjs +7 -6
  58. package/dist/testing.d.mts +154 -55
  59. package/dist/testing.d.ts +154 -55
  60. package/dist/testing.js +83 -82
  61. package/dist/testing.mjs +8 -7
  62. package/dist/utils.d.mts +4 -4
  63. package/dist/utils.d.ts +4 -4
  64. package/dist/utils.js +37 -29
  65. package/dist/utils.mjs +2 -2
  66. package/package.json +7 -1
  67. package/dist/payment-l0rkieEQ.d.mts +0 -113
  68. package/dist/payment-vzNnIi1n.d.ts +0 -113
package/dist/testing.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { $ZodType } from 'zod/v4/core';
3
- export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-nsiMwuC1.js';
4
- import './client-B40KFazg.js';
5
- import './product-Byf0unSy.js';
6
- import './payment-vzNnIi1n.js';
7
- import './server-Cj40R2ZD.js';
3
+ export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-Dqg2mc-7.js';
4
+ import './client-DHBwvh7U.js';
5
+ import './payment-H5LoIvXU.js';
6
+ import './link-cuNVYc2s.js';
7
+ import './server-DoXIpSd7.js';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
54
54
  declare const LocaleSchema: z.ZodString;
55
55
  declare const PhoneE164Schema: z.ZodString;
56
56
  declare const SeedNameSchema: z.ZodEnum<{
57
- empty: "empty";
58
57
  default: "default";
58
+ empty: "empty";
59
59
  "reesa-storefront": "reesa-storefront";
60
60
  restaurant: "restaurant";
61
61
  retail: "retail";
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
71
71
  composite: "composite";
72
72
  }>;
73
73
  declare const LineTypeSchema: z.ZodEnum<{
74
- simple: "simple";
75
74
  service: "service";
76
75
  digital: "digital";
77
76
  bundle: "bundle";
78
77
  composite: "composite";
78
+ simple: "simple";
79
79
  }>;
80
80
  declare const ServiceStatusSchema: z.ZodEnum<{
81
81
  pending: "pending";
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
365
365
  }, z.core.$strip>;
366
366
  mock: z.ZodObject<{
367
367
  seed: z.ZodEnum<{
368
- empty: "empty";
369
368
  default: "default";
369
+ empty: "empty";
370
370
  "reesa-storefront": "reesa-storefront";
371
371
  restaurant: "restaurant";
372
372
  retail: "retail";
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
531
531
  summary: string;
532
532
  };
533
533
  mock: {
534
- seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
534
+ seed: "default" | "empty" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
535
535
  businessId: string;
536
536
  };
537
537
  trustItems?: {
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
780
780
  quantity: z.ZodNumber;
781
781
  line_key: z.ZodString;
782
782
  line_type: z.ZodEnum<{
783
- simple: "simple";
784
783
  service: "service";
785
784
  digital: "digital";
786
785
  bundle: "bundle";
787
786
  composite: "composite";
787
+ simple: "simple";
788
788
  }>;
789
789
  name: z.ZodString;
790
790
  description: z.ZodOptional<z.ZodString>;
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
926
926
  item_id: string;
927
927
  quantity: number;
928
928
  line_key: string;
929
- line_type: "simple" | "service" | "digital" | "bundle" | "composite";
929
+ line_type: "service" | "digital" | "bundle" | "composite" | "simple";
930
930
  name: string;
931
931
  is_available: boolean;
932
932
  base_price: string;
@@ -1091,11 +1091,11 @@ declare const CartSchema: z.ZodObject<{
1091
1091
  quantity: z.ZodNumber;
1092
1092
  line_key: z.ZodString;
1093
1093
  line_type: z.ZodEnum<{
1094
- simple: "simple";
1095
1094
  service: "service";
1096
1095
  digital: "digital";
1097
1096
  bundle: "bundle";
1098
1097
  composite: "composite";
1098
+ simple: "simple";
1099
1099
  }>;
1100
1100
  name: z.ZodString;
1101
1101
  description: z.ZodOptional<z.ZodString>;
@@ -1274,7 +1274,7 @@ declare const assertCart: (value: unknown) => asserts value is {
1274
1274
  item_id: string;
1275
1275
  quantity: number;
1276
1276
  line_key: string;
1277
- line_type: "simple" | "service" | "digital" | "bundle" | "composite";
1277
+ line_type: "service" | "digital" | "bundle" | "composite" | "simple";
1278
1278
  name: string;
1279
1279
  is_available: boolean;
1280
1280
  base_price: string;
@@ -1492,52 +1492,103 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
1492
1492
  pay_currency?: string | undefined;
1493
1493
  fx_quote_id?: string | undefined;
1494
1494
  };
1495
- declare const AuthorizationTypeSchema: z.ZodEnum<{
1495
+ declare const AuthorizationTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
1496
1496
  phone: "phone";
1497
1497
  otp: "otp";
1498
1498
  pin: "pin";
1499
1499
  birthday: "birthday";
1500
- address: "address";
1501
- }>;
1500
+ }>, z.ZodObject<{
1501
+ address: z.ZodObject<{
1502
+ address: z.ZodString;
1503
+ city: z.ZodString;
1504
+ state: z.ZodString;
1505
+ zip_code: z.ZodString;
1506
+ }, z.core.$strip>;
1507
+ }, z.core.$strip>]>;
1502
1508
  declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1503
1509
  type: z.ZodLiteral<"none">;
1510
+ }, z.core.$strip>, z.ZodObject<{
1511
+ type: z.ZodLiteral<"card_popup">;
1512
+ provider: z.ZodString;
1513
+ client_secret: z.ZodString;
1514
+ public_key: z.ZodString;
1504
1515
  }, z.core.$strip>, z.ZodObject<{
1505
1516
  type: z.ZodLiteral<"redirect">;
1506
1517
  authorization_url: z.ZodString;
1507
1518
  }, z.core.$strip>, z.ZodObject<{
1508
1519
  type: z.ZodLiteral<"authorization">;
1509
- authorization_type: z.ZodString;
1510
- display_text: z.ZodOptional<z.ZodString>;
1520
+ authorization_type: z.ZodUnion<readonly [z.ZodEnum<{
1521
+ phone: "phone";
1522
+ otp: "otp";
1523
+ pin: "pin";
1524
+ birthday: "birthday";
1525
+ }>, z.ZodObject<{
1526
+ address: z.ZodObject<{
1527
+ address: z.ZodString;
1528
+ city: z.ZodString;
1529
+ state: z.ZodString;
1530
+ zip_code: z.ZodString;
1531
+ }, z.core.$strip>;
1532
+ }, z.core.$strip>]>;
1533
+ display_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1534
+ }, z.core.$strip>, z.ZodObject<{
1535
+ type: z.ZodLiteral<"poll">;
1511
1536
  }, z.core.$strip>], "type">;
1512
1537
  declare const CheckoutResponseSchema: z.ZodObject<{
1513
1538
  order_id: z.ZodString;
1514
1539
  order_number: z.ZodString;
1540
+ payment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1515
1541
  payment_status: z.ZodString;
1516
- payment_reference: z.ZodOptional<z.ZodString>;
1542
+ payment_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1517
1543
  requires_authorization: z.ZodBoolean;
1518
- authorization_type: z.ZodOptional<z.ZodEnum<{
1544
+ authorization_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
1519
1545
  phone: "phone";
1520
1546
  otp: "otp";
1521
1547
  pin: "pin";
1522
1548
  birthday: "birthday";
1523
- address: "address";
1524
- }>>;
1549
+ }>, z.ZodObject<{
1550
+ address: z.ZodObject<{
1551
+ address: z.ZodString;
1552
+ city: z.ZodString;
1553
+ state: z.ZodString;
1554
+ zip_code: z.ZodString;
1555
+ }, z.core.$strip>;
1556
+ }, z.core.$strip>]>>>;
1525
1557
  next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
1526
1558
  type: z.ZodLiteral<"none">;
1559
+ }, z.core.$strip>, z.ZodObject<{
1560
+ type: z.ZodLiteral<"card_popup">;
1561
+ provider: z.ZodString;
1562
+ client_secret: z.ZodString;
1563
+ public_key: z.ZodString;
1527
1564
  }, z.core.$strip>, z.ZodObject<{
1528
1565
  type: z.ZodLiteral<"redirect">;
1529
1566
  authorization_url: z.ZodString;
1530
1567
  }, z.core.$strip>, z.ZodObject<{
1531
1568
  type: z.ZodLiteral<"authorization">;
1532
- authorization_type: z.ZodString;
1533
- display_text: z.ZodOptional<z.ZodString>;
1569
+ authorization_type: z.ZodUnion<readonly [z.ZodEnum<{
1570
+ phone: "phone";
1571
+ otp: "otp";
1572
+ pin: "pin";
1573
+ birthday: "birthday";
1574
+ }>, z.ZodObject<{
1575
+ address: z.ZodObject<{
1576
+ address: z.ZodString;
1577
+ city: z.ZodString;
1578
+ state: z.ZodString;
1579
+ zip_code: z.ZodString;
1580
+ }, z.core.$strip>;
1581
+ }, z.core.$strip>]>;
1582
+ display_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1583
+ }, z.core.$strip>, z.ZodObject<{
1584
+ type: z.ZodLiteral<"poll">;
1534
1585
  }, z.core.$strip>], "type">;
1535
- provider: z.ZodOptional<z.ZodString>;
1536
- authorization_url: z.ZodOptional<z.ZodString>;
1537
- display_text: z.ZodOptional<z.ZodString>;
1538
- bill_token: z.ZodOptional<z.ZodString>;
1539
- client_secret: z.ZodOptional<z.ZodString>;
1540
- public_key: z.ZodOptional<z.ZodString>;
1586
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1587
+ authorization_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1588
+ display_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1589
+ bill_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1590
+ client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1591
+ public_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1541
1592
  }, z.core.$loose>;
1542
1593
  type CheckoutResponse = z.infer<typeof CheckoutResponseSchema>;
1543
1594
  declare const assertCheckoutResponse: (value: unknown) => asserts value is {
@@ -1548,22 +1599,44 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
1548
1599
  requires_authorization: boolean;
1549
1600
  next_action: {
1550
1601
  type: "none";
1602
+ } | {
1603
+ type: "card_popup";
1604
+ provider: string;
1605
+ client_secret: string;
1606
+ public_key: string;
1551
1607
  } | {
1552
1608
  type: "redirect";
1553
1609
  authorization_url: string;
1554
1610
  } | {
1555
1611
  type: "authorization";
1556
- authorization_type: string;
1557
- display_text?: string | undefined;
1612
+ authorization_type: "phone" | "otp" | "pin" | "birthday" | {
1613
+ address: {
1614
+ address: string;
1615
+ city: string;
1616
+ state: string;
1617
+ zip_code: string;
1618
+ };
1619
+ };
1620
+ display_text?: string | null | undefined;
1621
+ } | {
1622
+ type: "poll";
1558
1623
  };
1559
- payment_reference?: string | undefined;
1560
- authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
1561
- provider?: string | undefined;
1562
- authorization_url?: string | undefined;
1563
- display_text?: string | undefined;
1564
- bill_token?: string | undefined;
1565
- client_secret?: string | undefined;
1566
- public_key?: string | undefined;
1624
+ payment_id?: string | null | undefined;
1625
+ payment_reference?: string | null | undefined;
1626
+ authorization_type?: "phone" | "otp" | "pin" | "birthday" | {
1627
+ address: {
1628
+ address: string;
1629
+ city: string;
1630
+ state: string;
1631
+ zip_code: string;
1632
+ };
1633
+ } | null | undefined;
1634
+ provider?: string | null | undefined;
1635
+ authorization_url?: string | null | undefined;
1636
+ display_text?: string | null | undefined;
1637
+ bill_token?: string | null | undefined;
1638
+ client_secret?: string | null | undefined;
1639
+ public_key?: string | null | undefined;
1567
1640
  };
1568
1641
 
1569
1642
  /**
@@ -1756,8 +1829,8 @@ declare const PUBLIC_SCHEMAS: {
1756
1829
  }, z.core.$strip>;
1757
1830
  mock: z.ZodObject<{
1758
1831
  seed: z.ZodEnum<{
1759
- empty: "empty";
1760
1832
  default: "default";
1833
+ empty: "empty";
1761
1834
  "reesa-storefront": "reesa-storefront";
1762
1835
  restaurant: "restaurant";
1763
1836
  retail: "retail";
@@ -1817,11 +1890,11 @@ declare const PUBLIC_SCHEMAS: {
1817
1890
  quantity: z.ZodNumber;
1818
1891
  line_key: z.ZodString;
1819
1892
  line_type: z.ZodEnum<{
1820
- simple: "simple";
1821
1893
  service: "service";
1822
1894
  digital: "digital";
1823
1895
  bundle: "bundle";
1824
1896
  composite: "composite";
1897
+ simple: "simple";
1825
1898
  }>;
1826
1899
  name: z.ZodString;
1827
1900
  description: z.ZodOptional<z.ZodString>;
@@ -1995,11 +2068,11 @@ declare const PUBLIC_SCHEMAS: {
1995
2068
  quantity: z.ZodNumber;
1996
2069
  line_key: z.ZodString;
1997
2070
  line_type: z.ZodEnum<{
1998
- simple: "simple";
1999
2071
  service: "service";
2000
2072
  digital: "digital";
2001
2073
  bundle: "bundle";
2002
2074
  composite: "composite";
2075
+ simple: "simple";
2003
2076
  }>;
2004
2077
  name: z.ZodString;
2005
2078
  description: z.ZodOptional<z.ZodString>;
@@ -2178,32 +2251,58 @@ declare const PUBLIC_SCHEMAS: {
2178
2251
  readonly CheckoutResponse: z.ZodObject<{
2179
2252
  order_id: z.ZodString;
2180
2253
  order_number: z.ZodString;
2254
+ payment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2181
2255
  payment_status: z.ZodString;
2182
- payment_reference: z.ZodOptional<z.ZodString>;
2256
+ payment_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2183
2257
  requires_authorization: z.ZodBoolean;
2184
- authorization_type: z.ZodOptional<z.ZodEnum<{
2258
+ authorization_type: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
2185
2259
  phone: "phone";
2186
2260
  otp: "otp";
2187
2261
  pin: "pin";
2188
2262
  birthday: "birthday";
2189
- address: "address";
2190
- }>>;
2263
+ }>, z.ZodObject<{
2264
+ address: z.ZodObject<{
2265
+ address: z.ZodString;
2266
+ city: z.ZodString;
2267
+ state: z.ZodString;
2268
+ zip_code: z.ZodString;
2269
+ }, z.core.$strip>;
2270
+ }, z.core.$strip>]>>>;
2191
2271
  next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
2192
2272
  type: z.ZodLiteral<"none">;
2273
+ }, z.core.$strip>, z.ZodObject<{
2274
+ type: z.ZodLiteral<"card_popup">;
2275
+ provider: z.ZodString;
2276
+ client_secret: z.ZodString;
2277
+ public_key: z.ZodString;
2193
2278
  }, z.core.$strip>, z.ZodObject<{
2194
2279
  type: z.ZodLiteral<"redirect">;
2195
2280
  authorization_url: z.ZodString;
2196
2281
  }, z.core.$strip>, z.ZodObject<{
2197
2282
  type: z.ZodLiteral<"authorization">;
2198
- authorization_type: z.ZodString;
2199
- display_text: z.ZodOptional<z.ZodString>;
2283
+ authorization_type: z.ZodUnion<readonly [z.ZodEnum<{
2284
+ phone: "phone";
2285
+ otp: "otp";
2286
+ pin: "pin";
2287
+ birthday: "birthday";
2288
+ }>, z.ZodObject<{
2289
+ address: z.ZodObject<{
2290
+ address: z.ZodString;
2291
+ city: z.ZodString;
2292
+ state: z.ZodString;
2293
+ zip_code: z.ZodString;
2294
+ }, z.core.$strip>;
2295
+ }, z.core.$strip>]>;
2296
+ display_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2297
+ }, z.core.$strip>, z.ZodObject<{
2298
+ type: z.ZodLiteral<"poll">;
2200
2299
  }, z.core.$strip>], "type">;
2201
- provider: z.ZodOptional<z.ZodString>;
2202
- authorization_url: z.ZodOptional<z.ZodString>;
2203
- display_text: z.ZodOptional<z.ZodString>;
2204
- bill_token: z.ZodOptional<z.ZodString>;
2205
- client_secret: z.ZodOptional<z.ZodString>;
2206
- public_key: z.ZodOptional<z.ZodString>;
2300
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2301
+ authorization_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2302
+ display_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2303
+ bill_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2304
+ client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2305
+ public_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2207
2306
  }, z.core.$loose>;
2208
2307
  readonly VariantInfo: z.ZodObject<{
2209
2308
  id: z.ZodString;