@whop/sdk 0.0.32 → 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 +14 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- 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 +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- 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/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 +24 -0
- package/src/resources/index.ts +9 -0
- package/src/resources/ledger-accounts.ts +7 -0
- package/src/resources/payout-accounts.ts +177 -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,139 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as VerificationsAPI from "./verifications.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Payout accounts
|
|
7
|
+
*/
|
|
8
|
+
export declare class PayoutAccounts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves the details of an existing payout account.
|
|
11
|
+
*
|
|
12
|
+
* Required permissions:
|
|
13
|
+
*
|
|
14
|
+
* - `payout:account:read`
|
|
15
|
+
*/
|
|
16
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<PayoutAccountRetrieveResponse>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
20
|
+
* readiness.
|
|
21
|
+
*/
|
|
22
|
+
export type PayoutAccountCalculatedStatuses = 'connected' | 'disabled' | 'action_required' | 'pending_verification' | 'verification_failed' | 'not_started';
|
|
23
|
+
/**
|
|
24
|
+
* An object representing an account used for payouts.
|
|
25
|
+
*/
|
|
26
|
+
export interface PayoutAccountRetrieveResponse {
|
|
27
|
+
/**
|
|
28
|
+
* The unique identifier for the payout account.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The physical address associated with this payout account
|
|
33
|
+
*/
|
|
34
|
+
address: PayoutAccountRetrieveResponse.Address | null;
|
|
35
|
+
/**
|
|
36
|
+
* The company's legal name
|
|
37
|
+
*/
|
|
38
|
+
business_name: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* The business representative for this payout account
|
|
41
|
+
*/
|
|
42
|
+
business_representative: PayoutAccountRetrieveResponse.BusinessRepresentative | null;
|
|
43
|
+
/**
|
|
44
|
+
* The email address of the representative
|
|
45
|
+
*/
|
|
46
|
+
email: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* The latest verification for the connected account.
|
|
49
|
+
*/
|
|
50
|
+
latest_verification: PayoutAccountRetrieveResponse.LatestVerification | null;
|
|
51
|
+
/**
|
|
52
|
+
* The business representative's phone
|
|
53
|
+
*/
|
|
54
|
+
phone: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
57
|
+
* readiness.
|
|
58
|
+
*/
|
|
59
|
+
status: PayoutAccountCalculatedStatuses | null;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace PayoutAccountRetrieveResponse {
|
|
62
|
+
/**
|
|
63
|
+
* The physical address associated with this payout account
|
|
64
|
+
*/
|
|
65
|
+
interface Address {
|
|
66
|
+
/**
|
|
67
|
+
* The city of the address.
|
|
68
|
+
*/
|
|
69
|
+
city: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* The country of the address.
|
|
72
|
+
*/
|
|
73
|
+
country: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* The line 1 of the address.
|
|
76
|
+
*/
|
|
77
|
+
line1: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* The line 2 of the address.
|
|
80
|
+
*/
|
|
81
|
+
line2: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* The postal code of the address.
|
|
84
|
+
*/
|
|
85
|
+
postal_code: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* The state of the address.
|
|
88
|
+
*/
|
|
89
|
+
state: string | null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The business representative for this payout account
|
|
93
|
+
*/
|
|
94
|
+
interface BusinessRepresentative {
|
|
95
|
+
/**
|
|
96
|
+
* The date of birth of the business representative in ISO 8601 format
|
|
97
|
+
* (YYYY-MM-DD).
|
|
98
|
+
*/
|
|
99
|
+
date_of_birth: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* The first name of the business representative.
|
|
102
|
+
*/
|
|
103
|
+
first_name: string | null;
|
|
104
|
+
/**
|
|
105
|
+
* The last name of the business representative.
|
|
106
|
+
*/
|
|
107
|
+
last_name: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* The middle name of the business representative.
|
|
110
|
+
*/
|
|
111
|
+
middle_name: string | null;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The latest verification for the connected account.
|
|
115
|
+
*/
|
|
116
|
+
interface LatestVerification {
|
|
117
|
+
/**
|
|
118
|
+
* The unique identifier for the verification.
|
|
119
|
+
*/
|
|
120
|
+
id: string;
|
|
121
|
+
/**
|
|
122
|
+
* An error code for a verification attempt.
|
|
123
|
+
*/
|
|
124
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
125
|
+
/**
|
|
126
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
127
|
+
* error has occurred.
|
|
128
|
+
*/
|
|
129
|
+
last_error_reason: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* The current status of this verification session.
|
|
132
|
+
*/
|
|
133
|
+
status: VerificationsAPI.VerificationStatus;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
export declare namespace PayoutAccounts {
|
|
137
|
+
export { type PayoutAccountCalculatedStatuses as PayoutAccountCalculatedStatuses, type PayoutAccountRetrieveResponse as PayoutAccountRetrieveResponse, };
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=payout-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout-accounts.d.ts","sourceRoot":"","sources":["../src/resources/payout-accounts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAG1F;AAED;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GACvC,WAAW,GACX,UAAU,GACV,iBAAiB,GACjB,sBAAsB,GACtB,qBAAqB,GACrB,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,6BAA6B,CAAC,OAAO,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,uBAAuB,EAAE,6BAA6B,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAErF;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,mBAAmB,EAAE,6BAA6B,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAE7E;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,MAAM,EAAE,+BAA+B,GAAG,IAAI,CAAC;CAChD;AAED,yBAAiB,6BAA6B,CAAC;IAC7C;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAEpB;;WAEG;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;IAED;;OAEG;IACH,UAAiB,sBAAsB;QACrC;;;WAGG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB;;WAEG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;IAED;;OAEG;IACH,UAAiB,kBAAkB;QACjC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,eAAe,EAAE,gBAAgB,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAE/D;;;WAGG;QACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;QAEjC;;WAEG;QACH,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;KAC7C;CACF;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PayoutAccounts = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Payout accounts
|
|
9
|
+
*/
|
|
10
|
+
class PayoutAccounts extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the details of an existing payout account.
|
|
13
|
+
*
|
|
14
|
+
* Required permissions:
|
|
15
|
+
*
|
|
16
|
+
* - `payout:account:read`
|
|
17
|
+
*/
|
|
18
|
+
retrieve(id, options) {
|
|
19
|
+
return this._client.get((0, path_1.path) `/payout_accounts/${id}`, options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.PayoutAccounts = PayoutAccounts;
|
|
23
|
+
//# sourceMappingURL=payout-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout-accounts.js","sourceRoot":"","sources":["../src/resources/payout-accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAXD,wCAWC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Payout accounts
|
|
6
|
+
*/
|
|
7
|
+
export class PayoutAccounts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the details of an existing payout account.
|
|
10
|
+
*
|
|
11
|
+
* Required permissions:
|
|
12
|
+
*
|
|
13
|
+
* - `payout:account:read`
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get(path `/payout_accounts/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=payout-accounts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout-accounts.mjs","sourceRoot":"","sources":["../src/resources/payout-accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* Verifications
|
|
@@ -13,7 +14,17 @@ export declare class Verifications extends APIResource {
|
|
|
13
14
|
* - `payout:account:read`
|
|
14
15
|
*/
|
|
15
16
|
retrieve(id: string, options?: RequestOptions): APIPromise<VerificationRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a list of identity verifications for a payout account, ordered by most
|
|
19
|
+
* recent first.
|
|
20
|
+
*
|
|
21
|
+
* Required permissions:
|
|
22
|
+
*
|
|
23
|
+
* - `payout:account:read`
|
|
24
|
+
*/
|
|
25
|
+
list(query: VerificationListParams, options?: RequestOptions): PagePromise<VerificationListResponsesCursorPage, VerificationListResponse>;
|
|
16
26
|
}
|
|
27
|
+
export type VerificationListResponsesCursorPage = CursorPage<VerificationListResponse>;
|
|
17
28
|
/**
|
|
18
29
|
* An error code for a verification attempt.
|
|
19
30
|
*/
|
|
@@ -45,7 +56,48 @@ export interface VerificationRetrieveResponse {
|
|
|
45
56
|
*/
|
|
46
57
|
status: VerificationStatus;
|
|
47
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* An identity verification session used to confirm a person or entity's identity
|
|
61
|
+
* for payout account eligibility.
|
|
62
|
+
*/
|
|
63
|
+
export interface VerificationListResponse {
|
|
64
|
+
/**
|
|
65
|
+
* The unique identifier for the verification.
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* An error code for a verification attempt.
|
|
70
|
+
*/
|
|
71
|
+
last_error_code: VerificationErrorCode | null;
|
|
72
|
+
/**
|
|
73
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
74
|
+
* error has occurred.
|
|
75
|
+
*/
|
|
76
|
+
last_error_reason: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* The current status of this verification session.
|
|
79
|
+
*/
|
|
80
|
+
status: VerificationStatus;
|
|
81
|
+
}
|
|
82
|
+
export interface VerificationListParams extends CursorPageParams {
|
|
83
|
+
/**
|
|
84
|
+
* The unique identifier of the payout account to list verifications for.
|
|
85
|
+
*/
|
|
86
|
+
payout_account_id: string;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
89
|
+
*/
|
|
90
|
+
before?: string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the first _n_ elements from the list.
|
|
93
|
+
*/
|
|
94
|
+
first?: number | null;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the last _n_ elements from the list.
|
|
97
|
+
*/
|
|
98
|
+
last?: number | null;
|
|
99
|
+
}
|
|
48
100
|
export declare namespace Verifications {
|
|
49
|
-
export { type VerificationErrorCode as VerificationErrorCode, type VerificationStatus as VerificationStatus, type VerificationRetrieveResponse as VerificationRetrieveResponse, };
|
|
101
|
+
export { type VerificationErrorCode as VerificationErrorCode, type VerificationStatus as VerificationStatus, type VerificationRetrieveResponse as VerificationRetrieveResponse, type VerificationListResponse as VerificationListResponse, type VerificationListResponsesCursorPage as VerificationListResponsesCursorPage, type VerificationListParams as VerificationListParams, };
|
|
50
102
|
}
|
|
51
103
|
//# sourceMappingURL=verifications.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.d.mts","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"verifications.d.mts","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAIxF;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,wBAAwB,CAAC;CAM9E;AAED,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAEvF;;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;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
5
|
/**
|
|
5
6
|
* Verifications
|
|
@@ -13,7 +14,17 @@ export declare class Verifications extends APIResource {
|
|
|
13
14
|
* - `payout:account:read`
|
|
14
15
|
*/
|
|
15
16
|
retrieve(id: string, options?: RequestOptions): APIPromise<VerificationRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a list of identity verifications for a payout account, ordered by most
|
|
19
|
+
* recent first.
|
|
20
|
+
*
|
|
21
|
+
* Required permissions:
|
|
22
|
+
*
|
|
23
|
+
* - `payout:account:read`
|
|
24
|
+
*/
|
|
25
|
+
list(query: VerificationListParams, options?: RequestOptions): PagePromise<VerificationListResponsesCursorPage, VerificationListResponse>;
|
|
16
26
|
}
|
|
27
|
+
export type VerificationListResponsesCursorPage = CursorPage<VerificationListResponse>;
|
|
17
28
|
/**
|
|
18
29
|
* An error code for a verification attempt.
|
|
19
30
|
*/
|
|
@@ -45,7 +56,48 @@ export interface VerificationRetrieveResponse {
|
|
|
45
56
|
*/
|
|
46
57
|
status: VerificationStatus;
|
|
47
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* An identity verification session used to confirm a person or entity's identity
|
|
61
|
+
* for payout account eligibility.
|
|
62
|
+
*/
|
|
63
|
+
export interface VerificationListResponse {
|
|
64
|
+
/**
|
|
65
|
+
* The unique identifier for the verification.
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* An error code for a verification attempt.
|
|
70
|
+
*/
|
|
71
|
+
last_error_code: VerificationErrorCode | null;
|
|
72
|
+
/**
|
|
73
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
74
|
+
* error has occurred.
|
|
75
|
+
*/
|
|
76
|
+
last_error_reason: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* The current status of this verification session.
|
|
79
|
+
*/
|
|
80
|
+
status: VerificationStatus;
|
|
81
|
+
}
|
|
82
|
+
export interface VerificationListParams extends CursorPageParams {
|
|
83
|
+
/**
|
|
84
|
+
* The unique identifier of the payout account to list verifications for.
|
|
85
|
+
*/
|
|
86
|
+
payout_account_id: string;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
89
|
+
*/
|
|
90
|
+
before?: string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the first _n_ elements from the list.
|
|
93
|
+
*/
|
|
94
|
+
first?: number | null;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the last _n_ elements from the list.
|
|
97
|
+
*/
|
|
98
|
+
last?: number | null;
|
|
99
|
+
}
|
|
48
100
|
export declare namespace Verifications {
|
|
49
|
-
export { type VerificationErrorCode as VerificationErrorCode, type VerificationStatus as VerificationStatus, type VerificationRetrieveResponse as VerificationRetrieveResponse, };
|
|
101
|
+
export { type VerificationErrorCode as VerificationErrorCode, type VerificationStatus as VerificationStatus, type VerificationRetrieveResponse as VerificationRetrieveResponse, type VerificationListResponse as VerificationListResponse, type VerificationListResponsesCursorPage as VerificationListResponsesCursorPage, type VerificationListParams as VerificationListParams, };
|
|
50
102
|
}
|
|
51
103
|
//# 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;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;
|
|
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,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAIxF;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,wBAAwB,CAAC;CAM9E;AAED,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAEvF;;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;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Verifications = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
6
7
|
const path_1 = require("../internal/utils/path.js");
|
|
7
8
|
/**
|
|
8
9
|
* Verifications
|
|
@@ -18,6 +19,20 @@ class Verifications extends resource_1.APIResource {
|
|
|
18
19
|
retrieve(id, options) {
|
|
19
20
|
return this._client.get((0, path_1.path) `/verifications/${id}`, options);
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns a list of identity verifications for a payout account, ordered by most
|
|
24
|
+
* recent first.
|
|
25
|
+
*
|
|
26
|
+
* Required permissions:
|
|
27
|
+
*
|
|
28
|
+
* - `payout:account:read`
|
|
29
|
+
*/
|
|
30
|
+
list(query, options) {
|
|
31
|
+
return this._client.getAPIList('/verifications', (pagination_1.CursorPage), {
|
|
32
|
+
query,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
21
36
|
}
|
|
22
37
|
exports.Verifications = Verifications;
|
|
23
38
|
//# sourceMappingURL=verifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.js","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"verifications.js","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,uBAAoC,CAAA,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,sCA6BC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
3
4
|
import { path } from "../internal/utils/path.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* Verifications
|
|
@@ -15,5 +16,19 @@ export class Verifications extends APIResource {
|
|
|
15
16
|
retrieve(id, options) {
|
|
16
17
|
return this._client.get(path `/verifications/${id}`, options);
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns a list of identity verifications for a payout account, ordered by most
|
|
21
|
+
* recent first.
|
|
22
|
+
*
|
|
23
|
+
* Required permissions:
|
|
24
|
+
*
|
|
25
|
+
* - `payout:account:read`
|
|
26
|
+
*/
|
|
27
|
+
list(query, options) {
|
|
28
|
+
return this._client.getAPIList('/verifications', (CursorPage), {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
18
33
|
}
|
|
19
34
|
//# sourceMappingURL=verifications.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.mjs","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"verifications.mjs","sourceRoot":"","sources":["../src/resources/verifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,KAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,UAAoC,CAAA,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/webhooks.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import * as DisputeAlertsAPI from "./dispute-alerts.mjs";
|
|
3
3
|
import * as DisputesAPI from "./disputes.mjs";
|
|
4
4
|
import * as PaymentsAPI from "./payments.mjs";
|
|
5
|
+
import * as PayoutAccountsAPI from "./payout-accounts.mjs";
|
|
5
6
|
import * as PayoutMethodsAPI from "./payout-methods.mjs";
|
|
6
7
|
import * as RefundsAPI from "./refunds.mjs";
|
|
7
8
|
import * as SetupIntentsAPI from "./setup-intents.mjs";
|
|
@@ -151,7 +152,7 @@ export interface Webhook {
|
|
|
151
152
|
/**
|
|
152
153
|
* The different event types available
|
|
153
154
|
*/
|
|
154
|
-
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' | 'dispute_alert.created' | 'membership.cancel_at_period_end_changed';
|
|
155
|
+
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' | 'payout_account.status_updated' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'dispute_alert.created' | 'membership.cancel_at_period_end_changed';
|
|
155
156
|
/**
|
|
156
157
|
* A webhook endpoint that receives event notifications for a company via HTTP
|
|
157
158
|
* POST.
|
|
@@ -833,6 +834,147 @@ export declare namespace VerificationSucceededWebhookEvent {
|
|
|
833
834
|
status: VerificationsAPI.VerificationStatus;
|
|
834
835
|
}
|
|
835
836
|
}
|
|
837
|
+
export interface PayoutAccountStatusUpdatedWebhookEvent {
|
|
838
|
+
/**
|
|
839
|
+
* A unique ID for every single webhook request
|
|
840
|
+
*/
|
|
841
|
+
id: string;
|
|
842
|
+
/**
|
|
843
|
+
* The API version for this webhook
|
|
844
|
+
*/
|
|
845
|
+
api_version: 'v1';
|
|
846
|
+
/**
|
|
847
|
+
* An object representing an account used for payouts.
|
|
848
|
+
*/
|
|
849
|
+
data: PayoutAccountStatusUpdatedWebhookEvent.Data;
|
|
850
|
+
/**
|
|
851
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
852
|
+
*/
|
|
853
|
+
timestamp: string;
|
|
854
|
+
/**
|
|
855
|
+
* The webhook event type
|
|
856
|
+
*/
|
|
857
|
+
type: 'payout_account.status_updated';
|
|
858
|
+
/**
|
|
859
|
+
* The company ID that this webhook event is associated with
|
|
860
|
+
*/
|
|
861
|
+
company_id?: string | null;
|
|
862
|
+
}
|
|
863
|
+
export declare namespace PayoutAccountStatusUpdatedWebhookEvent {
|
|
864
|
+
/**
|
|
865
|
+
* An object representing an account used for payouts.
|
|
866
|
+
*/
|
|
867
|
+
interface Data {
|
|
868
|
+
/**
|
|
869
|
+
* The unique identifier for the payout account.
|
|
870
|
+
*/
|
|
871
|
+
id: string;
|
|
872
|
+
/**
|
|
873
|
+
* The physical address associated with this payout account
|
|
874
|
+
*/
|
|
875
|
+
address: Data.Address | null;
|
|
876
|
+
/**
|
|
877
|
+
* The company's legal name
|
|
878
|
+
*/
|
|
879
|
+
business_name: string | null;
|
|
880
|
+
/**
|
|
881
|
+
* The business representative for this payout account
|
|
882
|
+
*/
|
|
883
|
+
business_representative: Data.BusinessRepresentative | null;
|
|
884
|
+
/**
|
|
885
|
+
* The email address of the representative
|
|
886
|
+
*/
|
|
887
|
+
email: string | null;
|
|
888
|
+
/**
|
|
889
|
+
* The latest verification for the connected account.
|
|
890
|
+
*/
|
|
891
|
+
latest_verification: Data.LatestVerification | null;
|
|
892
|
+
/**
|
|
893
|
+
* The business representative's phone
|
|
894
|
+
*/
|
|
895
|
+
phone: string | null;
|
|
896
|
+
/**
|
|
897
|
+
* The granular calculated statuses reflecting payout account KYC and withdrawal
|
|
898
|
+
* readiness.
|
|
899
|
+
*/
|
|
900
|
+
status: PayoutAccountsAPI.PayoutAccountCalculatedStatuses | null;
|
|
901
|
+
}
|
|
902
|
+
namespace Data {
|
|
903
|
+
/**
|
|
904
|
+
* The physical address associated with this payout account
|
|
905
|
+
*/
|
|
906
|
+
interface Address {
|
|
907
|
+
/**
|
|
908
|
+
* The city of the address.
|
|
909
|
+
*/
|
|
910
|
+
city: string | null;
|
|
911
|
+
/**
|
|
912
|
+
* The country of the address.
|
|
913
|
+
*/
|
|
914
|
+
country: string | null;
|
|
915
|
+
/**
|
|
916
|
+
* The line 1 of the address.
|
|
917
|
+
*/
|
|
918
|
+
line1: string | null;
|
|
919
|
+
/**
|
|
920
|
+
* The line 2 of the address.
|
|
921
|
+
*/
|
|
922
|
+
line2: string | null;
|
|
923
|
+
/**
|
|
924
|
+
* The postal code of the address.
|
|
925
|
+
*/
|
|
926
|
+
postal_code: string | null;
|
|
927
|
+
/**
|
|
928
|
+
* The state of the address.
|
|
929
|
+
*/
|
|
930
|
+
state: string | null;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* The business representative for this payout account
|
|
934
|
+
*/
|
|
935
|
+
interface BusinessRepresentative {
|
|
936
|
+
/**
|
|
937
|
+
* The date of birth of the business representative in ISO 8601 format
|
|
938
|
+
* (YYYY-MM-DD).
|
|
939
|
+
*/
|
|
940
|
+
date_of_birth: string | null;
|
|
941
|
+
/**
|
|
942
|
+
* The first name of the business representative.
|
|
943
|
+
*/
|
|
944
|
+
first_name: string | null;
|
|
945
|
+
/**
|
|
946
|
+
* The last name of the business representative.
|
|
947
|
+
*/
|
|
948
|
+
last_name: string | null;
|
|
949
|
+
/**
|
|
950
|
+
* The middle name of the business representative.
|
|
951
|
+
*/
|
|
952
|
+
middle_name: string | null;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* The latest verification for the connected account.
|
|
956
|
+
*/
|
|
957
|
+
interface LatestVerification {
|
|
958
|
+
/**
|
|
959
|
+
* The unique identifier for the verification.
|
|
960
|
+
*/
|
|
961
|
+
id: string;
|
|
962
|
+
/**
|
|
963
|
+
* An error code for a verification attempt.
|
|
964
|
+
*/
|
|
965
|
+
last_error_code: VerificationsAPI.VerificationErrorCode | null;
|
|
966
|
+
/**
|
|
967
|
+
* A human-readable explanation of the most recent verification error. Null if no
|
|
968
|
+
* error has occurred.
|
|
969
|
+
*/
|
|
970
|
+
last_error_reason: string | null;
|
|
971
|
+
/**
|
|
972
|
+
* The current status of this verification session.
|
|
973
|
+
*/
|
|
974
|
+
status: VerificationsAPI.VerificationStatus;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
836
978
|
export interface PaymentCreatedWebhookEvent {
|
|
837
979
|
/**
|
|
838
980
|
* A unique ID for every single webhook request
|
|
@@ -1676,7 +1818,7 @@ export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
|
|
|
1676
1818
|
*/
|
|
1677
1819
|
company_id?: string | null;
|
|
1678
1820
|
}
|
|
1679
|
-
export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | DisputeAlertCreatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
|
|
1821
|
+
export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PayoutAccountStatusUpdatedWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | DisputeAlertCreatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
|
|
1680
1822
|
export interface WebhookCreateParams {
|
|
1681
1823
|
/**
|
|
1682
1824
|
* The URL to send the webhook to.
|
|
@@ -1746,6 +1888,6 @@ export interface WebhookListParams extends CursorPageParams {
|
|
|
1746
1888
|
last?: number | null;
|
|
1747
1889
|
}
|
|
1748
1890
|
export declare namespace Webhooks {
|
|
1749
|
-
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 DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
1891
|
+
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 PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent, 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 DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
1750
1892
|
}
|
|
1751
1893
|
//# sourceMappingURL=webhooks.d.mts.map
|