@gpt-core/client 0.9.0 → 0.9.1

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/dist/index.cjs ADDED
@@ -0,0 +1,4043 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AgentCreateSchema: () => AgentCreateSchema,
24
+ ApiKeyAllocateSchema: () => ApiKeyAllocateSchema,
25
+ ApiKeyCreateSchema: () => ApiKeyCreateSchema,
26
+ ApplicationCreateSchema: () => ApplicationCreateSchema,
27
+ AuthenticationError: () => AuthenticationError,
28
+ AuthorizationError: () => AuthorizationError,
29
+ BucketCreateSchema: () => BucketCreateSchema,
30
+ DEFAULT_RETRY_CONFIG: () => DEFAULT_RETRY_CONFIG,
31
+ DocumentUploadBase64Schema: () => DocumentUploadBase64Schema,
32
+ EmbedRequestSchema: () => EmbedRequestSchema,
33
+ GptCoreError: () => GptCoreError,
34
+ InvitationCreateSchema: () => InvitationCreateSchema,
35
+ LoginRequestSchema: () => LoginRequestSchema,
36
+ MessageSendSchema: () => MessageSendSchema,
37
+ NetworkError: () => NetworkError,
38
+ NotFoundError: () => NotFoundError,
39
+ PresignedDownloadSchema: () => PresignedDownloadSchema,
40
+ PresignedUploadSchema: () => PresignedUploadSchema,
41
+ RateLimitError: () => RateLimitError,
42
+ RegisterRequestSchema: () => RegisterRequestSchema,
43
+ SearchRequestSchema: () => SearchRequestSchema,
44
+ ServerError: () => ServerError,
45
+ ThreadCreateSchema: () => ThreadCreateSchema,
46
+ TimeoutError: () => TimeoutError,
47
+ ValidationError: () => ValidationError,
48
+ WorkspaceCreateSchema: () => WorkspaceCreateSchema,
49
+ calculateBackoff: () => calculateBackoff,
50
+ client: () => client,
51
+ collectStreamedMessage: () => collectStreamedMessage,
52
+ deleteAgentsById: () => deleteAgentsById,
53
+ deleteAiConversationsById: () => deleteAiConversationsById,
54
+ deleteAiGraphEdgesById: () => deleteAiGraphEdgesById,
55
+ deleteAiGraphNodesById: () => deleteAiGraphNodesById,
56
+ deleteApiKeysById: () => deleteApiKeysById,
57
+ deleteApplicationsById: () => deleteApplicationsById,
58
+ deleteBucketsById: () => deleteBucketsById,
59
+ deleteExtractionDocumentsById: () => deleteExtractionDocumentsById,
60
+ deleteExtractionSchemaFieldsById: () => deleteExtractionSchemaFieldsById,
61
+ deleteFieldTemplatesById: () => deleteFieldTemplatesById,
62
+ deleteMessagesById: () => deleteMessagesById,
63
+ deleteNotificationMethodsById: () => deleteNotificationMethodsById,
64
+ deleteNotificationPreferencesById: () => deleteNotificationPreferencesById,
65
+ deleteObjectsById: () => deleteObjectsById,
66
+ deleteSearchSavedById: () => deleteSearchSavedById,
67
+ deleteTenantMembershipsByTenantIdByUserId: () => deleteTenantMembershipsByTenantIdByUserId,
68
+ deleteTenantsById: () => deleteTenantsById,
69
+ deleteThreadsById: () => deleteThreadsById,
70
+ deleteTrainingExamplesById: () => deleteTrainingExamplesById,
71
+ deleteTrainingSessionsById: () => deleteTrainingSessionsById,
72
+ deleteUserProfilesById: () => deleteUserProfilesById,
73
+ deleteWebhookConfigsById: () => deleteWebhookConfigsById,
74
+ deleteWorkspaceMembershipsByWorkspaceIdByUserId: () => deleteWorkspaceMembershipsByWorkspaceIdByUserId,
75
+ deleteWorkspacesById: () => deleteWorkspacesById,
76
+ getAgentVersions: () => getAgentVersions,
77
+ getAgentVersionsById: () => getAgentVersionsById,
78
+ getAgents: () => getAgents,
79
+ getAgentsById: () => getAgentsById,
80
+ getAgentsByIdTrainingStats: () => getAgentsByIdTrainingStats,
81
+ getAiChunksDocumentByDocumentId: () => getAiChunksDocumentByDocumentId,
82
+ getAiConversations: () => getAiConversations,
83
+ getAiConversationsById: () => getAiConversationsById,
84
+ getAiGraphEdges: () => getAiGraphEdges,
85
+ getAiGraphNodes: () => getAiGraphNodes,
86
+ getAiMessages: () => getAiMessages,
87
+ getApiKeys: () => getApiKeys,
88
+ getApiKeysById: () => getApiKeysById,
89
+ getApplications: () => getApplications,
90
+ getApplicationsById: () => getApplicationsById,
91
+ getApplicationsBySlugBySlug: () => getApplicationsBySlugBySlug,
92
+ getAuditLogs: () => getAuditLogs,
93
+ getBuckets: () => getBuckets,
94
+ getBucketsById: () => getBucketsById,
95
+ getBucketsByIdObjects: () => getBucketsByIdObjects,
96
+ getBucketsByIdStats: () => getBucketsByIdStats,
97
+ getConfigs: () => getConfigs,
98
+ getCreditPackages: () => getCreditPackages,
99
+ getCreditPackagesById: () => getCreditPackagesById,
100
+ getCreditPackagesSlugBySlug: () => getCreditPackagesSlugBySlug,
101
+ getDocumentsStats: () => getDocumentsStats,
102
+ getExtractionBatchesById: () => getExtractionBatchesById,
103
+ getExtractionBatchesByIdUploadUrls: () => getExtractionBatchesByIdUploadUrls,
104
+ getExtractionBatchesWorkspaceByWorkspaceId: () => getExtractionBatchesWorkspaceByWorkspaceId,
105
+ getExtractionDocuments: () => getExtractionDocuments,
106
+ getExtractionDocumentsById: () => getExtractionDocumentsById,
107
+ getExtractionDocumentsByIdStatus: () => getExtractionDocumentsByIdStatus,
108
+ getExtractionDocumentsByIdView: () => getExtractionDocumentsByIdView,
109
+ getExtractionDocumentsWorkspaceByWorkspaceId: () => getExtractionDocumentsWorkspaceByWorkspaceId,
110
+ getExtractionDocumentsWorkspaceByWorkspaceIdExcluded: () => getExtractionDocumentsWorkspaceByWorkspaceIdExcluded,
111
+ getExtractionDocumentsWorkspaceByWorkspaceIdReviewQueue: () => getExtractionDocumentsWorkspaceByWorkspaceIdReviewQueue,
112
+ getExtractionResultsById: () => getExtractionResultsById,
113
+ getExtractionResultsDocumentByDocumentId: () => getExtractionResultsDocumentByDocumentId,
114
+ getExtractionSchemaFields: () => getExtractionSchemaFields,
115
+ getExtractionSchemaFieldsById: () => getExtractionSchemaFieldsById,
116
+ getExtractionSchemas: () => getExtractionSchemas,
117
+ getExtractionSchemasById: () => getExtractionSchemasById,
118
+ getExtractionSchemasWorkspaceByWorkspaceId: () => getExtractionSchemasWorkspaceByWorkspaceId,
119
+ getFieldTemplates: () => getFieldTemplates,
120
+ getFieldTemplatesById: () => getFieldTemplatesById,
121
+ getInvitations: () => getInvitations,
122
+ getInvitationsConsumeByToken: () => getInvitationsConsumeByToken,
123
+ getLlmAnalytics: () => getLlmAnalytics,
124
+ getLlmAnalyticsById: () => getLlmAnalyticsById,
125
+ getLlmAnalyticsCosts: () => getLlmAnalyticsCosts,
126
+ getLlmAnalyticsPlatform: () => getLlmAnalyticsPlatform,
127
+ getLlmAnalyticsSummary: () => getLlmAnalyticsSummary,
128
+ getLlmAnalyticsUsage: () => getLlmAnalyticsUsage,
129
+ getLlmAnalyticsWorkspace: () => getLlmAnalyticsWorkspace,
130
+ getMessages: () => getMessages,
131
+ getMessagesById: () => getMessagesById,
132
+ getMessagesSearch: () => getMessagesSearch,
133
+ getNotificationLogs: () => getNotificationLogs,
134
+ getNotificationLogsById: () => getNotificationLogsById,
135
+ getNotificationMethods: () => getNotificationMethods,
136
+ getNotificationMethodsById: () => getNotificationMethodsById,
137
+ getNotificationPreferences: () => getNotificationPreferences,
138
+ getNotificationPreferencesById: () => getNotificationPreferencesById,
139
+ getObjects: () => getObjects,
140
+ getObjectsById: () => getObjectsById,
141
+ getPlans: () => getPlans,
142
+ getPlansById: () => getPlansById,
143
+ getPlansSlugBySlug: () => getPlansSlugBySlug,
144
+ getSearch: () => getSearch,
145
+ getSearchHealth: () => getSearchHealth,
146
+ getSearchIndexes: () => getSearchIndexes,
147
+ getSearchSaved: () => getSearchSaved,
148
+ getSearchSemantic: () => getSearchSemantic,
149
+ getSearchStats: () => getSearchStats,
150
+ getSearchStatus: () => getSearchStatus,
151
+ getStorageStats: () => getStorageStats,
152
+ getTenantMemberships: () => getTenantMemberships,
153
+ getTenants: () => getTenants,
154
+ getTenantsById: () => getTenantsById,
155
+ getTenantsByTenantIdDocumentStats: () => getTenantsByTenantIdDocumentStats,
156
+ getTenantsByTenantIdStats: () => getTenantsByTenantIdStats,
157
+ getTenantsByTenantIdWorkspaceStats: () => getTenantsByTenantIdWorkspaceStats,
158
+ getThreads: () => getThreads,
159
+ getThreadsById: () => getThreadsById,
160
+ getThreadsSearch: () => getThreadsSearch,
161
+ getTrainingExamples: () => getTrainingExamples,
162
+ getTrainingExamplesById: () => getTrainingExamplesById,
163
+ getTrainingSessionsAgentsByAgentIdSessions: () => getTrainingSessionsAgentsByAgentIdSessions,
164
+ getTrainingSessionsById: () => getTrainingSessionsById,
165
+ getTransactions: () => getTransactions,
166
+ getTransactionsById: () => getTransactionsById,
167
+ getUserProfiles: () => getUserProfiles,
168
+ getUserProfilesById: () => getUserProfilesById,
169
+ getUserProfilesMe: () => getUserProfilesMe,
170
+ getUsers: () => getUsers,
171
+ getUsersById: () => getUsersById,
172
+ getUsersMe: () => getUsersMe,
173
+ getWallet: () => getWallet,
174
+ getWebhookConfigs: () => getWebhookConfigs,
175
+ getWebhookConfigsById: () => getWebhookConfigsById,
176
+ getWebhookDeliveries: () => getWebhookDeliveries,
177
+ getWebhookDeliveriesById: () => getWebhookDeliveriesById,
178
+ getWorkspaceMemberships: () => getWorkspaceMemberships,
179
+ getWorkspaces: () => getWorkspaces,
180
+ getWorkspacesById: () => getWorkspacesById,
181
+ getWorkspacesByWorkspaceIdExtractionExports: () => getWorkspacesByWorkspaceIdExtractionExports,
182
+ getWorkspacesByWorkspaceIdExtractionExportsById: () => getWorkspacesByWorkspaceIdExtractionExportsById,
183
+ getWorkspacesByWorkspaceIdTrainingAnalytics: () => getWorkspacesByWorkspaceIdTrainingAnalytics,
184
+ getWorkspacesMine: () => getWorkspacesMine,
185
+ handleApiError: () => handleApiError,
186
+ isRetryableError: () => isRetryableError,
187
+ paginateAll: () => paginateAll,
188
+ paginateToArray: () => paginateToArray,
189
+ patchAgentsById: () => patchAgentsById,
190
+ patchApiKeysById: () => patchApiKeysById,
191
+ patchApiKeysByIdAllocate: () => patchApiKeysByIdAllocate,
192
+ patchApiKeysByIdRevoke: () => patchApiKeysByIdRevoke,
193
+ patchApiKeysByIdRotate: () => patchApiKeysByIdRotate,
194
+ patchApplicationsById: () => patchApplicationsById,
195
+ patchApplicationsByIdGrantCredits: () => patchApplicationsByIdGrantCredits,
196
+ patchBucketsById: () => patchBucketsById,
197
+ patchConfigsByKey: () => patchConfigsByKey,
198
+ patchExtractionDocumentsByIdExclude: () => patchExtractionDocumentsByIdExclude,
199
+ patchExtractionDocumentsByIdFinishUpload: () => patchExtractionDocumentsByIdFinishUpload,
200
+ patchExtractionDocumentsByIdInclude: () => patchExtractionDocumentsByIdInclude,
201
+ patchExtractionDocumentsByIdRestore: () => patchExtractionDocumentsByIdRestore,
202
+ patchExtractionDocumentsByIdStatus: () => patchExtractionDocumentsByIdStatus,
203
+ patchExtractionResultsByIdCorrections: () => patchExtractionResultsByIdCorrections,
204
+ patchExtractionResultsByIdRegenerate: () => patchExtractionResultsByIdRegenerate,
205
+ patchExtractionSchemaFieldsById: () => patchExtractionSchemaFieldsById,
206
+ patchExtractionSchemasById: () => patchExtractionSchemasById,
207
+ patchExtractionSchemasByIdActivate: () => patchExtractionSchemasByIdActivate,
208
+ patchExtractionSchemasByIdFields: () => patchExtractionSchemasByIdFields,
209
+ patchInvitationsByIdAccept: () => patchInvitationsByIdAccept,
210
+ patchInvitationsByIdResend: () => patchInvitationsByIdResend,
211
+ patchInvitationsByIdRevoke: () => patchInvitationsByIdRevoke,
212
+ patchMessagesById: () => patchMessagesById,
213
+ patchNotificationMethodsById: () => patchNotificationMethodsById,
214
+ patchNotificationMethodsByIdSetPrimary: () => patchNotificationMethodsByIdSetPrimary,
215
+ patchNotificationPreferencesById: () => patchNotificationPreferencesById,
216
+ patchTenantMembershipsByTenantIdByUserId: () => patchTenantMembershipsByTenantIdByUserId,
217
+ patchTenantsById: () => patchTenantsById,
218
+ patchThreadsById: () => patchThreadsById,
219
+ patchTrainingExamplesById: () => patchTrainingExamplesById,
220
+ patchUserProfilesById: () => patchUserProfilesById,
221
+ patchUsersAuthResetPassword: () => patchUsersAuthResetPassword,
222
+ patchUsersByIdAdmin: () => patchUsersByIdAdmin,
223
+ patchUsersByIdAdminEmail: () => patchUsersByIdAdminEmail,
224
+ patchUsersByIdConfirmEmail: () => patchUsersByIdConfirmEmail,
225
+ patchUsersByIdResetPassword: () => patchUsersByIdResetPassword,
226
+ patchWalletAddons: () => patchWalletAddons,
227
+ patchWalletAddonsByAddonSlugCancel: () => patchWalletAddonsByAddonSlugCancel,
228
+ patchWalletCredits: () => patchWalletCredits,
229
+ patchWalletPlan: () => patchWalletPlan,
230
+ patchWebhookConfigsById: () => patchWebhookConfigsById,
231
+ patchWebhookConfigsByIdRotateSecret: () => patchWebhookConfigsByIdRotateSecret,
232
+ patchWorkspaceMembershipsByWorkspaceIdByUserId: () => patchWorkspaceMembershipsByWorkspaceIdByUserId,
233
+ patchWorkspacesById: () => patchWorkspacesById,
234
+ patchWorkspacesByIdAllocate: () => patchWorkspacesByIdAllocate,
235
+ postAgentVersions: () => postAgentVersions,
236
+ postAgents: () => postAgents,
237
+ postAgentsByIdClone: () => postAgentsByIdClone,
238
+ postAgentsByIdPublishVersion: () => postAgentsByIdPublishVersion,
239
+ postAgentsByIdTeach: () => postAgentsByIdTeach,
240
+ postAgentsByIdTest: () => postAgentsByIdTest,
241
+ postAgentsByIdValidate: () => postAgentsByIdValidate,
242
+ postAgentsCloneForWorkspace: () => postAgentsCloneForWorkspace,
243
+ postAgentsPredict: () => postAgentsPredict,
244
+ postAiChunksSearch: () => postAiChunksSearch,
245
+ postAiConversations: () => postAiConversations,
246
+ postAiEmbed: () => postAiEmbed,
247
+ postAiGraphEdges: () => postAiGraphEdges,
248
+ postAiGraphNodes: () => postAiGraphNodes,
249
+ postAiMessages: () => postAiMessages,
250
+ postAiSearch: () => postAiSearch,
251
+ postAiSearchAdvanced: () => postAiSearchAdvanced,
252
+ postApiKeys: () => postApiKeys,
253
+ postApplications: () => postApplications,
254
+ postBuckets: () => postBuckets,
255
+ postConfigs: () => postConfigs,
256
+ postDocumentsBulkDelete: () => postDocumentsBulkDelete,
257
+ postDocumentsPresignedUpload: () => postDocumentsPresignedUpload,
258
+ postExtractionBatches: () => postExtractionBatches,
259
+ postExtractionDocumentsBeginUpload: () => postExtractionDocumentsBeginUpload,
260
+ postExtractionDocumentsUpload: () => postExtractionDocumentsUpload,
261
+ postExtractionResults: () => postExtractionResults,
262
+ postExtractionSchemaFields: () => postExtractionSchemaFields,
263
+ postExtractionSchemas: () => postExtractionSchemas,
264
+ postExtractionSchemasBulkCreate: () => postExtractionSchemasBulkCreate,
265
+ postFieldTemplates: () => postFieldTemplates,
266
+ postInvitationsAcceptByToken: () => postInvitationsAcceptByToken,
267
+ postInvitationsInvite: () => postInvitationsInvite,
268
+ postLlmAnalytics: () => postLlmAnalytics,
269
+ postMessages: () => postMessages,
270
+ postNotificationMethods: () => postNotificationMethods,
271
+ postNotificationPreferences: () => postNotificationPreferences,
272
+ postObjectsBulkDestroy: () => postObjectsBulkDestroy,
273
+ postObjectsRegister: () => postObjectsRegister,
274
+ postPayments: () => postPayments,
275
+ postSearchReindex: () => postSearchReindex,
276
+ postSearchSaved: () => postSearchSaved,
277
+ postStorageSignDownload: () => postStorageSignDownload,
278
+ postStorageSignUpload: () => postStorageSignUpload,
279
+ postTenantMemberships: () => postTenantMemberships,
280
+ postTenants: () => postTenants,
281
+ postTenantsByIdBuyStorage: () => postTenantsByIdBuyStorage,
282
+ postTenantsByIdCredit: () => postTenantsByIdCredit,
283
+ postTenantsByIdRemoveStorage: () => postTenantsByIdRemoveStorage,
284
+ postTenantsIsv: () => postTenantsIsv,
285
+ postThreads: () => postThreads,
286
+ postThreadsActive: () => postThreadsActive,
287
+ postThreadsByIdMessages: () => postThreadsByIdMessages,
288
+ postThreadsByIdSummarize: () => postThreadsByIdSummarize,
289
+ postTokens: () => postTokens,
290
+ postTrainingExamples: () => postTrainingExamples,
291
+ postTrainingExamplesBulk: () => postTrainingExamplesBulk,
292
+ postTrainingExamplesBulkDelete: () => postTrainingExamplesBulkDelete,
293
+ postTrainingExamplesSearch: () => postTrainingExamplesSearch,
294
+ postUserProfiles: () => postUserProfiles,
295
+ postUsersAuthConfirm: () => postUsersAuthConfirm,
296
+ postUsersAuthLogin: () => postUsersAuthLogin,
297
+ postUsersAuthMagicLinkLogin: () => postUsersAuthMagicLinkLogin,
298
+ postUsersAuthMagicLinkRequest: () => postUsersAuthMagicLinkRequest,
299
+ postUsersAuthRegister: () => postUsersAuthRegister,
300
+ postUsersAuthRegisterWithOidc: () => postUsersAuthRegisterWithOidc,
301
+ postUsersRegisterIsv: () => postUsersRegisterIsv,
302
+ postWebhookConfigs: () => postWebhookConfigs,
303
+ postWebhookConfigsByIdTest: () => postWebhookConfigsByIdTest,
304
+ postWebhookDeliveriesByIdRetry: () => postWebhookDeliveriesByIdRetry,
305
+ postWorkspaceMemberships: () => postWorkspaceMemberships,
306
+ postWorkspaces: () => postWorkspaces,
307
+ postWorkspacesByWorkspaceIdExtractionExports: () => postWorkspacesByWorkspaceIdExtractionExports,
308
+ retryWithBackoff: () => retryWithBackoff,
309
+ sleep: () => sleep,
310
+ streamMessage: () => streamMessage,
311
+ streamSSE: () => streamSSE,
312
+ withRetry: () => withRetry
313
+ });
314
+ module.exports = __toCommonJS(index_exports);
315
+
316
+ // src/_internal/core/bodySerializer.gen.ts
317
+ var jsonBodySerializer = {
318
+ bodySerializer: (body) => JSON.stringify(
319
+ body,
320
+ (_key, value) => typeof value === "bigint" ? value.toString() : value
321
+ )
322
+ };
323
+
324
+ // src/_internal/core/params.gen.ts
325
+ var extraPrefixesMap = {
326
+ $body_: "body",
327
+ $headers_: "headers",
328
+ $path_: "path",
329
+ $query_: "query"
330
+ };
331
+ var extraPrefixes = Object.entries(extraPrefixesMap);
332
+
333
+ // src/_internal/core/serverSentEvents.gen.ts
334
+ var createSseClient = ({
335
+ onRequest,
336
+ onSseError,
337
+ onSseEvent,
338
+ responseTransformer,
339
+ responseValidator,
340
+ sseDefaultRetryDelay,
341
+ sseMaxRetryAttempts,
342
+ sseMaxRetryDelay,
343
+ sseSleepFn,
344
+ url,
345
+ ...options
346
+ }) => {
347
+ let lastEventId;
348
+ const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
349
+ const createStream = async function* () {
350
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
351
+ let attempt = 0;
352
+ const signal = options.signal ?? new AbortController().signal;
353
+ while (true) {
354
+ if (signal.aborted) break;
355
+ attempt++;
356
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
357
+ if (lastEventId !== void 0) {
358
+ headers.set("Last-Event-ID", lastEventId);
359
+ }
360
+ try {
361
+ const requestInit = {
362
+ redirect: "follow",
363
+ ...options,
364
+ body: options.serializedBody,
365
+ headers,
366
+ signal
367
+ };
368
+ let request = new Request(url, requestInit);
369
+ if (onRequest) {
370
+ request = await onRequest(url, requestInit);
371
+ }
372
+ const _fetch = options.fetch ?? globalThis.fetch;
373
+ const response = await _fetch(request);
374
+ if (!response.ok)
375
+ throw new Error(
376
+ `SSE failed: ${response.status} ${response.statusText}`
377
+ );
378
+ if (!response.body) throw new Error("No body in SSE response");
379
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
380
+ let buffer = "";
381
+ const abortHandler = () => {
382
+ try {
383
+ reader.cancel();
384
+ } catch {
385
+ }
386
+ };
387
+ signal.addEventListener("abort", abortHandler);
388
+ try {
389
+ while (true) {
390
+ const { done, value } = await reader.read();
391
+ if (done) break;
392
+ buffer += value;
393
+ buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
394
+ const chunks = buffer.split("\n\n");
395
+ buffer = chunks.pop() ?? "";
396
+ for (const chunk of chunks) {
397
+ const lines = chunk.split("\n");
398
+ const dataLines = [];
399
+ let eventName;
400
+ for (const line of lines) {
401
+ if (line.startsWith("data:")) {
402
+ dataLines.push(line.replace(/^data:\s*/, ""));
403
+ } else if (line.startsWith("event:")) {
404
+ eventName = line.replace(/^event:\s*/, "");
405
+ } else if (line.startsWith("id:")) {
406
+ lastEventId = line.replace(/^id:\s*/, "");
407
+ } else if (line.startsWith("retry:")) {
408
+ const parsed = Number.parseInt(
409
+ line.replace(/^retry:\s*/, ""),
410
+ 10
411
+ );
412
+ if (!Number.isNaN(parsed)) {
413
+ retryDelay = parsed;
414
+ }
415
+ }
416
+ }
417
+ let data;
418
+ let parsedJson = false;
419
+ if (dataLines.length) {
420
+ const rawData = dataLines.join("\n");
421
+ try {
422
+ data = JSON.parse(rawData);
423
+ parsedJson = true;
424
+ } catch {
425
+ data = rawData;
426
+ }
427
+ }
428
+ if (parsedJson) {
429
+ if (responseValidator) {
430
+ await responseValidator(data);
431
+ }
432
+ if (responseTransformer) {
433
+ data = await responseTransformer(data);
434
+ }
435
+ }
436
+ onSseEvent?.({
437
+ data,
438
+ event: eventName,
439
+ id: lastEventId,
440
+ retry: retryDelay
441
+ });
442
+ if (dataLines.length) {
443
+ yield data;
444
+ }
445
+ }
446
+ }
447
+ } finally {
448
+ signal.removeEventListener("abort", abortHandler);
449
+ reader.releaseLock();
450
+ }
451
+ break;
452
+ } catch (error) {
453
+ onSseError?.(error);
454
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
455
+ break;
456
+ }
457
+ const backoff = Math.min(
458
+ retryDelay * 2 ** (attempt - 1),
459
+ sseMaxRetryDelay ?? 3e4
460
+ );
461
+ await sleep2(backoff);
462
+ }
463
+ }
464
+ };
465
+ const stream = createStream();
466
+ return { stream };
467
+ };
468
+
469
+ // src/_internal/core/pathSerializer.gen.ts
470
+ var separatorArrayExplode = (style) => {
471
+ switch (style) {
472
+ case "label":
473
+ return ".";
474
+ case "matrix":
475
+ return ";";
476
+ case "simple":
477
+ return ",";
478
+ default:
479
+ return "&";
480
+ }
481
+ };
482
+ var separatorArrayNoExplode = (style) => {
483
+ switch (style) {
484
+ case "form":
485
+ return ",";
486
+ case "pipeDelimited":
487
+ return "|";
488
+ case "spaceDelimited":
489
+ return "%20";
490
+ default:
491
+ return ",";
492
+ }
493
+ };
494
+ var separatorObjectExplode = (style) => {
495
+ switch (style) {
496
+ case "label":
497
+ return ".";
498
+ case "matrix":
499
+ return ";";
500
+ case "simple":
501
+ return ",";
502
+ default:
503
+ return "&";
504
+ }
505
+ };
506
+ var serializeArrayParam = ({
507
+ allowReserved,
508
+ explode,
509
+ name,
510
+ style,
511
+ value
512
+ }) => {
513
+ if (!explode) {
514
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
515
+ switch (style) {
516
+ case "label":
517
+ return `.${joinedValues2}`;
518
+ case "matrix":
519
+ return `;${name}=${joinedValues2}`;
520
+ case "simple":
521
+ return joinedValues2;
522
+ default:
523
+ return `${name}=${joinedValues2}`;
524
+ }
525
+ }
526
+ const separator = separatorArrayExplode(style);
527
+ const joinedValues = value.map((v) => {
528
+ if (style === "label" || style === "simple") {
529
+ return allowReserved ? v : encodeURIComponent(v);
530
+ }
531
+ return serializePrimitiveParam({
532
+ allowReserved,
533
+ name,
534
+ value: v
535
+ });
536
+ }).join(separator);
537
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
538
+ };
539
+ var serializePrimitiveParam = ({
540
+ allowReserved,
541
+ name,
542
+ value
543
+ }) => {
544
+ if (value === void 0 || value === null) {
545
+ return "";
546
+ }
547
+ if (typeof value === "object") {
548
+ throw new Error(
549
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
550
+ );
551
+ }
552
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
553
+ };
554
+ var serializeObjectParam = ({
555
+ allowReserved,
556
+ explode,
557
+ name,
558
+ style,
559
+ value,
560
+ valueOnly
561
+ }) => {
562
+ if (value instanceof Date) {
563
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
564
+ }
565
+ if (style !== "deepObject" && !explode) {
566
+ let values = [];
567
+ Object.entries(value).forEach(([key, v]) => {
568
+ values = [
569
+ ...values,
570
+ key,
571
+ allowReserved ? v : encodeURIComponent(v)
572
+ ];
573
+ });
574
+ const joinedValues2 = values.join(",");
575
+ switch (style) {
576
+ case "form":
577
+ return `${name}=${joinedValues2}`;
578
+ case "label":
579
+ return `.${joinedValues2}`;
580
+ case "matrix":
581
+ return `;${name}=${joinedValues2}`;
582
+ default:
583
+ return joinedValues2;
584
+ }
585
+ }
586
+ const separator = separatorObjectExplode(style);
587
+ const joinedValues = Object.entries(value).map(
588
+ ([key, v]) => serializePrimitiveParam({
589
+ allowReserved,
590
+ name: style === "deepObject" ? `${name}[${key}]` : key,
591
+ value: v
592
+ })
593
+ ).join(separator);
594
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
595
+ };
596
+
597
+ // src/_internal/core/utils.gen.ts
598
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
599
+ var defaultPathSerializer = ({ path, url: _url }) => {
600
+ let url = _url;
601
+ const matches = _url.match(PATH_PARAM_RE);
602
+ if (matches) {
603
+ for (const match of matches) {
604
+ let explode = false;
605
+ let name = match.substring(1, match.length - 1);
606
+ let style = "simple";
607
+ if (name.endsWith("*")) {
608
+ explode = true;
609
+ name = name.substring(0, name.length - 1);
610
+ }
611
+ if (name.startsWith(".")) {
612
+ name = name.substring(1);
613
+ style = "label";
614
+ } else if (name.startsWith(";")) {
615
+ name = name.substring(1);
616
+ style = "matrix";
617
+ }
618
+ const value = path[name];
619
+ if (value === void 0 || value === null) {
620
+ continue;
621
+ }
622
+ if (Array.isArray(value)) {
623
+ url = url.replace(
624
+ match,
625
+ serializeArrayParam({ explode, name, style, value })
626
+ );
627
+ continue;
628
+ }
629
+ if (typeof value === "object") {
630
+ url = url.replace(
631
+ match,
632
+ serializeObjectParam({
633
+ explode,
634
+ name,
635
+ style,
636
+ value,
637
+ valueOnly: true
638
+ })
639
+ );
640
+ continue;
641
+ }
642
+ if (style === "matrix") {
643
+ url = url.replace(
644
+ match,
645
+ `;${serializePrimitiveParam({
646
+ name,
647
+ value
648
+ })}`
649
+ );
650
+ continue;
651
+ }
652
+ const replaceValue = encodeURIComponent(
653
+ style === "label" ? `.${value}` : value
654
+ );
655
+ url = url.replace(match, replaceValue);
656
+ }
657
+ }
658
+ return url;
659
+ };
660
+ var getUrl = ({
661
+ baseUrl,
662
+ path,
663
+ query,
664
+ querySerializer,
665
+ url: _url
666
+ }) => {
667
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
668
+ let url = (baseUrl ?? "") + pathUrl;
669
+ if (path) {
670
+ url = defaultPathSerializer({ path, url });
671
+ }
672
+ let search = query ? querySerializer(query) : "";
673
+ if (search.startsWith("?")) {
674
+ search = search.substring(1);
675
+ }
676
+ if (search) {
677
+ url += `?${search}`;
678
+ }
679
+ return url;
680
+ };
681
+ function getValidRequestBody(options) {
682
+ const hasBody = options.body !== void 0;
683
+ const isSerializedBody = hasBody && options.bodySerializer;
684
+ if (isSerializedBody) {
685
+ if ("serializedBody" in options) {
686
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
687
+ return hasSerializedBody ? options.serializedBody : null;
688
+ }
689
+ return options.body !== "" ? options.body : null;
690
+ }
691
+ if (hasBody) {
692
+ return options.body;
693
+ }
694
+ return void 0;
695
+ }
696
+
697
+ // src/_internal/core/auth.gen.ts
698
+ var getAuthToken = async (auth, callback) => {
699
+ const token = typeof callback === "function" ? await callback(auth) : callback;
700
+ if (!token) {
701
+ return;
702
+ }
703
+ if (auth.scheme === "bearer") {
704
+ return `Bearer ${token}`;
705
+ }
706
+ if (auth.scheme === "basic") {
707
+ return `Basic ${btoa(token)}`;
708
+ }
709
+ return token;
710
+ };
711
+
712
+ // src/_internal/client/utils.gen.ts
713
+ var createQuerySerializer = ({
714
+ parameters = {},
715
+ ...args
716
+ } = {}) => {
717
+ const querySerializer = (queryParams) => {
718
+ const search = [];
719
+ if (queryParams && typeof queryParams === "object") {
720
+ for (const name in queryParams) {
721
+ const value = queryParams[name];
722
+ if (value === void 0 || value === null) {
723
+ continue;
724
+ }
725
+ const options = parameters[name] || args;
726
+ if (Array.isArray(value)) {
727
+ const serializedArray = serializeArrayParam({
728
+ allowReserved: options.allowReserved,
729
+ explode: true,
730
+ name,
731
+ style: "form",
732
+ value,
733
+ ...options.array
734
+ });
735
+ if (serializedArray) search.push(serializedArray);
736
+ } else if (typeof value === "object") {
737
+ const serializedObject = serializeObjectParam({
738
+ allowReserved: options.allowReserved,
739
+ explode: true,
740
+ name,
741
+ style: "deepObject",
742
+ value,
743
+ ...options.object
744
+ });
745
+ if (serializedObject) search.push(serializedObject);
746
+ } else {
747
+ const serializedPrimitive = serializePrimitiveParam({
748
+ allowReserved: options.allowReserved,
749
+ name,
750
+ value
751
+ });
752
+ if (serializedPrimitive) search.push(serializedPrimitive);
753
+ }
754
+ }
755
+ }
756
+ return search.join("&");
757
+ };
758
+ return querySerializer;
759
+ };
760
+ var getParseAs = (contentType) => {
761
+ if (!contentType) {
762
+ return "stream";
763
+ }
764
+ const cleanContent = contentType.split(";")[0]?.trim();
765
+ if (!cleanContent) {
766
+ return;
767
+ }
768
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
769
+ return "json";
770
+ }
771
+ if (cleanContent === "multipart/form-data") {
772
+ return "formData";
773
+ }
774
+ if (["application/", "audio/", "image/", "video/"].some(
775
+ (type) => cleanContent.startsWith(type)
776
+ )) {
777
+ return "blob";
778
+ }
779
+ if (cleanContent.startsWith("text/")) {
780
+ return "text";
781
+ }
782
+ return;
783
+ };
784
+ var checkForExistence = (options, name) => {
785
+ if (!name) {
786
+ return false;
787
+ }
788
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
789
+ return true;
790
+ }
791
+ return false;
792
+ };
793
+ var setAuthParams = async ({
794
+ security,
795
+ ...options
796
+ }) => {
797
+ for (const auth of security) {
798
+ if (checkForExistence(options, auth.name)) {
799
+ continue;
800
+ }
801
+ const token = await getAuthToken(auth, options.auth);
802
+ if (!token) {
803
+ continue;
804
+ }
805
+ const name = auth.name ?? "Authorization";
806
+ switch (auth.in) {
807
+ case "query":
808
+ if (!options.query) {
809
+ options.query = {};
810
+ }
811
+ options.query[name] = token;
812
+ break;
813
+ case "cookie":
814
+ options.headers.append("Cookie", `${name}=${token}`);
815
+ break;
816
+ case "header":
817
+ default:
818
+ options.headers.set(name, token);
819
+ break;
820
+ }
821
+ }
822
+ };
823
+ var buildUrl = (options) => getUrl({
824
+ baseUrl: options.baseUrl,
825
+ path: options.path,
826
+ query: options.query,
827
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
828
+ url: options.url
829
+ });
830
+ var mergeConfigs = (a, b) => {
831
+ const config = { ...a, ...b };
832
+ if (config.baseUrl?.endsWith("/")) {
833
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
834
+ }
835
+ config.headers = mergeHeaders(a.headers, b.headers);
836
+ return config;
837
+ };
838
+ var headersEntries = (headers) => {
839
+ const entries = [];
840
+ headers.forEach((value, key) => {
841
+ entries.push([key, value]);
842
+ });
843
+ return entries;
844
+ };
845
+ var mergeHeaders = (...headers) => {
846
+ const mergedHeaders = new Headers();
847
+ for (const header of headers) {
848
+ if (!header) {
849
+ continue;
850
+ }
851
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
852
+ for (const [key, value] of iterator) {
853
+ if (value === null) {
854
+ mergedHeaders.delete(key);
855
+ } else if (Array.isArray(value)) {
856
+ for (const v of value) {
857
+ mergedHeaders.append(key, v);
858
+ }
859
+ } else if (value !== void 0) {
860
+ mergedHeaders.set(
861
+ key,
862
+ typeof value === "object" ? JSON.stringify(value) : value
863
+ );
864
+ }
865
+ }
866
+ }
867
+ return mergedHeaders;
868
+ };
869
+ var Interceptors = class {
870
+ constructor() {
871
+ this.fns = [];
872
+ }
873
+ clear() {
874
+ this.fns = [];
875
+ }
876
+ eject(id) {
877
+ const index = this.getInterceptorIndex(id);
878
+ if (this.fns[index]) {
879
+ this.fns[index] = null;
880
+ }
881
+ }
882
+ exists(id) {
883
+ const index = this.getInterceptorIndex(id);
884
+ return Boolean(this.fns[index]);
885
+ }
886
+ getInterceptorIndex(id) {
887
+ if (typeof id === "number") {
888
+ return this.fns[id] ? id : -1;
889
+ }
890
+ return this.fns.indexOf(id);
891
+ }
892
+ update(id, fn) {
893
+ const index = this.getInterceptorIndex(id);
894
+ if (this.fns[index]) {
895
+ this.fns[index] = fn;
896
+ return id;
897
+ }
898
+ return false;
899
+ }
900
+ use(fn) {
901
+ this.fns.push(fn);
902
+ return this.fns.length - 1;
903
+ }
904
+ };
905
+ var createInterceptors = () => ({
906
+ error: new Interceptors(),
907
+ request: new Interceptors(),
908
+ response: new Interceptors()
909
+ });
910
+ var defaultQuerySerializer = createQuerySerializer({
911
+ allowReserved: false,
912
+ array: {
913
+ explode: true,
914
+ style: "form"
915
+ },
916
+ object: {
917
+ explode: true,
918
+ style: "deepObject"
919
+ }
920
+ });
921
+ var defaultHeaders = {
922
+ "Content-Type": "application/json"
923
+ };
924
+ var createConfig = (override = {}) => ({
925
+ ...jsonBodySerializer,
926
+ headers: defaultHeaders,
927
+ parseAs: "auto",
928
+ querySerializer: defaultQuerySerializer,
929
+ ...override
930
+ });
931
+
932
+ // src/_internal/client/client.gen.ts
933
+ var createClient = (config = {}) => {
934
+ let _config = mergeConfigs(createConfig(), config);
935
+ const getConfig = () => ({ ..._config });
936
+ const setConfig = (config2) => {
937
+ _config = mergeConfigs(_config, config2);
938
+ return getConfig();
939
+ };
940
+ const interceptors = createInterceptors();
941
+ const beforeRequest = async (options) => {
942
+ const opts = {
943
+ ..._config,
944
+ ...options,
945
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
946
+ headers: mergeHeaders(_config.headers, options.headers),
947
+ serializedBody: void 0
948
+ };
949
+ if (opts.security) {
950
+ await setAuthParams({
951
+ ...opts,
952
+ security: opts.security
953
+ });
954
+ }
955
+ if (opts.requestValidator) {
956
+ await opts.requestValidator(opts);
957
+ }
958
+ if (opts.body !== void 0 && opts.bodySerializer) {
959
+ opts.serializedBody = opts.bodySerializer(opts.body);
960
+ }
961
+ if (opts.body === void 0 || opts.serializedBody === "") {
962
+ opts.headers.delete("Content-Type");
963
+ }
964
+ const url = buildUrl(opts);
965
+ return { opts, url };
966
+ };
967
+ const request = async (options) => {
968
+ const { opts, url } = await beforeRequest(options);
969
+ const requestInit = {
970
+ redirect: "follow",
971
+ ...opts,
972
+ body: getValidRequestBody(opts)
973
+ };
974
+ let request2 = new Request(url, requestInit);
975
+ for (const fn of interceptors.request.fns) {
976
+ if (fn) {
977
+ request2 = await fn(request2, opts);
978
+ }
979
+ }
980
+ const _fetch = opts.fetch;
981
+ let response;
982
+ try {
983
+ response = await _fetch(request2);
984
+ } catch (error2) {
985
+ let finalError2 = error2;
986
+ for (const fn of interceptors.error.fns) {
987
+ if (fn) {
988
+ finalError2 = await fn(
989
+ error2,
990
+ void 0,
991
+ request2,
992
+ opts
993
+ );
994
+ }
995
+ }
996
+ finalError2 = finalError2 || {};
997
+ if (opts.throwOnError) {
998
+ throw finalError2;
999
+ }
1000
+ return opts.responseStyle === "data" ? void 0 : {
1001
+ error: finalError2,
1002
+ request: request2,
1003
+ response: void 0
1004
+ };
1005
+ }
1006
+ for (const fn of interceptors.response.fns) {
1007
+ if (fn) {
1008
+ response = await fn(response, request2, opts);
1009
+ }
1010
+ }
1011
+ const result = {
1012
+ request: request2,
1013
+ response
1014
+ };
1015
+ if (response.ok) {
1016
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
1017
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
1018
+ let emptyData;
1019
+ switch (parseAs) {
1020
+ case "arrayBuffer":
1021
+ case "blob":
1022
+ case "text":
1023
+ emptyData = await response[parseAs]();
1024
+ break;
1025
+ case "formData":
1026
+ emptyData = new FormData();
1027
+ break;
1028
+ case "stream":
1029
+ emptyData = response.body;
1030
+ break;
1031
+ case "json":
1032
+ default:
1033
+ emptyData = {};
1034
+ break;
1035
+ }
1036
+ return opts.responseStyle === "data" ? emptyData : {
1037
+ data: emptyData,
1038
+ ...result
1039
+ };
1040
+ }
1041
+ let data;
1042
+ switch (parseAs) {
1043
+ case "arrayBuffer":
1044
+ case "blob":
1045
+ case "formData":
1046
+ case "json":
1047
+ case "text":
1048
+ data = await response[parseAs]();
1049
+ break;
1050
+ case "stream":
1051
+ return opts.responseStyle === "data" ? response.body : {
1052
+ data: response.body,
1053
+ ...result
1054
+ };
1055
+ }
1056
+ if (parseAs === "json") {
1057
+ if (opts.responseValidator) {
1058
+ await opts.responseValidator(data);
1059
+ }
1060
+ if (opts.responseTransformer) {
1061
+ data = await opts.responseTransformer(data);
1062
+ }
1063
+ }
1064
+ return opts.responseStyle === "data" ? data : {
1065
+ data,
1066
+ ...result
1067
+ };
1068
+ }
1069
+ const textError = await response.text();
1070
+ let jsonError;
1071
+ try {
1072
+ jsonError = JSON.parse(textError);
1073
+ } catch {
1074
+ }
1075
+ const error = jsonError ?? textError;
1076
+ let finalError = error;
1077
+ for (const fn of interceptors.error.fns) {
1078
+ if (fn) {
1079
+ finalError = await fn(error, response, request2, opts);
1080
+ }
1081
+ }
1082
+ finalError = finalError || {};
1083
+ if (opts.throwOnError) {
1084
+ throw finalError;
1085
+ }
1086
+ return opts.responseStyle === "data" ? void 0 : {
1087
+ error: finalError,
1088
+ ...result
1089
+ };
1090
+ };
1091
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
1092
+ const makeSseFn = (method) => async (options) => {
1093
+ const { opts, url } = await beforeRequest(options);
1094
+ return createSseClient({
1095
+ ...opts,
1096
+ body: opts.body,
1097
+ headers: opts.headers,
1098
+ method,
1099
+ onRequest: async (url2, init) => {
1100
+ let request2 = new Request(url2, init);
1101
+ for (const fn of interceptors.request.fns) {
1102
+ if (fn) {
1103
+ request2 = await fn(request2, opts);
1104
+ }
1105
+ }
1106
+ return request2;
1107
+ },
1108
+ url
1109
+ });
1110
+ };
1111
+ return {
1112
+ buildUrl,
1113
+ connect: makeMethodFn("CONNECT"),
1114
+ delete: makeMethodFn("DELETE"),
1115
+ get: makeMethodFn("GET"),
1116
+ getConfig,
1117
+ head: makeMethodFn("HEAD"),
1118
+ interceptors,
1119
+ options: makeMethodFn("OPTIONS"),
1120
+ patch: makeMethodFn("PATCH"),
1121
+ post: makeMethodFn("POST"),
1122
+ put: makeMethodFn("PUT"),
1123
+ request,
1124
+ setConfig,
1125
+ sse: {
1126
+ connect: makeSseFn("CONNECT"),
1127
+ delete: makeSseFn("DELETE"),
1128
+ get: makeSseFn("GET"),
1129
+ head: makeSseFn("HEAD"),
1130
+ options: makeSseFn("OPTIONS"),
1131
+ patch: makeSseFn("PATCH"),
1132
+ post: makeSseFn("POST"),
1133
+ put: makeSseFn("PUT"),
1134
+ trace: makeSseFn("TRACE")
1135
+ },
1136
+ trace: makeMethodFn("TRACE")
1137
+ };
1138
+ };
1139
+
1140
+ // src/_internal/client.gen.ts
1141
+ var client = createClient(
1142
+ createConfig({ baseUrl: "http://localhost:22222" })
1143
+ );
1144
+
1145
+ // src/_internal/sdk.gen.ts
1146
+ var postAiSearchAdvanced = (options) => (options.client ?? client).post({
1147
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1148
+ security: [{ scheme: "bearer", type: "http" }],
1149
+ url: "/ai/search/advanced",
1150
+ ...options,
1151
+ headers: {
1152
+ "Content-Type": "application/vnd.api+json",
1153
+ ...options.headers
1154
+ }
1155
+ });
1156
+ var deleteExtractionDocumentsById = (options) => (options.client ?? client).delete({
1157
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1158
+ security: [{ scheme: "bearer", type: "http" }],
1159
+ url: "/extraction/documents/{id}",
1160
+ ...options
1161
+ });
1162
+ var getExtractionDocumentsById = (options) => (options.client ?? client).get({
1163
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1164
+ security: [{ scheme: "bearer", type: "http" }],
1165
+ url: "/extraction/documents/{id}",
1166
+ ...options
1167
+ });
1168
+ var getThreads = (options) => (options.client ?? client).get({
1169
+ querySerializer: {
1170
+ parameters: {
1171
+ filter: { object: { style: "form" } },
1172
+ page: { object: { style: "form" } },
1173
+ fields: { object: { style: "form" } }
1174
+ }
1175
+ },
1176
+ security: [{ scheme: "bearer", type: "http" }],
1177
+ url: "/threads",
1178
+ ...options
1179
+ });
1180
+ var postThreads = (options) => (options.client ?? client).post({
1181
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1182
+ security: [{ scheme: "bearer", type: "http" }],
1183
+ url: "/threads",
1184
+ ...options,
1185
+ headers: {
1186
+ "Content-Type": "application/vnd.api+json",
1187
+ ...options.headers
1188
+ }
1189
+ });
1190
+ var getExtractionSchemasWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
1191
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1192
+ security: [{ scheme: "bearer", type: "http" }],
1193
+ url: "/extraction/schemas/workspace/{workspace_id}",
1194
+ ...options
1195
+ });
1196
+ var getLlmAnalyticsCosts = (options) => (options.client ?? client).get({
1197
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1198
+ security: [{ scheme: "bearer", type: "http" }],
1199
+ url: "/llm_analytics/costs",
1200
+ ...options
1201
+ });
1202
+ var getTrainingSessionsAgentsByAgentIdSessions = (options) => (options.client ?? client).get({
1203
+ querySerializer: {
1204
+ parameters: {
1205
+ filter: { object: { style: "form" } },
1206
+ fields: { object: { style: "form" } }
1207
+ }
1208
+ },
1209
+ security: [{ scheme: "bearer", type: "http" }],
1210
+ url: "/training_sessions/agents/{agent_id}/sessions",
1211
+ ...options
1212
+ });
1213
+ var getAiChunksDocumentByDocumentId = (options) => (options.client ?? client).get({
1214
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1215
+ security: [{ scheme: "bearer", type: "http" }],
1216
+ url: "/ai/chunks/document/{document_id}",
1217
+ ...options
1218
+ });
1219
+ var patchWalletCredits = (options) => (options.client ?? client).patch({
1220
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1221
+ security: [{ scheme: "bearer", type: "http" }],
1222
+ url: "/wallet/credits",
1223
+ ...options,
1224
+ headers: {
1225
+ "Content-Type": "application/vnd.api+json",
1226
+ ...options.headers
1227
+ }
1228
+ });
1229
+ var getWorkspaces = (options) => (options.client ?? client).get({
1230
+ querySerializer: {
1231
+ parameters: {
1232
+ filter: { object: { style: "form" } },
1233
+ fields: { object: { style: "form" } }
1234
+ }
1235
+ },
1236
+ security: [{ scheme: "bearer", type: "http" }],
1237
+ url: "/workspaces",
1238
+ ...options
1239
+ });
1240
+ var postWorkspaces = (options) => (options.client ?? client).post({
1241
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1242
+ security: [{ scheme: "bearer", type: "http" }],
1243
+ url: "/workspaces",
1244
+ ...options,
1245
+ headers: {
1246
+ "Content-Type": "application/vnd.api+json",
1247
+ ...options.headers
1248
+ }
1249
+ });
1250
+ var getDocumentsStats = (options) => (options.client ?? client).get({
1251
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1252
+ security: [{ scheme: "bearer", type: "http" }],
1253
+ url: "/documents/stats",
1254
+ ...options
1255
+ });
1256
+ var postObjectsRegister = (options) => (options.client ?? client).post({
1257
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1258
+ security: [{ scheme: "bearer", type: "http" }],
1259
+ url: "/objects/register",
1260
+ ...options,
1261
+ headers: {
1262
+ "Content-Type": "application/vnd.api+json",
1263
+ ...options.headers
1264
+ }
1265
+ });
1266
+ var getLlmAnalyticsWorkspace = (options) => (options.client ?? client).get({
1267
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1268
+ security: [{ scheme: "bearer", type: "http" }],
1269
+ url: "/llm_analytics/workspace",
1270
+ ...options
1271
+ });
1272
+ var getSearchIndexes = (options) => (options.client ?? client).get({
1273
+ querySerializer: {
1274
+ parameters: {
1275
+ filter: { object: { style: "form" } },
1276
+ fields: { object: { style: "form" } }
1277
+ }
1278
+ },
1279
+ security: [{ scheme: "bearer", type: "http" }],
1280
+ url: "/search/indexes",
1281
+ ...options
1282
+ });
1283
+ var getCreditPackagesSlugBySlug = (options) => (options.client ?? client).get({
1284
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1285
+ security: [{ scheme: "bearer", type: "http" }],
1286
+ url: "/credit-packages/slug/{slug}",
1287
+ ...options
1288
+ });
1289
+ var postExtractionBatches = (options) => (options.client ?? client).post({
1290
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1291
+ security: [{ scheme: "bearer", type: "http" }],
1292
+ url: "/extraction/batches",
1293
+ ...options,
1294
+ headers: {
1295
+ "Content-Type": "application/vnd.api+json",
1296
+ ...options.headers
1297
+ }
1298
+ });
1299
+ var getLlmAnalyticsPlatform = (options) => (options.client ?? client).get({
1300
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1301
+ security: [{ scheme: "bearer", type: "http" }],
1302
+ url: "/llm_analytics/platform",
1303
+ ...options
1304
+ });
1305
+ var patchExtractionDocumentsByIdExclude = (options) => (options.client ?? client).patch({
1306
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1307
+ security: [{ scheme: "bearer", type: "http" }],
1308
+ url: "/extraction/documents/{id}/exclude",
1309
+ ...options,
1310
+ headers: {
1311
+ "Content-Type": "application/vnd.api+json",
1312
+ ...options.headers
1313
+ }
1314
+ });
1315
+ var postPayments = (options) => (options.client ?? client).post({
1316
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1317
+ security: [{ scheme: "bearer", type: "http" }],
1318
+ url: "/payments",
1319
+ ...options,
1320
+ headers: {
1321
+ "Content-Type": "application/vnd.api+json",
1322
+ ...options.headers
1323
+ }
1324
+ });
1325
+ var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
1326
+ querySerializer: {
1327
+ parameters: {
1328
+ filter: { object: { style: "form" } },
1329
+ fields: { object: { style: "form" } }
1330
+ }
1331
+ },
1332
+ security: [{ scheme: "bearer", type: "http" }],
1333
+ url: "/extraction/batches/workspace/{workspace_id}",
1334
+ ...options
1335
+ });
1336
+ var patchApiKeysByIdRevoke = (options) => (options.client ?? client).patch({
1337
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1338
+ security: [{ scheme: "bearer", type: "http" }],
1339
+ url: "/api_keys/{id}/revoke",
1340
+ ...options,
1341
+ headers: {
1342
+ "Content-Type": "application/vnd.api+json",
1343
+ ...options.headers
1344
+ }
1345
+ });
1346
+ var getInvitationsConsumeByToken = (options) => (options.client ?? client).get({
1347
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1348
+ security: [{ scheme: "bearer", type: "http" }],
1349
+ url: "/invitations/consume/{token}",
1350
+ ...options
1351
+ });
1352
+ var getExtractionDocumentsByIdStatus = (options) => (options.client ?? client).get({
1353
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1354
+ security: [{ scheme: "bearer", type: "http" }],
1355
+ url: "/extraction/documents/{id}/status",
1356
+ ...options
1357
+ });
1358
+ var patchExtractionDocumentsByIdStatus = (options) => (options.client ?? client).patch({
1359
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1360
+ security: [{ scheme: "bearer", type: "http" }],
1361
+ url: "/extraction/documents/{id}/status",
1362
+ ...options,
1363
+ headers: {
1364
+ "Content-Type": "application/vnd.api+json",
1365
+ ...options.headers
1366
+ }
1367
+ });
1368
+ var patchExtractionDocumentsByIdFinishUpload = (options) => (options.client ?? client).patch({
1369
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1370
+ security: [{ scheme: "bearer", type: "http" }],
1371
+ url: "/extraction/documents/{id}/finish_upload",
1372
+ ...options,
1373
+ headers: {
1374
+ "Content-Type": "application/vnd.api+json",
1375
+ ...options.headers
1376
+ }
1377
+ });
1378
+ var patchWorkspacesByIdAllocate = (options) => (options.client ?? client).patch({
1379
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1380
+ security: [{ scheme: "bearer", type: "http" }],
1381
+ url: "/workspaces/{id}/allocate",
1382
+ ...options,
1383
+ headers: {
1384
+ "Content-Type": "application/vnd.api+json",
1385
+ ...options.headers
1386
+ }
1387
+ });
1388
+ var postThreadsActive = (options) => (options.client ?? client).post({
1389
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1390
+ security: [{ scheme: "bearer", type: "http" }],
1391
+ url: "/threads/active",
1392
+ ...options,
1393
+ headers: {
1394
+ "Content-Type": "application/vnd.api+json",
1395
+ ...options.headers
1396
+ }
1397
+ });
1398
+ var patchInvitationsByIdRevoke = (options) => (options.client ?? client).patch({
1399
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1400
+ security: [{ scheme: "bearer", type: "http" }],
1401
+ url: "/invitations/{id}/revoke",
1402
+ ...options,
1403
+ headers: {
1404
+ "Content-Type": "application/vnd.api+json",
1405
+ ...options.headers
1406
+ }
1407
+ });
1408
+ var getConfigs = (options) => (options.client ?? client).get({
1409
+ querySerializer: {
1410
+ parameters: {
1411
+ filter: { object: { style: "form" } },
1412
+ page: { object: { style: "form" } },
1413
+ fields: { object: { style: "form" } }
1414
+ }
1415
+ },
1416
+ security: [{ scheme: "bearer", type: "http" }],
1417
+ url: "/configs",
1418
+ ...options
1419
+ });
1420
+ var postConfigs = (options) => (options.client ?? client).post({
1421
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1422
+ security: [{ scheme: "bearer", type: "http" }],
1423
+ url: "/configs",
1424
+ ...options,
1425
+ headers: {
1426
+ "Content-Type": "application/vnd.api+json",
1427
+ ...options.headers
1428
+ }
1429
+ });
1430
+ var postTokens = (options) => (options.client ?? client).post({
1431
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1432
+ security: [{ scheme: "bearer", type: "http" }],
1433
+ url: "/tokens",
1434
+ ...options,
1435
+ headers: {
1436
+ "Content-Type": "application/vnd.api+json",
1437
+ ...options.headers
1438
+ }
1439
+ });
1440
+ var deleteTrainingExamplesById = (options) => (options.client ?? client).delete({
1441
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1442
+ security: [{ scheme: "bearer", type: "http" }],
1443
+ url: "/training_examples/{id}",
1444
+ ...options
1445
+ });
1446
+ var getTrainingExamplesById = (options) => (options.client ?? client).get({
1447
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1448
+ security: [{ scheme: "bearer", type: "http" }],
1449
+ url: "/training_examples/{id}",
1450
+ ...options
1451
+ });
1452
+ var patchTrainingExamplesById = (options) => (options.client ?? client).patch({
1453
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1454
+ security: [{ scheme: "bearer", type: "http" }],
1455
+ url: "/training_examples/{id}",
1456
+ ...options,
1457
+ headers: {
1458
+ "Content-Type": "application/vnd.api+json",
1459
+ ...options.headers
1460
+ }
1461
+ });
1462
+ var deleteSearchSavedById = (options) => (options.client ?? client).delete({
1463
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1464
+ security: [{ scheme: "bearer", type: "http" }],
1465
+ url: "/search/saved/{id}",
1466
+ ...options
1467
+ });
1468
+ var patchUsersByIdAdminEmail = (options) => (options.client ?? client).patch({
1469
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1470
+ security: [{ scheme: "bearer", type: "http" }],
1471
+ url: "/users/{id}/admin/email",
1472
+ ...options,
1473
+ headers: {
1474
+ "Content-Type": "application/vnd.api+json",
1475
+ ...options.headers
1476
+ }
1477
+ });
1478
+ var patchUsersAuthResetPassword = (options) => (options.client ?? client).patch({
1479
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1480
+ security: [{ scheme: "bearer", type: "http" }],
1481
+ url: "/users/auth/reset-password",
1482
+ ...options,
1483
+ headers: {
1484
+ "Content-Type": "application/vnd.api+json",
1485
+ ...options.headers
1486
+ }
1487
+ });
1488
+ var getBucketsByIdStats = (options) => (options.client ?? client).get({
1489
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1490
+ security: [{ scheme: "bearer", type: "http" }],
1491
+ url: "/buckets/{id}/stats",
1492
+ ...options
1493
+ });
1494
+ var patchNotificationMethodsByIdSetPrimary = (options) => (options.client ?? client).patch({
1495
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1496
+ security: [{ scheme: "bearer", type: "http" }],
1497
+ url: "/notification_methods/{id}/set_primary",
1498
+ ...options,
1499
+ headers: {
1500
+ "Content-Type": "application/vnd.api+json",
1501
+ ...options.headers
1502
+ }
1503
+ });
1504
+ var getBucketsByIdObjects = (options) => (options.client ?? client).get({
1505
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1506
+ security: [{ scheme: "bearer", type: "http" }],
1507
+ url: "/buckets/{id}/objects",
1508
+ ...options
1509
+ });
1510
+ var patchInvitationsByIdResend = (options) => (options.client ?? client).patch({
1511
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1512
+ security: [{ scheme: "bearer", type: "http" }],
1513
+ url: "/invitations/{id}/resend",
1514
+ ...options,
1515
+ headers: {
1516
+ "Content-Type": "application/vnd.api+json",
1517
+ ...options.headers
1518
+ }
1519
+ });
1520
+ var getSearchSaved = (options) => (options.client ?? client).get({
1521
+ querySerializer: {
1522
+ parameters: {
1523
+ filter: { object: { style: "form" } },
1524
+ fields: { object: { style: "form" } }
1525
+ }
1526
+ },
1527
+ security: [{ scheme: "bearer", type: "http" }],
1528
+ url: "/search/saved",
1529
+ ...options
1530
+ });
1531
+ var postSearchSaved = (options) => (options.client ?? client).post({
1532
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1533
+ security: [{ scheme: "bearer", type: "http" }],
1534
+ url: "/search/saved",
1535
+ ...options,
1536
+ headers: {
1537
+ "Content-Type": "application/vnd.api+json",
1538
+ ...options.headers
1539
+ }
1540
+ });
1541
+ var deleteFieldTemplatesById = (options) => (options.client ?? client).delete({
1542
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1543
+ security: [{ scheme: "bearer", type: "http" }],
1544
+ url: "/field_templates/{id}",
1545
+ ...options
1546
+ });
1547
+ var getFieldTemplatesById = (options) => (options.client ?? client).get({
1548
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1549
+ security: [{ scheme: "bearer", type: "http" }],
1550
+ url: "/field_templates/{id}",
1551
+ ...options
1552
+ });
1553
+ var getWorkspacesByWorkspaceIdTrainingAnalytics = (options) => (options.client ?? client).get({
1554
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1555
+ security: [{ scheme: "bearer", type: "http" }],
1556
+ url: "/workspaces/{workspace_id}/training/analytics",
1557
+ ...options
1558
+ });
1559
+ var getUserProfilesMe = (options) => (options.client ?? client).get({
1560
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1561
+ security: [{ scheme: "bearer", type: "http" }],
1562
+ url: "/user_profiles/me",
1563
+ ...options
1564
+ });
1565
+ var postInvitationsInvite = (options) => (options.client ?? client).post({
1566
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1567
+ security: [{ scheme: "bearer", type: "http" }],
1568
+ url: "/invitations/invite",
1569
+ ...options,
1570
+ headers: {
1571
+ "Content-Type": "application/vnd.api+json",
1572
+ ...options.headers
1573
+ }
1574
+ });
1575
+ var getAgentVersions = (options) => (options.client ?? client).get({
1576
+ querySerializer: {
1577
+ parameters: {
1578
+ filter: { object: { style: "form" } },
1579
+ fields: { object: { style: "form" } }
1580
+ }
1581
+ },
1582
+ security: [{ scheme: "bearer", type: "http" }],
1583
+ url: "/agent_versions",
1584
+ ...options
1585
+ });
1586
+ var postAgentVersions = (options) => (options.client ?? client).post({
1587
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1588
+ security: [{ scheme: "bearer", type: "http" }],
1589
+ url: "/agent_versions",
1590
+ ...options,
1591
+ headers: {
1592
+ "Content-Type": "application/vnd.api+json",
1593
+ ...options.headers
1594
+ }
1595
+ });
1596
+ var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
1597
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1598
+ security: [{ scheme: "bearer", type: "http" }],
1599
+ url: "/webhook_configs/{id}",
1600
+ ...options
1601
+ });
1602
+ var getWebhookConfigsById = (options) => (options.client ?? client).get({
1603
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1604
+ security: [{ scheme: "bearer", type: "http" }],
1605
+ url: "/webhook_configs/{id}",
1606
+ ...options
1607
+ });
1608
+ var patchWebhookConfigsById = (options) => (options.client ?? client).patch({
1609
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1610
+ security: [{ scheme: "bearer", type: "http" }],
1611
+ url: "/webhook_configs/{id}",
1612
+ ...options,
1613
+ headers: {
1614
+ "Content-Type": "application/vnd.api+json",
1615
+ ...options.headers
1616
+ }
1617
+ });
1618
+ var postInvitationsAcceptByToken = (options) => (options.client ?? client).post({
1619
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1620
+ security: [{ scheme: "bearer", type: "http" }],
1621
+ url: "/invitations/accept_by_token",
1622
+ ...options,
1623
+ headers: {
1624
+ "Content-Type": "application/vnd.api+json",
1625
+ ...options.headers
1626
+ }
1627
+ });
1628
+ var getExtractionBatchesByIdUploadUrls = (options) => (options.client ?? client).get({
1629
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1630
+ security: [{ scheme: "bearer", type: "http" }],
1631
+ url: "/extraction/batches/{id}/upload-urls",
1632
+ ...options
1633
+ });
1634
+ var postDocumentsBulkDelete = (options) => (options.client ?? client).post({
1635
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1636
+ security: [{ scheme: "bearer", type: "http" }],
1637
+ url: "/documents/bulk_delete",
1638
+ ...options,
1639
+ headers: {
1640
+ "Content-Type": "application/vnd.api+json",
1641
+ ...options.headers
1642
+ }
1643
+ });
1644
+ var getAgentVersionsById = (options) => (options.client ?? client).get({
1645
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1646
+ security: [{ scheme: "bearer", type: "http" }],
1647
+ url: "/agent_versions/{id}",
1648
+ ...options
1649
+ });
1650
+ var postAiChunksSearch = (options) => (options.client ?? client).post({
1651
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1652
+ security: [{ scheme: "bearer", type: "http" }],
1653
+ url: "/ai/chunks/search",
1654
+ ...options,
1655
+ headers: {
1656
+ "Content-Type": "application/vnd.api+json",
1657
+ ...options.headers
1658
+ }
1659
+ });
1660
+ var postThreadsByIdMessages = (options) => (options.client ?? client).post({
1661
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1662
+ security: [{ scheme: "bearer", type: "http" }],
1663
+ url: "/threads/{id}/messages",
1664
+ ...options,
1665
+ headers: {
1666
+ "Content-Type": "application/vnd.api+json",
1667
+ ...options.headers
1668
+ }
1669
+ });
1670
+ var postAgentsCloneForWorkspace = (options) => (options.client ?? client).post({
1671
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1672
+ security: [{ scheme: "bearer", type: "http" }],
1673
+ url: "/agents/clone_for_workspace",
1674
+ ...options,
1675
+ headers: {
1676
+ "Content-Type": "application/vnd.api+json",
1677
+ ...options.headers
1678
+ }
1679
+ });
1680
+ var patchInvitationsByIdAccept = (options) => (options.client ?? client).patch({
1681
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1682
+ security: [{ scheme: "bearer", type: "http" }],
1683
+ url: "/invitations/{id}/accept",
1684
+ ...options,
1685
+ headers: {
1686
+ "Content-Type": "application/vnd.api+json",
1687
+ ...options.headers
1688
+ }
1689
+ });
1690
+ var getCreditPackagesById = (options) => (options.client ?? client).get({
1691
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1692
+ security: [{ scheme: "bearer", type: "http" }],
1693
+ url: "/credit-packages/{id}",
1694
+ ...options
1695
+ });
1696
+ var getUsersById = (options) => (options.client ?? client).get({
1697
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1698
+ security: [{ scheme: "bearer", type: "http" }],
1699
+ url: "/users/{id}",
1700
+ ...options
1701
+ });
1702
+ var getExtractionResultsById = (options) => (options.client ?? client).get({
1703
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1704
+ security: [{ scheme: "bearer", type: "http" }],
1705
+ url: "/extraction/results/{id}",
1706
+ ...options
1707
+ });
1708
+ var postAgentsByIdValidate = (options) => (options.client ?? client).post({
1709
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1710
+ security: [{ scheme: "bearer", type: "http" }],
1711
+ url: "/agents/{id}/validate",
1712
+ ...options,
1713
+ headers: {
1714
+ "Content-Type": "application/vnd.api+json",
1715
+ ...options.headers
1716
+ }
1717
+ });
1718
+ var postWebhookConfigsByIdTest = (options) => (options.client ?? client).post({
1719
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1720
+ security: [{ scheme: "bearer", type: "http" }],
1721
+ url: "/webhook_configs/{id}/test",
1722
+ ...options,
1723
+ headers: {
1724
+ "Content-Type": "application/vnd.api+json",
1725
+ ...options.headers
1726
+ }
1727
+ });
1728
+ var getUsersMe = (options) => (options.client ?? client).get({
1729
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1730
+ security: [{ scheme: "bearer", type: "http" }],
1731
+ url: "/users/me",
1732
+ ...options
1733
+ });
1734
+ var postUsersAuthRegisterWithOidc = (options) => (options.client ?? client).post({
1735
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1736
+ security: [{ scheme: "bearer", type: "http" }],
1737
+ url: "/users/auth/register_with_oidc",
1738
+ ...options,
1739
+ headers: {
1740
+ "Content-Type": "application/vnd.api+json",
1741
+ ...options.headers
1742
+ }
1743
+ });
1744
+ var postTenantsByIdCredit = (options) => (options.client ?? client).post({
1745
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1746
+ security: [{ scheme: "bearer", type: "http" }],
1747
+ url: "/tenants/{id}/credit",
1748
+ ...options,
1749
+ headers: {
1750
+ "Content-Type": "application/vnd.api+json",
1751
+ ...options.headers
1752
+ }
1753
+ });
1754
+ var getTransactionsById = (options) => (options.client ?? client).get({
1755
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1756
+ security: [{ scheme: "bearer", type: "http" }],
1757
+ url: "/transactions/{id}",
1758
+ ...options
1759
+ });
1760
+ var getTenantMemberships = (options) => (options.client ?? client).get({
1761
+ querySerializer: {
1762
+ parameters: {
1763
+ filter: { object: { style: "form" } },
1764
+ page: { object: { style: "form" } },
1765
+ fields: { object: { style: "form" } }
1766
+ }
1767
+ },
1768
+ security: [{ scheme: "bearer", type: "http" }],
1769
+ url: "/tenant-memberships",
1770
+ ...options
1771
+ });
1772
+ var postTenantMemberships = (options) => (options.client ?? client).post({
1773
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1774
+ security: [{ scheme: "bearer", type: "http" }],
1775
+ url: "/tenant-memberships",
1776
+ ...options,
1777
+ headers: {
1778
+ "Content-Type": "application/vnd.api+json",
1779
+ ...options.headers
1780
+ }
1781
+ });
1782
+ var postTrainingExamplesBulkDelete = (options) => (options.client ?? client).post({
1783
+ security: [{ scheme: "bearer", type: "http" }],
1784
+ url: "/training_examples/bulk_delete",
1785
+ ...options,
1786
+ headers: {
1787
+ "Content-Type": "application/vnd.api+json",
1788
+ ...options.headers
1789
+ }
1790
+ });
1791
+ var patchExtractionDocumentsByIdInclude = (options) => (options.client ?? client).patch({
1792
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1793
+ security: [{ scheme: "bearer", type: "http" }],
1794
+ url: "/extraction/documents/{id}/include",
1795
+ ...options,
1796
+ headers: {
1797
+ "Content-Type": "application/vnd.api+json",
1798
+ ...options.headers
1799
+ }
1800
+ });
1801
+ var getLlmAnalyticsSummary = (options) => (options.client ?? client).get({
1802
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1803
+ security: [{ scheme: "bearer", type: "http" }],
1804
+ url: "/llm_analytics/summary",
1805
+ ...options
1806
+ });
1807
+ var deleteExtractionSchemaFieldsById = (options) => (options.client ?? client).delete({
1808
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1809
+ security: [{ scheme: "bearer", type: "http" }],
1810
+ url: "/extraction/schema-fields/{id}",
1811
+ ...options
1812
+ });
1813
+ var getExtractionSchemaFieldsById = (options) => (options.client ?? client).get({
1814
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1815
+ security: [{ scheme: "bearer", type: "http" }],
1816
+ url: "/extraction/schema-fields/{id}",
1817
+ ...options
1818
+ });
1819
+ var patchExtractionSchemaFieldsById = (options) => (options.client ?? client).patch({
1820
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1821
+ security: [{ scheme: "bearer", type: "http" }],
1822
+ url: "/extraction/schema-fields/{id}",
1823
+ ...options,
1824
+ headers: {
1825
+ "Content-Type": "application/vnd.api+json",
1826
+ ...options.headers
1827
+ }
1828
+ });
1829
+ var postStorageSignDownload = (options) => (options.client ?? client).post({
1830
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1831
+ security: [{ scheme: "bearer", type: "http" }],
1832
+ url: "/storage/sign_download",
1833
+ ...options,
1834
+ headers: {
1835
+ "Content-Type": "application/vnd.api+json",
1836
+ ...options.headers
1837
+ }
1838
+ });
1839
+ var deleteTrainingSessionsById = (options) => (options.client ?? client).delete({
1840
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1841
+ security: [{ scheme: "bearer", type: "http" }],
1842
+ url: "/training_sessions/{id}",
1843
+ ...options
1844
+ });
1845
+ var getTrainingSessionsById = (options) => (options.client ?? client).get({
1846
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1847
+ security: [{ scheme: "bearer", type: "http" }],
1848
+ url: "/training_sessions/{id}",
1849
+ ...options
1850
+ });
1851
+ var deleteNotificationMethodsById = (options) => (options.client ?? client).delete({
1852
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1853
+ security: [{ scheme: "bearer", type: "http" }],
1854
+ url: "/notification_methods/{id}",
1855
+ ...options
1856
+ });
1857
+ var getNotificationMethodsById = (options) => (options.client ?? client).get({
1858
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1859
+ security: [{ scheme: "bearer", type: "http" }],
1860
+ url: "/notification_methods/{id}",
1861
+ ...options
1862
+ });
1863
+ var patchNotificationMethodsById = (options) => (options.client ?? client).patch({
1864
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1865
+ security: [{ scheme: "bearer", type: "http" }],
1866
+ url: "/notification_methods/{id}",
1867
+ ...options,
1868
+ headers: {
1869
+ "Content-Type": "application/vnd.api+json",
1870
+ ...options.headers
1871
+ }
1872
+ });
1873
+ var getWebhookDeliveries = (options) => (options.client ?? client).get({
1874
+ querySerializer: {
1875
+ parameters: {
1876
+ filter: { object: { style: "form" } },
1877
+ page: { object: { style: "form" } },
1878
+ fields: { object: { style: "form" } }
1879
+ }
1880
+ },
1881
+ security: [{ scheme: "bearer", type: "http" }],
1882
+ url: "/webhook_deliveries",
1883
+ ...options
1884
+ });
1885
+ var getSearch = (options) => (options.client ?? client).get({
1886
+ querySerializer: {
1887
+ parameters: {
1888
+ filter: { object: { style: "form" } },
1889
+ fields: { object: { style: "form" } }
1890
+ }
1891
+ },
1892
+ security: [{ scheme: "bearer", type: "http" }],
1893
+ url: "/search",
1894
+ ...options
1895
+ });
1896
+ var getInvitations = (options) => (options.client ?? client).get({
1897
+ querySerializer: {
1898
+ parameters: {
1899
+ filter: { object: { style: "form" } },
1900
+ fields: { object: { style: "form" } }
1901
+ }
1902
+ },
1903
+ security: [{ scheme: "bearer", type: "http" }],
1904
+ url: "/invitations",
1905
+ ...options
1906
+ });
1907
+ var getSearchSemantic = (options) => (options.client ?? client).get({
1908
+ querySerializer: {
1909
+ parameters: {
1910
+ filter: { object: { style: "form" } },
1911
+ fields: { object: { style: "form" } }
1912
+ }
1913
+ },
1914
+ security: [{ scheme: "bearer", type: "http" }],
1915
+ url: "/search/semantic",
1916
+ ...options
1917
+ });
1918
+ var getMessages = (options) => (options.client ?? client).get({
1919
+ querySerializer: {
1920
+ parameters: {
1921
+ filter: { object: { style: "form" } },
1922
+ page: { object: { style: "form" } },
1923
+ fields: { object: { style: "form" } }
1924
+ }
1925
+ },
1926
+ security: [{ scheme: "bearer", type: "http" }],
1927
+ url: "/messages",
1928
+ ...options
1929
+ });
1930
+ var postMessages = (options) => (options.client ?? client).post({
1931
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1932
+ security: [{ scheme: "bearer", type: "http" }],
1933
+ url: "/messages",
1934
+ ...options,
1935
+ headers: {
1936
+ "Content-Type": "application/vnd.api+json",
1937
+ ...options.headers
1938
+ }
1939
+ });
1940
+ var getNotificationPreferences = (options) => (options.client ?? client).get({
1941
+ querySerializer: {
1942
+ parameters: {
1943
+ filter: { object: { style: "form" } },
1944
+ page: { object: { style: "form" } },
1945
+ fields: { object: { style: "form" } }
1946
+ }
1947
+ },
1948
+ security: [{ scheme: "bearer", type: "http" }],
1949
+ url: "/notification_preferences",
1950
+ ...options
1951
+ });
1952
+ var postNotificationPreferences = (options) => (options.client ?? client).post({
1953
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1954
+ security: [{ scheme: "bearer", type: "http" }],
1955
+ url: "/notification_preferences",
1956
+ ...options,
1957
+ headers: {
1958
+ "Content-Type": "application/vnd.api+json",
1959
+ ...options.headers
1960
+ }
1961
+ });
1962
+ var getApplications = (options) => (options.client ?? client).get({
1963
+ querySerializer: {
1964
+ parameters: {
1965
+ filter: { object: { style: "form" } },
1966
+ page: { object: { style: "form" } },
1967
+ fields: { object: { style: "form" } }
1968
+ }
1969
+ },
1970
+ security: [{ scheme: "bearer", type: "http" }],
1971
+ url: "/applications",
1972
+ ...options
1973
+ });
1974
+ var postApplications = (options) => (options.client ?? client).post({
1975
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1976
+ security: [{ scheme: "bearer", type: "http" }],
1977
+ url: "/applications",
1978
+ ...options,
1979
+ headers: {
1980
+ "Content-Type": "application/vnd.api+json",
1981
+ ...options.headers
1982
+ }
1983
+ });
1984
+ var postAgentsPredict = (options) => (options.client ?? client).post({
1985
+ security: [{ scheme: "bearer", type: "http" }],
1986
+ url: "/agents/predict",
1987
+ ...options,
1988
+ headers: {
1989
+ "Content-Type": "application/vnd.api+json",
1990
+ ...options.headers
1991
+ }
1992
+ });
1993
+ var deleteThreadsById = (options) => (options.client ?? client).delete({
1994
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
1995
+ security: [{ scheme: "bearer", type: "http" }],
1996
+ url: "/threads/{id}",
1997
+ ...options
1998
+ });
1999
+ var getThreadsById = (options) => (options.client ?? client).get({
2000
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2001
+ security: [{ scheme: "bearer", type: "http" }],
2002
+ url: "/threads/{id}",
2003
+ ...options
2004
+ });
2005
+ var patchThreadsById = (options) => (options.client ?? client).patch({
2006
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2007
+ security: [{ scheme: "bearer", type: "http" }],
2008
+ url: "/threads/{id}",
2009
+ ...options,
2010
+ headers: {
2011
+ "Content-Type": "application/vnd.api+json",
2012
+ ...options.headers
2013
+ }
2014
+ });
2015
+ var getLlmAnalytics = (options) => (options.client ?? client).get({
2016
+ querySerializer: {
2017
+ parameters: {
2018
+ filter: { object: { style: "form" } },
2019
+ page: { object: { style: "form" } },
2020
+ fields: { object: { style: "form" } }
2021
+ }
2022
+ },
2023
+ security: [{ scheme: "bearer", type: "http" }],
2024
+ url: "/llm_analytics",
2025
+ ...options
2026
+ });
2027
+ var postLlmAnalytics = (options) => (options.client ?? client).post({
2028
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2029
+ security: [{ scheme: "bearer", type: "http" }],
2030
+ url: "/llm_analytics",
2031
+ ...options,
2032
+ headers: {
2033
+ "Content-Type": "application/vnd.api+json",
2034
+ ...options.headers
2035
+ }
2036
+ });
2037
+ var patchUsersByIdResetPassword = (options) => (options.client ?? client).patch({
2038
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2039
+ security: [{ scheme: "bearer", type: "http" }],
2040
+ url: "/users/{id}/reset-password",
2041
+ ...options,
2042
+ headers: {
2043
+ "Content-Type": "application/vnd.api+json",
2044
+ ...options.headers
2045
+ }
2046
+ });
2047
+ var postDocumentsPresignedUpload = (options) => (options.client ?? client).post({
2048
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2049
+ security: [{ scheme: "bearer", type: "http" }],
2050
+ url: "/documents/presigned_upload",
2051
+ ...options,
2052
+ headers: {
2053
+ "Content-Type": "application/vnd.api+json",
2054
+ ...options.headers
2055
+ }
2056
+ });
2057
+ var getMessagesSearch = (options) => (options.client ?? client).get({
2058
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2059
+ security: [{ scheme: "bearer", type: "http" }],
2060
+ url: "/messages/search",
2061
+ ...options
2062
+ });
2063
+ var postAgentsByIdTeach = (options) => (options.client ?? client).post({
2064
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2065
+ security: [{ scheme: "bearer", type: "http" }],
2066
+ url: "/agents/{id}/teach",
2067
+ ...options,
2068
+ headers: {
2069
+ "Content-Type": "application/vnd.api+json",
2070
+ ...options.headers
2071
+ }
2072
+ });
2073
+ var getExtractionDocumentsWorkspaceByWorkspaceIdReviewQueue = (options) => (options.client ?? client).get({
2074
+ querySerializer: {
2075
+ parameters: {
2076
+ filter: { object: { style: "form" } },
2077
+ page: { object: { style: "form" } },
2078
+ fields: { object: { style: "form" } }
2079
+ }
2080
+ },
2081
+ security: [{ scheme: "bearer", type: "http" }],
2082
+ url: "/extraction/documents/workspace/{workspace_id}/review_queue",
2083
+ ...options
2084
+ });
2085
+ var postExtractionDocumentsUpload = (options) => (options.client ?? client).post({
2086
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2087
+ security: [{ scheme: "bearer", type: "http" }],
2088
+ url: "/extraction/documents/upload",
2089
+ ...options,
2090
+ headers: {
2091
+ "Content-Type": "application/vnd.api+json",
2092
+ ...options.headers
2093
+ }
2094
+ });
2095
+ var patchExtractionResultsByIdCorrections = (options) => (options.client ?? client).patch({
2096
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2097
+ security: [{ scheme: "bearer", type: "http" }],
2098
+ url: "/extraction/results/{id}/corrections",
2099
+ ...options,
2100
+ headers: {
2101
+ "Content-Type": "application/vnd.api+json",
2102
+ ...options.headers
2103
+ }
2104
+ });
2105
+ var getExtractionResultsDocumentByDocumentId = (options) => (options.client ?? client).get({
2106
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2107
+ security: [{ scheme: "bearer", type: "http" }],
2108
+ url: "/extraction/results/document/{document_id}",
2109
+ ...options
2110
+ });
2111
+ var deleteWorkspacesById = (options) => (options.client ?? client).delete({
2112
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2113
+ security: [{ scheme: "bearer", type: "http" }],
2114
+ url: "/workspaces/{id}",
2115
+ ...options
2116
+ });
2117
+ var getWorkspacesById = (options) => (options.client ?? client).get({
2118
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2119
+ security: [{ scheme: "bearer", type: "http" }],
2120
+ url: "/workspaces/{id}",
2121
+ ...options
2122
+ });
2123
+ var patchWorkspacesById = (options) => (options.client ?? client).patch({
2124
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2125
+ security: [{ scheme: "bearer", type: "http" }],
2126
+ url: "/workspaces/{id}",
2127
+ ...options,
2128
+ headers: {
2129
+ "Content-Type": "application/vnd.api+json",
2130
+ ...options.headers
2131
+ }
2132
+ });
2133
+ var getTenants = (options) => (options.client ?? client).get({
2134
+ querySerializer: {
2135
+ parameters: {
2136
+ filter: { object: { style: "form" } },
2137
+ page: { object: { style: "form" } },
2138
+ fields: { object: { style: "form" } }
2139
+ }
2140
+ },
2141
+ security: [{ scheme: "bearer", type: "http" }],
2142
+ url: "/tenants",
2143
+ ...options
2144
+ });
2145
+ var postTenants = (options) => (options.client ?? client).post({
2146
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2147
+ security: [{ scheme: "bearer", type: "http" }],
2148
+ url: "/tenants",
2149
+ ...options,
2150
+ headers: {
2151
+ "Content-Type": "application/vnd.api+json",
2152
+ ...options.headers
2153
+ }
2154
+ });
2155
+ var postTenantsByIdRemoveStorage = (options) => (options.client ?? client).post({
2156
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2157
+ security: [{ scheme: "bearer", type: "http" }],
2158
+ url: "/tenants/{id}/remove-storage",
2159
+ ...options,
2160
+ headers: {
2161
+ "Content-Type": "application/vnd.api+json",
2162
+ ...options.headers
2163
+ }
2164
+ });
2165
+ var getNotificationLogsById = (options) => (options.client ?? client).get({
2166
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2167
+ security: [{ scheme: "bearer", type: "http" }],
2168
+ url: "/notification_logs/{id}",
2169
+ ...options
2170
+ });
2171
+ var getExtractionDocumentsByIdView = (options) => (options.client ?? client).get({
2172
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2173
+ security: [{ scheme: "bearer", type: "http" }],
2174
+ url: "/extraction/documents/{id}/view",
2175
+ ...options
2176
+ });
2177
+ var getWebhookDeliveriesById = (options) => (options.client ?? client).get({
2178
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2179
+ security: [{ scheme: "bearer", type: "http" }],
2180
+ url: "/webhook_deliveries/{id}",
2181
+ ...options
2182
+ });
2183
+ var getAuditLogs = (options) => (options.client ?? client).get({
2184
+ querySerializer: {
2185
+ parameters: {
2186
+ filter: { object: { style: "form" } },
2187
+ page: { object: { style: "form" } },
2188
+ fields: { object: { style: "form" } }
2189
+ }
2190
+ },
2191
+ security: [{ scheme: "bearer", type: "http" }],
2192
+ url: "/audit-logs",
2193
+ ...options
2194
+ });
2195
+ var getAiGraphEdges = (options) => (options.client ?? client).get({
2196
+ querySerializer: {
2197
+ parameters: {
2198
+ filter: { object: { style: "form" } },
2199
+ page: { object: { style: "form" } },
2200
+ fields: { object: { style: "form" } }
2201
+ }
2202
+ },
2203
+ security: [{ scheme: "bearer", type: "http" }],
2204
+ url: "/ai/graph/edges",
2205
+ ...options
2206
+ });
2207
+ var postAiGraphEdges = (options) => (options.client ?? client).post({
2208
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2209
+ security: [{ scheme: "bearer", type: "http" }],
2210
+ url: "/ai/graph/edges",
2211
+ ...options,
2212
+ headers: {
2213
+ "Content-Type": "application/vnd.api+json",
2214
+ ...options.headers
2215
+ }
2216
+ });
2217
+ var getTrainingExamples = (options) => (options.client ?? client).get({
2218
+ querySerializer: {
2219
+ parameters: {
2220
+ filter: { object: { style: "form" } },
2221
+ page: { object: { style: "form" } },
2222
+ fields: { object: { style: "form" } }
2223
+ }
2224
+ },
2225
+ security: [{ scheme: "bearer", type: "http" }],
2226
+ url: "/training_examples",
2227
+ ...options
2228
+ });
2229
+ var postTrainingExamples = (options) => (options.client ?? client).post({
2230
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2231
+ security: [{ scheme: "bearer", type: "http" }],
2232
+ url: "/training_examples",
2233
+ ...options,
2234
+ headers: {
2235
+ "Content-Type": "application/vnd.api+json",
2236
+ ...options.headers
2237
+ }
2238
+ });
2239
+ var getWorkspacesByWorkspaceIdExtractionExportsById = (options) => (options.client ?? client).get({
2240
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2241
+ security: [{ scheme: "bearer", type: "http" }],
2242
+ url: "/workspaces/{workspace_id}/extraction/exports/{id}",
2243
+ ...options
2244
+ });
2245
+ var getAgentsByIdTrainingStats = (options) => (options.client ?? client).get({
2246
+ security: [{ scheme: "bearer", type: "http" }],
2247
+ url: "/agents/{id}/training_stats",
2248
+ ...options
2249
+ });
2250
+ var getBuckets = (options) => (options.client ?? client).get({
2251
+ querySerializer: {
2252
+ parameters: {
2253
+ filter: { object: { style: "form" } },
2254
+ page: { object: { style: "form" } },
2255
+ fields: { object: { style: "form" } }
2256
+ }
2257
+ },
2258
+ security: [{ scheme: "bearer", type: "http" }],
2259
+ url: "/buckets",
2260
+ ...options
2261
+ });
2262
+ var postBuckets = (options) => (options.client ?? client).post({
2263
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2264
+ security: [{ scheme: "bearer", type: "http" }],
2265
+ url: "/buckets",
2266
+ ...options,
2267
+ headers: {
2268
+ "Content-Type": "application/vnd.api+json",
2269
+ ...options.headers
2270
+ }
2271
+ });
2272
+ var getPlansById = (options) => (options.client ?? client).get({
2273
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2274
+ security: [{ scheme: "bearer", type: "http" }],
2275
+ url: "/plans/{id}",
2276
+ ...options
2277
+ });
2278
+ var getTenantsByTenantIdStats = (options) => (options.client ?? client).get({
2279
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2280
+ security: [{ scheme: "bearer", type: "http" }],
2281
+ url: "/tenants/{tenant_id}/stats",
2282
+ ...options
2283
+ });
2284
+ var patchWalletAddons = (options) => (options.client ?? client).patch({
2285
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2286
+ security: [{ scheme: "bearer", type: "http" }],
2287
+ url: "/wallet/addons",
2288
+ ...options,
2289
+ headers: {
2290
+ "Content-Type": "application/vnd.api+json",
2291
+ ...options.headers
2292
+ }
2293
+ });
2294
+ var postUsersAuthMagicLinkLogin = (options) => (options.client ?? client).post({
2295
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2296
+ security: [{ scheme: "bearer", type: "http" }],
2297
+ url: "/users/auth/magic_link/login",
2298
+ ...options,
2299
+ headers: {
2300
+ "Content-Type": "application/vnd.api+json",
2301
+ ...options.headers
2302
+ }
2303
+ });
2304
+ var getApiKeys = (options) => (options.client ?? client).get({
2305
+ querySerializer: {
2306
+ parameters: {
2307
+ filter: { object: { style: "form" } },
2308
+ page: { object: { style: "form" } },
2309
+ fields: { object: { style: "form" } }
2310
+ }
2311
+ },
2312
+ security: [{ scheme: "bearer", type: "http" }],
2313
+ url: "/api_keys",
2314
+ ...options
2315
+ });
2316
+ var postApiKeys = (options) => (options.client ?? client).post({
2317
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2318
+ security: [{ scheme: "bearer", type: "http" }],
2319
+ url: "/api_keys",
2320
+ ...options,
2321
+ headers: {
2322
+ "Content-Type": "application/vnd.api+json",
2323
+ ...options.headers
2324
+ }
2325
+ });
2326
+ var patchUsersByIdAdmin = (options) => (options.client ?? client).patch({
2327
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2328
+ security: [{ scheme: "bearer", type: "http" }],
2329
+ url: "/users/{id}/admin",
2330
+ ...options,
2331
+ headers: {
2332
+ "Content-Type": "application/vnd.api+json",
2333
+ ...options.headers
2334
+ }
2335
+ });
2336
+ var deleteAgentsById = (options) => (options.client ?? client).delete({
2337
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2338
+ security: [{ scheme: "bearer", type: "http" }],
2339
+ url: "/agents/{id}",
2340
+ ...options
2341
+ });
2342
+ var getAgentsById = (options) => (options.client ?? client).get({
2343
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2344
+ security: [{ scheme: "bearer", type: "http" }],
2345
+ url: "/agents/{id}",
2346
+ ...options
2347
+ });
2348
+ var patchAgentsById = (options) => (options.client ?? client).patch({
2349
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2350
+ security: [{ scheme: "bearer", type: "http" }],
2351
+ url: "/agents/{id}",
2352
+ ...options,
2353
+ headers: {
2354
+ "Content-Type": "application/vnd.api+json",
2355
+ ...options.headers
2356
+ }
2357
+ });
2358
+ var deleteApiKeysById = (options) => (options.client ?? client).delete({
2359
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2360
+ security: [{ scheme: "bearer", type: "http" }],
2361
+ url: "/api_keys/{id}",
2362
+ ...options
2363
+ });
2364
+ var getApiKeysById = (options) => (options.client ?? client).get({
2365
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2366
+ security: [{ scheme: "bearer", type: "http" }],
2367
+ url: "/api_keys/{id}",
2368
+ ...options
2369
+ });
2370
+ var patchApiKeysById = (options) => (options.client ?? client).patch({
2371
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2372
+ security: [{ scheme: "bearer", type: "http" }],
2373
+ url: "/api_keys/{id}",
2374
+ ...options,
2375
+ headers: {
2376
+ "Content-Type": "application/vnd.api+json",
2377
+ ...options.headers
2378
+ }
2379
+ });
2380
+ var postTrainingExamplesSearch = (options) => (options.client ?? client).post({
2381
+ security: [{ scheme: "bearer", type: "http" }],
2382
+ url: "/training_examples/search",
2383
+ ...options,
2384
+ headers: {
2385
+ "Content-Type": "application/vnd.api+json",
2386
+ ...options.headers
2387
+ }
2388
+ });
2389
+ var getAiConversations = (options) => (options.client ?? client).get({
2390
+ querySerializer: {
2391
+ parameters: {
2392
+ filter: { object: { style: "form" } },
2393
+ page: { object: { style: "form" } },
2394
+ fields: { object: { style: "form" } }
2395
+ }
2396
+ },
2397
+ security: [{ scheme: "bearer", type: "http" }],
2398
+ url: "/ai/conversations",
2399
+ ...options
2400
+ });
2401
+ var postAiConversations = (options) => (options.client ?? client).post({
2402
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2403
+ security: [{ scheme: "bearer", type: "http" }],
2404
+ url: "/ai/conversations",
2405
+ ...options,
2406
+ headers: {
2407
+ "Content-Type": "application/vnd.api+json",
2408
+ ...options.headers
2409
+ }
2410
+ });
2411
+ var postAiSearch = (options) => (options.client ?? client).post({
2412
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2413
+ security: [{ scheme: "bearer", type: "http" }],
2414
+ url: "/ai/search",
2415
+ ...options,
2416
+ headers: {
2417
+ "Content-Type": "application/vnd.api+json",
2418
+ ...options.headers
2419
+ }
2420
+ });
2421
+ var deleteAiGraphNodesById = (options) => (options.client ?? client).delete({
2422
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2423
+ security: [{ scheme: "bearer", type: "http" }],
2424
+ url: "/ai/graph/nodes/{id}",
2425
+ ...options
2426
+ });
2427
+ var patchWalletAddonsByAddonSlugCancel = (options) => (options.client ?? client).patch({
2428
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2429
+ security: [{ scheme: "bearer", type: "http" }],
2430
+ url: "/wallet/addons/{addon_slug}/cancel",
2431
+ ...options,
2432
+ headers: {
2433
+ "Content-Type": "application/vnd.api+json",
2434
+ ...options.headers
2435
+ }
2436
+ });
2437
+ var deleteApplicationsById = (options) => (options.client ?? client).delete({
2438
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2439
+ security: [{ scheme: "bearer", type: "http" }],
2440
+ url: "/applications/{id}",
2441
+ ...options
2442
+ });
2443
+ var getApplicationsById = (options) => (options.client ?? client).get({
2444
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2445
+ security: [{ scheme: "bearer", type: "http" }],
2446
+ url: "/applications/{id}",
2447
+ ...options
2448
+ });
2449
+ var patchApplicationsById = (options) => (options.client ?? client).patch({
2450
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2451
+ security: [{ scheme: "bearer", type: "http" }],
2452
+ url: "/applications/{id}",
2453
+ ...options,
2454
+ headers: {
2455
+ "Content-Type": "application/vnd.api+json",
2456
+ ...options.headers
2457
+ }
2458
+ });
2459
+ var getSearchHealth = (options) => (options.client ?? client).get({
2460
+ querySerializer: {
2461
+ parameters: {
2462
+ filter: { object: { style: "form" } },
2463
+ fields: { object: { style: "form" } }
2464
+ }
2465
+ },
2466
+ security: [{ scheme: "bearer", type: "http" }],
2467
+ url: "/search/health",
2468
+ ...options
2469
+ });
2470
+ var getTransactions = (options) => (options.client ?? client).get({
2471
+ querySerializer: {
2472
+ parameters: {
2473
+ filter: { object: { style: "form" } },
2474
+ fields: { object: { style: "form" } }
2475
+ }
2476
+ },
2477
+ security: [{ scheme: "bearer", type: "http" }],
2478
+ url: "/transactions",
2479
+ ...options
2480
+ });
2481
+ var getUserProfiles = (options) => (options.client ?? client).get({
2482
+ querySerializer: {
2483
+ parameters: {
2484
+ filter: { object: { style: "form" } },
2485
+ page: { object: { style: "form" } },
2486
+ fields: { object: { style: "form" } }
2487
+ }
2488
+ },
2489
+ security: [{ scheme: "bearer", type: "http" }],
2490
+ url: "/user_profiles",
2491
+ ...options
2492
+ });
2493
+ var postUserProfiles = (options) => (options.client ?? client).post({
2494
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2495
+ security: [{ scheme: "bearer", type: "http" }],
2496
+ url: "/user_profiles",
2497
+ ...options,
2498
+ headers: {
2499
+ "Content-Type": "application/vnd.api+json",
2500
+ ...options.headers
2501
+ }
2502
+ });
2503
+ var patchUsersByIdConfirmEmail = (options) => (options.client ?? client).patch({
2504
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2505
+ security: [{ scheme: "bearer", type: "http" }],
2506
+ url: "/users/{id}/confirm-email",
2507
+ ...options,
2508
+ headers: {
2509
+ "Content-Type": "application/vnd.api+json",
2510
+ ...options.headers
2511
+ }
2512
+ });
2513
+ var getThreadsSearch = (options) => (options.client ?? client).get({
2514
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2515
+ security: [{ scheme: "bearer", type: "http" }],
2516
+ url: "/threads/search",
2517
+ ...options
2518
+ });
2519
+ var patchWalletPlan = (options) => (options.client ?? client).patch({
2520
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2521
+ security: [{ scheme: "bearer", type: "http" }],
2522
+ url: "/wallet/plan",
2523
+ ...options,
2524
+ headers: {
2525
+ "Content-Type": "application/vnd.api+json",
2526
+ ...options.headers
2527
+ }
2528
+ });
2529
+ var getPlansSlugBySlug = (options) => (options.client ?? client).get({
2530
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2531
+ security: [{ scheme: "bearer", type: "http" }],
2532
+ url: "/plans/slug/{slug}",
2533
+ ...options
2534
+ });
2535
+ var patchExtractionDocumentsByIdRestore = (options) => (options.client ?? client).patch({
2536
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2537
+ security: [{ scheme: "bearer", type: "http" }],
2538
+ url: "/extraction/documents/{id}/restore",
2539
+ ...options,
2540
+ headers: {
2541
+ "Content-Type": "application/vnd.api+json",
2542
+ ...options.headers
2543
+ }
2544
+ });
2545
+ var getLlmAnalyticsById = (options) => (options.client ?? client).get({
2546
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2547
+ security: [{ scheme: "bearer", type: "http" }],
2548
+ url: "/llm_analytics/{id}",
2549
+ ...options
2550
+ });
2551
+ var getExtractionSchemaFields = (options) => (options.client ?? client).get({
2552
+ querySerializer: {
2553
+ parameters: {
2554
+ filter: { object: { style: "form" } },
2555
+ page: { object: { style: "form" } },
2556
+ fields: { object: { style: "form" } }
2557
+ }
2558
+ },
2559
+ security: [{ scheme: "bearer", type: "http" }],
2560
+ url: "/extraction/schema-fields",
2561
+ ...options
2562
+ });
2563
+ var postExtractionSchemaFields = (options) => (options.client ?? client).post({
2564
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2565
+ security: [{ scheme: "bearer", type: "http" }],
2566
+ url: "/extraction/schema-fields",
2567
+ ...options,
2568
+ headers: {
2569
+ "Content-Type": "application/vnd.api+json",
2570
+ ...options.headers
2571
+ }
2572
+ });
2573
+ var patchApplicationsByIdGrantCredits = (options) => (options.client ?? client).patch({
2574
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2575
+ security: [{ scheme: "bearer", type: "http" }],
2576
+ url: "/applications/{id}/grant-credits",
2577
+ ...options,
2578
+ headers: {
2579
+ "Content-Type": "application/vnd.api+json",
2580
+ ...options.headers
2581
+ }
2582
+ });
2583
+ var getSearchStatus = (options) => (options.client ?? client).get({
2584
+ querySerializer: {
2585
+ parameters: {
2586
+ filter: { object: { style: "form" } },
2587
+ fields: { object: { style: "form" } }
2588
+ }
2589
+ },
2590
+ security: [{ scheme: "bearer", type: "http" }],
2591
+ url: "/search/status",
2592
+ ...options
2593
+ });
2594
+ var getTenantsByTenantIdWorkspaceStats = (options) => (options.client ?? client).get({
2595
+ querySerializer: {
2596
+ parameters: {
2597
+ filter: { object: { style: "form" } },
2598
+ fields: { object: { style: "form" } }
2599
+ }
2600
+ },
2601
+ security: [{ scheme: "bearer", type: "http" }],
2602
+ url: "/tenants/{tenant_id}/workspace_stats",
2603
+ ...options
2604
+ });
2605
+ var patchApiKeysByIdAllocate = (options) => (options.client ?? client).patch({
2606
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2607
+ security: [{ scheme: "bearer", type: "http" }],
2608
+ url: "/api_keys/{id}/allocate",
2609
+ ...options,
2610
+ headers: {
2611
+ "Content-Type": "application/vnd.api+json",
2612
+ ...options.headers
2613
+ }
2614
+ });
2615
+ var postUsersAuthLogin = (options) => (options.client ?? client).post({
2616
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2617
+ security: [{ scheme: "bearer", type: "http" }],
2618
+ url: "/users/auth/login",
2619
+ ...options,
2620
+ headers: {
2621
+ "Content-Type": "application/vnd.api+json",
2622
+ ...options.headers
2623
+ }
2624
+ });
2625
+ var postAiEmbed = (options) => (options.client ?? client).post({
2626
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2627
+ security: [{ scheme: "bearer", type: "http" }],
2628
+ url: "/ai/embed",
2629
+ ...options,
2630
+ headers: {
2631
+ "Content-Type": "application/vnd.api+json",
2632
+ ...options.headers
2633
+ }
2634
+ });
2635
+ var getWorkspacesMine = (options) => (options.client ?? client).get({
2636
+ querySerializer: {
2637
+ parameters: {
2638
+ filter: { object: { style: "form" } },
2639
+ fields: { object: { style: "form" } }
2640
+ }
2641
+ },
2642
+ security: [{ scheme: "bearer", type: "http" }],
2643
+ url: "/workspaces/mine",
2644
+ ...options
2645
+ });
2646
+ var postTenantsIsv = (options) => (options.client ?? client).post({
2647
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2648
+ security: [{ scheme: "bearer", type: "http" }],
2649
+ url: "/tenants/isv",
2650
+ ...options,
2651
+ headers: {
2652
+ "Content-Type": "application/vnd.api+json",
2653
+ ...options.headers
2654
+ }
2655
+ });
2656
+ var postSearchReindex = (options) => (options.client ?? client).post({
2657
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2658
+ security: [{ scheme: "bearer", type: "http" }],
2659
+ url: "/search/reindex",
2660
+ ...options,
2661
+ headers: {
2662
+ "Content-Type": "application/vnd.api+json",
2663
+ ...options.headers
2664
+ }
2665
+ });
2666
+ var patchExtractionResultsByIdRegenerate = (options) => (options.client ?? client).patch({
2667
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2668
+ security: [{ scheme: "bearer", type: "http" }],
2669
+ url: "/extraction/results/{id}/regenerate",
2670
+ ...options,
2671
+ headers: {
2672
+ "Content-Type": "application/vnd.api+json",
2673
+ ...options.headers
2674
+ }
2675
+ });
2676
+ var postUsersAuthConfirm = (options) => (options.client ?? client).post({
2677
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2678
+ security: [{ scheme: "bearer", type: "http" }],
2679
+ url: "/users/auth/confirm",
2680
+ ...options,
2681
+ headers: {
2682
+ "Content-Type": "application/vnd.api+json",
2683
+ ...options.headers
2684
+ }
2685
+ });
2686
+ var getExtractionSchemas = (options) => (options.client ?? client).get({
2687
+ querySerializer: {
2688
+ parameters: {
2689
+ filter: { object: { style: "form" } },
2690
+ page: { object: { style: "form" } },
2691
+ fields: { object: { style: "form" } }
2692
+ }
2693
+ },
2694
+ security: [{ scheme: "bearer", type: "http" }],
2695
+ url: "/extraction/schemas",
2696
+ ...options
2697
+ });
2698
+ var postExtractionSchemas = (options) => (options.client ?? client).post({
2699
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2700
+ security: [{ scheme: "bearer", type: "http" }],
2701
+ url: "/extraction/schemas",
2702
+ ...options,
2703
+ headers: {
2704
+ "Content-Type": "application/vnd.api+json",
2705
+ ...options.headers
2706
+ }
2707
+ });
2708
+ var getStorageStats = (options) => (options.client ?? client).get({
2709
+ querySerializer: {
2710
+ parameters: {
2711
+ filter: { object: { style: "form" } },
2712
+ fields: { object: { style: "form" } }
2713
+ }
2714
+ },
2715
+ security: [{ scheme: "bearer", type: "http" }],
2716
+ url: "/storage/stats",
2717
+ ...options
2718
+ });
2719
+ var postTenantsByIdBuyStorage = (options) => (options.client ?? client).post({
2720
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2721
+ security: [{ scheme: "bearer", type: "http" }],
2722
+ url: "/tenants/{id}/buy-storage",
2723
+ ...options,
2724
+ headers: {
2725
+ "Content-Type": "application/vnd.api+json",
2726
+ ...options.headers
2727
+ }
2728
+ });
2729
+ var getWorkspaceMemberships = (options) => (options.client ?? client).get({
2730
+ querySerializer: {
2731
+ parameters: {
2732
+ filter: { object: { style: "form" } },
2733
+ page: { object: { style: "form" } },
2734
+ fields: { object: { style: "form" } }
2735
+ }
2736
+ },
2737
+ security: [{ scheme: "bearer", type: "http" }],
2738
+ url: "/workspace-memberships",
2739
+ ...options
2740
+ });
2741
+ var postWorkspaceMemberships = (options) => (options.client ?? client).post({
2742
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2743
+ security: [{ scheme: "bearer", type: "http" }],
2744
+ url: "/workspace-memberships",
2745
+ ...options,
2746
+ headers: {
2747
+ "Content-Type": "application/vnd.api+json",
2748
+ ...options.headers
2749
+ }
2750
+ });
2751
+ var getTenantsByTenantIdDocumentStats = (options) => (options.client ?? client).get({
2752
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2753
+ security: [{ scheme: "bearer", type: "http" }],
2754
+ url: "/tenants/{tenant_id}/document_stats",
2755
+ ...options
2756
+ });
2757
+ var postUsersAuthMagicLinkRequest = (options) => (options.client ?? client).post({
2758
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2759
+ security: [{ scheme: "bearer", type: "http" }],
2760
+ url: "/users/auth/magic_link/request",
2761
+ ...options,
2762
+ headers: {
2763
+ "Content-Type": "application/vnd.api+json",
2764
+ ...options.headers
2765
+ }
2766
+ });
2767
+ var postUsersAuthRegister = (options) => (options.client ?? client).post({
2768
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2769
+ security: [{ scheme: "bearer", type: "http" }],
2770
+ url: "/users/auth/register",
2771
+ ...options,
2772
+ headers: {
2773
+ "Content-Type": "application/vnd.api+json",
2774
+ ...options.headers
2775
+ }
2776
+ });
2777
+ var postTrainingExamplesBulk = (options) => (options.client ?? client).post({
2778
+ security: [{ scheme: "bearer", type: "http" }],
2779
+ url: "/training_examples/bulk",
2780
+ ...options,
2781
+ headers: {
2782
+ "Content-Type": "application/vnd.api+json",
2783
+ ...options.headers
2784
+ }
2785
+ });
2786
+ var deleteBucketsById = (options) => (options.client ?? client).delete({
2787
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2788
+ security: [{ scheme: "bearer", type: "http" }],
2789
+ url: "/buckets/{id}",
2790
+ ...options
2791
+ });
2792
+ var getBucketsById = (options) => (options.client ?? client).get({
2793
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2794
+ security: [{ scheme: "bearer", type: "http" }],
2795
+ url: "/buckets/{id}",
2796
+ ...options
2797
+ });
2798
+ var patchBucketsById = (options) => (options.client ?? client).patch({
2799
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2800
+ security: [{ scheme: "bearer", type: "http" }],
2801
+ url: "/buckets/{id}",
2802
+ ...options,
2803
+ headers: {
2804
+ "Content-Type": "application/vnd.api+json",
2805
+ ...options.headers
2806
+ }
2807
+ });
2808
+ var getExtractionDocumentsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
2809
+ querySerializer: {
2810
+ parameters: {
2811
+ filter: { object: { style: "form" } },
2812
+ fields: { object: { style: "form" } }
2813
+ }
2814
+ },
2815
+ security: [{ scheme: "bearer", type: "http" }],
2816
+ url: "/extraction/documents/workspace/{workspace_id}",
2817
+ ...options
2818
+ });
2819
+ var postExtractionDocumentsBeginUpload = (options) => (options.client ?? client).post({
2820
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2821
+ security: [{ scheme: "bearer", type: "http" }],
2822
+ url: "/extraction/documents/begin_upload",
2823
+ ...options,
2824
+ headers: {
2825
+ "Content-Type": "application/vnd.api+json",
2826
+ ...options.headers
2827
+ }
2828
+ });
2829
+ var deleteAiGraphEdgesById = (options) => (options.client ?? client).delete({
2830
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2831
+ security: [{ scheme: "bearer", type: "http" }],
2832
+ url: "/ai/graph/edges/{id}",
2833
+ ...options
2834
+ });
2835
+ var deleteTenantsById = (options) => (options.client ?? client).delete({
2836
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2837
+ security: [{ scheme: "bearer", type: "http" }],
2838
+ url: "/tenants/{id}",
2839
+ ...options
2840
+ });
2841
+ var getTenantsById = (options) => (options.client ?? client).get({
2842
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2843
+ security: [{ scheme: "bearer", type: "http" }],
2844
+ url: "/tenants/{id}",
2845
+ ...options
2846
+ });
2847
+ var patchTenantsById = (options) => (options.client ?? client).patch({
2848
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2849
+ security: [{ scheme: "bearer", type: "http" }],
2850
+ url: "/tenants/{id}",
2851
+ ...options,
2852
+ headers: {
2853
+ "Content-Type": "application/vnd.api+json",
2854
+ ...options.headers
2855
+ }
2856
+ });
2857
+ var getPlans = (options) => (options.client ?? client).get({
2858
+ querySerializer: {
2859
+ parameters: {
2860
+ filter: { object: { style: "form" } },
2861
+ page: { object: { style: "form" } },
2862
+ fields: { object: { style: "form" } }
2863
+ }
2864
+ },
2865
+ security: [{ scheme: "bearer", type: "http" }],
2866
+ url: "/plans",
2867
+ ...options
2868
+ });
2869
+ var patchExtractionSchemasByIdFields = (options) => (options.client ?? client).patch({
2870
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2871
+ security: [{ scheme: "bearer", type: "http" }],
2872
+ url: "/extraction/schemas/{id}/fields",
2873
+ ...options,
2874
+ headers: {
2875
+ "Content-Type": "application/vnd.api+json",
2876
+ ...options.headers
2877
+ }
2878
+ });
2879
+ var getExtractionSchemasById = (options) => (options.client ?? client).get({
2880
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2881
+ security: [{ scheme: "bearer", type: "http" }],
2882
+ url: "/extraction/schemas/{id}",
2883
+ ...options
2884
+ });
2885
+ var patchExtractionSchemasById = (options) => (options.client ?? client).patch({
2886
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2887
+ security: [{ scheme: "bearer", type: "http" }],
2888
+ url: "/extraction/schemas/{id}",
2889
+ ...options,
2890
+ headers: {
2891
+ "Content-Type": "application/vnd.api+json",
2892
+ ...options.headers
2893
+ }
2894
+ });
2895
+ var postAgentsByIdTest = (options) => (options.client ?? client).post({
2896
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2897
+ security: [{ scheme: "bearer", type: "http" }],
2898
+ url: "/agents/{id}/test",
2899
+ ...options,
2900
+ headers: {
2901
+ "Content-Type": "application/vnd.api+json",
2902
+ ...options.headers
2903
+ }
2904
+ });
2905
+ var getExtractionDocuments = (options) => (options.client ?? client).get({
2906
+ querySerializer: {
2907
+ parameters: {
2908
+ filter: { object: { style: "form" } },
2909
+ fields: { object: { style: "form" } }
2910
+ }
2911
+ },
2912
+ security: [{ scheme: "bearer", type: "http" }],
2913
+ url: "/extraction/documents",
2914
+ ...options
2915
+ });
2916
+ var deleteTenantMembershipsByTenantIdByUserId = (options) => (options.client ?? client).delete({
2917
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2918
+ security: [{ scheme: "bearer", type: "http" }],
2919
+ url: "/tenant-memberships/{tenant_id}/{user_id}",
2920
+ ...options
2921
+ });
2922
+ var patchTenantMembershipsByTenantIdByUserId = (options) => (options.client ?? client).patch({
2923
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2924
+ security: [{ scheme: "bearer", type: "http" }],
2925
+ url: "/tenant-memberships/{tenant_id}/{user_id}",
2926
+ ...options,
2927
+ headers: {
2928
+ "Content-Type": "application/vnd.api+json",
2929
+ ...options.headers
2930
+ }
2931
+ });
2932
+ var patchWebhookConfigsByIdRotateSecret = (options) => (options.client ?? client).patch({
2933
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2934
+ security: [{ scheme: "bearer", type: "http" }],
2935
+ url: "/webhook_configs/{id}/rotate_secret",
2936
+ ...options,
2937
+ headers: {
2938
+ "Content-Type": "application/vnd.api+json",
2939
+ ...options.headers
2940
+ }
2941
+ });
2942
+ var getFieldTemplates = (options) => (options.client ?? client).get({
2943
+ querySerializer: {
2944
+ parameters: {
2945
+ filter: { object: { style: "form" } },
2946
+ fields: { object: { style: "form" } }
2947
+ }
2948
+ },
2949
+ security: [{ scheme: "bearer", type: "http" }],
2950
+ url: "/field_templates",
2951
+ ...options
2952
+ });
2953
+ var postFieldTemplates = (options) => (options.client ?? client).post({
2954
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2955
+ security: [{ scheme: "bearer", type: "http" }],
2956
+ url: "/field_templates",
2957
+ ...options,
2958
+ headers: {
2959
+ "Content-Type": "application/vnd.api+json",
2960
+ ...options.headers
2961
+ }
2962
+ });
2963
+ var getAiMessages = (options) => (options.client ?? client).get({
2964
+ querySerializer: {
2965
+ parameters: {
2966
+ filter: { object: { style: "form" } },
2967
+ page: { object: { style: "form" } },
2968
+ fields: { object: { style: "form" } }
2969
+ }
2970
+ },
2971
+ security: [{ scheme: "bearer", type: "http" }],
2972
+ url: "/ai/messages",
2973
+ ...options
2974
+ });
2975
+ var postAiMessages = (options) => (options.client ?? client).post({
2976
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2977
+ security: [{ scheme: "bearer", type: "http" }],
2978
+ url: "/ai/messages",
2979
+ ...options,
2980
+ headers: {
2981
+ "Content-Type": "application/vnd.api+json",
2982
+ ...options.headers
2983
+ }
2984
+ });
2985
+ var postStorageSignUpload = (options) => (options.client ?? client).post({
2986
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2987
+ security: [{ scheme: "bearer", type: "http" }],
2988
+ url: "/storage/sign_upload",
2989
+ ...options,
2990
+ headers: {
2991
+ "Content-Type": "application/vnd.api+json",
2992
+ ...options.headers
2993
+ }
2994
+ });
2995
+ var postWebhookDeliveriesByIdRetry = (options) => (options.client ?? client).post({
2996
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
2997
+ security: [{ scheme: "bearer", type: "http" }],
2998
+ url: "/webhook_deliveries/{id}/retry",
2999
+ ...options,
3000
+ headers: {
3001
+ "Content-Type": "application/vnd.api+json",
3002
+ ...options.headers
3003
+ }
3004
+ });
3005
+ var getNotificationMethods = (options) => (options.client ?? client).get({
3006
+ querySerializer: {
3007
+ parameters: {
3008
+ filter: { object: { style: "form" } },
3009
+ page: { object: { style: "form" } },
3010
+ fields: { object: { style: "form" } }
3011
+ }
3012
+ },
3013
+ security: [{ scheme: "bearer", type: "http" }],
3014
+ url: "/notification_methods",
3015
+ ...options
3016
+ });
3017
+ var postNotificationMethods = (options) => (options.client ?? client).post({
3018
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3019
+ security: [{ scheme: "bearer", type: "http" }],
3020
+ url: "/notification_methods",
3021
+ ...options,
3022
+ headers: {
3023
+ "Content-Type": "application/vnd.api+json",
3024
+ ...options.headers
3025
+ }
3026
+ });
3027
+ var postThreadsByIdSummarize = (options) => (options.client ?? client).post({
3028
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3029
+ security: [{ scheme: "bearer", type: "http" }],
3030
+ url: "/threads/{id}/summarize",
3031
+ ...options,
3032
+ headers: {
3033
+ "Content-Type": "application/vnd.api+json",
3034
+ ...options.headers
3035
+ }
3036
+ });
3037
+ var patchConfigsByKey = (options) => (options.client ?? client).patch({
3038
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3039
+ security: [{ scheme: "bearer", type: "http" }],
3040
+ url: "/configs/{key}",
3041
+ ...options,
3042
+ headers: {
3043
+ "Content-Type": "application/vnd.api+json",
3044
+ ...options.headers
3045
+ }
3046
+ });
3047
+ var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
3048
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3049
+ security: [{ scheme: "bearer", type: "http" }],
3050
+ url: "/api_keys/{id}/rotate",
3051
+ ...options,
3052
+ headers: {
3053
+ "Content-Type": "application/vnd.api+json",
3054
+ ...options.headers
3055
+ }
3056
+ });
3057
+ var postExtractionResults = (options) => (options.client ?? client).post({
3058
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3059
+ security: [{ scheme: "bearer", type: "http" }],
3060
+ url: "/extraction/results",
3061
+ ...options,
3062
+ headers: {
3063
+ "Content-Type": "application/vnd.api+json",
3064
+ ...options.headers
3065
+ }
3066
+ });
3067
+ var postAgentsByIdClone = (options) => (options.client ?? client).post({
3068
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3069
+ security: [{ scheme: "bearer", type: "http" }],
3070
+ url: "/agents/{id}/clone",
3071
+ ...options,
3072
+ headers: {
3073
+ "Content-Type": "application/vnd.api+json",
3074
+ ...options.headers
3075
+ }
3076
+ });
3077
+ var deleteAiConversationsById = (options) => (options.client ?? client).delete({
3078
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3079
+ security: [{ scheme: "bearer", type: "http" }],
3080
+ url: "/ai/conversations/{id}",
3081
+ ...options
3082
+ });
3083
+ var getAiConversationsById = (options) => (options.client ?? client).get({
3084
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3085
+ security: [{ scheme: "bearer", type: "http" }],
3086
+ url: "/ai/conversations/{id}",
3087
+ ...options
3088
+ });
3089
+ var postExtractionSchemasBulkCreate = (options) => (options.client ?? client).post({
3090
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3091
+ security: [{ scheme: "bearer", type: "http" }],
3092
+ url: "/extraction/schemas/bulk_create",
3093
+ ...options,
3094
+ headers: {
3095
+ "Content-Type": "application/vnd.api+json",
3096
+ ...options.headers
3097
+ }
3098
+ });
3099
+ var deleteUserProfilesById = (options) => (options.client ?? client).delete({
3100
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3101
+ security: [{ scheme: "bearer", type: "http" }],
3102
+ url: "/user_profiles/{id}",
3103
+ ...options
3104
+ });
3105
+ var getUserProfilesById = (options) => (options.client ?? client).get({
3106
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3107
+ security: [{ scheme: "bearer", type: "http" }],
3108
+ url: "/user_profiles/{id}",
3109
+ ...options
3110
+ });
3111
+ var patchUserProfilesById = (options) => (options.client ?? client).patch({
3112
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3113
+ security: [{ scheme: "bearer", type: "http" }],
3114
+ url: "/user_profiles/{id}",
3115
+ ...options,
3116
+ headers: {
3117
+ "Content-Type": "application/vnd.api+json",
3118
+ ...options.headers
3119
+ }
3120
+ });
3121
+ var deleteObjectsById = (options) => (options.client ?? client).delete({
3122
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3123
+ security: [{ scheme: "bearer", type: "http" }],
3124
+ url: "/objects/{id}",
3125
+ ...options
3126
+ });
3127
+ var getObjectsById = (options) => (options.client ?? client).get({
3128
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3129
+ security: [{ scheme: "bearer", type: "http" }],
3130
+ url: "/objects/{id}",
3131
+ ...options
3132
+ });
3133
+ var getExtractionDocumentsWorkspaceByWorkspaceIdExcluded = (options) => (options.client ?? client).get({
3134
+ querySerializer: {
3135
+ parameters: {
3136
+ filter: { object: { style: "form" } },
3137
+ page: { object: { style: "form" } },
3138
+ fields: { object: { style: "form" } }
3139
+ }
3140
+ },
3141
+ security: [{ scheme: "bearer", type: "http" }],
3142
+ url: "/extraction/documents/workspace/{workspace_id}/excluded",
3143
+ ...options
3144
+ });
3145
+ var getWebhookConfigs = (options) => (options.client ?? client).get({
3146
+ querySerializer: {
3147
+ parameters: {
3148
+ filter: { object: { style: "form" } },
3149
+ page: { object: { style: "form" } },
3150
+ fields: { object: { style: "form" } }
3151
+ }
3152
+ },
3153
+ security: [{ scheme: "bearer", type: "http" }],
3154
+ url: "/webhook_configs",
3155
+ ...options
3156
+ });
3157
+ var postWebhookConfigs = (options) => (options.client ?? client).post({
3158
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3159
+ security: [{ scheme: "bearer", type: "http" }],
3160
+ url: "/webhook_configs",
3161
+ ...options,
3162
+ headers: {
3163
+ "Content-Type": "application/vnd.api+json",
3164
+ ...options.headers
3165
+ }
3166
+ });
3167
+ var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post({
3168
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3169
+ security: [{ scheme: "bearer", type: "http" }],
3170
+ url: "/agents/{id}/publish_version",
3171
+ ...options,
3172
+ headers: {
3173
+ "Content-Type": "application/vnd.api+json",
3174
+ ...options.headers
3175
+ }
3176
+ });
3177
+ var postObjectsBulkDestroy = (options) => (options.client ?? client).post({
3178
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3179
+ security: [{ scheme: "bearer", type: "http" }],
3180
+ url: "/objects/bulk-destroy",
3181
+ ...options,
3182
+ headers: {
3183
+ "Content-Type": "application/vnd.api+json",
3184
+ ...options.headers
3185
+ }
3186
+ });
3187
+ var getApplicationsBySlugBySlug = (options) => (options.client ?? client).get({
3188
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3189
+ security: [{ scheme: "bearer", type: "http" }],
3190
+ url: "/applications/by-slug/{slug}",
3191
+ ...options
3192
+ });
3193
+ var getNotificationLogs = (options) => (options.client ?? client).get({
3194
+ querySerializer: {
3195
+ parameters: {
3196
+ filter: { object: { style: "form" } },
3197
+ fields: { object: { style: "form" } }
3198
+ }
3199
+ },
3200
+ security: [{ scheme: "bearer", type: "http" }],
3201
+ url: "/notification_logs",
3202
+ ...options
3203
+ });
3204
+ var getWallet = (options) => (options.client ?? client).get({
3205
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3206
+ security: [{ scheme: "bearer", type: "http" }],
3207
+ url: "/wallet",
3208
+ ...options
3209
+ });
3210
+ var patchExtractionSchemasByIdActivate = (options) => (options.client ?? client).patch({
3211
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3212
+ security: [{ scheme: "bearer", type: "http" }],
3213
+ url: "/extraction/schemas/{id}/activate",
3214
+ ...options,
3215
+ headers: {
3216
+ "Content-Type": "application/vnd.api+json",
3217
+ ...options.headers
3218
+ }
3219
+ });
3220
+ var deleteMessagesById = (options) => (options.client ?? client).delete({
3221
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3222
+ security: [{ scheme: "bearer", type: "http" }],
3223
+ url: "/messages/{id}",
3224
+ ...options
3225
+ });
3226
+ var getMessagesById = (options) => (options.client ?? client).get({
3227
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3228
+ security: [{ scheme: "bearer", type: "http" }],
3229
+ url: "/messages/{id}",
3230
+ ...options
3231
+ });
3232
+ var patchMessagesById = (options) => (options.client ?? client).patch({
3233
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3234
+ security: [{ scheme: "bearer", type: "http" }],
3235
+ url: "/messages/{id}",
3236
+ ...options,
3237
+ headers: {
3238
+ "Content-Type": "application/vnd.api+json",
3239
+ ...options.headers
3240
+ }
3241
+ });
3242
+ var getLlmAnalyticsUsage = (options) => (options.client ?? client).get({
3243
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3244
+ security: [{ scheme: "bearer", type: "http" }],
3245
+ url: "/llm_analytics/usage",
3246
+ ...options
3247
+ });
3248
+ var getSearchStats = (options) => (options.client ?? client).get({
3249
+ querySerializer: {
3250
+ parameters: {
3251
+ filter: { object: { style: "form" } },
3252
+ fields: { object: { style: "form" } }
3253
+ }
3254
+ },
3255
+ security: [{ scheme: "bearer", type: "http" }],
3256
+ url: "/search/stats",
3257
+ ...options
3258
+ });
3259
+ var deleteNotificationPreferencesById = (options) => (options.client ?? client).delete({
3260
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3261
+ security: [{ scheme: "bearer", type: "http" }],
3262
+ url: "/notification_preferences/{id}",
3263
+ ...options
3264
+ });
3265
+ var getNotificationPreferencesById = (options) => (options.client ?? client).get({
3266
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3267
+ security: [{ scheme: "bearer", type: "http" }],
3268
+ url: "/notification_preferences/{id}",
3269
+ ...options
3270
+ });
3271
+ var patchNotificationPreferencesById = (options) => (options.client ?? client).patch({
3272
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3273
+ security: [{ scheme: "bearer", type: "http" }],
3274
+ url: "/notification_preferences/{id}",
3275
+ ...options,
3276
+ headers: {
3277
+ "Content-Type": "application/vnd.api+json",
3278
+ ...options.headers
3279
+ }
3280
+ });
3281
+ var getAiGraphNodes = (options) => (options.client ?? client).get({
3282
+ querySerializer: {
3283
+ parameters: {
3284
+ filter: { object: { style: "form" } },
3285
+ page: { object: { style: "form" } },
3286
+ fields: { object: { style: "form" } }
3287
+ }
3288
+ },
3289
+ security: [{ scheme: "bearer", type: "http" }],
3290
+ url: "/ai/graph/nodes",
3291
+ ...options
3292
+ });
3293
+ var postAiGraphNodes = (options) => (options.client ?? client).post({
3294
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3295
+ security: [{ scheme: "bearer", type: "http" }],
3296
+ url: "/ai/graph/nodes",
3297
+ ...options,
3298
+ headers: {
3299
+ "Content-Type": "application/vnd.api+json",
3300
+ ...options.headers
3301
+ }
3302
+ });
3303
+ var getAgents = (options) => (options.client ?? client).get({
3304
+ querySerializer: {
3305
+ parameters: {
3306
+ filter: { object: { style: "form" } },
3307
+ page: { object: { style: "form" } },
3308
+ fields: { object: { style: "form" } }
3309
+ }
3310
+ },
3311
+ security: [{ scheme: "bearer", type: "http" }],
3312
+ url: "/agents",
3313
+ ...options
3314
+ });
3315
+ var postAgents = (options) => (options.client ?? client).post({
3316
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3317
+ security: [{ scheme: "bearer", type: "http" }],
3318
+ url: "/agents",
3319
+ ...options,
3320
+ headers: {
3321
+ "Content-Type": "application/vnd.api+json",
3322
+ ...options.headers
3323
+ }
3324
+ });
3325
+ var postUsersRegisterIsv = (options) => (options.client ?? client).post({
3326
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3327
+ security: [{ scheme: "bearer", type: "http" }],
3328
+ url: "/users/register_isv",
3329
+ ...options,
3330
+ headers: {
3331
+ "Content-Type": "application/vnd.api+json",
3332
+ ...options.headers
3333
+ }
3334
+ });
3335
+ var getExtractionBatchesById = (options) => (options.client ?? client).get({
3336
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3337
+ security: [{ scheme: "bearer", type: "http" }],
3338
+ url: "/extraction/batches/{id}",
3339
+ ...options
3340
+ });
3341
+ var getWorkspacesByWorkspaceIdExtractionExports = (options) => (options.client ?? client).get({
3342
+ querySerializer: {
3343
+ parameters: {
3344
+ filter: { object: { style: "form" } },
3345
+ page: { object: { style: "form" } },
3346
+ fields: { object: { style: "form" } }
3347
+ }
3348
+ },
3349
+ security: [{ scheme: "bearer", type: "http" }],
3350
+ url: "/workspaces/{workspace_id}/extraction/exports",
3351
+ ...options
3352
+ });
3353
+ var postWorkspacesByWorkspaceIdExtractionExports = (options) => (options.client ?? client).post({
3354
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3355
+ security: [{ scheme: "bearer", type: "http" }],
3356
+ url: "/workspaces/{workspace_id}/extraction/exports",
3357
+ ...options,
3358
+ headers: {
3359
+ "Content-Type": "application/vnd.api+json",
3360
+ ...options.headers
3361
+ }
3362
+ });
3363
+ var deleteWorkspaceMembershipsByWorkspaceIdByUserId = (options) => (options.client ?? client).delete({
3364
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3365
+ security: [{ scheme: "bearer", type: "http" }],
3366
+ url: "/workspace-memberships/{workspace_id}/{user_id}",
3367
+ ...options
3368
+ });
3369
+ var patchWorkspaceMembershipsByWorkspaceIdByUserId = (options) => (options.client ?? client).patch({
3370
+ querySerializer: { parameters: { fields: { object: { style: "form" } } } },
3371
+ security: [{ scheme: "bearer", type: "http" }],
3372
+ url: "/workspace-memberships/{workspace_id}/{user_id}",
3373
+ ...options,
3374
+ headers: {
3375
+ "Content-Type": "application/vnd.api+json",
3376
+ ...options.headers
3377
+ }
3378
+ });
3379
+ var getCreditPackages = (options) => (options.client ?? client).get({
3380
+ querySerializer: {
3381
+ parameters: {
3382
+ filter: { object: { style: "form" } },
3383
+ page: { object: { style: "form" } },
3384
+ fields: { object: { style: "form" } }
3385
+ }
3386
+ },
3387
+ security: [{ scheme: "bearer", type: "http" }],
3388
+ url: "/credit-packages",
3389
+ ...options
3390
+ });
3391
+ var getUsers = (options) => (options.client ?? client).get({
3392
+ querySerializer: {
3393
+ parameters: {
3394
+ filter: { object: { style: "form" } },
3395
+ page: { object: { style: "form" } },
3396
+ fields: { object: { style: "form" } }
3397
+ }
3398
+ },
3399
+ security: [{ scheme: "bearer", type: "http" }],
3400
+ url: "/users",
3401
+ ...options
3402
+ });
3403
+ var getObjects = (options) => (options.client ?? client).get({
3404
+ querySerializer: {
3405
+ parameters: {
3406
+ filter: { object: { style: "form" } },
3407
+ page: { object: { style: "form" } },
3408
+ fields: { object: { style: "form" } }
3409
+ }
3410
+ },
3411
+ security: [{ scheme: "bearer", type: "http" }],
3412
+ url: "/objects",
3413
+ ...options
3414
+ });
3415
+
3416
+ // src/errors/index.ts
3417
+ var GptCoreError = class extends Error {
3418
+ constructor(message, options) {
3419
+ super(message);
3420
+ this.name = this.constructor.name;
3421
+ this.statusCode = options?.statusCode;
3422
+ this.code = options?.code;
3423
+ this.requestId = options?.requestId;
3424
+ this.headers = options?.headers;
3425
+ this.body = options?.body;
3426
+ if (options?.cause) {
3427
+ this.cause = options.cause;
3428
+ }
3429
+ if (Error.captureStackTrace) {
3430
+ Error.captureStackTrace(this, this.constructor);
3431
+ }
3432
+ }
3433
+ };
3434
+ var AuthenticationError = class extends GptCoreError {
3435
+ constructor(message = "Authentication failed", options) {
3436
+ super(message, { statusCode: 401, ...options });
3437
+ }
3438
+ };
3439
+ var AuthorizationError = class extends GptCoreError {
3440
+ constructor(message = "Permission denied", options) {
3441
+ super(message, { statusCode: 403, ...options });
3442
+ }
3443
+ };
3444
+ var NotFoundError = class extends GptCoreError {
3445
+ constructor(message = "Resource not found", options) {
3446
+ super(message, { statusCode: 404, ...options });
3447
+ }
3448
+ };
3449
+ var ValidationError = class extends GptCoreError {
3450
+ constructor(message = "Validation failed", errors, options) {
3451
+ super(message, { statusCode: 422, ...options });
3452
+ this.errors = errors;
3453
+ }
3454
+ };
3455
+ var RateLimitError = class extends GptCoreError {
3456
+ constructor(message = "Rate limit exceeded", retryAfter, options) {
3457
+ super(message, { statusCode: 429, ...options });
3458
+ this.retryAfter = retryAfter;
3459
+ }
3460
+ };
3461
+ var NetworkError = class extends GptCoreError {
3462
+ constructor(message = "Network request failed", options) {
3463
+ super(message, options);
3464
+ }
3465
+ };
3466
+ var TimeoutError = class extends GptCoreError {
3467
+ constructor(message = "Request timeout", options) {
3468
+ super(message, options);
3469
+ }
3470
+ };
3471
+ var ServerError = class extends GptCoreError {
3472
+ constructor(message = "Internal server error", options) {
3473
+ super(message, { statusCode: 500, ...options });
3474
+ }
3475
+ };
3476
+ function handleApiError(error) {
3477
+ const response = error?.response || error;
3478
+ const statusCode = response?.status || error?.status || error?.statusCode;
3479
+ const headers = response?.headers || error?.headers;
3480
+ const requestId = headers?.get?.("x-request-id") || headers?.["x-request-id"];
3481
+ const body = response?.body || response?.data || error?.body || error?.data || error;
3482
+ let message = "An error occurred";
3483
+ let errors;
3484
+ if (body?.errors && Array.isArray(body.errors)) {
3485
+ const firstError = body.errors[0];
3486
+ message = firstError?.title || firstError?.detail || message;
3487
+ errors = body.errors.map((err) => ({
3488
+ field: err.source?.pointer?.split("/").pop(),
3489
+ message: err.detail || err.title || "Unknown error"
3490
+ }));
3491
+ } else if (body?.message) {
3492
+ message = body.message;
3493
+ } else if (typeof body === "string") {
3494
+ message = body;
3495
+ } else if (error?.message) {
3496
+ message = error.message;
3497
+ }
3498
+ const errorOptions = {
3499
+ statusCode,
3500
+ requestId,
3501
+ headers: headers ? headers.entries ? Object.fromEntries(headers.entries()) : Object.fromEntries(Object.entries(headers)) : void 0,
3502
+ body,
3503
+ cause: error
3504
+ };
3505
+ switch (statusCode) {
3506
+ case 401:
3507
+ throw new AuthenticationError(message, errorOptions);
3508
+ case 403:
3509
+ throw new AuthorizationError(message, errorOptions);
3510
+ case 404:
3511
+ throw new NotFoundError(message, errorOptions);
3512
+ case 400:
3513
+ case 422:
3514
+ throw new ValidationError(message, errors, errorOptions);
3515
+ case 429:
3516
+ const retryAfter = headers?.get?.("retry-after") || headers?.["retry-after"];
3517
+ throw new RateLimitError(message, retryAfter ? parseInt(retryAfter, 10) : void 0, errorOptions);
3518
+ case 500:
3519
+ case 502:
3520
+ case 503:
3521
+ case 504:
3522
+ throw new ServerError(message, errorOptions);
3523
+ default:
3524
+ if (statusCode && statusCode >= 400) {
3525
+ throw new GptCoreError(message, errorOptions);
3526
+ }
3527
+ throw new NetworkError(message, errorOptions);
3528
+ }
3529
+ }
3530
+
3531
+ // src/schemas/requests.ts
3532
+ var import_zod = require("zod");
3533
+ var LoginRequestSchema = import_zod.z.object({
3534
+ email: import_zod.z.string().email(),
3535
+ password: import_zod.z.string().min(8)
3536
+ });
3537
+ var RegisterRequestSchema = import_zod.z.object({
3538
+ email: import_zod.z.string().email(),
3539
+ password: import_zod.z.string().min(8),
3540
+ password_confirmation: import_zod.z.string().min(8)
3541
+ }).refine((data) => data.password === data.password_confirmation, {
3542
+ message: "Passwords don't match",
3543
+ path: ["password_confirmation"]
3544
+ });
3545
+ var ApiKeyCreateSchema = import_zod.z.object({
3546
+ name: import_zod.z.string().min(1).max(255)
3547
+ });
3548
+ var ApiKeyAllocateSchema = import_zod.z.object({
3549
+ amount: import_zod.z.number().positive(),
3550
+ description: import_zod.z.string().min(1)
3551
+ });
3552
+ var ApplicationCreateSchema = import_zod.z.object({
3553
+ name: import_zod.z.string().min(1).max(255),
3554
+ slug: import_zod.z.string().regex(/^[a-z0-9-]+$/).optional(),
3555
+ description: import_zod.z.string().optional()
3556
+ });
3557
+ var WorkspaceCreateSchema = import_zod.z.object({
3558
+ name: import_zod.z.string().min(1).max(255),
3559
+ slug: import_zod.z.string().regex(/^[a-z0-9-]+$/).optional()
3560
+ });
3561
+ var InvitationCreateSchema = import_zod.z.object({
3562
+ email: import_zod.z.string().email(),
3563
+ role: import_zod.z.string(),
3564
+ scope_type: import_zod.z.enum(["tenant", "workspace"]),
3565
+ scope_id: import_zod.z.string().uuid()
3566
+ });
3567
+ var AgentCreateSchema = import_zod.z.object({
3568
+ name: import_zod.z.string().min(1).max(255),
3569
+ prompt_template: import_zod.z.string().min(1)
3570
+ });
3571
+ var ThreadCreateSchema = import_zod.z.object({
3572
+ title: import_zod.z.string().max(255).optional()
3573
+ });
3574
+ var MessageSendSchema = import_zod.z.object({
3575
+ content: import_zod.z.string().min(1)
3576
+ });
3577
+ var SearchRequestSchema = import_zod.z.object({
3578
+ query: import_zod.z.string().min(1),
3579
+ top_k: import_zod.z.number().int().positive().max(100).default(5)
3580
+ });
3581
+ var EmbedRequestSchema = import_zod.z.object({
3582
+ text: import_zod.z.string().min(1),
3583
+ workspace_id: import_zod.z.string().uuid().optional()
3584
+ });
3585
+ var DocumentUploadBase64Schema = import_zod.z.object({
3586
+ filename: import_zod.z.string().min(1),
3587
+ content: import_zod.z.string().min(1)
3588
+ // base64 content
3589
+ });
3590
+ var BucketCreateSchema = import_zod.z.object({
3591
+ name: import_zod.z.string().min(1).max(255),
3592
+ type: import_zod.z.enum(["public", "private"])
3593
+ });
3594
+ var PresignedUploadSchema = import_zod.z.object({
3595
+ filename: import_zod.z.string().min(1),
3596
+ content_type: import_zod.z.string().min(1)
3597
+ });
3598
+ var PresignedDownloadSchema = import_zod.z.object({
3599
+ file_id: import_zod.z.string().uuid()
3600
+ });
3601
+
3602
+ // src/utils/retry.ts
3603
+ var DEFAULT_RETRY_CONFIG = {
3604
+ maxRetries: 3,
3605
+ initialDelay: 1e3,
3606
+ // 1 second
3607
+ maxDelay: 32e3,
3608
+ // 32 seconds
3609
+ retryableStatusCodes: [429, 500, 502, 503, 504]
3610
+ };
3611
+ function isRetryableError(error, retryableStatusCodes) {
3612
+ const statusCode = error?.status || error?.statusCode || error?.response?.status;
3613
+ return retryableStatusCodes.includes(statusCode);
3614
+ }
3615
+ function calculateBackoff(attempt, initialDelay, maxDelay, retryAfter) {
3616
+ if (retryAfter) {
3617
+ return Math.min(retryAfter * 1e3, maxDelay);
3618
+ }
3619
+ const exponentialDelay = initialDelay * Math.pow(2, attempt);
3620
+ const jitter = Math.random() * 0.3 * exponentialDelay;
3621
+ const delay = exponentialDelay + jitter;
3622
+ return Math.min(delay, maxDelay);
3623
+ }
3624
+ function sleep(ms) {
3625
+ return new Promise((resolve) => setTimeout(resolve, ms));
3626
+ }
3627
+ async function retryWithBackoff(fn, config = DEFAULT_RETRY_CONFIG) {
3628
+ let lastError;
3629
+ for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
3630
+ try {
3631
+ return await fn();
3632
+ } catch (error) {
3633
+ lastError = error;
3634
+ if (attempt === config.maxRetries || !isRetryableError(error, config.retryableStatusCodes)) {
3635
+ throw error;
3636
+ }
3637
+ const errorWithHeaders = error;
3638
+ const retryAfter = errorWithHeaders?.response?.headers?.get?.("retry-after") || errorWithHeaders?.response?.headers?.["retry-after"] || errorWithHeaders?.headers?.get?.("retry-after") || errorWithHeaders?.headers?.["retry-after"];
3639
+ const retryAfterSeconds = retryAfter ? parseInt(retryAfter, 10) : void 0;
3640
+ const delay = calculateBackoff(
3641
+ attempt,
3642
+ config.initialDelay,
3643
+ config.maxDelay,
3644
+ retryAfterSeconds
3645
+ );
3646
+ await sleep(delay);
3647
+ }
3648
+ }
3649
+ throw lastError;
3650
+ }
3651
+ function withRetry(fn, config) {
3652
+ const retryConfig = { ...DEFAULT_RETRY_CONFIG, ...config };
3653
+ return async (...args) => {
3654
+ return retryWithBackoff(() => fn(...args), retryConfig);
3655
+ };
3656
+ }
3657
+
3658
+ // src/pagination.ts
3659
+ async function* paginateAll(fetcher, options = {}) {
3660
+ const pageSize = options.pageSize || 20;
3661
+ const limit = options.limit;
3662
+ let page = 1;
3663
+ let totalYielded = 0;
3664
+ while (true) {
3665
+ const response = await fetcher(page, pageSize);
3666
+ for (const item of response.data) {
3667
+ yield item;
3668
+ totalYielded++;
3669
+ if (limit && totalYielded >= limit) {
3670
+ return;
3671
+ }
3672
+ }
3673
+ if (!response.links?.next || response.data.length === 0) {
3674
+ break;
3675
+ }
3676
+ page++;
3677
+ }
3678
+ }
3679
+ async function paginateToArray(fetcher, options = {}) {
3680
+ const results = [];
3681
+ for await (const item of paginateAll(fetcher, options)) {
3682
+ results.push(item);
3683
+ }
3684
+ return results;
3685
+ }
3686
+
3687
+ // src/streaming.ts
3688
+ async function* streamSSE(response, options = {}) {
3689
+ if (!response.body) {
3690
+ throw new Error("Response body is null");
3691
+ }
3692
+ const reader = response.body.getReader();
3693
+ const decoder = new TextDecoder();
3694
+ let buffer = "";
3695
+ try {
3696
+ while (true) {
3697
+ const { done, value } = await reader.read();
3698
+ if (done) {
3699
+ break;
3700
+ }
3701
+ if (options.signal?.aborted) {
3702
+ reader.cancel();
3703
+ throw new Error("Stream aborted");
3704
+ }
3705
+ buffer += decoder.decode(value, { stream: true });
3706
+ const lines = buffer.split("\n");
3707
+ buffer = lines.pop() || "";
3708
+ for (const line of lines) {
3709
+ if (line.startsWith("data: ")) {
3710
+ const data = line.slice(6);
3711
+ if (data === "[DONE]" || data.trim() === "") {
3712
+ continue;
3713
+ }
3714
+ try {
3715
+ const parsed = JSON.parse(data);
3716
+ yield parsed;
3717
+ } catch (e) {
3718
+ yield data;
3719
+ }
3720
+ }
3721
+ }
3722
+ }
3723
+ } catch (error) {
3724
+ if (options.onError) {
3725
+ options.onError(error);
3726
+ }
3727
+ throw error;
3728
+ } finally {
3729
+ reader.releaseLock();
3730
+ }
3731
+ }
3732
+ async function* streamMessage(response, options = {}) {
3733
+ for await (const chunk of streamSSE(response, options)) {
3734
+ yield chunk;
3735
+ if (chunk.type === "done" || chunk.type === "error") {
3736
+ break;
3737
+ }
3738
+ }
3739
+ }
3740
+ async function collectStreamedMessage(stream) {
3741
+ let fullMessage = "";
3742
+ for await (const chunk of stream) {
3743
+ if (chunk.type === "content" && chunk.content) {
3744
+ fullMessage += chunk.content;
3745
+ } else if (chunk.type === "error") {
3746
+ throw new Error(chunk.error || "Stream error");
3747
+ }
3748
+ }
3749
+ return fullMessage;
3750
+ }
3751
+ // Annotate the CommonJS export names for ESM import in node:
3752
+ 0 && (module.exports = {
3753
+ AgentCreateSchema,
3754
+ ApiKeyAllocateSchema,
3755
+ ApiKeyCreateSchema,
3756
+ ApplicationCreateSchema,
3757
+ AuthenticationError,
3758
+ AuthorizationError,
3759
+ BucketCreateSchema,
3760
+ DEFAULT_RETRY_CONFIG,
3761
+ DocumentUploadBase64Schema,
3762
+ EmbedRequestSchema,
3763
+ GptCoreError,
3764
+ InvitationCreateSchema,
3765
+ LoginRequestSchema,
3766
+ MessageSendSchema,
3767
+ NetworkError,
3768
+ NotFoundError,
3769
+ PresignedDownloadSchema,
3770
+ PresignedUploadSchema,
3771
+ RateLimitError,
3772
+ RegisterRequestSchema,
3773
+ SearchRequestSchema,
3774
+ ServerError,
3775
+ ThreadCreateSchema,
3776
+ TimeoutError,
3777
+ ValidationError,
3778
+ WorkspaceCreateSchema,
3779
+ calculateBackoff,
3780
+ client,
3781
+ collectStreamedMessage,
3782
+ deleteAgentsById,
3783
+ deleteAiConversationsById,
3784
+ deleteAiGraphEdgesById,
3785
+ deleteAiGraphNodesById,
3786
+ deleteApiKeysById,
3787
+ deleteApplicationsById,
3788
+ deleteBucketsById,
3789
+ deleteExtractionDocumentsById,
3790
+ deleteExtractionSchemaFieldsById,
3791
+ deleteFieldTemplatesById,
3792
+ deleteMessagesById,
3793
+ deleteNotificationMethodsById,
3794
+ deleteNotificationPreferencesById,
3795
+ deleteObjectsById,
3796
+ deleteSearchSavedById,
3797
+ deleteTenantMembershipsByTenantIdByUserId,
3798
+ deleteTenantsById,
3799
+ deleteThreadsById,
3800
+ deleteTrainingExamplesById,
3801
+ deleteTrainingSessionsById,
3802
+ deleteUserProfilesById,
3803
+ deleteWebhookConfigsById,
3804
+ deleteWorkspaceMembershipsByWorkspaceIdByUserId,
3805
+ deleteWorkspacesById,
3806
+ getAgentVersions,
3807
+ getAgentVersionsById,
3808
+ getAgents,
3809
+ getAgentsById,
3810
+ getAgentsByIdTrainingStats,
3811
+ getAiChunksDocumentByDocumentId,
3812
+ getAiConversations,
3813
+ getAiConversationsById,
3814
+ getAiGraphEdges,
3815
+ getAiGraphNodes,
3816
+ getAiMessages,
3817
+ getApiKeys,
3818
+ getApiKeysById,
3819
+ getApplications,
3820
+ getApplicationsById,
3821
+ getApplicationsBySlugBySlug,
3822
+ getAuditLogs,
3823
+ getBuckets,
3824
+ getBucketsById,
3825
+ getBucketsByIdObjects,
3826
+ getBucketsByIdStats,
3827
+ getConfigs,
3828
+ getCreditPackages,
3829
+ getCreditPackagesById,
3830
+ getCreditPackagesSlugBySlug,
3831
+ getDocumentsStats,
3832
+ getExtractionBatchesById,
3833
+ getExtractionBatchesByIdUploadUrls,
3834
+ getExtractionBatchesWorkspaceByWorkspaceId,
3835
+ getExtractionDocuments,
3836
+ getExtractionDocumentsById,
3837
+ getExtractionDocumentsByIdStatus,
3838
+ getExtractionDocumentsByIdView,
3839
+ getExtractionDocumentsWorkspaceByWorkspaceId,
3840
+ getExtractionDocumentsWorkspaceByWorkspaceIdExcluded,
3841
+ getExtractionDocumentsWorkspaceByWorkspaceIdReviewQueue,
3842
+ getExtractionResultsById,
3843
+ getExtractionResultsDocumentByDocumentId,
3844
+ getExtractionSchemaFields,
3845
+ getExtractionSchemaFieldsById,
3846
+ getExtractionSchemas,
3847
+ getExtractionSchemasById,
3848
+ getExtractionSchemasWorkspaceByWorkspaceId,
3849
+ getFieldTemplates,
3850
+ getFieldTemplatesById,
3851
+ getInvitations,
3852
+ getInvitationsConsumeByToken,
3853
+ getLlmAnalytics,
3854
+ getLlmAnalyticsById,
3855
+ getLlmAnalyticsCosts,
3856
+ getLlmAnalyticsPlatform,
3857
+ getLlmAnalyticsSummary,
3858
+ getLlmAnalyticsUsage,
3859
+ getLlmAnalyticsWorkspace,
3860
+ getMessages,
3861
+ getMessagesById,
3862
+ getMessagesSearch,
3863
+ getNotificationLogs,
3864
+ getNotificationLogsById,
3865
+ getNotificationMethods,
3866
+ getNotificationMethodsById,
3867
+ getNotificationPreferences,
3868
+ getNotificationPreferencesById,
3869
+ getObjects,
3870
+ getObjectsById,
3871
+ getPlans,
3872
+ getPlansById,
3873
+ getPlansSlugBySlug,
3874
+ getSearch,
3875
+ getSearchHealth,
3876
+ getSearchIndexes,
3877
+ getSearchSaved,
3878
+ getSearchSemantic,
3879
+ getSearchStats,
3880
+ getSearchStatus,
3881
+ getStorageStats,
3882
+ getTenantMemberships,
3883
+ getTenants,
3884
+ getTenantsById,
3885
+ getTenantsByTenantIdDocumentStats,
3886
+ getTenantsByTenantIdStats,
3887
+ getTenantsByTenantIdWorkspaceStats,
3888
+ getThreads,
3889
+ getThreadsById,
3890
+ getThreadsSearch,
3891
+ getTrainingExamples,
3892
+ getTrainingExamplesById,
3893
+ getTrainingSessionsAgentsByAgentIdSessions,
3894
+ getTrainingSessionsById,
3895
+ getTransactions,
3896
+ getTransactionsById,
3897
+ getUserProfiles,
3898
+ getUserProfilesById,
3899
+ getUserProfilesMe,
3900
+ getUsers,
3901
+ getUsersById,
3902
+ getUsersMe,
3903
+ getWallet,
3904
+ getWebhookConfigs,
3905
+ getWebhookConfigsById,
3906
+ getWebhookDeliveries,
3907
+ getWebhookDeliveriesById,
3908
+ getWorkspaceMemberships,
3909
+ getWorkspaces,
3910
+ getWorkspacesById,
3911
+ getWorkspacesByWorkspaceIdExtractionExports,
3912
+ getWorkspacesByWorkspaceIdExtractionExportsById,
3913
+ getWorkspacesByWorkspaceIdTrainingAnalytics,
3914
+ getWorkspacesMine,
3915
+ handleApiError,
3916
+ isRetryableError,
3917
+ paginateAll,
3918
+ paginateToArray,
3919
+ patchAgentsById,
3920
+ patchApiKeysById,
3921
+ patchApiKeysByIdAllocate,
3922
+ patchApiKeysByIdRevoke,
3923
+ patchApiKeysByIdRotate,
3924
+ patchApplicationsById,
3925
+ patchApplicationsByIdGrantCredits,
3926
+ patchBucketsById,
3927
+ patchConfigsByKey,
3928
+ patchExtractionDocumentsByIdExclude,
3929
+ patchExtractionDocumentsByIdFinishUpload,
3930
+ patchExtractionDocumentsByIdInclude,
3931
+ patchExtractionDocumentsByIdRestore,
3932
+ patchExtractionDocumentsByIdStatus,
3933
+ patchExtractionResultsByIdCorrections,
3934
+ patchExtractionResultsByIdRegenerate,
3935
+ patchExtractionSchemaFieldsById,
3936
+ patchExtractionSchemasById,
3937
+ patchExtractionSchemasByIdActivate,
3938
+ patchExtractionSchemasByIdFields,
3939
+ patchInvitationsByIdAccept,
3940
+ patchInvitationsByIdResend,
3941
+ patchInvitationsByIdRevoke,
3942
+ patchMessagesById,
3943
+ patchNotificationMethodsById,
3944
+ patchNotificationMethodsByIdSetPrimary,
3945
+ patchNotificationPreferencesById,
3946
+ patchTenantMembershipsByTenantIdByUserId,
3947
+ patchTenantsById,
3948
+ patchThreadsById,
3949
+ patchTrainingExamplesById,
3950
+ patchUserProfilesById,
3951
+ patchUsersAuthResetPassword,
3952
+ patchUsersByIdAdmin,
3953
+ patchUsersByIdAdminEmail,
3954
+ patchUsersByIdConfirmEmail,
3955
+ patchUsersByIdResetPassword,
3956
+ patchWalletAddons,
3957
+ patchWalletAddonsByAddonSlugCancel,
3958
+ patchWalletCredits,
3959
+ patchWalletPlan,
3960
+ patchWebhookConfigsById,
3961
+ patchWebhookConfigsByIdRotateSecret,
3962
+ patchWorkspaceMembershipsByWorkspaceIdByUserId,
3963
+ patchWorkspacesById,
3964
+ patchWorkspacesByIdAllocate,
3965
+ postAgentVersions,
3966
+ postAgents,
3967
+ postAgentsByIdClone,
3968
+ postAgentsByIdPublishVersion,
3969
+ postAgentsByIdTeach,
3970
+ postAgentsByIdTest,
3971
+ postAgentsByIdValidate,
3972
+ postAgentsCloneForWorkspace,
3973
+ postAgentsPredict,
3974
+ postAiChunksSearch,
3975
+ postAiConversations,
3976
+ postAiEmbed,
3977
+ postAiGraphEdges,
3978
+ postAiGraphNodes,
3979
+ postAiMessages,
3980
+ postAiSearch,
3981
+ postAiSearchAdvanced,
3982
+ postApiKeys,
3983
+ postApplications,
3984
+ postBuckets,
3985
+ postConfigs,
3986
+ postDocumentsBulkDelete,
3987
+ postDocumentsPresignedUpload,
3988
+ postExtractionBatches,
3989
+ postExtractionDocumentsBeginUpload,
3990
+ postExtractionDocumentsUpload,
3991
+ postExtractionResults,
3992
+ postExtractionSchemaFields,
3993
+ postExtractionSchemas,
3994
+ postExtractionSchemasBulkCreate,
3995
+ postFieldTemplates,
3996
+ postInvitationsAcceptByToken,
3997
+ postInvitationsInvite,
3998
+ postLlmAnalytics,
3999
+ postMessages,
4000
+ postNotificationMethods,
4001
+ postNotificationPreferences,
4002
+ postObjectsBulkDestroy,
4003
+ postObjectsRegister,
4004
+ postPayments,
4005
+ postSearchReindex,
4006
+ postSearchSaved,
4007
+ postStorageSignDownload,
4008
+ postStorageSignUpload,
4009
+ postTenantMemberships,
4010
+ postTenants,
4011
+ postTenantsByIdBuyStorage,
4012
+ postTenantsByIdCredit,
4013
+ postTenantsByIdRemoveStorage,
4014
+ postTenantsIsv,
4015
+ postThreads,
4016
+ postThreadsActive,
4017
+ postThreadsByIdMessages,
4018
+ postThreadsByIdSummarize,
4019
+ postTokens,
4020
+ postTrainingExamples,
4021
+ postTrainingExamplesBulk,
4022
+ postTrainingExamplesBulkDelete,
4023
+ postTrainingExamplesSearch,
4024
+ postUserProfiles,
4025
+ postUsersAuthConfirm,
4026
+ postUsersAuthLogin,
4027
+ postUsersAuthMagicLinkLogin,
4028
+ postUsersAuthMagicLinkRequest,
4029
+ postUsersAuthRegister,
4030
+ postUsersAuthRegisterWithOidc,
4031
+ postUsersRegisterIsv,
4032
+ postWebhookConfigs,
4033
+ postWebhookConfigsByIdTest,
4034
+ postWebhookDeliveriesByIdRetry,
4035
+ postWorkspaceMemberships,
4036
+ postWorkspaces,
4037
+ postWorkspacesByWorkspaceIdExtractionExports,
4038
+ retryWithBackoff,
4039
+ sleep,
4040
+ streamMessage,
4041
+ streamSSE,
4042
+ withRetry
4043
+ });