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