@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.
- package/CHANGELOG.md +68 -0
- package/client.d.mts +12 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -6
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/affiliates/affiliates.d.mts +353 -0
- package/resources/affiliates/affiliates.d.mts.map +1 -0
- package/resources/affiliates/affiliates.d.ts +353 -0
- package/resources/affiliates/affiliates.d.ts.map +1 -0
- package/resources/affiliates/affiliates.js +112 -0
- package/resources/affiliates/affiliates.js.map +1 -0
- package/resources/affiliates/affiliates.mjs +107 -0
- package/resources/affiliates/affiliates.mjs.map +1 -0
- package/resources/affiliates/index.d.mts +3 -0
- package/resources/affiliates/index.d.mts.map +1 -0
- package/resources/affiliates/index.d.ts +3 -0
- package/resources/affiliates/index.d.ts.map +1 -0
- package/resources/affiliates/index.js +9 -0
- package/resources/affiliates/index.js.map +1 -0
- package/resources/affiliates/index.mjs +4 -0
- package/resources/affiliates/index.mjs.map +1 -0
- package/resources/affiliates/overrides.d.mts +451 -0
- package/resources/affiliates/overrides.d.mts.map +1 -0
- package/resources/affiliates/overrides.d.ts +451 -0
- package/resources/affiliates/overrides.d.ts.map +1 -0
- package/resources/affiliates/overrides.js +117 -0
- package/resources/affiliates/overrides.js.map +1 -0
- package/resources/affiliates/overrides.mjs +113 -0
- package/resources/affiliates/overrides.mjs.map +1 -0
- package/resources/affiliates.d.mts +2 -0
- package/resources/affiliates.d.mts.map +1 -0
- package/resources/affiliates.d.ts +2 -0
- package/resources/affiliates.d.ts.map +1 -0
- package/resources/affiliates.js +6 -0
- package/resources/affiliates.js.map +1 -0
- package/resources/affiliates.mjs +3 -0
- package/resources/affiliates.mjs.map +1 -0
- package/resources/ai-chats.d.mts +21 -2
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +21 -2
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +2 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +2 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/apps.d.mts +26 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +26 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +69 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +69 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +19 -0
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +19 -0
- package/resources/companies.d.ts.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +179 -345
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +179 -345
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +20 -2
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +20 -2
- package/resources/invoices.mjs.map +1 -1
- package/resources/memberships.d.mts +1 -1
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +1 -1
- package/resources/memberships.d.ts.map +1 -1
- package/resources/payments.d.mts +21 -2
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +21 -2
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +46 -0
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +46 -0
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +2 -2
- package/resources/products.d.ts +2 -2
- package/resources/refunds.d.mts +1 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/setup-intents.d.mts +74 -0
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +74 -0
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +54 -5
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +54 -5
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +653 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +653 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +50 -1
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/affiliates/affiliates.ts +475 -0
- package/src/resources/affiliates/index.ts +32 -0
- package/src/resources/affiliates/overrides.ts +593 -0
- package/src/resources/affiliates.ts +3 -0
- package/src/resources/ai-chats.ts +25 -1
- package/src/resources/apps.ts +31 -0
- package/src/resources/checkout-configurations.ts +81 -0
- package/src/resources/companies.ts +23 -0
- package/src/resources/index.ts +19 -0
- package/src/resources/invoices.ts +316 -397
- package/src/resources/memberships.ts +1 -1
- package/src/resources/payments.ts +26 -1
- package/src/resources/plans.ts +54 -0
- package/src/resources/products.ts +2 -2
- package/src/resources/refunds.ts +2 -1
- package/src/resources/setup-intents.ts +90 -0
- package/src/resources/shared.ts +65 -5
- package/src/resources/webhooks.ts +818 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
*/
|
package/src/resources/index.ts
CHANGED
|
@@ -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,
|