@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
|
@@ -6,19 +6,20 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class AccessTokens extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a short-lived access token to authenticate API requests
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Create a short-lived access token to authenticate API requests. When using API
|
|
10
|
+
* key authentication, provide company_id or user_id. When using OAuth
|
|
11
|
+
* authentication, the user is derived from the token. This token should be used
|
|
12
|
+
* with Whop's web and mobile embedded components.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const accessToken = await client.accessTokens.create(
|
|
17
|
-
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
18
|
-
* });
|
|
16
|
+
* const accessToken = await client.accessTokens.create();
|
|
19
17
|
* ```
|
|
20
18
|
*/
|
|
21
|
-
create(
|
|
19
|
+
create(
|
|
20
|
+
body: AccessTokenCreateParams | null | undefined = {},
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): APIPromise<AccessTokenCreateResponse> {
|
|
22
23
|
return this._client.post('/access_tokens', { body, ...options });
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -38,57 +39,35 @@ export interface AccessTokenCreateResponse {
|
|
|
38
39
|
expires_at: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* The ID of the Company to generate the token for. The API key must have
|
|
49
|
-
* permission to access this Company, such as the being the company the API key
|
|
50
|
-
* belongs to or a sub-merchant of it
|
|
51
|
-
*/
|
|
52
|
-
company_id: string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* The expiration timestamp for the access token. If not provided, a default
|
|
56
|
-
* expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
57
|
-
* of 3 hours from the current time.
|
|
58
|
-
*/
|
|
59
|
-
expires_at?: string | null;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Array of desired scoped actions for the access token. If sent as an empty array
|
|
63
|
-
* or not provided, all permissions from the API key making the request will be
|
|
64
|
-
* available on the token. If sending an explicit list, they must be a subset of
|
|
65
|
-
* the API keys's existing permissions. Otherwise, an error will be raised.
|
|
66
|
-
*/
|
|
67
|
-
scoped_actions?: Array<string> | null;
|
|
68
|
-
}
|
|
42
|
+
export interface AccessTokenCreateParams {
|
|
43
|
+
/**
|
|
44
|
+
* The ID of the Company to generate the token for. The API key must have
|
|
45
|
+
* permission to access this Company, such as the being the company the API key
|
|
46
|
+
* belongs to or a sub-merchant of it
|
|
47
|
+
*/
|
|
48
|
+
company_id?: string | null;
|
|
69
49
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
/**
|
|
51
|
+
* The expiration timestamp for the access token. If not provided, a default
|
|
52
|
+
* expiration time of 1 hour will be used. The expiration can be set to a maximum
|
|
53
|
+
* of 3 hours from the current time.
|
|
54
|
+
*/
|
|
55
|
+
expires_at?: string | null;
|
|
76
56
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Array of desired scoped actions for the access token. If sent as an empty array
|
|
59
|
+
* or not provided, all permissions from the authenticating credential (API key or
|
|
60
|
+
* OAuth token) will be available on the token. If sending an explicit list, they
|
|
61
|
+
* must be a subset of the credential's existing permissions. Otherwise, an error
|
|
62
|
+
* will be raised.
|
|
63
|
+
*/
|
|
64
|
+
scoped_actions?: Array<string> | null;
|
|
83
65
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
scoped_actions?: Array<string> | null;
|
|
91
|
-
}
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the User to generate the token for. The API key must have permission
|
|
68
|
+
* to access this User.
|
|
69
|
+
*/
|
|
70
|
+
user_id?: string | null;
|
|
92
71
|
}
|
|
93
72
|
|
|
94
73
|
export declare namespace AccessTokens {
|
|
@@ -14,17 +14,14 @@ export class AIChats extends APIResource {
|
|
|
14
14
|
*
|
|
15
15
|
* - `ai_chat:create`
|
|
16
16
|
*/
|
|
17
|
-
create(
|
|
18
|
-
body: AIChatCreateParams | null | undefined = {},
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): APIPromise<AIChatCreateResponse> {
|
|
17
|
+
create(body: AIChatCreateParams, options?: RequestOptions): APIPromise<AIChat> {
|
|
21
18
|
return this._client.post('/ai_chats', { body, ...options });
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
/**
|
|
25
22
|
* Fetches a single AI chat by ID
|
|
26
23
|
*/
|
|
27
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
24
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AIChat> {
|
|
28
25
|
return this._client.get(path`/ai_chats/${id}`, options);
|
|
29
26
|
}
|
|
30
27
|
|
|
@@ -39,7 +36,7 @@ export class AIChats extends APIResource {
|
|
|
39
36
|
id: string,
|
|
40
37
|
body: AIChatUpdateParams | null | undefined = {},
|
|
41
38
|
options?: RequestOptions,
|
|
42
|
-
): APIPromise<
|
|
39
|
+
): APIPromise<AIChat> {
|
|
43
40
|
return this._client.patch(path`/ai_chats/${id}`, { body, ...options });
|
|
44
41
|
}
|
|
45
42
|
|
|
@@ -70,9 +67,9 @@ export type AIChatListResponsesCursorPage = CursorPage<AIChatListResponse>;
|
|
|
70
67
|
/**
|
|
71
68
|
* An AI chat conversation belonging to a user
|
|
72
69
|
*/
|
|
73
|
-
export interface
|
|
70
|
+
export interface AIChat {
|
|
74
71
|
/**
|
|
75
|
-
* The unique identifier for the
|
|
72
|
+
* The unique identifier for the ai chat.
|
|
76
73
|
*/
|
|
77
74
|
id: string;
|
|
78
75
|
|
|
@@ -82,7 +79,7 @@ export interface AIChatCreateResponse {
|
|
|
82
79
|
blended_token_usage: string;
|
|
83
80
|
|
|
84
81
|
/**
|
|
85
|
-
*
|
|
82
|
+
* The datetime the ai chat was created.
|
|
86
83
|
*/
|
|
87
84
|
created_at: string;
|
|
88
85
|
|
|
@@ -102,23 +99,23 @@ export interface AIChatCreateResponse {
|
|
|
102
99
|
title: string | null;
|
|
103
100
|
|
|
104
101
|
/**
|
|
105
|
-
*
|
|
102
|
+
* The datetime the ai chat was last updated.
|
|
106
103
|
*/
|
|
107
104
|
updated_at: string;
|
|
108
105
|
|
|
109
106
|
/**
|
|
110
107
|
* The user who owns the AI chat
|
|
111
108
|
*/
|
|
112
|
-
user:
|
|
109
|
+
user: AIChat.User;
|
|
113
110
|
}
|
|
114
111
|
|
|
115
|
-
export namespace
|
|
112
|
+
export namespace AIChat {
|
|
116
113
|
/**
|
|
117
114
|
* The user who owns the AI chat
|
|
118
115
|
*/
|
|
119
116
|
export interface User {
|
|
120
117
|
/**
|
|
121
|
-
* The
|
|
118
|
+
* The unique identifier for the user.
|
|
122
119
|
*/
|
|
123
120
|
id: string;
|
|
124
121
|
}
|
|
@@ -127,66 +124,9 @@ export namespace AIChatCreateResponse {
|
|
|
127
124
|
/**
|
|
128
125
|
* An AI chat conversation belonging to a user
|
|
129
126
|
*/
|
|
130
|
-
export interface
|
|
131
|
-
/**
|
|
132
|
-
* The unique identifier for the AI chat
|
|
133
|
-
*/
|
|
134
|
-
id: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* The total number of tokens used in the chat
|
|
138
|
-
*/
|
|
139
|
-
blended_token_usage: string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* When the AI chat was created
|
|
143
|
-
*/
|
|
144
|
-
created_at: string;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* When the last message was sent
|
|
148
|
-
*/
|
|
149
|
-
last_message_at: string | null;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* The number of messages in the chat
|
|
153
|
-
*/
|
|
154
|
-
message_count: number;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* The title of the AI chat
|
|
158
|
-
*/
|
|
159
|
-
title: string | null;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* When the AI chat was last updated
|
|
163
|
-
*/
|
|
164
|
-
updated_at: string;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* The user who owns the AI chat
|
|
168
|
-
*/
|
|
169
|
-
user: AIChatRetrieveResponse.User;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export namespace AIChatRetrieveResponse {
|
|
173
|
-
/**
|
|
174
|
-
* The user who owns the AI chat
|
|
175
|
-
*/
|
|
176
|
-
export interface User {
|
|
177
|
-
/**
|
|
178
|
-
* The internal ID of the user.
|
|
179
|
-
*/
|
|
180
|
-
id: string;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* An AI chat conversation belonging to a user
|
|
186
|
-
*/
|
|
187
|
-
export interface AIChatUpdateResponse {
|
|
127
|
+
export interface AIChatListResponse {
|
|
188
128
|
/**
|
|
189
|
-
* The unique identifier for the
|
|
129
|
+
* The unique identifier for the ai chat.
|
|
190
130
|
*/
|
|
191
131
|
id: string;
|
|
192
132
|
|
|
@@ -196,7 +136,7 @@ export interface AIChatUpdateResponse {
|
|
|
196
136
|
blended_token_usage: string;
|
|
197
137
|
|
|
198
138
|
/**
|
|
199
|
-
*
|
|
139
|
+
* The datetime the ai chat was created.
|
|
200
140
|
*/
|
|
201
141
|
created_at: string;
|
|
202
142
|
|
|
@@ -216,98 +156,74 @@ export interface AIChatUpdateResponse {
|
|
|
216
156
|
title: string | null;
|
|
217
157
|
|
|
218
158
|
/**
|
|
219
|
-
*
|
|
159
|
+
* The datetime the ai chat was last updated.
|
|
220
160
|
*/
|
|
221
161
|
updated_at: string;
|
|
222
162
|
|
|
223
163
|
/**
|
|
224
164
|
* The user who owns the AI chat
|
|
225
165
|
*/
|
|
226
|
-
user:
|
|
166
|
+
user: AIChatListResponse.User;
|
|
227
167
|
}
|
|
228
168
|
|
|
229
|
-
export namespace
|
|
169
|
+
export namespace AIChatListResponse {
|
|
230
170
|
/**
|
|
231
171
|
* The user who owns the AI chat
|
|
232
172
|
*/
|
|
233
173
|
export interface User {
|
|
234
174
|
/**
|
|
235
|
-
* The
|
|
175
|
+
* The unique identifier for the user.
|
|
236
176
|
*/
|
|
237
177
|
id: string;
|
|
238
178
|
}
|
|
239
179
|
}
|
|
240
180
|
|
|
241
181
|
/**
|
|
242
|
-
*
|
|
182
|
+
* Represents `true` or `false` values.
|
|
243
183
|
*/
|
|
244
|
-
export
|
|
245
|
-
/**
|
|
246
|
-
* The unique identifier for the AI chat
|
|
247
|
-
*/
|
|
248
|
-
id: string;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The total number of tokens used in the chat
|
|
252
|
-
*/
|
|
253
|
-
blended_token_usage: string;
|
|
184
|
+
export type AIChatDeleteResponse = boolean;
|
|
254
185
|
|
|
186
|
+
export interface AIChatCreateParams {
|
|
255
187
|
/**
|
|
256
|
-
*
|
|
188
|
+
* The text content of the first message sent in the chat
|
|
257
189
|
*/
|
|
258
|
-
|
|
190
|
+
message_text: string;
|
|
259
191
|
|
|
260
192
|
/**
|
|
261
|
-
*
|
|
193
|
+
* The ID of the company to set as the current company in context for the AI chat
|
|
262
194
|
*/
|
|
263
|
-
|
|
195
|
+
current_company_id?: string | null;
|
|
264
196
|
|
|
265
197
|
/**
|
|
266
|
-
* The
|
|
198
|
+
* The IDs of existing uploaded attachments to include in the first message to the
|
|
199
|
+
* agent
|
|
267
200
|
*/
|
|
268
|
-
|
|
201
|
+
message_attachments?: Array<AIChatCreateParams.MessageAttachment> | null;
|
|
269
202
|
|
|
270
203
|
/**
|
|
271
204
|
* The title of the AI chat
|
|
272
205
|
*/
|
|
273
|
-
title
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* When the AI chat was last updated
|
|
277
|
-
*/
|
|
278
|
-
updated_at: string;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* The user who owns the AI chat
|
|
282
|
-
*/
|
|
283
|
-
user: AIChatListResponse.User;
|
|
206
|
+
title?: string | null;
|
|
284
207
|
}
|
|
285
208
|
|
|
286
|
-
export namespace
|
|
209
|
+
export namespace AIChatCreateParams {
|
|
287
210
|
/**
|
|
288
|
-
*
|
|
211
|
+
* Input for an attachment
|
|
289
212
|
*/
|
|
290
|
-
export interface
|
|
213
|
+
export interface MessageAttachment {
|
|
291
214
|
/**
|
|
292
|
-
* The
|
|
215
|
+
* The ID of an existing file object.
|
|
293
216
|
*/
|
|
294
217
|
id: string;
|
|
295
218
|
}
|
|
296
219
|
}
|
|
297
220
|
|
|
298
|
-
|
|
299
|
-
* Represents `true` or `false` values.
|
|
300
|
-
*/
|
|
301
|
-
export type AIChatDeleteResponse = boolean;
|
|
302
|
-
|
|
303
|
-
export interface AIChatCreateParams {
|
|
221
|
+
export interface AIChatUpdateParams {
|
|
304
222
|
/**
|
|
305
|
-
* The
|
|
223
|
+
* The ID of the company to set as the current company in context for the AI chat
|
|
306
224
|
*/
|
|
307
|
-
|
|
308
|
-
}
|
|
225
|
+
current_company_id?: string | null;
|
|
309
226
|
|
|
310
|
-
export interface AIChatUpdateParams {
|
|
311
227
|
/**
|
|
312
228
|
* The new title for the AI chat
|
|
313
229
|
*/
|
|
@@ -333,9 +249,7 @@ export interface AIChatListParams extends CursorPageParams {
|
|
|
333
249
|
|
|
334
250
|
export declare namespace AIChats {
|
|
335
251
|
export {
|
|
336
|
-
type
|
|
337
|
-
type AIChatRetrieveResponse as AIChatRetrieveResponse,
|
|
338
|
-
type AIChatUpdateResponse as AIChatUpdateResponse,
|
|
252
|
+
type AIChat as AIChat,
|
|
339
253
|
type AIChatListResponse as AIChatListResponse,
|
|
340
254
|
type AIChatDeleteResponse as AIChatDeleteResponse,
|
|
341
255
|
type AIChatListResponsesCursorPage as AIChatListResponsesCursorPage,
|
|
@@ -96,7 +96,7 @@ export type AppBuildListResponsesCursorPage = CursorPage<AppBuildListResponse>;
|
|
|
96
96
|
*/
|
|
97
97
|
export interface AppBuildListResponse {
|
|
98
98
|
/**
|
|
99
|
-
* The
|
|
99
|
+
* The unique identifier for the app build.
|
|
100
100
|
*/
|
|
101
101
|
id: string;
|
|
102
102
|
|
|
@@ -107,7 +107,7 @@ export interface AppBuildListResponse {
|
|
|
107
107
|
checksum: string;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* The datetime the app build was created.
|
|
111
111
|
*/
|
|
112
112
|
created_at: string;
|
|
113
113
|
|
package/src/resources/apps.ts
CHANGED
|
@@ -94,11 +94,12 @@ export type AppListResponsesCursorPage = CursorPage<AppListResponse>;
|
|
|
94
94
|
export type AppType = 'b2b_app' | 'b2c_app' | 'company_app' | 'component';
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* An
|
|
97
|
+
* An app is an integration built on Whop. Apps can serve consumers as experiences
|
|
98
|
+
* within products, or serve companies as business tools.
|
|
98
99
|
*/
|
|
99
100
|
export interface AppListResponse {
|
|
100
101
|
/**
|
|
101
|
-
* The
|
|
102
|
+
* The unique identifier for the app.
|
|
102
103
|
*/
|
|
103
104
|
id: string;
|
|
104
105
|
|
|
@@ -185,7 +186,7 @@ export namespace AppListResponse {
|
|
|
185
186
|
*/
|
|
186
187
|
export interface Company {
|
|
187
188
|
/**
|
|
188
|
-
* The
|
|
189
|
+
* The unique identifier for the company.
|
|
189
190
|
*/
|
|
190
191
|
id: string;
|
|
191
192
|
|
|
@@ -200,7 +201,7 @@ export namespace AppListResponse {
|
|
|
200
201
|
*/
|
|
201
202
|
export interface Creator {
|
|
202
203
|
/**
|
|
203
|
-
* The
|
|
204
|
+
* The unique identifier for the user.
|
|
204
205
|
*/
|
|
205
206
|
id: string;
|
|
206
207
|
|
|
@@ -29,7 +29,7 @@ export class AuthorizedUsers extends APIResource {
|
|
|
29
29
|
* - `member:email:read`
|
|
30
30
|
*/
|
|
31
31
|
list(
|
|
32
|
-
query: AuthorizedUserListParams,
|
|
32
|
+
query: AuthorizedUserListParams | null | undefined = {},
|
|
33
33
|
options?: RequestOptions,
|
|
34
34
|
): PagePromise<AuthorizedUserListResponsesCursorPage, AuthorizedUserListResponse> {
|
|
35
35
|
return this._client.getAPIList('/authorized_users', CursorPage<AuthorizedUserListResponse>, {
|
|
@@ -46,10 +46,15 @@ export type AuthorizedUserListResponsesCursorPage = CursorPage<AuthorizedUserLis
|
|
|
46
46
|
*/
|
|
47
47
|
export interface AuthorizedUserRetrieveResponse {
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* The unique identifier for the authorized user.
|
|
50
50
|
*/
|
|
51
51
|
id: string;
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The company associated with the authorized user.
|
|
55
|
+
*/
|
|
56
|
+
company: AuthorizedUserRetrieveResponse.Company;
|
|
57
|
+
|
|
53
58
|
/**
|
|
54
59
|
* The role of the authorized user in the company.
|
|
55
60
|
*/
|
|
@@ -62,12 +67,27 @@ export interface AuthorizedUserRetrieveResponse {
|
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export namespace AuthorizedUserRetrieveResponse {
|
|
70
|
+
/**
|
|
71
|
+
* The company associated with the authorized user.
|
|
72
|
+
*/
|
|
73
|
+
export interface Company {
|
|
74
|
+
/**
|
|
75
|
+
* The unique identifier for the company.
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The title of the company.
|
|
81
|
+
*/
|
|
82
|
+
title: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
/**
|
|
66
86
|
* The user associated with the authorized user.
|
|
67
87
|
*/
|
|
68
88
|
export interface User {
|
|
69
89
|
/**
|
|
70
|
-
* The
|
|
90
|
+
* The unique identifier for the user.
|
|
71
91
|
*/
|
|
72
92
|
id: string;
|
|
73
93
|
|
|
@@ -93,10 +113,15 @@ export namespace AuthorizedUserRetrieveResponse {
|
|
|
93
113
|
*/
|
|
94
114
|
export interface AuthorizedUserListResponse {
|
|
95
115
|
/**
|
|
96
|
-
*
|
|
116
|
+
* The unique identifier for the authorized user.
|
|
97
117
|
*/
|
|
98
118
|
id: string;
|
|
99
119
|
|
|
120
|
+
/**
|
|
121
|
+
* The company associated with the authorized user.
|
|
122
|
+
*/
|
|
123
|
+
company: AuthorizedUserListResponse.Company;
|
|
124
|
+
|
|
100
125
|
/**
|
|
101
126
|
* The role of the authorized user in the company.
|
|
102
127
|
*/
|
|
@@ -109,12 +134,27 @@ export interface AuthorizedUserListResponse {
|
|
|
109
134
|
}
|
|
110
135
|
|
|
111
136
|
export namespace AuthorizedUserListResponse {
|
|
137
|
+
/**
|
|
138
|
+
* The company associated with the authorized user.
|
|
139
|
+
*/
|
|
140
|
+
export interface Company {
|
|
141
|
+
/**
|
|
142
|
+
* The unique identifier for the company.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The title of the company.
|
|
148
|
+
*/
|
|
149
|
+
title: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
112
152
|
/**
|
|
113
153
|
* The user associated with the authorized user.
|
|
114
154
|
*/
|
|
115
155
|
export interface User {
|
|
116
156
|
/**
|
|
117
|
-
* The
|
|
157
|
+
* The unique identifier for the user.
|
|
118
158
|
*/
|
|
119
159
|
id: string;
|
|
120
160
|
|
|
@@ -137,14 +177,14 @@ export namespace AuthorizedUserListResponse {
|
|
|
137
177
|
|
|
138
178
|
export interface AuthorizedUserListParams extends CursorPageParams {
|
|
139
179
|
/**
|
|
140
|
-
*
|
|
180
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
141
181
|
*/
|
|
142
|
-
|
|
182
|
+
before?: string | null;
|
|
143
183
|
|
|
144
184
|
/**
|
|
145
|
-
*
|
|
185
|
+
* The ID of the company to list authorized users for
|
|
146
186
|
*/
|
|
147
|
-
|
|
187
|
+
company_id?: string | null;
|
|
148
188
|
|
|
149
189
|
/**
|
|
150
190
|
* The minimum creation date to filter by
|