@usehercules/sdk 1.7.0 → 1.8.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 (201) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +17 -16
  3. package/package.json +1 -1
  4. package/resources/beta/beta.d.mts +4 -4
  5. package/resources/beta/beta.d.mts.map +1 -1
  6. package/resources/beta/beta.d.ts +4 -4
  7. package/resources/beta/beta.d.ts.map +1 -1
  8. package/resources/beta/beta.js +4 -4
  9. package/resources/beta/beta.js.map +1 -1
  10. package/resources/beta/beta.mjs +4 -4
  11. package/resources/beta/beta.mjs.map +1 -1
  12. package/resources/beta/commerce/commerce.d.mts +201 -0
  13. package/resources/beta/commerce/commerce.d.mts.map +1 -0
  14. package/resources/beta/commerce/commerce.d.ts +201 -0
  15. package/resources/beta/commerce/commerce.d.ts.map +1 -0
  16. package/resources/beta/{pay/pay.js → commerce/commerce.js} +10 -14
  17. package/resources/beta/commerce/commerce.js.map +1 -0
  18. package/resources/beta/{pay/pay.mjs → commerce/commerce.mjs} +8 -12
  19. package/resources/beta/commerce/commerce.mjs.map +1 -0
  20. package/resources/beta/commerce/coupons.d.mts +333 -0
  21. package/resources/beta/commerce/coupons.d.mts.map +1 -0
  22. package/resources/beta/commerce/coupons.d.ts +333 -0
  23. package/resources/beta/commerce/coupons.d.ts.map +1 -0
  24. package/resources/beta/{pay → commerce}/coupons.js +8 -5
  25. package/resources/beta/commerce/coupons.js.map +1 -0
  26. package/resources/beta/{pay → commerce}/coupons.mjs +8 -5
  27. package/resources/beta/commerce/coupons.mjs.map +1 -0
  28. package/resources/beta/commerce/customers.d.mts +407 -0
  29. package/resources/beta/commerce/customers.d.mts.map +1 -0
  30. package/resources/beta/commerce/customers.d.ts +407 -0
  31. package/resources/beta/commerce/customers.d.ts.map +1 -0
  32. package/resources/beta/{pay → commerce}/customers.js +9 -6
  33. package/resources/beta/commerce/customers.js.map +1 -0
  34. package/resources/beta/{pay → commerce}/customers.mjs +9 -6
  35. package/resources/beta/commerce/customers.mjs.map +1 -0
  36. package/resources/beta/commerce/index.d.mts +5 -0
  37. package/resources/beta/commerce/index.d.mts.map +1 -0
  38. package/resources/beta/commerce/index.d.ts +5 -0
  39. package/resources/beta/commerce/index.d.ts.map +1 -0
  40. package/resources/beta/{pay → commerce}/index.js +3 -5
  41. package/resources/beta/commerce/index.js.map +1 -0
  42. package/resources/beta/{pay → commerce}/index.mjs +1 -2
  43. package/resources/beta/commerce/index.mjs.map +1 -0
  44. package/resources/beta/commerce/products/index.d.mts +4 -0
  45. package/resources/beta/commerce/products/index.d.mts.map +1 -0
  46. package/resources/beta/commerce/products/index.d.ts +4 -0
  47. package/resources/beta/commerce/products/index.d.ts.map +1 -0
  48. package/resources/beta/{pay → commerce}/products/index.js +3 -3
  49. package/resources/beta/commerce/products/index.js.map +1 -0
  50. package/resources/beta/{pay → commerce}/products/index.mjs +1 -1
  51. package/resources/beta/commerce/products/index.mjs.map +1 -0
  52. package/resources/beta/commerce/products/products.d.mts +967 -0
  53. package/resources/beta/commerce/products/products.d.mts.map +1 -0
  54. package/resources/beta/commerce/products/products.d.ts +967 -0
  55. package/resources/beta/commerce/products/products.d.ts.map +1 -0
  56. package/resources/beta/{pay → commerce}/products/products.js +16 -12
  57. package/resources/beta/commerce/products/products.js.map +1 -0
  58. package/resources/beta/{pay → commerce}/products/products.mjs +16 -12
  59. package/resources/beta/commerce/products/products.mjs.map +1 -0
  60. package/resources/beta/commerce/products/resources.d.mts +160 -0
  61. package/resources/beta/commerce/products/resources.d.mts.map +1 -0
  62. package/resources/beta/commerce/products/resources.d.ts +160 -0
  63. package/resources/beta/commerce/products/resources.d.ts.map +1 -0
  64. package/resources/beta/commerce/products/resources.js +41 -0
  65. package/resources/beta/commerce/products/resources.js.map +1 -0
  66. package/resources/beta/commerce/products/resources.mjs +37 -0
  67. package/resources/beta/commerce/products/resources.mjs.map +1 -0
  68. package/resources/beta/commerce/products/variants.d.mts +798 -0
  69. package/resources/beta/commerce/products/variants.d.mts.map +1 -0
  70. package/resources/beta/commerce/products/variants.d.ts +798 -0
  71. package/resources/beta/commerce/products/variants.d.ts.map +1 -0
  72. package/resources/beta/{pay → commerce}/products/variants.js +5 -8
  73. package/resources/beta/commerce/products/variants.js.map +1 -0
  74. package/resources/beta/{pay → commerce}/products/variants.mjs +5 -8
  75. package/resources/beta/commerce/products/variants.mjs.map +1 -0
  76. package/resources/beta/commerce/products.d.mts.map +1 -0
  77. package/resources/beta/commerce/products.d.ts.map +1 -0
  78. package/resources/beta/commerce/products.js.map +1 -0
  79. package/resources/beta/commerce/products.mjs.map +1 -0
  80. package/resources/beta/commerce.d.mts +2 -0
  81. package/resources/beta/commerce.d.mts.map +1 -0
  82. package/resources/beta/commerce.d.ts +2 -0
  83. package/resources/beta/commerce.d.ts.map +1 -0
  84. package/resources/beta/{pay.js → commerce.js} +2 -2
  85. package/resources/beta/commerce.js.map +1 -0
  86. package/resources/beta/{pay.mjs → commerce.mjs} +2 -2
  87. package/resources/beta/commerce.mjs.map +1 -0
  88. package/resources/beta/index.d.mts +1 -1
  89. package/resources/beta/index.d.mts.map +1 -1
  90. package/resources/beta/index.d.ts +1 -1
  91. package/resources/beta/index.d.ts.map +1 -1
  92. package/resources/beta/index.js +3 -3
  93. package/resources/beta/index.js.map +1 -1
  94. package/resources/beta/index.mjs +1 -1
  95. package/resources/beta/index.mjs.map +1 -1
  96. package/resources/push-notifications/push-notifications.d.mts +8 -9
  97. package/resources/push-notifications/push-notifications.d.mts.map +1 -1
  98. package/resources/push-notifications/push-notifications.d.ts +8 -9
  99. package/resources/push-notifications/push-notifications.d.ts.map +1 -1
  100. package/resources/push-notifications/push-notifications.js +5 -6
  101. package/resources/push-notifications/push-notifications.js.map +1 -1
  102. package/resources/push-notifications/push-notifications.mjs +5 -6
  103. package/resources/push-notifications/push-notifications.mjs.map +1 -1
  104. package/src/resources/beta/beta.ts +18 -18
  105. package/src/resources/beta/{pay/pay.ts → commerce/commerce.ts} +82 -85
  106. package/src/resources/beta/commerce/coupons.ts +440 -0
  107. package/src/resources/beta/commerce/customers.ts +532 -0
  108. package/src/resources/beta/commerce/index.ts +47 -0
  109. package/src/resources/beta/commerce/products/index.ts +37 -0
  110. package/src/resources/beta/commerce/products/products.ts +1199 -0
  111. package/src/resources/beta/commerce/products/resources.ts +213 -0
  112. package/src/resources/beta/commerce/products/variants.ts +984 -0
  113. package/src/resources/beta/{pay.ts → commerce.ts} +1 -1
  114. package/src/resources/beta/index.ts +8 -8
  115. package/src/resources/push-notifications/push-notifications.ts +8 -9
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
  121. package/resources/beta/pay/coupons.d.mts +0 -156
  122. package/resources/beta/pay/coupons.d.mts.map +0 -1
  123. package/resources/beta/pay/coupons.d.ts +0 -156
  124. package/resources/beta/pay/coupons.d.ts.map +0 -1
  125. package/resources/beta/pay/coupons.js.map +0 -1
  126. package/resources/beta/pay/coupons.mjs.map +0 -1
  127. package/resources/beta/pay/customers.d.mts +0 -160
  128. package/resources/beta/pay/customers.d.mts.map +0 -1
  129. package/resources/beta/pay/customers.d.ts +0 -160
  130. package/resources/beta/pay/customers.d.ts.map +0 -1
  131. package/resources/beta/pay/customers.js.map +0 -1
  132. package/resources/beta/pay/customers.mjs.map +0 -1
  133. package/resources/beta/pay/entitlements.d.mts +0 -76
  134. package/resources/beta/pay/entitlements.d.mts.map +0 -1
  135. package/resources/beta/pay/entitlements.d.ts +0 -76
  136. package/resources/beta/pay/entitlements.d.ts.map +0 -1
  137. package/resources/beta/pay/entitlements.js +0 -41
  138. package/resources/beta/pay/entitlements.js.map +0 -1
  139. package/resources/beta/pay/entitlements.mjs +0 -37
  140. package/resources/beta/pay/entitlements.mjs.map +0 -1
  141. package/resources/beta/pay/index.d.mts +0 -6
  142. package/resources/beta/pay/index.d.mts.map +0 -1
  143. package/resources/beta/pay/index.d.ts +0 -6
  144. package/resources/beta/pay/index.d.ts.map +0 -1
  145. package/resources/beta/pay/index.js.map +0 -1
  146. package/resources/beta/pay/index.mjs.map +0 -1
  147. package/resources/beta/pay/pay.d.mts +0 -206
  148. package/resources/beta/pay/pay.d.mts.map +0 -1
  149. package/resources/beta/pay/pay.d.ts +0 -206
  150. package/resources/beta/pay/pay.d.ts.map +0 -1
  151. package/resources/beta/pay/pay.js.map +0 -1
  152. package/resources/beta/pay/pay.mjs.map +0 -1
  153. package/resources/beta/pay/products/entitlements.d.mts +0 -53
  154. package/resources/beta/pay/products/entitlements.d.mts.map +0 -1
  155. package/resources/beta/pay/products/entitlements.d.ts +0 -53
  156. package/resources/beta/pay/products/entitlements.d.ts.map +0 -1
  157. package/resources/beta/pay/products/entitlements.js +0 -38
  158. package/resources/beta/pay/products/entitlements.js.map +0 -1
  159. package/resources/beta/pay/products/entitlements.mjs +0 -34
  160. package/resources/beta/pay/products/entitlements.mjs.map +0 -1
  161. package/resources/beta/pay/products/index.d.mts +0 -4
  162. package/resources/beta/pay/products/index.d.mts.map +0 -1
  163. package/resources/beta/pay/products/index.d.ts +0 -4
  164. package/resources/beta/pay/products/index.d.ts.map +0 -1
  165. package/resources/beta/pay/products/index.js.map +0 -1
  166. package/resources/beta/pay/products/index.mjs.map +0 -1
  167. package/resources/beta/pay/products/products.d.mts +0 -183
  168. package/resources/beta/pay/products/products.d.mts.map +0 -1
  169. package/resources/beta/pay/products/products.d.ts +0 -183
  170. package/resources/beta/pay/products/products.d.ts.map +0 -1
  171. package/resources/beta/pay/products/products.js.map +0 -1
  172. package/resources/beta/pay/products/products.mjs.map +0 -1
  173. package/resources/beta/pay/products/variants.d.mts +0 -206
  174. package/resources/beta/pay/products/variants.d.mts.map +0 -1
  175. package/resources/beta/pay/products/variants.d.ts +0 -206
  176. package/resources/beta/pay/products/variants.d.ts.map +0 -1
  177. package/resources/beta/pay/products/variants.js.map +0 -1
  178. package/resources/beta/pay/products/variants.mjs.map +0 -1
  179. package/resources/beta/pay/products.d.mts.map +0 -1
  180. package/resources/beta/pay/products.d.ts.map +0 -1
  181. package/resources/beta/pay/products.js.map +0 -1
  182. package/resources/beta/pay/products.mjs.map +0 -1
  183. package/resources/beta/pay.d.mts +0 -2
  184. package/resources/beta/pay.d.mts.map +0 -1
  185. package/resources/beta/pay.d.ts +0 -2
  186. package/resources/beta/pay.d.ts.map +0 -1
  187. package/resources/beta/pay.js.map +0 -1
  188. package/resources/beta/pay.mjs.map +0 -1
  189. package/src/resources/beta/pay/coupons.ts +0 -218
  190. package/src/resources/beta/pay/customers.ts +0 -229
  191. package/src/resources/beta/pay/entitlements.ts +0 -113
  192. package/src/resources/beta/pay/index.ts +0 -46
  193. package/src/resources/beta/pay/products/entitlements.ts +0 -93
  194. package/src/resources/beta/pay/products/index.ts +0 -28
  195. package/src/resources/beta/pay/products/products.ts +0 -280
  196. package/src/resources/beta/pay/products/variants.ts +0 -279
  197. /package/resources/beta/{pay → commerce}/products.d.mts +0 -0
  198. /package/resources/beta/{pay → commerce}/products.d.ts +0 -0
  199. /package/resources/beta/{pay → commerce}/products.js +0 -0
  200. /package/resources/beta/{pay → commerce}/products.mjs +0 -0
  201. /package/src/resources/beta/{pay → commerce}/products.ts +0 -0
