@whop/sdk 0.0.24 → 0.0.26
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/README.md +2 -2
- package/client.d.mts +30 -18
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -18
- package/client.d.ts.map +1 -1
- package/client.js +15 -2
- package/client.js.map +1 -1
- package/client.mjs +17 -4
- 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 +1 -1
- package/resources/ai-chats.d.mts +169 -0
- package/resources/ai-chats.d.mts.map +1 -0
- package/resources/ai-chats.d.ts +169 -0
- package/resources/ai-chats.d.ts.map +1 -0
- package/resources/ai-chats.js +53 -0
- package/resources/ai-chats.js.map +1 -0
- package/resources/ai-chats.mjs +49 -0
- package/resources/ai-chats.mjs.map +1 -0
- package/resources/apps.d.mts +1 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +1 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +39 -5
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +39 -5
- 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/checkout-configurations.d.mts +12 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +12 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/company-token-transactions.d.mts +339 -0
- package/resources/company-token-transactions.d.mts.map +1 -0
- package/resources/company-token-transactions.d.ts +339 -0
- package/resources/company-token-transactions.d.ts.map +1 -0
- package/resources/company-token-transactions.js +59 -0
- package/resources/company-token-transactions.js.map +1 -0
- package/resources/company-token-transactions.mjs +55 -0
- package/resources/company-token-transactions.mjs.map +1 -0
- 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 +190 -0
- package/resources/dm-members.d.mts.map +1 -0
- package/resources/dm-members.d.ts +190 -0
- package/resources/dm-members.d.ts.map +1 -0
- package/resources/dm-members.js +94 -0
- package/resources/dm-members.js.map +1 -0
- package/resources/dm-members.mjs +90 -0
- package/resources/dm-members.mjs.map +1 -0
- package/resources/files.d.mts +7 -3
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +7 -3
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +13 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +13 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/leads.d.mts +9 -177
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +9 -177
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +3 -2
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +3 -2
- 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 +13 -5
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +13 -5
- 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 +32 -2
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +32 -2
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +18 -0
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +18 -0
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +17 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +17 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +10 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +10 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/payments.d.mts +42 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +42 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +26 -3
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +26 -3
- 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/reactions.d.mts +24 -1
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +24 -1
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +11 -0
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +11 -0
- package/resources/reactions.mjs.map +1 -1
- 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 +73 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +73 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/verifications.d.mts +11 -3
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +11 -3
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +43 -293
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +43 -293
- 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 +21 -128
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +21 -128
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +133 -18
- package/src/internal/parse.ts +6 -0
- package/src/resources/ai-chats.ts +227 -0
- package/src/resources/apps.ts +6 -0
- package/src/resources/authorized-users.ts +45 -5
- package/src/resources/checkout-configurations.ts +15 -0
- package/src/resources/company-token-transactions.ts +433 -0
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +248 -0
- package/src/resources/files.ts +8 -2
- package/src/resources/index.ts +64 -9
- package/src/resources/leads.ts +9 -205
- package/src/resources/ledger-accounts.ts +3 -35
- package/src/resources/members.ts +16 -6
- package/src/resources/memberships.ts +45 -9
- package/src/resources/messages.ts +22 -0
- package/src/resources/payments.ts +109 -57
- package/src/resources/payout-methods.ts +37 -2
- package/src/resources/reactions.ts +36 -0
- package/src/resources/refunds.ts +2 -1
- package/src/resources/shared.ts +110 -11
- package/src/resources/verifications.ts +49 -36
- package/src/resources/webhooks.ts +78 -728
- package/src/resources/withdrawals.ts +29 -205
- 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as Shared from './shared';
|
|
4
4
|
import * as AppsAPI from './apps';
|
|
5
5
|
import * as CheckoutConfigurationsAPI from './checkout-configurations';
|
|
6
|
+
import * as MembershipsAPI from './memberships';
|
|
6
7
|
import * as PaymentsAPI from './payments';
|
|
7
8
|
import { CursorPage } from '../core/pagination';
|
|
8
9
|
|
|
@@ -1447,22 +1448,34 @@ export namespace ForumPost {
|
|
|
1447
1448
|
* The friendly status of a receipt
|
|
1448
1449
|
*/
|
|
1449
1450
|
export type FriendlyReceiptStatus =
|
|
1450
|
-
| '
|
|
1451
|
+
| 'succeeded'
|
|
1452
|
+
| 'pending'
|
|
1453
|
+
| 'failed'
|
|
1454
|
+
| 'past_due'
|
|
1455
|
+
| 'canceled'
|
|
1456
|
+
| 'price_too_low'
|
|
1457
|
+
| 'uncollectible'
|
|
1451
1458
|
| 'refunded'
|
|
1459
|
+
| 'auto_refunded'
|
|
1452
1460
|
| 'partially_refunded'
|
|
1453
1461
|
| 'dispute_warning'
|
|
1454
|
-
| '
|
|
1455
|
-
| '
|
|
1456
|
-
| '
|
|
1457
|
-
| '
|
|
1458
|
-
| '
|
|
1462
|
+
| 'dispute_needs_response'
|
|
1463
|
+
| 'dispute_warning_needs_response'
|
|
1464
|
+
| 'resolution_needs_response'
|
|
1465
|
+
| 'dispute_under_review'
|
|
1466
|
+
| 'dispute_warning_under_review'
|
|
1467
|
+
| 'resolution_under_review'
|
|
1468
|
+
| 'dispute_won'
|
|
1469
|
+
| 'dispute_warning_closed'
|
|
1470
|
+
| 'resolution_won'
|
|
1471
|
+
| 'dispute_lost'
|
|
1472
|
+
| 'dispute_closed'
|
|
1473
|
+
| 'resolution_lost'
|
|
1459
1474
|
| 'drafted'
|
|
1460
|
-
| 'uncollectible'
|
|
1461
|
-
| 'unresolved'
|
|
1462
|
-
| 'past_due'
|
|
1463
|
-
| 'pending'
|
|
1464
1475
|
| 'incomplete'
|
|
1465
|
-
| '
|
|
1476
|
+
| 'unresolved'
|
|
1477
|
+
| 'open_dispute'
|
|
1478
|
+
| 'open_resolution';
|
|
1466
1479
|
|
|
1467
1480
|
/**
|
|
1468
1481
|
* The different statuses of the global affiliate program for a product.
|
|
@@ -1764,6 +1777,12 @@ export interface Membership {
|
|
|
1764
1777
|
*/
|
|
1765
1778
|
cancel_at_period_end: boolean;
|
|
1766
1779
|
|
|
1780
|
+
/**
|
|
1781
|
+
* The different reasons a user can choose for why they are canceling their
|
|
1782
|
+
* membership.
|
|
1783
|
+
*/
|
|
1784
|
+
cancel_option: MembershipsAPI.CancelOptions | null;
|
|
1785
|
+
|
|
1767
1786
|
/**
|
|
1768
1787
|
* The epoch timestamp of when the customer initiated a cancellation.
|
|
1769
1788
|
*/
|
|
@@ -1789,6 +1808,11 @@ export interface Membership {
|
|
|
1789
1808
|
*/
|
|
1790
1809
|
currency: Currency | null;
|
|
1791
1810
|
|
|
1811
|
+
/**
|
|
1812
|
+
* The responses to custom checkout questions for this membership.
|
|
1813
|
+
*/
|
|
1814
|
+
custom_field_responses: Array<Membership.CustomFieldResponse>;
|
|
1815
|
+
|
|
1792
1816
|
/**
|
|
1793
1817
|
* The license key for this Membership. This is only present if the membership
|
|
1794
1818
|
* grants access to an instance of the Whop Software app.
|
|
@@ -1874,6 +1898,26 @@ export namespace Membership {
|
|
|
1874
1898
|
title: string;
|
|
1875
1899
|
}
|
|
1876
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* The response from a custom field on checkout
|
|
1903
|
+
*/
|
|
1904
|
+
export interface CustomFieldResponse {
|
|
1905
|
+
/**
|
|
1906
|
+
* The ID of the custom field item
|
|
1907
|
+
*/
|
|
1908
|
+
id: string;
|
|
1909
|
+
|
|
1910
|
+
/**
|
|
1911
|
+
* The response a user gave to the specific question or field.
|
|
1912
|
+
*/
|
|
1913
|
+
answer: string;
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* The question asked by the custom field
|
|
1917
|
+
*/
|
|
1918
|
+
question: string;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1877
1921
|
/**
|
|
1878
1922
|
* The Member that this Membership belongs to.
|
|
1879
1923
|
*/
|
|
@@ -1928,6 +1972,11 @@ export namespace Membership {
|
|
|
1928
1972
|
*/
|
|
1929
1973
|
id: string;
|
|
1930
1974
|
|
|
1975
|
+
/**
|
|
1976
|
+
* The email of the user
|
|
1977
|
+
*/
|
|
1978
|
+
email: string | null;
|
|
1979
|
+
|
|
1931
1980
|
/**
|
|
1932
1981
|
* The name of the user from their Whop account.
|
|
1933
1982
|
*/
|
|
@@ -2142,6 +2191,11 @@ export interface Payment {
|
|
|
2142
2191
|
*/
|
|
2143
2192
|
amount_after_fees: number;
|
|
2144
2193
|
|
|
2194
|
+
/**
|
|
2195
|
+
* The application fee charged on this payment.
|
|
2196
|
+
*/
|
|
2197
|
+
application_fee: Payment.ApplicationFee | null;
|
|
2198
|
+
|
|
2145
2199
|
/**
|
|
2146
2200
|
* Whether this payment was auto refunded or not
|
|
2147
2201
|
*/
|
|
@@ -2213,6 +2267,11 @@ export interface Payment {
|
|
|
2213
2267
|
*/
|
|
2214
2268
|
metadata: { [key: string]: unknown } | null;
|
|
2215
2269
|
|
|
2270
|
+
/**
|
|
2271
|
+
* The time of the next schedule payment retry.
|
|
2272
|
+
*/
|
|
2273
|
+
next_payment_attempt: string | null;
|
|
2274
|
+
|
|
2216
2275
|
/**
|
|
2217
2276
|
* The datetime the payment was paid
|
|
2218
2277
|
*/
|
|
@@ -2228,6 +2287,11 @@ export interface Payment {
|
|
|
2228
2287
|
*/
|
|
2229
2288
|
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
2230
2289
|
|
|
2290
|
+
/**
|
|
2291
|
+
* The number of failed payment attempts for the payment.
|
|
2292
|
+
*/
|
|
2293
|
+
payments_failed: number | null;
|
|
2294
|
+
|
|
2231
2295
|
/**
|
|
2232
2296
|
* The plan attached to this payment.
|
|
2233
2297
|
*/
|
|
@@ -2304,6 +2368,41 @@ export interface Payment {
|
|
|
2304
2368
|
}
|
|
2305
2369
|
|
|
2306
2370
|
export namespace Payment {
|
|
2371
|
+
/**
|
|
2372
|
+
* The application fee charged on this payment.
|
|
2373
|
+
*/
|
|
2374
|
+
export interface ApplicationFee {
|
|
2375
|
+
/**
|
|
2376
|
+
* The unique identifier for the application fee.
|
|
2377
|
+
*/
|
|
2378
|
+
id: string;
|
|
2379
|
+
|
|
2380
|
+
/**
|
|
2381
|
+
* The application fee amount.
|
|
2382
|
+
*/
|
|
2383
|
+
amount: number;
|
|
2384
|
+
|
|
2385
|
+
/**
|
|
2386
|
+
* The amount of the application fee that has been captured.
|
|
2387
|
+
*/
|
|
2388
|
+
amount_captured: number;
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* The amount of the application fee that has been refunded.
|
|
2392
|
+
*/
|
|
2393
|
+
amount_refunded: number;
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* When the application fee was created.
|
|
2397
|
+
*/
|
|
2398
|
+
created_at: string;
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* The currency of the application fee.
|
|
2402
|
+
*/
|
|
2403
|
+
currency: Shared.Currency;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2307
2406
|
/**
|
|
2308
2407
|
* The address of the user who made the payment.
|
|
2309
2408
|
*/
|
|
@@ -18,6 +18,48 @@ export class Verifications extends APIResource {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* An error code for a verification attempt.
|
|
23
|
+
*/
|
|
24
|
+
export type VerificationErrorCode =
|
|
25
|
+
| 'abandoned'
|
|
26
|
+
| 'consent_declined'
|
|
27
|
+
| 'country_not_supported'
|
|
28
|
+
| 'device_not_supported'
|
|
29
|
+
| 'document_expired'
|
|
30
|
+
| 'document_type_not_supported'
|
|
31
|
+
| 'document_unverified_other'
|
|
32
|
+
| 'email_unverified_other'
|
|
33
|
+
| 'email_verification_declined'
|
|
34
|
+
| 'id_number_insufficient_document_data'
|
|
35
|
+
| 'id_number_mismatch'
|
|
36
|
+
| 'id_number_unverified_other'
|
|
37
|
+
| 'phone_unverified_other'
|
|
38
|
+
| 'phone_verification_declined'
|
|
39
|
+
| 'selfie_document_missing_photo'
|
|
40
|
+
| 'selfie_face_mismatch'
|
|
41
|
+
| 'selfie_manipulated'
|
|
42
|
+
| 'selfie_unverified_other'
|
|
43
|
+
| 'under_supported_age';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A status for a verification.
|
|
47
|
+
*/
|
|
48
|
+
export type VerificationStatus =
|
|
49
|
+
| 'requires_input'
|
|
50
|
+
| 'processing'
|
|
51
|
+
| 'verified'
|
|
52
|
+
| 'canceled'
|
|
53
|
+
| 'created'
|
|
54
|
+
| 'started'
|
|
55
|
+
| 'submitted'
|
|
56
|
+
| 'approved'
|
|
57
|
+
| 'declined'
|
|
58
|
+
| 'resubmission_requested'
|
|
59
|
+
| 'expired'
|
|
60
|
+
| 'abandoned'
|
|
61
|
+
| 'review';
|
|
62
|
+
|
|
21
63
|
/**
|
|
22
64
|
* An object representing an identity verification session
|
|
23
65
|
*/
|
|
@@ -30,27 +72,7 @@ export interface VerificationRetrieveResponse {
|
|
|
30
72
|
/**
|
|
31
73
|
* An error code for a verification attempt.
|
|
32
74
|
*/
|
|
33
|
-
last_error_code:
|
|
34
|
-
| 'abandoned'
|
|
35
|
-
| 'consent_declined'
|
|
36
|
-
| 'country_not_supported'
|
|
37
|
-
| 'device_not_supported'
|
|
38
|
-
| 'document_expired'
|
|
39
|
-
| 'document_type_not_supported'
|
|
40
|
-
| 'document_unverified_other'
|
|
41
|
-
| 'email_unverified_other'
|
|
42
|
-
| 'email_verification_declined'
|
|
43
|
-
| 'id_number_insufficient_document_data'
|
|
44
|
-
| 'id_number_mismatch'
|
|
45
|
-
| 'id_number_unverified_other'
|
|
46
|
-
| 'phone_unverified_other'
|
|
47
|
-
| 'phone_verification_declined'
|
|
48
|
-
| 'selfie_document_missing_photo'
|
|
49
|
-
| 'selfie_face_mismatch'
|
|
50
|
-
| 'selfie_manipulated'
|
|
51
|
-
| 'selfie_unverified_other'
|
|
52
|
-
| 'under_supported_age'
|
|
53
|
-
| null;
|
|
75
|
+
last_error_code: VerificationErrorCode | null;
|
|
54
76
|
|
|
55
77
|
/**
|
|
56
78
|
* The last error reason that occurred during the verification.
|
|
@@ -60,22 +82,13 @@ export interface VerificationRetrieveResponse {
|
|
|
60
82
|
/**
|
|
61
83
|
* The status of the verification.
|
|
62
84
|
*/
|
|
63
|
-
status:
|
|
64
|
-
| 'requires_input'
|
|
65
|
-
| 'processing'
|
|
66
|
-
| 'verified'
|
|
67
|
-
| 'canceled'
|
|
68
|
-
| 'created'
|
|
69
|
-
| 'started'
|
|
70
|
-
| 'submitted'
|
|
71
|
-
| 'approved'
|
|
72
|
-
| 'declined'
|
|
73
|
-
| 'resubmission_requested'
|
|
74
|
-
| 'expired'
|
|
75
|
-
| 'abandoned'
|
|
76
|
-
| 'review';
|
|
85
|
+
status: VerificationStatus;
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
export declare namespace Verifications {
|
|
80
|
-
export {
|
|
89
|
+
export {
|
|
90
|
+
type VerificationErrorCode as VerificationErrorCode,
|
|
91
|
+
type VerificationStatus as VerificationStatus,
|
|
92
|
+
type VerificationRetrieveResponse as VerificationRetrieveResponse,
|
|
93
|
+
};
|
|
81
94
|
}
|