@whop/sdk 0.0.7 → 0.0.8
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 +19 -0
- package/client.d.mts +16 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -10
- 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/apps.d.mts +17 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +17 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +165 -8
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +165 -8
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +1 -0
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +1 -0
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/course-lessons.d.mts +199 -1
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +199 -1
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +40 -0
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +40 -0
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/courses.d.mts +8 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +8 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +7 -3
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +7 -3
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +7 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -5
- 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/refunds.d.mts +295 -0
- package/resources/refunds.d.mts.map +1 -0
- package/resources/refunds.d.ts +295 -0
- package/resources/refunds.d.ts.map +1 -0
- package/resources/refunds.js +34 -0
- package/resources/refunds.js.map +1 -0
- package/resources/refunds.mjs +30 -0
- package/resources/refunds.mjs.map +1 -0
- package/resources/shared.d.mts +43 -2
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +43 -2
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +382 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +382 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +233 -0
- package/resources/withdrawals.d.mts.map +1 -0
- package/resources/withdrawals.d.ts +233 -0
- package/resources/withdrawals.d.ts.map +1 -0
- package/resources/withdrawals.js +31 -0
- package/resources/withdrawals.js.map +1 -0
- package/resources/withdrawals.mjs +27 -0
- package/resources/withdrawals.mjs.map +1 -0
- package/src/client.ts +68 -0
- package/src/resources/apps.ts +21 -0
- package/src/resources/checkout-configurations.ts +189 -8
- package/src/resources/course-lessons.ts +250 -0
- package/src/resources/courses.ts +10 -0
- package/src/resources/forum-posts.ts +8 -2
- package/src/resources/index.ts +31 -0
- package/src/resources/refunds.ts +383 -0
- package/src/resources/shared.ts +49 -2
- package/src/resources/webhooks.ts +463 -1
- package/src/resources/withdrawals.ts +361 -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,233 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as Shared from "./shared.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
|
+
export declare class Withdrawals extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a withdrawal by ID
|
|
9
|
+
*
|
|
10
|
+
* Required permissions:
|
|
11
|
+
*
|
|
12
|
+
* - `payout:withdrawal:read`
|
|
13
|
+
*/
|
|
14
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<WithdrawalRetrieveResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Lists withdrawals
|
|
17
|
+
*
|
|
18
|
+
* Required permissions:
|
|
19
|
+
*
|
|
20
|
+
* - `payout:withdrawal:read`
|
|
21
|
+
*/
|
|
22
|
+
list(query: WithdrawalListParams, options?: RequestOptions): PagePromise<WithdrawalListResponsesCursorPage, WithdrawalListResponse>;
|
|
23
|
+
}
|
|
24
|
+
export type WithdrawalListResponsesCursorPage = CursorPage<WithdrawalListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* The different fee types for a withdrawal.
|
|
27
|
+
*/
|
|
28
|
+
export type WithdrawalFeeTypes = 'exclusive' | 'inclusive';
|
|
29
|
+
/**
|
|
30
|
+
* The different speeds of withdrawals
|
|
31
|
+
*/
|
|
32
|
+
export type WithdrawalSpeeds = 'standard' | 'instant';
|
|
33
|
+
/**
|
|
34
|
+
* The status of a withdrawal request
|
|
35
|
+
*/
|
|
36
|
+
export type WithdrawalStatus = 'requested' | 'awaiting_payment' | 'in_transit' | 'completed' | 'failed' | 'canceled' | 'denied';
|
|
37
|
+
/**
|
|
38
|
+
* The types of withdrawals
|
|
39
|
+
*/
|
|
40
|
+
export type WithdrawalTypes = 'regular' | 'clawback';
|
|
41
|
+
/**
|
|
42
|
+
* A withdrawal request.
|
|
43
|
+
*/
|
|
44
|
+
export interface WithdrawalRetrieveResponse {
|
|
45
|
+
/**
|
|
46
|
+
* Internal ID of the withdrawal request.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* How much money was attempted to be withdrawn, in a float type.
|
|
51
|
+
*/
|
|
52
|
+
amount: number;
|
|
53
|
+
/**
|
|
54
|
+
* When the withdrawal request was created.
|
|
55
|
+
*/
|
|
56
|
+
created_at: string;
|
|
57
|
+
/**
|
|
58
|
+
* The currency of the withdrawal request.
|
|
59
|
+
*/
|
|
60
|
+
currency: Shared.Currency;
|
|
61
|
+
/**
|
|
62
|
+
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
63
|
+
* as the withdrawal amount.
|
|
64
|
+
*/
|
|
65
|
+
fee_amount: number;
|
|
66
|
+
/**
|
|
67
|
+
* The different fee types for a withdrawal.
|
|
68
|
+
*/
|
|
69
|
+
fee_type: WithdrawalFeeTypes | null;
|
|
70
|
+
/**
|
|
71
|
+
* The latest payout associated with this withdrawal, if any.
|
|
72
|
+
*/
|
|
73
|
+
latest_payout: WithdrawalRetrieveResponse.LatestPayout | null;
|
|
74
|
+
/**
|
|
75
|
+
* The payout token used for the withdrawal, if applicable.
|
|
76
|
+
*/
|
|
77
|
+
payout_token: WithdrawalRetrieveResponse.PayoutToken | null;
|
|
78
|
+
/**
|
|
79
|
+
* The speed of the withdrawal.
|
|
80
|
+
*/
|
|
81
|
+
speed: WithdrawalSpeeds;
|
|
82
|
+
/**
|
|
83
|
+
* Status of the withdrawal.
|
|
84
|
+
*/
|
|
85
|
+
status: WithdrawalStatus;
|
|
86
|
+
/**
|
|
87
|
+
* The type of withdrawal.
|
|
88
|
+
*/
|
|
89
|
+
withdrawal_type: WithdrawalTypes;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace WithdrawalRetrieveResponse {
|
|
92
|
+
/**
|
|
93
|
+
* The latest payout associated with this withdrawal, if any.
|
|
94
|
+
*/
|
|
95
|
+
interface LatestPayout {
|
|
96
|
+
/**
|
|
97
|
+
* The internal ID of the payout.
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* The date and time the payout was created.
|
|
102
|
+
*/
|
|
103
|
+
created_at: string;
|
|
104
|
+
/**
|
|
105
|
+
* The different error codes a payout can be in.
|
|
106
|
+
*/
|
|
107
|
+
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;
|
|
108
|
+
/**
|
|
109
|
+
* The error message for the payout.
|
|
110
|
+
*/
|
|
111
|
+
error_message: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* The estimated availability date of the payout.
|
|
114
|
+
*/
|
|
115
|
+
estimated_availability: string | null;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the payer for the payout.
|
|
118
|
+
*/
|
|
119
|
+
payer_name: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* The status of the payout.
|
|
122
|
+
*/
|
|
123
|
+
status: 'scheduled' | 'pending' | 'processing' | 'completed' | 'canceled' | 'ready_for_pickup' | 'hold' | 'error' | 'expired';
|
|
124
|
+
/**
|
|
125
|
+
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
126
|
+
* available.
|
|
127
|
+
*/
|
|
128
|
+
trace_code: string | null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The payout token used for the withdrawal, if applicable.
|
|
132
|
+
*/
|
|
133
|
+
interface PayoutToken {
|
|
134
|
+
/**
|
|
135
|
+
* The ID of the payout token
|
|
136
|
+
*/
|
|
137
|
+
id: string;
|
|
138
|
+
/**
|
|
139
|
+
* The date and time the payout token was created
|
|
140
|
+
*/
|
|
141
|
+
created_at: string;
|
|
142
|
+
/**
|
|
143
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
144
|
+
* will be made in for this token.
|
|
145
|
+
*/
|
|
146
|
+
destination_currency_code: string;
|
|
147
|
+
/**
|
|
148
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
149
|
+
* not used by the provider and is only for the user's reference.
|
|
150
|
+
*/
|
|
151
|
+
nickname: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* The status of the payout token.
|
|
154
|
+
*/
|
|
155
|
+
status: 'created' | 'active' | 'broken';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A withdrawal request.
|
|
160
|
+
*/
|
|
161
|
+
export interface WithdrawalListResponse {
|
|
162
|
+
/**
|
|
163
|
+
* Internal ID of the withdrawal request.
|
|
164
|
+
*/
|
|
165
|
+
id: string;
|
|
166
|
+
/**
|
|
167
|
+
* How much money was attempted to be withdrawn, in a float type.
|
|
168
|
+
*/
|
|
169
|
+
amount: number;
|
|
170
|
+
/**
|
|
171
|
+
* When the withdrawal request was created.
|
|
172
|
+
*/
|
|
173
|
+
created_at: string;
|
|
174
|
+
/**
|
|
175
|
+
* The currency of the withdrawal request.
|
|
176
|
+
*/
|
|
177
|
+
currency: Shared.Currency;
|
|
178
|
+
/**
|
|
179
|
+
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
180
|
+
* as the withdrawal amount.
|
|
181
|
+
*/
|
|
182
|
+
fee_amount: number;
|
|
183
|
+
/**
|
|
184
|
+
* The different fee types for a withdrawal.
|
|
185
|
+
*/
|
|
186
|
+
fee_type: WithdrawalFeeTypes | null;
|
|
187
|
+
/**
|
|
188
|
+
* The speed of the withdrawal.
|
|
189
|
+
*/
|
|
190
|
+
speed: WithdrawalSpeeds;
|
|
191
|
+
/**
|
|
192
|
+
* Status of the withdrawal.
|
|
193
|
+
*/
|
|
194
|
+
status: WithdrawalStatus;
|
|
195
|
+
/**
|
|
196
|
+
* The type of withdrawal.
|
|
197
|
+
*/
|
|
198
|
+
withdrawal_type: WithdrawalTypes;
|
|
199
|
+
}
|
|
200
|
+
export interface WithdrawalListParams extends CursorPageParams {
|
|
201
|
+
/**
|
|
202
|
+
* The ID of the company to list withdrawals for
|
|
203
|
+
*/
|
|
204
|
+
company_id: string;
|
|
205
|
+
/**
|
|
206
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
207
|
+
*/
|
|
208
|
+
before?: string | null;
|
|
209
|
+
/**
|
|
210
|
+
* The minimum creation date to filter by
|
|
211
|
+
*/
|
|
212
|
+
created_after?: string | null;
|
|
213
|
+
/**
|
|
214
|
+
* The maximum creation date to filter by
|
|
215
|
+
*/
|
|
216
|
+
created_before?: string | null;
|
|
217
|
+
/**
|
|
218
|
+
* The direction of the sort.
|
|
219
|
+
*/
|
|
220
|
+
direction?: Shared.Direction | null;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the first _n_ elements from the list.
|
|
223
|
+
*/
|
|
224
|
+
first?: number | null;
|
|
225
|
+
/**
|
|
226
|
+
* Returns the last _n_ elements from the list.
|
|
227
|
+
*/
|
|
228
|
+
last?: number | null;
|
|
229
|
+
}
|
|
230
|
+
export declare namespace Withdrawals {
|
|
231
|
+
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, };
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=withdrawals.d.ts.map
|
|
@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G,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;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,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.Withdrawals = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Withdrawals extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a withdrawal by ID
|
|
11
|
+
*
|
|
12
|
+
* Required permissions:
|
|
13
|
+
*
|
|
14
|
+
* - `payout:withdrawal:read`
|
|
15
|
+
*/
|
|
16
|
+
retrieve(id, options) {
|
|
17
|
+
return this._client.get((0, path_1.path) `/withdrawals/${id}`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Lists withdrawals
|
|
21
|
+
*
|
|
22
|
+
* Required permissions:
|
|
23
|
+
*
|
|
24
|
+
* - `payout:withdrawal:read`
|
|
25
|
+
*/
|
|
26
|
+
list(query, options) {
|
|
27
|
+
return this._client.getAPIList('/withdrawals', (pagination_1.CursorPage), { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Withdrawals = Withdrawals;
|
|
31
|
+
//# sourceMappingURL=withdrawals.js.map
|
|
@@ -0,0 +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;;;;;;OAMG;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;;;;;;OAMG;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;AAzBD,kCAyBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class Withdrawals extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves a withdrawal by ID
|
|
8
|
+
*
|
|
9
|
+
* Required permissions:
|
|
10
|
+
*
|
|
11
|
+
* - `payout:withdrawal:read`
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id, options) {
|
|
14
|
+
return this._client.get(path `/withdrawals/${id}`, options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Lists withdrawals
|
|
18
|
+
*
|
|
19
|
+
* Required permissions:
|
|
20
|
+
*
|
|
21
|
+
* - `payout:withdrawal:read`
|
|
22
|
+
*/
|
|
23
|
+
list(query, options) {
|
|
24
|
+
return this._client.getAPIList('/withdrawals', (CursorPage), { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=withdrawals.mjs.map
|
|
@@ -0,0 +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;;;;;;OAMG;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;;;;;;OAMG;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
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
AppListParams,
|
|
33
33
|
AppListResponse,
|
|
34
34
|
AppListResponsesCursorPage,
|
|
35
|
+
AppType,
|
|
35
36
|
AppUpdateParams,
|
|
36
37
|
Apps,
|
|
37
38
|
} from './resources/apps';
|
|
@@ -55,6 +56,7 @@ import {
|
|
|
55
56
|
CheckoutConfigurationListResponse,
|
|
56
57
|
CheckoutConfigurationListResponsesCursorPage,
|
|
57
58
|
CheckoutConfigurations,
|
|
59
|
+
CheckoutModes,
|
|
58
60
|
} from './resources/checkout-configurations';
|
|
59
61
|
import {
|
|
60
62
|
Companies,
|
|
@@ -84,6 +86,10 @@ import {
|
|
|
84
86
|
CourseLessonListParams,
|
|
85
87
|
CourseLessonListResponse,
|
|
86
88
|
CourseLessonListResponsesCursorPage,
|
|
89
|
+
CourseLessonMarkAsCompletedResponse,
|
|
90
|
+
CourseLessonStartResponse,
|
|
91
|
+
CourseLessonSubmitAssessmentParams,
|
|
92
|
+
CourseLessonSubmitAssessmentResponse,
|
|
87
93
|
CourseLessonUpdateParams,
|
|
88
94
|
CourseLessons,
|
|
89
95
|
EmbedType,
|
|
@@ -144,6 +150,7 @@ import {
|
|
|
144
150
|
ForumPostListResponse,
|
|
145
151
|
ForumPostListResponsesCursorPage,
|
|
146
152
|
ForumPostUpdateParams,
|
|
153
|
+
ForumPostVisibilityType,
|
|
147
154
|
ForumPosts,
|
|
148
155
|
} from './resources/forum-posts';
|
|
149
156
|
import {
|
|
@@ -228,6 +235,17 @@ import {
|
|
|
228
235
|
ReactionListResponsesCursorPage,
|
|
229
236
|
Reactions,
|
|
230
237
|
} from './resources/reactions';
|
|
238
|
+
import {
|
|
239
|
+
PaymentProvider,
|
|
240
|
+
RefundListParams,
|
|
241
|
+
RefundListResponse,
|
|
242
|
+
RefundListResponsesCursorPage,
|
|
243
|
+
RefundReferenceStatus,
|
|
244
|
+
RefundReferenceType,
|
|
245
|
+
RefundRetrieveResponse,
|
|
246
|
+
RefundStatus,
|
|
247
|
+
Refunds,
|
|
248
|
+
} from './resources/refunds';
|
|
231
249
|
import {
|
|
232
250
|
ReviewListParams,
|
|
233
251
|
ReviewListResponse,
|
|
@@ -280,9 +298,22 @@ import {
|
|
|
280
298
|
PaymentFailedWebhookEvent,
|
|
281
299
|
PaymentPendingWebhookEvent,
|
|
282
300
|
PaymentSucceededWebhookEvent,
|
|
301
|
+
RefundCreatedWebhookEvent,
|
|
302
|
+
RefundUpdatedWebhookEvent,
|
|
283
303
|
UnwrapWebhookEvent,
|
|
284
304
|
Webhooks,
|
|
285
305
|
} from './resources/webhooks';
|
|
306
|
+
import {
|
|
307
|
+
WithdrawalFeeTypes,
|
|
308
|
+
WithdrawalListParams,
|
|
309
|
+
WithdrawalListResponse,
|
|
310
|
+
WithdrawalListResponsesCursorPage,
|
|
311
|
+
WithdrawalRetrieveResponse,
|
|
312
|
+
WithdrawalSpeeds,
|
|
313
|
+
WithdrawalStatus,
|
|
314
|
+
WithdrawalTypes,
|
|
315
|
+
Withdrawals,
|
|
316
|
+
} from './resources/withdrawals';
|
|
286
317
|
import { type Fetch } from './internal/builtin-types';
|
|
287
318
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
288
319
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -1043,6 +1074,8 @@ export class Whop {
|
|
|
1043
1074
|
accessTokens: API.AccessTokens = new API.AccessTokens(this);
|
|
1044
1075
|
notifications: API.Notifications = new API.Notifications(this);
|
|
1045
1076
|
disputes: API.Disputes = new API.Disputes(this);
|
|
1077
|
+
refunds: API.Refunds = new API.Refunds(this);
|
|
1078
|
+
withdrawals: API.Withdrawals = new API.Withdrawals(this);
|
|
1046
1079
|
}
|
|
1047
1080
|
|
|
1048
1081
|
Whop.Apps = Apps;
|
|
@@ -1079,6 +1112,8 @@ Whop.CourseStudents = CourseStudents;
|
|
|
1079
1112
|
Whop.AccessTokens = AccessTokens;
|
|
1080
1113
|
Whop.Notifications = Notifications;
|
|
1081
1114
|
Whop.Disputes = Disputes;
|
|
1115
|
+
Whop.Refunds = Refunds;
|
|
1116
|
+
Whop.Withdrawals = Withdrawals;
|
|
1082
1117
|
|
|
1083
1118
|
export declare namespace Whop {
|
|
1084
1119
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1088,6 +1123,7 @@ export declare namespace Whop {
|
|
|
1088
1123
|
|
|
1089
1124
|
export {
|
|
1090
1125
|
Apps as Apps,
|
|
1126
|
+
type AppType as AppType,
|
|
1091
1127
|
type AppListResponse as AppListResponse,
|
|
1092
1128
|
type AppListResponsesCursorPage as AppListResponsesCursorPage,
|
|
1093
1129
|
type AppCreateParams as AppCreateParams,
|
|
@@ -1141,6 +1177,8 @@ export declare namespace Whop {
|
|
|
1141
1177
|
type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent,
|
|
1142
1178
|
type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent,
|
|
1143
1179
|
type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
|
|
1180
|
+
type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
|
|
1181
|
+
type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
|
|
1144
1182
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1145
1183
|
};
|
|
1146
1184
|
|
|
@@ -1164,6 +1202,7 @@ export declare namespace Whop {
|
|
|
1164
1202
|
|
|
1165
1203
|
export {
|
|
1166
1204
|
ForumPosts as ForumPosts,
|
|
1205
|
+
type ForumPostVisibilityType as ForumPostVisibilityType,
|
|
1167
1206
|
type ForumPostListResponse as ForumPostListResponse,
|
|
1168
1207
|
type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
|
|
1169
1208
|
type ForumPostCreateParams as ForumPostCreateParams,
|
|
@@ -1220,6 +1259,7 @@ export declare namespace Whop {
|
|
|
1220
1259
|
|
|
1221
1260
|
export {
|
|
1222
1261
|
CheckoutConfigurations as CheckoutConfigurations,
|
|
1262
|
+
type CheckoutModes as CheckoutModes,
|
|
1223
1263
|
type CheckoutConfigurationListResponse as CheckoutConfigurationListResponse,
|
|
1224
1264
|
type CheckoutConfigurationListResponsesCursorPage as CheckoutConfigurationListResponsesCursorPage,
|
|
1225
1265
|
type CheckoutConfigurationCreateParams as CheckoutConfigurationCreateParams,
|
|
@@ -1351,10 +1391,14 @@ export declare namespace Whop {
|
|
|
1351
1391
|
type LessonVisibilities as LessonVisibilities,
|
|
1352
1392
|
type CourseLessonListResponse as CourseLessonListResponse,
|
|
1353
1393
|
type CourseLessonDeleteResponse as CourseLessonDeleteResponse,
|
|
1394
|
+
type CourseLessonMarkAsCompletedResponse as CourseLessonMarkAsCompletedResponse,
|
|
1395
|
+
type CourseLessonStartResponse as CourseLessonStartResponse,
|
|
1396
|
+
type CourseLessonSubmitAssessmentResponse as CourseLessonSubmitAssessmentResponse,
|
|
1354
1397
|
type CourseLessonListResponsesCursorPage as CourseLessonListResponsesCursorPage,
|
|
1355
1398
|
type CourseLessonCreateParams as CourseLessonCreateParams,
|
|
1356
1399
|
type CourseLessonUpdateParams as CourseLessonUpdateParams,
|
|
1357
1400
|
type CourseLessonListParams as CourseLessonListParams,
|
|
1401
|
+
type CourseLessonSubmitAssessmentParams as CourseLessonSubmitAssessmentParams,
|
|
1358
1402
|
};
|
|
1359
1403
|
|
|
1360
1404
|
export {
|
|
@@ -1396,6 +1440,30 @@ export declare namespace Whop {
|
|
|
1396
1440
|
type DisputeUpdateEvidenceParams as DisputeUpdateEvidenceParams,
|
|
1397
1441
|
};
|
|
1398
1442
|
|
|
1443
|
+
export {
|
|
1444
|
+
Refunds as Refunds,
|
|
1445
|
+
type PaymentProvider as PaymentProvider,
|
|
1446
|
+
type RefundReferenceStatus as RefundReferenceStatus,
|
|
1447
|
+
type RefundReferenceType as RefundReferenceType,
|
|
1448
|
+
type RefundStatus as RefundStatus,
|
|
1449
|
+
type RefundRetrieveResponse as RefundRetrieveResponse,
|
|
1450
|
+
type RefundListResponse as RefundListResponse,
|
|
1451
|
+
type RefundListResponsesCursorPage as RefundListResponsesCursorPage,
|
|
1452
|
+
type RefundListParams as RefundListParams,
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
export {
|
|
1456
|
+
Withdrawals as Withdrawals,
|
|
1457
|
+
type WithdrawalFeeTypes as WithdrawalFeeTypes,
|
|
1458
|
+
type WithdrawalSpeeds as WithdrawalSpeeds,
|
|
1459
|
+
type WithdrawalStatus as WithdrawalStatus,
|
|
1460
|
+
type WithdrawalTypes as WithdrawalTypes,
|
|
1461
|
+
type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse,
|
|
1462
|
+
type WithdrawalListResponse as WithdrawalListResponse,
|
|
1463
|
+
type WithdrawalListResponsesCursorPage as WithdrawalListResponsesCursorPage,
|
|
1464
|
+
type WithdrawalListParams as WithdrawalListParams,
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1399
1467
|
export type AccessLevel = API.AccessLevel;
|
|
1400
1468
|
export type AccessPassType = API.AccessPassType;
|
|
1401
1469
|
export type App = API.App;
|
package/src/resources/apps.ts
CHANGED
|
@@ -88,6 +88,11 @@ export class Apps extends APIResource {
|
|
|
88
88
|
|
|
89
89
|
export type AppListResponsesCursorPage = CursorPage<AppListResponse>;
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* The type of end-user an app is built for
|
|
93
|
+
*/
|
|
94
|
+
export type AppType = 'b2b_app' | 'b2c_app' | 'company_app' | 'component';
|
|
95
|
+
|
|
91
96
|
/**
|
|
92
97
|
* An object representing an app
|
|
93
98
|
*/
|
|
@@ -97,6 +102,11 @@ export interface AppListResponse {
|
|
|
97
102
|
*/
|
|
98
103
|
id: string;
|
|
99
104
|
|
|
105
|
+
/**
|
|
106
|
+
* The type of end-user an app is built for
|
|
107
|
+
*/
|
|
108
|
+
app_type: AppType;
|
|
109
|
+
|
|
100
110
|
/**
|
|
101
111
|
* The base url of the app
|
|
102
112
|
*/
|
|
@@ -241,6 +251,11 @@ export interface AppUpdateParams {
|
|
|
241
251
|
*/
|
|
242
252
|
app_store_description?: string | null;
|
|
243
253
|
|
|
254
|
+
/**
|
|
255
|
+
* The type of end-user an app is built for
|
|
256
|
+
*/
|
|
257
|
+
app_type?: AppType | null;
|
|
258
|
+
|
|
244
259
|
/**
|
|
245
260
|
* The base production url of the app
|
|
246
261
|
*/
|
|
@@ -314,6 +329,11 @@ export namespace AppUpdateParams {
|
|
|
314
329
|
}
|
|
315
330
|
|
|
316
331
|
export interface AppListParams extends CursorPageParams {
|
|
332
|
+
/**
|
|
333
|
+
* The type of end-user an app is built for
|
|
334
|
+
*/
|
|
335
|
+
app_type?: AppType | null;
|
|
336
|
+
|
|
317
337
|
/**
|
|
318
338
|
* Returns the elements in the list that come before the specified cursor.
|
|
319
339
|
*/
|
|
@@ -369,6 +389,7 @@ export interface AppListParams extends CursorPageParams {
|
|
|
369
389
|
|
|
370
390
|
export declare namespace Apps {
|
|
371
391
|
export {
|
|
392
|
+
type AppType as AppType,
|
|
372
393
|
type AppListResponse as AppListResponse,
|
|
373
394
|
type AppListResponsesCursorPage as AppListResponsesCursorPage,
|
|
374
395
|
type AppCreateParams as AppCreateParams,
|