@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
package/src/resources/members.ts
CHANGED
|
@@ -53,9 +53,9 @@ export interface MemberRetrieveResponse {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* The access level of the product member. If its admin, the member is an
|
|
56
|
-
* authorized user of the
|
|
57
|
-
* membership to the
|
|
58
|
-
* to the
|
|
56
|
+
* authorized user of the company. If its customer, the member has a valid
|
|
57
|
+
* membership to any product on the company. If its no_access, the member does not
|
|
58
|
+
* have access to the product.
|
|
59
59
|
*/
|
|
60
60
|
access_level: Shared.AccessLevel;
|
|
61
61
|
|
|
@@ -170,9 +170,9 @@ export interface MemberListResponse {
|
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* The access level of the product member. If its admin, the member is an
|
|
173
|
-
* authorized user of the
|
|
174
|
-
* membership to the
|
|
175
|
-
* to the
|
|
173
|
+
* authorized user of the company. If its customer, the member has a valid
|
|
174
|
+
* membership to any product on the company. If its no_access, the member does not
|
|
175
|
+
* have access to the product.
|
|
176
176
|
*/
|
|
177
177
|
access_level: Shared.AccessLevel;
|
|
178
178
|
|
|
@@ -256,15 +256,10 @@ export interface MemberListParams extends CursorPageParams {
|
|
|
256
256
|
company_id: string;
|
|
257
257
|
|
|
258
258
|
/**
|
|
259
|
-
* The access level a given user (or company) has to
|
|
259
|
+
* The access level a given user (or company) has to a product or company.
|
|
260
260
|
*/
|
|
261
261
|
access_level?: Shared.AccessLevel | null;
|
|
262
262
|
|
|
263
|
-
/**
|
|
264
|
-
* The access pass IDs to filter the members by
|
|
265
|
-
*/
|
|
266
|
-
access_pass_ids?: Array<string> | null;
|
|
267
|
-
|
|
268
263
|
/**
|
|
269
264
|
* Returns the elements in the list that come before the specified cursor.
|
|
270
265
|
*/
|
|
@@ -310,6 +305,11 @@ export interface MemberListParams extends CursorPageParams {
|
|
|
310
305
|
*/
|
|
311
306
|
plan_ids?: Array<string> | null;
|
|
312
307
|
|
|
308
|
+
/**
|
|
309
|
+
* The product IDs to filter the members by
|
|
310
|
+
*/
|
|
311
|
+
product_ids?: Array<string> | null;
|
|
312
|
+
|
|
313
313
|
/**
|
|
314
314
|
* The promo code IDs to filter the members by
|
|
315
315
|
*/
|
|
@@ -297,11 +297,6 @@ export interface MembershipUpdateParams {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
export interface MembershipListParams extends CursorPageParams {
|
|
300
|
-
/**
|
|
301
|
-
* The access pass IDs to filter the memberships by
|
|
302
|
-
*/
|
|
303
|
-
access_pass_ids?: Array<string> | null;
|
|
304
|
-
|
|
305
300
|
/**
|
|
306
301
|
* Returns the elements in the list that come before the specified cursor.
|
|
307
302
|
*/
|
|
@@ -360,6 +355,11 @@ export interface MembershipListParams extends CursorPageParams {
|
|
|
360
355
|
*/
|
|
361
356
|
plan_ids?: Array<string> | null;
|
|
362
357
|
|
|
358
|
+
/**
|
|
359
|
+
* The product IDs to filter the memberships by
|
|
360
|
+
*/
|
|
361
|
+
product_ids?: Array<string> | null;
|
|
362
|
+
|
|
363
363
|
/**
|
|
364
364
|
* The promo code IDs to filter the memberships by
|
|
365
365
|
*/
|
|
@@ -63,7 +63,7 @@ export type MessageListResponsesCursorPage = CursorPage<MessageListResponse>;
|
|
|
63
63
|
*/
|
|
64
64
|
export interface MessageListResponse {
|
|
65
65
|
/**
|
|
66
|
-
* The unique identifier
|
|
66
|
+
* The unique identifier of the resource.
|
|
67
67
|
*/
|
|
68
68
|
id: string;
|
|
69
69
|
|
|
@@ -221,7 +221,9 @@ export interface MessageCreateParams {
|
|
|
221
221
|
/**
|
|
222
222
|
* The attachments for this message, such as videos or images.
|
|
223
223
|
*/
|
|
224
|
-
attachments?: Array<
|
|
224
|
+
attachments?: Array<
|
|
225
|
+
MessageCreateParams.AttachmentInputWithDirectUploadID | MessageCreateParams.AttachmentInputWithID
|
|
226
|
+
> | null;
|
|
225
227
|
|
|
226
228
|
/**
|
|
227
229
|
* The poll for this message
|
|
@@ -233,20 +235,25 @@ export namespace MessageCreateParams {
|
|
|
233
235
|
/**
|
|
234
236
|
* Input for an attachment
|
|
235
237
|
*/
|
|
236
|
-
export interface
|
|
237
|
-
/**
|
|
238
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
239
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
240
|
-
* doing.
|
|
241
|
-
*/
|
|
242
|
-
id?: string | null;
|
|
243
|
-
|
|
238
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
244
239
|
/**
|
|
245
240
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
246
241
|
* the direct upload that was created when uploading the file to S3 via the
|
|
247
242
|
* mediaDirectUpload mutation.
|
|
248
243
|
*/
|
|
249
|
-
direct_upload_id
|
|
244
|
+
direct_upload_id: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Input for an attachment
|
|
249
|
+
*/
|
|
250
|
+
export interface AttachmentInputWithID {
|
|
251
|
+
/**
|
|
252
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
253
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
254
|
+
* doing.
|
|
255
|
+
*/
|
|
256
|
+
id: string;
|
|
250
257
|
}
|
|
251
258
|
|
|
252
259
|
/**
|
|
@@ -281,7 +288,9 @@ export interface MessageUpdateParams {
|
|
|
281
288
|
/**
|
|
282
289
|
* The attachments for this message
|
|
283
290
|
*/
|
|
284
|
-
attachments?: Array<
|
|
291
|
+
attachments?: Array<
|
|
292
|
+
MessageUpdateParams.AttachmentInputWithDirectUploadID | MessageUpdateParams.AttachmentInputWithID
|
|
293
|
+
> | null;
|
|
285
294
|
|
|
286
295
|
/**
|
|
287
296
|
* The content of the message in Markdown format
|
|
@@ -298,20 +307,25 @@ export namespace MessageUpdateParams {
|
|
|
298
307
|
/**
|
|
299
308
|
* Input for an attachment
|
|
300
309
|
*/
|
|
301
|
-
export interface
|
|
302
|
-
/**
|
|
303
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
304
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
305
|
-
* doing.
|
|
306
|
-
*/
|
|
307
|
-
id?: string | null;
|
|
308
|
-
|
|
310
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
309
311
|
/**
|
|
310
312
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
311
313
|
* the direct upload that was created when uploading the file to S3 via the
|
|
312
314
|
* mediaDirectUpload mutation.
|
|
313
315
|
*/
|
|
314
|
-
direct_upload_id
|
|
316
|
+
direct_upload_id: string;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Input for an attachment
|
|
321
|
+
*/
|
|
322
|
+
export interface AttachmentInputWithID {
|
|
323
|
+
/**
|
|
324
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
325
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
326
|
+
* doing.
|
|
327
|
+
*/
|
|
328
|
+
id: string;
|
|
315
329
|
}
|
|
316
330
|
}
|
|
317
331
|
|
|
@@ -256,10 +256,11 @@ export type PaymentMethodTypes =
|
|
|
256
256
|
| 'id_bank_transfer'
|
|
257
257
|
| 'demo_pay'
|
|
258
258
|
| 'shop_pay'
|
|
259
|
-
| 'apple'
|
|
260
259
|
| 'sezzle'
|
|
261
260
|
| 'coinbase'
|
|
262
261
|
| 'splitit'
|
|
262
|
+
| 'platform_balance'
|
|
263
|
+
| 'apple'
|
|
263
264
|
| 'unknown';
|
|
264
265
|
|
|
265
266
|
/**
|
|
@@ -341,6 +342,12 @@ export interface PaymentListResponse {
|
|
|
341
342
|
*/
|
|
342
343
|
membership: PaymentListResponse.Membership | null;
|
|
343
344
|
|
|
345
|
+
/**
|
|
346
|
+
* The custom metadata stored on this payment. This will be copied the checkout
|
|
347
|
+
* configuration for which this payment was made
|
|
348
|
+
*/
|
|
349
|
+
metadata: { [key: string]: unknown } | null;
|
|
350
|
+
|
|
344
351
|
/**
|
|
345
352
|
* The datetime the payment was paid
|
|
346
353
|
*/
|
|
@@ -357,7 +364,7 @@ export interface PaymentListResponse {
|
|
|
357
364
|
plan: PaymentListResponse.Plan | null;
|
|
358
365
|
|
|
359
366
|
/**
|
|
360
|
-
* The
|
|
367
|
+
* The product this payment was made for
|
|
361
368
|
*/
|
|
362
369
|
product: PaymentListResponse.Product | null;
|
|
363
370
|
|
|
@@ -528,7 +535,7 @@ export namespace PaymentListResponse {
|
|
|
528
535
|
}
|
|
529
536
|
|
|
530
537
|
/**
|
|
531
|
-
* The
|
|
538
|
+
* The product this payment was made for
|
|
532
539
|
*/
|
|
533
540
|
export interface Product {
|
|
534
541
|
/**
|
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';
|
|
@@ -117,7 +118,9 @@ export class Plans extends APIResource {
|
|
|
117
118
|
export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
|
-
*
|
|
121
|
+
* A plan for an product. Plans define the core parameters that define a checkout
|
|
122
|
+
* and payment on whop. Use plans to create different ways to price your products
|
|
123
|
+
* (Eg renewal / one_time)
|
|
121
124
|
*/
|
|
122
125
|
export interface PlanListResponse {
|
|
123
126
|
/**
|
|
@@ -175,13 +178,18 @@ export interface PlanListResponse {
|
|
|
175
178
|
*/
|
|
176
179
|
member_count: number | null;
|
|
177
180
|
|
|
181
|
+
/**
|
|
182
|
+
* The explicit payment method configuration for the plan, if any.
|
|
183
|
+
*/
|
|
184
|
+
payment_method_configuration: PlanListResponse.PaymentMethodConfiguration | null;
|
|
185
|
+
|
|
178
186
|
/**
|
|
179
187
|
* Indicates if the plan is a one time payment or recurring.
|
|
180
188
|
*/
|
|
181
189
|
plan_type: Shared.PlanType;
|
|
182
190
|
|
|
183
191
|
/**
|
|
184
|
-
* The
|
|
192
|
+
* The product that this plan belongs to.
|
|
185
193
|
*/
|
|
186
194
|
product: PlanListResponse.Product | null;
|
|
187
195
|
|
|
@@ -258,7 +266,33 @@ export namespace PlanListResponse {
|
|
|
258
266
|
}
|
|
259
267
|
|
|
260
268
|
/**
|
|
261
|
-
* The
|
|
269
|
+
* The explicit payment method configuration for the plan, if any.
|
|
270
|
+
*/
|
|
271
|
+
export interface PaymentMethodConfiguration {
|
|
272
|
+
/**
|
|
273
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
274
|
+
* applies if the include_platform_defaults is true.
|
|
275
|
+
*/
|
|
276
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
280
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
281
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
282
|
+
* defaults with additional methods.
|
|
283
|
+
*/
|
|
284
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
288
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
289
|
+
* the documentation at docs.whop.com/payments.
|
|
290
|
+
*/
|
|
291
|
+
include_platform_defaults: boolean;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The product that this plan belongs to.
|
|
262
296
|
*/
|
|
263
297
|
export interface Product {
|
|
264
298
|
/**
|
|
@@ -317,7 +351,7 @@ export interface PlanCreateParams {
|
|
|
317
351
|
/**
|
|
318
352
|
* An image for the plan. This will be visible on the product page to customers.
|
|
319
353
|
*/
|
|
320
|
-
image?: PlanCreateParams.
|
|
354
|
+
image?: PlanCreateParams.AttachmentInputWithDirectUploadID | PlanCreateParams.AttachmentInputWithID | null;
|
|
321
355
|
|
|
322
356
|
/**
|
|
323
357
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
@@ -338,7 +372,13 @@ export interface PlanCreateParams {
|
|
|
338
372
|
override_tax_type?: Shared.TaxType | null;
|
|
339
373
|
|
|
340
374
|
/**
|
|
341
|
-
* The
|
|
375
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
376
|
+
* platform or company's defaults will apply.
|
|
377
|
+
*/
|
|
378
|
+
payment_method_configuration?: PlanCreateParams.PaymentMethodConfiguration | null;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The type of plan that can be attached to a product
|
|
342
382
|
*/
|
|
343
383
|
plan_type?: Shared.PlanType | null;
|
|
344
384
|
|
|
@@ -425,22 +465,54 @@ export namespace PlanCreateParams {
|
|
|
425
465
|
}
|
|
426
466
|
|
|
427
467
|
/**
|
|
428
|
-
*
|
|
468
|
+
* Input for an attachment
|
|
429
469
|
*/
|
|
430
|
-
export interface
|
|
470
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
471
|
+
/**
|
|
472
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
473
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
474
|
+
* mediaDirectUpload mutation.
|
|
475
|
+
*/
|
|
476
|
+
direct_upload_id: string;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Input for an attachment
|
|
481
|
+
*/
|
|
482
|
+
export interface AttachmentInputWithID {
|
|
431
483
|
/**
|
|
432
484
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
433
485
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
434
486
|
* doing.
|
|
435
487
|
*/
|
|
436
|
-
id
|
|
488
|
+
id: string;
|
|
489
|
+
}
|
|
437
490
|
|
|
491
|
+
/**
|
|
492
|
+
* The explicit payment method configuration for the plan. If not provided, the
|
|
493
|
+
* platform or company's defaults will apply.
|
|
494
|
+
*/
|
|
495
|
+
export interface PaymentMethodConfiguration {
|
|
438
496
|
/**
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* mediaDirectUpload mutation.
|
|
497
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
498
|
+
* applies if the include_platform_defaults is true.
|
|
442
499
|
*/
|
|
443
|
-
|
|
500
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
504
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
505
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
506
|
+
* defaults with additional methods.
|
|
507
|
+
*/
|
|
508
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
512
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
513
|
+
* the documentation at docs.whop.com/payments.
|
|
514
|
+
*/
|
|
515
|
+
include_platform_defaults: boolean;
|
|
444
516
|
}
|
|
445
517
|
}
|
|
446
518
|
|
|
@@ -473,7 +545,7 @@ export interface PlanUpdateParams {
|
|
|
473
545
|
/**
|
|
474
546
|
* An image for the plan. This will be visible on the product page to customers.
|
|
475
547
|
*/
|
|
476
|
-
image?: PlanUpdateParams.
|
|
548
|
+
image?: PlanUpdateParams.AttachmentInputWithDirectUploadID | PlanUpdateParams.AttachmentInputWithID | null;
|
|
477
549
|
|
|
478
550
|
/**
|
|
479
551
|
* An additional amount charged upon first purchase.
|
|
@@ -496,6 +568,12 @@ export interface PlanUpdateParams {
|
|
|
496
568
|
*/
|
|
497
569
|
override_tax_type?: Shared.TaxType | null;
|
|
498
570
|
|
|
571
|
+
/**
|
|
572
|
+
* The explicit payment method configuration for the plan. If sent as null, the
|
|
573
|
+
* custom configuration will be removed.
|
|
574
|
+
*/
|
|
575
|
+
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
576
|
+
|
|
499
577
|
/**
|
|
500
578
|
* The amount the customer is charged every billing period.
|
|
501
579
|
*/
|
|
@@ -573,22 +651,54 @@ export namespace PlanUpdateParams {
|
|
|
573
651
|
}
|
|
574
652
|
|
|
575
653
|
/**
|
|
576
|
-
*
|
|
654
|
+
* Input for an attachment
|
|
655
|
+
*/
|
|
656
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
657
|
+
/**
|
|
658
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
659
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
660
|
+
* mediaDirectUpload mutation.
|
|
661
|
+
*/
|
|
662
|
+
direct_upload_id: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Input for an attachment
|
|
577
667
|
*/
|
|
578
|
-
export interface
|
|
668
|
+
export interface AttachmentInputWithID {
|
|
579
669
|
/**
|
|
580
670
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
581
671
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
582
672
|
* doing.
|
|
583
673
|
*/
|
|
584
|
-
id
|
|
674
|
+
id: string;
|
|
675
|
+
}
|
|
585
676
|
|
|
677
|
+
/**
|
|
678
|
+
* The explicit payment method configuration for the plan. If sent as null, the
|
|
679
|
+
* custom configuration will be removed.
|
|
680
|
+
*/
|
|
681
|
+
export interface PaymentMethodConfiguration {
|
|
586
682
|
/**
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
|
|
683
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
684
|
+
* applies if the include_platform_defaults is true.
|
|
685
|
+
*/
|
|
686
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
690
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
691
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
692
|
+
* defaults with additional methods.
|
|
693
|
+
*/
|
|
694
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
698
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
699
|
+
* the documentation at docs.whop.com/payments.
|
|
590
700
|
*/
|
|
591
|
-
|
|
701
|
+
include_platform_defaults: boolean;
|
|
592
702
|
}
|
|
593
703
|
}
|
|
594
704
|
|
|
@@ -172,7 +172,7 @@ export interface ProductCreateParams {
|
|
|
172
172
|
global_affiliate_percentage?: number | null;
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* The different statuses of the global affiliate program for
|
|
175
|
+
* The different statuses of the global affiliate program for a product.
|
|
176
176
|
*/
|
|
177
177
|
global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
178
178
|
|
|
@@ -192,7 +192,7 @@ export interface ProductCreateParams {
|
|
|
192
192
|
member_affiliate_percentage?: number | null;
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* The different statuses of the global affiliate program for
|
|
195
|
+
* The different statuses of the global affiliate program for a product.
|
|
196
196
|
*/
|
|
197
197
|
member_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
198
198
|
|
|
@@ -253,7 +253,7 @@ export namespace ProductCreateParams {
|
|
|
253
253
|
initial_price?: number | null;
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
|
-
* The type of plan that can be attached to
|
|
256
|
+
* The type of plan that can be attached to a product
|
|
257
257
|
*/
|
|
258
258
|
plan_type?: Shared.PlanType | null;
|
|
259
259
|
|
|
@@ -333,7 +333,10 @@ export interface ProductUpdateParams {
|
|
|
333
333
|
/**
|
|
334
334
|
* A banner image for the product in png, jpeg format
|
|
335
335
|
*/
|
|
336
|
-
banner_image?:
|
|
336
|
+
banner_image?:
|
|
337
|
+
| ProductUpdateParams.AttachmentInputWithDirectUploadID
|
|
338
|
+
| ProductUpdateParams.AttachmentInputWithID
|
|
339
|
+
| null;
|
|
337
340
|
|
|
338
341
|
/**
|
|
339
342
|
* The different business types a company can be.
|
|
@@ -373,7 +376,7 @@ export interface ProductUpdateParams {
|
|
|
373
376
|
global_affiliate_percentage?: number | null;
|
|
374
377
|
|
|
375
378
|
/**
|
|
376
|
-
* The different statuses of the global affiliate program for
|
|
379
|
+
* The different statuses of the global affiliate program for a product.
|
|
377
380
|
*/
|
|
378
381
|
global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
379
382
|
|
|
@@ -393,7 +396,7 @@ export interface ProductUpdateParams {
|
|
|
393
396
|
member_affiliate_percentage?: number | null;
|
|
394
397
|
|
|
395
398
|
/**
|
|
396
|
-
* The different statuses of the global affiliate program for
|
|
399
|
+
* The different statuses of the global affiliate program for a product.
|
|
397
400
|
*/
|
|
398
401
|
member_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
399
402
|
|
|
@@ -430,22 +433,27 @@ export interface ProductUpdateParams {
|
|
|
430
433
|
|
|
431
434
|
export namespace ProductUpdateParams {
|
|
432
435
|
/**
|
|
433
|
-
*
|
|
436
|
+
* Input for an attachment
|
|
434
437
|
*/
|
|
435
|
-
export interface
|
|
436
|
-
/**
|
|
437
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
438
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
439
|
-
* doing.
|
|
440
|
-
*/
|
|
441
|
-
id?: string | null;
|
|
442
|
-
|
|
438
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
443
439
|
/**
|
|
444
440
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
445
441
|
* the direct upload that was created when uploading the file to S3 via the
|
|
446
442
|
* mediaDirectUpload mutation.
|
|
447
443
|
*/
|
|
448
|
-
direct_upload_id
|
|
444
|
+
direct_upload_id: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Input for an attachment
|
|
449
|
+
*/
|
|
450
|
+
export interface AttachmentInputWithID {
|
|
451
|
+
/**
|
|
452
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
453
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
454
|
+
* doing.
|
|
455
|
+
*/
|
|
456
|
+
id: string;
|
|
449
457
|
}
|
|
450
458
|
|
|
451
459
|
/**
|
|
@@ -164,7 +164,7 @@ export interface PromoCode {
|
|
|
164
164
|
one_per_customer: boolean;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* The
|
|
167
|
+
* The product this promo code applies to
|
|
168
168
|
*/
|
|
169
169
|
product: PromoCode.Product | null;
|
|
170
170
|
|
|
@@ -216,7 +216,7 @@ export namespace PromoCode {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
* The
|
|
219
|
+
* The product this promo code applies to
|
|
220
220
|
*/
|
|
221
221
|
export interface Product {
|
|
222
222
|
/**
|
|
@@ -302,7 +302,7 @@ export interface PromoCodeListResponse {
|
|
|
302
302
|
one_per_customer: boolean;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
|
-
* The
|
|
305
|
+
* The product this promo code applies to
|
|
306
306
|
*/
|
|
307
307
|
product: PromoCodeListResponse.Product | null;
|
|
308
308
|
|
|
@@ -339,7 +339,7 @@ export interface PromoCodeListResponse {
|
|
|
339
339
|
|
|
340
340
|
export namespace PromoCodeListResponse {
|
|
341
341
|
/**
|
|
342
|
-
* The
|
|
342
|
+
* The product this promo code applies to
|
|
343
343
|
*/
|
|
344
344
|
export interface Product {
|
|
345
345
|
/**
|