@realtimex/sdk 1.7.21 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/chunk-ORAAYW4C.mjs +271 -0
  2. package/dist/errors-C98IGxYU.d.mts +168 -0
  3. package/dist/errors-C98IGxYU.d.ts +168 -0
  4. package/dist/index.d.mts +8 -2048
  5. package/dist/index.d.ts +8 -2048
  6. package/dist/index.js +168 -4723
  7. package/dist/index.mjs +7 -3783
  8. package/dist/v1/index.d.mts +3 -56
  9. package/dist/v1/index.d.ts +3 -56
  10. package/dist/v1/index.js +2 -756
  11. package/dist/v1/index.mjs +2 -42
  12. package/package.json +6 -7
  13. package/dist/chunk-Z5GAUBIM.mjs +0 -993
  14. package/dist/errors-NufsyIZ-.d.mts +0 -678
  15. package/dist/errors-NufsyIZ-.d.ts +0 -678
  16. package/skills/realtimex-moderator-sdk/SKILL.md +0 -102
  17. package/skills/realtimex-moderator-sdk/references/activities.md +0 -14
  18. package/skills/realtimex-moderator-sdk/references/agents.md +0 -13
  19. package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +0 -105
  20. package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +0 -24
  21. package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +0 -27
  22. package/skills/realtimex-moderator-sdk/references/api-reference/api.md +0 -17
  23. package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +0 -36
  24. package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +0 -27
  25. package/skills/realtimex-moderator-sdk/references/api-reference/core.md +0 -40
  26. package/skills/realtimex-moderator-sdk/references/api-reference/database.md +0 -24
  27. package/skills/realtimex-moderator-sdk/references/api-reference/index.md +0 -43
  28. package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +0 -176
  29. package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +0 -50
  30. package/skills/realtimex-moderator-sdk/references/api-reference/port.md +0 -21
  31. package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +0 -15
  32. package/skills/realtimex-moderator-sdk/references/api-reference/task.md +0 -62
  33. package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +0 -18
  34. package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +0 -21
  35. package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +0 -15
  36. package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +0 -48
  37. package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +0 -18
  38. package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +0 -78
  39. package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +0 -27
  40. package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +0 -24
  41. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +0 -39
  42. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +0 -24
  43. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +0 -33
  44. package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +0 -39
  45. package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +0 -27
  46. package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +0 -21
  47. package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +0 -12
  48. package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +0 -36
  49. package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +0 -26
  50. package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +0 -15
  51. package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +0 -39
  52. package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +0 -13
  53. package/skills/realtimex-moderator-sdk/references/api-reference.md +0 -1330
  54. package/skills/realtimex-moderator-sdk/references/app-concepts.md +0 -1111
  55. package/skills/realtimex-moderator-sdk/references/browser.md +0 -27
  56. package/skills/realtimex-moderator-sdk/references/channels.md +0 -189
  57. package/skills/realtimex-moderator-sdk/references/credentials.md +0 -111
  58. package/skills/realtimex-moderator-sdk/references/known-issues.md +0 -237
  59. package/skills/realtimex-moderator-sdk/references/llm.md +0 -13
  60. package/skills/realtimex-moderator-sdk/references/mcp.md +0 -13
  61. package/skills/realtimex-moderator-sdk/references/permissions.md +0 -30
  62. package/skills/realtimex-moderator-sdk/references/quickstart.md +0 -16
  63. package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +0 -34
  64. package/skills/realtimex-moderator-sdk/references/workspaces.md +0 -20
  65. package/skills/realtimex-moderator-sdk/scripts/lib/sdk-init.js +0 -140
  66. package/skills/realtimex-moderator-sdk/scripts/rtx.js +0 -1359
