@meshagent/meshagent 0.38.4 → 0.39.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/CHANGELOG.md +14 -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 +179 -3
- package/dist/browser/meshagent-client.js +333 -25
- 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 +179 -3
- package/dist/esm/meshagent-client.js +333 -25
- 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 +179 -3
- package/dist/node/meshagent-client.js +333 -25
- 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
package/dist/esm/entrypoint.js
CHANGED
|
@@ -6386,23 +6386,17 @@ for (let i = 0; i < 256; ++i) {
|
|
|
6386
6386
|
function unsafeStringify(arr, offset = 0) {
|
|
6387
6387
|
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
6388
6388
|
}
|
|
6389
|
-
var getRandomValues2;
|
|
6390
6389
|
var rnds8 = new Uint8Array(16);
|
|
6391
6390
|
function rng() {
|
|
6392
|
-
|
|
6393
|
-
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
6394
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
6395
|
-
}
|
|
6396
|
-
getRandomValues2 = crypto.getRandomValues.bind(crypto);
|
|
6397
|
-
}
|
|
6398
|
-
return getRandomValues2(rnds8);
|
|
6391
|
+
return crypto.getRandomValues(rnds8);
|
|
6399
6392
|
}
|
|
6400
|
-
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
6401
|
-
var native_default = { randomUUID };
|
|
6402
6393
|
function v4(options, buf, offset) {
|
|
6403
|
-
if (
|
|
6404
|
-
return
|
|
6394
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
6395
|
+
return crypto.randomUUID();
|
|
6405
6396
|
}
|
|
6397
|
+
return _v4(options, buf, offset);
|
|
6398
|
+
}
|
|
6399
|
+
function _v4(options, buf, offset) {
|
|
6406
6400
|
options = options || {};
|
|
6407
6401
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
6408
6402
|
if (rnds.length < 16) {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ export * from './event-emitter';
|
|
|
4
4
|
export * from './client';
|
|
5
5
|
export * from './completer';
|
|
6
6
|
export * from './containers-client';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './database-client';
|
|
7
|
+
export * from './datasets-client';
|
|
9
8
|
export * from './developer-client';
|
|
10
9
|
export * from './document';
|
|
11
10
|
export * from './meshagent-client';
|
package/dist/esm/index.js
CHANGED
|
@@ -4,8 +4,7 @@ export * from './event-emitter';
|
|
|
4
4
|
export * from './client';
|
|
5
5
|
export * from './completer';
|
|
6
6
|
export * from './containers-client';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './database-client';
|
|
7
|
+
export * from './datasets-client';
|
|
9
8
|
export * from './developer-client';
|
|
10
9
|
export * from './document';
|
|
11
10
|
export * from './meshagent-client';
|
|
@@ -41,6 +41,14 @@ export interface ProjectUserGrantCount {
|
|
|
41
41
|
lastName?: string | null;
|
|
42
42
|
email: string;
|
|
43
43
|
}
|
|
44
|
+
export interface ProjectMembersPage {
|
|
45
|
+
users: Record<string, unknown>[];
|
|
46
|
+
total: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ProjectUserGrantCountsPage {
|
|
49
|
+
users: ProjectUserGrantCount[];
|
|
50
|
+
total: number;
|
|
51
|
+
}
|
|
44
52
|
export interface EnvironmentVariable {
|
|
45
53
|
name: string;
|
|
46
54
|
value: string;
|
|
@@ -202,6 +210,45 @@ export interface Mailbox {
|
|
|
202
210
|
roomId?: string;
|
|
203
211
|
queue: string;
|
|
204
212
|
}
|
|
213
|
+
export interface MailboxesPage {
|
|
214
|
+
mailboxes: Mailbox[];
|
|
215
|
+
total: number;
|
|
216
|
+
}
|
|
217
|
+
export type FeedVisibility = "public" | "project" | "private";
|
|
218
|
+
export interface Feed {
|
|
219
|
+
id: string;
|
|
220
|
+
projectId: string;
|
|
221
|
+
createdAt: Date;
|
|
222
|
+
name: string;
|
|
223
|
+
description: string;
|
|
224
|
+
visibility: FeedVisibility;
|
|
225
|
+
paused: boolean;
|
|
226
|
+
annotations: Record<string, string>;
|
|
227
|
+
messageSchema?: Record<string, unknown> | boolean | null;
|
|
228
|
+
}
|
|
229
|
+
export interface FeedsPage {
|
|
230
|
+
feeds: Feed[];
|
|
231
|
+
total: number;
|
|
232
|
+
}
|
|
233
|
+
export interface FeedSubscription {
|
|
234
|
+
id: string;
|
|
235
|
+
feedId: string;
|
|
236
|
+
projectId: string;
|
|
237
|
+
room: string;
|
|
238
|
+
roomId?: string | null;
|
|
239
|
+
path: string;
|
|
240
|
+
createdAt: Date;
|
|
241
|
+
annotations: Record<string, string>;
|
|
242
|
+
}
|
|
243
|
+
export interface LLMLogger {
|
|
244
|
+
id: string;
|
|
245
|
+
projectId: string;
|
|
246
|
+
destinationFeedId: string;
|
|
247
|
+
filterExpression: string;
|
|
248
|
+
paused: boolean;
|
|
249
|
+
createdAt: Date;
|
|
250
|
+
annotations: Record<string, string>;
|
|
251
|
+
}
|
|
205
252
|
export interface ProjectRepository {
|
|
206
253
|
id: string;
|
|
207
254
|
projectId: string;
|
|
@@ -215,6 +262,9 @@ export interface Balance {
|
|
|
215
262
|
autoRechargeThreshold?: number | null;
|
|
216
263
|
autoRechargeAmount?: number | null;
|
|
217
264
|
lastRecharge?: Date | null;
|
|
265
|
+
monthlyBudget?: number | null;
|
|
266
|
+
autoRechargePaused?: boolean;
|
|
267
|
+
autoRechargedThisMonth?: number | null;
|
|
218
268
|
}
|
|
219
269
|
export interface Transaction {
|
|
220
270
|
id: string;
|
|
@@ -234,6 +284,10 @@ export interface OAuthClient {
|
|
|
234
284
|
projectId: string;
|
|
235
285
|
metadata: Record<string, string>;
|
|
236
286
|
}
|
|
287
|
+
export interface OAuthClientsPage {
|
|
288
|
+
clients: OAuthClient[];
|
|
289
|
+
total: number;
|
|
290
|
+
}
|
|
237
291
|
export interface BaseSecret {
|
|
238
292
|
id?: string;
|
|
239
293
|
name: string;
|
|
@@ -274,6 +328,7 @@ export interface ExternalOAuthClientRegistration {
|
|
|
274
328
|
clientId: string;
|
|
275
329
|
clientSecret?: string | null;
|
|
276
330
|
}
|
|
331
|
+
type JsonRequest = Record<string, unknown> | Array<unknown> | string | number | boolean | null;
|
|
277
332
|
export declare class Meshagent {
|
|
278
333
|
private readonly baseUrl;
|
|
279
334
|
private readonly token?;
|
|
@@ -286,6 +341,9 @@ export declare class Meshagent {
|
|
|
286
341
|
private parseRoomShare;
|
|
287
342
|
private parseRoomSession;
|
|
288
343
|
private parseRoom;
|
|
344
|
+
private parseFeed;
|
|
345
|
+
private parseFeedSubscription;
|
|
346
|
+
private parseLLMLogger;
|
|
289
347
|
private parseProjectRepository;
|
|
290
348
|
private parseProjectRoomGrant;
|
|
291
349
|
private parseProjectRoomGrantCount;
|
|
@@ -327,6 +385,11 @@ export declare class Meshagent {
|
|
|
327
385
|
}): Promise<Record<string, unknown>>;
|
|
328
386
|
removeUserFromProject(projectId: string, userId: string): Promise<Record<string, unknown>>;
|
|
329
387
|
updateProjectSettings(projectId: string, settings: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
388
|
+
getUsersInProjectPage(projectId: string, options?: {
|
|
389
|
+
count?: number;
|
|
390
|
+
offset?: number;
|
|
391
|
+
filter?: string;
|
|
392
|
+
}): Promise<ProjectMembersPage>;
|
|
330
393
|
getUsersInProject(projectId: string): Promise<Record<string, unknown>>;
|
|
331
394
|
getUserProfile(userId: string): Promise<Record<string, unknown>>;
|
|
332
395
|
updateUserProfile(userId: string, firstName: string, lastName: string): Promise<Record<string, unknown>>;
|
|
@@ -339,11 +402,12 @@ export declare class Meshagent {
|
|
|
339
402
|
getStatus(projectId: string): Promise<boolean>;
|
|
340
403
|
getBalance(projectId: string): Promise<Balance>;
|
|
341
404
|
getRecentTransactions(projectId: string): Promise<Transaction[]>;
|
|
342
|
-
setAutoRecharge({ projectId, enabled, amount, threshold }: {
|
|
405
|
+
setAutoRecharge({ projectId, enabled, amount, threshold, monthlyBudget, }: {
|
|
343
406
|
projectId: string;
|
|
344
407
|
enabled: boolean;
|
|
345
408
|
amount: number;
|
|
346
409
|
threshold: number;
|
|
410
|
+
monthlyBudget?: number | null;
|
|
347
411
|
}): Promise<void>;
|
|
348
412
|
getCheckoutUrl(projectId: string, { successUrl, cancelUrl }: {
|
|
349
413
|
successUrl: string;
|
|
@@ -365,6 +429,8 @@ export declare class Meshagent {
|
|
|
365
429
|
provider?: string;
|
|
366
430
|
model?: string;
|
|
367
431
|
usageType?: string;
|
|
432
|
+
client?: string;
|
|
433
|
+
annotations?: Record<string, string>;
|
|
368
434
|
}): Promise<Record<string, unknown>[]>;
|
|
369
435
|
getSession(projectId: string, sessionId: string): Promise<Record<string, unknown>>;
|
|
370
436
|
listActiveSessions(projectId: string): Promise<RoomSession[]>;
|
|
@@ -405,8 +471,102 @@ export declare class Meshagent {
|
|
|
405
471
|
queue: string;
|
|
406
472
|
isPublic: boolean;
|
|
407
473
|
}): Promise<void>;
|
|
408
|
-
|
|
474
|
+
private parseMailbox;
|
|
475
|
+
listMailboxesPage(projectId: string, options?: {
|
|
476
|
+
count?: number;
|
|
477
|
+
offset?: number;
|
|
478
|
+
filter?: string;
|
|
479
|
+
}): Promise<MailboxesPage>;
|
|
480
|
+
listMailboxes(projectId: string, options?: {
|
|
481
|
+
count?: number;
|
|
482
|
+
offset?: number;
|
|
483
|
+
filter?: string;
|
|
484
|
+
}): Promise<Mailbox[]>;
|
|
409
485
|
deleteMailbox(projectId: string, address: string): Promise<void>;
|
|
486
|
+
createFeed(params: {
|
|
487
|
+
projectId: string;
|
|
488
|
+
name: string;
|
|
489
|
+
description?: string;
|
|
490
|
+
visibility?: FeedVisibility;
|
|
491
|
+
paused?: boolean;
|
|
492
|
+
annotations?: Record<string, string>;
|
|
493
|
+
messageSchema?: Record<string, unknown> | boolean | null;
|
|
494
|
+
}): Promise<Feed>;
|
|
495
|
+
updateFeed(params: {
|
|
496
|
+
projectId: string;
|
|
497
|
+
feedId: string;
|
|
498
|
+
name: string;
|
|
499
|
+
description?: string;
|
|
500
|
+
paused?: boolean;
|
|
501
|
+
annotations?: Record<string, string>;
|
|
502
|
+
messageSchema?: Record<string, unknown> | boolean | null;
|
|
503
|
+
}): Promise<void>;
|
|
504
|
+
getFeed(projectId: string, feedId: string): Promise<Feed>;
|
|
505
|
+
listFeedsPage(projectId: string, options?: {
|
|
506
|
+
count?: number;
|
|
507
|
+
offset?: number;
|
|
508
|
+
filter?: string;
|
|
509
|
+
}): Promise<FeedsPage>;
|
|
510
|
+
listFeeds(projectId: string, options?: {
|
|
511
|
+
count?: number;
|
|
512
|
+
offset?: number;
|
|
513
|
+
filter?: string;
|
|
514
|
+
}): Promise<Feed[]>;
|
|
515
|
+
listRoomFeedsPage(projectId: string, roomName: string, options?: {
|
|
516
|
+
count?: number;
|
|
517
|
+
offset?: number;
|
|
518
|
+
filter?: string;
|
|
519
|
+
}): Promise<FeedsPage>;
|
|
520
|
+
listRoomFeeds(projectId: string, roomName: string, options?: {
|
|
521
|
+
count?: number;
|
|
522
|
+
offset?: number;
|
|
523
|
+
filter?: string;
|
|
524
|
+
}): Promise<Feed[]>;
|
|
525
|
+
deleteFeed(projectId: string, feedId: string): Promise<void>;
|
|
526
|
+
publishFeedMessage(params: {
|
|
527
|
+
projectId: string;
|
|
528
|
+
feedId: string;
|
|
529
|
+
message: JsonRequest;
|
|
530
|
+
}): Promise<void>;
|
|
531
|
+
publishFeedBatch(params: {
|
|
532
|
+
projectId: string;
|
|
533
|
+
feedId: string;
|
|
534
|
+
messages: JsonRequest[];
|
|
535
|
+
}): Promise<void>;
|
|
536
|
+
createFeedSubscription(params: {
|
|
537
|
+
projectId: string;
|
|
538
|
+
feedId: string;
|
|
539
|
+
room: string;
|
|
540
|
+
path: string;
|
|
541
|
+
annotations?: Record<string, string>;
|
|
542
|
+
}): Promise<FeedSubscription>;
|
|
543
|
+
updateFeedSubscription(params: {
|
|
544
|
+
projectId: string;
|
|
545
|
+
feedId: string;
|
|
546
|
+
subscriptionId: string;
|
|
547
|
+
annotations?: Record<string, string>;
|
|
548
|
+
}): Promise<void>;
|
|
549
|
+
getFeedSubscription(projectId: string, feedId: string, subscriptionId: string): Promise<FeedSubscription>;
|
|
550
|
+
listFeedSubscriptions(projectId: string, feedId: string): Promise<FeedSubscription[]>;
|
|
551
|
+
deleteFeedSubscription(projectId: string, feedId: string, subscriptionId: string): Promise<void>;
|
|
552
|
+
createLLMLogger(params: {
|
|
553
|
+
projectId: string;
|
|
554
|
+
destinationFeedId: string;
|
|
555
|
+
filterExpression: string;
|
|
556
|
+
paused?: boolean;
|
|
557
|
+
annotations?: Record<string, string>;
|
|
558
|
+
}): Promise<LLMLogger>;
|
|
559
|
+
updateLLMLogger(params: {
|
|
560
|
+
projectId: string;
|
|
561
|
+
loggerId: string;
|
|
562
|
+
destinationFeedId: string;
|
|
563
|
+
filterExpression: string;
|
|
564
|
+
paused?: boolean;
|
|
565
|
+
annotations?: Record<string, string>;
|
|
566
|
+
}): Promise<void>;
|
|
567
|
+
getLLMLogger(projectId: string, loggerId: string): Promise<LLMLogger>;
|
|
568
|
+
listLLMLoggers(projectId: string): Promise<LLMLogger[]>;
|
|
569
|
+
deleteLLMLogger(projectId: string, loggerId: string): Promise<void>;
|
|
410
570
|
createRepository(params: {
|
|
411
571
|
projectId: string;
|
|
412
572
|
name: string;
|
|
@@ -606,9 +766,15 @@ export declare class Meshagent {
|
|
|
606
766
|
limit?: number;
|
|
607
767
|
offset?: number;
|
|
608
768
|
}): Promise<ProjectRoomGrantCount[]>;
|
|
769
|
+
listUniqueUsersWithGrantsPage(projectId: string, options?: {
|
|
770
|
+
limit?: number;
|
|
771
|
+
offset?: number;
|
|
772
|
+
filter?: string;
|
|
773
|
+
}): Promise<ProjectUserGrantCountsPage>;
|
|
609
774
|
listUniqueUsersWithGrants(projectId: string, options?: {
|
|
610
775
|
limit?: number;
|
|
611
776
|
offset?: number;
|
|
777
|
+
filter?: string;
|
|
612
778
|
}): Promise<ProjectUserGrantCount[]>;
|
|
613
779
|
createOAuthClient(projectId: string, params: {
|
|
614
780
|
grantTypes: string[];
|
|
@@ -624,7 +790,17 @@ export declare class Meshagent {
|
|
|
624
790
|
scope?: string;
|
|
625
791
|
metadata?: Record<string, any>;
|
|
626
792
|
}): Promise<Record<string, unknown>>;
|
|
627
|
-
|
|
793
|
+
listOAuthClientsPage(projectId: string, options?: {
|
|
794
|
+
count?: number;
|
|
795
|
+
offset?: number;
|
|
796
|
+
filter?: string;
|
|
797
|
+
}): Promise<OAuthClientsPage>;
|
|
798
|
+
listOAuthClients(projectId: string, options?: {
|
|
799
|
+
count?: number;
|
|
800
|
+
offset?: number;
|
|
801
|
+
filter?: string;
|
|
802
|
+
}): Promise<OAuthClient[]>;
|
|
628
803
|
getOAuthClient(projectId: string, clientId: string): Promise<OAuthClient>;
|
|
629
804
|
deleteOAuthClient(projectId: string, clientId: string): Promise<void>;
|
|
630
805
|
}
|
|
806
|
+
export {};
|