@whop/sdk 0.0.35 → 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 +51 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -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 +20 -12
- package/resources/affiliates/affiliates.d.mts.map +1 -1
- package/resources/affiliates/affiliates.d.ts +20 -12
- package/resources/affiliates/affiliates.d.ts.map +1 -1
- package/resources/affiliates/affiliates.js.map +1 -1
- package/resources/affiliates/affiliates.mjs.map +1 -1
- package/resources/affiliates/overrides.d.mts +16 -8
- package/resources/affiliates/overrides.d.mts.map +1 -1
- package/resources/affiliates/overrides.d.ts +16 -8
- package/resources/affiliates/overrides.d.ts.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 +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- 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/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 +20 -1
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/affiliates/affiliates.ts +20 -12
- package/src/resources/affiliates/overrides.ts +16 -8
- 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 +7 -0
- package/src/resources/invoices.ts +316 -397
- package/src/resources/memberships.ts +1 -1
- package/src/resources/payments.ts +25 -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/shared.ts +64 -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
|
@@ -289,7 +289,7 @@ export interface MembershipListResponse {
|
|
|
289
289
|
* Custom key-value pairs for the membership (commonly used for software licensing,
|
|
290
290
|
* e.g., HWID). Max 50 keys, 500 chars per key, 5000 chars per value.
|
|
291
291
|
*/
|
|
292
|
-
metadata: { [key: string]: unknown };
|
|
292
|
+
metadata: { [key: string]: unknown } | null;
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
295
|
* Whether recurring payment collection for this membership is temporarily paused
|
|
@@ -275,6 +275,7 @@ export type CardBrands =
|
|
|
275
275
|
| 'cabal'
|
|
276
276
|
| 'hipercard'
|
|
277
277
|
| 'jcblankapay'
|
|
278
|
+
| 'cmi'
|
|
278
279
|
| 'unknown';
|
|
279
280
|
|
|
280
281
|
/**
|
|
@@ -301,7 +302,6 @@ export type PaymentMethodTypes =
|
|
|
301
302
|
| 'cashapp'
|
|
302
303
|
| 'claritypay'
|
|
303
304
|
| 'coinbase'
|
|
304
|
-
| 'coinflow'
|
|
305
305
|
| 'crypto'
|
|
306
306
|
| 'custom'
|
|
307
307
|
| 'customer_balance'
|
|
@@ -371,6 +371,7 @@ export type PaymentMethodTypes =
|
|
|
371
371
|
| 'vipps'
|
|
372
372
|
| 'wechat_pay'
|
|
373
373
|
| 'zip'
|
|
374
|
+
| 'coinflow'
|
|
374
375
|
| 'unknown';
|
|
375
376
|
|
|
376
377
|
/**
|
|
@@ -567,6 +568,11 @@ export interface PaymentListResponse {
|
|
|
567
568
|
*/
|
|
568
569
|
total: number | null;
|
|
569
570
|
|
|
571
|
+
/**
|
|
572
|
+
* The datetime the payment was last updated.
|
|
573
|
+
*/
|
|
574
|
+
updated_at: string;
|
|
575
|
+
|
|
570
576
|
/**
|
|
571
577
|
* The total in USD to show to the creator (excluding buyer fees).
|
|
572
578
|
*/
|
|
@@ -959,6 +965,14 @@ export declare namespace PaymentCreateParams {
|
|
|
959
965
|
*/
|
|
960
966
|
currency: Shared.Currency;
|
|
961
967
|
|
|
968
|
+
/**
|
|
969
|
+
* The application fee amount collected by the platform from this connected
|
|
970
|
+
* account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
|
|
971
|
+
* than the total payment amount. Only valid for connected accounts with a parent
|
|
972
|
+
* company.
|
|
973
|
+
*/
|
|
974
|
+
application_fee_amount?: number | null;
|
|
975
|
+
|
|
962
976
|
/**
|
|
963
977
|
* The interval in days at which the plan charges (renewal plans). For example, 30
|
|
964
978
|
* for monthly billing.
|
|
@@ -1215,6 +1229,16 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
1215
1229
|
* Filter payments by their current substatus for more granular filtering.
|
|
1216
1230
|
*/
|
|
1217
1231
|
substatuses?: Array<Shared.FriendlyReceiptStatus> | null;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Only return payments last updated after this timestamp.
|
|
1235
|
+
*/
|
|
1236
|
+
updated_after?: string | null;
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* Only return payments last updated before this timestamp.
|
|
1240
|
+
*/
|
|
1241
|
+
updated_before?: string | null;
|
|
1218
1242
|
}
|
|
1219
1243
|
|
|
1220
1244
|
export interface PaymentListFeesParams extends CursorPageParams {
|
package/src/resources/plans.ts
CHANGED
|
@@ -369,6 +369,12 @@ export interface PlanCreateParams {
|
|
|
369
369
|
*/
|
|
370
370
|
billing_period?: number | null;
|
|
371
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Checkout styling overrides for this plan. Pass null to inherit from the company
|
|
374
|
+
* default.
|
|
375
|
+
*/
|
|
376
|
+
checkout_styling?: PlanCreateParams.CheckoutStyling | null;
|
|
377
|
+
|
|
372
378
|
/**
|
|
373
379
|
* The available currencies on the platform
|
|
374
380
|
*/
|
|
@@ -474,6 +480,27 @@ export interface PlanCreateParams {
|
|
|
474
480
|
}
|
|
475
481
|
|
|
476
482
|
export namespace PlanCreateParams {
|
|
483
|
+
/**
|
|
484
|
+
* Checkout styling overrides for this plan. Pass null to inherit from the company
|
|
485
|
+
* default.
|
|
486
|
+
*/
|
|
487
|
+
export interface CheckoutStyling {
|
|
488
|
+
/**
|
|
489
|
+
* The different border-radius styles available for checkout pages.
|
|
490
|
+
*/
|
|
491
|
+
border_style?: 'rounded' | 'pill' | 'rectangular' | null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* A hex color code for the button color (e.g. #FF5733).
|
|
495
|
+
*/
|
|
496
|
+
button_color?: string | null;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The different font families available for checkout pages.
|
|
500
|
+
*/
|
|
501
|
+
font_family?: 'system' | 'roboto' | 'open_sans' | null;
|
|
502
|
+
}
|
|
503
|
+
|
|
477
504
|
export interface CustomField {
|
|
478
505
|
/**
|
|
479
506
|
* The type of the custom field.
|
|
@@ -551,6 +578,12 @@ export interface PlanUpdateParams {
|
|
|
551
578
|
*/
|
|
552
579
|
billing_period?: number | null;
|
|
553
580
|
|
|
581
|
+
/**
|
|
582
|
+
* Checkout styling overrides for this plan. Pass null to remove all overrides and
|
|
583
|
+
* inherit from the company default.
|
|
584
|
+
*/
|
|
585
|
+
checkout_styling?: PlanUpdateParams.CheckoutStyling | null;
|
|
586
|
+
|
|
554
587
|
/**
|
|
555
588
|
* The available currencies on the platform
|
|
556
589
|
*/
|
|
@@ -656,6 +689,27 @@ export interface PlanUpdateParams {
|
|
|
656
689
|
}
|
|
657
690
|
|
|
658
691
|
export namespace PlanUpdateParams {
|
|
692
|
+
/**
|
|
693
|
+
* Checkout styling overrides for this plan. Pass null to remove all overrides and
|
|
694
|
+
* inherit from the company default.
|
|
695
|
+
*/
|
|
696
|
+
export interface CheckoutStyling {
|
|
697
|
+
/**
|
|
698
|
+
* The different border-radius styles available for checkout pages.
|
|
699
|
+
*/
|
|
700
|
+
border_style?: 'rounded' | 'pill' | 'rectangular' | null;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* A hex color code for the button color (e.g. #FF5733).
|
|
704
|
+
*/
|
|
705
|
+
button_color?: string | null;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* The different font families available for checkout pages.
|
|
709
|
+
*/
|
|
710
|
+
font_family?: 'system' | 'roboto' | 'open_sans' | null;
|
|
711
|
+
}
|
|
712
|
+
|
|
659
713
|
export interface CustomField {
|
|
660
714
|
/**
|
|
661
715
|
* The type of the custom field.
|
|
@@ -130,7 +130,7 @@ export interface ProductCreateParams {
|
|
|
130
130
|
company_id: string;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* The display name of the product. Maximum
|
|
133
|
+
* The display name of the product. Maximum 80 characters.
|
|
134
134
|
*/
|
|
135
135
|
title: string;
|
|
136
136
|
|
|
@@ -397,7 +397,7 @@ export interface ProductUpdateParams {
|
|
|
397
397
|
store_page_config?: ProductUpdateParams.StorePageConfig | null;
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
|
-
* The display name of the product. Maximum
|
|
400
|
+
* The display name of the product. Maximum 80 characters.
|
|
401
401
|
*/
|
|
402
402
|
title?: string | null;
|
|
403
403
|
|
package/src/resources/refunds.ts
CHANGED
package/src/resources/shared.ts
CHANGED
|
@@ -104,6 +104,19 @@ export interface App {
|
|
|
104
104
|
*/
|
|
105
105
|
name: string;
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* The URL path template for a specific view of this app, appended to the base
|
|
109
|
+
* domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
|
|
110
|
+
* not configured.
|
|
111
|
+
*/
|
|
112
|
+
openapi_path: string | null;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The full origin URL for this app's proxied domain (e.g.,
|
|
116
|
+
* 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.
|
|
117
|
+
*/
|
|
118
|
+
origin: string | null;
|
|
119
|
+
|
|
107
120
|
/**
|
|
108
121
|
* The whitelisted OAuth callback URLs that users are redirected to after
|
|
109
122
|
* authorizing the app.
|
|
@@ -116,6 +129,13 @@ export interface App {
|
|
|
116
129
|
*/
|
|
117
130
|
requested_permissions: Array<App.RequestedPermission>;
|
|
118
131
|
|
|
132
|
+
/**
|
|
133
|
+
* The URL path template for a specific view of this app, appended to the base
|
|
134
|
+
* domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
|
|
135
|
+
* not configured.
|
|
136
|
+
*/
|
|
137
|
+
skills_path: string | null;
|
|
138
|
+
|
|
119
139
|
/**
|
|
120
140
|
* Aggregate usage statistics for this app, including daily, weekly, and monthly
|
|
121
141
|
* active user counts.
|
|
@@ -345,7 +365,7 @@ export type AppStatuses = 'live' | 'unlisted' | 'hidden';
|
|
|
345
365
|
/**
|
|
346
366
|
* The different types of an app view
|
|
347
367
|
*/
|
|
348
|
-
export type AppViewType = 'hub' | 'discover' | 'dash' | 'dashboard' | 'analytics';
|
|
368
|
+
export type AppViewType = 'hub' | 'discover' | 'dash' | 'dashboard' | 'analytics' | 'skills' | 'openapi';
|
|
349
369
|
|
|
350
370
|
/**
|
|
351
371
|
* Possible roles an authorized user can have
|
|
@@ -596,6 +616,12 @@ export interface Company {
|
|
|
596
616
|
*/
|
|
597
617
|
id: string;
|
|
598
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Guidelines and instructions provided to affiliates explaining how to promote
|
|
621
|
+
* this company's products.
|
|
622
|
+
*/
|
|
623
|
+
affiliate_instructions: string | null;
|
|
624
|
+
|
|
599
625
|
/**
|
|
600
626
|
* The datetime the company was created.
|
|
601
627
|
*/
|
|
@@ -607,6 +633,12 @@ export interface Company {
|
|
|
607
633
|
*/
|
|
608
634
|
description: string | null;
|
|
609
635
|
|
|
636
|
+
/**
|
|
637
|
+
* The product featured for affiliates to promote on this company's affiliate page.
|
|
638
|
+
* Null if none is configured.
|
|
639
|
+
*/
|
|
640
|
+
featured_affiliate_product: Company.FeaturedAffiliateProduct | null;
|
|
641
|
+
|
|
610
642
|
/**
|
|
611
643
|
* The company's logo.
|
|
612
644
|
*/
|
|
@@ -652,6 +684,11 @@ export interface Company {
|
|
|
652
684
|
*/
|
|
653
685
|
social_links: Array<Company.SocialLink>;
|
|
654
686
|
|
|
687
|
+
/**
|
|
688
|
+
* The target audience for the company. Null if not set.
|
|
689
|
+
*/
|
|
690
|
+
target_audience: string | null;
|
|
691
|
+
|
|
655
692
|
/**
|
|
656
693
|
* The display name of the company shown to customers.
|
|
657
694
|
*/
|
|
@@ -669,6 +706,22 @@ export interface Company {
|
|
|
669
706
|
}
|
|
670
707
|
|
|
671
708
|
export namespace Company {
|
|
709
|
+
/**
|
|
710
|
+
* The product featured for affiliates to promote on this company's affiliate page.
|
|
711
|
+
* Null if none is configured.
|
|
712
|
+
*/
|
|
713
|
+
export interface FeaturedAffiliateProduct {
|
|
714
|
+
/**
|
|
715
|
+
* The unique identifier for the product.
|
|
716
|
+
*/
|
|
717
|
+
id: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* The display name of the product shown to customers. Maximum 50 characters.
|
|
721
|
+
*/
|
|
722
|
+
name: string;
|
|
723
|
+
}
|
|
724
|
+
|
|
672
725
|
/**
|
|
673
726
|
* The company's logo.
|
|
674
727
|
*/
|
|
@@ -1753,7 +1806,7 @@ export namespace InvoiceListItem {
|
|
|
1753
1806
|
/**
|
|
1754
1807
|
* The different statuses an invoice can be in
|
|
1755
1808
|
*/
|
|
1756
|
-
export type InvoiceStatus = 'draft' | 'open' | 'paid' | 'past_due' | 'void';
|
|
1809
|
+
export type InvoiceStatus = 'draft' | 'open' | 'paid' | 'past_due' | 'uncollectible' | 'void';
|
|
1757
1810
|
|
|
1758
1811
|
/**
|
|
1759
1812
|
* The different most recent actions a member can have.
|
|
@@ -1862,7 +1915,7 @@ export interface Membership {
|
|
|
1862
1915
|
* Custom key-value pairs for the membership (commonly used for software licensing,
|
|
1863
1916
|
* e.g., HWID). Max 50 keys, 500 chars per key, 5000 chars per value.
|
|
1864
1917
|
*/
|
|
1865
|
-
metadata: { [key: string]: unknown };
|
|
1918
|
+
metadata: { [key: string]: unknown } | null;
|
|
1866
1919
|
|
|
1867
1920
|
/**
|
|
1868
1921
|
* Whether recurring payment collection for this membership is temporarily paused
|
|
@@ -2452,6 +2505,11 @@ export interface Payment {
|
|
|
2452
2505
|
*/
|
|
2453
2506
|
total: number | null;
|
|
2454
2507
|
|
|
2508
|
+
/**
|
|
2509
|
+
* The datetime the payment was last updated.
|
|
2510
|
+
*/
|
|
2511
|
+
updated_at: string;
|
|
2512
|
+
|
|
2455
2513
|
/**
|
|
2456
2514
|
* The total in USD to show to the creator (excluding buyer fees).
|
|
2457
2515
|
*/
|
|
@@ -2647,7 +2705,8 @@ export namespace Payment {
|
|
|
2647
2705
|
| 'won'
|
|
2648
2706
|
| 'rejected'
|
|
2649
2707
|
| 'lost'
|
|
2650
|
-
| 'prevented'
|
|
2708
|
+
| 'prevented'
|
|
2709
|
+
| 'canceled';
|
|
2651
2710
|
|
|
2652
2711
|
/**
|
|
2653
2712
|
* The type of the payment transaction.
|
|
@@ -2657,7 +2716,7 @@ export namespace Payment {
|
|
|
2657
2716
|
| 'authorize'
|
|
2658
2717
|
| 'capture'
|
|
2659
2718
|
| 'refund'
|
|
2660
|
-
| '
|
|
2719
|
+
| 'canceled'
|
|
2661
2720
|
| 'verify'
|
|
2662
2721
|
| 'chargeback'
|
|
2663
2722
|
| 'pre_chargeback'
|