@realtimex/sdk 1.7.28 → 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.
- package/dist/chunk-ORAAYW4C.mjs +271 -0
- package/dist/errors-C98IGxYU.d.mts +168 -0
- package/dist/errors-C98IGxYU.d.ts +168 -0
- package/dist/index.d.mts +8 -2048
- package/dist/index.d.ts +8 -2048
- package/dist/index.js +168 -4723
- 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 +2 -756
- package/dist/v1/index.mjs +2 -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
|
@@ -1,678 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DeveloperApiClient - HTTP client for the RealtimeX v1 Developer API.
|
|
3
|
-
*
|
|
4
|
-
* Supports two authentication modes:
|
|
5
|
-
* - API Key: Authorization: Bearer <apiKey>
|
|
6
|
-
* - App ID: x-app-id header (for LocalApp / SDK agent authentication)
|
|
7
|
-
*
|
|
8
|
-
* When both are provided, x-app-id takes priority on the server side.
|
|
9
|
-
*/
|
|
10
|
-
declare class DeveloperApiClient {
|
|
11
|
-
private readonly baseUrl;
|
|
12
|
-
private readonly apiKey;
|
|
13
|
-
private readonly appId?;
|
|
14
|
-
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
15
|
-
private getHeaders;
|
|
16
|
-
private handleResponse;
|
|
17
|
-
/**
|
|
18
|
-
* Make a JSON request to the v1 API.
|
|
19
|
-
*/
|
|
20
|
-
request<T = unknown>(method: string, path: string, body?: unknown): Promise<T>;
|
|
21
|
-
/**
|
|
22
|
-
* Make a multipart/form-data request (e.g. file uploads).
|
|
23
|
-
* Do NOT set Content-Type — browser/fetch will set it with the boundary.
|
|
24
|
-
*/
|
|
25
|
-
requestMultipart<T = unknown>(method: string, path: string, form: FormData): Promise<T>;
|
|
26
|
-
/**
|
|
27
|
-
* Make a raw request and return the Response object directly.
|
|
28
|
-
* Used for streaming (SSE) endpoints.
|
|
29
|
-
*/
|
|
30
|
-
requestRaw(method: string, path: string, body?: unknown): Promise<Response>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare class V1AuthModule {
|
|
34
|
-
private readonly client;
|
|
35
|
-
constructor(client: DeveloperApiClient);
|
|
36
|
-
/**
|
|
37
|
-
* Verify the attached Authentication header contains a valid API token.
|
|
38
|
-
* @see GET /v1/auth
|
|
39
|
-
*/
|
|
40
|
-
getAuth(): Promise<unknown>;
|
|
41
|
-
/**
|
|
42
|
-
* Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
|
|
43
|
-
* @see POST /v1/auth/external-callback
|
|
44
|
-
*/
|
|
45
|
-
externalCallback(): Promise<unknown>;
|
|
46
|
-
/**
|
|
47
|
-
* Poll for a relayed external browser auth callback by OAuth state. Localhost only.
|
|
48
|
-
* @see GET /v1/auth/external-callback/{state}
|
|
49
|
-
*/
|
|
50
|
-
getExternalCallback(state: string): Promise<unknown>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare class V1AdminModule {
|
|
54
|
-
private readonly client;
|
|
55
|
-
constructor(client: DeveloperApiClient);
|
|
56
|
-
/**
|
|
57
|
-
* Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
|
|
58
|
-
* @see GET /v1/admin/is-multi-user-mode
|
|
59
|
-
*/
|
|
60
|
-
getIsMultiUserMode(): Promise<unknown>;
|
|
61
|
-
/**
|
|
62
|
-
* Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
|
|
63
|
-
* @see GET /v1/admin/users
|
|
64
|
-
*/
|
|
65
|
-
listUsers(): Promise<unknown>;
|
|
66
|
-
/**
|
|
67
|
-
* Create a new user with username and password. Methods are disabled until multi user mode is enabled via the UI.
|
|
68
|
-
* @see POST /v1/admin/users/new
|
|
69
|
-
*/
|
|
70
|
-
createUser(body?: Record<string, unknown>): Promise<unknown>;
|
|
71
|
-
/**
|
|
72
|
-
* Update existing user settings. Methods are disabled until multi user mode is enabled via the UI.
|
|
73
|
-
* @see POST /v1/admin/users/{id}
|
|
74
|
-
*/
|
|
75
|
-
updateUser(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
76
|
-
/**
|
|
77
|
-
* Delete existing user by id. Methods are disabled until multi user mode is enabled via the UI.
|
|
78
|
-
* @see DELETE /v1/admin/users/{id}
|
|
79
|
-
*/
|
|
80
|
-
deleteUser(id: string): Promise<unknown>;
|
|
81
|
-
/**
|
|
82
|
-
* List all existing invitations to instance regardless of status. Methods are disabled until multi user mode is enabled via the UI.
|
|
83
|
-
* @see GET /v1/admin/invites
|
|
84
|
-
*/
|
|
85
|
-
listInvites(): Promise<unknown>;
|
|
86
|
-
/**
|
|
87
|
-
* 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.
|
|
88
|
-
* @see POST /v1/admin/invite/new
|
|
89
|
-
*/
|
|
90
|
-
createInvite(body?: Record<string, unknown>): Promise<unknown>;
|
|
91
|
-
/**
|
|
92
|
-
* Deactivates (soft-delete) invite by id. Methods are disabled until multi user mode is enabled via the UI.
|
|
93
|
-
* @see DELETE /v1/admin/invite/{id}
|
|
94
|
-
*/
|
|
95
|
-
deleteInvite(id: string): Promise<unknown>;
|
|
96
|
-
/**
|
|
97
|
-
* Retrieve a list of users with permissions to access the specified workspace.
|
|
98
|
-
* @see GET /v1/admin/workspaces/{workspaceId}/users
|
|
99
|
-
*/
|
|
100
|
-
listWorkspaceUsers(workspaceId: string): Promise<unknown>;
|
|
101
|
-
/**
|
|
102
|
-
* 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.
|
|
103
|
-
* @see POST /v1/admin/workspaces/{workspaceId}/update-users
|
|
104
|
-
*/
|
|
105
|
-
updateUsers(workspaceId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
106
|
-
/**
|
|
107
|
-
* 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.
|
|
108
|
-
* @see POST /v1/admin/workspaces/{workspaceSlug}/manage-users
|
|
109
|
-
*/
|
|
110
|
-
workspacesManageUsers(workspaceSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
111
|
-
/**
|
|
112
|
-
* All chats in the system ordered by most recent. Methods are disabled until multi user mode is enabled via the UI.
|
|
113
|
-
* @see POST /v1/admin/workspace-chats
|
|
114
|
-
*/
|
|
115
|
-
workspaceChats(body?: Record<string, unknown>): Promise<unknown>;
|
|
116
|
-
/**
|
|
117
|
-
* Update multi-user preferences for instance. Methods are disabled until multi user mode is enabled via the UI.
|
|
118
|
-
* @see POST /v1/admin/preferences
|
|
119
|
-
*/
|
|
120
|
-
createPreference(body?: Record<string, unknown>): Promise<unknown>;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
declare class V1DocumentModule {
|
|
124
|
-
private readonly client;
|
|
125
|
-
constructor(client: DeveloperApiClient);
|
|
126
|
-
/**
|
|
127
|
-
* Upload a new file to RealTimeX to be parsed and prepared for embedding.
|
|
128
|
-
* @see POST /v1/document/upload
|
|
129
|
-
*/
|
|
130
|
-
upload(form: FormData): Promise<unknown>;
|
|
131
|
-
/**
|
|
132
|
-
* 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.
|
|
133
|
-
* @see POST /v1/document/upload/{folderName}
|
|
134
|
-
*/
|
|
135
|
-
uploadFolder(folderName: string, form: FormData): Promise<unknown>;
|
|
136
|
-
/**
|
|
137
|
-
* 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.
|
|
138
|
-
* @see POST /v1/document/upload-link
|
|
139
|
-
*/
|
|
140
|
-
uploadLink(body?: Record<string, unknown>): Promise<unknown>;
|
|
141
|
-
/**
|
|
142
|
-
* Upload a file by specifying its raw text content and metadata values without having to upload a file.
|
|
143
|
-
* @see POST /v1/document/raw-text
|
|
144
|
-
*/
|
|
145
|
-
rawText(body?: Record<string, unknown>): Promise<unknown>;
|
|
146
|
-
/**
|
|
147
|
-
* List of all locally-stored documents in instance
|
|
148
|
-
* @see GET /v1/documents
|
|
149
|
-
*/
|
|
150
|
-
listDocuments(): Promise<unknown>;
|
|
151
|
-
/**
|
|
152
|
-
* Get all documents stored in a specific folder.
|
|
153
|
-
* @see GET /v1/documents/folder/{folderName}
|
|
154
|
-
*/
|
|
155
|
-
getFolder(folderName: string): Promise<unknown>;
|
|
156
|
-
/**
|
|
157
|
-
* Check available filetypes and MIMEs that can be uploaded.
|
|
158
|
-
* @see GET /v1/document/accepted-file-types
|
|
159
|
-
*/
|
|
160
|
-
listAcceptedFileTypes(): Promise<unknown>;
|
|
161
|
-
/**
|
|
162
|
-
* Get the known available metadata schema for when doing a raw-text upload and the acceptable type of value for each key.
|
|
163
|
-
* @see GET /v1/document/metadata-schema
|
|
164
|
-
*/
|
|
165
|
-
getMetadataSchema(): Promise<unknown>;
|
|
166
|
-
/**
|
|
167
|
-
* Get a single document by its unique RealTimeX document name
|
|
168
|
-
* @see GET /v1/document/{docName}
|
|
169
|
-
*/
|
|
170
|
-
getDocument(docName: string): Promise<unknown>;
|
|
171
|
-
/**
|
|
172
|
-
* Create a new folder inside the documents storage directory.
|
|
173
|
-
* @see POST /v1/document/create-folder
|
|
174
|
-
*/
|
|
175
|
-
createFolder(body?: Record<string, unknown>): Promise<unknown>;
|
|
176
|
-
/**
|
|
177
|
-
* Remove a folder and all its contents from the documents storage directory.
|
|
178
|
-
* @see DELETE /v1/document/remove-folder
|
|
179
|
-
*/
|
|
180
|
-
deleteRemoveFolder(): Promise<unknown>;
|
|
181
|
-
/**
|
|
182
|
-
* Move files within the documents storage directory.
|
|
183
|
-
* @see POST /v1/document/move-files
|
|
184
|
-
*/
|
|
185
|
-
moveFiles(body?: Record<string, unknown>): Promise<unknown>;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
declare class V1WorkspaceModule {
|
|
189
|
-
private readonly client;
|
|
190
|
-
constructor(client: DeveloperApiClient);
|
|
191
|
-
/**
|
|
192
|
-
* Create a new workspace
|
|
193
|
-
* @see POST /v1/workspace/new
|
|
194
|
-
*/
|
|
195
|
-
createWorkspace(body?: Record<string, unknown>): Promise<unknown>;
|
|
196
|
-
/**
|
|
197
|
-
* List all current workspaces
|
|
198
|
-
* @see GET /v1/workspaces
|
|
199
|
-
*/
|
|
200
|
-
listWorkspaces(): Promise<unknown>;
|
|
201
|
-
/**
|
|
202
|
-
* Get a workspace by its unique slug.
|
|
203
|
-
* @see GET /v1/workspace/{slug}
|
|
204
|
-
*/
|
|
205
|
-
getWorkspace(slug: string): Promise<unknown>;
|
|
206
|
-
/**
|
|
207
|
-
* Deletes a workspace by its slug.
|
|
208
|
-
* @see DELETE /v1/workspace/{slug}
|
|
209
|
-
*/
|
|
210
|
-
deleteWorkspace(slug: string): Promise<unknown>;
|
|
211
|
-
/**
|
|
212
|
-
* Update workspace settings by its unique slug.
|
|
213
|
-
* @see POST /v1/workspace/{slug}/update
|
|
214
|
-
*/
|
|
215
|
-
updateWorkspace(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
216
|
-
/**
|
|
217
|
-
* Get a workspaces chats regardless of user by its unique slug.
|
|
218
|
-
* @see GET /v1/workspace/{slug}/chats
|
|
219
|
-
*/
|
|
220
|
-
listChats(slug: string): Promise<unknown>;
|
|
221
|
-
/**
|
|
222
|
-
* Add or remove documents from a workspace by its unique slug.
|
|
223
|
-
* @see POST /v1/workspace/{slug}/update-embeddings
|
|
224
|
-
*/
|
|
225
|
-
updateEmbeddings(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
226
|
-
/**
|
|
227
|
-
* Add or remove pin from a document in a workspace by its unique slug.
|
|
228
|
-
* @see POST /v1/workspace/{slug}/update-pin
|
|
229
|
-
*/
|
|
230
|
-
updatePin(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
231
|
-
/**
|
|
232
|
-
* Execute a chat with a workspace
|
|
233
|
-
* @see POST /v1/workspace/{slug}/chat
|
|
234
|
-
*/
|
|
235
|
-
chat(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
236
|
-
/**
|
|
237
|
-
* Execute a streamable chat with a workspace
|
|
238
|
-
* @see POST /v1/workspace/{slug}/stream-chat
|
|
239
|
-
*/
|
|
240
|
-
streamChat(slug: string, body?: Record<string, unknown>): Promise<Response>;
|
|
241
|
-
/**
|
|
242
|
-
* Perform a vector similarity search in a workspace
|
|
243
|
-
* @see POST /v1/workspace/{slug}/vector-search
|
|
244
|
-
*/
|
|
245
|
-
vectorSearch(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
declare class V1SystemModule {
|
|
249
|
-
private readonly client;
|
|
250
|
-
constructor(client: DeveloperApiClient);
|
|
251
|
-
/**
|
|
252
|
-
* Dump all settings to file storage
|
|
253
|
-
* @see GET /v1/system/env-dump
|
|
254
|
-
*/
|
|
255
|
-
getEnvDump(): Promise<unknown>;
|
|
256
|
-
/**
|
|
257
|
-
* Get all current system settings that are defined.
|
|
258
|
-
* @see GET /v1/system
|
|
259
|
-
*/
|
|
260
|
-
getSystem(): Promise<unknown>;
|
|
261
|
-
/**
|
|
262
|
-
* Number of all vectors in connected vector database
|
|
263
|
-
* @see GET /v1/system/vector-count
|
|
264
|
-
*/
|
|
265
|
-
getVectorCount(): Promise<unknown>;
|
|
266
|
-
/**
|
|
267
|
-
* Update a system setting or preference.
|
|
268
|
-
* @see POST /v1/system/update-env
|
|
269
|
-
*/
|
|
270
|
-
updateEnv(body?: Record<string, unknown>): Promise<unknown>;
|
|
271
|
-
/**
|
|
272
|
-
* 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.
|
|
273
|
-
* @see GET /v1/system/export-chats
|
|
274
|
-
*/
|
|
275
|
-
listExportChats(): Promise<unknown>;
|
|
276
|
-
/**
|
|
277
|
-
* Permanently remove documents from the system.
|
|
278
|
-
* @see DELETE /v1/system/remove-documents
|
|
279
|
-
*/
|
|
280
|
-
deleteRemoveDocument(): Promise<unknown>;
|
|
281
|
-
/**
|
|
282
|
-
* Returns a health check object with server uptime and version.
|
|
283
|
-
* @see GET /v1/system/health
|
|
284
|
-
*/
|
|
285
|
-
getHealth(): Promise<unknown>;
|
|
286
|
-
/**
|
|
287
|
-
* Returns a health check object with server uptime and version.
|
|
288
|
-
* @see GET /v1/system/health-version-2
|
|
289
|
-
*/
|
|
290
|
-
getHealthVersion2(): Promise<unknown>;
|
|
291
|
-
/**
|
|
292
|
-
* Returns a health check object with server uptime and version.
|
|
293
|
-
* @see GET /v1/system/health-version-3
|
|
294
|
-
*/
|
|
295
|
-
getHealthVersion3(): Promise<unknown>;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
declare class V1ThreadModule {
|
|
299
|
-
private readonly client;
|
|
300
|
-
constructor(client: DeveloperApiClient);
|
|
301
|
-
/**
|
|
302
|
-
* Create a new workspace thread
|
|
303
|
-
* @see POST /v1/workspace/{slug}/thread/new
|
|
304
|
-
*/
|
|
305
|
-
createThread(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
306
|
-
/**
|
|
307
|
-
* Update thread settings by its unique slug.
|
|
308
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/update
|
|
309
|
-
*/
|
|
310
|
-
updateThread(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
311
|
-
/**
|
|
312
|
-
* Delete a workspace thread
|
|
313
|
-
* @see DELETE /v1/workspace/{slug}/thread/{threadSlug}
|
|
314
|
-
*/
|
|
315
|
-
deleteThread(slug: string, threadSlug: string): Promise<unknown>;
|
|
316
|
-
/**
|
|
317
|
-
* Get chats for a workspace thread
|
|
318
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/chats
|
|
319
|
-
*/
|
|
320
|
-
listChats(slug: string, threadSlug: string): Promise<unknown>;
|
|
321
|
-
/**
|
|
322
|
-
* Chat with a workspace thread
|
|
323
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/chat
|
|
324
|
-
*/
|
|
325
|
-
chat(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
326
|
-
/**
|
|
327
|
-
* Stream chat with a workspace thread
|
|
328
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/stream-chat
|
|
329
|
-
*/
|
|
330
|
-
streamChat(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<Response>;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
declare class V1UsersModule {
|
|
334
|
-
private readonly client;
|
|
335
|
-
constructor(client: DeveloperApiClient);
|
|
336
|
-
/**
|
|
337
|
-
* List all users
|
|
338
|
-
* @see GET /v1/users
|
|
339
|
-
*/
|
|
340
|
-
listUsers(): Promise<unknown>;
|
|
341
|
-
/**
|
|
342
|
-
* Issue a temporary auth token for a user
|
|
343
|
-
* @see GET /v1/users/{id}/issue-auth-token
|
|
344
|
-
*/
|
|
345
|
-
getIssueAuthToken(id: string): Promise<unknown>;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
declare class V1OpenAIModule {
|
|
349
|
-
private readonly client;
|
|
350
|
-
constructor(client: DeveloperApiClient);
|
|
351
|
-
/**
|
|
352
|
-
* Get all available "models" which are workspaces you can use for chatting.
|
|
353
|
-
* @see GET /v1/openai/models
|
|
354
|
-
*/
|
|
355
|
-
listModels(): Promise<unknown>;
|
|
356
|
-
/**
|
|
357
|
-
* Execute a chat with a workspace with OpenAI compatibility. Supports streaming as well. Model must be a workspace slug from /models.
|
|
358
|
-
* @see POST /v1/openai/chat/completions
|
|
359
|
-
*/
|
|
360
|
-
chatCompletions(body?: Record<string, unknown>): Promise<unknown>;
|
|
361
|
-
/**
|
|
362
|
-
* 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.
|
|
363
|
-
* @see POST /v1/openai/embeddings
|
|
364
|
-
*/
|
|
365
|
-
createEmbedding(body?: Record<string, unknown>): Promise<unknown>;
|
|
366
|
-
/**
|
|
367
|
-
* 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.
|
|
368
|
-
* @see GET /v1/openai/vector_stores
|
|
369
|
-
*/
|
|
370
|
-
listVectorStores(): Promise<unknown>;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
declare class V1EmbedModule {
|
|
374
|
-
private readonly client;
|
|
375
|
-
constructor(client: DeveloperApiClient);
|
|
376
|
-
/**
|
|
377
|
-
* List all active embeds
|
|
378
|
-
* @see GET /v1/embed
|
|
379
|
-
*/
|
|
380
|
-
getEmbed(): Promise<unknown>;
|
|
381
|
-
/**
|
|
382
|
-
* Get all chats for a specific embed
|
|
383
|
-
* @see GET /v1/embed/{embedUuid}/chats
|
|
384
|
-
*/
|
|
385
|
-
listChats(embedUuid: string): Promise<unknown>;
|
|
386
|
-
/**
|
|
387
|
-
* Get chats for a specific embed and session
|
|
388
|
-
* @see GET /v1/embed/{embedUuid}/chats/{sessionUuid}
|
|
389
|
-
*/
|
|
390
|
-
getChat(embedUuid: string, sessionUuid: string): Promise<unknown>;
|
|
391
|
-
/**
|
|
392
|
-
* Create a new embed configuration
|
|
393
|
-
* @see POST /v1/embed/new
|
|
394
|
-
*/
|
|
395
|
-
createEmbed(body?: Record<string, unknown>): Promise<unknown>;
|
|
396
|
-
/**
|
|
397
|
-
* Update an existing embed configuration
|
|
398
|
-
* @see POST /v1/embed/{embedUuid}
|
|
399
|
-
*/
|
|
400
|
-
updateEmbed(embedUuid: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
401
|
-
/**
|
|
402
|
-
* Delete an existing embed configuration
|
|
403
|
-
* @see DELETE /v1/embed/{embedUuid}
|
|
404
|
-
*/
|
|
405
|
-
deleteEmbed(embedUuid: string): Promise<unknown>;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
declare class V1ChannelsModule {
|
|
409
|
-
private readonly client;
|
|
410
|
-
constructor(client: DeveloperApiClient);
|
|
411
|
-
/**
|
|
412
|
-
* List configured channel plugins without exposing encrypted plugin configuration.
|
|
413
|
-
* @see GET /v1/channels/plugins
|
|
414
|
-
*/
|
|
415
|
-
listPlugins(): Promise<unknown>;
|
|
416
|
-
/**
|
|
417
|
-
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
418
|
-
* @see POST /v1/channels/plugins
|
|
419
|
-
*/
|
|
420
|
-
createPlugin(body?: Record<string, unknown>): Promise<unknown>;
|
|
421
|
-
/**
|
|
422
|
-
* Get editable non-secret channel plugin configuration.
|
|
423
|
-
* @see GET /v1/channels/plugins/{id}/config
|
|
424
|
-
*/
|
|
425
|
-
getConfig(id: string): Promise<unknown>;
|
|
426
|
-
/**
|
|
427
|
-
* Update a channel plugin. Config values are encrypted before storage.
|
|
428
|
-
* @see POST /v1/channels/plugins/{id}/update
|
|
429
|
-
*/
|
|
430
|
-
updatePlugin(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
431
|
-
/**
|
|
432
|
-
* Delete a channel plugin and stop any running plugin instance.
|
|
433
|
-
* @see DELETE /v1/channels/plugins/{id}
|
|
434
|
-
*/
|
|
435
|
-
deletePlugin(id: string): Promise<unknown>;
|
|
436
|
-
/**
|
|
437
|
-
* Enable and start a channel plugin.
|
|
438
|
-
* @see POST /v1/channels/plugins/{id}/start
|
|
439
|
-
*/
|
|
440
|
-
pluginsStart(id: string): Promise<unknown>;
|
|
441
|
-
/**
|
|
442
|
-
* Disable and stop a channel plugin.
|
|
443
|
-
* @see POST /v1/channels/plugins/{id}/stop
|
|
444
|
-
*/
|
|
445
|
-
pluginsStop(id: string): Promise<unknown>;
|
|
446
|
-
/**
|
|
447
|
-
* Test channel provider credentials without saving a plugin.
|
|
448
|
-
* @see POST /v1/channels/plugins/test
|
|
449
|
-
*/
|
|
450
|
-
pluginsTest(body?: Record<string, unknown>): Promise<unknown>;
|
|
451
|
-
/**
|
|
452
|
-
* Get runtime status for all running channel plugins.
|
|
453
|
-
* @see GET /v1/channels/status
|
|
454
|
-
*/
|
|
455
|
-
getStatus(): Promise<unknown>;
|
|
456
|
-
/**
|
|
457
|
-
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
458
|
-
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
459
|
-
*/
|
|
460
|
-
pluginsQrLoginStart(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
461
|
-
/**
|
|
462
|
-
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
463
|
-
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
464
|
-
*/
|
|
465
|
-
getState(id: string): Promise<unknown>;
|
|
466
|
-
/**
|
|
467
|
-
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
468
|
-
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
469
|
-
*/
|
|
470
|
-
pluginsQrLoginCancel(id: string): Promise<unknown>;
|
|
471
|
-
/**
|
|
472
|
-
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
473
|
-
* @see POST /v1/channels/plugins/{id}/logout
|
|
474
|
-
*/
|
|
475
|
-
pluginsLogout(id: string): Promise<unknown>;
|
|
476
|
-
/**
|
|
477
|
-
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
478
|
-
* @see POST /v1/channels/plugins/{id}/policies
|
|
479
|
-
*/
|
|
480
|
-
pluginsPolicies(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
481
|
-
/**
|
|
482
|
-
* Search a Zalo personal friends directory.
|
|
483
|
-
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
484
|
-
*/
|
|
485
|
-
listDirectoryFriends(id: string): Promise<unknown>;
|
|
486
|
-
/**
|
|
487
|
-
* Search a Zalo personal groups directory.
|
|
488
|
-
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
489
|
-
*/
|
|
490
|
-
listDirectoryGroups(id: string): Promise<unknown>;
|
|
491
|
-
/**
|
|
492
|
-
* List pending pairing codes for a channel plugin.
|
|
493
|
-
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
494
|
-
*/
|
|
495
|
-
listPluginPairingCodes(id: string): Promise<unknown>;
|
|
496
|
-
/**
|
|
497
|
-
* Generate a pairing code for a channel plugin.
|
|
498
|
-
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
499
|
-
*/
|
|
500
|
-
pluginsPairingCodes(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
501
|
-
/**
|
|
502
|
-
* Approve a channel pairing code.
|
|
503
|
-
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
504
|
-
*/
|
|
505
|
-
pairingCodesApprove(id: string): Promise<unknown>;
|
|
506
|
-
/**
|
|
507
|
-
* Reject a channel pairing code.
|
|
508
|
-
* @see POST /v1/channels/pairing-codes/{id}/reject
|
|
509
|
-
*/
|
|
510
|
-
pairingCodesReject(id: string): Promise<unknown>;
|
|
511
|
-
/**
|
|
512
|
-
* List channel users for a plugin.
|
|
513
|
-
* @see GET /v1/channels/plugins/{id}/users
|
|
514
|
-
*/
|
|
515
|
-
listPluginUsers(id: string): Promise<unknown>;
|
|
516
|
-
/**
|
|
517
|
-
* Set authorization for a channel user.
|
|
518
|
-
* @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
|
|
519
|
-
*/
|
|
520
|
-
pluginsUsersAuthorization(id: string, userId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
521
|
-
/**
|
|
522
|
-
* Remove a channel user from a plugin.
|
|
523
|
-
* @see DELETE /v1/channels/plugins/{id}/users/{userId}
|
|
524
|
-
*/
|
|
525
|
-
deleteUser(id: string, userId: string): Promise<unknown>;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
declare class V1DesktopRuntimeSessionsModule {
|
|
529
|
-
private readonly client;
|
|
530
|
-
constructor(client: DeveloperApiClient);
|
|
531
|
-
/**
|
|
532
|
-
* Open the shared terminal launcher in the Electron desktop app.
|
|
533
|
-
* @see POST /sdk/desktop/runtime-sessions/open-launcher
|
|
534
|
-
*/
|
|
535
|
-
openLauncher(body?: Record<string, unknown>): Promise<unknown>;
|
|
536
|
-
/**
|
|
537
|
-
* Launch a local PTY-backed shell terminal in the Electron desktop app.
|
|
538
|
-
* @see POST /sdk/desktop/runtime-sessions/launch-terminal-shell
|
|
539
|
-
*/
|
|
540
|
-
launchTerminalShell(body?: Record<string, unknown>): Promise<unknown>;
|
|
541
|
-
/**
|
|
542
|
-
* Launch a local PTY-backed CLI agent terminal in the Electron desktop app.
|
|
543
|
-
* @see POST /sdk/desktop/runtime-sessions/launch-terminal-cli-agent
|
|
544
|
-
*/
|
|
545
|
-
launchTerminalCliAgent(body?: Record<string, unknown>): Promise<unknown>;
|
|
546
|
-
/**
|
|
547
|
-
* List desktop PTY-backed runtime sessions currently known to the Electron app.
|
|
548
|
-
* @see GET /sdk/desktop/runtime-sessions
|
|
549
|
-
*/
|
|
550
|
-
listRuntimeSessions(): Promise<unknown>;
|
|
551
|
-
/**
|
|
552
|
-
* Fetch one desktop PTY-backed runtime session by runtime session ID or PTY session ID.
|
|
553
|
-
* @see GET /sdk/desktop/runtime-sessions/{sessionId}
|
|
554
|
-
*/
|
|
555
|
-
getRuntimeSession(sessionId: string): Promise<unknown>;
|
|
556
|
-
/**
|
|
557
|
-
* Close an existing desktop runtime session.
|
|
558
|
-
* @see DELETE /sdk/desktop/runtime-sessions/{sessionId}
|
|
559
|
-
*/
|
|
560
|
-
deleteRuntimeSession(sessionId: string): Promise<unknown>;
|
|
561
|
-
/**
|
|
562
|
-
* Write input to an existing desktop runtime session. Use `message` to submit a CLI turn or `input` for raw PTY data.
|
|
563
|
-
* @see POST /sdk/desktop/runtime-sessions/{sessionId}/write
|
|
564
|
-
*/
|
|
565
|
-
write(sessionId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
566
|
-
/**
|
|
567
|
-
* Approve or deny a pending desktop runtime session action.
|
|
568
|
-
* @see POST /sdk/desktop/runtime-sessions/{sessionId}/permission
|
|
569
|
-
*/
|
|
570
|
-
permission(sessionId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
declare class V1DesktopBrowserModule {
|
|
574
|
-
private readonly client;
|
|
575
|
-
constructor(client: DeveloperApiClient);
|
|
576
|
-
/**
|
|
577
|
-
* List RealTimeX Browser sessions available in the Electron desktop app.
|
|
578
|
-
* @see GET /sdk/desktop/browser/sessions
|
|
579
|
-
*/
|
|
580
|
-
listSessions(): Promise<unknown>;
|
|
581
|
-
/**
|
|
582
|
-
* Create a named RealTimeX Browser session in the Electron desktop app.
|
|
583
|
-
* @see POST /sdk/desktop/browser/sessions
|
|
584
|
-
*/
|
|
585
|
-
createSession(body?: Record<string, unknown>): Promise<unknown>;
|
|
586
|
-
/**
|
|
587
|
-
* Get a specific RealTimeX Browser session by session name.
|
|
588
|
-
* @see GET /sdk/desktop/browser/sessions/{sessionName}
|
|
589
|
-
*/
|
|
590
|
-
getSession(sessionName: string): Promise<unknown>;
|
|
591
|
-
/**
|
|
592
|
-
* Delete a named RealTimeX Browser session from the Electron desktop app.
|
|
593
|
-
* @see DELETE /sdk/desktop/browser/sessions/{sessionName}
|
|
594
|
-
*/
|
|
595
|
-
deleteSession(sessionName: string): Promise<unknown>;
|
|
596
|
-
/**
|
|
597
|
-
* Create a RealTimeX Browser tab, optionally launching the browser session if needed.
|
|
598
|
-
* @see POST /sdk/desktop/browser/tabs
|
|
599
|
-
*/
|
|
600
|
-
createTab(body?: Record<string, unknown>): Promise<unknown>;
|
|
601
|
-
/**
|
|
602
|
-
* Get a RealTimeX Browser tab snapshot by tab reference.
|
|
603
|
-
* @see GET /sdk/desktop/browser/tabs/{tabRef}
|
|
604
|
-
*/
|
|
605
|
-
getTab(tabRef: string): Promise<unknown>;
|
|
606
|
-
/**
|
|
607
|
-
* Close an existing RealTimeX Browser tab.
|
|
608
|
-
* @see DELETE /sdk/desktop/browser/tabs/{tabRef}
|
|
609
|
-
*/
|
|
610
|
-
deleteTab(tabRef: string): Promise<unknown>;
|
|
611
|
-
/**
|
|
612
|
-
* Evaluate JavaScript in a specific RealTimeX Browser tab.
|
|
613
|
-
* @see POST /sdk/desktop/browser/tabs/{tabRef}/evaluate
|
|
614
|
-
*/
|
|
615
|
-
evaluateTab(tabRef: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
616
|
-
/**
|
|
617
|
-
* Focus an existing RealTimeX Browser tab.
|
|
618
|
-
* @see POST /sdk/desktop/browser/tabs/{tabRef}/focus
|
|
619
|
-
*/
|
|
620
|
-
focusTab(tabRef: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
621
|
-
/**
|
|
622
|
-
* Navigate an existing RealTimeX Browser tab to a new URL.
|
|
623
|
-
* @see POST /sdk/desktop/browser/tabs/{tabRef}/navigate
|
|
624
|
-
*/
|
|
625
|
-
navigateTab(tabRef: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* V1ApiNamespace - Container for all RealtimeX Developer API (v1) modules.
|
|
630
|
-
*
|
|
631
|
-
* Usage:
|
|
632
|
-
* const sdk = new RealtimeXSDK({ realtimex: { apiKey: 'sk-...' } });
|
|
633
|
-
* await sdk.v1?.workspace.listWorkspaces();
|
|
634
|
-
* await sdk.v1?.admin.listUsers();
|
|
635
|
-
*
|
|
636
|
-
* Regenerate modules: node scripts/generate-v1-sdk.mjs --force
|
|
637
|
-
*/
|
|
638
|
-
|
|
639
|
-
declare class V1ApiNamespace {
|
|
640
|
-
/** @internal Shared HTTP client used by all v1 modules */
|
|
641
|
-
readonly _client: DeveloperApiClient;
|
|
642
|
-
auth: V1AuthModule;
|
|
643
|
-
admin: V1AdminModule;
|
|
644
|
-
document: V1DocumentModule;
|
|
645
|
-
workspace: V1WorkspaceModule;
|
|
646
|
-
system: V1SystemModule;
|
|
647
|
-
thread: V1ThreadModule;
|
|
648
|
-
users: V1UsersModule;
|
|
649
|
-
openai: V1OpenAIModule;
|
|
650
|
-
embed: V1EmbedModule;
|
|
651
|
-
channels: V1ChannelsModule;
|
|
652
|
-
desktopRuntimeSessions: V1DesktopRuntimeSessionsModule;
|
|
653
|
-
desktopBrowser: V1DesktopBrowserModule;
|
|
654
|
-
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* RealtimeX SDK - Developer API (v1) Error Classes
|
|
659
|
-
*/
|
|
660
|
-
declare class DeveloperApiError extends Error {
|
|
661
|
-
readonly status: number;
|
|
662
|
-
readonly code: string;
|
|
663
|
-
constructor(status: number, code: string, message: string);
|
|
664
|
-
}
|
|
665
|
-
declare class AuthenticationError extends DeveloperApiError {
|
|
666
|
-
constructor(message?: string);
|
|
667
|
-
}
|
|
668
|
-
declare class NotFoundError extends DeveloperApiError {
|
|
669
|
-
constructor(message?: string);
|
|
670
|
-
}
|
|
671
|
-
declare class ValidationError extends DeveloperApiError {
|
|
672
|
-
constructor(message: string);
|
|
673
|
-
}
|
|
674
|
-
declare class ServerError extends DeveloperApiError {
|
|
675
|
-
constructor(message?: string);
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, V1DesktopRuntimeSessionsModule as a, V1DesktopBrowserModule as b, DeveloperApiError as c, ValidationError as d, V1AuthModule as e, V1AdminModule as f, V1DocumentModule as g, V1WorkspaceModule as h, V1SystemModule as i, V1ThreadModule as j, V1UsersModule as k, V1OpenAIModule as l, V1EmbedModule as m, V1ChannelsModule as n };
|