@bsb/registry 1.1.1 → 1.1.5
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/lib/.bsb/clients/service-bsb-registry.d.ts.map +1 -1
- package/lib/.bsb/clients/service-bsb-registry.js +293 -297
- package/lib/.bsb/clients/service-bsb-registry.js.map +1 -1
- package/lib/plugins/service-bsb-registry/types.js +2 -2
- package/lib/plugins/service-bsb-registry/types.js.map +1 -1
- package/lib/plugins/service-bsb-registry-ui/http-server.js +4 -4
- package/lib/plugins/service-bsb-registry-ui/http-server.js.map +1 -1
- package/lib/schemas/service-bsb-registry-ui.json +61 -0
- package/lib/schemas/service-bsb-registry-ui.plugin.json +62 -1
- package/lib/schemas/service-bsb-registry.json +59 -8
- package/lib/schemas/service-bsb-registry.plugin.json +56 -1
- package/package.json +3 -3
|
@@ -3,326 +3,324 @@
|
|
|
3
3
|
* DO NOT EDIT - Regenerated on every build
|
|
4
4
|
* @version 1.0.0
|
|
5
5
|
*/
|
|
6
|
-
import { ServiceClient, bsb, optional } from "@bsb/base";
|
|
7
|
-
import { createReturnableEvent, createEventSchemas } from "@bsb/base";
|
|
6
|
+
import { ServiceClient, bsb, optional, createReturnableEvent, createEventSchemas } from "@bsb/base";
|
|
8
7
|
const _registryPluginPublishSchema = bsb.object({
|
|
9
|
-
org: bsb.string({ min: 1, max: 100
|
|
10
|
-
name: bsb.string({ min: 1, max: 100
|
|
11
|
-
version: bsb.string({ min: 1, max: 50
|
|
12
|
-
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
13
|
-
metadata: bsb.object({
|
|
14
|
-
displayName: bsb.string({ min: 1, max: 200
|
|
15
|
-
description: bsb.string({ min: 1, max: 1000
|
|
16
|
-
category: bsb.enum(["service", "observable", "events", "config"]
|
|
17
|
-
tags: bsb.array(bsb.string({ max: 50 })
|
|
18
|
-
author: optional(bsb.union([bsb.string({ max: 200
|
|
19
|
-
name: bsb.string({ max: 200
|
|
20
|
-
email: optional(bsb.string({ max: 200
|
|
21
|
-
url: optional(bsb.uri(
|
|
22
|
-
}
|
|
23
|
-
license: optional(bsb.string({ max: 50 })),
|
|
24
|
-
homepage: optional(bsb.uri()),
|
|
25
|
-
repository: optional(bsb.
|
|
26
|
-
}
|
|
27
|
-
eventSchema: bsb.unknown(
|
|
28
|
-
capabilities: optional(bsb.unknown(
|
|
29
|
-
configSchema: optional(bsb.unknown(
|
|
30
|
-
typeDefinitions: optional(bsb.object({
|
|
31
|
-
nodejs: optional(bsb.string(
|
|
32
|
-
csharp: optional(bsb.string(
|
|
33
|
-
go: optional(bsb.string(
|
|
34
|
-
java: optional(bsb.string(
|
|
35
|
-
}
|
|
36
|
-
documentation: bsb.array(bsb.string(
|
|
37
|
-
dependencies: optional(bsb.array(bsb.object({
|
|
38
|
-
id: bsb.string({ min: 1, max: 200
|
|
39
|
-
version: bsb.string({ min: 1, max: 50
|
|
40
|
-
}
|
|
41
|
-
package: optional(bsb.object({
|
|
42
|
-
nodejs: optional(bsb.string(
|
|
43
|
-
csharp: optional(bsb.string(
|
|
44
|
-
go: optional(bsb.string(
|
|
45
|
-
java: optional(bsb.string(
|
|
46
|
-
python: optional(bsb.string(
|
|
47
|
-
}
|
|
48
|
-
runtime: optional(bsb.object({
|
|
49
|
-
nodejs: optional(bsb.string(
|
|
50
|
-
dotnet: optional(bsb.string(
|
|
51
|
-
go: optional(bsb.string(
|
|
52
|
-
java: optional(bsb.string(
|
|
53
|
-
python: optional(bsb.string(
|
|
54
|
-
}
|
|
55
|
-
visibility: optional(bsb.enum(["public", "private"]
|
|
56
|
-
publishedBy: optional(bsb.string({ max: 200
|
|
57
|
-
}
|
|
8
|
+
"org": bsb.string({ min: 1, max: 100 }),
|
|
9
|
+
"name": bsb.string({ min: 1, max: 100 }),
|
|
10
|
+
"version": bsb.string({ min: 1, max: 50 }),
|
|
11
|
+
"language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
|
|
12
|
+
"metadata": bsb.object({
|
|
13
|
+
"displayName": bsb.string({ min: 1, max: 200 }),
|
|
14
|
+
"description": bsb.string({ min: 1, max: 1000 }),
|
|
15
|
+
"category": bsb.enum(["service", "observable", "events", "config"]),
|
|
16
|
+
"tags": bsb.array(bsb.string({ max: 50 })),
|
|
17
|
+
"author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
|
|
18
|
+
"name": bsb.string({ max: 200 }),
|
|
19
|
+
"email": optional(bsb.string({ max: 200 })),
|
|
20
|
+
"url": optional(bsb.uri())
|
|
21
|
+
})])),
|
|
22
|
+
"license": optional(bsb.string({ max: 50 })),
|
|
23
|
+
"homepage": optional(bsb.uri()),
|
|
24
|
+
"repository": optional(bsb.string())
|
|
25
|
+
}),
|
|
26
|
+
"eventSchema": bsb.unknown(),
|
|
27
|
+
"capabilities": optional(bsb.unknown()),
|
|
28
|
+
"configSchema": optional(bsb.unknown()),
|
|
29
|
+
"typeDefinitions": optional(bsb.object({
|
|
30
|
+
"nodejs": optional(bsb.string()),
|
|
31
|
+
"csharp": optional(bsb.string()),
|
|
32
|
+
"go": optional(bsb.string()),
|
|
33
|
+
"java": optional(bsb.string())
|
|
34
|
+
})),
|
|
35
|
+
"documentation": bsb.array(bsb.string(), { min: 1 }),
|
|
36
|
+
"dependencies": optional(bsb.array(bsb.object({
|
|
37
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
38
|
+
"version": bsb.string({ min: 1, max: 50 })
|
|
39
|
+
}))),
|
|
40
|
+
"package": optional(bsb.object({
|
|
41
|
+
"nodejs": optional(bsb.string()),
|
|
42
|
+
"csharp": optional(bsb.string()),
|
|
43
|
+
"go": optional(bsb.string()),
|
|
44
|
+
"java": optional(bsb.string()),
|
|
45
|
+
"python": optional(bsb.string())
|
|
46
|
+
})),
|
|
47
|
+
"runtime": optional(bsb.object({
|
|
48
|
+
"nodejs": optional(bsb.string()),
|
|
49
|
+
"dotnet": optional(bsb.string()),
|
|
50
|
+
"go": optional(bsb.string()),
|
|
51
|
+
"java": optional(bsb.string()),
|
|
52
|
+
"python": optional(bsb.string())
|
|
53
|
+
})),
|
|
54
|
+
"visibility": optional(bsb.enum(["public", "private"])),
|
|
55
|
+
"publishedBy": optional(bsb.string({ max: 200 }))
|
|
56
|
+
});
|
|
58
57
|
const _registryPluginPublishOutputSchema = bsb.object({
|
|
59
|
-
success: bsb.boolean(
|
|
60
|
-
pluginId: bsb.string(
|
|
61
|
-
version: bsb.string(
|
|
62
|
-
message: optional(bsb.string(
|
|
63
|
-
}
|
|
58
|
+
"success": bsb.boolean(),
|
|
59
|
+
"pluginId": bsb.string(),
|
|
60
|
+
"version": bsb.string(),
|
|
61
|
+
"message": optional(bsb.string())
|
|
62
|
+
});
|
|
64
63
|
const _registryPluginGetSchema = bsb.object({
|
|
65
|
-
org: bsb.string(
|
|
66
|
-
name: bsb.string(
|
|
67
|
-
version: optional(bsb.string(
|
|
64
|
+
"org": bsb.string(),
|
|
65
|
+
"name": bsb.string(),
|
|
66
|
+
"version": optional(bsb.string())
|
|
68
67
|
});
|
|
69
68
|
const _registryPluginGetOutputSchema = bsb.object({
|
|
70
|
-
id: bsb.string({ min: 1, max: 200
|
|
71
|
-
org: bsb.string({ min: 1, max: 100
|
|
72
|
-
name: bsb.string({ min: 1, max: 100
|
|
73
|
-
displayName: bsb.string({ min: 1, max: 200
|
|
74
|
-
description: bsb.string({ min: 1, max: 1000
|
|
75
|
-
version: bsb.string({ min: 1, max: 50
|
|
76
|
-
majorMinor: bsb.string({ min: 1, max: 20
|
|
77
|
-
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
78
|
-
package: optional(bsb.object({
|
|
79
|
-
nodejs: optional(bsb.string(
|
|
80
|
-
csharp: optional(bsb.string(
|
|
81
|
-
go: optional(bsb.string(
|
|
82
|
-
java: optional(bsb.string(
|
|
83
|
-
python: optional(bsb.string(
|
|
84
|
-
}
|
|
85
|
-
category: bsb.enum(["service", "observable", "events", "config"]
|
|
86
|
-
tags: bsb.array(bsb.string({ max: 50 })
|
|
87
|
-
author: optional(bsb.union([bsb.string({ max: 200
|
|
88
|
-
name: bsb.string({ max: 200
|
|
89
|
-
email: optional(bsb.string({ max: 200
|
|
90
|
-
url: optional(bsb.uri(
|
|
91
|
-
}
|
|
92
|
-
license: optional(bsb.string({ max: 50
|
|
93
|
-
homepage: optional(bsb.uri(
|
|
94
|
-
repository: optional(bsb.
|
|
95
|
-
visibility: bsb.enum(["public", "private"]
|
|
96
|
-
eventSchema: bsb.unknown(
|
|
97
|
-
capabilities: optional(bsb.unknown(
|
|
98
|
-
configSchema: optional(bsb.unknown(
|
|
99
|
-
typeDefinitions: optional(bsb.object({
|
|
100
|
-
nodejs: optional(bsb.string(
|
|
101
|
-
csharp: optional(bsb.string(
|
|
102
|
-
go: optional(bsb.string(
|
|
103
|
-
java: optional(bsb.string(
|
|
104
|
-
}
|
|
105
|
-
documentation: optional(bsb.array(bsb.string(
|
|
106
|
-
dependencies: optional(bsb.array(bsb.object({
|
|
107
|
-
id: bsb.string({ min: 1, max: 200
|
|
108
|
-
version: bsb.string({ min: 1, max: 50
|
|
109
|
-
}
|
|
110
|
-
permissions: optional(bsb.array(bsb.object({
|
|
111
|
-
userId: bsb.uuid(
|
|
112
|
-
permission: bsb.enum(["read", "write"]
|
|
113
|
-
}
|
|
114
|
-
eventCount: bsb.int32({
|
|
115
|
-
emitEventCount: bsb.int32({
|
|
116
|
-
onEventCount: bsb.int32({
|
|
117
|
-
returnableEventCount: bsb.int32({
|
|
118
|
-
broadcastEventCount: bsb.int32({
|
|
119
|
-
publishedBy: bsb.string({ max: 200
|
|
120
|
-
publishedAt: bsb.datetime(
|
|
121
|
-
updatedAt: bsb.datetime(
|
|
122
|
-
downloads: optional(bsb.int32({
|
|
123
|
-
runtime: optional(bsb.object({
|
|
124
|
-
nodejs: optional(bsb.string(
|
|
125
|
-
dotnet: optional(bsb.string(
|
|
126
|
-
go: optional(bsb.string(
|
|
127
|
-
java: optional(bsb.string(
|
|
128
|
-
python: optional(bsb.string(
|
|
129
|
-
}
|
|
130
|
-
}
|
|
69
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
70
|
+
"org": bsb.string({ min: 1, max: 100 }),
|
|
71
|
+
"name": bsb.string({ min: 1, max: 100 }),
|
|
72
|
+
"displayName": bsb.string({ min: 1, max: 200 }),
|
|
73
|
+
"description": bsb.string({ min: 1, max: 1000 }),
|
|
74
|
+
"version": bsb.string({ min: 1, max: 50 }),
|
|
75
|
+
"majorMinor": bsb.string({ min: 1, max: 20 }),
|
|
76
|
+
"language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
|
|
77
|
+
"package": optional(bsb.object({
|
|
78
|
+
"nodejs": optional(bsb.string()),
|
|
79
|
+
"csharp": optional(bsb.string()),
|
|
80
|
+
"go": optional(bsb.string()),
|
|
81
|
+
"java": optional(bsb.string()),
|
|
82
|
+
"python": optional(bsb.string())
|
|
83
|
+
})),
|
|
84
|
+
"category": bsb.enum(["service", "observable", "events", "config"]),
|
|
85
|
+
"tags": bsb.array(bsb.string({ max: 50 })),
|
|
86
|
+
"author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
|
|
87
|
+
"name": bsb.string({ max: 200 }),
|
|
88
|
+
"email": optional(bsb.string({ max: 200 })),
|
|
89
|
+
"url": optional(bsb.uri())
|
|
90
|
+
})])),
|
|
91
|
+
"license": optional(bsb.string({ max: 50 })),
|
|
92
|
+
"homepage": optional(bsb.uri()),
|
|
93
|
+
"repository": optional(bsb.string()),
|
|
94
|
+
"visibility": bsb.enum(["public", "private"]),
|
|
95
|
+
"eventSchema": bsb.unknown(),
|
|
96
|
+
"capabilities": optional(bsb.unknown()),
|
|
97
|
+
"configSchema": optional(bsb.unknown()),
|
|
98
|
+
"typeDefinitions": optional(bsb.object({
|
|
99
|
+
"nodejs": optional(bsb.string()),
|
|
100
|
+
"csharp": optional(bsb.string()),
|
|
101
|
+
"go": optional(bsb.string()),
|
|
102
|
+
"java": optional(bsb.string())
|
|
103
|
+
})),
|
|
104
|
+
"documentation": optional(bsb.array(bsb.string(), { min: 1 })),
|
|
105
|
+
"dependencies": optional(bsb.array(bsb.object({
|
|
106
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
107
|
+
"version": bsb.string({ min: 1, max: 50 })
|
|
108
|
+
}))),
|
|
109
|
+
"permissions": optional(bsb.array(bsb.object({
|
|
110
|
+
"userId": bsb.uuid(),
|
|
111
|
+
"permission": bsb.enum(["read", "write"])
|
|
112
|
+
}))),
|
|
113
|
+
"eventCount": bsb.int32({ min: 0 }),
|
|
114
|
+
"emitEventCount": bsb.int32({ min: 0 }),
|
|
115
|
+
"onEventCount": bsb.int32({ min: 0 }),
|
|
116
|
+
"returnableEventCount": bsb.int32({ min: 0 }),
|
|
117
|
+
"broadcastEventCount": bsb.int32({ min: 0 }),
|
|
118
|
+
"publishedBy": bsb.string({ max: 200 }),
|
|
119
|
+
"publishedAt": bsb.datetime(),
|
|
120
|
+
"updatedAt": bsb.datetime(),
|
|
121
|
+
"downloads": optional(bsb.int32({ min: 0 })),
|
|
122
|
+
"runtime": optional(bsb.object({
|
|
123
|
+
"nodejs": optional(bsb.string()),
|
|
124
|
+
"dotnet": optional(bsb.string()),
|
|
125
|
+
"go": optional(bsb.string()),
|
|
126
|
+
"java": optional(bsb.string()),
|
|
127
|
+
"python": optional(bsb.string())
|
|
128
|
+
}))
|
|
129
|
+
});
|
|
131
130
|
const _registryPluginListSchema = bsb.object({
|
|
132
|
-
org: optional(bsb.string({ max: 100
|
|
133
|
-
language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
134
|
-
category: optional(bsb.enum(["service", "observable", "events", "config"]
|
|
135
|
-
limit: optional(bsb.int32({
|
|
136
|
-
offset: optional(bsb.int32({
|
|
137
|
-
}
|
|
131
|
+
"org": optional(bsb.string({ max: 100 })),
|
|
132
|
+
"language": optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"])),
|
|
133
|
+
"category": optional(bsb.enum(["service", "observable", "events", "config"])),
|
|
134
|
+
"limit": optional(bsb.int32({ min: 1, max: 100 })),
|
|
135
|
+
"offset": optional(bsb.int32({ min: 0 }))
|
|
136
|
+
});
|
|
138
137
|
const _registryPluginListOutputSchema = bsb.object({
|
|
139
|
-
results: bsb.array(bsb.object({
|
|
140
|
-
id: bsb.string({ min: 1, max: 200
|
|
141
|
-
org: bsb.string({ min: 1, max: 100
|
|
142
|
-
name: bsb.string({ min: 1, max: 100
|
|
143
|
-
displayName: bsb.string({ min: 1, max: 200
|
|
144
|
-
description: bsb.string({ min: 1, max: 1000
|
|
145
|
-
version: bsb.string({ min: 1, max: 50
|
|
146
|
-
majorMinor: bsb.string({ min: 1, max: 20
|
|
147
|
-
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
148
|
-
package: optional(bsb.object({
|
|
149
|
-
nodejs: optional(bsb.string(
|
|
150
|
-
csharp: optional(bsb.string(
|
|
151
|
-
go: optional(bsb.string(
|
|
152
|
-
java: optional(bsb.string(
|
|
153
|
-
python: optional(bsb.string(
|
|
154
|
-
}
|
|
155
|
-
category: bsb.enum(["service", "observable", "events", "config"]
|
|
156
|
-
tags: bsb.array(bsb.string({ max: 50 })
|
|
157
|
-
author: optional(bsb.union([bsb.string({ max: 200
|
|
158
|
-
name: bsb.string({ max: 200
|
|
159
|
-
email: optional(bsb.string({ max: 200
|
|
160
|
-
url: optional(bsb.uri(
|
|
161
|
-
}
|
|
162
|
-
license: optional(bsb.string({ max: 50
|
|
163
|
-
homepage: optional(bsb.uri(
|
|
164
|
-
repository: optional(bsb.
|
|
165
|
-
visibility: bsb.enum(["public", "private"]
|
|
166
|
-
eventSchema: bsb.unknown(
|
|
167
|
-
capabilities: optional(bsb.unknown(
|
|
168
|
-
configSchema: optional(bsb.unknown(
|
|
169
|
-
typeDefinitions: optional(bsb.object({
|
|
170
|
-
nodejs: optional(bsb.string(
|
|
171
|
-
csharp: optional(bsb.string(
|
|
172
|
-
go: optional(bsb.string(
|
|
173
|
-
java: optional(bsb.string(
|
|
174
|
-
}
|
|
175
|
-
documentation: optional(bsb.array(bsb.string(
|
|
176
|
-
dependencies: optional(bsb.array(bsb.object({
|
|
177
|
-
id: bsb.string({ min: 1, max: 200
|
|
178
|
-
version: bsb.string({ min: 1, max: 50
|
|
179
|
-
}
|
|
180
|
-
permissions: optional(bsb.array(bsb.object({
|
|
181
|
-
userId: bsb.uuid(
|
|
182
|
-
permission: bsb.enum(["read", "write"]
|
|
183
|
-
}
|
|
184
|
-
eventCount: bsb.int32({
|
|
185
|
-
emitEventCount: bsb.int32({
|
|
186
|
-
onEventCount: bsb.int32({
|
|
187
|
-
returnableEventCount: bsb.int32({
|
|
188
|
-
broadcastEventCount: bsb.int32({
|
|
189
|
-
publishedBy: bsb.string({ max: 200
|
|
190
|
-
publishedAt: bsb.datetime(
|
|
191
|
-
updatedAt: bsb.datetime(
|
|
192
|
-
downloads: optional(bsb.int32({
|
|
193
|
-
runtime: optional(bsb.object({
|
|
194
|
-
nodejs: optional(bsb.string(
|
|
195
|
-
dotnet: optional(bsb.string(
|
|
196
|
-
go: optional(bsb.string(
|
|
197
|
-
java: optional(bsb.string(
|
|
198
|
-
python: optional(bsb.string(
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
total: bsb.int32({
|
|
202
|
-
page: bsb.int32({
|
|
203
|
-
}
|
|
138
|
+
"results": bsb.array(bsb.object({
|
|
139
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
140
|
+
"org": bsb.string({ min: 1, max: 100 }),
|
|
141
|
+
"name": bsb.string({ min: 1, max: 100 }),
|
|
142
|
+
"displayName": bsb.string({ min: 1, max: 200 }),
|
|
143
|
+
"description": bsb.string({ min: 1, max: 1000 }),
|
|
144
|
+
"version": bsb.string({ min: 1, max: 50 }),
|
|
145
|
+
"majorMinor": bsb.string({ min: 1, max: 20 }),
|
|
146
|
+
"language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
|
|
147
|
+
"package": optional(bsb.object({
|
|
148
|
+
"nodejs": optional(bsb.string()),
|
|
149
|
+
"csharp": optional(bsb.string()),
|
|
150
|
+
"go": optional(bsb.string()),
|
|
151
|
+
"java": optional(bsb.string()),
|
|
152
|
+
"python": optional(bsb.string())
|
|
153
|
+
})),
|
|
154
|
+
"category": bsb.enum(["service", "observable", "events", "config"]),
|
|
155
|
+
"tags": bsb.array(bsb.string({ max: 50 })),
|
|
156
|
+
"author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
|
|
157
|
+
"name": bsb.string({ max: 200 }),
|
|
158
|
+
"email": optional(bsb.string({ max: 200 })),
|
|
159
|
+
"url": optional(bsb.uri())
|
|
160
|
+
})])),
|
|
161
|
+
"license": optional(bsb.string({ max: 50 })),
|
|
162
|
+
"homepage": optional(bsb.uri()),
|
|
163
|
+
"repository": optional(bsb.string()),
|
|
164
|
+
"visibility": bsb.enum(["public", "private"]),
|
|
165
|
+
"eventSchema": bsb.unknown(),
|
|
166
|
+
"capabilities": optional(bsb.unknown()),
|
|
167
|
+
"configSchema": optional(bsb.unknown()),
|
|
168
|
+
"typeDefinitions": optional(bsb.object({
|
|
169
|
+
"nodejs": optional(bsb.string()),
|
|
170
|
+
"csharp": optional(bsb.string()),
|
|
171
|
+
"go": optional(bsb.string()),
|
|
172
|
+
"java": optional(bsb.string())
|
|
173
|
+
})),
|
|
174
|
+
"documentation": optional(bsb.array(bsb.string(), { min: 1 })),
|
|
175
|
+
"dependencies": optional(bsb.array(bsb.object({
|
|
176
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
177
|
+
"version": bsb.string({ min: 1, max: 50 })
|
|
178
|
+
}))),
|
|
179
|
+
"permissions": optional(bsb.array(bsb.object({
|
|
180
|
+
"userId": bsb.uuid(),
|
|
181
|
+
"permission": bsb.enum(["read", "write"])
|
|
182
|
+
}))),
|
|
183
|
+
"eventCount": bsb.int32({ min: 0 }),
|
|
184
|
+
"emitEventCount": bsb.int32({ min: 0 }),
|
|
185
|
+
"onEventCount": bsb.int32({ min: 0 }),
|
|
186
|
+
"returnableEventCount": bsb.int32({ min: 0 }),
|
|
187
|
+
"broadcastEventCount": bsb.int32({ min: 0 }),
|
|
188
|
+
"publishedBy": bsb.string({ max: 200 }),
|
|
189
|
+
"publishedAt": bsb.datetime(),
|
|
190
|
+
"updatedAt": bsb.datetime(),
|
|
191
|
+
"downloads": optional(bsb.int32({ min: 0 })),
|
|
192
|
+
"runtime": optional(bsb.object({
|
|
193
|
+
"nodejs": optional(bsb.string()),
|
|
194
|
+
"dotnet": optional(bsb.string()),
|
|
195
|
+
"go": optional(bsb.string()),
|
|
196
|
+
"java": optional(bsb.string()),
|
|
197
|
+
"python": optional(bsb.string())
|
|
198
|
+
}))
|
|
199
|
+
})),
|
|
200
|
+
"total": bsb.int32({ min: 0 }),
|
|
201
|
+
"page": bsb.int32({ min: 1 })
|
|
202
|
+
});
|
|
204
203
|
const _registryPluginSearchSchema = bsb.object({
|
|
205
|
-
query: bsb.string({ min: 1, max: 200
|
|
206
|
-
language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
207
|
-
category: optional(bsb.enum(["service", "observable", "events", "config"]
|
|
208
|
-
limit: optional(bsb.int32({
|
|
209
|
-
offset: optional(bsb.int32({
|
|
210
|
-
}
|
|
204
|
+
"query": bsb.string({ min: 1, max: 200 }),
|
|
205
|
+
"language": optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"])),
|
|
206
|
+
"category": optional(bsb.enum(["service", "observable", "events", "config"])),
|
|
207
|
+
"limit": optional(bsb.int32({ min: 1, max: 100 })),
|
|
208
|
+
"offset": optional(bsb.int32({ min: 0 }))
|
|
209
|
+
});
|
|
211
210
|
const _registryPluginSearchOutputSchema = bsb.object({
|
|
212
|
-
results: bsb.array(bsb.object({
|
|
213
|
-
id: bsb.string({ min: 1, max: 200
|
|
214
|
-
org: bsb.string({ min: 1, max: 100
|
|
215
|
-
name: bsb.string({ min: 1, max: 100
|
|
216
|
-
displayName: bsb.string({ min: 1, max: 200
|
|
217
|
-
description: bsb.string({ min: 1, max: 1000
|
|
218
|
-
version: bsb.string({ min: 1, max: 50
|
|
219
|
-
majorMinor: bsb.string({ min: 1, max: 20
|
|
220
|
-
language: bsb.enum(["nodejs", "csharp", "go", "java", "python"]
|
|
221
|
-
package: optional(bsb.object({
|
|
222
|
-
nodejs: optional(bsb.string(
|
|
223
|
-
csharp: optional(bsb.string(
|
|
224
|
-
go: optional(bsb.string(
|
|
225
|
-
java: optional(bsb.string(
|
|
226
|
-
python: optional(bsb.string(
|
|
227
|
-
}
|
|
228
|
-
category: bsb.enum(["service", "observable", "events", "config"]
|
|
229
|
-
tags: bsb.array(bsb.string({ max: 50 })
|
|
230
|
-
author: optional(bsb.union([bsb.string({ max: 200
|
|
231
|
-
name: bsb.string({ max: 200
|
|
232
|
-
email: optional(bsb.string({ max: 200
|
|
233
|
-
url: optional(bsb.uri(
|
|
234
|
-
}
|
|
235
|
-
license: optional(bsb.string({ max: 50
|
|
236
|
-
homepage: optional(bsb.uri(
|
|
237
|
-
repository: optional(bsb.
|
|
238
|
-
visibility: bsb.enum(["public", "private"]
|
|
239
|
-
eventSchema: bsb.unknown(
|
|
240
|
-
capabilities: optional(bsb.unknown(
|
|
241
|
-
configSchema: optional(bsb.unknown(
|
|
242
|
-
typeDefinitions: optional(bsb.object({
|
|
243
|
-
nodejs: optional(bsb.string(
|
|
244
|
-
csharp: optional(bsb.string(
|
|
245
|
-
go: optional(bsb.string(
|
|
246
|
-
java: optional(bsb.string(
|
|
247
|
-
}
|
|
248
|
-
documentation: optional(bsb.array(bsb.string(
|
|
249
|
-
dependencies: optional(bsb.array(bsb.object({
|
|
250
|
-
id: bsb.string({ min: 1, max: 200
|
|
251
|
-
version: bsb.string({ min: 1, max: 50
|
|
252
|
-
}
|
|
253
|
-
permissions: optional(bsb.array(bsb.object({
|
|
254
|
-
userId: bsb.uuid(
|
|
255
|
-
permission: bsb.enum(["read", "write"]
|
|
256
|
-
}
|
|
257
|
-
eventCount: bsb.int32({
|
|
258
|
-
emitEventCount: bsb.int32({
|
|
259
|
-
onEventCount: bsb.int32({
|
|
260
|
-
returnableEventCount: bsb.int32({
|
|
261
|
-
broadcastEventCount: bsb.int32({
|
|
262
|
-
publishedBy: bsb.string({ max: 200
|
|
263
|
-
publishedAt: bsb.datetime(
|
|
264
|
-
updatedAt: bsb.datetime(
|
|
265
|
-
downloads: optional(bsb.int32({
|
|
266
|
-
runtime: optional(bsb.object({
|
|
267
|
-
nodejs: optional(bsb.string(
|
|
268
|
-
dotnet: optional(bsb.string(
|
|
269
|
-
go: optional(bsb.string(
|
|
270
|
-
java: optional(bsb.string(
|
|
271
|
-
python: optional(bsb.string(
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
total: bsb.int32({
|
|
275
|
-
query: bsb.string(
|
|
276
|
-
}
|
|
211
|
+
"results": bsb.array(bsb.object({
|
|
212
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
213
|
+
"org": bsb.string({ min: 1, max: 100 }),
|
|
214
|
+
"name": bsb.string({ min: 1, max: 100 }),
|
|
215
|
+
"displayName": bsb.string({ min: 1, max: 200 }),
|
|
216
|
+
"description": bsb.string({ min: 1, max: 1000 }),
|
|
217
|
+
"version": bsb.string({ min: 1, max: 50 }),
|
|
218
|
+
"majorMinor": bsb.string({ min: 1, max: 20 }),
|
|
219
|
+
"language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
|
|
220
|
+
"package": optional(bsb.object({
|
|
221
|
+
"nodejs": optional(bsb.string()),
|
|
222
|
+
"csharp": optional(bsb.string()),
|
|
223
|
+
"go": optional(bsb.string()),
|
|
224
|
+
"java": optional(bsb.string()),
|
|
225
|
+
"python": optional(bsb.string())
|
|
226
|
+
})),
|
|
227
|
+
"category": bsb.enum(["service", "observable", "events", "config"]),
|
|
228
|
+
"tags": bsb.array(bsb.string({ max: 50 })),
|
|
229
|
+
"author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
|
|
230
|
+
"name": bsb.string({ max: 200 }),
|
|
231
|
+
"email": optional(bsb.string({ max: 200 })),
|
|
232
|
+
"url": optional(bsb.uri())
|
|
233
|
+
})])),
|
|
234
|
+
"license": optional(bsb.string({ max: 50 })),
|
|
235
|
+
"homepage": optional(bsb.uri()),
|
|
236
|
+
"repository": optional(bsb.string()),
|
|
237
|
+
"visibility": bsb.enum(["public", "private"]),
|
|
238
|
+
"eventSchema": bsb.unknown(),
|
|
239
|
+
"capabilities": optional(bsb.unknown()),
|
|
240
|
+
"configSchema": optional(bsb.unknown()),
|
|
241
|
+
"typeDefinitions": optional(bsb.object({
|
|
242
|
+
"nodejs": optional(bsb.string()),
|
|
243
|
+
"csharp": optional(bsb.string()),
|
|
244
|
+
"go": optional(bsb.string()),
|
|
245
|
+
"java": optional(bsb.string())
|
|
246
|
+
})),
|
|
247
|
+
"documentation": optional(bsb.array(bsb.string(), { min: 1 })),
|
|
248
|
+
"dependencies": optional(bsb.array(bsb.object({
|
|
249
|
+
"id": bsb.string({ min: 1, max: 200 }),
|
|
250
|
+
"version": bsb.string({ min: 1, max: 50 })
|
|
251
|
+
}))),
|
|
252
|
+
"permissions": optional(bsb.array(bsb.object({
|
|
253
|
+
"userId": bsb.uuid(),
|
|
254
|
+
"permission": bsb.enum(["read", "write"])
|
|
255
|
+
}))),
|
|
256
|
+
"eventCount": bsb.int32({ min: 0 }),
|
|
257
|
+
"emitEventCount": bsb.int32({ min: 0 }),
|
|
258
|
+
"onEventCount": bsb.int32({ min: 0 }),
|
|
259
|
+
"returnableEventCount": bsb.int32({ min: 0 }),
|
|
260
|
+
"broadcastEventCount": bsb.int32({ min: 0 }),
|
|
261
|
+
"publishedBy": bsb.string({ max: 200 }),
|
|
262
|
+
"publishedAt": bsb.datetime(),
|
|
263
|
+
"updatedAt": bsb.datetime(),
|
|
264
|
+
"downloads": optional(bsb.int32({ min: 0 })),
|
|
265
|
+
"runtime": optional(bsb.object({
|
|
266
|
+
"nodejs": optional(bsb.string()),
|
|
267
|
+
"dotnet": optional(bsb.string()),
|
|
268
|
+
"go": optional(bsb.string()),
|
|
269
|
+
"java": optional(bsb.string()),
|
|
270
|
+
"python": optional(bsb.string())
|
|
271
|
+
}))
|
|
272
|
+
})),
|
|
273
|
+
"total": bsb.int32({ min: 0 }),
|
|
274
|
+
"query": bsb.string()
|
|
275
|
+
});
|
|
277
276
|
const _registryPluginDeleteSchema = bsb.object({
|
|
278
|
-
org: bsb.string(
|
|
279
|
-
name: bsb.string(
|
|
280
|
-
version: optional(bsb.string(
|
|
277
|
+
"org": bsb.string(),
|
|
278
|
+
"name": bsb.string(),
|
|
279
|
+
"version": optional(bsb.string())
|
|
281
280
|
});
|
|
282
281
|
const _registryPluginDeleteOutputSchema = bsb.object({
|
|
283
|
-
success: bsb.boolean(
|
|
284
|
-
deleted: bsb.int32({
|
|
282
|
+
"success": bsb.boolean(),
|
|
283
|
+
"deleted": bsb.int32({ min: 0 })
|
|
285
284
|
});
|
|
286
285
|
const _registryPluginVersionsSchema = bsb.object({
|
|
287
|
-
org: bsb.string(
|
|
288
|
-
name: bsb.string(
|
|
289
|
-
majorMinor: optional(bsb.string(
|
|
286
|
+
"org": bsb.string(),
|
|
287
|
+
"name": bsb.string(),
|
|
288
|
+
"majorMinor": optional(bsb.string())
|
|
290
289
|
});
|
|
291
290
|
const _registryPluginVersionsOutputSchema = bsb.object({
|
|
292
|
-
versions: bsb.array(bsb.object({
|
|
293
|
-
version: bsb.string(
|
|
294
|
-
majorMinor: bsb.string(
|
|
295
|
-
publishedAt: bsb.datetime(
|
|
296
|
-
}
|
|
297
|
-
latest: bsb.string(
|
|
298
|
-
latestForMajorMinor: bsb.string(
|
|
299
|
-
}
|
|
300
|
-
const _registryStatsGetSchema = bsb.object({}
|
|
291
|
+
"versions": bsb.array(bsb.object({
|
|
292
|
+
"version": bsb.string(),
|
|
293
|
+
"majorMinor": bsb.string(),
|
|
294
|
+
"publishedAt": bsb.datetime()
|
|
295
|
+
})),
|
|
296
|
+
"latest": bsb.string(),
|
|
297
|
+
"latestForMajorMinor": bsb.string()
|
|
298
|
+
});
|
|
299
|
+
const _registryStatsGetSchema = bsb.object({});
|
|
301
300
|
const _registryStatsGetOutputSchema = bsb.object({
|
|
302
|
-
totalPlugins: bsb.int32({
|
|
303
|
-
byLanguage: bsb.string(
|
|
304
|
-
byCategory: bsb.string(
|
|
305
|
-
totalDownloads: bsb.int32({
|
|
306
|
-
}
|
|
301
|
+
"totalPlugins": bsb.int32({ min: 0 }),
|
|
302
|
+
"byLanguage": bsb.string(),
|
|
303
|
+
"byCategory": bsb.string(),
|
|
304
|
+
"totalDownloads": bsb.int32({ min: 0 })
|
|
305
|
+
});
|
|
307
306
|
const _registryAuthLoginSchema = bsb.object({
|
|
308
|
-
username: bsb.string(
|
|
309
|
-
password: bsb.string(
|
|
307
|
+
"username": bsb.string(),
|
|
308
|
+
"password": bsb.string()
|
|
310
309
|
});
|
|
311
310
|
const _registryAuthLoginOutputSchema = bsb.object({
|
|
312
|
-
success: bsb.boolean(
|
|
313
|
-
token: optional(bsb.string(
|
|
314
|
-
expiresAt: optional(bsb.datetime(
|
|
315
|
-
message: optional(bsb.string(
|
|
311
|
+
"success": bsb.boolean(),
|
|
312
|
+
"token": optional(bsb.string()),
|
|
313
|
+
"expiresAt": optional(bsb.datetime()),
|
|
314
|
+
"message": optional(bsb.string())
|
|
316
315
|
});
|
|
317
316
|
const _registryAuthVerifySchema = bsb.object({
|
|
318
|
-
token: bsb.string(
|
|
317
|
+
"token": bsb.string()
|
|
319
318
|
});
|
|
320
319
|
const _registryAuthVerifyOutputSchema = bsb.object({
|
|
321
|
-
valid: bsb.boolean(
|
|
322
|
-
userId: optional(bsb.string(
|
|
323
|
-
permissions: optional(bsb.array(bsb.string()))
|
|
320
|
+
"valid": bsb.boolean(),
|
|
321
|
+
"userId": optional(bsb.string()),
|
|
322
|
+
"permissions": optional(bsb.array(bsb.string()))
|
|
324
323
|
});
|
|
325
|
-
// --- Event Schemas (typed, follows ServiceClientEventSchemas flip) ---
|
|
326
324
|
const _EventSchemas = createEventSchemas({
|
|
327
325
|
onReturnableEvents: {
|
|
328
326
|
'registry.plugin.publish': createReturnableEvent(_registryPluginPublishSchema, _registryPluginPublishOutputSchema, "Publish a new plugin or version"),
|
|
@@ -336,14 +334,12 @@ const _EventSchemas = createEventSchemas({
|
|
|
336
334
|
'registry.auth.verify': createReturnableEvent(_registryAuthVerifySchema, _registryAuthVerifyOutputSchema, "Verify authentication token"),
|
|
337
335
|
},
|
|
338
336
|
});
|
|
339
|
-
// --- Internal: Plugin reference for ServiceClient wiring ---
|
|
340
337
|
const _PLUGIN_CLIENT = {
|
|
341
338
|
name: "service-bsb-registry",
|
|
342
339
|
};
|
|
343
340
|
class _PluginRef {
|
|
344
341
|
static PLUGIN_CLIENT = _PLUGIN_CLIENT;
|
|
345
342
|
}
|
|
346
|
-
// --- Exported Client ---
|
|
347
343
|
export default class BsbRegistryClient extends ServiceClient {
|
|
348
344
|
constructor(context) {
|
|
349
345
|
super(_PluginRef, context);
|