@whop/sdk 0.0.24 → 0.0.25
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 +47 -0
- package/README.md +2 -2
- package/client.d.mts +13 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -4
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai-chats.d.mts +265 -0
- package/resources/ai-chats.d.mts.map +1 -0
- package/resources/ai-chats.d.ts +265 -0
- package/resources/ai-chats.d.ts.map +1 -0
- package/resources/ai-chats.js +53 -0
- package/resources/ai-chats.js.map +1 -0
- package/resources/ai-chats.mjs +49 -0
- package/resources/ai-chats.mjs.map +1 -0
- package/resources/apps.d.mts +1 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +1 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +12 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +12 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/company-token-transactions.d.mts +425 -0
- package/resources/company-token-transactions.d.mts.map +1 -0
- package/resources/company-token-transactions.d.ts +425 -0
- package/resources/company-token-transactions.d.ts.map +1 -0
- package/resources/company-token-transactions.js +59 -0
- package/resources/company-token-transactions.js.map +1 -0
- package/resources/company-token-transactions.mjs +55 -0
- package/resources/company-token-transactions.mjs.map +1 -0
- package/resources/dm-members.d.mts +242 -0
- package/resources/dm-members.d.mts.map +1 -0
- package/resources/dm-members.d.ts +242 -0
- package/resources/dm-members.d.ts.map +1 -0
- package/resources/dm-members.js +94 -0
- package/resources/dm-members.js.map +1 -0
- package/resources/dm-members.mjs +90 -0
- package/resources/dm-members.mjs.map +1 -0
- package/resources/index.d.mts +5 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/members.d.mts +8 -0
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +8 -0
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +25 -0
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -0
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +18 -0
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +18 -0
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +17 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +17 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +10 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +10 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/payments.d.mts +9 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +9 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +18 -0
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +18 -0
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/reactions.d.mts +24 -1
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +24 -1
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +11 -0
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +11 -0
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +1 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/shared.d.mts +39 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +39 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +9 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +9 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +4 -0
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +4 -0
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +81 -0
- package/src/resources/ai-chats.ts +346 -0
- package/src/resources/apps.ts +6 -0
- package/src/resources/checkout-configurations.ts +15 -0
- package/src/resources/company-token-transactions.ts +535 -0
- package/src/resources/dm-members.ts +310 -0
- package/src/resources/index.ts +36 -0
- package/src/resources/members.ts +10 -0
- package/src/resources/memberships.ts +38 -0
- package/src/resources/messages.ts +22 -0
- package/src/resources/payments.ts +69 -57
- package/src/resources/payout-methods.ts +22 -0
- package/src/resources/reactions.ts +36 -0
- package/src/resources/refunds.ts +2 -1
- package/src/resources/shared.ts +77 -11
- package/src/resources/webhooks.ts +11 -0
- package/src/resources/withdrawals.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/client.ts
CHANGED
|
@@ -21,6 +21,18 @@ import * as API from './resources/index';
|
|
|
21
21
|
import { APIPromise } from './core/api-promise';
|
|
22
22
|
import { AccessTokenCreateParams, AccessTokenCreateResponse, AccessTokens } from './resources/access-tokens';
|
|
23
23
|
import { AccountLinkCreateParams, AccountLinkCreateResponse, AccountLinks } from './resources/account-links';
|
|
24
|
+
import {
|
|
25
|
+
AIChatCreateParams,
|
|
26
|
+
AIChatCreateResponse,
|
|
27
|
+
AIChatDeleteResponse,
|
|
28
|
+
AIChatListParams,
|
|
29
|
+
AIChatListResponse,
|
|
30
|
+
AIChatListResponsesCursorPage,
|
|
31
|
+
AIChatRetrieveResponse,
|
|
32
|
+
AIChatUpdateParams,
|
|
33
|
+
AIChatUpdateResponse,
|
|
34
|
+
AIChats,
|
|
35
|
+
} from './resources/ai-chats';
|
|
24
36
|
import {
|
|
25
37
|
AppBuildCreateParams,
|
|
26
38
|
AppBuildListParams,
|
|
@@ -67,6 +79,15 @@ import {
|
|
|
67
79
|
CompanyListResponsesCursorPage,
|
|
68
80
|
CompanyUpdateParams,
|
|
69
81
|
} from './resources/companies';
|
|
82
|
+
import {
|
|
83
|
+
CompanyTokenTransactionCreateParams,
|
|
84
|
+
CompanyTokenTransactionCreateResponse,
|
|
85
|
+
CompanyTokenTransactionListParams,
|
|
86
|
+
CompanyTokenTransactionListResponse,
|
|
87
|
+
CompanyTokenTransactionListResponsesCursorPage,
|
|
88
|
+
CompanyTokenTransactionRetrieveResponse,
|
|
89
|
+
CompanyTokenTransactions,
|
|
90
|
+
} from './resources/company-token-transactions';
|
|
70
91
|
import {
|
|
71
92
|
CourseChapter,
|
|
72
93
|
CourseChapterCreateParams,
|
|
@@ -127,6 +148,18 @@ import {
|
|
|
127
148
|
DisputeUpdateEvidenceParams,
|
|
128
149
|
Disputes,
|
|
129
150
|
} from './resources/disputes';
|
|
151
|
+
import {
|
|
152
|
+
DmMemberCreateParams,
|
|
153
|
+
DmMemberCreateResponse,
|
|
154
|
+
DmMemberDeleteResponse,
|
|
155
|
+
DmMemberListParams,
|
|
156
|
+
DmMemberListResponse,
|
|
157
|
+
DmMemberListResponsesCursorPage,
|
|
158
|
+
DmMemberRetrieveResponse,
|
|
159
|
+
DmMemberUpdateParams,
|
|
160
|
+
DmMemberUpdateResponse,
|
|
161
|
+
DmMembers,
|
|
162
|
+
} from './resources/dm-members';
|
|
130
163
|
import {
|
|
131
164
|
Entries,
|
|
132
165
|
EntryApproveResponse,
|
|
@@ -204,6 +237,7 @@ import {
|
|
|
204
237
|
} from './resources/memberships';
|
|
205
238
|
import {
|
|
206
239
|
MessageCreateParams,
|
|
240
|
+
MessageDeleteResponse,
|
|
207
241
|
MessageListParams,
|
|
208
242
|
MessageListResponse,
|
|
209
243
|
MessageListResponsesCursorPage,
|
|
@@ -273,6 +307,8 @@ import {
|
|
|
273
307
|
} from './resources/promo-codes';
|
|
274
308
|
import {
|
|
275
309
|
ReactionCreateParams,
|
|
310
|
+
ReactionDeleteParams,
|
|
311
|
+
ReactionDeleteResponse,
|
|
276
312
|
ReactionListParams,
|
|
277
313
|
ReactionListResponse,
|
|
278
314
|
ReactionListResponsesCursorPage,
|
|
@@ -1157,6 +1193,9 @@ export class Whop {
|
|
|
1157
1193
|
leads: API.Leads = new API.Leads(this);
|
|
1158
1194
|
topups: API.Topups = new API.Topups(this);
|
|
1159
1195
|
files: API.Files = new API.Files(this);
|
|
1196
|
+
companyTokenTransactions: API.CompanyTokenTransactions = new API.CompanyTokenTransactions(this);
|
|
1197
|
+
dmMembers: API.DmMembers = new API.DmMembers(this);
|
|
1198
|
+
aiChats: API.AIChats = new API.AIChats(this);
|
|
1160
1199
|
}
|
|
1161
1200
|
|
|
1162
1201
|
Whop.Apps = Apps;
|
|
@@ -1204,6 +1243,9 @@ Whop.Verifications = Verifications;
|
|
|
1204
1243
|
Whop.Leads = Leads;
|
|
1205
1244
|
Whop.Topups = Topups;
|
|
1206
1245
|
Whop.Files = Files;
|
|
1246
|
+
Whop.CompanyTokenTransactions = CompanyTokenTransactions;
|
|
1247
|
+
Whop.DmMembers = DmMembers;
|
|
1248
|
+
Whop.AIChats = AIChats;
|
|
1207
1249
|
|
|
1208
1250
|
export declare namespace Whop {
|
|
1209
1251
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1378,6 +1420,7 @@ export declare namespace Whop {
|
|
|
1378
1420
|
export {
|
|
1379
1421
|
Messages as Messages,
|
|
1380
1422
|
type MessageListResponse as MessageListResponse,
|
|
1423
|
+
type MessageDeleteResponse as MessageDeleteResponse,
|
|
1381
1424
|
type MessageListResponsesCursorPage as MessageListResponsesCursorPage,
|
|
1382
1425
|
type MessageCreateParams as MessageCreateParams,
|
|
1383
1426
|
type MessageUpdateParams as MessageUpdateParams,
|
|
@@ -1438,9 +1481,11 @@ export declare namespace Whop {
|
|
|
1438
1481
|
export {
|
|
1439
1482
|
Reactions as Reactions,
|
|
1440
1483
|
type ReactionListResponse as ReactionListResponse,
|
|
1484
|
+
type ReactionDeleteResponse as ReactionDeleteResponse,
|
|
1441
1485
|
type ReactionListResponsesCursorPage as ReactionListResponsesCursorPage,
|
|
1442
1486
|
type ReactionCreateParams as ReactionCreateParams,
|
|
1443
1487
|
type ReactionListParams as ReactionListParams,
|
|
1488
|
+
type ReactionDeleteParams as ReactionDeleteParams,
|
|
1444
1489
|
};
|
|
1445
1490
|
|
|
1446
1491
|
export {
|
|
@@ -1651,6 +1696,42 @@ export declare namespace Whop {
|
|
|
1651
1696
|
type FileCreateParams as FileCreateParams,
|
|
1652
1697
|
};
|
|
1653
1698
|
|
|
1699
|
+
export {
|
|
1700
|
+
CompanyTokenTransactions as CompanyTokenTransactions,
|
|
1701
|
+
type CompanyTokenTransactionCreateResponse as CompanyTokenTransactionCreateResponse,
|
|
1702
|
+
type CompanyTokenTransactionRetrieveResponse as CompanyTokenTransactionRetrieveResponse,
|
|
1703
|
+
type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
|
|
1704
|
+
type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
|
|
1705
|
+
type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
|
|
1706
|
+
type CompanyTokenTransactionListParams as CompanyTokenTransactionListParams,
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1709
|
+
export {
|
|
1710
|
+
DmMembers as DmMembers,
|
|
1711
|
+
type DmMemberCreateResponse as DmMemberCreateResponse,
|
|
1712
|
+
type DmMemberRetrieveResponse as DmMemberRetrieveResponse,
|
|
1713
|
+
type DmMemberUpdateResponse as DmMemberUpdateResponse,
|
|
1714
|
+
type DmMemberListResponse as DmMemberListResponse,
|
|
1715
|
+
type DmMemberDeleteResponse as DmMemberDeleteResponse,
|
|
1716
|
+
type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage,
|
|
1717
|
+
type DmMemberCreateParams as DmMemberCreateParams,
|
|
1718
|
+
type DmMemberUpdateParams as DmMemberUpdateParams,
|
|
1719
|
+
type DmMemberListParams as DmMemberListParams,
|
|
1720
|
+
};
|
|
1721
|
+
|
|
1722
|
+
export {
|
|
1723
|
+
AIChats as AIChats,
|
|
1724
|
+
type AIChatCreateResponse as AIChatCreateResponse,
|
|
1725
|
+
type AIChatRetrieveResponse as AIChatRetrieveResponse,
|
|
1726
|
+
type AIChatUpdateResponse as AIChatUpdateResponse,
|
|
1727
|
+
type AIChatListResponse as AIChatListResponse,
|
|
1728
|
+
type AIChatDeleteResponse as AIChatDeleteResponse,
|
|
1729
|
+
type AIChatListResponsesCursorPage as AIChatListResponsesCursorPage,
|
|
1730
|
+
type AIChatCreateParams as AIChatCreateParams,
|
|
1731
|
+
type AIChatUpdateParams as AIChatUpdateParams,
|
|
1732
|
+
type AIChatListParams as AIChatListParams,
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1654
1735
|
export type AccessLevel = API.AccessLevel;
|
|
1655
1736
|
export type AccessPassType = API.AccessPassType;
|
|
1656
1737
|
export type App = API.App;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class AIChats extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new AI chat
|
|
12
|
+
*
|
|
13
|
+
* Required permissions:
|
|
14
|
+
*
|
|
15
|
+
* - `ai_chat:create`
|
|
16
|
+
*/
|
|
17
|
+
create(
|
|
18
|
+
body: AIChatCreateParams | null | undefined = {},
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): APIPromise<AIChatCreateResponse> {
|
|
21
|
+
return this._client.post('/ai_chats', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Fetches a single AI chat by ID
|
|
26
|
+
*/
|
|
27
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AIChatRetrieveResponse> {
|
|
28
|
+
return this._client.get(path`/ai_chats/${id}`, options);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Updates an AI chat
|
|
33
|
+
*
|
|
34
|
+
* Required permissions:
|
|
35
|
+
*
|
|
36
|
+
* - `ai_chat:update`
|
|
37
|
+
*/
|
|
38
|
+
update(
|
|
39
|
+
id: string,
|
|
40
|
+
body: AIChatUpdateParams | null | undefined = {},
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<AIChatUpdateResponse> {
|
|
43
|
+
return this._client.patch(path`/ai_chats/${id}`, { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Fetches all AI chats for the current user
|
|
48
|
+
*/
|
|
49
|
+
list(
|
|
50
|
+
query: AIChatListParams | null | undefined = {},
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): PagePromise<AIChatListResponsesCursorPage, AIChatListResponse> {
|
|
53
|
+
return this._client.getAPIList('/ai_chats', CursorPage<AIChatListResponse>, { query, ...options });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Deletes an AI chat
|
|
58
|
+
*
|
|
59
|
+
* Required permissions:
|
|
60
|
+
*
|
|
61
|
+
* - `ai_chat:delete`
|
|
62
|
+
*/
|
|
63
|
+
delete(id: string, options?: RequestOptions): APIPromise<AIChatDeleteResponse> {
|
|
64
|
+
return this._client.delete(path`/ai_chats/${id}`, options);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type AIChatListResponsesCursorPage = CursorPage<AIChatListResponse>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* An AI chat conversation belonging to a user
|
|
72
|
+
*/
|
|
73
|
+
export interface AIChatCreateResponse {
|
|
74
|
+
/**
|
|
75
|
+
* The unique identifier for the AI chat
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The total number of tokens used in the chat
|
|
81
|
+
*/
|
|
82
|
+
blended_token_usage: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* When the AI chat was created
|
|
86
|
+
*/
|
|
87
|
+
created_at: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* When the last message was sent
|
|
91
|
+
*/
|
|
92
|
+
last_message_at: string | null;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The number of messages in the chat
|
|
96
|
+
*/
|
|
97
|
+
message_count: number;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The title of the AI chat
|
|
101
|
+
*/
|
|
102
|
+
title: string | null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* When the AI chat was last updated
|
|
106
|
+
*/
|
|
107
|
+
updated_at: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The user who owns the AI chat
|
|
111
|
+
*/
|
|
112
|
+
user: AIChatCreateResponse.User;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export namespace AIChatCreateResponse {
|
|
116
|
+
/**
|
|
117
|
+
* The user who owns the AI chat
|
|
118
|
+
*/
|
|
119
|
+
export interface User {
|
|
120
|
+
/**
|
|
121
|
+
* The internal ID of the user.
|
|
122
|
+
*/
|
|
123
|
+
id: string;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* An AI chat conversation belonging to a user
|
|
129
|
+
*/
|
|
130
|
+
export interface AIChatRetrieveResponse {
|
|
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 {
|
|
188
|
+
/**
|
|
189
|
+
* The unique identifier for the AI chat
|
|
190
|
+
*/
|
|
191
|
+
id: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The total number of tokens used in the chat
|
|
195
|
+
*/
|
|
196
|
+
blended_token_usage: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* When the AI chat was created
|
|
200
|
+
*/
|
|
201
|
+
created_at: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* When the last message was sent
|
|
205
|
+
*/
|
|
206
|
+
last_message_at: string | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The number of messages in the chat
|
|
210
|
+
*/
|
|
211
|
+
message_count: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The title of the AI chat
|
|
215
|
+
*/
|
|
216
|
+
title: string | null;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* When the AI chat was last updated
|
|
220
|
+
*/
|
|
221
|
+
updated_at: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The user who owns the AI chat
|
|
225
|
+
*/
|
|
226
|
+
user: AIChatUpdateResponse.User;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export namespace AIChatUpdateResponse {
|
|
230
|
+
/**
|
|
231
|
+
* The user who owns the AI chat
|
|
232
|
+
*/
|
|
233
|
+
export interface User {
|
|
234
|
+
/**
|
|
235
|
+
* The internal ID of the user.
|
|
236
|
+
*/
|
|
237
|
+
id: string;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* An AI chat conversation belonging to a user
|
|
243
|
+
*/
|
|
244
|
+
export interface AIChatListResponse {
|
|
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;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* When the AI chat was created
|
|
257
|
+
*/
|
|
258
|
+
created_at: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* When the last message was sent
|
|
262
|
+
*/
|
|
263
|
+
last_message_at: string | null;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The number of messages in the chat
|
|
267
|
+
*/
|
|
268
|
+
message_count: number;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The title of the AI chat
|
|
272
|
+
*/
|
|
273
|
+
title: string | null;
|
|
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;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export namespace AIChatListResponse {
|
|
287
|
+
/**
|
|
288
|
+
* The user who owns the AI chat
|
|
289
|
+
*/
|
|
290
|
+
export interface User {
|
|
291
|
+
/**
|
|
292
|
+
* The internal ID of the user.
|
|
293
|
+
*/
|
|
294
|
+
id: string;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Represents `true` or `false` values.
|
|
300
|
+
*/
|
|
301
|
+
export type AIChatDeleteResponse = boolean;
|
|
302
|
+
|
|
303
|
+
export interface AIChatCreateParams {
|
|
304
|
+
/**
|
|
305
|
+
* The title of the AI chat
|
|
306
|
+
*/
|
|
307
|
+
title?: string | null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface AIChatUpdateParams {
|
|
311
|
+
/**
|
|
312
|
+
* The new title for the AI chat
|
|
313
|
+
*/
|
|
314
|
+
title?: string | null;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface AIChatListParams extends CursorPageParams {
|
|
318
|
+
/**
|
|
319
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
320
|
+
*/
|
|
321
|
+
before?: string | null;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Returns the first _n_ elements from the list.
|
|
325
|
+
*/
|
|
326
|
+
first?: number | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Returns the last _n_ elements from the list.
|
|
330
|
+
*/
|
|
331
|
+
last?: number | null;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export declare namespace AIChats {
|
|
335
|
+
export {
|
|
336
|
+
type AIChatCreateResponse as AIChatCreateResponse,
|
|
337
|
+
type AIChatRetrieveResponse as AIChatRetrieveResponse,
|
|
338
|
+
type AIChatUpdateResponse as AIChatUpdateResponse,
|
|
339
|
+
type AIChatListResponse as AIChatListResponse,
|
|
340
|
+
type AIChatDeleteResponse as AIChatDeleteResponse,
|
|
341
|
+
type AIChatListResponsesCursorPage as AIChatListResponsesCursorPage,
|
|
342
|
+
type AIChatCreateParams as AIChatCreateParams,
|
|
343
|
+
type AIChatUpdateParams as AIChatUpdateParams,
|
|
344
|
+
type AIChatListParams as AIChatListParams,
|
|
345
|
+
};
|
|
346
|
+
}
|
package/src/resources/apps.ts
CHANGED
|
@@ -366,12 +366,18 @@ export interface AppListParams extends CursorPageParams {
|
|
|
366
366
|
* The order to fetch the apps in for discovery.
|
|
367
367
|
*/
|
|
368
368
|
order?:
|
|
369
|
+
| 'created_at'
|
|
369
370
|
| 'discoverable_at'
|
|
370
371
|
| 'total_installs_last_30_days'
|
|
371
372
|
| 'total_installs_last_7_days'
|
|
372
373
|
| 'time_spent'
|
|
373
374
|
| 'time_spent_last_24_hours'
|
|
374
375
|
| 'daily_active_users'
|
|
376
|
+
| 'ai_prompt_count'
|
|
377
|
+
| 'total_ai_cost_usd'
|
|
378
|
+
| 'total_ai_tokens'
|
|
379
|
+
| 'last_ai_prompt_at'
|
|
380
|
+
| 'ai_average_rating'
|
|
375
381
|
| null;
|
|
376
382
|
|
|
377
383
|
/**
|
|
@@ -258,6 +258,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
258
258
|
* The URL to redirect the user to after the checkout configuration is created
|
|
259
259
|
*/
|
|
260
260
|
redirect_url?: string | null;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The URL of the page where the checkout is being initiated from.
|
|
264
|
+
*/
|
|
265
|
+
source_url?: string | null;
|
|
261
266
|
}
|
|
262
267
|
|
|
263
268
|
export namespace CreateCheckoutSessionInputModePaymentWithPlan {
|
|
@@ -601,6 +606,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
601
606
|
* The URL to redirect the user to after the checkout configuration is created
|
|
602
607
|
*/
|
|
603
608
|
redirect_url?: string | null;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* The URL of the page where the checkout is being initiated from.
|
|
612
|
+
*/
|
|
613
|
+
source_url?: string | null;
|
|
604
614
|
}
|
|
605
615
|
|
|
606
616
|
export namespace CreateCheckoutSessionInputModePaymentWithPlanID {
|
|
@@ -663,6 +673,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
663
673
|
* The URL to redirect the user to after the checkout configuration is created
|
|
664
674
|
*/
|
|
665
675
|
redirect_url?: string | null;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* The URL of the page where the checkout is being initiated from.
|
|
679
|
+
*/
|
|
680
|
+
source_url?: string | null;
|
|
666
681
|
}
|
|
667
682
|
|
|
668
683
|
export namespace CreateCheckoutSessionInputModeSetup {
|