@polar-sh/sdk 0.35.1 → 0.35.2
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/bin/mcp-server.js +467 -449
- package/bin/mcp-server.js.map +8 -8
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/address.d.ts +670 -670
- package/dist/commonjs/models/components/address.js +222 -222
- package/dist/commonjs/models/components/addressinput.d.ts +653 -653
- package/dist/commonjs/models/components/addressinput.js +217 -217
- package/dist/commonjs/models/components/customerstatesubscription.d.ts +38 -2
- package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstatesubscription.js +30 -3
- package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/address.d.ts +670 -670
- package/dist/esm/models/components/address.js +222 -222
- package/dist/esm/models/components/addressinput.d.ts +653 -653
- package/dist/esm/models/components/addressinput.js +217 -217
- package/dist/esm/models/components/customerstatesubscription.d.ts +38 -2
- package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerstatesubscription.js +29 -2
- package/dist/esm/models/components/customerstatesubscription.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/address.ts +222 -222
- package/src/models/components/addressinput.ts +217 -217
- package/src/models/components/customerstatesubscription.ts +56 -4
|
@@ -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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
28
|
Vc: "VC",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
Us: "US",
|
|
30
|
+
Aq: "AQ",
|
|
31
|
+
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",
|
|
34
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",
|
|
35
53
|
By: "BY",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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",
|
|
48
70
|
Br: "BR",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
As: "AS",
|
|
72
|
+
Es: "ES",
|
|
73
|
+
Pf: "PF",
|
|
74
|
+
Ke: "KE",
|
|
53
75
|
Bb: "BB",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Tn: "TN",
|
|
58
|
-
Zw: "ZW",
|
|
59
|
-
Ca: "CA",
|
|
76
|
+
Re: "RE",
|
|
77
|
+
Tv: "TV",
|
|
78
|
+
Gh: "GH",
|
|
60
79
|
Tz: "TZ",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
Kz: "KZ",
|
|
81
|
+
Sx: "SX",
|
|
82
|
+
Cx: "CX",
|
|
83
|
+
Mm: "MM",
|
|
84
|
+
Pk: "PK",
|
|
85
|
+
Na: "NA",
|
|
86
|
+
Be: "BE",
|
|
87
|
+
Fj: "FJ",
|
|
88
|
+
Lr: "LR",
|
|
89
|
+
Ua: "UA",
|
|
90
|
+
Me: "ME",
|
|
91
|
+
Mw: "MW",
|
|
92
|
+
Vn: "VN",
|
|
64
93
|
Lu: "LU",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Aq: "AQ",
|
|
72
|
-
Bz: "BZ",
|
|
73
|
-
Fr: "FR",
|
|
94
|
+
Mu: "MU",
|
|
95
|
+
Is: "IS",
|
|
96
|
+
Nu: "NU",
|
|
97
|
+
Pm: "PM",
|
|
98
|
+
Bw: "BW",
|
|
99
|
+
Td: "TD",
|
|
74
100
|
Yt: "YT",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Im: "IM",
|
|
89
|
-
Za: "ZA",
|
|
90
|
-
Tf: "TF",
|
|
91
|
-
Bd: "BD",
|
|
92
|
-
Mx: "MX",
|
|
93
|
-
Cy: "CY",
|
|
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",
|
|
94
114
|
Vu: "VU",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Lk: "LK",
|
|
99
|
-
Bo: "BO",
|
|
100
|
-
Sa: "SA",
|
|
101
|
-
Bn: "BN",
|
|
102
|
-
Sl: "SL",
|
|
103
|
-
Lr: "LR",
|
|
104
|
-
Cz: "CZ",
|
|
105
|
-
Et: "ET",
|
|
106
|
-
Re: "RE",
|
|
115
|
+
Ro: "RO",
|
|
116
|
+
Ao: "AO",
|
|
117
|
+
Ar: "AR",
|
|
107
118
|
Tk: "TK",
|
|
108
|
-
|
|
119
|
+
Uy: "UY",
|
|
120
|
+
Kh: "KH",
|
|
121
|
+
Bg: "BG",
|
|
122
|
+
Tj: "TJ",
|
|
123
|
+
Ug: "UG",
|
|
124
|
+
Cc: "CC",
|
|
125
|
+
Cd: "CD",
|
|
126
|
+
Gd: "GD",
|
|
127
|
+
Cl: "CL",
|
|
128
|
+
Gu: "GU",
|
|
129
|
+
Il: "IL",
|
|
130
|
+
Kr: "KR",
|
|
131
|
+
Pe: "PE",
|
|
132
|
+
Sn: "SN",
|
|
109
133
|
Sm: "SM",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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",
|
|
126
|
-
Fj: "FJ",
|
|
127
|
-
Ve: "VE",
|
|
128
|
-
Gw: "GW",
|
|
129
|
-
Ck: "CK",
|
|
134
|
+
Nl: "NL",
|
|
135
|
+
Sk: "SK",
|
|
136
|
+
Hm: "HM",
|
|
137
|
+
Mq: "MQ",
|
|
138
|
+
Mr: "MR",
|
|
139
|
+
It: "IT",
|
|
140
|
+
Cm: "CM",
|
|
130
141
|
Dm: "DM",
|
|
131
|
-
|
|
142
|
+
Sv: "SV",
|
|
132
143
|
Dk: "DK",
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
Zw: "ZW",
|
|
145
|
+
Jo: "JO",
|
|
146
|
+
Om: "OM",
|
|
147
|
+
Sl: "SL",
|
|
148
|
+
So: "SO",
|
|
149
|
+
Tg: "TG",
|
|
150
|
+
Pw: "PW",
|
|
137
151
|
Ye: "YE",
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
152
|
+
Iq: "IQ",
|
|
153
|
+
Ma: "MA",
|
|
154
|
+
Cg: "CG",
|
|
155
|
+
Mf: "MF",
|
|
156
|
+
St: "ST",
|
|
157
|
+
Bi: "BI",
|
|
144
158
|
Eg: "EG",
|
|
145
|
-
Je: "JE",
|
|
146
|
-
Hm: "HM",
|
|
147
|
-
Be: "BE",
|
|
148
159
|
Ax: "AX",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
Fm: "FM",
|
|
163
|
-
Bm: "BM",
|
|
164
|
-
Gb: "GB",
|
|
165
|
-
Rs: "RS",
|
|
166
|
-
Tr: "TR",
|
|
167
|
-
Mc: "MC",
|
|
168
|
-
Ci: "CI",
|
|
169
|
-
Tv: "TV",
|
|
170
|
-
Kh: "KH",
|
|
171
|
-
Vg: "VG",
|
|
172
|
-
Mw: "MW",
|
|
173
|
-
Id: "ID",
|
|
160
|
+
Gm: "GM",
|
|
161
|
+
Gr: "GR",
|
|
162
|
+
Az: "AZ",
|
|
163
|
+
Eh: "EH",
|
|
164
|
+
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",
|
|
174
173
|
Np: "NP",
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
Hu: "HU",
|
|
175
|
+
Io: "IO",
|
|
176
|
+
Mc: "MC",
|
|
177
|
+
Gf: "GF",
|
|
178
|
+
Sj: "SJ",
|
|
179
|
+
Hr: "HR",
|
|
180
|
+
Bj: "BJ",
|
|
181
|
+
Fm: "FM",
|
|
182
|
+
Bl: "BL",
|
|
178
183
|
Ls: "LS",
|
|
184
|
+
Mg: "MG",
|
|
185
|
+
Sc: "SC",
|
|
186
|
+
Vg: "VG",
|
|
187
|
+
Ci: "CI",
|
|
188
|
+
Gg: "GG",
|
|
179
189
|
Ad: "AD",
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Hn: "HN",
|
|
183
|
-
Li: "LI",
|
|
184
|
-
Sv: "SV",
|
|
185
|
-
Bw: "BW",
|
|
186
|
-
Aw: "AW",
|
|
187
|
-
Bq: "BQ",
|
|
188
|
-
Uy: "UY",
|
|
189
|
-
Az: "AZ",
|
|
190
|
-
Ba: "BA",
|
|
191
|
-
Ly: "LY",
|
|
192
|
-
Ml: "ML",
|
|
193
|
-
Nf: "NF",
|
|
194
|
-
Sn: "SN",
|
|
195
|
-
Mh: "MH",
|
|
196
|
-
Us: "US",
|
|
197
|
-
Pe: "PE",
|
|
198
|
-
Uz: "UZ",
|
|
199
|
-
Kw: "KW",
|
|
200
|
-
Td: "TD",
|
|
201
|
-
Kz: "KZ",
|
|
202
|
-
Py: "PY",
|
|
203
|
-
Dz: "DZ",
|
|
204
|
-
Hr: "HR",
|
|
205
|
-
Kr: "KR",
|
|
190
|
+
Cr: "CR",
|
|
191
|
+
Gp: "GP",
|
|
206
192
|
Au: "AU",
|
|
207
|
-
|
|
208
|
-
|
|
193
|
+
Hk: "HK",
|
|
194
|
+
Fr: "FR",
|
|
195
|
+
Gs: "GS",
|
|
196
|
+
Si: "SI",
|
|
197
|
+
Mh: "MH",
|
|
198
|
+
Fi: "FI",
|
|
199
|
+
Do: "DO",
|
|
200
|
+
Tm: "TM",
|
|
201
|
+
Gl: "GL",
|
|
202
|
+
Ca: "CA",
|
|
209
203
|
Mt: "MT",
|
|
210
|
-
|
|
204
|
+
Rs: "RS",
|
|
205
|
+
Km: "KM",
|
|
206
|
+
Sz: "SZ",
|
|
207
|
+
Im: "IM",
|
|
211
208
|
Jp: "JP",
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
Th: "TH",
|
|
210
|
+
Tt: "TT",
|
|
211
|
+
Sb: "SB",
|
|
212
|
+
Ga: "GA",
|
|
213
|
+
Nc: "NC",
|
|
214
|
+
Bv: "BV",
|
|
215
|
+
Fk: "FK",
|
|
216
|
+
Af: "AF",
|
|
217
|
+
Ki: "KI",
|
|
217
218
|
Md: "MD",
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
Tc: "TC",
|
|
220
|
+
Bn: "BN",
|
|
221
|
+
Hn: "HN",
|
|
222
|
+
Vi: "VI",
|
|
223
|
+
Gn: "GN",
|
|
223
224
|
Wf: "WF",
|
|
225
|
+
Se: "SE",
|
|
226
|
+
Ec: "EC",
|
|
227
|
+
Ne: "NE",
|
|
228
|
+
Pl: "PL",
|
|
224
229
|
Gq: "GQ",
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
Bt: "BT",
|
|
231
|
+
Bz: "BZ",
|
|
232
|
+
Uz: "UZ",
|
|
233
|
+
Lt: "LT",
|
|
234
|
+
Cz: "CZ",
|
|
235
|
+
Lb: "LB",
|
|
236
|
+
Gb: "GB",
|
|
237
|
+
Pg: "PG",
|
|
238
|
+
Py: "PY",
|
|
239
|
+
Bq: "BQ",
|
|
232
240
|
Ky: "KY",
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
St: "ST",
|
|
239
|
-
Mo: "MO",
|
|
240
|
-
So: "SO",
|
|
241
|
-
Sz: "SZ",
|
|
242
|
-
Pm: "PM",
|
|
243
|
-
Es: "ES",
|
|
244
|
-
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",
|
|
241
|
+
Pn: "PN",
|
|
242
|
+
Sa: "SA",
|
|
243
|
+
Ch: "CH",
|
|
244
|
+
Va: "VA",
|
|
245
|
+
Bf: "BF",
|
|
256
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",
|
|
257
257
|
} as const;
|
|
258
258
|
export type CountryAlpha2Input = ClosedEnum<typeof CountryAlpha2Input>;
|
|
259
259
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -31,6 +32,14 @@ export type CustomerStateSubscriptionMetadata =
|
|
|
31
32
|
| number
|
|
32
33
|
| boolean;
|
|
33
34
|
|
|
35
|
+
export const CustomerStateSubscriptionStatus = {
|
|
36
|
+
Active: "active",
|
|
37
|
+
Trialing: "trialing",
|
|
38
|
+
} as const;
|
|
39
|
+
export type CustomerStateSubscriptionStatus = ClosedEnum<
|
|
40
|
+
typeof CustomerStateSubscriptionStatus
|
|
41
|
+
>;
|
|
42
|
+
|
|
34
43
|
/**
|
|
35
44
|
* An active customer subscription.
|
|
36
45
|
*/
|
|
@@ -54,7 +63,7 @@ export type CustomerStateSubscription = {
|
|
|
54
63
|
| { [k: string]: string | number | boolean | Date | null }
|
|
55
64
|
| undefined;
|
|
56
65
|
metadata: { [k: string]: string | number | number | boolean };
|
|
57
|
-
status:
|
|
66
|
+
status: CustomerStateSubscriptionStatus;
|
|
58
67
|
/**
|
|
59
68
|
* The amount of the subscription.
|
|
60
69
|
*/
|
|
@@ -72,6 +81,14 @@ export type CustomerStateSubscription = {
|
|
|
72
81
|
* The end timestamp of the current billing period.
|
|
73
82
|
*/
|
|
74
83
|
currentPeriodEnd: Date | null;
|
|
84
|
+
/**
|
|
85
|
+
* The start timestamp of the trial period, if any.
|
|
86
|
+
*/
|
|
87
|
+
trialStart: Date | null;
|
|
88
|
+
/**
|
|
89
|
+
* The end timestamp of the trial period, if any.
|
|
90
|
+
*/
|
|
91
|
+
trialEnd: Date | null;
|
|
75
92
|
/**
|
|
76
93
|
* Whether the subscription will be canceled at the end of the current period.
|
|
77
94
|
*/
|
|
@@ -230,6 +247,27 @@ export function customerStateSubscriptionMetadataFromJSON(
|
|
|
230
247
|
);
|
|
231
248
|
}
|
|
232
249
|
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const CustomerStateSubscriptionStatus$inboundSchema: z.ZodNativeEnum<
|
|
252
|
+
typeof CustomerStateSubscriptionStatus
|
|
253
|
+
> = z.nativeEnum(CustomerStateSubscriptionStatus);
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const CustomerStateSubscriptionStatus$outboundSchema: z.ZodNativeEnum<
|
|
257
|
+
typeof CustomerStateSubscriptionStatus
|
|
258
|
+
> = CustomerStateSubscriptionStatus$inboundSchema;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @internal
|
|
262
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
263
|
+
*/
|
|
264
|
+
export namespace CustomerStateSubscriptionStatus$ {
|
|
265
|
+
/** @deprecated use `CustomerStateSubscriptionStatus$inboundSchema` instead. */
|
|
266
|
+
export const inboundSchema = CustomerStateSubscriptionStatus$inboundSchema;
|
|
267
|
+
/** @deprecated use `CustomerStateSubscriptionStatus$outboundSchema` instead. */
|
|
268
|
+
export const outboundSchema = CustomerStateSubscriptionStatus$outboundSchema;
|
|
269
|
+
}
|
|
270
|
+
|
|
233
271
|
/** @internal */
|
|
234
272
|
export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
235
273
|
CustomerStateSubscription,
|
|
@@ -254,7 +292,7 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
254
292
|
metadata: z.record(
|
|
255
293
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
256
294
|
),
|
|
257
|
-
status:
|
|
295
|
+
status: CustomerStateSubscriptionStatus$inboundSchema,
|
|
258
296
|
amount: z.number().int(),
|
|
259
297
|
currency: z.string(),
|
|
260
298
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
@@ -264,6 +302,12 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
264
302
|
current_period_end: z.nullable(
|
|
265
303
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
266
304
|
),
|
|
305
|
+
trial_start: z.nullable(
|
|
306
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
307
|
+
),
|
|
308
|
+
trial_end: z.nullable(
|
|
309
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
310
|
+
),
|
|
267
311
|
cancel_at_period_end: z.boolean(),
|
|
268
312
|
canceled_at: z.nullable(
|
|
269
313
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -285,6 +329,8 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
285
329
|
"recurring_interval": "recurringInterval",
|
|
286
330
|
"current_period_start": "currentPeriodStart",
|
|
287
331
|
"current_period_end": "currentPeriodEnd",
|
|
332
|
+
"trial_start": "trialStart",
|
|
333
|
+
"trial_end": "trialEnd",
|
|
288
334
|
"cancel_at_period_end": "cancelAtPeriodEnd",
|
|
289
335
|
"canceled_at": "canceledAt",
|
|
290
336
|
"started_at": "startedAt",
|
|
@@ -303,12 +349,14 @@ export type CustomerStateSubscription$Outbound = {
|
|
|
303
349
|
| { [k: string]: string | number | boolean | string | null }
|
|
304
350
|
| undefined;
|
|
305
351
|
metadata: { [k: string]: string | number | number | boolean };
|
|
306
|
-
status:
|
|
352
|
+
status: string;
|
|
307
353
|
amount: number;
|
|
308
354
|
currency: string;
|
|
309
355
|
recurring_interval: string;
|
|
310
356
|
current_period_start: string;
|
|
311
357
|
current_period_end: string | null;
|
|
358
|
+
trial_start: string | null;
|
|
359
|
+
trial_end: string | null;
|
|
312
360
|
cancel_at_period_end: boolean;
|
|
313
361
|
canceled_at: string | null;
|
|
314
362
|
started_at: string | null;
|
|
@@ -340,12 +388,14 @@ export const CustomerStateSubscription$outboundSchema: z.ZodType<
|
|
|
340
388
|
metadata: z.record(
|
|
341
389
|
z.union([z.string(), z.number().int(), z.number(), z.boolean()]),
|
|
342
390
|
),
|
|
343
|
-
status:
|
|
391
|
+
status: CustomerStateSubscriptionStatus$outboundSchema,
|
|
344
392
|
amount: z.number().int(),
|
|
345
393
|
currency: z.string(),
|
|
346
394
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
347
395
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
348
396
|
currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
397
|
+
trialStart: z.nullable(z.date().transform(v => v.toISOString())),
|
|
398
|
+
trialEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
349
399
|
cancelAtPeriodEnd: z.boolean(),
|
|
350
400
|
canceledAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
351
401
|
startedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
@@ -361,6 +411,8 @@ export const CustomerStateSubscription$outboundSchema: z.ZodType<
|
|
|
361
411
|
recurringInterval: "recurring_interval",
|
|
362
412
|
currentPeriodStart: "current_period_start",
|
|
363
413
|
currentPeriodEnd: "current_period_end",
|
|
414
|
+
trialStart: "trial_start",
|
|
415
|
+
trialEnd: "trial_end",
|
|
364
416
|
cancelAtPeriodEnd: "cancel_at_period_end",
|
|
365
417
|
canceledAt: "canceled_at",
|
|
366
418
|
startedAt: "started_at",
|