dodopayments 2.29.0 → 2.30.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 (153) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/bin/cli +12 -5
  3. package/bin/migration-config.json +66 -0
  4. package/client.d.mts +11 -8
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +11 -8
  7. package/client.d.ts.map +1 -1
  8. package/client.js +3 -0
  9. package/client.js.map +1 -1
  10. package/client.mjs +3 -0
  11. package/client.mjs.map +1 -1
  12. package/internal/types.d.mts +6 -6
  13. package/internal/types.d.mts.map +1 -1
  14. package/internal/types.d.ts +6 -6
  15. package/internal/types.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/checkout-sessions.d.mts +34 -0
  18. package/resources/checkout-sessions.d.mts.map +1 -1
  19. package/resources/checkout-sessions.d.ts +34 -0
  20. package/resources/checkout-sessions.d.ts.map +1 -1
  21. package/resources/credit-entitlements/balances.d.mts +1 -1
  22. package/resources/credit-entitlements/balances.d.mts.map +1 -1
  23. package/resources/credit-entitlements/balances.d.ts +1 -1
  24. package/resources/credit-entitlements/balances.d.ts.map +1 -1
  25. package/resources/customers/customers.d.mts +29 -1
  26. package/resources/customers/customers.d.mts.map +1 -1
  27. package/resources/customers/customers.d.ts +29 -1
  28. package/resources/customers/customers.d.ts.map +1 -1
  29. package/resources/customers/customers.js +6 -0
  30. package/resources/customers/customers.js.map +1 -1
  31. package/resources/customers/customers.mjs +6 -0
  32. package/resources/customers/customers.mjs.map +1 -1
  33. package/resources/customers/index.d.mts +1 -1
  34. package/resources/customers/index.d.mts.map +1 -1
  35. package/resources/customers/index.d.ts +1 -1
  36. package/resources/customers/index.d.ts.map +1 -1
  37. package/resources/customers/index.js.map +1 -1
  38. package/resources/customers/index.mjs.map +1 -1
  39. package/resources/entitlements/entitlements.d.mts +228 -0
  40. package/resources/entitlements/entitlements.d.mts.map +1 -0
  41. package/resources/entitlements/entitlements.d.ts +228 -0
  42. package/resources/entitlements/entitlements.d.ts.map +1 -0
  43. package/resources/entitlements/entitlements.js +60 -0
  44. package/resources/entitlements/entitlements.js.map +1 -0
  45. package/resources/entitlements/entitlements.mjs +55 -0
  46. package/resources/entitlements/entitlements.mjs.map +1 -0
  47. package/resources/entitlements/files.d.mts +37 -0
  48. package/resources/entitlements/files.d.mts.map +1 -0
  49. package/resources/entitlements/files.d.ts +37 -0
  50. package/resources/entitlements/files.d.ts.map +1 -0
  51. package/resources/entitlements/files.js +34 -0
  52. package/resources/entitlements/files.js.map +1 -0
  53. package/resources/entitlements/files.mjs +30 -0
  54. package/resources/entitlements/files.mjs.map +1 -0
  55. package/resources/entitlements/grants.d.mts +80 -0
  56. package/resources/entitlements/grants.d.mts.map +1 -0
  57. package/resources/entitlements/grants.d.ts +80 -0
  58. package/resources/entitlements/grants.d.ts.map +1 -0
  59. package/resources/entitlements/grants.js +27 -0
  60. package/resources/entitlements/grants.js.map +1 -0
  61. package/resources/entitlements/grants.mjs +23 -0
  62. package/resources/entitlements/grants.mjs.map +1 -0
  63. package/resources/entitlements/index.d.mts +4 -0
  64. package/resources/entitlements/index.d.mts.map +1 -0
  65. package/resources/entitlements/index.d.ts +4 -0
  66. package/resources/entitlements/index.d.ts.map +1 -0
  67. package/resources/entitlements/index.js +11 -0
  68. package/resources/entitlements/index.js.map +1 -0
  69. package/resources/entitlements/index.mjs +5 -0
  70. package/resources/entitlements/index.mjs.map +1 -0
  71. package/resources/entitlements.d.mts +2 -0
  72. package/resources/entitlements.d.mts.map +1 -0
  73. package/resources/entitlements.d.ts +2 -0
  74. package/resources/entitlements.d.ts.map +1 -0
  75. package/resources/entitlements.js +6 -0
  76. package/resources/entitlements.js.map +1 -0
  77. package/resources/entitlements.mjs +3 -0
  78. package/resources/entitlements.mjs.map +1 -0
  79. package/resources/index.d.mts +5 -4
  80. package/resources/index.d.mts.map +1 -1
  81. package/resources/index.d.ts +5 -4
  82. package/resources/index.d.ts.map +1 -1
  83. package/resources/index.js +3 -1
  84. package/resources/index.js.map +1 -1
  85. package/resources/index.mjs +1 -0
  86. package/resources/index.mjs.map +1 -1
  87. package/resources/license-key-instances.d.mts +4 -0
  88. package/resources/license-key-instances.d.mts.map +1 -1
  89. package/resources/license-key-instances.d.ts +4 -0
  90. package/resources/license-key-instances.d.ts.map +1 -1
  91. package/resources/payments.d.mts +26 -27
  92. package/resources/payments.d.mts.map +1 -1
  93. package/resources/payments.d.ts +26 -27
  94. package/resources/payments.d.ts.map +1 -1
  95. package/resources/products/index.d.mts +1 -1
  96. package/resources/products/index.d.mts.map +1 -1
  97. package/resources/products/index.d.ts +1 -1
  98. package/resources/products/index.d.ts.map +1 -1
  99. package/resources/products/index.js.map +1 -1
  100. package/resources/products/index.mjs.map +1 -1
  101. package/resources/products/products.d.mts +90 -121
  102. package/resources/products/products.d.mts.map +1 -1
  103. package/resources/products/products.d.ts +90 -121
  104. package/resources/products/products.d.ts.map +1 -1
  105. package/resources/products/products.js.map +1 -1
  106. package/resources/products/products.mjs.map +1 -1
  107. package/resources/subscriptions.d.mts +111 -128
  108. package/resources/subscriptions.d.mts.map +1 -1
  109. package/resources/subscriptions.d.ts +111 -128
  110. package/resources/subscriptions.d.ts.map +1 -1
  111. package/resources/webhook-events.d.mts +3 -25
  112. package/resources/webhook-events.d.mts.map +1 -1
  113. package/resources/webhook-events.d.ts +3 -25
  114. package/resources/webhook-events.d.ts.map +1 -1
  115. package/resources/webhook-events.js.map +1 -1
  116. package/resources/webhook-events.mjs.map +1 -1
  117. package/resources/webhooks/index.d.mts +1 -1
  118. package/resources/webhooks/index.d.mts.map +1 -1
  119. package/resources/webhooks/index.d.ts +1 -1
  120. package/resources/webhooks/index.d.ts.map +1 -1
  121. package/resources/webhooks/index.js.map +1 -1
  122. package/resources/webhooks/index.mjs.map +1 -1
  123. package/resources/webhooks/webhooks.d.mts +160 -3
  124. package/resources/webhooks/webhooks.d.mts.map +1 -1
  125. package/resources/webhooks/webhooks.d.ts +160 -3
  126. package/resources/webhooks/webhooks.d.ts.map +1 -1
  127. package/resources/webhooks/webhooks.js.map +1 -1
  128. package/resources/webhooks/webhooks.mjs.map +1 -1
  129. package/src/client.ts +45 -0
  130. package/src/internal/types.ts +6 -8
  131. package/src/resources/checkout-sessions.ts +38 -0
  132. package/src/resources/credit-entitlements/balances.ts +1 -0
  133. package/src/resources/customers/customers.ts +46 -0
  134. package/src/resources/customers/index.ts +1 -0
  135. package/src/resources/entitlements/entitlements.ts +384 -0
  136. package/src/resources/entitlements/files.ts +53 -0
  137. package/src/resources/entitlements/grants.ts +136 -0
  138. package/src/resources/entitlements/index.ts +22 -0
  139. package/src/resources/entitlements.ts +3 -0
  140. package/src/resources/index.ts +21 -0
  141. package/src/resources/license-key-instances.ts +5 -0
  142. package/src/resources/payments.ts +31 -33
  143. package/src/resources/products/index.ts +2 -0
  144. package/src/resources/products/products.ts +97 -189
  145. package/src/resources/subscriptions.ts +143 -151
  146. package/src/resources/webhook-events.ts +3 -47
  147. package/src/resources/webhooks/index.ts +5 -0
  148. package/src/resources/webhooks/webhooks.ts +212 -0
  149. package/src/version.ts +1 -1
  150. package/version.d.mts +1 -1
  151. package/version.d.ts +1 -1
  152. package/version.js +1 -1
  153. package/version.mjs +1 -1
