@whop/sdk 0.0.34 → 0.0.36

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 (139) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -1
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/affiliates/affiliates.d.mts +353 -0
  16. package/resources/affiliates/affiliates.d.mts.map +1 -0
  17. package/resources/affiliates/affiliates.d.ts +353 -0
  18. package/resources/affiliates/affiliates.d.ts.map +1 -0
  19. package/resources/affiliates/affiliates.js +112 -0
  20. package/resources/affiliates/affiliates.js.map +1 -0
  21. package/resources/affiliates/affiliates.mjs +107 -0
  22. package/resources/affiliates/affiliates.mjs.map +1 -0
  23. package/resources/affiliates/index.d.mts +3 -0
  24. package/resources/affiliates/index.d.mts.map +1 -0
  25. package/resources/affiliates/index.d.ts +3 -0
  26. package/resources/affiliates/index.d.ts.map +1 -0
  27. package/resources/affiliates/index.js +9 -0
  28. package/resources/affiliates/index.js.map +1 -0
  29. package/resources/affiliates/index.mjs +4 -0
  30. package/resources/affiliates/index.mjs.map +1 -0
  31. package/resources/affiliates/overrides.d.mts +451 -0
  32. package/resources/affiliates/overrides.d.mts.map +1 -0
  33. package/resources/affiliates/overrides.d.ts +451 -0
  34. package/resources/affiliates/overrides.d.ts.map +1 -0
  35. package/resources/affiliates/overrides.js +117 -0
  36. package/resources/affiliates/overrides.js.map +1 -0
  37. package/resources/affiliates/overrides.mjs +113 -0
  38. package/resources/affiliates/overrides.mjs.map +1 -0
  39. package/resources/affiliates.d.mts +2 -0
  40. package/resources/affiliates.d.mts.map +1 -0
  41. package/resources/affiliates.d.ts +2 -0
  42. package/resources/affiliates.d.ts.map +1 -0
  43. package/resources/affiliates.js +6 -0
  44. package/resources/affiliates.js.map +1 -0
  45. package/resources/affiliates.mjs +3 -0
  46. package/resources/affiliates.mjs.map +1 -0
  47. package/resources/ai-chats.d.mts +21 -2
  48. package/resources/ai-chats.d.mts.map +1 -1
  49. package/resources/ai-chats.d.ts +21 -2
  50. package/resources/ai-chats.d.ts.map +1 -1
  51. package/resources/ai-chats.js +2 -1
  52. package/resources/ai-chats.js.map +1 -1
  53. package/resources/ai-chats.mjs +2 -1
  54. package/resources/ai-chats.mjs.map +1 -1
  55. package/resources/apps.d.mts +26 -0
  56. package/resources/apps.d.mts.map +1 -1
  57. package/resources/apps.d.ts +26 -0
  58. package/resources/apps.d.ts.map +1 -1
  59. package/resources/checkout-configurations.d.mts +69 -0
  60. package/resources/checkout-configurations.d.mts.map +1 -1
  61. package/resources/checkout-configurations.d.ts +69 -0
  62. package/resources/checkout-configurations.d.ts.map +1 -1
  63. package/resources/companies.d.mts +19 -0
  64. package/resources/companies.d.mts.map +1 -1
  65. package/resources/companies.d.ts +19 -0
  66. package/resources/companies.d.ts.map +1 -1
  67. package/resources/index.d.mts +4 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +4 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +4 -2
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +1 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/invoices.d.mts +179 -345
  76. package/resources/invoices.d.mts.map +1 -1
  77. package/resources/invoices.d.ts +179 -345
  78. package/resources/invoices.d.ts.map +1 -1
  79. package/resources/invoices.js +20 -2
  80. package/resources/invoices.js.map +1 -1
  81. package/resources/invoices.mjs +20 -2
  82. package/resources/invoices.mjs.map +1 -1
  83. package/resources/memberships.d.mts +1 -1
  84. package/resources/memberships.d.mts.map +1 -1
  85. package/resources/memberships.d.ts +1 -1
  86. package/resources/memberships.d.ts.map +1 -1
  87. package/resources/payments.d.mts +21 -2
  88. package/resources/payments.d.mts.map +1 -1
  89. package/resources/payments.d.ts +21 -2
  90. package/resources/payments.d.ts.map +1 -1
  91. package/resources/plans.d.mts +46 -0
  92. package/resources/plans.d.mts.map +1 -1
  93. package/resources/plans.d.ts +46 -0
  94. package/resources/plans.d.ts.map +1 -1
  95. package/resources/products.d.mts +2 -2
  96. package/resources/products.d.ts +2 -2
  97. package/resources/refunds.d.mts +1 -1
  98. package/resources/refunds.d.mts.map +1 -1
  99. package/resources/refunds.d.ts +1 -1
  100. package/resources/refunds.d.ts.map +1 -1
  101. package/resources/setup-intents.d.mts +74 -0
  102. package/resources/setup-intents.d.mts.map +1 -1
  103. package/resources/setup-intents.d.ts +74 -0
  104. package/resources/setup-intents.d.ts.map +1 -1
  105. package/resources/shared.d.mts +54 -5
  106. package/resources/shared.d.mts.map +1 -1
  107. package/resources/shared.d.ts +54 -5
  108. package/resources/shared.d.ts.map +1 -1
  109. package/resources/webhooks.d.mts +653 -3
  110. package/resources/webhooks.d.mts.map +1 -1
  111. package/resources/webhooks.d.ts +653 -3
  112. package/resources/webhooks.d.ts.map +1 -1
  113. package/resources/webhooks.js.map +1 -1
  114. package/resources/webhooks.mjs.map +1 -1
  115. package/src/client.ts +50 -1
  116. package/src/internal/utils/env.ts +2 -2
  117. package/src/resources/affiliates/affiliates.ts +475 -0
  118. package/src/resources/affiliates/index.ts +32 -0
  119. package/src/resources/affiliates/overrides.ts +593 -0
  120. package/src/resources/affiliates.ts +3 -0
  121. package/src/resources/ai-chats.ts +25 -1
  122. package/src/resources/apps.ts +31 -0
  123. package/src/resources/checkout-configurations.ts +81 -0
  124. package/src/resources/companies.ts +23 -0
  125. package/src/resources/index.ts +19 -0
  126. package/src/resources/invoices.ts +316 -397
  127. package/src/resources/memberships.ts +1 -1
  128. package/src/resources/payments.ts +26 -1
  129. package/src/resources/plans.ts +54 -0
  130. package/src/resources/products.ts +2 -2
  131. package/src/resources/refunds.ts +2 -1
  132. package/src/resources/setup-intents.ts +90 -0
  133. package/src/resources/shared.ts +65 -5
  134. package/src/resources/webhooks.ts +818 -0
  135. package/src/version.ts +1 -1
  136. package/version.d.mts +1 -1
  137. package/version.d.ts +1 -1
  138. package/version.js +1 -1
  139. package/version.mjs +1 -1
