@whop/sdk 0.0.26 → 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 +37 -0
- package/client.d.mts +6 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -5
- package/client.d.ts.map +1 -1
- package/client.js +9 -2
- package/client.js.map +1 -1
- package/client.mjs +9 -2
- package/client.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 +37 -9
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +37 -9
- 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 +6 -6
- package/resources/authorized-users.d.ts +6 -6
- 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 +10 -10
- package/resources/company-token-transactions.d.ts +10 -10
- 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/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 +2 -2
- package/resources/files.d.ts +2 -2
- 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 +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- 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 +12 -12
- package/resources/leads.d.ts +12 -12
- package/resources/ledger-accounts.d.mts +9 -7
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +9 -7
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +9 -9
- package/resources/members.d.ts +9 -9
- package/resources/memberships.d.mts +17 -12
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +17 -12
- 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 +27 -20
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +27 -20
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +6 -6
- package/resources/payout-methods.d.ts +6 -6
- 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 +175 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +175 -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 +1 -1
- package/resources/verifications.d.ts +1 -1
- package/resources/webhooks.d.mts +71 -57
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +71 -57
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +15 -11
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +15 -11
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +20 -8
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +42 -9
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +6 -6
- 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 +10 -10
- 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/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +2 -2
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +2 -1
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +12 -12
- package/src/resources/ledger-accounts.ts +9 -7
- package/src/resources/members.ts +9 -9
- package/src/resources/memberships.ts +18 -12
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +28 -18
- package/src/resources/payout-methods.ts +6 -6
- 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 +176 -137
- 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 +1 -1
- package/src/resources/webhooks.ts +71 -57
- package/src/resources/withdrawals.ts +15 -11
- 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
|
@@ -48,14 +48,13 @@ export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutCo
|
|
|
48
48
|
*/
|
|
49
49
|
export type CheckoutModes = 'payment' | 'setup';
|
|
50
50
|
/**
|
|
51
|
-
* A checkout configuration
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* All successful payments and memberships resulting from a checkout will contain the passed metadata.
|
|
51
|
+
* A checkout session is a reusable configuration for a checkout, including the
|
|
52
|
+
* plan, affiliate, and custom metadata. Payments and memberships created from a
|
|
53
|
+
* checkout session inherit its metadata.
|
|
55
54
|
*/
|
|
56
55
|
export interface CheckoutConfigurationListResponse {
|
|
57
56
|
/**
|
|
58
|
-
* The
|
|
57
|
+
* The unique identifier for the checkout session.
|
|
59
58
|
*/
|
|
60
59
|
id: string;
|
|
61
60
|
/**
|
|
@@ -131,11 +130,11 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
131
130
|
*/
|
|
132
131
|
interface Plan {
|
|
133
132
|
/**
|
|
134
|
-
* The
|
|
133
|
+
* The unique identifier for the plan.
|
|
135
134
|
*/
|
|
136
135
|
id: string;
|
|
137
136
|
/**
|
|
138
|
-
* The interval at which the plan charges (renewal plans).
|
|
137
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
139
138
|
*/
|
|
140
139
|
billing_period: number | null;
|
|
141
140
|
/**
|
|
@@ -143,11 +142,14 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
143
142
|
*/
|
|
144
143
|
currency: Shared.Currency;
|
|
145
144
|
/**
|
|
146
|
-
* The
|
|
145
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
146
|
+
* For example, 365 for a one-year access pass.
|
|
147
147
|
*/
|
|
148
148
|
expiration_days: number | null;
|
|
149
149
|
/**
|
|
150
|
-
* The
|
|
150
|
+
* The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
|
|
151
|
+
* For one-time plans, this is the full price. For renewal plans, this is charged
|
|
152
|
+
* on top of the first renewal_price.
|
|
151
153
|
*/
|
|
152
154
|
initial_price: number;
|
|
153
155
|
/**
|
|
@@ -159,7 +161,8 @@ export declare namespace CheckoutConfigurationListResponse {
|
|
|
159
161
|
*/
|
|
160
162
|
release_method: Shared.ReleaseMethod;
|
|
161
163
|
/**
|
|
162
|
-
* The price
|
|
164
|
+
* The recurring price charged every billing_period in the plan's base_currency
|
|
165
|
+
* (e.g., 9.99 for $9.99/period). Zero for one-time plans.
|
|
163
166
|
*/
|
|
164
167
|
renewal_price: number;
|
|
165
168
|
/**
|
|
@@ -224,12 +227,14 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
224
227
|
currency: Shared.Currency;
|
|
225
228
|
/**
|
|
226
229
|
* The application fee amount collected by the platform from this connected
|
|
227
|
-
* account.
|
|
228
|
-
* accounts with a parent
|
|
230
|
+
* account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
|
|
231
|
+
* than the total payment amount. Only valid for connected accounts with a parent
|
|
232
|
+
* company.
|
|
229
233
|
*/
|
|
230
234
|
application_fee_amount?: number | null;
|
|
231
235
|
/**
|
|
232
|
-
* The interval at which the plan charges (renewal plans).
|
|
236
|
+
* The interval in days at which the plan charges (renewal plans). For example, 30
|
|
237
|
+
* for monthly billing.
|
|
233
238
|
*/
|
|
234
239
|
billing_period?: number | null;
|
|
235
240
|
/**
|
|
@@ -241,7 +246,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
241
246
|
*/
|
|
242
247
|
description?: string | null;
|
|
243
248
|
/**
|
|
244
|
-
* The
|
|
249
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
250
|
+
* For example, 365 for a one-year access pass.
|
|
245
251
|
*/
|
|
246
252
|
expiration_days?: number | null;
|
|
247
253
|
/**
|
|
@@ -254,7 +260,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
254
260
|
*/
|
|
255
261
|
image?: Plan.Image | null;
|
|
256
262
|
/**
|
|
257
|
-
* An additional amount charged upon first purchase.
|
|
263
|
+
* An additional amount charged upon first purchase. Provided as a number in
|
|
264
|
+
* dollars (e.g., 10.00 for $10.00).
|
|
258
265
|
*/
|
|
259
266
|
initial_price?: number | null;
|
|
260
267
|
/**
|
|
@@ -289,7 +296,8 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
289
296
|
*/
|
|
290
297
|
release_method?: Shared.ReleaseMethod | null;
|
|
291
298
|
/**
|
|
292
|
-
* The amount the customer is charged every billing period.
|
|
299
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
300
|
+
* dollars (e.g., 9.99 for $9.99/period).
|
|
293
301
|
*/
|
|
294
302
|
renewal_price?: number | null;
|
|
295
303
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-configurations.d.ts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,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;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAI3C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAIxF;;;;;;OAMG;IACH,IAAI,CACF,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4CAA4C,EAAE,iCAAiC,CAAC;CAOhG;AAED,MAAM,MAAM,4CAA4C,GAAG,UAAU,CAAC,iCAAiC,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"checkout-configurations.d.ts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,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;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAI3C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAIxF;;;;;;OAMG;IACH,IAAI,CACF,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,cAAc,GACv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eAGG;YACH,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;YAEhD;;;;;eAKG;YACH,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;YAE/C;;;;eAIG;YACH,yBAAyB,EAAE,OAAO,CAAC;SACpC;KACF;CACF;AAED,MAAM,WAAW,+BAAgC,SAAQ,gBAAgB;IACvE;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -5,11 +5,12 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
6
|
export declare class Companies extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create a new
|
|
8
|
+
* Create a new company. Pass parent_company_id to create a sub-company under a
|
|
9
|
+
* platform, or omit it to create a company for the current user.
|
|
9
10
|
*
|
|
10
11
|
* Required permissions:
|
|
11
12
|
*
|
|
12
|
-
* - `company:
|
|
13
|
+
* - `company:create`
|
|
13
14
|
* - `company:basic:read`
|
|
14
15
|
*/
|
|
15
16
|
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
@@ -32,21 +33,24 @@ export declare class Companies extends APIResource {
|
|
|
32
33
|
*/
|
|
33
34
|
update(id: string, body?: CompanyUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
34
35
|
/**
|
|
35
|
-
* Lists companies
|
|
36
|
+
* Lists companies. When parent_company_id is provided, lists connected accounts
|
|
37
|
+
* under that company. When omitted, lists companies the current user has access
|
|
38
|
+
* to.
|
|
36
39
|
*
|
|
37
40
|
* Required permissions:
|
|
38
41
|
*
|
|
39
42
|
* - `company:basic:read`
|
|
40
43
|
*/
|
|
41
|
-
list(query
|
|
44
|
+
list(query?: CompanyListParams | null | undefined, options?: RequestOptions): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse>;
|
|
42
45
|
}
|
|
43
46
|
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
48
|
+
* A company is a seller on Whop. Companies own products, manage members, and
|
|
49
|
+
* receive payouts.
|
|
46
50
|
*/
|
|
47
51
|
export interface CompanyListResponse {
|
|
48
52
|
/**
|
|
49
|
-
* The
|
|
53
|
+
* The unique identifier for the company.
|
|
50
54
|
*/
|
|
51
55
|
id: string;
|
|
52
56
|
/**
|
|
@@ -54,7 +58,7 @@ export interface CompanyListResponse {
|
|
|
54
58
|
*/
|
|
55
59
|
business_type: Shared.BusinessTypes | null;
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
61
|
+
* The datetime the company was created.
|
|
58
62
|
*/
|
|
59
63
|
created_at: string;
|
|
60
64
|
/**
|
|
@@ -101,7 +105,7 @@ export interface CompanyListResponse {
|
|
|
101
105
|
*/
|
|
102
106
|
title: string;
|
|
103
107
|
/**
|
|
104
|
-
* The
|
|
108
|
+
* The datetime the company was last updated.
|
|
105
109
|
*/
|
|
106
110
|
updated_at: string;
|
|
107
111
|
/**
|
|
@@ -125,7 +129,7 @@ export declare namespace CompanyListResponse {
|
|
|
125
129
|
*/
|
|
126
130
|
interface OwnerUser {
|
|
127
131
|
/**
|
|
128
|
-
* The
|
|
132
|
+
* The unique identifier for the user.
|
|
129
133
|
*/
|
|
130
134
|
id: string;
|
|
131
135
|
/**
|
|
@@ -139,14 +143,6 @@ export declare namespace CompanyListResponse {
|
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
export interface CompanyCreateParams {
|
|
142
|
-
/**
|
|
143
|
-
* The email of the user who the company will belong to.
|
|
144
|
-
*/
|
|
145
|
-
email: string;
|
|
146
|
-
/**
|
|
147
|
-
* The company ID of the platform creating this company.
|
|
148
|
-
*/
|
|
149
|
-
parent_company_id: string;
|
|
150
146
|
/**
|
|
151
147
|
* The name of the company being created.
|
|
152
148
|
*/
|
|
@@ -155,6 +151,15 @@ export interface CompanyCreateParams {
|
|
|
155
151
|
* The different business types a company can be.
|
|
156
152
|
*/
|
|
157
153
|
business_type?: Shared.BusinessTypes | null;
|
|
154
|
+
/**
|
|
155
|
+
* A description of what the company offers or does.
|
|
156
|
+
*/
|
|
157
|
+
description?: string | null;
|
|
158
|
+
/**
|
|
159
|
+
* The email of the user who the sub-company will belong to. Required when
|
|
160
|
+
* parent_company_id is provided.
|
|
161
|
+
*/
|
|
162
|
+
email?: string | null;
|
|
158
163
|
/**
|
|
159
164
|
* The different industry types a company can be in.
|
|
160
165
|
*/
|
|
@@ -164,16 +169,19 @@ export interface CompanyCreateParams {
|
|
|
164
169
|
*/
|
|
165
170
|
logo?: CompanyCreateParams.Logo | null;
|
|
166
171
|
/**
|
|
167
|
-
* Additional metadata for the
|
|
172
|
+
* Additional metadata for the company
|
|
168
173
|
*/
|
|
169
174
|
metadata?: {
|
|
170
175
|
[key: string]: unknown;
|
|
171
176
|
} | null;
|
|
177
|
+
/**
|
|
178
|
+
* The company ID of the platform creating this sub-company. If omitted, the
|
|
179
|
+
* company is created for the current user.
|
|
180
|
+
*/
|
|
181
|
+
parent_company_id?: string | null;
|
|
172
182
|
/**
|
|
173
183
|
* Whether Whop sends transactional emails to customers on behalf of this company.
|
|
174
|
-
*
|
|
175
|
-
* renewals, and membership cancelations/expirations. When disabled, the platform
|
|
176
|
-
* is responsible for handling these communications. This is defaulted to true.
|
|
184
|
+
* Only used when parent_company_id is provided.
|
|
177
185
|
*/
|
|
178
186
|
send_customer_emails?: boolean | null;
|
|
179
187
|
}
|
|
@@ -197,6 +205,10 @@ export interface CompanyUpdateParams {
|
|
|
197
205
|
* The different business types a company can be.
|
|
198
206
|
*/
|
|
199
207
|
business_type?: Shared.BusinessTypes | null;
|
|
208
|
+
/**
|
|
209
|
+
* A description of what the company offers or does.
|
|
210
|
+
*/
|
|
211
|
+
description?: string | null;
|
|
200
212
|
/**
|
|
201
213
|
* The different industry types a company can be in.
|
|
202
214
|
*/
|
|
@@ -238,10 +250,6 @@ export declare namespace CompanyUpdateParams {
|
|
|
238
250
|
}
|
|
239
251
|
}
|
|
240
252
|
export interface CompanyListParams extends CursorPageParams {
|
|
241
|
-
/**
|
|
242
|
-
* The ID of the parent company to list connected accounts for
|
|
243
|
-
*/
|
|
244
|
-
parent_company_id: string;
|
|
245
253
|
/**
|
|
246
254
|
* Returns the elements in the list that come before the specified cursor.
|
|
247
255
|
*/
|
|
@@ -266,6 +274,11 @@ export interface CompanyListParams extends CursorPageParams {
|
|
|
266
274
|
* Returns the last _n_ elements from the list.
|
|
267
275
|
*/
|
|
268
276
|
last?: number | null;
|
|
277
|
+
/**
|
|
278
|
+
* The ID of the parent company to list connected accounts for. Omit to list the
|
|
279
|
+
* current user's own companies.
|
|
280
|
+
*/
|
|
281
|
+
parent_company_id?: string | null;
|
|
269
282
|
}
|
|
270
283
|
export declare namespace Companies {
|
|
271
284
|
export { type CompanyListResponse as CompanyListResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type CompanyListParams as CompanyListParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.mts","sourceRoot":"","sources":["../src/resources/companies.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,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.d.mts","sourceRoot":"","sources":["../src/resources/companies.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,SAAU,SAAQ,WAAW;IACxC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvF;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1E;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI7B;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC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O,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,yBAAiB,mBAAmB,CAAC;IACnC;;OAEG;IACH,UAAiB,WAAW;QAC1B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;IAED;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/companies.d.ts
CHANGED
|
@@ -5,11 +5,12 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
6
6
|
export declare class Companies extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Create a new
|
|
8
|
+
* Create a new company. Pass parent_company_id to create a sub-company under a
|
|
9
|
+
* platform, or omit it to create a company for the current user.
|
|
9
10
|
*
|
|
10
11
|
* Required permissions:
|
|
11
12
|
*
|
|
12
|
-
* - `company:
|
|
13
|
+
* - `company:create`
|
|
13
14
|
* - `company:basic:read`
|
|
14
15
|
*/
|
|
15
16
|
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
@@ -32,21 +33,24 @@ export declare class Companies extends APIResource {
|
|
|
32
33
|
*/
|
|
33
34
|
update(id: string, body?: CompanyUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
34
35
|
/**
|
|
35
|
-
* Lists companies
|
|
36
|
+
* Lists companies. When parent_company_id is provided, lists connected accounts
|
|
37
|
+
* under that company. When omitted, lists companies the current user has access
|
|
38
|
+
* to.
|
|
36
39
|
*
|
|
37
40
|
* Required permissions:
|
|
38
41
|
*
|
|
39
42
|
* - `company:basic:read`
|
|
40
43
|
*/
|
|
41
|
-
list(query
|
|
44
|
+
list(query?: CompanyListParams | null | undefined, options?: RequestOptions): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse>;
|
|
42
45
|
}
|
|
43
46
|
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
48
|
+
* A company is a seller on Whop. Companies own products, manage members, and
|
|
49
|
+
* receive payouts.
|
|
46
50
|
*/
|
|
47
51
|
export interface CompanyListResponse {
|
|
48
52
|
/**
|
|
49
|
-
* The
|
|
53
|
+
* The unique identifier for the company.
|
|
50
54
|
*/
|
|
51
55
|
id: string;
|
|
52
56
|
/**
|
|
@@ -54,7 +58,7 @@ export interface CompanyListResponse {
|
|
|
54
58
|
*/
|
|
55
59
|
business_type: Shared.BusinessTypes | null;
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
61
|
+
* The datetime the company was created.
|
|
58
62
|
*/
|
|
59
63
|
created_at: string;
|
|
60
64
|
/**
|
|
@@ -101,7 +105,7 @@ export interface CompanyListResponse {
|
|
|
101
105
|
*/
|
|
102
106
|
title: string;
|
|
103
107
|
/**
|
|
104
|
-
* The
|
|
108
|
+
* The datetime the company was last updated.
|
|
105
109
|
*/
|
|
106
110
|
updated_at: string;
|
|
107
111
|
/**
|
|
@@ -125,7 +129,7 @@ export declare namespace CompanyListResponse {
|
|
|
125
129
|
*/
|
|
126
130
|
interface OwnerUser {
|
|
127
131
|
/**
|
|
128
|
-
* The
|
|
132
|
+
* The unique identifier for the user.
|
|
129
133
|
*/
|
|
130
134
|
id: string;
|
|
131
135
|
/**
|
|
@@ -139,14 +143,6 @@ export declare namespace CompanyListResponse {
|
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
export interface CompanyCreateParams {
|
|
142
|
-
/**
|
|
143
|
-
* The email of the user who the company will belong to.
|
|
144
|
-
*/
|
|
145
|
-
email: string;
|
|
146
|
-
/**
|
|
147
|
-
* The company ID of the platform creating this company.
|
|
148
|
-
*/
|
|
149
|
-
parent_company_id: string;
|
|
150
146
|
/**
|
|
151
147
|
* The name of the company being created.
|
|
152
148
|
*/
|
|
@@ -155,6 +151,15 @@ export interface CompanyCreateParams {
|
|
|
155
151
|
* The different business types a company can be.
|
|
156
152
|
*/
|
|
157
153
|
business_type?: Shared.BusinessTypes | null;
|
|
154
|
+
/**
|
|
155
|
+
* A description of what the company offers or does.
|
|
156
|
+
*/
|
|
157
|
+
description?: string | null;
|
|
158
|
+
/**
|
|
159
|
+
* The email of the user who the sub-company will belong to. Required when
|
|
160
|
+
* parent_company_id is provided.
|
|
161
|
+
*/
|
|
162
|
+
email?: string | null;
|
|
158
163
|
/**
|
|
159
164
|
* The different industry types a company can be in.
|
|
160
165
|
*/
|
|
@@ -164,16 +169,19 @@ export interface CompanyCreateParams {
|
|
|
164
169
|
*/
|
|
165
170
|
logo?: CompanyCreateParams.Logo | null;
|
|
166
171
|
/**
|
|
167
|
-
* Additional metadata for the
|
|
172
|
+
* Additional metadata for the company
|
|
168
173
|
*/
|
|
169
174
|
metadata?: {
|
|
170
175
|
[key: string]: unknown;
|
|
171
176
|
} | null;
|
|
177
|
+
/**
|
|
178
|
+
* The company ID of the platform creating this sub-company. If omitted, the
|
|
179
|
+
* company is created for the current user.
|
|
180
|
+
*/
|
|
181
|
+
parent_company_id?: string | null;
|
|
172
182
|
/**
|
|
173
183
|
* Whether Whop sends transactional emails to customers on behalf of this company.
|
|
174
|
-
*
|
|
175
|
-
* renewals, and membership cancelations/expirations. When disabled, the platform
|
|
176
|
-
* is responsible for handling these communications. This is defaulted to true.
|
|
184
|
+
* Only used when parent_company_id is provided.
|
|
177
185
|
*/
|
|
178
186
|
send_customer_emails?: boolean | null;
|
|
179
187
|
}
|
|
@@ -197,6 +205,10 @@ export interface CompanyUpdateParams {
|
|
|
197
205
|
* The different business types a company can be.
|
|
198
206
|
*/
|
|
199
207
|
business_type?: Shared.BusinessTypes | null;
|
|
208
|
+
/**
|
|
209
|
+
* A description of what the company offers or does.
|
|
210
|
+
*/
|
|
211
|
+
description?: string | null;
|
|
200
212
|
/**
|
|
201
213
|
* The different industry types a company can be in.
|
|
202
214
|
*/
|
|
@@ -238,10 +250,6 @@ export declare namespace CompanyUpdateParams {
|
|
|
238
250
|
}
|
|
239
251
|
}
|
|
240
252
|
export interface CompanyListParams extends CursorPageParams {
|
|
241
|
-
/**
|
|
242
|
-
* The ID of the parent company to list connected accounts for
|
|
243
|
-
*/
|
|
244
|
-
parent_company_id: string;
|
|
245
253
|
/**
|
|
246
254
|
* Returns the elements in the list that come before the specified cursor.
|
|
247
255
|
*/
|
|
@@ -266,6 +274,11 @@ export interface CompanyListParams extends CursorPageParams {
|
|
|
266
274
|
* Returns the last _n_ elements from the list.
|
|
267
275
|
*/
|
|
268
276
|
last?: number | null;
|
|
277
|
+
/**
|
|
278
|
+
* The ID of the parent company to list connected accounts for. Omit to list the
|
|
279
|
+
* current user's own companies.
|
|
280
|
+
*/
|
|
281
|
+
parent_company_id?: string | null;
|
|
269
282
|
}
|
|
270
283
|
export declare namespace Companies {
|
|
271
284
|
export { type CompanyListResponse as CompanyListResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type CompanyListParams as CompanyListParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../src/resources/companies.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,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../src/resources/companies.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,SAAU,SAAQ,WAAW;IACxC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvF;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1E;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI7B;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,S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AAC;IAEvC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,yBAAiB,mBAAmB,CAAC;IACnC;;OAEG;IACH,UAAiB,WAAW;QAC1B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;IAED;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/companies.js
CHANGED
|
@@ -7,11 +7,12 @@ const pagination_1 = require("../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Companies extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create a new
|
|
10
|
+
* Create a new company. Pass parent_company_id to create a sub-company under a
|
|
11
|
+
* platform, or omit it to create a company for the current user.
|
|
11
12
|
*
|
|
12
13
|
* Required permissions:
|
|
13
14
|
*
|
|
14
|
-
* - `company:
|
|
15
|
+
* - `company:create`
|
|
15
16
|
* - `company:basic:read`
|
|
16
17
|
*/
|
|
17
18
|
create(body, options) {
|
|
@@ -40,13 +41,15 @@ class Companies extends resource_1.APIResource {
|
|
|
40
41
|
return this._client.patch((0, path_1.path) `/companies/${id}`, { body, ...options });
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
* Lists companies
|
|
44
|
+
* Lists companies. When parent_company_id is provided, lists connected accounts
|
|
45
|
+
* under that company. When omitted, lists companies the current user has access
|
|
46
|
+
* to.
|
|
44
47
|
*
|
|
45
48
|
* Required permissions:
|
|
46
49
|
*
|
|
47
50
|
* - `company:basic:read`
|
|
48
51
|
*/
|
|
49
|
-
list(query, options) {
|
|
52
|
+
list(query = {}, options) {
|
|
50
53
|
return this._client.getAPIList('/companies', (pagination_1.CursorPage), { query, ...options });
|
|
51
54
|
}
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAU,EACV,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,uBAA+B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AAzDD,8BAyDC"}
|
package/resources/companies.mjs
CHANGED
|
@@ -4,11 +4,12 @@ import { CursorPage } from "../core/pagination.mjs";
|
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Companies extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create a new
|
|
7
|
+
* Create a new company. Pass parent_company_id to create a sub-company under a
|
|
8
|
+
* platform, or omit it to create a company for the current user.
|
|
8
9
|
*
|
|
9
10
|
* Required permissions:
|
|
10
11
|
*
|
|
11
|
-
* - `company:
|
|
12
|
+
* - `company:create`
|
|
12
13
|
* - `company:basic:read`
|
|
13
14
|
*/
|
|
14
15
|
create(body, options) {
|
|
@@ -37,13 +38,15 @@ export class Companies extends APIResource {
|
|
|
37
38
|
return this._client.patch(path `/companies/${id}`, { body, ...options });
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
|
-
* Lists companies
|
|
41
|
+
* Lists companies. When parent_company_id is provided, lists connected accounts
|
|
42
|
+
* under that company. When omitted, lists companies the current user has access
|
|
43
|
+
* to.
|
|
41
44
|
*
|
|
42
45
|
* Required permissions:
|
|
43
46
|
*
|
|
44
47
|
* - `company:basic:read`
|
|
45
48
|
*/
|
|
46
|
-
list(query, options) {
|
|
49
|
+
list(query = {}, options) {
|
|
47
50
|
return this._client.getAPIList('/companies', (CursorPage), { query, ...options });
|
|
48
51
|
}
|
|
49
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.mjs","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.mjs","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAU,EACV,OAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,UAA+B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
|