@anuma/sdk 1.0.0
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/LICENSE +21 -0
- package/README.md +98 -0
- package/dist/expo/chunk-LJYAMK62.mjs +25 -0
- package/dist/expo/chunk-MJJIYFAX.mjs +25 -0
- package/dist/expo/chunk-PJCZO4BQ.mjs +25 -0
- package/dist/expo/clientConfig-2MI4KULF.mjs +10 -0
- package/dist/expo/clientConfig-QDAXFL3W.mjs +10 -0
- package/dist/expo/clientConfig-R4IOW7I2.mjs +10 -0
- package/dist/expo/index.cjs +7858 -0
- package/dist/expo/index.d.mts +2590 -0
- package/dist/expo/index.d.ts +2590 -0
- package/dist/expo/index.mjs +7770 -0
- package/dist/index.cjs +1200 -0
- package/dist/index.d.mts +2796 -0
- package/dist/index.d.ts +2796 -0
- package/dist/index.mjs +1138 -0
- package/dist/next/index.cjs +64 -0
- package/dist/next/index.d.mts +23 -0
- package/dist/next/index.d.ts +23 -0
- package/dist/next/index.mjs +39 -0
- package/dist/polyfills/index.cjs +61 -0
- package/dist/polyfills/index.d.mts +9 -0
- package/dist/polyfills/index.d.ts +9 -0
- package/dist/polyfills/index.mjs +34 -0
- package/dist/react/chunk-LJYAMK62.mjs +25 -0
- package/dist/react/chunk-MJJIYFAX.mjs +25 -0
- package/dist/react/chunk-PJCZO4BQ.mjs +25 -0
- package/dist/react/clientConfig-2MI4KULF.mjs +10 -0
- package/dist/react/clientConfig-QDAXFL3W.mjs +10 -0
- package/dist/react/clientConfig-R4IOW7I2.mjs +10 -0
- package/dist/react/index.cjs +15178 -0
- package/dist/react/index.d.mts +6014 -0
- package/dist/react/index.d.ts +6014 -0
- package/dist/react/index.mjs +14945 -0
- package/dist/tools/chunk-KDFGY4SK.mjs +13 -0
- package/dist/tools/clientConfig-RMDOT5YM.mjs +10 -0
- package/dist/tools/index.cjs +775 -0
- package/dist/tools/index.d.mts +121 -0
- package/dist/tools/index.d.ts +121 -0
- package/dist/tools/index.mjs +741 -0
- package/dist/vercel/index.cjs +86 -0
- package/dist/vercel/index.d.mts +149 -0
- package/dist/vercel/index.d.ts +149 -0
- package/dist/vercel/index.mjs +57 -0
- package/package.json +149 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2796 @@
|
|
|
1
|
+
type ClientOptions$1 = {
|
|
2
|
+
baseUrl: `${string}://${string}` | (string & {});
|
|
3
|
+
};
|
|
4
|
+
type HandlersApiKeyResponse = {
|
|
5
|
+
app_id?: number;
|
|
6
|
+
created_at?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Indicates if key is set, but doesn't expose it
|
|
9
|
+
*/
|
|
10
|
+
has_key?: boolean;
|
|
11
|
+
id?: number;
|
|
12
|
+
is_active?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
updated_at?: string;
|
|
15
|
+
wallet_address?: string;
|
|
16
|
+
wallet_details?: HandlersWalletDetails;
|
|
17
|
+
};
|
|
18
|
+
type HandlersApiKeyWithKeyResponse = {
|
|
19
|
+
/**
|
|
20
|
+
* Only included in create response
|
|
21
|
+
*/
|
|
22
|
+
api_key?: string;
|
|
23
|
+
app_id?: number;
|
|
24
|
+
created_at?: string;
|
|
25
|
+
id?: number;
|
|
26
|
+
is_active?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
updated_at?: string;
|
|
29
|
+
wallet_address?: string;
|
|
30
|
+
};
|
|
31
|
+
type HandlersAddCreditsRequest = {
|
|
32
|
+
/**
|
|
33
|
+
* Number of credits to add (1 credit = 1 cent)
|
|
34
|
+
*/
|
|
35
|
+
credits?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Escrow contract address to use
|
|
38
|
+
*/
|
|
39
|
+
escrow_contract?: string;
|
|
40
|
+
user_address?: string;
|
|
41
|
+
};
|
|
42
|
+
type HandlersAddCreditsResponse = {
|
|
43
|
+
credits_added?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Escrow contract used for the operation
|
|
46
|
+
*/
|
|
47
|
+
escrow_contract?: string;
|
|
48
|
+
message?: string;
|
|
49
|
+
success?: boolean;
|
|
50
|
+
user_address?: string;
|
|
51
|
+
};
|
|
52
|
+
type HandlersAppConfig = {
|
|
53
|
+
/**
|
|
54
|
+
* EscrowContract is the escrow contract address for this app
|
|
55
|
+
*/
|
|
56
|
+
escrow_contract?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Name is the human-readable name of the app
|
|
59
|
+
*/
|
|
60
|
+
name?: string;
|
|
61
|
+
};
|
|
62
|
+
type HandlersAppResponse = {
|
|
63
|
+
created_at?: string;
|
|
64
|
+
credit_reset_enabled?: boolean;
|
|
65
|
+
escrow_contract?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Indicates if key is set, but doesn't expose it
|
|
68
|
+
*/
|
|
69
|
+
has_privy_verification_key?: boolean;
|
|
70
|
+
id?: number;
|
|
71
|
+
is_active?: boolean;
|
|
72
|
+
name?: string;
|
|
73
|
+
privy_app_id?: string;
|
|
74
|
+
updated_at?: string;
|
|
75
|
+
};
|
|
76
|
+
type HandlersCancelSubscriptionResponse = {
|
|
77
|
+
cancel_at?: number;
|
|
78
|
+
current_period_end?: number;
|
|
79
|
+
message?: string;
|
|
80
|
+
};
|
|
81
|
+
type HandlersCheckoutSessionResponse = {
|
|
82
|
+
url?: string;
|
|
83
|
+
};
|
|
84
|
+
type HandlersClaimDailyCreditsResponse = {
|
|
85
|
+
/**
|
|
86
|
+
* Credits awarded (1 credit = $0.01)
|
|
87
|
+
*/
|
|
88
|
+
credits_awarded?: number;
|
|
89
|
+
message?: string;
|
|
90
|
+
/**
|
|
91
|
+
* ISO8601 timestamp when next claim is available
|
|
92
|
+
*/
|
|
93
|
+
next_claim_at?: string;
|
|
94
|
+
success?: boolean;
|
|
95
|
+
};
|
|
96
|
+
type HandlersConfigResponse = {
|
|
97
|
+
/**
|
|
98
|
+
* Apps is the list of active apps with their escrow contracts
|
|
99
|
+
*/
|
|
100
|
+
apps?: Array<HandlersAppConfig>;
|
|
101
|
+
/**
|
|
102
|
+
* ChainID is the blockchain chain ID
|
|
103
|
+
*/
|
|
104
|
+
chain_id?: string;
|
|
105
|
+
/**
|
|
106
|
+
* OperatorAddress is the operator wallet address
|
|
107
|
+
*/
|
|
108
|
+
operator_address?: string;
|
|
109
|
+
/**
|
|
110
|
+
* SettlementRecipient is the address that receives settlement payments
|
|
111
|
+
*/
|
|
112
|
+
settlement_recipient?: string;
|
|
113
|
+
};
|
|
114
|
+
type HandlersCreateApiKeyRequest = {
|
|
115
|
+
is_active?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* If true, generates anuma_test_ prefix; otherwise anuma_live_
|
|
118
|
+
*/
|
|
119
|
+
is_test?: boolean;
|
|
120
|
+
name?: string;
|
|
121
|
+
wallet_address?: string;
|
|
122
|
+
};
|
|
123
|
+
type HandlersCreateAppRequest = {
|
|
124
|
+
credit_reset_enabled?: boolean;
|
|
125
|
+
escrow_contract?: string;
|
|
126
|
+
is_active?: boolean;
|
|
127
|
+
name?: string;
|
|
128
|
+
privy_app_id?: string;
|
|
129
|
+
privy_verification_key?: string;
|
|
130
|
+
};
|
|
131
|
+
type HandlersCreateCheckoutSessionRequest = {
|
|
132
|
+
cancel_url?: string;
|
|
133
|
+
success_url?: string;
|
|
134
|
+
};
|
|
135
|
+
type HandlersCreateCreditPackCheckoutRequest = {
|
|
136
|
+
cancel_url?: string;
|
|
137
|
+
credits?: number;
|
|
138
|
+
success_url?: string;
|
|
139
|
+
};
|
|
140
|
+
type HandlersCreateCustomerPortalRequest = {
|
|
141
|
+
return_url?: string;
|
|
142
|
+
};
|
|
143
|
+
type HandlersCreditBalanceResponse = {
|
|
144
|
+
/**
|
|
145
|
+
* Available credits (1 credit = $0.01)
|
|
146
|
+
*/
|
|
147
|
+
available_credits?: number;
|
|
148
|
+
can_claim_daily?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Whether enrolled on-chain
|
|
151
|
+
*/
|
|
152
|
+
is_enrolled?: boolean;
|
|
153
|
+
last_claim_at?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Total credits ever received (1 credit = $0.01)
|
|
156
|
+
*/
|
|
157
|
+
lifetime_credits?: number;
|
|
158
|
+
next_claim_at?: string;
|
|
159
|
+
/**
|
|
160
|
+
* "basic" or "pro"
|
|
161
|
+
*/
|
|
162
|
+
subscription_tier?: string;
|
|
163
|
+
wallet_address?: string;
|
|
164
|
+
};
|
|
165
|
+
type HandlersCreditPack = {
|
|
166
|
+
bonus_percent?: number;
|
|
167
|
+
credits?: number;
|
|
168
|
+
currency?: string;
|
|
169
|
+
pro_credits?: number;
|
|
170
|
+
unit_amount?: number;
|
|
171
|
+
};
|
|
172
|
+
type HandlersCreditPacksResponse = {
|
|
173
|
+
packs?: Array<HandlersCreditPack>;
|
|
174
|
+
};
|
|
175
|
+
type HandlersCustomerPortalResponse = {
|
|
176
|
+
url?: string;
|
|
177
|
+
};
|
|
178
|
+
type HandlersExchangeRequest = {
|
|
179
|
+
code: string;
|
|
180
|
+
/**
|
|
181
|
+
* Optional - uses config default if not provided
|
|
182
|
+
*/
|
|
183
|
+
redirect_uri?: string;
|
|
184
|
+
};
|
|
185
|
+
type HandlersGeneratedApiKey = {
|
|
186
|
+
/**
|
|
187
|
+
* Full HMAC key (anuma_live_<key_id>.<secret> or anuma_test_<key_id>.<secret>)
|
|
188
|
+
*/
|
|
189
|
+
api_key?: string;
|
|
190
|
+
name?: string;
|
|
191
|
+
};
|
|
192
|
+
type HandlersGetToolsResponse = {
|
|
193
|
+
checksum?: string;
|
|
194
|
+
tools?: {
|
|
195
|
+
[key: string]: HandlersTool;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
type HandlersHealthResponse = {
|
|
199
|
+
/**
|
|
200
|
+
* Status indicates the service health status
|
|
201
|
+
*/
|
|
202
|
+
status?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Timestamp is the Unix timestamp of the response
|
|
205
|
+
*/
|
|
206
|
+
timestamp?: number;
|
|
207
|
+
/**
|
|
208
|
+
* Version is the current API version
|
|
209
|
+
*/
|
|
210
|
+
version?: string;
|
|
211
|
+
};
|
|
212
|
+
type HandlersListApiKeysResponse = {
|
|
213
|
+
api_keys?: Array<HandlersApiKeyResponse>;
|
|
214
|
+
};
|
|
215
|
+
type HandlersListAppsResponse = {
|
|
216
|
+
apps?: Array<HandlersAppResponse>;
|
|
217
|
+
};
|
|
218
|
+
type HandlersRefreshRequest = {
|
|
219
|
+
refresh_token: string;
|
|
220
|
+
};
|
|
221
|
+
type HandlersRenewSubscriptionResponse = {
|
|
222
|
+
current_period_end?: number;
|
|
223
|
+
message?: string;
|
|
224
|
+
};
|
|
225
|
+
type HandlersRevokeRequest = {
|
|
226
|
+
token: string;
|
|
227
|
+
};
|
|
228
|
+
type HandlersSeedApiKeyInput = {
|
|
229
|
+
is_active?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* If true, generates anuma_test_ prefix; otherwise anuma_live_
|
|
232
|
+
*/
|
|
233
|
+
is_test?: boolean;
|
|
234
|
+
name?: string;
|
|
235
|
+
wallet_address?: string;
|
|
236
|
+
};
|
|
237
|
+
type HandlersSeedAppInput = {
|
|
238
|
+
api_keys?: Array<HandlersSeedApiKeyInput>;
|
|
239
|
+
credit_reset_enabled?: boolean;
|
|
240
|
+
escrow_contract?: string;
|
|
241
|
+
is_active?: boolean;
|
|
242
|
+
name?: string;
|
|
243
|
+
privy_app_id?: string;
|
|
244
|
+
privy_verification_key?: string;
|
|
245
|
+
};
|
|
246
|
+
type HandlersSeedAppsRequest = {
|
|
247
|
+
apps?: Array<HandlersSeedAppInput>;
|
|
248
|
+
};
|
|
249
|
+
type HandlersSeedAppsResponse = {
|
|
250
|
+
apps_seeded?: number;
|
|
251
|
+
/**
|
|
252
|
+
* Map of app name to generated keys
|
|
253
|
+
*/
|
|
254
|
+
generated_keys?: {
|
|
255
|
+
[key: string]: Array<HandlersGeneratedApiKey>;
|
|
256
|
+
};
|
|
257
|
+
keys_seeded?: number;
|
|
258
|
+
message?: string;
|
|
259
|
+
success?: boolean;
|
|
260
|
+
};
|
|
261
|
+
type HandlersSetSubscriptionTierRequest = {
|
|
262
|
+
/**
|
|
263
|
+
* "basic" or "pro"
|
|
264
|
+
*/
|
|
265
|
+
tier?: string;
|
|
266
|
+
user_address?: string;
|
|
267
|
+
};
|
|
268
|
+
type HandlersSetSubscriptionTierResponse = {
|
|
269
|
+
message?: string;
|
|
270
|
+
success?: boolean;
|
|
271
|
+
tier?: string;
|
|
272
|
+
user_address?: string;
|
|
273
|
+
};
|
|
274
|
+
type HandlersSubscriptionStatusResponse = {
|
|
275
|
+
/**
|
|
276
|
+
* true if scheduled to cancel
|
|
277
|
+
*/
|
|
278
|
+
cancel_at_period_end?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Unix timestamp, only present if subscribed
|
|
281
|
+
*/
|
|
282
|
+
current_period_end?: number;
|
|
283
|
+
/**
|
|
284
|
+
* "free" | "pro"
|
|
285
|
+
*/
|
|
286
|
+
plan?: string;
|
|
287
|
+
/**
|
|
288
|
+
* "none" | "active" | "canceling" | "past_due" | "canceled"
|
|
289
|
+
*/
|
|
290
|
+
status?: string;
|
|
291
|
+
};
|
|
292
|
+
type HandlersSyncSnagResponse = {
|
|
293
|
+
credits_awarded?: number;
|
|
294
|
+
message?: string;
|
|
295
|
+
next_sync_at?: string;
|
|
296
|
+
success?: boolean;
|
|
297
|
+
total_converted?: number;
|
|
298
|
+
};
|
|
299
|
+
type HandlersTaskResponse = {
|
|
300
|
+
/**
|
|
301
|
+
* 1 credit = $0.01
|
|
302
|
+
*/
|
|
303
|
+
amount_credits?: number;
|
|
304
|
+
/**
|
|
305
|
+
* null for one-time tasks
|
|
306
|
+
*/
|
|
307
|
+
cooldown_secs?: number;
|
|
308
|
+
description?: string;
|
|
309
|
+
type?: string;
|
|
310
|
+
};
|
|
311
|
+
type HandlersTokenResponse = {
|
|
312
|
+
access_token?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Seconds until expiration
|
|
315
|
+
*/
|
|
316
|
+
expires_in?: number;
|
|
317
|
+
/**
|
|
318
|
+
* May not be present on refresh
|
|
319
|
+
*/
|
|
320
|
+
refresh_token?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Granted scopes
|
|
323
|
+
*/
|
|
324
|
+
scope?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Usually "Bearer"
|
|
327
|
+
*/
|
|
328
|
+
token_type?: string;
|
|
329
|
+
};
|
|
330
|
+
type HandlersTool = {
|
|
331
|
+
cost?: number;
|
|
332
|
+
embedding?: Array<number>;
|
|
333
|
+
name?: string;
|
|
334
|
+
schema?: McpToolSchema;
|
|
335
|
+
};
|
|
336
|
+
type HandlersUpdateApiKeyRequest = {
|
|
337
|
+
app_id?: number;
|
|
338
|
+
is_active?: boolean;
|
|
339
|
+
name?: string;
|
|
340
|
+
wallet_address?: string;
|
|
341
|
+
};
|
|
342
|
+
type HandlersUpdateAppRequest = {
|
|
343
|
+
credit_reset_enabled?: boolean;
|
|
344
|
+
escrow_contract?: string;
|
|
345
|
+
is_active?: boolean;
|
|
346
|
+
name?: string;
|
|
347
|
+
privy_app_id?: string;
|
|
348
|
+
privy_verification_key?: string;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Wallet account details
|
|
352
|
+
*/
|
|
353
|
+
type HandlersWalletDetails = {
|
|
354
|
+
/**
|
|
355
|
+
* When account was first created
|
|
356
|
+
*/
|
|
357
|
+
account_created_at?: string;
|
|
358
|
+
account_id?: number;
|
|
359
|
+
/**
|
|
360
|
+
* When balance was last synced from chain
|
|
361
|
+
*/
|
|
362
|
+
balance_updated_at?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Balance in micro-dollars (USD * 1,000,000)
|
|
365
|
+
*/
|
|
366
|
+
cached_balance_usd?: number;
|
|
367
|
+
/**
|
|
368
|
+
* App ID for enrollment (0 if not enrolled)
|
|
369
|
+
*/
|
|
370
|
+
enrolled_app_id?: number;
|
|
371
|
+
/**
|
|
372
|
+
* Whether enrolled in cost-limit model
|
|
373
|
+
*/
|
|
374
|
+
is_enrolled?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* In-flight request holds in micro-dollars
|
|
377
|
+
*/
|
|
378
|
+
pending_cost_usd?: number;
|
|
379
|
+
/**
|
|
380
|
+
* When user became Pro subscriber
|
|
381
|
+
*/
|
|
382
|
+
pro_activated_at?: string;
|
|
383
|
+
/**
|
|
384
|
+
* "basic" or "pro"
|
|
385
|
+
*/
|
|
386
|
+
subscription_tier?: string;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* ExtraFields contains additional metadata
|
|
390
|
+
*/
|
|
391
|
+
type LlmapiChatCompletionExtraFields = {
|
|
392
|
+
/**
|
|
393
|
+
* Latency is the request latency in milliseconds
|
|
394
|
+
*/
|
|
395
|
+
latency?: number;
|
|
396
|
+
/**
|
|
397
|
+
* ModelRequested is the model that was requested
|
|
398
|
+
*/
|
|
399
|
+
model_requested?: string;
|
|
400
|
+
/**
|
|
401
|
+
* Provider is the LLM provider used (e.g., "openai", "anthropic")
|
|
402
|
+
*/
|
|
403
|
+
provider?: string;
|
|
404
|
+
/**
|
|
405
|
+
* RequestType is always "chat_completion"
|
|
406
|
+
*/
|
|
407
|
+
request_type?: string;
|
|
408
|
+
};
|
|
409
|
+
type LlmapiChatCompletionRequest = {
|
|
410
|
+
/**
|
|
411
|
+
* Messages is the conversation history
|
|
412
|
+
*/
|
|
413
|
+
messages: Array<LlmapiMessage>;
|
|
414
|
+
/**
|
|
415
|
+
* Model is the model identifier
|
|
416
|
+
*/
|
|
417
|
+
model: string;
|
|
418
|
+
/**
|
|
419
|
+
* Stream indicates if response should be streamed
|
|
420
|
+
*/
|
|
421
|
+
stream?: boolean;
|
|
422
|
+
tool_choice?: LlmapiChatCompletionToolChoice;
|
|
423
|
+
/**
|
|
424
|
+
* Tools is an array of tool schemas describing which tools the model can use
|
|
425
|
+
*/
|
|
426
|
+
tools?: Array<LlmapiChatCompletionTool>;
|
|
427
|
+
};
|
|
428
|
+
type LlmapiChatCompletionResponse = {
|
|
429
|
+
/**
|
|
430
|
+
* Choices contains the completion choices
|
|
431
|
+
*/
|
|
432
|
+
choices?: Array<LlmapiChoice>;
|
|
433
|
+
extra_fields?: LlmapiChatCompletionExtraFields;
|
|
434
|
+
/**
|
|
435
|
+
* ID is the completion ID
|
|
436
|
+
*/
|
|
437
|
+
id?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Messages contains the full conversation history when local tools need execution.
|
|
440
|
+
* This is populated when the model requests tools that are not MCP tools (local/client-side tools).
|
|
441
|
+
* The client should execute these tools and send a new request with this message history
|
|
442
|
+
* plus the tool results appended.
|
|
443
|
+
*/
|
|
444
|
+
messages?: Array<LlmapiMessage>;
|
|
445
|
+
/**
|
|
446
|
+
* Model is the model used
|
|
447
|
+
*/
|
|
448
|
+
model?: string;
|
|
449
|
+
/**
|
|
450
|
+
* ToolCallEvents is an array of tool call events.
|
|
451
|
+
*/
|
|
452
|
+
tool_call_events?: Array<LlmapiToolCallEvent>;
|
|
453
|
+
/**
|
|
454
|
+
* ToolsChecksum is the checksum of the tool schemas used by the AI Portal.
|
|
455
|
+
*/
|
|
456
|
+
tools_checksum?: string;
|
|
457
|
+
usage?: LlmapiChatCompletionUsage;
|
|
458
|
+
};
|
|
459
|
+
type LlmapiChatCompletionTool = {
|
|
460
|
+
[key: string]: unknown;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* ToolChoice controls tool usage
|
|
464
|
+
*/
|
|
465
|
+
type LlmapiChatCompletionToolChoice = {
|
|
466
|
+
[key: string]: unknown;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Usage contains token usage information
|
|
470
|
+
*/
|
|
471
|
+
type LlmapiChatCompletionUsage = {
|
|
472
|
+
/**
|
|
473
|
+
* CompletionTokens is the number of tokens in the completion
|
|
474
|
+
*/
|
|
475
|
+
completion_tokens?: number;
|
|
476
|
+
/**
|
|
477
|
+
* CostMicroUSD is the cost of this completion in micro-dollars (USD × 1,000,000)
|
|
478
|
+
*/
|
|
479
|
+
cost_micro_usd?: number;
|
|
480
|
+
/**
|
|
481
|
+
* CreditsUsed is the number of credits consumed by this completion (ceiling of cost / MicroUSDPerCredit)
|
|
482
|
+
*/
|
|
483
|
+
credits_used?: number;
|
|
484
|
+
/**
|
|
485
|
+
* PromptTokens is the number of tokens in the prompt
|
|
486
|
+
*/
|
|
487
|
+
prompt_tokens?: number;
|
|
488
|
+
/**
|
|
489
|
+
* TotalTokens is the total number of tokens used
|
|
490
|
+
*/
|
|
491
|
+
total_tokens?: number;
|
|
492
|
+
};
|
|
493
|
+
type LlmapiChoice = {
|
|
494
|
+
/**
|
|
495
|
+
* FinishReason indicates why the completion stopped
|
|
496
|
+
*/
|
|
497
|
+
finish_reason?: string;
|
|
498
|
+
/**
|
|
499
|
+
* Index is the choice index
|
|
500
|
+
*/
|
|
501
|
+
index?: number;
|
|
502
|
+
message?: LlmapiMessage;
|
|
503
|
+
};
|
|
504
|
+
type LlmapiEmbeddingData = {
|
|
505
|
+
/**
|
|
506
|
+
* Embedding vector
|
|
507
|
+
*/
|
|
508
|
+
embedding?: Array<number>;
|
|
509
|
+
/**
|
|
510
|
+
* Index of the embedding
|
|
511
|
+
*/
|
|
512
|
+
index?: number;
|
|
513
|
+
/**
|
|
514
|
+
* Object type identifier
|
|
515
|
+
*/
|
|
516
|
+
object?: string;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* ExtraFields contains additional metadata
|
|
520
|
+
*/
|
|
521
|
+
type LlmapiEmbeddingExtraFields = {
|
|
522
|
+
/**
|
|
523
|
+
* ChunkIndex is the chunk index (0 for single requests)
|
|
524
|
+
*/
|
|
525
|
+
chunk_index?: number;
|
|
526
|
+
/**
|
|
527
|
+
* Latency is the request latency in milliseconds
|
|
528
|
+
*/
|
|
529
|
+
latency?: number;
|
|
530
|
+
/**
|
|
531
|
+
* ModelRequested is the model that was requested
|
|
532
|
+
*/
|
|
533
|
+
model_requested?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Provider is the LLM provider used (e.g., "openai", "anthropic")
|
|
536
|
+
*/
|
|
537
|
+
provider?: string;
|
|
538
|
+
/**
|
|
539
|
+
* RequestType is always "embedding"
|
|
540
|
+
*/
|
|
541
|
+
request_type?: string;
|
|
542
|
+
};
|
|
543
|
+
type LlmapiEmbeddingRequest = {
|
|
544
|
+
/**
|
|
545
|
+
* Dimensions is the number of dimensions the resulting output embeddings should have (optional)
|
|
546
|
+
*/
|
|
547
|
+
dimensions?: number;
|
|
548
|
+
/**
|
|
549
|
+
* EncodingFormat is the format to return the embeddings in (optional: "float" or "base64")
|
|
550
|
+
*/
|
|
551
|
+
encoding_format?: string;
|
|
552
|
+
/**
|
|
553
|
+
* Input text or tokens to embed (can be string, []string, []int, or [][]int)
|
|
554
|
+
*/
|
|
555
|
+
input: unknown;
|
|
556
|
+
/**
|
|
557
|
+
* Model identifier in 'provider/model' format
|
|
558
|
+
*/
|
|
559
|
+
model: string;
|
|
560
|
+
};
|
|
561
|
+
type LlmapiEmbeddingResponse = {
|
|
562
|
+
/**
|
|
563
|
+
* Data contains the embeddings
|
|
564
|
+
*/
|
|
565
|
+
data?: Array<LlmapiEmbeddingData>;
|
|
566
|
+
extra_fields?: LlmapiEmbeddingExtraFields;
|
|
567
|
+
/**
|
|
568
|
+
* Model is the model used
|
|
569
|
+
*/
|
|
570
|
+
model?: string;
|
|
571
|
+
/**
|
|
572
|
+
* Object is always "list"
|
|
573
|
+
*/
|
|
574
|
+
object?: string;
|
|
575
|
+
usage?: LlmapiEmbeddingUsage;
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* Usage contains token usage information
|
|
579
|
+
*/
|
|
580
|
+
type LlmapiEmbeddingUsage = {
|
|
581
|
+
/**
|
|
582
|
+
* CostMicroUSD is the inference cost for this embedding request
|
|
583
|
+
*/
|
|
584
|
+
cost_micro_usd?: number;
|
|
585
|
+
/**
|
|
586
|
+
* CreditsUsed is the number of credits consumed by this embedding request
|
|
587
|
+
*/
|
|
588
|
+
credits_used?: number;
|
|
589
|
+
/**
|
|
590
|
+
* PromptTokens is the number of tokens in the prompt
|
|
591
|
+
*/
|
|
592
|
+
prompt_tokens?: number;
|
|
593
|
+
/**
|
|
594
|
+
* TotalTokens is the total number of tokens used
|
|
595
|
+
*/
|
|
596
|
+
total_tokens?: number;
|
|
597
|
+
};
|
|
598
|
+
type LlmapiMcpTool = {
|
|
599
|
+
/**
|
|
600
|
+
* Description is the description of the tool
|
|
601
|
+
*/
|
|
602
|
+
description?: string;
|
|
603
|
+
/**
|
|
604
|
+
* InputSchema is the JSON schema describing the tool's input
|
|
605
|
+
*/
|
|
606
|
+
input_schema?: unknown;
|
|
607
|
+
/**
|
|
608
|
+
* Name is the name of the tool
|
|
609
|
+
*/
|
|
610
|
+
name?: string;
|
|
611
|
+
};
|
|
612
|
+
/**
|
|
613
|
+
* Message is the generated message
|
|
614
|
+
*/
|
|
615
|
+
type LlmapiMessage = {
|
|
616
|
+
/**
|
|
617
|
+
* Content is the message content
|
|
618
|
+
*/
|
|
619
|
+
content?: Array<LlmapiMessageContentPart>;
|
|
620
|
+
role?: LlmapiRole;
|
|
621
|
+
/**
|
|
622
|
+
* ToolCallID is the ID of the tool call this message is responding to (only for tool role)
|
|
623
|
+
*/
|
|
624
|
+
tool_call_id?: string;
|
|
625
|
+
/**
|
|
626
|
+
* ToolCalls contains tool/function calls made by the assistant (only for assistant role)
|
|
627
|
+
*/
|
|
628
|
+
tool_calls?: Array<LlmapiToolCall>;
|
|
629
|
+
/**
|
|
630
|
+
* Type is the message type (for Responses API: "message")
|
|
631
|
+
*/
|
|
632
|
+
type?: string;
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* File is used when Type=input_file (for Responses API)
|
|
636
|
+
*/
|
|
637
|
+
type LlmapiMessageContentFile = {
|
|
638
|
+
/**
|
|
639
|
+
* FileData is the base64-encoded file content
|
|
640
|
+
*/
|
|
641
|
+
file_data?: string;
|
|
642
|
+
/**
|
|
643
|
+
* FileID is the ID of an uploaded file
|
|
644
|
+
*/
|
|
645
|
+
file_id?: string;
|
|
646
|
+
/**
|
|
647
|
+
* FileURL is the URL to the file
|
|
648
|
+
*/
|
|
649
|
+
file_url?: string;
|
|
650
|
+
/**
|
|
651
|
+
* Filename is the name of the file
|
|
652
|
+
*/
|
|
653
|
+
filename?: string;
|
|
654
|
+
};
|
|
655
|
+
/**
|
|
656
|
+
* ImageURL is used when Type=image_url or Type=input_image
|
|
657
|
+
*/
|
|
658
|
+
type LlmapiMessageContentImage = {
|
|
659
|
+
/**
|
|
660
|
+
* Detail is the OpenAI detail hint (auto|low|high)
|
|
661
|
+
*/
|
|
662
|
+
detail?: string;
|
|
663
|
+
/**
|
|
664
|
+
* URL is the image URL or data URI
|
|
665
|
+
*/
|
|
666
|
+
url?: string;
|
|
667
|
+
};
|
|
668
|
+
type LlmapiMessageContentPart = {
|
|
669
|
+
file?: LlmapiMessageContentFile;
|
|
670
|
+
image_url?: LlmapiMessageContentImage;
|
|
671
|
+
/**
|
|
672
|
+
* Text holds the text content when Type=text or Type=input_text
|
|
673
|
+
*/
|
|
674
|
+
text?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Type is the block type (`text`, `image_url`, or `input_file`)
|
|
677
|
+
*/
|
|
678
|
+
type?: string;
|
|
679
|
+
};
|
|
680
|
+
type LlmapiModel = {
|
|
681
|
+
architecture?: LlmapiModelArchitecture;
|
|
682
|
+
/**
|
|
683
|
+
* CanonicalSlug is the canonical slug for the model
|
|
684
|
+
*/
|
|
685
|
+
canonical_slug?: string;
|
|
686
|
+
/**
|
|
687
|
+
* ContextLength is the maximum context length in tokens
|
|
688
|
+
*/
|
|
689
|
+
context_length?: number;
|
|
690
|
+
/**
|
|
691
|
+
* Created is the Unix timestamp of when the model was created
|
|
692
|
+
*/
|
|
693
|
+
created?: number;
|
|
694
|
+
/**
|
|
695
|
+
* DefaultParameters contains default parameter values
|
|
696
|
+
*/
|
|
697
|
+
default_parameters?: {
|
|
698
|
+
[key: string]: unknown;
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* Description describes the model and its capabilities
|
|
702
|
+
*/
|
|
703
|
+
description?: string;
|
|
704
|
+
/**
|
|
705
|
+
* HuggingFaceID is the Hugging Face model identifier
|
|
706
|
+
*/
|
|
707
|
+
hugging_face_id?: string;
|
|
708
|
+
/**
|
|
709
|
+
* ID is the model identifier (e.g., "openai/gpt-4")
|
|
710
|
+
*/
|
|
711
|
+
id?: string;
|
|
712
|
+
/**
|
|
713
|
+
* MaxInputTokens is the maximum input tokens
|
|
714
|
+
*/
|
|
715
|
+
max_input_tokens?: number;
|
|
716
|
+
/**
|
|
717
|
+
* MaxOutputTokens is the maximum output tokens
|
|
718
|
+
*/
|
|
719
|
+
max_output_tokens?: number;
|
|
720
|
+
/**
|
|
721
|
+
* Modalities is a list of supported modalities (e.g., ["llm", "vision"])
|
|
722
|
+
*/
|
|
723
|
+
modalities?: Array<string>;
|
|
724
|
+
/**
|
|
725
|
+
* Name is the human-readable model name (optional)
|
|
726
|
+
*/
|
|
727
|
+
name?: string;
|
|
728
|
+
/**
|
|
729
|
+
* OwnedBy is the organization that owns the model
|
|
730
|
+
*/
|
|
731
|
+
owned_by?: string;
|
|
732
|
+
per_request_limits?: LlmapiModelPerRequestLimits;
|
|
733
|
+
pricing?: LlmapiModelPricing;
|
|
734
|
+
/**
|
|
735
|
+
* SupportedMethods is a list of supported API methods
|
|
736
|
+
*/
|
|
737
|
+
supported_methods?: Array<string>;
|
|
738
|
+
/**
|
|
739
|
+
* SupportedParameters is a list of supported parameter names
|
|
740
|
+
*/
|
|
741
|
+
supported_parameters?: Array<string>;
|
|
742
|
+
top_provider?: LlmapiModelTopProvider;
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* Architecture describes the model's technical capabilities
|
|
746
|
+
*/
|
|
747
|
+
type LlmapiModelArchitecture = {
|
|
748
|
+
instruct_type?: string;
|
|
749
|
+
modality?: string;
|
|
750
|
+
prompt_formatting?: string;
|
|
751
|
+
tokenizer?: string;
|
|
752
|
+
};
|
|
753
|
+
/**
|
|
754
|
+
* PerRequestLimits contains rate limiting information
|
|
755
|
+
*/
|
|
756
|
+
type LlmapiModelPerRequestLimits = {
|
|
757
|
+
completion_tokens?: number;
|
|
758
|
+
prompt_tokens?: number;
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Pricing contains the pricing structure for using this model
|
|
762
|
+
*/
|
|
763
|
+
type LlmapiModelPricing = {
|
|
764
|
+
completion?: string;
|
|
765
|
+
image?: string;
|
|
766
|
+
prompt?: string;
|
|
767
|
+
request?: string;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* TopProvider contains configuration details for the primary provider
|
|
771
|
+
*/
|
|
772
|
+
type LlmapiModelTopProvider = {
|
|
773
|
+
context_length?: number;
|
|
774
|
+
is_moderated?: boolean;
|
|
775
|
+
max_completion_tokens?: number;
|
|
776
|
+
};
|
|
777
|
+
/**
|
|
778
|
+
* ExtraFields contains additional metadata
|
|
779
|
+
*/
|
|
780
|
+
type LlmapiModelsListExtraFields = {
|
|
781
|
+
/**
|
|
782
|
+
* ChunkIndex is the chunk index (0 for single requests)
|
|
783
|
+
*/
|
|
784
|
+
chunk_index?: number;
|
|
785
|
+
/**
|
|
786
|
+
* Latency is the request latency in milliseconds
|
|
787
|
+
*/
|
|
788
|
+
latency?: number;
|
|
789
|
+
/**
|
|
790
|
+
* RequestType is always "list_models"
|
|
791
|
+
*/
|
|
792
|
+
request_type?: string;
|
|
793
|
+
};
|
|
794
|
+
type LlmapiModelsListResponse = {
|
|
795
|
+
/**
|
|
796
|
+
* Data contains the list of available models
|
|
797
|
+
*/
|
|
798
|
+
data?: Array<LlmapiModel>;
|
|
799
|
+
extra_fields?: LlmapiModelsListExtraFields;
|
|
800
|
+
/**
|
|
801
|
+
* NextPageToken is the token to retrieve the next page of results (omitted if no more pages)
|
|
802
|
+
*/
|
|
803
|
+
next_page_token?: string;
|
|
804
|
+
};
|
|
805
|
+
/**
|
|
806
|
+
* ExtraFields contains additional metadata
|
|
807
|
+
*/
|
|
808
|
+
type LlmapiResponseExtraFields = {
|
|
809
|
+
/**
|
|
810
|
+
* Latency is the request latency in milliseconds
|
|
811
|
+
*/
|
|
812
|
+
latency?: number;
|
|
813
|
+
/**
|
|
814
|
+
* ModelRequested is the model that was requested
|
|
815
|
+
*/
|
|
816
|
+
model_requested?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Provider is the LLM provider used (e.g., "openai", "anthropic")
|
|
819
|
+
*/
|
|
820
|
+
provider?: string;
|
|
821
|
+
/**
|
|
822
|
+
* RequestType is always "responses"
|
|
823
|
+
*/
|
|
824
|
+
request_type?: string;
|
|
825
|
+
};
|
|
826
|
+
/**
|
|
827
|
+
* Input can be a simple text string or an array of messages for multi-turn conversations.
|
|
828
|
+
* When continuing after client tool calls, pass the messages array from the previous response.
|
|
829
|
+
*/
|
|
830
|
+
type LlmapiResponseInput = {
|
|
831
|
+
/**
|
|
832
|
+
* Messages is set when input is an array of messages (for multi-turn/tool continuations)
|
|
833
|
+
*/
|
|
834
|
+
messages?: Array<LlmapiMessage>;
|
|
835
|
+
/**
|
|
836
|
+
* Text is set when input is a simple string
|
|
837
|
+
*/
|
|
838
|
+
text?: string;
|
|
839
|
+
};
|
|
840
|
+
type LlmapiResponseOutputContent = {
|
|
841
|
+
/**
|
|
842
|
+
* Text is the text content
|
|
843
|
+
*/
|
|
844
|
+
text?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Type is the content type (e.g., "output_text")
|
|
847
|
+
*/
|
|
848
|
+
type?: string;
|
|
849
|
+
};
|
|
850
|
+
type LlmapiResponseOutputItem = {
|
|
851
|
+
/**
|
|
852
|
+
* Arguments is the function arguments for function_call and mcp_call types
|
|
853
|
+
*/
|
|
854
|
+
arguments?: string;
|
|
855
|
+
/**
|
|
856
|
+
* CallID is the call ID for function_call and mcp_call types
|
|
857
|
+
*/
|
|
858
|
+
call_id?: string;
|
|
859
|
+
/**
|
|
860
|
+
* Content is the content array for message and reasoning types
|
|
861
|
+
*/
|
|
862
|
+
content?: Array<LlmapiResponseOutputContent>;
|
|
863
|
+
/**
|
|
864
|
+
* Error is the MCP error message for mcp_call types
|
|
865
|
+
*/
|
|
866
|
+
error?: string;
|
|
867
|
+
/**
|
|
868
|
+
* ID is the unique identifier for this output item
|
|
869
|
+
*/
|
|
870
|
+
id?: string;
|
|
871
|
+
/**
|
|
872
|
+
* Name is the function name for function_call and mcp_call types
|
|
873
|
+
*/
|
|
874
|
+
name?: string;
|
|
875
|
+
/**
|
|
876
|
+
* Output is the MCP tool output for mcp_call types
|
|
877
|
+
*/
|
|
878
|
+
output?: string;
|
|
879
|
+
/**
|
|
880
|
+
* Role is the role for message types (e.g., "assistant")
|
|
881
|
+
*/
|
|
882
|
+
role?: string;
|
|
883
|
+
/**
|
|
884
|
+
* ServerLabel is the MCP server label for mcp_call and mcp_list_tools types
|
|
885
|
+
*/
|
|
886
|
+
server_label?: string;
|
|
887
|
+
/**
|
|
888
|
+
* Status is the status of this output item (e.g., "completed")
|
|
889
|
+
*/
|
|
890
|
+
status?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Summary is the reasoning summary for reasoning types
|
|
893
|
+
*/
|
|
894
|
+
summary?: Array<LlmapiResponseOutputContent>;
|
|
895
|
+
/**
|
|
896
|
+
* Tools is the list of available tools for mcp_list_tools types
|
|
897
|
+
*/
|
|
898
|
+
tools?: Array<LlmapiMcpTool>;
|
|
899
|
+
/**
|
|
900
|
+
* Type is the output item type (e.g., "message", "function_call", "reasoning", "mcp_call")
|
|
901
|
+
*/
|
|
902
|
+
type?: string;
|
|
903
|
+
};
|
|
904
|
+
/**
|
|
905
|
+
* Reasoning configures reasoning for o-series and other reasoning models
|
|
906
|
+
*/
|
|
907
|
+
type LlmapiResponseReasoning = {
|
|
908
|
+
/**
|
|
909
|
+
* Effort controls reasoning effort: "low", "medium", or "high"
|
|
910
|
+
*/
|
|
911
|
+
effort?: string;
|
|
912
|
+
/**
|
|
913
|
+
* Summary controls reasoning summary: "auto", "concise", or "detailed"
|
|
914
|
+
*/
|
|
915
|
+
summary?: string;
|
|
916
|
+
};
|
|
917
|
+
type LlmapiResponseRequest = {
|
|
918
|
+
/**
|
|
919
|
+
* Background indicates if request should be processed in background
|
|
920
|
+
*/
|
|
921
|
+
background?: boolean;
|
|
922
|
+
input: LlmapiResponseInput;
|
|
923
|
+
/**
|
|
924
|
+
* MaxOutputTokens is the maximum number of tokens to generate
|
|
925
|
+
*/
|
|
926
|
+
max_output_tokens?: number;
|
|
927
|
+
/**
|
|
928
|
+
* Model is the model identifier in 'provider/model' format
|
|
929
|
+
*/
|
|
930
|
+
model: string;
|
|
931
|
+
reasoning?: LlmapiResponseReasoning;
|
|
932
|
+
/**
|
|
933
|
+
* Stream indicates if response should be streamed
|
|
934
|
+
*/
|
|
935
|
+
stream?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Temperature controls randomness (0.0 to 2.0)
|
|
938
|
+
*/
|
|
939
|
+
temperature?: number;
|
|
940
|
+
thinking?: LlmapiThinkingOptions;
|
|
941
|
+
tool_choice?: LlmapiResponseToolChoice;
|
|
942
|
+
/**
|
|
943
|
+
* Tools is an array of tool schemas describing which tools the model can use
|
|
944
|
+
*/
|
|
945
|
+
tools?: Array<LlmapiResponseTool>;
|
|
946
|
+
};
|
|
947
|
+
type LlmapiResponseResponse = {
|
|
948
|
+
/**
|
|
949
|
+
* Created is the Unix timestamp of creation (created_at in OpenAI format)
|
|
950
|
+
*/
|
|
951
|
+
created_at?: number;
|
|
952
|
+
extra_fields?: LlmapiResponseExtraFields;
|
|
953
|
+
/**
|
|
954
|
+
* ID is the unique response identifier
|
|
955
|
+
*/
|
|
956
|
+
id?: string;
|
|
957
|
+
/**
|
|
958
|
+
* Messages contains the full conversation history when local tools need execution.
|
|
959
|
+
* This is populated when the model requests tools that are not MCP tools (local/client-side tools).
|
|
960
|
+
* The client should execute these tools and send a new request with this message history
|
|
961
|
+
* plus the tool results appended.
|
|
962
|
+
*/
|
|
963
|
+
messages?: Array<LlmapiMessage>;
|
|
964
|
+
/**
|
|
965
|
+
* Model is the model used for generation
|
|
966
|
+
*/
|
|
967
|
+
model?: string;
|
|
968
|
+
/**
|
|
969
|
+
* Object is the response type (e.g., "response")
|
|
970
|
+
*/
|
|
971
|
+
object?: string;
|
|
972
|
+
/**
|
|
973
|
+
* Output is the array of output items (OpenAI Responses API format)
|
|
974
|
+
*/
|
|
975
|
+
output?: Array<LlmapiResponseOutputItem>;
|
|
976
|
+
/**
|
|
977
|
+
* ToolCallEvents is an array of tool call events.
|
|
978
|
+
*/
|
|
979
|
+
tool_call_events?: Array<LlmapiToolCallEvent>;
|
|
980
|
+
/**
|
|
981
|
+
* ToolsChecksum is the checksum of the tool schemas used by the AI Portal.
|
|
982
|
+
*/
|
|
983
|
+
tools_checksum?: string;
|
|
984
|
+
usage?: LlmapiResponseUsage;
|
|
985
|
+
};
|
|
986
|
+
type LlmapiResponseTool = {
|
|
987
|
+
[key: string]: unknown;
|
|
988
|
+
};
|
|
989
|
+
/**
|
|
990
|
+
* ToolChoice controls tool usage
|
|
991
|
+
*/
|
|
992
|
+
type LlmapiResponseToolChoice = {
|
|
993
|
+
[key: string]: unknown;
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* Usage contains token usage information
|
|
997
|
+
*/
|
|
998
|
+
type LlmapiResponseUsage = {
|
|
999
|
+
/**
|
|
1000
|
+
* CompletionTokens is the number of tokens in the completion
|
|
1001
|
+
*/
|
|
1002
|
+
completion_tokens?: number;
|
|
1003
|
+
/**
|
|
1004
|
+
* CostMicroUSD is the cost of this response in micro-dollars (USD × 1,000,000)
|
|
1005
|
+
*/
|
|
1006
|
+
cost_micro_usd?: number;
|
|
1007
|
+
/**
|
|
1008
|
+
* CreditsUsed is the number of credits consumed by this response
|
|
1009
|
+
*/
|
|
1010
|
+
credits_used?: number;
|
|
1011
|
+
/**
|
|
1012
|
+
* PromptTokens is the number of tokens in the prompt
|
|
1013
|
+
*/
|
|
1014
|
+
prompt_tokens?: number;
|
|
1015
|
+
/**
|
|
1016
|
+
* TotalTokens is the total number of tokens used
|
|
1017
|
+
*/
|
|
1018
|
+
total_tokens?: number;
|
|
1019
|
+
};
|
|
1020
|
+
/**
|
|
1021
|
+
* Role is the message role (system, user, assistant, tool)
|
|
1022
|
+
*/
|
|
1023
|
+
type LlmapiRole = string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Thinking configures extended thinking for Anthropic models
|
|
1026
|
+
*/
|
|
1027
|
+
type LlmapiThinkingOptions = {
|
|
1028
|
+
/**
|
|
1029
|
+
* BudgetTokens is the token budget for thinking
|
|
1030
|
+
*/
|
|
1031
|
+
budget_tokens?: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* Type indicates if thinking is enabled: "enabled" or "disabled"
|
|
1034
|
+
*/
|
|
1035
|
+
type?: string;
|
|
1036
|
+
};
|
|
1037
|
+
type LlmapiToolCall = {
|
|
1038
|
+
function?: LlmapiToolCallFunction;
|
|
1039
|
+
/**
|
|
1040
|
+
* ID is the unique identifier for this tool call
|
|
1041
|
+
*/
|
|
1042
|
+
id?: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Type is the type of tool call (always "function" for now)
|
|
1045
|
+
*/
|
|
1046
|
+
type?: string;
|
|
1047
|
+
};
|
|
1048
|
+
type LlmapiToolCallEvent = {
|
|
1049
|
+
arguments?: string;
|
|
1050
|
+
id?: string;
|
|
1051
|
+
name?: string;
|
|
1052
|
+
output?: string;
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* Function contains the function call details
|
|
1056
|
+
*/
|
|
1057
|
+
type LlmapiToolCallFunction = {
|
|
1058
|
+
/**
|
|
1059
|
+
* Arguments is the JSON string of arguments to pass to the function
|
|
1060
|
+
*/
|
|
1061
|
+
arguments?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Name is the name of the function to call
|
|
1064
|
+
*/
|
|
1065
|
+
name?: string;
|
|
1066
|
+
};
|
|
1067
|
+
type McpToolSchema = {
|
|
1068
|
+
description?: string;
|
|
1069
|
+
name?: string;
|
|
1070
|
+
parameters?: unknown;
|
|
1071
|
+
};
|
|
1072
|
+
type ResponseErrorResponse = {
|
|
1073
|
+
code?: string;
|
|
1074
|
+
error?: string;
|
|
1075
|
+
request_id?: string;
|
|
1076
|
+
trace_id?: string;
|
|
1077
|
+
type?: string;
|
|
1078
|
+
};
|
|
1079
|
+
type PostApiV1AdminAddCreditsData = {
|
|
1080
|
+
/**
|
|
1081
|
+
* Add credits request
|
|
1082
|
+
*/
|
|
1083
|
+
body: HandlersAddCreditsRequest;
|
|
1084
|
+
headers: {
|
|
1085
|
+
/**
|
|
1086
|
+
* Admin API key
|
|
1087
|
+
*/
|
|
1088
|
+
'X-Admin-API-Key': string;
|
|
1089
|
+
};
|
|
1090
|
+
path?: never;
|
|
1091
|
+
query?: never;
|
|
1092
|
+
url: '/api/v1/admin/add-credits';
|
|
1093
|
+
};
|
|
1094
|
+
type PostApiV1AdminAddCreditsErrors = {
|
|
1095
|
+
/**
|
|
1096
|
+
* Bad Request
|
|
1097
|
+
*/
|
|
1098
|
+
400: ResponseErrorResponse;
|
|
1099
|
+
/**
|
|
1100
|
+
* Unauthorized
|
|
1101
|
+
*/
|
|
1102
|
+
401: ResponseErrorResponse;
|
|
1103
|
+
/**
|
|
1104
|
+
* Not Found
|
|
1105
|
+
*/
|
|
1106
|
+
404: ResponseErrorResponse;
|
|
1107
|
+
/**
|
|
1108
|
+
* Internal Server Error
|
|
1109
|
+
*/
|
|
1110
|
+
500: ResponseErrorResponse;
|
|
1111
|
+
};
|
|
1112
|
+
type PostApiV1AdminAddCreditsError = PostApiV1AdminAddCreditsErrors[keyof PostApiV1AdminAddCreditsErrors];
|
|
1113
|
+
type PostApiV1AdminAddCreditsResponses = {
|
|
1114
|
+
/**
|
|
1115
|
+
* OK
|
|
1116
|
+
*/
|
|
1117
|
+
200: HandlersAddCreditsResponse;
|
|
1118
|
+
};
|
|
1119
|
+
type PostApiV1AdminAddCreditsResponse = PostApiV1AdminAddCreditsResponses[keyof PostApiV1AdminAddCreditsResponses];
|
|
1120
|
+
type GetApiV1AdminAppsData = {
|
|
1121
|
+
body?: never;
|
|
1122
|
+
headers: {
|
|
1123
|
+
/**
|
|
1124
|
+
* Admin API key
|
|
1125
|
+
*/
|
|
1126
|
+
'X-Admin-API-Key': string;
|
|
1127
|
+
};
|
|
1128
|
+
path?: never;
|
|
1129
|
+
query?: never;
|
|
1130
|
+
url: '/api/v1/admin/apps';
|
|
1131
|
+
};
|
|
1132
|
+
type GetApiV1AdminAppsErrors = {
|
|
1133
|
+
/**
|
|
1134
|
+
* Unauthorized
|
|
1135
|
+
*/
|
|
1136
|
+
401: ResponseErrorResponse;
|
|
1137
|
+
/**
|
|
1138
|
+
* Internal Server Error
|
|
1139
|
+
*/
|
|
1140
|
+
500: ResponseErrorResponse;
|
|
1141
|
+
};
|
|
1142
|
+
type GetApiV1AdminAppsError = GetApiV1AdminAppsErrors[keyof GetApiV1AdminAppsErrors];
|
|
1143
|
+
type GetApiV1AdminAppsResponses = {
|
|
1144
|
+
/**
|
|
1145
|
+
* OK
|
|
1146
|
+
*/
|
|
1147
|
+
200: HandlersListAppsResponse;
|
|
1148
|
+
};
|
|
1149
|
+
type GetApiV1AdminAppsResponse = GetApiV1AdminAppsResponses[keyof GetApiV1AdminAppsResponses];
|
|
1150
|
+
type PostApiV1AdminAppsData = {
|
|
1151
|
+
/**
|
|
1152
|
+
* Create app request
|
|
1153
|
+
*/
|
|
1154
|
+
body: HandlersCreateAppRequest;
|
|
1155
|
+
headers: {
|
|
1156
|
+
/**
|
|
1157
|
+
* Admin API key
|
|
1158
|
+
*/
|
|
1159
|
+
'X-Admin-API-Key': string;
|
|
1160
|
+
};
|
|
1161
|
+
path?: never;
|
|
1162
|
+
query?: never;
|
|
1163
|
+
url: '/api/v1/admin/apps';
|
|
1164
|
+
};
|
|
1165
|
+
type PostApiV1AdminAppsErrors = {
|
|
1166
|
+
/**
|
|
1167
|
+
* Bad Request
|
|
1168
|
+
*/
|
|
1169
|
+
400: ResponseErrorResponse;
|
|
1170
|
+
/**
|
|
1171
|
+
* Unauthorized
|
|
1172
|
+
*/
|
|
1173
|
+
401: ResponseErrorResponse;
|
|
1174
|
+
/**
|
|
1175
|
+
* Internal Server Error
|
|
1176
|
+
*/
|
|
1177
|
+
500: ResponseErrorResponse;
|
|
1178
|
+
};
|
|
1179
|
+
type PostApiV1AdminAppsError = PostApiV1AdminAppsErrors[keyof PostApiV1AdminAppsErrors];
|
|
1180
|
+
type PostApiV1AdminAppsResponses = {
|
|
1181
|
+
/**
|
|
1182
|
+
* Created
|
|
1183
|
+
*/
|
|
1184
|
+
201: HandlersAppResponse;
|
|
1185
|
+
};
|
|
1186
|
+
type PostApiV1AdminAppsResponse = PostApiV1AdminAppsResponses[keyof PostApiV1AdminAppsResponses];
|
|
1187
|
+
type GetApiV1AdminAppsByAppIdApiKeysData = {
|
|
1188
|
+
body?: never;
|
|
1189
|
+
headers: {
|
|
1190
|
+
/**
|
|
1191
|
+
* Admin API key
|
|
1192
|
+
*/
|
|
1193
|
+
'X-Admin-API-Key': string;
|
|
1194
|
+
};
|
|
1195
|
+
path: {
|
|
1196
|
+
/**
|
|
1197
|
+
* App ID
|
|
1198
|
+
*/
|
|
1199
|
+
app_id: number;
|
|
1200
|
+
};
|
|
1201
|
+
query?: never;
|
|
1202
|
+
url: '/api/v1/admin/apps/{app_id}/api-keys';
|
|
1203
|
+
};
|
|
1204
|
+
type GetApiV1AdminAppsByAppIdApiKeysErrors = {
|
|
1205
|
+
/**
|
|
1206
|
+
* Unauthorized
|
|
1207
|
+
*/
|
|
1208
|
+
401: ResponseErrorResponse;
|
|
1209
|
+
/**
|
|
1210
|
+
* Not Found
|
|
1211
|
+
*/
|
|
1212
|
+
404: ResponseErrorResponse;
|
|
1213
|
+
/**
|
|
1214
|
+
* Internal Server Error
|
|
1215
|
+
*/
|
|
1216
|
+
500: ResponseErrorResponse;
|
|
1217
|
+
};
|
|
1218
|
+
type GetApiV1AdminAppsByAppIdApiKeysError = GetApiV1AdminAppsByAppIdApiKeysErrors[keyof GetApiV1AdminAppsByAppIdApiKeysErrors];
|
|
1219
|
+
type GetApiV1AdminAppsByAppIdApiKeysResponses = {
|
|
1220
|
+
/**
|
|
1221
|
+
* OK
|
|
1222
|
+
*/
|
|
1223
|
+
200: HandlersListApiKeysResponse;
|
|
1224
|
+
};
|
|
1225
|
+
type GetApiV1AdminAppsByAppIdApiKeysResponse = GetApiV1AdminAppsByAppIdApiKeysResponses[keyof GetApiV1AdminAppsByAppIdApiKeysResponses];
|
|
1226
|
+
type PostApiV1AdminAppsByAppIdApiKeysData = {
|
|
1227
|
+
/**
|
|
1228
|
+
* Create API key request
|
|
1229
|
+
*/
|
|
1230
|
+
body: HandlersCreateApiKeyRequest;
|
|
1231
|
+
headers: {
|
|
1232
|
+
/**
|
|
1233
|
+
* Admin API key
|
|
1234
|
+
*/
|
|
1235
|
+
'X-Admin-API-Key': string;
|
|
1236
|
+
};
|
|
1237
|
+
path: {
|
|
1238
|
+
/**
|
|
1239
|
+
* App ID
|
|
1240
|
+
*/
|
|
1241
|
+
app_id: number;
|
|
1242
|
+
};
|
|
1243
|
+
query?: never;
|
|
1244
|
+
url: '/api/v1/admin/apps/{app_id}/api-keys';
|
|
1245
|
+
};
|
|
1246
|
+
type PostApiV1AdminAppsByAppIdApiKeysErrors = {
|
|
1247
|
+
/**
|
|
1248
|
+
* Bad Request
|
|
1249
|
+
*/
|
|
1250
|
+
400: ResponseErrorResponse;
|
|
1251
|
+
/**
|
|
1252
|
+
* Unauthorized
|
|
1253
|
+
*/
|
|
1254
|
+
401: ResponseErrorResponse;
|
|
1255
|
+
/**
|
|
1256
|
+
* Not Found
|
|
1257
|
+
*/
|
|
1258
|
+
404: ResponseErrorResponse;
|
|
1259
|
+
/**
|
|
1260
|
+
* Internal Server Error
|
|
1261
|
+
*/
|
|
1262
|
+
500: ResponseErrorResponse;
|
|
1263
|
+
};
|
|
1264
|
+
type PostApiV1AdminAppsByAppIdApiKeysError = PostApiV1AdminAppsByAppIdApiKeysErrors[keyof PostApiV1AdminAppsByAppIdApiKeysErrors];
|
|
1265
|
+
type PostApiV1AdminAppsByAppIdApiKeysResponses = {
|
|
1266
|
+
/**
|
|
1267
|
+
* Created
|
|
1268
|
+
*/
|
|
1269
|
+
201: HandlersApiKeyWithKeyResponse;
|
|
1270
|
+
};
|
|
1271
|
+
type PostApiV1AdminAppsByAppIdApiKeysResponse = PostApiV1AdminAppsByAppIdApiKeysResponses[keyof PostApiV1AdminAppsByAppIdApiKeysResponses];
|
|
1272
|
+
type DeleteApiV1AdminAppsByAppIdApiKeysByIdData = {
|
|
1273
|
+
body?: never;
|
|
1274
|
+
headers: {
|
|
1275
|
+
/**
|
|
1276
|
+
* Admin API key
|
|
1277
|
+
*/
|
|
1278
|
+
'X-Admin-API-Key': string;
|
|
1279
|
+
};
|
|
1280
|
+
path: {
|
|
1281
|
+
/**
|
|
1282
|
+
* App ID
|
|
1283
|
+
*/
|
|
1284
|
+
app_id: number;
|
|
1285
|
+
/**
|
|
1286
|
+
* API Key ID
|
|
1287
|
+
*/
|
|
1288
|
+
id: number;
|
|
1289
|
+
};
|
|
1290
|
+
query?: never;
|
|
1291
|
+
url: '/api/v1/admin/apps/{app_id}/api-keys/{id}';
|
|
1292
|
+
};
|
|
1293
|
+
type DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors = {
|
|
1294
|
+
/**
|
|
1295
|
+
* Unauthorized
|
|
1296
|
+
*/
|
|
1297
|
+
401: ResponseErrorResponse;
|
|
1298
|
+
/**
|
|
1299
|
+
* Not Found
|
|
1300
|
+
*/
|
|
1301
|
+
404: ResponseErrorResponse;
|
|
1302
|
+
/**
|
|
1303
|
+
* Internal Server Error
|
|
1304
|
+
*/
|
|
1305
|
+
500: ResponseErrorResponse;
|
|
1306
|
+
};
|
|
1307
|
+
type DeleteApiV1AdminAppsByAppIdApiKeysByIdError = DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors[keyof DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors];
|
|
1308
|
+
type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses = {
|
|
1309
|
+
/**
|
|
1310
|
+
* OK
|
|
1311
|
+
*/
|
|
1312
|
+
200: {
|
|
1313
|
+
[key: string]: string;
|
|
1314
|
+
};
|
|
1315
|
+
};
|
|
1316
|
+
type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponse = DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses[keyof DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses];
|
|
1317
|
+
type GetApiV1AdminAppsByAppIdApiKeysByIdData = {
|
|
1318
|
+
body?: never;
|
|
1319
|
+
headers: {
|
|
1320
|
+
/**
|
|
1321
|
+
* Admin API key
|
|
1322
|
+
*/
|
|
1323
|
+
'X-Admin-API-Key': string;
|
|
1324
|
+
};
|
|
1325
|
+
path: {
|
|
1326
|
+
/**
|
|
1327
|
+
* App ID
|
|
1328
|
+
*/
|
|
1329
|
+
app_id: number;
|
|
1330
|
+
/**
|
|
1331
|
+
* API Key ID
|
|
1332
|
+
*/
|
|
1333
|
+
id: number;
|
|
1334
|
+
};
|
|
1335
|
+
query?: never;
|
|
1336
|
+
url: '/api/v1/admin/apps/{app_id}/api-keys/{id}';
|
|
1337
|
+
};
|
|
1338
|
+
type GetApiV1AdminAppsByAppIdApiKeysByIdErrors = {
|
|
1339
|
+
/**
|
|
1340
|
+
* Unauthorized
|
|
1341
|
+
*/
|
|
1342
|
+
401: ResponseErrorResponse;
|
|
1343
|
+
/**
|
|
1344
|
+
* Not Found
|
|
1345
|
+
*/
|
|
1346
|
+
404: ResponseErrorResponse;
|
|
1347
|
+
/**
|
|
1348
|
+
* Internal Server Error
|
|
1349
|
+
*/
|
|
1350
|
+
500: ResponseErrorResponse;
|
|
1351
|
+
};
|
|
1352
|
+
type GetApiV1AdminAppsByAppIdApiKeysByIdError = GetApiV1AdminAppsByAppIdApiKeysByIdErrors[keyof GetApiV1AdminAppsByAppIdApiKeysByIdErrors];
|
|
1353
|
+
type GetApiV1AdminAppsByAppIdApiKeysByIdResponses = {
|
|
1354
|
+
/**
|
|
1355
|
+
* OK
|
|
1356
|
+
*/
|
|
1357
|
+
200: HandlersApiKeyResponse;
|
|
1358
|
+
};
|
|
1359
|
+
type GetApiV1AdminAppsByAppIdApiKeysByIdResponse = GetApiV1AdminAppsByAppIdApiKeysByIdResponses[keyof GetApiV1AdminAppsByAppIdApiKeysByIdResponses];
|
|
1360
|
+
type PutApiV1AdminAppsByAppIdApiKeysByIdData = {
|
|
1361
|
+
/**
|
|
1362
|
+
* Update API key request
|
|
1363
|
+
*/
|
|
1364
|
+
body: HandlersUpdateApiKeyRequest;
|
|
1365
|
+
headers: {
|
|
1366
|
+
/**
|
|
1367
|
+
* Admin API key
|
|
1368
|
+
*/
|
|
1369
|
+
'X-Admin-API-Key': string;
|
|
1370
|
+
};
|
|
1371
|
+
path: {
|
|
1372
|
+
/**
|
|
1373
|
+
* App ID
|
|
1374
|
+
*/
|
|
1375
|
+
app_id: number;
|
|
1376
|
+
/**
|
|
1377
|
+
* API Key ID
|
|
1378
|
+
*/
|
|
1379
|
+
id: number;
|
|
1380
|
+
};
|
|
1381
|
+
query?: never;
|
|
1382
|
+
url: '/api/v1/admin/apps/{app_id}/api-keys/{id}';
|
|
1383
|
+
};
|
|
1384
|
+
type PutApiV1AdminAppsByAppIdApiKeysByIdErrors = {
|
|
1385
|
+
/**
|
|
1386
|
+
* Bad Request
|
|
1387
|
+
*/
|
|
1388
|
+
400: ResponseErrorResponse;
|
|
1389
|
+
/**
|
|
1390
|
+
* Unauthorized
|
|
1391
|
+
*/
|
|
1392
|
+
401: ResponseErrorResponse;
|
|
1393
|
+
/**
|
|
1394
|
+
* Not Found
|
|
1395
|
+
*/
|
|
1396
|
+
404: ResponseErrorResponse;
|
|
1397
|
+
/**
|
|
1398
|
+
* Internal Server Error
|
|
1399
|
+
*/
|
|
1400
|
+
500: ResponseErrorResponse;
|
|
1401
|
+
};
|
|
1402
|
+
type PutApiV1AdminAppsByAppIdApiKeysByIdError = PutApiV1AdminAppsByAppIdApiKeysByIdErrors[keyof PutApiV1AdminAppsByAppIdApiKeysByIdErrors];
|
|
1403
|
+
type PutApiV1AdminAppsByAppIdApiKeysByIdResponses = {
|
|
1404
|
+
/**
|
|
1405
|
+
* OK
|
|
1406
|
+
*/
|
|
1407
|
+
200: HandlersApiKeyResponse;
|
|
1408
|
+
};
|
|
1409
|
+
type PutApiV1AdminAppsByAppIdApiKeysByIdResponse = PutApiV1AdminAppsByAppIdApiKeysByIdResponses[keyof PutApiV1AdminAppsByAppIdApiKeysByIdResponses];
|
|
1410
|
+
type DeleteApiV1AdminAppsByIdData = {
|
|
1411
|
+
body?: never;
|
|
1412
|
+
headers: {
|
|
1413
|
+
/**
|
|
1414
|
+
* Admin API key
|
|
1415
|
+
*/
|
|
1416
|
+
'X-Admin-API-Key': string;
|
|
1417
|
+
};
|
|
1418
|
+
path: {
|
|
1419
|
+
/**
|
|
1420
|
+
* App ID
|
|
1421
|
+
*/
|
|
1422
|
+
id: number;
|
|
1423
|
+
};
|
|
1424
|
+
query?: never;
|
|
1425
|
+
url: '/api/v1/admin/apps/{id}';
|
|
1426
|
+
};
|
|
1427
|
+
type DeleteApiV1AdminAppsByIdErrors = {
|
|
1428
|
+
/**
|
|
1429
|
+
* Unauthorized
|
|
1430
|
+
*/
|
|
1431
|
+
401: ResponseErrorResponse;
|
|
1432
|
+
/**
|
|
1433
|
+
* Not Found
|
|
1434
|
+
*/
|
|
1435
|
+
404: ResponseErrorResponse;
|
|
1436
|
+
/**
|
|
1437
|
+
* Internal Server Error
|
|
1438
|
+
*/
|
|
1439
|
+
500: ResponseErrorResponse;
|
|
1440
|
+
};
|
|
1441
|
+
type DeleteApiV1AdminAppsByIdError = DeleteApiV1AdminAppsByIdErrors[keyof DeleteApiV1AdminAppsByIdErrors];
|
|
1442
|
+
type DeleteApiV1AdminAppsByIdResponses = {
|
|
1443
|
+
/**
|
|
1444
|
+
* OK
|
|
1445
|
+
*/
|
|
1446
|
+
200: {
|
|
1447
|
+
[key: string]: string;
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1450
|
+
type DeleteApiV1AdminAppsByIdResponse = DeleteApiV1AdminAppsByIdResponses[keyof DeleteApiV1AdminAppsByIdResponses];
|
|
1451
|
+
type GetApiV1AdminAppsByIdData = {
|
|
1452
|
+
body?: never;
|
|
1453
|
+
headers: {
|
|
1454
|
+
/**
|
|
1455
|
+
* Admin API key
|
|
1456
|
+
*/
|
|
1457
|
+
'X-Admin-API-Key': string;
|
|
1458
|
+
};
|
|
1459
|
+
path: {
|
|
1460
|
+
/**
|
|
1461
|
+
* App ID
|
|
1462
|
+
*/
|
|
1463
|
+
id: number;
|
|
1464
|
+
};
|
|
1465
|
+
query?: never;
|
|
1466
|
+
url: '/api/v1/admin/apps/{id}';
|
|
1467
|
+
};
|
|
1468
|
+
type GetApiV1AdminAppsByIdErrors = {
|
|
1469
|
+
/**
|
|
1470
|
+
* Unauthorized
|
|
1471
|
+
*/
|
|
1472
|
+
401: ResponseErrorResponse;
|
|
1473
|
+
/**
|
|
1474
|
+
* Not Found
|
|
1475
|
+
*/
|
|
1476
|
+
404: ResponseErrorResponse;
|
|
1477
|
+
/**
|
|
1478
|
+
* Internal Server Error
|
|
1479
|
+
*/
|
|
1480
|
+
500: ResponseErrorResponse;
|
|
1481
|
+
};
|
|
1482
|
+
type GetApiV1AdminAppsByIdError = GetApiV1AdminAppsByIdErrors[keyof GetApiV1AdminAppsByIdErrors];
|
|
1483
|
+
type GetApiV1AdminAppsByIdResponses = {
|
|
1484
|
+
/**
|
|
1485
|
+
* OK
|
|
1486
|
+
*/
|
|
1487
|
+
200: HandlersAppResponse;
|
|
1488
|
+
};
|
|
1489
|
+
type GetApiV1AdminAppsByIdResponse = GetApiV1AdminAppsByIdResponses[keyof GetApiV1AdminAppsByIdResponses];
|
|
1490
|
+
type PutApiV1AdminAppsByIdData = {
|
|
1491
|
+
/**
|
|
1492
|
+
* Update app request
|
|
1493
|
+
*/
|
|
1494
|
+
body: HandlersUpdateAppRequest;
|
|
1495
|
+
headers: {
|
|
1496
|
+
/**
|
|
1497
|
+
* Admin API key
|
|
1498
|
+
*/
|
|
1499
|
+
'X-Admin-API-Key': string;
|
|
1500
|
+
};
|
|
1501
|
+
path: {
|
|
1502
|
+
/**
|
|
1503
|
+
* App ID
|
|
1504
|
+
*/
|
|
1505
|
+
id: number;
|
|
1506
|
+
};
|
|
1507
|
+
query?: never;
|
|
1508
|
+
url: '/api/v1/admin/apps/{id}';
|
|
1509
|
+
};
|
|
1510
|
+
type PutApiV1AdminAppsByIdErrors = {
|
|
1511
|
+
/**
|
|
1512
|
+
* Bad Request
|
|
1513
|
+
*/
|
|
1514
|
+
400: ResponseErrorResponse;
|
|
1515
|
+
/**
|
|
1516
|
+
* Unauthorized
|
|
1517
|
+
*/
|
|
1518
|
+
401: ResponseErrorResponse;
|
|
1519
|
+
/**
|
|
1520
|
+
* Not Found
|
|
1521
|
+
*/
|
|
1522
|
+
404: ResponseErrorResponse;
|
|
1523
|
+
/**
|
|
1524
|
+
* Internal Server Error
|
|
1525
|
+
*/
|
|
1526
|
+
500: ResponseErrorResponse;
|
|
1527
|
+
};
|
|
1528
|
+
type PutApiV1AdminAppsByIdError = PutApiV1AdminAppsByIdErrors[keyof PutApiV1AdminAppsByIdErrors];
|
|
1529
|
+
type PutApiV1AdminAppsByIdResponses = {
|
|
1530
|
+
/**
|
|
1531
|
+
* OK
|
|
1532
|
+
*/
|
|
1533
|
+
200: HandlersAppResponse;
|
|
1534
|
+
};
|
|
1535
|
+
type PutApiV1AdminAppsByIdResponse = PutApiV1AdminAppsByIdResponses[keyof PutApiV1AdminAppsByIdResponses];
|
|
1536
|
+
type PostApiV1AdminSeedAppsData = {
|
|
1537
|
+
/**
|
|
1538
|
+
* Seed apps request
|
|
1539
|
+
*/
|
|
1540
|
+
body: HandlersSeedAppsRequest;
|
|
1541
|
+
headers: {
|
|
1542
|
+
/**
|
|
1543
|
+
* Admin API key
|
|
1544
|
+
*/
|
|
1545
|
+
'X-Admin-API-Key': string;
|
|
1546
|
+
};
|
|
1547
|
+
path?: never;
|
|
1548
|
+
query?: never;
|
|
1549
|
+
url: '/api/v1/admin/seed-apps';
|
|
1550
|
+
};
|
|
1551
|
+
type PostApiV1AdminSeedAppsErrors = {
|
|
1552
|
+
/**
|
|
1553
|
+
* Bad Request
|
|
1554
|
+
*/
|
|
1555
|
+
400: ResponseErrorResponse;
|
|
1556
|
+
/**
|
|
1557
|
+
* Unauthorized
|
|
1558
|
+
*/
|
|
1559
|
+
401: ResponseErrorResponse;
|
|
1560
|
+
/**
|
|
1561
|
+
* Internal Server Error
|
|
1562
|
+
*/
|
|
1563
|
+
500: ResponseErrorResponse;
|
|
1564
|
+
};
|
|
1565
|
+
type PostApiV1AdminSeedAppsError = PostApiV1AdminSeedAppsErrors[keyof PostApiV1AdminSeedAppsErrors];
|
|
1566
|
+
type PostApiV1AdminSeedAppsResponses = {
|
|
1567
|
+
/**
|
|
1568
|
+
* OK
|
|
1569
|
+
*/
|
|
1570
|
+
200: HandlersSeedAppsResponse;
|
|
1571
|
+
};
|
|
1572
|
+
type PostApiV1AdminSeedAppsResponse = PostApiV1AdminSeedAppsResponses[keyof PostApiV1AdminSeedAppsResponses];
|
|
1573
|
+
type PostApiV1AdminSubscriptionTierData = {
|
|
1574
|
+
/**
|
|
1575
|
+
* Set subscription tier request
|
|
1576
|
+
*/
|
|
1577
|
+
body: HandlersSetSubscriptionTierRequest;
|
|
1578
|
+
headers: {
|
|
1579
|
+
/**
|
|
1580
|
+
* Admin API key
|
|
1581
|
+
*/
|
|
1582
|
+
'X-Admin-API-Key': string;
|
|
1583
|
+
};
|
|
1584
|
+
path?: never;
|
|
1585
|
+
query?: never;
|
|
1586
|
+
url: '/api/v1/admin/subscription-tier';
|
|
1587
|
+
};
|
|
1588
|
+
type PostApiV1AdminSubscriptionTierErrors = {
|
|
1589
|
+
/**
|
|
1590
|
+
* Bad Request
|
|
1591
|
+
*/
|
|
1592
|
+
400: ResponseErrorResponse;
|
|
1593
|
+
/**
|
|
1594
|
+
* Unauthorized
|
|
1595
|
+
*/
|
|
1596
|
+
401: ResponseErrorResponse;
|
|
1597
|
+
/**
|
|
1598
|
+
* Not Found
|
|
1599
|
+
*/
|
|
1600
|
+
404: ResponseErrorResponse;
|
|
1601
|
+
/**
|
|
1602
|
+
* Internal Server Error
|
|
1603
|
+
*/
|
|
1604
|
+
500: ResponseErrorResponse;
|
|
1605
|
+
};
|
|
1606
|
+
type PostApiV1AdminSubscriptionTierError = PostApiV1AdminSubscriptionTierErrors[keyof PostApiV1AdminSubscriptionTierErrors];
|
|
1607
|
+
type PostApiV1AdminSubscriptionTierResponses = {
|
|
1608
|
+
/**
|
|
1609
|
+
* OK
|
|
1610
|
+
*/
|
|
1611
|
+
200: HandlersSetSubscriptionTierResponse;
|
|
1612
|
+
};
|
|
1613
|
+
type PostApiV1AdminSubscriptionTierResponse = PostApiV1AdminSubscriptionTierResponses[keyof PostApiV1AdminSubscriptionTierResponses];
|
|
1614
|
+
type PostApiV1ChatCompletionsData = {
|
|
1615
|
+
/**
|
|
1616
|
+
* Chat completion request
|
|
1617
|
+
*/
|
|
1618
|
+
body: LlmapiChatCompletionRequest;
|
|
1619
|
+
path?: never;
|
|
1620
|
+
query?: never;
|
|
1621
|
+
url: '/api/v1/chat/completions';
|
|
1622
|
+
};
|
|
1623
|
+
type PostApiV1ChatCompletionsErrors = {
|
|
1624
|
+
/**
|
|
1625
|
+
* Bad Request
|
|
1626
|
+
*/
|
|
1627
|
+
400: ResponseErrorResponse;
|
|
1628
|
+
/**
|
|
1629
|
+
* Model provider rate limit exceeded
|
|
1630
|
+
*/
|
|
1631
|
+
429: ResponseErrorResponse;
|
|
1632
|
+
/**
|
|
1633
|
+
* Internal Server Error
|
|
1634
|
+
*/
|
|
1635
|
+
500: ResponseErrorResponse;
|
|
1636
|
+
};
|
|
1637
|
+
type PostApiV1ChatCompletionsError = PostApiV1ChatCompletionsErrors[keyof PostApiV1ChatCompletionsErrors];
|
|
1638
|
+
type PostApiV1ChatCompletionsResponses = {
|
|
1639
|
+
/**
|
|
1640
|
+
* OK
|
|
1641
|
+
*/
|
|
1642
|
+
200: LlmapiChatCompletionResponse | string;
|
|
1643
|
+
};
|
|
1644
|
+
type PostApiV1ChatCompletionsResponse = PostApiV1ChatCompletionsResponses[keyof PostApiV1ChatCompletionsResponses];
|
|
1645
|
+
type GetApiV1ConfigData = {
|
|
1646
|
+
body?: never;
|
|
1647
|
+
path?: never;
|
|
1648
|
+
query?: never;
|
|
1649
|
+
url: '/api/v1/config';
|
|
1650
|
+
};
|
|
1651
|
+
type GetApiV1ConfigErrors = {
|
|
1652
|
+
/**
|
|
1653
|
+
* Internal Server Error
|
|
1654
|
+
*/
|
|
1655
|
+
500: ResponseErrorResponse;
|
|
1656
|
+
};
|
|
1657
|
+
type GetApiV1ConfigError = GetApiV1ConfigErrors[keyof GetApiV1ConfigErrors];
|
|
1658
|
+
type GetApiV1ConfigResponses = {
|
|
1659
|
+
/**
|
|
1660
|
+
* OK
|
|
1661
|
+
*/
|
|
1662
|
+
200: HandlersConfigResponse;
|
|
1663
|
+
};
|
|
1664
|
+
type GetApiV1ConfigResponse = GetApiV1ConfigResponses[keyof GetApiV1ConfigResponses];
|
|
1665
|
+
type GetApiV1CreditsBalanceData = {
|
|
1666
|
+
body?: never;
|
|
1667
|
+
headers?: {
|
|
1668
|
+
/**
|
|
1669
|
+
* IANA timezone (e.g., America/New_York)
|
|
1670
|
+
*/
|
|
1671
|
+
'X-Timezone'?: string;
|
|
1672
|
+
};
|
|
1673
|
+
path?: never;
|
|
1674
|
+
query?: never;
|
|
1675
|
+
url: '/api/v1/credits/balance';
|
|
1676
|
+
};
|
|
1677
|
+
type GetApiV1CreditsBalanceErrors = {
|
|
1678
|
+
/**
|
|
1679
|
+
* Unauthorized
|
|
1680
|
+
*/
|
|
1681
|
+
401: ResponseErrorResponse;
|
|
1682
|
+
/**
|
|
1683
|
+
* Account not found
|
|
1684
|
+
*/
|
|
1685
|
+
404: ResponseErrorResponse;
|
|
1686
|
+
/**
|
|
1687
|
+
* Internal Server Error
|
|
1688
|
+
*/
|
|
1689
|
+
500: ResponseErrorResponse;
|
|
1690
|
+
};
|
|
1691
|
+
type GetApiV1CreditsBalanceError = GetApiV1CreditsBalanceErrors[keyof GetApiV1CreditsBalanceErrors];
|
|
1692
|
+
type GetApiV1CreditsBalanceResponses = {
|
|
1693
|
+
/**
|
|
1694
|
+
* OK
|
|
1695
|
+
*/
|
|
1696
|
+
200: HandlersCreditBalanceResponse;
|
|
1697
|
+
};
|
|
1698
|
+
type GetApiV1CreditsBalanceResponse = GetApiV1CreditsBalanceResponses[keyof GetApiV1CreditsBalanceResponses];
|
|
1699
|
+
type PostApiV1CreditsClaimDailyData = {
|
|
1700
|
+
body?: never;
|
|
1701
|
+
headers?: {
|
|
1702
|
+
/**
|
|
1703
|
+
* IANA timezone (e.g., America/New_York)
|
|
1704
|
+
*/
|
|
1705
|
+
'X-Timezone'?: string;
|
|
1706
|
+
};
|
|
1707
|
+
path?: never;
|
|
1708
|
+
query?: never;
|
|
1709
|
+
url: '/api/v1/credits/claim-daily';
|
|
1710
|
+
};
|
|
1711
|
+
type PostApiV1CreditsClaimDailyErrors = {
|
|
1712
|
+
/**
|
|
1713
|
+
* Already claimed today or invalid timezone
|
|
1714
|
+
*/
|
|
1715
|
+
400: ResponseErrorResponse;
|
|
1716
|
+
/**
|
|
1717
|
+
* Unauthorized
|
|
1718
|
+
*/
|
|
1719
|
+
401: ResponseErrorResponse;
|
|
1720
|
+
/**
|
|
1721
|
+
* Account not found
|
|
1722
|
+
*/
|
|
1723
|
+
404: ResponseErrorResponse;
|
|
1724
|
+
/**
|
|
1725
|
+
* Internal Server Error
|
|
1726
|
+
*/
|
|
1727
|
+
500: ResponseErrorResponse;
|
|
1728
|
+
};
|
|
1729
|
+
type PostApiV1CreditsClaimDailyError = PostApiV1CreditsClaimDailyErrors[keyof PostApiV1CreditsClaimDailyErrors];
|
|
1730
|
+
type PostApiV1CreditsClaimDailyResponses = {
|
|
1731
|
+
/**
|
|
1732
|
+
* OK
|
|
1733
|
+
*/
|
|
1734
|
+
200: HandlersClaimDailyCreditsResponse;
|
|
1735
|
+
};
|
|
1736
|
+
type PostApiV1CreditsClaimDailyResponse = PostApiV1CreditsClaimDailyResponses[keyof PostApiV1CreditsClaimDailyResponses];
|
|
1737
|
+
type GetApiV1CreditsPacksData = {
|
|
1738
|
+
body?: never;
|
|
1739
|
+
path?: never;
|
|
1740
|
+
query?: never;
|
|
1741
|
+
url: '/api/v1/credits/packs';
|
|
1742
|
+
};
|
|
1743
|
+
type GetApiV1CreditsPacksErrors = {
|
|
1744
|
+
/**
|
|
1745
|
+
* Unauthorized
|
|
1746
|
+
*/
|
|
1747
|
+
401: ResponseErrorResponse;
|
|
1748
|
+
/**
|
|
1749
|
+
* Internal Server Error
|
|
1750
|
+
*/
|
|
1751
|
+
500: ResponseErrorResponse;
|
|
1752
|
+
};
|
|
1753
|
+
type GetApiV1CreditsPacksError = GetApiV1CreditsPacksErrors[keyof GetApiV1CreditsPacksErrors];
|
|
1754
|
+
type GetApiV1CreditsPacksResponses = {
|
|
1755
|
+
/**
|
|
1756
|
+
* OK
|
|
1757
|
+
*/
|
|
1758
|
+
200: HandlersCreditPacksResponse;
|
|
1759
|
+
};
|
|
1760
|
+
type GetApiV1CreditsPacksResponse = GetApiV1CreditsPacksResponses[keyof GetApiV1CreditsPacksResponses];
|
|
1761
|
+
type PostApiV1CreditsPurchaseData = {
|
|
1762
|
+
/**
|
|
1763
|
+
* Credit pack checkout request
|
|
1764
|
+
*/
|
|
1765
|
+
body: HandlersCreateCreditPackCheckoutRequest;
|
|
1766
|
+
path?: never;
|
|
1767
|
+
query?: never;
|
|
1768
|
+
url: '/api/v1/credits/purchase';
|
|
1769
|
+
};
|
|
1770
|
+
type PostApiV1CreditsPurchaseErrors = {
|
|
1771
|
+
/**
|
|
1772
|
+
* Bad Request
|
|
1773
|
+
*/
|
|
1774
|
+
400: ResponseErrorResponse;
|
|
1775
|
+
/**
|
|
1776
|
+
* Unauthorized
|
|
1777
|
+
*/
|
|
1778
|
+
401: ResponseErrorResponse;
|
|
1779
|
+
/**
|
|
1780
|
+
* Internal Server Error
|
|
1781
|
+
*/
|
|
1782
|
+
500: ResponseErrorResponse;
|
|
1783
|
+
};
|
|
1784
|
+
type PostApiV1CreditsPurchaseError = PostApiV1CreditsPurchaseErrors[keyof PostApiV1CreditsPurchaseErrors];
|
|
1785
|
+
type PostApiV1CreditsPurchaseResponses = {
|
|
1786
|
+
/**
|
|
1787
|
+
* OK
|
|
1788
|
+
*/
|
|
1789
|
+
200: HandlersCheckoutSessionResponse;
|
|
1790
|
+
};
|
|
1791
|
+
type PostApiV1CreditsPurchaseResponse = PostApiV1CreditsPurchaseResponses[keyof PostApiV1CreditsPurchaseResponses];
|
|
1792
|
+
type PostApiV1CreditsSyncSnagData = {
|
|
1793
|
+
body?: never;
|
|
1794
|
+
path?: never;
|
|
1795
|
+
query?: never;
|
|
1796
|
+
url: '/api/v1/credits/sync-snag';
|
|
1797
|
+
};
|
|
1798
|
+
type PostApiV1CreditsSyncSnagErrors = {
|
|
1799
|
+
/**
|
|
1800
|
+
* Cooldown not expired
|
|
1801
|
+
*/
|
|
1802
|
+
400: ResponseErrorResponse;
|
|
1803
|
+
/**
|
|
1804
|
+
* Unauthorized
|
|
1805
|
+
*/
|
|
1806
|
+
401: ResponseErrorResponse;
|
|
1807
|
+
/**
|
|
1808
|
+
* Internal Server Error
|
|
1809
|
+
*/
|
|
1810
|
+
500: ResponseErrorResponse;
|
|
1811
|
+
};
|
|
1812
|
+
type PostApiV1CreditsSyncSnagError = PostApiV1CreditsSyncSnagErrors[keyof PostApiV1CreditsSyncSnagErrors];
|
|
1813
|
+
type PostApiV1CreditsSyncSnagResponses = {
|
|
1814
|
+
/**
|
|
1815
|
+
* OK
|
|
1816
|
+
*/
|
|
1817
|
+
200: HandlersSyncSnagResponse;
|
|
1818
|
+
};
|
|
1819
|
+
type PostApiV1CreditsSyncSnagResponse = PostApiV1CreditsSyncSnagResponses[keyof PostApiV1CreditsSyncSnagResponses];
|
|
1820
|
+
type GetApiV1DocsSwaggerJsonData = {
|
|
1821
|
+
body?: never;
|
|
1822
|
+
path?: never;
|
|
1823
|
+
query?: never;
|
|
1824
|
+
url: '/api/v1/docs/swagger.json';
|
|
1825
|
+
};
|
|
1826
|
+
type GetApiV1DocsSwaggerJsonResponses = {
|
|
1827
|
+
/**
|
|
1828
|
+
* OK
|
|
1829
|
+
*/
|
|
1830
|
+
200: {
|
|
1831
|
+
[key: string]: unknown;
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
type GetApiV1DocsSwaggerJsonResponse = GetApiV1DocsSwaggerJsonResponses[keyof GetApiV1DocsSwaggerJsonResponses];
|
|
1835
|
+
type PostApiV1EmbeddingsData = {
|
|
1836
|
+
/**
|
|
1837
|
+
* Embedding request
|
|
1838
|
+
*/
|
|
1839
|
+
body: LlmapiEmbeddingRequest;
|
|
1840
|
+
path?: never;
|
|
1841
|
+
query?: never;
|
|
1842
|
+
url: '/api/v1/embeddings';
|
|
1843
|
+
};
|
|
1844
|
+
type PostApiV1EmbeddingsErrors = {
|
|
1845
|
+
/**
|
|
1846
|
+
* Bad Request
|
|
1847
|
+
*/
|
|
1848
|
+
400: ResponseErrorResponse;
|
|
1849
|
+
/**
|
|
1850
|
+
* Model provider rate limit exceeded
|
|
1851
|
+
*/
|
|
1852
|
+
429: ResponseErrorResponse;
|
|
1853
|
+
/**
|
|
1854
|
+
* Internal Server Error
|
|
1855
|
+
*/
|
|
1856
|
+
500: ResponseErrorResponse;
|
|
1857
|
+
};
|
|
1858
|
+
type PostApiV1EmbeddingsError = PostApiV1EmbeddingsErrors[keyof PostApiV1EmbeddingsErrors];
|
|
1859
|
+
type PostApiV1EmbeddingsResponses = {
|
|
1860
|
+
/**
|
|
1861
|
+
* OK
|
|
1862
|
+
*/
|
|
1863
|
+
200: LlmapiEmbeddingResponse;
|
|
1864
|
+
};
|
|
1865
|
+
type PostApiV1EmbeddingsResponse = PostApiV1EmbeddingsResponses[keyof PostApiV1EmbeddingsResponses];
|
|
1866
|
+
type GetApiV1ModelsData = {
|
|
1867
|
+
body?: never;
|
|
1868
|
+
path?: never;
|
|
1869
|
+
query?: {
|
|
1870
|
+
/**
|
|
1871
|
+
* Filter by provider (e.g., openai, anthropic)
|
|
1872
|
+
*/
|
|
1873
|
+
provider?: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Number of models to return per page
|
|
1876
|
+
*/
|
|
1877
|
+
page_size?: number;
|
|
1878
|
+
/**
|
|
1879
|
+
* Token to get next page of results
|
|
1880
|
+
*/
|
|
1881
|
+
page_token?: string;
|
|
1882
|
+
};
|
|
1883
|
+
url: '/api/v1/models';
|
|
1884
|
+
};
|
|
1885
|
+
type GetApiV1ModelsErrors = {
|
|
1886
|
+
/**
|
|
1887
|
+
* Bad Request
|
|
1888
|
+
*/
|
|
1889
|
+
400: ResponseErrorResponse;
|
|
1890
|
+
/**
|
|
1891
|
+
* Rate limit exceeded
|
|
1892
|
+
*/
|
|
1893
|
+
429: ResponseErrorResponse;
|
|
1894
|
+
/**
|
|
1895
|
+
* Internal Server Error
|
|
1896
|
+
*/
|
|
1897
|
+
500: ResponseErrorResponse;
|
|
1898
|
+
};
|
|
1899
|
+
type GetApiV1ModelsError = GetApiV1ModelsErrors[keyof GetApiV1ModelsErrors];
|
|
1900
|
+
type GetApiV1ModelsResponses = {
|
|
1901
|
+
/**
|
|
1902
|
+
* OK
|
|
1903
|
+
*/
|
|
1904
|
+
200: LlmapiModelsListResponse;
|
|
1905
|
+
};
|
|
1906
|
+
type GetApiV1ModelsResponse = GetApiV1ModelsResponses[keyof GetApiV1ModelsResponses];
|
|
1907
|
+
type PostApiV1ResponsesData = {
|
|
1908
|
+
/**
|
|
1909
|
+
* Response request
|
|
1910
|
+
*/
|
|
1911
|
+
body: LlmapiResponseRequest;
|
|
1912
|
+
path?: never;
|
|
1913
|
+
query?: never;
|
|
1914
|
+
url: '/api/v1/responses';
|
|
1915
|
+
};
|
|
1916
|
+
type PostApiV1ResponsesErrors = {
|
|
1917
|
+
/**
|
|
1918
|
+
* Bad Request
|
|
1919
|
+
*/
|
|
1920
|
+
400: ResponseErrorResponse;
|
|
1921
|
+
/**
|
|
1922
|
+
* Model provider rate limit exceeded
|
|
1923
|
+
*/
|
|
1924
|
+
429: ResponseErrorResponse;
|
|
1925
|
+
/**
|
|
1926
|
+
* Internal Server Error
|
|
1927
|
+
*/
|
|
1928
|
+
500: ResponseErrorResponse;
|
|
1929
|
+
};
|
|
1930
|
+
type PostApiV1ResponsesError = PostApiV1ResponsesErrors[keyof PostApiV1ResponsesErrors];
|
|
1931
|
+
type PostApiV1ResponsesResponses = {
|
|
1932
|
+
/**
|
|
1933
|
+
* OK
|
|
1934
|
+
*/
|
|
1935
|
+
200: LlmapiResponseResponse | string;
|
|
1936
|
+
};
|
|
1937
|
+
type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostApiV1ResponsesResponses];
|
|
1938
|
+
type PostApiV1SubscriptionsCancelData = {
|
|
1939
|
+
body?: never;
|
|
1940
|
+
path?: never;
|
|
1941
|
+
query?: never;
|
|
1942
|
+
url: '/api/v1/subscriptions/cancel';
|
|
1943
|
+
};
|
|
1944
|
+
type PostApiV1SubscriptionsCancelErrors = {
|
|
1945
|
+
/**
|
|
1946
|
+
* Unauthorized
|
|
1947
|
+
*/
|
|
1948
|
+
401: ResponseErrorResponse;
|
|
1949
|
+
/**
|
|
1950
|
+
* Not Found
|
|
1951
|
+
*/
|
|
1952
|
+
404: ResponseErrorResponse;
|
|
1953
|
+
/**
|
|
1954
|
+
* Internal Server Error
|
|
1955
|
+
*/
|
|
1956
|
+
500: ResponseErrorResponse;
|
|
1957
|
+
};
|
|
1958
|
+
type PostApiV1SubscriptionsCancelError = PostApiV1SubscriptionsCancelErrors[keyof PostApiV1SubscriptionsCancelErrors];
|
|
1959
|
+
type PostApiV1SubscriptionsCancelResponses = {
|
|
1960
|
+
/**
|
|
1961
|
+
* OK
|
|
1962
|
+
*/
|
|
1963
|
+
200: HandlersCancelSubscriptionResponse;
|
|
1964
|
+
};
|
|
1965
|
+
type PostApiV1SubscriptionsCancelResponse = PostApiV1SubscriptionsCancelResponses[keyof PostApiV1SubscriptionsCancelResponses];
|
|
1966
|
+
type PostApiV1SubscriptionsCreateCheckoutSessionData = {
|
|
1967
|
+
/**
|
|
1968
|
+
* Checkout session request with redirect URLs
|
|
1969
|
+
*/
|
|
1970
|
+
body: HandlersCreateCheckoutSessionRequest;
|
|
1971
|
+
path?: never;
|
|
1972
|
+
query?: never;
|
|
1973
|
+
url: '/api/v1/subscriptions/create-checkout-session';
|
|
1974
|
+
};
|
|
1975
|
+
type PostApiV1SubscriptionsCreateCheckoutSessionErrors = {
|
|
1976
|
+
/**
|
|
1977
|
+
* Bad Request
|
|
1978
|
+
*/
|
|
1979
|
+
400: ResponseErrorResponse;
|
|
1980
|
+
/**
|
|
1981
|
+
* Unauthorized
|
|
1982
|
+
*/
|
|
1983
|
+
401: ResponseErrorResponse;
|
|
1984
|
+
/**
|
|
1985
|
+
* Internal Server Error
|
|
1986
|
+
*/
|
|
1987
|
+
500: ResponseErrorResponse;
|
|
1988
|
+
};
|
|
1989
|
+
type PostApiV1SubscriptionsCreateCheckoutSessionError = PostApiV1SubscriptionsCreateCheckoutSessionErrors[keyof PostApiV1SubscriptionsCreateCheckoutSessionErrors];
|
|
1990
|
+
type PostApiV1SubscriptionsCreateCheckoutSessionResponses = {
|
|
1991
|
+
/**
|
|
1992
|
+
* OK
|
|
1993
|
+
*/
|
|
1994
|
+
200: HandlersCheckoutSessionResponse;
|
|
1995
|
+
};
|
|
1996
|
+
type PostApiV1SubscriptionsCreateCheckoutSessionResponse = PostApiV1SubscriptionsCreateCheckoutSessionResponses[keyof PostApiV1SubscriptionsCreateCheckoutSessionResponses];
|
|
1997
|
+
type PostApiV1SubscriptionsCustomerPortalData = {
|
|
1998
|
+
/**
|
|
1999
|
+
* Customer portal request with return URL
|
|
2000
|
+
*/
|
|
2001
|
+
body: HandlersCreateCustomerPortalRequest;
|
|
2002
|
+
path?: never;
|
|
2003
|
+
query?: never;
|
|
2004
|
+
url: '/api/v1/subscriptions/customer-portal';
|
|
2005
|
+
};
|
|
2006
|
+
type PostApiV1SubscriptionsCustomerPortalErrors = {
|
|
2007
|
+
/**
|
|
2008
|
+
* Bad Request
|
|
2009
|
+
*/
|
|
2010
|
+
400: ResponseErrorResponse;
|
|
2011
|
+
/**
|
|
2012
|
+
* Unauthorized
|
|
2013
|
+
*/
|
|
2014
|
+
401: ResponseErrorResponse;
|
|
2015
|
+
/**
|
|
2016
|
+
* Not Found
|
|
2017
|
+
*/
|
|
2018
|
+
404: ResponseErrorResponse;
|
|
2019
|
+
/**
|
|
2020
|
+
* Internal Server Error
|
|
2021
|
+
*/
|
|
2022
|
+
500: ResponseErrorResponse;
|
|
2023
|
+
};
|
|
2024
|
+
type PostApiV1SubscriptionsCustomerPortalError = PostApiV1SubscriptionsCustomerPortalErrors[keyof PostApiV1SubscriptionsCustomerPortalErrors];
|
|
2025
|
+
type PostApiV1SubscriptionsCustomerPortalResponses = {
|
|
2026
|
+
/**
|
|
2027
|
+
* OK
|
|
2028
|
+
*/
|
|
2029
|
+
200: HandlersCustomerPortalResponse;
|
|
2030
|
+
};
|
|
2031
|
+
type PostApiV1SubscriptionsCustomerPortalResponse = PostApiV1SubscriptionsCustomerPortalResponses[keyof PostApiV1SubscriptionsCustomerPortalResponses];
|
|
2032
|
+
type PostApiV1SubscriptionsRenewData = {
|
|
2033
|
+
body?: never;
|
|
2034
|
+
path?: never;
|
|
2035
|
+
query?: never;
|
|
2036
|
+
url: '/api/v1/subscriptions/renew';
|
|
2037
|
+
};
|
|
2038
|
+
type PostApiV1SubscriptionsRenewErrors = {
|
|
2039
|
+
/**
|
|
2040
|
+
* Bad Request
|
|
2041
|
+
*/
|
|
2042
|
+
400: ResponseErrorResponse;
|
|
2043
|
+
/**
|
|
2044
|
+
* Unauthorized
|
|
2045
|
+
*/
|
|
2046
|
+
401: ResponseErrorResponse;
|
|
2047
|
+
/**
|
|
2048
|
+
* Not Found
|
|
2049
|
+
*/
|
|
2050
|
+
404: ResponseErrorResponse;
|
|
2051
|
+
/**
|
|
2052
|
+
* Internal Server Error
|
|
2053
|
+
*/
|
|
2054
|
+
500: ResponseErrorResponse;
|
|
2055
|
+
};
|
|
2056
|
+
type PostApiV1SubscriptionsRenewError = PostApiV1SubscriptionsRenewErrors[keyof PostApiV1SubscriptionsRenewErrors];
|
|
2057
|
+
type PostApiV1SubscriptionsRenewResponses = {
|
|
2058
|
+
/**
|
|
2059
|
+
* OK
|
|
2060
|
+
*/
|
|
2061
|
+
200: HandlersRenewSubscriptionResponse;
|
|
2062
|
+
};
|
|
2063
|
+
type PostApiV1SubscriptionsRenewResponse = PostApiV1SubscriptionsRenewResponses[keyof PostApiV1SubscriptionsRenewResponses];
|
|
2064
|
+
type GetApiV1SubscriptionsStatusData = {
|
|
2065
|
+
body?: never;
|
|
2066
|
+
path?: never;
|
|
2067
|
+
query?: never;
|
|
2068
|
+
url: '/api/v1/subscriptions/status';
|
|
2069
|
+
};
|
|
2070
|
+
type GetApiV1SubscriptionsStatusErrors = {
|
|
2071
|
+
/**
|
|
2072
|
+
* Unauthorized
|
|
2073
|
+
*/
|
|
2074
|
+
401: ResponseErrorResponse;
|
|
2075
|
+
/**
|
|
2076
|
+
* Internal Server Error
|
|
2077
|
+
*/
|
|
2078
|
+
500: ResponseErrorResponse;
|
|
2079
|
+
};
|
|
2080
|
+
type GetApiV1SubscriptionsStatusError = GetApiV1SubscriptionsStatusErrors[keyof GetApiV1SubscriptionsStatusErrors];
|
|
2081
|
+
type GetApiV1SubscriptionsStatusResponses = {
|
|
2082
|
+
/**
|
|
2083
|
+
* OK
|
|
2084
|
+
*/
|
|
2085
|
+
200: HandlersSubscriptionStatusResponse;
|
|
2086
|
+
};
|
|
2087
|
+
type GetApiV1SubscriptionsStatusResponse = GetApiV1SubscriptionsStatusResponses[keyof GetApiV1SubscriptionsStatusResponses];
|
|
2088
|
+
type PostApiV1SubscriptionsWebhookData = {
|
|
2089
|
+
body?: {
|
|
2090
|
+
[key: string]: unknown;
|
|
2091
|
+
};
|
|
2092
|
+
headers: {
|
|
2093
|
+
/**
|
|
2094
|
+
* Stripe webhook signature
|
|
2095
|
+
*/
|
|
2096
|
+
'Stripe-Signature': string;
|
|
2097
|
+
};
|
|
2098
|
+
path?: never;
|
|
2099
|
+
query?: never;
|
|
2100
|
+
url: '/api/v1/subscriptions/webhook';
|
|
2101
|
+
};
|
|
2102
|
+
type PostApiV1SubscriptionsWebhookErrors = {
|
|
2103
|
+
/**
|
|
2104
|
+
* Bad Request
|
|
2105
|
+
*/
|
|
2106
|
+
400: ResponseErrorResponse;
|
|
2107
|
+
};
|
|
2108
|
+
type PostApiV1SubscriptionsWebhookError = PostApiV1SubscriptionsWebhookErrors[keyof PostApiV1SubscriptionsWebhookErrors];
|
|
2109
|
+
type PostApiV1SubscriptionsWebhookResponses = {
|
|
2110
|
+
/**
|
|
2111
|
+
* OK
|
|
2112
|
+
*/
|
|
2113
|
+
200: {
|
|
2114
|
+
[key: string]: string;
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
type PostApiV1SubscriptionsWebhookResponse = PostApiV1SubscriptionsWebhookResponses[keyof PostApiV1SubscriptionsWebhookResponses];
|
|
2118
|
+
type GetApiV1TasksData = {
|
|
2119
|
+
body?: never;
|
|
2120
|
+
path?: never;
|
|
2121
|
+
query?: never;
|
|
2122
|
+
url: '/api/v1/tasks';
|
|
2123
|
+
};
|
|
2124
|
+
type GetApiV1TasksErrors = {
|
|
2125
|
+
/**
|
|
2126
|
+
* Internal Server Error
|
|
2127
|
+
*/
|
|
2128
|
+
500: ResponseErrorResponse;
|
|
2129
|
+
};
|
|
2130
|
+
type GetApiV1TasksError = GetApiV1TasksErrors[keyof GetApiV1TasksErrors];
|
|
2131
|
+
type GetApiV1TasksResponses = {
|
|
2132
|
+
/**
|
|
2133
|
+
* OK
|
|
2134
|
+
*/
|
|
2135
|
+
200: Array<HandlersTaskResponse>;
|
|
2136
|
+
};
|
|
2137
|
+
type GetApiV1TasksResponse = GetApiV1TasksResponses[keyof GetApiV1TasksResponses];
|
|
2138
|
+
type GetApiV1ToolsData = {
|
|
2139
|
+
body?: never;
|
|
2140
|
+
path?: never;
|
|
2141
|
+
query?: never;
|
|
2142
|
+
url: '/api/v1/tools';
|
|
2143
|
+
};
|
|
2144
|
+
type GetApiV1ToolsErrors = {
|
|
2145
|
+
/**
|
|
2146
|
+
* Internal Server Error
|
|
2147
|
+
*/
|
|
2148
|
+
500: ResponseErrorResponse;
|
|
2149
|
+
};
|
|
2150
|
+
type GetApiV1ToolsError = GetApiV1ToolsErrors[keyof GetApiV1ToolsErrors];
|
|
2151
|
+
type GetApiV1ToolsResponses = {
|
|
2152
|
+
/**
|
|
2153
|
+
* OK
|
|
2154
|
+
*/
|
|
2155
|
+
200: HandlersGetToolsResponse;
|
|
2156
|
+
};
|
|
2157
|
+
type GetApiV1ToolsResponse = GetApiV1ToolsResponses[keyof GetApiV1ToolsResponses];
|
|
2158
|
+
type PostAuthOauthByProviderExchangeData = {
|
|
2159
|
+
/**
|
|
2160
|
+
* Exchange request
|
|
2161
|
+
*/
|
|
2162
|
+
body: HandlersExchangeRequest;
|
|
2163
|
+
path: {
|
|
2164
|
+
/**
|
|
2165
|
+
* OAuth provider (google-drive, dropbox)
|
|
2166
|
+
*/
|
|
2167
|
+
provider: string;
|
|
2168
|
+
};
|
|
2169
|
+
query?: never;
|
|
2170
|
+
url: '/auth/oauth/{provider}/exchange';
|
|
2171
|
+
};
|
|
2172
|
+
type PostAuthOauthByProviderExchangeErrors = {
|
|
2173
|
+
/**
|
|
2174
|
+
* Bad Request
|
|
2175
|
+
*/
|
|
2176
|
+
400: ResponseErrorResponse;
|
|
2177
|
+
/**
|
|
2178
|
+
* Internal Server Error
|
|
2179
|
+
*/
|
|
2180
|
+
500: ResponseErrorResponse;
|
|
2181
|
+
};
|
|
2182
|
+
type PostAuthOauthByProviderExchangeError = PostAuthOauthByProviderExchangeErrors[keyof PostAuthOauthByProviderExchangeErrors];
|
|
2183
|
+
type PostAuthOauthByProviderExchangeResponses = {
|
|
2184
|
+
/**
|
|
2185
|
+
* OK
|
|
2186
|
+
*/
|
|
2187
|
+
200: HandlersTokenResponse;
|
|
2188
|
+
};
|
|
2189
|
+
type PostAuthOauthByProviderExchangeResponse = PostAuthOauthByProviderExchangeResponses[keyof PostAuthOauthByProviderExchangeResponses];
|
|
2190
|
+
type PostAuthOauthByProviderRefreshData = {
|
|
2191
|
+
/**
|
|
2192
|
+
* Refresh request
|
|
2193
|
+
*/
|
|
2194
|
+
body: HandlersRefreshRequest;
|
|
2195
|
+
path: {
|
|
2196
|
+
/**
|
|
2197
|
+
* OAuth provider (google-drive, dropbox)
|
|
2198
|
+
*/
|
|
2199
|
+
provider: string;
|
|
2200
|
+
};
|
|
2201
|
+
query?: never;
|
|
2202
|
+
url: '/auth/oauth/{provider}/refresh';
|
|
2203
|
+
};
|
|
2204
|
+
type PostAuthOauthByProviderRefreshErrors = {
|
|
2205
|
+
/**
|
|
2206
|
+
* Bad Request
|
|
2207
|
+
*/
|
|
2208
|
+
400: ResponseErrorResponse;
|
|
2209
|
+
/**
|
|
2210
|
+
* Internal Server Error
|
|
2211
|
+
*/
|
|
2212
|
+
500: ResponseErrorResponse;
|
|
2213
|
+
};
|
|
2214
|
+
type PostAuthOauthByProviderRefreshError = PostAuthOauthByProviderRefreshErrors[keyof PostAuthOauthByProviderRefreshErrors];
|
|
2215
|
+
type PostAuthOauthByProviderRefreshResponses = {
|
|
2216
|
+
/**
|
|
2217
|
+
* OK
|
|
2218
|
+
*/
|
|
2219
|
+
200: HandlersTokenResponse;
|
|
2220
|
+
};
|
|
2221
|
+
type PostAuthOauthByProviderRefreshResponse = PostAuthOauthByProviderRefreshResponses[keyof PostAuthOauthByProviderRefreshResponses];
|
|
2222
|
+
type PostAuthOauthByProviderRevokeData = {
|
|
2223
|
+
/**
|
|
2224
|
+
* Revoke request
|
|
2225
|
+
*/
|
|
2226
|
+
body: HandlersRevokeRequest;
|
|
2227
|
+
path: {
|
|
2228
|
+
/**
|
|
2229
|
+
* OAuth provider (google-drive, dropbox)
|
|
2230
|
+
*/
|
|
2231
|
+
provider: string;
|
|
2232
|
+
};
|
|
2233
|
+
query?: never;
|
|
2234
|
+
url: '/auth/oauth/{provider}/revoke';
|
|
2235
|
+
};
|
|
2236
|
+
type PostAuthOauthByProviderRevokeErrors = {
|
|
2237
|
+
/**
|
|
2238
|
+
* Bad Request
|
|
2239
|
+
*/
|
|
2240
|
+
400: ResponseErrorResponse;
|
|
2241
|
+
/**
|
|
2242
|
+
* Internal Server Error
|
|
2243
|
+
*/
|
|
2244
|
+
500: ResponseErrorResponse;
|
|
2245
|
+
};
|
|
2246
|
+
type PostAuthOauthByProviderRevokeError = PostAuthOauthByProviderRevokeErrors[keyof PostAuthOauthByProviderRevokeErrors];
|
|
2247
|
+
type PostAuthOauthByProviderRevokeResponses = {
|
|
2248
|
+
/**
|
|
2249
|
+
* Empty object on success
|
|
2250
|
+
*/
|
|
2251
|
+
200: {
|
|
2252
|
+
[key: string]: unknown;
|
|
2253
|
+
};
|
|
2254
|
+
};
|
|
2255
|
+
type PostAuthOauthByProviderRevokeResponse = PostAuthOauthByProviderRevokeResponses[keyof PostAuthOauthByProviderRevokeResponses];
|
|
2256
|
+
type GetHealthData = {
|
|
2257
|
+
body?: never;
|
|
2258
|
+
path?: never;
|
|
2259
|
+
query?: never;
|
|
2260
|
+
url: '/health';
|
|
2261
|
+
};
|
|
2262
|
+
type GetHealthErrors = {
|
|
2263
|
+
/**
|
|
2264
|
+
* Internal Server Error
|
|
2265
|
+
*/
|
|
2266
|
+
500: ResponseErrorResponse;
|
|
2267
|
+
};
|
|
2268
|
+
type GetHealthError = GetHealthErrors[keyof GetHealthErrors];
|
|
2269
|
+
type GetHealthResponses = {
|
|
2270
|
+
/**
|
|
2271
|
+
* OK
|
|
2272
|
+
*/
|
|
2273
|
+
200: HandlersHealthResponse;
|
|
2274
|
+
};
|
|
2275
|
+
type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];
|
|
2276
|
+
|
|
2277
|
+
type AuthToken = string | undefined;
|
|
2278
|
+
interface Auth {
|
|
2279
|
+
/**
|
|
2280
|
+
* Which part of the request do we use to send the auth?
|
|
2281
|
+
*
|
|
2282
|
+
* @default 'header'
|
|
2283
|
+
*/
|
|
2284
|
+
in?: 'header' | 'query' | 'cookie';
|
|
2285
|
+
/**
|
|
2286
|
+
* Header or query parameter name.
|
|
2287
|
+
*
|
|
2288
|
+
* @default 'Authorization'
|
|
2289
|
+
*/
|
|
2290
|
+
name?: string;
|
|
2291
|
+
scheme?: 'basic' | 'bearer';
|
|
2292
|
+
type: 'apiKey' | 'http';
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
interface SerializerOptions<T> {
|
|
2296
|
+
/**
|
|
2297
|
+
* @default true
|
|
2298
|
+
*/
|
|
2299
|
+
explode: boolean;
|
|
2300
|
+
style: T;
|
|
2301
|
+
}
|
|
2302
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
2303
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
2304
|
+
|
|
2305
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
2306
|
+
type BodySerializer = (body: any) => any;
|
|
2307
|
+
type QuerySerializerOptionsObject = {
|
|
2308
|
+
allowReserved?: boolean;
|
|
2309
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
2310
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
2311
|
+
};
|
|
2312
|
+
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
2313
|
+
/**
|
|
2314
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
2315
|
+
* override the global array/object settings for specific parameter names.
|
|
2316
|
+
*/
|
|
2317
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
2321
|
+
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
2322
|
+
/**
|
|
2323
|
+
* Returns the final request URL.
|
|
2324
|
+
*/
|
|
2325
|
+
buildUrl: BuildUrlFn;
|
|
2326
|
+
getConfig: () => Config;
|
|
2327
|
+
request: RequestFn;
|
|
2328
|
+
setConfig: (config: Config) => Config;
|
|
2329
|
+
} & {
|
|
2330
|
+
[K in HttpMethod]: MethodFn;
|
|
2331
|
+
} & ([SseFn] extends [never] ? {
|
|
2332
|
+
sse?: never;
|
|
2333
|
+
} : {
|
|
2334
|
+
sse: {
|
|
2335
|
+
[K in HttpMethod]: SseFn;
|
|
2336
|
+
};
|
|
2337
|
+
});
|
|
2338
|
+
interface Config$1 {
|
|
2339
|
+
/**
|
|
2340
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
2341
|
+
* added to the request payload as defined by its `security` array.
|
|
2342
|
+
*/
|
|
2343
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
2344
|
+
/**
|
|
2345
|
+
* A function for serializing request body parameter. By default,
|
|
2346
|
+
* {@link JSON.stringify()} will be used.
|
|
2347
|
+
*/
|
|
2348
|
+
bodySerializer?: BodySerializer | null;
|
|
2349
|
+
/**
|
|
2350
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
2351
|
+
* `Headers` object with.
|
|
2352
|
+
*
|
|
2353
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
2354
|
+
*/
|
|
2355
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
2356
|
+
/**
|
|
2357
|
+
* The request method.
|
|
2358
|
+
*
|
|
2359
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
2360
|
+
*/
|
|
2361
|
+
method?: Uppercase<HttpMethod>;
|
|
2362
|
+
/**
|
|
2363
|
+
* A function for serializing request query parameters. By default, arrays
|
|
2364
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
2365
|
+
* style, and reserved characters are percent-encoded.
|
|
2366
|
+
*
|
|
2367
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
2368
|
+
* API function is used.
|
|
2369
|
+
*
|
|
2370
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
2371
|
+
*/
|
|
2372
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
2373
|
+
/**
|
|
2374
|
+
* A function validating request data. This is useful if you want to ensure
|
|
2375
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
2376
|
+
* the server.
|
|
2377
|
+
*/
|
|
2378
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
2379
|
+
/**
|
|
2380
|
+
* A function transforming response data before it's returned. This is useful
|
|
2381
|
+
* for post-processing data, e.g. converting ISO strings into Date objects.
|
|
2382
|
+
*/
|
|
2383
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
2384
|
+
/**
|
|
2385
|
+
* A function validating response data. This is useful if you want to ensure
|
|
2386
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
2387
|
+
* the transformers and returned to the user.
|
|
2388
|
+
*/
|
|
2389
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
2393
|
+
/**
|
|
2394
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
2395
|
+
* fetch instance.
|
|
2396
|
+
*
|
|
2397
|
+
* @default globalThis.fetch
|
|
2398
|
+
*/
|
|
2399
|
+
fetch?: typeof fetch;
|
|
2400
|
+
/**
|
|
2401
|
+
* Implementing clients can call request interceptors inside this hook.
|
|
2402
|
+
*/
|
|
2403
|
+
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
2404
|
+
/**
|
|
2405
|
+
* Callback invoked when a network or parsing error occurs during streaming.
|
|
2406
|
+
*
|
|
2407
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2408
|
+
*
|
|
2409
|
+
* @param error The error that occurred.
|
|
2410
|
+
*/
|
|
2411
|
+
onSseError?: (error: unknown) => void;
|
|
2412
|
+
/**
|
|
2413
|
+
* Callback invoked when an event is streamed from the server.
|
|
2414
|
+
*
|
|
2415
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2416
|
+
*
|
|
2417
|
+
* @param event Event streamed from the server.
|
|
2418
|
+
* @returns Nothing (void).
|
|
2419
|
+
*/
|
|
2420
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
2421
|
+
serializedBody?: RequestInit['body'];
|
|
2422
|
+
/**
|
|
2423
|
+
* Default retry delay in milliseconds.
|
|
2424
|
+
*
|
|
2425
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2426
|
+
*
|
|
2427
|
+
* @default 3000
|
|
2428
|
+
*/
|
|
2429
|
+
sseDefaultRetryDelay?: number;
|
|
2430
|
+
/**
|
|
2431
|
+
* Maximum number of retry attempts before giving up.
|
|
2432
|
+
*/
|
|
2433
|
+
sseMaxRetryAttempts?: number;
|
|
2434
|
+
/**
|
|
2435
|
+
* Maximum retry delay in milliseconds.
|
|
2436
|
+
*
|
|
2437
|
+
* Applies only when exponential backoff is used.
|
|
2438
|
+
*
|
|
2439
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
2440
|
+
*
|
|
2441
|
+
* @default 30000
|
|
2442
|
+
*/
|
|
2443
|
+
sseMaxRetryDelay?: number;
|
|
2444
|
+
/**
|
|
2445
|
+
* Optional sleep function for retry backoff.
|
|
2446
|
+
*
|
|
2447
|
+
* Defaults to using `setTimeout`.
|
|
2448
|
+
*/
|
|
2449
|
+
sseSleepFn?: (ms: number) => Promise<void>;
|
|
2450
|
+
url: string;
|
|
2451
|
+
};
|
|
2452
|
+
interface StreamEvent<TData = unknown> {
|
|
2453
|
+
data: TData;
|
|
2454
|
+
event?: string;
|
|
2455
|
+
id?: string;
|
|
2456
|
+
retry?: number;
|
|
2457
|
+
}
|
|
2458
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
2459
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
type ErrInterceptor<Err, Res, Options> = (error: Err, response: Res, options: Options) => Err | Promise<Err>;
|
|
2463
|
+
type ReqInterceptor<Options> = (options: Options) => void | Promise<void>;
|
|
2464
|
+
type ResInterceptor<Res, Options> = (response: Res, options: Options) => Res | Promise<Res>;
|
|
2465
|
+
declare class Interceptors<Interceptor> {
|
|
2466
|
+
fns: Array<Interceptor | null>;
|
|
2467
|
+
clear(): void;
|
|
2468
|
+
eject(id: number | Interceptor): void;
|
|
2469
|
+
exists(id: number | Interceptor): boolean;
|
|
2470
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
2471
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
2472
|
+
use(fn: Interceptor): number;
|
|
2473
|
+
}
|
|
2474
|
+
interface Middleware<Res, Err, Options> {
|
|
2475
|
+
error: Interceptors<ErrInterceptor<Err, Res, Options>>;
|
|
2476
|
+
request: Interceptors<ReqInterceptor<Options>>;
|
|
2477
|
+
response: Interceptors<ResInterceptor<Res, Options>>;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
2481
|
+
/**
|
|
2482
|
+
* Base URL for all requests made by this client.
|
|
2483
|
+
*/
|
|
2484
|
+
baseUrl?: T['baseUrl'];
|
|
2485
|
+
/**
|
|
2486
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
2487
|
+
* fetch instance.
|
|
2488
|
+
*
|
|
2489
|
+
* @default globalThis.fetch
|
|
2490
|
+
*/
|
|
2491
|
+
fetch?: typeof fetch;
|
|
2492
|
+
/**
|
|
2493
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
2494
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
2495
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
2496
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
2497
|
+
*
|
|
2498
|
+
* @default 'auto'
|
|
2499
|
+
*/
|
|
2500
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
2501
|
+
/**
|
|
2502
|
+
* Throw an error instead of returning it in the response?
|
|
2503
|
+
*
|
|
2504
|
+
* @default false
|
|
2505
|
+
*/
|
|
2506
|
+
throwOnError?: T['throwOnError'];
|
|
2507
|
+
}
|
|
2508
|
+
interface RequestOptions<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
2509
|
+
throwOnError: ThrowOnError;
|
|
2510
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
2511
|
+
/**
|
|
2512
|
+
* Any body that you want to add to your request.
|
|
2513
|
+
*
|
|
2514
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
2515
|
+
*/
|
|
2516
|
+
body?: unknown;
|
|
2517
|
+
path?: Record<string, unknown>;
|
|
2518
|
+
query?: Record<string, unknown>;
|
|
2519
|
+
/**
|
|
2520
|
+
* Security mechanism(s) to use for the request.
|
|
2521
|
+
*/
|
|
2522
|
+
security?: ReadonlyArray<Auth>;
|
|
2523
|
+
url: Url;
|
|
2524
|
+
}
|
|
2525
|
+
interface ResolvedRequestOptions<ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, ThrowOnError, Url> {
|
|
2526
|
+
serializedBody?: string;
|
|
2527
|
+
}
|
|
2528
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<{
|
|
2529
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
2530
|
+
response: Response;
|
|
2531
|
+
}> : Promise<({
|
|
2532
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
2533
|
+
error: undefined;
|
|
2534
|
+
} | {
|
|
2535
|
+
data: undefined;
|
|
2536
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
2537
|
+
}) & {
|
|
2538
|
+
response: Response;
|
|
2539
|
+
}>;
|
|
2540
|
+
interface ClientOptions {
|
|
2541
|
+
baseUrl?: string;
|
|
2542
|
+
throwOnError?: boolean;
|
|
2543
|
+
}
|
|
2544
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
|
|
2545
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
2546
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
|
|
2547
|
+
type BuildUrlFn = <TData extends {
|
|
2548
|
+
body?: unknown;
|
|
2549
|
+
path?: Record<string, unknown>;
|
|
2550
|
+
query?: Record<string, unknown>;
|
|
2551
|
+
url: string;
|
|
2552
|
+
}>(options: TData & Options$1<TData>) => string;
|
|
2553
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
2554
|
+
interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;
|
|
2555
|
+
};
|
|
2556
|
+
interface TDataShape {
|
|
2557
|
+
body?: unknown;
|
|
2558
|
+
headers?: unknown;
|
|
2559
|
+
path?: unknown;
|
|
2560
|
+
query?: unknown;
|
|
2561
|
+
url: string;
|
|
2562
|
+
}
|
|
2563
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
2564
|
+
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
2565
|
+
|
|
2566
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2567
|
+
/**
|
|
2568
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
2569
|
+
* individual options. This might be also useful if you want to implement a
|
|
2570
|
+
* custom client.
|
|
2571
|
+
*/
|
|
2572
|
+
client?: Client;
|
|
2573
|
+
/**
|
|
2574
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
2575
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
2576
|
+
*/
|
|
2577
|
+
meta?: Record<string, unknown>;
|
|
2578
|
+
};
|
|
2579
|
+
/**
|
|
2580
|
+
* Add credits to user
|
|
2581
|
+
*
|
|
2582
|
+
* Adds credits to a user's account. The settlement worker will handle on-chain enrollment when processing requests.
|
|
2583
|
+
*/
|
|
2584
|
+
declare const postApiV1AdminAddCredits: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminAddCreditsData, ThrowOnError>) => RequestResult<PostApiV1AdminAddCreditsResponses, PostApiV1AdminAddCreditsErrors, ThrowOnError>;
|
|
2585
|
+
/**
|
|
2586
|
+
* List all apps
|
|
2587
|
+
*
|
|
2588
|
+
* Returns all registered apps. Requires admin API key.
|
|
2589
|
+
*/
|
|
2590
|
+
declare const getApiV1AdminApps: <ThrowOnError extends boolean = false>(options: Options<GetApiV1AdminAppsData, ThrowOnError>) => RequestResult<GetApiV1AdminAppsResponses, GetApiV1AdminAppsErrors, ThrowOnError>;
|
|
2591
|
+
/**
|
|
2592
|
+
* Create app
|
|
2593
|
+
*
|
|
2594
|
+
* Creates a new app. Requires admin API key.
|
|
2595
|
+
*/
|
|
2596
|
+
declare const postApiV1AdminApps: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminAppsData, ThrowOnError>) => RequestResult<PostApiV1AdminAppsResponses, PostApiV1AdminAppsErrors, ThrowOnError>;
|
|
2597
|
+
/**
|
|
2598
|
+
* List API keys for an app
|
|
2599
|
+
*
|
|
2600
|
+
* Returns all API keys for the specified app. Requires admin API key.
|
|
2601
|
+
*/
|
|
2602
|
+
declare const getApiV1AdminAppsByAppIdApiKeys: <ThrowOnError extends boolean = false>(options: Options<GetApiV1AdminAppsByAppIdApiKeysData, ThrowOnError>) => RequestResult<GetApiV1AdminAppsByAppIdApiKeysResponses, GetApiV1AdminAppsByAppIdApiKeysErrors, ThrowOnError>;
|
|
2603
|
+
/**
|
|
2604
|
+
* Create API key
|
|
2605
|
+
*
|
|
2606
|
+
* Creates a new API key for an app. Requires admin API key.
|
|
2607
|
+
*/
|
|
2608
|
+
declare const postApiV1AdminAppsByAppIdApiKeys: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminAppsByAppIdApiKeysData, ThrowOnError>) => RequestResult<PostApiV1AdminAppsByAppIdApiKeysResponses, PostApiV1AdminAppsByAppIdApiKeysErrors, ThrowOnError>;
|
|
2609
|
+
/**
|
|
2610
|
+
* Delete API key
|
|
2611
|
+
*
|
|
2612
|
+
* Deletes an API key by ID. Requires admin API key.
|
|
2613
|
+
*/
|
|
2614
|
+
declare const deleteApiV1AdminAppsByAppIdApiKeysById: <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AdminAppsByAppIdApiKeysByIdData, ThrowOnError>) => RequestResult<DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses, DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors, ThrowOnError>;
|
|
2615
|
+
/**
|
|
2616
|
+
* Get API key by ID
|
|
2617
|
+
*
|
|
2618
|
+
* Returns a single API key by its ID with wallet balance details. Requires admin API key.
|
|
2619
|
+
*/
|
|
2620
|
+
declare const getApiV1AdminAppsByAppIdApiKeysById: <ThrowOnError extends boolean = false>(options: Options<GetApiV1AdminAppsByAppIdApiKeysByIdData, ThrowOnError>) => RequestResult<GetApiV1AdminAppsByAppIdApiKeysByIdResponses, GetApiV1AdminAppsByAppIdApiKeysByIdErrors, ThrowOnError>;
|
|
2621
|
+
/**
|
|
2622
|
+
* Update API key
|
|
2623
|
+
*
|
|
2624
|
+
* Updates an existing API key. Only provided fields are updated. Requires admin API key.
|
|
2625
|
+
*/
|
|
2626
|
+
declare const putApiV1AdminAppsByAppIdApiKeysById: <ThrowOnError extends boolean = false>(options: Options<PutApiV1AdminAppsByAppIdApiKeysByIdData, ThrowOnError>) => RequestResult<PutApiV1AdminAppsByAppIdApiKeysByIdResponses, PutApiV1AdminAppsByAppIdApiKeysByIdErrors, ThrowOnError>;
|
|
2627
|
+
/**
|
|
2628
|
+
* Delete app
|
|
2629
|
+
*
|
|
2630
|
+
* Deletes an app by ID. Requires admin API key.
|
|
2631
|
+
*/
|
|
2632
|
+
declare const deleteApiV1AdminAppsById: <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AdminAppsByIdData, ThrowOnError>) => RequestResult<DeleteApiV1AdminAppsByIdResponses, DeleteApiV1AdminAppsByIdErrors, ThrowOnError>;
|
|
2633
|
+
/**
|
|
2634
|
+
* Get app by ID
|
|
2635
|
+
*
|
|
2636
|
+
* Returns a single app by its ID. Requires admin API key.
|
|
2637
|
+
*/
|
|
2638
|
+
declare const getApiV1AdminAppsById: <ThrowOnError extends boolean = false>(options: Options<GetApiV1AdminAppsByIdData, ThrowOnError>) => RequestResult<GetApiV1AdminAppsByIdResponses, GetApiV1AdminAppsByIdErrors, ThrowOnError>;
|
|
2639
|
+
/**
|
|
2640
|
+
* Update app
|
|
2641
|
+
*
|
|
2642
|
+
* Updates an existing app. Only provided fields are updated. Requires admin API key.
|
|
2643
|
+
*/
|
|
2644
|
+
declare const putApiV1AdminAppsById: <ThrowOnError extends boolean = false>(options: Options<PutApiV1AdminAppsByIdData, ThrowOnError>) => RequestResult<PutApiV1AdminAppsByIdResponses, PutApiV1AdminAppsByIdErrors, ThrowOnError>;
|
|
2645
|
+
/**
|
|
2646
|
+
* Seed apps and API keys
|
|
2647
|
+
*
|
|
2648
|
+
* Seeds apps and their API keys into the database. Uses upsert - existing apps are updated. Requires admin API key.
|
|
2649
|
+
*/
|
|
2650
|
+
declare const postApiV1AdminSeedApps: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminSeedAppsData, ThrowOnError>) => RequestResult<PostApiV1AdminSeedAppsResponses, PostApiV1AdminSeedAppsErrors, ThrowOnError>;
|
|
2651
|
+
/**
|
|
2652
|
+
* Set user subscription tier
|
|
2653
|
+
*
|
|
2654
|
+
* Sets a user's subscription tier (basic or pro). Requires admin API key.
|
|
2655
|
+
*/
|
|
2656
|
+
declare const postApiV1AdminSubscriptionTier: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminSubscriptionTierData, ThrowOnError>) => RequestResult<PostApiV1AdminSubscriptionTierResponses, PostApiV1AdminSubscriptionTierErrors, ThrowOnError>;
|
|
2657
|
+
/**
|
|
2658
|
+
* Create chat completion
|
|
2659
|
+
*
|
|
2660
|
+
* Generates a chat completion using the configured gateway. Supports streaming when stream=true.
|
|
2661
|
+
*/
|
|
2662
|
+
declare const postApiV1ChatCompletions: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatCompletionsData, ThrowOnError>) => RequestResult<PostApiV1ChatCompletionsResponses, PostApiV1ChatCompletionsErrors, ThrowOnError>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Get configuration
|
|
2665
|
+
*
|
|
2666
|
+
* Returns public configuration including contract addresses and registered apps
|
|
2667
|
+
*/
|
|
2668
|
+
declare const getApiV1Config: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ConfigData, ThrowOnError>) => RequestResult<GetApiV1ConfigResponses, GetApiV1ConfigErrors, ThrowOnError>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Get credit balance
|
|
2671
|
+
*
|
|
2672
|
+
* Returns the credit balance and related information for the authenticated user. Optionally accepts X-Timezone header for accurate next claim time calculation.
|
|
2673
|
+
*/
|
|
2674
|
+
declare const getApiV1CreditsBalance: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1CreditsBalanceData, ThrowOnError>) => RequestResult<GetApiV1CreditsBalanceResponses, GetApiV1CreditsBalanceErrors, ThrowOnError>;
|
|
2675
|
+
/**
|
|
2676
|
+
* Claim daily credits
|
|
2677
|
+
*
|
|
2678
|
+
* Allows authenticated users to claim free daily credits. Limited to once per calendar day in user's timezone. Requires X-Timezone header with IANA timezone (e.g., "America/New_York").
|
|
2679
|
+
*/
|
|
2680
|
+
declare const postApiV1CreditsClaimDaily: <ThrowOnError extends boolean = false>(options?: Options<PostApiV1CreditsClaimDailyData, ThrowOnError>) => RequestResult<PostApiV1CreditsClaimDailyResponses, PostApiV1CreditsClaimDailyErrors, ThrowOnError>;
|
|
2681
|
+
/**
|
|
2682
|
+
* List available credit packs
|
|
2683
|
+
*
|
|
2684
|
+
* Returns available credit packs with prices fetched from Stripe. Pro users receive bonus credits on the same pack.
|
|
2685
|
+
*/
|
|
2686
|
+
declare const getApiV1CreditsPacks: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1CreditsPacksData, ThrowOnError>) => RequestResult<GetApiV1CreditsPacksResponses, GetApiV1CreditsPacksErrors, ThrowOnError>;
|
|
2687
|
+
/**
|
|
2688
|
+
* Create credit pack checkout session
|
|
2689
|
+
*
|
|
2690
|
+
* Creates a Stripe Checkout Session for purchasing a one-time credit pack and returns the checkout URL. Pro users are charged using the Pro product with bonus credits.
|
|
2691
|
+
*/
|
|
2692
|
+
declare const postApiV1CreditsPurchase: <ThrowOnError extends boolean = false>(options: Options<PostApiV1CreditsPurchaseData, ThrowOnError>) => RequestResult<PostApiV1CreditsPurchaseResponses, PostApiV1CreditsPurchaseErrors, ThrowOnError>;
|
|
2693
|
+
/**
|
|
2694
|
+
* Sync Snag points
|
|
2695
|
+
*
|
|
2696
|
+
* Queries Snag for the user's current loyalty points and converts any new points to Portal credits using the configured conversion rate.
|
|
2697
|
+
*/
|
|
2698
|
+
declare const postApiV1CreditsSyncSnag: <ThrowOnError extends boolean = false>(options?: Options<PostApiV1CreditsSyncSnagData, ThrowOnError>) => RequestResult<PostApiV1CreditsSyncSnagResponses, PostApiV1CreditsSyncSnagErrors, ThrowOnError>;
|
|
2699
|
+
/**
|
|
2700
|
+
* Get OpenAPI specification
|
|
2701
|
+
*
|
|
2702
|
+
* Returns the OpenAPI 3.1 specification for this API
|
|
2703
|
+
*/
|
|
2704
|
+
declare const getApiV1DocsSwaggerJson: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1DocsSwaggerJsonData, ThrowOnError>) => RequestResult<GetApiV1DocsSwaggerJsonResponses, unknown, ThrowOnError>;
|
|
2705
|
+
/**
|
|
2706
|
+
* Create embeddings
|
|
2707
|
+
*
|
|
2708
|
+
* Generates embeddings using the configured gateway.
|
|
2709
|
+
*/
|
|
2710
|
+
declare const postApiV1Embeddings: <ThrowOnError extends boolean = false>(options: Options<PostApiV1EmbeddingsData, ThrowOnError>) => RequestResult<PostApiV1EmbeddingsResponses, PostApiV1EmbeddingsErrors, ThrowOnError>;
|
|
2711
|
+
/**
|
|
2712
|
+
* List available models
|
|
2713
|
+
*
|
|
2714
|
+
* Returns a list of all available models from the configured gateway with optional filters. Models include modality information indicating their capabilities (e.g., llm, embedding, vision, image, audio, reasoning, code, reranker, multimodal, video).
|
|
2715
|
+
*/
|
|
2716
|
+
declare const getApiV1Models: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>) => RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>;
|
|
2717
|
+
/**
|
|
2718
|
+
* Create response
|
|
2719
|
+
*
|
|
2720
|
+
* Generates a response using the Responses API format. Supports streaming when stream=true.
|
|
2721
|
+
*/
|
|
2722
|
+
declare const postApiV1Responses: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>) => RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>;
|
|
2723
|
+
/**
|
|
2724
|
+
* Cancel subscription
|
|
2725
|
+
*
|
|
2726
|
+
* Cancels the user's subscription at the end of the current billing period (cancel_at_period_end)
|
|
2727
|
+
*/
|
|
2728
|
+
declare const postApiV1SubscriptionsCancel: <ThrowOnError extends boolean = false>(options?: Options<PostApiV1SubscriptionsCancelData, ThrowOnError>) => RequestResult<PostApiV1SubscriptionsCancelResponses, PostApiV1SubscriptionsCancelErrors, ThrowOnError>;
|
|
2729
|
+
/**
|
|
2730
|
+
* Create checkout session
|
|
2731
|
+
*
|
|
2732
|
+
* Creates a Stripe Checkout Session for Pro subscription and returns the checkout URL
|
|
2733
|
+
*/
|
|
2734
|
+
declare const postApiV1SubscriptionsCreateCheckoutSession: <ThrowOnError extends boolean = false>(options: Options<PostApiV1SubscriptionsCreateCheckoutSessionData, ThrowOnError>) => RequestResult<PostApiV1SubscriptionsCreateCheckoutSessionResponses, PostApiV1SubscriptionsCreateCheckoutSessionErrors, ThrowOnError>;
|
|
2735
|
+
/**
|
|
2736
|
+
* Create customer portal session
|
|
2737
|
+
*
|
|
2738
|
+
* Creates a Stripe Customer Portal session for managing subscription and returns the portal URL
|
|
2739
|
+
*/
|
|
2740
|
+
declare const postApiV1SubscriptionsCustomerPortal: <ThrowOnError extends boolean = false>(options: Options<PostApiV1SubscriptionsCustomerPortalData, ThrowOnError>) => RequestResult<PostApiV1SubscriptionsCustomerPortalResponses, PostApiV1SubscriptionsCustomerPortalErrors, ThrowOnError>;
|
|
2741
|
+
/**
|
|
2742
|
+
* Renew subscription
|
|
2743
|
+
*
|
|
2744
|
+
* Reactivates a subscription that was scheduled for cancellation (undoes cancel_at_period_end)
|
|
2745
|
+
*/
|
|
2746
|
+
declare const postApiV1SubscriptionsRenew: <ThrowOnError extends boolean = false>(options?: Options<PostApiV1SubscriptionsRenewData, ThrowOnError>) => RequestResult<PostApiV1SubscriptionsRenewResponses, PostApiV1SubscriptionsRenewErrors, ThrowOnError>;
|
|
2747
|
+
/**
|
|
2748
|
+
* Get subscription status
|
|
2749
|
+
*
|
|
2750
|
+
* Returns the current subscription status, plan, and billing period info
|
|
2751
|
+
*/
|
|
2752
|
+
declare const getApiV1SubscriptionsStatus: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1SubscriptionsStatusData, ThrowOnError>) => RequestResult<GetApiV1SubscriptionsStatusResponses, GetApiV1SubscriptionsStatusErrors, ThrowOnError>;
|
|
2753
|
+
/**
|
|
2754
|
+
* Handle Stripe webhook
|
|
2755
|
+
*
|
|
2756
|
+
* Receives and processes Stripe webhook events for subscription lifecycle management
|
|
2757
|
+
*/
|
|
2758
|
+
declare const postApiV1SubscriptionsWebhook: <ThrowOnError extends boolean = false>(options: Options<PostApiV1SubscriptionsWebhookData, ThrowOnError>) => RequestResult<PostApiV1SubscriptionsWebhookResponses, PostApiV1SubscriptionsWebhookErrors, ThrowOnError>;
|
|
2759
|
+
/**
|
|
2760
|
+
* Get available tasks
|
|
2761
|
+
*
|
|
2762
|
+
* Returns all active reward tasks that users can complete
|
|
2763
|
+
*/
|
|
2764
|
+
declare const getApiV1Tasks: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1TasksData, ThrowOnError>) => RequestResult<GetApiV1TasksResponses, GetApiV1TasksErrors, ThrowOnError>;
|
|
2765
|
+
/**
|
|
2766
|
+
* List available tools
|
|
2767
|
+
*
|
|
2768
|
+
* Returns a map of available MCP tool schemas indexed by tool name.
|
|
2769
|
+
*/
|
|
2770
|
+
declare const getApiV1Tools: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ToolsData, ThrowOnError>) => RequestResult<GetApiV1ToolsResponses, GetApiV1ToolsErrors, ThrowOnError>;
|
|
2771
|
+
/**
|
|
2772
|
+
* Exchange authorization code for tokens
|
|
2773
|
+
*
|
|
2774
|
+
* Exchanges an OAuth authorization code for access and refresh tokens
|
|
2775
|
+
*/
|
|
2776
|
+
declare const postAuthOauthByProviderExchange: <ThrowOnError extends boolean = false>(options: Options<PostAuthOauthByProviderExchangeData, ThrowOnError>) => RequestResult<PostAuthOauthByProviderExchangeResponses, PostAuthOauthByProviderExchangeErrors, ThrowOnError>;
|
|
2777
|
+
/**
|
|
2778
|
+
* Refresh access token
|
|
2779
|
+
*
|
|
2780
|
+
* Refreshes an expired access token using a refresh token
|
|
2781
|
+
*/
|
|
2782
|
+
declare const postAuthOauthByProviderRefresh: <ThrowOnError extends boolean = false>(options: Options<PostAuthOauthByProviderRefreshData, ThrowOnError>) => RequestResult<PostAuthOauthByProviderRefreshResponses, PostAuthOauthByProviderRefreshErrors, ThrowOnError>;
|
|
2783
|
+
/**
|
|
2784
|
+
* Revoke OAuth token
|
|
2785
|
+
*
|
|
2786
|
+
* Revokes an OAuth access or refresh token
|
|
2787
|
+
*/
|
|
2788
|
+
declare const postAuthOauthByProviderRevoke: <ThrowOnError extends boolean = false>(options: Options<PostAuthOauthByProviderRevokeData, ThrowOnError>) => RequestResult<PostAuthOauthByProviderRevokeResponses, PostAuthOauthByProviderRevokeErrors, ThrowOnError>;
|
|
2789
|
+
/**
|
|
2790
|
+
* Health check
|
|
2791
|
+
*
|
|
2792
|
+
* Returns the current health status of the service.
|
|
2793
|
+
*/
|
|
2794
|
+
declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
|
|
2795
|
+
|
|
2796
|
+
export { type ClientOptions$1 as ClientOptions, type DeleteApiV1AdminAppsByAppIdApiKeysByIdData, type DeleteApiV1AdminAppsByAppIdApiKeysByIdError, type DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponse, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses, type DeleteApiV1AdminAppsByIdData, type DeleteApiV1AdminAppsByIdError, type DeleteApiV1AdminAppsByIdErrors, type DeleteApiV1AdminAppsByIdResponse, type DeleteApiV1AdminAppsByIdResponses, type GetApiV1AdminAppsByAppIdApiKeysByIdData, type GetApiV1AdminAppsByAppIdApiKeysByIdError, type GetApiV1AdminAppsByAppIdApiKeysByIdErrors, type GetApiV1AdminAppsByAppIdApiKeysByIdResponse, type GetApiV1AdminAppsByAppIdApiKeysByIdResponses, type GetApiV1AdminAppsByAppIdApiKeysData, type GetApiV1AdminAppsByAppIdApiKeysError, type GetApiV1AdminAppsByAppIdApiKeysErrors, type GetApiV1AdminAppsByAppIdApiKeysResponse, type GetApiV1AdminAppsByAppIdApiKeysResponses, type GetApiV1AdminAppsByIdData, type GetApiV1AdminAppsByIdError, type GetApiV1AdminAppsByIdErrors, type GetApiV1AdminAppsByIdResponse, type GetApiV1AdminAppsByIdResponses, type GetApiV1AdminAppsData, type GetApiV1AdminAppsError, type GetApiV1AdminAppsErrors, type GetApiV1AdminAppsResponse, type GetApiV1AdminAppsResponses, type GetApiV1ConfigData, type GetApiV1ConfigError, type GetApiV1ConfigErrors, type GetApiV1ConfigResponse, type GetApiV1ConfigResponses, type GetApiV1CreditsBalanceData, type GetApiV1CreditsBalanceError, type GetApiV1CreditsBalanceErrors, type GetApiV1CreditsBalanceResponse, type GetApiV1CreditsBalanceResponses, type GetApiV1CreditsPacksData, type GetApiV1CreditsPacksError, type GetApiV1CreditsPacksErrors, type GetApiV1CreditsPacksResponse, type GetApiV1CreditsPacksResponses, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetApiV1SubscriptionsStatusData, type GetApiV1SubscriptionsStatusError, type GetApiV1SubscriptionsStatusErrors, type GetApiV1SubscriptionsStatusResponse, type GetApiV1SubscriptionsStatusResponses, type GetApiV1TasksData, type GetApiV1TasksError, type GetApiV1TasksErrors, type GetApiV1TasksResponse, type GetApiV1TasksResponses, type GetApiV1ToolsData, type GetApiV1ToolsError, type GetApiV1ToolsErrors, type GetApiV1ToolsResponse, type GetApiV1ToolsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersAddCreditsRequest, type HandlersAddCreditsResponse, type HandlersApiKeyResponse, type HandlersApiKeyWithKeyResponse, type HandlersAppConfig, type HandlersAppResponse, type HandlersCancelSubscriptionResponse, type HandlersCheckoutSessionResponse, type HandlersClaimDailyCreditsResponse, type HandlersConfigResponse, type HandlersCreateApiKeyRequest, type HandlersCreateAppRequest, type HandlersCreateCheckoutSessionRequest, type HandlersCreateCreditPackCheckoutRequest, type HandlersCreateCustomerPortalRequest, type HandlersCreditBalanceResponse, type HandlersCreditPack, type HandlersCreditPacksResponse, type HandlersCustomerPortalResponse, type HandlersExchangeRequest, type HandlersGeneratedApiKey, type HandlersGetToolsResponse, type HandlersHealthResponse, type HandlersListApiKeysResponse, type HandlersListAppsResponse, type HandlersRefreshRequest, type HandlersRenewSubscriptionResponse, type HandlersRevokeRequest, type HandlersSeedApiKeyInput, type HandlersSeedAppInput, type HandlersSeedAppsRequest, type HandlersSeedAppsResponse, type HandlersSetSubscriptionTierRequest, type HandlersSetSubscriptionTierResponse, type HandlersSubscriptionStatusResponse, type HandlersSyncSnagResponse, type HandlersTaskResponse, type HandlersTokenResponse, type HandlersTool, type HandlersUpdateApiKeyRequest, type HandlersUpdateAppRequest, type HandlersWalletDetails, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionTool, type LlmapiChatCompletionToolChoice, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiMcpTool, type LlmapiMessage, type LlmapiMessageContentFile, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiResponseExtraFields, type LlmapiResponseInput, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseReasoning, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseTool, type LlmapiResponseToolChoice, type LlmapiResponseUsage, type LlmapiRole, type LlmapiThinkingOptions, type LlmapiToolCall, type LlmapiToolCallEvent, type LlmapiToolCallFunction, type McpToolSchema, type Options, type PostApiV1AdminAddCreditsData, type PostApiV1AdminAddCreditsError, type PostApiV1AdminAddCreditsErrors, type PostApiV1AdminAddCreditsResponse, type PostApiV1AdminAddCreditsResponses, type PostApiV1AdminAppsByAppIdApiKeysData, type PostApiV1AdminAppsByAppIdApiKeysError, type PostApiV1AdminAppsByAppIdApiKeysErrors, type PostApiV1AdminAppsByAppIdApiKeysResponse, type PostApiV1AdminAppsByAppIdApiKeysResponses, type PostApiV1AdminAppsData, type PostApiV1AdminAppsError, type PostApiV1AdminAppsErrors, type PostApiV1AdminAppsResponse, type PostApiV1AdminAppsResponses, type PostApiV1AdminSeedAppsData, type PostApiV1AdminSeedAppsError, type PostApiV1AdminSeedAppsErrors, type PostApiV1AdminSeedAppsResponse, type PostApiV1AdminSeedAppsResponses, type PostApiV1AdminSubscriptionTierData, type PostApiV1AdminSubscriptionTierError, type PostApiV1AdminSubscriptionTierErrors, type PostApiV1AdminSubscriptionTierResponse, type PostApiV1AdminSubscriptionTierResponses, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1CreditsClaimDailyData, type PostApiV1CreditsClaimDailyError, type PostApiV1CreditsClaimDailyErrors, type PostApiV1CreditsClaimDailyResponse, type PostApiV1CreditsClaimDailyResponses, type PostApiV1CreditsPurchaseData, type PostApiV1CreditsPurchaseError, type PostApiV1CreditsPurchaseErrors, type PostApiV1CreditsPurchaseResponse, type PostApiV1CreditsPurchaseResponses, type PostApiV1CreditsSyncSnagData, type PostApiV1CreditsSyncSnagError, type PostApiV1CreditsSyncSnagErrors, type PostApiV1CreditsSyncSnagResponse, type PostApiV1CreditsSyncSnagResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SubscriptionsCancelData, type PostApiV1SubscriptionsCancelError, type PostApiV1SubscriptionsCancelErrors, type PostApiV1SubscriptionsCancelResponse, type PostApiV1SubscriptionsCancelResponses, type PostApiV1SubscriptionsCreateCheckoutSessionData, type PostApiV1SubscriptionsCreateCheckoutSessionError, type PostApiV1SubscriptionsCreateCheckoutSessionErrors, type PostApiV1SubscriptionsCreateCheckoutSessionResponse, type PostApiV1SubscriptionsCreateCheckoutSessionResponses, type PostApiV1SubscriptionsCustomerPortalData, type PostApiV1SubscriptionsCustomerPortalError, type PostApiV1SubscriptionsCustomerPortalErrors, type PostApiV1SubscriptionsCustomerPortalResponse, type PostApiV1SubscriptionsCustomerPortalResponses, type PostApiV1SubscriptionsRenewData, type PostApiV1SubscriptionsRenewError, type PostApiV1SubscriptionsRenewErrors, type PostApiV1SubscriptionsRenewResponse, type PostApiV1SubscriptionsRenewResponses, type PostApiV1SubscriptionsWebhookData, type PostApiV1SubscriptionsWebhookError, type PostApiV1SubscriptionsWebhookErrors, type PostApiV1SubscriptionsWebhookResponse, type PostApiV1SubscriptionsWebhookResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type PutApiV1AdminAppsByAppIdApiKeysByIdData, type PutApiV1AdminAppsByAppIdApiKeysByIdError, type PutApiV1AdminAppsByAppIdApiKeysByIdErrors, type PutApiV1AdminAppsByAppIdApiKeysByIdResponse, type PutApiV1AdminAppsByAppIdApiKeysByIdResponses, type PutApiV1AdminAppsByIdData, type PutApiV1AdminAppsByIdError, type PutApiV1AdminAppsByIdErrors, type PutApiV1AdminAppsByIdResponse, type PutApiV1AdminAppsByIdResponses, type ResponseErrorResponse, deleteApiV1AdminAppsByAppIdApiKeysById, deleteApiV1AdminAppsById, getApiV1AdminApps, getApiV1AdminAppsByAppIdApiKeys, getApiV1AdminAppsByAppIdApiKeysById, getApiV1AdminAppsById, getApiV1Config, getApiV1CreditsBalance, getApiV1CreditsPacks, getApiV1DocsSwaggerJson, getApiV1Models, getApiV1SubscriptionsStatus, getApiV1Tasks, getApiV1Tools, getHealth, postApiV1AdminAddCredits, postApiV1AdminApps, postApiV1AdminAppsByAppIdApiKeys, postApiV1AdminSeedApps, postApiV1AdminSubscriptionTier, postApiV1ChatCompletions, postApiV1CreditsClaimDaily, postApiV1CreditsPurchase, postApiV1CreditsSyncSnag, postApiV1Embeddings, postApiV1Responses, postApiV1SubscriptionsCancel, postApiV1SubscriptionsCreateCheckoutSession, postApiV1SubscriptionsCustomerPortal, postApiV1SubscriptionsRenew, postApiV1SubscriptionsWebhook, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke, putApiV1AdminAppsByAppIdApiKeysById, putApiV1AdminAppsById };
|