@@ -249,6 +249,12 @@ export declare namespace CheckoutConfigurationCreateParams {
249
249
  */
250
250
  affiliate_code?: string | null;
251
251
 
252
+ /**
253
+ * Checkout styling overrides for this session. Overrides plan and company
254
+ * defaults.
255
+ */
256
+ checkout_styling?: CreateCheckoutSessionInputModePaymentWithPlan.CheckoutStyling | null;
257
+
252
258
  /**
253
259
  * The available currencies on the platform
254
260
  */
@@ -551,6 +557,27 @@ export declare namespace CheckoutConfigurationCreateParams {
551
557
  }
552
558
  }
553
559
 
560
+ /**
561
+ * Checkout styling overrides for this session. Overrides plan and company
562
+ * defaults.
563
+ */
564
+ export interface CheckoutStyling {
565
+ /**
566
+ * The different border-radius styles available for checkout pages.
567
+ */
568
+ border_style?: 'rounded' | 'pill' | 'rectangular' | null;
569
+
570
+ /**
571
+ * A hex color code for the button color (e.g. #FF5733).
572
+ */
573
+ button_color?: string | null;
574
+
575
+ /**
576
+ * The different font families available for checkout pages.
577
+ */
578
+ font_family?: 'system' | 'roboto' | 'open_sans' | null;
579
+ }
580
+
554
581
  /**
555
582
  * The explicit payment method configuration for the checkout session. Only applies
556
583
  * to setup mode. If not provided, the platform or company defaults will apply.
@@ -591,6 +618,12 @@ export declare namespace CheckoutConfigurationCreateParams {
591
618
  */
