@whop/sdk 0.0.25 → 0.0.27
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 +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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
|
@@ -73,14 +73,13 @@ export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutCo
|
|
|
73
73
|
export type CheckoutModes = 'payment' | 'setup';
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* A checkout configuration
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* All successful payments and memberships resulting from a checkout will contain the passed metadata.
|
|
76
|
+
* A checkout session is a reusable configuration for a checkout, including the
|
|
77
|
+
* plan, affiliate, and custom metadata. Payments and memberships created from a
|
|
78
|
+
* checkout session inherit its metadata.
|
|
80
79
|
*/
|
|
81
80
|
export interface CheckoutConfigurationListResponse {
|
|
82
81
|
/**
|
|
83
|
-
* The
|
|
82
|
+
* The unique identifier for the checkout session.
|
|
84
83
|
*/
|
|
85
84
|
id: string;
|
|
86
85
|
|
|
@@ -167,12 +166,12 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
167
166
|
*/
|
|
168
167
|
export interface Plan {
|
|
169
168
|
/**
|
|
170
|
-
* The
|
|
169
|
+
* The unique identifier for the plan.
|
|
171
170
|
*/
|
|
172
171
|
id: string;
|
|
173
172
|
|
|
174
173
|
/**
|
|
175
|
-
* The interval at which the plan charges (renewal plans).
|
|
174
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
176
175
|
*/
|
|
177
176
|
billing_period: number | null;
|
|
178
177
|
|
|
@@ -182,12 +181,15 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
182
181
|
currency: Shared.Currency;
|
|
183
182
|
|
|
184
183
|
/**
|
|
185
|
-
* The
|
|
184
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
185
|
+
* For example, 365 for a one-year access pass.
|
|
186
186
|
*/
|
|
187
187
|
expiration_days: number | null;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* The
|
|
190
|
+
* The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
|
|
191
|
+
* For one-time plans, this is the full price. For renewal plans, this is charged
|
|
192
|
+
* on top of the first renewal_price.
|
|
191
193
|
*/
|
|
192
194
|
initial_price: number;
|
|
193
195
|
|
|
@@ -202,7 +204,8 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
202
204
|
release_method: Shared.ReleaseMethod;
|
|
203
205
|
|
|
204
206
|
/**
|
|
205
|
-
* The price
|
|
207
|
+
* The recurring price charged every billing_period in the plan's base_currency
|
|
208
|
+
* (e.g., 9.99 for $9.99/period). Zero for one-time plans.
|
|
206
209
|
*/
|
|
207
210
|
renewal_price: number;
|
|
208
211
|
|
|
@@ -282,13 +285,15 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
282
285
|
|
|
283
286
|
/**
|
|
284
287
|
* The application fee amount collected by the platform from this connected
|
|
285
|
-
* account.
|
|
286
|
-
* accounts with a parent
|
|
288
|
+
* account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
|
|
289
|
+
* than the total payment amount. Only valid for connected accounts with a parent
|
|
290
|
+
* company.
|
|
287
291
|
*/
|
|
288
292
|
application_fee_amount?: number | null;
|
|
289
293
|
|
|
290
294
|
/**
|
|
291
|
-
* The interval at which the plan charges (renewal plans).
|
|
295
|
+
* The interval in days at which the plan charges (renewal plans). For example, 30
|
|
296
|
+
* for monthly billing.
|
|
292
297
|
*/
|
|
293
298
|
billing_period?: number | null;
|
|
294
299
|
|
|
@@ -303,7 +308,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
303
308
|
description?: string | null;
|
|
304
309
|
|
|
305
310
|
/**
|
|
306
|
-
* The
|
|
311
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
312
|
+
* For example, 365 for a one-year access pass.
|
|
307
313
|
*/
|
|
308
314
|
expiration_days?: number | null;
|
|
309
315
|
|
|
@@ -319,7 +325,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
319
325
|
image?: Plan.Image | null;
|
|
320
326
|
|
|
321
327
|
/**
|
|
322
|
-
* An additional amount charged upon first purchase.
|
|
328
|
+
* An additional amount charged upon first purchase. Provided as a number in
|
|
329
|
+
* dollars (e.g., 10.00 for $10.00).
|
|
323
330
|
*/
|
|
324
331
|
initial_price?: number | null;
|
|
325
332
|
|
|
@@ -362,7 +369,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
362
369
|
release_method?: Shared.ReleaseMethod | null;
|
|
363
370
|
|
|
364
371
|
/**
|
|
365
|
-
* The amount the customer is charged every billing period.
|
|
372
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
373
|
+
* dollars (e.g., 9.99 for $9.99/period).
|
|
366
374
|
*/
|
|
367
375
|
renewal_price?: number | null;
|
|
368
376
|
|
|
@@ -9,11 +9,12 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
|
|
10
10
|
export class Companies extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Create a new
|
|
12
|
+
* Create a new company. Pass parent_company_id to create a sub-company under a
|
|
13
|
+
* platform, or omit it to create a company for the current user.
|
|
13
14
|
*
|
|
14
15
|
* Required permissions:
|
|
15
16
|
*
|
|
16
|
-
* - `company:
|
|
17
|
+
* - `company:create`
|
|
17
18
|
* - `company:basic:read`
|
|
18
19
|
*/
|
|
19
20
|
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company> {
|
|
@@ -49,14 +50,16 @@ export class Companies extends APIResource {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
|
-
* Lists companies
|
|
53
|
+
* Lists companies. When parent_company_id is provided, lists connected accounts
|
|
54
|
+
* under that company. When omitted, lists companies the current user has access
|
|
55
|
+
* to.
|
|
53
56
|
*
|
|
54
57
|
* Required permissions:
|
|
55
58
|
*
|
|
56
59
|
* - `company:basic:read`
|
|
57
60
|
*/
|
|
58
61
|
list(
|
|
59
|
-
query: CompanyListParams,
|
|
62
|
+
query: CompanyListParams | null | undefined = {},
|
|
60
63
|
options?: RequestOptions,
|
|
61
64
|
): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse> {
|
|
62
65
|
return this._client.getAPIList('/companies', CursorPage<CompanyListResponse>, { query, ...options });
|
|
@@ -66,11 +69,12 @@ export class Companies extends APIResource {
|
|
|
66
69
|
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
67
70
|
|
|
68
71
|
/**
|
|
69
|
-
*
|
|
72
|
+
* A company is a seller on Whop. Companies own products, manage members, and
|
|
73
|
+
* receive payouts.
|
|
70
74
|
*/
|
|
71
75
|
export interface CompanyListResponse {
|
|
72
76
|
/**
|
|
73
|
-
* The
|
|
77
|
+
* The unique identifier for the company.
|
|
74
78
|
*/
|
|
75
79
|
id: string;
|
|
76
80
|
|
|
@@ -80,7 +84,7 @@ export interface CompanyListResponse {
|
|
|
80
84
|
business_type: Shared.BusinessTypes | null;
|
|
81
85
|
|
|
82
86
|
/**
|
|
83
|
-
*
|
|
87
|
+
* The datetime the company was created.
|
|
84
88
|
*/
|
|
85
89
|
created_at: string;
|
|
86
90
|
|
|
@@ -136,7 +140,7 @@ export interface CompanyListResponse {
|
|
|
136
140
|
title: string;
|
|
137
141
|
|
|
138
142
|
/**
|
|
139
|
-
* The
|
|
143
|
+
* The datetime the company was last updated.
|
|
140
144
|
*/
|
|
141
145
|
updated_at: string;
|
|
142
146
|
|
|
@@ -163,7 +167,7 @@ export namespace CompanyListResponse {
|
|
|
163
167
|
*/
|
|
164
168
|
export interface OwnerUser {
|
|
165
169
|
/**
|
|
166
|
-
* The
|
|
170
|
+
* The unique identifier for the user.
|
|
167
171
|
*/
|
|
168
172
|
id: string;
|
|
169
173
|
|
|
@@ -181,24 +185,25 @@ export namespace CompanyListResponse {
|
|
|
181
185
|
|
|
182
186
|
export interface CompanyCreateParams {
|
|
183
187
|
/**
|
|
184
|
-
* The
|
|
188
|
+
* The name of the company being created.
|
|
185
189
|
*/
|
|
186
|
-
|
|
190
|
+
title: string;
|
|
187
191
|
|
|
188
192
|
/**
|
|
189
|
-
* The
|
|
193
|
+
* The different business types a company can be.
|
|
190
194
|
*/
|
|
191
|
-
|
|
195
|
+
business_type?: Shared.BusinessTypes | null;
|
|
192
196
|
|
|
193
197
|
/**
|
|
194
|
-
*
|
|
198
|
+
* A description of what the company offers or does.
|
|
195
199
|
*/
|
|
196
|
-
|
|
200
|
+
description?: string | null;
|
|
197
201
|
|
|
198
202
|
/**
|
|
199
|
-
* The
|
|
203
|
+
* The email of the user who the sub-company will belong to. Required when
|
|
204
|
+
* parent_company_id is provided.
|
|
200
205
|
*/
|
|
201
|
-
|
|
206
|
+
email?: string | null;
|
|
202
207
|
|
|
203
208
|
/**
|
|
204
209
|
* The different industry types a company can be in.
|
|
@@ -211,15 +216,19 @@ export interface CompanyCreateParams {
|
|
|
211
216
|
logo?: CompanyCreateParams.Logo | null;
|
|
212
217
|
|
|
213
218
|
/**
|
|
214
|
-
* Additional metadata for the
|
|
219
|
+
* Additional metadata for the company
|
|
215
220
|
*/
|
|
216
221
|
metadata?: { [key: string]: unknown } | null;
|
|
217
222
|
|
|
223
|
+
/**
|
|
224
|
+
* The company ID of the platform creating this sub-company. If omitted, the
|
|
225
|
+
* company is created for the current user.
|
|
226
|
+
*/
|
|
227
|
+
parent_company_id?: string | null;
|
|
228
|
+
|
|
218
229
|
/**
|
|
219
230
|
* Whether Whop sends transactional emails to customers on behalf of this company.
|
|
220
|
-
*
|
|
221
|
-
* renewals, and membership cancelations/expirations. When disabled, the platform
|
|
222
|
-
* is responsible for handling these communications. This is defaulted to true.
|
|
231
|
+
* Only used when parent_company_id is provided.
|
|
223
232
|
*/
|
|
224
233
|
send_customer_emails?: boolean | null;
|
|
225
234
|
}
|
|
@@ -247,6 +256,11 @@ export interface CompanyUpdateParams {
|
|
|
247
256
|
*/
|
|
248
257
|
business_type?: Shared.BusinessTypes | null;
|
|
249
258
|
|
|
259
|
+
/**
|
|
260
|
+
* A description of what the company offers or does.
|
|
261
|
+
*/
|
|
262
|
+
description?: string | null;
|
|
263
|
+
|
|
250
264
|
/**
|
|
251
265
|
* The different industry types a company can be in.
|
|
252
266
|
*/
|
|
@@ -294,11 +308,6 @@ export namespace CompanyUpdateParams {
|
|
|
294
308
|
}
|
|
295
309
|
|
|
296
310
|
export interface CompanyListParams extends CursorPageParams {
|
|
297
|
-
/**
|
|
298
|
-
* The ID of the parent company to list connected accounts for
|
|
299
|
-
*/
|
|
300
|
-
parent_company_id: string;
|
|
301
|
-
|
|
302
311
|
/**
|
|
303
312
|
* Returns the elements in the list that come before the specified cursor.
|
|
304
313
|
*/
|
|
@@ -328,6 +337,12 @@ export interface CompanyListParams extends CursorPageParams {
|
|
|
328
337
|
* Returns the last _n_ elements from the list.
|
|
329
338
|
*/
|
|
330
339
|
last?: number | null;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The ID of the parent company to list connected accounts for. Omit to list the
|
|
343
|
+
* current user's own companies.
|
|
344
|
+
*/
|
|
345
|
+
parent_company_id?: string | null;
|
|
331
346
|
}
|
|
332
347
|
|
|
333
348
|
export declare namespace Companies {
|
|
@@ -31,7 +31,7 @@ export class CompanyTokenTransactions extends APIResource {
|
|
|
31
31
|
create(
|
|
32
32
|
body: CompanyTokenTransactionCreateParams,
|
|
33
33
|
options?: RequestOptions,
|
|
34
|
-
): APIPromise<
|
|
34
|
+
): APIPromise<CompanyTokenTransaction> {
|
|
35
35
|
return this._client.post('/company_token_transactions', { body, ...options });
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -44,7 +44,7 @@ export class CompanyTokenTransactions extends APIResource {
|
|
|
44
44
|
* - `member:basic:read`
|
|
45
45
|
* - `company:basic:read`
|
|
46
46
|
*/
|
|
47
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
47
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<CompanyTokenTransaction> {
|
|
48
48
|
return this._client.get(path`/company_token_transactions/${id}`, options);
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -72,118 +72,16 @@ export class CompanyTokenTransactions extends APIResource {
|
|
|
72
72
|
export type CompanyTokenTransactionListResponsesCursorPage = CursorPage<CompanyTokenTransactionListResponse>;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* The type of token transaction
|
|
76
76
|
*/
|
|
77
|
-
export
|
|
78
|
-
/**
|
|
79
|
-
* The ID of the transaction
|
|
80
|
-
*/
|
|
81
|
-
id: string;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The transaction amount (always positive)
|
|
85
|
-
*/
|
|
86
|
-
amount: number;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* The company
|
|
90
|
-
*/
|
|
91
|
-
company: CompanyTokenTransactionCreateResponse.Company;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* When the transaction was created
|
|
95
|
-
*/
|
|
96
|
-
created_at: string;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Optional description
|
|
100
|
-
*/
|
|
101
|
-
description: string | null;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Optional idempotency key to prevent duplicate transactions
|
|
105
|
-
*/
|
|
106
|
-
idempotency_key: string | null;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* For transfers, the ID of the linked transaction
|
|
110
|
-
*/
|
|
111
|
-
linked_transaction_id: string | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The member
|
|
115
|
-
*/
|
|
116
|
-
member: CompanyTokenTransactionCreateResponse.Member;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The type of transaction
|
|
120
|
-
*/
|
|
121
|
-
transaction_type: 'add' | 'subtract' | 'transfer';
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The user whose balance changed
|
|
125
|
-
*/
|
|
126
|
-
user: CompanyTokenTransactionCreateResponse.User;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export namespace CompanyTokenTransactionCreateResponse {
|
|
130
|
-
/**
|
|
131
|
-
* The company
|
|
132
|
-
*/
|
|
133
|
-
export interface Company {
|
|
134
|
-
/**
|
|
135
|
-
* The ID of the company
|
|
136
|
-
*/
|
|
137
|
-
id: string;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The slug/route of the company on the Whop site.
|
|
141
|
-
*/
|
|
142
|
-
route: string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The written name of the company.
|
|
146
|
-
*/
|
|
147
|
-
title: string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The member
|
|
152
|
-
*/
|
|
153
|
-
export interface Member {
|
|
154
|
-
/**
|
|
155
|
-
* The ID of the member
|
|
156
|
-
*/
|
|
157
|
-
id: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The user whose balance changed
|
|
162
|
-
*/
|
|
163
|
-
export interface User {
|
|
164
|
-
/**
|
|
165
|
-
* The internal ID of the user.
|
|
166
|
-
*/
|
|
167
|
-
id: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* The name of the user from their Whop account.
|
|
171
|
-
*/
|
|
172
|
-
name: string | null;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* The username of the user from their Whop account.
|
|
176
|
-
*/
|
|
177
|
-
username: string;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
77
|
+
export type BotTokenTransactionTypes = 'add' | 'subtract' | 'transfer';
|
|
180
78
|
|
|
181
79
|
/**
|
|
182
80
|
* A token transaction within a company
|
|
183
81
|
*/
|
|
184
|
-
export interface
|
|
82
|
+
export interface CompanyTokenTransaction {
|
|
185
83
|
/**
|
|
186
|
-
* The
|
|
84
|
+
* The unique identifier for the company token transaction.
|
|
187
85
|
*/
|
|
188
86
|
id: string;
|
|
189
87
|
|
|
@@ -195,10 +93,10 @@ export interface CompanyTokenTransactionRetrieveResponse {
|
|
|
195
93
|
/**
|
|
196
94
|
* The company
|
|
197
95
|
*/
|
|
198
|
-
company:
|
|
96
|
+
company: CompanyTokenTransaction.Company;
|
|
199
97
|
|
|
200
98
|
/**
|
|
201
|
-
*
|
|
99
|
+
* The datetime the company token transaction was created.
|
|
202
100
|
*/
|
|
203
101
|
created_at: string;
|
|
204
102
|
|
|
@@ -220,26 +118,26 @@ export interface CompanyTokenTransactionRetrieveResponse {
|
|
|
220
118
|
/**
|
|
221
119
|
* The member
|
|
222
120
|
*/
|
|
223
|
-
member:
|
|
121
|
+
member: CompanyTokenTransaction.Member;
|
|
224
122
|
|
|
225
123
|
/**
|
|
226
124
|
* The type of transaction
|
|
227
125
|
*/
|
|
228
|
-
transaction_type:
|
|
126
|
+
transaction_type: BotTokenTransactionTypes;
|
|
229
127
|
|
|
230
128
|
/**
|
|
231
129
|
* The user whose balance changed
|
|
232
130
|
*/
|
|
233
|
-
user:
|
|
131
|
+
user: CompanyTokenTransaction.User;
|
|
234
132
|
}
|
|
235
133
|
|
|
236
|
-
export namespace
|
|
134
|
+
export namespace CompanyTokenTransaction {
|
|
237
135
|
/**
|
|
238
136
|
* The company
|
|
239
137
|
*/
|
|
240
138
|
export interface Company {
|
|
241
139
|
/**
|
|
242
|
-
* The
|
|
140
|
+
* The unique identifier for the company.
|
|
243
141
|
*/
|
|
244
142
|
id: string;
|
|
245
143
|
|
|
@@ -259,7 +157,7 @@ export namespace CompanyTokenTransactionRetrieveResponse {
|
|
|
259
157
|
*/
|
|
260
158
|
export interface Member {
|
|
261
159
|
/**
|
|
262
|
-
* The
|
|
160
|
+
* The unique identifier for the company member.
|
|
263
161
|
*/
|
|
264
162
|
id: string;
|
|
265
163
|
}
|
|
@@ -269,7 +167,7 @@ export namespace CompanyTokenTransactionRetrieveResponse {
|
|
|
269
167
|
*/
|
|
270
168
|
export interface User {
|
|
271
169
|
/**
|
|
272
|
-
* The
|
|
170
|
+
* The unique identifier for the user.
|
|
273
171
|
*/
|
|
274
172
|
id: string;
|
|
275
173
|
|
|
@@ -290,7 +188,7 @@ export namespace CompanyTokenTransactionRetrieveResponse {
|
|
|
290
188
|
*/
|
|
291
189
|
export interface CompanyTokenTransactionListResponse {
|
|
292
190
|
/**
|
|
293
|
-
* The
|
|
191
|
+
* The unique identifier for the company token transaction.
|
|
294
192
|
*/
|
|
295
193
|
id: string;
|
|
296
194
|
|
|
@@ -305,7 +203,7 @@ export interface CompanyTokenTransactionListResponse {
|
|
|
305
203
|
company: CompanyTokenTransactionListResponse.Company;
|
|
306
204
|
|
|
307
205
|
/**
|
|
308
|
-
*
|
|
206
|
+
* The datetime the company token transaction was created.
|
|
309
207
|
*/
|
|
310
208
|
created_at: string;
|
|
311
209
|
|
|
@@ -332,7 +230,7 @@ export interface CompanyTokenTransactionListResponse {
|
|
|
332
230
|
/**
|
|
333
231
|
* The type of transaction
|
|
334
232
|
*/
|
|
335
|
-
transaction_type:
|
|
233
|
+
transaction_type: BotTokenTransactionTypes;
|
|
336
234
|
|
|
337
235
|
/**
|
|
338
236
|
* The user whose balance changed
|
|
@@ -346,7 +244,7 @@ export namespace CompanyTokenTransactionListResponse {
|
|
|
346
244
|
*/
|
|
347
245
|
export interface Company {
|
|
348
246
|
/**
|
|
349
|
-
* The
|
|
247
|
+
* The unique identifier for the company.
|
|
350
248
|
*/
|
|
351
249
|
id: string;
|
|
352
250
|
|
|
@@ -366,7 +264,7 @@ export namespace CompanyTokenTransactionListResponse {
|
|
|
366
264
|
*/
|
|
367
265
|
export interface Member {
|
|
368
266
|
/**
|
|
369
|
-
* The
|
|
267
|
+
* The unique identifier for the company member.
|
|
370
268
|
*/
|
|
371
269
|
id: string;
|
|
372
270
|
}
|
|
@@ -376,7 +274,7 @@ export namespace CompanyTokenTransactionListResponse {
|
|
|
376
274
|
*/
|
|
377
275
|
export interface User {
|
|
378
276
|
/**
|
|
379
|
-
* The
|
|
277
|
+
* The unique identifier for the user.
|
|
380
278
|
*/
|
|
381
279
|
id: string;
|
|
382
280
|
|
|
@@ -515,7 +413,7 @@ export interface CompanyTokenTransactionListParams extends CursorPageParams {
|
|
|
515
413
|
/**
|
|
516
414
|
* The type of token transaction
|
|
517
415
|
*/
|
|
518
|
-
transaction_type?:
|
|
416
|
+
transaction_type?: BotTokenTransactionTypes | null;
|
|
519
417
|
|
|
520
418
|
/**
|
|
521
419
|
* Filter by user ID
|
|
@@ -525,8 +423,8 @@ export interface CompanyTokenTransactionListParams extends CursorPageParams {
|
|
|
525
423
|
|
|
526
424
|
export declare namespace CompanyTokenTransactions {
|
|
527
425
|
export {
|
|
528
|
-
type
|
|
529
|
-
type
|
|
426
|
+
type BotTokenTransactionTypes as BotTokenTransactionTypes,
|
|
427
|
+
type CompanyTokenTransaction as CompanyTokenTransaction,
|
|
530
428
|
type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
|
|
531
429
|
type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
|
|
532
430
|
type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
|
|
@@ -115,7 +115,7 @@ export type CourseChapterListResponsesCursorPage = CursorPage<CourseChapterListR
|
|
|
115
115
|
*/
|
|
116
116
|
export interface CourseChapter {
|
|
117
117
|
/**
|
|
118
|
-
* The
|
|
118
|
+
* The unique identifier for the chapter.
|
|
119
119
|
*/
|
|
120
120
|
id: string;
|
|
121
121
|
|
|
@@ -141,7 +141,7 @@ export namespace CourseChapter {
|
|
|
141
141
|
*/
|
|
142
142
|
export interface Lesson {
|
|
143
143
|
/**
|
|
144
|
-
* The
|
|
144
|
+
* The unique identifier for the lesson.
|
|
145
145
|
*/
|
|
146
146
|
id: string;
|
|
147
147
|
|
|
@@ -162,7 +162,7 @@ export namespace CourseChapter {
|
|
|
162
162
|
*/
|
|
163
163
|
export interface CourseChapterListResponse {
|
|
164
164
|
/**
|
|
165
|
-
* The
|
|
165
|
+
* The unique identifier for the chapter.
|
|
166
166
|
*/
|
|
167
167
|
id: string;
|
|
168
168
|
|