@whop/sdk 0.0.32 → 0.0.34
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 +30 -0
- package/client.d.mts +12 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -6
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +6 -0
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +6 -0
- 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/payout-accounts.d.mts +139 -0
- package/resources/payout-accounts.d.mts.map +1 -0
- package/resources/payout-accounts.d.ts +139 -0
- package/resources/payout-accounts.d.ts.map +1 -0
- package/resources/payout-accounts.js +23 -0
- package/resources/payout-accounts.js.map +1 -0
- package/resources/payout-accounts.mjs +19 -0
- package/resources/payout-accounts.mjs.map +1 -0
- package/resources/refunds.d.mts +15 -7
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +15 -7
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -3
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -3
- package/resources/refunds.mjs.map +1 -1
- package/resources/users.d.mts +70 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +70 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +8 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +8 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +53 -1
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +53 -1
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +15 -0
- package/resources/verifications.js.map +1 -1
- package/resources/verifications.mjs +15 -0
- package/resources/verifications.mjs.map +1 -1
- package/resources/webhooks.d.mts +145 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +145 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +30 -0
- package/src/resources/index.ts +12 -0
- package/src/resources/ledger-accounts.ts +7 -0
- package/src/resources/payout-accounts.ts +177 -0
- package/src/resources/refunds.ts +17 -7
- package/src/resources/users.ts +90 -0
- package/src/resources/verifications.ts +73 -0
- package/src/resources/webhooks.ts +173 -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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as VerificationsAPI from './verifications';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Payout accounts
|
|
11
|
+
*/
|
|
12
|
+
export class PayoutAccounts extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves the details of an existing payout account.
|
|
15
|
+
*
|
|
16
|
+
* Required permissions:
|
|
17
|
+
*
|
|
18
|
+
* - `payout:account:read`
|
|
19
|
+
*/
|
|
20
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<PayoutAccountRetrieveResponse> {
|
|
21
|
+
return this._client.get(path`/payout_accounts/${id}`, options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
27
|
+
* readiness.
|
|
28
|
+
*/
|
|
29
|
+
export type PayoutAccountCalculatedStatuses =
|
|
30
|
+
| 'connected'
|
|
31
|
+
| 'disabled'
|
|
32
|
+
| 'action_required'
|
|
33
|
+
| 'pending_verification'
|
|
34
|
+
| 'verification_failed'
|
|
35
|
+
| 'not_started';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* An object representing an account used for payouts.
|
|
39
|
+
*/
|
|
40
|
+
export interface PayoutAccountRetrieveResponse {
|
|
41
|
+
/**
|
|
42
|
+
* The unique identifier for the payout account.
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The physical address associated with this payout account
|
|
48
|
+
*/
|
|
49
|
+
address: PayoutAccountRetrieveResponse.Address | null;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The company's legal name
|
|
53
|
+
*/
|
|
54
|
+
business_name: string | null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The business representative for this payout account
|
|
58
|
+
*/
|
|
59
|
+
business_representative: PayoutAccountRetrieveResponse.BusinessRepresentative | null;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The email address of the representative
|
|
63
|
+
*/
|
|
64
|
+
email: string | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The latest verification for the connected account.
|
|
68
|
+
*/
|
|
69
|
+
latest_verification: PayoutAccountRetrieveResponse.LatestVerification | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The business representative's phone
|
|
73
|
+
*/
|
|
74
|
+
phone: string | null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
78
|
+
* readiness.
|
|
79
|
+
*/
|
|
80
|
+
status: PayoutAccountCalculatedStatuses | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export namespace PayoutAccountRetrieveResponse {
|
|
84
|
+
/**
|
|
85
|
+
* The physical address associated with this payout account
|
|
86
|
+
*/
|
|
87
|
+
export interface Address {
|
|
88
|
+
/**
|
|
89
|
+
* The city of the address.
|
|
90
|
+
*/
|
|
91
|
+
city: string | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The country of the address.
|
|
95
|
+
*/
|
|
96
|
+
country: string | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The line 1 of the address.
|
|
100
|
+
*/
|
|
101
|
+
line1: string | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The line 2 of the address.
|
|
105
|
+
*/
|
|
106
|
+
line2: string | null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The postal code of the address.
|
|
110
|
+
*/
|
|
111
|
+
postal_code: string | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The state of the address.
|
|
115
|
+
*/
|
|
116
|
+
state: string | null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The business representative for this payout account
|
|
121
|
+
*/
|
|
122
|
+
export interface BusinessRepresentative {
|
|
123
|
+
/**
|
|
124
|
+
* The date of birth of the business representative in ISO 8601 format
|
|
125
|
+
* (YYYY-MM-DD).
|
|
126
|
+
*/
|
|
127
|
+
date_of_birth: string | null;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The first name of the business representative.
|
|
131
|
+
*/
|
|
132
|
+
first_name: string | null;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The last name of the business representative.
|
|
136
|
+
*/
|
|
137
|
+
last_name: string | null;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The middle name of the business representative.
|
|
141
|
+
*/
|
|
142
|
+
middle_name: string | null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The latest verification for the connected account.
|
|
147
|
+
*/
|
|
148
|
+
export interface LatestVerification {
|
|
149
|
+
/**
|
|
150
|
+
* The unique identifier for the verification.
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* An error code for a verification attempt.
|
|
156
|
+
*/
|
|
157
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
161
|
+
* error has occurred.
|
|
162
|
+
*/
|
|
163
|
+
last_error_reason: string | null;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The current status of this verification session.
|
|
167
|
+
*/
|
|
168
|
+
status: VerificationsAPI.VerificationStatus;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export declare namespace PayoutAccounts {
|
|
173
|
+
export {
|
|
174
|
+
type PayoutAccountCalculatedStatuses as PayoutAccountCalculatedStatuses,
|
|
175
|
+
type PayoutAccountRetrieveResponse as PayoutAccountRetrieveResponse,
|
|
176
|
+
};
|
|
177
|
+
}
|
package/src/resources/refunds.ts
CHANGED
|
@@ -27,15 +27,15 @@ export class Refunds extends APIResource {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Returns a paginated list of refunds
|
|
31
|
-
*
|
|
30
|
+
* Returns a paginated list of refunds, with optional filtering by payment,
|
|
31
|
+
* company, user, and creation date.
|
|
32
32
|
*
|
|
33
33
|
* Required permissions:
|
|
34
34
|
*
|
|
35
35
|
* - `payment:basic:read`
|
|
36
36
|
*/
|
|
37
37
|
list(
|
|
38
|
-
query: RefundListParams,
|
|
38
|
+
query: RefundListParams | null | undefined = {},
|
|
39
39
|
options?: RequestOptions,
|
|
40
40
|
): PagePromise<RefundListResponsesCursorPage, RefundListResponse> {
|
|
41
41
|
return this._client.getAPIList('/refunds', CursorPage<RefundListResponse>, { query, ...options });
|
|
@@ -386,14 +386,14 @@ export namespace RefundListResponse {
|
|
|
386
386
|
|
|
387
387
|
export interface RefundListParams extends CursorPageParams {
|
|
388
388
|
/**
|
|
389
|
-
*
|
|
389
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
390
390
|
*/
|
|
391
|
-
|
|
391
|
+
before?: string | null;
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
|
-
*
|
|
394
|
+
* Filter refunds to only those belonging to this company.
|
|
395
395
|
*/
|
|
396
|
-
|
|
396
|
+
company_id?: string | null;
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
399
|
* Only return refunds created after this timestamp.
|
|
@@ -419,6 +419,16 @@ export interface RefundListParams extends CursorPageParams {
|
|
|
419
419
|
* Returns the last _n_ elements from the list.
|
|
420
420
|
*/
|
|
421
421
|
last?: number | null;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Filter refunds to only those associated with this specific payment.
|
|
425
|
+
*/
|
|
426
|
+
payment_id?: string | null;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Filter refunds to only those associated with this specific user.
|
|
430
|
+
*/
|
|
431
|
+
user_id?: string | null;
|
|
422
432
|
}
|
|
423
433
|
|
|
424
434
|
export declare namespace Refunds {
|
package/src/resources/users.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as Shared from './shared';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
8
9
|
|
|
@@ -17,6 +18,17 @@ export class Users extends APIResource {
|
|
|
17
18
|
return this._client.get(path`/users/${id}`, options);
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Search for users by name or username, ranked by social proximity to the
|
|
23
|
+
* authenticated user.
|
|
24
|
+
*/
|
|
25
|
+
list(
|
|
26
|
+
query: UserListParams | null | undefined = {},
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): PagePromise<UserListResponsesCursorPage, UserListResponse> {
|
|
29
|
+
return this._client.getAPIList('/users', CursorPage<UserListResponse>, { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
/**
|
|
21
33
|
* Check whether a user has access to a specific resource, and return their access
|
|
22
34
|
* level.
|
|
@@ -45,6 +57,8 @@ export class Users extends APIResource {
|
|
|
45
57
|
}
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
export type UserListResponsesCursorPage = CursorPage<UserListResponse>;
|
|
61
|
+
|
|
48
62
|
/**
|
|
49
63
|
* A user account on Whop. Contains profile information, identity details, and
|
|
50
64
|
* social connections.
|
|
@@ -96,6 +110,57 @@ export namespace User {
|
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
|
|
113
|
+
/**
|
|
114
|
+
* A user account on Whop. Contains profile information, identity details, and
|
|
115
|
+
* social connections.
|
|
116
|
+
*/
|
|
117
|
+
export interface UserListResponse {
|
|
118
|
+
/**
|
|
119
|
+
* The unique identifier for the user.
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* A short biography written by the user, displayed on their public profile.
|
|
125
|
+
*/
|
|
126
|
+
bio: string | null;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The datetime the user was created.
|
|
130
|
+
*/
|
|
131
|
+
created_at: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The user's display name shown on their public profile.
|
|
135
|
+
*/
|
|
136
|
+
name: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The user's profile picture attachment with URL, content type, and file metadata.
|
|
140
|
+
* Null if using a legacy profile picture.
|
|
141
|
+
*/
|
|
142
|
+
profile_picture: UserListResponse.ProfilePicture | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The user's unique username shown on their public profile.
|
|
146
|
+
*/
|
|
147
|
+
username: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export namespace UserListResponse {
|
|
151
|
+
/**
|
|
152
|
+
* The user's profile picture attachment with URL, content type, and file metadata.
|
|
153
|
+
* Null if using a legacy profile picture.
|
|
154
|
+
*/
|
|
155
|
+
export interface ProfilePicture {
|
|
156
|
+
/**
|
|
157
|
+
* A pre-optimized URL for rendering this attachment on the client. This should be
|
|
158
|
+
* used for displaying attachments in apps.
|
|
159
|
+
*/
|
|
160
|
+
url: string | null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
99
164
|
/**
|
|
100
165
|
* The result of a has access check for the developer API
|
|
101
166
|
*/
|
|
@@ -111,6 +176,28 @@ export interface UserCheckAccessResponse {
|
|
|
111
176
|
has_access: boolean;
|
|
112
177
|
}
|
|
113
178
|
|
|
179
|
+
export interface UserListParams extends CursorPageParams {
|
|
180
|
+
/**
|
|
181
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
182
|
+
*/
|
|
183
|
+
before?: string | null;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Returns the first _n_ elements from the list.
|
|
187
|
+
*/
|
|
188
|
+
first?: number | null;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns the last _n_ elements from the list.
|
|
192
|
+
*/
|
|
193
|
+
last?: number | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Search term to filter by name or username.
|
|
197
|
+
*/
|
|
198
|
+
query?: string | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
114
201
|
export interface UserCheckAccessParams {
|
|
115
202
|
/**
|
|
116
203
|
* The unique identifier or username of the user.
|
|
@@ -156,7 +243,10 @@ export namespace UserUpdateProfileParams {
|
|
|
156
243
|
export declare namespace Users {
|
|
157
244
|
export {
|
|
158
245
|
type User as User,
|
|
246
|
+
type UserListResponse as UserListResponse,
|
|
159
247
|
type UserCheckAccessResponse as UserCheckAccessResponse,
|
|
248
|
+
type UserListResponsesCursorPage as UserListResponsesCursorPage,
|
|
249
|
+
type UserListParams as UserListParams,
|
|
160
250
|
type UserCheckAccessParams as UserCheckAccessParams,
|
|
161
251
|
type UserUpdateProfileParams as UserUpdateProfileParams,
|
|
162
252
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
5
6
|
import { RequestOptions } from '../internal/request-options';
|
|
6
7
|
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
@@ -19,8 +20,28 @@ export class Verifications extends APIResource {
|
|
|
19
20
|
retrieve(id: string, options?: RequestOptions): APIPromise<VerificationRetrieveResponse> {
|
|
20
21
|
return this._client.get(path`/verifications/${id}`, options);
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns a list of identity verifications for a payout account, ordered by most
|
|
26
|
+
* recent first.
|
|
27
|
+
*
|
|
28
|
+
* Required permissions:
|
|
29
|
+
*
|
|
30
|
+
* - `payout:account:read`
|
|
31
|
+
*/
|
|
32
|
+
list(
|
|
33
|
+
query: VerificationListParams,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): PagePromise<VerificationListResponsesCursorPage, VerificationListResponse> {
|
|
36
|
+
return this._client.getAPIList('/verifications', CursorPage<VerificationListResponse>, {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
22
41
|
}
|
|
23
42
|
|
|
43
|
+
export type VerificationListResponsesCursorPage = CursorPage<VerificationListResponse>;
|
|
44
|
+
|
|
24
45
|
/**
|
|
25
46
|
* An error code for a verification attempt.
|
|
26
47
|
*/
|
|
@@ -90,10 +111,62 @@ export interface VerificationRetrieveResponse {
|
|
|
90
111
|
status: VerificationStatus;
|
|
91
112
|
}
|
|
92
113
|
|
|
114
|
+
/**
|
|
115
|
+
* An identity verification session used to confirm a person or entity's identity
|
|
116
|
+
* for payout account eligibility.
|
|
117
|
+
*/
|
|
118
|
+
export interface VerificationListResponse {
|
|
119
|
+
/**
|
|
120
|
+
* The unique identifier for the verification.
|
|
121
|
+
*/
|
|
122
|
+
id: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* An error code for a verification attempt.
|
|
126
|
+
*/
|
|
127
|
+
last_error_code: VerificationErrorCode | null;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
131
|
+
* error has occurred.
|
|
132
|
+
*/
|
|
133
|
+
last_error_reason: string | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The current status of this verification session.
|
|
137
|
+
*/
|
|
138
|
+
status: VerificationStatus;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface VerificationListParams extends CursorPageParams {
|
|
142
|
+
/**
|
|
143
|
+
* The unique identifier of the payout account to list verifications for.
|
|
144
|
+
*/
|
|
145
|
+
payout_account_id: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
149
|
+
*/
|
|
150
|
+
before?: string | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Returns the first _n_ elements from the list.
|
|
154
|
+
*/
|
|
155
|
+
first?: number | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Returns the last _n_ elements from the list.
|
|
159
|
+
*/
|
|
160
|
+
last?: number | null;
|
|
161
|
+
}
|
|
162
|
+
|
|
93
163
|
export declare namespace Verifications {
|
|
94
164
|
export {
|
|
95
165
|
type VerificationErrorCode as VerificationErrorCode,
|
|
96
166
|
type VerificationStatus as VerificationStatus,
|
|
97
167
|
type VerificationRetrieveResponse as VerificationRetrieveResponse,
|
|
168
|
+
type VerificationListResponse as VerificationListResponse,
|
|
169
|
+
type VerificationListResponsesCursorPage as VerificationListResponsesCursorPage,
|
|
170
|
+
type VerificationListParams as VerificationListParams,
|
|
98
171
|
};
|
|
99
172
|
}
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import * as DisputeAlertsAPI from './dispute-alerts';
|
|
5
5
|
import * as DisputesAPI from './disputes';
|
|
6
6
|
import * as PaymentsAPI from './payments';
|
|
7
|
+
import * as PayoutAccountsAPI from './payout-accounts';
|
|
7
8
|
import * as PayoutMethodsAPI from './payout-methods';
|
|
8
9
|
import * as RefundsAPI from './refunds';
|
|
9
10
|
import * as SetupIntentsAPI from './setup-intents';
|
|
@@ -217,6 +218,7 @@ export type WebhookEvent =
|
|
|
217
218
|
| 'course_lesson_interaction.completed'
|
|
218
219
|
| 'payout_method.created'
|
|
219
220
|
| 'verification.succeeded'
|
|
221
|
+
| 'payout_account.status_updated'
|
|
220
222
|
| 'payment.created'
|
|
221
223
|
| 'payment.succeeded'
|
|
222
224
|
| 'payment.failed'
|
|
@@ -1052,6 +1054,175 @@ export namespace VerificationSucceededWebhookEvent {
|
|
|
1052
1054
|
}
|
|
1053
1055
|
}
|
|
1054
1056
|
|
|
1057
|
+
export interface PayoutAccountStatusUpdatedWebhookEvent {
|
|
1058
|
+
/**
|
|
1059
|
+
* A unique ID for every single webhook request
|
|
1060
|
+
*/
|
|
1061
|
+
id: string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* The API version for this webhook
|
|
1065
|
+
*/
|
|
1066
|
+
api_version: 'v1';
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* An object representing an account used for payouts.
|
|
1070
|
+
*/
|
|
1071
|
+
data: PayoutAccountStatusUpdatedWebhookEvent.Data;
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
1075
|
+
*/
|
|
1076
|
+
timestamp: string;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* The webhook event type
|
|
1080
|
+
*/
|
|
1081
|
+
type: 'payout_account.status_updated';
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* The company ID that this webhook event is associated with
|
|
1085
|
+
*/
|
|
1086
|
+
company_id?: string | null;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export namespace PayoutAccountStatusUpdatedWebhookEvent {
|
|
1090
|
+
/**
|
|
1091
|
+
* An object representing an account used for payouts.
|
|
1092
|
+
*/
|
|
1093
|
+
export interface Data {
|
|
1094
|
+
/**
|
|
1095
|
+
* The unique identifier for the payout account.
|
|
1096
|
+
*/
|
|
1097
|
+
id: string;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* The physical address associated with this payout account
|
|
1101
|
+
*/
|
|
1102
|
+
address: Data.Address | null;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* The company's legal name
|
|
1106
|
+
*/
|
|
1107
|
+
business_name: string | null;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* The business representative for this payout account
|
|
1111
|
+
*/
|
|
1112
|
+
business_representative: Data.BusinessRepresentative | null;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* The email address of the representative
|
|
1116
|
+
*/
|
|
1117
|
+
email: string | null;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* The latest verification for the connected account.
|
|
1121
|
+
*/
|
|
1122
|
+
latest_verification: Data.LatestVerification | null;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* The business representative's phone
|
|
1126
|
+
*/
|
|
1127
|
+
phone: string | null;
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
1131
|
+
* readiness.
|
|
1132
|
+
*/
|
|
1133
|
+
status: PayoutAccountsAPI.PayoutAccountCalculatedStatuses | null;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export namespace Data {
|
|
1137
|
+
/**
|
|
1138
|
+
* The physical address associated with this payout account
|
|
1139
|
+
*/
|
|
1140
|
+
export interface Address {
|
|
1141
|
+
/**
|
|
1142
|
+
* The city of the address.
|
|
1143
|
+
*/
|
|
1144
|
+
city: string | null;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* The country of the address.
|
|
1148
|
+
*/
|
|
1149
|
+
country: string | null;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* The line 1 of the address.
|
|
1153
|
+
*/
|
|
1154
|
+
line1: string | null;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* The line 2 of the address.
|
|
1158
|
+
*/
|
|
1159
|
+
line2: string | null;
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* The postal code of the address.
|
|
1163
|
+
*/
|
|
1164
|
+
postal_code: string | null;
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* The state of the address.
|
|
1168
|
+
*/
|
|
1169
|
+
state: string | null;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* The business representative for this payout account
|
|
1174
|
+
*/
|
|
1175
|
+
export interface BusinessRepresentative {
|
|
1176
|
+
/**
|
|
1177
|
+
* The date of birth of the business representative in ISO 8601 format
|
|
1178
|
+
* (YYYY-MM-DD).
|
|
1179
|
+
*/
|
|
1180
|
+
date_of_birth: string | null;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* The first name of the business representative.
|
|
1184
|
+
*/
|
|
1185
|
+
first_name: string | null;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* The last name of the business representative.
|
|
1189
|
+
*/
|
|
1190
|
+
last_name: string | null;
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* The middle name of the business representative.
|
|
1194
|
+
*/
|
|
1195
|
+
middle_name: string | null;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* The latest verification for the connected account.
|
|
1200
|
+
*/
|
|
1201
|
+
export interface LatestVerification {
|
|
1202
|
+
/**
|
|
1203
|
+
* The unique identifier for the verification.
|
|
1204
|
+
*/
|
|
1205
|
+
id: string;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* An error code for a verification attempt.
|
|
1209
|
+
*/
|
|
1210
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
1214
|
+
* error has occurred.
|
|
1215
|
+
*/
|
|
1216
|
+
last_error_reason: string | null;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* The current status of this verification session.
|
|
1220
|
+
*/
|
|
1221
|
+
status: VerificationsAPI.VerificationStatus;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1055
1226
|
export interface PaymentCreatedWebhookEvent {
|
|
1056
1227
|
/**
|
|
1057
1228
|
* A unique ID for every single webhook request
|
|
@@ -2086,6 +2257,7 @@ export type UnwrapWebhookEvent =
|
|
|
2086
2257
|
| CourseLessonInteractionCompletedWebhookEvent
|
|
2087
2258
|
| PayoutMethodCreatedWebhookEvent
|
|
2088
2259
|
| VerificationSucceededWebhookEvent
|
|
2260
|
+
| PayoutAccountStatusUpdatedWebhookEvent
|
|
2089
2261
|
| PaymentCreatedWebhookEvent
|
|
2090
2262
|
| PaymentSucceededWebhookEvent
|
|
2091
2263
|
| PaymentFailedWebhookEvent
|
|
@@ -2206,6 +2378,7 @@ export declare namespace Webhooks {
|
|
|
2206
2378
|
type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
|
|
2207
2379
|
type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent,
|
|
2208
2380
|
type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent,
|
|
2381
|
+
type PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent,
|
|
2209
2382
|
type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent,
|
|
2210
2383
|
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
2211
2384
|
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.34'; // 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.34";
|
|
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.34";
|
|
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.34'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|