@whop/sdk 0.0.3 → 0.0.5
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 +64 -0
- package/client.d.mts +14 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -8
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +8 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +58 -0
- package/resources/access-tokens.d.mts.map +1 -0
- package/resources/access-tokens.d.ts +58 -0
- package/resources/access-tokens.d.ts.map +1 -0
- package/resources/access-tokens.js +25 -0
- package/resources/access-tokens.js.map +1 -0
- package/resources/access-tokens.mjs +21 -0
- package/resources/access-tokens.mjs.map +1 -0
- package/resources/app-builds.d.mts +16 -13
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +16 -13
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +1 -1
- package/resources/app-builds.mjs +1 -1
- package/resources/apps.d.mts +15 -10
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +15 -10
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +221 -183
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +221 -183
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +4 -20
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +4 -20
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +157 -0
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +157 -0
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +22 -0
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +22 -0
- package/resources/companies.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +2 -2
- package/resources/course-lesson-interactions.d.ts +2 -2
- package/resources/course-lesson-interactions.js +2 -2
- package/resources/course-lesson-interactions.mjs +2 -2
- package/resources/course-lessons.d.mts +184 -24
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +184 -24
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-students.d.mts +187 -0
- package/resources/course-students.d.mts.map +1 -0
- package/resources/course-students.d.ts +187 -0
- package/resources/course-students.d.ts.map +1 -0
- package/resources/course-students.js +36 -0
- package/resources/course-students.js.map +1 -0
- package/resources/course-students.mjs +32 -0
- package/resources/course-students.mjs.map +1 -0
- package/resources/courses.d.mts +85 -21
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +85 -21
- package/resources/courses.d.ts.map +1 -1
- package/resources/entries.d.mts +2 -2
- package/resources/entries.d.ts +2 -2
- package/resources/experiences.d.mts +15 -10
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +15 -10
- package/resources/experiences.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +29 -19
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +29 -19
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +6 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +539 -167
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +539 -167
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +2 -24
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -24
- package/resources/invoices.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +11 -11
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +11 -11
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +4 -4
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +4 -4
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +29 -19
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +29 -19
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +10 -3
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +10 -3
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +118 -20
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +118 -20
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +20 -15
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +20 -15
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +4 -4
- package/resources/promo-codes.d.ts +4 -4
- package/resources/shared.d.mts +69 -20
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +69 -20
- package/resources/shared.d.ts.map +1 -1
- package/resources/transfers.d.mts +12 -0
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +12 -0
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/src/client.ts +45 -10
- package/src/resources/access-tokens.ts +72 -0
- package/src/resources/app-builds.ts +19 -14
- package/src/resources/apps.ts +16 -11
- package/src/resources/checkout-configurations.ts +245 -199
- package/src/resources/companies.ts +196 -0
- package/src/resources/course-lesson-interactions.ts +2 -2
- package/src/resources/course-lessons.ts +223 -24
- package/src/resources/course-students.ts +238 -0
- package/src/resources/courses.ts +104 -22
- package/src/resources/entries.ts +2 -2
- package/src/resources/experiences.ts +19 -11
- package/src/resources/forum-posts.ts +35 -21
- package/src/resources/index.ts +17 -2
- package/src/resources/invoices.ts +630 -171
- package/src/resources/ledger-accounts.ts +1 -1
- package/src/resources/members.ts +12 -12
- package/src/resources/memberships.ts +5 -5
- package/src/resources/messages.ts +35 -21
- package/src/resources/payments.ts +10 -3
- package/src/resources/plans.ts +130 -20
- package/src/resources/products.ts +24 -16
- package/src/resources/promo-codes.ts +4 -4
- package/src/resources/shared.ts +70 -20
- package/src/resources/transfers.ts +10 -0
- package/src/resources/users.ts +3 -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
package/src/resources/shared.ts
CHANGED
|
@@ -5,12 +5,13 @@ import * as PaymentsAPI from './payments';
|
|
|
5
5
|
import { CursorPage } from '../core/pagination';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The access level a given user (or company) has to
|
|
8
|
+
* The access level a given user (or company) has to a product or company.
|
|
9
9
|
*/
|
|
10
10
|
export type AccessLevel = 'no_access' | 'admin' | 'customer';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* The different types an
|
|
13
|
+
* The different types an product can be. Only use 'regular'. The rest are for
|
|
14
|
+
* internal use
|
|
14
15
|
*/
|
|
15
16
|
export type AccessPassType = 'regular' | 'app' | 'experience_upsell' | 'api_only';
|
|
16
17
|
|
|
@@ -557,6 +558,12 @@ export interface Company {
|
|
|
557
558
|
*/
|
|
558
559
|
member_count: number;
|
|
559
560
|
|
|
561
|
+
/**
|
|
562
|
+
* A key-value store of data for the account, created/updated by the platform that
|
|
563
|
+
* made the account.
|
|
564
|
+
*/
|
|
565
|
+
metadata: { [key: string]: unknown } | null;
|
|
566
|
+
|
|
560
567
|
/**
|
|
561
568
|
* The user who owns this company
|
|
562
569
|
*/
|
|
@@ -964,7 +971,7 @@ export interface Entry {
|
|
|
964
971
|
plan: Entry.Plan | null;
|
|
965
972
|
|
|
966
973
|
/**
|
|
967
|
-
* The
|
|
974
|
+
* The product tied to this entry, if there is one.
|
|
968
975
|
*/
|
|
969
976
|
product: Entry.Product | null;
|
|
970
977
|
|
|
@@ -1011,7 +1018,7 @@ export namespace Entry {
|
|
|
1011
1018
|
}
|
|
1012
1019
|
|
|
1013
1020
|
/**
|
|
1014
|
-
* The
|
|
1021
|
+
* The product tied to this entry, if there is one.
|
|
1015
1022
|
*/
|
|
1016
1023
|
export interface Product {
|
|
1017
1024
|
/**
|
|
@@ -1096,10 +1103,9 @@ export interface Experience {
|
|
|
1096
1103
|
order: string | null;
|
|
1097
1104
|
|
|
1098
1105
|
/**
|
|
1099
|
-
* The
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1102
|
-
* accessPass.
|
|
1106
|
+
* The products that this experience is attached to. This defines which set of
|
|
1107
|
+
* customers have access and can view this experience. If empty, this experience is
|
|
1108
|
+
* only visible to authorized users of the company
|
|
1103
1109
|
*/
|
|
1104
1110
|
products: Array<Experience.Product>;
|
|
1105
1111
|
}
|
|
@@ -1172,7 +1178,7 @@ export namespace Experience {
|
|
|
1172
1178
|
}
|
|
1173
1179
|
|
|
1174
1180
|
/**
|
|
1175
|
-
*
|
|
1181
|
+
* Represents a product on whop. Use products to sell anything on the platform.
|
|
1176
1182
|
*/
|
|
1177
1183
|
export interface Product {
|
|
1178
1184
|
/**
|
|
@@ -1244,7 +1250,7 @@ export namespace Forum {
|
|
|
1244
1250
|
*/
|
|
1245
1251
|
export interface ForumPost {
|
|
1246
1252
|
/**
|
|
1247
|
-
* The unique identifier
|
|
1253
|
+
* The unique identifier of the resource.
|
|
1248
1254
|
*/
|
|
1249
1255
|
id: string;
|
|
1250
1256
|
|
|
@@ -1353,7 +1359,7 @@ export type FriendlyReceiptStatus =
|
|
|
1353
1359
|
| 'canceled';
|
|
1354
1360
|
|
|
1355
1361
|
/**
|
|
1356
|
-
* The different statuses of the global affiliate program for
|
|
1362
|
+
* The different statuses of the global affiliate program for a product.
|
|
1357
1363
|
*/
|
|
1358
1364
|
export type GlobalAffiliateStatus = 'enabled' | 'disabled';
|
|
1359
1365
|
|
|
@@ -1846,7 +1852,7 @@ export type MembershipStatus =
|
|
|
1846
1852
|
*/
|
|
1847
1853
|
export interface Message {
|
|
1848
1854
|
/**
|
|
1849
|
-
* The unique identifier
|
|
1855
|
+
* The unique identifier of the resource.
|
|
1850
1856
|
*/
|
|
1851
1857
|
id: string;
|
|
1852
1858
|
|
|
@@ -2094,6 +2100,12 @@ export interface Payment {
|
|
|
2094
2100
|
*/
|
|
2095
2101
|
membership: Payment.Membership | null;
|
|
2096
2102
|
|
|
2103
|
+
/**
|
|
2104
|
+
* The custom metadata stored on this payment. This will be copied the checkout
|
|
2105
|
+
* configuration for which this payment was made
|
|
2106
|
+
*/
|
|
2107
|
+
metadata: { [key: string]: unknown } | null;
|
|
2108
|
+
|
|
2097
2109
|
/**
|
|
2098
2110
|
* The datetime the payment was paid
|
|
2099
2111
|
*/
|
|
@@ -2110,7 +2122,7 @@ export interface Payment {
|
|
|
2110
2122
|
plan: Payment.Plan | null;
|
|
2111
2123
|
|
|
2112
2124
|
/**
|
|
2113
|
-
* The
|
|
2125
|
+
* The product this payment was made for
|
|
2114
2126
|
*/
|
|
2115
2127
|
product: Payment.Product | null;
|
|
2116
2128
|
|
|
@@ -2281,7 +2293,7 @@ export namespace Payment {
|
|
|
2281
2293
|
}
|
|
2282
2294
|
|
|
2283
2295
|
/**
|
|
2284
|
-
* The
|
|
2296
|
+
* The product this payment was made for
|
|
2285
2297
|
*/
|
|
2286
2298
|
export interface Product {
|
|
2287
2299
|
/**
|
|
@@ -2362,7 +2374,9 @@ export namespace Payment {
|
|
|
2362
2374
|
}
|
|
2363
2375
|
|
|
2364
2376
|
/**
|
|
2365
|
-
*
|
|
2377
|
+
* A plan for an product. Plans define the core parameters that define a checkout
|
|
2378
|
+
* and payment on whop. Use plans to create different ways to price your products
|
|
2379
|
+
* (Eg renewal / one_time)
|
|
2366
2380
|
*/
|
|
2367
2381
|
export interface Plan {
|
|
2368
2382
|
/**
|
|
@@ -2430,13 +2444,18 @@ export interface Plan {
|
|
|
2430
2444
|
*/
|
|
2431
2445
|
member_count: number | null;
|
|
2432
2446
|
|
|
2447
|
+
/**
|
|
2448
|
+
* The explicit payment method configuration for the plan, if any.
|
|
2449
|
+
*/
|
|
2450
|
+
payment_method_configuration: Plan.PaymentMethodConfiguration | null;
|
|
2451
|
+
|
|
2433
2452
|
/**
|
|
2434
2453
|
* Indicates if the plan is a one time payment or recurring.
|
|
2435
2454
|
*/
|
|
2436
2455
|
plan_type: PlanType;
|
|
2437
2456
|
|
|
2438
2457
|
/**
|
|
2439
|
-
* The
|
|
2458
|
+
* The product that this plan belongs to.
|
|
2440
2459
|
*/
|
|
2441
2460
|
product: Plan.Product | null;
|
|
2442
2461
|
|
|
@@ -2553,7 +2572,33 @@ export namespace Plan {
|
|
|
2553
2572
|
}
|
|
2554
2573
|
|
|
2555
2574
|
/**
|
|
2556
|
-
* The
|
|
2575
|
+
* The explicit payment method configuration for the plan, if any.
|
|
2576
|
+
*/
|
|
2577
|
+
export interface PaymentMethodConfiguration {
|
|
2578
|
+
/**
|
|
2579
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
2580
|
+
* applies if the include_platform_defaults is true.
|
|
2581
|
+
*/
|
|
2582
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
2586
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
2587
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
2588
|
+
* defaults with additional methods.
|
|
2589
|
+
*/
|
|
2590
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
2591
|
+
|
|
2592
|
+
/**
|
|
2593
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
2594
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
2595
|
+
* the documentation at docs.whop.com/payments.
|
|
2596
|
+
*/
|
|
2597
|
+
include_platform_defaults: boolean;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* The product that this plan belongs to.
|
|
2557
2602
|
*/
|
|
2558
2603
|
export interface Product {
|
|
2559
2604
|
/**
|
|
@@ -2569,12 +2614,12 @@ export namespace Plan {
|
|
|
2569
2614
|
}
|
|
2570
2615
|
|
|
2571
2616
|
/**
|
|
2572
|
-
* The type of plan that can be attached to
|
|
2617
|
+
* The type of plan that can be attached to a product
|
|
2573
2618
|
*/
|
|
2574
2619
|
export type PlanType = 'renewal' | 'one_time';
|
|
2575
2620
|
|
|
2576
2621
|
/**
|
|
2577
|
-
*
|
|
2622
|
+
* Represents a product on whop. Use products to sell anything on the platform.
|
|
2578
2623
|
*/
|
|
2579
2624
|
export interface Product {
|
|
2580
2625
|
/**
|
|
@@ -2765,7 +2810,7 @@ export namespace Product {
|
|
|
2765
2810
|
}
|
|
2766
2811
|
|
|
2767
2812
|
/**
|
|
2768
|
-
*
|
|
2813
|
+
* Represents a product on whop. Use products to sell anything on the platform.
|
|
2769
2814
|
*/
|
|
2770
2815
|
export interface ProductListItem {
|
|
2771
2816
|
/**
|
|
@@ -3196,6 +3241,11 @@ export interface Transfer {
|
|
|
3196
3241
|
*/
|
|
3197
3242
|
fee_amount: number | null;
|
|
3198
3243
|
|
|
3244
|
+
/**
|
|
3245
|
+
* A hash of metadata attached to the transfer
|
|
3246
|
+
*/
|
|
3247
|
+
metadata: { [key: string]: unknown } | null;
|
|
3248
|
+
|
|
3199
3249
|
/**
|
|
3200
3250
|
* The notes of the credit transaction transfer
|
|
3201
3251
|
*/
|
|
@@ -106,6 +106,11 @@ export interface TransferListResponse {
|
|
|
106
106
|
*/
|
|
107
107
|
fee_amount: number | null;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* A hash of metadata attached to the transfer
|
|
111
|
+
*/
|
|
112
|
+
metadata: { [key: string]: unknown } | null;
|
|
113
|
+
|
|
109
114
|
/**
|
|
110
115
|
* The notes of the credit transaction transfer
|
|
111
116
|
*/
|
|
@@ -145,6 +150,11 @@ export interface TransferCreateParams {
|
|
|
145
150
|
*/
|
|
146
151
|
idempotence_key?: string | null;
|
|
147
152
|
|
|
153
|
+
/**
|
|
154
|
+
* A hash of metadata to attach to the transfer.
|
|
155
|
+
*/
|
|
156
|
+
metadata?: { [key: string]: unknown } | null;
|
|
157
|
+
|
|
148
158
|
/**
|
|
149
159
|
* Notes for the transfer. Maximum of 50 characters.
|
|
150
160
|
*/
|
package/src/resources/users.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.5'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.5";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.5'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|