@bsb/registry 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/bsb-plugin.json +47 -0
- package/lib/.bsb/clients/service-bsb-registry.d.ts +1118 -0
- package/lib/.bsb/clients/service-bsb-registry.d.ts.map +1 -0
- package/lib/.bsb/clients/service-bsb-registry.js +393 -0
- package/lib/.bsb/clients/service-bsb-registry.js.map +1 -0
- package/lib/plugins/service-bsb-registry/auth.d.ts +87 -0
- package/lib/plugins/service-bsb-registry/auth.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry/auth.js +197 -0
- package/lib/plugins/service-bsb-registry/auth.js.map +1 -0
- package/lib/plugins/service-bsb-registry/db/file.d.ts +73 -0
- package/lib/plugins/service-bsb-registry/db/file.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry/db/file.js +588 -0
- package/lib/plugins/service-bsb-registry/db/file.js.map +1 -0
- package/lib/plugins/service-bsb-registry/db/index.d.ts +75 -0
- package/lib/plugins/service-bsb-registry/db/index.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry/db/index.js +24 -0
- package/lib/plugins/service-bsb-registry/db/index.js.map +1 -0
- package/lib/plugins/service-bsb-registry/index.d.ts +1228 -0
- package/lib/plugins/service-bsb-registry/index.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry/index.js +661 -0
- package/lib/plugins/service-bsb-registry/index.js.map +1 -0
- package/lib/plugins/service-bsb-registry/types.d.ts +559 -0
- package/lib/plugins/service-bsb-registry/types.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry/types.js +235 -0
- package/lib/plugins/service-bsb-registry/types.js.map +1 -0
- package/lib/plugins/service-bsb-registry-ui/http-server.d.ts +138 -0
- package/lib/plugins/service-bsb-registry-ui/http-server.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry-ui/http-server.js +1660 -0
- package/lib/plugins/service-bsb-registry-ui/http-server.js.map +1 -0
- package/lib/plugins/service-bsb-registry-ui/index.d.ts +62 -0
- package/lib/plugins/service-bsb-registry-ui/index.d.ts.map +1 -0
- package/lib/plugins/service-bsb-registry-ui/index.js +101 -0
- package/lib/plugins/service-bsb-registry-ui/index.js.map +1 -0
- package/lib/plugins/service-bsb-registry-ui/static/assets/images/apple-touch-icon.png +0 -0
- package/lib/plugins/service-bsb-registry-ui/static/assets/images/favicon-16x16.png +0 -0
- package/lib/plugins/service-bsb-registry-ui/static/assets/images/favicon-32x32.png +0 -0
- package/lib/plugins/service-bsb-registry-ui/static/assets/images/favicon.ico +0 -0
- package/lib/plugins/service-bsb-registry-ui/static/css/style.css +1849 -0
- package/lib/plugins/service-bsb-registry-ui/static/js/app.js +336 -0
- package/lib/plugins/service-bsb-registry-ui/templates/layouts/main.hbs +39 -0
- package/lib/plugins/service-bsb-registry-ui/templates/pages/error.hbs +13 -0
- package/lib/plugins/service-bsb-registry-ui/templates/pages/home.hbs +62 -0
- package/lib/plugins/service-bsb-registry-ui/templates/pages/not-found.hbs +13 -0
- package/lib/plugins/service-bsb-registry-ui/templates/pages/plugin-detail.hbs +537 -0
- package/lib/plugins/service-bsb-registry-ui/templates/pages/plugins.hbs +40 -0
- package/lib/plugins/service-bsb-registry-ui/templates/partials/pagination.hbs +41 -0
- package/lib/plugins/service-bsb-registry-ui/templates/partials/plugin-card.hbs +40 -0
- package/lib/plugins/service-bsb-registry-ui/templates/partials/search-form.hbs +31 -0
- package/lib/schemas/service-bsb-registry-ui.json +57 -0
- package/lib/schemas/service-bsb-registry-ui.plugin.json +73 -0
- package/lib/schemas/service-bsb-registry.json +1883 -0
- package/lib/schemas/service-bsb-registry.plugin.json +68 -0
- package/package.json +60 -0
|
@@ -0,0 +1,1228 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BSBService, BSBServiceConstructor, Observable } from '@bsb/base';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration schema for BSB Registry (Core - Event-Driven).
|
|
5
|
+
*/
|
|
6
|
+
export declare const RegistryConfigSchema: z.ZodObject<{
|
|
7
|
+
database: z.ZodObject<{
|
|
8
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
9
|
+
file: "file";
|
|
10
|
+
postgres: "postgres";
|
|
11
|
+
}>>;
|
|
12
|
+
path: z.ZodDefault<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
auth: z.ZodObject<{
|
|
15
|
+
requireAuth: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type RegistryConfig = z.infer<typeof RegistryConfigSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* Event schemas for BSB Registry Core.
|
|
21
|
+
* All operations are event-driven for maximum flexibility.
|
|
22
|
+
*/
|
|
23
|
+
export declare const EventSchemas: {
|
|
24
|
+
readonly onReturnableEvents: {
|
|
25
|
+
readonly 'registry.plugin.publish': {
|
|
26
|
+
input: {
|
|
27
|
+
_bsb: "object";
|
|
28
|
+
properties: {
|
|
29
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
30
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
31
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
32
|
+
readonly language: import("@bsb/base").BSBEnumType;
|
|
33
|
+
readonly metadata: {
|
|
34
|
+
_bsb: "object";
|
|
35
|
+
properties: {
|
|
36
|
+
readonly displayName: import("@bsb/base").BSBStringType;
|
|
37
|
+
readonly description: import("@bsb/base").BSBStringType;
|
|
38
|
+
readonly category: import("@bsb/base").BSBEnumType;
|
|
39
|
+
readonly tags: import("@bsb/base").BSBArrayType;
|
|
40
|
+
readonly author: import("@bsb/base").BSBUnionType & {
|
|
41
|
+
optional: true;
|
|
42
|
+
};
|
|
43
|
+
readonly license: import("@bsb/base").BSBStringType & {
|
|
44
|
+
optional: true;
|
|
45
|
+
};
|
|
46
|
+
readonly homepage: import("@bsb/base").BSBStringType & {
|
|
47
|
+
optional: true;
|
|
48
|
+
};
|
|
49
|
+
readonly repository: import("@bsb/base").BSBStringType & {
|
|
50
|
+
optional: true;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
required: string[];
|
|
54
|
+
description?: string;
|
|
55
|
+
optional?: boolean;
|
|
56
|
+
nullable?: boolean;
|
|
57
|
+
};
|
|
58
|
+
readonly eventSchema: import("@bsb/base").BSBType;
|
|
59
|
+
readonly capabilities: import("@bsb/base").BSBType & {
|
|
60
|
+
optional: true;
|
|
61
|
+
};
|
|
62
|
+
readonly configSchema: import("@bsb/base").BSBType & {
|
|
63
|
+
optional: true;
|
|
64
|
+
};
|
|
65
|
+
readonly typeDefinitions: {
|
|
66
|
+
_bsb: "object";
|
|
67
|
+
properties: {
|
|
68
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
69
|
+
optional: true;
|
|
70
|
+
};
|
|
71
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
72
|
+
optional: true;
|
|
73
|
+
};
|
|
74
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
75
|
+
optional: true;
|
|
76
|
+
};
|
|
77
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
78
|
+
optional: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
required: string[];
|
|
82
|
+
description?: string;
|
|
83
|
+
optional?: boolean;
|
|
84
|
+
nullable?: boolean;
|
|
85
|
+
} & {
|
|
86
|
+
optional: true;
|
|
87
|
+
};
|
|
88
|
+
readonly documentation: import("@bsb/base").BSBArrayType;
|
|
89
|
+
readonly dependencies: import("@bsb/base").BSBArrayType & {
|
|
90
|
+
optional: true;
|
|
91
|
+
};
|
|
92
|
+
readonly package: {
|
|
93
|
+
_bsb: "object";
|
|
94
|
+
properties: {
|
|
95
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
96
|
+
optional: true;
|
|
97
|
+
};
|
|
98
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
99
|
+
optional: true;
|
|
100
|
+
};
|
|
101
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
102
|
+
optional: true;
|
|
103
|
+
};
|
|
104
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
105
|
+
optional: true;
|
|
106
|
+
};
|
|
107
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
108
|
+
optional: true;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
required: string[];
|
|
112
|
+
description?: string;
|
|
113
|
+
optional?: boolean;
|
|
114
|
+
nullable?: boolean;
|
|
115
|
+
} & {
|
|
116
|
+
optional: true;
|
|
117
|
+
};
|
|
118
|
+
readonly runtime: {
|
|
119
|
+
_bsb: "object";
|
|
120
|
+
properties: {
|
|
121
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
122
|
+
optional: true;
|
|
123
|
+
};
|
|
124
|
+
readonly dotnet: import("@bsb/base").BSBStringType & {
|
|
125
|
+
optional: true;
|
|
126
|
+
};
|
|
127
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
128
|
+
optional: true;
|
|
129
|
+
};
|
|
130
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
131
|
+
optional: true;
|
|
132
|
+
};
|
|
133
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
134
|
+
optional: true;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
required: string[];
|
|
138
|
+
description?: string;
|
|
139
|
+
optional?: boolean;
|
|
140
|
+
nullable?: boolean;
|
|
141
|
+
} & {
|
|
142
|
+
optional: true;
|
|
143
|
+
};
|
|
144
|
+
readonly visibility: import("@bsb/base").BSBEnumType & {
|
|
145
|
+
optional: true;
|
|
146
|
+
};
|
|
147
|
+
readonly publishedBy: import("@bsb/base").BSBStringType & {
|
|
148
|
+
optional: true;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
required: string[];
|
|
152
|
+
description?: string;
|
|
153
|
+
optional?: boolean;
|
|
154
|
+
nullable?: boolean;
|
|
155
|
+
};
|
|
156
|
+
output: {
|
|
157
|
+
_bsb: "object";
|
|
158
|
+
properties: {
|
|
159
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
160
|
+
readonly pluginId: import("@bsb/base").BSBStringType;
|
|
161
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
162
|
+
readonly message: import("@bsb/base").BSBStringType & {
|
|
163
|
+
optional: true;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
required: string[];
|
|
167
|
+
description?: string;
|
|
168
|
+
optional?: boolean;
|
|
169
|
+
nullable?: boolean;
|
|
170
|
+
};
|
|
171
|
+
description?: string;
|
|
172
|
+
defaultTimeout?: number;
|
|
173
|
+
readonly __brand: "returnable";
|
|
174
|
+
};
|
|
175
|
+
readonly 'registry.plugin.get': {
|
|
176
|
+
input: {
|
|
177
|
+
_bsb: "object";
|
|
178
|
+
properties: {
|
|
179
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
180
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
181
|
+
readonly version: import("@bsb/base").BSBStringType & {
|
|
182
|
+
optional: true;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
required: string[];
|
|
186
|
+
description?: string;
|
|
187
|
+
optional?: boolean;
|
|
188
|
+
nullable?: boolean;
|
|
189
|
+
};
|
|
190
|
+
output: {
|
|
191
|
+
_bsb: "object";
|
|
192
|
+
properties: {
|
|
193
|
+
readonly id: import("@bsb/base").BSBStringType;
|
|
194
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
195
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
196
|
+
readonly displayName: import("@bsb/base").BSBStringType;
|
|
197
|
+
readonly description: import("@bsb/base").BSBStringType;
|
|
198
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
199
|
+
readonly majorMinor: import("@bsb/base").BSBStringType;
|
|
200
|
+
readonly language: import("@bsb/base").BSBEnumType;
|
|
201
|
+
readonly package: {
|
|
202
|
+
_bsb: "object";
|
|
203
|
+
properties: {
|
|
204
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
205
|
+
optional: true;
|
|
206
|
+
};
|
|
207
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
208
|
+
optional: true;
|
|
209
|
+
};
|
|
210
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
211
|
+
optional: true;
|
|
212
|
+
};
|
|
213
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
214
|
+
optional: true;
|
|
215
|
+
};
|
|
216
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
217
|
+
optional: true;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
required: string[];
|
|
221
|
+
description?: string;
|
|
222
|
+
optional?: boolean;
|
|
223
|
+
nullable?: boolean;
|
|
224
|
+
} & {
|
|
225
|
+
optional: true;
|
|
226
|
+
};
|
|
227
|
+
readonly category: import("@bsb/base").BSBEnumType;
|
|
228
|
+
readonly tags: import("@bsb/base").BSBArrayType;
|
|
229
|
+
readonly author: import("@bsb/base").BSBUnionType & {
|
|
230
|
+
optional: true;
|
|
231
|
+
};
|
|
232
|
+
readonly license: import("@bsb/base").BSBStringType & {
|
|
233
|
+
optional: true;
|
|
234
|
+
};
|
|
235
|
+
readonly homepage: import("@bsb/base").BSBStringType & {
|
|
236
|
+
optional: true;
|
|
237
|
+
};
|
|
238
|
+
readonly repository: import("@bsb/base").BSBStringType & {
|
|
239
|
+
optional: true;
|
|
240
|
+
};
|
|
241
|
+
readonly visibility: import("@bsb/base").BSBEnumType;
|
|
242
|
+
readonly eventSchema: import("@bsb/base").BSBType;
|
|
243
|
+
readonly capabilities: import("@bsb/base").BSBType & {
|
|
244
|
+
optional: true;
|
|
245
|
+
};
|
|
246
|
+
readonly configSchema: import("@bsb/base").BSBType & {
|
|
247
|
+
optional: true;
|
|
248
|
+
};
|
|
249
|
+
readonly typeDefinitions: {
|
|
250
|
+
_bsb: "object";
|
|
251
|
+
properties: {
|
|
252
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
253
|
+
optional: true;
|
|
254
|
+
};
|
|
255
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
256
|
+
optional: true;
|
|
257
|
+
};
|
|
258
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
259
|
+
optional: true;
|
|
260
|
+
};
|
|
261
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
262
|
+
optional: true;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
required: string[];
|
|
266
|
+
description?: string;
|
|
267
|
+
optional?: boolean;
|
|
268
|
+
nullable?: boolean;
|
|
269
|
+
} & {
|
|
270
|
+
optional: true;
|
|
271
|
+
};
|
|
272
|
+
readonly documentation: import("@bsb/base").BSBArrayType & {
|
|
273
|
+
optional: true;
|
|
274
|
+
};
|
|
275
|
+
readonly dependencies: import("@bsb/base").BSBArrayType & {
|
|
276
|
+
optional: true;
|
|
277
|
+
};
|
|
278
|
+
readonly permissions: import("@bsb/base").BSBArrayType & {
|
|
279
|
+
optional: true;
|
|
280
|
+
};
|
|
281
|
+
readonly eventCount: import("@bsb/base").BSBNumberType;
|
|
282
|
+
readonly emitEventCount: import("@bsb/base").BSBNumberType;
|
|
283
|
+
readonly onEventCount: import("@bsb/base").BSBNumberType;
|
|
284
|
+
readonly returnableEventCount: import("@bsb/base").BSBNumberType;
|
|
285
|
+
readonly broadcastEventCount: import("@bsb/base").BSBNumberType;
|
|
286
|
+
readonly publishedBy: import("@bsb/base").BSBStringType;
|
|
287
|
+
readonly publishedAt: import("@bsb/base").BSBStringType;
|
|
288
|
+
readonly updatedAt: import("@bsb/base").BSBStringType;
|
|
289
|
+
readonly downloads: import("@bsb/base").BSBNumberType & {
|
|
290
|
+
optional: true;
|
|
291
|
+
};
|
|
292
|
+
readonly runtime: {
|
|
293
|
+
_bsb: "object";
|
|
294
|
+
properties: {
|
|
295
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
296
|
+
optional: true;
|
|
297
|
+
};
|
|
298
|
+
readonly dotnet: import("@bsb/base").BSBStringType & {
|
|
299
|
+
optional: true;
|
|
300
|
+
};
|
|
301
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
302
|
+
optional: true;
|
|
303
|
+
};
|
|
304
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
305
|
+
optional: true;
|
|
306
|
+
};
|
|
307
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
308
|
+
optional: true;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
required: string[];
|
|
312
|
+
description?: string;
|
|
313
|
+
optional?: boolean;
|
|
314
|
+
nullable?: boolean;
|
|
315
|
+
} & {
|
|
316
|
+
optional: true;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
required: string[];
|
|
320
|
+
description?: string;
|
|
321
|
+
optional?: boolean;
|
|
322
|
+
nullable?: boolean;
|
|
323
|
+
};
|
|
324
|
+
description?: string;
|
|
325
|
+
defaultTimeout?: number;
|
|
326
|
+
readonly __brand: "returnable";
|
|
327
|
+
};
|
|
328
|
+
readonly 'registry.plugin.list': {
|
|
329
|
+
input: {
|
|
330
|
+
_bsb: "object";
|
|
331
|
+
properties: {
|
|
332
|
+
readonly org: import("@bsb/base").BSBStringType & {
|
|
333
|
+
optional: true;
|
|
334
|
+
};
|
|
335
|
+
readonly language: import("@bsb/base").BSBEnumType & {
|
|
336
|
+
optional: true;
|
|
337
|
+
};
|
|
338
|
+
readonly category: import("@bsb/base").BSBEnumType & {
|
|
339
|
+
optional: true;
|
|
340
|
+
};
|
|
341
|
+
readonly limit: import("@bsb/base").BSBNumberType & {
|
|
342
|
+
optional: true;
|
|
343
|
+
};
|
|
344
|
+
readonly offset: import("@bsb/base").BSBNumberType & {
|
|
345
|
+
optional: true;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
required: string[];
|
|
349
|
+
description?: string;
|
|
350
|
+
optional?: boolean;
|
|
351
|
+
nullable?: boolean;
|
|
352
|
+
};
|
|
353
|
+
output: {
|
|
354
|
+
_bsb: "object";
|
|
355
|
+
properties: {
|
|
356
|
+
readonly results: import("@bsb/base").BSBArrayType;
|
|
357
|
+
readonly total: import("@bsb/base").BSBNumberType;
|
|
358
|
+
readonly page: import("@bsb/base").BSBNumberType;
|
|
359
|
+
};
|
|
360
|
+
required: string[];
|
|
361
|
+
description?: string;
|
|
362
|
+
optional?: boolean;
|
|
363
|
+
nullable?: boolean;
|
|
364
|
+
};
|
|
365
|
+
description?: string;
|
|
366
|
+
defaultTimeout?: number;
|
|
367
|
+
readonly __brand: "returnable";
|
|
368
|
+
};
|
|
369
|
+
readonly 'registry.plugin.search': {
|
|
370
|
+
input: {
|
|
371
|
+
_bsb: "object";
|
|
372
|
+
properties: {
|
|
373
|
+
readonly query: import("@bsb/base").BSBStringType;
|
|
374
|
+
readonly language: import("@bsb/base").BSBEnumType & {
|
|
375
|
+
optional: true;
|
|
376
|
+
};
|
|
377
|
+
readonly category: import("@bsb/base").BSBEnumType & {
|
|
378
|
+
optional: true;
|
|
379
|
+
};
|
|
380
|
+
readonly limit: import("@bsb/base").BSBNumberType & {
|
|
381
|
+
optional: true;
|
|
382
|
+
};
|
|
383
|
+
readonly offset: import("@bsb/base").BSBNumberType & {
|
|
384
|
+
optional: true;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
required: string[];
|
|
388
|
+
description?: string;
|
|
389
|
+
optional?: boolean;
|
|
390
|
+
nullable?: boolean;
|
|
391
|
+
};
|
|
392
|
+
output: {
|
|
393
|
+
_bsb: "object";
|
|
394
|
+
properties: {
|
|
395
|
+
readonly results: import("@bsb/base").BSBArrayType;
|
|
396
|
+
readonly total: import("@bsb/base").BSBNumberType;
|
|
397
|
+
readonly query: import("@bsb/base").BSBStringType;
|
|
398
|
+
};
|
|
399
|
+
required: string[];
|
|
400
|
+
description?: string;
|
|
401
|
+
optional?: boolean;
|
|
402
|
+
nullable?: boolean;
|
|
403
|
+
};
|
|
404
|
+
description?: string;
|
|
405
|
+
defaultTimeout?: number;
|
|
406
|
+
readonly __brand: "returnable";
|
|
407
|
+
};
|
|
408
|
+
readonly 'registry.plugin.delete': {
|
|
409
|
+
input: {
|
|
410
|
+
_bsb: "object";
|
|
411
|
+
properties: {
|
|
412
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
413
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
414
|
+
readonly version: import("@bsb/base").BSBStringType & {
|
|
415
|
+
optional: true;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
required: string[];
|
|
419
|
+
description?: string;
|
|
420
|
+
optional?: boolean;
|
|
421
|
+
nullable?: boolean;
|
|
422
|
+
};
|
|
423
|
+
output: {
|
|
424
|
+
_bsb: "object";
|
|
425
|
+
properties: {
|
|
426
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
427
|
+
readonly deleted: import("@bsb/base").BSBNumberType;
|
|
428
|
+
};
|
|
429
|
+
required: string[];
|
|
430
|
+
description?: string;
|
|
431
|
+
optional?: boolean;
|
|
432
|
+
nullable?: boolean;
|
|
433
|
+
};
|
|
434
|
+
description?: string;
|
|
435
|
+
defaultTimeout?: number;
|
|
436
|
+
readonly __brand: "returnable";
|
|
437
|
+
};
|
|
438
|
+
readonly 'registry.plugin.versions': {
|
|
439
|
+
input: {
|
|
440
|
+
_bsb: "object";
|
|
441
|
+
properties: {
|
|
442
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
443
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
444
|
+
readonly majorMinor: import("@bsb/base").BSBStringType & {
|
|
445
|
+
optional: true;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
required: string[];
|
|
449
|
+
description?: string;
|
|
450
|
+
optional?: boolean;
|
|
451
|
+
nullable?: boolean;
|
|
452
|
+
};
|
|
453
|
+
output: {
|
|
454
|
+
_bsb: "object";
|
|
455
|
+
properties: {
|
|
456
|
+
readonly versions: import("@bsb/base").BSBArrayType;
|
|
457
|
+
readonly latest: import("@bsb/base").BSBStringType;
|
|
458
|
+
readonly latestForMajorMinor: import("@bsb/base").BSBStringType;
|
|
459
|
+
};
|
|
460
|
+
required: string[];
|
|
461
|
+
description?: string;
|
|
462
|
+
optional?: boolean;
|
|
463
|
+
nullable?: boolean;
|
|
464
|
+
};
|
|
465
|
+
description?: string;
|
|
466
|
+
defaultTimeout?: number;
|
|
467
|
+
readonly __brand: "returnable";
|
|
468
|
+
};
|
|
469
|
+
readonly 'registry.stats.get': {
|
|
470
|
+
input: {
|
|
471
|
+
_bsb: "object";
|
|
472
|
+
properties: {};
|
|
473
|
+
required: string[];
|
|
474
|
+
description?: string;
|
|
475
|
+
optional?: boolean;
|
|
476
|
+
nullable?: boolean;
|
|
477
|
+
};
|
|
478
|
+
output: {
|
|
479
|
+
_bsb: "object";
|
|
480
|
+
properties: {
|
|
481
|
+
readonly totalPlugins: import("@bsb/base").BSBNumberType;
|
|
482
|
+
readonly byLanguage: import("@bsb/base").BSBStringType;
|
|
483
|
+
readonly byCategory: import("@bsb/base").BSBStringType;
|
|
484
|
+
readonly totalDownloads: import("@bsb/base").BSBNumberType;
|
|
485
|
+
};
|
|
486
|
+
required: string[];
|
|
487
|
+
description?: string;
|
|
488
|
+
optional?: boolean;
|
|
489
|
+
nullable?: boolean;
|
|
490
|
+
};
|
|
491
|
+
description?: string;
|
|
492
|
+
defaultTimeout?: number;
|
|
493
|
+
readonly __brand: "returnable";
|
|
494
|
+
};
|
|
495
|
+
readonly 'registry.auth.login': {
|
|
496
|
+
input: {
|
|
497
|
+
_bsb: "object";
|
|
498
|
+
properties: {
|
|
499
|
+
readonly username: import("@bsb/base").BSBStringType;
|
|
500
|
+
readonly password: import("@bsb/base").BSBStringType;
|
|
501
|
+
};
|
|
502
|
+
required: string[];
|
|
503
|
+
description?: string;
|
|
504
|
+
optional?: boolean;
|
|
505
|
+
nullable?: boolean;
|
|
506
|
+
};
|
|
507
|
+
output: {
|
|
508
|
+
_bsb: "object";
|
|
509
|
+
properties: {
|
|
510
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
511
|
+
readonly token: import("@bsb/base").BSBStringType & {
|
|
512
|
+
optional: true;
|
|
513
|
+
};
|
|
514
|
+
readonly expiresAt: import("@bsb/base").BSBStringType & {
|
|
515
|
+
optional: true;
|
|
516
|
+
};
|
|
517
|
+
readonly message: import("@bsb/base").BSBStringType & {
|
|
518
|
+
optional: true;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
required: string[];
|
|
522
|
+
description?: string;
|
|
523
|
+
optional?: boolean;
|
|
524
|
+
nullable?: boolean;
|
|
525
|
+
};
|
|
526
|
+
description?: string;
|
|
527
|
+
defaultTimeout?: number;
|
|
528
|
+
readonly __brand: "returnable";
|
|
529
|
+
};
|
|
530
|
+
readonly 'registry.auth.verify': {
|
|
531
|
+
input: {
|
|
532
|
+
_bsb: "object";
|
|
533
|
+
properties: {
|
|
534
|
+
readonly token: import("@bsb/base").BSBStringType;
|
|
535
|
+
};
|
|
536
|
+
required: string[];
|
|
537
|
+
description?: string;
|
|
538
|
+
optional?: boolean;
|
|
539
|
+
nullable?: boolean;
|
|
540
|
+
};
|
|
541
|
+
output: {
|
|
542
|
+
_bsb: "object";
|
|
543
|
+
properties: {
|
|
544
|
+
readonly valid: import("@bsb/base").BSBBooleanType;
|
|
545
|
+
readonly userId: import("@bsb/base").BSBStringType & {
|
|
546
|
+
optional: true;
|
|
547
|
+
};
|
|
548
|
+
readonly permissions: import("@bsb/base").BSBArrayType & {
|
|
549
|
+
optional: true;
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
required: string[];
|
|
553
|
+
description?: string;
|
|
554
|
+
optional?: boolean;
|
|
555
|
+
nullable?: boolean;
|
|
556
|
+
};
|
|
557
|
+
description?: string;
|
|
558
|
+
defaultTimeout?: number;
|
|
559
|
+
readonly __brand: "returnable";
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
/**
|
|
564
|
+
* Config for BSB Registry Core.
|
|
565
|
+
*/
|
|
566
|
+
export declare const Config: import("@bsb/base").BSBPluginConfigClass<z.ZodObject<{
|
|
567
|
+
database: z.ZodObject<{
|
|
568
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
569
|
+
file: "file";
|
|
570
|
+
postgres: "postgres";
|
|
571
|
+
}>>;
|
|
572
|
+
path: z.ZodDefault<z.ZodString>;
|
|
573
|
+
}, z.core.$strip>;
|
|
574
|
+
auth: z.ZodObject<{
|
|
575
|
+
requireAuth: z.ZodDefault<z.ZodBoolean>;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
|
+
}, z.core.$strip>>;
|
|
578
|
+
/**
|
|
579
|
+
* BSB Registry Core Plugin (Event-Driven)
|
|
580
|
+
*
|
|
581
|
+
* A language-agnostic plugin registry for the BSB framework, similar to npm registry
|
|
582
|
+
* but supporting plugins from multiple languages (Node.js, C#, Go, Java, Python).
|
|
583
|
+
*
|
|
584
|
+
* This is the CORE registry - it only handles events. For HTTP access, use:
|
|
585
|
+
* - service-bsb-registry-api (HTTP REST API gateway)
|
|
586
|
+
* - service-bsb-registry-ui (Web interface)
|
|
587
|
+
*
|
|
588
|
+
* Features:
|
|
589
|
+
* - Event-driven architecture (works locally or distributed)
|
|
590
|
+
* - SQLite/PostgreSQL storage
|
|
591
|
+
* - Organization-based naming (org/plugin-name)
|
|
592
|
+
* - Version matching (major.minor with patch interchangeability)
|
|
593
|
+
* - Authentication with encrypted passwords
|
|
594
|
+
* - Full-text search
|
|
595
|
+
* - Documentation storage
|
|
596
|
+
*
|
|
597
|
+
* Events:
|
|
598
|
+
* - registry.plugin.publish - Publish a plugin
|
|
599
|
+
* - registry.plugin.get - Get plugin details
|
|
600
|
+
* - registry.plugin.list - List plugins
|
|
601
|
+
* - registry.plugin.search - Search plugins
|
|
602
|
+
* - registry.plugin.delete - Delete plugin
|
|
603
|
+
* - registry.plugin.versions - Get versions
|
|
604
|
+
* - registry.stats.get - Get statistics
|
|
605
|
+
* - registry.auth.login - Login
|
|
606
|
+
* - registry.auth.verify - Verify token
|
|
607
|
+
*/
|
|
608
|
+
export declare class Plugin extends BSBService<InstanceType<typeof Config>, typeof EventSchemas> {
|
|
609
|
+
static Config: import("@bsb/base").BSBPluginConfigClass<z.ZodObject<{
|
|
610
|
+
database: z.ZodObject<{
|
|
611
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
612
|
+
file: "file";
|
|
613
|
+
postgres: "postgres";
|
|
614
|
+
}>>;
|
|
615
|
+
path: z.ZodDefault<z.ZodString>;
|
|
616
|
+
}, z.core.$strip>;
|
|
617
|
+
auth: z.ZodObject<{
|
|
618
|
+
requireAuth: z.ZodDefault<z.ZodBoolean>;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
}, z.core.$strip>>;
|
|
621
|
+
static EventSchemas: {
|
|
622
|
+
readonly onReturnableEvents: {
|
|
623
|
+
readonly 'registry.plugin.publish': {
|
|
624
|
+
input: {
|
|
625
|
+
_bsb: "object";
|
|
626
|
+
properties: {
|
|
627
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
628
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
629
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
630
|
+
readonly language: import("@bsb/base").BSBEnumType;
|
|
631
|
+
readonly metadata: {
|
|
632
|
+
_bsb: "object";
|
|
633
|
+
properties: {
|
|
634
|
+
readonly displayName: import("@bsb/base").BSBStringType;
|
|
635
|
+
readonly description: import("@bsb/base").BSBStringType;
|
|
636
|
+
readonly category: import("@bsb/base").BSBEnumType;
|
|
637
|
+
readonly tags: import("@bsb/base").BSBArrayType;
|
|
638
|
+
readonly author: import("@bsb/base").BSBUnionType & {
|
|
639
|
+
optional: true;
|
|
640
|
+
};
|
|
641
|
+
readonly license: import("@bsb/base").BSBStringType & {
|
|
642
|
+
optional: true;
|
|
643
|
+
};
|
|
644
|
+
readonly homepage: import("@bsb/base").BSBStringType & {
|
|
645
|
+
optional: true;
|
|
646
|
+
};
|
|
647
|
+
readonly repository: import("@bsb/base").BSBStringType & {
|
|
648
|
+
optional: true;
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
required: string[];
|
|
652
|
+
description?: string;
|
|
653
|
+
optional?: boolean;
|
|
654
|
+
nullable?: boolean;
|
|
655
|
+
};
|
|
656
|
+
readonly eventSchema: import("@bsb/base").BSBType;
|
|
657
|
+
readonly capabilities: import("@bsb/base").BSBType & {
|
|
658
|
+
optional: true;
|
|
659
|
+
};
|
|
660
|
+
readonly configSchema: import("@bsb/base").BSBType & {
|
|
661
|
+
optional: true;
|
|
662
|
+
};
|
|
663
|
+
readonly typeDefinitions: {
|
|
664
|
+
_bsb: "object";
|
|
665
|
+
properties: {
|
|
666
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
667
|
+
optional: true;
|
|
668
|
+
};
|
|
669
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
670
|
+
optional: true;
|
|
671
|
+
};
|
|
672
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
673
|
+
optional: true;
|
|
674
|
+
};
|
|
675
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
676
|
+
optional: true;
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
required: string[];
|
|
680
|
+
description?: string;
|
|
681
|
+
optional?: boolean;
|
|
682
|
+
nullable?: boolean;
|
|
683
|
+
} & {
|
|
684
|
+
optional: true;
|
|
685
|
+
};
|
|
686
|
+
readonly documentation: import("@bsb/base").BSBArrayType;
|
|
687
|
+
readonly dependencies: import("@bsb/base").BSBArrayType & {
|
|
688
|
+
optional: true;
|
|
689
|
+
};
|
|
690
|
+
readonly package: {
|
|
691
|
+
_bsb: "object";
|
|
692
|
+
properties: {
|
|
693
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
694
|
+
optional: true;
|
|
695
|
+
};
|
|
696
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
697
|
+
optional: true;
|
|
698
|
+
};
|
|
699
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
700
|
+
optional: true;
|
|
701
|
+
};
|
|
702
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
703
|
+
optional: true;
|
|
704
|
+
};
|
|
705
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
706
|
+
optional: true;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
required: string[];
|
|
710
|
+
description?: string;
|
|
711
|
+
optional?: boolean;
|
|
712
|
+
nullable?: boolean;
|
|
713
|
+
} & {
|
|
714
|
+
optional: true;
|
|
715
|
+
};
|
|
716
|
+
readonly runtime: {
|
|
717
|
+
_bsb: "object";
|
|
718
|
+
properties: {
|
|
719
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
720
|
+
optional: true;
|
|
721
|
+
};
|
|
722
|
+
readonly dotnet: import("@bsb/base").BSBStringType & {
|
|
723
|
+
optional: true;
|
|
724
|
+
};
|
|
725
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
726
|
+
optional: true;
|
|
727
|
+
};
|
|
728
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
729
|
+
optional: true;
|
|
730
|
+
};
|
|
731
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
732
|
+
optional: true;
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
required: string[];
|
|
736
|
+
description?: string;
|
|
737
|
+
optional?: boolean;
|
|
738
|
+
nullable?: boolean;
|
|
739
|
+
} & {
|
|
740
|
+
optional: true;
|
|
741
|
+
};
|
|
742
|
+
readonly visibility: import("@bsb/base").BSBEnumType & {
|
|
743
|
+
optional: true;
|
|
744
|
+
};
|
|
745
|
+
readonly publishedBy: import("@bsb/base").BSBStringType & {
|
|
746
|
+
optional: true;
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
required: string[];
|
|
750
|
+
description?: string;
|
|
751
|
+
optional?: boolean;
|
|
752
|
+
nullable?: boolean;
|
|
753
|
+
};
|
|
754
|
+
output: {
|
|
755
|
+
_bsb: "object";
|
|
756
|
+
properties: {
|
|
757
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
758
|
+
readonly pluginId: import("@bsb/base").BSBStringType;
|
|
759
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
760
|
+
readonly message: import("@bsb/base").BSBStringType & {
|
|
761
|
+
optional: true;
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
required: string[];
|
|
765
|
+
description?: string;
|
|
766
|
+
optional?: boolean;
|
|
767
|
+
nullable?: boolean;
|
|
768
|
+
};
|
|
769
|
+
description?: string;
|
|
770
|
+
defaultTimeout?: number;
|
|
771
|
+
readonly __brand: "returnable";
|
|
772
|
+
};
|
|
773
|
+
readonly 'registry.plugin.get': {
|
|
774
|
+
input: {
|
|
775
|
+
_bsb: "object";
|
|
776
|
+
properties: {
|
|
777
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
778
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
779
|
+
readonly version: import("@bsb/base").BSBStringType & {
|
|
780
|
+
optional: true;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
required: string[];
|
|
784
|
+
description?: string;
|
|
785
|
+
optional?: boolean;
|
|
786
|
+
nullable?: boolean;
|
|
787
|
+
};
|
|
788
|
+
output: {
|
|
789
|
+
_bsb: "object";
|
|
790
|
+
properties: {
|
|
791
|
+
readonly id: import("@bsb/base").BSBStringType;
|
|
792
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
793
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
794
|
+
readonly displayName: import("@bsb/base").BSBStringType;
|
|
795
|
+
readonly description: import("@bsb/base").BSBStringType;
|
|
796
|
+
readonly version: import("@bsb/base").BSBStringType;
|
|
797
|
+
readonly majorMinor: import("@bsb/base").BSBStringType;
|
|
798
|
+
readonly language: import("@bsb/base").BSBEnumType;
|
|
799
|
+
readonly package: {
|
|
800
|
+
_bsb: "object";
|
|
801
|
+
properties: {
|
|
802
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
803
|
+
optional: true;
|
|
804
|
+
};
|
|
805
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
806
|
+
optional: true;
|
|
807
|
+
};
|
|
808
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
809
|
+
optional: true;
|
|
810
|
+
};
|
|
811
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
812
|
+
optional: true;
|
|
813
|
+
};
|
|
814
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
815
|
+
optional: true;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
required: string[];
|
|
819
|
+
description?: string;
|
|
820
|
+
optional?: boolean;
|
|
821
|
+
nullable?: boolean;
|
|
822
|
+
} & {
|
|
823
|
+
optional: true;
|
|
824
|
+
};
|
|
825
|
+
readonly category: import("@bsb/base").BSBEnumType;
|
|
826
|
+
readonly tags: import("@bsb/base").BSBArrayType;
|
|
827
|
+
readonly author: import("@bsb/base").BSBUnionType & {
|
|
828
|
+
optional: true;
|
|
829
|
+
};
|
|
830
|
+
readonly license: import("@bsb/base").BSBStringType & {
|
|
831
|
+
optional: true;
|
|
832
|
+
};
|
|
833
|
+
readonly homepage: import("@bsb/base").BSBStringType & {
|
|
834
|
+
optional: true;
|
|
835
|
+
};
|
|
836
|
+
readonly repository: import("@bsb/base").BSBStringType & {
|
|
837
|
+
optional: true;
|
|
838
|
+
};
|
|
839
|
+
readonly visibility: import("@bsb/base").BSBEnumType;
|
|
840
|
+
readonly eventSchema: import("@bsb/base").BSBType;
|
|
841
|
+
readonly capabilities: import("@bsb/base").BSBType & {
|
|
842
|
+
optional: true;
|
|
843
|
+
};
|
|
844
|
+
readonly configSchema: import("@bsb/base").BSBType & {
|
|
845
|
+
optional: true;
|
|
846
|
+
};
|
|
847
|
+
readonly typeDefinitions: {
|
|
848
|
+
_bsb: "object";
|
|
849
|
+
properties: {
|
|
850
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
851
|
+
optional: true;
|
|
852
|
+
};
|
|
853
|
+
readonly csharp: import("@bsb/base").BSBStringType & {
|
|
854
|
+
optional: true;
|
|
855
|
+
};
|
|
856
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
857
|
+
optional: true;
|
|
858
|
+
};
|
|
859
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
860
|
+
optional: true;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
required: string[];
|
|
864
|
+
description?: string;
|
|
865
|
+
optional?: boolean;
|
|
866
|
+
nullable?: boolean;
|
|
867
|
+
} & {
|
|
868
|
+
optional: true;
|
|
869
|
+
};
|
|
870
|
+
readonly documentation: import("@bsb/base").BSBArrayType & {
|
|
871
|
+
optional: true;
|
|
872
|
+
};
|
|
873
|
+
readonly dependencies: import("@bsb/base").BSBArrayType & {
|
|
874
|
+
optional: true;
|
|
875
|
+
};
|
|
876
|
+
readonly permissions: import("@bsb/base").BSBArrayType & {
|
|
877
|
+
optional: true;
|
|
878
|
+
};
|
|
879
|
+
readonly eventCount: import("@bsb/base").BSBNumberType;
|
|
880
|
+
readonly emitEventCount: import("@bsb/base").BSBNumberType;
|
|
881
|
+
readonly onEventCount: import("@bsb/base").BSBNumberType;
|
|
882
|
+
readonly returnableEventCount: import("@bsb/base").BSBNumberType;
|
|
883
|
+
readonly broadcastEventCount: import("@bsb/base").BSBNumberType;
|
|
884
|
+
readonly publishedBy: import("@bsb/base").BSBStringType;
|
|
885
|
+
readonly publishedAt: import("@bsb/base").BSBStringType;
|
|
886
|
+
readonly updatedAt: import("@bsb/base").BSBStringType;
|
|
887
|
+
readonly downloads: import("@bsb/base").BSBNumberType & {
|
|
888
|
+
optional: true;
|
|
889
|
+
};
|
|
890
|
+
readonly runtime: {
|
|
891
|
+
_bsb: "object";
|
|
892
|
+
properties: {
|
|
893
|
+
readonly nodejs: import("@bsb/base").BSBStringType & {
|
|
894
|
+
optional: true;
|
|
895
|
+
};
|
|
896
|
+
readonly dotnet: import("@bsb/base").BSBStringType & {
|
|
897
|
+
optional: true;
|
|
898
|
+
};
|
|
899
|
+
readonly go: import("@bsb/base").BSBStringType & {
|
|
900
|
+
optional: true;
|
|
901
|
+
};
|
|
902
|
+
readonly java: import("@bsb/base").BSBStringType & {
|
|
903
|
+
optional: true;
|
|
904
|
+
};
|
|
905
|
+
readonly python: import("@bsb/base").BSBStringType & {
|
|
906
|
+
optional: true;
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
required: string[];
|
|
910
|
+
description?: string;
|
|
911
|
+
optional?: boolean;
|
|
912
|
+
nullable?: boolean;
|
|
913
|
+
} & {
|
|
914
|
+
optional: true;
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
required: string[];
|
|
918
|
+
description?: string;
|
|
919
|
+
optional?: boolean;
|
|
920
|
+
nullable?: boolean;
|
|
921
|
+
};
|
|
922
|
+
description?: string;
|
|
923
|
+
defaultTimeout?: number;
|
|
924
|
+
readonly __brand: "returnable";
|
|
925
|
+
};
|
|
926
|
+
readonly 'registry.plugin.list': {
|
|
927
|
+
input: {
|
|
928
|
+
_bsb: "object";
|
|
929
|
+
properties: {
|
|
930
|
+
readonly org: import("@bsb/base").BSBStringType & {
|
|
931
|
+
optional: true;
|
|
932
|
+
};
|
|
933
|
+
readonly language: import("@bsb/base").BSBEnumType & {
|
|
934
|
+
optional: true;
|
|
935
|
+
};
|
|
936
|
+
readonly category: import("@bsb/base").BSBEnumType & {
|
|
937
|
+
optional: true;
|
|
938
|
+
};
|
|
939
|
+
readonly limit: import("@bsb/base").BSBNumberType & {
|
|
940
|
+
optional: true;
|
|
941
|
+
};
|
|
942
|
+
readonly offset: import("@bsb/base").BSBNumberType & {
|
|
943
|
+
optional: true;
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
required: string[];
|
|
947
|
+
description?: string;
|
|
948
|
+
optional?: boolean;
|
|
949
|
+
nullable?: boolean;
|
|
950
|
+
};
|
|
951
|
+
output: {
|
|
952
|
+
_bsb: "object";
|
|
953
|
+
properties: {
|
|
954
|
+
readonly results: import("@bsb/base").BSBArrayType;
|
|
955
|
+
readonly total: import("@bsb/base").BSBNumberType;
|
|
956
|
+
readonly page: import("@bsb/base").BSBNumberType;
|
|
957
|
+
};
|
|
958
|
+
required: string[];
|
|
959
|
+
description?: string;
|
|
960
|
+
optional?: boolean;
|
|
961
|
+
nullable?: boolean;
|
|
962
|
+
};
|
|
963
|
+
description?: string;
|
|
964
|
+
defaultTimeout?: number;
|
|
965
|
+
readonly __brand: "returnable";
|
|
966
|
+
};
|
|
967
|
+
readonly 'registry.plugin.search': {
|
|
968
|
+
input: {
|
|
969
|
+
_bsb: "object";
|
|
970
|
+
properties: {
|
|
971
|
+
readonly query: import("@bsb/base").BSBStringType;
|
|
972
|
+
readonly language: import("@bsb/base").BSBEnumType & {
|
|
973
|
+
optional: true;
|
|
974
|
+
};
|
|
975
|
+
readonly category: import("@bsb/base").BSBEnumType & {
|
|
976
|
+
optional: true;
|
|
977
|
+
};
|
|
978
|
+
readonly limit: import("@bsb/base").BSBNumberType & {
|
|
979
|
+
optional: true;
|
|
980
|
+
};
|
|
981
|
+
readonly offset: import("@bsb/base").BSBNumberType & {
|
|
982
|
+
optional: true;
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
required: string[];
|
|
986
|
+
description?: string;
|
|
987
|
+
optional?: boolean;
|
|
988
|
+
nullable?: boolean;
|
|
989
|
+
};
|
|
990
|
+
output: {
|
|
991
|
+
_bsb: "object";
|
|
992
|
+
properties: {
|
|
993
|
+
readonly results: import("@bsb/base").BSBArrayType;
|
|
994
|
+
readonly total: import("@bsb/base").BSBNumberType;
|
|
995
|
+
readonly query: import("@bsb/base").BSBStringType;
|
|
996
|
+
};
|
|
997
|
+
required: string[];
|
|
998
|
+
description?: string;
|
|
999
|
+
optional?: boolean;
|
|
1000
|
+
nullable?: boolean;
|
|
1001
|
+
};
|
|
1002
|
+
description?: string;
|
|
1003
|
+
defaultTimeout?: number;
|
|
1004
|
+
readonly __brand: "returnable";
|
|
1005
|
+
};
|
|
1006
|
+
readonly 'registry.plugin.delete': {
|
|
1007
|
+
input: {
|
|
1008
|
+
_bsb: "object";
|
|
1009
|
+
properties: {
|
|
1010
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
1011
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
1012
|
+
readonly version: import("@bsb/base").BSBStringType & {
|
|
1013
|
+
optional: true;
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
required: string[];
|
|
1017
|
+
description?: string;
|
|
1018
|
+
optional?: boolean;
|
|
1019
|
+
nullable?: boolean;
|
|
1020
|
+
};
|
|
1021
|
+
output: {
|
|
1022
|
+
_bsb: "object";
|
|
1023
|
+
properties: {
|
|
1024
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
1025
|
+
readonly deleted: import("@bsb/base").BSBNumberType;
|
|
1026
|
+
};
|
|
1027
|
+
required: string[];
|
|
1028
|
+
description?: string;
|
|
1029
|
+
optional?: boolean;
|
|
1030
|
+
nullable?: boolean;
|
|
1031
|
+
};
|
|
1032
|
+
description?: string;
|
|
1033
|
+
defaultTimeout?: number;
|
|
1034
|
+
readonly __brand: "returnable";
|
|
1035
|
+
};
|
|
1036
|
+
readonly 'registry.plugin.versions': {
|
|
1037
|
+
input: {
|
|
1038
|
+
_bsb: "object";
|
|
1039
|
+
properties: {
|
|
1040
|
+
readonly org: import("@bsb/base").BSBStringType;
|
|
1041
|
+
readonly name: import("@bsb/base").BSBStringType;
|
|
1042
|
+
readonly majorMinor: import("@bsb/base").BSBStringType & {
|
|
1043
|
+
optional: true;
|
|
1044
|
+
};
|
|
1045
|
+
};
|
|
1046
|
+
required: string[];
|
|
1047
|
+
description?: string;
|
|
1048
|
+
optional?: boolean;
|
|
1049
|
+
nullable?: boolean;
|
|
1050
|
+
};
|
|
1051
|
+
output: {
|
|
1052
|
+
_bsb: "object";
|
|
1053
|
+
properties: {
|
|
1054
|
+
readonly versions: import("@bsb/base").BSBArrayType;
|
|
1055
|
+
readonly latest: import("@bsb/base").BSBStringType;
|
|
1056
|
+
readonly latestForMajorMinor: import("@bsb/base").BSBStringType;
|
|
1057
|
+
};
|
|
1058
|
+
required: string[];
|
|
1059
|
+
description?: string;
|
|
1060
|
+
optional?: boolean;
|
|
1061
|
+
nullable?: boolean;
|
|
1062
|
+
};
|
|
1063
|
+
description?: string;
|
|
1064
|
+
defaultTimeout?: number;
|
|
1065
|
+
readonly __brand: "returnable";
|
|
1066
|
+
};
|
|
1067
|
+
readonly 'registry.stats.get': {
|
|
1068
|
+
input: {
|
|
1069
|
+
_bsb: "object";
|
|
1070
|
+
properties: {};
|
|
1071
|
+
required: string[];
|
|
1072
|
+
description?: string;
|
|
1073
|
+
optional?: boolean;
|
|
1074
|
+
nullable?: boolean;
|
|
1075
|
+
};
|
|
1076
|
+
output: {
|
|
1077
|
+
_bsb: "object";
|
|
1078
|
+
properties: {
|
|
1079
|
+
readonly totalPlugins: import("@bsb/base").BSBNumberType;
|
|
1080
|
+
readonly byLanguage: import("@bsb/base").BSBStringType;
|
|
1081
|
+
readonly byCategory: import("@bsb/base").BSBStringType;
|
|
1082
|
+
readonly totalDownloads: import("@bsb/base").BSBNumberType;
|
|
1083
|
+
};
|
|
1084
|
+
required: string[];
|
|
1085
|
+
description?: string;
|
|
1086
|
+
optional?: boolean;
|
|
1087
|
+
nullable?: boolean;
|
|
1088
|
+
};
|
|
1089
|
+
description?: string;
|
|
1090
|
+
defaultTimeout?: number;
|
|
1091
|
+
readonly __brand: "returnable";
|
|
1092
|
+
};
|
|
1093
|
+
readonly 'registry.auth.login': {
|
|
1094
|
+
input: {
|
|
1095
|
+
_bsb: "object";
|
|
1096
|
+
properties: {
|
|
1097
|
+
readonly username: import("@bsb/base").BSBStringType;
|
|
1098
|
+
readonly password: import("@bsb/base").BSBStringType;
|
|
1099
|
+
};
|
|
1100
|
+
required: string[];
|
|
1101
|
+
description?: string;
|
|
1102
|
+
optional?: boolean;
|
|
1103
|
+
nullable?: boolean;
|
|
1104
|
+
};
|
|
1105
|
+
output: {
|
|
1106
|
+
_bsb: "object";
|
|
1107
|
+
properties: {
|
|
1108
|
+
readonly success: import("@bsb/base").BSBBooleanType;
|
|
1109
|
+
readonly token: import("@bsb/base").BSBStringType & {
|
|
1110
|
+
optional: true;
|
|
1111
|
+
};
|
|
1112
|
+
readonly expiresAt: import("@bsb/base").BSBStringType & {
|
|
1113
|
+
optional: true;
|
|
1114
|
+
};
|
|
1115
|
+
readonly message: import("@bsb/base").BSBStringType & {
|
|
1116
|
+
optional: true;
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
required: string[];
|
|
1120
|
+
description?: string;
|
|
1121
|
+
optional?: boolean;
|
|
1122
|
+
nullable?: boolean;
|
|
1123
|
+
};
|
|
1124
|
+
description?: string;
|
|
1125
|
+
defaultTimeout?: number;
|
|
1126
|
+
readonly __brand: "returnable";
|
|
1127
|
+
};
|
|
1128
|
+
readonly 'registry.auth.verify': {
|
|
1129
|
+
input: {
|
|
1130
|
+
_bsb: "object";
|
|
1131
|
+
properties: {
|
|
1132
|
+
readonly token: import("@bsb/base").BSBStringType;
|
|
1133
|
+
};
|
|
1134
|
+
required: string[];
|
|
1135
|
+
description?: string;
|
|
1136
|
+
optional?: boolean;
|
|
1137
|
+
nullable?: boolean;
|
|
1138
|
+
};
|
|
1139
|
+
output: {
|
|
1140
|
+
_bsb: "object";
|
|
1141
|
+
properties: {
|
|
1142
|
+
readonly valid: import("@bsb/base").BSBBooleanType;
|
|
1143
|
+
readonly userId: import("@bsb/base").BSBStringType & {
|
|
1144
|
+
optional: true;
|
|
1145
|
+
};
|
|
1146
|
+
readonly permissions: import("@bsb/base").BSBArrayType & {
|
|
1147
|
+
optional: true;
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
required: string[];
|
|
1151
|
+
description?: string;
|
|
1152
|
+
optional?: boolean;
|
|
1153
|
+
nullable?: boolean;
|
|
1154
|
+
};
|
|
1155
|
+
description?: string;
|
|
1156
|
+
defaultTimeout?: number;
|
|
1157
|
+
readonly __brand: "returnable";
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
initBeforePlugins?: string[] | undefined;
|
|
1162
|
+
initAfterPlugins?: string[] | undefined;
|
|
1163
|
+
runBeforePlugins?: string[] | undefined;
|
|
1164
|
+
runAfterPlugins?: string[] | undefined;
|
|
1165
|
+
private storage;
|
|
1166
|
+
private authManager;
|
|
1167
|
+
constructor(config: BSBServiceConstructor<InstanceType<typeof Config>, typeof EventSchemas>);
|
|
1168
|
+
/**
|
|
1169
|
+
* Initialize resources and register event handlers.
|
|
1170
|
+
*/
|
|
1171
|
+
init(obs: Observable): Promise<void>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Run phase - nothing to start (event-driven).
|
|
1174
|
+
*/
|
|
1175
|
+
run(obs: Observable): Promise<void>;
|
|
1176
|
+
/**
|
|
1177
|
+
* Cleanup resources.
|
|
1178
|
+
*/
|
|
1179
|
+
dispose(): void;
|
|
1180
|
+
/**
|
|
1181
|
+
* Register all event handlers.
|
|
1182
|
+
*/
|
|
1183
|
+
private registerEventHandlers;
|
|
1184
|
+
/**
|
|
1185
|
+
* Handle plugin publish request
|
|
1186
|
+
*/
|
|
1187
|
+
private handlePluginPublish;
|
|
1188
|
+
/**
|
|
1189
|
+
* Handle get plugin request
|
|
1190
|
+
*/
|
|
1191
|
+
private handlePluginGet;
|
|
1192
|
+
/**
|
|
1193
|
+
* Handle list plugins request
|
|
1194
|
+
*/
|
|
1195
|
+
private handlePluginList;
|
|
1196
|
+
/**
|
|
1197
|
+
* Handle search plugins request
|
|
1198
|
+
*/
|
|
1199
|
+
private handlePluginSearch;
|
|
1200
|
+
/**
|
|
1201
|
+
* Handle delete plugin request
|
|
1202
|
+
*/
|
|
1203
|
+
private handlePluginDelete;
|
|
1204
|
+
/**
|
|
1205
|
+
* Handle get plugin versions request
|
|
1206
|
+
*/
|
|
1207
|
+
private handlePluginVersions;
|
|
1208
|
+
/**
|
|
1209
|
+
* Handle get stats request
|
|
1210
|
+
*/
|
|
1211
|
+
private handleStatsGet;
|
|
1212
|
+
/**
|
|
1213
|
+
* Handle login request
|
|
1214
|
+
*/
|
|
1215
|
+
private handleAuthLogin;
|
|
1216
|
+
/**
|
|
1217
|
+
* Handle verify token request
|
|
1218
|
+
*/
|
|
1219
|
+
private handleAuthVerify;
|
|
1220
|
+
/**
|
|
1221
|
+
* Count events by type from an events map (Record<string, EventExportEntry>).
|
|
1222
|
+
* The events map is the flat map of event name to definition with `category`.
|
|
1223
|
+
* Gracefully returns zeros if the map is invalid.
|
|
1224
|
+
*/
|
|
1225
|
+
private countEvents;
|
|
1226
|
+
}
|
|
1227
|
+
export default Plugin;
|
|
1228
|
+
//# sourceMappingURL=index.d.ts.map
|