package/dist/v1/index.js CHANGED
@@ -25,24 +25,12 @@ __export(v1_exports, {
25
25
  DeveloperApiError: () => DeveloperApiError,
26
26
  NotFoundError: () => NotFoundError,
27
27
  ServerError: () => ServerError,
28
- V1AdminModule: () => V1AdminModule,
29
28
  V1ApiNamespace: () => V1ApiNamespace,
30
- V1AuthModule: () => V1AuthModule,
31
- V1ChannelsModule: () => V1ChannelsModule,
32
- V1DesktopBrowserModule: () => V1DesktopBrowserModule,
33
- V1DesktopRuntimeSessionsModule: () => V1DesktopRuntimeSessionsModule,
34
- V1DocumentModule: () => V1DocumentModule,
35
- V1EmbedModule: () => V1EmbedModule,
36
- V1OpenAIModule: () => V1OpenAIModule,
37
- V1SystemModule: () => V1SystemModule,
38
29
  V1ThreadModule: () => V1ThreadModule,
39
- V1UsersModule: () => V1UsersModule,
40
30
  V1WorkspaceModule: () => V1WorkspaceModule,
41
31
  ValidationError: () => ValidationError,
42
32
  streamThreadChat: () => streamThreadChat,
43
- streamWorkspaceChat: () => streamWorkspaceChat,
44
- uploadFile: () => uploadFile,
45
- uploadFileToFolder: () => uploadFileToFolder
33
+ streamWorkspaceChat: () => streamWorkspaceChat
46
34
  });
47
35
  module.exports = __toCommonJS(v1_exports);
48
36
 
@@ -161,225 +149,6 @@ var DeveloperApiClient = class {
161
149
  }
162
150
  };
163
151
 
164
- // src/v1/modules/v1Auth.ts
165
- var V1AuthModule = class {
166
- constructor(client) {
167
- this.client = client;
168
- }
169
- /**
170
- * Verify the attached Authentication header contains a valid API token.
171
- * @see GET /v1/auth
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
277
- */
278
- async workspaceChats(body) {
279
- return this.client.request("POST", `/v1/admin/workspace-chats`, body);
280
- }
281
- /**
282
- * Update multi-user preferences for instance. Methods are disabled until multi user mode is enabled via the UI.
283
- * @see POST /v1/admin/preferences
284
- */
285
- async createPreference(body) {
286
- return this.client.request("POST", `/v1/admin/preferences`, body);
287
- }
288
- };
289
-
290
- // src/v1/modules/v1Document.ts
291
- var V1DocumentModule = class {
292
- constructor(client) {
293
- this.client = client;
294
- }
295
- /**
296
- * Upload a new file to RealTimeX to be parsed and prepared for embedding.
297
- * @see POST /v1/document/upload
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
377
- */
378
- async moveFiles(body) {
379
- return this.client.request("POST", `/v1/document/move-files`, body);
380
- }
381
- };
382
-
383
152
  // src/v1/modules/v1Workspace.ts
