@realtimex/sdk 1.7.28 → 2.0.2
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/chunk-DZUAP6FW.mjs +598 -0
- package/dist/errors-DwEt8WYf.d.mts +399 -0
- package/dist/errors-DwEt8WYf.d.ts +399 -0
- package/dist/index.d.mts +8 -2048
- package/dist/index.d.ts +8 -2048
- package/dist/index.js +308 -4537
- package/dist/index.mjs +7 -3783
- package/dist/v1/index.d.mts +3 -56
- package/dist/v1/index.d.ts +3 -56
- package/dist/v1/index.js +255 -681
- package/dist/v1/index.mjs +4 -42
- package/package.json +6 -7
- package/dist/chunk-Z5GAUBIM.mjs +0 -993
- package/dist/errors-NufsyIZ-.d.mts +0 -678
- package/dist/errors-NufsyIZ-.d.ts +0 -678
- package/skills/realtimex-moderator-sdk/SKILL.md +0 -102
- package/skills/realtimex-moderator-sdk/references/activities.md +0 -14
- package/skills/realtimex-moderator-sdk/references/agents.md +0 -13
- package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +0 -105
- package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/api.md +0 -17
- package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +0 -36
- package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/core.md +0 -40
- package/skills/realtimex-moderator-sdk/references/api-reference/database.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/index.md +0 -43
- package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +0 -176
- package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +0 -50
- package/skills/realtimex-moderator-sdk/references/api-reference/port.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/task.md +0 -62
- package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +0 -18
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +0 -48
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +0 -18
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +0 -78
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +0 -33
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +0 -12
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +0 -36
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +0 -26
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +0 -13
- package/skills/realtimex-moderator-sdk/references/api-reference.md +0 -1330
- package/skills/realtimex-moderator-sdk/references/app-concepts.md +0 -1276
- package/skills/realtimex-moderator-sdk/references/browser.md +0 -27
- package/skills/realtimex-moderator-sdk/references/channels.md +0 -189
- package/skills/realtimex-moderator-sdk/references/credentials.md +0 -111
- package/skills/realtimex-moderator-sdk/references/known-issues.md +0 -237
- package/skills/realtimex-moderator-sdk/references/llm.md +0 -13
- package/skills/realtimex-moderator-sdk/references/mcp.md +0 -13
- package/skills/realtimex-moderator-sdk/references/permissions.md +0 -30
- package/skills/realtimex-moderator-sdk/references/quickstart.md +0 -16
- package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +0 -34
- package/skills/realtimex-moderator-sdk/references/workspaces.md +0 -20
- package/skills/realtimex-moderator-sdk/scripts/lib/sdk-init.js +0 -171
- package/skills/realtimex-moderator-sdk/scripts/rtx.js +0 -1359
package/dist/v1/index.js
CHANGED
|
@@ -25,24 +25,13 @@ __export(v1_exports, {
|
|
|
25
25
|
DeveloperApiError: () => DeveloperApiError,
|
|
26
26
|
NotFoundError: () => NotFoundError,
|
|
27
27
|
ServerError: () => ServerError,
|
|
28
|
-
V1AdminModule: () => V1AdminModule,
|
|
29
28
|
V1ApiNamespace: () => V1ApiNamespace,
|
|
30
|
-
|
|
31
|
-
V1ChannelsModule: () => V1ChannelsModule,
|
|
32
|
-
V1DesktopBrowserModule: () => V1DesktopBrowserModule,
|
|
33
|
-
V1DesktopRuntimeSessionsModule: () => V1DesktopRuntimeSessionsModule,
|
|
34
|
-
V1DocumentModule: () => V1DocumentModule,
|
|
35
|
-
V1EmbedModule: () => V1EmbedModule,
|
|
36
|
-
V1OpenAIModule: () => V1OpenAIModule,
|
|
37
|
-
V1SystemModule: () => V1SystemModule,
|
|
29
|
+
V1ChatModule: () => V1ChatModule,
|
|
38
30
|
V1ThreadModule: () => V1ThreadModule,
|
|
39
|
-
V1UsersModule: () => V1UsersModule,
|
|
40
31
|
V1WorkspaceModule: () => V1WorkspaceModule,
|
|
41
32
|
ValidationError: () => ValidationError,
|
|
42
33
|
streamThreadChat: () => streamThreadChat,
|
|
43
|
-
streamWorkspaceChat: () => streamWorkspaceChat
|
|
44
|
-
uploadFile: () => uploadFile,
|
|
45
|
-
uploadFileToFolder: () => uploadFileToFolder
|
|
34
|
+
streamWorkspaceChat: () => streamWorkspaceChat
|
|
46
35
|
});
|
|
47
36
|
module.exports = __toCommonJS(v1_exports);
|
|
48
37
|
|
|
@@ -161,840 +150,463 @@ var DeveloperApiClient = class {
|
|
|
161
150
|
}
|
|
162
151
|
};
|
|
163
152
|
|
|
164
|
-
// src/v1/modules/
|
|
165
|
-
var
|
|
153
|
+
// src/v1/modules/v1Chat.ts
|
|
154
|
+
var V1ChatModule = class {
|
|
166
155
|
constructor(client) {
|
|
167
156
|
this.client = client;
|
|
168
157
|
}
|
|
169
158
|
/**
|
|
170
|
-
*
|
|
171
|
-
* @see
|
|
172
|
-
*/
|
|
173
|
-
async getAuth() {
|
|
174
|
-
return this.client.request("GET", `/v1/auth`);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
|
|
178
|
-
* @see POST /v1/auth/external-callback
|
|
179
|
-
*/
|
|
180
|
-
async externalCallback() {
|
|
181
|
-
return this.client.request("POST", `/v1/auth/external-callback`);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Poll for a relayed external browser auth callback by OAuth state. Localhost only.
|
|
185
|
-
* @see GET /v1/auth/external-callback/{state}
|
|
186
|
-
*/
|
|
187
|
-
async getExternalCallback(state) {
|
|
188
|
-
return this.client.request("GET", `/v1/auth/external-callback/${state}`);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// src/v1/modules/v1Admin.ts
|
|
193
|
-
var V1AdminModule = class {
|
|
194
|
-
constructor(client) {
|
|
195
|
-
this.client = client;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
|
|
199
|
-
* @see GET /v1/admin/is-multi-user-mode
|
|
200
|
-
*/
|
|
201
|
-
async getIsMultiUserMode() {
|
|
202
|
-
return this.client.request("GET", `/v1/admin/is-multi-user-mode`);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
|
|
206
|
-
* @see GET /v1/admin/users
|
|
207
|
-
*/
|
|
208
|
-
async listUsers() {
|
|
209
|
-
return this.client.request("GET", `/v1/admin/users`);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Create a new user with username and password. Methods are disabled until multi user mode is enabled via the UI.
|
|
213
|
-
* @see POST /v1/admin/users/new
|
|
214
|
-
*/
|
|
215
|
-
async createUser(body) {
|
|
216
|
-
return this.client.request("POST", `/v1/admin/users/new`, body);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Update existing user settings. Methods are disabled until multi user mode is enabled via the UI.
|
|
220
|
-
* @see POST /v1/admin/users/{id}
|
|
221
|
-
*/
|
|
222
|
-
async updateUser(id, body) {
|
|
223
|
-
return this.client.request("POST", `/v1/admin/users/${id}`, body);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Delete existing user by id. Methods are disabled until multi user mode is enabled via the UI.
|
|
227
|
-
* @see DELETE /v1/admin/users/{id}
|
|
228
|
-
*/
|
|
229
|
-
async deleteUser(id) {
|
|
230
|
-
return this.client.request("DELETE", `/v1/admin/users/${id}`);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* List all existing invitations to instance regardless of status. Methods are disabled until multi user mode is enabled via the UI.
|
|
234
|
-
* @see GET /v1/admin/invites
|
|
235
|
-
*/
|
|
236
|
-
async listInvites() {
|
|
237
|
-
return this.client.request("GET", `/v1/admin/invites`);
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Create a new invite code for someone to use to register with instance. Methods are disabled until multi user mode is enabled via the UI.
|
|
241
|
-
* @see POST /v1/admin/invite/new
|
|
242
|
-
*/
|
|
243
|
-
async createInvite(body) {
|
|
244
|
-
return this.client.request("POST", `/v1/admin/invite/new`, body);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Deactivates (soft-delete) invite by id. Methods are disabled until multi user mode is enabled via the UI.
|
|
248
|
-
* @see DELETE /v1/admin/invite/{id}
|
|
249
|
-
*/
|
|
250
|
-
async deleteInvite(id) {
|
|
251
|
-
return this.client.request("DELETE", `/v1/admin/invite/${id}`);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Retrieve a list of users with permissions to access the specified workspace.
|
|
255
|
-
* @see GET /v1/admin/workspaces/{workspaceId}/users
|
|
256
|
-
*/
|
|
257
|
-
async listWorkspaceUsers(workspaceId) {
|
|
258
|
-
return this.client.request("GET", `/v1/admin/workspaces/${workspaceId}/users`);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Overwrite workspace permissions to only be accessible by the given user ids and admins. Methods are disabled until multi user mode is enabled via the UI.
|
|
262
|
-
* @see POST /v1/admin/workspaces/{workspaceId}/update-users
|
|
263
|
-
*/
|
|
264
|
-
async updateUsers(workspaceId, body) {
|
|
265
|
-
return this.client.request("POST", `/v1/admin/workspaces/${workspaceId}/update-users`, body);
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Set workspace permissions to be accessible by the given user ids and admins. Methods are disabled until multi user mode is enabled via the UI.
|
|
269
|
-
* @see POST /v1/admin/workspaces/{workspaceSlug}/manage-users
|
|
270
|
-
*/
|
|
271
|
-
async workspacesManageUsers(workspaceSlug, body) {
|
|
272
|
-
return this.client.request("POST", `/v1/admin/workspaces/${workspaceSlug}/manage-users`, body);
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* All chats in the system ordered by most recent. Methods are disabled until multi user mode is enabled via the UI.
|
|
276
|
-
* @see POST /v1/admin/workspace-chats
|
|
159
|
+
* Stream a chat response for a workspace default thread.
|
|
160
|
+
* @see POST /v1/workspace/{slug}/stream-chat
|
|
277
161
|
*/
|
|
278
|
-
|
|
279
|
-
|
|
162
|
+
// @streaming-stub — implement SSE parsing in overrides/v1ChatStreaming.ts
|
|
163
|
+
async streamWorkspaceChat(slug, body) {
|
|
164
|
+
return this.client.requestRaw("POST", `/v1/workspace/${slug}/stream-chat`, body);
|
|
280
165
|
}
|
|
281
166
|
/**
|
|
282
|
-
*
|
|
283
|
-
* @see POST /v1/
|
|
167
|
+
* Stream a chat response for a workspace thread.
|
|
168
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/stream-chat
|
|
284
169
|
*/
|
|
285
|
-
|
|
286
|
-
|
|
170
|
+
// @streaming-stub — implement SSE parsing in overrides/v1ChatStreaming.ts
|
|
171
|
+
async streamThreadChat(slug, threadSlug, body) {
|
|
172
|
+
return this.client.requestRaw("POST", `/v1/workspace/${slug}/thread/${threadSlug}/stream-chat`, body);
|
|
287
173
|
}
|
|
288
174
|
};
|
|
289
175
|
|
|
290
|
-
// src/v1/modules/
|
|
291
|
-
var
|
|
176
|
+
// src/v1/modules/v1Workspace.ts
|
|
177
|
+
var V1WorkspaceModule = class {
|
|
292
178
|
constructor(client) {
|
|
293
179
|
this.client = client;
|
|
294
180
|
}
|
|
295
181
|
/**
|
|
296
|
-
*
|
|
297
|
-
* @see
|
|
298
|
-
*/
|
|
299
|
-
// @upload-stub — multipart upload; wire form manually or use helper
|
|
300
|
-
async upload(form) {
|
|
301
|
-
return this.client.requestMultipart("POST", `/v1/document/upload`, form);
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Upload a new file to a specific folder in RealTimeX to be parsed and prepared for embedding. If the folder does not exist, it will be created.
|
|
305
|
-
* @see POST /v1/document/upload/{folderName}
|
|
306
|
-
*/
|
|
307
|
-
// @upload-stub — multipart upload; wire form manually or use helper
|
|
308
|
-
async uploadFolder(folderName, form) {
|
|
309
|
-
return this.client.requestMultipart("POST", `/v1/document/upload/${folderName}`, form);
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Upload a valid URL for RealTimeX to scrape and prepare for embedding. Optionally, specify a comma-separated list of workspace slugs to embed the document into post-upload.
|
|
313
|
-
* @see POST /v1/document/upload-link
|
|
314
|
-
*/
|
|
315
|
-
async uploadLink(body) {
|
|
316
|
-
return this.client.request("POST", `/v1/document/upload-link`, body);
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Upload a file by specifying its raw text content and metadata values without having to upload a file.
|
|
320
|
-
* @see POST /v1/document/raw-text
|
|
321
|
-
*/
|
|
322
|
-
async rawText(body) {
|
|
323
|
-
return this.client.request("POST", `/v1/document/raw-text`, body);
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* List of all locally-stored documents in instance
|
|
327
|
-
* @see GET /v1/documents
|
|
328
|
-
*/
|
|
329
|
-
async listDocuments() {
|
|
330
|
-
return this.client.request("GET", `/v1/documents`);
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Get all documents stored in a specific folder.
|
|
334
|
-
* @see GET /v1/documents/folder/{folderName}
|
|
335
|
-
*/
|
|
336
|
-
async getFolder(folderName) {
|
|
337
|
-
return this.client.request("GET", `/v1/documents/folder/${folderName}`);
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Check available filetypes and MIMEs that can be uploaded.
|
|
341
|
-
* @see GET /v1/document/accepted-file-types
|
|
342
|
-
*/
|
|
343
|
-
async listAcceptedFileTypes() {
|
|
344
|
-
return this.client.request("GET", `/v1/document/accepted-file-types`);
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Get the known available metadata schema for when doing a raw-text upload and the acceptable type of value for each key.
|
|
348
|
-
* @see GET /v1/document/metadata-schema
|
|
349
|
-
*/
|
|
350
|
-
async getMetadataSchema() {
|
|
351
|
-
return this.client.request("GET", `/v1/document/metadata-schema`);
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Get a single document by its unique RealTimeX document name
|
|
355
|
-
* @see GET /v1/document/{docName}
|
|
356
|
-
*/
|
|
357
|
-
async getDocument(docName) {
|
|
358
|
-
return this.client.request("GET", `/v1/document/${docName}`);
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Create a new folder inside the documents storage directory.
|
|
362
|
-
* @see POST /v1/document/create-folder
|
|
363
|
-
*/
|
|
364
|
-
async createFolder(body) {
|
|
365
|
-
return this.client.request("POST", `/v1/document/create-folder`, body);
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Remove a folder and all its contents from the documents storage directory.
|
|
369
|
-
* @see DELETE /v1/document/remove-folder
|
|
370
|
-
*/
|
|
371
|
-
async deleteRemoveFolder() {
|
|
372
|
-
return this.client.request("DELETE", `/v1/document/remove-folder`);
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Move files within the documents storage directory.
|
|
376
|
-
* @see POST /v1/document/move-files
|
|
182
|
+
* List workspaces using the app workspace list behavior.
|
|
183
|
+
* @see GET /v1/workspaces
|
|
377
184
|
*/
|
|
378
|
-
async
|
|
379
|
-
return this.client.request("
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
// src/v1/modules/v1Workspace.ts
|
|
384
|
-
var V1WorkspaceModule = class {
|
|
385
|
-
constructor(client) {
|
|
386
|
-
this.client = client;
|
|
185
|
+
async listWorkspaces() {
|
|
186
|
+
return this.client.request("GET", `/v1/workspaces`);
|
|
387
187
|
}
|
|
388
188
|
/**
|
|
389
|
-
* Create a
|
|
189
|
+
* Create a workspace using the app workspace creation behavior.
|
|
390
190
|
* @see POST /v1/workspace/new
|
|
391
191
|
*/
|
|
392
192
|
async createWorkspace(body) {
|
|
393
193
|
return this.client.request("POST", `/v1/workspace/new`, body);
|
|
394
194
|
}
|
|
395
195
|
/**
|
|
396
|
-
*
|
|
397
|
-
* @see
|
|
196
|
+
* Search workspaces and threads.
|
|
197
|
+
* @see POST /v1/workspace/search
|
|
398
198
|
*/
|
|
399
|
-
async
|
|
400
|
-
return this.client.request("
|
|
199
|
+
async searchWorkspaces(body) {
|
|
200
|
+
return this.client.request("POST", `/v1/workspace/search`, body);
|
|
401
201
|
}
|
|
402
202
|
/**
|
|
403
|
-
* Get a workspace by
|
|
203
|
+
* Get a workspace by slug.
|
|
404
204
|
* @see GET /v1/workspace/{slug}
|
|
405
205
|
*/
|
|
406
206
|
async getWorkspace(slug) {
|
|
407
207
|
return this.client.request("GET", `/v1/workspace/${slug}`);
|
|
408
208
|
}
|
|
409
209
|
/**
|
|
410
|
-
*
|
|
210
|
+
* Delete a workspace.
|
|
411
211
|
* @see DELETE /v1/workspace/{slug}
|
|
412
212
|
*/
|
|
413
213
|
async deleteWorkspace(slug) {
|
|
414
214
|
return this.client.request("DELETE", `/v1/workspace/${slug}`);
|
|
415
215
|
}
|
|
416
216
|
/**
|
|
417
|
-
*
|
|
418
|
-
* @see
|
|
217
|
+
* Get document content for a workspace document.
|
|
218
|
+
* @see GET /v1/workspace/{slug}/document/{docPath}
|
|
419
219
|
*/
|
|
420
|
-
async
|
|
421
|
-
return this.client.request("
|
|
220
|
+
async getWorkspaceDocument(slug, docPath) {
|
|
221
|
+
return this.client.request("GET", `/v1/workspace/${slug}/document/${docPath}`);
|
|
422
222
|
}
|
|
423
223
|
/**
|
|
424
|
-
* Get
|
|
425
|
-
* @see GET /v1/workspace/{slug}/
|
|
224
|
+
* Get or create workspace config.
|
|
225
|
+
* @see GET /v1/workspace/{slug}/config
|
|
426
226
|
*/
|
|
427
|
-
async
|
|
428
|
-
return this.client.request("GET", `/v1/workspace/${slug}/
|
|
227
|
+
async getWorkspaceConfig(slug) {
|
|
228
|
+
return this.client.request("GET", `/v1/workspace/${slug}/config`);
|
|
429
229
|
}
|
|
430
230
|
/**
|
|
431
|
-
*
|
|
432
|
-
* @see POST /v1/workspace/{slug}/
|
|
231
|
+
* Update workspace config.
|
|
232
|
+
* @see POST /v1/workspace/{slug}/config
|
|
433
233
|
*/
|
|
434
|
-
async
|
|
435
|
-
return this.client.request("POST", `/v1/workspace/${slug}/
|
|
234
|
+
async updateWorkspaceConfig(slug, body) {
|
|
235
|
+
return this.client.request("POST", `/v1/workspace/${slug}/config`, body);
|
|
436
236
|
}
|
|
437
237
|
/**
|
|
438
|
-
*
|
|
439
|
-
* @see POST /v1/workspace/{slug}/update
|
|
238
|
+
* Update workspace settings by slug.
|
|
239
|
+
* @see POST /v1/workspace/{slug}/update
|
|
440
240
|
*/
|
|
441
|
-
async
|
|
442
|
-
return this.client.request("POST", `/v1/workspace/${slug}/update
|
|
241
|
+
async updateWorkspace(slug, body) {
|
|
242
|
+
return this.client.request("POST", `/v1/workspace/${slug}/update`, body);
|
|
443
243
|
}
|
|
444
244
|
/**
|
|
445
|
-
*
|
|
446
|
-
* @see POST /v1/workspace/{slug}/
|
|
245
|
+
* Generate a local LLM tuning suggestion.
|
|
246
|
+
* @see POST /v1/workspace/{slug}/local-llm-tuning-suggestion
|
|
447
247
|
*/
|
|
448
|
-
async
|
|
449
|
-
return this.client.request("POST", `/v1/workspace/${slug}/
|
|
248
|
+
async suggestWorkspaceLocalLlmTuning(slug, body) {
|
|
249
|
+
return this.client.request("POST", `/v1/workspace/${slug}/local-llm-tuning-suggestion`, body);
|
|
450
250
|
}
|
|
451
251
|
/**
|
|
452
|
-
*
|
|
453
|
-
* @see POST /v1/workspace/{slug}/
|
|
252
|
+
* Upload a document to workspace documents.
|
|
253
|
+
* @see POST /v1/workspace/{slug}/upload
|
|
454
254
|
*/
|
|
455
|
-
// @
|
|
456
|
-
async
|
|
457
|
-
return this.client.
|
|
255
|
+
// @upload-stub — multipart upload; wire form manually or use helper
|
|
256
|
+
async uploadWorkspaceDocument(slug, form) {
|
|
257
|
+
return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload`, form);
|
|
458
258
|
}
|
|
459
259
|
/**
|
|
460
|
-
*
|
|
461
|
-
* @see POST /v1/workspace/{slug}/
|
|
260
|
+
* Upload a link to workspace documents.
|
|
261
|
+
* @see POST /v1/workspace/{slug}/upload-link
|
|
462
262
|
*/
|
|
463
|
-
async
|
|
464
|
-
return this.client.request("POST", `/v1/workspace/${slug}/
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
// src/v1/modules/v1System.ts
|
|
469
|
-
var V1SystemModule = class {
|
|
470
|
-
constructor(client) {
|
|
471
|
-
this.client = client;
|
|
263
|
+
async uploadWorkspaceLink(slug, body) {
|
|
264
|
+
return this.client.request("POST", `/v1/workspace/${slug}/upload-link`, body);
|
|
472
265
|
}
|
|
473
266
|
/**
|
|
474
|
-
*
|
|
475
|
-
* @see
|
|
267
|
+
* Update workspace document embeddings.
|
|
268
|
+
* @see POST /v1/workspace/{slug}/update-embeddings
|
|
476
269
|
*/
|
|
477
|
-
async
|
|
478
|
-
return this.client.request("
|
|
270
|
+
async updateWorkspaceEmbeddings(slug, body) {
|
|
271
|
+
return this.client.request("POST", `/v1/workspace/${slug}/update-embeddings`, body);
|
|
479
272
|
}
|
|
480
273
|
/**
|
|
481
|
-
*
|
|
482
|
-
* @see
|
|
274
|
+
* Reset workspace vector database records.
|
|
275
|
+
* @see DELETE /v1/workspace/{slug}/reset-vector-db
|
|
483
276
|
*/
|
|
484
|
-
async
|
|
485
|
-
return this.client.request("
|
|
277
|
+
async resetWorkspaceVectorDb(slug) {
|
|
278
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/reset-vector-db`);
|
|
486
279
|
}
|
|
487
280
|
/**
|
|
488
|
-
*
|
|
489
|
-
* @see GET /v1/
|
|
281
|
+
* Get workspace LLM provider metadata.
|
|
282
|
+
* @see GET /v1/workspace/{slug}/llm-provider
|
|
490
283
|
*/
|
|
491
|
-
async
|
|
492
|
-
return this.client.request("GET", `/v1/
|
|
284
|
+
async getWorkspaceLlmProvider(slug) {
|
|
285
|
+
return this.client.request("GET", `/v1/workspace/${slug}/llm-provider`);
|
|
493
286
|
}
|
|
494
287
|
/**
|
|
495
|
-
*
|
|
496
|
-
* @see
|
|
288
|
+
* Get workspace vision availability.
|
|
289
|
+
* @see GET /v1/workspace/{slug}/vision-availability
|
|
497
290
|
*/
|
|
498
|
-
async
|
|
499
|
-
return this.client.request("
|
|
291
|
+
async getWorkspaceVisionAvailability(slug) {
|
|
292
|
+
return this.client.request("GET", `/v1/workspace/${slug}/vision-availability`);
|
|
500
293
|
}
|
|
501
294
|
/**
|
|
502
|
-
*
|
|
503
|
-
* @see GET /v1/
|
|
295
|
+
* Get workspace chats.
|
|
296
|
+
* @see GET /v1/workspace/{slug}/chats
|
|
504
297
|
*/
|
|
505
|
-
async
|
|
506
|
-
return this.client.request("GET", `/v1/
|
|
298
|
+
async getWorkspaceChats(slug) {
|
|
299
|
+
return this.client.request("GET", `/v1/workspace/${slug}/chats`);
|
|
507
300
|
}
|
|
508
301
|
/**
|
|
509
|
-
*
|
|
510
|
-
* @see
|
|
302
|
+
* Get workspace terminal session details.
|
|
303
|
+
* @see GET /v1/workspace/{slug}/terminal-session-details
|
|
511
304
|
*/
|
|
512
|
-
async
|
|
513
|
-
return this.client.request("
|
|
305
|
+
async getWorkspaceTerminalSessionDetails(slug) {
|
|
306
|
+
return this.client.request("GET", `/v1/workspace/${slug}/terminal-session-details`);
|
|
514
307
|
}
|
|
515
308
|
/**
|
|
516
|
-
*
|
|
517
|
-
* @see
|
|
309
|
+
* Persist terminal UI events.
|
|
310
|
+
* @see POST /v1/workspace/{slug}/terminal-ui-events
|
|
518
311
|
*/
|
|
519
|
-
async
|
|
520
|
-
return this.client.request("
|
|
312
|
+
async persistWorkspaceTerminalUiEvents(slug, body) {
|
|
313
|
+
return this.client.request("POST", `/v1/workspace/${slug}/terminal-ui-events`, body);
|
|
521
314
|
}
|
|
522
315
|
/**
|
|
523
|
-
*
|
|
524
|
-
* @see
|
|
316
|
+
* Persist a linked terminal message.
|
|
317
|
+
* @see POST /v1/workspace/{slug}/linked-terminal-message
|
|
525
318
|
*/
|
|
526
|
-
async
|
|
527
|
-
return this.client.request("
|
|
319
|
+
async createWorkspaceLinkedTerminalMessage(slug, body) {
|
|
320
|
+
return this.client.request("POST", `/v1/workspace/${slug}/linked-terminal-message`, body);
|
|
528
321
|
}
|
|
529
322
|
/**
|
|
530
|
-
*
|
|
531
|
-
* @see
|
|
323
|
+
* Delete selected workspace chats.
|
|
324
|
+
* @see DELETE /v1/workspace/{slug}/delete-chats
|
|
532
325
|
*/
|
|
533
|
-
async
|
|
534
|
-
return this.client.request("
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
// src/v1/modules/v1Thread.ts
|
|
539
|
-
var V1ThreadModule = class {
|
|
540
|
-
constructor(client) {
|
|
541
|
-
this.client = client;
|
|
326
|
+
async deleteWorkspaceChats(slug, body) {
|
|
327
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/delete-chats`, body);
|
|
542
328
|
}
|
|
543
329
|
/**
|
|
544
|
-
*
|
|
545
|
-
* @see
|
|
330
|
+
* Delete edited workspace chats from a starting id.
|
|
331
|
+
* @see DELETE /v1/workspace/{slug}/delete-edited-chats
|
|
546
332
|
*/
|
|
547
|
-
async
|
|
548
|
-
return this.client.request("
|
|
333
|
+
async deleteEditedWorkspaceChats(slug, body) {
|
|
334
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/delete-edited-chats`, body);
|
|
549
335
|
}
|
|
550
336
|
/**
|
|
551
|
-
* Update
|
|
552
|
-
* @see POST /v1/workspace/{slug}/
|
|
337
|
+
* Update a workspace chat response.
|
|
338
|
+
* @see POST /v1/workspace/{slug}/update-chat
|
|
553
339
|
*/
|
|
554
|
-
async
|
|
555
|
-
return this.client.request("POST", `/v1/workspace/${slug}/
|
|
340
|
+
async updateWorkspaceChat(slug, body) {
|
|
341
|
+
return this.client.request("POST", `/v1/workspace/${slug}/update-chat`, body);
|
|
556
342
|
}
|
|
557
343
|
/**
|
|
558
|
-
*
|
|
559
|
-
* @see
|
|
344
|
+
* Update workspace chat feedback.
|
|
345
|
+
* @see POST /v1/workspace/{slug}/chat-feedback/{chatId}
|
|
560
346
|
*/
|
|
561
|
-
async
|
|
562
|
-
return this.client.request("
|
|
347
|
+
async updateWorkspaceChatFeedback(slug, chatId, body) {
|
|
348
|
+
return this.client.request("POST", `/v1/workspace/${slug}/chat-feedback/${chatId}`, body);
|
|
563
349
|
}
|
|
564
350
|
/**
|
|
565
|
-
* Get
|
|
566
|
-
* @see GET /v1/workspace/{slug}/
|
|
351
|
+
* Get suggested messages for a workspace.
|
|
352
|
+
* @see GET /v1/workspace/{slug}/suggested-messages
|
|
567
353
|
*/
|
|
568
|
-
async
|
|
569
|
-
return this.client.request("GET", `/v1/workspace/${slug}/
|
|
354
|
+
async getWorkspaceSuggestedMessages(slug) {
|
|
355
|
+
return this.client.request("GET", `/v1/workspace/${slug}/suggested-messages`);
|
|
570
356
|
}
|
|
571
357
|
/**
|
|
572
|
-
*
|
|
573
|
-
* @see POST /v1/workspace/{slug}/
|
|
358
|
+
* Save suggested messages for a workspace.
|
|
359
|
+
* @see POST /v1/workspace/{slug}/suggested-messages
|
|
574
360
|
*/
|
|
575
|
-
async
|
|
576
|
-
return this.client.request("POST", `/v1/workspace/${slug}/
|
|
361
|
+
async saveWorkspaceSuggestedMessages(slug, body) {
|
|
362
|
+
return this.client.request("POST", `/v1/workspace/${slug}/suggested-messages`, body);
|
|
577
363
|
}
|
|
578
364
|
/**
|
|
579
|
-
*
|
|
580
|
-
* @see POST /v1/workspace/{slug}/
|
|
365
|
+
* Update workspace document pin status.
|
|
366
|
+
* @see POST /v1/workspace/{slug}/update-pin
|
|
581
367
|
*/
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
return this.client.requestRaw("POST", `/v1/workspace/${slug}/thread/${threadSlug}/stream-chat`, body);
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
// src/v1/modules/v1Users.ts
|
|
589
|
-
var V1UsersModule = class {
|
|
590
|
-
constructor(client) {
|
|
591
|
-
this.client = client;
|
|
368
|
+
async updateWorkspaceDocumentPin(slug, body) {
|
|
369
|
+
return this.client.request("POST", `/v1/workspace/${slug}/update-pin`, body);
|
|
592
370
|
}
|
|
593
371
|
/**
|
|
594
|
-
*
|
|
595
|
-
* @see GET /v1/
|
|
372
|
+
* Generate text-to-speech audio for a workspace chat.
|
|
373
|
+
* @see GET /v1/workspace/{slug}/tts/{chatId}
|
|
596
374
|
*/
|
|
597
|
-
async
|
|
598
|
-
return this.client.request("GET", `/v1/
|
|
375
|
+
async getWorkspaceChatTts(slug, chatId) {
|
|
376
|
+
return this.client.request("GET", `/v1/workspace/${slug}/tts/${chatId}`);
|
|
599
377
|
}
|
|
600
378
|
/**
|
|
601
|
-
*
|
|
602
|
-
* @see GET /v1/
|
|
379
|
+
* Get a workspace profile picture.
|
|
380
|
+
* @see GET /v1/workspace/{slug}/pfp
|
|
603
381
|
*/
|
|
604
|
-
async
|
|
605
|
-
return this.client.request("GET", `/v1/
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
// src/v1/modules/v1OpenAI.ts
|
|
610
|
-
var V1OpenAIModule = class {
|
|
611
|
-
constructor(client) {
|
|
612
|
-
this.client = client;
|
|
382
|
+
async getWorkspaceProfilePicture(slug) {
|
|
383
|
+
return this.client.request("GET", `/v1/workspace/${slug}/pfp`);
|
|
613
384
|
}
|
|
614
385
|
/**
|
|
615
|
-
*
|
|
616
|
-
* @see
|
|
386
|
+
* Upload a workspace profile picture.
|
|
387
|
+
* @see POST /v1/workspace/{slug}/upload-pfp
|
|
617
388
|
*/
|
|
618
|
-
|
|
619
|
-
|
|
389
|
+
// @upload-stub — multipart upload; wire form manually or use helper
|
|
390
|
+
async uploadWorkspaceProfilePicture(slug, form) {
|
|
391
|
+
return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload-pfp`, form);
|
|
620
392
|
}
|
|
621
393
|
/**
|
|
622
|
-
*
|
|
623
|
-
* @see
|
|
394
|
+
* Remove a workspace profile picture.
|
|
395
|
+
* @see DELETE /v1/workspace/{slug}/remove-pfp
|
|
624
396
|
*/
|
|
625
|
-
async
|
|
626
|
-
return this.client.request("
|
|
397
|
+
async removeWorkspaceProfilePicture(slug) {
|
|
398
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/remove-pfp`);
|
|
627
399
|
}
|
|
628
400
|
/**
|
|
629
|
-
*
|
|
630
|
-
* @see POST /v1/
|
|
401
|
+
* Fork the workspace default thread.
|
|
402
|
+
* @see POST /v1/workspace/{slug}/thread/fork
|
|
631
403
|
*/
|
|
632
|
-
async
|
|
633
|
-
return this.client.request("POST", `/v1/
|
|
404
|
+
async forkThread(slug, body) {
|
|
405
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/fork`, body);
|
|
634
406
|
}
|
|
635
407
|
/**
|
|
636
|
-
*
|
|
637
|
-
* @see
|
|
408
|
+
* Hide a workspace chat.
|
|
409
|
+
* @see PUT /v1/workspace/workspace-chats/{id}
|
|
638
410
|
*/
|
|
639
|
-
async
|
|
640
|
-
return this.client.request("
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
// src/v1/modules/v1Embed.ts
|
|
645
|
-
var V1EmbedModule = class {
|
|
646
|
-
constructor(client) {
|
|
647
|
-
this.client = client;
|
|
411
|
+
async hideWorkspaceChat(id) {
|
|
412
|
+
return this.client.request("PUT", `/v1/workspace/workspace-chats/${id}`);
|
|
648
413
|
}
|
|
649
414
|
/**
|
|
650
|
-
*
|
|
651
|
-
* @see
|
|
415
|
+
* Upload and embed a document.
|
|
416
|
+
* @see POST /v1/workspace/{slug}/upload-and-embed
|
|
652
417
|
*/
|
|
653
|
-
|
|
654
|
-
|
|
418
|
+
// @upload-stub — multipart upload; wire form manually or use helper
|
|
419
|
+
async uploadAndEmbedWorkspaceDocument(slug, form) {
|
|
420
|
+
return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload-and-embed`, form);
|
|
655
421
|
}
|
|
656
422
|
/**
|
|
657
|
-
*
|
|
658
|
-
* @see
|
|
423
|
+
* Remove and unembed a document.
|
|
424
|
+
* @see DELETE /v1/workspace/{slug}/remove-and-unembed
|
|
659
425
|
*/
|
|
660
|
-
async
|
|
661
|
-
return this.client.request("
|
|
426
|
+
async removeAndUnembedWorkspaceDocument(slug, body) {
|
|
427
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/remove-and-unembed`, body);
|
|
662
428
|
}
|
|
663
429
|
/**
|
|
664
|
-
* Get
|
|
665
|
-
* @see GET /v1/
|
|
430
|
+
* Get workspace prompt history.
|
|
431
|
+
* @see GET /v1/workspace/{slug}/prompt-history
|
|
666
432
|
*/
|
|
667
|
-
async
|
|
668
|
-
return this.client.request("GET", `/v1/
|
|
433
|
+
async getWorkspacePromptHistory(slug) {
|
|
434
|
+
return this.client.request("GET", `/v1/workspace/${slug}/prompt-history`);
|
|
669
435
|
}
|
|
670
436
|
/**
|
|
671
|
-
*
|
|
672
|
-
* @see
|
|
437
|
+
* Clear workspace prompt history.
|
|
438
|
+
* @see DELETE /v1/workspace/{slug}/prompt-history
|
|
673
439
|
*/
|
|
674
|
-
async
|
|
675
|
-
return this.client.request("
|
|
440
|
+
async deleteWorkspacePromptHistory(slug) {
|
|
441
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/prompt-history`);
|
|
676
442
|
}
|
|
677
443
|
/**
|
|
678
|
-
*
|
|
679
|
-
* @see
|
|
444
|
+
* Delete a workspace prompt history entry.
|
|
445
|
+
* @see DELETE /v1/workspace/{slug}/prompt-history/{id}
|
|
680
446
|
*/
|
|
681
|
-
async
|
|
682
|
-
return this.client.request("
|
|
447
|
+
async deleteWorkspacePromptHistoryEntry(slug, id) {
|
|
448
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/prompt-history/${id}`);
|
|
683
449
|
}
|
|
684
450
|
/**
|
|
685
|
-
*
|
|
686
|
-
* @see
|
|
451
|
+
* Validate search provider configuration.
|
|
452
|
+
* @see POST /v1/workspace/{slug}/search/validate
|
|
687
453
|
*/
|
|
688
|
-
async
|
|
689
|
-
return this.client.request("
|
|
454
|
+
async validateWorkspaceSearchProvider(slug, body) {
|
|
455
|
+
return this.client.request("POST", `/v1/workspace/${slug}/search/validate`, body);
|
|
690
456
|
}
|
|
691
457
|
};
|
|
692
458
|
|
|
693
|
-
// src/v1/modules/
|
|
694
|
-
var
|
|
459
|
+
// src/v1/modules/v1Thread.ts
|
|
460
|
+
var V1ThreadModule = class {
|
|
695
461
|
constructor(client) {
|
|
696
462
|
this.client = client;
|
|
697
463
|
}
|
|
698
464
|
/**
|
|
699
|
-
*
|
|
700
|
-
* @see
|
|
701
|
-
*/
|
|
702
|
-
async listPlugins() {
|
|
703
|
-
return this.client.request("GET", `/v1/channels/plugins`);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
707
|
-
* @see POST /v1/channels/plugins
|
|
708
|
-
*/
|
|
709
|
-
async createPlugin(body) {
|
|
710
|
-
return this.client.request("POST", `/v1/channels/plugins`, body);
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Get editable non-secret channel plugin configuration.
|
|
714
|
-
* @see GET /v1/channels/plugins/{id}/config
|
|
715
|
-
*/
|
|
716
|
-
async getConfig(id) {
|
|
717
|
-
return this.client.request("GET", `/v1/channels/plugins/${id}/config`);
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Update a channel plugin. Config values are encrypted before storage.
|
|
721
|
-
* @see POST /v1/channels/plugins/{id}/update
|
|
722
|
-
*/
|
|
723
|
-
async updatePlugin(id, body) {
|
|
724
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/update`, body);
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Delete a channel plugin and stop any running plugin instance.
|
|
728
|
-
* @see DELETE /v1/channels/plugins/{id}
|
|
729
|
-
*/
|
|
730
|
-
async deletePlugin(id) {
|
|
731
|
-
return this.client.request("DELETE", `/v1/channels/plugins/${id}`);
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Enable and start a channel plugin.
|
|
735
|
-
* @see POST /v1/channels/plugins/{id}/start
|
|
736
|
-
*/
|
|
737
|
-
async pluginsStart(id) {
|
|
738
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/start`);
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Disable and stop a channel plugin.
|
|
742
|
-
* @see POST /v1/channels/plugins/{id}/stop
|
|
743
|
-
*/
|
|
744
|
-
async pluginsStop(id) {
|
|
745
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/stop`);
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* Test channel provider credentials without saving a plugin.
|
|
749
|
-
* @see POST /v1/channels/plugins/test
|
|
750
|
-
*/
|
|
751
|
-
async pluginsTest(body) {
|
|
752
|
-
return this.client.request("POST", `/v1/channels/plugins/test`, body);
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* Get runtime status for all running channel plugins.
|
|
756
|
-
* @see GET /v1/channels/status
|
|
757
|
-
*/
|
|
758
|
-
async getStatus() {
|
|
759
|
-
return this.client.request("GET", `/v1/channels/status`);
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
763
|
-
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
764
|
-
*/
|
|
765
|
-
async pluginsQrLoginStart(id, body) {
|
|
766
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/start`, body);
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
770
|
-
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
771
|
-
*/
|
|
772
|
-
async getState(id) {
|
|
773
|
-
return this.client.request("GET", `/v1/channels/plugins/${id}/qr-login/state`);
|
|
774
|
-
}
|
|
775
|
-
/**
|
|
776
|
-
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
777
|
-
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
778
|
-
*/
|
|
779
|
-
async pluginsQrLoginCancel(id) {
|
|
780
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/cancel`);
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
784
|
-
* @see POST /v1/channels/plugins/{id}/logout
|
|
785
|
-
*/
|
|
786
|
-
async pluginsLogout(id) {
|
|
787
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/logout`);
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
791
|
-
* @see POST /v1/channels/plugins/{id}/policies
|
|
792
|
-
*/
|
|
793
|
-
async pluginsPolicies(id, body) {
|
|
794
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/policies`, body);
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Search a Zalo personal friends directory.
|
|
798
|
-
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
799
|
-
*/
|
|
800
|
-
async listDirectoryFriends(id) {
|
|
801
|
-
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/friends`);
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Search a Zalo personal groups directory.
|
|
805
|
-
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
806
|
-
*/
|
|
807
|
-
async listDirectoryGroups(id) {
|
|
808
|
-
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/groups`);
|
|
809
|
-
}
|
|
810
|
-
/**
|
|
811
|
-
* List pending pairing codes for a channel plugin.
|
|
812
|
-
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
813
|
-
*/
|
|
814
|
-
async listPluginPairingCodes(id) {
|
|
815
|
-
return this.client.request("GET", `/v1/channels/plugins/${id}/pairing-codes`);
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Generate a pairing code for a channel plugin.
|
|
819
|
-
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
820
|
-
*/
|
|
821
|
-
async pluginsPairingCodes(id, body) {
|
|
822
|
-
return this.client.request("POST", `/v1/channels/plugins/${id}/pairing-codes`, body);
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
* Approve a channel pairing code.
|
|
826
|
-
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
465
|
+
* Create a workspace thread.
|
|
466
|
+
* @see POST /v1/workspace/{slug}/thread/new
|
|
827
467
|
*/
|
|
828
|
-
async
|
|
829
|
-
return this.client.request("POST", `/v1/
|
|
468
|
+
async createThread(slug) {
|
|
469
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/new`);
|
|
830
470
|
}
|
|
831
471
|
/**
|
|
832
|
-
*
|
|
833
|
-
* @see
|
|
472
|
+
* List workspace threads.
|
|
473
|
+
* @see GET /v1/workspace/{slug}/threads
|
|
834
474
|
*/
|
|
835
|
-
async
|
|
836
|
-
return this.client.request("
|
|
475
|
+
async listThreads(slug) {
|
|
476
|
+
return this.client.request("GET", `/v1/workspace/${slug}/threads`);
|
|
837
477
|
}
|
|
838
478
|
/**
|
|
839
|
-
*
|
|
840
|
-
* @see GET /v1/
|
|
479
|
+
* Open an SSE stream for workspace thread events.
|
|
480
|
+
* @see GET /v1/workspace/{slug}/thread-events
|
|
841
481
|
*/
|
|
842
|
-
async
|
|
843
|
-
return this.client.request("GET", `/v1/
|
|
482
|
+
async openThreadEventsStream(slug) {
|
|
483
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread-events`);
|
|
844
484
|
}
|
|
845
485
|
/**
|
|
846
|
-
*
|
|
847
|
-
* @see
|
|
486
|
+
* Get a workspace thread.
|
|
487
|
+
* @see GET /v1/workspace/{slug}/thread/{threadSlug}
|
|
848
488
|
*/
|
|
849
|
-
async
|
|
850
|
-
return this.client.request("
|
|
489
|
+
async getThread(slug, threadSlug) {
|
|
490
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}`);
|
|
851
491
|
}
|
|
852
492
|
/**
|
|
853
|
-
*
|
|
854
|
-
* @see DELETE /v1/
|
|
493
|
+
* Delete a workspace thread.
|
|
494
|
+
* @see DELETE /v1/workspace/{slug}/thread/{threadSlug}
|
|
855
495
|
*/
|
|
856
|
-
async
|
|
857
|
-
return this.client.request("DELETE", `/v1/
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
// src/v1/modules/v1DesktopRuntimeSessions.ts
|
|
862
|
-
var V1DesktopRuntimeSessionsModule = class {
|
|
863
|
-
constructor(client) {
|
|
864
|
-
this.client = client;
|
|
496
|
+
async deleteThread(slug, threadSlug) {
|
|
497
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/thread/${threadSlug}`);
|
|
865
498
|
}
|
|
866
499
|
/**
|
|
867
|
-
*
|
|
868
|
-
* @see
|
|
500
|
+
* Get thread vision availability.
|
|
501
|
+
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/vision-availability
|
|
869
502
|
*/
|
|
870
|
-
async
|
|
871
|
-
return this.client.request("
|
|
503
|
+
async getThreadVisionAvailability(slug, threadSlug) {
|
|
504
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/vision-availability`);
|
|
872
505
|
}
|
|
873
506
|
/**
|
|
874
|
-
*
|
|
875
|
-
* @see POST /
|
|
507
|
+
* Promote a thread into a tracked goal.
|
|
508
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/goal
|
|
876
509
|
*/
|
|
877
|
-
async
|
|
878
|
-
return this.client.request("POST", `/
|
|
510
|
+
async createThreadGoal(slug, threadSlug, body) {
|
|
511
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/goal`, body);
|
|
879
512
|
}
|
|
880
513
|
/**
|
|
881
|
-
*
|
|
882
|
-
* @see POST /
|
|
514
|
+
* Draft a terminal goal for a workspace.
|
|
515
|
+
* @see POST /v1/workspace/{slug}/terminal-goal-draft
|
|
883
516
|
*/
|
|
884
|
-
async
|
|
885
|
-
return this.client.request("POST", `/
|
|
517
|
+
async draftWorkspaceTerminalGoal(slug, body) {
|
|
518
|
+
return this.client.request("POST", `/v1/workspace/${slug}/terminal-goal-draft`, body);
|
|
886
519
|
}
|
|
887
520
|
/**
|
|
888
|
-
*
|
|
889
|
-
* @see
|
|
521
|
+
* Create a terminal goal for a workspace.
|
|
522
|
+
* @see POST /v1/workspace/{slug}/terminal-goal
|
|
890
523
|
*/
|
|
891
|
-
async
|
|
892
|
-
return this.client.request("
|
|
524
|
+
async createWorkspaceTerminalGoal(slug, body) {
|
|
525
|
+
return this.client.request("POST", `/v1/workspace/${slug}/terminal-goal`, body);
|
|
893
526
|
}
|
|
894
527
|
/**
|
|
895
|
-
*
|
|
896
|
-
* @see
|
|
528
|
+
* Draft a terminal goal for a workspace thread.
|
|
529
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal-draft
|
|
897
530
|
*/
|
|
898
|
-
async
|
|
899
|
-
return this.client.request("
|
|
531
|
+
async draftThreadTerminalGoal(slug, threadSlug, body) {
|
|
532
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-goal-draft`, body);
|
|
900
533
|
}
|
|
901
534
|
/**
|
|
902
|
-
*
|
|
903
|
-
* @see
|
|
535
|
+
* Create a terminal goal for a workspace thread.
|
|
536
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal
|
|
904
537
|
*/
|
|
905
|
-
async
|
|
906
|
-
return this.client.request("
|
|
538
|
+
async createThreadTerminalGoal(slug, threadSlug, body) {
|
|
539
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-goal`, body);
|
|
907
540
|
}
|
|
908
541
|
/**
|
|
909
|
-
*
|
|
910
|
-
* @see
|
|
542
|
+
* Bulk delete workspace threads.
|
|
543
|
+
* @see DELETE /v1/workspace/{slug}/thread-bulk-delete
|
|
911
544
|
*/
|
|
912
|
-
async
|
|
913
|
-
return this.client.request("
|
|
545
|
+
async bulkDeleteThreads(slug, body) {
|
|
546
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/thread-bulk-delete`, body);
|
|
914
547
|
}
|
|
915
548
|
/**
|
|
916
|
-
*
|
|
917
|
-
* @see
|
|
918
|
-
*/
|
|
919
|
-
async permission(sessionId, body) {
|
|
920
|
-
return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/permission`, body);
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
|
|
924
|
-
// src/v1/modules/v1DesktopBrowser.ts
|
|
925
|
-
var V1DesktopBrowserModule = class {
|
|
926
|
-
constructor(client) {
|
|
927
|
-
this.client = client;
|
|
928
|
-
}
|
|
929
|
-
/**
|
|
930
|
-
* List RealTimeX Browser sessions available in the Electron desktop app.
|
|
931
|
-
* @see GET /sdk/desktop/browser/sessions
|
|
932
|
-
*/
|
|
933
|
-
async listSessions() {
|
|
934
|
-
return this.client.request("GET", `/sdk/desktop/browser/sessions`);
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* Create a named RealTimeX Browser session in the Electron desktop app.
|
|
938
|
-
* @see POST /sdk/desktop/browser/sessions
|
|
549
|
+
* Get workspace thread chats.
|
|
550
|
+
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/chats
|
|
939
551
|
*/
|
|
940
|
-
async
|
|
941
|
-
return this.client.request("
|
|
552
|
+
async getThreadChats(slug, threadSlug) {
|
|
553
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/chats`);
|
|
942
554
|
}
|
|
943
555
|
/**
|
|
944
|
-
* Get
|
|
945
|
-
* @see GET /
|
|
556
|
+
* Get thread terminal session details.
|
|
557
|
+
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/terminal-session-details
|
|
946
558
|
*/
|
|
947
|
-
async
|
|
948
|
-
return this.client.request("GET", `/
|
|
559
|
+
async getThreadTerminalSessionDetails(slug, threadSlug) {
|
|
560
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-session-details`);
|
|
949
561
|
}
|
|
950
562
|
/**
|
|
951
|
-
*
|
|
952
|
-
* @see
|
|
563
|
+
* Update a workspace thread.
|
|
564
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/update
|
|
953
565
|
*/
|
|
954
|
-
async
|
|
955
|
-
return this.client.request("
|
|
566
|
+
async updateThread(slug, threadSlug, body) {
|
|
567
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/update`, body);
|
|
956
568
|
}
|
|
957
569
|
/**
|
|
958
|
-
*
|
|
959
|
-
* @see
|
|
570
|
+
* Delete edited chats from a thread.
|
|
571
|
+
* @see DELETE /v1/workspace/{slug}/thread/{threadSlug}/delete-edited-chats
|
|
960
572
|
*/
|
|
961
|
-
async
|
|
962
|
-
return this.client.request("
|
|
573
|
+
async deleteEditedThreadChats(slug, threadSlug, body) {
|
|
574
|
+
return this.client.request("DELETE", `/v1/workspace/${slug}/thread/${threadSlug}/delete-edited-chats`, body);
|
|
963
575
|
}
|
|
964
576
|
/**
|
|
965
|
-
*
|
|
966
|
-
* @see
|
|
577
|
+
* Update a thread chat response.
|
|
578
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/update-chat
|
|
967
579
|
*/
|
|
968
|
-
async
|
|
969
|
-
return this.client.request("
|
|
580
|
+
async updateThreadChat(slug, threadSlug, body) {
|
|
581
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/update-chat`, body);
|
|
970
582
|
}
|
|
971
583
|
/**
|
|
972
|
-
*
|
|
973
|
-
* @see
|
|
584
|
+
* Persist terminal UI events for a workspace thread.
|
|
585
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-ui-events
|
|
974
586
|
*/
|
|
975
|
-
async
|
|
976
|
-
return this.client.request("
|
|
587
|
+
async persistThreadTerminalUiEvents(slug, threadSlug, body) {
|
|
588
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-ui-events`, body);
|
|
977
589
|
}
|
|
978
590
|
/**
|
|
979
|
-
*
|
|
980
|
-
* @see POST /
|
|
591
|
+
* Persist a linked terminal message for a workspace thread.
|
|
592
|
+
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/linked-terminal-message
|
|
981
593
|
*/
|
|
982
|
-
async
|
|
983
|
-
return this.client.request("POST", `/
|
|
594
|
+
async createThreadLinkedTerminalMessage(slug, threadSlug, body) {
|
|
595
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/linked-terminal-message`, body);
|
|
984
596
|
}
|
|
985
597
|
/**
|
|
986
|
-
*
|
|
987
|
-
* @see POST /
|
|
598
|
+
* Coordinate a task into a workspace thread.
|
|
599
|
+
* @see POST /v1/workspace/{slug}/thread/coordinate-task
|
|
988
600
|
*/
|
|
989
|
-
async
|
|
990
|
-
return this.client.request("POST", `/
|
|
601
|
+
async coordinateThreadTask(slug, body) {
|
|
602
|
+
return this.client.request("POST", `/v1/workspace/${slug}/thread/coordinate-task`, body);
|
|
991
603
|
}
|
|
992
604
|
/**
|
|
993
|
-
*
|
|
994
|
-
* @see
|
|
605
|
+
* Open an SSE stream for external workspace thread chat events.
|
|
606
|
+
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/chat-stream
|
|
995
607
|
*/
|
|
996
|
-
async
|
|
997
|
-
return this.client.request("
|
|
608
|
+
async openThreadChatStream(slug, threadSlug) {
|
|
609
|
+
return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/chat-stream`);
|
|
998
610
|
}
|
|
999
611
|
};
|
|
1000
612
|
|
|
@@ -1003,18 +615,9 @@ var V1ApiNamespace = class {
|
|
|
1003
615
|
// [GENERATED-PROPS-END]
|
|
1004
616
|
constructor(baseUrl, apiKey, appId) {
|
|
1005
617
|
this._client = new DeveloperApiClient(baseUrl, apiKey, appId);
|
|
1006
|
-
this.
|
|
1007
|
-
this.admin = new V1AdminModule(this._client);
|
|
1008
|
-
this.document = new V1DocumentModule(this._client);
|
|
618
|
+
this.chat = new V1ChatModule(this._client);
|
|
1009
619
|
this.workspace = new V1WorkspaceModule(this._client);
|
|
1010
|
-
this.system = new V1SystemModule(this._client);
|
|
1011
620
|
this.thread = new V1ThreadModule(this._client);
|
|
1012
|
-
this.users = new V1UsersModule(this._client);
|
|
1013
|
-
this.openai = new V1OpenAIModule(this._client);
|
|
1014
|
-
this.embed = new V1EmbedModule(this._client);
|
|
1015
|
-
this.channels = new V1ChannelsModule(this._client);
|
|
1016
|
-
this.desktopRuntimeSessions = new V1DesktopRuntimeSessionsModule(this._client);
|
|
1017
|
-
this.desktopBrowser = new V1DesktopBrowserModule(this._client);
|
|
1018
621
|
}
|
|
1019
622
|
};
|
|
1020
623
|
|
|
@@ -1113,24 +716,6 @@ async function* streamThreadChat(client, slug, threadSlug, body) {
|
|
|
1113
716
|
reader.releaseLock();
|
|
1114
717
|
}
|
|
1115
718
|
}
|
|
1116
|
-
|
|
1117
|
-
// src/v1/overrides/v1DocumentUpload.ts
|
|
1118
|
-
async function uploadFile(client, file, options = {}) {
|
|
1119
|
-
const form = new FormData();
|
|
1120
|
-
const filename = options.filename ?? (file instanceof File ? file.name : "upload");
|
|
1121
|
-
form.append("file", file, filename);
|
|
1122
|
-
return client.requestMultipart("POST", `/v1/document/upload`, form);
|
|
1123
|
-
}
|
|
1124
|
-
async function uploadFileToFolder(client, file, folderName, options = {}) {
|
|
1125
|
-
const form = new FormData();
|
|
1126
|
-
const filename = options.filename ?? (file instanceof File ? file.name : "upload");
|
|
1127
|
-
form.append("file", file, filename);
|
|
1128
|
-
return client.requestMultipart(
|
|
1129
|
-
"POST",
|
|
1130
|
-
`/v1/document/upload/${encodeURIComponent(folderName)}`,
|
|
1131
|
-
form
|
|
1132
|
-
);
|
|
1133
|
-
}
|
|
1134
719
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1135
720
|
0 && (module.exports = {
|
|
1136
721
|
AuthenticationError,
|
|
@@ -1138,22 +723,11 @@ async function uploadFileToFolder(client, file, folderName, options = {}) {
|
|
|
1138
723
|
DeveloperApiError,
|
|
1139
724
|
NotFoundError,
|
|
1140
725
|
ServerError,
|
|
1141
|
-
V1AdminModule,
|
|
1142
726
|
V1ApiNamespace,
|
|
1143
|
-
|
|
1144
|
-
V1ChannelsModule,
|
|
1145
|
-
V1DesktopBrowserModule,
|
|
1146
|
-
V1DesktopRuntimeSessionsModule,
|
|
1147
|
-
V1DocumentModule,
|
|
1148
|
-
V1EmbedModule,
|
|
1149
|
-
V1OpenAIModule,
|
|
1150
|
-
V1SystemModule,
|
|
727
|
+
V1ChatModule,
|
|
1151
728
|
V1ThreadModule,
|
|
1152
|
-
V1UsersModule,
|
|
1153
729
|
V1WorkspaceModule,
|
|
1154
730
|
ValidationError,
|
|
1155
731
|
streamThreadChat,
|
|
1156
|
-
streamWorkspaceChat
|
|
1157
|
-
uploadFile,
|
|
1158
|
-
uploadFileToFolder
|
|
732
|
+
streamWorkspaceChat
|
|
1159
733
|
});
|