@polar-sh/sdk 0.35.1 → 0.35.3

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 (225) hide show
  1. package/README.md +25 -23
  2. package/bin/mcp-server.js +806 -635
  3. package/bin/mcp-server.js.map +15 -11
  4. package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.d.ts +2 -2
  5. package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.js +2 -2
  7. package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.js.map +1 -1
  8. package/dist/commonjs/funcs/customerPortalCustomersConfirmPaymentMethod.d.ts +23 -0
  9. package/dist/commonjs/funcs/customerPortalCustomersConfirmPaymentMethod.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/customerPortalCustomersConfirmPaymentMethod.js +126 -0
  11. package/dist/commonjs/funcs/customerPortalCustomersConfirmPaymentMethod.js.map +1 -0
  12. package/dist/commonjs/funcs/customersGetBalance.d.ts +22 -0
  13. package/dist/commonjs/funcs/customersGetBalance.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/customersGetBalance.js +127 -0
  15. package/dist/commonjs/funcs/customersGetBalance.js.map +1 -0
  16. package/dist/commonjs/funcs/metersQuantities.js +1 -0
  17. package/dist/commonjs/funcs/metersQuantities.js.map +1 -1
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/lib/config.js.map +1 -1
  21. package/dist/commonjs/lib/url.js +1 -1
  22. package/dist/commonjs/lib/url.js.map +1 -1
  23. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  24. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  25. package/dist/commonjs/mcp-server/server.js +3 -1
  26. package/dist/commonjs/mcp-server/server.js.map +1 -1
  27. package/dist/commonjs/mcp-server/tools/customersGetBalance.d.ts +7 -0
  28. package/dist/commonjs/mcp-server/tools/customersGetBalance.d.ts.map +1 -0
  29. package/dist/commonjs/mcp-server/tools/customersGetBalance.js +34 -0
  30. package/dist/commonjs/mcp-server/tools/customersGetBalance.js.map +1 -0
  31. package/dist/commonjs/models/components/address.d.ts +664 -664
  32. package/dist/commonjs/models/components/address.js +221 -221
  33. package/dist/commonjs/models/components/addressinput.d.ts +650 -650
  34. package/dist/commonjs/models/components/addressinput.js +216 -216
  35. package/dist/commonjs/models/components/aggregationfunction.d.ts +40 -0
  36. package/dist/commonjs/models/components/aggregationfunction.d.ts.map +1 -0
  37. package/dist/commonjs/models/components/aggregationfunction.js +64 -0
  38. package/dist/commonjs/models/components/aggregationfunction.js.map +1 -0
  39. package/dist/commonjs/models/components/customerbalance.d.ts +40 -0
  40. package/dist/commonjs/models/components/customerbalance.d.ts.map +1 -0
  41. package/dist/commonjs/models/components/customerbalance.js +71 -0
  42. package/dist/commonjs/models/components/customerbalance.js.map +1 -0
  43. package/dist/commonjs/models/components/customerorder.d.ts +5 -0
  44. package/dist/commonjs/models/components/customerorder.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/customerorder.js +4 -0
  46. package/dist/commonjs/models/components/customerorder.js.map +1 -1
  47. package/dist/commonjs/models/components/customerpaymentmethodconfirm.d.ts +31 -0
  48. package/dist/commonjs/models/components/customerpaymentmethodconfirm.d.ts.map +1 -0
  49. package/dist/commonjs/models/components/customerpaymentmethodconfirm.js +82 -0
  50. package/dist/commonjs/models/components/customerpaymentmethodconfirm.js.map +1 -0
  51. package/dist/commonjs/models/components/customerpaymentmethodcreaterequiresactionresponse.d.ts +31 -0
  52. package/dist/commonjs/models/components/customerpaymentmethodcreaterequiresactionresponse.d.ts.map +1 -0
  53. package/dist/commonjs/models/components/customerpaymentmethodcreaterequiresactionresponse.js +80 -0
  54. package/dist/commonjs/models/components/customerpaymentmethodcreaterequiresactionresponse.js.map +1 -0
  55. package/dist/commonjs/models/components/customerpaymentmethodcreateresponse.d.ts +35 -0
  56. package/dist/commonjs/models/components/customerpaymentmethodcreateresponse.d.ts.map +1 -0
  57. package/dist/commonjs/models/components/customerpaymentmethodcreateresponse.js +81 -0
  58. package/dist/commonjs/models/components/customerpaymentmethodcreateresponse.js.map +1 -0
  59. package/dist/commonjs/models/components/customerpaymentmethodcreatesucceededresponse.d.ts +32 -0
  60. package/dist/commonjs/models/components/customerpaymentmethodcreatesucceededresponse.d.ts.map +1 -0
  61. package/dist/commonjs/models/components/customerpaymentmethodcreatesucceededresponse.js +81 -0
  62. package/dist/commonjs/models/components/customerpaymentmethodcreatesucceededresponse.js.map +1 -0
  63. package/dist/commonjs/models/components/customerstatesubscription.d.ts +38 -2
  64. package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/customerstatesubscription.js +30 -3
  66. package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -1
  67. package/dist/commonjs/models/components/customersubscription.d.ts +5 -0
  68. package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/customersubscription.js +4 -0
  70. package/dist/commonjs/models/components/customersubscription.js.map +1 -1
  71. package/dist/commonjs/models/components/order.d.ts +5 -0
  72. package/dist/commonjs/models/components/order.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/order.js +4 -0
  74. package/dist/commonjs/models/components/order.js.map +1 -1
  75. package/dist/commonjs/models/errors/customernotready.d.ts +39 -0
  76. package/dist/commonjs/models/errors/customernotready.d.ts.map +1 -0
  77. package/dist/commonjs/models/errors/customernotready.js +88 -0
  78. package/dist/commonjs/models/errors/customernotready.js.map +1 -0
  79. package/dist/commonjs/models/operations/customerportalcustomersconfirmpaymentmethod.d.ts +29 -0
  80. package/dist/commonjs/models/operations/customerportalcustomersconfirmpaymentmethod.d.ts.map +1 -0
  81. package/dist/commonjs/models/operations/customerportalcustomersconfirmpaymentmethod.js +78 -0
  82. package/dist/commonjs/models/operations/customerportalcustomersconfirmpaymentmethod.js.map +1 -0
  83. package/dist/commonjs/models/operations/customersgetbalance.d.ts +32 -0
  84. package/dist/commonjs/models/operations/customersgetbalance.d.ts.map +1 -0
  85. package/dist/commonjs/models/operations/customersgetbalance.js +69 -0
  86. package/dist/commonjs/models/operations/customersgetbalance.js.map +1 -0
  87. package/dist/commonjs/models/operations/metersquantities.d.ts +6 -0
  88. package/dist/commonjs/models/operations/metersquantities.d.ts.map +1 -1
  89. package/dist/commonjs/models/operations/metersquantities.js +7 -0
  90. package/dist/commonjs/models/operations/metersquantities.js.map +1 -1
  91. package/dist/commonjs/sdk/customers.d.ts +11 -0
  92. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  93. package/dist/commonjs/sdk/customers.js +12 -0
  94. package/dist/commonjs/sdk/customers.js.map +1 -1
  95. package/dist/commonjs/sdk/polarcustomers.d.ts +13 -2
  96. package/dist/commonjs/sdk/polarcustomers.d.ts.map +1 -1
  97. package/dist/commonjs/sdk/polarcustomers.js +12 -0
  98. package/dist/commonjs/sdk/polarcustomers.js.map +1 -1
  99. package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.d.ts +2 -2
  100. package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.d.ts.map +1 -1
  101. package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.js +2 -2
  102. package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.js.map +1 -1
  103. package/dist/esm/funcs/customerPortalCustomersConfirmPaymentMethod.d.ts +23 -0
  104. package/dist/esm/funcs/customerPortalCustomersConfirmPaymentMethod.d.ts.map +1 -0
  105. package/dist/esm/funcs/customerPortalCustomersConfirmPaymentMethod.js +90 -0
  106. package/dist/esm/funcs/customerPortalCustomersConfirmPaymentMethod.js.map +1 -0
  107. package/dist/esm/funcs/customersGetBalance.d.ts +22 -0
  108. package/dist/esm/funcs/customersGetBalance.d.ts.map +1 -0
  109. package/dist/esm/funcs/customersGetBalance.js +91 -0
  110. package/dist/esm/funcs/customersGetBalance.js.map +1 -0
  111. package/dist/esm/funcs/metersQuantities.js +1 -0
  112. package/dist/esm/funcs/metersQuantities.js.map +1 -1
  113. package/dist/esm/lib/config.d.ts +3 -3
  114. package/dist/esm/lib/config.js +3 -3
  115. package/dist/esm/lib/config.js.map +1 -1
  116. package/dist/esm/lib/url.js +1 -1
  117. package/dist/esm/lib/url.js.map +1 -1
  118. package/dist/esm/mcp-server/mcp-server.js +1 -1
  119. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  120. package/dist/esm/mcp-server/server.js +3 -1
  121. package/dist/esm/mcp-server/server.js.map +1 -1
  122. package/dist/esm/mcp-server/tools/customersGetBalance.d.ts +7 -0
  123. package/dist/esm/mcp-server/tools/customersGetBalance.d.ts.map +1 -0
  124. package/dist/esm/mcp-server/tools/customersGetBalance.js +31 -0
  125. package/dist/esm/mcp-server/tools/customersGetBalance.js.map +1 -0
  126. package/dist/esm/models/components/address.d.ts +664 -664
  127. package/dist/esm/models/components/address.js +221 -221
  128. package/dist/esm/models/components/addressinput.d.ts +650 -650
  129. package/dist/esm/models/components/addressinput.js +216 -216
  130. package/dist/esm/models/components/aggregationfunction.d.ts +40 -0
  131. package/dist/esm/models/components/aggregationfunction.d.ts.map +1 -0
  132. package/dist/esm/models/components/aggregationfunction.js +28 -0
  133. package/dist/esm/models/components/aggregationfunction.js.map +1 -0
  134. package/dist/esm/models/components/customerbalance.d.ts +40 -0
  135. package/dist/esm/models/components/customerbalance.d.ts.map +1 -0
  136. package/dist/esm/models/components/customerbalance.js +33 -0
  137. package/dist/esm/models/components/customerbalance.js.map +1 -0
  138. package/dist/esm/models/components/customerorder.d.ts +5 -0
  139. package/dist/esm/models/components/customerorder.d.ts.map +1 -1
  140. package/dist/esm/models/components/customerorder.js +4 -0
  141. package/dist/esm/models/components/customerorder.js.map +1 -1
  142. package/dist/esm/models/components/customerpaymentmethodconfirm.d.ts +31 -0
  143. package/dist/esm/models/components/customerpaymentmethodconfirm.d.ts.map +1 -0
  144. package/dist/esm/models/components/customerpaymentmethodconfirm.js +44 -0
  145. package/dist/esm/models/components/customerpaymentmethodconfirm.js.map +1 -0
  146. package/dist/esm/models/components/customerpaymentmethodcreaterequiresactionresponse.d.ts +31 -0
  147. package/dist/esm/models/components/customerpaymentmethodcreaterequiresactionresponse.d.ts.map +1 -0
  148. package/dist/esm/models/components/customerpaymentmethodcreaterequiresactionresponse.js +42 -0
  149. package/dist/esm/models/components/customerpaymentmethodcreaterequiresactionresponse.js.map +1 -0
  150. package/dist/esm/models/components/customerpaymentmethodcreateresponse.d.ts +35 -0
  151. package/dist/esm/models/components/customerpaymentmethodcreateresponse.d.ts.map +1 -0
  152. package/dist/esm/models/components/customerpaymentmethodcreateresponse.js +43 -0
  153. package/dist/esm/models/components/customerpaymentmethodcreateresponse.js.map +1 -0
  154. package/dist/esm/models/components/customerpaymentmethodcreatesucceededresponse.d.ts +32 -0
  155. package/dist/esm/models/components/customerpaymentmethodcreatesucceededresponse.d.ts.map +1 -0
  156. package/dist/esm/models/components/customerpaymentmethodcreatesucceededresponse.js +43 -0
  157. package/dist/esm/models/components/customerpaymentmethodcreatesucceededresponse.js.map +1 -0
  158. package/dist/esm/models/components/customerstatesubscription.d.ts +38 -2
  159. package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
  160. package/dist/esm/models/components/customerstatesubscription.js +29 -2
  161. package/dist/esm/models/components/customerstatesubscription.js.map +1 -1
  162. package/dist/esm/models/components/customersubscription.d.ts +5 -0
  163. package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
  164. package/dist/esm/models/components/customersubscription.js +4 -0
  165. package/dist/esm/models/components/customersubscription.js.map +1 -1
  166. package/dist/esm/models/components/order.d.ts +5 -0
  167. package/dist/esm/models/components/order.d.ts.map +1 -1
  168. package/dist/esm/models/components/order.js +4 -0
  169. package/dist/esm/models/components/order.js.map +1 -1
  170. package/dist/esm/models/errors/customernotready.d.ts +39 -0
  171. package/dist/esm/models/errors/customernotready.d.ts.map +1 -0
  172. package/dist/esm/models/errors/customernotready.js +51 -0
  173. package/dist/esm/models/errors/customernotready.js.map +1 -0
  174. package/dist/esm/models/operations/customerportalcustomersconfirmpaymentmethod.d.ts +29 -0
  175. package/dist/esm/models/operations/customerportalcustomersconfirmpaymentmethod.d.ts.map +1 -0
  176. package/dist/esm/models/operations/customerportalcustomersconfirmpaymentmethod.js +40 -0
  177. package/dist/esm/models/operations/customerportalcustomersconfirmpaymentmethod.js.map +1 -0
  178. package/dist/esm/models/operations/customersgetbalance.d.ts +32 -0
  179. package/dist/esm/models/operations/customersgetbalance.d.ts.map +1 -0
  180. package/dist/esm/models/operations/customersgetbalance.js +31 -0
  181. package/dist/esm/models/operations/customersgetbalance.js.map +1 -0
  182. package/dist/esm/models/operations/metersquantities.d.ts +6 -0
  183. package/dist/esm/models/operations/metersquantities.d.ts.map +1 -1
  184. package/dist/esm/models/operations/metersquantities.js +7 -0
  185. package/dist/esm/models/operations/metersquantities.js.map +1 -1
  186. package/dist/esm/sdk/customers.d.ts +11 -0
  187. package/dist/esm/sdk/customers.d.ts.map +1 -1
  188. package/dist/esm/sdk/customers.js +12 -0
  189. package/dist/esm/sdk/customers.js.map +1 -1
  190. package/dist/esm/sdk/polarcustomers.d.ts +13 -2
  191. package/dist/esm/sdk/polarcustomers.d.ts.map +1 -1
  192. package/dist/esm/sdk/polarcustomers.js +12 -0
  193. package/dist/esm/sdk/polarcustomers.js.map +1 -1
  194. package/docs/sdks/customers/README.md +78 -0
  195. package/docs/sdks/polarcustomers/README.md +82 -1
  196. package/examples/package-lock.json +1 -1
  197. package/jsr.json +1 -1
  198. package/package.json +1 -1
  199. package/src/funcs/customerPortalCustomersAddPaymentMethod.ts +8 -8
  200. package/src/funcs/customerPortalCustomersConfirmPaymentMethod.ts +201 -0
  201. package/src/funcs/customersGetBalance.ts +195 -0
  202. package/src/funcs/metersQuantities.ts +1 -0
  203. package/src/lib/config.ts +3 -3
  204. package/src/lib/url.ts +1 -1
  205. package/src/mcp-server/mcp-server.ts +1 -1
  206. package/src/mcp-server/server.ts +3 -1
  207. package/src/mcp-server/tools/customersGetBalance.ts +40 -0
  208. package/src/models/components/address.ts +221 -221
  209. package/src/models/components/addressinput.ts +216 -216
  210. package/src/models/components/aggregationfunction.ts +37 -0
  211. package/src/models/components/customerbalance.ts +77 -0
  212. package/src/models/components/customerorder.ts +9 -0
  213. package/src/models/components/customerpaymentmethodconfirm.ts +83 -0
  214. package/src/models/components/customerpaymentmethodcreaterequiresactionresponse.ts +93 -0
  215. package/src/models/components/customerpaymentmethodcreateresponse.ts +107 -0
  216. package/src/models/components/customerpaymentmethodcreatesucceededresponse.ts +98 -0
  217. package/src/models/components/customerstatesubscription.ts +56 -4
  218. package/src/models/components/customersubscription.ts +9 -0
  219. package/src/models/components/order.ts +9 -0
  220. package/src/models/errors/customernotready.ts +85 -0
  221. package/src/models/operations/customerportalcustomersconfirmpaymentmethod.ts +89 -0
  222. package/src/models/operations/customersgetbalance.ts +69 -0
  223. package/src/models/operations/metersquantities.ts +16 -0
  224. package/src/sdk/customers.ts +22 -0
  225. package/src/sdk/polarcustomers.ts +26 -2
