@whop/sdk 0.0.3 → 0.0.5
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 +64 -0
- package/client.d.mts +14 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -8
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +8 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +58 -0
- package/resources/access-tokens.d.mts.map +1 -0
- package/resources/access-tokens.d.ts +58 -0
- package/resources/access-tokens.d.ts.map +1 -0
- package/resources/access-tokens.js +25 -0
- package/resources/access-tokens.js.map +1 -0
- package/resources/access-tokens.mjs +21 -0
- package/resources/access-tokens.mjs.map +1 -0
- package/resources/app-builds.d.mts +16 -13
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +16 -13
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +1 -1
- package/resources/app-builds.mjs +1 -1
- package/resources/apps.d.mts +15 -10
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +15 -10
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +221 -183
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +221 -183
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +4 -20
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +4 -20
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +157 -0
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +157 -0
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +22 -0
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +22 -0
- package/resources/companies.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +2 -2
- package/resources/course-lesson-interactions.d.ts +2 -2
- package/resources/course-lesson-interactions.js +2 -2
- package/resources/course-lesson-interactions.mjs +2 -2
- package/resources/course-lessons.d.mts +184 -24
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +184 -24
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-students.d.mts +187 -0
- package/resources/course-students.d.mts.map +1 -0
- package/resources/course-students.d.ts +187 -0
- package/resources/course-students.d.ts.map +1 -0
- package/resources/course-students.js +36 -0
- package/resources/course-students.js.map +1 -0
- package/resources/course-students.mjs +32 -0
- package/resources/course-students.mjs.map +1 -0
- package/resources/courses.d.mts +85 -21
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +85 -21
- package/resources/courses.d.ts.map +1 -1
- package/resources/entries.d.mts +2 -2
- package/resources/entries.d.ts +2 -2
- package/resources/experiences.d.mts +15 -10
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +15 -10
- package/resources/experiences.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +29 -19
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +29 -19
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +6 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -4
- 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 +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +539 -167
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +539 -167
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +2 -24
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -24
- package/resources/invoices.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +11 -11
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +11 -11
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +4 -4
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +4 -4
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +29 -19
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +29 -19
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +10 -3
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +10 -3
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +118 -20
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +118 -20
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +20 -15
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +20 -15
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +4 -4
- package/resources/promo-codes.d.ts +4 -4
- package/resources/shared.d.mts +69 -20
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +69 -20
- package/resources/shared.d.ts.map +1 -1
- package/resources/transfers.d.mts +12 -0
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +12 -0
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/src/client.ts +45 -10
- package/src/resources/access-tokens.ts +72 -0
- package/src/resources/app-builds.ts +19 -14
- package/src/resources/apps.ts +16 -11
- package/src/resources/checkout-configurations.ts +245 -199
- package/src/resources/companies.ts +196 -0
- package/src/resources/course-lesson-interactions.ts +2 -2
- package/src/resources/course-lessons.ts +223 -24
- package/src/resources/course-students.ts +238 -0
- package/src/resources/courses.ts +104 -22
- package/src/resources/entries.ts +2 -2
- package/src/resources/experiences.ts +19 -11
- package/src/resources/forum-posts.ts +35 -21
- package/src/resources/index.ts +17 -2
- package/src/resources/invoices.ts +630 -171
- package/src/resources/ledger-accounts.ts +1 -1
- package/src/resources/members.ts +12 -12
- package/src/resources/memberships.ts +5 -5
- package/src/resources/messages.ts +35 -21
- package/src/resources/payments.ts +10 -3
- package/src/resources/plans.ts +130 -20
- package/src/resources/products.ts +24 -16
- package/src/resources/promo-codes.ts +4 -4
- package/src/resources/shared.ts +70 -20
- package/src/resources/transfers.ts +10 -0
- package/src/resources/users.ts +3 -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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as PaymentsAPI from "./payments.mjs";
|
|
2
3
|
import * as Shared from "./shared.mjs";
|
|
3
4
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
5
|
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
@@ -17,24 +18,18 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
17
18
|
* @example
|
|
18
19
|
* ```ts
|
|
19
20
|
* const checkoutConfiguration =
|
|
20
|
-
* await client.checkoutConfigurations.create(
|
|
21
|
+
* await client.checkoutConfigurations.create({
|
|
22
|
+
* plan_id: 'plan_xxxxxxxxxxxxx',
|
|
23
|
+
* });
|
|
21
24
|
* ```
|
|
22
25
|
*/
|
|
23
|
-
create(body
|
|
26
|
+
create(body: CheckoutConfigurationCreateParams, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
24
27
|
/**
|
|
25
28
|
* Retrieves a checkout configuration by ID
|
|
26
29
|
*
|
|
27
30
|
* Required permissions:
|
|
28
31
|
*
|
|
29
32
|
* - `checkout_configuration:basic:read`
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const checkoutConfiguration =
|
|
34
|
-
* await client.checkoutConfigurations.retrieve(
|
|
35
|
-
* 'ch_xxxxxxxxxxxxxxx',
|
|
36
|
-
* );
|
|
37
|
-
* ```
|
|
38
33
|
*/
|
|
39
34
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
|
|
40
35
|
/**
|
|
@@ -43,16 +38,6 @@ export declare class CheckoutConfigurations extends APIResource {
|
|
|
43
38
|
* Required permissions:
|
|
44
39
|
*
|
|
45
40
|
* - `checkout_configuration:basic:read`
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* // Automatically fetches more pages as needed.
|
|
50
|
-
* for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list(
|
|
51
|
-
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
52
|
-
* )) {
|
|
53
|
-
* // ...
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
41
|
*/
|
|
57
42
|
list(query: CheckoutConfigurationListParams, options?: RequestOptions): PagePromise<CheckoutConfigurationListResponsesCursorPage, CheckoutConfigurationListResponse>;
|
|
58
43
|
}
|
|
@@ -143,226 +128,279 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
143
128
|
visibility: Shared.Visibility;
|
|
144
129
|
}
|
|
145
130
|
}
|
|
146
|
-
export
|
|
147
|
-
/**
|
|
148
|
-
* The affiliate code to use for the checkout configuration
|
|
149
|
-
*/
|
|
150
|
-
affiliate_code?: string | null;
|
|
151
|
-
/**
|
|
152
|
-
* The metadata to use for the checkout configuration
|
|
153
|
-
*/
|
|
154
|
-
metadata?: {
|
|
155
|
-
[key: string]: unknown;
|
|
156
|
-
} | null;
|
|
157
|
-
/**
|
|
158
|
-
* Pass this object to create a new plan for this checkout configuration
|
|
159
|
-
*/
|
|
160
|
-
plan?: CheckoutConfigurationCreateParams.Plan | null;
|
|
161
|
-
/**
|
|
162
|
-
* The ID of the plan to use for the checkout configuration
|
|
163
|
-
*/
|
|
164
|
-
plan_id?: string | null;
|
|
165
|
-
/**
|
|
166
|
-
* The URL to redirect the user to after the checkout configuration is created
|
|
167
|
-
*/
|
|
168
|
-
redirect_url?: string | null;
|
|
169
|
-
}
|
|
131
|
+
export type CheckoutConfigurationCreateParams = CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlan | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlanID;
|
|
170
132
|
export declare namespace CheckoutConfigurationCreateParams {
|
|
171
|
-
|
|
172
|
-
* Pass this object to create a new plan for this checkout configuration
|
|
173
|
-
*/
|
|
174
|
-
interface Plan {
|
|
175
|
-
/**
|
|
176
|
-
* The company the plan should be created for.
|
|
177
|
-
*/
|
|
178
|
-
company_id: string;
|
|
179
|
-
/**
|
|
180
|
-
* The interval at which the plan charges (renewal plans).
|
|
181
|
-
*/
|
|
182
|
-
billing_period?: number | null;
|
|
183
|
-
/**
|
|
184
|
-
* The available currencies on the platform
|
|
185
|
-
*/
|
|
186
|
-
currency?: Shared.Currency | null;
|
|
187
|
-
/**
|
|
188
|
-
* An array of custom field objects.
|
|
189
|
-
*/
|
|
190
|
-
custom_fields?: Array<Plan.CustomField> | null;
|
|
191
|
-
/**
|
|
192
|
-
* The description of the plan.
|
|
193
|
-
*/
|
|
194
|
-
description?: string | null;
|
|
195
|
-
/**
|
|
196
|
-
* The interval at which the plan charges (expiration plans).
|
|
197
|
-
*/
|
|
198
|
-
expiration_days?: number | null;
|
|
199
|
-
/**
|
|
200
|
-
* Whether to force the creation of a new plan even if one with the same attributes
|
|
201
|
-
* already exists.
|
|
202
|
-
*/
|
|
203
|
-
force_create_new_plan?: boolean | null;
|
|
133
|
+
interface CreateCheckoutSessionInputWithPlan {
|
|
204
134
|
/**
|
|
205
|
-
*
|
|
135
|
+
* Pass this object to create a new plan for this checkout configuration
|
|
206
136
|
*/
|
|
207
|
-
|
|
137
|
+
plan: CreateCheckoutSessionInputWithPlan.Plan;
|
|
208
138
|
/**
|
|
209
|
-
*
|
|
139
|
+
* The affiliate code to use for the checkout configuration
|
|
210
140
|
*/
|
|
211
|
-
|
|
141
|
+
affiliate_code?: string | null;
|
|
212
142
|
/**
|
|
213
|
-
*
|
|
143
|
+
* The metadata to use for the checkout configuration
|
|
214
144
|
*/
|
|
215
|
-
|
|
145
|
+
metadata?: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
} | null;
|
|
216
148
|
/**
|
|
217
|
-
*
|
|
218
|
-
* up)
|
|
149
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
219
150
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
*/
|
|
224
|
-
plan_type?: Shared.PlanType | null;
|
|
225
|
-
/**
|
|
226
|
-
* Pass this object to create a new product for this plan. We will use the product
|
|
227
|
-
* external identifier to find or create an existing product.
|
|
228
|
-
*/
|
|
229
|
-
product?: Plan.Product | null;
|
|
230
|
-
/**
|
|
231
|
-
* The product the plan is related to. Either this or product is required.
|
|
232
|
-
*/
|
|
233
|
-
product_id?: string | null;
|
|
234
|
-
/**
|
|
235
|
-
* The methods of how a plan can be released.
|
|
236
|
-
*/
|
|
237
|
-
release_method?: Shared.ReleaseMethod | null;
|
|
238
|
-
/**
|
|
239
|
-
* The amount the customer is charged every billing period.
|
|
240
|
-
*/
|
|
241
|
-
renewal_price?: number | null;
|
|
242
|
-
/**
|
|
243
|
-
* The title of the plan. This will be visible on the product page to customers.
|
|
244
|
-
*/
|
|
245
|
-
title?: string | null;
|
|
246
|
-
/**
|
|
247
|
-
* The number of free trial days added before a renewal plan.
|
|
248
|
-
*/
|
|
249
|
-
trial_period_days?: number | null;
|
|
151
|
+
redirect_url?: string | null;
|
|
152
|
+
}
|
|
153
|
+
namespace CreateCheckoutSessionInputWithPlan {
|
|
250
154
|
/**
|
|
251
|
-
*
|
|
155
|
+
* Pass this object to create a new plan for this checkout configuration
|
|
252
156
|
*/
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
namespace Plan {
|
|
256
|
-
interface CustomField {
|
|
157
|
+
interface Plan {
|
|
257
158
|
/**
|
|
258
|
-
* The
|
|
159
|
+
* The company the plan should be created for.
|
|
259
160
|
*/
|
|
260
|
-
|
|
161
|
+
company_id: string;
|
|
261
162
|
/**
|
|
262
|
-
* The
|
|
163
|
+
* The interval at which the plan charges (renewal plans).
|
|
263
164
|
*/
|
|
264
|
-
|
|
165
|
+
billing_period?: number | null;
|
|
265
166
|
/**
|
|
266
|
-
* The
|
|
167
|
+
* The available currencies on the platform
|
|
267
168
|
*/
|
|
268
|
-
|
|
169
|
+
currency?: Shared.Currency | null;
|
|
269
170
|
/**
|
|
270
|
-
*
|
|
171
|
+
* An array of custom field objects.
|
|
271
172
|
*/
|
|
272
|
-
|
|
173
|
+
custom_fields?: Array<Plan.CustomField> | null;
|
|
273
174
|
/**
|
|
274
|
-
* The
|
|
175
|
+
* The description of the plan.
|
|
275
176
|
*/
|
|
276
|
-
|
|
177
|
+
description?: string | null;
|
|
277
178
|
/**
|
|
278
|
-
*
|
|
179
|
+
* The interval at which the plan charges (expiration plans).
|
|
279
180
|
*/
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* An image for the plan. This will be visible on the product page to customers.
|
|
284
|
-
*/
|
|
285
|
-
interface Image {
|
|
181
|
+
expiration_days?: number | null;
|
|
286
182
|
/**
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* doing.
|
|
183
|
+
* Whether to force the creation of a new plan even if one with the same attributes
|
|
184
|
+
* already exists.
|
|
290
185
|
*/
|
|
291
|
-
|
|
186
|
+
force_create_new_plan?: boolean | null;
|
|
292
187
|
/**
|
|
293
|
-
*
|
|
294
|
-
* the direct upload that was created when uploading the file to S3 via the
|
|
295
|
-
* mediaDirectUpload mutation.
|
|
188
|
+
* An image for the plan. This will be visible on the product page to customers.
|
|
296
189
|
*/
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Pass this object to create a new product for this plan. We will use the product
|
|
301
|
-
* external identifier to find or create an existing product.
|
|
302
|
-
*/
|
|
303
|
-
interface Product {
|
|
190
|
+
image?: Plan.AttachmentInputWithDirectUploadID | Plan.AttachmentInputWithID | null;
|
|
304
191
|
/**
|
|
305
|
-
*
|
|
306
|
-
* will look for an existing product with this external identifier — if found, it
|
|
307
|
-
* will be updated; otherwise, a new product will be created.
|
|
192
|
+
* An additional amount charged upon first purchase.
|
|
308
193
|
*/
|
|
309
|
-
|
|
194
|
+
initial_price?: number | null;
|
|
310
195
|
/**
|
|
311
|
-
*
|
|
196
|
+
* A personal description or notes section for the business.
|
|
312
197
|
*/
|
|
313
|
-
|
|
198
|
+
internal_notes?: string | null;
|
|
314
199
|
/**
|
|
315
|
-
*
|
|
200
|
+
* Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
201
|
+
* up)
|
|
316
202
|
*/
|
|
317
|
-
|
|
203
|
+
override_tax_type?: Shared.TaxType | null;
|
|
318
204
|
/**
|
|
319
|
-
*
|
|
205
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
206
|
+
* platform or company's defaults will apply.
|
|
320
207
|
*/
|
|
321
|
-
|
|
208
|
+
payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
|
|
322
209
|
/**
|
|
323
|
-
* The
|
|
324
|
-
* between 5 and 22 characters, contain at least one letter, and not contain any of
|
|
325
|
-
* the following characters: <, >, \, ', "
|
|
210
|
+
* The type of plan that can be attached to a product
|
|
326
211
|
*/
|
|
327
|
-
|
|
212
|
+
plan_type?: Shared.PlanType | null;
|
|
328
213
|
/**
|
|
329
|
-
*
|
|
214
|
+
* Pass this object to create a new product for this plan. We will use the product
|
|
215
|
+
* external identifier to find or create an existing product.
|
|
330
216
|
*/
|
|
331
|
-
|
|
217
|
+
product?: Plan.Product | null;
|
|
332
218
|
/**
|
|
333
|
-
* The
|
|
219
|
+
* The product the plan is related to. Either this or product is required.
|
|
334
220
|
*/
|
|
335
|
-
|
|
221
|
+
product_id?: string | null;
|
|
336
222
|
/**
|
|
337
|
-
* The
|
|
223
|
+
* The methods of how a plan can be released.
|
|
338
224
|
*/
|
|
339
|
-
|
|
225
|
+
release_method?: Shared.ReleaseMethod | null;
|
|
340
226
|
/**
|
|
341
|
-
* The
|
|
227
|
+
* The amount the customer is charged every billing period.
|
|
342
228
|
*/
|
|
343
|
-
|
|
229
|
+
renewal_price?: number | null;
|
|
344
230
|
/**
|
|
345
|
-
* The
|
|
231
|
+
* The title of the plan. This will be visible on the product page to customers.
|
|
346
232
|
*/
|
|
347
|
-
|
|
233
|
+
title?: string | null;
|
|
348
234
|
/**
|
|
349
|
-
* The
|
|
235
|
+
* The number of free trial days added before a renewal plan.
|
|
350
236
|
*/
|
|
351
|
-
|
|
237
|
+
trial_period_days?: number | null;
|
|
352
238
|
/**
|
|
353
|
-
*
|
|
239
|
+
* Visibility of a resource
|
|
354
240
|
*/
|
|
355
|
-
|
|
241
|
+
visibility?: Shared.Visibility | null;
|
|
242
|
+
}
|
|
243
|
+
namespace Plan {
|
|
244
|
+
interface CustomField {
|
|
245
|
+
/**
|
|
246
|
+
* The type of the custom field.
|
|
247
|
+
*/
|
|
248
|
+
field_type: 'text';
|
|
249
|
+
/**
|
|
250
|
+
* The name of the custom field.
|
|
251
|
+
*/
|
|
252
|
+
name: string;
|
|
253
|
+
/**
|
|
254
|
+
* The ID of the custom field (if being updated)
|
|
255
|
+
*/
|
|
256
|
+
id?: string | null;
|
|
257
|
+
/**
|
|
258
|
+
* The order of the field.
|
|
259
|
+
*/
|
|
260
|
+
order?: number | null;
|
|
261
|
+
/**
|
|
262
|
+
* The placeholder value of the field.
|
|
263
|
+
*/
|
|
264
|
+
placeholder?: string | null;
|
|
265
|
+
/**
|
|
266
|
+
* Whether or not the field is required.
|
|
267
|
+
*/
|
|
268
|
+
required?: boolean | null;
|
|
269
|
+
}
|
|
356
270
|
/**
|
|
357
|
-
*
|
|
271
|
+
* Input for an attachment
|
|
358
272
|
*/
|
|
359
|
-
|
|
273
|
+
interface AttachmentInputWithDirectUploadID {
|
|
274
|
+
/**
|
|
275
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
276
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
277
|
+
* mediaDirectUpload mutation.
|
|
278
|
+
*/
|
|
279
|
+
direct_upload_id: string;
|
|
280
|
+
}
|
|
360
281
|
/**
|
|
361
|
-
*
|
|
282
|
+
* Input for an attachment
|
|
362
283
|
*/
|
|
363
|
-
|
|
284
|
+
interface AttachmentInputWithID {
|
|
285
|
+
/**
|
|
286
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
287
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
288
|
+
* doing.
|
|
289
|
+
*/
|
|
290
|
+
id: string;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
294
|
+
* platform or company's defaults will apply.
|
|
295
|
+
*/
|
|
296
|
+
interface PaymentMethodConfiguration {
|
|
297
|
+
/**
|
|
298
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
299
|
+
* applies if the include_platform_defaults is true.
|
|
300
|
+
*/
|
|
301
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
302
|
+
/**
|
|
303
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
304
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
305
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
306
|
+
* defaults with additional methods.
|
|
307
|
+
*/
|
|
308
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
309
|
+
/**
|
|
310
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
311
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
312
|
+
* the documentation at docs.whop.com/payments.
|
|
313
|
+
*/
|
|
314
|
+
include_platform_defaults: boolean;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Pass this object to create a new product for this plan. We will use the product
|
|
318
|
+
* external identifier to find or create an existing product.
|
|
319
|
+
*/
|
|
320
|
+
interface Product {
|
|
321
|
+
/**
|
|
322
|
+
* A unique ID used to find or create a product. When provided during creation, we
|
|
323
|
+
* will look for an existing product with this external identifier — if found, it
|
|
324
|
+
* will be updated; otherwise, a new product will be created.
|
|
325
|
+
*/
|
|
326
|
+
external_identifier: string;
|
|
327
|
+
/**
|
|
328
|
+
* The title of the product.
|
|
329
|
+
*/
|
|
330
|
+
title: string;
|
|
331
|
+
/**
|
|
332
|
+
* The different business types a company can be.
|
|
333
|
+
*/
|
|
334
|
+
business_type?: Shared.BusinessTypes | null;
|
|
335
|
+
/**
|
|
336
|
+
* Whether or not to collect shipping information at checkout from the customer.
|
|
337
|
+
*/
|
|
338
|
+
collect_shipping_address?: boolean | null;
|
|
339
|
+
/**
|
|
340
|
+
* The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
|
|
341
|
+
* between 5 and 22 characters, contain at least one letter, and not contain any of
|
|
342
|
+
* the following characters: <, >, \, ', "
|
|
343
|
+
*/
|
|
344
|
+
custom_statement_descriptor?: string | null;
|
|
345
|
+
/**
|
|
346
|
+
* A written description of the product.
|
|
347
|
+
*/
|
|
348
|
+
description?: string | null;
|
|
349
|
+
/**
|
|
350
|
+
* The percentage of the revenue that goes to the global affiliate program.
|
|
351
|
+
*/
|
|
352
|
+
global_affiliate_percentage?: number | null;
|
|
353
|
+
/**
|
|
354
|
+
* The different statuses of the global affiliate program for a product.
|
|
355
|
+
*/
|
|
356
|
+
global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
357
|
+
/**
|
|
358
|
+
* The headline of the product.
|
|
359
|
+
*/
|
|
360
|
+
headline?: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* The different industry types a company can be in.
|
|
363
|
+
*/
|
|
364
|
+
industry_type?: Shared.IndustryTypes | null;
|
|
365
|
+
/**
|
|
366
|
+
* The ID of the product tax code to apply to this product.
|
|
367
|
+
*/
|
|
368
|
+
product_tax_code_id?: string | null;
|
|
369
|
+
/**
|
|
370
|
+
* The URL to redirect the customer to after a purchase.
|
|
371
|
+
*/
|
|
372
|
+
redirect_purchase_url?: string | null;
|
|
373
|
+
/**
|
|
374
|
+
* The route of the product.
|
|
375
|
+
*/
|
|
376
|
+
route?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Visibility of a resource
|
|
379
|
+
*/
|
|
380
|
+
visibility?: Shared.Visibility | null;
|
|
381
|
+
}
|
|
364
382
|
}
|
|
365
383
|
}
|
|
384
|
+
interface CreateCheckoutSessionInputWithPlanID {
|
|
385
|
+
/**
|
|
386
|
+
* The ID of the plan to use for the checkout configuration
|
|
387
|
+
*/
|
|
388
|
+
plan_id: string;
|
|
389
|
+
/**
|
|
390
|
+
* The affiliate code to use for the checkout configuration
|
|
391
|
+
*/
|
|
392
|
+
affiliate_code?: string | null;
|
|
393
|
+
/**
|
|
394
|
+
* The metadata to use for the checkout configuration
|
|
395
|
+
*/
|
|
396
|
+
metadata?: {
|
|
397
|
+
[key: string]: unknown;
|
|
398
|
+
} | null;
|
|
399
|
+
/**
|
|
400
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
401
|
+
*/
|
|
402
|
+
redirect_url?: string | null;
|
|
403
|
+
}
|
|
366
404
|
}
|
|
367
405
|
export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
368
406
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,sBAAuB,SAAQ,WAAW;IACrD
|
|
1
|
+
{"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,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