384
153
  var V1WorkspaceModule = class {
385
154
  constructor(client) {
@@ -465,76 +234,6 @@ var V1WorkspaceModule = class {
465
234
  }
466
235
  };
467
236
 
468
- // src/v1/modules/v1System.ts
469
- var V1SystemModule = class {
470
- constructor(client) {
471
- this.client = client;
472
- }
473
- /**
474
- * Dump all settings to file storage
475
- * @see GET /v1/system/env-dump
476
- */
477
- async getEnvDump() {
478
- return this.client.request("GET", `/v1/system/env-dump`);
479
- }
480
- /**
481
- * Get all current system settings that are defined.
482
- * @see GET /v1/system
483
- */
484
- async getSystem() {
485
- return this.client.request("GET", `/v1/system`);
486
- }
487
- /**
488
- * Number of all vectors in connected vector database
489
- * @see GET /v1/system/vector-count
490
- */
491
- async getVectorCount() {
492
- return this.client.request("GET", `/v1/system/vector-count`);
493
- }
494
- /**
495
- * Update a system setting or preference.
496
- * @see POST /v1/system/update-env
497
- */
498
- async updateEnv(body) {
499
- return this.client.request("POST", `/v1/system/update-env`, body);
500
- }
501
- /**
502
- * Export all of the chats from the system in a known format. Output depends on the type sent. Will be send with the correct header for the output.
503
- * @see GET /v1/system/export-chats
504
- */
505
- async listExportChats() {
506
- return this.client.request("GET", `/v1/system/export-chats`);
507
- }
508
- /**
509
- * Permanently remove documents from the system.
510
- * @see DELETE /v1/system/remove-documents
511
- */
512
- async deleteRemoveDocument() {
513
- return this.client.request("DELETE", `/v1/system/remove-documents`);
514
- }
515
- /**
516
- * Returns a health check object with server uptime and version.
517
- * @see GET /v1/system/health
518
- */
519
- async getHealth() {
520
- return this.client.request("GET", `/v1/system/health`);
521
- }
522
- /**
523
- * Returns a health check object with server uptime and version.
524
- * @see GET /v1/system/health-version-2
525
- */
526
- async getHealthVersion2() {
527
- return this.client.request("GET", `/v1/system/health-version-2`);
528
- }
529
- /**
530
- * Returns a health check object with server uptime and version.
531
- * @see GET /v1/system/health-version-3
532
- */
533
- async getHealthVersion3() {
534
- return this.client.request("GET", `/v1/system/health-version-3`);
535
- }
536
- };
537
-
538
237
  // src/v1/modules/v1Thread.ts
539
238
  var V1ThreadModule = class {
540
239
  constructor(client) {
@@ -585,436 +284,13 @@ var V1ThreadModule = class {
585
284
  }
586
285
  };
587
286
 
588
- // src/v1/modules/v1Users.ts
589
- var V1UsersModule = class {
590
- constructor(client) {
591
- this.client = client;
592
- }
593
- /**
594
- * List all users
595
- * @see GET /v1/users
596
- */
597
- async listUsers() {
598
- return this.client.request("GET", `/v1/users`);
599
- }
600
- /**
601
- * Issue a temporary auth token for a user
602
- * @see GET /v1/users/{id}/issue-auth-token
603
- */
604
- async getIssueAuthToken(id) {
605
- return this.client.request("GET", `/v1/users/${id}/issue-auth-token`);
606
- }
607
- };
608
-
609
- // src/v1/modules/v1OpenAI.ts
610
- var V1OpenAIModule = class {
611
- constructor(client) {
612
- this.client = client;
613
- }
614
- /**
615
- * Get all available "models" which are workspaces you can use for chatting.
616
- * @see GET /v1/openai/models
617
- */
618
- async listModels() {
619
- return this.client.request("GET", `/v1/openai/models`);
620
- }
621
- /**
622
- * Execute a chat with a workspace with OpenAI compatibility. Supports streaming as well. Model must be a workspace slug from /models.
623
- * @see POST /v1/openai/chat/completions
624
- */
625
- async chatCompletions(body) {
626
- return this.client.request("POST", `/v1/openai/chat/completions`, body);
627
- }
628
- /**
629
- * Get the embeddings of any arbitrary text string. This will use the embedder provider set in the system. Please ensure the token length of each string fits within the context of your embedder model.
630
- * @see POST /v1/openai/embeddings
631
- */
632
- async createEmbedding(body) {
633
- return this.client.request("POST", `/v1/openai/embeddings`, body);
634
- }
635
- /**
636
- * List all the vector database collections connected to RealTimeX. These are essentially workspaces but return their unique vector db identifier - this is the same as the workspace slug.
637
- * @see GET /v1/openai/vector_stores
638
- */
639
- async listVectorStores() {
640
- return this.client.request("GET", `/v1/openai/vector_stores`);
641
- }
642
- };
643
-
644
- // src/v1/modules/v1Embed.ts
645
- var V1EmbedModule = class {
646
- constructor(client) {
647
- this.client = client;
648
- }
649
- /**
650
- * List all active embeds
651
- * @see GET /v1/embed
652
- */
653
- async getEmbed() {
654
- return this.client.request("GET", `/v1/embed`);
655
- }
656
- /**
657
- * Get all chats for a specific embed
658
- * @see GET /v1/embed/{embedUuid}/chats
659
- */
660
- async listChats(embedUuid) {
661
- return this.client.request("GET", `/v1/embed/${embedUuid}/chats`);
662
- }
663
- /**
664
- * Get chats for a specific embed and session
665
- * @see GET /v1/embed/{embedUuid}/chats/{sessionUuid}
666
- */
667
- async getChat(embedUuid, sessionUuid) {
668
- return this.client.request("GET", `/v1/embed/${embedUuid}/chats/${sessionUuid}`);
669
- }
670
- /**
671
- * Create a new embed configuration
672
- * @see POST /v1/embed/new
673
- */
674
- async createEmbed(body) {
675
- return this.client.request("POST", `/v1/embed/new`, body);
676
- }
677
- /**
678
- * Update an existing embed configuration
679
- * @see POST /v1/embed/{embedUuid}
680
- */
681
- async updateEmbed(embedUuid, body) {
682
- return this.client.request("POST", `/v1/embed/${embedUuid}`, body);
683
- }
684
- /**
685
- * Delete an existing embed configuration
686
- * @see DELETE /v1/embed/{embedUuid}
687
- */
688
- async deleteEmbed(embedUuid) {
689
- return this.client.request("DELETE", `/v1/embed/${embedUuid}`);
690
- }
691
- };
692
-
693
- // src/v1/modules/v1Channels.ts
694
- var V1ChannelsModule = class {
695
- constructor(client) {
696
- this.client = client;
697
- }
698
- /**
699
- * List configured channel plugins without exposing encrypted plugin configuration.
700
- * @see GET /v1/channels/plugins
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
827
- */
828
- async pairingCodesApprove(id) {
829
- return this.client.request("POST", `/v1/channels/pairing-codes/${id}/approve`);
830
- }
831
- /**
832
- * Reject a channel pairing code.
833
- * @see POST /v1/channels/pairing-codes/{id}/reject
834
- */
835
- async pairingCodesReject(id) {
836
- return this.client.request("POST", `/v1/channels/pairing-codes/${id}/reject`);
837
- }
838
- /**
839
- * List channel users for a plugin.
840
- * @see GET /v1/channels/plugins/{id}/users
841
- */
842
- async listPluginUsers(id) {
843
- return this.client.request("GET", `/v1/channels/plugins/${id}/users`);
844
- }
845
- /**
846
- * Set authorization for a channel user.
847
- * @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
848
- */
849
- async pluginsUsersAuthorization(id, userId, body) {
850
- return this.client.request("POST", `/v1/channels/plugins/${id}/users/${userId}/authorization`, body);
851
- }
852
- /**
853
- * Remove a channel user from a plugin.
854
- * @see DELETE /v1/channels/plugins/{id}/users/{userId}
855
- */
856
- async deleteUser(id, userId) {
857
- return this.client.request("DELETE", `/v1/channels/plugins/${id}/users/${userId}`);
858
- }
859
- };
860
-
861
- // src/v1/modules/v1DesktopRuntimeSessions.ts
862
- var V1DesktopRuntimeSessionsModule = class {
863
- constructor(client) {
864
- this.client = client;
865
- }
866
- /**
867
- * Open the shared terminal launcher in the Electron desktop app.
868
- * @see POST /sdk/desktop/runtime-sessions/open-launcher
869
- */
870
- async openLauncher(body) {
871
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/open-launcher`, body);
872
- }
873
- /**
874
- * Launch a local PTY-backed shell terminal in the Electron desktop app.
875
- * @see POST /sdk/desktop/runtime-sessions/launch-terminal-shell
876
- */
877
- async launchTerminalShell(body) {
878
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-shell`, body);
879
- }
880
- /**
881
- * Launch a local PTY-backed CLI agent terminal in the Electron desktop app.
882
- * @see POST /sdk/desktop/runtime-sessions/launch-terminal-cli-agent
883
- */
884
- async launchTerminalCliAgent(body) {
885
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-cli-agent`, body);
886
- }
887
- /**
888
- * List desktop PTY-backed runtime sessions currently known to the Electron app.
889
- * @see GET /sdk/desktop/runtime-sessions
890
- */
891
- async listRuntimeSessions() {
892
- return this.client.request("GET", `/sdk/desktop/runtime-sessions`);
893
- }
894
- /**
895
- * Fetch one desktop PTY-backed runtime session by runtime session ID or PTY session ID.
896
- * @see GET /sdk/desktop/runtime-sessions/{sessionId}
897
- */
898
- async getRuntimeSession(sessionId) {
899
- return this.client.request("GET", `/sdk/desktop/runtime-sessions/${sessionId}`);
900
- }
901
- /**
902
- * Close an existing desktop runtime session.
903
- * @see DELETE /sdk/desktop/runtime-sessions/{sessionId}
904
- */
905
- async deleteRuntimeSession(sessionId) {
906
- return this.client.request("DELETE", `/sdk/desktop/runtime-sessions/${sessionId}`);
907
- }
908
- /**
909
- * Write input to an existing desktop runtime session. Use `message` to submit a CLI turn or `input` for raw PTY data.
910
- * @see POST /sdk/desktop/runtime-sessions/{sessionId}/write
911
- */
912
- async write(sessionId, body) {
913
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/write`, body);
914
- }
915
- /**
916
- * Approve or deny a pending desktop runtime session action.
917
- * @see POST /sdk/desktop/runtime-sessions/{sessionId}/permission
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
939
- */
940
- async createSession(body) {
941
- return this.client.request("POST", `/sdk/desktop/browser/sessions`, body);
942
- }
943
- /**
944
- * Get a specific RealTimeX Browser session by session name.
945
- * @see GET /sdk/desktop/browser/sessions/{sessionName}
946
- */
947
- async getSession(sessionName) {
948
- return this.client.request("GET", `/sdk/desktop/browser/sessions/${sessionName}`);
949
- }
950
- /**
951
- * Delete a named RealTimeX Browser session from the Electron desktop app.
952
- * @see DELETE /sdk/desktop/browser/sessions/{sessionName}
953
- */
954
- async deleteSession(sessionName) {
955
- return this.client.request("DELETE", `/sdk/desktop/browser/sessions/${sessionName}`);
956
- }
957
- /**
958
- * Create a RealTimeX Browser tab, optionally launching the browser session if needed.
959
- * @see POST /sdk/desktop/browser/tabs
960
- */
961
- async createTab(body) {
962
- return this.client.request("POST", `/sdk/desktop/browser/tabs`, body);
963
- }
964
- /**
965
- * Get a RealTimeX Browser tab snapshot by tab reference.
966
- * @see GET /sdk/desktop/browser/tabs/{tabRef}
967
- */
968
- async getTab(tabRef) {
969
- return this.client.request("GET", `/sdk/desktop/browser/tabs/${tabRef}`);
970
- }
971
- /**
972
- * Close an existing RealTimeX Browser tab.
973
- * @see DELETE /sdk/desktop/browser/tabs/{tabRef}
974
- */
975
- async deleteTab(tabRef) {
976
- return this.client.request("DELETE", `/sdk/desktop/browser/tabs/${tabRef}`);
977
- }
978
- /**
979
- * Evaluate JavaScript in a specific RealTimeX Browser tab.
980
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/evaluate
981
- */
982
- async evaluateTab(tabRef, body) {
983
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/evaluate`, body);
984
- }
985
- /**
986
- * Focus an existing RealTimeX Browser tab.
987
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/focus
988
- */
989
- async focusTab(tabRef, body) {
990
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/focus`, body);
991
- }
992
- /**
993
- * Navigate an existing RealTimeX Browser tab to a new URL.
994
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/navigate
995
- */
996
- async navigateTab(tabRef, body) {
997
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/navigate`, body);
998
- }
999
- };
1000
-
1001
287
  // src/v1/namespace.ts
1002
288
  var V1ApiNamespace = class {
1003
289
  // [GENERATED-PROPS-END]
1004
290
  constructor(baseUrl, apiKey, appId) {
1005
291
  this._client = new DeveloperApiClient(baseUrl, apiKey, appId);
1006
- this.auth = new V1AuthModule(this._client);
1007
- this.admin = new V1AdminModule(this._client);
1008
- this.document = new V1DocumentModule(this._client);
1009
292
  this.workspace = new V1WorkspaceModule(this._client);
1010
- this.system = new V1SystemModule(this._client);
1011
293
  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
294
  }
1019
295
  };
1020
296
 
@@ -1113,24 +389,6 @@ async function* streamThreadChat(client, slug, threadSlug, body) {
1113
389
  reader.releaseLock();
1114
390
  }
1115
391
  }
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
392
  // Annotate the CommonJS export names for ESM import in node:
1135
393
  0 && (module.exports = {
1136
394
  AuthenticationError,
@@ -1138,22 +396,10 @@ async function uploadFileToFolder(client, file, folderName, options = {}) {
1138
396
  DeveloperApiError,
1139
397
  NotFoundError,
1140
398
  ServerError,
1141
- V1AdminModule,
1142
399
  V1ApiNamespace,
1143
- V1AuthModule,
1144
- V1ChannelsModule,
1145
- V1DesktopBrowserModule,
1146
- V1DesktopRuntimeSessionsModule,
1147
- V1DocumentModule,
1148
- V1EmbedModule,
1149
- V1OpenAIModule,
1150
- V1SystemModule,
1151
400
  V1ThreadModule,
1152
- V1UsersModule,
1153
401
  V1WorkspaceModule,
1154
402
  ValidationError,
1155
403
  streamThreadChat,
1156
- streamWorkspaceChat,
1157
- uploadFile,
1158
- uploadFileToFolder
404
+ streamWorkspaceChat
1159
405
  });