@gpt-core/client 0.1.0-alpha.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +15730 -6926
- package/dist/index.d.ts +15730 -6926
- package/dist/index.js +2390 -1956
- package/dist/index.mjs +2196 -1903
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,7 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
16
|
return to;
|
|
18
17
|
};
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
19
|
|
|
22
20
|
// src/index.ts
|
|
23
21
|
var index_exports = {};
|
|
@@ -32,7 +30,6 @@ __export(index_exports, {
|
|
|
32
30
|
DEFAULT_RETRY_CONFIG: () => DEFAULT_RETRY_CONFIG,
|
|
33
31
|
DocumentUploadBase64Schema: () => DocumentUploadBase64Schema,
|
|
34
32
|
EmbedRequestSchema: () => EmbedRequestSchema,
|
|
35
|
-
GptClient: () => GptClient,
|
|
36
33
|
GptCoreError: () => GptCoreError,
|
|
37
34
|
InvitationCreateSchema: () => InvitationCreateSchema,
|
|
38
35
|
LoginRequestSchema: () => LoginRequestSchema,
|
|
@@ -50,82 +47,367 @@ __export(index_exports, {
|
|
|
50
47
|
ValidationError: () => ValidationError,
|
|
51
48
|
WorkspaceCreateSchema: () => WorkspaceCreateSchema,
|
|
52
49
|
calculateBackoff: () => calculateBackoff,
|
|
50
|
+
client: () => client,
|
|
53
51
|
collectStreamedMessage: () => collectStreamedMessage,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
52
|
+
deleteAgentsById: () => deleteAgentsById,
|
|
53
|
+
deleteAiGraphEdgesById: () => deleteAiGraphEdgesById,
|
|
54
|
+
deleteAiGraphNodesById: () => deleteAiGraphNodesById,
|
|
55
|
+
deleteApiKeysById: () => deleteApiKeysById,
|
|
56
|
+
deleteApplicationsById: () => deleteApplicationsById,
|
|
57
|
+
deleteBucketsById: () => deleteBucketsById,
|
|
58
|
+
deleteDocumentsById: () => deleteDocumentsById,
|
|
59
|
+
deleteExtractionResultsById: () => deleteExtractionResultsById,
|
|
60
|
+
deleteMessagesById: () => deleteMessagesById,
|
|
61
|
+
deleteNotificationPreferencesById: () => deleteNotificationPreferencesById,
|
|
62
|
+
deleteObjectsById: () => deleteObjectsById,
|
|
63
|
+
deleteSearchSavedById: () => deleteSearchSavedById,
|
|
64
|
+
deleteTenantMembershipsByTenantIdByUserId: () => deleteTenantMembershipsByTenantIdByUserId,
|
|
65
|
+
deleteTenantsById: () => deleteTenantsById,
|
|
66
|
+
deleteThreadsById: () => deleteThreadsById,
|
|
67
|
+
deleteTrainingExamplesById: () => deleteTrainingExamplesById,
|
|
68
|
+
deleteUserProfilesById: () => deleteUserProfilesById,
|
|
69
|
+
deleteWebhookConfigsById: () => deleteWebhookConfigsById,
|
|
70
|
+
deleteWorkspaceMembershipsByWorkspaceIdByUserId: () => deleteWorkspaceMembershipsByWorkspaceIdByUserId,
|
|
71
|
+
deleteWorkspacesById: () => deleteWorkspacesById,
|
|
72
|
+
getAgents: () => getAgents,
|
|
73
|
+
getAgentsById: () => getAgentsById,
|
|
74
|
+
getAiChunksDocumentByDocumentId: () => getAiChunksDocumentByDocumentId,
|
|
75
|
+
getAiGraphEdges: () => getAiGraphEdges,
|
|
76
|
+
getAiGraphNodes: () => getAiGraphNodes,
|
|
77
|
+
getApiKeys: () => getApiKeys,
|
|
78
|
+
getApiKeysById: () => getApiKeysById,
|
|
79
|
+
getApplications: () => getApplications,
|
|
80
|
+
getApplicationsById: () => getApplicationsById,
|
|
81
|
+
getApplicationsBySlugBySlug: () => getApplicationsBySlugBySlug,
|
|
82
|
+
getAuditLogs: () => getAuditLogs,
|
|
83
|
+
getBuckets: () => getBuckets,
|
|
84
|
+
getBucketsById: () => getBucketsById,
|
|
85
|
+
getBucketsByIdObjects: () => getBucketsByIdObjects,
|
|
86
|
+
getBucketsByIdStats: () => getBucketsByIdStats,
|
|
87
|
+
getConfigs: () => getConfigs,
|
|
88
|
+
getCreditPackages: () => getCreditPackages,
|
|
89
|
+
getCreditPackagesById: () => getCreditPackagesById,
|
|
90
|
+
getCreditPackagesSlugBySlug: () => getCreditPackagesSlugBySlug,
|
|
91
|
+
getDocuments: () => getDocuments,
|
|
92
|
+
getDocumentsById: () => getDocumentsById,
|
|
93
|
+
getDocumentsByIdExtractionResults: () => getDocumentsByIdExtractionResults,
|
|
94
|
+
getDocumentsByIdRelationshipsChunks: () => getDocumentsByIdRelationshipsChunks,
|
|
95
|
+
getDocumentsProcessingQueue: () => getDocumentsProcessingQueue,
|
|
96
|
+
getDocumentsSearch: () => getDocumentsSearch,
|
|
97
|
+
getDocumentsStats: () => getDocumentsStats,
|
|
98
|
+
getExtractionResults: () => getExtractionResults,
|
|
99
|
+
getExtractionResultsById: () => getExtractionResultsById,
|
|
100
|
+
getInvitations: () => getInvitations,
|
|
101
|
+
getInvitationsConsumeByToken: () => getInvitationsConsumeByToken,
|
|
102
|
+
getLlmAnalytics: () => getLlmAnalytics,
|
|
103
|
+
getLlmAnalyticsById: () => getLlmAnalyticsById,
|
|
104
|
+
getLlmAnalyticsCosts: () => getLlmAnalyticsCosts,
|
|
105
|
+
getLlmAnalyticsPlatform: () => getLlmAnalyticsPlatform,
|
|
106
|
+
getLlmAnalyticsSummary: () => getLlmAnalyticsSummary,
|
|
107
|
+
getLlmAnalyticsUsage: () => getLlmAnalyticsUsage,
|
|
108
|
+
getLlmAnalyticsWorkspace: () => getLlmAnalyticsWorkspace,
|
|
109
|
+
getMessages: () => getMessages,
|
|
110
|
+
getMessagesById: () => getMessagesById,
|
|
111
|
+
getMessagesSearch: () => getMessagesSearch,
|
|
112
|
+
getNotificationLogs: () => getNotificationLogs,
|
|
113
|
+
getNotificationLogsById: () => getNotificationLogsById,
|
|
114
|
+
getNotificationPreferences: () => getNotificationPreferences,
|
|
115
|
+
getNotificationPreferencesById: () => getNotificationPreferencesById,
|
|
116
|
+
getObjects: () => getObjects,
|
|
117
|
+
getObjectsById: () => getObjectsById,
|
|
118
|
+
getPlans: () => getPlans,
|
|
119
|
+
getPlansById: () => getPlansById,
|
|
120
|
+
getPlansSlugBySlug: () => getPlansSlugBySlug,
|
|
121
|
+
getSearch: () => getSearch,
|
|
122
|
+
getSearchHealth: () => getSearchHealth,
|
|
123
|
+
getSearchIndexes: () => getSearchIndexes,
|
|
124
|
+
getSearchSaved: () => getSearchSaved,
|
|
125
|
+
getSearchSemantic: () => getSearchSemantic,
|
|
126
|
+
getSearchStats: () => getSearchStats,
|
|
127
|
+
getSearchStatus: () => getSearchStatus,
|
|
128
|
+
getStorageStats: () => getStorageStats,
|
|
129
|
+
getTenantMemberships: () => getTenantMemberships,
|
|
130
|
+
getTenants: () => getTenants,
|
|
131
|
+
getTenantsById: () => getTenantsById,
|
|
132
|
+
getThreads: () => getThreads,
|
|
133
|
+
getThreadsById: () => getThreadsById,
|
|
134
|
+
getThreadsSearch: () => getThreadsSearch,
|
|
135
|
+
getTrainingExamples: () => getTrainingExamples,
|
|
136
|
+
getTrainingExamplesById: () => getTrainingExamplesById,
|
|
137
|
+
getTransactions: () => getTransactions,
|
|
138
|
+
getTransactionsById: () => getTransactionsById,
|
|
139
|
+
getUserProfiles: () => getUserProfiles,
|
|
140
|
+
getUserProfilesById: () => getUserProfilesById,
|
|
141
|
+
getUserProfilesMe: () => getUserProfilesMe,
|
|
142
|
+
getUsers: () => getUsers,
|
|
143
|
+
getUsersById: () => getUsersById,
|
|
144
|
+
getUsersMe: () => getUsersMe,
|
|
145
|
+
getWallet: () => getWallet,
|
|
146
|
+
getWebhookConfigs: () => getWebhookConfigs,
|
|
147
|
+
getWebhookConfigsById: () => getWebhookConfigsById,
|
|
148
|
+
getWebhookDeliveries: () => getWebhookDeliveries,
|
|
149
|
+
getWebhookDeliveriesById: () => getWebhookDeliveriesById,
|
|
150
|
+
getWorkspaceMemberships: () => getWorkspaceMemberships,
|
|
151
|
+
getWorkspaces: () => getWorkspaces,
|
|
152
|
+
getWorkspacesById: () => getWorkspacesById,
|
|
153
|
+
getWorkspacesMine: () => getWorkspacesMine,
|
|
79
154
|
handleApiError: () => handleApiError,
|
|
80
155
|
isRetryableError: () => isRetryableError,
|
|
81
|
-
less_than: () => less_than,
|
|
82
|
-
less_than2: () => less_than2,
|
|
83
|
-
less_than3: () => less_than3,
|
|
84
|
-
less_than4: () => less_than4,
|
|
85
|
-
less_than5: () => less_than5,
|
|
86
|
-
less_than6: () => less_than6,
|
|
87
|
-
less_than7: () => less_than7,
|
|
88
|
-
less_than8: () => less_than8,
|
|
89
|
-
less_than_or_equal: () => less_than_or_equal,
|
|
90
|
-
less_than_or_equal2: () => less_than_or_equal2,
|
|
91
|
-
less_than_or_equal3: () => less_than_or_equal3,
|
|
92
|
-
less_than_or_equal4: () => less_than_or_equal4,
|
|
93
|
-
less_than_or_equal5: () => less_than_or_equal5,
|
|
94
|
-
less_than_or_equal6: () => less_than_or_equal6,
|
|
95
|
-
less_than_or_equal7: () => less_than_or_equal7,
|
|
96
|
-
less_than_or_equal8: () => less_than_or_equal8,
|
|
97
|
-
not_eq: () => not_eq,
|
|
98
|
-
not_eq2: () => not_eq2,
|
|
99
|
-
not_eq3: () => not_eq3,
|
|
100
|
-
not_eq4: () => not_eq4,
|
|
101
|
-
not_eq5: () => not_eq5,
|
|
102
|
-
not_eq6: () => not_eq6,
|
|
103
|
-
not_eq7: () => not_eq7,
|
|
104
|
-
not_eq8: () => not_eq8,
|
|
105
156
|
paginateAll: () => paginateAll,
|
|
106
157
|
paginateToArray: () => paginateToArray,
|
|
158
|
+
patchAgentsById: () => patchAgentsById,
|
|
159
|
+
patchApiKeysById: () => patchApiKeysById,
|
|
160
|
+
patchApiKeysByIdAllocate: () => patchApiKeysByIdAllocate,
|
|
161
|
+
patchApiKeysByIdRevoke: () => patchApiKeysByIdRevoke,
|
|
162
|
+
patchApiKeysByIdRotate: () => patchApiKeysByIdRotate,
|
|
163
|
+
patchApplicationsById: () => patchApplicationsById,
|
|
164
|
+
patchBucketsById: () => patchBucketsById,
|
|
165
|
+
patchConfigsByKey: () => patchConfigsByKey,
|
|
166
|
+
patchDocumentsById: () => patchDocumentsById,
|
|
167
|
+
patchExtractionResultsById: () => patchExtractionResultsById,
|
|
168
|
+
patchInvitationsByIdAccept: () => patchInvitationsByIdAccept,
|
|
169
|
+
patchInvitationsByIdResend: () => patchInvitationsByIdResend,
|
|
170
|
+
patchInvitationsByIdRevoke: () => patchInvitationsByIdRevoke,
|
|
171
|
+
patchMessagesById: () => patchMessagesById,
|
|
172
|
+
patchNotificationPreferencesById: () => patchNotificationPreferencesById,
|
|
173
|
+
patchTenantMembershipsByTenantIdByUserId: () => patchTenantMembershipsByTenantIdByUserId,
|
|
174
|
+
patchTenantsById: () => patchTenantsById,
|
|
175
|
+
patchThreadsById: () => patchThreadsById,
|
|
176
|
+
patchTrainingExamplesById: () => patchTrainingExamplesById,
|
|
177
|
+
patchUserProfilesById: () => patchUserProfilesById,
|
|
178
|
+
patchUsersAuthResetPassword: () => patchUsersAuthResetPassword,
|
|
179
|
+
patchUsersById: () => patchUsersById,
|
|
180
|
+
patchUsersByIdConfirmEmail: () => patchUsersByIdConfirmEmail,
|
|
181
|
+
patchUsersByIdResetPassword: () => patchUsersByIdResetPassword,
|
|
182
|
+
patchWalletAddons: () => patchWalletAddons,
|
|
183
|
+
patchWalletAddonsByAddonSlugCancel: () => patchWalletAddonsByAddonSlugCancel,
|
|
184
|
+
patchWalletPlan: () => patchWalletPlan,
|
|
185
|
+
patchWebhookConfigsById: () => patchWebhookConfigsById,
|
|
186
|
+
patchWorkspaceMembershipsByWorkspaceIdByUserId: () => patchWorkspaceMembershipsByWorkspaceIdByUserId,
|
|
187
|
+
patchWorkspacesById: () => patchWorkspacesById,
|
|
188
|
+
patchWorkspacesByIdAllocate: () => patchWorkspacesByIdAllocate,
|
|
189
|
+
postAgents: () => postAgents,
|
|
190
|
+
postAgentsByIdClone: () => postAgentsByIdClone,
|
|
191
|
+
postAgentsByIdTest: () => postAgentsByIdTest,
|
|
192
|
+
postAgentsByIdValidate: () => postAgentsByIdValidate,
|
|
193
|
+
postAiChunksSearch: () => postAiChunksSearch,
|
|
194
|
+
postAiEmbed: () => postAiEmbed,
|
|
195
|
+
postAiGraphEdges: () => postAiGraphEdges,
|
|
196
|
+
postAiGraphNodes: () => postAiGraphNodes,
|
|
197
|
+
postAiSearch: () => postAiSearch,
|
|
198
|
+
postAiSearchAdvanced: () => postAiSearchAdvanced,
|
|
199
|
+
postApiKeys: () => postApiKeys,
|
|
200
|
+
postApplications: () => postApplications,
|
|
201
|
+
postBuckets: () => postBuckets,
|
|
202
|
+
postConfigs: () => postConfigs,
|
|
203
|
+
postDocuments: () => postDocuments,
|
|
204
|
+
postDocumentsBulkDelete: () => postDocumentsBulkDelete,
|
|
205
|
+
postDocumentsBulkReprocess: () => postDocumentsBulkReprocess,
|
|
206
|
+
postDocumentsByIdAnalyze: () => postDocumentsByIdAnalyze,
|
|
207
|
+
postDocumentsByIdReprocess: () => postDocumentsByIdReprocess,
|
|
208
|
+
postDocumentsExport: () => postDocumentsExport,
|
|
209
|
+
postDocumentsImport: () => postDocumentsImport,
|
|
210
|
+
postDocumentsPresignedUpload: () => postDocumentsPresignedUpload,
|
|
211
|
+
postInvitationsAcceptByToken: () => postInvitationsAcceptByToken,
|
|
212
|
+
postInvitationsInvite: () => postInvitationsInvite,
|
|
213
|
+
postLlmAnalytics: () => postLlmAnalytics,
|
|
214
|
+
postMessages: () => postMessages,
|
|
215
|
+
postNotificationPreferences: () => postNotificationPreferences,
|
|
216
|
+
postObjectsBulkDestroy: () => postObjectsBulkDestroy,
|
|
217
|
+
postObjectsRegister: () => postObjectsRegister,
|
|
218
|
+
postPayments: () => postPayments,
|
|
219
|
+
postSearchReindex: () => postSearchReindex,
|
|
220
|
+
postSearchSaved: () => postSearchSaved,
|
|
221
|
+
postStorageSignDownload: () => postStorageSignDownload,
|
|
222
|
+
postStorageSignUpload: () => postStorageSignUpload,
|
|
223
|
+
postTenantMemberships: () => postTenantMemberships,
|
|
224
|
+
postTenants: () => postTenants,
|
|
225
|
+
postTenantsByIdBuyStorage: () => postTenantsByIdBuyStorage,
|
|
226
|
+
postTenantsByIdRemoveStorage: () => postTenantsByIdRemoveStorage,
|
|
227
|
+
postThreads: () => postThreads,
|
|
228
|
+
postThreadsActive: () => postThreadsActive,
|
|
229
|
+
postThreadsByIdMessages: () => postThreadsByIdMessages,
|
|
230
|
+
postThreadsByIdSummarize: () => postThreadsByIdSummarize,
|
|
231
|
+
postTokens: () => postTokens,
|
|
232
|
+
postTrainingExamples: () => postTrainingExamples,
|
|
233
|
+
postTrainingExamplesBulk: () => postTrainingExamplesBulk,
|
|
234
|
+
postTrainingExamplesBulkDelete: () => postTrainingExamplesBulkDelete,
|
|
235
|
+
postUserProfiles: () => postUserProfiles,
|
|
236
|
+
postUsersAuthConfirm: () => postUsersAuthConfirm,
|
|
237
|
+
postUsersAuthLogin: () => postUsersAuthLogin,
|
|
238
|
+
postUsersAuthMagicLinkLogin: () => postUsersAuthMagicLinkLogin,
|
|
239
|
+
postUsersAuthMagicLinkRequest: () => postUsersAuthMagicLinkRequest,
|
|
240
|
+
postUsersAuthRegister: () => postUsersAuthRegister,
|
|
241
|
+
postUsersAuthRegisterWithOidc: () => postUsersAuthRegisterWithOidc,
|
|
242
|
+
postUsersRegisterIsv: () => postUsersRegisterIsv,
|
|
243
|
+
postWebhookConfigs: () => postWebhookConfigs,
|
|
244
|
+
postWebhookConfigsByIdTest: () => postWebhookConfigsByIdTest,
|
|
245
|
+
postWebhookDeliveriesByIdRetry: () => postWebhookDeliveriesByIdRetry,
|
|
246
|
+
postWorkspaceMemberships: () => postWorkspaceMemberships,
|
|
247
|
+
postWorkspaces: () => postWorkspaces,
|
|
107
248
|
retryWithBackoff: () => retryWithBackoff,
|
|
108
|
-
role: () => role,
|
|
109
249
|
sleep: () => sleep,
|
|
110
|
-
status: () => status,
|
|
111
|
-
status2: () => status2,
|
|
112
250
|
streamMessage: () => streamMessage,
|
|
113
251
|
streamSSE: () => streamSSE,
|
|
114
|
-
type: () => type,
|
|
115
252
|
withRetry: () => withRetry
|
|
116
253
|
});
|
|
117
254
|
module.exports = __toCommonJS(index_exports);
|
|
118
255
|
|
|
119
|
-
//
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
|
|
256
|
+
// src/_internal/core/bodySerializer.gen.ts
|
|
257
|
+
var jsonBodySerializer = {
|
|
258
|
+
bodySerializer: (body) => JSON.stringify(
|
|
259
|
+
body,
|
|
260
|
+
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
261
|
+
)
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// src/_internal/core/params.gen.ts
|
|
265
|
+
var extraPrefixesMap = {
|
|
266
|
+
$body_: "body",
|
|
267
|
+
$headers_: "headers",
|
|
268
|
+
$path_: "path",
|
|
269
|
+
$query_: "query"
|
|
270
|
+
};
|
|
271
|
+
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
272
|
+
|
|
273
|
+
// src/_internal/core/serverSentEvents.gen.ts
|
|
274
|
+
var createSseClient = ({
|
|
275
|
+
onRequest,
|
|
276
|
+
onSseError,
|
|
277
|
+
onSseEvent,
|
|
278
|
+
responseTransformer,
|
|
279
|
+
responseValidator,
|
|
280
|
+
sseDefaultRetryDelay,
|
|
281
|
+
sseMaxRetryAttempts,
|
|
282
|
+
sseMaxRetryDelay,
|
|
283
|
+
sseSleepFn,
|
|
284
|
+
url,
|
|
285
|
+
...options
|
|
286
|
+
}) => {
|
|
287
|
+
let lastEventId;
|
|
288
|
+
const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
289
|
+
const createStream = async function* () {
|
|
290
|
+
let retryDelay = sseDefaultRetryDelay ?? 3e3;
|
|
291
|
+
let attempt = 0;
|
|
292
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
293
|
+
while (true) {
|
|
294
|
+
if (signal.aborted) break;
|
|
295
|
+
attempt++;
|
|
296
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
297
|
+
if (lastEventId !== void 0) {
|
|
298
|
+
headers.set("Last-Event-ID", lastEventId);
|
|
299
|
+
}
|
|
300
|
+
try {
|
|
301
|
+
const requestInit = {
|
|
302
|
+
redirect: "follow",
|
|
303
|
+
...options,
|
|
304
|
+
body: options.serializedBody,
|
|
305
|
+
headers,
|
|
306
|
+
signal
|
|
307
|
+
};
|
|
308
|
+
let request = new Request(url, requestInit);
|
|
309
|
+
if (onRequest) {
|
|
310
|
+
request = await onRequest(url, requestInit);
|
|
311
|
+
}
|
|
312
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
313
|
+
const response = await _fetch(request);
|
|
314
|
+
if (!response.ok)
|
|
315
|
+
throw new Error(
|
|
316
|
+
`SSE failed: ${response.status} ${response.statusText}`
|
|
317
|
+
);
|
|
318
|
+
if (!response.body) throw new Error("No body in SSE response");
|
|
319
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
320
|
+
let buffer = "";
|
|
321
|
+
const abortHandler = () => {
|
|
322
|
+
try {
|
|
323
|
+
reader.cancel();
|
|
324
|
+
} catch {
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
signal.addEventListener("abort", abortHandler);
|
|
328
|
+
try {
|
|
329
|
+
while (true) {
|
|
330
|
+
const { done, value } = await reader.read();
|
|
331
|
+
if (done) break;
|
|
332
|
+
buffer += value;
|
|
333
|
+
const chunks = buffer.split("\n\n");
|
|
334
|
+
buffer = chunks.pop() ?? "";
|
|
335
|
+
for (const chunk of chunks) {
|
|
336
|
+
const lines = chunk.split("\n");
|
|
337
|
+
const dataLines = [];
|
|
338
|
+
let eventName;
|
|
339
|
+
for (const line of lines) {
|
|
340
|
+
if (line.startsWith("data:")) {
|
|
341
|
+
dataLines.push(line.replace(/^data:\s*/, ""));
|
|
342
|
+
} else if (line.startsWith("event:")) {
|
|
343
|
+
eventName = line.replace(/^event:\s*/, "");
|
|
344
|
+
} else if (line.startsWith("id:")) {
|
|
345
|
+
lastEventId = line.replace(/^id:\s*/, "");
|
|
346
|
+
} else if (line.startsWith("retry:")) {
|
|
347
|
+
const parsed = Number.parseInt(
|
|
348
|
+
line.replace(/^retry:\s*/, ""),
|
|
349
|
+
10
|
|
350
|
+
);
|
|
351
|
+
if (!Number.isNaN(parsed)) {
|
|
352
|
+
retryDelay = parsed;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
let data;
|
|
357
|
+
let parsedJson = false;
|
|
358
|
+
if (dataLines.length) {
|
|
359
|
+
const rawData = dataLines.join("\n");
|
|
360
|
+
try {
|
|
361
|
+
data = JSON.parse(rawData);
|
|
362
|
+
parsedJson = true;
|
|
363
|
+
} catch {
|
|
364
|
+
data = rawData;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (parsedJson) {
|
|
368
|
+
if (responseValidator) {
|
|
369
|
+
await responseValidator(data);
|
|
370
|
+
}
|
|
371
|
+
if (responseTransformer) {
|
|
372
|
+
data = await responseTransformer(data);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
onSseEvent?.({
|
|
376
|
+
data,
|
|
377
|
+
event: eventName,
|
|
378
|
+
id: lastEventId,
|
|
379
|
+
retry: retryDelay
|
|
380
|
+
});
|
|
381
|
+
if (dataLines.length) {
|
|
382
|
+
yield data;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
} finally {
|
|
387
|
+
signal.removeEventListener("abort", abortHandler);
|
|
388
|
+
reader.releaseLock();
|
|
389
|
+
}
|
|
390
|
+
break;
|
|
391
|
+
} catch (error) {
|
|
392
|
+
onSseError?.(error);
|
|
393
|
+
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
const backoff = Math.min(
|
|
397
|
+
retryDelay * 2 ** (attempt - 1),
|
|
398
|
+
sseMaxRetryDelay ?? 3e4
|
|
399
|
+
);
|
|
400
|
+
await sleep2(backoff);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
const stream = createStream();
|
|
405
|
+
return { stream };
|
|
123
406
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
switch (s) {
|
|
407
|
+
|
|
408
|
+
// src/_internal/core/pathSerializer.gen.ts
|
|
409
|
+
var separatorArrayExplode = (style) => {
|
|
410
|
+
switch (style) {
|
|
129
411
|
case "label":
|
|
130
412
|
return ".";
|
|
131
413
|
case "matrix":
|
|
@@ -136,8 +418,8 @@ var B = (s) => {
|
|
|
136
418
|
return "&";
|
|
137
419
|
}
|
|
138
420
|
};
|
|
139
|
-
var
|
|
140
|
-
switch (
|
|
421
|
+
var separatorArrayNoExplode = (style) => {
|
|
422
|
+
switch (style) {
|
|
141
423
|
case "form":
|
|
142
424
|
return ",";
|
|
143
425
|
case "pipeDelimited":
|
|
@@ -148,8 +430,8 @@ var N = (s) => {
|
|
|
148
430
|
return ",";
|
|
149
431
|
}
|
|
150
432
|
};
|
|
151
|
-
var
|
|
152
|
-
switch (
|
|
433
|
+
var separatorObjectExplode = (style) => {
|
|
434
|
+
switch (style) {
|
|
153
435
|
case "label":
|
|
154
436
|
return ".";
|
|
155
437
|
case "matrix":
|
|
@@ -160,1313 +442,1962 @@ var Q = (s) => {
|
|
|
160
442
|
return "&";
|
|
161
443
|
}
|
|
162
444
|
};
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
445
|
+
var serializeArrayParam = ({
|
|
446
|
+
allowReserved,
|
|
447
|
+
explode,
|
|
448
|
+
name,
|
|
449
|
+
style,
|
|
450
|
+
value
|
|
451
|
+
}) => {
|
|
452
|
+
if (!explode) {
|
|
453
|
+
const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
454
|
+
switch (style) {
|
|
167
455
|
case "label":
|
|
168
|
-
return `.${
|
|
456
|
+
return `.${joinedValues2}`;
|
|
169
457
|
case "matrix":
|
|
170
|
-
return `;${
|
|
458
|
+
return `;${name}=${joinedValues2}`;
|
|
171
459
|
case "simple":
|
|
172
|
-
return
|
|
460
|
+
return joinedValues2;
|
|
173
461
|
default:
|
|
174
|
-
return `${
|
|
462
|
+
return `${name}=${joinedValues2}`;
|
|
175
463
|
}
|
|
176
464
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
465
|
+
const separator = separatorArrayExplode(style);
|
|
466
|
+
const joinedValues = value.map((v) => {
|
|
467
|
+
if (style === "label" || style === "simple") {
|
|
468
|
+
return allowReserved ? v : encodeURIComponent(v);
|
|
469
|
+
}
|
|
470
|
+
return serializePrimitiveParam({
|
|
471
|
+
allowReserved,
|
|
472
|
+
name,
|
|
473
|
+
value: v
|
|
474
|
+
});
|
|
475
|
+
}).join(separator);
|
|
476
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
477
|
+
};
|
|
478
|
+
var serializePrimitiveParam = ({
|
|
479
|
+
allowReserved,
|
|
480
|
+
name,
|
|
481
|
+
value
|
|
482
|
+
}) => {
|
|
483
|
+
if (value === void 0 || value === null) {
|
|
484
|
+
return "";
|
|
485
|
+
}
|
|
486
|
+
if (typeof value === "object") {
|
|
487
|
+
throw new Error(
|
|
488
|
+
"Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
492
|
+
};
|
|
493
|
+
var serializeObjectParam = ({
|
|
494
|
+
allowReserved,
|
|
495
|
+
explode,
|
|
496
|
+
name,
|
|
497
|
+
style,
|
|
498
|
+
value,
|
|
499
|
+
valueOnly
|
|
500
|
+
}) => {
|
|
501
|
+
if (value instanceof Date) {
|
|
502
|
+
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
503
|
+
}
|
|
504
|
+
if (style !== "deepObject" && !explode) {
|
|
505
|
+
let values = [];
|
|
506
|
+
Object.entries(value).forEach(([key, v]) => {
|
|
507
|
+
values = [
|
|
508
|
+
...values,
|
|
509
|
+
key,
|
|
510
|
+
allowReserved ? v : encodeURIComponent(v)
|
|
511
|
+
];
|
|
512
|
+
});
|
|
513
|
+
const joinedValues2 = values.join(",");
|
|
514
|
+
switch (style) {
|
|
194
515
|
case "form":
|
|
195
|
-
return `${
|
|
516
|
+
return `${name}=${joinedValues2}`;
|
|
196
517
|
case "label":
|
|
197
|
-
return `.${
|
|
518
|
+
return `.${joinedValues2}`;
|
|
198
519
|
case "matrix":
|
|
199
|
-
return `;${
|
|
520
|
+
return `;${name}=${joinedValues2}`;
|
|
200
521
|
default:
|
|
201
|
-
return
|
|
522
|
+
return joinedValues2;
|
|
202
523
|
}
|
|
203
524
|
}
|
|
204
|
-
|
|
205
|
-
|
|
525
|
+
const separator = separatorObjectExplode(style);
|
|
526
|
+
const joinedValues = Object.entries(value).map(
|
|
527
|
+
([key, v]) => serializePrimitiveParam({
|
|
528
|
+
allowReserved,
|
|
529
|
+
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
530
|
+
value: v
|
|
531
|
+
})
|
|
532
|
+
).join(separator);
|
|
533
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
206
534
|
};
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
535
|
+
|
|
536
|
+
// src/_internal/core/utils.gen.ts
|
|
537
|
+
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
538
|
+
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
539
|
+
let url = _url;
|
|
540
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
541
|
+
if (matches) {
|
|
542
|
+
for (const match of matches) {
|
|
543
|
+
let explode = false;
|
|
544
|
+
let name = match.substring(1, match.length - 1);
|
|
545
|
+
let style = "simple";
|
|
546
|
+
if (name.endsWith("*")) {
|
|
547
|
+
explode = true;
|
|
548
|
+
name = name.substring(0, name.length - 1);
|
|
549
|
+
}
|
|
550
|
+
if (name.startsWith(".")) {
|
|
551
|
+
name = name.substring(1);
|
|
552
|
+
style = "label";
|
|
553
|
+
} else if (name.startsWith(";")) {
|
|
554
|
+
name = name.substring(1);
|
|
555
|
+
style = "matrix";
|
|
556
|
+
}
|
|
557
|
+
const value = path[name];
|
|
558
|
+
if (value === void 0 || value === null) {
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
if (Array.isArray(value)) {
|
|
562
|
+
url = url.replace(
|
|
563
|
+
match,
|
|
564
|
+
serializeArrayParam({ explode, name, style, value })
|
|
565
|
+
);
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
if (typeof value === "object") {
|
|
569
|
+
url = url.replace(
|
|
570
|
+
match,
|
|
571
|
+
serializeObjectParam({
|
|
572
|
+
explode,
|
|
573
|
+
name,
|
|
574
|
+
style,
|
|
575
|
+
value,
|
|
576
|
+
valueOnly: true
|
|
577
|
+
})
|
|
578
|
+
);
|
|
579
|
+
continue;
|
|
580
|
+
}
|
|
581
|
+
if (style === "matrix") {
|
|
582
|
+
url = url.replace(
|
|
583
|
+
match,
|
|
584
|
+
`;${serializePrimitiveParam({
|
|
585
|
+
name,
|
|
586
|
+
value
|
|
587
|
+
})}`
|
|
588
|
+
);
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
const replaceValue = encodeURIComponent(
|
|
592
|
+
style === "label" ? `.${value}` : value
|
|
593
|
+
);
|
|
594
|
+
url = url.replace(match, replaceValue);
|
|
222
595
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
596
|
+
}
|
|
597
|
+
return url;
|
|
598
|
+
};
|
|
599
|
+
var getUrl = ({
|
|
600
|
+
baseUrl,
|
|
601
|
+
path,
|
|
602
|
+
query,
|
|
603
|
+
querySerializer,
|
|
604
|
+
url: _url
|
|
605
|
+
}) => {
|
|
606
|
+
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
607
|
+
let url = (baseUrl ?? "") + pathUrl;
|
|
608
|
+
if (path) {
|
|
609
|
+
url = defaultPathSerializer({ path, url });
|
|
610
|
+
}
|
|
611
|
+
let search = query ? querySerializer(query) : "";
|
|
612
|
+
if (search.startsWith("?")) {
|
|
613
|
+
search = search.substring(1);
|
|
614
|
+
}
|
|
615
|
+
if (search) {
|
|
616
|
+
url += `?${search}`;
|
|
617
|
+
}
|
|
618
|
+
return url;
|
|
619
|
+
};
|
|
620
|
+
function getValidRequestBody(options) {
|
|
621
|
+
const hasBody = options.body !== void 0;
|
|
622
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
623
|
+
if (isSerializedBody) {
|
|
624
|
+
if ("serializedBody" in options) {
|
|
625
|
+
const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
|
|
626
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
226
627
|
}
|
|
227
|
-
|
|
228
|
-
|
|
628
|
+
return options.body !== "" ? options.body : null;
|
|
629
|
+
}
|
|
630
|
+
if (hasBody) {
|
|
631
|
+
return options.body;
|
|
632
|
+
}
|
|
633
|
+
return void 0;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// src/_internal/core/auth.gen.ts
|
|
637
|
+
var getAuthToken = async (auth, callback) => {
|
|
638
|
+
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
639
|
+
if (!token) {
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
if (auth.scheme === "bearer") {
|
|
643
|
+
return `Bearer ${token}`;
|
|
644
|
+
}
|
|
645
|
+
if (auth.scheme === "basic") {
|
|
646
|
+
return `Basic ${btoa(token)}`;
|
|
229
647
|
}
|
|
230
|
-
return
|
|
648
|
+
return token;
|
|
231
649
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
650
|
+
|
|
651
|
+
// src/_internal/client/utils.gen.ts
|
|
652
|
+
var createQuerySerializer = ({
|
|
653
|
+
parameters = {},
|
|
654
|
+
...args
|
|
655
|
+
} = {}) => {
|
|
656
|
+
const querySerializer = (queryParams) => {
|
|
657
|
+
const search = [];
|
|
658
|
+
if (queryParams && typeof queryParams === "object") {
|
|
659
|
+
for (const name in queryParams) {
|
|
660
|
+
const value = queryParams[name];
|
|
661
|
+
if (value === void 0 || value === null) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
const options = parameters[name] || args;
|
|
665
|
+
if (Array.isArray(value)) {
|
|
666
|
+
const serializedArray = serializeArrayParam({
|
|
667
|
+
allowReserved: options.allowReserved,
|
|
668
|
+
explode: true,
|
|
669
|
+
name,
|
|
670
|
+
style: "form",
|
|
671
|
+
value,
|
|
672
|
+
...options.array
|
|
673
|
+
});
|
|
674
|
+
if (serializedArray) search.push(serializedArray);
|
|
675
|
+
} else if (typeof value === "object") {
|
|
676
|
+
const serializedObject = serializeObjectParam({
|
|
677
|
+
allowReserved: options.allowReserved,
|
|
678
|
+
explode: true,
|
|
679
|
+
name,
|
|
680
|
+
style: "deepObject",
|
|
681
|
+
value,
|
|
682
|
+
...options.object
|
|
683
|
+
});
|
|
684
|
+
if (serializedObject) search.push(serializedObject);
|
|
685
|
+
} else {
|
|
686
|
+
const serializedPrimitive = serializePrimitiveParam({
|
|
687
|
+
allowReserved: options.allowReserved,
|
|
688
|
+
name,
|
|
689
|
+
value
|
|
690
|
+
});
|
|
691
|
+
if (serializedPrimitive) search.push(serializedPrimitive);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
245
694
|
}
|
|
695
|
+
return search.join("&");
|
|
696
|
+
};
|
|
697
|
+
return querySerializer;
|
|
698
|
+
};
|
|
699
|
+
var getParseAs = (contentType) => {
|
|
700
|
+
if (!contentType) {
|
|
701
|
+
return "stream";
|
|
702
|
+
}
|
|
703
|
+
const cleanContent = contentType.split(";")[0]?.trim();
|
|
704
|
+
if (!cleanContent) {
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
|
|
708
|
+
return "json";
|
|
246
709
|
}
|
|
247
|
-
|
|
710
|
+
if (cleanContent === "multipart/form-data") {
|
|
711
|
+
return "formData";
|
|
712
|
+
}
|
|
713
|
+
if (["application/", "audio/", "image/", "video/"].some(
|
|
714
|
+
(type) => cleanContent.startsWith(type)
|
|
715
|
+
)) {
|
|
716
|
+
return "blob";
|
|
717
|
+
}
|
|
718
|
+
if (cleanContent.startsWith("text/")) {
|
|
719
|
+
return "text";
|
|
720
|
+
}
|
|
721
|
+
return;
|
|
248
722
|
};
|
|
249
|
-
var
|
|
250
|
-
if (!
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
if (["application/", "audio/", "image/", "video/"].some((e) => r.startsWith(e))) return "blob";
|
|
256
|
-
if (r.startsWith("text/")) return "text";
|
|
723
|
+
var checkForExistence = (options, name) => {
|
|
724
|
+
if (!name) {
|
|
725
|
+
return false;
|
|
726
|
+
}
|
|
727
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
728
|
+
return true;
|
|
257
729
|
}
|
|
730
|
+
return false;
|
|
258
731
|
};
|
|
259
|
-
var
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
732
|
+
var setAuthParams = async ({
|
|
733
|
+
security,
|
|
734
|
+
...options
|
|
735
|
+
}) => {
|
|
736
|
+
for (const auth of security) {
|
|
737
|
+
if (checkForExistence(options, auth.name)) {
|
|
738
|
+
continue;
|
|
739
|
+
}
|
|
740
|
+
const token = await getAuthToken(auth, options.auth);
|
|
741
|
+
if (!token) {
|
|
742
|
+
continue;
|
|
743
|
+
}
|
|
744
|
+
const name = auth.name ?? "Authorization";
|
|
745
|
+
switch (auth.in) {
|
|
265
746
|
case "query":
|
|
266
|
-
|
|
747
|
+
if (!options.query) {
|
|
748
|
+
options.query = {};
|
|
749
|
+
}
|
|
750
|
+
options.query[name] = token;
|
|
267
751
|
break;
|
|
268
752
|
case "cookie":
|
|
269
|
-
|
|
753
|
+
options.headers.append("Cookie", `${name}=${token}`);
|
|
270
754
|
break;
|
|
271
755
|
case "header":
|
|
272
756
|
default:
|
|
273
|
-
|
|
757
|
+
options.headers.set(name, token);
|
|
274
758
|
break;
|
|
275
759
|
}
|
|
276
|
-
return;
|
|
277
760
|
}
|
|
278
761
|
};
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
};
|
|
286
|
-
var
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
return
|
|
762
|
+
var buildUrl = (options) => getUrl({
|
|
763
|
+
baseUrl: options.baseUrl,
|
|
764
|
+
path: options.path,
|
|
765
|
+
query: options.query,
|
|
766
|
+
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
767
|
+
url: options.url
|
|
768
|
+
});
|
|
769
|
+
var mergeConfigs = (a, b) => {
|
|
770
|
+
const config = { ...a, ...b };
|
|
771
|
+
if (config.baseUrl?.endsWith("/")) {
|
|
772
|
+
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
773
|
+
}
|
|
774
|
+
config.headers = mergeHeaders(a.headers, b.headers);
|
|
775
|
+
return config;
|
|
776
|
+
};
|
|
777
|
+
var headersEntries = (headers) => {
|
|
778
|
+
const entries = [];
|
|
779
|
+
headers.forEach((value, key) => {
|
|
780
|
+
entries.push([key, value]);
|
|
781
|
+
});
|
|
782
|
+
return entries;
|
|
783
|
+
};
|
|
784
|
+
var mergeHeaders = (...headers) => {
|
|
785
|
+
const mergedHeaders = new Headers();
|
|
786
|
+
for (const header of headers) {
|
|
787
|
+
if (!header) {
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
791
|
+
for (const [key, value] of iterator) {
|
|
792
|
+
if (value === null) {
|
|
793
|
+
mergedHeaders.delete(key);
|
|
794
|
+
} else if (Array.isArray(value)) {
|
|
795
|
+
for (const v of value) {
|
|
796
|
+
mergedHeaders.append(key, v);
|
|
797
|
+
}
|
|
798
|
+
} else if (value !== void 0) {
|
|
799
|
+
mergedHeaders.set(
|
|
800
|
+
key,
|
|
801
|
+
typeof value === "object" ? JSON.stringify(value) : value
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
return mergedHeaders;
|
|
300
807
|
};
|
|
301
|
-
var
|
|
808
|
+
var Interceptors = class {
|
|
302
809
|
constructor() {
|
|
303
|
-
|
|
304
|
-
this._fns = [];
|
|
810
|
+
this.fns = [];
|
|
305
811
|
}
|
|
306
812
|
clear() {
|
|
307
|
-
this.
|
|
813
|
+
this.fns = [];
|
|
308
814
|
}
|
|
309
|
-
|
|
310
|
-
|
|
815
|
+
eject(id) {
|
|
816
|
+
const index = this.getInterceptorIndex(id);
|
|
817
|
+
if (this.fns[index]) {
|
|
818
|
+
this.fns[index] = null;
|
|
819
|
+
}
|
|
311
820
|
}
|
|
312
|
-
exists(
|
|
313
|
-
|
|
314
|
-
return
|
|
821
|
+
exists(id) {
|
|
822
|
+
const index = this.getInterceptorIndex(id);
|
|
823
|
+
return Boolean(this.fns[index]);
|
|
315
824
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
825
|
+
getInterceptorIndex(id) {
|
|
826
|
+
if (typeof id === "number") {
|
|
827
|
+
return this.fns[id] ? id : -1;
|
|
828
|
+
}
|
|
829
|
+
return this.fns.indexOf(id);
|
|
319
830
|
}
|
|
320
|
-
update(
|
|
321
|
-
|
|
322
|
-
|
|
831
|
+
update(id, fn) {
|
|
832
|
+
const index = this.getInterceptorIndex(id);
|
|
833
|
+
if (this.fns[index]) {
|
|
834
|
+
this.fns[index] = fn;
|
|
835
|
+
return id;
|
|
836
|
+
}
|
|
837
|
+
return false;
|
|
323
838
|
}
|
|
324
|
-
use(
|
|
325
|
-
|
|
839
|
+
use(fn) {
|
|
840
|
+
this.fns.push(fn);
|
|
841
|
+
return this.fns.length - 1;
|
|
326
842
|
}
|
|
327
843
|
};
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
844
|
+
var createInterceptors = () => ({
|
|
845
|
+
error: new Interceptors(),
|
|
846
|
+
request: new Interceptors(),
|
|
847
|
+
response: new Interceptors()
|
|
848
|
+
});
|
|
849
|
+
var defaultQuerySerializer = createQuerySerializer({
|
|
850
|
+
allowReserved: false,
|
|
851
|
+
array: {
|
|
852
|
+
explode: true,
|
|
853
|
+
style: "form"
|
|
854
|
+
},
|
|
855
|
+
object: {
|
|
856
|
+
explode: true,
|
|
857
|
+
style: "deepObject"
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
var defaultHeaders = {
|
|
861
|
+
"Content-Type": "application/json"
|
|
862
|
+
};
|
|
863
|
+
var createConfig = (override = {}) => ({
|
|
864
|
+
...jsonBodySerializer,
|
|
865
|
+
headers: defaultHeaders,
|
|
866
|
+
parseAs: "auto",
|
|
867
|
+
querySerializer: defaultQuerySerializer,
|
|
868
|
+
...override
|
|
869
|
+
});
|
|
870
|
+
|
|
871
|
+
// src/_internal/client/client.gen.ts
|
|
872
|
+
var createClient = (config = {}) => {
|
|
873
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
874
|
+
const getConfig = () => ({ ..._config });
|
|
875
|
+
const setConfig = (config2) => {
|
|
876
|
+
_config = mergeConfigs(_config, config2);
|
|
877
|
+
return getConfig();
|
|
878
|
+
};
|
|
879
|
+
const interceptors = createInterceptors();
|
|
880
|
+
const beforeRequest = async (options) => {
|
|
881
|
+
const opts = {
|
|
882
|
+
..._config,
|
|
883
|
+
...options,
|
|
884
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
885
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
886
|
+
serializedBody: void 0
|
|
887
|
+
};
|
|
888
|
+
if (opts.security) {
|
|
889
|
+
await setAuthParams({
|
|
890
|
+
...opts,
|
|
891
|
+
security: opts.security
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
if (opts.requestValidator) {
|
|
895
|
+
await opts.requestValidator(opts);
|
|
896
|
+
}
|
|
897
|
+
if (opts.body !== void 0 && opts.bodySerializer) {
|
|
898
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
899
|
+
}
|
|
900
|
+
if (opts.body === void 0 || opts.serializedBody === "") {
|
|
901
|
+
opts.headers.delete("Content-Type");
|
|
902
|
+
}
|
|
903
|
+
const url = buildUrl(opts);
|
|
904
|
+
return { opts, url };
|
|
905
|
+
};
|
|
906
|
+
const request = async (options) => {
|
|
907
|
+
const { opts, url } = await beforeRequest(options);
|
|
908
|
+
const requestInit = {
|
|
909
|
+
redirect: "follow",
|
|
910
|
+
...opts,
|
|
911
|
+
body: getValidRequestBody(opts)
|
|
912
|
+
};
|
|
913
|
+
let request2 = new Request(url, requestInit);
|
|
914
|
+
for (const fn of interceptors.request.fns) {
|
|
915
|
+
if (fn) {
|
|
916
|
+
request2 = await fn(request2, opts);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const _fetch = opts.fetch;
|
|
920
|
+
let response;
|
|
921
|
+
try {
|
|
922
|
+
response = await _fetch(request2);
|
|
923
|
+
} catch (error2) {
|
|
924
|
+
let finalError2 = error2;
|
|
925
|
+
for (const fn of interceptors.error.fns) {
|
|
926
|
+
if (fn) {
|
|
927
|
+
finalError2 = await fn(
|
|
928
|
+
error2,
|
|
929
|
+
void 0,
|
|
930
|
+
request2,
|
|
931
|
+
opts
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
finalError2 = finalError2 || {};
|
|
936
|
+
if (opts.throwOnError) {
|
|
937
|
+
throw finalError2;
|
|
938
|
+
}
|
|
939
|
+
return opts.responseStyle === "data" ? void 0 : {
|
|
940
|
+
error: finalError2,
|
|
941
|
+
request: request2,
|
|
942
|
+
response: void 0
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
for (const fn of interceptors.response.fns) {
|
|
946
|
+
if (fn) {
|
|
947
|
+
response = await fn(response, request2, opts);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
const result = {
|
|
951
|
+
request: request2,
|
|
952
|
+
response
|
|
953
|
+
};
|
|
954
|
+
if (response.ok) {
|
|
955
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
956
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
957
|
+
let emptyData;
|
|
958
|
+
switch (parseAs) {
|
|
959
|
+
case "arrayBuffer":
|
|
960
|
+
case "blob":
|
|
961
|
+
case "text":
|
|
962
|
+
emptyData = await response[parseAs]();
|
|
963
|
+
break;
|
|
964
|
+
case "formData":
|
|
965
|
+
emptyData = new FormData();
|
|
966
|
+
break;
|
|
967
|
+
case "stream":
|
|
968
|
+
emptyData = response.body;
|
|
969
|
+
break;
|
|
970
|
+
case "json":
|
|
971
|
+
default:
|
|
972
|
+
emptyData = {};
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
976
|
+
data: emptyData,
|
|
977
|
+
...result
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
let data;
|
|
981
|
+
switch (parseAs) {
|
|
982
|
+
case "arrayBuffer":
|
|
983
|
+
case "blob":
|
|
984
|
+
case "formData":
|
|
985
|
+
case "json":
|
|
986
|
+
case "text":
|
|
987
|
+
data = await response[parseAs]();
|
|
988
|
+
break;
|
|
989
|
+
case "stream":
|
|
990
|
+
return opts.responseStyle === "data" ? response.body : {
|
|
991
|
+
data: response.body,
|
|
992
|
+
...result
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
if (parseAs === "json") {
|
|
996
|
+
if (opts.responseValidator) {
|
|
997
|
+
await opts.responseValidator(data);
|
|
998
|
+
}
|
|
999
|
+
if (opts.responseTransformer) {
|
|
1000
|
+
data = await opts.responseTransformer(data);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return opts.responseStyle === "data" ? data : {
|
|
1004
|
+
data,
|
|
1005
|
+
...result
|
|
1006
|
+
};
|
|
347
1007
|
}
|
|
348
|
-
|
|
1008
|
+
const textError = await response.text();
|
|
1009
|
+
let jsonError;
|
|
349
1010
|
try {
|
|
350
|
-
|
|
1011
|
+
jsonError = JSON.parse(textError);
|
|
351
1012
|
} catch {
|
|
352
1013
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
1014
|
+
const error = jsonError ?? textError;
|
|
1015
|
+
let finalError = error;
|
|
1016
|
+
for (const fn of interceptors.error.fns) {
|
|
1017
|
+
if (fn) {
|
|
1018
|
+
finalError = await fn(error, response, request2, opts);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
finalError = finalError || {};
|
|
1022
|
+
if (opts.throwOnError) {
|
|
1023
|
+
throw finalError;
|
|
1024
|
+
}
|
|
1025
|
+
return opts.responseStyle === "data" ? void 0 : {
|
|
1026
|
+
error: finalError,
|
|
1027
|
+
...result
|
|
1028
|
+
};
|
|
1029
|
+
};
|
|
1030
|
+
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
1031
|
+
const makeSseFn = (method) => async (options) => {
|
|
1032
|
+
const { opts, url } = await beforeRequest(options);
|
|
1033
|
+
return createSseClient({
|
|
1034
|
+
...opts,
|
|
1035
|
+
body: opts.body,
|
|
1036
|
+
headers: opts.headers,
|
|
1037
|
+
method,
|
|
1038
|
+
onRequest: async (url2, init) => {
|
|
1039
|
+
let request2 = new Request(url2, init);
|
|
1040
|
+
for (const fn of interceptors.request.fns) {
|
|
1041
|
+
if (fn) {
|
|
1042
|
+
request2 = await fn(request2, opts);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return request2;
|
|
1046
|
+
},
|
|
1047
|
+
url
|
|
1048
|
+
});
|
|
1049
|
+
};
|
|
1050
|
+
return {
|
|
1051
|
+
buildUrl,
|
|
1052
|
+
connect: makeMethodFn("CONNECT"),
|
|
1053
|
+
delete: makeMethodFn("DELETE"),
|
|
1054
|
+
get: makeMethodFn("GET"),
|
|
1055
|
+
getConfig,
|
|
1056
|
+
head: makeMethodFn("HEAD"),
|
|
1057
|
+
interceptors,
|
|
1058
|
+
options: makeMethodFn("OPTIONS"),
|
|
1059
|
+
patch: makeMethodFn("PATCH"),
|
|
1060
|
+
post: makeMethodFn("POST"),
|
|
1061
|
+
put: makeMethodFn("PUT"),
|
|
1062
|
+
request,
|
|
1063
|
+
setConfig,
|
|
1064
|
+
sse: {
|
|
1065
|
+
connect: makeSseFn("CONNECT"),
|
|
1066
|
+
delete: makeSseFn("DELETE"),
|
|
1067
|
+
get: makeSseFn("GET"),
|
|
1068
|
+
head: makeSseFn("HEAD"),
|
|
1069
|
+
options: makeSseFn("OPTIONS"),
|
|
1070
|
+
patch: makeSseFn("PATCH"),
|
|
1071
|
+
post: makeSseFn("POST"),
|
|
1072
|
+
put: makeSseFn("PUT"),
|
|
1073
|
+
trace: makeSseFn("TRACE")
|
|
1074
|
+
},
|
|
1075
|
+
trace: makeMethodFn("TRACE")
|
|
357
1076
|
};
|
|
358
|
-
return { buildUrl: C, connect: (n) => o({ ...n, method: "CONNECT" }), delete: (n) => o({ ...n, method: "DELETE" }), get: (n) => o({ ...n, method: "GET" }), getConfig: e, head: (n) => o({ ...n, method: "HEAD" }), interceptors: i, options: (n) => o({ ...n, method: "OPTIONS" }), patch: (n) => o({ ...n, method: "PATCH" }), post: (n) => o({ ...n, method: "POST" }), put: (n) => o({ ...n, method: "PUT" }), request: o, setConfig: a, trace: (n) => o({ ...n, method: "TRACE" }) };
|
|
359
1077
|
};
|
|
360
1078
|
|
|
361
|
-
// src/_internal/
|
|
362
|
-
var client =
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
1079
|
+
// src/_internal/client.gen.ts
|
|
1080
|
+
var client = createClient(
|
|
1081
|
+
createConfig({ baseUrl: "http://localhost:22222" })
|
|
1082
|
+
);
|
|
1083
|
+
|
|
1084
|
+
// src/_internal/sdk.gen.ts
|
|
1085
|
+
var postAiSearchAdvanced = (options) => (options.client ?? client).post({
|
|
1086
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1087
|
+
url: "/ai/search/advanced",
|
|
1088
|
+
...options,
|
|
1089
|
+
headers: {
|
|
1090
|
+
"Content-Type": "application/vnd.api+json",
|
|
1091
|
+
...options.headers
|
|
372
1092
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
1093
|
+
});
|
|
1094
|
+
var getThreads = (options) => (options.client ?? client).get({
|
|
1095
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1096
|
+
url: "/threads",
|
|
1097
|
+
...options
|
|
1098
|
+
});
|
|
1099
|
+
var postThreads = (options) => (options.client ?? client).post({
|
|
1100
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1101
|
+
url: "/threads",
|
|
1102
|
+
...options,
|
|
1103
|
+
headers: {
|
|
1104
|
+
"Content-Type": "application/vnd.api+json",
|
|
1105
|
+
...options.headers
|
|
381
1106
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
1107
|
+
});
|
|
1108
|
+
var getLlmAnalyticsCosts = (options) => (options.client ?? client).get({
|
|
1109
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1110
|
+
url: "/llm_analytics/costs",
|
|
1111
|
+
...options
|
|
1112
|
+
});
|
|
1113
|
+
var getAiChunksDocumentByDocumentId = (options) => (options.client ?? client).get({
|
|
1114
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1115
|
+
url: "/ai/chunks/document/{document_id}",
|
|
1116
|
+
...options
|
|
1117
|
+
});
|
|
1118
|
+
var deleteExtractionResultsById = (options) => (options.client ?? client).delete({
|
|
1119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1120
|
+
url: "/extraction_results/{id}",
|
|
1121
|
+
...options
|
|
1122
|
+
});
|
|
1123
|
+
var getExtractionResultsById = (options) => (options.client ?? client).get({
|
|
1124
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1125
|
+
url: "/extraction_results/{id}",
|
|
1126
|
+
...options
|
|
1127
|
+
});
|
|
1128
|
+
var patchExtractionResultsById = (options) => (options.client ?? client).patch({
|
|
1129
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1130
|
+
url: "/extraction_results/{id}",
|
|
1131
|
+
...options,
|
|
1132
|
+
headers: {
|
|
1133
|
+
"Content-Type": "application/vnd.api+json",
|
|
1134
|
+
...options.headers
|
|
390
1135
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
1136
|
+
});
|
|
1137
|
+
var getWorkspaces = (options) => (options.client ?? client).get({
|
|
1138
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1139
|
+
url: "/workspaces",
|
|
1140
|
+
...options
|
|
1141
|
+
});
|
|
1142
|
+
var postWorkspaces = (options) => (options.client ?? client).post({
|
|
1143
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1144
|
+
url: "/workspaces",
|
|
1145
|
+
...options,
|
|
1146
|
+
headers: {
|
|
1147
|
+
"Content-Type": "application/vnd.api+json",
|
|
1148
|
+
...options.headers
|
|
399
1149
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
1150
|
+
});
|
|
1151
|
+
var getDocumentsStats = (options) => (options.client ?? client).get({
|
|
1152
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1153
|
+
url: "/documents/stats",
|
|
1154
|
+
...options
|
|
1155
|
+
});
|
|
1156
|
+
var postObjectsRegister = (options) => (options.client ?? client).post({
|
|
1157
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1158
|
+
url: "/objects/register",
|
|
1159
|
+
...options,
|
|
1160
|
+
headers: {
|
|
1161
|
+
"Content-Type": "application/vnd.api+json",
|
|
1162
|
+
...options.headers
|
|
408
1163
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
1164
|
+
});
|
|
1165
|
+
var getLlmAnalyticsWorkspace = (options) => (options.client ?? client).get({
|
|
1166
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1167
|
+
url: "/llm_analytics/workspace",
|
|
1168
|
+
...options
|
|
1169
|
+
});
|
|
1170
|
+
var getSearchIndexes = (options) => (options.client ?? client).get({
|
|
1171
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1172
|
+
url: "/search/indexes",
|
|
1173
|
+
...options
|
|
1174
|
+
});
|
|
1175
|
+
var getCreditPackagesSlugBySlug = (options) => (options.client ?? client).get({
|
|
1176
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1177
|
+
url: "/credit-packages/slug/{slug}",
|
|
1178
|
+
...options
|
|
1179
|
+
});
|
|
1180
|
+
var getLlmAnalyticsPlatform = (options) => (options.client ?? client).get({
|
|
1181
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1182
|
+
url: "/llm_analytics/platform",
|
|
1183
|
+
...options
|
|
1184
|
+
});
|
|
1185
|
+
var postPayments = (options) => (options.client ?? client).post({
|
|
1186
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1187
|
+
url: "/payments",
|
|
1188
|
+
...options,
|
|
1189
|
+
headers: {
|
|
1190
|
+
"Content-Type": "application/vnd.api+json",
|
|
1191
|
+
...options.headers
|
|
417
1192
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
1193
|
+
});
|
|
1194
|
+
var patchApiKeysByIdRevoke = (options) => (options.client ?? client).patch({
|
|
1195
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1196
|
+
url: "/api_keys/{id}/revoke",
|
|
1197
|
+
...options,
|
|
1198
|
+
headers: {
|
|
1199
|
+
"Content-Type": "application/vnd.api+json",
|
|
1200
|
+
...options.headers
|
|
426
1201
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
1202
|
+
});
|
|
1203
|
+
var getInvitationsConsumeByToken = (options) => (options.client ?? client).get({
|
|
1204
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1205
|
+
url: "/invitations/consume/{token}",
|
|
1206
|
+
...options
|
|
1207
|
+
});
|
|
1208
|
+
var patchWorkspacesByIdAllocate = (options) => (options.client ?? client).patch({
|
|
1209
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1210
|
+
url: "/workspaces/{id}/allocate",
|
|
1211
|
+
...options,
|
|
1212
|
+
headers: {
|
|
1213
|
+
"Content-Type": "application/vnd.api+json",
|
|
1214
|
+
...options.headers
|
|
435
1215
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
1216
|
+
});
|
|
1217
|
+
var postThreadsActive = (options) => (options.client ?? client).post({
|
|
1218
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1219
|
+
url: "/threads/active",
|
|
1220
|
+
...options,
|
|
1221
|
+
headers: {
|
|
1222
|
+
"Content-Type": "application/vnd.api+json",
|
|
1223
|
+
...options.headers
|
|
444
1224
|
}
|
|
445
|
-
};
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
url: "/threads"
|
|
454
|
-
});
|
|
1225
|
+
});
|
|
1226
|
+
var patchInvitationsByIdRevoke = (options) => (options.client ?? client).patch({
|
|
1227
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1228
|
+
url: "/invitations/{id}/revoke",
|
|
1229
|
+
...options,
|
|
1230
|
+
headers: {
|
|
1231
|
+
"Content-Type": "application/vnd.api+json",
|
|
1232
|
+
...options.headers
|
|
455
1233
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
1234
|
+
});
|
|
1235
|
+
var getConfigs = (options) => (options.client ?? client).get({
|
|
1236
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1237
|
+
url: "/configs",
|
|
1238
|
+
...options
|
|
1239
|
+
});
|
|
1240
|
+
var postConfigs = (options) => (options.client ?? client).post({
|
|
1241
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1242
|
+
url: "/configs",
|
|
1243
|
+
...options,
|
|
1244
|
+
headers: {
|
|
1245
|
+
"Content-Type": "application/vnd.api+json",
|
|
1246
|
+
...options.headers
|
|
464
1247
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
1248
|
+
});
|
|
1249
|
+
var postTokens = (options) => (options.client ?? client).post({
|
|
1250
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1251
|
+
url: "/tokens",
|
|
1252
|
+
...options,
|
|
1253
|
+
headers: {
|
|
1254
|
+
"Content-Type": "application/vnd.api+json",
|
|
1255
|
+
...options.headers
|
|
473
1256
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
1257
|
+
});
|
|
1258
|
+
var deleteTrainingExamplesById = (options) => (options.client ?? client).delete({
|
|
1259
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1260
|
+
url: "/training_examples/{id}",
|
|
1261
|
+
...options
|
|
1262
|
+
});
|
|
1263
|
+
var getTrainingExamplesById = (options) => (options.client ?? client).get({
|
|
1264
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1265
|
+
url: "/training_examples/{id}",
|
|
1266
|
+
...options
|
|
1267
|
+
});
|
|
1268
|
+
var patchTrainingExamplesById = (options) => (options.client ?? client).patch({
|
|
1269
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1270
|
+
url: "/training_examples/{id}",
|
|
1271
|
+
...options,
|
|
1272
|
+
headers: {
|
|
1273
|
+
"Content-Type": "application/vnd.api+json",
|
|
1274
|
+
...options.headers
|
|
482
1275
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
1276
|
+
});
|
|
1277
|
+
var deleteSearchSavedById = (options) => (options.client ?? client).delete({
|
|
1278
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1279
|
+
url: "/search/saved/{id}",
|
|
1280
|
+
...options
|
|
1281
|
+
});
|
|
1282
|
+
var patchUsersAuthResetPassword = (options) => (options.client ?? client).patch({
|
|
1283
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1284
|
+
url: "/users/auth/reset-password",
|
|
1285
|
+
...options,
|
|
1286
|
+
headers: {
|
|
1287
|
+
"Content-Type": "application/vnd.api+json",
|
|
1288
|
+
...options.headers
|
|
491
1289
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
1290
|
+
});
|
|
1291
|
+
var getBucketsByIdStats = (options) => (options.client ?? client).get({
|
|
1292
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1293
|
+
url: "/buckets/{id}/stats",
|
|
1294
|
+
...options
|
|
1295
|
+
});
|
|
1296
|
+
var getDocumentsSearch = (options) => (options.client ?? client).get({
|
|
1297
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1298
|
+
url: "/documents/search",
|
|
1299
|
+
...options
|
|
1300
|
+
});
|
|
1301
|
+
var getBucketsByIdObjects = (options) => (options.client ?? client).get({
|
|
1302
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1303
|
+
url: "/buckets/{id}/objects",
|
|
1304
|
+
...options
|
|
1305
|
+
});
|
|
1306
|
+
var patchInvitationsByIdResend = (options) => (options.client ?? client).patch({
|
|
1307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1308
|
+
url: "/invitations/{id}/resend",
|
|
1309
|
+
...options,
|
|
1310
|
+
headers: {
|
|
1311
|
+
"Content-Type": "application/vnd.api+json",
|
|
1312
|
+
...options.headers
|
|
500
1313
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
1314
|
+
});
|
|
1315
|
+
var getSearchSaved = (options) => (options.client ?? client).get({
|
|
1316
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1317
|
+
url: "/search/saved",
|
|
1318
|
+
...options
|
|
1319
|
+
});
|
|
1320
|
+
var postSearchSaved = (options) => (options.client ?? client).post({
|
|
1321
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1322
|
+
url: "/search/saved",
|
|
1323
|
+
...options,
|
|
1324
|
+
headers: {
|
|
1325
|
+
"Content-Type": "application/vnd.api+json",
|
|
1326
|
+
...options.headers
|
|
509
1327
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
1328
|
+
});
|
|
1329
|
+
var getUserProfilesMe = (options) => (options.client ?? client).get({
|
|
1330
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1331
|
+
url: "/user_profiles/me",
|
|
1332
|
+
...options
|
|
1333
|
+
});
|
|
1334
|
+
var postInvitationsInvite = (options) => (options.client ?? client).post({
|
|
1335
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1336
|
+
url: "/invitations/invite",
|
|
1337
|
+
...options,
|
|
1338
|
+
headers: {
|
|
1339
|
+
"Content-Type": "application/vnd.api+json",
|
|
1340
|
+
...options.headers
|
|
518
1341
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
1342
|
+
});
|
|
1343
|
+
var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
|
|
1344
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1345
|
+
url: "/webhook_configs/{id}",
|
|
1346
|
+
...options
|
|
1347
|
+
});
|
|
1348
|
+
var getWebhookConfigsById = (options) => (options.client ?? client).get({
|
|
1349
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1350
|
+
url: "/webhook_configs/{id}",
|
|
1351
|
+
...options
|
|
1352
|
+
});
|
|
1353
|
+
var patchWebhookConfigsById = (options) => (options.client ?? client).patch({
|
|
1354
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1355
|
+
url: "/webhook_configs/{id}",
|
|
1356
|
+
...options,
|
|
1357
|
+
headers: {
|
|
1358
|
+
"Content-Type": "application/vnd.api+json",
|
|
1359
|
+
...options.headers
|
|
527
1360
|
}
|
|
528
|
-
};
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
url: "/extraction_results/{id}"
|
|
537
|
-
});
|
|
1361
|
+
});
|
|
1362
|
+
var postInvitationsAcceptByToken = (options) => (options.client ?? client).post({
|
|
1363
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1364
|
+
url: "/invitations/accept_by_token",
|
|
1365
|
+
...options,
|
|
1366
|
+
headers: {
|
|
1367
|
+
"Content-Type": "application/vnd.api+json",
|
|
1368
|
+
...options.headers
|
|
538
1369
|
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
1370
|
+
});
|
|
1371
|
+
var postDocumentsBulkDelete = (options) => (options.client ?? client).post({
|
|
1372
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1373
|
+
url: "/documents/bulk_delete",
|
|
1374
|
+
...options,
|
|
1375
|
+
headers: {
|
|
1376
|
+
"Content-Type": "application/vnd.api+json",
|
|
1377
|
+
...options.headers
|
|
547
1378
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
1379
|
+
});
|
|
1380
|
+
var postAiChunksSearch = (options) => (options.client ?? client).post({
|
|
1381
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1382
|
+
url: "/ai/chunks/search",
|
|
1383
|
+
...options,
|
|
1384
|
+
headers: {
|
|
1385
|
+
"Content-Type": "application/vnd.api+json",
|
|
1386
|
+
...options.headers
|
|
556
1387
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
1388
|
+
});
|
|
1389
|
+
var postThreadsByIdMessages = (options) => (options.client ?? client).post({
|
|
1390
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1391
|
+
url: "/threads/{id}/messages",
|
|
1392
|
+
...options,
|
|
1393
|
+
headers: {
|
|
1394
|
+
"Content-Type": "application/vnd.api+json",
|
|
1395
|
+
...options.headers
|
|
565
1396
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
1397
|
+
});
|
|
1398
|
+
var patchInvitationsByIdAccept = (options) => (options.client ?? client).patch({
|
|
1399
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1400
|
+
url: "/invitations/{id}/accept",
|
|
1401
|
+
...options,
|
|
1402
|
+
headers: {
|
|
1403
|
+
"Content-Type": "application/vnd.api+json",
|
|
1404
|
+
...options.headers
|
|
574
1405
|
}
|
|
575
|
-
};
|
|
576
|
-
var
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
1406
|
+
});
|
|
1407
|
+
var getCreditPackagesById = (options) => (options.client ?? client).get({
|
|
1408
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1409
|
+
url: "/credit-packages/{id}",
|
|
1410
|
+
...options
|
|
1411
|
+
});
|
|
1412
|
+
var getUsersById = (options) => (options.client ?? client).get({
|
|
1413
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1414
|
+
url: "/users/{id}",
|
|
1415
|
+
...options
|
|
1416
|
+
});
|
|
1417
|
+
var patchUsersById = (options) => (options.client ?? client).patch({
|
|
1418
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1419
|
+
url: "/users/{id}",
|
|
1420
|
+
...options,
|
|
1421
|
+
headers: {
|
|
1422
|
+
"Content-Type": "application/vnd.api+json",
|
|
1423
|
+
...options.headers
|
|
585
1424
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
1425
|
+
});
|
|
1426
|
+
var postAgentsByIdValidate = (options) => (options.client ?? client).post({
|
|
1427
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1428
|
+
url: "/agents/{id}/validate",
|
|
1429
|
+
...options,
|
|
1430
|
+
headers: {
|
|
1431
|
+
"Content-Type": "application/vnd.api+json",
|
|
1432
|
+
...options.headers
|
|
594
1433
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
1434
|
+
});
|
|
1435
|
+
var postWebhookConfigsByIdTest = (options) => (options.client ?? client).post({
|
|
1436
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1437
|
+
url: "/webhook_configs/{id}/test",
|
|
1438
|
+
...options,
|
|
1439
|
+
headers: {
|
|
1440
|
+
"Content-Type": "application/vnd.api+json",
|
|
1441
|
+
...options.headers
|
|
603
1442
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
1443
|
+
});
|
|
1444
|
+
var getUsersMe = (options) => (options.client ?? client).get({
|
|
1445
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1446
|
+
url: "/users/me",
|
|
1447
|
+
...options
|
|
1448
|
+
});
|
|
1449
|
+
var postUsersAuthRegisterWithOidc = (options) => (options.client ?? client).post({
|
|
1450
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1451
|
+
url: "/users/auth/register_with_oidc",
|
|
1452
|
+
...options,
|
|
1453
|
+
headers: {
|
|
1454
|
+
"Content-Type": "application/vnd.api+json",
|
|
1455
|
+
...options.headers
|
|
612
1456
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1457
|
+
});
|
|
1458
|
+
var getTransactionsById = (options) => (options.client ?? client).get({
|
|
1459
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1460
|
+
url: "/transactions/{id}",
|
|
1461
|
+
...options
|
|
1462
|
+
});
|
|
1463
|
+
var getTenantMemberships = (options) => (options.client ?? client).get({
|
|
1464
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1465
|
+
url: "/tenant-memberships",
|
|
1466
|
+
...options
|
|
1467
|
+
});
|
|
1468
|
+
var postTenantMemberships = (options) => (options.client ?? client).post({
|
|
1469
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1470
|
+
url: "/tenant-memberships",
|
|
1471
|
+
...options,
|
|
1472
|
+
headers: {
|
|
1473
|
+
"Content-Type": "application/vnd.api+json",
|
|
1474
|
+
...options.headers
|
|
621
1475
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
1476
|
+
});
|
|
1477
|
+
var getDocuments = (options) => (options.client ?? client).get({
|
|
1478
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1479
|
+
url: "/documents",
|
|
1480
|
+
...options
|
|
1481
|
+
});
|
|
1482
|
+
var postDocuments = (options) => (options.client ?? client).post({
|
|
1483
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1484
|
+
url: "/documents",
|
|
1485
|
+
...options,
|
|
1486
|
+
headers: {
|
|
1487
|
+
"Content-Type": "application/vnd.api+json",
|
|
1488
|
+
...options.headers
|
|
630
1489
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
1490
|
+
});
|
|
1491
|
+
var postTrainingExamplesBulkDelete = (options) => (options.client ?? client).post({
|
|
1492
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1493
|
+
url: "/training_examples/bulk_delete",
|
|
1494
|
+
...options,
|
|
1495
|
+
headers: {
|
|
1496
|
+
"Content-Type": "application/vnd.api+json",
|
|
1497
|
+
...options.headers
|
|
639
1498
|
}
|
|
640
|
-
};
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
1499
|
+
});
|
|
1500
|
+
var getLlmAnalyticsSummary = (options) => (options.client ?? client).get({
|
|
1501
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1502
|
+
url: "/llm_analytics/summary",
|
|
1503
|
+
...options
|
|
1504
|
+
});
|
|
1505
|
+
var postStorageSignDownload = (options) => (options.client ?? client).post({
|
|
1506
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1507
|
+
url: "/storage/sign_download",
|
|
1508
|
+
...options,
|
|
1509
|
+
headers: {
|
|
1510
|
+
"Content-Type": "application/vnd.api+json",
|
|
1511
|
+
...options.headers
|
|
650
1512
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
1513
|
+
});
|
|
1514
|
+
var getWebhookDeliveries = (options) => (options.client ?? client).get({
|
|
1515
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1516
|
+
url: "/webhook_deliveries",
|
|
1517
|
+
...options
|
|
1518
|
+
});
|
|
1519
|
+
var deleteDocumentsById = (options) => (options.client ?? client).delete({
|
|
1520
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1521
|
+
url: "/documents/{id}",
|
|
1522
|
+
...options
|
|
1523
|
+
});
|
|
1524
|
+
var getDocumentsById = (options) => (options.client ?? client).get({
|
|
1525
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1526
|
+
url: "/documents/{id}",
|
|
1527
|
+
...options
|
|
1528
|
+
});
|
|
1529
|
+
var patchDocumentsById = (options) => (options.client ?? client).patch({
|
|
1530
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1531
|
+
url: "/documents/{id}",
|
|
1532
|
+
...options,
|
|
1533
|
+
headers: {
|
|
1534
|
+
"Content-Type": "application/vnd.api+json",
|
|
1535
|
+
...options.headers
|
|
659
1536
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
1537
|
+
});
|
|
1538
|
+
var getSearch = (options) => (options.client ?? client).get({
|
|
1539
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1540
|
+
url: "/search",
|
|
1541
|
+
...options
|
|
1542
|
+
});
|
|
1543
|
+
var getInvitations = (options) => (options.client ?? client).get({
|
|
1544
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1545
|
+
url: "/invitations",
|
|
1546
|
+
...options
|
|
1547
|
+
});
|
|
1548
|
+
var postDocumentsByIdAnalyze = (options) => (options.client ?? client).post({
|
|
1549
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1550
|
+
url: "/documents/{id}/analyze",
|
|
1551
|
+
...options,
|
|
1552
|
+
headers: {
|
|
1553
|
+
"Content-Type": "application/vnd.api+json",
|
|
1554
|
+
...options.headers
|
|
668
1555
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* /api_keys/:id operation on api_key resource
|
|
689
|
-
*/
|
|
690
|
-
static patchApiKeysById(options) {
|
|
691
|
-
return (options?.client ?? client).patch({
|
|
692
|
-
...options,
|
|
693
|
-
url: "/api_keys/{id}"
|
|
694
|
-
});
|
|
695
|
-
}
|
|
696
|
-
/**
|
|
697
|
-
* Allocate credits to the account associated with this API Key
|
|
698
|
-
*/
|
|
699
|
-
static patchApiKeysByIdAllocate(options) {
|
|
700
|
-
return (options?.client ?? client).patch({
|
|
701
|
-
...options,
|
|
702
|
-
url: "/api_keys/{id}/allocate"
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* /api_keys/:id/rotate operation on api_key resource
|
|
707
|
-
*/
|
|
708
|
-
static patchApiKeysByIdRotate(options) {
|
|
709
|
-
return (options?.client ?? client).patch({
|
|
710
|
-
...options,
|
|
711
|
-
url: "/api_keys/{id}/rotate"
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
var InvitationService = class {
|
|
716
|
-
/**
|
|
717
|
-
* /invitations/consume/:token operation on invitation resource
|
|
718
|
-
*/
|
|
719
|
-
static getInvitationsConsumeByToken(options) {
|
|
720
|
-
return (options?.client ?? client).get({
|
|
721
|
-
...options,
|
|
722
|
-
url: "/invitations/consume/{token}"
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
/**
|
|
726
|
-
* /invitations/:id/revoke operation on invitation resource
|
|
727
|
-
*/
|
|
728
|
-
static patchInvitationsByIdRevoke(options) {
|
|
729
|
-
return (options?.client ?? client).patch({
|
|
730
|
-
...options,
|
|
731
|
-
url: "/invitations/{id}/revoke"
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* /invitations/:id/resend operation on invitation resource
|
|
736
|
-
*/
|
|
737
|
-
static patchInvitationsByIdResend(options) {
|
|
738
|
-
return (options?.client ?? client).patch({
|
|
739
|
-
...options,
|
|
740
|
-
url: "/invitations/{id}/resend"
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* /invitations/invite operation on invitation resource
|
|
745
|
-
*/
|
|
746
|
-
static postInvitationsInvite(options) {
|
|
747
|
-
return (options?.client ?? client).post({
|
|
748
|
-
...options,
|
|
749
|
-
url: "/invitations/invite"
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Accept an invitation using only the token
|
|
754
|
-
*/
|
|
755
|
-
static postInvitationsAcceptByToken(options) {
|
|
756
|
-
return (options?.client ?? client).post({
|
|
757
|
-
...options,
|
|
758
|
-
url: "/invitations/accept_by_token"
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* /invitations/:id/accept operation on invitation resource
|
|
763
|
-
*/
|
|
764
|
-
static patchInvitationsByIdAccept(options) {
|
|
765
|
-
return (options?.client ?? client).patch({
|
|
766
|
-
...options,
|
|
767
|
-
url: "/invitations/{id}/accept"
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
/**
|
|
771
|
-
* /invitations operation on invitation resource
|
|
772
|
-
*/
|
|
773
|
-
static getInvitations(options) {
|
|
774
|
-
return (options?.client ?? client).get({
|
|
775
|
-
...options,
|
|
776
|
-
url: "/invitations"
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
var UserService = class {
|
|
781
|
-
/**
|
|
782
|
-
* Reset password using admin-issued reset token
|
|
783
|
-
*/
|
|
784
|
-
static patchUsersAuthResetPassword(options) {
|
|
785
|
-
return (options?.client ?? client).patch({
|
|
786
|
-
...options,
|
|
787
|
-
url: "/users/auth/reset-password"
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
/**
|
|
791
|
-
* /users/:id operation on user resource
|
|
792
|
-
*/
|
|
793
|
-
static getUsersById(options) {
|
|
794
|
-
return (options?.client ?? client).get({
|
|
795
|
-
...options,
|
|
796
|
-
url: "/users/{id}"
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Admin-only user management (platform admins) - promotes/demotes admin status
|
|
801
|
-
*/
|
|
802
|
-
static patchUsersById(options) {
|
|
803
|
-
return (options?.client ?? client).patch({
|
|
804
|
-
...options,
|
|
805
|
-
url: "/users/{id}"
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Get the currently authenticated user
|
|
810
|
-
*/
|
|
811
|
-
static getUsersMe(options) {
|
|
812
|
-
return (options?.client ?? client).get({
|
|
813
|
-
...options,
|
|
814
|
-
url: "/users/me"
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* /users/auth/register_with_oidc operation on user resource
|
|
819
|
-
*/
|
|
820
|
-
static postUsersAuthRegisterWithOidc(options) {
|
|
821
|
-
return (options?.client ?? client).post({
|
|
822
|
-
...options,
|
|
823
|
-
url: "/users/auth/register_with_oidc"
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Admin triggers password reset email for user
|
|
828
|
-
*/
|
|
829
|
-
static patchUsersByIdResetPassword(options) {
|
|
830
|
-
return (options?.client ?? client).patch({
|
|
831
|
-
...options,
|
|
832
|
-
url: "/users/{id}/reset-password"
|
|
833
|
-
});
|
|
834
|
-
}
|
|
835
|
-
/**
|
|
836
|
-
* /users/auth/magic_link/login operation on user resource
|
|
837
|
-
*/
|
|
838
|
-
static postUsersAuthMagicLinkLogin(options) {
|
|
839
|
-
return (options?.client ?? client).post({
|
|
840
|
-
...options,
|
|
841
|
-
url: "/users/auth/magic_link/login"
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* Admin manually confirms user's email
|
|
846
|
-
*/
|
|
847
|
-
static patchUsersByIdConfirmEmail(options) {
|
|
848
|
-
return (options?.client ?? client).patch({
|
|
849
|
-
...options,
|
|
850
|
-
url: "/users/{id}/confirm-email"
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Attempt to sign in using a username and password.
|
|
855
|
-
*/
|
|
856
|
-
static postUsersAuthLogin(options) {
|
|
857
|
-
return (options?.client ?? client).post({
|
|
858
|
-
...options,
|
|
859
|
-
url: "/users/auth/login"
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* /users/auth/confirm operation on user resource
|
|
864
|
-
*/
|
|
865
|
-
static postUsersAuthConfirm(options) {
|
|
866
|
-
return (options?.client ?? client).post({
|
|
867
|
-
...options,
|
|
868
|
-
url: "/users/auth/confirm"
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
/**
|
|
872
|
-
* /users/auth/magic_link/request operation on user resource
|
|
873
|
-
*/
|
|
874
|
-
static postUsersAuthMagicLinkRequest(options) {
|
|
875
|
-
return (options?.client ?? client).post({
|
|
876
|
-
...options,
|
|
877
|
-
url: "/users/auth/magic_link/request"
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
/**
|
|
881
|
-
* /users/auth/register operation on user resource
|
|
882
|
-
*/
|
|
883
|
-
static postUsersAuthRegister(options) {
|
|
884
|
-
return (options?.client ?? client).post({
|
|
885
|
-
...options,
|
|
886
|
-
url: "/users/auth/register"
|
|
887
|
-
});
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Platform Admin action to register a new ISV (User + Tenant + App)
|
|
891
|
-
*/
|
|
892
|
-
static postUsersRegisterIsv(options) {
|
|
893
|
-
return (options?.client ?? client).post({
|
|
894
|
-
...options,
|
|
895
|
-
url: "/users/register_isv"
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* /users operation on user resource
|
|
900
|
-
*/
|
|
901
|
-
static getUsers(options) {
|
|
902
|
-
return (options?.client ?? client).get({
|
|
903
|
-
...options,
|
|
904
|
-
url: "/users"
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
};
|
|
908
|
-
var BucketService = class {
|
|
909
|
-
/**
|
|
910
|
-
* /buckets/:id/stats operation on bucket resource
|
|
911
|
-
*/
|
|
912
|
-
static getBucketsByIdStats(options) {
|
|
913
|
-
return (options?.client ?? client).get({
|
|
914
|
-
...options,
|
|
915
|
-
url: "/buckets/{id}/stats"
|
|
916
|
-
});
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* /buckets operation on bucket resource
|
|
920
|
-
*/
|
|
921
|
-
static getBuckets(options) {
|
|
922
|
-
return (options?.client ?? client).get({
|
|
923
|
-
...options,
|
|
924
|
-
url: "/buckets"
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
/**
|
|
928
|
-
* /buckets operation on bucket resource
|
|
929
|
-
*/
|
|
930
|
-
static postBuckets(options) {
|
|
931
|
-
return (options?.client ?? client).post({
|
|
932
|
-
...options,
|
|
933
|
-
url: "/buckets"
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* /buckets/:id operation on bucket resource
|
|
938
|
-
*/
|
|
939
|
-
static deleteBucketsById(options) {
|
|
940
|
-
return (options?.client ?? client).delete({
|
|
941
|
-
...options,
|
|
942
|
-
url: "/buckets/{id}"
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
/**
|
|
946
|
-
* /buckets/:id operation on bucket resource
|
|
947
|
-
*/
|
|
948
|
-
static getBucketsById(options) {
|
|
949
|
-
return (options?.client ?? client).get({
|
|
950
|
-
...options,
|
|
951
|
-
url: "/buckets/{id}"
|
|
952
|
-
});
|
|
1556
|
+
});
|
|
1557
|
+
var getSearchSemantic = (options) => (options.client ?? client).get({
|
|
1558
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1559
|
+
url: "/search/semantic",
|
|
1560
|
+
...options
|
|
1561
|
+
});
|
|
1562
|
+
var getMessages = (options) => (options.client ?? client).get({
|
|
1563
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1564
|
+
url: "/messages",
|
|
1565
|
+
...options
|
|
1566
|
+
});
|
|
1567
|
+
var postMessages = (options) => (options.client ?? client).post({
|
|
1568
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1569
|
+
url: "/messages",
|
|
1570
|
+
...options,
|
|
1571
|
+
headers: {
|
|
1572
|
+
"Content-Type": "application/vnd.api+json",
|
|
1573
|
+
...options.headers
|
|
953
1574
|
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
1575
|
+
});
|
|
1576
|
+
var getNotificationPreferences = (options) => (options.client ?? client).get({
|
|
1577
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1578
|
+
url: "/notification_preferences",
|
|
1579
|
+
...options
|
|
1580
|
+
});
|
|
1581
|
+
var postNotificationPreferences = (options) => (options.client ?? client).post({
|
|
1582
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1583
|
+
url: "/notification_preferences",
|
|
1584
|
+
...options,
|
|
1585
|
+
headers: {
|
|
1586
|
+
"Content-Type": "application/vnd.api+json",
|
|
1587
|
+
...options.headers
|
|
962
1588
|
}
|
|
963
|
-
};
|
|
964
|
-
var
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1589
|
+
});
|
|
1590
|
+
var getApplications = (options) => (options.client ?? client).get({
|
|
1591
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1592
|
+
url: "/applications",
|
|
1593
|
+
...options
|
|
1594
|
+
});
|
|
1595
|
+
var postApplications = (options) => (options.client ?? client).post({
|
|
1596
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1597
|
+
url: "/applications",
|
|
1598
|
+
...options,
|
|
1599
|
+
headers: {
|
|
1600
|
+
"Content-Type": "application/vnd.api+json",
|
|
1601
|
+
...options.headers
|
|
973
1602
|
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1603
|
+
});
|
|
1604
|
+
var deleteThreadsById = (options) => (options.client ?? client).delete({
|
|
1605
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1606
|
+
url: "/threads/{id}",
|
|
1607
|
+
...options
|
|
1608
|
+
});
|
|
1609
|
+
var getThreadsById = (options) => (options.client ?? client).get({
|
|
1610
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1611
|
+
url: "/threads/{id}",
|
|
1612
|
+
...options
|
|
1613
|
+
});
|
|
1614
|
+
var patchThreadsById = (options) => (options.client ?? client).patch({
|
|
1615
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1616
|
+
url: "/threads/{id}",
|
|
1617
|
+
...options,
|
|
1618
|
+
headers: {
|
|
1619
|
+
"Content-Type": "application/vnd.api+json",
|
|
1620
|
+
...options.headers
|
|
982
1621
|
}
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1622
|
+
});
|
|
1623
|
+
var getLlmAnalytics = (options) => (options.client ?? client).get({
|
|
1624
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1625
|
+
url: "/llm_analytics",
|
|
1626
|
+
...options
|
|
1627
|
+
});
|
|
1628
|
+
var postLlmAnalytics = (options) => (options.client ?? client).post({
|
|
1629
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1630
|
+
url: "/llm_analytics",
|
|
1631
|
+
...options,
|
|
1632
|
+
headers: {
|
|
1633
|
+
"Content-Type": "application/vnd.api+json",
|
|
1634
|
+
...options.headers
|
|
991
1635
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1636
|
+
});
|
|
1637
|
+
var postDocumentsByIdReprocess = (options) => (options.client ?? client).post({
|
|
1638
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1639
|
+
url: "/documents/{id}/reprocess",
|
|
1640
|
+
...options,
|
|
1641
|
+
headers: {
|
|
1642
|
+
"Content-Type": "application/vnd.api+json",
|
|
1643
|
+
...options.headers
|
|
1000
1644
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1645
|
+
});
|
|
1646
|
+
var patchUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
1647
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1648
|
+
url: "/users/{id}/reset-password",
|
|
1649
|
+
...options,
|
|
1650
|
+
headers: {
|
|
1651
|
+
"Content-Type": "application/vnd.api+json",
|
|
1652
|
+
...options.headers
|
|
1009
1653
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1654
|
+
});
|
|
1655
|
+
var postDocumentsPresignedUpload = (options) => (options.client ?? client).post({
|
|
1656
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1657
|
+
url: "/documents/presigned_upload",
|
|
1658
|
+
...options,
|
|
1659
|
+
headers: {
|
|
1660
|
+
"Content-Type": "application/vnd.api+json",
|
|
1661
|
+
...options.headers
|
|
1018
1662
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1663
|
+
});
|
|
1664
|
+
var getMessagesSearch = (options) => (options.client ?? client).get({
|
|
1665
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1666
|
+
url: "/messages/search",
|
|
1667
|
+
...options
|
|
1668
|
+
});
|
|
1669
|
+
var deleteWorkspacesById = (options) => (options.client ?? client).delete({
|
|
1670
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1671
|
+
url: "/workspaces/{id}",
|
|
1672
|
+
...options
|
|
1673
|
+
});
|
|
1674
|
+
var getWorkspacesById = (options) => (options.client ?? client).get({
|
|
1675
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1676
|
+
url: "/workspaces/{id}",
|
|
1677
|
+
...options
|
|
1678
|
+
});
|
|
1679
|
+
var patchWorkspacesById = (options) => (options.client ?? client).patch({
|
|
1680
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1681
|
+
url: "/workspaces/{id}",
|
|
1682
|
+
...options,
|
|
1683
|
+
headers: {
|
|
1684
|
+
"Content-Type": "application/vnd.api+json",
|
|
1685
|
+
...options.headers
|
|
1027
1686
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1687
|
+
});
|
|
1688
|
+
var getTenants = (options) => (options.client ?? client).get({
|
|
1689
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1690
|
+
url: "/tenants",
|
|
1691
|
+
...options
|
|
1692
|
+
});
|
|
1693
|
+
var postTenants = (options) => (options.client ?? client).post({
|
|
1694
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1695
|
+
url: "/tenants",
|
|
1696
|
+
...options,
|
|
1697
|
+
headers: {
|
|
1698
|
+
"Content-Type": "application/vnd.api+json",
|
|
1699
|
+
...options.headers
|
|
1036
1700
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1701
|
+
});
|
|
1702
|
+
var postTenantsByIdRemoveStorage = (options) => (options.client ?? client).post({
|
|
1703
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1704
|
+
url: "/tenants/{id}/remove-storage",
|
|
1705
|
+
...options,
|
|
1706
|
+
headers: {
|
|
1707
|
+
"Content-Type": "application/vnd.api+json",
|
|
1708
|
+
...options.headers
|
|
1045
1709
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1710
|
+
});
|
|
1711
|
+
var postDocumentsBulkReprocess = (options) => (options.client ?? client).post({
|
|
1712
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1713
|
+
url: "/documents/bulk_reprocess",
|
|
1714
|
+
...options,
|
|
1715
|
+
headers: {
|
|
1716
|
+
"Content-Type": "application/vnd.api+json",
|
|
1717
|
+
...options.headers
|
|
1054
1718
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1719
|
+
});
|
|
1720
|
+
var getNotificationLogsById = (options) => (options.client ?? client).get({
|
|
1721
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1722
|
+
url: "/notification_logs/{id}",
|
|
1723
|
+
...options
|
|
1724
|
+
});
|
|
1725
|
+
var getWebhookDeliveriesById = (options) => (options.client ?? client).get({
|
|
1726
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1727
|
+
url: "/webhook_deliveries/{id}",
|
|
1728
|
+
...options
|
|
1729
|
+
});
|
|
1730
|
+
var getAuditLogs = (options) => (options.client ?? client).get({
|
|
1731
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1732
|
+
url: "/audit-logs",
|
|
1733
|
+
...options
|
|
1734
|
+
});
|
|
1735
|
+
var getAiGraphEdges = (options) => (options.client ?? client).get({
|
|
1736
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1737
|
+
url: "/ai/graph/edges",
|
|
1738
|
+
...options
|
|
1739
|
+
});
|
|
1740
|
+
var postAiGraphEdges = (options) => (options.client ?? client).post({
|
|
1741
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1742
|
+
url: "/ai/graph/edges",
|
|
1743
|
+
...options,
|
|
1744
|
+
headers: {
|
|
1745
|
+
"Content-Type": "application/vnd.api+json",
|
|
1746
|
+
...options.headers
|
|
1063
1747
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1748
|
+
});
|
|
1749
|
+
var postDocumentsExport = (options) => (options.client ?? client).post({
|
|
1750
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1751
|
+
url: "/documents/export",
|
|
1752
|
+
...options
|
|
1753
|
+
});
|
|
1754
|
+
var getTrainingExamples = (options) => (options.client ?? client).get({
|
|
1755
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1756
|
+
url: "/training_examples",
|
|
1757
|
+
...options
|
|
1758
|
+
});
|
|
1759
|
+
var postTrainingExamples = (options) => (options.client ?? client).post({
|
|
1760
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1761
|
+
url: "/training_examples",
|
|
1762
|
+
...options,
|
|
1763
|
+
headers: {
|
|
1764
|
+
"Content-Type": "application/vnd.api+json",
|
|
1765
|
+
...options.headers
|
|
1072
1766
|
}
|
|
1073
|
-
};
|
|
1074
|
-
var
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1767
|
+
});
|
|
1768
|
+
var getBuckets = (options) => (options.client ?? client).get({
|
|
1769
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1770
|
+
url: "/buckets",
|
|
1771
|
+
...options
|
|
1772
|
+
});
|
|
1773
|
+
var postBuckets = (options) => (options.client ?? client).post({
|
|
1774
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1775
|
+
url: "/buckets",
|
|
1776
|
+
...options,
|
|
1777
|
+
headers: {
|
|
1778
|
+
"Content-Type": "application/vnd.api+json",
|
|
1779
|
+
...options.headers
|
|
1083
1780
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1781
|
+
});
|
|
1782
|
+
var getPlansById = (options) => (options.client ?? client).get({
|
|
1783
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1784
|
+
url: "/plans/{id}",
|
|
1785
|
+
...options
|
|
1786
|
+
});
|
|
1787
|
+
var patchWalletAddons = (options) => (options.client ?? client).patch({
|
|
1788
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1789
|
+
url: "/wallet/addons",
|
|
1790
|
+
...options,
|
|
1791
|
+
headers: {
|
|
1792
|
+
"Content-Type": "application/vnd.api+json",
|
|
1793
|
+
...options.headers
|
|
1092
1794
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1795
|
+
});
|
|
1796
|
+
var postUsersAuthMagicLinkLogin = (options) => (options.client ?? client).post({
|
|
1797
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1798
|
+
url: "/users/auth/magic_link/login",
|
|
1799
|
+
...options,
|
|
1800
|
+
headers: {
|
|
1801
|
+
"Content-Type": "application/vnd.api+json",
|
|
1802
|
+
...options.headers
|
|
1101
1803
|
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1804
|
+
});
|
|
1805
|
+
var getApiKeys = (options) => (options.client ?? client).get({
|
|
1806
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1807
|
+
url: "/api_keys",
|
|
1808
|
+
...options
|
|
1809
|
+
});
|
|
1810
|
+
var postApiKeys = (options) => (options.client ?? client).post({
|
|
1811
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1812
|
+
url: "/api_keys",
|
|
1813
|
+
...options,
|
|
1814
|
+
headers: {
|
|
1815
|
+
"Content-Type": "application/vnd.api+json",
|
|
1816
|
+
...options.headers
|
|
1110
1817
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1818
|
+
});
|
|
1819
|
+
var getExtractionResults = (options) => (options.client ?? client).get({
|
|
1820
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1821
|
+
url: "/extraction_results",
|
|
1822
|
+
...options
|
|
1823
|
+
});
|
|
1824
|
+
var deleteAgentsById = (options) => (options.client ?? client).delete({
|
|
1825
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1826
|
+
url: "/agents/{id}",
|
|
1827
|
+
...options
|
|
1828
|
+
});
|
|
1829
|
+
var getAgentsById = (options) => (options.client ?? client).get({
|
|
1830
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1831
|
+
url: "/agents/{id}",
|
|
1832
|
+
...options
|
|
1833
|
+
});
|
|
1834
|
+
var patchAgentsById = (options) => (options.client ?? client).patch({
|
|
1835
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1836
|
+
url: "/agents/{id}",
|
|
1837
|
+
...options,
|
|
1838
|
+
headers: {
|
|
1839
|
+
"Content-Type": "application/vnd.api+json",
|
|
1840
|
+
...options.headers
|
|
1119
1841
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1842
|
+
});
|
|
1843
|
+
var postDocumentsImport = (options) => (options.client ?? client).post({
|
|
1844
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1845
|
+
url: "/documents/import",
|
|
1846
|
+
...options,
|
|
1847
|
+
headers: {
|
|
1848
|
+
"Content-Type": "application/vnd.api+json",
|
|
1849
|
+
...options.headers
|
|
1128
1850
|
}
|
|
1129
|
-
};
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1851
|
+
});
|
|
1852
|
+
var deleteApiKeysById = (options) => (options.client ?? client).delete({
|
|
1853
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1854
|
+
url: "/api_keys/{id}",
|
|
1855
|
+
...options
|
|
1856
|
+
});
|
|
1857
|
+
var getApiKeysById = (options) => (options.client ?? client).get({
|
|
1858
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1859
|
+
url: "/api_keys/{id}",
|
|
1860
|
+
...options
|
|
1861
|
+
});
|
|
1862
|
+
var patchApiKeysById = (options) => (options.client ?? client).patch({
|
|
1863
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1864
|
+
url: "/api_keys/{id}",
|
|
1865
|
+
...options,
|
|
1866
|
+
headers: {
|
|
1867
|
+
"Content-Type": "application/vnd.api+json",
|
|
1868
|
+
...options.headers
|
|
1139
1869
|
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1870
|
+
});
|
|
1871
|
+
var postAiSearch = (options) => (options.client ?? client).post({
|
|
1872
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1873
|
+
url: "/ai/search",
|
|
1874
|
+
...options,
|
|
1875
|
+
headers: {
|
|
1876
|
+
"Content-Type": "application/vnd.api+json",
|
|
1877
|
+
...options.headers
|
|
1148
1878
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1879
|
+
});
|
|
1880
|
+
var deleteAiGraphNodesById = (options) => (options.client ?? client).delete({
|
|
1881
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1882
|
+
url: "/ai/graph/nodes/{id}",
|
|
1883
|
+
...options
|
|
1884
|
+
});
|
|
1885
|
+
var patchWalletAddonsByAddonSlugCancel = (options) => (options.client ?? client).patch({
|
|
1886
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1887
|
+
url: "/wallet/addons/{addon_slug}/cancel",
|
|
1888
|
+
...options,
|
|
1889
|
+
headers: {
|
|
1890
|
+
"Content-Type": "application/vnd.api+json",
|
|
1891
|
+
...options.headers
|
|
1157
1892
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1893
|
+
});
|
|
1894
|
+
var deleteApplicationsById = (options) => (options.client ?? client).delete({
|
|
1895
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1896
|
+
url: "/applications/{id}",
|
|
1897
|
+
...options
|
|
1898
|
+
});
|
|
1899
|
+
var getApplicationsById = (options) => (options.client ?? client).get({
|
|
1900
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1901
|
+
url: "/applications/{id}",
|
|
1902
|
+
...options
|
|
1903
|
+
});
|
|
1904
|
+
var patchApplicationsById = (options) => (options.client ?? client).patch({
|
|
1905
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1906
|
+
url: "/applications/{id}",
|
|
1907
|
+
...options,
|
|
1908
|
+
headers: {
|
|
1909
|
+
"Content-Type": "application/vnd.api+json",
|
|
1910
|
+
...options.headers
|
|
1166
1911
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1912
|
+
});
|
|
1913
|
+
var getSearchHealth = (options) => (options.client ?? client).get({
|
|
1914
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1915
|
+
url: "/search/health",
|
|
1916
|
+
...options
|
|
1917
|
+
});
|
|
1918
|
+
var getTransactions = (options) => (options.client ?? client).get({
|
|
1919
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1920
|
+
url: "/transactions",
|
|
1921
|
+
...options
|
|
1922
|
+
});
|
|
1923
|
+
var getUserProfiles = (options) => (options.client ?? client).get({
|
|
1924
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1925
|
+
url: "/user_profiles",
|
|
1926
|
+
...options
|
|
1927
|
+
});
|
|
1928
|
+
var postUserProfiles = (options) => (options.client ?? client).post({
|
|
1929
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1930
|
+
url: "/user_profiles",
|
|
1931
|
+
...options,
|
|
1932
|
+
headers: {
|
|
1933
|
+
"Content-Type": "application/vnd.api+json",
|
|
1934
|
+
...options.headers
|
|
1175
1935
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1936
|
+
});
|
|
1937
|
+
var patchUsersByIdConfirmEmail = (options) => (options.client ?? client).patch({
|
|
1938
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1939
|
+
url: "/users/{id}/confirm-email",
|
|
1940
|
+
...options,
|
|
1941
|
+
headers: {
|
|
1942
|
+
"Content-Type": "application/vnd.api+json",
|
|
1943
|
+
...options.headers
|
|
1184
1944
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1945
|
+
});
|
|
1946
|
+
var getThreadsSearch = (options) => (options.client ?? client).get({
|
|
1947
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1948
|
+
url: "/threads/search",
|
|
1949
|
+
...options
|
|
1950
|
+
});
|
|
1951
|
+
var getDocumentsByIdRelationshipsChunks = (options) => (options.client ?? client).get({
|
|
1952
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1953
|
+
url: "/documents/{id}/relationships/chunks",
|
|
1954
|
+
...options
|
|
1955
|
+
});
|
|
1956
|
+
var patchWalletPlan = (options) => (options.client ?? client).patch({
|
|
1957
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1958
|
+
url: "/wallet/plan",
|
|
1959
|
+
...options,
|
|
1960
|
+
headers: {
|
|
1961
|
+
"Content-Type": "application/vnd.api+json",
|
|
1962
|
+
...options.headers
|
|
1193
1963
|
}
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1964
|
+
});
|
|
1965
|
+
var getPlansSlugBySlug = (options) => (options.client ?? client).get({
|
|
1966
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1967
|
+
url: "/plans/slug/{slug}",
|
|
1968
|
+
...options
|
|
1969
|
+
});
|
|
1970
|
+
var getLlmAnalyticsById = (options) => (options.client ?? client).get({
|
|
1971
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1972
|
+
url: "/llm_analytics/{id}",
|
|
1973
|
+
...options
|
|
1974
|
+
});
|
|
1975
|
+
var getSearchStatus = (options) => (options.client ?? client).get({
|
|
1976
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1977
|
+
url: "/search/status",
|
|
1978
|
+
...options
|
|
1979
|
+
});
|
|
1980
|
+
var patchApiKeysByIdAllocate = (options) => (options.client ?? client).patch({
|
|
1981
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1982
|
+
url: "/api_keys/{id}/allocate",
|
|
1983
|
+
...options,
|
|
1984
|
+
headers: {
|
|
1985
|
+
"Content-Type": "application/vnd.api+json",
|
|
1986
|
+
...options.headers
|
|
1202
1987
|
}
|
|
1203
|
-
};
|
|
1204
|
-
var
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
url: "/storage/sign_download"
|
|
1212
|
-
});
|
|
1988
|
+
});
|
|
1989
|
+
var postUsersAuthLogin = (options) => (options.client ?? client).post({
|
|
1990
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1991
|
+
url: "/users/auth/login",
|
|
1992
|
+
...options,
|
|
1993
|
+
headers: {
|
|
1994
|
+
"Content-Type": "application/vnd.api+json",
|
|
1995
|
+
...options.headers
|
|
1213
1996
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1997
|
+
});
|
|
1998
|
+
var postAiEmbed = (options) => (options.client ?? client).post({
|
|
1999
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2000
|
+
url: "/ai/embed",
|
|
2001
|
+
...options,
|
|
2002
|
+
headers: {
|
|
2003
|
+
"Content-Type": "application/vnd.api+json",
|
|
2004
|
+
...options.headers
|
|
1222
2005
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
2006
|
+
});
|
|
2007
|
+
var getWorkspacesMine = (options) => (options.client ?? client).get({
|
|
2008
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2009
|
+
url: "/workspaces/mine",
|
|
2010
|
+
...options
|
|
2011
|
+
});
|
|
2012
|
+
var postSearchReindex = (options) => (options.client ?? client).post({
|
|
2013
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2014
|
+
url: "/search/reindex",
|
|
2015
|
+
...options,
|
|
2016
|
+
headers: {
|
|
2017
|
+
"Content-Type": "application/vnd.api+json",
|
|
2018
|
+
...options.headers
|
|
1231
2019
|
}
|
|
1232
|
-
};
|
|
1233
|
-
var
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
url: "/applications"
|
|
1241
|
-
});
|
|
2020
|
+
});
|
|
2021
|
+
var postUsersAuthConfirm = (options) => (options.client ?? client).post({
|
|
2022
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2023
|
+
url: "/users/auth/confirm",
|
|
2024
|
+
...options,
|
|
2025
|
+
headers: {
|
|
2026
|
+
"Content-Type": "application/vnd.api+json",
|
|
2027
|
+
...options.headers
|
|
1242
2028
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
2029
|
+
});
|
|
2030
|
+
var getStorageStats = (options) => (options.client ?? client).get({
|
|
2031
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2032
|
+
url: "/storage/stats",
|
|
2033
|
+
...options
|
|
2034
|
+
});
|
|
2035
|
+
var postTenantsByIdBuyStorage = (options) => (options.client ?? client).post({
|
|
2036
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2037
|
+
url: "/tenants/{id}/buy-storage",
|
|
2038
|
+
...options,
|
|
2039
|
+
headers: {
|
|
2040
|
+
"Content-Type": "application/vnd.api+json",
|
|
2041
|
+
...options.headers
|
|
1251
2042
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
2043
|
+
});
|
|
2044
|
+
var getWorkspaceMemberships = (options) => (options.client ?? client).get({
|
|
2045
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2046
|
+
url: "/workspace-memberships",
|
|
2047
|
+
...options
|
|
2048
|
+
});
|
|
2049
|
+
var postWorkspaceMemberships = (options) => (options.client ?? client).post({
|
|
2050
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2051
|
+
url: "/workspace-memberships",
|
|
2052
|
+
...options,
|
|
2053
|
+
headers: {
|
|
2054
|
+
"Content-Type": "application/vnd.api+json",
|
|
2055
|
+
...options.headers
|
|
1260
2056
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
2057
|
+
});
|
|
2058
|
+
var postUsersAuthMagicLinkRequest = (options) => (options.client ?? client).post({
|
|
2059
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2060
|
+
url: "/users/auth/magic_link/request",
|
|
2061
|
+
...options,
|
|
2062
|
+
headers: {
|
|
2063
|
+
"Content-Type": "application/vnd.api+json",
|
|
2064
|
+
...options.headers
|
|
1269
2065
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
2066
|
+
});
|
|
2067
|
+
var postUsersAuthRegister = (options) => (options.client ?? client).post({
|
|
2068
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2069
|
+
url: "/users/auth/register",
|
|
2070
|
+
...options,
|
|
2071
|
+
headers: {
|
|
2072
|
+
"Content-Type": "application/vnd.api+json",
|
|
2073
|
+
...options.headers
|
|
1278
2074
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
2075
|
+
});
|
|
2076
|
+
var postTrainingExamplesBulk = (options) => (options.client ?? client).post({
|
|
2077
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2078
|
+
url: "/training_examples/bulk",
|
|
2079
|
+
...options,
|
|
2080
|
+
headers: {
|
|
2081
|
+
"Content-Type": "application/vnd.api+json",
|
|
2082
|
+
...options.headers
|
|
1287
2083
|
}
|
|
1288
|
-
};
|
|
1289
|
-
var
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
2084
|
+
});
|
|
2085
|
+
var deleteBucketsById = (options) => (options.client ?? client).delete({
|
|
2086
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2087
|
+
url: "/buckets/{id}",
|
|
2088
|
+
...options
|
|
2089
|
+
});
|
|
2090
|
+
var getBucketsById = (options) => (options.client ?? client).get({
|
|
2091
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2092
|
+
url: "/buckets/{id}",
|
|
2093
|
+
...options
|
|
2094
|
+
});
|
|
2095
|
+
var patchBucketsById = (options) => (options.client ?? client).patch({
|
|
2096
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2097
|
+
url: "/buckets/{id}",
|
|
2098
|
+
...options,
|
|
2099
|
+
headers: {
|
|
2100
|
+
"Content-Type": "application/vnd.api+json",
|
|
2101
|
+
...options.headers
|
|
1298
2102
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
2103
|
+
});
|
|
2104
|
+
var deleteAiGraphEdgesById = (options) => (options.client ?? client).delete({
|
|
2105
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2106
|
+
url: "/ai/graph/edges/{id}",
|
|
2107
|
+
...options
|
|
2108
|
+
});
|
|
2109
|
+
var deleteTenantsById = (options) => (options.client ?? client).delete({
|
|
2110
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2111
|
+
url: "/tenants/{id}",
|
|
2112
|
+
...options
|
|
2113
|
+
});
|
|
2114
|
+
var getTenantsById = (options) => (options.client ?? client).get({
|
|
2115
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2116
|
+
url: "/tenants/{id}",
|
|
2117
|
+
...options
|
|
2118
|
+
});
|
|
2119
|
+
var patchTenantsById = (options) => (options.client ?? client).patch({
|
|
2120
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2121
|
+
url: "/tenants/{id}",
|
|
2122
|
+
...options,
|
|
2123
|
+
headers: {
|
|
2124
|
+
"Content-Type": "application/vnd.api+json",
|
|
2125
|
+
...options.headers
|
|
1307
2126
|
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
2127
|
+
});
|
|
2128
|
+
var getPlans = (options) => (options.client ?? client).get({
|
|
2129
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2130
|
+
url: "/plans",
|
|
2131
|
+
...options
|
|
2132
|
+
});
|
|
2133
|
+
var postAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
2134
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2135
|
+
url: "/agents/{id}/test",
|
|
2136
|
+
...options,
|
|
2137
|
+
headers: {
|
|
2138
|
+
"Content-Type": "application/vnd.api+json",
|
|
2139
|
+
...options.headers
|
|
1316
2140
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
2141
|
+
});
|
|
2142
|
+
var getDocumentsProcessingQueue = (options) => (options.client ?? client).get({
|
|
2143
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2144
|
+
url: "/documents/processing_queue",
|
|
2145
|
+
...options
|
|
2146
|
+
});
|
|
2147
|
+
var deleteTenantMembershipsByTenantIdByUserId = (options) => (options.client ?? client).delete({
|
|
2148
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2149
|
+
url: "/tenant-memberships/{tenant_id}/{user_id}",
|
|
2150
|
+
...options
|
|
2151
|
+
});
|
|
2152
|
+
var patchTenantMembershipsByTenantIdByUserId = (options) => (options.client ?? client).patch({
|
|
2153
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2154
|
+
url: "/tenant-memberships/{tenant_id}/{user_id}",
|
|
2155
|
+
...options,
|
|
2156
|
+
headers: {
|
|
2157
|
+
"Content-Type": "application/vnd.api+json",
|
|
2158
|
+
...options.headers
|
|
1325
2159
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
2160
|
+
});
|
|
2161
|
+
var postStorageSignUpload = (options) => (options.client ?? client).post({
|
|
2162
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2163
|
+
url: "/storage/sign_upload",
|
|
2164
|
+
...options,
|
|
2165
|
+
headers: {
|
|
2166
|
+
"Content-Type": "application/vnd.api+json",
|
|
2167
|
+
...options.headers
|
|
1334
2168
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
2169
|
+
});
|
|
2170
|
+
var postWebhookDeliveriesByIdRetry = (options) => (options.client ?? client).post({
|
|
2171
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2172
|
+
url: "/webhook_deliveries/{id}/retry",
|
|
2173
|
+
...options,
|
|
2174
|
+
headers: {
|
|
2175
|
+
"Content-Type": "application/vnd.api+json",
|
|
2176
|
+
...options.headers
|
|
1343
2177
|
}
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
2178
|
+
});
|
|
2179
|
+
var postThreadsByIdSummarize = (options) => (options.client ?? client).post({
|
|
2180
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2181
|
+
url: "/threads/{id}/summarize",
|
|
2182
|
+
...options,
|
|
2183
|
+
headers: {
|
|
2184
|
+
"Content-Type": "application/vnd.api+json",
|
|
2185
|
+
...options.headers
|
|
1352
2186
|
}
|
|
1353
|
-
};
|
|
1354
|
-
var
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
url: "/audit-logs"
|
|
1362
|
-
});
|
|
2187
|
+
});
|
|
2188
|
+
var patchConfigsByKey = (options) => (options.client ?? client).patch({
|
|
2189
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2190
|
+
url: "/configs/{key}",
|
|
2191
|
+
...options,
|
|
2192
|
+
headers: {
|
|
2193
|
+
"Content-Type": "application/vnd.api+json",
|
|
2194
|
+
...options.headers
|
|
1363
2195
|
}
|
|
1364
|
-
};
|
|
1365
|
-
var
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
url: "/plans/{id}"
|
|
1373
|
-
});
|
|
2196
|
+
});
|
|
2197
|
+
var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
|
|
2198
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2199
|
+
url: "/api_keys/{id}/rotate",
|
|
2200
|
+
...options,
|
|
2201
|
+
headers: {
|
|
2202
|
+
"Content-Type": "application/vnd.api+json",
|
|
2203
|
+
...options.headers
|
|
1374
2204
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
2205
|
+
});
|
|
2206
|
+
var postAgentsByIdClone = (options) => (options.client ?? client).post({
|
|
2207
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2208
|
+
url: "/agents/{id}/clone",
|
|
2209
|
+
...options,
|
|
2210
|
+
headers: {
|
|
2211
|
+
"Content-Type": "application/vnd.api+json",
|
|
2212
|
+
...options.headers
|
|
1383
2213
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
2214
|
+
});
|
|
2215
|
+
var deleteUserProfilesById = (options) => (options.client ?? client).delete({
|
|
2216
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2217
|
+
url: "/user_profiles/{id}",
|
|
2218
|
+
...options
|
|
2219
|
+
});
|
|
2220
|
+
var getUserProfilesById = (options) => (options.client ?? client).get({
|
|
2221
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2222
|
+
url: "/user_profiles/{id}",
|
|
2223
|
+
...options
|
|
2224
|
+
});
|
|
2225
|
+
var patchUserProfilesById = (options) => (options.client ?? client).patch({
|
|
2226
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2227
|
+
url: "/user_profiles/{id}",
|
|
2228
|
+
...options,
|
|
2229
|
+
headers: {
|
|
2230
|
+
"Content-Type": "application/vnd.api+json",
|
|
2231
|
+
...options.headers
|
|
1392
2232
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
2233
|
+
});
|
|
2234
|
+
var deleteObjectsById = (options) => (options.client ?? client).delete({
|
|
2235
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2236
|
+
url: "/objects/{id}",
|
|
2237
|
+
...options
|
|
2238
|
+
});
|
|
2239
|
+
var getObjectsById = (options) => (options.client ?? client).get({
|
|
2240
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2241
|
+
url: "/objects/{id}",
|
|
2242
|
+
...options
|
|
2243
|
+
});
|
|
2244
|
+
var getWebhookConfigs = (options) => (options.client ?? client).get({
|
|
2245
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2246
|
+
url: "/webhook_configs",
|
|
2247
|
+
...options
|
|
2248
|
+
});
|
|
2249
|
+
var postWebhookConfigs = (options) => (options.client ?? client).post({
|
|
2250
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2251
|
+
url: "/webhook_configs",
|
|
2252
|
+
...options,
|
|
2253
|
+
headers: {
|
|
2254
|
+
"Content-Type": "application/vnd.api+json",
|
|
2255
|
+
...options.headers
|
|
1401
2256
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
2257
|
+
});
|
|
2258
|
+
var postObjectsBulkDestroy = (options) => (options.client ?? client).post({
|
|
2259
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2260
|
+
url: "/objects/bulk-destroy",
|
|
2261
|
+
...options,
|
|
2262
|
+
headers: {
|
|
2263
|
+
"Content-Type": "application/vnd.api+json",
|
|
2264
|
+
...options.headers
|
|
1410
2265
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
2266
|
+
});
|
|
2267
|
+
var getApplicationsBySlugBySlug = (options) => (options.client ?? client).get({
|
|
2268
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2269
|
+
url: "/applications/by-slug/{slug}",
|
|
2270
|
+
...options
|
|
2271
|
+
});
|
|
2272
|
+
var getNotificationLogs = (options) => (options.client ?? client).get({
|
|
2273
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2274
|
+
url: "/notification_logs",
|
|
2275
|
+
...options
|
|
2276
|
+
});
|
|
2277
|
+
var getWallet = (options) => (options.client ?? client).get({
|
|
2278
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2279
|
+
url: "/wallet",
|
|
2280
|
+
...options
|
|
2281
|
+
});
|
|
2282
|
+
var deleteMessagesById = (options) => (options.client ?? client).delete({
|
|
2283
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2284
|
+
url: "/messages/{id}",
|
|
2285
|
+
...options
|
|
2286
|
+
});
|
|
2287
|
+
var getMessagesById = (options) => (options.client ?? client).get({
|
|
2288
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2289
|
+
url: "/messages/{id}",
|
|
2290
|
+
...options
|
|
2291
|
+
});
|
|
2292
|
+
var patchMessagesById = (options) => (options.client ?? client).patch({
|
|
2293
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2294
|
+
url: "/messages/{id}",
|
|
2295
|
+
...options,
|
|
2296
|
+
headers: {
|
|
2297
|
+
"Content-Type": "application/vnd.api+json",
|
|
2298
|
+
...options.headers
|
|
1419
2299
|
}
|
|
1420
|
-
};
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
2300
|
+
});
|
|
2301
|
+
var getLlmAnalyticsUsage = (options) => (options.client ?? client).get({
|
|
2302
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2303
|
+
url: "/llm_analytics/usage",
|
|
2304
|
+
...options
|
|
2305
|
+
});
|
|
2306
|
+
var getSearchStats = (options) => (options.client ?? client).get({
|
|
2307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2308
|
+
url: "/search/stats",
|
|
2309
|
+
...options
|
|
2310
|
+
});
|
|
2311
|
+
var deleteNotificationPreferencesById = (options) => (options.client ?? client).delete({
|
|
2312
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2313
|
+
url: "/notification_preferences/{id}",
|
|
2314
|
+
...options
|
|
2315
|
+
});
|
|
2316
|
+
var getNotificationPreferencesById = (options) => (options.client ?? client).get({
|
|
2317
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2318
|
+
url: "/notification_preferences/{id}",
|
|
2319
|
+
...options
|
|
2320
|
+
});
|
|
2321
|
+
var patchNotificationPreferencesById = (options) => (options.client ?? client).patch({
|
|
2322
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2323
|
+
url: "/notification_preferences/{id}",
|
|
2324
|
+
...options,
|
|
2325
|
+
headers: {
|
|
2326
|
+
"Content-Type": "application/vnd.api+json",
|
|
2327
|
+
...options.headers
|
|
1430
2328
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
2329
|
+
});
|
|
2330
|
+
var getAiGraphNodes = (options) => (options.client ?? client).get({
|
|
2331
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2332
|
+
url: "/ai/graph/nodes",
|
|
2333
|
+
...options
|
|
2334
|
+
});
|
|
2335
|
+
var postAiGraphNodes = (options) => (options.client ?? client).post({
|
|
2336
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2337
|
+
url: "/ai/graph/nodes",
|
|
2338
|
+
...options,
|
|
2339
|
+
headers: {
|
|
2340
|
+
"Content-Type": "application/vnd.api+json",
|
|
2341
|
+
...options.headers
|
|
1439
2342
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
2343
|
+
});
|
|
2344
|
+
var getAgents = (options) => (options.client ?? client).get({
|
|
2345
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2346
|
+
url: "/agents",
|
|
2347
|
+
...options
|
|
2348
|
+
});
|
|
2349
|
+
var postAgents = (options) => (options.client ?? client).post({
|
|
2350
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2351
|
+
url: "/agents",
|
|
2352
|
+
...options,
|
|
2353
|
+
headers: {
|
|
2354
|
+
"Content-Type": "application/vnd.api+json",
|
|
2355
|
+
...options.headers
|
|
1448
2356
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
2357
|
+
});
|
|
2358
|
+
var getDocumentsByIdExtractionResults = (options) => (options.client ?? client).get({
|
|
2359
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2360
|
+
url: "/documents/{id}/extraction_results",
|
|
2361
|
+
...options
|
|
2362
|
+
});
|
|
2363
|
+
var postUsersRegisterIsv = (options) => (options.client ?? client).post({
|
|
2364
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2365
|
+
url: "/users/register_isv",
|
|
2366
|
+
...options,
|
|
2367
|
+
headers: {
|
|
2368
|
+
"Content-Type": "application/vnd.api+json",
|
|
2369
|
+
...options.headers
|
|
1457
2370
|
}
|
|
1458
|
-
};
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
2371
|
+
});
|
|
2372
|
+
var deleteWorkspaceMembershipsByWorkspaceIdByUserId = (options) => (options.client ?? client).delete({
|
|
2373
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2374
|
+
url: "/workspace-memberships/{workspace_id}/{user_id}",
|
|
2375
|
+
...options
|
|
2376
|
+
});
|
|
2377
|
+
var patchWorkspaceMembershipsByWorkspaceIdByUserId = (options) => (options.client ?? client).patch({
|
|
2378
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2379
|
+
url: "/workspace-memberships/{workspace_id}/{user_id}",
|
|
2380
|
+
...options,
|
|
2381
|
+
headers: {
|
|
2382
|
+
"Content-Type": "application/vnd.api+json",
|
|
2383
|
+
...options.headers
|
|
1468
2384
|
}
|
|
1469
|
-
};
|
|
2385
|
+
});
|
|
2386
|
+
var getCreditPackages = (options) => (options.client ?? client).get({
|
|
2387
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2388
|
+
url: "/credit-packages",
|
|
2389
|
+
...options
|
|
2390
|
+
});
|
|
2391
|
+
var getUsers = (options) => (options.client ?? client).get({
|
|
2392
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2393
|
+
url: "/users",
|
|
2394
|
+
...options
|
|
2395
|
+
});
|
|
2396
|
+
var getObjects = (options) => (options.client ?? client).get({
|
|
2397
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2398
|
+
url: "/objects",
|
|
2399
|
+
...options
|
|
2400
|
+
});
|
|
1470
2401
|
|
|
1471
2402
|
// src/errors/index.ts
|
|
1472
2403
|
var GptCoreError = class extends Error {
|
|
@@ -1583,78 +2514,6 @@ function handleApiError(error) {
|
|
|
1583
2514
|
}
|
|
1584
2515
|
}
|
|
1585
2516
|
|
|
1586
|
-
// src/base-client.ts
|
|
1587
|
-
var BaseClient = class {
|
|
1588
|
-
constructor(config = {}) {
|
|
1589
|
-
this.config = config;
|
|
1590
|
-
this.retryConfig = config.retry !== void 0 ? config.retry : {
|
|
1591
|
-
maxRetries: 3,
|
|
1592
|
-
initialDelay: 1e3,
|
|
1593
|
-
maxDelay: 32e3,
|
|
1594
|
-
retryableStatusCodes: [429, 500, 502, 503, 504]
|
|
1595
|
-
};
|
|
1596
|
-
if (config.baseUrl) {
|
|
1597
|
-
client.setConfig({ baseUrl: config.baseUrl });
|
|
1598
|
-
}
|
|
1599
|
-
client.interceptors.request.use((req) => {
|
|
1600
|
-
req.headers.set("Accept", "application/vnd.api+json");
|
|
1601
|
-
req.headers.set("Content-Type", "application/vnd.api+json");
|
|
1602
|
-
if (config.apiKey) {
|
|
1603
|
-
req.headers.set("x-application-key", config.apiKey);
|
|
1604
|
-
}
|
|
1605
|
-
if (config.token) {
|
|
1606
|
-
req.headers.set("Authorization", `Bearer ${config.token}`);
|
|
1607
|
-
}
|
|
1608
|
-
return req;
|
|
1609
|
-
});
|
|
1610
|
-
client.interceptors.response.use((response) => {
|
|
1611
|
-
if (response.error) {
|
|
1612
|
-
handleApiError(response.error);
|
|
1613
|
-
}
|
|
1614
|
-
return response;
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1617
|
-
unwrap(resource) {
|
|
1618
|
-
if (!resource) return null;
|
|
1619
|
-
if (resource.data && !resource.id && !resource.type) {
|
|
1620
|
-
return resource.data;
|
|
1621
|
-
}
|
|
1622
|
-
return resource;
|
|
1623
|
-
}
|
|
1624
|
-
handleError(error) {
|
|
1625
|
-
return handleApiError(error);
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
|
|
1629
|
-
// src/pagination.ts
|
|
1630
|
-
async function* paginateAll(fetcher, options = {}) {
|
|
1631
|
-
const pageSize = options.pageSize || 20;
|
|
1632
|
-
const limit = options.limit;
|
|
1633
|
-
let page = 1;
|
|
1634
|
-
let totalYielded = 0;
|
|
1635
|
-
while (true) {
|
|
1636
|
-
const response = await fetcher(page, pageSize);
|
|
1637
|
-
for (const item of response.data) {
|
|
1638
|
-
yield item;
|
|
1639
|
-
totalYielded++;
|
|
1640
|
-
if (limit && totalYielded >= limit) {
|
|
1641
|
-
return;
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
if (!response.links?.next || response.data.length === 0) {
|
|
1645
|
-
break;
|
|
1646
|
-
}
|
|
1647
|
-
page++;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
async function paginateToArray(fetcher, options = {}) {
|
|
1651
|
-
const results = [];
|
|
1652
|
-
for await (const item of paginateAll(fetcher, options)) {
|
|
1653
|
-
results.push(item);
|
|
1654
|
-
}
|
|
1655
|
-
return results;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
2517
|
// src/schemas/requests.ts
|
|
1659
2518
|
var import_zod = require("zod");
|
|
1660
2519
|
var LoginRequestSchema = import_zod.z.object({
|
|
@@ -1726,599 +2585,6 @@ var PresignedDownloadSchema = import_zod.z.object({
|
|
|
1726
2585
|
file_id: import_zod.z.string().uuid()
|
|
1727
2586
|
});
|
|
1728
2587
|
|
|
1729
|
-
// src/gpt-client.ts
|
|
1730
|
-
var GptClient = class extends BaseClient {
|
|
1731
|
-
constructor(config) {
|
|
1732
|
-
super(config);
|
|
1733
|
-
this.identity = {
|
|
1734
|
-
login: async (email, password) => {
|
|
1735
|
-
const validated = LoginRequestSchema.parse({ email, password });
|
|
1736
|
-
const { data, error } = await UserService.postUsersAuthLogin({
|
|
1737
|
-
body: {
|
|
1738
|
-
data: {
|
|
1739
|
-
type: "user",
|
|
1740
|
-
attributes: validated
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
});
|
|
1744
|
-
if (error) this.handleError(error);
|
|
1745
|
-
return {
|
|
1746
|
-
user: this.unwrap(data?.data),
|
|
1747
|
-
token: data?.meta?.token
|
|
1748
|
-
};
|
|
1749
|
-
},
|
|
1750
|
-
register: async (email, password, password_confirmation) => {
|
|
1751
|
-
const validated = RegisterRequestSchema.parse({ email, password, password_confirmation });
|
|
1752
|
-
const { data, error } = await UserService.postUsersAuthRegister({
|
|
1753
|
-
body: {
|
|
1754
|
-
data: {
|
|
1755
|
-
type: "user",
|
|
1756
|
-
attributes: validated
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1760
|
-
if (error) this.handleError(error);
|
|
1761
|
-
return this.unwrap(data?.data);
|
|
1762
|
-
},
|
|
1763
|
-
me: async () => {
|
|
1764
|
-
const { data, error } = await UserService.getUsersMe();
|
|
1765
|
-
if (error) this.handleError(error);
|
|
1766
|
-
return this.unwrap(data?.data);
|
|
1767
|
-
},
|
|
1768
|
-
profile: async () => {
|
|
1769
|
-
const { data, error } = await UserProfileService.getUserProfilesMe();
|
|
1770
|
-
if (error) this.handleError(error);
|
|
1771
|
-
return this.unwrap(data?.data);
|
|
1772
|
-
},
|
|
1773
|
-
apiKeys: {
|
|
1774
|
-
list: async () => {
|
|
1775
|
-
const { data, error } = await ApiKeyService.getApiKeys();
|
|
1776
|
-
if (error) this.handleError(error);
|
|
1777
|
-
return this.unwrap(data?.data);
|
|
1778
|
-
},
|
|
1779
|
-
create: async (name) => {
|
|
1780
|
-
const validated = ApiKeyCreateSchema.parse({ name });
|
|
1781
|
-
const { data, error } = await ApiKeyService.postApiKeys({
|
|
1782
|
-
body: { data: { type: "api_key", attributes: validated } }
|
|
1783
|
-
});
|
|
1784
|
-
if (error) this.handleError(error);
|
|
1785
|
-
return this.unwrap(data?.data);
|
|
1786
|
-
},
|
|
1787
|
-
allocate: async (id, amount, description) => {
|
|
1788
|
-
const validated = ApiKeyAllocateSchema.parse({ amount, description });
|
|
1789
|
-
const { error } = await ApiKeyService.patchApiKeysByIdAllocate({
|
|
1790
|
-
path: { id },
|
|
1791
|
-
body: { data: { type: "api_key", id, attributes: validated } }
|
|
1792
|
-
});
|
|
1793
|
-
if (error) this.handleError(error);
|
|
1794
|
-
return true;
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
};
|
|
1798
|
-
this.platform = {
|
|
1799
|
-
applications: {
|
|
1800
|
-
list: async () => {
|
|
1801
|
-
const { data, error } = await ApplicationService.getApplications();
|
|
1802
|
-
if (error) this.handleError(error);
|
|
1803
|
-
return this.unwrap(data?.data);
|
|
1804
|
-
},
|
|
1805
|
-
create: async (attributes) => {
|
|
1806
|
-
const validated = ApplicationCreateSchema.parse(attributes);
|
|
1807
|
-
const { data, error } = await ApplicationService.postApplications({
|
|
1808
|
-
body: { data: { type: "application", attributes: validated } }
|
|
1809
|
-
});
|
|
1810
|
-
if (error) this.handleError(error);
|
|
1811
|
-
return this.unwrap(data?.data);
|
|
1812
|
-
},
|
|
1813
|
-
getBySlug: async (slug) => {
|
|
1814
|
-
const { data, error } = await ApplicationService.getApplicationsBySlugBySlug({
|
|
1815
|
-
path: { slug }
|
|
1816
|
-
});
|
|
1817
|
-
if (error) this.handleError(error);
|
|
1818
|
-
return this.unwrap(data?.data);
|
|
1819
|
-
}
|
|
1820
|
-
},
|
|
1821
|
-
workspaces: {
|
|
1822
|
-
list: async () => {
|
|
1823
|
-
const { data, error } = await WorkspaceService.getWorkspaces();
|
|
1824
|
-
if (error) this.handleError(error);
|
|
1825
|
-
return this.unwrap(data?.data);
|
|
1826
|
-
},
|
|
1827
|
-
mine: async () => {
|
|
1828
|
-
const { data, error } = await WorkspaceService.getWorkspacesMine();
|
|
1829
|
-
if (error) this.handleError(error);
|
|
1830
|
-
return this.unwrap(data?.data);
|
|
1831
|
-
},
|
|
1832
|
-
create: async (name, slug) => {
|
|
1833
|
-
const validated = WorkspaceCreateSchema.parse({ name, slug });
|
|
1834
|
-
const { data, error } = await WorkspaceService.postWorkspaces({
|
|
1835
|
-
body: { data: { type: "workspace", attributes: validated } }
|
|
1836
|
-
});
|
|
1837
|
-
if (error) this.handleError(error);
|
|
1838
|
-
return this.unwrap(data?.data);
|
|
1839
|
-
}
|
|
1840
|
-
},
|
|
1841
|
-
tenants: {
|
|
1842
|
-
list: async () => {
|
|
1843
|
-
const { data, error } = await TenantService.getTenants();
|
|
1844
|
-
if (error) this.handleError(error);
|
|
1845
|
-
return this.unwrap(data?.data);
|
|
1846
|
-
}
|
|
1847
|
-
},
|
|
1848
|
-
invitations: {
|
|
1849
|
-
list: async () => {
|
|
1850
|
-
const { data, error } = await InvitationService.getInvitations();
|
|
1851
|
-
if (error) this.handleError(error);
|
|
1852
|
-
return this.unwrap(data?.data);
|
|
1853
|
-
},
|
|
1854
|
-
invite: async (email, role2, scopeType, scopeId) => {
|
|
1855
|
-
const validated = InvitationCreateSchema.parse({
|
|
1856
|
-
email,
|
|
1857
|
-
role: role2,
|
|
1858
|
-
scope_type: scopeType,
|
|
1859
|
-
scope_id: scopeId
|
|
1860
|
-
});
|
|
1861
|
-
const { error } = await InvitationService.postInvitationsInvite({
|
|
1862
|
-
body: validated
|
|
1863
|
-
});
|
|
1864
|
-
if (error) this.handleError(error);
|
|
1865
|
-
return true;
|
|
1866
|
-
}
|
|
1867
|
-
},
|
|
1868
|
-
auditLogs: {
|
|
1869
|
-
list: async () => {
|
|
1870
|
-
const { data, error } = await AuditLogService.getAuditLogs();
|
|
1871
|
-
if (error) this.handleError(error);
|
|
1872
|
-
return this.unwrap(data?.data);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
};
|
|
1876
|
-
this.ai = {
|
|
1877
|
-
agents: {
|
|
1878
|
-
list: async () => {
|
|
1879
|
-
const { data, error } = await AgentService.getAgents();
|
|
1880
|
-
if (error) this.handleError(error);
|
|
1881
|
-
return this.unwrap(data?.data);
|
|
1882
|
-
},
|
|
1883
|
-
create: async (name, promptTemplate) => {
|
|
1884
|
-
const validated = AgentCreateSchema.parse({ name, prompt_template: promptTemplate });
|
|
1885
|
-
const { data, error } = await AgentService.postAgents({
|
|
1886
|
-
body: { data: { type: "agent", attributes: validated } }
|
|
1887
|
-
});
|
|
1888
|
-
if (error) this.handleError(error);
|
|
1889
|
-
return this.unwrap(data?.data);
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
threads: {
|
|
1893
|
-
list: async () => {
|
|
1894
|
-
const { data, error } = await ThreadService.getThreads();
|
|
1895
|
-
if (error) this.handleError(error);
|
|
1896
|
-
return this.unwrap(data?.data);
|
|
1897
|
-
},
|
|
1898
|
-
create: async (title) => {
|
|
1899
|
-
const validated = ThreadCreateSchema.parse({ title });
|
|
1900
|
-
const { data, error } = await ThreadService.postThreads({
|
|
1901
|
-
body: { data: { type: "thread", attributes: validated } }
|
|
1902
|
-
});
|
|
1903
|
-
if (error) this.handleError(error);
|
|
1904
|
-
return this.unwrap(data?.data);
|
|
1905
|
-
},
|
|
1906
|
-
sendMessage: async (threadId, content) => {
|
|
1907
|
-
const validated = MessageSendSchema.parse({ content });
|
|
1908
|
-
const { data, error } = await ThreadService.postThreadsByIdMessages({
|
|
1909
|
-
path: { id: threadId },
|
|
1910
|
-
body: { data: { attributes: validated } }
|
|
1911
|
-
});
|
|
1912
|
-
if (error) this.handleError(error);
|
|
1913
|
-
return this.unwrap(data);
|
|
1914
|
-
}
|
|
1915
|
-
/**
|
|
1916
|
-
* Note: For streaming message responses, use the streaming utilities:
|
|
1917
|
-
*
|
|
1918
|
-
* ```typescript
|
|
1919
|
-
* import { streamMessage } from '@gpt-core/client';
|
|
1920
|
-
*
|
|
1921
|
-
* // Make streaming request to backend
|
|
1922
|
-
* const response = await fetch(`${baseUrl}/threads/${threadId}/messages/stream`, {
|
|
1923
|
-
* method: 'POST',
|
|
1924
|
-
* headers: { 'Accept': 'text/event-stream' },
|
|
1925
|
-
* body: JSON.stringify({ content: 'Hello' })
|
|
1926
|
-
* });
|
|
1927
|
-
*
|
|
1928
|
-
* // Stream the response
|
|
1929
|
-
* for await (const chunk of streamMessage(response)) {
|
|
1930
|
-
* console.log(chunk.content);
|
|
1931
|
-
* }
|
|
1932
|
-
* ```
|
|
1933
|
-
*/
|
|
1934
|
-
},
|
|
1935
|
-
search: async (query, top_k = 5) => {
|
|
1936
|
-
const validated = SearchRequestSchema.parse({ query, top_k });
|
|
1937
|
-
const { data, error } = await SearchService.postAiSearch({
|
|
1938
|
-
body: validated
|
|
1939
|
-
});
|
|
1940
|
-
if (error) this.handleError(error);
|
|
1941
|
-
return this.unwrap(data);
|
|
1942
|
-
},
|
|
1943
|
-
embed: async (text, workspaceId) => {
|
|
1944
|
-
const validated = EmbedRequestSchema.parse({ text, workspace_id: workspaceId });
|
|
1945
|
-
const { data, error } = await EmbeddingService.postAiEmbed({
|
|
1946
|
-
body: validated
|
|
1947
|
-
});
|
|
1948
|
-
if (error) this.handleError(error);
|
|
1949
|
-
return this.unwrap(data);
|
|
1950
|
-
}
|
|
1951
|
-
};
|
|
1952
|
-
this.extraction = {
|
|
1953
|
-
documents: {
|
|
1954
|
-
list: async () => {
|
|
1955
|
-
const { data, error } = await DocumentService.getDocuments();
|
|
1956
|
-
if (error) this.handleError(error);
|
|
1957
|
-
return this.unwrap(data?.data);
|
|
1958
|
-
},
|
|
1959
|
-
upload: async (_file, _filename) => {
|
|
1960
|
-
throw new Error("Use uploadBase64 for now");
|
|
1961
|
-
},
|
|
1962
|
-
uploadBase64: async (filename, base64Content) => {
|
|
1963
|
-
const validated = DocumentUploadBase64Schema.parse({ filename, content: base64Content });
|
|
1964
|
-
const { data, error } = await DocumentService.postDocuments({
|
|
1965
|
-
body: { data: { type: "document", attributes: validated } }
|
|
1966
|
-
});
|
|
1967
|
-
if (error) this.handleError(error);
|
|
1968
|
-
return this.unwrap(data?.data);
|
|
1969
|
-
},
|
|
1970
|
-
get: async (id) => {
|
|
1971
|
-
const { data, error } = await DocumentService.getDocumentsById({ path: { id } });
|
|
1972
|
-
if (error) this.handleError(error);
|
|
1973
|
-
return this.unwrap(data?.data);
|
|
1974
|
-
},
|
|
1975
|
-
delete: async (id) => {
|
|
1976
|
-
const { error } = await DocumentService.deleteDocumentsById({ path: { id } });
|
|
1977
|
-
if (error) this.handleError(error);
|
|
1978
|
-
return true;
|
|
1979
|
-
},
|
|
1980
|
-
analyze: async (id) => {
|
|
1981
|
-
const { error } = await DocumentService.postDocumentsByIdAnalyze({ path: { id }, body: {} });
|
|
1982
|
-
if (error) this.handleError(error);
|
|
1983
|
-
return true;
|
|
1984
|
-
}
|
|
1985
|
-
},
|
|
1986
|
-
results: {
|
|
1987
|
-
list: async () => {
|
|
1988
|
-
const { data, error } = await ExtractionResultService.getExtractionResults();
|
|
1989
|
-
if (error) this.handleError(error);
|
|
1990
|
-
return this.unwrap(data?.data);
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
};
|
|
1994
|
-
this.storage = {
|
|
1995
|
-
buckets: {
|
|
1996
|
-
list: async () => {
|
|
1997
|
-
const { data, error } = await BucketService.getBuckets();
|
|
1998
|
-
if (error) this.handleError(error);
|
|
1999
|
-
return this.unwrap(data?.data);
|
|
2000
|
-
},
|
|
2001
|
-
create: async (name, isPublic = false) => {
|
|
2002
|
-
const validated = BucketCreateSchema.parse({ name, type: isPublic ? "public" : "private" });
|
|
2003
|
-
const { data, error } = await BucketService.postBuckets({
|
|
2004
|
-
body: { data: { type: "bucket", attributes: validated } }
|
|
2005
|
-
});
|
|
2006
|
-
if (error) this.handleError(error);
|
|
2007
|
-
return this.unwrap(data?.data);
|
|
2008
|
-
}
|
|
2009
|
-
},
|
|
2010
|
-
presigned: {
|
|
2011
|
-
upload: async (filename, contentType) => {
|
|
2012
|
-
const validated = PresignedUploadSchema.parse({ filename, content_type: contentType });
|
|
2013
|
-
const { data, error } = await PresignedUrlService.postStorageSignUpload({
|
|
2014
|
-
body: validated
|
|
2015
|
-
});
|
|
2016
|
-
if (error) this.handleError(error);
|
|
2017
|
-
return this.unwrap(data);
|
|
2018
|
-
},
|
|
2019
|
-
download: async (fileId) => {
|
|
2020
|
-
const validated = PresignedDownloadSchema.parse({ file_id: fileId });
|
|
2021
|
-
const { data, error } = await PresignedUrlService.postStorageSignDownload({
|
|
2022
|
-
body: validated
|
|
2023
|
-
});
|
|
2024
|
-
if (error) this.handleError(error);
|
|
2025
|
-
return this.unwrap(data);
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
};
|
|
2029
|
-
this.billing = {
|
|
2030
|
-
wallet: {
|
|
2031
|
-
get: async () => {
|
|
2032
|
-
const { data, error } = await WalletService.getWallet();
|
|
2033
|
-
if (error) this.handleError(error);
|
|
2034
|
-
return this.unwrap(data?.data);
|
|
2035
|
-
}
|
|
2036
|
-
},
|
|
2037
|
-
plans: {
|
|
2038
|
-
list: async () => {
|
|
2039
|
-
const { data, error } = await PlanService.getPlans();
|
|
2040
|
-
if (error) this.handleError(error);
|
|
2041
|
-
return this.unwrap(data?.data);
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
};
|
|
2045
|
-
}
|
|
2046
|
-
};
|
|
2047
|
-
|
|
2048
|
-
// src/_internal/types.gen.ts
|
|
2049
|
-
var eq = {
|
|
2050
|
-
KEYWORD: "keyword",
|
|
2051
|
-
SEMANTIC: "semantic"
|
|
2052
|
-
};
|
|
2053
|
-
var greater_than = {
|
|
2054
|
-
KEYWORD: "keyword",
|
|
2055
|
-
SEMANTIC: "semantic"
|
|
2056
|
-
};
|
|
2057
|
-
var greater_than_or_equal = {
|
|
2058
|
-
KEYWORD: "keyword",
|
|
2059
|
-
SEMANTIC: "semantic"
|
|
2060
|
-
};
|
|
2061
|
-
var less_than = {
|
|
2062
|
-
KEYWORD: "keyword",
|
|
2063
|
-
SEMANTIC: "semantic"
|
|
2064
|
-
};
|
|
2065
|
-
var less_than_or_equal = {
|
|
2066
|
-
KEYWORD: "keyword",
|
|
2067
|
-
SEMANTIC: "semantic"
|
|
2068
|
-
};
|
|
2069
|
-
var not_eq = {
|
|
2070
|
-
KEYWORD: "keyword",
|
|
2071
|
-
SEMANTIC: "semantic"
|
|
2072
|
-
};
|
|
2073
|
-
var eq2 = {
|
|
2074
|
-
PENDING: "pending",
|
|
2075
|
-
PROCESSING: "processing",
|
|
2076
|
-
COMPLETED: "completed",
|
|
2077
|
-
FAILED: "failed"
|
|
2078
|
-
};
|
|
2079
|
-
var greater_than2 = {
|
|
2080
|
-
PENDING: "pending",
|
|
2081
|
-
PROCESSING: "processing",
|
|
2082
|
-
COMPLETED: "completed",
|
|
2083
|
-
FAILED: "failed"
|
|
2084
|
-
};
|
|
2085
|
-
var greater_than_or_equal2 = {
|
|
2086
|
-
PENDING: "pending",
|
|
2087
|
-
PROCESSING: "processing",
|
|
2088
|
-
COMPLETED: "completed",
|
|
2089
|
-
FAILED: "failed"
|
|
2090
|
-
};
|
|
2091
|
-
var less_than2 = {
|
|
2092
|
-
PENDING: "pending",
|
|
2093
|
-
PROCESSING: "processing",
|
|
2094
|
-
COMPLETED: "completed",
|
|
2095
|
-
FAILED: "failed"
|
|
2096
|
-
};
|
|
2097
|
-
var less_than_or_equal2 = {
|
|
2098
|
-
PENDING: "pending",
|
|
2099
|
-
PROCESSING: "processing",
|
|
2100
|
-
COMPLETED: "completed",
|
|
2101
|
-
FAILED: "failed"
|
|
2102
|
-
};
|
|
2103
|
-
var not_eq2 = {
|
|
2104
|
-
PENDING: "pending",
|
|
2105
|
-
PROCESSING: "processing",
|
|
2106
|
-
COMPLETED: "completed",
|
|
2107
|
-
FAILED: "failed"
|
|
2108
|
-
};
|
|
2109
|
-
var status = {
|
|
2110
|
-
PENDING: "pending",
|
|
2111
|
-
PROCESSING: "processing",
|
|
2112
|
-
COMPLETED: "completed",
|
|
2113
|
-
FAILED: "failed"
|
|
2114
|
-
};
|
|
2115
|
-
var eq3 = {
|
|
2116
|
-
ACTIVE: "active",
|
|
2117
|
-
REVOKED: "revoked",
|
|
2118
|
-
EXPIRED: "expired"
|
|
2119
|
-
};
|
|
2120
|
-
var greater_than3 = {
|
|
2121
|
-
ACTIVE: "active",
|
|
2122
|
-
REVOKED: "revoked",
|
|
2123
|
-
EXPIRED: "expired"
|
|
2124
|
-
};
|
|
2125
|
-
var greater_than_or_equal3 = {
|
|
2126
|
-
ACTIVE: "active",
|
|
2127
|
-
REVOKED: "revoked",
|
|
2128
|
-
EXPIRED: "expired"
|
|
2129
|
-
};
|
|
2130
|
-
var less_than3 = {
|
|
2131
|
-
ACTIVE: "active",
|
|
2132
|
-
REVOKED: "revoked",
|
|
2133
|
-
EXPIRED: "expired"
|
|
2134
|
-
};
|
|
2135
|
-
var less_than_or_equal3 = {
|
|
2136
|
-
ACTIVE: "active",
|
|
2137
|
-
REVOKED: "revoked",
|
|
2138
|
-
EXPIRED: "expired"
|
|
2139
|
-
};
|
|
2140
|
-
var not_eq3 = {
|
|
2141
|
-
ACTIVE: "active",
|
|
2142
|
-
REVOKED: "revoked",
|
|
2143
|
-
EXPIRED: "expired"
|
|
2144
|
-
};
|
|
2145
|
-
var eq4 = {
|
|
2146
|
-
PENDING: "pending",
|
|
2147
|
-
SUCCESS: "success",
|
|
2148
|
-
FAILED: "failed",
|
|
2149
|
-
REFUNDED: "refunded",
|
|
2150
|
-
VOIDED: "voided"
|
|
2151
|
-
};
|
|
2152
|
-
var greater_than4 = {
|
|
2153
|
-
PENDING: "pending",
|
|
2154
|
-
SUCCESS: "success",
|
|
2155
|
-
FAILED: "failed",
|
|
2156
|
-
REFUNDED: "refunded",
|
|
2157
|
-
VOIDED: "voided"
|
|
2158
|
-
};
|
|
2159
|
-
var greater_than_or_equal4 = {
|
|
2160
|
-
PENDING: "pending",
|
|
2161
|
-
SUCCESS: "success",
|
|
2162
|
-
FAILED: "failed",
|
|
2163
|
-
REFUNDED: "refunded",
|
|
2164
|
-
VOIDED: "voided"
|
|
2165
|
-
};
|
|
2166
|
-
var less_than4 = {
|
|
2167
|
-
PENDING: "pending",
|
|
2168
|
-
SUCCESS: "success",
|
|
2169
|
-
FAILED: "failed",
|
|
2170
|
-
REFUNDED: "refunded",
|
|
2171
|
-
VOIDED: "voided"
|
|
2172
|
-
};
|
|
2173
|
-
var less_than_or_equal4 = {
|
|
2174
|
-
PENDING: "pending",
|
|
2175
|
-
SUCCESS: "success",
|
|
2176
|
-
FAILED: "failed",
|
|
2177
|
-
REFUNDED: "refunded",
|
|
2178
|
-
VOIDED: "voided"
|
|
2179
|
-
};
|
|
2180
|
-
var not_eq4 = {
|
|
2181
|
-
PENDING: "pending",
|
|
2182
|
-
SUCCESS: "success",
|
|
2183
|
-
FAILED: "failed",
|
|
2184
|
-
REFUNDED: "refunded",
|
|
2185
|
-
VOIDED: "voided"
|
|
2186
|
-
};
|
|
2187
|
-
var status2 = {
|
|
2188
|
-
ACTIVE: "active",
|
|
2189
|
-
REVOKED: "revoked",
|
|
2190
|
-
EXPIRED: "expired"
|
|
2191
|
-
};
|
|
2192
|
-
var format = {
|
|
2193
|
-
ENTITY: "entity",
|
|
2194
|
-
TABULAR: "tabular",
|
|
2195
|
-
GRAPH: "graph",
|
|
2196
|
-
COMPOSITE: "composite"
|
|
2197
|
-
};
|
|
2198
|
-
var eq5 = {
|
|
2199
|
-
OWNER: "owner",
|
|
2200
|
-
ADMIN: "admin",
|
|
2201
|
-
MEMBER: "member"
|
|
2202
|
-
};
|
|
2203
|
-
var greater_than5 = {
|
|
2204
|
-
OWNER: "owner",
|
|
2205
|
-
ADMIN: "admin",
|
|
2206
|
-
MEMBER: "member"
|
|
2207
|
-
};
|
|
2208
|
-
var greater_than_or_equal5 = {
|
|
2209
|
-
OWNER: "owner",
|
|
2210
|
-
ADMIN: "admin",
|
|
2211
|
-
MEMBER: "member"
|
|
2212
|
-
};
|
|
2213
|
-
var less_than5 = {
|
|
2214
|
-
OWNER: "owner",
|
|
2215
|
-
ADMIN: "admin",
|
|
2216
|
-
MEMBER: "member"
|
|
2217
|
-
};
|
|
2218
|
-
var less_than_or_equal5 = {
|
|
2219
|
-
OWNER: "owner",
|
|
2220
|
-
ADMIN: "admin",
|
|
2221
|
-
MEMBER: "member"
|
|
2222
|
-
};
|
|
2223
|
-
var not_eq5 = {
|
|
2224
|
-
OWNER: "owner",
|
|
2225
|
-
ADMIN: "admin",
|
|
2226
|
-
MEMBER: "member"
|
|
2227
|
-
};
|
|
2228
|
-
var eq6 = {
|
|
2229
|
-
PLAN: "plan",
|
|
2230
|
-
ADDON: "addon"
|
|
2231
|
-
};
|
|
2232
|
-
var greater_than6 = {
|
|
2233
|
-
PLAN: "plan",
|
|
2234
|
-
ADDON: "addon"
|
|
2235
|
-
};
|
|
2236
|
-
var greater_than_or_equal6 = {
|
|
2237
|
-
PLAN: "plan",
|
|
2238
|
-
ADDON: "addon"
|
|
2239
|
-
};
|
|
2240
|
-
var less_than6 = {
|
|
2241
|
-
PLAN: "plan",
|
|
2242
|
-
ADDON: "addon"
|
|
2243
|
-
};
|
|
2244
|
-
var less_than_or_equal6 = {
|
|
2245
|
-
PLAN: "plan",
|
|
2246
|
-
ADDON: "addon"
|
|
2247
|
-
};
|
|
2248
|
-
var not_eq6 = {
|
|
2249
|
-
PLAN: "plan",
|
|
2250
|
-
ADDON: "addon"
|
|
2251
|
-
};
|
|
2252
|
-
var role = {
|
|
2253
|
-
OWNER: "owner",
|
|
2254
|
-
ADMIN: "admin",
|
|
2255
|
-
MEMBER: "member"
|
|
2256
|
-
};
|
|
2257
|
-
var eq7 = {
|
|
2258
|
-
PUBLIC: "public",
|
|
2259
|
-
PRIVATE: "private"
|
|
2260
|
-
};
|
|
2261
|
-
var greater_than7 = {
|
|
2262
|
-
PUBLIC: "public",
|
|
2263
|
-
PRIVATE: "private"
|
|
2264
|
-
};
|
|
2265
|
-
var greater_than_or_equal7 = {
|
|
2266
|
-
PUBLIC: "public",
|
|
2267
|
-
PRIVATE: "private"
|
|
2268
|
-
};
|
|
2269
|
-
var less_than7 = {
|
|
2270
|
-
PUBLIC: "public",
|
|
2271
|
-
PRIVATE: "private"
|
|
2272
|
-
};
|
|
2273
|
-
var less_than_or_equal7 = {
|
|
2274
|
-
PUBLIC: "public",
|
|
2275
|
-
PRIVATE: "private"
|
|
2276
|
-
};
|
|
2277
|
-
var not_eq7 = {
|
|
2278
|
-
PUBLIC: "public",
|
|
2279
|
-
PRIVATE: "private"
|
|
2280
|
-
};
|
|
2281
|
-
var eq8 = {
|
|
2282
|
-
SALE: "sale",
|
|
2283
|
-
AUTH: "auth",
|
|
2284
|
-
REFUND: "refund",
|
|
2285
|
-
VOID: "void"
|
|
2286
|
-
};
|
|
2287
|
-
var greater_than8 = {
|
|
2288
|
-
SALE: "sale",
|
|
2289
|
-
AUTH: "auth",
|
|
2290
|
-
REFUND: "refund",
|
|
2291
|
-
VOID: "void"
|
|
2292
|
-
};
|
|
2293
|
-
var greater_than_or_equal8 = {
|
|
2294
|
-
SALE: "sale",
|
|
2295
|
-
AUTH: "auth",
|
|
2296
|
-
REFUND: "refund",
|
|
2297
|
-
VOID: "void"
|
|
2298
|
-
};
|
|
2299
|
-
var less_than8 = {
|
|
2300
|
-
SALE: "sale",
|
|
2301
|
-
AUTH: "auth",
|
|
2302
|
-
REFUND: "refund",
|
|
2303
|
-
VOID: "void"
|
|
2304
|
-
};
|
|
2305
|
-
var less_than_or_equal8 = {
|
|
2306
|
-
SALE: "sale",
|
|
2307
|
-
AUTH: "auth",
|
|
2308
|
-
REFUND: "refund",
|
|
2309
|
-
VOID: "void"
|
|
2310
|
-
};
|
|
2311
|
-
var not_eq8 = {
|
|
2312
|
-
SALE: "sale",
|
|
2313
|
-
AUTH: "auth",
|
|
2314
|
-
REFUND: "refund",
|
|
2315
|
-
VOID: "void"
|
|
2316
|
-
};
|
|
2317
|
-
var type = {
|
|
2318
|
-
PUBLIC: "public",
|
|
2319
|
-
PRIVATE: "private"
|
|
2320
|
-
};
|
|
2321
|
-
|
|
2322
2588
|
// src/utils/retry.ts
|
|
2323
2589
|
var DEFAULT_RETRY_CONFIG = {
|
|
2324
2590
|
maxRetries: 3,
|
|
@@ -2375,6 +2641,35 @@ function withRetry(fn, config) {
|
|
|
2375
2641
|
};
|
|
2376
2642
|
}
|
|
2377
2643
|
|
|
2644
|
+
// src/pagination.ts
|
|
2645
|
+
async function* paginateAll(fetcher, options = {}) {
|
|
2646
|
+
const pageSize = options.pageSize || 20;
|
|
2647
|
+
const limit = options.limit;
|
|
2648
|
+
let page = 1;
|
|
2649
|
+
let totalYielded = 0;
|
|
2650
|
+
while (true) {
|
|
2651
|
+
const response = await fetcher(page, pageSize);
|
|
2652
|
+
for (const item of response.data) {
|
|
2653
|
+
yield item;
|
|
2654
|
+
totalYielded++;
|
|
2655
|
+
if (limit && totalYielded >= limit) {
|
|
2656
|
+
return;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
if (!response.links?.next || response.data.length === 0) {
|
|
2660
|
+
break;
|
|
2661
|
+
}
|
|
2662
|
+
page++;
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
async function paginateToArray(fetcher, options = {}) {
|
|
2666
|
+
const results = [];
|
|
2667
|
+
for await (const item of paginateAll(fetcher, options)) {
|
|
2668
|
+
results.push(item);
|
|
2669
|
+
}
|
|
2670
|
+
return results;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2378
2673
|
// src/streaming.ts
|
|
2379
2674
|
async function* streamSSE(response, options = {}) {
|
|
2380
2675
|
if (!response.body) {
|
|
@@ -2451,7 +2746,6 @@ async function collectStreamedMessage(stream) {
|
|
|
2451
2746
|
DEFAULT_RETRY_CONFIG,
|
|
2452
2747
|
DocumentUploadBase64Schema,
|
|
2453
2748
|
EmbedRequestSchema,
|
|
2454
|
-
GptClient,
|
|
2455
2749
|
GptCoreError,
|
|
2456
2750
|
InvitationCreateSchema,
|
|
2457
2751
|
LoginRequestSchema,
|
|
@@ -2469,67 +2763,207 @@ async function collectStreamedMessage(stream) {
|
|
|
2469
2763
|
ValidationError,
|
|
2470
2764
|
WorkspaceCreateSchema,
|
|
2471
2765
|
calculateBackoff,
|
|
2766
|
+
client,
|
|
2472
2767
|
collectStreamedMessage,
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2768
|
+
deleteAgentsById,
|
|
2769
|
+
deleteAiGraphEdgesById,
|
|
2770
|
+
deleteAiGraphNodesById,
|
|
2771
|
+
deleteApiKeysById,
|
|
2772
|
+
deleteApplicationsById,
|
|
2773
|
+
deleteBucketsById,
|
|
2774
|
+
deleteDocumentsById,
|
|
2775
|
+
deleteExtractionResultsById,
|
|
2776
|
+
deleteMessagesById,
|
|
2777
|
+
deleteNotificationPreferencesById,
|
|
2778
|
+
deleteObjectsById,
|
|
2779
|
+
deleteSearchSavedById,
|
|
2780
|
+
deleteTenantMembershipsByTenantIdByUserId,
|
|
2781
|
+
deleteTenantsById,
|
|
2782
|
+
deleteThreadsById,
|
|
2783
|
+
deleteTrainingExamplesById,
|
|
2784
|
+
deleteUserProfilesById,
|
|
2785
|
+
deleteWebhookConfigsById,
|
|
2786
|
+
deleteWorkspaceMembershipsByWorkspaceIdByUserId,
|
|
2787
|
+
deleteWorkspacesById,
|
|
2788
|
+
getAgents,
|
|
2789
|
+
getAgentsById,
|
|
2790
|
+
getAiChunksDocumentByDocumentId,
|
|
2791
|
+
getAiGraphEdges,
|
|
2792
|
+
getAiGraphNodes,
|
|
2793
|
+
getApiKeys,
|
|
2794
|
+
getApiKeysById,
|
|
2795
|
+
getApplications,
|
|
2796
|
+
getApplicationsById,
|
|
2797
|
+
getApplicationsBySlugBySlug,
|
|
2798
|
+
getAuditLogs,
|
|
2799
|
+
getBuckets,
|
|
2800
|
+
getBucketsById,
|
|
2801
|
+
getBucketsByIdObjects,
|
|
2802
|
+
getBucketsByIdStats,
|
|
2803
|
+
getConfigs,
|
|
2804
|
+
getCreditPackages,
|
|
2805
|
+
getCreditPackagesById,
|
|
2806
|
+
getCreditPackagesSlugBySlug,
|
|
2807
|
+
getDocuments,
|
|
2808
|
+
getDocumentsById,
|
|
2809
|
+
getDocumentsByIdExtractionResults,
|
|
2810
|
+
getDocumentsByIdRelationshipsChunks,
|
|
2811
|
+
getDocumentsProcessingQueue,
|
|
2812
|
+
getDocumentsSearch,
|
|
2813
|
+
getDocumentsStats,
|
|
2814
|
+
getExtractionResults,
|
|
2815
|
+
getExtractionResultsById,
|
|
2816
|
+
getInvitations,
|
|
2817
|
+
getInvitationsConsumeByToken,
|
|
2818
|
+
getLlmAnalytics,
|
|
2819
|
+
getLlmAnalyticsById,
|
|
2820
|
+
getLlmAnalyticsCosts,
|
|
2821
|
+
getLlmAnalyticsPlatform,
|
|
2822
|
+
getLlmAnalyticsSummary,
|
|
2823
|
+
getLlmAnalyticsUsage,
|
|
2824
|
+
getLlmAnalyticsWorkspace,
|
|
2825
|
+
getMessages,
|
|
2826
|
+
getMessagesById,
|
|
2827
|
+
getMessagesSearch,
|
|
2828
|
+
getNotificationLogs,
|
|
2829
|
+
getNotificationLogsById,
|
|
2830
|
+
getNotificationPreferences,
|
|
2831
|
+
getNotificationPreferencesById,
|
|
2832
|
+
getObjects,
|
|
2833
|
+
getObjectsById,
|
|
2834
|
+
getPlans,
|
|
2835
|
+
getPlansById,
|
|
2836
|
+
getPlansSlugBySlug,
|
|
2837
|
+
getSearch,
|
|
2838
|
+
getSearchHealth,
|
|
2839
|
+
getSearchIndexes,
|
|
2840
|
+
getSearchSaved,
|
|
2841
|
+
getSearchSemantic,
|
|
2842
|
+
getSearchStats,
|
|
2843
|
+
getSearchStatus,
|
|
2844
|
+
getStorageStats,
|
|
2845
|
+
getTenantMemberships,
|
|
2846
|
+
getTenants,
|
|
2847
|
+
getTenantsById,
|
|
2848
|
+
getThreads,
|
|
2849
|
+
getThreadsById,
|
|
2850
|
+
getThreadsSearch,
|
|
2851
|
+
getTrainingExamples,
|
|
2852
|
+
getTrainingExamplesById,
|
|
2853
|
+
getTransactions,
|
|
2854
|
+
getTransactionsById,
|
|
2855
|
+
getUserProfiles,
|
|
2856
|
+
getUserProfilesById,
|
|
2857
|
+
getUserProfilesMe,
|
|
2858
|
+
getUsers,
|
|
2859
|
+
getUsersById,
|
|
2860
|
+
getUsersMe,
|
|
2861
|
+
getWallet,
|
|
2862
|
+
getWebhookConfigs,
|
|
2863
|
+
getWebhookConfigsById,
|
|
2864
|
+
getWebhookDeliveries,
|
|
2865
|
+
getWebhookDeliveriesById,
|
|
2866
|
+
getWorkspaceMemberships,
|
|
2867
|
+
getWorkspaces,
|
|
2868
|
+
getWorkspacesById,
|
|
2869
|
+
getWorkspacesMine,
|
|
2498
2870
|
handleApiError,
|
|
2499
2871
|
isRetryableError,
|
|
2500
|
-
less_than,
|
|
2501
|
-
less_than2,
|
|
2502
|
-
less_than3,
|
|
2503
|
-
less_than4,
|
|
2504
|
-
less_than5,
|
|
2505
|
-
less_than6,
|
|
2506
|
-
less_than7,
|
|
2507
|
-
less_than8,
|
|
2508
|
-
less_than_or_equal,
|
|
2509
|
-
less_than_or_equal2,
|
|
2510
|
-
less_than_or_equal3,
|
|
2511
|
-
less_than_or_equal4,
|
|
2512
|
-
less_than_or_equal5,
|
|
2513
|
-
less_than_or_equal6,
|
|
2514
|
-
less_than_or_equal7,
|
|
2515
|
-
less_than_or_equal8,
|
|
2516
|
-
not_eq,
|
|
2517
|
-
not_eq2,
|
|
2518
|
-
not_eq3,
|
|
2519
|
-
not_eq4,
|
|
2520
|
-
not_eq5,
|
|
2521
|
-
not_eq6,
|
|
2522
|
-
not_eq7,
|
|
2523
|
-
not_eq8,
|
|
2524
2872
|
paginateAll,
|
|
2525
2873
|
paginateToArray,
|
|
2874
|
+
patchAgentsById,
|
|
2875
|
+
patchApiKeysById,
|
|
2876
|
+
patchApiKeysByIdAllocate,
|
|
2877
|
+
patchApiKeysByIdRevoke,
|
|
2878
|
+
patchApiKeysByIdRotate,
|
|
2879
|
+
patchApplicationsById,
|
|
2880
|
+
patchBucketsById,
|
|
2881
|
+
patchConfigsByKey,
|
|
2882
|
+
patchDocumentsById,
|
|
2883
|
+
patchExtractionResultsById,
|
|
2884
|
+
patchInvitationsByIdAccept,
|
|
2885
|
+
patchInvitationsByIdResend,
|
|
2886
|
+
patchInvitationsByIdRevoke,
|
|
2887
|
+
patchMessagesById,
|
|
2888
|
+
patchNotificationPreferencesById,
|
|
2889
|
+
patchTenantMembershipsByTenantIdByUserId,
|
|
2890
|
+
patchTenantsById,
|
|
2891
|
+
patchThreadsById,
|
|
2892
|
+
patchTrainingExamplesById,
|
|
2893
|
+
patchUserProfilesById,
|
|
2894
|
+
patchUsersAuthResetPassword,
|
|
2895
|
+
patchUsersById,
|
|
2896
|
+
patchUsersByIdConfirmEmail,
|
|
2897
|
+
patchUsersByIdResetPassword,
|
|
2898
|
+
patchWalletAddons,
|
|
2899
|
+
patchWalletAddonsByAddonSlugCancel,
|
|
2900
|
+
patchWalletPlan,
|
|
2901
|
+
patchWebhookConfigsById,
|
|
2902
|
+
patchWorkspaceMembershipsByWorkspaceIdByUserId,
|
|
2903
|
+
patchWorkspacesById,
|
|
2904
|
+
patchWorkspacesByIdAllocate,
|
|
2905
|
+
postAgents,
|
|
2906
|
+
postAgentsByIdClone,
|
|
2907
|
+
postAgentsByIdTest,
|
|
2908
|
+
postAgentsByIdValidate,
|
|
2909
|
+
postAiChunksSearch,
|
|
2910
|
+
postAiEmbed,
|
|
2911
|
+
postAiGraphEdges,
|
|
2912
|
+
postAiGraphNodes,
|
|
2913
|
+
postAiSearch,
|
|
2914
|
+
postAiSearchAdvanced,
|
|
2915
|
+
postApiKeys,
|
|
2916
|
+
postApplications,
|
|
2917
|
+
postBuckets,
|
|
2918
|
+
postConfigs,
|
|
2919
|
+
postDocuments,
|
|
2920
|
+
postDocumentsBulkDelete,
|
|
2921
|
+
postDocumentsBulkReprocess,
|
|
2922
|
+
postDocumentsByIdAnalyze,
|
|
2923
|
+
postDocumentsByIdReprocess,
|
|
2924
|
+
postDocumentsExport,
|
|
2925
|
+
postDocumentsImport,
|
|
2926
|
+
postDocumentsPresignedUpload,
|
|
2927
|
+
postInvitationsAcceptByToken,
|
|
2928
|
+
postInvitationsInvite,
|
|
2929
|
+
postLlmAnalytics,
|
|
2930
|
+
postMessages,
|
|
2931
|
+
postNotificationPreferences,
|
|
2932
|
+
postObjectsBulkDestroy,
|
|
2933
|
+
postObjectsRegister,
|
|
2934
|
+
postPayments,
|
|
2935
|
+
postSearchReindex,
|
|
2936
|
+
postSearchSaved,
|
|
2937
|
+
postStorageSignDownload,
|
|
2938
|
+
postStorageSignUpload,
|
|
2939
|
+
postTenantMemberships,
|
|
2940
|
+
postTenants,
|
|
2941
|
+
postTenantsByIdBuyStorage,
|
|
2942
|
+
postTenantsByIdRemoveStorage,
|
|
2943
|
+
postThreads,
|
|
2944
|
+
postThreadsActive,
|
|
2945
|
+
postThreadsByIdMessages,
|
|
2946
|
+
postThreadsByIdSummarize,
|
|
2947
|
+
postTokens,
|
|
2948
|
+
postTrainingExamples,
|
|
2949
|
+
postTrainingExamplesBulk,
|
|
2950
|
+
postTrainingExamplesBulkDelete,
|
|
2951
|
+
postUserProfiles,
|
|
2952
|
+
postUsersAuthConfirm,
|
|
2953
|
+
postUsersAuthLogin,
|
|
2954
|
+
postUsersAuthMagicLinkLogin,
|
|
2955
|
+
postUsersAuthMagicLinkRequest,
|
|
2956
|
+
postUsersAuthRegister,
|
|
2957
|
+
postUsersAuthRegisterWithOidc,
|
|
2958
|
+
postUsersRegisterIsv,
|
|
2959
|
+
postWebhookConfigs,
|
|
2960
|
+
postWebhookConfigsByIdTest,
|
|
2961
|
+
postWebhookDeliveriesByIdRetry,
|
|
2962
|
+
postWorkspaceMemberships,
|
|
2963
|
+
postWorkspaces,
|
|
2526
2964
|
retryWithBackoff,
|
|
2527
|
-
role,
|
|
2528
2965
|
sleep,
|
|
2529
|
-
status,
|
|
2530
|
-
status2,
|
|
2531
2966
|
streamMessage,
|
|
2532
2967
|
streamSSE,
|
|
2533
|
-
type,
|
|
2534
2968
|
withRetry
|
|
2535
2969
|
});
|