@realtimex/sdk 2.0.16 → 2.0.18
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/package.json +10 -43
- package/skills/realtimex-moderator-sdk/SKILL.md +34 -6
- package/README.md +0 -382
- package/dist/chunk-SFY6E7TY.mjs +0 -132
- package/dist/chunk-UPXEAZIT.mjs +0 -41
- package/dist/chunk-XKQRTTIC.mjs +0 -567
- package/dist/cli/index.d.mts +0 -54
- package/dist/cli/index.d.ts +0 -54
- package/dist/cli/index.js +0 -185
- package/dist/cli/index.mjs +0 -9
- package/dist/errors-DwEt8WYf.d.mts +0 -399
- package/dist/errors-DwEt8WYf.d.ts +0 -399
- package/dist/index.d.mts +0 -32
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -785
- package/dist/index.mjs +0 -59
- package/dist/v1/index.d.mts +0 -64
- package/dist/v1/index.d.ts +0 -64
- package/dist/v1/index.js +0 -733
- package/dist/v1/index.mjs +0 -124
package/dist/cli/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
declare class CliApiClient {
|
|
2
|
-
private readonly baseUrl;
|
|
3
|
-
private readonly apiKey;
|
|
4
|
-
private readonly appId?;
|
|
5
|
-
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
6
|
-
private getHeaders;
|
|
7
|
-
private handleResponse;
|
|
8
|
-
request<T = unknown>(method: string, path: string, body?: unknown): Promise<T>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface NameRequest {
|
|
12
|
-
name: string;
|
|
13
|
-
}
|
|
14
|
-
interface CreateThreadRequest {
|
|
15
|
-
name?: string;
|
|
16
|
-
}
|
|
17
|
-
interface WorkspaceDefaultAgentRequest {
|
|
18
|
-
canonical: string;
|
|
19
|
-
providerId?: string;
|
|
20
|
-
modelId?: string;
|
|
21
|
-
}
|
|
22
|
-
interface SendLlmMessageRequest {
|
|
23
|
-
message: string;
|
|
24
|
-
chatProvider: string;
|
|
25
|
-
chatModel: string;
|
|
26
|
-
attachments?: Record<string, unknown>[];
|
|
27
|
-
webSearchEnabled?: boolean;
|
|
28
|
-
thinkingEffort?: string;
|
|
29
|
-
chatTuningConfig?: Record<string, unknown>;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
}
|
|
32
|
-
declare class CliApiNamespace {
|
|
33
|
-
/** @internal Shared HTTP client used by all CLI API methods */
|
|
34
|
-
readonly _client: CliApiClient;
|
|
35
|
-
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
36
|
-
prepare(): Promise<unknown>;
|
|
37
|
-
listWorkspaces(): Promise<unknown>;
|
|
38
|
-
createWorkspace(body: NameRequest): Promise<unknown>;
|
|
39
|
-
getWorkspace(workspaceSlug: string): Promise<unknown>;
|
|
40
|
-
renameWorkspace(workspaceSlug: string, body: NameRequest): Promise<unknown>;
|
|
41
|
-
deleteWorkspace(workspaceSlug: string): Promise<unknown>;
|
|
42
|
-
setWorkspaceDefaultAgent(workspaceSlug: string, body: WorkspaceDefaultAgentRequest): Promise<unknown>;
|
|
43
|
-
clearWorkspaceDefaultAgent(workspaceSlug: string): Promise<unknown>;
|
|
44
|
-
listThreads(workspaceSlug: string): Promise<unknown>;
|
|
45
|
-
createThread(workspaceSlug: string, body?: CreateThreadRequest): Promise<unknown>;
|
|
46
|
-
getThread(workspaceSlug: string, threadSlug: string): Promise<unknown>;
|
|
47
|
-
renameThread(workspaceSlug: string, threadSlug: string, body: NameRequest): Promise<unknown>;
|
|
48
|
-
deleteThread(workspaceSlug: string, threadSlug: string): Promise<unknown>;
|
|
49
|
-
sendLlmMessage(workspaceSlug: string, threadSlug: string, body: SendLlmMessageRequest): Promise<unknown>;
|
|
50
|
-
listLlmProviders(): Promise<unknown>;
|
|
51
|
-
listLlmModels(provider: string): Promise<unknown>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { CliApiClient, CliApiNamespace, type CreateThreadRequest, type NameRequest, type SendLlmMessageRequest, type WorkspaceDefaultAgentRequest };
|
package/dist/cli/index.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/cli/index.ts
|
|
21
|
-
var cli_exports = {};
|
|
22
|
-
__export(cli_exports, {
|
|
23
|
-
CliApiClient: () => CliApiClient,
|
|
24
|
-
CliApiNamespace: () => CliApiNamespace
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(cli_exports);
|
|
27
|
-
|
|
28
|
-
// src/v1/errors.ts
|
|
29
|
-
var DeveloperApiError = class extends Error {
|
|
30
|
-
constructor(status, code, message) {
|
|
31
|
-
super(message);
|
|
32
|
-
this.status = status;
|
|
33
|
-
this.code = code;
|
|
34
|
-
this.name = "DeveloperApiError";
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var AuthenticationError = class extends DeveloperApiError {
|
|
38
|
-
constructor(message = "Invalid or missing API key") {
|
|
39
|
-
super(403, "AUTHENTICATION_ERROR", message);
|
|
40
|
-
this.name = "AuthenticationError";
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var NotFoundError = class extends DeveloperApiError {
|
|
44
|
-
constructor(message = "Resource not found") {
|
|
45
|
-
super(404, "NOT_FOUND", message);
|
|
46
|
-
this.name = "NotFoundError";
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var ValidationError = class extends DeveloperApiError {
|
|
50
|
-
constructor(message) {
|
|
51
|
-
super(400, "VALIDATION_ERROR", message);
|
|
52
|
-
this.name = "ValidationError";
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var ServerError = class extends DeveloperApiError {
|
|
56
|
-
constructor(message = "Internal server error") {
|
|
57
|
-
super(500, "SERVER_ERROR", message);
|
|
58
|
-
this.name = "ServerError";
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// src/cli/client.ts
|
|
63
|
-
var CliApiClient = class {
|
|
64
|
-
constructor(baseUrl, apiKey, appId) {
|
|
65
|
-
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
66
|
-
this.apiKey = apiKey;
|
|
67
|
-
this.appId = appId;
|
|
68
|
-
}
|
|
69
|
-
getHeaders(extra) {
|
|
70
|
-
const headers = {
|
|
71
|
-
"Content-Type": "application/json",
|
|
72
|
-
"Authorization": `Bearer ${this.apiKey}`
|
|
73
|
-
};
|
|
74
|
-
if (this.appId) headers["x-app-id"] = this.appId;
|
|
75
|
-
return { ...headers, ...extra };
|
|
76
|
-
}
|
|
77
|
-
async handleResponse(response) {
|
|
78
|
-
let data;
|
|
79
|
-
try {
|
|
80
|
-
data = await response.json();
|
|
81
|
-
} catch {
|
|
82
|
-
data = {};
|
|
83
|
-
}
|
|
84
|
-
if (response.ok) return data;
|
|
85
|
-
const message = data?.message || data?.error || response.statusText || "Request failed";
|
|
86
|
-
switch (response.status) {
|
|
87
|
-
case 400:
|
|
88
|
-
throw new ValidationError(message);
|
|
89
|
-
case 401:
|
|
90
|
-
case 403:
|
|
91
|
-
throw new AuthenticationError(message);
|
|
92
|
-
case 404:
|
|
93
|
-
throw new NotFoundError(message);
|
|
94
|
-
case 500:
|
|
95
|
-
case 502:
|
|
96
|
-
case 503:
|
|
97
|
-
throw new ServerError(message);
|
|
98
|
-
default:
|
|
99
|
-
throw new DeveloperApiError(response.status, "API_ERROR", message);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
async request(method, path, body) {
|
|
103
|
-
const url = `${this.baseUrl}/cli${path}`;
|
|
104
|
-
const response = await fetch(url, {
|
|
105
|
-
method,
|
|
106
|
-
headers: this.getHeaders(),
|
|
107
|
-
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
108
|
-
});
|
|
109
|
-
return this.handleResponse(response);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// src/cli/namespace.ts
|
|
114
|
-
var CliApiNamespace = class {
|
|
115
|
-
constructor(baseUrl, apiKey, appId) {
|
|
116
|
-
this._client = new CliApiClient(baseUrl, apiKey, appId);
|
|
117
|
-
}
|
|
118
|
-
async prepare() {
|
|
119
|
-
return this._client.request("GET", "/prepare");
|
|
120
|
-
}
|
|
121
|
-
async listWorkspaces() {
|
|
122
|
-
return this._client.request("GET", "/list-workspaces");
|
|
123
|
-
}
|
|
124
|
-
async createWorkspace(body) {
|
|
125
|
-
return this._client.request("POST", "/create-workspace", body);
|
|
126
|
-
}
|
|
127
|
-
async getWorkspace(workspaceSlug) {
|
|
128
|
-
return this._client.request("GET", `/get-workspace/${encodeURIComponent(workspaceSlug)}`);
|
|
129
|
-
}
|
|
130
|
-
async renameWorkspace(workspaceSlug, body) {
|
|
131
|
-
return this._client.request("POST", `/rename-workspace/${encodeURIComponent(workspaceSlug)}`, body);
|
|
132
|
-
}
|
|
133
|
-
async deleteWorkspace(workspaceSlug) {
|
|
134
|
-
return this._client.request("DELETE", `/delete-workspace/${encodeURIComponent(workspaceSlug)}`);
|
|
135
|
-
}
|
|
136
|
-
async setWorkspaceDefaultAgent(workspaceSlug, body) {
|
|
137
|
-
return this._client.request("POST", `/set-workspace-default-agent/${encodeURIComponent(workspaceSlug)}`, body);
|
|
138
|
-
}
|
|
139
|
-
async clearWorkspaceDefaultAgent(workspaceSlug) {
|
|
140
|
-
return this._client.request("DELETE", `/clear-workspace-default-agent/${encodeURIComponent(workspaceSlug)}`);
|
|
141
|
-
}
|
|
142
|
-
async listThreads(workspaceSlug) {
|
|
143
|
-
return this._client.request("GET", `/list-threads/${encodeURIComponent(workspaceSlug)}`);
|
|
144
|
-
}
|
|
145
|
-
async createThread(workspaceSlug, body) {
|
|
146
|
-
return this._client.request("POST", `/create-thread/${encodeURIComponent(workspaceSlug)}`, body);
|
|
147
|
-
}
|
|
148
|
-
async getThread(workspaceSlug, threadSlug) {
|
|
149
|
-
return this._client.request(
|
|
150
|
-
"GET",
|
|
151
|
-
`/get-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
async renameThread(workspaceSlug, threadSlug, body) {
|
|
155
|
-
return this._client.request(
|
|
156
|
-
"POST",
|
|
157
|
-
`/rename-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`,
|
|
158
|
-
body
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
async deleteThread(workspaceSlug, threadSlug) {
|
|
162
|
-
return this._client.request(
|
|
163
|
-
"DELETE",
|
|
164
|
-
`/delete-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
async sendLlmMessage(workspaceSlug, threadSlug, body) {
|
|
168
|
-
return this._client.request(
|
|
169
|
-
"POST",
|
|
170
|
-
`/send-llm-message/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`,
|
|
171
|
-
body
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
async listLlmProviders() {
|
|
175
|
-
return this._client.request("GET", "/list-llm-providers");
|
|
176
|
-
}
|
|
177
|
-
async listLlmModels(provider) {
|
|
178
|
-
return this._client.request("GET", `/list-llm-models/${encodeURIComponent(provider)}`);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
182
|
-
0 && (module.exports = {
|
|
183
|
-
CliApiClient,
|
|
184
|
-
CliApiNamespace
|
|
185
|
-
});
|
package/dist/cli/index.mjs
DELETED
|
@@ -1,399 +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 V1ChatModule {
|
|
34
|
-
private readonly client;
|
|
35
|
-
constructor(client: DeveloperApiClient);
|
|
36
|
-
/**
|
|
37
|
-
* Stream a chat response for a workspace default thread.
|
|
38
|
-
* @see POST /v1/workspace/{slug}/stream-chat
|
|
39
|
-
*/
|
|
40
|
-
streamWorkspaceChat(slug: string, body?: Record<string, unknown>): Promise<Response>;
|
|
41
|
-
/**
|
|
42
|
-
* Stream a chat response for a workspace thread.
|
|
43
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/stream-chat
|
|
44
|
-
*/
|
|
45
|
-
streamThreadChat(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<Response>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
declare class V1WorkspaceModule {
|
|
49
|
-
private readonly client;
|
|
50
|
-
constructor(client: DeveloperApiClient);
|
|
51
|
-
/**
|
|
52
|
-
* List workspaces using the app workspace list behavior.
|
|
53
|
-
* @see GET /v1/workspaces
|
|
54
|
-
*/
|
|
55
|
-
listWorkspaces(): Promise<unknown>;
|
|
56
|
-
/**
|
|
57
|
-
* Create a workspace using the app workspace creation behavior.
|
|
58
|
-
* @see POST /v1/workspace/new
|
|
59
|
-
*/
|
|
60
|
-
createWorkspace(body?: Record<string, unknown>): Promise<unknown>;
|
|
61
|
-
/**
|
|
62
|
-
* Search workspaces and threads.
|
|
63
|
-
* @see POST /v1/workspace/search
|
|
64
|
-
*/
|
|
65
|
-
searchWorkspaces(body?: Record<string, unknown>): Promise<unknown>;
|
|
66
|
-
/**
|
|
67
|
-
* Get a workspace by slug.
|
|
68
|
-
* @see GET /v1/workspace/{slug}
|
|
69
|
-
*/
|
|
70
|
-
getWorkspace(slug: string): Promise<unknown>;
|
|
71
|
-
/**
|
|
72
|
-
* Delete a workspace.
|
|
73
|
-
* @see DELETE /v1/workspace/{slug}
|
|
74
|
-
*/
|
|
75
|
-
deleteWorkspace(slug: string): Promise<unknown>;
|
|
76
|
-
/**
|
|
77
|
-
* Get document content for a workspace document.
|
|
78
|
-
* @see GET /v1/workspace/{slug}/document/{docPath}
|
|
79
|
-
*/
|
|
80
|
-
getWorkspaceDocument(slug: string, docPath: string): Promise<unknown>;
|
|
81
|
-
/**
|
|
82
|
-
* Get or create workspace config.
|
|
83
|
-
* @see GET /v1/workspace/{slug}/config
|
|
84
|
-
*/
|
|
85
|
-
getWorkspaceConfig(slug: string): Promise<unknown>;
|
|
86
|
-
/**
|
|
87
|
-
* Update workspace config.
|
|
88
|
-
* @see POST /v1/workspace/{slug}/config
|
|
89
|
-
*/
|
|
90
|
-
updateWorkspaceConfig(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
91
|
-
/**
|
|
92
|
-
* Update workspace settings by slug.
|
|
93
|
-
* @see POST /v1/workspace/{slug}/update
|
|
94
|
-
*/
|
|
95
|
-
updateWorkspace(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
96
|
-
/**
|
|
97
|
-
* Generate a local LLM tuning suggestion.
|
|
98
|
-
* @see POST /v1/workspace/{slug}/local-llm-tuning-suggestion
|
|
99
|
-
*/
|
|
100
|
-
suggestWorkspaceLocalLlmTuning(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
101
|
-
/**
|
|
102
|
-
* Upload a document to workspace documents.
|
|
103
|
-
* @see POST /v1/workspace/{slug}/upload
|
|
104
|
-
*/
|
|
105
|
-
uploadWorkspaceDocument(slug: string, form: FormData): Promise<unknown>;
|
|
106
|
-
/**
|
|
107
|
-
* Upload a link to workspace documents.
|
|
108
|
-
* @see POST /v1/workspace/{slug}/upload-link
|
|
109
|
-
*/
|
|
110
|
-
uploadWorkspaceLink(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
111
|
-
/**
|
|
112
|
-
* Update workspace document embeddings.
|
|
113
|
-
* @see POST /v1/workspace/{slug}/update-embeddings
|
|
114
|
-
*/
|
|
115
|
-
updateWorkspaceEmbeddings(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
116
|
-
/**
|
|
117
|
-
* Reset workspace vector database records.
|
|
118
|
-
* @see DELETE /v1/workspace/{slug}/reset-vector-db
|
|
119
|
-
*/
|
|
120
|
-
resetWorkspaceVectorDb(slug: string): Promise<unknown>;
|
|
121
|
-
/**
|
|
122
|
-
* Get workspace LLM provider metadata.
|
|
123
|
-
* @see GET /v1/workspace/{slug}/llm-provider
|
|
124
|
-
*/
|
|
125
|
-
getWorkspaceLlmProvider(slug: string): Promise<unknown>;
|
|
126
|
-
/**
|
|
127
|
-
* Get workspace vision availability.
|
|
128
|
-
* @see GET /v1/workspace/{slug}/vision-availability
|
|
129
|
-
*/
|
|
130
|
-
getWorkspaceVisionAvailability(slug: string): Promise<unknown>;
|
|
131
|
-
/**
|
|
132
|
-
* Get workspace chats.
|
|
133
|
-
* @see GET /v1/workspace/{slug}/chats
|
|
134
|
-
*/
|
|
135
|
-
getWorkspaceChats(slug: string): Promise<unknown>;
|
|
136
|
-
/**
|
|
137
|
-
* Get workspace terminal session details.
|
|
138
|
-
* @see GET /v1/workspace/{slug}/terminal-session-details
|
|
139
|
-
*/
|
|
140
|
-
getWorkspaceTerminalSessionDetails(slug: string): Promise<unknown>;
|
|
141
|
-
/**
|
|
142
|
-
* Persist terminal UI events.
|
|
143
|
-
* @see POST /v1/workspace/{slug}/terminal-ui-events
|
|
144
|
-
*/
|
|
145
|
-
persistWorkspaceTerminalUiEvents(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
146
|
-
/**
|
|
147
|
-
* Persist a linked terminal message.
|
|
148
|
-
* @see POST /v1/workspace/{slug}/linked-terminal-message
|
|
149
|
-
*/
|
|
150
|
-
createWorkspaceLinkedTerminalMessage(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
151
|
-
/**
|
|
152
|
-
* Delete selected workspace chats.
|
|
153
|
-
* @see DELETE /v1/workspace/{slug}/delete-chats
|
|
154
|
-
*/
|
|
155
|
-
deleteWorkspaceChats(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
156
|
-
/**
|
|
157
|
-
* Delete edited workspace chats from a starting id.
|
|
158
|
-
* @see DELETE /v1/workspace/{slug}/delete-edited-chats
|
|
159
|
-
*/
|
|
160
|
-
deleteEditedWorkspaceChats(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
161
|
-
/**
|
|
162
|
-
* Update a workspace chat response.
|
|
163
|
-
* @see POST /v1/workspace/{slug}/update-chat
|
|
164
|
-
*/
|
|
165
|
-
updateWorkspaceChat(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
166
|
-
/**
|
|
167
|
-
* Update workspace chat feedback.
|
|
168
|
-
* @see POST /v1/workspace/{slug}/chat-feedback/{chatId}
|
|
169
|
-
*/
|
|
170
|
-
updateWorkspaceChatFeedback(slug: string, chatId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
171
|
-
/**
|
|
172
|
-
* Get suggested messages for a workspace.
|
|
173
|
-
* @see GET /v1/workspace/{slug}/suggested-messages
|
|
174
|
-
*/
|
|
175
|
-
getWorkspaceSuggestedMessages(slug: string): Promise<unknown>;
|
|
176
|
-
/**
|
|
177
|
-
* Save suggested messages for a workspace.
|
|
178
|
-
* @see POST /v1/workspace/{slug}/suggested-messages
|
|
179
|
-
*/
|
|
180
|
-
saveWorkspaceSuggestedMessages(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
181
|
-
/**
|
|
182
|
-
* Update workspace document pin status.
|
|
183
|
-
* @see POST /v1/workspace/{slug}/update-pin
|
|
184
|
-
*/
|
|
185
|
-
updateWorkspaceDocumentPin(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
186
|
-
/**
|
|
187
|
-
* Generate text-to-speech audio for a workspace chat.
|
|
188
|
-
* @see GET /v1/workspace/{slug}/tts/{chatId}
|
|
189
|
-
*/
|
|
190
|
-
getWorkspaceChatTts(slug: string, chatId: string): Promise<unknown>;
|
|
191
|
-
/**
|
|
192
|
-
* Get a workspace profile picture.
|
|
193
|
-
* @see GET /v1/workspace/{slug}/pfp
|
|
194
|
-
*/
|
|
195
|
-
getWorkspaceProfilePicture(slug: string): Promise<unknown>;
|
|
196
|
-
/**
|
|
197
|
-
* Upload a workspace profile picture.
|
|
198
|
-
* @see POST /v1/workspace/{slug}/upload-pfp
|
|
199
|
-
*/
|
|
200
|
-
uploadWorkspaceProfilePicture(slug: string, form: FormData): Promise<unknown>;
|
|
201
|
-
/**
|
|
202
|
-
* Remove a workspace profile picture.
|
|
203
|
-
* @see DELETE /v1/workspace/{slug}/remove-pfp
|
|
204
|
-
*/
|
|
205
|
-
removeWorkspaceProfilePicture(slug: string): Promise<unknown>;
|
|
206
|
-
/**
|
|
207
|
-
* Fork the workspace default thread.
|
|
208
|
-
* @see POST /v1/workspace/{slug}/thread/fork
|
|
209
|
-
*/
|
|
210
|
-
forkThread(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
211
|
-
/**
|
|
212
|
-
* Hide a workspace chat.
|
|
213
|
-
* @see PUT /v1/workspace/workspace-chats/{id}
|
|
214
|
-
*/
|
|
215
|
-
hideWorkspaceChat(id: string): Promise<unknown>;
|
|
216
|
-
/**
|
|
217
|
-
* Upload and embed a document.
|
|
218
|
-
* @see POST /v1/workspace/{slug}/upload-and-embed
|
|
219
|
-
*/
|
|
220
|
-
uploadAndEmbedWorkspaceDocument(slug: string, form: FormData): Promise<unknown>;
|
|
221
|
-
/**
|
|
222
|
-
* Remove and unembed a document.
|
|
223
|
-
* @see DELETE /v1/workspace/{slug}/remove-and-unembed
|
|
224
|
-
*/
|
|
225
|
-
removeAndUnembedWorkspaceDocument(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
226
|
-
/**
|
|
227
|
-
* Get workspace prompt history.
|
|
228
|
-
* @see GET /v1/workspace/{slug}/prompt-history
|
|
229
|
-
*/
|
|
230
|
-
getWorkspacePromptHistory(slug: string): Promise<unknown>;
|
|
231
|
-
/**
|
|
232
|
-
* Clear workspace prompt history.
|
|
233
|
-
* @see DELETE /v1/workspace/{slug}/prompt-history
|
|
234
|
-
*/
|
|
235
|
-
deleteWorkspacePromptHistory(slug: string): Promise<unknown>;
|
|
236
|
-
/**
|
|
237
|
-
* Delete a workspace prompt history entry.
|
|
238
|
-
* @see DELETE /v1/workspace/{slug}/prompt-history/{id}
|
|
239
|
-
*/
|
|
240
|
-
deleteWorkspacePromptHistoryEntry(slug: string, id: string): Promise<unknown>;
|
|
241
|
-
/**
|
|
242
|
-
* Validate search provider configuration.
|
|
243
|
-
* @see POST /v1/workspace/{slug}/search/validate
|
|
244
|
-
*/
|
|
245
|
-
validateWorkspaceSearchProvider(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
declare class V1ThreadModule {
|
|
249
|
-
private readonly client;
|
|
250
|
-
constructor(client: DeveloperApiClient);
|
|
251
|
-
/**
|
|
252
|
-
* Create a workspace thread.
|
|
253
|
-
* @see POST /v1/workspace/{slug}/thread/new
|
|
254
|
-
*/
|
|
255
|
-
createThread(slug: string): Promise<unknown>;
|
|
256
|
-
/**
|
|
257
|
-
* List workspace threads.
|
|
258
|
-
* @see GET /v1/workspace/{slug}/threads
|
|
259
|
-
*/
|
|
260
|
-
listThreads(slug: string): Promise<unknown>;
|
|
261
|
-
/**
|
|
262
|
-
* Open an SSE stream for workspace thread events.
|
|
263
|
-
* @see GET /v1/workspace/{slug}/thread-events
|
|
264
|
-
*/
|
|
265
|
-
openThreadEventsStream(slug: string): Promise<unknown>;
|
|
266
|
-
/**
|
|
267
|
-
* Get a workspace thread.
|
|
268
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}
|
|
269
|
-
*/
|
|
270
|
-
getThread(slug: string, threadSlug: string): Promise<unknown>;
|
|
271
|
-
/**
|
|
272
|
-
* Delete a workspace thread.
|
|
273
|
-
* @see DELETE /v1/workspace/{slug}/thread/{threadSlug}
|
|
274
|
-
*/
|
|
275
|
-
deleteThread(slug: string, threadSlug: string): Promise<unknown>;
|
|
276
|
-
/**
|
|
277
|
-
* Get thread vision availability.
|
|
278
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/vision-availability
|
|
279
|
-
*/
|
|
280
|
-
getThreadVisionAvailability(slug: string, threadSlug: string): Promise<unknown>;
|
|
281
|
-
/**
|
|
282
|
-
* Promote a thread into a tracked goal.
|
|
283
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/goal
|
|
284
|
-
*/
|
|
285
|
-
createThreadGoal(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
286
|
-
/**
|
|
287
|
-
* Draft a terminal goal for a workspace.
|
|
288
|
-
* @see POST /v1/workspace/{slug}/terminal-goal-draft
|
|
289
|
-
*/
|
|
290
|
-
draftWorkspaceTerminalGoal(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
291
|
-
/**
|
|
292
|
-
* Create a terminal goal for a workspace.
|
|
293
|
-
* @see POST /v1/workspace/{slug}/terminal-goal
|
|
294
|
-
*/
|
|
295
|
-
createWorkspaceTerminalGoal(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
296
|
-
/**
|
|
297
|
-
* Draft a terminal goal for a workspace thread.
|
|
298
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal-draft
|
|
299
|
-
*/
|
|
300
|
-
draftThreadTerminalGoal(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
301
|
-
/**
|
|
302
|
-
* Create a terminal goal for a workspace thread.
|
|
303
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal
|
|
304
|
-
*/
|
|
305
|
-
createThreadTerminalGoal(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
306
|
-
/**
|
|
307
|
-
* Bulk delete workspace threads.
|
|
308
|
-
* @see DELETE /v1/workspace/{slug}/thread-bulk-delete
|
|
309
|
-
*/
|
|
310
|
-
bulkDeleteThreads(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
311
|
-
/**
|
|
312
|
-
* Get workspace thread chats.
|
|
313
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/chats
|
|
314
|
-
*/
|
|
315
|
-
getThreadChats(slug: string, threadSlug: string): Promise<unknown>;
|
|
316
|
-
/**
|
|
317
|
-
* Get thread terminal session details.
|
|
318
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/terminal-session-details
|
|
319
|
-
*/
|
|
320
|
-
getThreadTerminalSessionDetails(slug: string, threadSlug: string): Promise<unknown>;
|
|
321
|
-
/**
|
|
322
|
-
* Update a workspace thread.
|
|
323
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/update
|
|
324
|
-
*/
|
|
325
|
-
updateThread(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
326
|
-
/**
|
|
327
|
-
* Delete edited chats from a thread.
|
|
328
|
-
* @see DELETE /v1/workspace/{slug}/thread/{threadSlug}/delete-edited-chats
|
|
329
|
-
*/
|
|
330
|
-
deleteEditedThreadChats(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
331
|
-
/**
|
|
332
|
-
* Update a thread chat response.
|
|
333
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/update-chat
|
|
334
|
-
*/
|
|
335
|
-
updateThreadChat(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
336
|
-
/**
|
|
337
|
-
* Persist terminal UI events for a workspace thread.
|
|
338
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-ui-events
|
|
339
|
-
*/
|
|
340
|
-
persistThreadTerminalUiEvents(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
341
|
-
/**
|
|
342
|
-
* Persist a linked terminal message for a workspace thread.
|
|
343
|
-
* @see POST /v1/workspace/{slug}/thread/{threadSlug}/linked-terminal-message
|
|
344
|
-
*/
|
|
345
|
-
createThreadLinkedTerminalMessage(slug: string, threadSlug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
346
|
-
/**
|
|
347
|
-
* Coordinate a task into a workspace thread.
|
|
348
|
-
* @see POST /v1/workspace/{slug}/thread/coordinate-task
|
|
349
|
-
*/
|
|
350
|
-
coordinateThreadTask(slug: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
351
|
-
/**
|
|
352
|
-
* Open an SSE stream for external workspace thread chat events.
|
|
353
|
-
* @see GET /v1/workspace/{slug}/thread/{threadSlug}/chat-stream
|
|
354
|
-
*/
|
|
355
|
-
openThreadChatStream(slug: string, threadSlug: string): Promise<unknown>;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* V1ApiNamespace - Container for all RealtimeX Developer API (v1) modules.
|
|
360
|
-
*
|
|
361
|
-
* Usage:
|
|
362
|
-
* const sdk = new RealtimeXSDK({ realtimex: { apiKey: 'sk-...' } });
|
|
363
|
-
* await sdk.v1?.workspace.listWorkspaces();
|
|
364
|
-
* await sdk.v1?.thread.createThread('workspace-slug');
|
|
365
|
-
*
|
|
366
|
-
* Regenerate modules: node scripts/generate-v1-sdk.mjs --force
|
|
367
|
-
*/
|
|
368
|
-
|
|
369
|
-
declare class V1ApiNamespace {
|
|
370
|
-
/** @internal Shared HTTP client used by all v1 modules */
|
|
371
|
-
readonly _client: DeveloperApiClient;
|
|
372
|
-
chat: V1ChatModule;
|
|
373
|
-
workspace: V1WorkspaceModule;
|
|
374
|
-
thread: V1ThreadModule;
|
|
375
|
-
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* RealtimeX SDK - Developer API (v1) Error Classes
|
|
380
|
-
*/
|
|
381
|
-
declare class DeveloperApiError extends Error {
|
|
382
|
-
readonly status: number;
|
|
383
|
-
readonly code: string;
|
|
384
|
-
constructor(status: number, code: string, message: string);
|
|
385
|
-
}
|
|
386
|
-
declare class AuthenticationError extends DeveloperApiError {
|
|
387
|
-
constructor(message?: string);
|
|
388
|
-
}
|
|
389
|
-
declare class NotFoundError extends DeveloperApiError {
|
|
390
|
-
constructor(message?: string);
|
|
391
|
-
}
|
|
392
|
-
declare class ValidationError extends DeveloperApiError {
|
|
393
|
-
constructor(message: string);
|
|
394
|
-
}
|
|
395
|
-
declare class ServerError extends DeveloperApiError {
|
|
396
|
-
constructor(message?: string);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, DeveloperApiError as a, ValidationError as b, V1ChatModule as c, V1WorkspaceModule as d, V1ThreadModule as e };
|