@@ -171,6 +171,13 @@ export interface OneTimeProductCartItem {
171
171
  product_id: string;
172
172
 
173
173
  quantity: number;
174
+
175
+ /**
176
+ * Amount the customer pays if pay_what_you_want is enabled. If disabled then
177
+ * amount will be ignored Represented in the lowest denomination of the currency
178
+ * (e.g., cents for USD). For example, to charge $1.00, pass `100`.
179
+ */
180
+ amount?: number | null;
174
181
  }
175
182
 
176
183
  export interface Payment {
@@ -328,7 +335,7 @@ export interface Payment {
328
335
  /**
329
336
  * List of products purchased in a one-time payment
330
337
  */
331
- product_cart?: Array<OneTimeProductCartItem> | null;
338
+ product_cart?: Array<Payment.ProductCart> | null;
332
339
 
333
340
  /**
334
341
  * Summary of the refund status for this payment. None if no succeeded refunds
@@ -364,6 +371,14 @@ export interface Payment {
364
371
  updated_at?: string | null;
365
372
  }
366
373
 
374
+ export namespace Payment {
375
+ export interface ProductCart {
376
+ product_id: string;
377
+
378
+ quantity: number;
379
+ }
380
+ }
381
+
367
382
  /**
368
383
  * All supported payment method types (from Hyperswitch).
369
384
  *
@@ -569,22 +584,7 @@ export interface PaymentCreateResponse {
569
584
  /**
570
585
  * Optional list of products included in the payment
571
586
  */
572
- product_cart?: Array<PaymentCreateResponse.ProductCart> | null;
573
- }
574
-
575
- export namespace PaymentCreateResponse {
576
- export interface ProductCart {
577
- product_id: string;
578
-
579
- quantity: number;
580
-
581
- /**
582
- * Amount the customer pays if pay_what_you_want is enabled. If disabled then
583
- * amount will be ignored Represented in the lowest denomination of the currency
584
- * (e.g., cents for USD). For example, to charge $1.00, pass `100`.
585
- */
586
- amount?: number | null;
587
- }
587
+ product_cart?: Array<OneTimeProductCartItem> | null;
588
588
  }
589
589
 
590
590
  export interface PaymentListResponse {
@@ -672,7 +672,13 @@ export interface PaymentCreateParams {
672
672
  /**
673
673
  * List of products in the cart. Must contain at least 1 and at most 100 items.
674
674
  */
675
- product_cart: Array<PaymentCreateParams.ProductCart>;
675
+ product_cart: Array<OneTimeProductCartItem>;
676
+
677
+ /**
678
+ * Whether adaptive currency fees should be included in the price (true) or added
679
+ * on top (false). If not specified, defaults to the business-level setting.
680
+ */
681
+ adaptive_currency_fees_inclusive?: boolean | null;
676
682
 
677
683
  /**
678
684
  * List of payment methods allowed during checkout.
@@ -724,6 +730,13 @@ export interface PaymentCreateParams {
724
730
  */
725
731
  redirect_immediately?: boolean;
726
732
 
733
+ /**
734
+ * If true, the customer's phone number is required to create this payment.
735
+ * Typically set alongside `payment_link=true` so merchants can enforce phone
736
+ * collection on the hosted payment page. Defaults to false.
737
+ */
738
+ require_phone_number?: boolean;
739
+
727
740
  /**
728
741
  * Optional URL to redirect the customer after payment. Must be a valid URL if
729
742
  * provided.
@@ -747,21 +760,6 @@ export interface PaymentCreateParams {
747
760
  tax_id?: string | null;
748
761
  }
749
762
 
750
- export namespace PaymentCreateParams {
751
- export interface ProductCart {
752
- product_id: string;
753
-
754
- quantity: number;
755
-
756
- /**
757
- * Amount the customer pays if pay_what_you_want is enabled. If disabled then
758
- * amount will be ignored Represented in the lowest denomination of the currency
759
- * (e.g., cents for USD). For example, to charge $1.00, pass `100`.
760
- */
761
- amount?: number | null;
762
- }
763
- }
764
-
765
763
  export interface PaymentListParams extends DefaultPageNumberPaginationParams {
766
764
  /**
767
765
  * filter by Brand id
@@ -5,6 +5,7 @@ export {
5
5
  Products,
6
6
  type AddMeterToPrice,
7
7
  type AttachCreditEntitlement,
8
+ type AttachProductEntitlement,
8
9
  type CbbProrationBehavior,
9
10
  type CreditEntitlementMappingResponse,
10
11
  type DigitalProductDelivery,
@@ -12,6 +13,7 @@ export {
12
13
  type LicenseKeyDuration,
13
14
  type Price,
14
15
  type Product,
16
+ type ProductEntitlementSummary,
15
17
  type ProductListResponse,
16
18
  type ProductUpdateFilesResponse,
17
19
  type ProductCreateParams,
@@ -5,6 +5,7 @@ import * as ProductsAPI from './products';
5
5
  import * as MiscAPI from '../misc';
6
6
  import * as SubscriptionsAPI from '../subscriptions';
7
7
  import * as CreditEntitlementsAPI from '../credit-entitlements/credit-entitlements';
8
+ import * as EntitlementsAPI from '../entitlements/entitlements';
8
9
  import * as ImagesAPI from './images';
9
10
  import { ImageUpdateParams, ImageUpdateResponse, Images } from './images';
10
11
  import * as ShortLinksAPI from './short-links';
@@ -210,6 +211,20 @@ export interface AttachCreditEntitlement {
210
211
  trial_credits_expire_after_trial?: boolean | null;
211
212
  }
212
213
 
214
+ /**
215
+ * Request struct for attaching an entitlement to a product.
216
+ *
217
+ * Mirrors the `credit_entitlements` attach shape — every "attach something to a
218
+ * product" array takes objects, not bare IDs. Uniform shape leaves room for
219
+ * per-attachment settings later without another API break.
220
+ */
221
+ export interface AttachProductEntitlement {
222
+ /**
223
+ * ID of the entitlement to attach to the product
224
+ */
225
+ entitlement_id: string;
226
+ }
227
+
213
228
  export type CbbProrationBehavior = 'prorate' | 'no_prorate';
214
229
 
215
230
  /**
@@ -317,29 +332,35 @@ export interface CreditEntitlementMappingResponse {
317
332
  trial_credits?: string | null;
318
333
  }
319
334
 
335
+ /**
336
+ * Digital-product-delivery payload for a grant. Populated for grants whose
337
+ * entitlement has `integration_type = 'digital_files'`. `files` carries presigned
338
+ * download URLs; the source (EE service or legacy in-process S3 presigning) is
339
+ * opaque to the caller.
340
+ */
320
341
  export interface DigitalProductDelivery {
321
- /**
322
- * External URL to digital product
323
- */
324
- external_url?: string | null;
342
+ files: Array<DigitalProductDeliveryFile>;
325
343
 
326
- /**
327
- * Uploaded files ids of digital product
328
- */
329
- files?: Array<DigitalProductDeliveryFile> | null;
344
+ external_url?: string | null;
330
345
 
331
- /**
332
- * Instructions to download and use the digital product
333
- */
334
346
  instructions?: string | null;
335
347
  }
336
348
 
337
349
  export interface DigitalProductDeliveryFile {
350
+ download_url: string;
351
+
352
+ /**
353
+ * Seconds until `download_url` expires.
354
+ */
355
+ expires_in: number;
356
+
338
357
  file_id: string;
339
358
 
340
- file_name: string;
359
+ filename: string;
341
360
 
342
- url: string;
361
+ content_type?: string | null;
362
+
363
+ file_size?: number | null;
343
364
  }
344
365
 
345
366
  export interface LicenseKeyDuration {
@@ -545,7 +566,7 @@ export interface Product {
545
566
  /**
546
567
  * Attached entitlements (integration-based access grants)
547
568
  */
548
- entitlements: Array<Product.Entitlement>;
569
+ entitlements: Array<ProductEntitlementSummary>;
549
570
 
550
571
  /**
551
572
  * Indicates if the product is recurring (e.g., subscriptions).
@@ -592,6 +613,12 @@ export interface Product {
592
613
  */
593
614
  description?: string | null;
594
615
 
616
+ /**
617
+ * Digital-product-delivery payload for a grant. Populated for grants whose
618
+ * entitlement has `integration_type = 'digital_files'`. `files` carries presigned
619
+ * download URLs; the source (EE service or legacy in-process S3 presigning) is
620
+ * opaque to the caller.
621
+ */
595
622
  digital_product_delivery?: DigitalProductDelivery | null;
596
623
 
597
624
  /**
@@ -625,92 +652,30 @@ export interface Product {
625
652
  product_collection_id?: string | null;
626
653
  }
627
654
 
628
- export namespace Product {
655
+ /**
656
+ * Summary of an entitlement attached to a product.
657
+ *
658
+ * `integration_config` uses [`IntegrationConfigResponse`] (NOT the persisted
659
+ * [`IntegrationConfig`]) so digital_files entitlements embed the resolved
660
+ * `digital_files` object — matching what `GET /entitlements/{id}` returns. All
661
+ * other variants pass through unchanged via `#[serde(untagged)]`.
662
+ */
663
+ export interface ProductEntitlementSummary {
664
+ id: string;
665
+
629
666
  /**
630
- * Summary of an entitlement attached to a product
667
+ * Public-facing variant of [`IntegrationConfig`]. Mirrors every variant shape on
668
+ * the wire EXCEPT `DigitalFiles`, which is replaced with a hydrated
669
+ * `digital_files` object (resolved download URLs etc.). The persisted JSONB stays
670
+ * ID-only via [`IntegrationConfig`]; this enum is response-only.
631
671
  */
632
- export interface Entitlement {
633
- id: string;
634
-
635
- /**
636
- * Platform-specific configuration for an entitlement. Each variant uses unique
637
- * field names so `#[serde(untagged)]` can disambiguate correctly.
638
- */
639
- integration_config:
640
- | Entitlement.GitHubConfig
641
- | Entitlement.DiscordConfig
642
- | Entitlement.TelegramConfig
643
- | Entitlement.FigmaConfig
644
- | Entitlement.FramerConfig
645
- | Entitlement.NotionConfig
646
- | Entitlement.DigitalFilesConfig
647
- | Entitlement.LicenseKeyConfig;
648
-
649
- integration_type:
650
- | 'discord'
651
- | 'telegram'
652
- | 'github'
653
- | 'figma'
654
- | 'framer'
655
- | 'notion'
656
- | 'digital_files'
657
- | 'license_key';
658
-
659
- name: string;
660
-
661
- description?: string | null;
662
- }
663
-
664
- export namespace Entitlement {
665
- export interface GitHubConfig {
666
- /**
667
- * One of: pull, push, admin, maintain, triage
668
- */
669
- permission: string;
670
-
671
- target_id: string;
672
- }
673
-
674
- export interface DiscordConfig {
675
- guild_id: string;
676
-
677
- role_id?: string | null;
678
- }
679
-
680
- export interface TelegramConfig {
681
- chat_id: string;
682
- }
683
-
684
- export interface FigmaConfig {
685
- figma_file_id: string;
686
- }
687
-
688
- export interface FramerConfig {
689
- framer_template_id: string;
690
- }
691
-
692
- export interface NotionConfig {
693
- notion_template_id: string;
694
- }
695
-
696
- export interface DigitalFilesConfig {
697
- digital_file_ids: Array<string>;
672
+ integration_config: EntitlementsAPI.IntegrationConfigResponse;
698
673
 
699
- external_url?: string | null;
674
+ integration_type: EntitlementsAPI.EntitlementIntegrationType;
700
675
 
701
- instructions?: string | null;
702
- }
703
-
704
- export interface LicenseKeyConfig {
705
- activation_message?: string | null;
706
-
707
- activations_limit?: number | null;
708
-
709
- duration_count?: number | null;
676
+ name: string;
710
677
 
711
- duration_interval?: string | null;
712
- }
713
- }
678
+ description?: string | null;
714
679
  }
715
680
 
716
681
  export interface ProductListResponse {
@@ -727,7 +692,7 @@ export interface ProductListResponse {
727
692
  /**
728
693
  * Entitlements linked to this product
729
694
  */
730
- entitlements: Array<ProductListResponse.Entitlement>;
695
+ entitlements: Array<ProductEntitlementSummary>;
731
696
 
732
697
  /**
733
698
  * Indicates if the product is recurring (e.g., subscriptions).
@@ -799,94 +764,6 @@ export interface ProductListResponse {
799
764
  tax_inclusive?: boolean | null;
800
765
  }
801
766
 
802
- export namespace ProductListResponse {
803
- /**
804
- * Summary of an entitlement attached to a product
805
- */
806
- export interface Entitlement {
807
- id: string;
808
-
809
- /**
810
- * Platform-specific configuration for an entitlement. Each variant uses unique
811
- * field names so `#[serde(untagged)]` can disambiguate correctly.
812
- */
813
- integration_config:
814
- | Entitlement.GitHubConfig
815
- | Entitlement.DiscordConfig
816
- | Entitlement.TelegramConfig
817
- | Entitlement.FigmaConfig
818
- | Entitlement.FramerConfig
819
- | Entitlement.NotionConfig
820
- | Entitlement.DigitalFilesConfig
821
- | Entitlement.LicenseKeyConfig;
822
-
823
- integration_type:
824
- | 'discord'
825
- | 'telegram'
826
- | 'github'
827
- | 'figma'
828
- | 'framer'
829
- | 'notion'
830
- | 'digital_files'
831
- | 'license_key';
832
-
833
- name: string;
834
-
835
- description?: string | null;
836
- }
837
-
838
- export namespace Entitlement {
839
- export interface GitHubConfig {
840
- /**
841
- * One of: pull, push, admin, maintain, triage
842
- */
843
- permission: string;
844
-
845
- target_id: string;
846
- }
847
-
848
- export interface DiscordConfig {
849
- guild_id: string;
850
-
851
- role_id?: string | null;
852
- }
853
-
854
- export interface TelegramConfig {
855
- chat_id: string;
856
- }
857
-
858
- export interface FigmaConfig {
859
- figma_file_id: string;
860
- }
861
-
862
- export interface FramerConfig {
863
- framer_template_id: string;
864
- }
865
-
866
- export interface NotionConfig {
867
- notion_template_id: string;
868
- }
869
-
870
- export interface DigitalFilesConfig {
871
- digital_file_ids: Array<string>;
872
-
873
- external_url?: string | null;
874
-
875
- instructions?: string | null;
876
- }
877
-
878
- export interface LicenseKeyConfig {
879
- activation_message?: string | null;
880
-
881
- activations_limit?: number | null;
882
-
883
- duration_count?: number | null;
884
-
885
- duration_interval?: string | null;
886
- }
887
- }
888
- }
889
-
890
767
  export interface ProductUpdateFilesResponse {
891
768
  file_id: string;
892
769
 
@@ -931,22 +808,30 @@ export interface ProductCreateParams {
931
808
 
932
809
  /**
933
810
  * Choose how you would like you digital product delivered
811
+ *
812
+ * deprecated: use entitlements instead
934
813
  */
935
814
  digital_product_delivery?: ProductCreateParams.DigitalProductDelivery | null;
936
815
 
937
816
  /**
938
- * Optional entitlement IDs to attach to this product (max 20)
817
+ * Optional entitlements to attach to this product (max 20)
939
818
  */
940
- entitlement_ids?: Array<string> | null;
819
+ entitlements?: Array<AttachProductEntitlement> | null;
941
820
 
942
821
  /**
943
822
  * @deprecated Optional message displayed during license key activation
823
+ *
824
+ * deprecated: use entitlements instead. Ignored when a `license_key` entitlement
825
+ * is attached via the `entitlements` field.
944
826
  */
945
827
  license_key_activation_message?: string | null;
946
828
 
947
829
  /**
948
830
  * @deprecated The number of times the license key can be activated. Must be 0 or
949
831
  * greater
832
+ *
833
+ * deprecated: use entitlements instead. Ignored when a `license_key` entitlement
834
+ * is attached via the `entitlements` field.
950
835
  */
951
836
  license_key_activations_limit?: number | null;
952
837
 
@@ -954,12 +839,19 @@ export interface ProductCreateParams {
954
839
  * Duration configuration for the license key. Set to null if you don't want the
955
840
  * license key to expire. For subscriptions, the lifetime of the license key is
956
841
  * tied to the subscription period
842
+ *
843
+ * deprecated: use entitlements instead. Ignored when a `license_key` entitlement
844
+ * is attached via the `entitlements` field.
957
845
  */
958
846
  license_key_duration?: LicenseKeyDuration | null;
959
847
 
960
848
  /**
961
849
  * @deprecated When true, generates and sends a license key to your customer.
962
850
  * Defaults to false
851
+ *
852
+ * deprecated: use entitlements instead. If a `license_key` entitlement is also
853
+ * attached via the `entitlements` field, the `license_key_*` config fields below
854
+ * are ignored — the attached entitlement's config is the source of truth.
963
855
  */
964
856
  license_key_enabled?: boolean | null;
965
857
 
@@ -972,6 +864,8 @@ export interface ProductCreateParams {
972
864
  export namespace ProductCreateParams {
973
865
  /**
974
866
  * Choose how you would like you digital product delivered
867
+ *
868
+ * deprecated: use entitlements instead
975
869
  */
976
870
  export interface DigitalProductDelivery {
977
871
  /**
@@ -1007,14 +901,16 @@ export interface ProductUpdateParams {
1007
901
 
1008
902
  /**
1009
903
  * Choose how you would like you digital product delivered
904
+ *
905
+ * deprecated: use entitlements instead
1010
906
  */
1011
907
  digital_product_delivery?: ProductUpdateParams.DigitalProductDelivery | null;
1012
908
 
1013
909
  /**
1014
- * Entitlement IDs to attach (replaces all existing when present) Send empty array
1015
- * to remove all, omit field to leave unchanged
910
+ * Entitlements to attach (replaces all existing when present) Send empty array to
911
+ * remove all, omit field to leave unchanged
1016
912
  */
1017
- entitlement_ids?: Array<string> | null;
913
+ entitlements?: Array<AttachProductEntitlement> | null;
1018
914
 
1019
915
  /**
1020
916
  * Product image id after its uploaded to S3
@@ -1026,6 +922,8 @@ export interface ProductUpdateParams {
1026
922
  *
1027
923
  * Only applicable if `license_key_enabled` is `true`. This message contains
1028
924
  * instructions for activating the license key.
925
+ *
926
+ * deprecated: use entitlements instead
1029
927
  */
1030
928
  license_key_activation_message?: string | null;
1031
929
 
@@ -1034,6 +932,8 @@ export interface ProductUpdateParams {
1034
932
  *
1035
933
  * Only applicable if `license_key_enabled` is `true`. Represents the maximum
1036
934
  * number of times the license key can be activated.
935
+ *
936
+ * deprecated: use entitlements instead
1037
937
  */
1038
938
  license_key_activations_limit?: number | null;
1039
939
 
@@ -1042,6 +942,8 @@ export interface ProductUpdateParams {
1042
942
  *
1043
943
  * Only applicable if `license_key_enabled` is `true`. Represents the duration in
1044
944
  * days for which the license key is valid.
945
+ *
946
+ * deprecated: use entitlements instead
1045
947
  */
1046
948
  license_key_duration?: LicenseKeyDuration | null;
1047
949
 
@@ -1050,6 +952,8 @@ export interface ProductUpdateParams {
1050
952
  *
1051
953
  * If `true`, additional fields related to license key (duration, activations
1052
954
  * limit, activation message) become applicable.
955
+ *
956
+ * deprecated: use entitlements instead
1053
957
  */
1054
958
  license_key_enabled?: boolean | null;
1055
959
 
@@ -1077,6 +981,8 @@ export interface ProductUpdateParams {
1077
981
  export namespace ProductUpdateParams {
1078
982
  /**
1079
983
  * Choose how you would like you digital product delivered
984
+ *
985
+ * deprecated: use entitlements instead
1080
986
  */
1081
987
  export interface DigitalProductDelivery {
1082
988
  /**
@@ -1128,6 +1034,7 @@ export declare namespace Products {
1128
1034
  export {
1129
1035
  type AddMeterToPrice as AddMeterToPrice,
1130
1036
  type AttachCreditEntitlement as AttachCreditEntitlement,
1037
+ type AttachProductEntitlement as AttachProductEntitlement,
1131
1038
  type CbbProrationBehavior as CbbProrationBehavior,
1132
1039
  type CreditEntitlementMappingResponse as CreditEntitlementMappingResponse,
1133
1040
  type DigitalProductDelivery as DigitalProductDelivery,
@@ -1135,6 +1042,7 @@ export declare namespace Products {
1135
1042
  type LicenseKeyDuration as LicenseKeyDuration,
1136
1043
  type Price as Price,
1137
1044
  type Product as Product,
1045
+ type ProductEntitlementSummary as ProductEntitlementSummary,
1138
1046
  type ProductListResponse as ProductListResponse,
1139
1047
  type ProductUpdateFilesResponse as ProductUpdateFilesResponse,
1140
1048
  type ProductListResponsesDefaultPageNumberPagination as ProductListResponsesDefaultPageNumberPagination,