@meshagent/meshagent 0.38.3 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -2
- package/dist/browser/datasets-client.d.ts +415 -0
- package/dist/{node/database-client.js → browser/datasets-client.js} +480 -234
- package/dist/browser/entrypoint.js +9 -17
- package/dist/browser/index.d.ts +1 -2
- package/dist/browser/index.js +1 -2
- package/dist/browser/meshagent-client.d.ts +109 -1
- package/dist/browser/meshagent-client.js +269 -3
- package/dist/browser/participant-token.d.ts +5 -5
- package/dist/browser/participant-token.js +14 -13
- package/dist/browser/room-client.d.ts +5 -3
- package/dist/browser/room-client.js +70 -4
- package/dist/esm/datasets-client.d.ts +415 -0
- package/dist/esm/{database-client.js → datasets-client.js} +473 -227
- package/dist/esm/entrypoint.js +6 -12
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/meshagent-client.d.ts +109 -1
- package/dist/esm/meshagent-client.js +269 -3
- package/dist/esm/participant-token.d.ts +5 -5
- package/dist/esm/participant-token.js +12 -11
- package/dist/esm/room-client.d.ts +5 -3
- package/dist/esm/room-client.js +70 -4
- package/dist/node/datasets-client.d.ts +415 -0
- package/dist/{browser/database-client.js → node/datasets-client.js} +480 -234
- package/dist/node/entrypoint.js +6 -12
- package/dist/node/index.d.ts +1 -2
- package/dist/node/index.js +1 -2
- package/dist/node/meshagent-client.d.ts +109 -1
- package/dist/node/meshagent-client.js +269 -3
- package/dist/node/participant-token.d.ts +5 -5
- package/dist/node/participant-token.js +14 -13
- package/dist/node/room-client.d.ts +5 -3
- package/dist/node/room-client.js +70 -4
- package/package.json +3 -2
- package/dist/browser/data-types.d.ts +0 -67
- package/dist/browser/data-types.js +0 -192
- package/dist/browser/database-client.d.ts +0 -281
- package/dist/esm/data-types.d.ts +0 -67
- package/dist/esm/data-types.js +0 -179
- package/dist/esm/database-client.d.ts +0 -281
- package/dist/node/data-types.d.ts +0 -67
- package/dist/node/data-types.js +0 -192
- package/dist/node/database-client.d.ts +0 -281
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { DataType } from "./data-types";
|
|
2
|
-
import { RoomClient } from "./room-client";
|
|
3
|
-
export type CreateMode = "create" | "overwrite" | "create_if_not_exists";
|
|
4
|
-
export interface TableRef {
|
|
5
|
-
name: string;
|
|
6
|
-
namespace?: string[];
|
|
7
|
-
alias?: string;
|
|
8
|
-
branch?: string;
|
|
9
|
-
version?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface TableVersion {
|
|
12
|
-
version: number;
|
|
13
|
-
timestamp: Date;
|
|
14
|
-
metadata: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export interface TableIndex {
|
|
17
|
-
name: string;
|
|
18
|
-
columns: string[];
|
|
19
|
-
type: string;
|
|
20
|
-
}
|
|
21
|
-
export interface TableBranch {
|
|
22
|
-
name: string;
|
|
23
|
-
parentBranch: string | null;
|
|
24
|
-
parentVersion: number | null;
|
|
25
|
-
createdAt: Date | null;
|
|
26
|
-
manifestSize: number | null;
|
|
27
|
-
}
|
|
28
|
-
export declare abstract class DatabaseValueEncoder {
|
|
29
|
-
abstract encodeDatabaseValue(): unknown;
|
|
30
|
-
}
|
|
31
|
-
export declare class DatabaseExpression extends DatabaseValueEncoder {
|
|
32
|
-
readonly expression: string;
|
|
33
|
-
constructor(expression: string);
|
|
34
|
-
encodeDatabaseValue(): Record<string, string>;
|
|
35
|
-
toString(): string;
|
|
36
|
-
}
|
|
37
|
-
export declare class DatabaseDate extends DatabaseValueEncoder {
|
|
38
|
-
readonly value: string;
|
|
39
|
-
constructor(value: string);
|
|
40
|
-
encodeDatabaseValue(): Record<string, string>;
|
|
41
|
-
toString(): string;
|
|
42
|
-
}
|
|
43
|
-
export type DatabaseJsonScalarValue = null | boolean | number | string;
|
|
44
|
-
export type DatabaseJsonValue = DatabaseJsonScalarValue | DatabaseJsonValue[] | {
|
|
45
|
-
[key: string]: DatabaseJsonValue;
|
|
46
|
-
};
|
|
47
|
-
export declare class DatabaseStruct extends DatabaseValueEncoder {
|
|
48
|
-
readonly fields: Record<string, DatabaseValue>;
|
|
49
|
-
constructor(fields: Record<string, DatabaseValue>);
|
|
50
|
-
toJson(): Record<string, unknown>;
|
|
51
|
-
encodeDatabaseValue(): Record<string, Record<string, unknown>>;
|
|
52
|
-
}
|
|
53
|
-
export declare class DatabaseJson extends DatabaseValueEncoder {
|
|
54
|
-
readonly value: DatabaseJsonValue;
|
|
55
|
-
constructor(value: DatabaseJsonValue);
|
|
56
|
-
toJson(): DatabaseJsonValue;
|
|
57
|
-
encodeDatabaseValue(): Record<string, DatabaseJsonValue>;
|
|
58
|
-
}
|
|
59
|
-
export type DatabaseScalarValue = null | boolean | number | string | Uint8Array | DatabaseUuid | Date;
|
|
60
|
-
export type DatabaseValue = DatabaseScalarValue | DatabaseValueEncoder | DatabaseValue[];
|
|
61
|
-
export type DatabaseRecord = Record<string, DatabaseValue>;
|
|
62
|
-
export type DatabaseRows = DatabaseRecord[];
|
|
63
|
-
export type DatabaseRowChunks = AsyncIterable<DatabaseRows> | Iterable<DatabaseRows>;
|
|
64
|
-
export type DatabaseWhere = string | Record<string, DatabaseValue>;
|
|
65
|
-
type DatabaseRoomInvoker = Pick<RoomClient, "invoke" | "invokeStream">;
|
|
66
|
-
export declare class DatabaseUuid {
|
|
67
|
-
readonly value: string;
|
|
68
|
-
constructor(value: string);
|
|
69
|
-
toString(): string;
|
|
70
|
-
}
|
|
71
|
-
export declare class DatabaseClient {
|
|
72
|
-
private room;
|
|
73
|
-
constructor({ room }: {
|
|
74
|
-
room: DatabaseRoomInvoker;
|
|
75
|
-
});
|
|
76
|
-
private _unexpectedResponseError;
|
|
77
|
-
private invoke;
|
|
78
|
-
private invokeStream;
|
|
79
|
-
private drainWriteStream;
|
|
80
|
-
private streamRows;
|
|
81
|
-
listTables({ namespace, branch }?: {
|
|
82
|
-
namespace?: string[];
|
|
83
|
-
branch?: string;
|
|
84
|
-
}): Promise<string[]>;
|
|
85
|
-
private createTable;
|
|
86
|
-
createTableWithSchema({ name, schema, data, mode, namespace, branch, metadata }: {
|
|
87
|
-
name: string;
|
|
88
|
-
schema?: Record<string, DataType>;
|
|
89
|
-
data?: DatabaseRows;
|
|
90
|
-
mode?: CreateMode;
|
|
91
|
-
namespace?: string[];
|
|
92
|
-
branch?: string;
|
|
93
|
-
metadata?: Record<string, unknown>;
|
|
94
|
-
}): Promise<void>;
|
|
95
|
-
createTableFromData({ name, data, mode, namespace, branch, metadata }: {
|
|
96
|
-
name: string;
|
|
97
|
-
data?: DatabaseRows;
|
|
98
|
-
mode?: CreateMode;
|
|
99
|
-
namespace?: string[];
|
|
100
|
-
branch?: string;
|
|
101
|
-
metadata?: Record<string, unknown>;
|
|
102
|
-
}): Promise<void>;
|
|
103
|
-
createTableFromDataStream({ name, chunks, schema, mode, namespace, branch, metadata }: {
|
|
104
|
-
name: string;
|
|
105
|
-
chunks: DatabaseRowChunks;
|
|
106
|
-
schema?: Record<string, DataType>;
|
|
107
|
-
mode?: CreateMode;
|
|
108
|
-
namespace?: string[];
|
|
109
|
-
branch?: string;
|
|
110
|
-
metadata?: Record<string, unknown>;
|
|
111
|
-
}): Promise<void>;
|
|
112
|
-
dropTable({ name, ignoreMissing, namespace, branch }: {
|
|
113
|
-
name: string;
|
|
114
|
-
ignoreMissing?: boolean;
|
|
115
|
-
namespace?: string[];
|
|
116
|
-
branch?: string;
|
|
117
|
-
}): Promise<void>;
|
|
118
|
-
dropIndex({ table, name, namespace, branch }: {
|
|
119
|
-
table: string;
|
|
120
|
-
name: string;
|
|
121
|
-
namespace?: string[];
|
|
122
|
-
branch?: string;
|
|
123
|
-
}): Promise<void>;
|
|
124
|
-
addColumns({ table, newColumns, namespace, branch }: {
|
|
125
|
-
table: string;
|
|
126
|
-
newColumns: Record<string, string | DataType>;
|
|
127
|
-
namespace?: string[];
|
|
128
|
-
branch?: string;
|
|
129
|
-
}): Promise<void>;
|
|
130
|
-
dropColumns({ table, columns, namespace, branch }: {
|
|
131
|
-
table: string;
|
|
132
|
-
columns: string[];
|
|
133
|
-
namespace?: string[];
|
|
134
|
-
branch?: string;
|
|
135
|
-
}): Promise<void>;
|
|
136
|
-
insert({ table, records, namespace, branch }: {
|
|
137
|
-
table: string;
|
|
138
|
-
records: DatabaseRows;
|
|
139
|
-
namespace?: string[];
|
|
140
|
-
branch?: string;
|
|
141
|
-
}): Promise<void>;
|
|
142
|
-
insertStream({ table, chunks, namespace, branch }: {
|
|
143
|
-
table: string;
|
|
144
|
-
chunks: DatabaseRowChunks;
|
|
145
|
-
namespace?: string[];
|
|
146
|
-
branch?: string;
|
|
147
|
-
}): Promise<void>;
|
|
148
|
-
update({ table, where, values, namespace, branch }: {
|
|
149
|
-
table: string;
|
|
150
|
-
where: string;
|
|
151
|
-
values: DatabaseRecord;
|
|
152
|
-
namespace?: string[];
|
|
153
|
-
branch?: string;
|
|
154
|
-
}): Promise<void>;
|
|
155
|
-
delete({ table, where, namespace, branch }: {
|
|
156
|
-
table: string;
|
|
157
|
-
where: string;
|
|
158
|
-
namespace?: string[];
|
|
159
|
-
branch?: string;
|
|
160
|
-
}): Promise<void>;
|
|
161
|
-
merge({ table, on, records, namespace, branch }: {
|
|
162
|
-
table: string;
|
|
163
|
-
on: string;
|
|
164
|
-
records: DatabaseRows;
|
|
165
|
-
namespace?: string[];
|
|
166
|
-
branch?: string;
|
|
167
|
-
}): Promise<void>;
|
|
168
|
-
mergeStream({ table, on, chunks, namespace, branch }: {
|
|
169
|
-
table: string;
|
|
170
|
-
on: string;
|
|
171
|
-
chunks: DatabaseRowChunks;
|
|
172
|
-
namespace?: string[];
|
|
173
|
-
branch?: string;
|
|
174
|
-
}): Promise<void>;
|
|
175
|
-
sql({ query, tables, params }: {
|
|
176
|
-
query: string;
|
|
177
|
-
tables: Array<TableRef | string>;
|
|
178
|
-
params?: DatabaseRecord;
|
|
179
|
-
}): Promise<DatabaseRows>;
|
|
180
|
-
sqlStream({ query, tables, params }: {
|
|
181
|
-
query: string;
|
|
182
|
-
tables: Array<TableRef | string>;
|
|
183
|
-
params?: DatabaseRecord;
|
|
184
|
-
}): AsyncIterable<DatabaseRows>;
|
|
185
|
-
search({ table, text, vector, where, offset, limit, select, namespace, branch, version }: {
|
|
186
|
-
table: string;
|
|
187
|
-
text?: string;
|
|
188
|
-
vector?: number[];
|
|
189
|
-
where?: DatabaseWhere;
|
|
190
|
-
offset?: number;
|
|
191
|
-
limit?: number;
|
|
192
|
-
select?: string[];
|
|
193
|
-
namespace?: string[];
|
|
194
|
-
branch?: string;
|
|
195
|
-
version?: number;
|
|
196
|
-
}): Promise<DatabaseRows>;
|
|
197
|
-
searchStream({ table, text, vector, where, offset, limit, select, namespace, branch, version }: {
|
|
198
|
-
table: string;
|
|
199
|
-
text?: string;
|
|
200
|
-
vector?: number[];
|
|
201
|
-
where?: DatabaseWhere;
|
|
202
|
-
offset?: number;
|
|
203
|
-
limit?: number;
|
|
204
|
-
select?: string[];
|
|
205
|
-
namespace?: string[];
|
|
206
|
-
branch?: string;
|
|
207
|
-
version?: number;
|
|
208
|
-
}): AsyncIterable<DatabaseRows>;
|
|
209
|
-
count({ table, text, vector, where, namespace, branch, version }: {
|
|
210
|
-
table: string;
|
|
211
|
-
text?: string;
|
|
212
|
-
vector?: number[];
|
|
213
|
-
where?: DatabaseWhere;
|
|
214
|
-
namespace?: string[];
|
|
215
|
-
branch?: string;
|
|
216
|
-
version?: number;
|
|
217
|
-
}): Promise<number>;
|
|
218
|
-
inspect({ table, namespace, branch, version }: {
|
|
219
|
-
table: string;
|
|
220
|
-
namespace?: string[];
|
|
221
|
-
branch?: string;
|
|
222
|
-
version?: number;
|
|
223
|
-
}): Promise<Record<string, DataType>>;
|
|
224
|
-
optimize(table: string): Promise<void>;
|
|
225
|
-
optimize(params: {
|
|
226
|
-
table: string;
|
|
227
|
-
namespace?: string[];
|
|
228
|
-
branch?: string;
|
|
229
|
-
}): Promise<void>;
|
|
230
|
-
restore({ table, version, namespace, branch }: {
|
|
231
|
-
table: string;
|
|
232
|
-
version: number;
|
|
233
|
-
namespace?: string[];
|
|
234
|
-
branch?: string;
|
|
235
|
-
}): Promise<void>;
|
|
236
|
-
listVersions({ table, namespace, branch }: {
|
|
237
|
-
table: string;
|
|
238
|
-
namespace?: string[];
|
|
239
|
-
branch?: string;
|
|
240
|
-
}): Promise<TableVersion[]>;
|
|
241
|
-
createVectorIndex({ table, column, replace, namespace, branch }: {
|
|
242
|
-
table: string;
|
|
243
|
-
column: string;
|
|
244
|
-
replace?: boolean;
|
|
245
|
-
namespace?: string[];
|
|
246
|
-
branch?: string;
|
|
247
|
-
}): Promise<void>;
|
|
248
|
-
createScalarIndex({ table, column, replace, namespace, branch }: {
|
|
249
|
-
table: string;
|
|
250
|
-
column: string;
|
|
251
|
-
replace?: boolean;
|
|
252
|
-
namespace?: string[];
|
|
253
|
-
branch?: string;
|
|
254
|
-
}): Promise<void>;
|
|
255
|
-
createFullTextSearchIndex({ table, column, replace, namespace, branch }: {
|
|
256
|
-
table: string;
|
|
257
|
-
column: string;
|
|
258
|
-
replace?: boolean;
|
|
259
|
-
namespace?: string[];
|
|
260
|
-
branch?: string;
|
|
261
|
-
}): Promise<void>;
|
|
262
|
-
listIndexes({ table, namespace, branch, version }: {
|
|
263
|
-
table: string;
|
|
264
|
-
namespace?: string[];
|
|
265
|
-
branch?: string;
|
|
266
|
-
version?: number;
|
|
267
|
-
}): Promise<TableIndex[]>;
|
|
268
|
-
listBranches({ namespace }?: {
|
|
269
|
-
namespace?: string[];
|
|
270
|
-
}): Promise<TableBranch[]>;
|
|
271
|
-
createBranch({ branch, fromBranch, namespace }: {
|
|
272
|
-
branch: string;
|
|
273
|
-
fromBranch?: string;
|
|
274
|
-
namespace?: string[];
|
|
275
|
-
}): Promise<void>;
|
|
276
|
-
deleteBranch({ branch, namespace }: {
|
|
277
|
-
branch: string;
|
|
278
|
-
namespace?: string[];
|
|
279
|
-
}): Promise<void>;
|
|
280
|
-
}
|
|
281
|
-
export {};
|