@usehercules/sdk 1.10.1 → 1.11.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 (78) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +7 -7
  3. package/package.json +1 -1
  4. package/resources/beta/commerce/commerce.d.mts +31 -11
  5. package/resources/beta/commerce/commerce.d.mts.map +1 -1
  6. package/resources/beta/commerce/commerce.d.ts +31 -11
  7. package/resources/beta/commerce/commerce.d.ts.map +1 -1
  8. package/resources/beta/commerce/commerce.js +4 -0
  9. package/resources/beta/commerce/commerce.js.map +1 -1
  10. package/resources/beta/commerce/commerce.mjs +4 -0
  11. package/resources/beta/commerce/commerce.mjs.map +1 -1
  12. package/resources/beta/commerce/coupons.d.mts +7 -184
  13. package/resources/beta/commerce/coupons.d.mts.map +1 -1
  14. package/resources/beta/commerce/coupons.d.ts +7 -184
  15. package/resources/beta/commerce/coupons.d.ts.map +1 -1
  16. package/resources/beta/commerce/coupons.js +1 -4
  17. package/resources/beta/commerce/coupons.js.map +1 -1
  18. package/resources/beta/commerce/coupons.mjs +1 -4
  19. package/resources/beta/commerce/coupons.mjs.map +1 -1
  20. package/resources/beta/commerce/customers.d.mts +24 -239
  21. package/resources/beta/commerce/customers.d.mts.map +1 -1
  22. package/resources/beta/commerce/customers.d.ts +24 -239
  23. package/resources/beta/commerce/customers.d.ts.map +1 -1
  24. package/resources/beta/commerce/customers.js +1 -4
  25. package/resources/beta/commerce/customers.js.map +1 -1
  26. package/resources/beta/commerce/customers.mjs +1 -4
  27. package/resources/beta/commerce/customers.mjs.map +1 -1
  28. package/resources/beta/commerce/features.d.mts +127 -0
  29. package/resources/beta/commerce/features.d.mts.map +1 -0
  30. package/resources/beta/commerce/features.d.ts +127 -0
  31. package/resources/beta/commerce/features.d.ts.map +1 -0
  32. package/resources/beta/commerce/features.js +49 -0
  33. package/resources/beta/commerce/features.js.map +1 -0
  34. package/resources/beta/commerce/features.mjs +45 -0
  35. package/resources/beta/commerce/features.mjs.map +1 -0
  36. package/resources/beta/commerce/index.d.mts +4 -3
  37. package/resources/beta/commerce/index.d.mts.map +1 -1
  38. package/resources/beta/commerce/index.d.ts +4 -3
  39. package/resources/beta/commerce/index.d.ts.map +1 -1
  40. package/resources/beta/commerce/index.js +3 -1
  41. package/resources/beta/commerce/index.js.map +1 -1
  42. package/resources/beta/commerce/index.mjs +1 -0
  43. package/resources/beta/commerce/index.mjs.map +1 -1
  44. package/resources/beta/commerce/products/index.d.mts +2 -2
  45. package/resources/beta/commerce/products/index.d.mts.map +1 -1
  46. package/resources/beta/commerce/products/index.d.ts +2 -2
  47. package/resources/beta/commerce/products/index.d.ts.map +1 -1
  48. package/resources/beta/commerce/products/index.js.map +1 -1
  49. package/resources/beta/commerce/products/index.mjs.map +1 -1
  50. package/resources/beta/commerce/products/products.d.mts +17 -673
  51. package/resources/beta/commerce/products/products.d.mts.map +1 -1
  52. package/resources/beta/commerce/products/products.d.ts +17 -673
  53. package/resources/beta/commerce/products/products.d.ts.map +1 -1
  54. package/resources/beta/commerce/products/products.js +1 -4
  55. package/resources/beta/commerce/products/products.js.map +1 -1
  56. package/resources/beta/commerce/products/products.mjs +1 -4
  57. package/resources/beta/commerce/products/products.mjs.map +1 -1
  58. package/resources/beta/commerce/products/variants.d.mts +12 -540
  59. package/resources/beta/commerce/products/variants.d.mts.map +1 -1
  60. package/resources/beta/commerce/products/variants.d.ts +12 -540
  61. package/resources/beta/commerce/products/variants.d.ts.map +1 -1
  62. package/resources/beta/commerce/products/variants.js +4 -1
  63. package/resources/beta/commerce/products/variants.js.map +1 -1
  64. package/resources/beta/commerce/products/variants.mjs +4 -1
  65. package/resources/beta/commerce/products/variants.mjs.map +1 -1
  66. package/src/resources/beta/commerce/commerce.ts +57 -35
  67. package/src/resources/beta/commerce/coupons.ts +9 -231
  68. package/src/resources/beta/commerce/customers.ts +27 -291
  69. package/src/resources/beta/commerce/features.ts +175 -0
  70. package/src/resources/beta/commerce/index.ts +15 -15
  71. package/src/resources/beta/commerce/products/index.ts +4 -12
  72. package/src/resources/beta/commerce/products/products.ts +21 -800
  73. package/src/resources/beta/commerce/products/variants.ts +17 -658
  74. package/src/version.ts +1 -1
  75. package/version.d.mts +1 -1
  76. package/version.d.ts +1 -1
  77. package/version.js +1 -1
  78. package/version.mjs +1 -1