@@ -10,250 +10,250 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export const CountryAlpha2Input = {
13
- Am: "AM",
14
- Na: "NA",
15
- Sx: "SX",
16
- Gp: "GP",
17
- Mq: "MQ",
18
- Pk: "PK",
19
- Ne: "NE",
20
- Tj: "TJ",
21
- Ws: "WS",
13
+ Ad: "AD",
14
+ Ae: "AE",
15
+ Af: "AF",
16
+ Ag: "AG",
17
+ Ai: "AI",
22
18
  Al: "AL",
23
- Gs: "GS",
24
- Sr: "SR",
25
- Hu: "HU",
26
- Bv: "BV",
27
- Il: "IL",
28
- Vc: "VC",
29
- La: "LA",
30
- Cl: "CL",
31
- Ee: "EE",
32
- Fi: "FI",
33
- Pt: "PT",
34
- Lc: "LC",
35
- By: "BY",
36
- Co: "CO",
37
- Tt: "TT",
38
- Mf: "MF",
39
- De: "DE",
40
- Iq: "IQ",
19
+ Am: "AM",
20
+ Ao: "AO",
21
+ Aq: "AQ",
22
+ Ar: "AR",
23
+ As: "AS",
41
24
  At: "AT",
42
- Km: "KM",
43
- Ni: "NI",
44
- Sc: "SC",
45
- Sd: "SD",
46
- Cn: "CN",
47
- Ng: "NG",
48
- Br: "BR",
49
- Ph: "PH",
50
- Tm: "TM",
51
- Va: "VA",
52
- Ga: "GA",
25
+ Au: "AU",
26
+ Aw: "AW",
27
+ Ax: "AX",
28
+ Az: "AZ",
29
+ Ba: "BA",
53
30
  Bb: "BB",
54
- Gt: "GT",
55
- Ps: "PS",
56
- Gd: "GD",
57
- Tn: "TN",
58
- Zw: "ZW",
59
- Ca: "CA",
60
- Tz: "TZ",
61
- Eh: "EH",
62
- Pn: "PN",
63
- Cw: "CW",
64
- Lu: "LU",
65
- Ug: "UG",
66
- In: "IN",
67
- Pa: "PA",
68
- Hk: "HK",
69
- Pr: "PR",
70
- Ki: "KI",
71
- Aq: "AQ",
31
+ Bd: "BD",
32
+ Be: "BE",
33
+ Bf: "BF",
34
+ Bg: "BG",
35
+ Bh: "BH",
36
+ Bi: "BI",
37
+ Bj: "BJ",
38
+ Bl: "BL",
39
+ Bm: "BM",
40
+ Bn: "BN",
41
+ Bo: "BO",
42
+ Bq: "BQ",
43
+ Br: "BR",
44
+ Bs: "BS",
45
+ Bt: "BT",
46
+ Bv: "BV",
47
+ Bw: "BW",
48
+ By: "BY",
72
49
  Bz: "BZ",
73
- Fr: "FR",
74
- Yt: "YT",
75
- Ie: "IE",
76
- Um: "UM",
77
- Gu: "GU",
78
- Jo: "JO",
50
+ Ca: "CA",
79
51
  Cc: "CC",
80
- Vi: "VI",
81
- Nc: "NC",
82
- Do: "DO",
52
+ Cd: "CD",
53
+ Cf: "CF",
54
+ Cg: "CG",
55
+ Ch: "CH",
56
+ Ci: "CI",
57
+ Ck: "CK",
58
+ Cl: "CL",
59
+ Cm: "CM",
60
+ Cn: "CN",
61
+ Co: "CO",
83
62
  Cr: "CR",
84
- Ar: "AR",
85
- Ai: "AI",
86
- Bf: "BF",
87
- Ec: "EC",
88
- Im: "IM",
89
- Za: "ZA",
90
- Tf: "TF",
91
- Bd: "BD",
92
- Mx: "MX",
63
+ Cv: "CV",
64
+ Cw: "CW",
65
+ Cx: "CX",
93
66
  Cy: "CY",
94
- Vu: "VU",
95
- Mp: "MP",
96
- Mz: "MZ",
97
- Mu: "MU",
98
- Lk: "LK",
99
- Bo: "BO",
100
- Sa: "SA",
101
- Bn: "BN",
102
- Sl: "SL",
103
- Lr: "LR",
104
67
  Cz: "CZ",
68
+ De: "DE",
69
+ Dj: "DJ",
70
+ Dk: "DK",
71
+ Dm: "DM",
72
+ Do: "DO",
73
+ Dz: "DZ",
74
+ Ec: "EC",
75
+ Ee: "EE",
76
+ Eg: "EG",
77
+ Eh: "EH",
78
+ Er: "ER",
79
+ Es: "ES",
105
80
  Et: "ET",
106
- Re: "RE",
107
- Tk: "TK",
108
- Io: "IO",
109
- Sm: "SM",
110
- Pw: "PW",
111
- Kn: "KN",
112
- Cv: "CV",
113
- To: "TO",
114
- Tw: "TW",
115
- Nr: "NR",
116
- Ma: "MA",
117
- Gr: "GR",
118
- Bh: "BH",
119
- Th: "TH",
120
- Jm: "JM",
121
- Vn: "VN",
122
- Ch: "CH",
123
- Pl: "PL",
124
- Me: "ME",
125
- Fo: "FO",
81
+ Fi: "FI",
126
82
  Fj: "FJ",
127
- Ve: "VE",
128
- Gw: "GW",
129
- Ck: "CK",
130
- Dm: "DM",
131
- Gy: "GY",
132
- Dk: "DK",
133
- Pf: "PF",
134
- Sk: "SK",
135
- Rw: "RW",
136
- Bt: "BT",
137
- Ye: "YE",
138
- Ss: "SS",
139
- Lb: "LB",
140
83
  Fk: "FK",
84
+ Fm: "FM",
85
+ Fo: "FO",
86
+ Fr: "FR",
87
+ Ga: "GA",
88
+ Gb: "GB",
89
+ Gd: "GD",
90
+ Ge: "GE",
91
+ Gf: "GF",
92
+ Gg: "GG",
93
+ Gh: "GH",
94
+ Gi: "GI",
95
+ Gl: "GL",
96
+ Gm: "GM",
141
97
  Gn: "GN",
142
- Zm: "ZM",
143
- Mm: "MM",
144
- Eg: "EG",
145
- Je: "JE",
98
+ Gp: "GP",
99
+ Gq: "GQ",
100
+ Gr: "GR",
101
+ Gs: "GS",
102
+ Gt: "GT",
103
+ Gu: "GU",
104
+ Gw: "GW",
105
+ Gy: "GY",
106
+ Hk: "HK",
146
107
  Hm: "HM",
147
- Be: "BE",
148
- Ax: "AX",
149
- Sh: "SH",
150
- Tg: "TG",
151
- Mn: "MN",
152
- Bg: "BG",
108
+ Hn: "HN",
109
+ Hr: "HR",
110
+ Ht: "HT",
111
+ Hu: "HU",
112
+ Id: "ID",
113
+ Ie: "IE",
114
+ Il: "IL",
115
+ Im: "IM",
116
+ In: "IN",
117
+ Io: "IO",
118
+ Iq: "IQ",
119
+ Is: "IS",
153
120
  It: "IT",
154
- Gh: "GH",
155
- Gl: "GL",
156
- Nu: "NU",
157
- Om: "OM",
158
- Ua: "UA",
159
- Gi: "GI",
121
+ Je: "JE",
122
+ Jm: "JM",
123
+ Jo: "JO",
124
+ Jp: "JP",
160
125
  Ke: "KE",
161
- Nl: "NL",
162
- Fm: "FM",
163
- Bm: "BM",
164
- Gb: "GB",
165
- Rs: "RS",
166
- Tr: "TR",
167
- Mc: "MC",
168
- Ci: "CI",
169
- Tv: "TV",
126
+ Kg: "KG",
170
127
  Kh: "KH",
171
- Vg: "VG",
172
- Mw: "MW",
173
- Id: "ID",
174
- Np: "NP",
175
- Lv: "LV",
176
- Si: "SI",
177
- Cx: "CX",
178
- Ls: "LS",
179
- Ad: "AD",
180
- Ms: "MS",
181
- Bs: "BS",
182
- Hn: "HN",
128
+ Ki: "KI",
129
+ Km: "KM",
130
+ Kn: "KN",
131
+ Kr: "KR",
132
+ Kw: "KW",
133
+ Ky: "KY",
134
+ Kz: "KZ",
135
+ La: "LA",
136
+ Lb: "LB",
137
+ Lc: "LC",
183
138
  Li: "LI",
184
- Sv: "SV",
185
- Bw: "BW",
186
- Aw: "AW",
187
- Bq: "BQ",
188
- Uy: "UY",
189
- Az: "AZ",
190
- Ba: "BA",
139
+ Lk: "LK",
140
+ Lr: "LR",
141
+ Ls: "LS",
142
+ Lt: "LT",
143
+ Lu: "LU",
144
+ Lv: "LV",
191
145
  Ly: "LY",
146
+ Ma: "MA",
147
+ Mc: "MC",
148
+ Md: "MD",
149
+ Me: "ME",
150
+ Mf: "MF",
151
+ Mg: "MG",
152
+ Mh: "MH",
153
+ Mk: "MK",
192
154
  Ml: "ML",
155
+ Mm: "MM",
156
+ Mn: "MN",
157
+ Mo: "MO",
158
+ Mp: "MP",
159
+ Mq: "MQ",
160
+ Mr: "MR",
161
+ Ms: "MS",
162
+ Mt: "MT",
163
+ Mu: "MU",
164
+ Mv: "MV",
165
+ Mw: "MW",
166
+ Mx: "MX",
167
+ My: "MY",
168
+ Mz: "MZ",
169
+ Na: "NA",
170
+ Nc: "NC",
171
+ Ne: "NE",
193
172
  Nf: "NF",
194
- Sn: "SN",
195
- Mh: "MH",
196
- Us: "US",
173
+ Ng: "NG",
174
+ Ni: "NI",
175
+ Nl: "NL",
176
+ No: "NO",
177
+ Np: "NP",
178
+ Nr: "NR",
179
+ Nu: "NU",
180
+ Nz: "NZ",
181
+ Om: "OM",
182
+ Pa: "PA",
197
183
  Pe: "PE",
198
- Uz: "UZ",
199
- Kw: "KW",
200
- Td: "TD",
201
- Kz: "KZ",
184
+ Pf: "PF",
185
+ Pg: "PG",
186
+ Ph: "PH",
187
+ Pk: "PK",
188
+ Pl: "PL",
189
+ Pm: "PM",
190
+ Pn: "PN",
191
+ Pr: "PR",
192
+ Ps: "PS",
193
+ Pt: "PT",
194
+ Pw: "PW",
202
195
  Py: "PY",
203
- Dz: "DZ",
204
- Hr: "HR",
205
- Kr: "KR",
206
- Au: "AU",
207
- Tc: "TC",
208
- Mv: "MV",
209
- Mt: "MT",
210
- Nz: "NZ",
211
- Jp: "JP",
212
- Lt: "LT",
213
- Cm: "CM",
214
- Ag: "AG",
196
+ Qa: "QA",
197
+ Re: "RE",
215
198
  Ro: "RO",
216
- As: "AS",
217
- Md: "MD",
218
- Mg: "MG",
199
+ Rs: "RS",
200
+ Rw: "RW",
201
+ Sa: "SA",
202
+ Sb: "SB",
203
+ Sc: "SC",
204
+ Sd: "SD",
219
205
  Se: "SE",
220
- Cg: "CG",
221
- Cd: "CD",
222
- Pg: "PG",
223
- Wf: "WF",
224
- Gq: "GQ",
225
- Bj: "BJ",
226
- Gg: "GG",
227
- Mr: "MR",
228
- Is: "IS",
229
- Bi: "BI",
230
- Gm: "GM",
231
- Er: "ER",
232
- Ky: "KY",
233
- Gf: "GF",
234
- Ge: "GE",
206
+ Sg: "SG",
207
+ Sh: "SH",
208
+ Si: "SI",
235
209
  Sj: "SJ",
236
- Ao: "AO",
237
- Mk: "MK",
238
- St: "ST",
239
- Mo: "MO",
210
+ Sk: "SK",
211
+ Sl: "SL",
212
+ Sm: "SM",
213
+ Sn: "SN",
240
214
  So: "SO",
215
+ Sr: "SR",
216
+ Ss: "SS",
217
+ St: "ST",
218
+ Sv: "SV",
219
+ Sx: "SX",
241
220
  Sz: "SZ",
242
- Pm: "PM",
243
- Es: "ES",
221
+ Tc: "TC",
222
+ Td: "TD",
223
+ Tf: "TF",
224
+ Tg: "TG",
225
+ Th: "TH",
226
+ Tj: "TJ",
227
+ Tk: "TK",
244
228
  Tl: "TL",
245
- Bl: "BL",
246
- Ae: "AE",
247
- Cf: "CF",
248
- Dj: "DJ",
249
- Kg: "KG",
250
- Qa: "QA",
251
- Ht: "HT",
252
- No: "NO",
253
- Sg: "SG",
254
- Sb: "SB",
255
- Af: "AF",
256
- My: "MY",
229
+ Tm: "TM",
230
+ Tn: "TN",
231
+ To: "TO",
232
+ Tr: "TR",
233
+ Tt: "TT",
234
+ Tv: "TV",
235
+ Tw: "TW",
236
+ Tz: "TZ",
237
+ Ua: "UA",
238
+ Ug: "UG",
239
+ Um: "UM",
240
+ Us: "US",
241
+ Uy: "UY",
242
+ Uz: "UZ",
243
+ Va: "VA",
244
+ Vc: "VC",
245
+ Ve: "VE",
246
+ Vg: "VG",
247
+ Vi: "VI",
248
+ Vn: "VN",
249
+ Vu: "VU",
250
+ Wf: "WF",
251
+ Ws: "WS",
252
+ Ye: "YE",
253
+ Yt: "YT",
254
+ Za: "ZA",
255
+ Zm: "ZM",
256
+ Zw: "ZW",
257
257
  } as const;
