@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
|
@@ -11,6 +11,14 @@ export declare class Verifications extends APIResource {
|
|
|
11
11
|
*/
|
|
12
12
|
retrieve(id: string, options?: RequestOptions): APIPromise<VerificationRetrieveResponse>;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* An error code for a verification attempt.
|
|
16
|
+
*/
|
|
17
|
+
export type VerificationErrorCode = 'abandoned' | 'consent_declined' | 'country_not_supported' | 'device_not_supported' | 'document_expired' | 'document_type_not_supported' | 'document_unverified_other' | 'email_unverified_other' | 'email_verification_declined' | 'id_number_insufficient_document_data' | 'id_number_mismatch' | 'id_number_unverified_other' | 'phone_unverified_other' | 'phone_verification_declined' | 'selfie_document_missing_photo' | 'selfie_face_mismatch' | 'selfie_manipulated' | 'selfie_unverified_other' | 'under_supported_age';
|
|
18
|
+
/**
|
|
19
|
+
* A status for a verification.
|
|
20
|
+
*/
|
|
21
|
+
export type VerificationStatus = 'requires_input' | 'processing' | 'verified' | 'canceled' | 'created' | 'started' | 'submitted' | 'approved' | 'declined' | 'resubmission_requested' | 'expired' | 'abandoned' | 'review';
|
|
14
22
|
/**
|
|
15
23
|
* An object representing an identity verification session
|
|
16
24
|
*/
|
|
@@ -22,7 +30,7 @@ export interface VerificationRetrieveResponse {
|
|
|
22
30
|
/**
|
|
23
31
|
* An error code for a verification attempt.
|
|
24
32
|
*/
|
|
25
|
-
last_error_code:
|
|
33
|
+
last_error_code: VerificationErrorCode | null;
|
|
26
34
|
/**
|
|
27
35
|
* The last error reason that occurred during the verification.
|
|
28
36
|
*/
|
|
@@ -30,9 +38,9 @@ export interface VerificationRetrieveResponse {
|
|
|
30
38
|
/**
|
|
31
39
|
* The status of the verification.
|
|
32
40
|
*/
|
|
33
|
-
status:
|
|
41
|
+
status: VerificationStatus;
|
|
34
42
|
}
|
|
35
43
|
export declare namespace Verifications {
|
|
36
|
-
export { type VerificationRetrieveResponse as VerificationRetrieveResponse };
|
|
44
|
+
export { type VerificationErrorCode as VerificationErrorCode, type VerificationStatus as VerificationStatus, type VerificationRetrieveResponse as VerificationRetrieveResponse, };
|
|
37
45
|
}
|
|
38
46
|
//# sourceMappingURL=verifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.d.ts","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGzF;AAED;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"verifications.d.ts","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGzF;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,WAAW,GACX,kBAAkB,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,kBAAkB,GAClB,6BAA6B,GAC7B,2BAA2B,GAC3B,wBAAwB,GACxB,6BAA6B,GAC7B,sCAAsC,GACtC,oBAAoB,GACpB,4BAA4B,GAC5B,wBAAwB,GACxB,6BAA6B,GAC7B,+BAA+B,GAC/B,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,qBAAqB,CAAC;AAE1B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,gBAAgB,GAChB,YAAY,GACZ,UAAU,GACV,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,GACV,wBAAwB,GACxB,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
package/resources/webhooks.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import * as DisputesAPI from "./disputes.mjs";
|
|
3
3
|
import * as PaymentsAPI from "./payments.mjs";
|
|
4
|
+
import * as PayoutMethodsAPI from "./payout-methods.mjs";
|
|
4
5
|
import * as RefundsAPI from "./refunds.mjs";
|
|
5
6
|
import * as SetupIntentsAPI from "./setup-intents.mjs";
|
|
6
7
|
import * as Shared from "./shared.mjs";
|
|
8
|
+
import * as VerificationsAPI from "./verifications.mjs";
|
|
7
9
|
import * as WithdrawalsAPI from "./withdrawals.mjs";
|
|
8
10
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
9
11
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
@@ -38,7 +40,7 @@ export declare class Webhooks extends APIResource {
|
|
|
38
40
|
* );
|
|
39
41
|
* ```
|
|
40
42
|
*/
|
|
41
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
43
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Webhook>;
|
|
42
44
|
/**
|
|
43
45
|
* Updates a webhook
|
|
44
46
|
*
|
|
@@ -53,7 +55,7 @@ export declare class Webhooks extends APIResource {
|
|
|
53
55
|
* );
|
|
54
56
|
* ```
|
|
55
57
|
*/
|
|
56
|
-
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
58
|
+
update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
|
|
57
59
|
/**
|
|
58
60
|
* Lists webhooks for a company
|
|
59
61
|
*
|
|
@@ -94,56 +96,13 @@ export declare class Webhooks extends APIResource {
|
|
|
94
96
|
}
|
|
95
97
|
export type WebhookListResponsesCursorPage = CursorPage<WebhookListResponse>;
|
|
96
98
|
/**
|
|
97
|
-
*
|
|
99
|
+
* The different API versions
|
|
98
100
|
*/
|
|
99
|
-
export
|
|
100
|
-
/**
|
|
101
|
-
* The ID of the webhook
|
|
102
|
-
*/
|
|
103
|
-
id: string;
|
|
104
|
-
/**
|
|
105
|
-
* The API version for this webhook
|
|
106
|
-
*/
|
|
107
|
-
api_version: 'v1' | 'v2' | 'v5';
|
|
108
|
-
/**
|
|
109
|
-
* Whether or not to send events for child resources. For example, if the webhook
|
|
110
|
-
* is created for a Company, enabling this will only send events from the Company's
|
|
111
|
-
* sub-merchants (child companies).
|
|
112
|
-
*/
|
|
113
|
-
child_resource_events: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* The timestamp of when the webhook was created
|
|
116
|
-
*/
|
|
117
|
-
created_at: string;
|
|
118
|
-
/**
|
|
119
|
-
* Whether or not this webhook is turned on or not
|
|
120
|
-
*/
|
|
121
|
-
enabled: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* The number of events this webhooks is configured to receive
|
|
124
|
-
*/
|
|
125
|
-
events: Array<'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed'>;
|
|
126
|
-
/**
|
|
127
|
-
* The resource ID
|
|
128
|
-
*/
|
|
129
|
-
resource_id: string;
|
|
130
|
-
/**
|
|
131
|
-
* The list of events that can be tested with this webhook
|
|
132
|
-
*/
|
|
133
|
-
testable_events: Array<'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed'>;
|
|
134
|
-
/**
|
|
135
|
-
* The URL the webhook events will be sent to
|
|
136
|
-
*/
|
|
137
|
-
url: string;
|
|
138
|
-
/**
|
|
139
|
-
* A unique secret key that will be sent with each webhook event
|
|
140
|
-
*/
|
|
141
|
-
webhook_secret: string;
|
|
142
|
-
}
|
|
101
|
+
export type APIVersion = 'v1' | 'v2' | 'v5';
|
|
143
102
|
/**
|
|
144
103
|
* A webhook object, which can be configured to be sent updates about a company
|
|
145
104
|
*/
|
|
146
|
-
export interface
|
|
105
|
+
export interface Webhook {
|
|
147
106
|
/**
|
|
148
107
|
* The ID of the webhook
|
|
149
108
|
*/
|
|
@@ -151,7 +110,7 @@ export interface WebhookRetrieveResponse {
|
|
|
151
110
|
/**
|
|
152
111
|
* The API version for this webhook
|
|
153
112
|
*/
|
|
154
|
-
api_version:
|
|
113
|
+
api_version: APIVersion;
|
|
155
114
|
/**
|
|
156
115
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
157
116
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -169,7 +128,7 @@ export interface WebhookRetrieveResponse {
|
|
|
169
128
|
/**
|
|
170
129
|
* The number of events this webhooks is configured to receive
|
|
171
130
|
*/
|
|
172
|
-
events: Array<
|
|
131
|
+
events: Array<WebhookEvent>;
|
|
173
132
|
/**
|
|
174
133
|
* The resource ID
|
|
175
134
|
*/
|
|
@@ -177,16 +136,20 @@ export interface WebhookRetrieveResponse {
|
|
|
177
136
|
/**
|
|
178
137
|
* The list of events that can be tested with this webhook
|
|
179
138
|
*/
|
|
180
|
-
testable_events: Array<
|
|
139
|
+
testable_events: Array<WebhookEvent>;
|
|
181
140
|
/**
|
|
182
141
|
* The URL the webhook events will be sent to
|
|
183
142
|
*/
|
|
184
143
|
url: string;
|
|
185
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* The different event types available
|
|
147
|
+
*/
|
|
148
|
+
export type WebhookEvent = 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed';
|
|
186
149
|
/**
|
|
187
150
|
* A webhook object, which can be configured to be sent updates about a company
|
|
188
151
|
*/
|
|
189
|
-
export interface
|
|
152
|
+
export interface WebhookCreateResponse {
|
|
190
153
|
/**
|
|
191
154
|
* The ID of the webhook
|
|
192
155
|
*/
|
|
@@ -194,7 +157,7 @@ export interface WebhookUpdateResponse {
|
|
|
194
157
|
/**
|
|
195
158
|
* The API version for this webhook
|
|
196
159
|
*/
|
|
197
|
-
api_version:
|
|
160
|
+
api_version: APIVersion;
|
|
198
161
|
/**
|
|
199
162
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
200
163
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -212,7 +175,7 @@ export interface WebhookUpdateResponse {
|
|
|
212
175
|
/**
|
|
213
176
|
* The number of events this webhooks is configured to receive
|
|
214
177
|
*/
|
|
215
|
-
events: Array<
|
|
178
|
+
events: Array<WebhookEvent>;
|
|
216
179
|
/**
|
|
217
180
|
* The resource ID
|
|
218
181
|
*/
|
|
@@ -220,11 +183,15 @@ export interface WebhookUpdateResponse {
|
|
|
220
183
|
/**
|
|
221
184
|
* The list of events that can be tested with this webhook
|
|
222
185
|
*/
|
|
223
|
-
testable_events: Array<
|
|
186
|
+
testable_events: Array<WebhookEvent>;
|
|
224
187
|
/**
|
|
225
188
|
* The URL the webhook events will be sent to
|
|
226
189
|
*/
|
|
227
190
|
url: string;
|
|
191
|
+
/**
|
|
192
|
+
* A unique secret key that will be sent with each webhook event
|
|
193
|
+
*/
|
|
194
|
+
webhook_secret: string;
|
|
228
195
|
}
|
|
229
196
|
/**
|
|
230
197
|
* A webhook object, which can be configured to be sent updates about a company
|
|
@@ -237,7 +204,7 @@ export interface WebhookListResponse {
|
|
|
237
204
|
/**
|
|
238
205
|
* The API version for this webhook
|
|
239
206
|
*/
|
|
240
|
-
api_version:
|
|
207
|
+
api_version: APIVersion;
|
|
241
208
|
/**
|
|
242
209
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
243
210
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -255,7 +222,7 @@ export interface WebhookListResponse {
|
|
|
255
222
|
/**
|
|
256
223
|
* The number of events this webhooks is configured to receive
|
|
257
224
|
*/
|
|
258
|
-
events: Array<
|
|
225
|
+
events: Array<WebhookEvent>;
|
|
259
226
|
/**
|
|
260
227
|
* The URL the webhook events will be sent to
|
|
261
228
|
*/
|
|
@@ -620,7 +587,7 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
620
587
|
/**
|
|
621
588
|
* A withdrawal request.
|
|
622
589
|
*/
|
|
623
|
-
data:
|
|
590
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
624
591
|
/**
|
|
625
592
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
626
593
|
*/
|
|
@@ -634,119 +601,6 @@ export interface WithdrawalCreatedWebhookEvent {
|
|
|
634
601
|
*/
|
|
635
602
|
company_id?: string | null;
|
|
636
603
|
}
|
|
637
|
-
export declare namespace WithdrawalCreatedWebhookEvent {
|
|
638
|
-
/**
|
|
639
|
-
* A withdrawal request.
|
|
640
|
-
*/
|
|
641
|
-
interface Data {
|
|
642
|
-
/**
|
|
643
|
-
* Internal ID of the withdrawal request.
|
|
644
|
-
*/
|
|
645
|
-
id: string;
|
|
646
|
-
/**
|
|
647
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
648
|
-
*/
|
|
649
|
-
amount: number;
|
|
650
|
-
/**
|
|
651
|
-
* When the withdrawal request was created.
|
|
652
|
-
*/
|
|
653
|
-
created_at: string;
|
|
654
|
-
/**
|
|
655
|
-
* The currency of the withdrawal request.
|
|
656
|
-
*/
|
|
657
|
-
currency: Shared.Currency;
|
|
658
|
-
/**
|
|
659
|
-
* The different error codes a payout can be in.
|
|
660
|
-
*/
|
|
661
|
-
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
662
|
-
/**
|
|
663
|
-
* The error message for the withdrawal, if any.
|
|
664
|
-
*/
|
|
665
|
-
error_message: string | null;
|
|
666
|
-
/**
|
|
667
|
-
* The estimated availability date for the withdrawal, if any.
|
|
668
|
-
*/
|
|
669
|
-
estimated_availability: string | null;
|
|
670
|
-
/**
|
|
671
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
672
|
-
* as the withdrawal amount.
|
|
673
|
-
*/
|
|
674
|
-
fee_amount: number;
|
|
675
|
-
/**
|
|
676
|
-
* The different fee types for a withdrawal.
|
|
677
|
-
*/
|
|
678
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
679
|
-
/**
|
|
680
|
-
* The ledger account associated with the withdrawal.
|
|
681
|
-
*/
|
|
682
|
-
ledger_account: Data.LedgerAccount;
|
|
683
|
-
/**
|
|
684
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
685
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
686
|
-
* Rails.
|
|
687
|
-
*/
|
|
688
|
-
markup_fee: number;
|
|
689
|
-
/**
|
|
690
|
-
* The payout token used for the withdrawal, if applicable.
|
|
691
|
-
*/
|
|
692
|
-
payout_token: Data.PayoutToken | null;
|
|
693
|
-
/**
|
|
694
|
-
* The speed of the withdrawal.
|
|
695
|
-
*/
|
|
696
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
697
|
-
/**
|
|
698
|
-
* Status of the withdrawal.
|
|
699
|
-
*/
|
|
700
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
701
|
-
/**
|
|
702
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
703
|
-
* available.
|
|
704
|
-
*/
|
|
705
|
-
trace_code: string | null;
|
|
706
|
-
}
|
|
707
|
-
namespace Data {
|
|
708
|
-
/**
|
|
709
|
-
* The ledger account associated with the withdrawal.
|
|
710
|
-
*/
|
|
711
|
-
interface LedgerAccount {
|
|
712
|
-
/**
|
|
713
|
-
* The ID of the LedgerAccount.
|
|
714
|
-
*/
|
|
715
|
-
id: string;
|
|
716
|
-
/**
|
|
717
|
-
* The ID of the company associated with this ledger account.
|
|
718
|
-
*/
|
|
719
|
-
company_id: string | null;
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* The payout token used for the withdrawal, if applicable.
|
|
723
|
-
*/
|
|
724
|
-
interface PayoutToken {
|
|
725
|
-
/**
|
|
726
|
-
* The ID of the payout token
|
|
727
|
-
*/
|
|
728
|
-
id: string;
|
|
729
|
-
/**
|
|
730
|
-
* The date and time the payout token was created
|
|
731
|
-
*/
|
|
732
|
-
created_at: string;
|
|
733
|
-
/**
|
|
734
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
735
|
-
* will be made in for this token.
|
|
736
|
-
*/
|
|
737
|
-
destination_currency_code: string;
|
|
738
|
-
/**
|
|
739
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
740
|
-
* not used by the provider and is only for the user's reference.
|
|
741
|
-
*/
|
|
742
|
-
nickname: string | null;
|
|
743
|
-
/**
|
|
744
|
-
* The name of the payer associated with the payout token.
|
|
745
|
-
*/
|
|
746
|
-
payer_name: string | null;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
604
|
export interface WithdrawalUpdatedWebhookEvent {
|
|
751
605
|
/**
|
|
752
606
|
* A unique ID for every single webhook request
|
|
@@ -759,7 +613,7 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
759
613
|
/**
|
|
760
614
|
* A withdrawal request.
|
|
761
615
|
*/
|
|
762
|
-
data:
|
|
616
|
+
data: WithdrawalsAPI.Withdrawal;
|
|
763
617
|
/**
|
|
764
618
|
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
765
619
|
*/
|
|
@@ -773,119 +627,6 @@ export interface WithdrawalUpdatedWebhookEvent {
|
|
|
773
627
|
*/
|
|
774
628
|
company_id?: string | null;
|
|
775
629
|
}
|
|
776
|
-
export declare namespace WithdrawalUpdatedWebhookEvent {
|
|
777
|
-
/**
|
|
778
|
-
* A withdrawal request.
|
|
779
|
-
*/
|
|
780
|
-
interface Data {
|
|
781
|
-
/**
|
|
782
|
-
* Internal ID of the withdrawal request.
|
|
783
|
-
*/
|
|
784
|
-
id: string;
|
|
785
|
-
/**
|
|
786
|
-
* How much money was attempted to be withdrawn, in a float type.
|
|
787
|
-
*/
|
|
788
|
-
amount: number;
|
|
789
|
-
/**
|
|
790
|
-
* When the withdrawal request was created.
|
|
791
|
-
*/
|
|
792
|
-
created_at: string;
|
|
793
|
-
/**
|
|
794
|
-
* The currency of the withdrawal request.
|
|
795
|
-
*/
|
|
796
|
-
currency: Shared.Currency;
|
|
797
|
-
/**
|
|
798
|
-
* The different error codes a payout can be in.
|
|
799
|
-
*/
|
|
800
|
-
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
801
|
-
/**
|
|
802
|
-
* The error message for the withdrawal, if any.
|
|
803
|
-
*/
|
|
804
|
-
error_message: string | null;
|
|
805
|
-
/**
|
|
806
|
-
* The estimated availability date for the withdrawal, if any.
|
|
807
|
-
*/
|
|
808
|
-
estimated_availability: string | null;
|
|
809
|
-
/**
|
|
810
|
-
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
811
|
-
* as the withdrawal amount.
|
|
812
|
-
*/
|
|
813
|
-
fee_amount: number;
|
|
814
|
-
/**
|
|
815
|
-
* The different fee types for a withdrawal.
|
|
816
|
-
*/
|
|
817
|
-
fee_type: WithdrawalsAPI.WithdrawalFeeTypes | null;
|
|
818
|
-
/**
|
|
819
|
-
* The ledger account associated with the withdrawal.
|
|
820
|
-
*/
|
|
821
|
-
ledger_account: Data.LedgerAccount;
|
|
822
|
-
/**
|
|
823
|
-
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
824
|
-
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
825
|
-
* Rails.
|
|
826
|
-
*/
|
|
827
|
-
markup_fee: number;
|
|
828
|
-
/**
|
|
829
|
-
* The payout token used for the withdrawal, if applicable.
|
|
830
|
-
*/
|
|
831
|
-
payout_token: Data.PayoutToken | null;
|
|
832
|
-
/**
|
|
833
|
-
* The speed of the withdrawal.
|
|
834
|
-
*/
|
|
835
|
-
speed: WithdrawalsAPI.WithdrawalSpeeds;
|
|
836
|
-
/**
|
|
837
|
-
* Status of the withdrawal.
|
|
838
|
-
*/
|
|
839
|
-
status: WithdrawalsAPI.WithdrawalStatus;
|
|
840
|
-
/**
|
|
841
|
-
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
842
|
-
* available.
|
|
843
|
-
*/
|
|
844
|
-
trace_code: string | null;
|
|
845
|
-
}
|
|
846
|
-
namespace Data {
|
|
847
|
-
/**
|
|
848
|
-
* The ledger account associated with the withdrawal.
|
|
849
|
-
*/
|
|
850
|
-
interface LedgerAccount {
|
|
851
|
-
/**
|
|
852
|
-
* The ID of the LedgerAccount.
|
|
853
|
-
*/
|
|
854
|
-
id: string;
|
|
855
|
-
/**
|
|
856
|
-
* The ID of the company associated with this ledger account.
|
|
857
|
-
*/
|
|
858
|
-
company_id: string | null;
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* The payout token used for the withdrawal, if applicable.
|
|
862
|
-
*/
|
|
863
|
-
interface PayoutToken {
|
|
864
|
-
/**
|
|
865
|
-
* The ID of the payout token
|
|
866
|
-
*/
|
|
867
|
-
id: string;
|
|
868
|
-
/**
|
|
869
|
-
* The date and time the payout token was created
|
|
870
|
-
*/
|
|
871
|
-
created_at: string;
|
|
872
|
-
/**
|
|
873
|
-
* The currency code of the payout destination. This is the currency that payouts
|
|
874
|
-
* will be made in for this token.
|
|
875
|
-
*/
|
|
876
|
-
destination_currency_code: string;
|
|
877
|
-
/**
|
|
878
|
-
* An optional nickname for the payout token to help the user identify it. This is
|
|
879
|
-
* not used by the provider and is only for the user's reference.
|
|
880
|
-
*/
|
|
881
|
-
nickname: string | null;
|
|
882
|
-
/**
|
|
883
|
-
* The name of the payer associated with the payout token.
|
|
884
|
-
*/
|
|
885
|
-
payer_name: string | null;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
630
|
export interface CourseLessonInteractionCompletedWebhookEvent {
|
|
890
631
|
/**
|
|
891
632
|
* A unique ID for every single webhook request
|
|
@@ -947,6 +688,11 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
947
688
|
* The ID of the payout token
|
|
948
689
|
*/
|
|
949
690
|
id: string;
|
|
691
|
+
/**
|
|
692
|
+
* A reference to identify the payout destination, such as the last 4 digits of an
|
|
693
|
+
* account number or an email address.
|
|
694
|
+
*/
|
|
695
|
+
account_reference: string | null;
|
|
950
696
|
/**
|
|
951
697
|
* The company associated with the payout token
|
|
952
698
|
*/
|
|
@@ -964,6 +710,10 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
964
710
|
* The payout destination associated with the payout token
|
|
965
711
|
*/
|
|
966
712
|
destination: Data.Destination | null;
|
|
713
|
+
/**
|
|
714
|
+
* The name of the bank or financial institution.
|
|
715
|
+
*/
|
|
716
|
+
institution_name: string | null;
|
|
967
717
|
/**
|
|
968
718
|
* Whether this payout token is the default for the payout account
|
|
969
719
|
*/
|
|
@@ -991,7 +741,7 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
|
|
|
991
741
|
/**
|
|
992
742
|
* The category of the payout destination
|
|
993
743
|
*/
|
|
994
|
-
category:
|
|
744
|
+
category: PayoutMethodsAPI.PayoutDestinationCategory;
|
|
995
745
|
/**
|
|
996
746
|
* The country code of the payout destination
|
|
997
747
|
*/
|
|
@@ -1041,7 +791,7 @@ export declare namespace VerificationSucceededWebhookEvent {
|
|
|
1041
791
|
/**
|
|
1042
792
|
* An error code for a verification attempt.
|
|
1043
793
|
*/
|
|
1044
|
-
last_error_code:
|
|
794
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
1045
795
|
/**
|
|
1046
796
|
* The last error reason that occurred during the verification.
|
|
1047
797
|
*/
|
|
@@ -1049,7 +799,7 @@ export declare namespace VerificationSucceededWebhookEvent {
|
|
|
1049
799
|
/**
|
|
1050
800
|
* The status of the verification.
|
|
1051
801
|
*/
|
|
1052
|
-
status:
|
|
802
|
+
status: VerificationsAPI.VerificationStatus;
|
|
1053
803
|
}
|
|
1054
804
|
}
|
|
1055
805
|
export interface PaymentCreatedWebhookEvent {
|
|
@@ -1630,7 +1380,7 @@ export interface WebhookCreateParams {
|
|
|
1630
1380
|
/**
|
|
1631
1381
|
* The different API versions
|
|
1632
1382
|
*/
|
|
1633
|
-
api_version?:
|
|
1383
|
+
api_version?: APIVersion | null;
|
|
1634
1384
|
/**
|
|
1635
1385
|
* Whether or not to send events for child resources. For example, if the webhook
|
|
1636
1386
|
* is created for a Company, enabling this will only send events from the Company's
|
|
@@ -1644,7 +1394,7 @@ export interface WebhookCreateParams {
|
|
|
1644
1394
|
/**
|
|
1645
1395
|
* The events to send the webhook for.
|
|
1646
1396
|
*/
|
|
1647
|
-
events?: Array<
|
|
1397
|
+
events?: Array<WebhookEvent> | null;
|
|
1648
1398
|
/**
|
|
1649
1399
|
* The resource to create the webhook for. By default this will use current company
|
|
1650
1400
|
*/
|
|
@@ -1654,7 +1404,7 @@ export interface WebhookUpdateParams {
|
|
|
1654
1404
|
/**
|
|
1655
1405
|
* The different API versions
|
|
1656
1406
|
*/
|
|
1657
|
-
api_version?:
|
|
1407
|
+
api_version?: APIVersion | null;
|
|
1658
1408
|
/**
|
|
1659
1409
|
* Whether or not to send events for child resources.
|
|
1660
1410
|
*/
|
|
@@ -1666,7 +1416,7 @@ export interface WebhookUpdateParams {
|
|
|
1666
1416
|
/**
|
|
1667
1417
|
* The events to send the webhook for.
|
|
1668
1418
|
*/
|
|
1669
|
-
events?: Array<
|
|
1419
|
+
events?: Array<WebhookEvent> | null;
|
|
1670
1420
|
/**
|
|
1671
1421
|
* The URL to send the webhook to.
|
|
1672
1422
|
*/
|
|
@@ -1691,6 +1441,6 @@ export interface WebhookListParams extends CursorPageParams {
|
|
|
1691
1441
|
last?: number | null;
|
|
1692
1442
|
}
|
|
1693
1443
|
export declare namespace Webhooks {
|
|
1694
|
-
export { type
|
|
1444
|
+
export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
1695
1445
|
}
|
|
1696
1446
|
//# sourceMappingURL=webhooks.d.mts.map
|