@@ -0,0 +1,407 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
4
+ import { RequestOptions } from "../../../internal/request-options.mjs";
5
+ export declare class Customers extends APIResource {
6
+ /**
7
+ * Creates a new billable customer. A customer represents the entity in your app
8
+ * that will be charged—typically a user, organization, or project. Hercules
9
+ * recommends creating a customer immediately after creating the corresponding
10
+ * entity in your app.
11
+ */
12
+ create(body?: CustomerCreateParams | null | undefined, options?: RequestOptions): APIPromise<CustomerCreateResponse>;
13
+ /**
14
+ * Updates an existing customer. Use this to modify contact information or billing
15
+ * address. Only provided fields are updated; omitted fields remain unchanged.
16
+ */
17
+ update(customerID: string, body?: CustomerUpdateParams | null | undefined, options?: RequestOptions): APIPromise<CustomerUpdateResponse>;
18
+ /**
19
+ * Retrieves a paginated list of all customers. Customers are the billable entities
20
+ * in your app—typically users, organizations, or projects.
21
+ */
22
+ list(query?: CustomerListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListResponsesCursorIDPage, CustomerListResponse>;
23
+ /**
24
+ * Permanently deletes a customer. This also cancels any active subscriptions. This
25
+ * action cannot be undone.
26
+ */
27
+ delete(customerID: string, options?: RequestOptions): APIPromise<void>;
28
+ /**
29
+ * Generates a URL to a hosted billing portal where the customer can view invoices,
30
+ * update payment methods, and manage billing details. Redirect the customer to the
31
+ * returned URL.
32
+ */
33
+ billingPortal(customerID: string, body?: CustomerBillingPortalParams | null | undefined, options?: RequestOptions): APIPromise<CustomerBillingPortalResponse>;
34
+ /**
35
+ * Retrieves a customer by ID. Returns the customer object including contact
36
+ * information and billing address.
37
+ */
38
+ get(customerID: string, options?: RequestOptions): APIPromise<CustomerGetResponse>;
39
+ }
40
+ export type CustomerListResponsesCursorIDPage = CursorIDPage<CustomerListResponse>;
41
+ /**
42
+ * A billable customer. Represents the entity in your app that will be
43
+ * charged—typically a user, organization, or project.
44
+ */
45
+ export interface CustomerCreateResponse {
46
+ /**
47
+ * Unique identifier for the topic subscription
48
+ */
49
+ id: string;
50
+ /**
51
+ * Timestamp when the customer was created
52
+ */
53
+ created: string;
54
+ /**
55
+ * The customer's billing address
56
+ */
57
+ address?: CustomerCreateResponse.Address | null;
58
+ /**
59
+ * The customer's email address for receipts and notifications
60
+ */
61
+ email?: string | null;
62
+ /**
63
+ * The customer's full name
64
+ */
65
+ name?: string | null;
66
+ /**
67
+ * The customer's phone number
68
+ */
69
+ phone?: string | null;
70
+ }
71
+ export declare namespace CustomerCreateResponse {
72
+ /**
73
+ * The customer's billing address
74
+ */
75
+ interface Address {
76
+ /**
77
+ * City name
78
+ */
79
+ city?: string | null;
80
+ /**
81
+ * Two-letter ISO country code
82
+ */
83
+ country?: string | null;
84
+ /**
85
+ * Street address line 1
86
+ */
87
+ line1?: string | null;
88
+ /**
89
+ * Street address line 2 (apartment, suite, etc.)
90
+ */
91
+ line2?: string | null;
92
+ /**
93
+ * Postal or ZIP code
94
+ */
95
+ postal_code?: string | null;
96
+ /**
97
+ * State, province, or region
98
+ */
99
+ state?: string | null;
100
+ }
101
+ }
102
+ /**
103
+ * A billable customer. Represents the entity in your app that will be
104
+ * charged—typically a user, organization, or project.
105
+ */
106
+ export interface CustomerUpdateResponse {
107
+ /**
108
+ * Unique identifier for the topic subscription
109
+ */
110
+ id: string;
111
+ /**
112
+ * Timestamp when the customer was created
113
+ */
114
+ created: string;
115
+ /**
116
+ * The customer's billing address
117
+ */
118
+ address?: CustomerUpdateResponse.Address | null;
119
+ /**
120
+ * The customer's email address for receipts and notifications
121
+ */
122
+ email?: string | null;
123
+ /**
124
+ * The customer's full name
125
+ */
126
+ name?: string | null;
127
+ /**
128
+ * The customer's phone number
129
+ */
130
+ phone?: string | null;
131
+ }
132
+ export declare namespace CustomerUpdateResponse {
133
+ /**
134
+ * The customer's billing address
135
+ */
136
+ interface Address {
137
+ /**
138
+ * City name
139
+ */
140
+ city?: string | null;
141
+ /**
142
+ * Two-letter ISO country code
143
+ */
144
+ country?: string | null;
145
+ /**
146
+ * Street address line 1
147
+ */
148
+ line1?: string | null;
149
+ /**
150
+ * Street address line 2 (apartment, suite, etc.)
151
+ */
152
+ line2?: string | null;
153
+ /**
154
+ * Postal or ZIP code
155
+ */
156
+ postal_code?: string | null;
157
+ /**
158
+ * State, province, or region
159
+ */
160
+ state?: string | null;
161
+ }
162
+ }
163
+ /**
164
+ * A billable customer. Represents the entity in your app that will be
165
+ * charged—typically a user, organization, or project.
166
+ */
167
+ export interface CustomerListResponse {
168
+ /**
169
+ * Unique identifier for the topic subscription
170
+ */
171
+ id: string;
172
+ /**
173
+ * Timestamp when the customer was created
174
+ */
175
+ created: string;
176
+ /**
177
+ * The customer's billing address
178
+ */
179
+ address?: CustomerListResponse.Address | null;
180
+ /**
181
+ * The customer's email address for receipts and notifications
182
+ */
183
+ email?: string | null;
184
+ /**
185
+ * The customer's full name
186
+ */
187
+ name?: string | null;
188
+ /**
189
+ * The customer's phone number
190
+ */
191
+ phone?: string | null;
192
+ }
193
+ export declare namespace CustomerListResponse {
194
+ /**
195
+ * The customer's billing address
196
+ */
197
+ interface Address {
198
+ /**
199
+ * City name
200
+ */
201
+ city?: string | null;
202
+ /**
203
+ * Two-letter ISO country code
204
+ */
205
+ country?: string | null;
206
+ /**
207
+ * Street address line 1
208
+ */
209
+ line1?: string | null;
210
+ /**
211
+ * Street address line 2 (apartment, suite, etc.)
212
+ */
213
+ line2?: string | null;
214
+ /**
215
+ * Postal or ZIP code
216
+ */
217
+ postal_code?: string | null;
218
+ /**
219
+ * State, province, or region
220
+ */
221
+ state?: string | null;
222
+ }
223
+ }
224
+ /**
225
+ * Response containing the billing portal URL
226
+ */
227
+ export interface CustomerBillingPortalResponse {
228
+ /**
229
+ * URL to redirect the customer to for the billing portal
230
+ */
231
+ url: string;
232
+ }
233
+ /**
234
+ * A billable customer. Represents the entity in your app that will be
235
+ * charged—typically a user, organization, or project.
236
+ */
237
+ export interface CustomerGetResponse {
238
+ /**
239
+ * Unique identifier for the topic subscription
240
+ */
241
+ id: string;
242
+ /**
243
+ * Timestamp when the customer was created
244
+ */
245
+ created: string;
246
+ /**
247
+ * The customer's billing address
248
+ */
249
+ address?: CustomerGetResponse.Address | null;
250
+ /**
251
+ * The customer's email address for receipts and notifications
252
+ */
253
+ email?: string | null;
254
+ /**
255
+ * The customer's full name
256
+ */
257
+ name?: string | null;
258
+ /**
259
+ * The customer's phone number
260
+ */
261
+ phone?: string | null;
262
+ }
263
+ export declare namespace CustomerGetResponse {
264
+ /**
265
+ * The customer's billing address
266
+ */
267
+ interface Address {
268
+ /**
269
+ * City name
270
+ */
271
+ city?: string | null;
272
+ /**
273
+ * Two-letter ISO country code
274
+ */
275
+ country?: string | null;
276
+ /**
277
+ * Street address line 1
278
+ */
279
+ line1?: string | null;
280
+ /**
281
+ * Street address line 2 (apartment, suite, etc.)
282
+ */
283
+ line2?: string | null;
284
+ /**
285
+ * Postal or ZIP code
286
+ */
287
+ postal_code?: string | null;
288
+ /**
289
+ * State, province, or region
290
+ */
291
+ state?: string | null;
292
+ }
293
+ }
294
+ export interface CustomerCreateParams {
295
+ /**
296
+ * Optional custom ID for the customer. If not provided, one will be generated.
297
+ */
298
+ id?: string;
299
+ /**
300
+ * The customer's billing address
301
+ */
302
+ address?: CustomerCreateParams.Address;
303
+ /**
304
+ * The customer's email address for receipts and notifications
305
+ */
306
+ email?: string;
307
+ /**
308
+ * The customer's full name
309
+ */
310
+ name?: string;
311
+ /**
312
+ * The customer's phone number
313
+ */
314
+ phone?: string;
315
+ }
316
+ export declare namespace CustomerCreateParams {
317
+ /**
318
+ * The customer's billing address
319
+ */
320
+ interface Address {
321
+ /**
322
+ * City name
323
+ */
324
+ city?: string | null;
325
+ /**
326
+ * Two-letter ISO country code
327
+ */
328
+ country?: string | null;
329
+ /**
330
+ * Street address line 1
331
+ */
332
+ line1?: string | null;
333
+ /**
334
+ * Street address line 2 (apartment, suite, etc.)
335
+ */
336
+ line2?: string | null;
337
+ /**
338
+ * Postal or ZIP code
339
+ */
340
+ postal_code?: string | null;
341
+ /**
342
+ * State, province, or region
343
+ */
344
+ state?: string | null;
345
+ }
346
+ }
347
+ export interface CustomerUpdateParams {
348
+ /**
349
+ * The customer's billing address
350
+ */
351
+ address?: CustomerUpdateParams.Address;
352
+ /**
353
+ * The customer's email address for receipts and notifications
354
+ */
355
+ email?: string;
356
+ /**
357
+ * The customer's full name
358
+ */
359
+ name?: string;
360
+ /**
361
+ * The customer's phone number
362
+ */
363
+ phone?: string;
364
+ }
365
+ export declare namespace CustomerUpdateParams {
366
+ /**
367
+ * The customer's billing address
368
+ */
369
+ interface Address {
370
+ /**
371
+ * City name
372
+ */
373
+ city?: string | null;
374
+ /**
375
+ * Two-letter ISO country code
376
+ */
377
+ country?: string | null;
378
+ /**
379
+ * Street address line 1
380
+ */
381
+ line1?: string | null;
382
+ /**
383
+ * Street address line 2 (apartment, suite, etc.)
384
+ */
385
+ line2?: string | null;
386
+ /**
387
+ * Postal or ZIP code
388
+ */
389
+ postal_code?: string | null;
390
+ /**
391
+ * State, province, or region
392
+ */
393
+ state?: string | null;
394
+ }
395
+ }
396
+ export interface CustomerListParams extends CursorIDPageParams {
397
+ }
398
+ export interface CustomerBillingPortalParams {
399
+ /**
400
+ * URL to redirect the customer to after they exit the billing portal
401
+ */
402
+ return_url?: string;
403
+ }
404
+ export declare namespace Customers {
405
+ export { type CustomerCreateResponse as CustomerCreateResponse, type CustomerUpdateResponse as CustomerUpdateResponse, type CustomerListResponse as CustomerListResponse, type CustomerBillingPortalResponse as CustomerBillingPortalResponse, type CustomerGetResponse as CustomerGetResponse, type CustomerListResponsesCursorIDPage as CustomerListResponsesCursorIDPage, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerBillingPortalParams as CustomerBillingPortalParams, };
406
+ }
407
+ //# sourceMappingURL=customers.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/commerce/customers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;OAKG;IACH,MAAM,CACJ,IAAI,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;OAGG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,IAAI,G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