@whop/sdk 0.0.25 → 0.0.27
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 +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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
|
@@ -150,7 +150,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
150
150
|
*/
|
|
151
151
|
export interface Plan {
|
|
152
152
|
/**
|
|
153
|
-
* The interval at which the plan charges (renewal plans).
|
|
153
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
154
154
|
*/
|
|
155
155
|
billing_period?: number | null;
|
|
156
156
|
|
|
@@ -165,14 +165,15 @@ export declare namespace InvoiceCreateParams {
|
|
|
165
165
|
description?: string | null;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
* The
|
|
168
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
169
|
+
* plans). For example, 365 for a one-year access period.
|
|
169
170
|
*/
|
|
170
171
|
expiration_days?: number | null;
|
|
171
172
|
|
|
172
173
|
/**
|
|
173
174
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
174
175
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
175
|
-
* as a number in
|
|
176
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
176
177
|
*/
|
|
177
178
|
initial_price?: number | null;
|
|
178
179
|
|
|
@@ -193,7 +194,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
193
194
|
|
|
194
195
|
/**
|
|
195
196
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
196
|
-
* payment. Provided as a number in
|
|
197
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
197
198
|
*/
|
|
198
199
|
renewal_price?: number | null;
|
|
199
200
|
|
|
@@ -208,7 +209,8 @@ export declare namespace InvoiceCreateParams {
|
|
|
208
209
|
trial_period_days?: number | null;
|
|
209
210
|
|
|
210
211
|
/**
|
|
211
|
-
*
|
|
212
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
213
|
+
* purchases are limited by the stock field.
|
|
212
214
|
*/
|
|
213
215
|
unlimited_stock?: boolean | null;
|
|
214
216
|
|
|
@@ -334,7 +336,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
334
336
|
*/
|
|
335
337
|
export interface Plan {
|
|
336
338
|
/**
|
|
337
|
-
* The interval at which the plan charges (renewal plans).
|
|
339
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
338
340
|
*/
|
|
339
341
|
billing_period?: number | null;
|
|
340
342
|
|
|
@@ -349,14 +351,15 @@ export declare namespace InvoiceCreateParams {
|
|
|
349
351
|
description?: string | null;
|
|
350
352
|
|
|
351
353
|
/**
|
|
352
|
-
* The
|
|
354
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
355
|
+
* plans). For example, 365 for a one-year access period.
|
|
353
356
|
*/
|
|
354
357
|
expiration_days?: number | null;
|
|
355
358
|
|
|
356
359
|
/**
|
|
357
360
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
358
361
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
359
|
-
* as a number in
|
|
362
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
360
363
|
*/
|
|
361
364
|
initial_price?: number | null;
|
|
362
365
|
|
|
@@ -377,7 +380,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
377
380
|
|
|
378
381
|
/**
|
|
379
382
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
380
|
-
* payment. Provided as a number in
|
|
383
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
381
384
|
*/
|
|
382
385
|
renewal_price?: number | null;
|
|
383
386
|
|
|
@@ -392,7 +395,8 @@ export declare namespace InvoiceCreateParams {
|
|
|
392
395
|
trial_period_days?: number | null;
|
|
393
396
|
|
|
394
397
|
/**
|
|
395
|
-
*
|
|
398
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
399
|
+
* purchases are limited by the stock field.
|
|
396
400
|
*/
|
|
397
401
|
unlimited_stock?: boolean | null;
|
|
398
402
|
|
|
@@ -519,7 +523,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
519
523
|
*/
|
|
520
524
|
export interface Plan {
|
|
521
525
|
/**
|
|
522
|
-
* The interval at which the plan charges (renewal plans).
|
|
526
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
523
527
|
*/
|
|
524
528
|
billing_period?: number | null;
|
|
525
529
|
|
|
@@ -534,14 +538,15 @@ export declare namespace InvoiceCreateParams {
|
|
|
534
538
|
description?: string | null;
|
|
535
539
|
|
|
536
540
|
/**
|
|
537
|
-
* The
|
|
541
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
542
|
+
* plans). For example, 365 for a one-year access period.
|
|
538
543
|
*/
|
|
539
544
|
expiration_days?: number | null;
|
|
540
545
|
|
|
541
546
|
/**
|
|
542
547
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
543
548
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
544
|
-
* as a number in
|
|
549
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
545
550
|
*/
|
|
546
551
|
initial_price?: number | null;
|
|
547
552
|
|
|
@@ -562,7 +567,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
562
567
|
|
|
563
568
|
/**
|
|
564
569
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
565
|
-
* payment. Provided as a number in
|
|
570
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
566
571
|
*/
|
|
567
572
|
renewal_price?: number | null;
|
|
568
573
|
|
|
@@ -577,7 +582,8 @@ export declare namespace InvoiceCreateParams {
|
|
|
577
582
|
trial_period_days?: number | null;
|
|
578
583
|
|
|
579
584
|
/**
|
|
580
|
-
*
|
|
585
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
586
|
+
* purchases are limited by the stock field.
|
|
581
587
|
*/
|
|
582
588
|
unlimited_stock?: boolean | null;
|
|
583
589
|
|
|
@@ -687,7 +693,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
687
693
|
*/
|
|
688
694
|
export interface Plan {
|
|
689
695
|
/**
|
|
690
|
-
* The interval at which the plan charges (renewal plans).
|
|
696
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
691
697
|
*/
|
|
692
698
|
billing_period?: number | null;
|
|
693
699
|
|
|
@@ -702,14 +708,15 @@ export declare namespace InvoiceCreateParams {
|
|
|
702
708
|
description?: string | null;
|
|
703
709
|
|
|
704
710
|
/**
|
|
705
|
-
* The
|
|
711
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
712
|
+
* plans). For example, 365 for a one-year access period.
|
|
706
713
|
*/
|
|
707
714
|
expiration_days?: number | null;
|
|
708
715
|
|
|
709
716
|
/**
|
|
710
717
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
711
718
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
712
|
-
* as a number in
|
|
719
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
713
720
|
*/
|
|
714
721
|
initial_price?: number | null;
|
|
715
722
|
|
|
@@ -730,7 +737,7 @@ export declare namespace InvoiceCreateParams {
|
|
|
730
737
|
|
|
731
738
|
/**
|
|
732
739
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
733
|
-
* payment. Provided as a number in
|
|
740
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
734
741
|
*/
|
|
735
742
|
renewal_price?: number | null;
|
|
736
743
|
|
|
@@ -745,7 +752,8 @@ export declare namespace InvoiceCreateParams {
|
|
|
745
752
|
trial_period_days?: number | null;
|
|
746
753
|
|
|
747
754
|
/**
|
|
748
|
-
*
|
|
755
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
756
|
+
* purchases are limited by the stock field.
|
|
749
757
|
*/
|
|
750
758
|
unlimited_stock?: boolean | null;
|
|
751
759
|
|
package/src/resources/leads.ts
CHANGED
|
@@ -24,7 +24,7 @@ export class Leads extends APIResource {
|
|
|
24
24
|
* });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
create(body: LeadCreateParams, options?: RequestOptions): APIPromise<
|
|
27
|
+
create(body: LeadCreateParams, options?: RequestOptions): APIPromise<Lead> {
|
|
28
28
|
return this._client.post('/leads', { body, ...options });
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -45,7 +45,7 @@ export class Leads extends APIResource {
|
|
|
45
45
|
* );
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
48
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Lead> {
|
|
49
49
|
return this._client.get(path`/leads/${id}`, options);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -70,7 +70,7 @@ export class Leads extends APIResource {
|
|
|
70
70
|
id: string,
|
|
71
71
|
body: LeadUpdateParams | null | undefined = {},
|
|
72
72
|
options?: RequestOptions,
|
|
73
|
-
): APIPromise<
|
|
73
|
+
): APIPromise<Lead> {
|
|
74
74
|
return this._client.patch(path`/leads/${id}`, { body, ...options });
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -107,21 +107,21 @@ export type LeadListResponsesCursorPage = CursorPage<LeadListResponse>;
|
|
|
107
107
|
/**
|
|
108
108
|
* An object representing a lead (someone who is interested in a whop).
|
|
109
109
|
*/
|
|
110
|
-
export interface
|
|
110
|
+
export interface Lead {
|
|
111
111
|
/**
|
|
112
|
-
* The
|
|
112
|
+
* The unique identifier for the lead.
|
|
113
113
|
*/
|
|
114
114
|
id: string;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
* The
|
|
117
|
+
* The datetime the lead was created.
|
|
118
118
|
*/
|
|
119
119
|
created_at: string;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* The converted member, if any.
|
|
123
123
|
*/
|
|
124
|
-
member:
|
|
124
|
+
member: Lead.Member | null;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Custom metadata for the lead.
|
|
@@ -131,7 +131,7 @@ export interface LeadCreateResponse {
|
|
|
131
131
|
/**
|
|
132
132
|
* The access pass the lead is interested in, if available.
|
|
133
133
|
*/
|
|
134
|
-
product:
|
|
134
|
+
product: Lead.Product | null;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* The referrer URL that brought this lead.
|
|
@@ -139,23 +139,23 @@ export interface LeadCreateResponse {
|
|
|
139
139
|
referrer: string | null;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* The
|
|
142
|
+
* The datetime the lead was last updated.
|
|
143
143
|
*/
|
|
144
144
|
updated_at: string;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* The user who is the lead.
|
|
148
148
|
*/
|
|
149
|
-
user:
|
|
149
|
+
user: Lead.User;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
export namespace
|
|
152
|
+
export namespace Lead {
|
|
153
153
|
/**
|
|
154
154
|
* The converted member, if any.
|
|
155
155
|
*/
|
|
156
156
|
export interface Member {
|
|
157
157
|
/**
|
|
158
|
-
* The
|
|
158
|
+
* The unique identifier for the company member.
|
|
159
159
|
*/
|
|
160
160
|
id: string;
|
|
161
161
|
}
|
|
@@ -165,7 +165,7 @@ export namespace LeadCreateResponse {
|
|
|
165
165
|
*/
|
|
166
166
|
export interface Product {
|
|
167
167
|
/**
|
|
168
|
-
* The
|
|
168
|
+
* The unique identifier for the product.
|
|
169
169
|
*/
|
|
170
170
|
id: string;
|
|
171
171
|
|
|
@@ -180,201 +180,7 @@ export namespace LeadCreateResponse {
|
|
|
180
180
|
*/
|
|
181
181
|
export interface User {
|
|
182
182
|
/**
|
|
183
|
-
* The
|
|
184
|
-
*/
|
|
185
|
-
id: string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* The email of the user
|
|
189
|
-
*/
|
|
190
|
-
email: string | null;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* The name of the user from their Whop account.
|
|
194
|
-
*/
|
|
195
|
-
name: string | null;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* The username of the user from their Whop account.
|
|
199
|
-
*/
|
|
200
|
-
username: string;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* An object representing a lead (someone who is interested in a whop).
|
|
206
|
-
*/
|
|
207
|
-
export interface LeadRetrieveResponse {
|
|
208
|
-
/**
|
|
209
|
-
* The ID of the lead.
|
|
210
|
-
*/
|
|
211
|
-
id: string;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* The timestamp of when the lead was created.
|
|
215
|
-
*/
|
|
216
|
-
created_at: string;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* The converted member, if any.
|
|
220
|
-
*/
|
|
221
|
-
member: LeadRetrieveResponse.Member | null;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Custom metadata for the lead.
|
|
225
|
-
*/
|
|
226
|
-
metadata: { [key: string]: unknown } | null;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* The access pass the lead is interested in, if available.
|
|
230
|
-
*/
|
|
231
|
-
product: LeadRetrieveResponse.Product | null;
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* The referrer URL that brought this lead.
|
|
235
|
-
*/
|
|
236
|
-
referrer: string | null;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* The timestamp of when the lead was last updated.
|
|
240
|
-
*/
|
|
241
|
-
updated_at: string;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* The user who is the lead.
|
|
245
|
-
*/
|
|
246
|
-
user: LeadRetrieveResponse.User;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export namespace LeadRetrieveResponse {
|
|
250
|
-
/**
|
|
251
|
-
* The converted member, if any.
|
|
252
|
-
*/
|
|
253
|
-
export interface Member {
|
|
254
|
-
/**
|
|
255
|
-
* The ID of the member
|
|
256
|
-
*/
|
|
257
|
-
id: string;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* The access pass the lead is interested in, if available.
|
|
262
|
-
*/
|
|
263
|
-
export interface Product {
|
|
264
|
-
/**
|
|
265
|
-
* The internal ID of the public product.
|
|
266
|
-
*/
|
|
267
|
-
id: string;
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* The title of the product. Use for Whop 4.0.
|
|
271
|
-
*/
|
|
272
|
-
title: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* The user who is the lead.
|
|
277
|
-
*/
|
|
278
|
-
export interface User {
|
|
279
|
-
/**
|
|
280
|
-
* The internal ID of the user.
|
|
281
|
-
*/
|
|
282
|
-
id: string;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* The email of the user
|
|
286
|
-
*/
|
|
287
|
-
email: string | null;
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* The name of the user from their Whop account.
|
|
291
|
-
*/
|
|
292
|
-
name: string | null;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* The username of the user from their Whop account.
|
|
296
|
-
*/
|
|
297
|
-
username: string;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* An object representing a lead (someone who is interested in a whop).
|
|
303
|
-
*/
|
|
304
|
-
export interface LeadUpdateResponse {
|
|
305
|
-
/**
|
|
306
|
-
* The ID of the lead.
|
|
307
|
-
*/
|
|
308
|
-
id: string;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* The timestamp of when the lead was created.
|
|
312
|
-
*/
|
|
313
|
-
created_at: string;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* The converted member, if any.
|
|
317
|
-
*/
|
|
318
|
-
member: LeadUpdateResponse.Member | null;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Custom metadata for the lead.
|
|
322
|
-
*/
|
|
323
|
-
metadata: { [key: string]: unknown } | null;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* The access pass the lead is interested in, if available.
|
|
327
|
-
*/
|
|
328
|
-
product: LeadUpdateResponse.Product | null;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* The referrer URL that brought this lead.
|
|
332
|
-
*/
|
|
333
|
-
referrer: string | null;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* The timestamp of when the lead was last updated.
|
|
337
|
-
*/
|
|
338
|
-
updated_at: string;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* The user who is the lead.
|
|
342
|
-
*/
|
|
343
|
-
user: LeadUpdateResponse.User;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export namespace LeadUpdateResponse {
|
|
347
|
-
/**
|
|
348
|
-
* The converted member, if any.
|
|
349
|
-
*/
|
|
350
|
-
export interface Member {
|
|
351
|
-
/**
|
|
352
|
-
* The ID of the member
|
|
353
|
-
*/
|
|
354
|
-
id: string;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* The access pass the lead is interested in, if available.
|
|
359
|
-
*/
|
|
360
|
-
export interface Product {
|
|
361
|
-
/**
|
|
362
|
-
* The internal ID of the public product.
|
|
363
|
-
*/
|
|
364
|
-
id: string;
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* The title of the product. Use for Whop 4.0.
|
|
368
|
-
*/
|
|
369
|
-
title: string;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* The user who is the lead.
|
|
374
|
-
*/
|
|
375
|
-
export interface User {
|
|
376
|
-
/**
|
|
377
|
-
* The internal ID of the user.
|
|
183
|
+
* The unique identifier for the user.
|
|
378
184
|
*/
|
|
379
185
|
id: string;
|
|
380
186
|
|
|
@@ -400,12 +206,12 @@ export namespace LeadUpdateResponse {
|
|
|
400
206
|
*/
|
|
401
207
|
export interface LeadListResponse {
|
|
402
208
|
/**
|
|
403
|
-
* The
|
|
209
|
+
* The unique identifier for the lead.
|
|
404
210
|
*/
|
|
405
211
|
id: string;
|
|
406
212
|
|
|
407
213
|
/**
|
|
408
|
-
* The
|
|
214
|
+
* The datetime the lead was created.
|
|
409
215
|
*/
|
|
410
216
|
created_at: string;
|
|
411
217
|
|
|
@@ -430,7 +236,7 @@ export interface LeadListResponse {
|
|
|
430
236
|
referrer: string | null;
|
|
431
237
|
|
|
432
238
|
/**
|
|
433
|
-
* The
|
|
239
|
+
* The datetime the lead was last updated.
|
|
434
240
|
*/
|
|
435
241
|
updated_at: string;
|
|
436
242
|
|
|
@@ -446,7 +252,7 @@ export namespace LeadListResponse {
|
|
|
446
252
|
*/
|
|
447
253
|
export interface Member {
|
|
448
254
|
/**
|
|
449
|
-
* The
|
|
255
|
+
* The unique identifier for the company member.
|
|
450
256
|
*/
|
|
451
257
|
id: string;
|
|
452
258
|
}
|
|
@@ -456,7 +262,7 @@ export namespace LeadListResponse {
|
|
|
456
262
|
*/
|
|
457
263
|
export interface Product {
|
|
458
264
|
/**
|
|
459
|
-
* The
|
|
265
|
+
* The unique identifier for the product.
|
|
460
266
|
*/
|
|
461
267
|
id: string;
|
|
462
268
|
|
|
@@ -471,7 +277,7 @@ export namespace LeadListResponse {
|
|
|
471
277
|
*/
|
|
472
278
|
export interface User {
|
|
473
279
|
/**
|
|
474
|
-
* The
|
|
280
|
+
* The unique identifier for the user.
|
|
475
281
|
*/
|
|
476
282
|
id: string;
|
|
477
283
|
|
|
@@ -571,9 +377,7 @@ export interface LeadListParams extends CursorPageParams {
|
|
|
571
377
|
|
|
572
378
|
export declare namespace Leads {
|
|
573
379
|
export {
|
|
574
|
-
type
|
|
575
|
-
type LeadRetrieveResponse as LeadRetrieveResponse,
|
|
576
|
-
type LeadUpdateResponse as LeadUpdateResponse,
|
|
380
|
+
type Lead as Lead,
|
|
577
381
|
type LeadListResponse as LeadListResponse,
|
|
578
382
|
type LeadListResponsesCursorPage as LeadListResponsesCursorPage,
|
|
579
383
|
type LeadCreateParams as LeadCreateParams,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as Shared from './shared';
|
|
5
|
+
import * as VerificationsAPI from './verifications';
|
|
5
6
|
import { APIPromise } from '../core/api-promise';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
@@ -25,7 +26,7 @@ export class LedgerAccounts extends APIResource {
|
|
|
25
26
|
*/
|
|
26
27
|
export interface LedgerAccountRetrieveResponse {
|
|
27
28
|
/**
|
|
28
|
-
* The
|
|
29
|
+
* The unique identifier for the ledger account.
|
|
29
30
|
*/
|
|
30
31
|
id: string;
|
|
31
32
|
|
|
@@ -87,11 +88,12 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
|
-
*
|
|
91
|
+
* A user account on Whop. Contains profile information, identity details, and
|
|
92
|
+
* social connections.
|
|
91
93
|
*/
|
|
92
94
|
export interface User {
|
|
93
95
|
/**
|
|
94
|
-
* The
|
|
96
|
+
* The unique identifier for the user.
|
|
95
97
|
*/
|
|
96
98
|
id: string;
|
|
97
99
|
|
|
@@ -112,11 +114,12 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
/**
|
|
115
|
-
*
|
|
117
|
+
* A company is a seller on Whop. Companies own products, manage members, and
|
|
118
|
+
* receive payouts.
|
|
116
119
|
*/
|
|
117
120
|
export interface Company {
|
|
118
121
|
/**
|
|
119
|
-
* The
|
|
122
|
+
* The unique identifier for the company.
|
|
120
123
|
*/
|
|
121
124
|
id: string;
|
|
122
125
|
|
|
@@ -141,7 +144,7 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
141
144
|
*/
|
|
142
145
|
export interface PayoutAccountDetails {
|
|
143
146
|
/**
|
|
144
|
-
*
|
|
147
|
+
* The unique identifier for the payout account.
|
|
145
148
|
*/
|
|
146
149
|
id: string;
|
|
147
150
|
|
|
@@ -243,34 +246,14 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
243
246
|
*/
|
|
244
247
|
export interface LatestVerification {
|
|
245
248
|
/**
|
|
246
|
-
*
|
|
249
|
+
* The unique identifier for the verification.
|
|
247
250
|
*/
|
|
248
251
|
id: string;
|
|
249
252
|
|
|
250
253
|
/**
|
|
251
254
|
* An error code for a verification attempt.
|
|
252
255
|
*/
|
|
253
|
-
last_error_code:
|
|
254
|
-
| 'abandoned'
|
|
255
|
-
| 'consent_declined'
|
|
256
|
-
| 'country_not_supported'
|
|
257
|
-
| 'device_not_supported'
|
|
258
|
-
| 'document_expired'
|
|
259
|
-
| 'document_type_not_supported'
|
|
260
|
-
| 'document_unverified_other'
|
|
261
|
-
| 'email_unverified_other'
|
|
262
|
-
| 'email_verification_declined'
|
|
263
|
-
| 'id_number_insufficient_document_data'
|
|
264
|
-
| 'id_number_mismatch'
|
|
265
|
-
| 'id_number_unverified_other'
|
|
266
|
-
| 'phone_unverified_other'
|
|
267
|
-
| 'phone_verification_declined'
|
|
268
|
-
| 'selfie_document_missing_photo'
|
|
269
|
-
| 'selfie_face_mismatch'
|
|
270
|
-
| 'selfie_manipulated'
|
|
271
|
-
| 'selfie_unverified_other'
|
|
272
|
-
| 'under_supported_age'
|
|
273
|
-
| null;
|
|
256
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
274
257
|
|
|
275
258
|
/**
|
|
276
259
|
* The last error reason that occurred during the verification.
|
|
@@ -280,20 +263,7 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
280
263
|
/**
|
|
281
264
|
* The status of the verification.
|
|
282
265
|
*/
|
|
283
|
-
status:
|
|
284
|
-
| 'requires_input'
|
|
285
|
-
| 'processing'
|
|
286
|
-
| 'verified'
|
|
287
|
-
| 'canceled'
|
|
288
|
-
| 'created'
|
|
289
|
-
| 'started'
|
|
290
|
-
| 'submitted'
|
|
291
|
-
| 'approved'
|
|
292
|
-
| 'declined'
|
|
293
|
-
| 'resubmission_requested'
|
|
294
|
-
| 'expired'
|
|
295
|
-
| 'abandoned'
|
|
296
|
-
| 'review';
|
|
266
|
+
status: VerificationsAPI.VerificationStatus;
|
|
297
267
|
}
|
|
298
268
|
}
|
|
299
269
|
}
|