592
619
  affiliate_code?: string | null;
593
620
 
621
+ /**
622
+ * Checkout styling overrides for this session. Overrides plan and company
623
+ * defaults.
624
+ */
625
+ checkout_styling?: CreateCheckoutSessionInputModePaymentWithPlanID.CheckoutStyling | null;
626
+
594
627
  /**
595
628
  * The available currencies on the platform
596
629
  */
@@ -621,6 +654,27 @@ export declare namespace CheckoutConfigurationCreateParams {
621
654
  }
622
655
 
623
656
  export namespace CreateCheckoutSessionInputModePaymentWithPlanID {
657
+ /**
658
+ * Checkout styling overrides for this session. Overrides plan and company
659
+ * defaults.
660
+ */
661
+ export interface CheckoutStyling {
662
+ /**
663
+ * The different border-radius styles available for checkout pages.
664
+ */
665
+ border_style?: 'rounded' | 'pill' | 'rectangular' | null;
666
+
667
+ /**
668
+ * A hex color code for the button color (e.g. #FF5733).
669
+ */
670
+ button_color?: string | null;
671
+
672
+ /**
673
+ * The different font families available for checkout pages.
674
+ */
675
+ font_family?: 'system' | 'roboto' | 'open_sans' | null;
676
+ }
677
+
624
678
  /**
625
679
  * The explicit payment method configuration for the checkout session. Only applies
626
680
  * to setup mode. If not provided, the platform or company defaults will apply.
@@ -658,6 +712,12 @@ export declare namespace CheckoutConfigurationCreateParams {
658
712
 
659
713
  mode: 'setup';
660
714
 
715
+ /**
716
+ * Checkout styling overrides for this session. Overrides plan and company
717
+ * defaults.
718
+ */
719
+ checkout_styling?: CreateCheckoutSessionInputModeSetup.CheckoutStyling | null;
720
+
661
721
  /**
662
722
  * The available currencies on the platform
663
723
  */
@@ -686,6 +746,27 @@ export declare namespace CheckoutConfigurationCreateParams {
686
746
  }
687
747
 
688
748
  export namespace CreateCheckoutSessionInputModeSetup {
749
+ /**
750
+ * Checkout styling overrides for this session. Overrides plan and company
751
+ * defaults.
752
+ */
753
+ export interface CheckoutStyling {
754
+ /**
755
+ * The different border-radius styles available for checkout pages.
756
+ */
757
+ border_style?: 'rounded' | 'pill' | 'rectangular' | null;
758
+
759
+ /**
760
+ * A hex color code for the button color (e.g. #FF5733).
761
+ */
762
+ button_color?: string | null;
763
+
764
+ /**
765
+ * The different font families available for checkout pages.
766
+ */
767
+ font_family?: 'system' | 'roboto' | 'open_sans' | null;
768
+ }
769
+
689
770
  /**
690
771
  * The explicit payment method configuration for the checkout session. Only applies
691
772
  * to setup mode. If not provided, the platform or company defaults will apply.
@@ -145,6 +145,11 @@ export interface CompanyListResponse {
145
145
  */
146
146
  send_customer_emails: boolean;
147
147
 
148
+ /**
149
+ * The target audience for the company. Null if not set.
150
+ */
151
+ target_audience: string | null;
152
+
148
153
  /**
149
154
  * The display name of the company shown to customers.
150
155
  */
@@ -249,6 +254,18 @@ export namespace CompanyCreateParams {
249
254
  }
250
255
 
251
256
  export interface CompanyUpdateParams {
257
+ /**
258
+ * Whether prospective affiliates must submit an application before they can
259
+ * promote this company.
260
+ */
261
+ affiliate_application_required?: boolean | null;
262
+
263
+ /**
264
+ * Guidelines and instructions shown to affiliates explaining how to promote this
265
+ * company's products.
266
+ */
267
+ affiliate_instructions?: string | null;
268
+
252
269
  /**
253
270
  * The company's banner image. Accepts PNG or JPEG format.
254
271
  */
@@ -260,6 +277,12 @@ export interface CompanyUpdateParams {
260
277
  */
261
278
  description?: string | null;
262
279
 
280
+ /**
281
+ * The ID of the product to feature on this company's affiliate page. Pass null to
282
+ * clear.
283
+ */
284
+ featured_affiliate_product_id?: string | null;
285
+
263
286
  /**
264
287
  * The company's logo image. Accepts PNG, JPEG, or GIF format.
265
288
  */
@@ -4,6 +4,7 @@ export * from './shared';
4
4
  export {
5
5
  AIChats,
6
6
  type AIChat,
7
+ type NotificationPreferences,
7
8
  type AIChatListResponse,
8
9
  type AIChatDeleteResponse,
9
10
  type AIChatCreateParams,
@@ -13,6 +14,17 @@ export {
13
14
  } from './ai-chats';
14
15
  export { AccessTokens, type AccessTokenCreateResponse, type AccessTokenCreateParams } from './access-tokens';
15
16
  export { AccountLinks, type AccountLinkCreateResponse, type AccountLinkCreateParams } from './account-links';
17
+ export {
18
+ Affiliates,
19
+ type Affiliate,
20
+ type Status,
21
+ type AffiliateListResponse,
22
+ type AffiliateArchiveResponse,
23
+ type AffiliateUnarchiveResponse,
24
+ type AffiliateCreateParams,
25
+ type AffiliateListParams,
26
+ type AffiliateListResponsesCursorPage,
27
+ } from './affiliates/affiliates';
16
28
  export {
17
29
  AppBuilds,
18
30
  type AppBuildListResponse,
@@ -216,6 +228,9 @@ export {
216
228
  } from './forums';
217
229
  export {
218
230
  Invoices,
231
+ type TaxIdentifierType,
232
+ type InvoiceMarkPaidResponse,
233
+ type InvoiceMarkUncollectibleResponse,
219
234
  type InvoiceVoidResponse,
220
235
  type InvoiceCreateParams,
221
236
  type InvoiceListParams,
@@ -423,6 +438,7 @@ export {
423
438
  type WebhookListResponse,
424
439
  type WebhookDeleteResponse,
425
440
  type InvoiceCreatedWebhookEvent,
441
+ type InvoiceMarkedUncollectibleWebhookEvent,
426
442
  type InvoicePaidWebhookEvent,
427
443
  type InvoicePastDueWebhookEvent,
428
444
  type InvoiceVoidedWebhookEvent,
@@ -441,6 +457,9 @@ export {
441
457
  type PayoutMethodCreatedWebhookEvent,
442
458
  type VerificationSucceededWebhookEvent,
443
459
  type PayoutAccountStatusUpdatedWebhookEvent,
460
+ type ResolutionCenterCaseCreatedWebhookEvent,
461
+ type ResolutionCenterCaseUpdatedWebhookEvent,
462
+ type ResolutionCenterCaseDecidedWebhookEvent,
444
463
  type PaymentCreatedWebhookEvent,
445
464
  type PaymentSucceededWebhookEvent,
446
465
  type PaymentFailedWebhookEvent,