@@ -2,7 +2,7 @@ import { APIResource } from "../../../../core/resource.mjs";
2
2
  import * as ResourcesAPI from "./resources.mjs";
3
3
  import { ResourceAttachParams, ResourceAttachResponse, ResourceListParams, ResourceListResponse, ResourceListResponsesCursorIDPage, ResourceRemoveParams, Resources } from "./resources.mjs";
4
4
  import * as VariantsAPI from "./variants.mjs";
5
- import { VariantArchiveParams, VariantArchiveResponse, VariantCreateParams, VariantCreateResponse, VariantGetParams, VariantGetResponse, VariantListParams, VariantListResponse, VariantListResponsesCursorIDPage, VariantUpdateParams, VariantUpdateResponse, Variants } from "./variants.mjs";
5
+ import { Variant as VariantsAPIVariant, VariantArchiveParams, VariantCreateParams, VariantGetParams, VariantListParams, VariantUpdateParams, Variants, VariantsCursorIDPage } from "./variants.mjs";
6
6
  import { APIPromise } from "../../../../core/api-promise.mjs";
7
7
  import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../../../core/pagination.mjs";
8
8
  import { RequestOptions } from "../../../../internal/request-options.mjs";
@@ -15,37 +15,37 @@ export declare class Products extends APIResource {
15
15
  * resources to define which features or content customers on this product can
16
16
  * access.
17
17
  */
18
- create(body: ProductCreateParams, options?: RequestOptions): APIPromise<ProductCreateResponse>;
18
+ create(body: ProductCreateParams, options?: RequestOptions): APIPromise<Product>;
19
19
  /**
20
20
  * Updates an existing product. Use this to modify the product name, description,
21
21
  * or active status. Pricing cannot be changed after creation—create a new product
22
22
  * instead.
23
23
  */
24
- update(productID: string, body?: ProductUpdateParams | null | undefined, options?: RequestOptions): APIPromise<ProductUpdateResponse>;
24
+ update(productID: string, body?: ProductUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Product>;
25
25
  /**
26
26
  * Retrieves a paginated list of subscription products. Products define the pricing
27
27
  * and billing intervals for subscriptions. Each product can have resources
28
28
  * attached that grant access to features or content.
29
29
  */
30
- list(query?: ProductListParams | null | undefined, options?: RequestOptions): PagePromise<ProductListResponsesCursorIDPage, ProductListResponse>;
30
+ list(query?: ProductListParams | null | undefined, options?: RequestOptions): PagePromise<ProductsCursorIDPage, Product>;
31
31
  /**
32
32
  * Archives a product, preventing new subscriptions. Existing subscriptions remain
33
33
  * active. Use this instead of deletion to preserve subscription history.
34
34
  */
35
- archive(productID: string, options?: RequestOptions): APIPromise<ProductArchiveResponse>;
35
+ archive(productID: string, options?: RequestOptions): APIPromise<Product>;
36
36
  /**
37
37
  * Retrieves a product by ID. Returns the product object including pricing details
38
38
  * and status.
39
39
  */
40
- get(productID: string, options?: RequestOptions): APIPromise<ProductGetResponse>;
40
+ get(productID: string, options?: RequestOptions): APIPromise<Product>;
41
41
  }
42
- export type ProductListResponsesCursorIDPage = CursorIDPage<ProductListResponse>;
42
+ export type ProductsCursorIDPage = CursorIDPage<Product>;
43
43
  /**
44
44
  * A product that customers can purchase. Products can be one-time purchases or
45
45
  * recurring subscriptions. Attach resources to a product to grant features to
46
46
  * customers.
47
47
  */
48
- export interface ProductCreateResponse {
48
+ export interface Product {
49
49
  /**
50
50
  * Unique identifier for the topic subscription
51
51
  */
@@ -66,11 +66,11 @@ export interface ProductCreateResponse {
66
66
  * ID of the subscription group this product belongs to. Subscription groups define
67
67
  * shared billing configuration. All products must belong to a subscription group.
68
68
  */
69
- product_group_id: string;
69
+ subscription_group_id: string;
70
70
  /**
71
71
  * Price configuration for a product. Can be one-time or recurring (subscription).
72
72
  */
73
- default_price?: ProductCreateResponse.DefaultPrice | null;
73
+ default_price?: Product.DefaultPrice | null;
74
74
  /**
75
75
  * Detailed description of what the product includes
76
76
  */
@@ -78,7 +78,7 @@ export interface ProductCreateResponse {
78
78
  /**
79
79
  * Media attachments (images, videos) for the product
80
80
  */
81
- media?: Array<ProductCreateResponse.Media>;
81
+ media?: Array<Product.Media>;
82
82
  /**
83
83
  * Custom metadata for the product
84
84
  */
@@ -89,669 +89,13 @@ export interface ProductCreateResponse {
89
89
  * Resources attached to this product. Customers get access to these resources when
90
90
  * they purchase the product.
91
91
  */
92
- resources?: Array<ProductCreateResponse.Resource>;
92
+ resources?: Array<Product.Resource>;
93
93
  /**
94
94
  * Tags for categorizing and filtering products
95
95
  */
96
96
  tags?: Array<string>;
97
97
  }
98
- export declare namespace ProductCreateResponse {
99
- /**
100
- * Price configuration for a product. Can be one-time or recurring (subscription).
101
- */
102
- interface DefaultPrice {
103
- /**
104
- * Unique identifier for the topic subscription
105
- */
106
- id: string;
107
- /**
108
- * Three-letter ISO currency code (e.g., usd, eur)
109
- */
110
- currency: string;
111
- /**
112
- * Billing frequency for recurring prices: day, week, month, or year. Null for
113
- * one-time prices.
114
- */
115
- interval: 'day' | 'week' | 'month' | 'year' | null;
116
- /**
117
- * Number of intervals between billings for recurring prices. Null for one-time
118
- * prices.
119
- */
120
- interval_count: number | null;
121
- /**
122
- * Price type: one_time for single purchases, recurring for subscriptions
123
- */
124
- type: 'one_time' | 'recurring';
125
- /**
126
- * Price amount in the smallest currency unit (e.g., cents)
127
- */
128
- unit_amount: number | null;
129
- }
130
- /**
131
- * Media attachment for products or variants
132
- */
133
- interface Media {
134
- /**
135
- * CDN file ID
136
- */
137
- id: string;
138
- /**
139
- * Display order in gallery (0-indexed)
140
- */
141
- display_order: number;
142
- /**
143
- * Type of media: image or video
144
- */
145
- type: 'image' | 'video';
146
- /**
147
- * CDN URL of the media resource
148
- */
149
- url: string;
150
- /**
151
- * File size in bytes
152
- */
153
- file_size?: number;
154
- /**
155
- * Original filename
156
- */
157
- filename?: string;
158
- /**
159
- * Optimized thumbnail URL for images
160
- */
161
- thumbnail_url?: string;
162
- }
163
- /**
164
- * A resource that can be attached to products to grant access to customers.
165
- * Resources represent monetizable content or features in your app.
166
- */
167
- interface Resource {
168
- /**
169
- * Unique identifier for the topic subscription
170
- */
171
- id: string;
172
- /**
173
- * Whether the resource is active and grants access
174
- */
175
- active: boolean;
176
- /**
177
- * Timestamp when the resource was created
178
- */
179
- created: string;
180
- /**
181
- * Type of resource
182
- */
183
- type: 'feature';
184
- /**
185
- * Feature grant data. Required when type is 'feature'.
186
- */
187
- custom_entitlement?: Resource.CustomEntitlement | null;
188
- }
189
- namespace Resource {
190
- /**
191
- * Feature grant data. Required when type is 'feature'.
192
- */
193
- interface CustomEntitlement {
194
- /**
195
- * The feature key that identifies what access is granted (e.g., 'pro_features')
196
- */
197
- id: string;
198
- /**
199
- * Custom metadata for the feature grant
200
- */
201
- metadata?: {
202
- [key: string]: unknown;
203
- };
204
- }
205
- }
206
- }
207
- /**
208
- * A product that customers can purchase. Products can be one-time purchases or
209
- * recurring subscriptions. Attach resources to a product to grant features to
210
- * customers.
211
- */
212
- export interface ProductUpdateResponse {
213
- /**
214
- * Unique identifier for the topic subscription
215
- */
216
- id: string;
217
- /**
218
- * Whether the product is available for new purchases
219
- */
220
- active: boolean;
221
- /**
222
- * Timestamp when the product was created
223
- */
224
- created: string;
225
- /**
226
- * Display name for the product (e.g., Pro, Business, Teams)
227
- */
228
- name: string;
229
- /**
230
- * ID of the subscription group this product belongs to. Subscription groups define
231
- * shared billing configuration. All products must belong to a subscription group.
232
- */
233
- product_group_id: string;
234
- /**
235
- * Price configuration for a product. Can be one-time or recurring (subscription).
236
- */
237
- default_price?: ProductUpdateResponse.DefaultPrice | null;
238
- /**
239
- * Detailed description of what the product includes
240
- */
241
- description?: string | null;
242
- /**
243
- * Media attachments (images, videos) for the product
244
- */
245
- media?: Array<ProductUpdateResponse.Media>;
246
- /**
247
- * Custom metadata for the product
248
- */
249
- metadata?: {
250
- [key: string]: unknown;
251
- };
252
- /**
253
- * Resources attached to this product. Customers get access to these resources when
254
- * they purchase the product.
255
- */
256
- resources?: Array<ProductUpdateResponse.Resource>;
257
- /**
258
- * Tags for categorizing and filtering products
259
- */
260
- tags?: Array<string>;
261
- }
262
- export declare namespace ProductUpdateResponse {
263
- /**
264
- * Price configuration for a product. Can be one-time or recurring (subscription).
265
- */
266
- interface DefaultPrice {
267
- /**
268
- * Unique identifier for the topic subscription
269
- */
270
- id: string;
271
- /**
272
- * Three-letter ISO currency code (e.g., usd, eur)
273
- */
274
- currency: string;
275
- /**
276
- * Billing frequency for recurring prices: day, week, month, or year. Null for
277
- * one-time prices.
278
- */
279
- interval: 'day' | 'week' | 'month' | 'year' | null;
280
- /**
281
- * Number of intervals between billings for recurring prices. Null for one-time
282
- * prices.
283
- */
284
- interval_count: number | null;
285
- /**
286
- * Price type: one_time for single purchases, recurring for subscriptions
287
- */
288
- type: 'one_time' | 'recurring';
289
- /**
290
- * Price amount in the smallest currency unit (e.g., cents)
291
- */
292
- unit_amount: number | null;
293
- }
294
- /**
295
- * Media attachment for products or variants
296
- */
297
- interface Media {
298
- /**
299
- * CDN file ID
300
- */
301
- id: string;
302
- /**
303
- * Display order in gallery (0-indexed)
304
- */
305
- display_order: number;
306
- /**
307
- * Type of media: image or video
308
- */
309
- type: 'image' | 'video';
310
- /**
311
- * CDN URL of the media resource
312
- */
313
- url: string;
314
- /**
315
- * File size in bytes
316
- */
317
- file_size?: number;
318
- /**
319
- * Original filename
320
- */
321
- filename?: string;
322
- /**
323
- * Optimized thumbnail URL for images
324
- */
325
- thumbnail_url?: string;
326
- }
327
- /**
328
- * A resource that can be attached to products to grant access to customers.
329
- * Resources represent monetizable content or features in your app.
330
- */
331
- interface Resource {
332
- /**
333
- * Unique identifier for the topic subscription
334
- */
335
- id: string;
336
- /**
337
- * Whether the resource is active and grants access
338
- */
339
- active: boolean;
340
- /**
341
- * Timestamp when the resource was created
342
- */
343
- created: string;
344
- /**
345
- * Type of resource
346
- */
347
- type: 'feature';
348
- /**
349
- * Feature grant data. Required when type is 'feature'.
350
- */
351
- custom_entitlement?: Resource.CustomEntitlement | null;
352
- }
353
- namespace Resource {
354
- /**
355
- * Feature grant data. Required when type is 'feature'.
356
- */
357
- interface CustomEntitlement {
358
- /**
359
- * The feature key that identifies what access is granted (e.g., 'pro_features')
360
- */
361
- id: string;
362
- /**
363
- * Custom metadata for the feature grant
364
- */
365
- metadata?: {
366
- [key: string]: unknown;
367
- };
368
- }
369
- }
370
- }
371
- /**
372
- * A product that customers can purchase. Products can be one-time purchases or
373
- * recurring subscriptions. Attach resources to a product to grant features to
374
- * customers.
375
- */
376
- export interface ProductListResponse {
377
- /**
378
- * Unique identifier for the topic subscription
379
- */
380
- id: string;
381
- /**
382
- * Whether the product is available for new purchases
383
- */
384
- active: boolean;
385
- /**
386
- * Timestamp when the product was created
387
- */
388
- created: string;
389
- /**
390
- * Display name for the product (e.g., Pro, Business, Teams)
391
- */
392
- name: string;
393
- /**
394
- * ID of the subscription group this product belongs to. Subscription groups define
395
- * shared billing configuration. All products must belong to a subscription group.
396
- */
397
- product_group_id: string;
398
- /**
399
- * Price configuration for a product. Can be one-time or recurring (subscription).
400
- */
401
- default_price?: ProductListResponse.DefaultPrice | null;
402
- /**
403
- * Detailed description of what the product includes
404
- */
405
- description?: string | null;
406
- /**
407
- * Media attachments (images, videos) for the product
408
- */
409
- media?: Array<ProductListResponse.Media>;
410
- /**
411
- * Custom metadata for the product
412
- */
413
- metadata?: {
414
- [key: string]: unknown;
415
- };
416
- /**
417
- * Resources attached to this product. Customers get access to these resources when
418
- * they purchase the product.
419
- */
420
- resources?: Array<ProductListResponse.Resource>;
421
- /**
422
- * Tags for categorizing and filtering products
423
- */
424
- tags?: Array<string>;
425
- }
426
- export declare namespace ProductListResponse {
427
- /**
428
- * Price configuration for a product. Can be one-time or recurring (subscription).
429
- */
430
- interface DefaultPrice {
431
- /**
432
- * Unique identifier for the topic subscription
433
- */
434
- id: string;
435
- /**
436
- * Three-letter ISO currency code (e.g., usd, eur)
437
- */
438
- currency: string;
439
- /**
440
- * Billing frequency for recurring prices: day, week, month, or year. Null for
441
- * one-time prices.
442
- */
443
- interval: 'day' | 'week' | 'month' | 'year' | null;
444
- /**
445
- * Number of intervals between billings for recurring prices. Null for one-time
446
- * prices.
447
- */
448
- interval_count: number | null;
449
- /**
450
- * Price type: one_time for single purchases, recurring for subscriptions
451
- */
452
- type: 'one_time' | 'recurring';
453
- /**
454
- * Price amount in the smallest currency unit (e.g., cents)
455
- */
456
- unit_amount: number | null;
457
- }
458
- /**
459
- * Media attachment for products or variants
460
- */
461
- interface Media {
462
- /**
463
- * CDN file ID
464
- */
465
- id: string;
466
- /**
467
- * Display order in gallery (0-indexed)
468
- */
469
- display_order: number;
470
- /**
471
- * Type of media: image or video
472
- */
473
- type: 'image' | 'video';
474
- /**
475
- * CDN URL of the media resource
476
- */
477
- url: string;
478
- /**
479
- * File size in bytes
480
- */
481
- file_size?: number;
482
- /**
483
- * Original filename
484
- */
485
- filename?: string;
486
- /**
487
- * Optimized thumbnail URL for images
488
- */
489
- thumbnail_url?: string;
490
- }
491
- /**
492
- * A resource that can be attached to products to grant access to customers.
493
- * Resources represent monetizable content or features in your app.
494
- */
495
- interface Resource {
496
- /**
497
- * Unique identifier for the topic subscription
498
- */
499
- id: string;
500
- /**
501
- * Whether the resource is active and grants access
502
- */
503
- active: boolean;
504
- /**
505
- * Timestamp when the resource was created
506
- */
507
- created: string;
508
- /**
509
- * Type of resource
510
- */
511
- type: 'feature';
512
- /**
513
- * Feature grant data. Required when type is 'feature'.
514
- */
515
- custom_entitlement?: Resource.CustomEntitlement | null;
516
- }
517
- namespace Resource {
518
- /**
519
- * Feature grant data. Required when type is 'feature'.
520
- */
521
- interface CustomEntitlement {
522
- /**
523
- * The feature key that identifies what access is granted (e.g., 'pro_features')
524
- */
525
- id: string;
526
- /**
527
- * Custom metadata for the feature grant
528
- */
529
- metadata?: {
530
- [key: string]: unknown;
531
- };
532
- }
533
- }
534
- }
535
- /**
536
- * A product that customers can purchase. Products can be one-time purchases or
537
- * recurring subscriptions. Attach resources to a product to grant features to
538
- * customers.
539
- */
540
- export interface ProductArchiveResponse {
541
- /**
542
- * Unique identifier for the topic subscription
543
- */
544
- id: string;
545
- /**
546
- * Whether the product is available for new purchases
547
- */
548
- active: boolean;
549
- /**
550
- * Timestamp when the product was created
551
- */
552
- created: string;
553
- /**
554
- * Display name for the product (e.g., Pro, Business, Teams)
555
- */
556
- name: string;
557
- /**
558
- * ID of the subscription group this product belongs to. Subscription groups define
559
- * shared billing configuration. All products must belong to a subscription group.
560
- */
561
- product_group_id: string;
562
- /**
563
- * Price configuration for a product. Can be one-time or recurring (subscription).
564
- */
565
- default_price?: ProductArchiveResponse.DefaultPrice | null;
566
- /**
567
- * Detailed description of what the product includes
568
- */
569
- description?: string | null;
570
- /**
571
- * Media attachments (images, videos) for the product
572
- */
573
- media?: Array<ProductArchiveResponse.Media>;
574
- /**
575
- * Custom metadata for the product
576
- */
577
- metadata?: {
578
- [key: string]: unknown;
579
- };
580
- /**
581
- * Resources attached to this product. Customers get access to these resources when
582
- * they purchase the product.
583
- */
584
- resources?: Array<ProductArchiveResponse.Resource>;
585
- /**
586
- * Tags for categorizing and filtering products
587
- */
588
- tags?: Array<string>;
589
- }
590
- export declare namespace ProductArchiveResponse {
591
- /**
592
- * Price configuration for a product. Can be one-time or recurring (subscription).
593
- */
594
- interface DefaultPrice {
595
- /**
596
- * Unique identifier for the topic subscription
597
- */
598
- id: string;
599
- /**
600
- * Three-letter ISO currency code (e.g., usd, eur)
601
- */
602
- currency: string;
603
- /**
604
- * Billing frequency for recurring prices: day, week, month, or year. Null for
605
- * one-time prices.
606
- */
607
- interval: 'day' | 'week' | 'month' | 'year' | null;
608
- /**
609
- * Number of intervals between billings for recurring prices. Null for one-time
610
- * prices.
611
- */
612
- interval_count: number | null;
613
- /**
614
- * Price type: one_time for single purchases, recurring for subscriptions
615
- */
616
- type: 'one_time' | 'recurring';
617
- /**
618
- * Price amount in the smallest currency unit (e.g., cents)
619
- */
620
- unit_amount: number | null;
621
- }
622
- /**
623
- * Media attachment for products or variants
624
- */
625
- interface Media {
626
- /**
627
- * CDN file ID
628
- */
629
- id: string;
630
- /**
631
- * Display order in gallery (0-indexed)
632
- */
633
- display_order: number;
634
- /**
635
- * Type of media: image or video
636
- */
637
- type: 'image' | 'video';
638
- /**
639
- * CDN URL of the media resource
640
- */
641
- url: string;
642
- /**
643
- * File size in bytes
644
- */
645
- file_size?: number;
646
- /**
647
- * Original filename
648
- */
649
- filename?: string;
650
- /**
651
- * Optimized thumbnail URL for images
652
- */
653
- thumbnail_url?: string;
654
- }
655
- /**
656
- * A resource that can be attached to products to grant access to customers.
657
- * Resources represent monetizable content or features in your app.
658
- */
659
- interface Resource {
660
- /**
661
- * Unique identifier for the topic subscription
662
- */
663
- id: string;
664
- /**
665
- * Whether the resource is active and grants access
666
- */
667
- active: boolean;
668
- /**
669
- * Timestamp when the resource was created
670
- */
671
- created: string;
672
- /**
673
- * Type of resource
674
- */
675
- type: 'feature';
676
- /**
677
- * Feature grant data. Required when type is 'feature'.
678
- */
679
- custom_entitlement?: Resource.CustomEntitlement | null;
680
- }
681
- namespace Resource {
682
- /**
683
- * Feature grant data. Required when type is 'feature'.
684
- */
685
- interface CustomEntitlement {
686
- /**
687
- * The feature key that identifies what access is granted (e.g., 'pro_features')
688
- */
689
- id: string;
690
- /**
691
- * Custom metadata for the feature grant
692
- */
693
- metadata?: {
694
- [key: string]: unknown;
695
- };
696
- }
697
- }
698
- }
699
- /**
700
- * A product that customers can purchase. Products can be one-time purchases or
701
- * recurring subscriptions. Attach resources to a product to grant features to
702
- * customers.
703
- */
704
- export interface ProductGetResponse {
705
- /**
706
- * Unique identifier for the topic subscription
707
- */
708
- id: string;
709
- /**
710
- * Whether the product is available for new purchases
711
- */
712
- active: boolean;
713
- /**
714
- * Timestamp when the product was created
715
- */
716
- created: string;
717
- /**
718
- * Display name for the product (e.g., Pro, Business, Teams)
719
- */
720
- name: string;
721
- /**
722
- * ID of the subscription group this product belongs to. Subscription groups define
723
- * shared billing configuration. All products must belong to a subscription group.
724
- */
725
- product_group_id: string;
726
- /**
727
- * Price configuration for a product. Can be one-time or recurring (subscription).
728
- */
729
- default_price?: ProductGetResponse.DefaultPrice | null;
730
- /**
731
- * Detailed description of what the product includes
732
- */
733
- description?: string | null;
734
- /**
735
- * Media attachments (images, videos) for the product
736
- */
737
- media?: Array<ProductGetResponse.Media>;
738
- /**
739
- * Custom metadata for the product
740
- */
741
- metadata?: {
742
- [key: string]: unknown;
743
- };
744
- /**
745
- * Resources attached to this product. Customers get access to these resources when
746
- * they purchase the product.
747
- */
748
- resources?: Array<ProductGetResponse.Resource>;
749
- /**
750
- * Tags for categorizing and filtering products
751
- */
752
- tags?: Array<string>;
753
- }
754
- export declare namespace ProductGetResponse {
98
+ export declare namespace Product {
755
99
  /**
756
100
  * Price configuration for a product. Can be one-time or recurring (subscription).
757
101
  */
@@ -893,7 +237,7 @@ export interface ProductCreateParams {
893
237
  * ID of the subscription group this product belongs to. Subscription groups define
894
238
  * shared billing configuration.
895
239
  */
896
- product_group_id?: string;
240
+ subscription_group_id?: string;
897
241
  /**
898
242
  * Tags for categorizing and filtering products
899
243
  */
@@ -1020,7 +364,7 @@ export interface ProductUpdateParams {
1020
364
  * ID of the subscription group to move this product to. All products must belong
1021
365
  * to a subscription group.
1022
366
  */
1023
- product_group_id?: string;
367
+ subscription_group_id?: string;
1024
368
  /**
1025
369
  * Tags for categorizing and filtering products
1026
370
  */
@@ -1052,8 +396,8 @@ export interface ProductListParams extends CursorIDPageParams {
1052
396
  active?: 'true' | 'false';
1053
397
  }
1054
398
  export declare namespace Products {
1055
- export { type ProductCreateResponse as ProductCreateResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductGetResponse as ProductGetResponse, type ProductListResponsesCursorIDPage as ProductListResponsesCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
399
+ export { type Product as Product, type ProductsCursorIDPage as ProductsCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
1056
400
  export { Resources as Resources, type ResourceListResponse as ResourceListResponse, type ResourceAttachResponse as ResourceAttachResponse, type ResourceListResponsesCursorIDPage as ResourceListResponsesCursorIDPage, type ResourceListParams as ResourceListParams, type ResourceAttachParams as ResourceAttachParams, type ResourceRemoveParams as ResourceRemoveParams, };
1057
- export { Variants as Variants, 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, };
401
+ export { Variants as Variants, type VariantsAPIVariant as Variant, type VariantsCursorIDPage as VariantsCursorIDPage, type VariantCreateParams as VariantCreateParams, type VariantUpdateParams as VariantUpdateParams, type VariantListParams as VariantListParams, type VariantArchiveParams as VariantArchiveParams, type VariantGetParams as VariantGetParams, };
1058
402
  }
1059
403
  //# sourceMappingURL=products.d.mts.map