@whop/sdk 0.0.31 → 0.0.33
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 +32 -0
- package/client.d.mts +18 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -6
- package/client.d.ts.map +1 -1
- package/client.js +12 -0
- package/client.js.map +1 -1
- package/client.mjs +12 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai-chats.d.mts +4 -0
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +4 -0
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +7 -66
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +7 -66
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +6 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -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/products.d.mts +10 -0
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +10 -0
- package/resources/products.d.ts.map +1 -1
- package/resources/resolution-center-cases.d.mts +367 -0
- package/resources/resolution-center-cases.d.mts.map +1 -0
- package/resources/resolution-center-cases.d.ts +367 -0
- package/resources/resolution-center-cases.d.ts.map +1 -0
- package/resources/resolution-center-cases.js +38 -0
- package/resources/resolution-center-cases.js.map +1 -0
- package/resources/resolution-center-cases.mjs +34 -0
- package/resources/resolution-center-cases.mjs.map +1 -0
- package/resources/shared.d.mts +8 -7
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +8 -7
- package/resources/shared.d.ts.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 +56 -4
- package/src/resources/ai-chats.ts +5 -0
- package/src/resources/authorized-users.ts +7 -80
- package/src/resources/index.ts +22 -2
- package/src/resources/ledger-accounts.ts +7 -0
- package/src/resources/payout-accounts.ts +177 -0
- package/src/resources/products.ts +12 -0
- package/src/resources/resolution-center-cases.ts +492 -0
- package/src/resources/shared.ts +8 -22
- 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
package/src/client.ts
CHANGED
|
@@ -48,14 +48,13 @@ import {
|
|
|
48
48
|
Apps,
|
|
49
49
|
} from './resources/apps';
|
|
50
50
|
import {
|
|
51
|
+
AuthorizedUser,
|
|
51
52
|
AuthorizedUserCreateParams,
|
|
52
|
-
AuthorizedUserCreateResponse,
|
|
53
53
|
AuthorizedUserDeleteParams,
|
|
54
54
|
AuthorizedUserDeleteResponse,
|
|
55
55
|
AuthorizedUserListParams,
|
|
56
56
|
AuthorizedUserListResponse,
|
|
57
57
|
AuthorizedUserListResponsesCursorPage,
|
|
58
|
-
AuthorizedUserRetrieveResponse,
|
|
59
58
|
AuthorizedUsers,
|
|
60
59
|
} from './resources/authorized-users';
|
|
61
60
|
import {
|
|
@@ -299,6 +298,11 @@ import {
|
|
|
299
298
|
Payments,
|
|
300
299
|
ReceiptTaxBehavior,
|
|
301
300
|
} from './resources/payments';
|
|
301
|
+
import {
|
|
302
|
+
PayoutAccountCalculatedStatuses,
|
|
303
|
+
PayoutAccountRetrieveResponse,
|
|
304
|
+
PayoutAccounts,
|
|
305
|
+
} from './resources/payout-accounts';
|
|
302
306
|
import {
|
|
303
307
|
PayoutDestinationCategory,
|
|
304
308
|
PayoutMethodListParams,
|
|
@@ -354,6 +358,18 @@ import {
|
|
|
354
358
|
RefundStatus,
|
|
355
359
|
Refunds,
|
|
356
360
|
} from './resources/refunds';
|
|
361
|
+
import {
|
|
362
|
+
ResolutionCenterCaseCustomerResponse,
|
|
363
|
+
ResolutionCenterCaseIssueType,
|
|
364
|
+
ResolutionCenterCaseListParams,
|
|
365
|
+
ResolutionCenterCaseListResponse,
|
|
366
|
+
ResolutionCenterCaseListResponsesCursorPage,
|
|
367
|
+
ResolutionCenterCaseMerchantResponse,
|
|
368
|
+
ResolutionCenterCasePlatformResponse,
|
|
369
|
+
ResolutionCenterCaseRetrieveResponse,
|
|
370
|
+
ResolutionCenterCaseStatus,
|
|
371
|
+
ResolutionCenterCases,
|
|
372
|
+
} from './resources/resolution-center-cases';
|
|
357
373
|
import {
|
|
358
374
|
ReviewListParams,
|
|
359
375
|
ReviewListResponse,
|
|
@@ -401,6 +417,9 @@ import {
|
|
|
401
417
|
} from './resources/users';
|
|
402
418
|
import {
|
|
403
419
|
VerificationErrorCode,
|
|
420
|
+
VerificationListParams,
|
|
421
|
+
VerificationListResponse,
|
|
422
|
+
VerificationListResponsesCursorPage,
|
|
404
423
|
VerificationRetrieveResponse,
|
|
405
424
|
VerificationStatus,
|
|
406
425
|
Verifications,
|
|
@@ -426,6 +445,7 @@ import {
|
|
|
426
445
|
PaymentFailedWebhookEvent,
|
|
427
446
|
PaymentPendingWebhookEvent,
|
|
428
447
|
PaymentSucceededWebhookEvent,
|
|
448
|
+
PayoutAccountStatusUpdatedWebhookEvent,
|
|
429
449
|
PayoutMethodCreatedWebhookEvent,
|
|
430
450
|
RefundCreatedWebhookEvent,
|
|
431
451
|
RefundUpdatedWebhookEvent,
|
|
@@ -1404,6 +1424,14 @@ export class Whop {
|
|
|
1404
1424
|
* Dispute alerts
|
|
1405
1425
|
*/
|
|
1406
1426
|
disputeAlerts: API.DisputeAlerts = new API.DisputeAlerts(this);
|
|
1427
|
+
/**
|
|
1428
|
+
* Resolution center cases
|
|
1429
|
+
*/
|
|
1430
|
+
resolutionCenterCases: API.ResolutionCenterCases = new API.ResolutionCenterCases(this);
|
|
1431
|
+
/**
|
|
1432
|
+
* Payout accounts
|
|
1433
|
+
*/
|
|
1434
|
+
payoutAccounts: API.PayoutAccounts = new API.PayoutAccounts(this);
|
|
1407
1435
|
}
|
|
1408
1436
|
|
|
1409
1437
|
Whop.Apps = Apps;
|
|
@@ -1456,6 +1484,8 @@ Whop.DmMembers = DmMembers;
|
|
|
1456
1484
|
Whop.AIChats = AIChats;
|
|
1457
1485
|
Whop.DmChannels = DmChannels;
|
|
1458
1486
|
Whop.DisputeAlerts = DisputeAlerts;
|
|
1487
|
+
Whop.ResolutionCenterCases = ResolutionCenterCases;
|
|
1488
|
+
Whop.PayoutAccounts = PayoutAccounts;
|
|
1459
1489
|
|
|
1460
1490
|
export declare namespace Whop {
|
|
1461
1491
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1529,6 +1559,7 @@ export declare namespace Whop {
|
|
|
1529
1559
|
type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
|
|
1530
1560
|
type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent,
|
|
1531
1561
|
type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent,
|
|
1562
|
+
type PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent,
|
|
1532
1563
|
type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent,
|
|
1533
1564
|
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
1534
1565
|
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
|
@@ -1601,8 +1632,7 @@ export declare namespace Whop {
|
|
|
1601
1632
|
|
|
1602
1633
|
export {
|
|
1603
1634
|
AuthorizedUsers as AuthorizedUsers,
|
|
1604
|
-
type
|
|
1605
|
-
type AuthorizedUserRetrieveResponse as AuthorizedUserRetrieveResponse,
|
|
1635
|
+
type AuthorizedUser as AuthorizedUser,
|
|
1606
1636
|
type AuthorizedUserListResponse as AuthorizedUserListResponse,
|
|
1607
1637
|
type AuthorizedUserDeleteResponse as AuthorizedUserDeleteResponse,
|
|
1608
1638
|
type AuthorizedUserListResponsesCursorPage as AuthorizedUserListResponsesCursorPage,
|
|
@@ -1892,6 +1922,9 @@ export declare namespace Whop {
|
|
|
1892
1922
|
type VerificationErrorCode as VerificationErrorCode,
|
|
1893
1923
|
type VerificationStatus as VerificationStatus,
|
|
1894
1924
|
type VerificationRetrieveResponse as VerificationRetrieveResponse,
|
|
1925
|
+
type VerificationListResponse as VerificationListResponse,
|
|
1926
|
+
type VerificationListResponsesCursorPage as VerificationListResponsesCursorPage,
|
|
1927
|
+
type VerificationListParams as VerificationListParams,
|
|
1895
1928
|
};
|
|
1896
1929
|
|
|
1897
1930
|
export {
|
|
@@ -1972,6 +2005,25 @@ export declare namespace Whop {
|
|
|
1972
2005
|
type DisputeAlertListParams as DisputeAlertListParams,
|
|
1973
2006
|
};
|
|
1974
2007
|
|
|
2008
|
+
export {
|
|
2009
|
+
ResolutionCenterCases as ResolutionCenterCases,
|
|
2010
|
+
type ResolutionCenterCaseCustomerResponse as ResolutionCenterCaseCustomerResponse,
|
|
2011
|
+
type ResolutionCenterCaseIssueType as ResolutionCenterCaseIssueType,
|
|
2012
|
+
type ResolutionCenterCaseMerchantResponse as ResolutionCenterCaseMerchantResponse,
|
|
2013
|
+
type ResolutionCenterCasePlatformResponse as ResolutionCenterCasePlatformResponse,
|
|
2014
|
+
type ResolutionCenterCaseStatus as ResolutionCenterCaseStatus,
|
|
2015
|
+
type ResolutionCenterCaseRetrieveResponse as ResolutionCenterCaseRetrieveResponse,
|
|
2016
|
+
type ResolutionCenterCaseListResponse as ResolutionCenterCaseListResponse,
|
|
2017
|
+
type ResolutionCenterCaseListResponsesCursorPage as ResolutionCenterCaseListResponsesCursorPage,
|
|
2018
|
+
type ResolutionCenterCaseListParams as ResolutionCenterCaseListParams,
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
export {
|
|
2022
|
+
PayoutAccounts as PayoutAccounts,
|
|
2023
|
+
type PayoutAccountCalculatedStatuses as PayoutAccountCalculatedStatuses,
|
|
2024
|
+
type PayoutAccountRetrieveResponse as PayoutAccountRetrieveResponse,
|
|
2025
|
+
};
|
|
2026
|
+
|
|
1975
2027
|
export type AccessLevel = API.AccessLevel;
|
|
1976
2028
|
export type AccessPassType = API.AccessPassType;
|
|
1977
2029
|
export type App = API.App;
|
|
@@ -267,6 +267,11 @@ export interface AIChatListParams extends CursorPageParams {
|
|
|
267
267
|
* Returns the last _n_ elements from the list.
|
|
268
268
|
*/
|
|
269
269
|
last?: number | null;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* When true, returns only chats with an active cron schedule
|
|
273
|
+
*/
|
|
274
|
+
only_active_crons?: boolean | null;
|
|
270
275
|
}
|
|
271
276
|
|
|
272
277
|
export declare namespace AIChats {
|
|
@@ -28,10 +28,7 @@ export class AuthorizedUsers extends APIResource {
|
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
create(
|
|
32
|
-
body: AuthorizedUserCreateParams,
|
|
33
|
-
options?: RequestOptions,
|
|
34
|
-
): APIPromise<AuthorizedUserCreateResponse> {
|
|
31
|
+
create(body: AuthorizedUserCreateParams, options?: RequestOptions): APIPromise<AuthorizedUser> {
|
|
35
32
|
return this._client.post('/authorized_users', { body, ...options });
|
|
36
33
|
}
|
|
37
34
|
|
|
@@ -51,7 +48,7 @@ export class AuthorizedUsers extends APIResource {
|
|
|
51
48
|
* );
|
|
52
49
|
* ```
|
|
53
50
|
*/
|
|
54
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
51
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AuthorizedUser> {
|
|
55
52
|
return this._client.get(path`/authorized_users/${id}`, options);
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -112,76 +109,7 @@ export type AuthorizedUserListResponsesCursorPage = CursorPage<AuthorizedUserLis
|
|
|
112
109
|
* A user who has been granted administrative access to manage a company's
|
|
113
110
|
* dashboard and settings.
|
|
114
111
|
*/
|
|
115
|
-
export interface
|
|
116
|
-
/**
|
|
117
|
-
* The unique identifier for the authorized user.
|
|
118
|
-
*/
|
|
119
|
-
id: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The company this authorized user has access to.
|
|
123
|
-
*/
|
|
124
|
-
company: AuthorizedUserCreateResponse.Company;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* The permission role assigned to this authorized user within the company.
|
|
128
|
-
*/
|
|
129
|
-
role: Shared.AuthorizedUserRoles;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The user account linked to this authorized user record.
|
|
133
|
-
*/
|
|
134
|
-
user: AuthorizedUserCreateResponse.User;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export namespace AuthorizedUserCreateResponse {
|
|
138
|
-
/**
|
|
139
|
-
* The company this authorized user has access to.
|
|
140
|
-
*/
|
|
141
|
-
export interface Company {
|
|
142
|
-
/**
|
|
143
|
-
* The unique identifier for the company.
|
|
144
|
-
*/
|
|
145
|
-
id: string;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* The display name of the company shown to customers.
|
|
149
|
-
*/
|
|
150
|
-
title: string;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The user account linked to this authorized user record.
|
|
155
|
-
*/
|
|
156
|
-
export interface User {
|
|
157
|
-
/**
|
|
158
|
-
* The unique identifier for the user.
|
|
159
|
-
*/
|
|
160
|
-
id: string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* The user's email address. Requires the member:email:read permission to access.
|
|
164
|
-
* Null if not authorized.
|
|
165
|
-
*/
|
|
166
|
-
email: string | null;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The user's display name shown on their public profile.
|
|
170
|
-
*/
|
|
171
|
-
name: string | null;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The user's unique username shown on their public profile.
|
|
175
|
-
*/
|
|
176
|
-
username: string;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* A user who has been granted administrative access to manage a company's
|
|
182
|
-
* dashboard and settings.
|
|
183
|
-
*/
|
|
184
|
-
export interface AuthorizedUserRetrieveResponse {
|
|
112
|
+
export interface AuthorizedUser {
|
|
185
113
|
/**
|
|
186
114
|
* The unique identifier for the authorized user.
|
|
187
115
|
*/
|
|
@@ -190,7 +118,7 @@ export interface AuthorizedUserRetrieveResponse {
|
|
|
190
118
|
/**
|
|
191
119
|
* The company this authorized user has access to.
|
|
192
120
|
*/
|
|
193
|
-
company:
|
|
121
|
+
company: AuthorizedUser.Company;
|
|
194
122
|
|
|
195
123
|
/**
|
|
196
124
|
* The permission role assigned to this authorized user within the company.
|
|
@@ -200,10 +128,10 @@ export interface AuthorizedUserRetrieveResponse {
|
|
|
200
128
|
/**
|
|
201
129
|
* The user account linked to this authorized user record.
|
|
202
130
|
*/
|
|
203
|
-
user:
|
|
131
|
+
user: AuthorizedUser.User;
|
|
204
132
|
}
|
|
205
133
|
|
|
206
|
-
export namespace
|
|
134
|
+
export namespace AuthorizedUser {
|
|
207
135
|
/**
|
|
208
136
|
* The company this authorized user has access to.
|
|
209
137
|
*/
|
|
@@ -396,8 +324,7 @@ export interface AuthorizedUserDeleteParams {
|
|
|
396
324
|
|
|
397
325
|
export declare namespace AuthorizedUsers {
|
|
398
326
|
export {
|
|
399
|
-
type
|
|
400
|
-
type AuthorizedUserRetrieveResponse as AuthorizedUserRetrieveResponse,
|
|
327
|
+
type AuthorizedUser as AuthorizedUser,
|
|
401
328
|
type AuthorizedUserListResponse as AuthorizedUserListResponse,
|
|
402
329
|
type AuthorizedUserDeleteResponse as AuthorizedUserDeleteResponse,
|
|
403
330
|
type AuthorizedUserListResponsesCursorPage as AuthorizedUserListResponsesCursorPage,
|
package/src/resources/index.ts
CHANGED
|
@@ -31,8 +31,7 @@ export {
|
|
|
31
31
|
} from './apps';
|
|
32
32
|
export {
|
|
33
33
|
AuthorizedUsers,
|
|
34
|
-
type
|
|
35
|
-
type AuthorizedUserRetrieveResponse,
|
|
34
|
+
type AuthorizedUser,
|
|
36
35
|
type AuthorizedUserListResponse,
|
|
37
36
|
type AuthorizedUserDeleteResponse,
|
|
38
37
|
type AuthorizedUserCreateParams,
|
|
@@ -286,6 +285,11 @@ export {
|
|
|
286
285
|
type PaymentListResponsesCursorPage,
|
|
287
286
|
type PaymentListFeesResponsesCursorPage,
|
|
288
287
|
} from './payments';
|
|
288
|
+
export {
|
|
289
|
+
PayoutAccounts,
|
|
290
|
+
type PayoutAccountCalculatedStatuses,
|
|
291
|
+
type PayoutAccountRetrieveResponse,
|
|
292
|
+
} from './payout-accounts';
|
|
289
293
|
export {
|
|
290
294
|
PayoutMethods,
|
|
291
295
|
type PayoutDestinationCategory,
|
|
@@ -341,6 +345,18 @@ export {
|
|
|
341
345
|
type RefundListParams,
|
|
342
346
|
type RefundListResponsesCursorPage,
|
|
343
347
|
} from './refunds';
|
|
348
|
+
export {
|
|
349
|
+
ResolutionCenterCases,
|
|
350
|
+
type ResolutionCenterCaseCustomerResponse,
|
|
351
|
+
type ResolutionCenterCaseIssueType,
|
|
352
|
+
type ResolutionCenterCaseMerchantResponse,
|
|
353
|
+
type ResolutionCenterCasePlatformResponse,
|
|
354
|
+
type ResolutionCenterCaseStatus,
|
|
355
|
+
type ResolutionCenterCaseRetrieveResponse,
|
|
356
|
+
type ResolutionCenterCaseListResponse,
|
|
357
|
+
type ResolutionCenterCaseListParams,
|
|
358
|
+
type ResolutionCenterCaseListResponsesCursorPage,
|
|
359
|
+
} from './resolution-center-cases';
|
|
344
360
|
export {
|
|
345
361
|
Reviews,
|
|
346
362
|
type ReviewStatus,
|
|
@@ -391,6 +407,9 @@ export {
|
|
|
391
407
|
type VerificationErrorCode,
|
|
392
408
|
type VerificationStatus,
|
|
393
409
|
type VerificationRetrieveResponse,
|
|
410
|
+
type VerificationListResponse,
|
|
411
|
+
type VerificationListParams,
|
|
412
|
+
type VerificationListResponsesCursorPage,
|
|
394
413
|
} from './verifications';
|
|
395
414
|
export {
|
|
396
415
|
Webhooks,
|
|
@@ -418,6 +437,7 @@ export {
|
|
|
418
437
|
type CourseLessonInteractionCompletedWebhookEvent,
|
|
419
438
|
type PayoutMethodCreatedWebhookEvent,
|
|
420
439
|
type VerificationSucceededWebhookEvent,
|
|
440
|
+
type PayoutAccountStatusUpdatedWebhookEvent,
|
|
421
441
|
type PaymentCreatedWebhookEvent,
|
|
422
442
|
type PaymentSucceededWebhookEvent,
|
|
423
443
|
type PaymentFailedWebhookEvent,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as PayoutAccountsAPI from './payout-accounts';
|
|
4
5
|
import * as Shared from './shared';
|
|
5
6
|
import * as VerificationsAPI from './verifications';
|
|
6
7
|
import { APIPromise } from '../core/api-promise';
|
|
@@ -181,6 +182,12 @@ export namespace LedgerAccountRetrieveResponse {
|
|
|
181
182
|
* The business representative's phone
|
|
182
183
|
*/
|
|
183
184
|
phone: string | null;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
188
|
+
* readiness.
|
|
189
|
+
*/
|
|
190
|
+
status: PayoutAccountsAPI.PayoutAccountCalculatedStatuses | null;
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
export namespace PayoutAccountDetails {
|
|
@@ -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
|
+
}
|
|
@@ -214,6 +214,12 @@ export interface ProductCreateParams {
|
|
|
214
214
|
*/
|
|
215
215
|
route?: string | null;
|
|
216
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Whether to send an automated welcome message via support chat when a user joins
|
|
219
|
+
* this product. Defaults to true.
|
|
220
|
+
*/
|
|
221
|
+
send_welcome_message?: boolean | null;
|
|
222
|
+
|
|
217
223
|
/**
|
|
218
224
|
* Visibility of a resource
|
|
219
225
|
*/
|
|
@@ -379,6 +385,12 @@ export interface ProductUpdateParams {
|
|
|
379
385
|
*/
|
|
380
386
|
route?: string | null;
|
|
381
387
|
|
|
388
|
+
/**
|
|
389
|
+
* Whether to send an automated welcome message via support chat when a user joins
|
|
390
|
+
* this product.
|
|
391
|
+
*/
|
|
392
|
+
send_welcome_message?: boolean | null;
|
|
393
|
+
|
|
382
394
|
/**
|
|
383
395
|
* Layout and display configuration for this product on the company's store page.
|
|
384
396
|
*/
|