258
258
  export type CountryAlpha2Input = ClosedEnum<typeof CountryAlpha2Input>;
259
259
 
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const AggregationFunction = {
9
+ Count: "count",
10
+ Sum: "sum",
11
+ Max: "max",
12
+ Min: "min",
13
+ Avg: "avg",
14
+ Unique: "unique",
15
+ } as const;
16
+ export type AggregationFunction = ClosedEnum<typeof AggregationFunction>;
17
+
18
+ /** @internal */
19
+ export const AggregationFunction$inboundSchema: z.ZodNativeEnum<
20
+ typeof AggregationFunction
21
+ > = z.nativeEnum(AggregationFunction);
22
+
23
+ /** @internal */
24
+ export const AggregationFunction$outboundSchema: z.ZodNativeEnum<
25
+ typeof AggregationFunction
26
+ > = AggregationFunction$inboundSchema;
27
+
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export namespace AggregationFunction$ {
33
+ /** @deprecated use `AggregationFunction$inboundSchema` instead. */
34
+ export const inboundSchema = AggregationFunction$inboundSchema;
35
+ /** @deprecated use `AggregationFunction$outboundSchema` instead. */
36
+ export const outboundSchema = AggregationFunction$outboundSchema;
37
+ }
@@ -0,0 +1,77 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * Customer balance information.
12
+ */
13
+ export type CustomerBalance = {
14
+ /**
15
+ * Customer balance in cents. Positive values represent credit (customer is owed money), negative values represent debit (customer owes money).
16
+ */
17
+ balance: number;
18
+ /**
19
+ * The currency code (ISO 4217) for the balance amount.
20
+ */
21
+ currency: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const CustomerBalance$inboundSchema: z.ZodType<
26
+ CustomerBalance,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ balance: z.number().int(),
31
+ currency: z.string(),
32
+ });
33
+
34
+ /** @internal */
35
+ export type CustomerBalance$Outbound = {
36
+ balance: number;
37
+ currency: string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const CustomerBalance$outboundSchema: z.ZodType<
42
+ CustomerBalance$Outbound,
43
+ z.ZodTypeDef,
44
+ CustomerBalance
45
+ > = z.object({
46
+ balance: z.number().int(),
47
+ currency: z.string(),
48
+ });
49
+
50
+ /**
51
+ * @internal
52
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
+ */
54
+ export namespace CustomerBalance$ {
55
+ /** @deprecated use `CustomerBalance$inboundSchema` instead. */
56
+ export const inboundSchema = CustomerBalance$inboundSchema;
57
+ /** @deprecated use `CustomerBalance$outboundSchema` instead. */
58
+ export const outboundSchema = CustomerBalance$outboundSchema;
59
+ /** @deprecated use `CustomerBalance$Outbound` instead. */
60
+ export type Outbound = CustomerBalance$Outbound;
61
+ }
62
+
63
+ export function customerBalanceToJSON(
64
+ customerBalance: CustomerBalance,
65
+ ): string {
66
+ return JSON.stringify(CustomerBalance$outboundSchema.parse(customerBalance));
67
+ }
68
+
69
+ export function customerBalanceFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<CustomerBalance, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => CustomerBalance$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'CustomerBalance' from JSON`,
76
+ );
77
+ }
@@ -99,6 +99,10 @@ export type CustomerOrder = {
99
99
  */
100
100
  billingName: string | null;
101
101
  billingAddress: Address | null;
102
+ /**
103
+ * The invoice number associated with this order.
104
+ */
105
+ invoiceNumber: string;
102
106
  /**
103
107
  * Whether an invoice has been generated for this order.
104
108
  */
@@ -149,6 +153,7 @@ export const CustomerOrder$inboundSchema: z.ZodType<
149
153
  billing_reason: OrderBillingReason$inboundSchema,
150
154
  billing_name: z.nullable(z.string()),
151
155
  billing_address: z.nullable(Address$inboundSchema),
156
+ invoice_number: z.string(),
152
157
  is_invoice_generated: z.boolean(),
153
158
  customer_id: z.string(),
154
159
  product_id: z.string(),
@@ -177,6 +182,7 @@ export const CustomerOrder$inboundSchema: z.ZodType<
177
182
  "billing_reason": "billingReason",
178
183
  "billing_name": "billingName",
179
184
  "billing_address": "billingAddress",
185
+ "invoice_number": "invoiceNumber",
180
186
  "is_invoice_generated": "isInvoiceGenerated",
181
187
  "customer_id": "customerId",
182
188
  "product_id": "productId",
@@ -207,6 +213,7 @@ export type CustomerOrder$Outbound = {
207
213
  billing_reason: string;
208
214
  billing_name: string | null;
209
215
  billing_address: Address$Outbound | null;
216
+ invoice_number: string;
210
217
  is_invoice_generated: boolean;
211
218
  customer_id: string;
212
219
  product_id: string;
@@ -243,6 +250,7 @@ export const CustomerOrder$outboundSchema: z.ZodType<
243
250
  billingReason: OrderBillingReason$outboundSchema,
244
251
  billingName: z.nullable(z.string()),
245
252
  billingAddress: z.nullable(Address$outboundSchema),
253
+ invoiceNumber: z.string(),
246
254
  isInvoiceGenerated: z.boolean(),
247
255
  customerId: z.string(),
248
256
  productId: z.string(),
@@ -270,6 +278,7 @@ export const CustomerOrder$outboundSchema: z.ZodType<
270
278
  billingReason: "billing_reason",
271
279
  billingName: "billing_name",
272
280
  billingAddress: "billing_address",
281
+ invoiceNumber: "invoice_number",
273
282
  isInvoiceGenerated: "is_invoice_generated",
274
283
  customerId: "customer_id",
275
284
  productId: "product_id",