@metorial-services/registry-client 1.0.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/dist/index.cjs ADDED
@@ -0,0 +1,38 @@
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/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ createCollectionsRegistryClient: () => createCollectionsRegistryClient,
24
+ createMcpRegistryClient: () => createMcpRegistryClient,
25
+ createRootRegistryClient: () => createRootRegistryClient
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+ var import_rpc_client = require("@lowerdeck/rpc-client");
29
+ var createCollectionsRegistryClient = (o) => (0, import_rpc_client.createClient)(o);
30
+ var createMcpRegistryClient = (o) => (0, import_rpc_client.createClient)(o);
31
+ var createRootRegistryClient = (o) => (0, import_rpc_client.createClient)(o);
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ createCollectionsRegistryClient,
35
+ createMcpRegistryClient,
36
+ createRootRegistryClient
37
+ });
38
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createClient } from '@lowerdeck/rpc-client';\nimport type { CollectionsRegistryClient } from '../../../server/src/apis/collections';\nimport type { McpRegistryClient } from '../../../server/src/apis/mcp';\nimport type { RootRegistryClient } from '../../../server/src/apis/root';\n\nexport type { CollectionsRegistryClient, McpRegistryClient, RootRegistryClient };\n\nexport let createCollectionsRegistryClient = (\n o: Parameters<typeof createClient<CollectionsRegistryClient>>[0]\n): ReturnType<typeof createClient<CollectionsRegistryClient>> => createClient<CollectionsRegistryClient>(o);\n\nexport let createMcpRegistryClient = (\n o: Parameters<typeof createClient<McpRegistryClient>>[0]\n): ReturnType<typeof createClient<McpRegistryClient>> => createClient<McpRegistryClient>(o);\n\nexport let createRootRegistryClient = (\n o: Parameters<typeof createClient<RootRegistryClient>>[0]\n): ReturnType<typeof createClient<RootRegistryClient>> => createClient<RootRegistryClient>(o);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA6B;AAOtB,IAAI,kCAAkC,CAC3C,UAC+D,gCAAwC,CAAC;AAEnG,IAAI,0BAA0B,CACnC,UACuD,gCAAgC,CAAC;AAEnF,IAAI,2BAA2B,CACpC,UACwD,gCAAiC,CAAC;","names":[]}
@@ -0,0 +1,513 @@
1
+ import { createClient } from '@lowerdeck/rpc-client';
2
+ import * as _lowerdeck_rpc_server from '@lowerdeck/rpc-server';
3
+ import { InferClient } from '@lowerdeck/rpc-server';
4
+ import * as _lowerdeck_validation_dist_validators from '@lowerdeck/validation/dist/validators';
5
+
6
+ interface Registry {
7
+ identifier: string;
8
+ from: {
9
+ type: 'slates';
10
+ url: string;
11
+ } | {
12
+ type: 'mcp';
13
+ url: string;
14
+ } | {
15
+ type: 'collections';
16
+ url: string;
17
+ };
18
+ }
19
+ interface SubRegistry {
20
+ identifier: string;
21
+ registries: (Registry & {
22
+ id: string;
23
+ })[];
24
+ }
25
+
26
+ declare let getCollectionsRpc: (registry: Registry) => {
27
+ rpc: {
28
+ path: string;
29
+ fetch: (req: any) => Promise<any>;
30
+ };
31
+ controller: {
32
+ category: {
33
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
34
+ categoryId: string;
35
+ }>, {
36
+ object: string;
37
+ id: string;
38
+ identifier: string;
39
+ hash: string;
40
+ name: string;
41
+ description: string | null;
42
+ createdAt: Date;
43
+ updatedAt: Date;
44
+ }, {}>;
45
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
46
+ limit?: number;
47
+ after?: string;
48
+ before?: string;
49
+ cursor?: string;
50
+ order?: "asc" | "desc";
51
+ }, {
52
+ __typename: string;
53
+ items: {
54
+ object: string;
55
+ id: string;
56
+ identifier: string;
57
+ hash: string;
58
+ name: string;
59
+ description: string | null;
60
+ createdAt: Date;
61
+ updatedAt: Date;
62
+ }[];
63
+ pagination: {
64
+ has_more_after: boolean;
65
+ has_more_before: boolean;
66
+ };
67
+ }, {}>;
68
+ };
69
+ collection: {
70
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
71
+ collectionId: string;
72
+ }>, {
73
+ object: string;
74
+ id: string;
75
+ identifier: string;
76
+ hash: string;
77
+ name: string;
78
+ description: string | null;
79
+ createdAt: Date;
80
+ updatedAt: Date;
81
+ }, {}>;
82
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
83
+ limit?: number;
84
+ after?: string;
85
+ before?: string;
86
+ cursor?: string;
87
+ order?: "asc" | "desc";
88
+ }, {
89
+ __typename: string;
90
+ items: {
91
+ object: string;
92
+ id: string;
93
+ identifier: string;
94
+ hash: string;
95
+ name: string;
96
+ description: string | null;
97
+ createdAt: Date;
98
+ updatedAt: Date;
99
+ }[];
100
+ pagination: {
101
+ has_more_after: boolean;
102
+ has_more_before: boolean;
103
+ };
104
+ }, {}>;
105
+ };
106
+ slate: {
107
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
108
+ slateId: string;
109
+ }>, {
110
+ object: string;
111
+ id: string;
112
+ identifier: string;
113
+ hash: string;
114
+ collections: {
115
+ object: string;
116
+ id: string;
117
+ identifier: string;
118
+ hash: string;
119
+ name: string;
120
+ description: string | null;
121
+ createdAt: Date;
122
+ updatedAt: Date;
123
+ }[];
124
+ createdAt: Date;
125
+ updatedAt: Date;
126
+ }, {}>;
127
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
128
+ limit?: number;
129
+ after?: string;
130
+ before?: string;
131
+ cursor?: string;
132
+ order?: "asc" | "desc";
133
+ }, {
134
+ __typename: string;
135
+ items: {
136
+ object: string;
137
+ id: string;
138
+ identifier: string;
139
+ hash: string;
140
+ collections: {
141
+ object: string;
142
+ id: string;
143
+ identifier: string;
144
+ hash: string;
145
+ name: string;
146
+ description: string | null;
147
+ createdAt: Date;
148
+ updatedAt: Date;
149
+ }[];
150
+ createdAt: Date;
151
+ updatedAt: Date;
152
+ }[];
153
+ pagination: {
154
+ has_more_after: boolean;
155
+ has_more_before: boolean;
156
+ };
157
+ }, {}>;
158
+ };
159
+ };
160
+ };
161
+ type CollectionsRegistryClient = InferClient<ReturnType<typeof getCollectionsRpc>['controller']>;
162
+
163
+ declare let getMcpRpc: (registry: Registry) => {
164
+ rpc: {
165
+ path: string;
166
+ fetch: (req: any) => Promise<any>;
167
+ };
168
+ controller: {
169
+ category: {
170
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
171
+ categoryId: string;
172
+ }>, {
173
+ object: string;
174
+ id: string;
175
+ identifier: string;
176
+ hash: string;
177
+ name: string;
178
+ description: string | null;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ }, {}>;
182
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
183
+ limit?: number;
184
+ after?: string;
185
+ before?: string;
186
+ cursor?: string;
187
+ order?: "asc" | "desc";
188
+ }, {
189
+ __typename: string;
190
+ items: {
191
+ object: string;
192
+ id: string;
193
+ identifier: string;
194
+ hash: string;
195
+ name: string;
196
+ description: string | null;
197
+ createdAt: Date;
198
+ updatedAt: Date;
199
+ }[];
200
+ pagination: {
201
+ has_more_after: boolean;
202
+ has_more_before: boolean;
203
+ };
204
+ }, {}>;
205
+ };
206
+ collection: {
207
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
208
+ collectionId: string;
209
+ }>, {
210
+ object: string;
211
+ id: string;
212
+ identifier: string;
213
+ hash: string;
214
+ name: string;
215
+ description: string | null;
216
+ createdAt: Date;
217
+ updatedAt: Date;
218
+ }, {}>;
219
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
220
+ limit?: number;
221
+ after?: string;
222
+ before?: string;
223
+ cursor?: string;
224
+ order?: "asc" | "desc";
225
+ }, {
226
+ __typename: string;
227
+ items: {
228
+ object: string;
229
+ id: string;
230
+ identifier: string;
231
+ hash: string;
232
+ name: string;
233
+ description: string | null;
234
+ createdAt: Date;
235
+ updatedAt: Date;
236
+ }[];
237
+ pagination: {
238
+ has_more_after: boolean;
239
+ has_more_before: boolean;
240
+ };
241
+ }, {}>;
242
+ };
243
+ server: {
244
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
245
+ serverId: string;
246
+ }>, {
247
+ object: string;
248
+ id: string;
249
+ identifier: string;
250
+ hash: string;
251
+ name: string;
252
+ description: string | null;
253
+ readme: string | null;
254
+ imageUrl: string | null;
255
+ publisher: {
256
+ object: string;
257
+ id: string;
258
+ identifier: string;
259
+ hash: string;
260
+ name: string;
261
+ imageUrl: string | null;
262
+ createdAt: Date;
263
+ updatedAt: Date;
264
+ };
265
+ categories: {
266
+ object: string;
267
+ id: string;
268
+ identifier: string;
269
+ hash: string;
270
+ name: string;
271
+ description: string | null;
272
+ createdAt: Date;
273
+ updatedAt: Date;
274
+ }[];
275
+ collections: {
276
+ object: string;
277
+ id: string;
278
+ identifier: string;
279
+ hash: string;
280
+ name: string;
281
+ description: string | null;
282
+ createdAt: Date;
283
+ updatedAt: Date;
284
+ }[];
285
+ versions: {
286
+ object: string;
287
+ id: string;
288
+ hash: string;
289
+ version: string;
290
+ name: string;
291
+ from: {
292
+ type: "container";
293
+ imageRef: string;
294
+ schema: Record<string, any>;
295
+ transformer: string;
296
+ } | {
297
+ type: "remote";
298
+ remoteUrl: string;
299
+ protocol: "sse" | "streamable_http";
300
+ oauthConfig?: Record<string, any>;
301
+ };
302
+ createdAt: Date;
303
+ }[];
304
+ createdAt: Date;
305
+ updatedAt: Date;
306
+ }, {}>;
307
+ list: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
308
+ limit?: number;
309
+ after?: string;
310
+ before?: string;
311
+ cursor?: string;
312
+ order?: "asc" | "desc";
313
+ }, {
314
+ __typename: string;
315
+ items: {
316
+ object: string;
317
+ id: string;
318
+ identifier: string;
319
+ hash: string;
320
+ name: string;
321
+ description: string | null;
322
+ readme: string | null;
323
+ imageUrl: string | null;
324
+ publisher: {
325
+ object: string;
326
+ id: string;
327
+ identifier: string;
328
+ hash: string;
329
+ name: string;
330
+ imageUrl: string | null;
331
+ createdAt: Date;
332
+ updatedAt: Date;
333
+ };
334
+ categories: {
335
+ object: string;
336
+ id: string;
337
+ identifier: string;
338
+ hash: string;
339
+ name: string;
340
+ description: string | null;
341
+ createdAt: Date;
342
+ updatedAt: Date;
343
+ }[];
344
+ collections: {
345
+ object: string;
346
+ id: string;
347
+ identifier: string;
348
+ hash: string;
349
+ name: string;
350
+ description: string | null;
351
+ createdAt: Date;
352
+ updatedAt: Date;
353
+ }[];
354
+ versions: {
355
+ object: string;
356
+ id: string;
357
+ hash: string;
358
+ version: string;
359
+ name: string;
360
+ from: {
361
+ type: "container";
362
+ imageRef: string;
363
+ schema: Record<string, any>;
364
+ transformer: string;
365
+ } | {
366
+ type: "remote";
367
+ remoteUrl: string;
368
+ protocol: "sse" | "streamable_http";
369
+ oauthConfig?: Record<string, any>;
370
+ };
371
+ createdAt: Date;
372
+ }[];
373
+ createdAt: Date;
374
+ updatedAt: Date;
375
+ }[];
376
+ pagination: {
377
+ has_more_after: boolean;
378
+ has_more_before: boolean;
379
+ };
380
+ }, {}>;
381
+ listChanges: _lowerdeck_rpc_server.Handler<Partial<Pick<{}, never>> & {} & {
382
+ limit?: number;
383
+ after?: string;
384
+ before?: string;
385
+ cursor?: string;
386
+ order?: "asc" | "desc";
387
+ }, {
388
+ __typename: string;
389
+ items: {
390
+ object: string;
391
+ id: string;
392
+ server: {
393
+ object: string;
394
+ id: string;
395
+ identifier: string;
396
+ hash: string;
397
+ name: string;
398
+ description: string | null;
399
+ readme: string | null;
400
+ imageUrl: string | null;
401
+ publisher: {
402
+ object: string;
403
+ id: string;
404
+ identifier: string;
405
+ hash: string;
406
+ name: string;
407
+ imageUrl: string | null;
408
+ createdAt: Date;
409
+ updatedAt: Date;
410
+ };
411
+ categories: {
412
+ object: string;
413
+ id: string;
414
+ identifier: string;
415
+ hash: string;
416
+ name: string;
417
+ description: string | null;
418
+ createdAt: Date;
419
+ updatedAt: Date;
420
+ }[];
421
+ collections: {
422
+ object: string;
423
+ id: string;
424
+ identifier: string;
425
+ hash: string;
426
+ name: string;
427
+ description: string | null;
428
+ createdAt: Date;
429
+ updatedAt: Date;
430
+ }[];
431
+ versions: {
432
+ object: string;
433
+ id: string;
434
+ hash: string;
435
+ version: string;
436
+ name: string;
437
+ from: {
438
+ type: "container";
439
+ imageRef: string;
440
+ schema: Record<string, any>;
441
+ transformer: string;
442
+ } | {
443
+ type: "remote";
444
+ remoteUrl: string;
445
+ protocol: "sse" | "streamable_http";
446
+ oauthConfig?: Record<string, any>;
447
+ };
448
+ createdAt: Date;
449
+ }[];
450
+ createdAt: Date;
451
+ updatedAt: Date;
452
+ };
453
+ createdAt: Date;
454
+ }[];
455
+ pagination: {
456
+ has_more_after: boolean;
457
+ has_more_before: boolean;
458
+ };
459
+ }, {}>;
460
+ };
461
+ };
462
+ };
463
+ type McpRegistryClient = InferClient<ReturnType<typeof getMcpRpc>['controller']>;
464
+
465
+ declare let getRootRpc: (subRegistry: SubRegistry) => {
466
+ rpc: {
467
+ path: string;
468
+ fetch: (req: any) => Promise<any>;
469
+ };
470
+ controller: {
471
+ registry: {
472
+ get: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{
473
+ registriesId: string;
474
+ }>, {
475
+ object: string;
476
+ id: string;
477
+ identifier: string;
478
+ from: {
479
+ type: "slates";
480
+ url: string;
481
+ } | {
482
+ type: "mcp";
483
+ url: string;
484
+ } | {
485
+ type: "collections";
486
+ url: string;
487
+ };
488
+ }, {}>;
489
+ list: _lowerdeck_rpc_server.Handler<_lowerdeck_validation_dist_validators.UndefinedIsOptional<{}>, {
490
+ object: string;
491
+ id: string;
492
+ identifier: string;
493
+ from: {
494
+ type: "slates";
495
+ url: string;
496
+ } | {
497
+ type: "mcp";
498
+ url: string;
499
+ } | {
500
+ type: "collections";
501
+ url: string;
502
+ };
503
+ }[], {}>;
504
+ };
505
+ };
506
+ };
507
+ type RootRegistryClient = InferClient<ReturnType<typeof getRootRpc>['controller']>;
508
+
509
+ declare let createCollectionsRegistryClient: (o: Parameters<typeof createClient<CollectionsRegistryClient>>[0]) => ReturnType<typeof createClient<CollectionsRegistryClient>>;
510
+ declare let createMcpRegistryClient: (o: Parameters<typeof createClient<McpRegistryClient>>[0]) => ReturnType<typeof createClient<McpRegistryClient>>;
511
+ declare let createRootRegistryClient: (o: Parameters<typeof createClient<RootRegistryClient>>[0]) => ReturnType<typeof createClient<RootRegistryClient>>;
512
+
513
+ export { type CollectionsRegistryClient, type McpRegistryClient, type RootRegistryClient, createCollectionsRegistryClient, createMcpRegistryClient, createRootRegistryClient };
@@ -0,0 +1,603 @@
1
+ import { createClient } from '@lowerdeck/rpc-client';
2
+ import * as _lowerdeck_rpc_server from '@lowerdeck/rpc-server';
3
+ import { InferClient } from '@lowerdeck/rpc-server';
4
+ import * as _lowerdeck_validation_dist_validators from '@lowerdeck/validation/dist/validators';
5
+
6
+ interface Registry {
7
+ identifier: string;
8
+ from:
9
+ | {
10
+ type: 'slates';
11
+ url: string;
12
+ }
13
+ | {
14
+ type: 'mcp';
15
+ url: string;
16
+ }
17
+ | {
18
+ type: 'collections';
19
+ url: string;
20
+ };
21
+ }
22
+ interface SubRegistry {
23
+ identifier: string;
24
+ registries: (Registry & {
25
+ id: string;
26
+ })[];
27
+ }
28
+
29
+ declare let getCollectionsRpc: (registry: Registry) => {
30
+ rpc: {
31
+ path: string;
32
+ fetch: (req: any) => Promise<any>;
33
+ };
34
+ controller: {
35
+ category: {
36
+ get: _lowerdeck_rpc_server.Handler<
37
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
38
+ categoryId: string;
39
+ }>,
40
+ {
41
+ object: string;
42
+ id: string;
43
+ identifier: string;
44
+ hash: string;
45
+ name: string;
46
+ description: string | null;
47
+ createdAt: Date;
48
+ updatedAt: Date;
49
+ },
50
+ {}
51
+ >;
52
+ list: _lowerdeck_rpc_server.Handler<
53
+ Partial<Pick<{}, never>> & {} & {
54
+ limit?: number;
55
+ after?: string;
56
+ before?: string;
57
+ cursor?: string;
58
+ order?: 'asc' | 'desc';
59
+ },
60
+ {
61
+ __typename: string;
62
+ items: {
63
+ object: string;
64
+ id: string;
65
+ identifier: string;
66
+ hash: string;
67
+ name: string;
68
+ description: string | null;
69
+ createdAt: Date;
70
+ updatedAt: Date;
71
+ }[];
72
+ pagination: {
73
+ has_more_after: boolean;
74
+ has_more_before: boolean;
75
+ };
76
+ },
77
+ {}
78
+ >;
79
+ };
80
+ collection: {
81
+ get: _lowerdeck_rpc_server.Handler<
82
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
83
+ collectionId: string;
84
+ }>,
85
+ {
86
+ object: string;
87
+ id: string;
88
+ identifier: string;
89
+ hash: string;
90
+ name: string;
91
+ description: string | null;
92
+ createdAt: Date;
93
+ updatedAt: Date;
94
+ },
95
+ {}
96
+ >;
97
+ list: _lowerdeck_rpc_server.Handler<
98
+ Partial<Pick<{}, never>> & {} & {
99
+ limit?: number;
100
+ after?: string;
101
+ before?: string;
102
+ cursor?: string;
103
+ order?: 'asc' | 'desc';
104
+ },
105
+ {
106
+ __typename: string;
107
+ items: {
108
+ object: string;
109
+ id: string;
110
+ identifier: string;
111
+ hash: string;
112
+ name: string;
113
+ description: string | null;
114
+ createdAt: Date;
115
+ updatedAt: Date;
116
+ }[];
117
+ pagination: {
118
+ has_more_after: boolean;
119
+ has_more_before: boolean;
120
+ };
121
+ },
122
+ {}
123
+ >;
124
+ };
125
+ slate: {
126
+ get: _lowerdeck_rpc_server.Handler<
127
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
128
+ slateId: string;
129
+ }>,
130
+ {
131
+ object: string;
132
+ id: string;
133
+ identifier: string;
134
+ hash: string;
135
+ collections: {
136
+ object: string;
137
+ id: string;
138
+ identifier: string;
139
+ hash: string;
140
+ name: string;
141
+ description: string | null;
142
+ createdAt: Date;
143
+ updatedAt: Date;
144
+ }[];
145
+ createdAt: Date;
146
+ updatedAt: Date;
147
+ },
148
+ {}
149
+ >;
150
+ list: _lowerdeck_rpc_server.Handler<
151
+ Partial<Pick<{}, never>> & {} & {
152
+ limit?: number;
153
+ after?: string;
154
+ before?: string;
155
+ cursor?: string;
156
+ order?: 'asc' | 'desc';
157
+ },
158
+ {
159
+ __typename: string;
160
+ items: {
161
+ object: string;
162
+ id: string;
163
+ identifier: string;
164
+ hash: string;
165
+ collections: {
166
+ object: string;
167
+ id: string;
168
+ identifier: string;
169
+ hash: string;
170
+ name: string;
171
+ description: string | null;
172
+ createdAt: Date;
173
+ updatedAt: Date;
174
+ }[];
175
+ createdAt: Date;
176
+ updatedAt: Date;
177
+ }[];
178
+ pagination: {
179
+ has_more_after: boolean;
180
+ has_more_before: boolean;
181
+ };
182
+ },
183
+ {}
184
+ >;
185
+ };
186
+ };
187
+ };
188
+ type CollectionsRegistryClient = InferClient<
189
+ ReturnType<typeof getCollectionsRpc>['controller']
190
+ >;
191
+
192
+ declare let getMcpRpc: (registry: Registry) => {
193
+ rpc: {
194
+ path: string;
195
+ fetch: (req: any) => Promise<any>;
196
+ };
197
+ controller: {
198
+ category: {
199
+ get: _lowerdeck_rpc_server.Handler<
200
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
201
+ categoryId: string;
202
+ }>,
203
+ {
204
+ object: string;
205
+ id: string;
206
+ identifier: string;
207
+ hash: string;
208
+ name: string;
209
+ description: string | null;
210
+ createdAt: Date;
211
+ updatedAt: Date;
212
+ },
213
+ {}
214
+ >;
215
+ list: _lowerdeck_rpc_server.Handler<
216
+ Partial<Pick<{}, never>> & {} & {
217
+ limit?: number;
218
+ after?: string;
219
+ before?: string;
220
+ cursor?: string;
221
+ order?: 'asc' | 'desc';
222
+ },
223
+ {
224
+ __typename: string;
225
+ items: {
226
+ object: string;
227
+ id: string;
228
+ identifier: string;
229
+ hash: string;
230
+ name: string;
231
+ description: string | null;
232
+ createdAt: Date;
233
+ updatedAt: Date;
234
+ }[];
235
+ pagination: {
236
+ has_more_after: boolean;
237
+ has_more_before: boolean;
238
+ };
239
+ },
240
+ {}
241
+ >;
242
+ };
243
+ collection: {
244
+ get: _lowerdeck_rpc_server.Handler<
245
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
246
+ collectionId: string;
247
+ }>,
248
+ {
249
+ object: string;
250
+ id: string;
251
+ identifier: string;
252
+ hash: string;
253
+ name: string;
254
+ description: string | null;
255
+ createdAt: Date;
256
+ updatedAt: Date;
257
+ },
258
+ {}
259
+ >;
260
+ list: _lowerdeck_rpc_server.Handler<
261
+ Partial<Pick<{}, never>> & {} & {
262
+ limit?: number;
263
+ after?: string;
264
+ before?: string;
265
+ cursor?: string;
266
+ order?: 'asc' | 'desc';
267
+ },
268
+ {
269
+ __typename: string;
270
+ items: {
271
+ object: string;
272
+ id: string;
273
+ identifier: string;
274
+ hash: string;
275
+ name: string;
276
+ description: string | null;
277
+ createdAt: Date;
278
+ updatedAt: Date;
279
+ }[];
280
+ pagination: {
281
+ has_more_after: boolean;
282
+ has_more_before: boolean;
283
+ };
284
+ },
285
+ {}
286
+ >;
287
+ };
288
+ server: {
289
+ get: _lowerdeck_rpc_server.Handler<
290
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
291
+ serverId: string;
292
+ }>,
293
+ {
294
+ object: string;
295
+ id: string;
296
+ identifier: string;
297
+ hash: string;
298
+ name: string;
299
+ description: string | null;
300
+ readme: string | null;
301
+ imageUrl: string | null;
302
+ publisher: {
303
+ object: string;
304
+ id: string;
305
+ identifier: string;
306
+ hash: string;
307
+ name: string;
308
+ imageUrl: string | null;
309
+ createdAt: Date;
310
+ updatedAt: Date;
311
+ };
312
+ categories: {
313
+ object: string;
314
+ id: string;
315
+ identifier: string;
316
+ hash: string;
317
+ name: string;
318
+ description: string | null;
319
+ createdAt: Date;
320
+ updatedAt: Date;
321
+ }[];
322
+ collections: {
323
+ object: string;
324
+ id: string;
325
+ identifier: string;
326
+ hash: string;
327
+ name: string;
328
+ description: string | null;
329
+ createdAt: Date;
330
+ updatedAt: Date;
331
+ }[];
332
+ versions: {
333
+ object: string;
334
+ id: string;
335
+ hash: string;
336
+ version: string;
337
+ name: string;
338
+ from:
339
+ | {
340
+ type: 'container';
341
+ imageRef: string;
342
+ schema: Record<string, any>;
343
+ transformer: string;
344
+ }
345
+ | {
346
+ type: 'remote';
347
+ remoteUrl: string;
348
+ protocol: 'sse' | 'streamable_http';
349
+ oauthConfig?: Record<string, any>;
350
+ };
351
+ createdAt: Date;
352
+ }[];
353
+ createdAt: Date;
354
+ updatedAt: Date;
355
+ },
356
+ {}
357
+ >;
358
+ list: _lowerdeck_rpc_server.Handler<
359
+ Partial<Pick<{}, never>> & {} & {
360
+ limit?: number;
361
+ after?: string;
362
+ before?: string;
363
+ cursor?: string;
364
+ order?: 'asc' | 'desc';
365
+ },
366
+ {
367
+ __typename: string;
368
+ items: {
369
+ object: string;
370
+ id: string;
371
+ identifier: string;
372
+ hash: string;
373
+ name: string;
374
+ description: string | null;
375
+ readme: string | null;
376
+ imageUrl: string | null;
377
+ publisher: {
378
+ object: string;
379
+ id: string;
380
+ identifier: string;
381
+ hash: string;
382
+ name: string;
383
+ imageUrl: string | null;
384
+ createdAt: Date;
385
+ updatedAt: Date;
386
+ };
387
+ categories: {
388
+ object: string;
389
+ id: string;
390
+ identifier: string;
391
+ hash: string;
392
+ name: string;
393
+ description: string | null;
394
+ createdAt: Date;
395
+ updatedAt: Date;
396
+ }[];
397
+ collections: {
398
+ object: string;
399
+ id: string;
400
+ identifier: string;
401
+ hash: string;
402
+ name: string;
403
+ description: string | null;
404
+ createdAt: Date;
405
+ updatedAt: Date;
406
+ }[];
407
+ versions: {
408
+ object: string;
409
+ id: string;
410
+ hash: string;
411
+ version: string;
412
+ name: string;
413
+ from:
414
+ | {
415
+ type: 'container';
416
+ imageRef: string;
417
+ schema: Record<string, any>;
418
+ transformer: string;
419
+ }
420
+ | {
421
+ type: 'remote';
422
+ remoteUrl: string;
423
+ protocol: 'sse' | 'streamable_http';
424
+ oauthConfig?: Record<string, any>;
425
+ };
426
+ createdAt: Date;
427
+ }[];
428
+ createdAt: Date;
429
+ updatedAt: Date;
430
+ }[];
431
+ pagination: {
432
+ has_more_after: boolean;
433
+ has_more_before: boolean;
434
+ };
435
+ },
436
+ {}
437
+ >;
438
+ listChanges: _lowerdeck_rpc_server.Handler<
439
+ Partial<Pick<{}, never>> & {} & {
440
+ limit?: number;
441
+ after?: string;
442
+ before?: string;
443
+ cursor?: string;
444
+ order?: 'asc' | 'desc';
445
+ },
446
+ {
447
+ __typename: string;
448
+ items: {
449
+ object: string;
450
+ id: string;
451
+ server: {
452
+ object: string;
453
+ id: string;
454
+ identifier: string;
455
+ hash: string;
456
+ name: string;
457
+ description: string | null;
458
+ readme: string | null;
459
+ imageUrl: string | null;
460
+ publisher: {
461
+ object: string;
462
+ id: string;
463
+ identifier: string;
464
+ hash: string;
465
+ name: string;
466
+ imageUrl: string | null;
467
+ createdAt: Date;
468
+ updatedAt: Date;
469
+ };
470
+ categories: {
471
+ object: string;
472
+ id: string;
473
+ identifier: string;
474
+ hash: string;
475
+ name: string;
476
+ description: string | null;
477
+ createdAt: Date;
478
+ updatedAt: Date;
479
+ }[];
480
+ collections: {
481
+ object: string;
482
+ id: string;
483
+ identifier: string;
484
+ hash: string;
485
+ name: string;
486
+ description: string | null;
487
+ createdAt: Date;
488
+ updatedAt: Date;
489
+ }[];
490
+ versions: {
491
+ object: string;
492
+ id: string;
493
+ hash: string;
494
+ version: string;
495
+ name: string;
496
+ from:
497
+ | {
498
+ type: 'container';
499
+ imageRef: string;
500
+ schema: Record<string, any>;
501
+ transformer: string;
502
+ }
503
+ | {
504
+ type: 'remote';
505
+ remoteUrl: string;
506
+ protocol: 'sse' | 'streamable_http';
507
+ oauthConfig?: Record<string, any>;
508
+ };
509
+ createdAt: Date;
510
+ }[];
511
+ createdAt: Date;
512
+ updatedAt: Date;
513
+ };
514
+ createdAt: Date;
515
+ }[];
516
+ pagination: {
517
+ has_more_after: boolean;
518
+ has_more_before: boolean;
519
+ };
520
+ },
521
+ {}
522
+ >;
523
+ };
524
+ };
525
+ };
526
+ type McpRegistryClient = InferClient<ReturnType<typeof getMcpRpc>['controller']>;
527
+
528
+ declare let getRootRpc: (subRegistry: SubRegistry) => {
529
+ rpc: {
530
+ path: string;
531
+ fetch: (req: any) => Promise<any>;
532
+ };
533
+ controller: {
534
+ registry: {
535
+ get: _lowerdeck_rpc_server.Handler<
536
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{
537
+ registriesId: string;
538
+ }>,
539
+ {
540
+ object: string;
541
+ id: string;
542
+ identifier: string;
543
+ from:
544
+ | {
545
+ type: 'slates';
546
+ url: string;
547
+ }
548
+ | {
549
+ type: 'mcp';
550
+ url: string;
551
+ }
552
+ | {
553
+ type: 'collections';
554
+ url: string;
555
+ };
556
+ },
557
+ {}
558
+ >;
559
+ list: _lowerdeck_rpc_server.Handler<
560
+ _lowerdeck_validation_dist_validators.UndefinedIsOptional<{}>,
561
+ {
562
+ object: string;
563
+ id: string;
564
+ identifier: string;
565
+ from:
566
+ | {
567
+ type: 'slates';
568
+ url: string;
569
+ }
570
+ | {
571
+ type: 'mcp';
572
+ url: string;
573
+ }
574
+ | {
575
+ type: 'collections';
576
+ url: string;
577
+ };
578
+ }[],
579
+ {}
580
+ >;
581
+ };
582
+ };
583
+ };
584
+ type RootRegistryClient = InferClient<ReturnType<typeof getRootRpc>['controller']>;
585
+
586
+ declare let createCollectionsRegistryClient: (
587
+ o: Parameters<typeof createClient<CollectionsRegistryClient>>[0]
588
+ ) => ReturnType<typeof createClient<CollectionsRegistryClient>>;
589
+ declare let createMcpRegistryClient: (
590
+ o: Parameters<typeof createClient<McpRegistryClient>>[0]
591
+ ) => ReturnType<typeof createClient<McpRegistryClient>>;
592
+ declare let createRootRegistryClient: (
593
+ o: Parameters<typeof createClient<RootRegistryClient>>[0]
594
+ ) => ReturnType<typeof createClient<RootRegistryClient>>;
595
+
596
+ export {
597
+ createCollectionsRegistryClient,
598
+ createMcpRegistryClient,
599
+ createRootRegistryClient,
600
+ type CollectionsRegistryClient,
601
+ type McpRegistryClient,
602
+ type RootRegistryClient
603
+ };
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // src/index.ts
2
+ import { createClient } from "@lowerdeck/rpc-client";
3
+ var createCollectionsRegistryClient = (o) => createClient(o);
4
+ var createMcpRegistryClient = (o) => createClient(o);
5
+ var createRootRegistryClient = (o) => createClient(o);
6
+ export {
7
+ createCollectionsRegistryClient,
8
+ createMcpRegistryClient,
9
+ createRootRegistryClient
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createClient } from '@lowerdeck/rpc-client';\nimport type { CollectionsRegistryClient } from '../../../server/src/apis/collections';\nimport type { McpRegistryClient } from '../../../server/src/apis/mcp';\nimport type { RootRegistryClient } from '../../../server/src/apis/root';\n\nexport type { CollectionsRegistryClient, McpRegistryClient, RootRegistryClient };\n\nexport let createCollectionsRegistryClient = (\n o: Parameters<typeof createClient<CollectionsRegistryClient>>[0]\n): ReturnType<typeof createClient<CollectionsRegistryClient>> => createClient<CollectionsRegistryClient>(o);\n\nexport let createMcpRegistryClient = (\n o: Parameters<typeof createClient<McpRegistryClient>>[0]\n): ReturnType<typeof createClient<McpRegistryClient>> => createClient<McpRegistryClient>(o);\n\nexport let createRootRegistryClient = (\n o: Parameters<typeof createClient<RootRegistryClient>>[0]\n): ReturnType<typeof createClient<RootRegistryClient>> => createClient<RootRegistryClient>(o);\n"],"mappings":";AAAA,SAAS,oBAAoB;AAOtB,IAAI,kCAAkC,CAC3C,MAC+D,aAAwC,CAAC;AAEnG,IAAI,0BAA0B,CACnC,MACuD,aAAgC,CAAC;AAEnF,IAAI,2BAA2B,CACpC,MACwD,aAAiC,CAAC;","names":[]}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@metorial-services/registry-client",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "files": [
8
+ "src/**",
9
+ "dist/**",
10
+ "README.md",
11
+ "package.json"
12
+ ],
13
+ "author": "Tobias Herber",
14
+ "license": "FSL 1.1",
15
+ "type": "module",
16
+ "source": "src/index.ts",
17
+ "exports": {
18
+ "types": "./dist/index.d.ts",
19
+ "require": "./dist/index.cjs",
20
+ "import": "./dist/index.js",
21
+ "default": "./dist/index.js"
22
+ },
23
+ "main": "./dist/index.cjs",
24
+ "module": "./dist/index.js",
25
+ "types": "dist/index.d.ts",
26
+ "scripts": {
27
+ "test": "vitest run --passWithNoTests",
28
+ "lint": "prettier src/**/*.ts --check",
29
+ "build": "tsup",
30
+ "prepublish": "bun run build",
31
+ "typecheck": "tsc --noEmit"
32
+ },
33
+ "dependencies": {
34
+ "@lowerdeck/rpc-client": "^1.0.3",
35
+ "@lowerdeck/rpc-server": "^1.0.6",
36
+ "@lowerdeck/validation": "^1.0.4"
37
+ },
38
+ "devDependencies": {
39
+ "tsup": "^8.5.1",
40
+ "typescript": "^5.8.3",
41
+ "vitest": "^3.1.2"
42
+ }
43
+ }
package/src/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { createClient } from '@lowerdeck/rpc-client';
2
+ import type { CollectionsRegistryClient } from '../../../server/src/apis/collections';
3
+ import type { McpRegistryClient } from '../../../server/src/apis/mcp';
4
+ import type { RootRegistryClient } from '../../../server/src/apis/root';
5
+
6
+ export type { CollectionsRegistryClient, McpRegistryClient, RootRegistryClient };
7
+
8
+ export let createCollectionsRegistryClient = (
9
+ o: Parameters<typeof createClient<CollectionsRegistryClient>>[0]
10
+ ): ReturnType<typeof createClient<CollectionsRegistryClient>> => createClient<CollectionsRegistryClient>(o);
11
+
12
+ export let createMcpRegistryClient = (
13
+ o: Parameters<typeof createClient<McpRegistryClient>>[0]
14
+ ): ReturnType<typeof createClient<McpRegistryClient>> => createClient<McpRegistryClient>(o);
15
+
16
+ export let createRootRegistryClient = (
17
+ o: Parameters<typeof createClient<RootRegistryClient>>[0]
18
+ ): ReturnType<typeof createClient<RootRegistryClient>> => createClient<RootRegistryClient>(o);