@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,798 @@
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 Variants extends APIResource {
6
+ /**
7
+ * Creates a new variant with pricing for a product. Use variants to offer multiple
8
+ * pricing tiers or configurations (e.g., Basic at $10/month, Pro at $25/month). A
9
+ * Stripe Price is automatically created.
10
+ */
11
+ create(productID: string, body: VariantCreateParams, options?: RequestOptions): APIPromise<VariantCreateResponse>;
12
+ /**
13
+ * Updates an existing variant. Use this to modify the name, description, or active
14
+ * status. Pricing cannot be changed after creation—create a new variant instead.
15
+ */
16
+ update(variantID: string, params: VariantUpdateParams, options?: RequestOptions): APIPromise<VariantUpdateResponse>;
17
+ /**
18
+ * Retrieves all variants for a product. Variants represent different pricing tiers
19
+ * or configurations (e.g., Basic, Pro, Enterprise) within a single product.
20
+ */
21
+ list(productID: string, query?: VariantListParams | null | undefined, options?: RequestOptions): PagePromise<VariantListResponsesCursorIDPage, VariantListResponse>;
22
+ /**
23
+ * Archives a variant, preventing new subscriptions. The associated Stripe Price is
24
+ * also archived. Existing subscriptions remain active.
25
+ */
26
+ archive(variantID: string, params: VariantArchiveParams, options?: RequestOptions): APIPromise<VariantArchiveResponse>;
27
+ /**
28
+ * Retrieves a variant by ID. Returns the variant object including pricing details
29
+ * and status.
30
+ */
31
+ get(variantID: string, params: VariantGetParams, options?: RequestOptions): APIPromise<VariantGetResponse>;
32
+ }
33
+ export type VariantListResponsesCursorIDPage = CursorIDPage<VariantListResponse>;
34
+ /**
35
+ * A product variant representing a specific tier or configuration. Each variant
36
+ * has its own pricing. Variants allow a single product to have multiple pricing
37
+ * options (e.g., Basic, Pro, Enterprise tiers).
38
+ */
39
+ export interface VariantCreateResponse {
40
+ /**
41
+ * Unique identifier for the topic subscription
42
+ */
43
+ id: string;
44
+ /**
45
+ * Whether the variant is available for new purchases
46
+ */
47
+ active: boolean;
48
+ /**
49
+ * Timestamp when the variant was created
50
+ */
51
+ created: string;
52
+ /**
53
+ * Display name for the variant (e.g., Basic, Standard, Premium)
54
+ */
55
+ name: string;
56
+ /**
57
+ * Three-letter ISO currency code
58
+ */
59
+ currency?: string;
60
+ /**
61
+ * Price configuration for a product. Can be one-time or recurring (subscription).
62
+ */
63
+ default_price?: VariantCreateResponse.DefaultPrice | null;
64
+ /**
65
+ * Detailed description of what this variant includes
66
+ */
67
+ description?: string | null;
68
+ /**
69
+ * Media attachments (images, videos) for the variant
70
+ */
71
+ media?: Array<VariantCreateResponse.Media>;
72
+ /**
73
+ * Custom metadata for the variant
74
+ */
75
+ metadata?: {
76
+ [key: string]: unknown;
77
+ };
78
+ /**
79
+ * Recurring billing configuration for subscription variants
80
+ */
81
+ recurring?: VariantCreateResponse.Recurring | null;
82
+ /**
83
+ * Price amount in the smallest currency unit (e.g., cents). 0 for free variants.
84
+ */
85
+ unit_amount?: number;
86
+ }
87
+ export declare namespace VariantCreateResponse {
88
+ /**
89
+ * Price configuration for a product. Can be one-time or recurring (subscription).
90
+ */
91
+ interface DefaultPrice {
92
+ /**
93
+ * Unique identifier for the topic subscription
94
+ */
95
+ id: string;
96
+ /**
97
+ * How to handle the billing cycle when switching plans. 'now' resets to current
98
+ * time, 'unchanged' keeps the original anchor. Null for one-time prices.
99
+ */
100
+ billing_cycle_anchor: 'now' | 'unchanged' | null;
101
+ /**
102
+ * Three-letter ISO currency code (e.g., usd, eur)
103
+ */
104
+ currency: string;
105
+ /**
106
+ * Billing frequency for recurring prices: day, week, month, or year. Null for
107
+ * one-time prices.
108
+ */
109
+ interval: 'day' | 'week' | 'month' | 'year' | null;
110
+ /**
111
+ * Number of intervals between billings for recurring prices. Null for one-time
112
+ * prices.
113
+ */
114
+ interval_count: number | null;
115
+ /**
116
+ * How to handle prorations when switching plans. 'default' creates prorations,
117
+ * 'none' disables them. Null for one-time prices.
118
+ */
119
+ proration_behavior: 'default' | 'none' | null;
120
+ /**
121
+ * When to calculate proration. 'now' uses current time, 'start_of_period' uses the
122
+ * billing period start. Null for one-time prices or to use Stripe's default.
123
+ */
124
+ proration_date: 'now' | 'start_of_period' | null;
125
+ /**
126
+ * Price type: one_time for single purchases, recurring for subscriptions
127
+ */
128
+ type: 'one_time' | 'recurring';
129
+ /**
130
+ * Price amount in the smallest currency unit (e.g., cents)
131
+ */
132
+ unit_amount: number | null;
133
+ }
134
+ /**
135
+ * Media attachment for products or variants
136
+ */
137
+ interface Media {
138
+ /**
139
+ * Type of media: image, video, or external link
140
+ */
141
+ type: 'image' | 'video' | 'external';
142
+ /**
143
+ * URL of the media resource
144
+ */
145
+ url: string;
146
+ }
147
+ /**
148
+ * Recurring billing configuration for subscription variants
149
+ */
150
+ interface Recurring {
151
+ /**
152
+ * Billing frequency: day, week, month, or year
153
+ */
154
+ interval: 'day' | 'week' | 'month' | 'year';
155
+ /**
156
+ * Number of intervals between billings
157
+ */
158
+ interval_count?: number;
159
+ }
160
+ }
161
+ /**
162
+ * A product variant representing a specific tier or configuration. Each variant
163
+ * has its own pricing. Variants allow a single product to have multiple pricing
164
+ * options (e.g., Basic, Pro, Enterprise tiers).
165
+ */
166
+ export interface VariantUpdateResponse {
167
+ /**
168
+ * Unique identifier for the topic subscription
169
+ */
170
+ id: string;
171
+ /**
172
+ * Whether the variant is available for new purchases
173
+ */
174
+ active: boolean;
175
+ /**
176
+ * Timestamp when the variant was created
177
+ */
178
+ created: string;
179
+ /**
180
+ * Display name for the variant (e.g., Basic, Standard, Premium)
181
+ */
182
+ name: string;
183
+ /**
184
+ * Three-letter ISO currency code
185
+ */
186
+ currency?: string;
187
+ /**
188
+ * Price configuration for a product. Can be one-time or recurring (subscription).
189
+ */
190
+ default_price?: VariantUpdateResponse.DefaultPrice | null;
191
+ /**
192
+ * Detailed description of what this variant includes
193
+ */
194
+ description?: string | null;
195
+ /**
196
+ * Media attachments (images, videos) for the variant
197
+ */
198
+ media?: Array<VariantUpdateResponse.Media>;
199
+ /**
200
+ * Custom metadata for the variant
201
+ */
202
+ metadata?: {
203
+ [key: string]: unknown;
204
+ };
205
+ /**
206
+ * Recurring billing configuration for subscription variants
207
+ */
208
+ recurring?: VariantUpdateResponse.Recurring | null;
209
+ /**
210
+ * Price amount in the smallest currency unit (e.g., cents). 0 for free variants.
211
+ */
212
+ unit_amount?: number;
213
+ }
214
+ export declare namespace VariantUpdateResponse {
215
+ /**
216
+ * Price configuration for a product. Can be one-time or recurring (subscription).
217
+ */
218
+ interface DefaultPrice {
219
+ /**
220
+ * Unique identifier for the topic subscription
221
+ */
222
+ id: string;
223
+ /**
224
+ * How to handle the billing cycle when switching plans. 'now' resets to current
225
+ * time, 'unchanged' keeps the original anchor. Null for one-time prices.
226
+ */
227
+ billing_cycle_anchor: 'now' | 'unchanged' | null;
228
+ /**
229
+ * Three-letter ISO currency code (e.g., usd, eur)
230
+ */
231
+ currency: string;
232
+ /**
233
+ * Billing frequency for recurring prices: day, week, month, or year. Null for
234
+ * one-time prices.
235
+ */
236
+ interval: 'day' | 'week' | 'month' | 'year' | null;
237
+ /**
238
+ * Number of intervals between billings for recurring prices. Null for one-time
239
+ * prices.
240
+ */
241
+ interval_count: number | null;
242
+ /**
243
+ * How to handle prorations when switching plans. 'default' creates prorations,
244
+ * 'none' disables them. Null for one-time prices.
245
+ */
246
+ proration_behavior: 'default' | 'none' | null;
247
+ /**
248
+ * When to calculate proration. 'now' uses current time, 'start_of_period' uses the
249
+ * billing period start. Null for one-time prices or to use Stripe's default.
250
+ */
251
+ proration_date: 'now' | 'start_of_period' | null;
252
+ /**
253
+ * Price type: one_time for single purchases, recurring for subscriptions
254
+ */
255
+ type: 'one_time' | 'recurring';
256
+ /**
257
+ * Price amount in the smallest currency unit (e.g., cents)
258
+ */
259
+ unit_amount: number | null;
260
+ }
261
+ /**
262
+ * Media attachment for products or variants
263
+ */
264
+ interface Media {
265
+ /**
266
+ * Type of media: image, video, or external link
267
+ */
268
+ type: 'image' | 'video' | 'external';
269
+ /**
270
+ * URL of the media resource
271
+ */
272
+ url: string;
273
+ }
274
+ /**
275
+ * Recurring billing configuration for subscription variants
276
+ */
277
+ interface Recurring {
278
+ /**
279
+ * Billing frequency: day, week, month, or year
280
+ */
281
+ interval: 'day' | 'week' | 'month' | 'year';
282
+ /**
283
+ * Number of intervals between billings
284
+ */
285
+ interval_count?: number;
286
+ }
287
+ }
288
+ /**
289
+ * A product variant representing a specific tier or configuration. Each variant
290
+ * has its own pricing. Variants allow a single product to have multiple pricing
291
+ * options (e.g., Basic, Pro, Enterprise tiers).
292
+ */
293
+ export interface VariantListResponse {
294
+ /**
295
+ * Unique identifier for the topic subscription
296
+ */
297
+ id: string;
298
+ /**
299
+ * Whether the variant is available for new purchases
300
+ */
301
+ active: boolean;
302
+ /**
303
+ * Timestamp when the variant was created
304
+ */
305
+ created: string;
306
+ /**
307
+ * Display name for the variant (e.g., Basic, Standard, Premium)
308
+ */
309
+ name: string;
310
+ /**
311
+ * Three-letter ISO currency code
312
+ */
313
+ currency?: string;
314
+ /**
315
+ * Price configuration for a product. Can be one-time or recurring (subscription).
316
+ */
317
+ default_price?: VariantListResponse.DefaultPrice | null;
318
+ /**
319
+ * Detailed description of what this variant includes
320
+ */
321
+ description?: string | null;
322
+ /**
323
+ * Media attachments (images, videos) for the variant
324
+ */
325
+ media?: Array<VariantListResponse.Media>;
326
+ /**
327
+ * Custom metadata for the variant
328
+ */
329
+ metadata?: {
330
+ [key: string]: unknown;
331
+ };
332
+ /**
333
+ * Recurring billing configuration for subscription variants
334
+ */
335
+ recurring?: VariantListResponse.Recurring | null;
336
+ /**
337
+ * Price amount in the smallest currency unit (e.g., cents). 0 for free variants.
338
+ */
339
+ unit_amount?: number;
340
+ }
341
+ export declare namespace VariantListResponse {
342
+ /**
343
+ * Price configuration for a product. Can be one-time or recurring (subscription).
344
+ */
345
+ interface DefaultPrice {
346
+ /**
347
+ * Unique identifier for the topic subscription
348
+ */
349
+ id: string;
350
+ /**
351
+ * How to handle the billing cycle when switching plans. 'now' resets to current
352
+ * time, 'unchanged' keeps the original anchor. Null for one-time prices.
353
+ */
354
+ billing_cycle_anchor: 'now' | 'unchanged' | null;
355
+ /**
356
+ * Three-letter ISO currency code (e.g., usd, eur)
357
+ */
358
+ currency: string;
359
+ /**
360
+ * Billing frequency for recurring prices: day, week, month, or year. Null for
361
+ * one-time prices.
362
+ */
363
+ interval: 'day' | 'week' | 'month' | 'year' | null;
364
+ /**
365
+ * Number of intervals between billings for recurring prices. Null for one-time
366
+ * prices.
367
+ */
368
+ interval_count: number | null;
369
+ /**
370
+ * How to handle prorations when switching plans. 'default' creates prorations,
371
+ * 'none' disables them. Null for one-time prices.
372
+ */
373
+ proration_behavior: 'default' | 'none' | null;
374
+ /**
375
+ * When to calculate proration. 'now' uses current time, 'start_of_period' uses the
376
+ * billing period start. Null for one-time prices or to use Stripe's default.
377
+ */
378
+ proration_date: 'now' | 'start_of_period' | null;
379
+ /**
380
+ * Price type: one_time for single purchases, recurring for subscriptions
381
+ */
382
+ type: 'one_time' | 'recurring';
383
+ /**
384
+ * Price amount in the smallest currency unit (e.g., cents)
385
+ */
386
+ unit_amount: number | null;
387
+ }
388
+ /**
389
+ * Media attachment for products or variants
390
+ */
391
+ interface Media {
392
+ /**
393
+ * Type of media: image, video, or external link
394
+ */
395
+ type: 'image' | 'video' | 'external';
396
+ /**
397
+ * URL of the media resource
398
+ */
399
+ url: string;
400
+ }
401
+ /**
402
+ * Recurring billing configuration for subscription variants
403
+ */
404
+ interface Recurring {
405
+ /**
406
+ * Billing frequency: day, week, month, or year
407
+ */
408
+ interval: 'day' | 'week' | 'month' | 'year';
409
+ /**
410
+ * Number of intervals between billings
411
+ */
412
+ interval_count?: number;
413
+ }
414
+ }
415
+ /**
416
+ * A product variant representing a specific tier or configuration. Each variant
417
+ * has its own pricing. Variants allow a single product to have multiple pricing
418
+ * options (e.g., Basic, Pro, Enterprise tiers).
419
+ */
420
+ export interface VariantArchiveResponse {
421
+ /**
422
+ * Unique identifier for the topic subscription
423
+ */
424
+ id: string;
425
+ /**
426
+ * Whether the variant is available for new purchases
427
+ */
428
+ active: boolean;
429
+ /**
430
+ * Timestamp when the variant was created
431
+ */
432
+ created: string;
433
+ /**
434
+ * Display name for the variant (e.g., Basic, Standard, Premium)
435
+ */
436
+ name: string;
437
+ /**
438
+ * Three-letter ISO currency code
439
+ */
440
+ currency?: string;
441
+ /**
442
+ * Price configuration for a product. Can be one-time or recurring (subscription).
443
+ */
444
+ default_price?: VariantArchiveResponse.DefaultPrice | null;
445
+ /**
446
+ * Detailed description of what this variant includes
447
+ */
448
+ description?: string | null;
449
+ /**
450
+ * Media attachments (images, videos) for the variant
451
+ */
452
+ media?: Array<VariantArchiveResponse.Media>;
453
+ /**
454
+ * Custom metadata for the variant
455
+ */
456
+ metadata?: {
457
+ [key: string]: unknown;
458
+ };
459
+ /**
460
+ * Recurring billing configuration for subscription variants
461
+ */
462
+ recurring?: VariantArchiveResponse.Recurring | null;
463
+ /**
464
+ * Price amount in the smallest currency unit (e.g., cents). 0 for free variants.
465
+ */
466
+ unit_amount?: number;
467
+ }
468
+ export declare namespace VariantArchiveResponse {
469
+ /**
470
+ * Price configuration for a product. Can be one-time or recurring (subscription).
471
+ */
472
+ interface DefaultPrice {
473
+ /**
474
+ * Unique identifier for the topic subscription
475
+ */
476
+ id: string;
477
+ /**
478
+ * How to handle the billing cycle when switching plans. 'now' resets to current
479
+ * time, 'unchanged' keeps the original anchor. Null for one-time prices.
480
+ */
481
+ billing_cycle_anchor: 'now' | 'unchanged' | null;
482
+ /**
483
+ * Three-letter ISO currency code (e.g., usd, eur)
484
+ */
485
+ currency: string;
486
+ /**
487
+ * Billing frequency for recurring prices: day, week, month, or year. Null for
488
+ * one-time prices.
489
+ */
490
+ interval: 'day' | 'week' | 'month' | 'year' | null;
491
+ /**
492
+ * Number of intervals between billings for recurring prices. Null for one-time
493
+ * prices.
494
+ */
495
+ interval_count: number | null;
496
+ /**
497
+ * How to handle prorations when switching plans. 'default' creates prorations,
498
+ * 'none' disables them. Null for one-time prices.
499
+ */
500
+ proration_behavior: 'default' | 'none' | null;
501
+ /**
502
+ * When to calculate proration. 'now' uses current time, 'start_of_period' uses the
503
+ * billing period start. Null for one-time prices or to use Stripe's default.
504
+ */
505
+ proration_date: 'now' | 'start_of_period' | null;
506
+ /**
507
+ * Price type: one_time for single purchases, recurring for subscriptions
508
+ */
509
+ type: 'one_time' | 'recurring';
510
+ /**
511
+ * Price amount in the smallest currency unit (e.g., cents)
512
+ */
513
+ unit_amount: number | null;
514
+ }
515
+ /**
516
+ * Media attachment for products or variants
517
+ */
518
+ interface Media {
519
+ /**
520
+ * Type of media: image, video, or external link
521
+ */
522
+ type: 'image' | 'video' | 'external';
523
+ /**
524
+ * URL of the media resource
525
+ */
526
+ url: string;
527
+ }
528
+ /**
529
+ * Recurring billing configuration for subscription variants
530
+ */
531
+ interface Recurring {
532
+ /**
533
+ * Billing frequency: day, week, month, or year
534
+ */
535
+ interval: 'day' | 'week' | 'month' | 'year';
536
+ /**
537
+ * Number of intervals between billings
538
+ */
539
+ interval_count?: number;
540
+ }
541
+ }
542
+ /**
543
+ * A product variant representing a specific tier or configuration. Each variant
544
+ * has its own pricing. Variants allow a single product to have multiple pricing
545
+ * options (e.g., Basic, Pro, Enterprise tiers).
546
+ */
547
+ export interface VariantGetResponse {
548
+ /**
549
+ * Unique identifier for the topic subscription
550
+ */
551
+ id: string;
552
+ /**
553
+ * Whether the variant is available for new purchases
554
+ */
555
+ active: boolean;
556
+ /**
557
+ * Timestamp when the variant was created
558
+ */
559
+ created: string;
560
+ /**
561
+ * Display name for the variant (e.g., Basic, Standard, Premium)
562
+ */
563
+ name: string;
564
+ /**
565
+ * Three-letter ISO currency code
566
+ */
567
+ currency?: string;
568
+ /**
569
+ * Price configuration for a product. Can be one-time or recurring (subscription).
570
+ */
571
+ default_price?: VariantGetResponse.DefaultPrice | null;
572
+ /**
573
+ * Detailed description of what this variant includes
574
+ */
575
+ description?: string | null;
576
+ /**
577
+ * Media attachments (images, videos) for the variant
578
+ */
579
+ media?: Array<VariantGetResponse.Media>;
580
+ /**
581
+ * Custom metadata for the variant
582
+ */
583
+ metadata?: {
584
+ [key: string]: unknown;
585
+ };
586
+ /**
587
+ * Recurring billing configuration for subscription variants
588
+ */
589
+ recurring?: VariantGetResponse.Recurring | null;
590
+ /**
591
+ * Price amount in the smallest currency unit (e.g., cents). 0 for free variants.
592
+ */
593
+ unit_amount?: number;
594
+ }
595
+ export declare namespace VariantGetResponse {
596
+ /**
597
+ * Price configuration for a product. Can be one-time or recurring (subscription).
598
+ */
599
+ interface DefaultPrice {
600
+ /**
601
+ * Unique identifier for the topic subscription
602
+ */
603
+ id: string;
604
+ /**
605
+ * How to handle the billing cycle when switching plans. 'now' resets to current
606
+ * time, 'unchanged' keeps the original anchor. Null for one-time prices.
607
+ */
608
+ billing_cycle_anchor: 'now' | 'unchanged' | null;
609
+ /**
610
+ * Three-letter ISO currency code (e.g., usd, eur)
611
+ */
612
+ currency: string;
613
+ /**
614
+ * Billing frequency for recurring prices: day, week, month, or year. Null for
615
+ * one-time prices.
616
+ */
617
+ interval: 'day' | 'week' | 'month' | 'year' | null;
618
+ /**
619
+ * Number of intervals between billings for recurring prices. Null for one-time
620
+ * prices.
621
+ */
622
+ interval_count: number | null;
623
+ /**
624
+ * How to handle prorations when switching plans. 'default' creates prorations,
625
+ * 'none' disables them. Null for one-time prices.
626
+ */
627
+ proration_behavior: 'default' | 'none' | null;
628
+ /**
629
+ * When to calculate proration. 'now' uses current time, 'start_of_period' uses the
630
+ * billing period start. Null for one-time prices or to use Stripe's default.
631
+ */
632
+ proration_date: 'now' | 'start_of_period' | null;
633
+ /**
634
+ * Price type: one_time for single purchases, recurring for subscriptions
635
+ */
636
+ type: 'one_time' | 'recurring';
637
+ /**
638
+ * Price amount in the smallest currency unit (e.g., cents)
639
+ */
640
+ unit_amount: number | null;
641
+ }
642
+ /**
643
+ * Media attachment for products or variants
644
+ */
645
+ interface Media {
646
+ /**
647
+ * Type of media: image, video, or external link
648
+ */
649
+ type: 'image' | 'video' | 'external';
650
+ /**
651
+ * URL of the media resource
652
+ */
653
+ url: string;
654
+ }
655
+ /**
656
+ * Recurring billing configuration for subscription variants
657
+ */
658
+ interface Recurring {
659
+ /**
660
+ * Billing frequency: day, week, month, or year
661
+ */
662
+ interval: 'day' | 'week' | 'month' | 'year';
663
+ /**
664
+ * Number of intervals between billings
665
+ */
666
+ interval_count?: number;
667
+ }
668
+ }
669
+ export interface VariantCreateParams {
670
+ /**
671
+ * Display name for the variant (e.g., Basic, Standard, Premium)
672
+ */
673
+ name: string;
674
+ /**
675
+ * Optional custom ID for the variant. If not provided, one will be generated.
676
+ */
677
+ id?: string;
678
+ /**
679
+ * Three-letter ISO currency code
680
+ */
681
+ currency?: string;
682
+ /**
683
+ * Detailed description of what this variant includes
684
+ */
685
+ description?: string;
686
+ /**
687
+ * Media attachments (images, videos) for the variant
688
+ */
689
+ media?: Array<VariantCreateParams.Media>;
690
+ /**
691
+ * Custom metadata for the variant
692
+ */
693
+ metadata?: {
694
+ [key: string]: unknown;
695
+ };
696
+ /**
697
+ * Recurring billing configuration for subscription variants
698
+ */
699
+ recurring?: VariantCreateParams.Recurring;
700
+ /**
701
+ * Price amount in the smallest currency unit (e.g., cents). Use 0 for free
702
+ * variants.
703
+ */
704
+ unit_amount?: number;
705
+ }
706
+ export declare namespace VariantCreateParams {
707
+ /**
708
+ * Media attachment for products or variants
709
+ */
710
+ interface Media {
711
+ /**
712
+ * Type of media: image, video, or external link
713
+ */
714
+ type: 'image' | 'video' | 'external';
715
+ /**
716
+ * URL of the media resource
717
+ */
718
+ url: string;
719
+ }
720
+ /**
721
+ * Recurring billing configuration for subscription variants
722
+ */
723
+ interface Recurring {
724
+ /**
725
+ * Billing frequency: day, week, month, or year
726
+ */
727
+ interval: 'day' | 'week' | 'month' | 'year';
728
+ /**
729
+ * Number of intervals between billings
730
+ */
731
+ interval_count?: number;
732
+ }
733
+ }
734
+ export interface VariantUpdateParams {
735
+ /**
736
+ * Path param: The unique identifier of the product
737
+ */
738
+ product_id: string;
739
+ /**
740
+ * Body param: Whether the variant is available for new purchases
741
+ */
742
+ active?: boolean;
743
+ /**
744
+ * Body param: Detailed description of what this variant includes
745
+ */
746
+ description?: string;
747
+ /**
748
+ * Body param: Media attachments (images, videos) for the variant
749
+ */
750
+ media?: Array<VariantUpdateParams.Media>;
751
+ /**
752
+ * Body param: Custom metadata for the variant
753
+ */
754
+ metadata?: {
755
+ [key: string]: unknown;
756
+ };
757
+ /**
758
+ * Body param: Display name for the variant
759
+ */
760
+ name?: string;
761
+ }
762
+ export declare namespace VariantUpdateParams {
763
+ /**
764
+ * Media attachment for products or variants
765
+ */
766
+ interface Media {
767
+ /**
768
+ * Type of media: image, video, or external link
769
+ */
770
+ type: 'image' | 'video' | 'external';
771
+ /**
772
+ * URL of the media resource
773
+ */
774
+ url: string;
775
+ }
776
+ }
777
+ export interface VariantListParams extends CursorIDPageParams {
778
+ /**
779
+ * Filter by active status
780
+ */
781
+ active?: 'true' | 'false';
782
+ }
783
+ export interface VariantArchiveParams {
784
+ /**
785
+ * The unique identifier of the product
786
+ */
787
+ product_id: string;
788
+ }
789
+ export interface VariantGetParams {
790
+ /**
791
+ * The unique identifier of the product
792
+ */
793
+ product_id: string;
794
+ }
795
+ export declare namespace Variants {
796
+ export { type VariantCreateResponse as VariantCreateResponse, type VariantUpdateResponse as VariantUpdateResponse, type VariantListResponse as VariantListResponse, type VariantArchiveResponse as VariantArchiveResponse, type VariantGetResponse as VariantGetResponse, type VariantListResponsesCursorIDPage as VariantListResponsesCursorIDPage, type VariantCreateParams as VariantCreateParams, type VariantUpdateParams as VariantUpdateParams, type VariantListParams as VariantListParams, type VariantArchiveParams as VariantArchiveParams, type VariantGetParams as VariantGetParams, };
797
+ }
798
+ //# sourceMappingURL=variants.d.mts.map