@whop/sdk 0.0.14 → 0.0.16
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 +31 -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/checkout-configurations.d.mts +16 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +16 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/courses.d.mts +33 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +33 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/experiences.d.mts +12 -0
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +12 -0
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +179 -0
- package/resources/fee-markups.d.mts.map +1 -0
- package/resources/fee-markups.d.ts +179 -0
- package/resources/fee-markups.d.ts.map +1 -0
- package/resources/fee-markups.js +64 -0
- package/resources/fee-markups.js.map +1 -0
- package/resources/fee-markups.mjs +60 -0
- package/resources/fee-markups.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payment-methods.d.mts +202 -54
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +202 -54
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payments.d.mts +55 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +55 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +78 -0
- package/resources/payout-methods.d.mts.map +1 -0
- package/resources/payout-methods.d.ts +78 -0
- package/resources/payout-methods.d.ts.map +1 -0
- package/resources/payout-methods.js +23 -0
- package/resources/payout-methods.js.map +1 -0
- package/resources/payout-methods.mjs +19 -0
- package/resources/payout-methods.mjs.map +1 -0
- package/resources/shared.d.mts +38 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +38 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +170 -1
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +170 -1
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +38 -0
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +38 -0
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +48 -0
- package/src/resources/checkout-configurations.ts +20 -0
- package/src/resources/courses.ts +38 -0
- package/src/resources/experiences.ts +15 -0
- package/src/resources/fee-markups.ts +232 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/payment-methods.ts +236 -54
- package/src/resources/payments.ts +105 -0
- package/src/resources/payout-methods.ts +105 -0
- package/src/resources/shared.ts +44 -0
- package/src/resources/withdrawals.ts +247 -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
|
@@ -4,12 +4,38 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
4
4
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
6
6
|
export declare class Withdrawals extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a withdrawal request for a ledger account
|
|
9
|
+
*
|
|
10
|
+
* Required permissions:
|
|
11
|
+
*
|
|
12
|
+
* - `payout:withdraw_funds`
|
|
13
|
+
* - `payout:destination:read`
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const withdrawal = await client.withdrawals.create({
|
|
18
|
+
* amount: 6.9,
|
|
19
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
20
|
+
* currency: 'usd',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: WithdrawalCreateParams, options?: RequestOptions): APIPromise<WithdrawalCreateResponse>;
|
|
7
25
|
/**
|
|
8
26
|
* Retrieves a withdrawal by ID
|
|
9
27
|
*
|
|
10
28
|
* Required permissions:
|
|
11
29
|
*
|
|
12
30
|
* - `payout:withdrawal:read`
|
|
31
|
+
* - `payout:destination:read`
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const withdrawal = await client.withdrawals.retrieve(
|
|
36
|
+
* 'wdrl_xxxxxxxxxxxxx',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
13
39
|
*/
|
|
14
40
|
retrieve(id: string, options?: RequestOptions): APIPromise<WithdrawalRetrieveResponse>;
|
|
15
41
|
/**
|
|
@@ -18,6 +44,16 @@ export declare class Withdrawals extends APIResource {
|
|
|
18
44
|
* Required permissions:
|
|
19
45
|
*
|
|
20
46
|
* - `payout:withdrawal:read`
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Automatically fetches more pages as needed.
|
|
51
|
+
* for await (const withdrawalListResponse of client.withdrawals.list(
|
|
52
|
+
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
53
|
+
* )) {
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
21
57
|
*/
|
|
22
58
|
list(query: WithdrawalListParams, options?: RequestOptions): PagePromise<WithdrawalListResponsesCursorPage, WithdrawalListResponse>;
|
|
23
59
|
}
|
|
@@ -38,6 +74,121 @@ export type WithdrawalStatus = 'requested' | 'awaiting_payment' | 'in_transit' |
|
|
|
38
74
|
* The types of withdrawals
|
|
39
75
|
*/
|
|
40
76
|
export type WithdrawalTypes = 'regular' | 'clawback';
|
|
77
|
+
/**
|
|
78
|
+
* A withdrawal request.
|
|
79
|
+
*/
|
|
80
|
+
export interface WithdrawalCreateResponse {
|
|
81
|
+
/**
|
|
82
|
+
* Internal ID of the withdrawal request.
|
|
83
|
+
*/
|
|
84
|
+
id: string;
|
|
85
|
+
/**
|
|
86
|
+
* How much money was attempted to be withdrawn, in a float type.
|
|
87
|
+
*/
|
|
88
|
+
amount: number;
|
|
89
|
+
/**
|
|
90
|
+
* When the withdrawal request was created.
|
|
91
|
+
*/
|
|
92
|
+
created_at: string;
|
|
93
|
+
/**
|
|
94
|
+
* The currency of the withdrawal request.
|
|
95
|
+
*/
|
|
96
|
+
currency: Shared.Currency;
|
|
97
|
+
/**
|
|
98
|
+
* The different error codes a payout can be in.
|
|
99
|
+
*/
|
|
100
|
+
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
101
|
+
/**
|
|
102
|
+
* The error message for the withdrawal, if any.
|
|
103
|
+
*/
|
|
104
|
+
error_message: string | null;
|
|
105
|
+
/**
|
|
106
|
+
* The estimated availability date for the withdrawal, if any.
|
|
107
|
+
*/
|
|
108
|
+
estimated_availability: string | null;
|
|
109
|
+
/**
|
|
110
|
+
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
111
|
+
* as the withdrawal amount.
|
|
112
|
+
*/
|
|
113
|
+
fee_amount: number;
|
|
114
|
+
/**
|
|
115
|
+
* The different fee types for a withdrawal.
|
|
116
|
+
*/
|
|
117
|
+
fee_type: WithdrawalFeeTypes | null;
|
|
118
|
+
/**
|
|
119
|
+
* The ledger account associated with the withdrawal.
|
|
120
|
+
*/
|
|
121
|
+
ledger_account: WithdrawalCreateResponse.LedgerAccount;
|
|
122
|
+
/**
|
|
123
|
+
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
124
|
+
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
125
|
+
* Rails.
|
|
126
|
+
*/
|
|
127
|
+
markup_fee: number;
|
|
128
|
+
/**
|
|
129
|
+
* The payout token used for the withdrawal, if applicable.
|
|
130
|
+
*/
|
|
131
|
+
payout_token: WithdrawalCreateResponse.PayoutToken | null;
|
|
132
|
+
/**
|
|
133
|
+
* The speed of the withdrawal.
|
|
134
|
+
*/
|
|
135
|
+
speed: WithdrawalSpeeds;
|
|
136
|
+
/**
|
|
137
|
+
* Status of the withdrawal.
|
|
138
|
+
*/
|
|
139
|
+
status: WithdrawalStatus;
|
|
140
|
+
/**
|
|
141
|
+
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
142
|
+
* available.
|
|
143
|
+
*/
|
|
144
|
+
trace_code: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* The type of withdrawal.
|
|
147
|
+
*/
|
|
148
|
+
withdrawal_type: WithdrawalTypes;
|
|
149
|
+
}
|
|
150
|
+
export declare namespace WithdrawalCreateResponse {
|
|
151
|
+
/**
|
|
152
|
+
* The ledger account associated with the withdrawal.
|
|
153
|
+
*/
|
|
154
|
+
interface LedgerAccount {
|
|
155
|
+
/**
|
|
156
|
+
* The ID of the LedgerAccount.
|
|
157
|
+
*/
|
|
158
|
+
id: string;
|
|
159
|
+
/**
|
|
160
|
+
* The ID of the company associated with this ledger account.
|
|
161
|
+
*/
|
|
162
|
+
company_id: string | null;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The payout token used for the withdrawal, if applicable.
|
|
166
|
+
*/
|
|
167
|
+
interface PayoutToken {
|
|
168
|
+
/**
|
|
169
|
+
* The ID of the payout token
|
|
170
|
+
*/
|
|
171
|
+
id: string;
|
|
172
|
+
/**
|
|
173
|
+
* The date and time the payout token was created
|
|
174
|
+
*/
|
|
175
|
+
created_at: string;
|
|
176
|
+
/**
|
|
177
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
178
|
+
* will be made in for this token.
|
|
179
|
+
*/
|
|
180
|
+
destination_currency_code: string;
|
|
181
|
+
/**
|
|
182
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
183
|
+
* not used by the provider and is only for the user's reference.
|
|
184
|
+
*/
|
|
185
|
+
nickname: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* The name of the payer associated with the payout token.
|
|
188
|
+
*/
|
|
189
|
+
payer_name: string | null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
41
192
|
/**
|
|
42
193
|
* A withdrawal request.
|
|
43
194
|
*/
|
|
@@ -201,6 +352,24 @@ export interface WithdrawalListResponse {
|
|
|
201
352
|
*/
|
|
202
353
|
withdrawal_type: WithdrawalTypes;
|
|
203
354
|
}
|
|
355
|
+
export interface WithdrawalCreateParams {
|
|
356
|
+
/**
|
|
357
|
+
* The amount to withdraw in the specified currency
|
|
358
|
+
*/
|
|
359
|
+
amount: number;
|
|
360
|
+
/**
|
|
361
|
+
* The ID of the company to withdraw from.
|
|
362
|
+
*/
|
|
363
|
+
company_id: string;
|
|
364
|
+
/**
|
|
365
|
+
* The currency that is being withdrawn.
|
|
366
|
+
*/
|
|
367
|
+
currency: Shared.Currency;
|
|
368
|
+
/**
|
|
369
|
+
* The ID of the payout method to use for the withdrawal.
|
|
370
|
+
*/
|
|
371
|
+
payout_method_id?: string | null;
|
|
372
|
+
}
|
|
204
373
|
export interface WithdrawalListParams extends CursorPageParams {
|
|
205
374
|
/**
|
|
206
375
|
* The ID of the company to list withdrawals for
|
|
@@ -232,6 +401,6 @@ export interface WithdrawalListParams extends CursorPageParams {
|
|
|
232
401
|
last?: number | null;
|
|
233
402
|
}
|
|
234
403
|
export declare namespace Withdrawals {
|
|
235
|
-
export { type WithdrawalFeeTypes as WithdrawalFeeTypes, type WithdrawalSpeeds as WithdrawalSpeeds, type WithdrawalStatus as WithdrawalStatus, type WithdrawalTypes as WithdrawalTypes, type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse, type WithdrawalListResponse as WithdrawalListResponse, type WithdrawalListResponsesCursorPage as WithdrawalListResponsesCursorPage, type WithdrawalListParams as WithdrawalListParams, };
|
|
404
|
+
export { type WithdrawalFeeTypes as WithdrawalFeeTypes, type WithdrawalSpeeds as WithdrawalSpeeds, type WithdrawalStatus as WithdrawalStatus, type WithdrawalTypes as WithdrawalTypes, type WithdrawalCreateResponse as WithdrawalCreateResponse, type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse, type WithdrawalListResponse as WithdrawalListResponse, type WithdrawalListResponsesCursorPage as WithdrawalListResponsesCursorPage, type WithdrawalCreateParams as WithdrawalCreateParams, type WithdrawalListParams as WithdrawalListParams, };
|
|
236
405
|
}
|
|
237
406
|
//# sourceMappingURL=withdrawals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAA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IAEpC;;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,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/withdrawals.js
CHANGED
|
@@ -6,12 +6,40 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Withdrawals extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a withdrawal request for a ledger account
|
|
11
|
+
*
|
|
12
|
+
* Required permissions:
|
|
13
|
+
*
|
|
14
|
+
* - `payout:withdraw_funds`
|
|
15
|
+
* - `payout:destination:read`
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const withdrawal = await client.withdrawals.create({
|
|
20
|
+
* amount: 6.9,
|
|
21
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
22
|
+
* currency: 'usd',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
create(body, options) {
|
|
27
|
+
return this._client.post('/withdrawals', { body, ...options });
|
|
28
|
+
}
|
|
9
29
|
/**
|
|
10
30
|
* Retrieves a withdrawal by ID
|
|
11
31
|
*
|
|
12
32
|
* Required permissions:
|
|
13
33
|
*
|
|
14
34
|
* - `payout:withdrawal:read`
|
|
35
|
+
* - `payout:destination:read`
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const withdrawal = await client.withdrawals.retrieve(
|
|
40
|
+
* 'wdrl_xxxxxxxxxxxxx',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
15
43
|
*/
|
|
16
44
|
retrieve(id, options) {
|
|
17
45
|
return this._client.get((0, path_1.path) `/withdrawals/${id}`, options);
|
|
@@ -22,6 +50,16 @@ class Withdrawals extends resource_1.APIResource {
|
|
|
22
50
|
* Required permissions:
|
|
23
51
|
*
|
|
24
52
|
* - `payout:withdrawal:read`
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* // Automatically fetches more pages as needed.
|
|
57
|
+
* for await (const withdrawalListResponse of client.withdrawals.list(
|
|
58
|
+
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
59
|
+
* )) {
|
|
60
|
+
* // ...
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
25
63
|
*/
|
|
26
64
|
list(query, options) {
|
|
27
65
|
return this._client.getAPIList('/withdrawals', (pagination_1.CursorPage), { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,uBAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AAhED,kCAgEC"}
|
|
@@ -3,12 +3,40 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { CursorPage } from "../core/pagination.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Withdrawals extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a withdrawal request for a ledger account
|
|
8
|
+
*
|
|
9
|
+
* Required permissions:
|
|
10
|
+
*
|
|
11
|
+
* - `payout:withdraw_funds`
|
|
12
|
+
* - `payout:destination:read`
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const withdrawal = await client.withdrawals.create({
|
|
17
|
+
* amount: 6.9,
|
|
18
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
19
|
+
* currency: 'usd',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body, options) {
|
|
24
|
+
return this._client.post('/withdrawals', { body, ...options });
|
|
25
|
+
}
|
|
6
26
|
/**
|
|
7
27
|
* Retrieves a withdrawal by ID
|
|
8
28
|
*
|
|
9
29
|
* Required permissions:
|
|
10
30
|
*
|
|
11
31
|
* - `payout:withdrawal:read`
|
|
32
|
+
* - `payout:destination:read`
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const withdrawal = await client.withdrawals.retrieve(
|
|
37
|
+
* 'wdrl_xxxxxxxxxxxxx',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
12
40
|
*/
|
|
13
41
|
retrieve(id, options) {
|
|
14
42
|
return this._client.get(path `/withdrawals/${id}`, options);
|
|
@@ -19,6 +47,16 @@ export class Withdrawals extends APIResource {
|
|
|
19
47
|
* Required permissions:
|
|
20
48
|
*
|
|
21
49
|
* - `payout:withdrawal:read`
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* // Automatically fetches more pages as needed.
|
|
54
|
+
* for await (const withdrawalListResponse of client.withdrawals.list(
|
|
55
|
+
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
56
|
+
* )) {
|
|
57
|
+
* // ...
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
22
60
|
*/
|
|
23
61
|
list(query, options) {
|
|
24
62
|
return this._client.getAPIList('/withdrawals', (CursorPage), { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.mjs","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"withdrawals.mjs","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,UAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -146,6 +146,16 @@ import {
|
|
|
146
146
|
ExperienceUpdateParams,
|
|
147
147
|
Experiences,
|
|
148
148
|
} from './resources/experiences';
|
|
149
|
+
import {
|
|
150
|
+
FeeMarkupCreateParams,
|
|
151
|
+
FeeMarkupCreateResponse,
|
|
152
|
+
FeeMarkupDeleteResponse,
|
|
153
|
+
FeeMarkupListParams,
|
|
154
|
+
FeeMarkupListResponse,
|
|
155
|
+
FeeMarkupListResponsesCursorPage,
|
|
156
|
+
FeeMarkupType,
|
|
157
|
+
FeeMarkups,
|
|
158
|
+
} from './resources/fee-markups';
|
|
149
159
|
import {
|
|
150
160
|
ForumPostCreateParams,
|
|
151
161
|
ForumPostListParams,
|
|
@@ -205,6 +215,9 @@ import {
|
|
|
205
215
|
BillingReasons,
|
|
206
216
|
CardBrands,
|
|
207
217
|
PaymentCreateParams,
|
|
218
|
+
PaymentListFeesParams,
|
|
219
|
+
PaymentListFeesResponse,
|
|
220
|
+
PaymentListFeesResponsesCursorPage,
|
|
208
221
|
PaymentListParams,
|
|
209
222
|
PaymentListResponse,
|
|
210
223
|
PaymentListResponsesCursorPage,
|
|
@@ -212,6 +225,12 @@ import {
|
|
|
212
225
|
PaymentRefundParams,
|
|
213
226
|
Payments,
|
|
214
227
|
} from './resources/payments';
|
|
228
|
+
import {
|
|
229
|
+
PayoutMethodListParams,
|
|
230
|
+
PayoutMethodListResponse,
|
|
231
|
+
PayoutMethodListResponsesCursorPage,
|
|
232
|
+
PayoutMethods,
|
|
233
|
+
} from './resources/payout-methods';
|
|
215
234
|
import {
|
|
216
235
|
PlanCreateParams,
|
|
217
236
|
PlanDeleteResponse,
|
|
@@ -328,6 +347,8 @@ import {
|
|
|
328
347
|
WithdrawalUpdatedWebhookEvent,
|
|
329
348
|
} from './resources/webhooks';
|
|
330
349
|
import {
|
|
350
|
+
WithdrawalCreateParams,
|
|
351
|
+
WithdrawalCreateResponse,
|
|
331
352
|
WithdrawalFeeTypes,
|
|
332
353
|
WithdrawalListParams,
|
|
333
354
|
WithdrawalListResponse,
|
|
@@ -1103,6 +1124,8 @@ export class Whop {
|
|
|
1103
1124
|
accountLinks: API.AccountLinks = new API.AccountLinks(this);
|
|
1104
1125
|
setupIntents: API.SetupIntents = new API.SetupIntents(this);
|
|
1105
1126
|
paymentMethods: API.PaymentMethods = new API.PaymentMethods(this);
|
|
1127
|
+
feeMarkups: API.FeeMarkups = new API.FeeMarkups(this);
|
|
1128
|
+
payoutMethods: API.PayoutMethods = new API.PayoutMethods(this);
|
|
1106
1129
|
}
|
|
1107
1130
|
|
|
1108
1131
|
Whop.Apps = Apps;
|
|
@@ -1144,6 +1167,8 @@ Whop.Withdrawals = Withdrawals;
|
|
|
1144
1167
|
Whop.AccountLinks = AccountLinks;
|
|
1145
1168
|
Whop.SetupIntents = SetupIntents;
|
|
1146
1169
|
Whop.PaymentMethods = PaymentMethods;
|
|
1170
|
+
Whop.FeeMarkups = FeeMarkups;
|
|
1171
|
+
Whop.PayoutMethods = PayoutMethods;
|
|
1147
1172
|
|
|
1148
1173
|
export declare namespace Whop {
|
|
1149
1174
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1332,9 +1357,12 @@ export declare namespace Whop {
|
|
|
1332
1357
|
type CardBrands as CardBrands,
|
|
1333
1358
|
type PaymentMethodTypes as PaymentMethodTypes,
|
|
1334
1359
|
type PaymentListResponse as PaymentListResponse,
|
|
1360
|
+
type PaymentListFeesResponse as PaymentListFeesResponse,
|
|
1335
1361
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
1362
|
+
type PaymentListFeesResponsesCursorPage as PaymentListFeesResponsesCursorPage,
|
|
1336
1363
|
type PaymentCreateParams as PaymentCreateParams,
|
|
1337
1364
|
type PaymentListParams as PaymentListParams,
|
|
1365
|
+
type PaymentListFeesParams as PaymentListFeesParams,
|
|
1338
1366
|
type PaymentRefundParams as PaymentRefundParams,
|
|
1339
1367
|
};
|
|
1340
1368
|
|
|
@@ -1495,9 +1523,11 @@ export declare namespace Whop {
|
|
|
1495
1523
|
type WithdrawalSpeeds as WithdrawalSpeeds,
|
|
1496
1524
|
type WithdrawalStatus as WithdrawalStatus,
|
|
1497
1525
|
type WithdrawalTypes as WithdrawalTypes,
|
|
1526
|
+
type WithdrawalCreateResponse as WithdrawalCreateResponse,
|
|
1498
1527
|
type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse,
|
|
1499
1528
|
type WithdrawalListResponse as WithdrawalListResponse,
|
|
1500
1529
|
type WithdrawalListResponsesCursorPage as WithdrawalListResponsesCursorPage,
|
|
1530
|
+
type WithdrawalCreateParams as WithdrawalCreateParams,
|
|
1501
1531
|
type WithdrawalListParams as WithdrawalListParams,
|
|
1502
1532
|
};
|
|
1503
1533
|
|
|
@@ -1525,6 +1555,24 @@ export declare namespace Whop {
|
|
|
1525
1555
|
type PaymentMethodListParams as PaymentMethodListParams,
|
|
1526
1556
|
};
|
|
1527
1557
|
|
|
1558
|
+
export {
|
|
1559
|
+
FeeMarkups as FeeMarkups,
|
|
1560
|
+
type FeeMarkupType as FeeMarkupType,
|
|
1561
|
+
type FeeMarkupCreateResponse as FeeMarkupCreateResponse,
|
|
1562
|
+
type FeeMarkupListResponse as FeeMarkupListResponse,
|
|
1563
|
+
type FeeMarkupDeleteResponse as FeeMarkupDeleteResponse,
|
|
1564
|
+
type FeeMarkupListResponsesCursorPage as FeeMarkupListResponsesCursorPage,
|
|
1565
|
+
type FeeMarkupCreateParams as FeeMarkupCreateParams,
|
|
1566
|
+
type FeeMarkupListParams as FeeMarkupListParams,
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
export {
|
|
1570
|
+
PayoutMethods as PayoutMethods,
|
|
1571
|
+
type PayoutMethodListResponse as PayoutMethodListResponse,
|
|
1572
|
+
type PayoutMethodListResponsesCursorPage as PayoutMethodListResponsesCursorPage,
|
|
1573
|
+
type PayoutMethodListParams as PayoutMethodListParams,
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1528
1576
|
export type AccessLevel = API.AccessLevel;
|
|
1529
1577
|
export type AccessPassType = API.AccessPassType;
|
|
1530
1578
|
export type App = API.App;
|
|
@@ -94,6 +94,11 @@ export interface CheckoutConfigurationListResponse {
|
|
|
94
94
|
*/
|
|
95
95
|
company_id: string;
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* The available currencies on the platform
|
|
99
|
+
*/
|
|
100
|
+
currency: Shared.Currency | null;
|
|
101
|
+
|
|
97
102
|
/**
|
|
98
103
|
* The metadata to use for the checkout configuration
|
|
99
104
|
*/
|
|
@@ -230,6 +235,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
230
235
|
*/
|
|
231
236
|
affiliate_code?: string | null;
|
|
232
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The available currencies on the platform
|
|
240
|
+
*/
|
|
241
|
+
currency?: Shared.Currency | null;
|
|
242
|
+
|
|
233
243
|
/**
|
|
234
244
|
* The metadata to use for the checkout configuration
|
|
235
245
|
*/
|
|
@@ -570,6 +580,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
570
580
|
*/
|
|
571
581
|
affiliate_code?: string | null;
|
|
572
582
|
|
|
583
|
+
/**
|
|
584
|
+
* The available currencies on the platform
|
|
585
|
+
*/
|
|
586
|
+
currency?: Shared.Currency | null;
|
|
587
|
+
|
|
573
588
|
/**
|
|
574
589
|
* The metadata to use for the checkout configuration
|
|
575
590
|
*/
|
|
@@ -629,6 +644,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
629
644
|
|
|
630
645
|
mode: 'setup';
|
|
631
646
|
|
|
647
|
+
/**
|
|
648
|
+
* The available currencies on the platform
|
|
649
|
+
*/
|
|
650
|
+
currency?: Shared.Currency | null;
|
|
651
|
+
|
|
632
652
|
/**
|
|
633
653
|
* The metadata to use for the checkout configuration
|
|
634
654
|
*/
|
package/src/resources/courses.ts
CHANGED
|
@@ -235,10 +235,48 @@ export namespace Course {
|
|
|
235
235
|
*/
|
|
236
236
|
order: number;
|
|
237
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The thumbnail for the lesson
|
|
240
|
+
*/
|
|
241
|
+
thumbnail: Lesson.Thumbnail | null;
|
|
242
|
+
|
|
238
243
|
/**
|
|
239
244
|
* The title of the lesson
|
|
240
245
|
*/
|
|
241
246
|
title: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The associated Mux asset for video lessons
|
|
250
|
+
*/
|
|
251
|
+
video_asset: Lesson.VideoAsset | null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export namespace Lesson {
|
|
255
|
+
/**
|
|
256
|
+
* The thumbnail for the lesson
|
|
257
|
+
*/
|
|
258
|
+
export interface Thumbnail {
|
|
259
|
+
/**
|
|
260
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
261
|
+
* should be used for apps.
|
|
262
|
+
*/
|
|
263
|
+
url: string | null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The associated Mux asset for video lessons
|
|
268
|
+
*/
|
|
269
|
+
export interface VideoAsset {
|
|
270
|
+
/**
|
|
271
|
+
* The duration of the video in seconds
|
|
272
|
+
*/
|
|
273
|
+
duration_seconds: number | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The signed thumbnail playback token of the Mux asset
|
|
277
|
+
*/
|
|
278
|
+
signed_thumbnail_playback_token: string | null;
|
|
279
|
+
}
|
|
242
280
|
}
|
|
243
281
|
}
|
|
244
282
|
|
|
@@ -198,6 +198,11 @@ export interface ExperienceListResponse {
|
|
|
198
198
|
*/
|
|
199
199
|
image: ExperienceListResponse.Image | null;
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Whether the experience is visible to the public
|
|
203
|
+
*/
|
|
204
|
+
is_public: boolean;
|
|
205
|
+
|
|
201
206
|
/**
|
|
202
207
|
* The written name of the description.
|
|
203
208
|
*/
|
|
@@ -293,6 +298,11 @@ export interface ExperienceCreateParams {
|
|
|
293
298
|
*/
|
|
294
299
|
company_id: string;
|
|
295
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Whether the experience is publicly accessible
|
|
303
|
+
*/
|
|
304
|
+
is_public?: boolean | null;
|
|
305
|
+
|
|
296
306
|
/**
|
|
297
307
|
* The name of the experience
|
|
298
308
|
*/
|
|
@@ -310,6 +320,11 @@ export interface ExperienceUpdateParams {
|
|
|
310
320
|
*/
|
|
311
321
|
access_level?: 'public' | 'private' | null;
|
|
312
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Whether the experience is publicly accessible.
|
|
325
|
+
*/
|
|
326
|
+
is_public?: boolean | null;
|
|
327
|
+
|
|
313
328
|
/**
|
|
314
329
|
* The logo for the experience
|
|
315
330
|
*/
|