@whop/sdk 0.0.23 → 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 +83 -0
- package/README.md +2 -2
- package/client.d.mts +15 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -6
- 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/app-builds.d.mts +7 -18
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +7 -18
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +1 -1
- package/resources/app-builds.mjs +1 -1
- package/resources/apps.d.mts +20 -18
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +20 -18
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +20 -17
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +20 -17
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +23 -34
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +23 -34
- package/resources/companies.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/course-lessons.d.mts +19 -84
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +19 -84
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/courses.d.mts +8 -42
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +8 -42
- package/resources/courses.d.ts.map +1 -1
- package/resources/disputes.d.mts +16 -68
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +16 -68
- package/resources/disputes.d.ts.map +1 -1
- 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/experiences.d.mts +19 -17
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +19 -17
- package/resources/experiences.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +6 -32
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +6 -32
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +6 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -3
- 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/ledger-accounts.d.mts +0 -4
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +0 -4
- package/resources/ledger-accounts.d.ts.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 +23 -33
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +23 -33
- 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/notifications.d.mts +4 -0
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +4 -0
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +4 -0
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +4 -0
- package/resources/notifications.mjs.map +1 -1
- package/resources/payments.d.mts +10 -2
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +10 -2
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +26 -0
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +26 -0
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/plans.d.mts +8 -34
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +8 -34
- package/resources/plans.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 +15 -10
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +15 -10
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +12 -19
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +12 -19
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +81 -2
- package/src/resources/ai-chats.ts +346 -0
- package/src/resources/app-builds.ts +7 -21
- package/src/resources/apps.ts +27 -18
- package/src/resources/checkout-configurations.ts +24 -18
- package/src/resources/companies.ts +25 -42
- package/src/resources/company-token-transactions.ts +535 -0
- package/src/resources/course-lessons.ts +19 -104
- package/src/resources/courses.ts +8 -52
- package/src/resources/disputes.ts +16 -84
- package/src/resources/dm-members.ts +310 -0
- package/src/resources/experiences.ts +21 -21
- package/src/resources/forum-posts.ts +6 -38
- package/src/resources/index.ts +36 -1
- package/src/resources/ledger-accounts.ts +0 -18
- package/src/resources/members.ts +10 -0
- package/src/resources/memberships.ts +38 -0
- package/src/resources/messages.ts +27 -37
- package/src/resources/notifications.ts +4 -0
- package/src/resources/payments.ts +85 -57
- package/src/resources/payout-methods.ts +32 -0
- package/src/resources/plans.ts +8 -36
- 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 +18 -10
- package/src/resources/withdrawals.ts +13 -21
- 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
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class CompanyTokenTransactions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a token transaction (add/subtract/transfer) for a member
|
|
8
|
+
*
|
|
9
|
+
* Required permissions:
|
|
10
|
+
*
|
|
11
|
+
* - `company_token_transaction:create`
|
|
12
|
+
* - `member:basic:read`
|
|
13
|
+
* - `company:basic:read`
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const companyTokenTransaction =
|
|
18
|
+
* await client.companyTokenTransactions.create({
|
|
19
|
+
* amount: 6.9,
|
|
20
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
21
|
+
* destination_user_id: 'destination_user_id',
|
|
22
|
+
* transaction_type: 'transfer',
|
|
23
|
+
* user_id: 'user_xxxxxxxxxxxxx',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
create(body: CompanyTokenTransactionCreateParams, options?: RequestOptions): APIPromise<CompanyTokenTransactionCreateResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves a token transaction by ID
|
|
30
|
+
*
|
|
31
|
+
* Required permissions:
|
|
32
|
+
*
|
|
33
|
+
* - `company_token_transaction:read`
|
|
34
|
+
* - `member:basic:read`
|
|
35
|
+
* - `company:basic:read`
|
|
36
|
+
*/
|
|
37
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<CompanyTokenTransactionRetrieveResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Lists token transactions for a company
|
|
40
|
+
*
|
|
41
|
+
* Required permissions:
|
|
42
|
+
*
|
|
43
|
+
* - `company_token_transaction:read`
|
|
44
|
+
* - `member:basic:read`
|
|
45
|
+
* - `company:basic:read`
|
|
46
|
+
*/
|
|
47
|
+
list(query: CompanyTokenTransactionListParams, options?: RequestOptions): PagePromise<CompanyTokenTransactionListResponsesCursorPage, CompanyTokenTransactionListResponse>;
|
|
48
|
+
}
|
|
49
|
+
export type CompanyTokenTransactionListResponsesCursorPage = CursorPage<CompanyTokenTransactionListResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* A token transaction within a company
|
|
52
|
+
*/
|
|
53
|
+
export interface CompanyTokenTransactionCreateResponse {
|
|
54
|
+
/**
|
|
55
|
+
* The ID of the transaction
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* The transaction amount (always positive)
|
|
60
|
+
*/
|
|
61
|
+
amount: number;
|
|
62
|
+
/**
|
|
63
|
+
* The company
|
|
64
|
+
*/
|
|
65
|
+
company: CompanyTokenTransactionCreateResponse.Company;
|
|
66
|
+
/**
|
|
67
|
+
* When the transaction was created
|
|
68
|
+
*/
|
|
69
|
+
created_at: string;
|
|
70
|
+
/**
|
|
71
|
+
* Optional description
|
|
72
|
+
*/
|
|
73
|
+
description: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Optional idempotency key to prevent duplicate transactions
|
|
76
|
+
*/
|
|
77
|
+
idempotency_key: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* For transfers, the ID of the linked transaction
|
|
80
|
+
*/
|
|
81
|
+
linked_transaction_id: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* The member
|
|
84
|
+
*/
|
|
85
|
+
member: CompanyTokenTransactionCreateResponse.Member;
|
|
86
|
+
/**
|
|
87
|
+
* The type of transaction
|
|
88
|
+
*/
|
|
89
|
+
transaction_type: 'add' | 'subtract' | 'transfer';
|
|
90
|
+
/**
|
|
91
|
+
* The user whose balance changed
|
|
92
|
+
*/
|
|
93
|
+
user: CompanyTokenTransactionCreateResponse.User;
|
|
94
|
+
}
|
|
95
|
+
export declare namespace CompanyTokenTransactionCreateResponse {
|
|
96
|
+
/**
|
|
97
|
+
* The company
|
|
98
|
+
*/
|
|
99
|
+
interface Company {
|
|
100
|
+
/**
|
|
101
|
+
* The ID of the company
|
|
102
|
+
*/
|
|
103
|
+
id: string;
|
|
104
|
+
/**
|
|
105
|
+
* The slug/route of the company on the Whop site.
|
|
106
|
+
*/
|
|
107
|
+
route: string;
|
|
108
|
+
/**
|
|
109
|
+
* The written name of the company.
|
|
110
|
+
*/
|
|
111
|
+
title: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The member
|
|
115
|
+
*/
|
|
116
|
+
interface Member {
|
|
117
|
+
/**
|
|
118
|
+
* The ID of the member
|
|
119
|
+
*/
|
|
120
|
+
id: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The user whose balance changed
|
|
124
|
+
*/
|
|
125
|
+
interface User {
|
|
126
|
+
/**
|
|
127
|
+
* The internal ID of the user.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
/**
|
|
131
|
+
* The name of the user from their Whop account.
|
|
132
|
+
*/
|
|
133
|
+
name: string | null;
|
|
134
|
+
/**
|
|
135
|
+
* The username of the user from their Whop account.
|
|
136
|
+
*/
|
|
137
|
+
username: string;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* A token transaction within a company
|
|
142
|
+
*/
|
|
143
|
+
export interface CompanyTokenTransactionRetrieveResponse {
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the transaction
|
|
146
|
+
*/
|
|
147
|
+
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* The transaction amount (always positive)
|
|
150
|
+
*/
|
|
151
|
+
amount: number;
|
|
152
|
+
/**
|
|
153
|
+
* The company
|
|
154
|
+
*/
|
|
155
|
+
company: CompanyTokenTransactionRetrieveResponse.Company;
|
|
156
|
+
/**
|
|
157
|
+
* When the transaction was created
|
|
158
|
+
*/
|
|
159
|
+
created_at: string;
|
|
160
|
+
/**
|
|
161
|
+
* Optional description
|
|
162
|
+
*/
|
|
163
|
+
description: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* Optional idempotency key to prevent duplicate transactions
|
|
166
|
+
*/
|
|
167
|
+
idempotency_key: string | null;
|
|
168
|
+
/**
|
|
169
|
+
* For transfers, the ID of the linked transaction
|
|
170
|
+
*/
|
|
171
|
+
linked_transaction_id: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* The member
|
|
174
|
+
*/
|
|
175
|
+
member: CompanyTokenTransactionRetrieveResponse.Member;
|
|
176
|
+
/**
|
|
177
|
+
* The type of transaction
|
|
178
|
+
*/
|
|
179
|
+
transaction_type: 'add' | 'subtract' | 'transfer';
|
|
180
|
+
/**
|
|
181
|
+
* The user whose balance changed
|
|
182
|
+
*/
|
|
183
|
+
user: CompanyTokenTransactionRetrieveResponse.User;
|
|
184
|
+
}
|
|
185
|
+
export declare namespace CompanyTokenTransactionRetrieveResponse {
|
|
186
|
+
/**
|
|
187
|
+
* The company
|
|
188
|
+
*/
|
|
189
|
+
interface Company {
|
|
190
|
+
/**
|
|
191
|
+
* The ID of the company
|
|
192
|
+
*/
|
|
193
|
+
id: string;
|
|
194
|
+
/**
|
|
195
|
+
* The slug/route of the company on the Whop site.
|
|
196
|
+
*/
|
|
197
|
+
route: string;
|
|
198
|
+
/**
|
|
199
|
+
* The written name of the company.
|
|
200
|
+
*/
|
|
201
|
+
title: string;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The member
|
|
205
|
+
*/
|
|
206
|
+
interface Member {
|
|
207
|
+
/**
|
|
208
|
+
* The ID of the member
|
|
209
|
+
*/
|
|
210
|
+
id: string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The user whose balance changed
|
|
214
|
+
*/
|
|
215
|
+
interface User {
|
|
216
|
+
/**
|
|
217
|
+
* The internal ID of the user.
|
|
218
|
+
*/
|
|
219
|
+
id: string;
|
|
220
|
+
/**
|
|
221
|
+
* The name of the user from their Whop account.
|
|
222
|
+
*/
|
|
223
|
+
name: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* The username of the user from their Whop account.
|
|
226
|
+
*/
|
|
227
|
+
username: string;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* A token transaction within a company
|
|
232
|
+
*/
|
|
233
|
+
export interface CompanyTokenTransactionListResponse {
|
|
234
|
+
/**
|
|
235
|
+
* The ID of the transaction
|
|
236
|
+
*/
|
|
237
|
+
id: string;
|
|
238
|
+
/**
|
|
239
|
+
* The transaction amount (always positive)
|
|
240
|
+
*/
|
|
241
|
+
amount: number;
|
|
242
|
+
/**
|
|
243
|
+
* The company
|
|
244
|
+
*/
|
|
245
|
+
company: CompanyTokenTransactionListResponse.Company;
|
|
246
|
+
/**
|
|
247
|
+
* When the transaction was created
|
|
248
|
+
*/
|
|
249
|
+
created_at: string;
|
|
250
|
+
/**
|
|
251
|
+
* Optional description
|
|
252
|
+
*/
|
|
253
|
+
description: string | null;
|
|
254
|
+
/**
|
|
255
|
+
* Optional idempotency key to prevent duplicate transactions
|
|
256
|
+
*/
|
|
257
|
+
idempotency_key: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* For transfers, the ID of the linked transaction
|
|
260
|
+
*/
|
|
261
|
+
linked_transaction_id: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* The member
|
|
264
|
+
*/
|
|
265
|
+
member: CompanyTokenTransactionListResponse.Member;
|
|
266
|
+
/**
|
|
267
|
+
* The type of transaction
|
|
268
|
+
*/
|
|
269
|
+
transaction_type: 'add' | 'subtract' | 'transfer';
|
|
270
|
+
/**
|
|
271
|
+
* The user whose balance changed
|
|
272
|
+
*/
|
|
273
|
+
user: CompanyTokenTransactionListResponse.User;
|
|
274
|
+
}
|
|
275
|
+
export declare namespace CompanyTokenTransactionListResponse {
|
|
276
|
+
/**
|
|
277
|
+
* The company
|
|
278
|
+
*/
|
|
279
|
+
interface Company {
|
|
280
|
+
/**
|
|
281
|
+
* The ID of the company
|
|
282
|
+
*/
|
|
283
|
+
id: string;
|
|
284
|
+
/**
|
|
285
|
+
* The slug/route of the company on the Whop site.
|
|
286
|
+
*/
|
|
287
|
+
route: string;
|
|
288
|
+
/**
|
|
289
|
+
* The written name of the company.
|
|
290
|
+
*/
|
|
291
|
+
title: string;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The member
|
|
295
|
+
*/
|
|
296
|
+
interface Member {
|
|
297
|
+
/**
|
|
298
|
+
* The ID of the member
|
|
299
|
+
*/
|
|
300
|
+
id: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* The user whose balance changed
|
|
304
|
+
*/
|
|
305
|
+
interface User {
|
|
306
|
+
/**
|
|
307
|
+
* The internal ID of the user.
|
|
308
|
+
*/
|
|
309
|
+
id: string;
|
|
310
|
+
/**
|
|
311
|
+
* The name of the user from their Whop account.
|
|
312
|
+
*/
|
|
313
|
+
name: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* The username of the user from their Whop account.
|
|
316
|
+
*/
|
|
317
|
+
username: string;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
export type CompanyTokenTransactionCreateParams = CompanyTokenTransactionCreateParams.CreateCompanyTokenTransactionInputTransactionTypeTransfer | CompanyTokenTransactionCreateParams.CreateCompanyTokenTransactionInputTransactionTypeAdd | CompanyTokenTransactionCreateParams.CreateCompanyTokenTransactionInputTransactionTypeSubtract;
|
|
321
|
+
export declare namespace CompanyTokenTransactionCreateParams {
|
|
322
|
+
interface CreateCompanyTokenTransactionInputTransactionTypeTransfer {
|
|
323
|
+
/**
|
|
324
|
+
* The positive amount of tokens
|
|
325
|
+
*/
|
|
326
|
+
amount: number;
|
|
327
|
+
/**
|
|
328
|
+
* The company ID
|
|
329
|
+
*/
|
|
330
|
+
company_id: string;
|
|
331
|
+
/**
|
|
332
|
+
* Required for transfers - the user to receive tokens
|
|
333
|
+
*/
|
|
334
|
+
destination_user_id: string;
|
|
335
|
+
transaction_type: 'transfer';
|
|
336
|
+
/**
|
|
337
|
+
* The user ID whose balance will change
|
|
338
|
+
*/
|
|
339
|
+
user_id: string;
|
|
340
|
+
/**
|
|
341
|
+
* Optional description for the transaction
|
|
342
|
+
*/
|
|
343
|
+
description?: string | null;
|
|
344
|
+
/**
|
|
345
|
+
* Optional key to prevent duplicate transactions
|
|
346
|
+
*/
|
|
347
|
+
idempotency_key?: string | null;
|
|
348
|
+
}
|
|
349
|
+
interface CreateCompanyTokenTransactionInputTransactionTypeAdd {
|
|
350
|
+
/**
|
|
351
|
+
* The positive amount of tokens
|
|
352
|
+
*/
|
|
353
|
+
amount: number;
|
|
354
|
+
/**
|
|
355
|
+
* The company ID
|
|
356
|
+
*/
|
|
357
|
+
company_id: string;
|
|
358
|
+
transaction_type: 'add';
|
|
359
|
+
/**
|
|
360
|
+
* The user ID whose balance will change
|
|
361
|
+
*/
|
|
362
|
+
user_id: string;
|
|
363
|
+
/**
|
|
364
|
+
* Optional description for the transaction
|
|
365
|
+
*/
|
|
366
|
+
description?: string | null;
|
|
367
|
+
/**
|
|
368
|
+
* Optional key to prevent duplicate transactions
|
|
369
|
+
*/
|
|
370
|
+
idempotency_key?: string | null;
|
|
371
|
+
}
|
|
372
|
+
interface CreateCompanyTokenTransactionInputTransactionTypeSubtract {
|
|
373
|
+
/**
|
|
374
|
+
* The positive amount of tokens
|
|
375
|
+
*/
|
|
376
|
+
amount: number;
|
|
377
|
+
/**
|
|
378
|
+
* The company ID
|
|
379
|
+
*/
|
|
380
|
+
company_id: string;
|
|
381
|
+
transaction_type: 'subtract';
|
|
382
|
+
/**
|
|
383
|
+
* The user ID whose balance will change
|
|
384
|
+
*/
|
|
385
|
+
user_id: string;
|
|
386
|
+
/**
|
|
387
|
+
* Optional description for the transaction
|
|
388
|
+
*/
|
|
389
|
+
description?: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* Optional key to prevent duplicate transactions
|
|
392
|
+
*/
|
|
393
|
+
idempotency_key?: string | null;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
export interface CompanyTokenTransactionListParams extends CursorPageParams {
|
|
397
|
+
/**
|
|
398
|
+
* The ID of the company
|
|
399
|
+
*/
|
|
400
|
+
company_id: string;
|
|
401
|
+
/**
|
|
402
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
403
|
+
*/
|
|
404
|
+
before?: string | null;
|
|
405
|
+
/**
|
|
406
|
+
* Returns the first _n_ elements from the list.
|
|
407
|
+
*/
|
|
408
|
+
first?: number | null;
|
|
409
|
+
/**
|
|
410
|
+
* Returns the last _n_ elements from the list.
|
|
411
|
+
*/
|
|
412
|
+
last?: number | null;
|
|
413
|
+
/**
|
|
414
|
+
* The type of token transaction
|
|
415
|
+
*/
|
|
416
|
+
transaction_type?: 'add' | 'subtract' | 'transfer' | null;
|
|
417
|
+
/**
|
|
418
|
+
* Filter by user ID
|
|
419
|
+
*/
|
|
420
|
+
user_id?: string | null;
|
|
421
|
+
}
|
|
422
|
+
export declare namespace CompanyTokenTransactions {
|
|
423
|
+
export { type CompanyTokenTransactionCreateResponse as CompanyTokenTransactionCreateResponse, type CompanyTokenTransactionRetrieveResponse as CompanyTokenTransactionRetrieveResponse, type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse, type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage, type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams, type CompanyTokenTransactionListParams as CompanyTokenTransactionListParams, };
|
|
424
|
+
}
|
|
425
|
+
//# sourceMappingURL=company-token-transactions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"company-token-transactions.d.mts","sourceRoot":"","sources":["../src/resources/company-token-transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,wBAAyB,SAAQ,WAAW;IACvD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,IAAI,EAAE,mCAAmC,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;IAIpD;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uCAAuC,CAAC;IAInG;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CA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