@whop/sdk 0.0.2 → 0.0.4
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 +55 -0
- package/client.d.mts +30 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -12
- package/client.d.ts.map +1 -1
- package/client.js +19 -1
- package/client.js.map +1 -1
- package/client.mjs +21 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- 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 +252 -140
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +252 -140
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +6 -20
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +6 -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-chapters.d.mts +185 -0
- package/resources/course-chapters.d.mts.map +1 -0
- package/resources/course-chapters.d.ts +185 -0
- package/resources/course-chapters.d.ts.map +1 -0
- package/resources/course-chapters.js +103 -0
- package/resources/course-chapters.js.map +1 -0
- package/resources/course-chapters.mjs +99 -0
- package/resources/course-chapters.mjs.map +1 -0
- 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 +563 -0
- package/resources/course-lessons.d.mts.map +1 -0
- package/resources/course-lessons.d.ts +563 -0
- package/resources/course-lessons.d.ts.map +1 -0
- package/resources/course-lessons.js +101 -0
- package/resources/course-lessons.js.map +1 -0
- package/resources/course-lessons.mjs +97 -0
- package/resources/course-lessons.mjs.map +1 -0
- 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 +485 -0
- package/resources/courses.d.mts.map +1 -0
- package/resources/courses.d.ts +485 -0
- package/resources/courses.d.ts.map +1 -0
- package/resources/courses.js +98 -0
- package/resources/courses.js.map +1 -0
- package/resources/courses.mjs +94 -0
- package/resources/courses.mjs.map +1 -0
- package/resources/experiences.d.mts +42 -11
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +42 -11
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +22 -0
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +22 -0
- package/resources/experiences.mjs.map +1 -1
- package/resources/forum-posts.d.mts +75 -10
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +75 -10
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +11 -0
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +11 -0
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/index.d.mts +12 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +529 -146
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +529 -146
- 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.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +4 -0
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +4 -0
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +26 -5
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +26 -5
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +1 -1
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +1 -1
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +57 -10
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +57 -10
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +6 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +6 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/payments.d.mts +35 -13
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +35 -13
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +161 -17
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +161 -17
- 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 +30 -33
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +30 -33
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +394 -0
- package/resources/promo-codes.d.mts.map +1 -0
- package/resources/promo-codes.d.ts +394 -0
- package/resources/promo-codes.d.ts.map +1 -0
- package/resources/promo-codes.js +91 -0
- package/resources/promo-codes.js.map +1 -0
- package/resources/promo-codes.mjs +87 -0
- package/resources/promo-codes.mjs.map +1 -0
- package/resources/reviews.d.mts +277 -0
- package/resources/reviews.d.mts.map +1 -0
- package/resources/reviews.d.ts +277 -0
- package/resources/reviews.d.ts.map +1 -0
- package/resources/reviews.js +23 -0
- package/resources/reviews.js.map +1 -0
- package/resources/reviews.mjs +19 -0
- package/resources/reviews.mjs.map +1 -0
- package/resources/shared.d.mts +117 -14
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +117 -14
- 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/src/client.ts +166 -11
- package/src/resources/app-builds.ts +19 -14
- package/src/resources/apps.ts +16 -11
- package/src/resources/checkout-configurations.ts +278 -143
- package/src/resources/companies.ts +196 -0
- package/src/resources/course-chapters.ts +236 -0
- package/src/resources/course-lesson-interactions.ts +2 -2
- package/src/resources/course-lessons.ts +699 -0
- package/src/resources/course-students.ts +238 -0
- package/src/resources/courses.ts +622 -0
- package/src/resources/experiences.ts +54 -11
- package/src/resources/forum-posts.ts +95 -10
- package/src/resources/index.ts +73 -2
- package/src/resources/invoices.ts +620 -149
- package/src/resources/ledger-accounts.ts +13 -1
- package/src/resources/members.ts +5 -0
- package/src/resources/memberships.ts +31 -6
- package/src/resources/messages.ts +74 -10
- package/src/resources/payments.ts +146 -19
- package/src/resources/plans.ts +184 -17
- package/src/resources/products.ts +36 -37
- package/src/resources/promo-codes.ts +490 -0
- package/src/resources/reviews.ts +348 -0
- package/src/resources/shared.ts +128 -14
- package/src/resources/transfers.ts +10 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/plans.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as PaymentsAPI from './payments';
|
|
4
5
|
import * as Shared from './shared';
|
|
5
6
|
import { APIPromise } from '../core/api-promise';
|
|
6
7
|
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
@@ -175,6 +176,11 @@ export interface PlanListResponse {
|
|
|
175
176
|
*/
|
|
176
177
|
member_count: number | null;
|
|
177
178
|
|
|
179
|
+
/**
|
|
180
|
+
* The explicit payment method configuration for the plan, if any.
|
|
181
|
+
*/
|
|
182
|
+
payment_method_configuration: PlanListResponse.PaymentMethodConfiguration | null;
|
|
183
|
+
|
|
178
184
|
/**
|
|
179
185
|
* Indicates if the plan is a one time payment or recurring.
|
|
180
186
|
*/
|
|
@@ -200,11 +206,26 @@ export interface PlanListResponse {
|
|
|
200
206
|
*/
|
|
201
207
|
renewal_price: number;
|
|
202
208
|
|
|
209
|
+
/**
|
|
210
|
+
* The number of units available for purchase. Only displayed to authorized actors
|
|
211
|
+
*/
|
|
212
|
+
stock: number | null;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* The title of the plan. This will be visible on the product page to customers.
|
|
216
|
+
*/
|
|
217
|
+
title: string | null;
|
|
218
|
+
|
|
203
219
|
/**
|
|
204
220
|
* The number of free trial days added before a renewal plan.
|
|
205
221
|
*/
|
|
206
222
|
trial_period_days: number | null;
|
|
207
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
226
|
+
*/
|
|
227
|
+
unlimited_stock: boolean;
|
|
228
|
+
|
|
208
229
|
/**
|
|
209
230
|
* When the plan was last updated.
|
|
210
231
|
*/
|
|
@@ -242,6 +263,32 @@ export namespace PlanListResponse {
|
|
|
242
263
|
id: string;
|
|
243
264
|
}
|
|
244
265
|
|
|
266
|
+
/**
|
|
267
|
+
* The explicit payment method configuration for the plan, if any.
|
|
268
|
+
*/
|
|
269
|
+
export interface PaymentMethodConfiguration {
|
|
270
|
+
/**
|
|
271
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
272
|
+
* applies if the include_platform_defaults is true.
|
|
273
|
+
*/
|
|
274
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
278
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
279
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
280
|
+
* defaults with additional methods.
|
|
281
|
+
*/
|
|
282
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
286
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
287
|
+
* the documentation at docs.whop.com/payments.
|
|
288
|
+
*/
|
|
289
|
+
include_platform_defaults: boolean;
|
|
290
|
+
}
|
|
291
|
+
|
|
245
292
|
/**
|
|
246
293
|
* The access pass for the plan.
|
|
247
294
|
*/
|
|
@@ -275,7 +322,7 @@ export interface PlanCreateParams {
|
|
|
275
322
|
product_id: string;
|
|
276
323
|
|
|
277
324
|
/**
|
|
278
|
-
* The interval at which the plan charges (renewal plans).
|
|
325
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
279
326
|
*/
|
|
280
327
|
billing_period?: number | null;
|
|
281
328
|
|
|
@@ -302,7 +349,7 @@ export interface PlanCreateParams {
|
|
|
302
349
|
/**
|
|
303
350
|
* An image for the plan. This will be visible on the product page to customers.
|
|
304
351
|
*/
|
|
305
|
-
image?: PlanCreateParams.
|
|
352
|
+
image?: PlanCreateParams.AttachmentInputWithDirectUploadID | PlanCreateParams.AttachmentInputWithID | null;
|
|
306
353
|
|
|
307
354
|
/**
|
|
308
355
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
@@ -322,6 +369,12 @@ export interface PlanCreateParams {
|
|
|
322
369
|
*/
|
|
323
370
|
override_tax_type?: Shared.TaxType | null;
|
|
324
371
|
|
|
372
|
+
/**
|
|
373
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
374
|
+
* platform or company's defaults will apply.
|
|
375
|
+
*/
|
|
376
|
+
payment_method_configuration?: PlanCreateParams.PaymentMethodConfiguration | null;
|
|
377
|
+
|
|
325
378
|
/**
|
|
326
379
|
* The type of plan that can be attached to an access pass
|
|
327
380
|
*/
|
|
@@ -338,6 +391,23 @@ export interface PlanCreateParams {
|
|
|
338
391
|
*/
|
|
339
392
|
renewal_price?: number | null;
|
|
340
393
|
|
|
394
|
+
/**
|
|
395
|
+
* The number of units available for purchase.
|
|
396
|
+
*/
|
|
397
|
+
stock?: number | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* The price to display with a strikethrough for the initial price. Provided as a
|
|
401
|
+
* number in dollars. Eg: 19.99 for $19.99
|
|
402
|
+
*/
|
|
403
|
+
strike_through_initial_price?: number | null;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* The price to display with a strikethrough for the renewal price. Provided as a
|
|
407
|
+
* number in dollars. Eg: 19.99 for $19.99
|
|
408
|
+
*/
|
|
409
|
+
strike_through_renewal_price?: number | null;
|
|
410
|
+
|
|
341
411
|
/**
|
|
342
412
|
* The title of the plan. This will be visible on the product page to customers.
|
|
343
413
|
*/
|
|
@@ -348,6 +418,11 @@ export interface PlanCreateParams {
|
|
|
348
418
|
*/
|
|
349
419
|
trial_period_days?: number | null;
|
|
350
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
423
|
+
*/
|
|
424
|
+
unlimited_stock?: boolean | null;
|
|
425
|
+
|
|
351
426
|
/**
|
|
352
427
|
* Visibility of a resource
|
|
353
428
|
*/
|
|
@@ -388,22 +463,54 @@ export namespace PlanCreateParams {
|
|
|
388
463
|
}
|
|
389
464
|
|
|
390
465
|
/**
|
|
391
|
-
*
|
|
466
|
+
* Input for an attachment
|
|
392
467
|
*/
|
|
393
|
-
export interface
|
|
468
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
469
|
+
/**
|
|
470
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
471
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
472
|
+
* mediaDirectUpload mutation.
|
|
473
|
+
*/
|
|
474
|
+
direct_upload_id: string;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Input for an attachment
|
|
479
|
+
*/
|
|
480
|
+
export interface AttachmentInputWithID {
|
|
394
481
|
/**
|
|
395
482
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
396
483
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
397
484
|
* doing.
|
|
398
485
|
*/
|
|
399
|
-
id
|
|
486
|
+
id: string;
|
|
487
|
+
}
|
|
400
488
|
|
|
489
|
+
/**
|
|
490
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
491
|
+
* platform or company's defaults will apply.
|
|
492
|
+
*/
|
|
493
|
+
export interface PaymentMethodConfiguration {
|
|
401
494
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
|
|
495
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
496
|
+
* applies if the include_platform_defaults is true.
|
|
497
|
+
*/
|
|
498
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
502
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
503
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
504
|
+
* defaults with additional methods.
|
|
505
|
+
*/
|
|
506
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
510
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
511
|
+
* the documentation at docs.whop.com/payments.
|
|
405
512
|
*/
|
|
406
|
-
|
|
513
|
+
include_platform_defaults: boolean;
|
|
407
514
|
}
|
|
408
515
|
}
|
|
409
516
|
|
|
@@ -436,7 +543,7 @@ export interface PlanUpdateParams {
|
|
|
436
543
|
/**
|
|
437
544
|
* An image for the plan. This will be visible on the product page to customers.
|
|
438
545
|
*/
|
|
439
|
-
image?: PlanUpdateParams.
|
|
546
|
+
image?: PlanUpdateParams.AttachmentInputWithDirectUploadID | PlanUpdateParams.AttachmentInputWithID | null;
|
|
440
547
|
|
|
441
548
|
/**
|
|
442
549
|
* An additional amount charged upon first purchase.
|
|
@@ -459,11 +566,34 @@ export interface PlanUpdateParams {
|
|
|
459
566
|
*/
|
|
460
567
|
override_tax_type?: Shared.TaxType | null;
|
|
461
568
|
|
|
569
|
+
/**
|
|
570
|
+
* The explicit payment method configuration for the plan. If sent as null, the
|
|
571
|
+
* custom configuration will be removed.
|
|
572
|
+
*/
|
|
573
|
+
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
574
|
+
|
|
462
575
|
/**
|
|
463
576
|
* The amount the customer is charged every billing period.
|
|
464
577
|
*/
|
|
465
578
|
renewal_price?: number | null;
|
|
466
579
|
|
|
580
|
+
/**
|
|
581
|
+
* The number of units available for purchase.
|
|
582
|
+
*/
|
|
583
|
+
stock?: number | null;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* The price to display with a strikethrough for the initial price. Provided as a
|
|
587
|
+
* number in dollars. Eg: 19.99 for $19.99
|
|
588
|
+
*/
|
|
589
|
+
strike_through_initial_price?: number | null;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* The price to display with a strikethrough for the renewal price. Provided as a
|
|
593
|
+
* number in dollars. Eg: 19.99 for $19.99
|
|
594
|
+
*/
|
|
595
|
+
strike_through_renewal_price?: number | null;
|
|
596
|
+
|
|
467
597
|
/**
|
|
468
598
|
* The title of the plan. This will be visible on the product page to customers.
|
|
469
599
|
*/
|
|
@@ -474,6 +604,11 @@ export interface PlanUpdateParams {
|
|
|
474
604
|
*/
|
|
475
605
|
trial_period_days?: number | null;
|
|
476
606
|
|
|
607
|
+
/**
|
|
608
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
609
|
+
*/
|
|
610
|
+
unlimited_stock?: boolean | null;
|
|
611
|
+
|
|
477
612
|
/**
|
|
478
613
|
* Visibility of a resource
|
|
479
614
|
*/
|
|
@@ -514,22 +649,54 @@ export namespace PlanUpdateParams {
|
|
|
514
649
|
}
|
|
515
650
|
|
|
516
651
|
/**
|
|
517
|
-
*
|
|
652
|
+
* Input for an attachment
|
|
518
653
|
*/
|
|
519
|
-
export interface
|
|
654
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
655
|
+
/**
|
|
656
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
657
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
658
|
+
* mediaDirectUpload mutation.
|
|
659
|
+
*/
|
|
660
|
+
direct_upload_id: string;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Input for an attachment
|
|
665
|
+
*/
|
|
666
|
+
export interface AttachmentInputWithID {
|
|
520
667
|
/**
|
|
521
668
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
522
669
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
523
670
|
* doing.
|
|
524
671
|
*/
|
|
525
|
-
id
|
|
672
|
+
id: string;
|
|
673
|
+
}
|
|
526
674
|
|
|
675
|
+
/**
|
|
676
|
+
* The explicit payment method configuration for the plan. If sent as null, the
|
|
677
|
+
* custom configuration will be removed.
|
|
678
|
+
*/
|
|
679
|
+
export interface PaymentMethodConfiguration {
|
|
527
680
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
|
|
681
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
682
|
+
* applies if the include_platform_defaults is true.
|
|
683
|
+
*/
|
|
684
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
688
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
689
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
690
|
+
* defaults with additional methods.
|
|
691
|
+
*/
|
|
692
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
696
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
697
|
+
* the documentation at docs.whop.com/payments.
|
|
531
698
|
*/
|
|
532
|
-
|
|
699
|
+
include_platform_defaults: boolean;
|
|
533
700
|
}
|
|
534
701
|
}
|
|
535
702
|
|
|
@@ -129,16 +129,6 @@ export interface ProductCreateParams {
|
|
|
129
129
|
*/
|
|
130
130
|
title: string;
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* The different types an access pass can be.
|
|
134
|
-
*/
|
|
135
|
-
access_pass_type?: Shared.AccessPassType | null;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A banner image for the product in png, jpeg format
|
|
139
|
-
*/
|
|
140
|
-
banner_image?: ProductCreateParams.BannerImage | null;
|
|
141
|
-
|
|
142
132
|
/**
|
|
143
133
|
* The different business types a company can be.
|
|
144
134
|
*/
|
|
@@ -238,25 +228,6 @@ export interface ProductCreateParams {
|
|
|
238
228
|
}
|
|
239
229
|
|
|
240
230
|
export namespace ProductCreateParams {
|
|
241
|
-
/**
|
|
242
|
-
* A banner image for the product in png, jpeg format
|
|
243
|
-
*/
|
|
244
|
-
export interface BannerImage {
|
|
245
|
-
/**
|
|
246
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
247
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
248
|
-
* doing.
|
|
249
|
-
*/
|
|
250
|
-
id?: string | null;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
254
|
-
* the direct upload that was created when uploading the file to S3 via the
|
|
255
|
-
* mediaDirectUpload mutation.
|
|
256
|
-
*/
|
|
257
|
-
direct_upload_id?: string | null;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
231
|
/**
|
|
261
232
|
* The details to assign an autogenerated plan.
|
|
262
233
|
*/
|
|
@@ -362,7 +333,10 @@ export interface ProductUpdateParams {
|
|
|
362
333
|
/**
|
|
363
334
|
* A banner image for the product in png, jpeg format
|
|
364
335
|
*/
|
|
365
|
-
banner_image?:
|
|
336
|
+
banner_image?:
|
|
337
|
+
| ProductUpdateParams.AttachmentInputWithDirectUploadID
|
|
338
|
+
| ProductUpdateParams.AttachmentInputWithID
|
|
339
|
+
| null;
|
|
366
340
|
|
|
367
341
|
/**
|
|
368
342
|
* The different business types a company can be.
|
|
@@ -441,6 +415,11 @@ export interface ProductUpdateParams {
|
|
|
441
415
|
*/
|
|
442
416
|
route?: string | null;
|
|
443
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Configuration for a product on the company's store page.
|
|
420
|
+
*/
|
|
421
|
+
store_page_config?: ProductUpdateParams.StorePageConfig | null;
|
|
422
|
+
|
|
444
423
|
/**
|
|
445
424
|
* The title of the product.
|
|
446
425
|
*/
|
|
@@ -454,22 +433,42 @@ export interface ProductUpdateParams {
|
|
|
454
433
|
|
|
455
434
|
export namespace ProductUpdateParams {
|
|
456
435
|
/**
|
|
457
|
-
*
|
|
436
|
+
* Input for an attachment
|
|
437
|
+
*/
|
|
438
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
439
|
+
/**
|
|
440
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
441
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
442
|
+
* mediaDirectUpload mutation.
|
|
443
|
+
*/
|
|
444
|
+
direct_upload_id: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Input for an attachment
|
|
458
449
|
*/
|
|
459
|
-
export interface
|
|
450
|
+
export interface AttachmentInputWithID {
|
|
460
451
|
/**
|
|
461
452
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
462
453
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
463
454
|
* doing.
|
|
464
455
|
*/
|
|
465
|
-
id
|
|
456
|
+
id: string;
|
|
457
|
+
}
|
|
466
458
|
|
|
459
|
+
/**
|
|
460
|
+
* Configuration for a product on the company's store page.
|
|
461
|
+
*/
|
|
462
|
+
export interface StorePageConfig {
|
|
467
463
|
/**
|
|
468
|
-
*
|
|
469
|
-
|
|
470
|
-
|
|
464
|
+
* Custom call-to-action text for the product's store page.
|
|
465
|
+
*/
|
|
466
|
+
custom_cta?: string | null;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Whether or not to show the price on the product's store page.
|
|
471
470
|
*/
|
|
472
|
-
|
|
471
|
+
show_price?: boolean | null;
|
|
473
472
|
}
|
|
474
473
|
}
|
|
475
474
|
|