@openbrf/plugin-sdk 0.0.0-stage → 1.2.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/LICENSE +661 -0
- package/LICENSE-EXCEPTION.md +28 -0
- package/README.md +94 -2
- package/dist/abort-signal.d.ts +23 -0
- package/dist/abort-signal.d.ts.map +1 -0
- package/dist/abort-signal.js +2 -0
- package/dist/abort-signal.js.map +1 -0
- package/dist/action-refusal.d.ts +101 -0
- package/dist/action-refusal.d.ts.map +1 -0
- package/dist/action-refusal.js +96 -0
- package/dist/action-refusal.js.map +1 -0
- package/dist/action-schema.d.ts +42 -0
- package/dist/action-schema.d.ts.map +1 -0
- package/dist/action-schema.js +67 -0
- package/dist/action-schema.js.map +1 -0
- package/dist/actions.d.ts +287 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +68 -0
- package/dist/actions.js.map +1 -0
- package/dist/api-version.d.ts +23 -0
- package/dist/api-version.d.ts.map +1 -0
- package/dist/api-version.js +27 -0
- package/dist/api-version.js.map +1 -0
- package/dist/blocks.d.ts +310 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +185 -0
- package/dist/blocks.js.map +1 -0
- package/dist/catalog.d.ts +707 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +567 -0
- package/dist/catalog.js.map +1 -0
- package/dist/define-plugin.d.ts +14 -0
- package/dist/define-plugin.d.ts.map +1 -0
- package/dist/define-plugin.js +15 -0
- package/dist/define-plugin.js.map +1 -0
- package/dist/entitlements.d.ts +117 -0
- package/dist/entitlements.d.ts.map +1 -0
- package/dist/entitlements.js +62 -0
- package/dist/entitlements.js.map +1 -0
- package/dist/extensions.d.ts +183 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +67 -0
- package/dist/extensions.js.map +1 -0
- package/dist/finances.d.ts +294 -0
- package/dist/finances.d.ts.map +1 -0
- package/dist/finances.js +56 -0
- package/dist/finances.js.map +1 -0
- package/dist/findings.d.ts +156 -0
- package/dist/findings.d.ts.map +1 -0
- package/dist/findings.js +146 -0
- package/dist/findings.js.map +1 -0
- package/dist/host.d.ts +827 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +80 -0
- package/dist/host.js.map +1 -0
- package/dist/imports.d.ts +104 -0
- package/dist/imports.d.ts.map +1 -0
- package/dist/imports.js +70 -0
- package/dist/imports.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/integrity.d.ts +38 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +105 -0
- package/dist/integrity.js.map +1 -0
- package/dist/localized-text.d.ts +18 -0
- package/dist/localized-text.d.ts.map +1 -0
- package/dist/localized-text.js +17 -0
- package/dist/localized-text.js.map +1 -0
- package/dist/manifest.d.ts +1122 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +1118 -0
- package/dist/manifest.js.map +1 -0
- package/dist/module.d.ts +35 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +2 -0
- package/dist/module.js.map +1 -0
- package/dist/package-check.d.ts +66 -0
- package/dist/package-check.d.ts.map +1 -0
- package/dist/package-check.js +755 -0
- package/dist/package-check.js.map +1 -0
- package/dist/permissions.d.ts +224 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +277 -0
- package/dist/permissions.js.map +1 -0
- package/dist/recipients.d.ts +139 -0
- package/dist/recipients.d.ts.map +1 -0
- package/dist/recipients.js +223 -0
- package/dist/recipients.js.map +1 -0
- package/dist/records.d.ts +130 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +85 -0
- package/dist/records.js.map +1 -0
- package/dist/require-capability.d.ts +37 -0
- package/dist/require-capability.d.ts.map +1 -0
- package/dist/require-capability.js +88 -0
- package/dist/require-capability.js.map +1 -0
- package/dist/settings-schema.d.ts +130 -0
- package/dist/settings-schema.d.ts.map +1 -0
- package/dist/settings-schema.js +272 -0
- package/dist/settings-schema.js.map +1 -0
- package/dist/standard-schema.d.ts +43 -0
- package/dist/standard-schema.d.ts.map +1 -0
- package/dist/standard-schema.js +2 -0
- package/dist/standard-schema.js.map +1 -0
- package/package.json +55 -3
- package/src/abort-signal.ts +22 -0
- package/src/action-refusal.ts +178 -0
- package/src/action-schema.ts +89 -0
- package/src/actions.ts +344 -0
- package/src/api-version.ts +28 -0
- package/src/blocks.ts +289 -0
- package/src/catalog.ts +679 -0
- package/src/define-plugin.ts +18 -0
- package/src/entitlements.ts +150 -0
- package/src/extensions.ts +212 -0
- package/src/finances.ts +317 -0
- package/src/findings.ts +163 -0
- package/src/host.ts +894 -0
- package/src/imports.ts +135 -0
- package/src/index.ts +316 -0
- package/src/integrity.ts +125 -0
- package/src/localized-text.ts +19 -0
- package/src/manifest.ts +1412 -0
- package/src/module.ts +38 -0
- package/src/package-check.ts +894 -0
- package/src/permissions.ts +295 -0
- package/src/recipients.ts +294 -0
- package/src/records.ts +172 -0
- package/src/require-capability.ts +106 -0
- package/src/settings-schema.ts +334 -0
- package/src/standard-schema.ts +39 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PluginFindingDetail } from "./findings.ts";
|
|
3
|
+
/** A tarball and the digest its bytes must hash to. */
|
|
4
|
+
export declare const catalogArtifactSchema: z.ZodObject<{
|
|
5
|
+
url: z.ZodString;
|
|
6
|
+
sha512: z.ZodString;
|
|
7
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type CatalogArtifact = z.infer<typeof catalogArtifactSchema>;
|
|
10
|
+
export type { LocalizedText } from "./localized-text.ts";
|
|
11
|
+
/**
|
|
12
|
+
* An extension point as the index lists it: the manifest's fields, and the
|
|
13
|
+
* curator's title and description in both languages.
|
|
14
|
+
*
|
|
15
|
+
* The text is the curator's rather than the plugin's own, as an entry's `name`
|
|
16
|
+
* is, because an addon's consent screen has to name the point before the host
|
|
17
|
+
* plugin's locale files exist on the instance (ADR 0030).
|
|
18
|
+
*/
|
|
19
|
+
export declare const catalogExtensionPointSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
version: z.ZodInt;
|
|
22
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
23
|
+
account: "account";
|
|
24
|
+
apartment: "apartment";
|
|
25
|
+
auditTrail: "auditTrail";
|
|
26
|
+
email: "email";
|
|
27
|
+
financial: "financial";
|
|
28
|
+
freeText: "freeText";
|
|
29
|
+
health: "health";
|
|
30
|
+
name: "name";
|
|
31
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
32
|
+
phone: "phone";
|
|
33
|
+
photograph: "photograph";
|
|
34
|
+
postalAddress: "postalAddress";
|
|
35
|
+
protected: "protected";
|
|
36
|
+
residency: "residency";
|
|
37
|
+
}>>>;
|
|
38
|
+
title: z.ZodObject<{
|
|
39
|
+
sv: z.ZodString;
|
|
40
|
+
en: z.ZodString;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
description: z.ZodObject<{
|
|
43
|
+
sv: z.ZodString;
|
|
44
|
+
en: z.ZodString;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export type CatalogExtensionPoint = z.infer<typeof catalogExtensionPointSchema>;
|
|
48
|
+
export declare const catalogPluginEntrySchema: z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
version: z.ZodString;
|
|
51
|
+
name: z.ZodObject<{
|
|
52
|
+
sv: z.ZodString;
|
|
53
|
+
en: z.ZodString;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
description: z.ZodObject<{
|
|
56
|
+
sv: z.ZodString;
|
|
57
|
+
en: z.ZodString;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
artifact: z.ZodObject<{
|
|
60
|
+
url: z.ZodString;
|
|
61
|
+
sha512: z.ZodString;
|
|
62
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
65
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
66
|
+
type: z.ZodLiteral<"plugin">;
|
|
67
|
+
packageName: z.ZodString;
|
|
68
|
+
apiVersion: z.ZodInt;
|
|
69
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
70
|
+
"addressBook:proposeImport": "addressBook:proposeImport";
|
|
71
|
+
"addressBook:read": "addressBook:read";
|
|
72
|
+
"addressBook:readContact": "addressBook:readContact";
|
|
73
|
+
"addresses:read": "addresses:read";
|
|
74
|
+
"bookings:readAvailability": "bookings:readAvailability";
|
|
75
|
+
"calendar:read": "calendar:read";
|
|
76
|
+
"finances:read": "finances:read";
|
|
77
|
+
"finances:recordDelivery": "finances:recordDelivery";
|
|
78
|
+
"jobs:schedule": "jobs:schedule";
|
|
79
|
+
"mail:send": "mail:send";
|
|
80
|
+
"media:read": "media:read";
|
|
81
|
+
"news:read": "news:read";
|
|
82
|
+
"site:blocks": "site:blocks";
|
|
83
|
+
"sms:send": "sms:send";
|
|
84
|
+
"themes:install": "themes:install";
|
|
85
|
+
}>>>;
|
|
86
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
87
|
+
account: "account";
|
|
88
|
+
apartment: "apartment";
|
|
89
|
+
auditTrail: "auditTrail";
|
|
90
|
+
email: "email";
|
|
91
|
+
financial: "financial";
|
|
92
|
+
freeText: "freeText";
|
|
93
|
+
health: "health";
|
|
94
|
+
name: "name";
|
|
95
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
96
|
+
phone: "phone";
|
|
97
|
+
photograph: "photograph";
|
|
98
|
+
postalAddress: "postalAddress";
|
|
99
|
+
protected: "protected";
|
|
100
|
+
residency: "residency";
|
|
101
|
+
}>>>;
|
|
102
|
+
actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
capability: z.ZodString;
|
|
105
|
+
effect: z.ZodEnum<{
|
|
106
|
+
delete: "delete";
|
|
107
|
+
read: "read";
|
|
108
|
+
write: "write";
|
|
109
|
+
}>;
|
|
110
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
111
|
+
account: "account";
|
|
112
|
+
apartment: "apartment";
|
|
113
|
+
auditTrail: "auditTrail";
|
|
114
|
+
email: "email";
|
|
115
|
+
financial: "financial";
|
|
116
|
+
freeText: "freeText";
|
|
117
|
+
health: "health";
|
|
118
|
+
name: "name";
|
|
119
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
120
|
+
phone: "phone";
|
|
121
|
+
photograph: "photograph";
|
|
122
|
+
postalAddress: "postalAddress";
|
|
123
|
+
protected: "protected";
|
|
124
|
+
residency: "residency";
|
|
125
|
+
}>>>;
|
|
126
|
+
surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
127
|
+
ai: "ai";
|
|
128
|
+
mcp: "mcp";
|
|
129
|
+
ui: "ui";
|
|
130
|
+
}>>>;
|
|
131
|
+
}, z.core.$strict>>>;
|
|
132
|
+
oauthProtectedResource: z.ZodOptional<z.ZodString>;
|
|
133
|
+
extensionPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
version: z.ZodInt;
|
|
136
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
137
|
+
account: "account";
|
|
138
|
+
apartment: "apartment";
|
|
139
|
+
auditTrail: "auditTrail";
|
|
140
|
+
email: "email";
|
|
141
|
+
financial: "financial";
|
|
142
|
+
freeText: "freeText";
|
|
143
|
+
health: "health";
|
|
144
|
+
name: "name";
|
|
145
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
146
|
+
phone: "phone";
|
|
147
|
+
photograph: "photograph";
|
|
148
|
+
postalAddress: "postalAddress";
|
|
149
|
+
protected: "protected";
|
|
150
|
+
residency: "residency";
|
|
151
|
+
}>>>;
|
|
152
|
+
title: z.ZodObject<{
|
|
153
|
+
sv: z.ZodString;
|
|
154
|
+
en: z.ZodString;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
description: z.ZodObject<{
|
|
157
|
+
sv: z.ZodString;
|
|
158
|
+
en: z.ZodString;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
}, z.core.$strict>>>;
|
|
161
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
+
plugin: z.ZodString;
|
|
163
|
+
point: z.ZodString;
|
|
164
|
+
version: z.ZodInt;
|
|
165
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
166
|
+
account: "account";
|
|
167
|
+
apartment: "apartment";
|
|
168
|
+
auditTrail: "auditTrail";
|
|
169
|
+
email: "email";
|
|
170
|
+
financial: "financial";
|
|
171
|
+
freeText: "freeText";
|
|
172
|
+
health: "health";
|
|
173
|
+
name: "name";
|
|
174
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
175
|
+
phone: "phone";
|
|
176
|
+
photograph: "photograph";
|
|
177
|
+
postalAddress: "postalAddress";
|
|
178
|
+
protected: "protected";
|
|
179
|
+
residency: "residency";
|
|
180
|
+
}>>>;
|
|
181
|
+
}, z.core.$strict>>>;
|
|
182
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
origin: z.ZodString;
|
|
185
|
+
purpose: z.ZodObject<{
|
|
186
|
+
sv: z.ZodString;
|
|
187
|
+
en: z.ZodString;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
personalData: z.ZodArray<z.ZodEnum<{
|
|
190
|
+
account: "account";
|
|
191
|
+
apartment: "apartment";
|
|
192
|
+
auditTrail: "auditTrail";
|
|
193
|
+
email: "email";
|
|
194
|
+
financial: "financial";
|
|
195
|
+
freeText: "freeText";
|
|
196
|
+
health: "health";
|
|
197
|
+
name: "name";
|
|
198
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
199
|
+
phone: "phone";
|
|
200
|
+
photograph: "photograph";
|
|
201
|
+
postalAddress: "postalAddress";
|
|
202
|
+
protected: "protected";
|
|
203
|
+
residency: "residency";
|
|
204
|
+
}>>;
|
|
205
|
+
}, z.core.$strict>>>;
|
|
206
|
+
deviceRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
path: z.ZodString;
|
|
209
|
+
}, z.core.$strict>>>;
|
|
210
|
+
ai: z.ZodDefault<z.ZodBoolean>;
|
|
211
|
+
licence: z.ZodOptional<z.ZodObject<{
|
|
212
|
+
entitlement: z.ZodString;
|
|
213
|
+
issuer: z.ZodObject<{
|
|
214
|
+
name: z.ZodString;
|
|
215
|
+
url: z.ZodString;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
keys: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
218
|
+
audiences: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
released: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
/**
|
|
223
|
+
* A theme entry. Themes install through the same download-and-verify path and
|
|
224
|
+
* are listed in the same index; what happens after the bytes are verified is
|
|
225
|
+
* the theme installer's business, not this schema's.
|
|
226
|
+
*
|
|
227
|
+
* No package name: a theme is data read out of its archive, never an npm
|
|
228
|
+
* package, and nothing that installs one keys on a package name.
|
|
229
|
+
*/
|
|
230
|
+
export declare const catalogThemeEntrySchema: z.ZodObject<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
version: z.ZodString;
|
|
233
|
+
name: z.ZodObject<{
|
|
234
|
+
sv: z.ZodString;
|
|
235
|
+
en: z.ZodString;
|
|
236
|
+
}, z.core.$strict>;
|
|
237
|
+
description: z.ZodObject<{
|
|
238
|
+
sv: z.ZodString;
|
|
239
|
+
en: z.ZodString;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
artifact: z.ZodObject<{
|
|
242
|
+
url: z.ZodString;
|
|
243
|
+
sha512: z.ZodString;
|
|
244
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
245
|
+
}, z.core.$strict>;
|
|
246
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
247
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
+
type: z.ZodLiteral<"theme">;
|
|
249
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
250
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
export declare const catalogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
253
|
+
id: z.ZodString;
|
|
254
|
+
version: z.ZodString;
|
|
255
|
+
name: z.ZodObject<{
|
|
256
|
+
sv: z.ZodString;
|
|
257
|
+
en: z.ZodString;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
description: z.ZodObject<{
|
|
260
|
+
sv: z.ZodString;
|
|
261
|
+
en: z.ZodString;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
artifact: z.ZodObject<{
|
|
264
|
+
url: z.ZodString;
|
|
265
|
+
sha512: z.ZodString;
|
|
266
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
269
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
270
|
+
type: z.ZodLiteral<"plugin">;
|
|
271
|
+
packageName: z.ZodString;
|
|
272
|
+
apiVersion: z.ZodInt;
|
|
273
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
274
|
+
"addressBook:proposeImport": "addressBook:proposeImport";
|
|
275
|
+
"addressBook:read": "addressBook:read";
|
|
276
|
+
"addressBook:readContact": "addressBook:readContact";
|
|
277
|
+
"addresses:read": "addresses:read";
|
|
278
|
+
"bookings:readAvailability": "bookings:readAvailability";
|
|
279
|
+
"calendar:read": "calendar:read";
|
|
280
|
+
"finances:read": "finances:read";
|
|
281
|
+
"finances:recordDelivery": "finances:recordDelivery";
|
|
282
|
+
"jobs:schedule": "jobs:schedule";
|
|
283
|
+
"mail:send": "mail:send";
|
|
284
|
+
"media:read": "media:read";
|
|
285
|
+
"news:read": "news:read";
|
|
286
|
+
"site:blocks": "site:blocks";
|
|
287
|
+
"sms:send": "sms:send";
|
|
288
|
+
"themes:install": "themes:install";
|
|
289
|
+
}>>>;
|
|
290
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
291
|
+
account: "account";
|
|
292
|
+
apartment: "apartment";
|
|
293
|
+
auditTrail: "auditTrail";
|
|
294
|
+
email: "email";
|
|
295
|
+
financial: "financial";
|
|
296
|
+
freeText: "freeText";
|
|
297
|
+
health: "health";
|
|
298
|
+
name: "name";
|
|
299
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
300
|
+
phone: "phone";
|
|
301
|
+
photograph: "photograph";
|
|
302
|
+
postalAddress: "postalAddress";
|
|
303
|
+
protected: "protected";
|
|
304
|
+
residency: "residency";
|
|
305
|
+
}>>>;
|
|
306
|
+
actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
capability: z.ZodString;
|
|
309
|
+
effect: z.ZodEnum<{
|
|
310
|
+
delete: "delete";
|
|
311
|
+
read: "read";
|
|
312
|
+
write: "write";
|
|
313
|
+
}>;
|
|
314
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
315
|
+
account: "account";
|
|
316
|
+
apartment: "apartment";
|
|
317
|
+
auditTrail: "auditTrail";
|
|
318
|
+
email: "email";
|
|
319
|
+
financial: "financial";
|
|
320
|
+
freeText: "freeText";
|
|
321
|
+
health: "health";
|
|
322
|
+
name: "name";
|
|
323
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
324
|
+
phone: "phone";
|
|
325
|
+
photograph: "photograph";
|
|
326
|
+
postalAddress: "postalAddress";
|
|
327
|
+
protected: "protected";
|
|
328
|
+
residency: "residency";
|
|
329
|
+
}>>>;
|
|
330
|
+
surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
331
|
+
ai: "ai";
|
|
332
|
+
mcp: "mcp";
|
|
333
|
+
ui: "ui";
|
|
334
|
+
}>>>;
|
|
335
|
+
}, z.core.$strict>>>;
|
|
336
|
+
oauthProtectedResource: z.ZodOptional<z.ZodString>;
|
|
337
|
+
extensionPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
version: z.ZodInt;
|
|
340
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
341
|
+
account: "account";
|
|
342
|
+
apartment: "apartment";
|
|
343
|
+
auditTrail: "auditTrail";
|
|
344
|
+
email: "email";
|
|
345
|
+
financial: "financial";
|
|
346
|
+
freeText: "freeText";
|
|
347
|
+
health: "health";
|
|
348
|
+
name: "name";
|
|
349
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
350
|
+
phone: "phone";
|
|
351
|
+
photograph: "photograph";
|
|
352
|
+
postalAddress: "postalAddress";
|
|
353
|
+
protected: "protected";
|
|
354
|
+
residency: "residency";
|
|
355
|
+
}>>>;
|
|
356
|
+
title: z.ZodObject<{
|
|
357
|
+
sv: z.ZodString;
|
|
358
|
+
en: z.ZodString;
|
|
359
|
+
}, z.core.$strict>;
|
|
360
|
+
description: z.ZodObject<{
|
|
361
|
+
sv: z.ZodString;
|
|
362
|
+
en: z.ZodString;
|
|
363
|
+
}, z.core.$strict>;
|
|
364
|
+
}, z.core.$strict>>>;
|
|
365
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
366
|
+
plugin: z.ZodString;
|
|
367
|
+
point: z.ZodString;
|
|
368
|
+
version: z.ZodInt;
|
|
369
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
370
|
+
account: "account";
|
|
371
|
+
apartment: "apartment";
|
|
372
|
+
auditTrail: "auditTrail";
|
|
373
|
+
email: "email";
|
|
374
|
+
financial: "financial";
|
|
375
|
+
freeText: "freeText";
|
|
376
|
+
health: "health";
|
|
377
|
+
name: "name";
|
|
378
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
379
|
+
phone: "phone";
|
|
380
|
+
photograph: "photograph";
|
|
381
|
+
postalAddress: "postalAddress";
|
|
382
|
+
protected: "protected";
|
|
383
|
+
residency: "residency";
|
|
384
|
+
}>>>;
|
|
385
|
+
}, z.core.$strict>>>;
|
|
386
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
+
id: z.ZodString;
|
|
388
|
+
origin: z.ZodString;
|
|
389
|
+
purpose: z.ZodObject<{
|
|
390
|
+
sv: z.ZodString;
|
|
391
|
+
en: z.ZodString;
|
|
392
|
+
}, z.core.$strict>;
|
|
393
|
+
personalData: z.ZodArray<z.ZodEnum<{
|
|
394
|
+
account: "account";
|
|
395
|
+
apartment: "apartment";
|
|
396
|
+
auditTrail: "auditTrail";
|
|
397
|
+
email: "email";
|
|
398
|
+
financial: "financial";
|
|
399
|
+
freeText: "freeText";
|
|
400
|
+
health: "health";
|
|
401
|
+
name: "name";
|
|
402
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
403
|
+
phone: "phone";
|
|
404
|
+
photograph: "photograph";
|
|
405
|
+
postalAddress: "postalAddress";
|
|
406
|
+
protected: "protected";
|
|
407
|
+
residency: "residency";
|
|
408
|
+
}>>;
|
|
409
|
+
}, z.core.$strict>>>;
|
|
410
|
+
deviceRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
path: z.ZodString;
|
|
413
|
+
}, z.core.$strict>>>;
|
|
414
|
+
ai: z.ZodDefault<z.ZodBoolean>;
|
|
415
|
+
licence: z.ZodOptional<z.ZodObject<{
|
|
416
|
+
entitlement: z.ZodString;
|
|
417
|
+
issuer: z.ZodObject<{
|
|
418
|
+
name: z.ZodString;
|
|
419
|
+
url: z.ZodString;
|
|
420
|
+
}, z.core.$strict>;
|
|
421
|
+
keys: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
422
|
+
audiences: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
423
|
+
}, z.core.$strict>>;
|
|
424
|
+
released: z.ZodOptional<z.ZodString>;
|
|
425
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
426
|
+
id: z.ZodString;
|
|
427
|
+
version: z.ZodString;
|
|
428
|
+
name: z.ZodObject<{
|
|
429
|
+
sv: z.ZodString;
|
|
430
|
+
en: z.ZodString;
|
|
431
|
+
}, z.core.$strict>;
|
|
432
|
+
description: z.ZodObject<{
|
|
433
|
+
sv: z.ZodString;
|
|
434
|
+
en: z.ZodString;
|
|
435
|
+
}, z.core.$strict>;
|
|
436
|
+
artifact: z.ZodObject<{
|
|
437
|
+
url: z.ZodString;
|
|
438
|
+
sha512: z.ZodString;
|
|
439
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
440
|
+
}, z.core.$strict>;
|
|
441
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
442
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
443
|
+
type: z.ZodLiteral<"theme">;
|
|
444
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
445
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strict>], "type">;
|
|
447
|
+
export type CatalogPluginEntry = z.infer<typeof catalogPluginEntrySchema>;
|
|
448
|
+
export type CatalogThemeEntry = z.infer<typeof catalogThemeEntrySchema>;
|
|
449
|
+
export type CatalogEntry = z.infer<typeof catalogEntrySchema>;
|
|
450
|
+
/**
|
|
451
|
+
* The index versions this package reads.
|
|
452
|
+
*
|
|
453
|
+
* Version 2 adds the fields ADR 0030 lists: `extensionPoints` and `extends`
|
|
454
|
+
* (ADR 0030), `recipients` (ADR 0037) and `deviceRoutes` (ADR 0031). An
|
|
455
|
+
* instance reads both, and the catalog serves version 1, without the entries
|
|
456
|
+
* that need version 2, to instances that have not upgraded.
|
|
457
|
+
*/
|
|
458
|
+
export declare const CATALOG_INDEX_VERSIONS: readonly [1, 2];
|
|
459
|
+
export declare const catalogSchema: z.ZodObject<{
|
|
460
|
+
version: z.ZodLiteral<1 | 2>;
|
|
461
|
+
entries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
462
|
+
id: z.ZodString;
|
|
463
|
+
version: z.ZodString;
|
|
464
|
+
name: z.ZodObject<{
|
|
465
|
+
sv: z.ZodString;
|
|
466
|
+
en: z.ZodString;
|
|
467
|
+
}, z.core.$strict>;
|
|
468
|
+
description: z.ZodObject<{
|
|
469
|
+
sv: z.ZodString;
|
|
470
|
+
en: z.ZodString;
|
|
471
|
+
}, z.core.$strict>;
|
|
472
|
+
artifact: z.ZodObject<{
|
|
473
|
+
url: z.ZodString;
|
|
474
|
+
sha512: z.ZodString;
|
|
475
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
476
|
+
}, z.core.$strict>;
|
|
477
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
478
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
479
|
+
type: z.ZodLiteral<"plugin">;
|
|
480
|
+
packageName: z.ZodString;
|
|
481
|
+
apiVersion: z.ZodInt;
|
|
482
|
+
permissions: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
483
|
+
"addressBook:proposeImport": "addressBook:proposeImport";
|
|
484
|
+
"addressBook:read": "addressBook:read";
|
|
485
|
+
"addressBook:readContact": "addressBook:readContact";
|
|
486
|
+
"addresses:read": "addresses:read";
|
|
487
|
+
"bookings:readAvailability": "bookings:readAvailability";
|
|
488
|
+
"calendar:read": "calendar:read";
|
|
489
|
+
"finances:read": "finances:read";
|
|
490
|
+
"finances:recordDelivery": "finances:recordDelivery";
|
|
491
|
+
"jobs:schedule": "jobs:schedule";
|
|
492
|
+
"mail:send": "mail:send";
|
|
493
|
+
"media:read": "media:read";
|
|
494
|
+
"news:read": "news:read";
|
|
495
|
+
"site:blocks": "site:blocks";
|
|
496
|
+
"sms:send": "sms:send";
|
|
497
|
+
"themes:install": "themes:install";
|
|
498
|
+
}>>>;
|
|
499
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
500
|
+
account: "account";
|
|
501
|
+
apartment: "apartment";
|
|
502
|
+
auditTrail: "auditTrail";
|
|
503
|
+
email: "email";
|
|
504
|
+
financial: "financial";
|
|
505
|
+
freeText: "freeText";
|
|
506
|
+
health: "health";
|
|
507
|
+
name: "name";
|
|
508
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
509
|
+
phone: "phone";
|
|
510
|
+
photograph: "photograph";
|
|
511
|
+
postalAddress: "postalAddress";
|
|
512
|
+
protected: "protected";
|
|
513
|
+
residency: "residency";
|
|
514
|
+
}>>>;
|
|
515
|
+
actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
516
|
+
id: z.ZodString;
|
|
517
|
+
capability: z.ZodString;
|
|
518
|
+
effect: z.ZodEnum<{
|
|
519
|
+
delete: "delete";
|
|
520
|
+
read: "read";
|
|
521
|
+
write: "write";
|
|
522
|
+
}>;
|
|
523
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
524
|
+
account: "account";
|
|
525
|
+
apartment: "apartment";
|
|
526
|
+
auditTrail: "auditTrail";
|
|
527
|
+
email: "email";
|
|
528
|
+
financial: "financial";
|
|
529
|
+
freeText: "freeText";
|
|
530
|
+
health: "health";
|
|
531
|
+
name: "name";
|
|
532
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
533
|
+
phone: "phone";
|
|
534
|
+
photograph: "photograph";
|
|
535
|
+
postalAddress: "postalAddress";
|
|
536
|
+
protected: "protected";
|
|
537
|
+
residency: "residency";
|
|
538
|
+
}>>>;
|
|
539
|
+
surfaces: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
540
|
+
ai: "ai";
|
|
541
|
+
mcp: "mcp";
|
|
542
|
+
ui: "ui";
|
|
543
|
+
}>>>;
|
|
544
|
+
}, z.core.$strict>>>;
|
|
545
|
+
oauthProtectedResource: z.ZodOptional<z.ZodString>;
|
|
546
|
+
extensionPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
547
|
+
id: z.ZodString;
|
|
548
|
+
version: z.ZodInt;
|
|
549
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
550
|
+
account: "account";
|
|
551
|
+
apartment: "apartment";
|
|
552
|
+
auditTrail: "auditTrail";
|
|
553
|
+
email: "email";
|
|
554
|
+
financial: "financial";
|
|
555
|
+
freeText: "freeText";
|
|
556
|
+
health: "health";
|
|
557
|
+
name: "name";
|
|
558
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
559
|
+
phone: "phone";
|
|
560
|
+
photograph: "photograph";
|
|
561
|
+
postalAddress: "postalAddress";
|
|
562
|
+
protected: "protected";
|
|
563
|
+
residency: "residency";
|
|
564
|
+
}>>>;
|
|
565
|
+
title: z.ZodObject<{
|
|
566
|
+
sv: z.ZodString;
|
|
567
|
+
en: z.ZodString;
|
|
568
|
+
}, z.core.$strict>;
|
|
569
|
+
description: z.ZodObject<{
|
|
570
|
+
sv: z.ZodString;
|
|
571
|
+
en: z.ZodString;
|
|
572
|
+
}, z.core.$strict>;
|
|
573
|
+
}, z.core.$strict>>>;
|
|
574
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
575
|
+
plugin: z.ZodString;
|
|
576
|
+
point: z.ZodString;
|
|
577
|
+
version: z.ZodInt;
|
|
578
|
+
personalData: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
579
|
+
account: "account";
|
|
580
|
+
apartment: "apartment";
|
|
581
|
+
auditTrail: "auditTrail";
|
|
582
|
+
email: "email";
|
|
583
|
+
financial: "financial";
|
|
584
|
+
freeText: "freeText";
|
|
585
|
+
health: "health";
|
|
586
|
+
name: "name";
|
|
587
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
588
|
+
phone: "phone";
|
|
589
|
+
photograph: "photograph";
|
|
590
|
+
postalAddress: "postalAddress";
|
|
591
|
+
protected: "protected";
|
|
592
|
+
residency: "residency";
|
|
593
|
+
}>>>;
|
|
594
|
+
}, z.core.$strict>>>;
|
|
595
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
596
|
+
id: z.ZodString;
|
|
597
|
+
origin: z.ZodString;
|
|
598
|
+
purpose: z.ZodObject<{
|
|
599
|
+
sv: z.ZodString;
|
|
600
|
+
en: z.ZodString;
|
|
601
|
+
}, z.core.$strict>;
|
|
602
|
+
personalData: z.ZodArray<z.ZodEnum<{
|
|
603
|
+
account: "account";
|
|
604
|
+
apartment: "apartment";
|
|
605
|
+
auditTrail: "auditTrail";
|
|
606
|
+
email: "email";
|
|
607
|
+
financial: "financial";
|
|
608
|
+
freeText: "freeText";
|
|
609
|
+
health: "health";
|
|
610
|
+
name: "name";
|
|
611
|
+
personalIdentityNumber: "personalIdentityNumber";
|
|
612
|
+
phone: "phone";
|
|
613
|
+
photograph: "photograph";
|
|
614
|
+
postalAddress: "postalAddress";
|
|
615
|
+
protected: "protected";
|
|
616
|
+
residency: "residency";
|
|
617
|
+
}>>;
|
|
618
|
+
}, z.core.$strict>>>;
|
|
619
|
+
deviceRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
620
|
+
id: z.ZodString;
|
|
621
|
+
path: z.ZodString;
|
|
622
|
+
}, z.core.$strict>>>;
|
|
623
|
+
ai: z.ZodDefault<z.ZodBoolean>;
|
|
624
|
+
licence: z.ZodOptional<z.ZodObject<{
|
|
625
|
+
entitlement: z.ZodString;
|
|
626
|
+
issuer: z.ZodObject<{
|
|
627
|
+
name: z.ZodString;
|
|
628
|
+
url: z.ZodString;
|
|
629
|
+
}, z.core.$strict>;
|
|
630
|
+
keys: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
631
|
+
audiences: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
632
|
+
}, z.core.$strict>>;
|
|
633
|
+
released: z.ZodOptional<z.ZodString>;
|
|
634
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
635
|
+
id: z.ZodString;
|
|
636
|
+
version: z.ZodString;
|
|
637
|
+
name: z.ZodObject<{
|
|
638
|
+
sv: z.ZodString;
|
|
639
|
+
en: z.ZodString;
|
|
640
|
+
}, z.core.$strict>;
|
|
641
|
+
description: z.ZodObject<{
|
|
642
|
+
sv: z.ZodString;
|
|
643
|
+
en: z.ZodString;
|
|
644
|
+
}, z.core.$strict>;
|
|
645
|
+
artifact: z.ZodObject<{
|
|
646
|
+
url: z.ZodString;
|
|
647
|
+
sha512: z.ZodString;
|
|
648
|
+
bytes: z.ZodOptional<z.ZodInt>;
|
|
649
|
+
}, z.core.$strict>;
|
|
650
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
651
|
+
deprecated: z.ZodDefault<z.ZodBoolean>;
|
|
652
|
+
type: z.ZodLiteral<"theme">;
|
|
653
|
+
contract: z.ZodOptional<z.ZodString>;
|
|
654
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, z.core.$strict>], "type">>;
|
|
656
|
+
}, z.core.$strict>;
|
|
657
|
+
export type Catalog = z.infer<typeof catalogSchema>;
|
|
658
|
+
/**
|
|
659
|
+
* The refusals of an index that its reader is told in their own language.
|
|
660
|
+
*
|
|
661
|
+
* What the schema says about one entry's field is English for the catalog's
|
|
662
|
+
* curator, who fixes the index from it. These hold one entry against another,
|
|
663
|
+
* an addon against the plugin it extends or against the plugins joined to it,
|
|
664
|
+
* and are the loader's own refusals of the same pair, under the same codes. So
|
|
665
|
+
* the refusal carries its code and the values its sentence is completed with
|
|
666
|
+
* beside the English line, and whoever shows it translates the code.
|
|
667
|
+
*/
|
|
668
|
+
export declare const CATALOG_REFUSALS: readonly ["extension-point-unknown", "extension-version-unsupported", "extension-personal-data-refused", "extension-permission-refused", "extension-host-personal-data-refused", "extension-group-refused"];
|
|
669
|
+
export type CatalogRefusalCode = (typeof CATALOG_REFUSALS)[number];
|
|
670
|
+
/**
|
|
671
|
+
* One refusal of `CATALOG_REFUSALS`: its code, and the refused entry's id as
|
|
672
|
+
* `addon` with the plugin, point and lists its sentence names.
|
|
673
|
+
*/
|
|
674
|
+
export interface CatalogRefusal {
|
|
675
|
+
readonly code: CatalogRefusalCode;
|
|
676
|
+
readonly detail: PluginFindingDetail;
|
|
677
|
+
}
|
|
678
|
+
/** One problem with an index: the English line, and its refusal if it has one. */
|
|
679
|
+
export interface CatalogDiagnostic {
|
|
680
|
+
/** The line, already naming the field. */
|
|
681
|
+
readonly issue: string;
|
|
682
|
+
/** The refusal the line states, or null when it is a field's own problem. */
|
|
683
|
+
readonly refusal: CatalogRefusal | null;
|
|
684
|
+
}
|
|
685
|
+
export type CatalogParseResult = {
|
|
686
|
+
ok: true;
|
|
687
|
+
value: Catalog;
|
|
688
|
+
} | {
|
|
689
|
+
ok: false;
|
|
690
|
+
/** One line per problem, already naming the field. */
|
|
691
|
+
issues: readonly string[];
|
|
692
|
+
/** The same problems, each with its refusal where it has one. */
|
|
693
|
+
diagnostics: readonly CatalogDiagnostic[];
|
|
694
|
+
};
|
|
695
|
+
/**
|
|
696
|
+
* Parses a catalog index.
|
|
697
|
+
*
|
|
698
|
+
* A single malformed entry rejects the whole index rather than being dropped
|
|
699
|
+
* quietly. A board that installs from a catalog which silently lost an entry
|
|
700
|
+
* has no way to tell that from an entry that was delisted on purpose, and the
|
|
701
|
+
* two mean opposite things.
|
|
702
|
+
*
|
|
703
|
+
* Returns a result rather than throwing, as `parsePluginPackage` does, so a
|
|
704
|
+
* catalog's own check can list every problem at once.
|
|
705
|
+
*/
|
|
706
|
+
export declare function parseCatalogIndex(input: unknown): CatalogParseResult;
|
|
707
|
+
//# sourceMappingURL=catalog.d.ts.map
|