openclaw-brokerkit 0.2.1 → 0.3.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.
|
@@ -110,13 +110,89 @@ export const validateBrokerRequest = validate23;
|
|
|
110
110
|
const schema36 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/BrokerRequest", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/BrokerRequest" };
|
|
111
111
|
const schema37 = { "type": "object", "additionalProperties": false, "required": ["id", "revision", "requester", "operation", "status", "requested_at", "requested_duration_seconds", "requested_max_uses", "granted_max_uses", "used_count", "presentation", "allowed_actions"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "revision": { "type": "integer", "minimum": 1 }, "requester": { "type": "string", "minLength": 1, "maxLength": 80 }, "operation": { "type": "string", "minLength": 1, "maxLength": 500 }, "status": { "$ref": "#/$defs/Status" }, "requested_at": { "type": "string", "format": "date-time" }, "pending_expires_at": { "type": "string", "format": "date-time" }, "active_expires_at": { "type": "string", "format": "date-time" }, "requested_duration_seconds": { "type": "integer", "minimum": 1 }, "requested_max_uses": { "type": ["integer", "null"], "minimum": 1 }, "granted_max_uses": { "type": ["integer", "null"], "minimum": 1 }, "used_count": { "type": "integer", "minimum": 0 }, "request_reason": { "type": "string", "maxLength": 2000 }, "decided_at": { "type": "string", "format": "date-time" }, "decided_by": { "type": "string", "maxLength": 200 }, "decided_on_behalf_of": { "type": "string", "maxLength": 200 }, "presentation": { "$ref": "#/$defs/Presentation" }, "presentation_unavailable": { "type": "boolean" }, "allowed_actions": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/Action" } }, "approval_bounds": { "$ref": "#/$defs/ApprovalBounds" } } };
|
|
112
112
|
const schema38 = { "type": "string", "enum": ["pending", "active", "denied", "canceled", "expired", "consumed", "revoked"] };
|
|
113
|
-
const
|
|
114
|
-
const
|
|
113
|
+
const schema44 = { "type": "string", "enum": ["approve", "deny", "revoke"] };
|
|
114
|
+
const schema45 = { "type": "object", "additionalProperties": false, "required": ["max_duration_seconds", "max_uses"], "properties": { "max_duration_seconds": { "type": "integer", "minimum": 1 }, "max_uses": { "type": ["integer", "null"], "minimum": 1 } } };
|
|
115
115
|
const func3 = Object.prototype.hasOwnProperty;
|
|
116
116
|
const func0 = equal;
|
|
117
117
|
const formats0 = formats["date-time"];
|
|
118
|
-
const schema39 = { "type": "object", "additionalProperties": false, "required": ["risk", "title"], "properties": { "risk": { "
|
|
119
|
-
const schema40 = { "type": "
|
|
118
|
+
const schema39 = { "type": "object", "additionalProperties": false, "required": ["risk", "title", "target"], "properties": { "risk": { "$ref": "#/$defs/PresentationRisk" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "summary": { "type": "string", "maxLength": 2000 }, "target": { "type": "string", "minLength": 1, "maxLength": 500 }, "facts": { "type": "array", "maxItems": 20, "items": { "$ref": "#/$defs/Fact" } }, "warnings": { "type": "array", "maxItems": 10, "items": { "$ref": "#/$defs/Warning" } }, "plan_hash": { "type": "string", "maxLength": 128 } } };
|
|
119
|
+
const schema40 = { "type": "string", "enum": ["unknown", "low", "medium", "high", "critical"] };
|
|
120
|
+
const schema41 = { "type": "object", "additionalProperties": false, "required": ["label", "value"], "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 80 }, "value": { "type": "string", "minLength": 1, "maxLength": 500 } } };
|
|
121
|
+
const schema42 = { "type": "object", "additionalProperties": false, "required": ["severity", "text"], "properties": { "severity": { "$ref": "#/$defs/PresentationRisk" }, "text": { "type": "string", "minLength": 1, "maxLength": 500 } } };
|
|
122
|
+
function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate26.evaluated; if (evaluated0.dynamicProps) {
|
|
123
|
+
evaluated0.props = undefined;
|
|
124
|
+
} if (evaluated0.dynamicItems) {
|
|
125
|
+
evaluated0.items = undefined;
|
|
126
|
+
} if (errors === 0) {
|
|
127
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
128
|
+
let missing0;
|
|
129
|
+
if (((data.severity === undefined) && (missing0 = "severity")) || ((data.text === undefined) && (missing0 = "text"))) {
|
|
130
|
+
validate26.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
const _errs1 = errors;
|
|
135
|
+
for (const key0 in data) {
|
|
136
|
+
if (!((key0 === "severity") || (key0 === "text"))) {
|
|
137
|
+
validate26.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
138
|
+
return false;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (_errs1 === errors) {
|
|
143
|
+
if (data.severity !== undefined) {
|
|
144
|
+
let data0 = data.severity;
|
|
145
|
+
const _errs2 = errors;
|
|
146
|
+
if (typeof data0 !== "string") {
|
|
147
|
+
validate26.errors = [{ instancePath: instancePath + "/severity", schemaPath: "#/$defs/PresentationRisk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
if (!(((((data0 === "unknown") || (data0 === "low")) || (data0 === "medium")) || (data0 === "high")) || (data0 === "critical"))) {
|
|
151
|
+
validate26.errors = [{ instancePath: instancePath + "/severity", schemaPath: "#/$defs/PresentationRisk/enum", keyword: "enum", params: { allowedValues: schema40.enum }, message: "must be equal to one of the allowed values" }];
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
var valid0 = _errs2 === errors;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
var valid0 = true;
|
|
158
|
+
}
|
|
159
|
+
if (valid0) {
|
|
160
|
+
if (data.text !== undefined) {
|
|
161
|
+
let data1 = data.text;
|
|
162
|
+
const _errs5 = errors;
|
|
163
|
+
if (errors === _errs5) {
|
|
164
|
+
if (typeof data1 === "string") {
|
|
165
|
+
if (func1(data1) > 500) {
|
|
166
|
+
validate26.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
if (func1(data1) < 1) {
|
|
171
|
+
validate26.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
validate26.errors = [{ instancePath: instancePath + "/text", schemaPath: "#/properties/text/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
var valid0 = _errs5 === errors;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
var valid0 = true;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
validate26.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
} validate26.errors = vErrors; return errors === 0; }
|
|
195
|
+
validate26.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
120
196
|
function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate25.evaluated; if (evaluated0.dynamicProps) {
|
|
121
197
|
evaluated0.props = undefined;
|
|
122
198
|
} if (evaluated0.dynamicItems) {
|
|
@@ -124,14 +200,14 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
124
200
|
} if (errors === 0) {
|
|
125
201
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
126
202
|
let missing0;
|
|
127
|
-
if (((data.risk === undefined) && (missing0 = "risk")) || ((data.title === undefined) && (missing0 = "title"))) {
|
|
203
|
+
if ((((data.risk === undefined) && (missing0 = "risk")) || ((data.title === undefined) && (missing0 = "title"))) || ((data.target === undefined) && (missing0 = "target"))) {
|
|
128
204
|
validate25.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
129
205
|
return false;
|
|
130
206
|
}
|
|
131
207
|
else {
|
|
132
208
|
const _errs1 = errors;
|
|
133
209
|
for (const key0 in data) {
|
|
134
|
-
if (!((((key0 === "risk") || (key0 === "title")) || (key0 === "summary")) || (key0 === "facts"))) {
|
|
210
|
+
if (!(((((((key0 === "risk") || (key0 === "title")) || (key0 === "summary")) || (key0 === "target")) || (key0 === "facts")) || (key0 === "warnings")) || (key0 === "plan_hash"))) {
|
|
135
211
|
validate25.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
136
212
|
return false;
|
|
137
213
|
break;
|
|
@@ -142,11 +218,11 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
142
218
|
let data0 = data.risk;
|
|
143
219
|
const _errs2 = errors;
|
|
144
220
|
if (typeof data0 !== "string") {
|
|
145
|
-
validate25.errors = [{ instancePath: instancePath + "/risk", schemaPath: "
|
|
221
|
+
validate25.errors = [{ instancePath: instancePath + "/risk", schemaPath: "#/$defs/PresentationRisk/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
146
222
|
return false;
|
|
147
223
|
}
|
|
148
224
|
if (!(((((data0 === "unknown") || (data0 === "low")) || (data0 === "medium")) || (data0 === "high")) || (data0 === "critical"))) {
|
|
149
|
-
validate25.errors = [{ instancePath: instancePath + "/risk", schemaPath: "
|
|
225
|
+
validate25.errors = [{ instancePath: instancePath + "/risk", schemaPath: "#/$defs/PresentationRisk/enum", keyword: "enum", params: { allowedValues: schema40.enum }, message: "must be equal to one of the allowed values" }];
|
|
150
226
|
return false;
|
|
151
227
|
}
|
|
152
228
|
var valid0 = _errs2 === errors;
|
|
@@ -157,8 +233,8 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
157
233
|
if (valid0) {
|
|
158
234
|
if (data.title !== undefined) {
|
|
159
235
|
let data1 = data.title;
|
|
160
|
-
const
|
|
161
|
-
if (errors ===
|
|
236
|
+
const _errs5 = errors;
|
|
237
|
+
if (errors === _errs5) {
|
|
162
238
|
if (typeof data1 === "string") {
|
|
163
239
|
if (func1(data1) > 200) {
|
|
164
240
|
validate25.errors = [{ instancePath: instancePath + "/title", schemaPath: "#/properties/title/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
@@ -176,7 +252,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
176
252
|
return false;
|
|
177
253
|
}
|
|
178
254
|
}
|
|
179
|
-
var valid0 =
|
|
255
|
+
var valid0 = _errs5 === errors;
|
|
180
256
|
}
|
|
181
257
|
else {
|
|
182
258
|
var valid0 = true;
|
|
@@ -184,8 +260,8 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
184
260
|
if (valid0) {
|
|
185
261
|
if (data.summary !== undefined) {
|
|
186
262
|
let data2 = data.summary;
|
|
187
|
-
const
|
|
188
|
-
if (errors ===
|
|
263
|
+
const _errs7 = errors;
|
|
264
|
+
if (errors === _errs7) {
|
|
189
265
|
if (typeof data2 === "string") {
|
|
190
266
|
if (func1(data2) > 2000) {
|
|
191
267
|
validate25.errors = [{ instancePath: instancePath + "/summary", schemaPath: "#/properties/summary/maxLength", keyword: "maxLength", params: { limit: 2000 }, message: "must NOT have more than 2000 characters" }];
|
|
@@ -197,123 +273,210 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
197
273
|
return false;
|
|
198
274
|
}
|
|
199
275
|
}
|
|
200
|
-
var valid0 =
|
|
276
|
+
var valid0 = _errs7 === errors;
|
|
201
277
|
}
|
|
202
278
|
else {
|
|
203
279
|
var valid0 = true;
|
|
204
280
|
}
|
|
205
281
|
if (valid0) {
|
|
206
|
-
if (data.
|
|
207
|
-
let data3 = data.
|
|
208
|
-
const
|
|
209
|
-
if (errors ===
|
|
210
|
-
if (
|
|
211
|
-
if (data3
|
|
212
|
-
validate25.errors = [{ instancePath: instancePath + "/
|
|
282
|
+
if (data.target !== undefined) {
|
|
283
|
+
let data3 = data.target;
|
|
284
|
+
const _errs9 = errors;
|
|
285
|
+
if (errors === _errs9) {
|
|
286
|
+
if (typeof data3 === "string") {
|
|
287
|
+
if (func1(data3) > 500) {
|
|
288
|
+
validate25.errors = [{ instancePath: instancePath + "/target", schemaPath: "#/properties/target/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
|
|
213
289
|
return false;
|
|
214
290
|
}
|
|
215
291
|
else {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
292
|
+
if (func1(data3) < 1) {
|
|
293
|
+
validate25.errors = [{ instancePath: instancePath + "/target", schemaPath: "#/properties/target/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
validate25.errors = [{ instancePath: instancePath + "/target", schemaPath: "#/properties/target/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
var valid0 = _errs9 === errors;
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
var valid0 = true;
|
|
307
|
+
}
|
|
308
|
+
if (valid0) {
|
|
309
|
+
if (data.facts !== undefined) {
|
|
310
|
+
let data4 = data.facts;
|
|
311
|
+
const _errs11 = errors;
|
|
312
|
+
if (errors === _errs11) {
|
|
313
|
+
if (Array.isArray(data4)) {
|
|
314
|
+
if (data4.length > 20) {
|
|
315
|
+
validate25.errors = [{ instancePath: instancePath + "/facts", schemaPath: "#/properties/facts/maxItems", keyword: "maxItems", params: { limit: 20 }, message: "must NOT have more than 20 items" }];
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
var valid2 = true;
|
|
320
|
+
const len0 = data4.length;
|
|
321
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
322
|
+
let data5 = data4[i0];
|
|
323
|
+
const _errs13 = errors;
|
|
324
|
+
const _errs14 = errors;
|
|
325
|
+
if (errors === _errs14) {
|
|
326
|
+
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
327
|
+
let missing1;
|
|
328
|
+
if (((data5.label === undefined) && (missing1 = "label")) || ((data5.value === undefined) && (missing1 = "value"))) {
|
|
329
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0, schemaPath: "#/$defs/Fact/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
330
|
+
return false;
|
|
237
331
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/maxLength", keyword: "maxLength", params: { limit: 80 }, message: "must NOT have more than 80 characters" }];
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
if (func1(data5) < 1) {
|
|
250
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
332
|
+
else {
|
|
333
|
+
const _errs16 = errors;
|
|
334
|
+
for (const key1 in data5) {
|
|
335
|
+
if (!((key1 === "label") || (key1 === "value"))) {
|
|
336
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0, schemaPath: "#/$defs/Fact/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
337
|
+
return false;
|
|
338
|
+
break;
|
|
259
339
|
}
|
|
260
|
-
var valid3 = _errs14 === errors;
|
|
261
340
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
let data6 = data4.value;
|
|
268
|
-
const _errs16 = errors;
|
|
269
|
-
if (errors === _errs16) {
|
|
341
|
+
if (_errs16 === errors) {
|
|
342
|
+
if (data5.label !== undefined) {
|
|
343
|
+
let data6 = data5.label;
|
|
344
|
+
const _errs17 = errors;
|
|
345
|
+
if (errors === _errs17) {
|
|
270
346
|
if (typeof data6 === "string") {
|
|
271
|
-
if (func1(data6) >
|
|
272
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/
|
|
347
|
+
if (func1(data6) > 80) {
|
|
348
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/maxLength", keyword: "maxLength", params: { limit: 80 }, message: "must NOT have more than 80 characters" }];
|
|
273
349
|
return false;
|
|
274
350
|
}
|
|
275
351
|
else {
|
|
276
352
|
if (func1(data6) < 1) {
|
|
277
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/
|
|
353
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
278
354
|
return false;
|
|
279
355
|
}
|
|
280
356
|
}
|
|
281
357
|
}
|
|
282
358
|
else {
|
|
283
|
-
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/
|
|
359
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/label", schemaPath: "#/$defs/Fact/properties/label/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
284
360
|
return false;
|
|
285
361
|
}
|
|
286
362
|
}
|
|
287
|
-
var
|
|
363
|
+
var valid4 = _errs17 === errors;
|
|
288
364
|
}
|
|
289
365
|
else {
|
|
290
|
-
var
|
|
366
|
+
var valid4 = true;
|
|
367
|
+
}
|
|
368
|
+
if (valid4) {
|
|
369
|
+
if (data5.value !== undefined) {
|
|
370
|
+
let data7 = data5.value;
|
|
371
|
+
const _errs19 = errors;
|
|
372
|
+
if (errors === _errs19) {
|
|
373
|
+
if (typeof data7 === "string") {
|
|
374
|
+
if (func1(data7) > 500) {
|
|
375
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/value", schemaPath: "#/$defs/Fact/properties/value/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
if (func1(data7) < 1) {
|
|
380
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/value", schemaPath: "#/$defs/Fact/properties/value/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0 + "/value", schemaPath: "#/$defs/Fact/properties/value/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
var valid4 = _errs19 === errors;
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
var valid4 = true;
|
|
394
|
+
}
|
|
291
395
|
}
|
|
292
396
|
}
|
|
293
397
|
}
|
|
294
398
|
}
|
|
399
|
+
else {
|
|
400
|
+
validate25.errors = [{ instancePath: instancePath + "/facts/" + i0, schemaPath: "#/$defs/Fact/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
295
403
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
404
|
+
var valid2 = _errs13 === errors;
|
|
405
|
+
if (!valid2) {
|
|
406
|
+
break;
|
|
299
407
|
}
|
|
300
408
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
validate25.errors = [{ instancePath: instancePath + "/facts", schemaPath: "#/properties/facts/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
var valid0 = _errs11 === errors;
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
var valid0 = true;
|
|
420
|
+
}
|
|
421
|
+
if (valid0) {
|
|
422
|
+
if (data.warnings !== undefined) {
|
|
423
|
+
let data8 = data.warnings;
|
|
424
|
+
const _errs21 = errors;
|
|
425
|
+
if (errors === _errs21) {
|
|
426
|
+
if (Array.isArray(data8)) {
|
|
427
|
+
if (data8.length > 10) {
|
|
428
|
+
validate25.errors = [{ instancePath: instancePath + "/warnings", schemaPath: "#/properties/warnings/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" }];
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
var valid5 = true;
|
|
433
|
+
const len1 = data8.length;
|
|
434
|
+
for (let i1 = 0; i1 < len1; i1++) {
|
|
435
|
+
const _errs23 = errors;
|
|
436
|
+
if (!(validate26(data8[i1], { instancePath: instancePath + "/warnings/" + i1, parentData: data8, parentDataProperty: i1, rootData, dynamicAnchors }))) {
|
|
437
|
+
vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
|
|
438
|
+
errors = vErrors.length;
|
|
439
|
+
}
|
|
440
|
+
var valid5 = _errs23 === errors;
|
|
441
|
+
if (!valid5) {
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
304
445
|
}
|
|
305
446
|
}
|
|
447
|
+
else {
|
|
448
|
+
validate25.errors = [{ instancePath: instancePath + "/warnings", schemaPath: "#/properties/warnings/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
306
451
|
}
|
|
452
|
+
var valid0 = _errs21 === errors;
|
|
307
453
|
}
|
|
308
454
|
else {
|
|
309
|
-
|
|
310
|
-
|
|
455
|
+
var valid0 = true;
|
|
456
|
+
}
|
|
457
|
+
if (valid0) {
|
|
458
|
+
if (data.plan_hash !== undefined) {
|
|
459
|
+
let data10 = data.plan_hash;
|
|
460
|
+
const _errs24 = errors;
|
|
461
|
+
if (errors === _errs24) {
|
|
462
|
+
if (typeof data10 === "string") {
|
|
463
|
+
if (func1(data10) > 128) {
|
|
464
|
+
validate25.errors = [{ instancePath: instancePath + "/plan_hash", schemaPath: "#/properties/plan_hash/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
validate25.errors = [{ instancePath: instancePath + "/plan_hash", schemaPath: "#/properties/plan_hash/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
var valid0 = _errs24 === errors;
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
var valid0 = true;
|
|
477
|
+
}
|
|
311
478
|
}
|
|
312
479
|
}
|
|
313
|
-
var valid0 = _errs8 === errors;
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
var valid0 = true;
|
|
317
480
|
}
|
|
318
481
|
}
|
|
319
482
|
}
|
|
@@ -745,7 +908,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
745
908
|
return false;
|
|
746
909
|
}
|
|
747
910
|
if (!(((data19 === "approve") || (data19 === "deny")) || (data19 === "revoke"))) {
|
|
748
|
-
validate24.errors = [{ instancePath: instancePath + "/allowed_actions/" + i0, schemaPath: "#/$defs/Action/enum", keyword: "enum", params: { allowedValues:
|
|
911
|
+
validate24.errors = [{ instancePath: instancePath + "/allowed_actions/" + i0, schemaPath: "#/$defs/Action/enum", keyword: "enum", params: { allowedValues: schema44.enum }, message: "must be equal to one of the allowed values" }];
|
|
749
912
|
return false;
|
|
750
913
|
}
|
|
751
914
|
var valid2 = _errs40 === errors;
|
|
@@ -826,7 +989,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
826
989
|
let data22 = data20.max_uses;
|
|
827
990
|
const _errs49 = errors;
|
|
828
991
|
if ((!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))) && (data22 !== null)) {
|
|
829
|
-
validate24.errors = [{ instancePath: instancePath + "/approval_bounds/max_uses", schemaPath: "#/$defs/ApprovalBounds/properties/max_uses/type", keyword: "type", params: { type:
|
|
992
|
+
validate24.errors = [{ instancePath: instancePath + "/approval_bounds/max_uses", schemaPath: "#/$defs/ApprovalBounds/properties/max_uses/type", keyword: "type", params: { type: schema45.properties.max_uses.type }, message: "must be integer,null" }];
|
|
830
993
|
return false;
|
|
831
994
|
}
|
|
832
995
|
if (errors === _errs49) {
|
|
@@ -893,10 +1056,10 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
893
1056
|
errors = vErrors.length;
|
|
894
1057
|
} validate23.errors = vErrors; return errors === 0; }
|
|
895
1058
|
validate23.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
896
|
-
export const validateRequestPage =
|
|
897
|
-
const
|
|
898
|
-
const
|
|
899
|
-
function
|
|
1059
|
+
export const validateRequestPage = validate30;
|
|
1060
|
+
const schema46 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/RequestPage", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/RequestPage" };
|
|
1061
|
+
const schema47 = { "type": "object", "additionalProperties": false, "required": ["requests"], "properties": { "requests": { "type": "array", "maxItems": 100, "items": { "$ref": "#/$defs/BrokerRequest" } }, "next_cursor": { "type": "string", "maxLength": 1024 }, "event_cursor": { "type": "string", "maxLength": 1024 } } };
|
|
1062
|
+
function validate32(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate32.evaluated; if (evaluated0.dynamicProps) {
|
|
900
1063
|
evaluated0.props = undefined;
|
|
901
1064
|
} if (evaluated0.dynamicItems) {
|
|
902
1065
|
evaluated0.items = undefined;
|
|
@@ -904,14 +1067,14 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
904
1067
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
905
1068
|
let missing0;
|
|
906
1069
|
if (((((((((((((data.id === undefined) && (missing0 = "id")) || ((data.revision === undefined) && (missing0 = "revision"))) || ((data.requester === undefined) && (missing0 = "requester"))) || ((data.operation === undefined) && (missing0 = "operation"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.requested_at === undefined) && (missing0 = "requested_at"))) || ((data.requested_duration_seconds === undefined) && (missing0 = "requested_duration_seconds"))) || ((data.requested_max_uses === undefined) && (missing0 = "requested_max_uses"))) || ((data.granted_max_uses === undefined) && (missing0 = "granted_max_uses"))) || ((data.used_count === undefined) && (missing0 = "used_count"))) || ((data.presentation === undefined) && (missing0 = "presentation"))) || ((data.allowed_actions === undefined) && (missing0 = "allowed_actions"))) {
|
|
907
|
-
|
|
1070
|
+
validate32.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
908
1071
|
return false;
|
|
909
1072
|
}
|
|
910
1073
|
else {
|
|
911
1074
|
const _errs1 = errors;
|
|
912
1075
|
for (const key0 in data) {
|
|
913
1076
|
if (!(func3.call(schema37.properties, key0))) {
|
|
914
|
-
|
|
1077
|
+
validate32.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
915
1078
|
return false;
|
|
916
1079
|
break;
|
|
917
1080
|
}
|
|
@@ -923,18 +1086,18 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
923
1086
|
if (errors === _errs2) {
|
|
924
1087
|
if (typeof data0 === "string") {
|
|
925
1088
|
if (func1(data0) > 128) {
|
|
926
|
-
|
|
1089
|
+
validate32.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
927
1090
|
return false;
|
|
928
1091
|
}
|
|
929
1092
|
else {
|
|
930
1093
|
if (func1(data0) < 1) {
|
|
931
|
-
|
|
1094
|
+
validate32.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
932
1095
|
return false;
|
|
933
1096
|
}
|
|
934
1097
|
}
|
|
935
1098
|
}
|
|
936
1099
|
else {
|
|
937
|
-
|
|
1100
|
+
validate32.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
938
1101
|
return false;
|
|
939
1102
|
}
|
|
940
1103
|
}
|
|
@@ -948,13 +1111,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
948
1111
|
let data1 = data.revision;
|
|
949
1112
|
const _errs4 = errors;
|
|
950
1113
|
if (!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))) {
|
|
951
|
-
|
|
1114
|
+
validate32.errors = [{ instancePath: instancePath + "/revision", schemaPath: "#/properties/revision/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
952
1115
|
return false;
|
|
953
1116
|
}
|
|
954
1117
|
if (errors === _errs4) {
|
|
955
1118
|
if ((typeof data1 == "number") && (isFinite(data1))) {
|
|
956
1119
|
if (data1 < 1 || isNaN(data1)) {
|
|
957
|
-
|
|
1120
|
+
validate32.errors = [{ instancePath: instancePath + "/revision", schemaPath: "#/properties/revision/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
958
1121
|
return false;
|
|
959
1122
|
}
|
|
960
1123
|
}
|
|
@@ -971,18 +1134,18 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
971
1134
|
if (errors === _errs6) {
|
|
972
1135
|
if (typeof data2 === "string") {
|
|
973
1136
|
if (func1(data2) > 80) {
|
|
974
|
-
|
|
1137
|
+
validate32.errors = [{ instancePath: instancePath + "/requester", schemaPath: "#/properties/requester/maxLength", keyword: "maxLength", params: { limit: 80 }, message: "must NOT have more than 80 characters" }];
|
|
975
1138
|
return false;
|
|
976
1139
|
}
|
|
977
1140
|
else {
|
|
978
1141
|
if (func1(data2) < 1) {
|
|
979
|
-
|
|
1142
|
+
validate32.errors = [{ instancePath: instancePath + "/requester", schemaPath: "#/properties/requester/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
980
1143
|
return false;
|
|
981
1144
|
}
|
|
982
1145
|
}
|
|
983
1146
|
}
|
|
984
1147
|
else {
|
|
985
|
-
|
|
1148
|
+
validate32.errors = [{ instancePath: instancePath + "/requester", schemaPath: "#/properties/requester/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
986
1149
|
return false;
|
|
987
1150
|
}
|
|
988
1151
|
}
|
|
@@ -998,18 +1161,18 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
998
1161
|
if (errors === _errs8) {
|
|
999
1162
|
if (typeof data3 === "string") {
|
|
1000
1163
|
if (func1(data3) > 500) {
|
|
1001
|
-
|
|
1164
|
+
validate32.errors = [{ instancePath: instancePath + "/operation", schemaPath: "#/properties/operation/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
|
|
1002
1165
|
return false;
|
|
1003
1166
|
}
|
|
1004
1167
|
else {
|
|
1005
1168
|
if (func1(data3) < 1) {
|
|
1006
|
-
|
|
1169
|
+
validate32.errors = [{ instancePath: instancePath + "/operation", schemaPath: "#/properties/operation/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1007
1170
|
return false;
|
|
1008
1171
|
}
|
|
1009
1172
|
}
|
|
1010
1173
|
}
|
|
1011
1174
|
else {
|
|
1012
|
-
|
|
1175
|
+
validate32.errors = [{ instancePath: instancePath + "/operation", schemaPath: "#/properties/operation/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1013
1176
|
return false;
|
|
1014
1177
|
}
|
|
1015
1178
|
}
|
|
@@ -1023,11 +1186,11 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1023
1186
|
let data4 = data.status;
|
|
1024
1187
|
const _errs10 = errors;
|
|
1025
1188
|
if (typeof data4 !== "string") {
|
|
1026
|
-
|
|
1189
|
+
validate32.errors = [{ instancePath: instancePath + "/status", schemaPath: "#/$defs/Status/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1027
1190
|
return false;
|
|
1028
1191
|
}
|
|
1029
1192
|
if (!(((((((data4 === "pending") || (data4 === "active")) || (data4 === "denied")) || (data4 === "canceled")) || (data4 === "expired")) || (data4 === "consumed")) || (data4 === "revoked"))) {
|
|
1030
|
-
|
|
1193
|
+
validate32.errors = [{ instancePath: instancePath + "/status", schemaPath: "#/$defs/Status/enum", keyword: "enum", params: { allowedValues: schema38.enum }, message: "must be equal to one of the allowed values" }];
|
|
1031
1194
|
return false;
|
|
1032
1195
|
}
|
|
1033
1196
|
var valid0 = _errs10 === errors;
|
|
@@ -1043,12 +1206,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1043
1206
|
if (errors === _errs13) {
|
|
1044
1207
|
if (typeof data5 === "string") {
|
|
1045
1208
|
if (!(formats0.validate(data5))) {
|
|
1046
|
-
|
|
1209
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_at", schemaPath: "#/properties/requested_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
1047
1210
|
return false;
|
|
1048
1211
|
}
|
|
1049
1212
|
}
|
|
1050
1213
|
else {
|
|
1051
|
-
|
|
1214
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_at", schemaPath: "#/properties/requested_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1052
1215
|
return false;
|
|
1053
1216
|
}
|
|
1054
1217
|
}
|
|
@@ -1066,12 +1229,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1066
1229
|
if (errors === _errs15) {
|
|
1067
1230
|
if (typeof data6 === "string") {
|
|
1068
1231
|
if (!(formats0.validate(data6))) {
|
|
1069
|
-
|
|
1232
|
+
validate32.errors = [{ instancePath: instancePath + "/pending_expires_at", schemaPath: "#/properties/pending_expires_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
1070
1233
|
return false;
|
|
1071
1234
|
}
|
|
1072
1235
|
}
|
|
1073
1236
|
else {
|
|
1074
|
-
|
|
1237
|
+
validate32.errors = [{ instancePath: instancePath + "/pending_expires_at", schemaPath: "#/properties/pending_expires_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1075
1238
|
return false;
|
|
1076
1239
|
}
|
|
1077
1240
|
}
|
|
@@ -1089,12 +1252,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1089
1252
|
if (errors === _errs17) {
|
|
1090
1253
|
if (typeof data7 === "string") {
|
|
1091
1254
|
if (!(formats0.validate(data7))) {
|
|
1092
|
-
|
|
1255
|
+
validate32.errors = [{ instancePath: instancePath + "/active_expires_at", schemaPath: "#/properties/active_expires_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
1093
1256
|
return false;
|
|
1094
1257
|
}
|
|
1095
1258
|
}
|
|
1096
1259
|
else {
|
|
1097
|
-
|
|
1260
|
+
validate32.errors = [{ instancePath: instancePath + "/active_expires_at", schemaPath: "#/properties/active_expires_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1098
1261
|
return false;
|
|
1099
1262
|
}
|
|
1100
1263
|
}
|
|
@@ -1109,13 +1272,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1109
1272
|
let data8 = data.requested_duration_seconds;
|
|
1110
1273
|
const _errs19 = errors;
|
|
1111
1274
|
if (!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))) {
|
|
1112
|
-
|
|
1275
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_duration_seconds", schemaPath: "#/properties/requested_duration_seconds/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
1113
1276
|
return false;
|
|
1114
1277
|
}
|
|
1115
1278
|
if (errors === _errs19) {
|
|
1116
1279
|
if ((typeof data8 == "number") && (isFinite(data8))) {
|
|
1117
1280
|
if (data8 < 1 || isNaN(data8)) {
|
|
1118
|
-
|
|
1281
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_duration_seconds", schemaPath: "#/properties/requested_duration_seconds/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1119
1282
|
return false;
|
|
1120
1283
|
}
|
|
1121
1284
|
}
|
|
@@ -1130,13 +1293,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1130
1293
|
let data9 = data.requested_max_uses;
|
|
1131
1294
|
const _errs21 = errors;
|
|
1132
1295
|
if ((!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))) && (data9 !== null)) {
|
|
1133
|
-
|
|
1296
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_max_uses", schemaPath: "#/properties/requested_max_uses/type", keyword: "type", params: { type: schema37.properties.requested_max_uses.type }, message: "must be integer,null" }];
|
|
1134
1297
|
return false;
|
|
1135
1298
|
}
|
|
1136
1299
|
if (errors === _errs21) {
|
|
1137
1300
|
if ((typeof data9 == "number") && (isFinite(data9))) {
|
|
1138
1301
|
if (data9 < 1 || isNaN(data9)) {
|
|
1139
|
-
|
|
1302
|
+
validate32.errors = [{ instancePath: instancePath + "/requested_max_uses", schemaPath: "#/properties/requested_max_uses/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1140
1303
|
return false;
|
|
1141
1304
|
}
|
|
1142
1305
|
}
|
|
@@ -1151,13 +1314,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1151
1314
|
let data10 = data.granted_max_uses;
|
|
1152
1315
|
const _errs23 = errors;
|
|
1153
1316
|
if ((!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))) && (data10 !== null)) {
|
|
1154
|
-
|
|
1317
|
+
validate32.errors = [{ instancePath: instancePath + "/granted_max_uses", schemaPath: "#/properties/granted_max_uses/type", keyword: "type", params: { type: schema37.properties.granted_max_uses.type }, message: "must be integer,null" }];
|
|
1155
1318
|
return false;
|
|
1156
1319
|
}
|
|
1157
1320
|
if (errors === _errs23) {
|
|
1158
1321
|
if ((typeof data10 == "number") && (isFinite(data10))) {
|
|
1159
1322
|
if (data10 < 1 || isNaN(data10)) {
|
|
1160
|
-
|
|
1323
|
+
validate32.errors = [{ instancePath: instancePath + "/granted_max_uses", schemaPath: "#/properties/granted_max_uses/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1161
1324
|
return false;
|
|
1162
1325
|
}
|
|
1163
1326
|
}
|
|
@@ -1172,13 +1335,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1172
1335
|
let data11 = data.used_count;
|
|
1173
1336
|
const _errs25 = errors;
|
|
1174
1337
|
if (!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))) {
|
|
1175
|
-
|
|
1338
|
+
validate32.errors = [{ instancePath: instancePath + "/used_count", schemaPath: "#/properties/used_count/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
1176
1339
|
return false;
|
|
1177
1340
|
}
|
|
1178
1341
|
if (errors === _errs25) {
|
|
1179
1342
|
if ((typeof data11 == "number") && (isFinite(data11))) {
|
|
1180
1343
|
if (data11 < 0 || isNaN(data11)) {
|
|
1181
|
-
|
|
1344
|
+
validate32.errors = [{ instancePath: instancePath + "/used_count", schemaPath: "#/properties/used_count/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
1182
1345
|
return false;
|
|
1183
1346
|
}
|
|
1184
1347
|
}
|
|
@@ -1195,12 +1358,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1195
1358
|
if (errors === _errs27) {
|
|
1196
1359
|
if (typeof data12 === "string") {
|
|
1197
1360
|
if (func1(data12) > 2000) {
|
|
1198
|
-
|
|
1361
|
+
validate32.errors = [{ instancePath: instancePath + "/request_reason", schemaPath: "#/properties/request_reason/maxLength", keyword: "maxLength", params: { limit: 2000 }, message: "must NOT have more than 2000 characters" }];
|
|
1199
1362
|
return false;
|
|
1200
1363
|
}
|
|
1201
1364
|
}
|
|
1202
1365
|
else {
|
|
1203
|
-
|
|
1366
|
+
validate32.errors = [{ instancePath: instancePath + "/request_reason", schemaPath: "#/properties/request_reason/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1204
1367
|
return false;
|
|
1205
1368
|
}
|
|
1206
1369
|
}
|
|
@@ -1217,12 +1380,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1217
1380
|
if (errors === _errs29) {
|
|
1218
1381
|
if (typeof data13 === "string") {
|
|
1219
1382
|
if (!(formats0.validate(data13))) {
|
|
1220
|
-
|
|
1383
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_at", schemaPath: "#/properties/decided_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
1221
1384
|
return false;
|
|
1222
1385
|
}
|
|
1223
1386
|
}
|
|
1224
1387
|
else {
|
|
1225
|
-
|
|
1388
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_at", schemaPath: "#/properties/decided_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1226
1389
|
return false;
|
|
1227
1390
|
}
|
|
1228
1391
|
}
|
|
@@ -1239,12 +1402,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1239
1402
|
if (errors === _errs31) {
|
|
1240
1403
|
if (typeof data14 === "string") {
|
|
1241
1404
|
if (func1(data14) > 200) {
|
|
1242
|
-
|
|
1405
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_by", schemaPath: "#/properties/decided_by/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
1243
1406
|
return false;
|
|
1244
1407
|
}
|
|
1245
1408
|
}
|
|
1246
1409
|
else {
|
|
1247
|
-
|
|
1410
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_by", schemaPath: "#/properties/decided_by/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1248
1411
|
return false;
|
|
1249
1412
|
}
|
|
1250
1413
|
}
|
|
@@ -1260,12 +1423,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1260
1423
|
if (errors === _errs33) {
|
|
1261
1424
|
if (typeof data15 === "string") {
|
|
1262
1425
|
if (func1(data15) > 200) {
|
|
1263
|
-
|
|
1426
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_on_behalf_of", schemaPath: "#/properties/decided_on_behalf_of/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
1264
1427
|
return false;
|
|
1265
1428
|
}
|
|
1266
1429
|
}
|
|
1267
1430
|
else {
|
|
1268
|
-
|
|
1431
|
+
validate32.errors = [{ instancePath: instancePath + "/decided_on_behalf_of", schemaPath: "#/properties/decided_on_behalf_of/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1269
1432
|
return false;
|
|
1270
1433
|
}
|
|
1271
1434
|
}
|
|
@@ -1290,7 +1453,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1290
1453
|
if (data.presentation_unavailable !== undefined) {
|
|
1291
1454
|
const _errs36 = errors;
|
|
1292
1455
|
if (typeof data.presentation_unavailable !== "boolean") {
|
|
1293
|
-
|
|
1456
|
+
validate32.errors = [{ instancePath: instancePath + "/presentation_unavailable", schemaPath: "#/properties/presentation_unavailable/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
1294
1457
|
return false;
|
|
1295
1458
|
}
|
|
1296
1459
|
var valid0 = _errs36 === errors;
|
|
@@ -1310,11 +1473,11 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1310
1473
|
let data19 = data18[i0];
|
|
1311
1474
|
const _errs40 = errors;
|
|
1312
1475
|
if (typeof data19 !== "string") {
|
|
1313
|
-
|
|
1476
|
+
validate32.errors = [{ instancePath: instancePath + "/allowed_actions/" + i0, schemaPath: "#/$defs/Action/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1314
1477
|
return false;
|
|
1315
1478
|
}
|
|
1316
1479
|
if (!(((data19 === "approve") || (data19 === "deny")) || (data19 === "revoke"))) {
|
|
1317
|
-
|
|
1480
|
+
validate32.errors = [{ instancePath: instancePath + "/allowed_actions/" + i0, schemaPath: "#/$defs/Action/enum", keyword: "enum", params: { allowedValues: schema44.enum }, message: "must be equal to one of the allowed values" }];
|
|
1318
1481
|
return false;
|
|
1319
1482
|
}
|
|
1320
1483
|
var valid2 = _errs40 === errors;
|
|
@@ -1329,7 +1492,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1329
1492
|
outer0: for (; i1--;) {
|
|
1330
1493
|
for (j0 = i1; j0--;) {
|
|
1331
1494
|
if (func0(data18[i1], data18[j0])) {
|
|
1332
|
-
|
|
1495
|
+
validate32.errors = [{ instancePath: instancePath + "/allowed_actions", schemaPath: "#/properties/allowed_actions/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
1333
1496
|
return false;
|
|
1334
1497
|
break outer0;
|
|
1335
1498
|
}
|
|
@@ -1339,7 +1502,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1339
1502
|
}
|
|
1340
1503
|
}
|
|
1341
1504
|
else {
|
|
1342
|
-
|
|
1505
|
+
validate32.errors = [{ instancePath: instancePath + "/allowed_actions", schemaPath: "#/properties/allowed_actions/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
1343
1506
|
return false;
|
|
1344
1507
|
}
|
|
1345
1508
|
}
|
|
@@ -1357,14 +1520,14 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1357
1520
|
if (data20 && typeof data20 == "object" && !Array.isArray(data20)) {
|
|
1358
1521
|
let missing1;
|
|
1359
1522
|
if (((data20.max_duration_seconds === undefined) && (missing1 = "max_duration_seconds")) || ((data20.max_uses === undefined) && (missing1 = "max_uses"))) {
|
|
1360
|
-
|
|
1523
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds", schemaPath: "#/$defs/ApprovalBounds/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
1361
1524
|
return false;
|
|
1362
1525
|
}
|
|
1363
1526
|
else {
|
|
1364
1527
|
const _errs46 = errors;
|
|
1365
1528
|
for (const key1 in data20) {
|
|
1366
1529
|
if (!((key1 === "max_duration_seconds") || (key1 === "max_uses"))) {
|
|
1367
|
-
|
|
1530
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds", schemaPath: "#/$defs/ApprovalBounds/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
1368
1531
|
return false;
|
|
1369
1532
|
break;
|
|
1370
1533
|
}
|
|
@@ -1374,13 +1537,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1374
1537
|
let data21 = data20.max_duration_seconds;
|
|
1375
1538
|
const _errs47 = errors;
|
|
1376
1539
|
if (!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))) {
|
|
1377
|
-
|
|
1540
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds/max_duration_seconds", schemaPath: "#/$defs/ApprovalBounds/properties/max_duration_seconds/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
1378
1541
|
return false;
|
|
1379
1542
|
}
|
|
1380
1543
|
if (errors === _errs47) {
|
|
1381
1544
|
if ((typeof data21 == "number") && (isFinite(data21))) {
|
|
1382
1545
|
if (data21 < 1 || isNaN(data21)) {
|
|
1383
|
-
|
|
1546
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds/max_duration_seconds", schemaPath: "#/$defs/ApprovalBounds/properties/max_duration_seconds/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1384
1547
|
return false;
|
|
1385
1548
|
}
|
|
1386
1549
|
}
|
|
@@ -1395,13 +1558,13 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1395
1558
|
let data22 = data20.max_uses;
|
|
1396
1559
|
const _errs49 = errors;
|
|
1397
1560
|
if ((!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))) && (data22 !== null)) {
|
|
1398
|
-
|
|
1561
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds/max_uses", schemaPath: "#/$defs/ApprovalBounds/properties/max_uses/type", keyword: "type", params: { type: schema45.properties.max_uses.type }, message: "must be integer,null" }];
|
|
1399
1562
|
return false;
|
|
1400
1563
|
}
|
|
1401
1564
|
if (errors === _errs49) {
|
|
1402
1565
|
if ((typeof data22 == "number") && (isFinite(data22))) {
|
|
1403
1566
|
if (data22 < 1 || isNaN(data22)) {
|
|
1404
|
-
|
|
1567
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds/max_uses", schemaPath: "#/$defs/ApprovalBounds/properties/max_uses/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1405
1568
|
return false;
|
|
1406
1569
|
}
|
|
1407
1570
|
}
|
|
@@ -1416,7 +1579,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1416
1579
|
}
|
|
1417
1580
|
}
|
|
1418
1581
|
else {
|
|
1419
|
-
|
|
1582
|
+
validate32.errors = [{ instancePath: instancePath + "/approval_bounds", schemaPath: "#/$defs/ApprovalBounds/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1420
1583
|
return false;
|
|
1421
1584
|
}
|
|
1422
1585
|
}
|
|
@@ -1448,12 +1611,12 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1448
1611
|
}
|
|
1449
1612
|
}
|
|
1450
1613
|
else {
|
|
1451
|
-
|
|
1614
|
+
validate32.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1452
1615
|
return false;
|
|
1453
1616
|
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
function
|
|
1617
|
+
} validate32.errors = vErrors; return errors === 0; }
|
|
1618
|
+
validate32.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1619
|
+
function validate31(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate31.evaluated; if (evaluated0.dynamicProps) {
|
|
1457
1620
|
evaluated0.props = undefined;
|
|
1458
1621
|
} if (evaluated0.dynamicItems) {
|
|
1459
1622
|
evaluated0.items = undefined;
|
|
@@ -1461,14 +1624,14 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1461
1624
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1462
1625
|
let missing0;
|
|
1463
1626
|
if ((data.requests === undefined) && (missing0 = "requests")) {
|
|
1464
|
-
|
|
1627
|
+
validate31.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1465
1628
|
return false;
|
|
1466
1629
|
}
|
|
1467
1630
|
else {
|
|
1468
1631
|
const _errs1 = errors;
|
|
1469
1632
|
for (const key0 in data) {
|
|
1470
1633
|
if (!(((key0 === "requests") || (key0 === "next_cursor")) || (key0 === "event_cursor"))) {
|
|
1471
|
-
|
|
1634
|
+
validate31.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1472
1635
|
return false;
|
|
1473
1636
|
break;
|
|
1474
1637
|
}
|
|
@@ -1480,7 +1643,7 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1480
1643
|
if (errors === _errs2) {
|
|
1481
1644
|
if (Array.isArray(data0)) {
|
|
1482
1645
|
if (data0.length > 100) {
|
|
1483
|
-
|
|
1646
|
+
validate31.errors = [{ instancePath: instancePath + "/requests", schemaPath: "#/properties/requests/maxItems", keyword: "maxItems", params: { limit: 100 }, message: "must NOT have more than 100 items" }];
|
|
1484
1647
|
return false;
|
|
1485
1648
|
}
|
|
1486
1649
|
else {
|
|
@@ -1488,8 +1651,8 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1488
1651
|
const len0 = data0.length;
|
|
1489
1652
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
1490
1653
|
const _errs4 = errors;
|
|
1491
|
-
if (!(
|
|
1492
|
-
vErrors = vErrors === null ?
|
|
1654
|
+
if (!(validate32(data0[i0], { instancePath: instancePath + "/requests/" + i0, parentData: data0, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
1655
|
+
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
1493
1656
|
errors = vErrors.length;
|
|
1494
1657
|
}
|
|
1495
1658
|
var valid1 = _errs4 === errors;
|
|
@@ -1500,7 +1663,7 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1500
1663
|
}
|
|
1501
1664
|
}
|
|
1502
1665
|
else {
|
|
1503
|
-
|
|
1666
|
+
validate31.errors = [{ instancePath: instancePath + "/requests", schemaPath: "#/properties/requests/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
1504
1667
|
return false;
|
|
1505
1668
|
}
|
|
1506
1669
|
}
|
|
@@ -1516,12 +1679,12 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1516
1679
|
if (errors === _errs5) {
|
|
1517
1680
|
if (typeof data2 === "string") {
|
|
1518
1681
|
if (func1(data2) > 1024) {
|
|
1519
|
-
|
|
1682
|
+
validate31.errors = [{ instancePath: instancePath + "/next_cursor", schemaPath: "#/properties/next_cursor/maxLength", keyword: "maxLength", params: { limit: 1024 }, message: "must NOT have more than 1024 characters" }];
|
|
1520
1683
|
return false;
|
|
1521
1684
|
}
|
|
1522
1685
|
}
|
|
1523
1686
|
else {
|
|
1524
|
-
|
|
1687
|
+
validate31.errors = [{ instancePath: instancePath + "/next_cursor", schemaPath: "#/properties/next_cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1525
1688
|
return false;
|
|
1526
1689
|
}
|
|
1527
1690
|
}
|
|
@@ -1537,12 +1700,12 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1537
1700
|
if (errors === _errs7) {
|
|
1538
1701
|
if (typeof data3 === "string") {
|
|
1539
1702
|
if (func1(data3) > 1024) {
|
|
1540
|
-
|
|
1703
|
+
validate31.errors = [{ instancePath: instancePath + "/event_cursor", schemaPath: "#/properties/event_cursor/maxLength", keyword: "maxLength", params: { limit: 1024 }, message: "must NOT have more than 1024 characters" }];
|
|
1541
1704
|
return false;
|
|
1542
1705
|
}
|
|
1543
1706
|
}
|
|
1544
1707
|
else {
|
|
1545
|
-
|
|
1708
|
+
validate31.errors = [{ instancePath: instancePath + "/event_cursor", schemaPath: "#/properties/event_cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1546
1709
|
return false;
|
|
1547
1710
|
}
|
|
1548
1711
|
}
|
|
@@ -1557,24 +1720,24 @@ function validate29(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1557
1720
|
}
|
|
1558
1721
|
}
|
|
1559
1722
|
else {
|
|
1560
|
-
|
|
1723
|
+
validate31.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1561
1724
|
return false;
|
|
1562
1725
|
}
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
function
|
|
1726
|
+
} validate31.errors = vErrors; return errors === 0; }
|
|
1727
|
+
validate31.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1728
|
+
function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/RequestPage" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate30.evaluated; if (evaluated0.dynamicProps) {
|
|
1566
1729
|
evaluated0.props = undefined;
|
|
1567
1730
|
} if (evaluated0.dynamicItems) {
|
|
1568
1731
|
evaluated0.items = undefined;
|
|
1569
|
-
} if (!(
|
|
1570
|
-
vErrors = vErrors === null ?
|
|
1732
|
+
} if (!(validate31(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
1733
|
+
vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);
|
|
1571
1734
|
errors = vErrors.length;
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
export const validateBrokerEvent =
|
|
1575
|
-
const
|
|
1576
|
-
const
|
|
1577
|
-
function
|
|
1735
|
+
} validate30.errors = vErrors; return errors === 0; }
|
|
1736
|
+
validate30.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1737
|
+
export const validateBrokerEvent = validate36;
|
|
1738
|
+
const schema52 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/BrokerEvent", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/BrokerEvent" };
|
|
1739
|
+
const schema53 = { "type": "object", "additionalProperties": false, "required": ["cursor", "kind", "request_id", "revision", "status", "occurred_at", "used_count"], "properties": { "cursor": { "type": "string", "minLength": 1, "maxLength": 1024 }, "kind": { "type": "string", "enum": ["request.created", "request.approved", "request.denied", "request.canceled", "request.expired", "grant.revoked", "grant.reserved", "grant.consumed", "grant.released", "execution.succeeded", "execution.failed", "execution.ambiguous"] }, "request_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "revision": { "type": "integer", "minimum": 1 }, "status": { "$ref": "#/$defs/Status" }, "occurred_at": { "type": "string", "format": "date-time" }, "used_count": { "type": "integer", "minimum": 0 } } };
|
|
1740
|
+
function validate37(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate37.evaluated; if (evaluated0.dynamicProps) {
|
|
1578
1741
|
evaluated0.props = undefined;
|
|
1579
1742
|
} if (evaluated0.dynamicItems) {
|
|
1580
1743
|
evaluated0.items = undefined;
|
|
@@ -1582,14 +1745,14 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1582
1745
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1583
1746
|
let missing0;
|
|
1584
1747
|
if ((((((((data.cursor === undefined) && (missing0 = "cursor")) || ((data.kind === undefined) && (missing0 = "kind"))) || ((data.request_id === undefined) && (missing0 = "request_id"))) || ((data.revision === undefined) && (missing0 = "revision"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.occurred_at === undefined) && (missing0 = "occurred_at"))) || ((data.used_count === undefined) && (missing0 = "used_count"))) {
|
|
1585
|
-
|
|
1748
|
+
validate37.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1586
1749
|
return false;
|
|
1587
1750
|
}
|
|
1588
1751
|
else {
|
|
1589
1752
|
const _errs1 = errors;
|
|
1590
1753
|
for (const key0 in data) {
|
|
1591
1754
|
if (!(((((((key0 === "cursor") || (key0 === "kind")) || (key0 === "request_id")) || (key0 === "revision")) || (key0 === "status")) || (key0 === "occurred_at")) || (key0 === "used_count"))) {
|
|
1592
|
-
|
|
1755
|
+
validate37.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1593
1756
|
return false;
|
|
1594
1757
|
break;
|
|
1595
1758
|
}
|
|
@@ -1601,18 +1764,18 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1601
1764
|
if (errors === _errs2) {
|
|
1602
1765
|
if (typeof data0 === "string") {
|
|
1603
1766
|
if (func1(data0) > 1024) {
|
|
1604
|
-
|
|
1767
|
+
validate37.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/maxLength", keyword: "maxLength", params: { limit: 1024 }, message: "must NOT have more than 1024 characters" }];
|
|
1605
1768
|
return false;
|
|
1606
1769
|
}
|
|
1607
1770
|
else {
|
|
1608
1771
|
if (func1(data0) < 1) {
|
|
1609
|
-
|
|
1772
|
+
validate37.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1610
1773
|
return false;
|
|
1611
1774
|
}
|
|
1612
1775
|
}
|
|
1613
1776
|
}
|
|
1614
1777
|
else {
|
|
1615
|
-
|
|
1778
|
+
validate37.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1616
1779
|
return false;
|
|
1617
1780
|
}
|
|
1618
1781
|
}
|
|
@@ -1626,11 +1789,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1626
1789
|
let data1 = data.kind;
|
|
1627
1790
|
const _errs4 = errors;
|
|
1628
1791
|
if (typeof data1 !== "string") {
|
|
1629
|
-
|
|
1792
|
+
validate37.errors = [{ instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1630
1793
|
return false;
|
|
1631
1794
|
}
|
|
1632
1795
|
if (!((((((((((((data1 === "request.created") || (data1 === "request.approved")) || (data1 === "request.denied")) || (data1 === "request.canceled")) || (data1 === "request.expired")) || (data1 === "grant.revoked")) || (data1 === "grant.reserved")) || (data1 === "grant.consumed")) || (data1 === "grant.released")) || (data1 === "execution.succeeded")) || (data1 === "execution.failed")) || (data1 === "execution.ambiguous"))) {
|
|
1633
|
-
|
|
1796
|
+
validate37.errors = [{ instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/enum", keyword: "enum", params: { allowedValues: schema53.properties.kind.enum }, message: "must be equal to one of the allowed values" }];
|
|
1634
1797
|
return false;
|
|
1635
1798
|
}
|
|
1636
1799
|
var valid0 = _errs4 === errors;
|
|
@@ -1645,18 +1808,18 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1645
1808
|
if (errors === _errs6) {
|
|
1646
1809
|
if (typeof data2 === "string") {
|
|
1647
1810
|
if (func1(data2) > 128) {
|
|
1648
|
-
|
|
1811
|
+
validate37.errors = [{ instancePath: instancePath + "/request_id", schemaPath: "#/properties/request_id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
1649
1812
|
return false;
|
|
1650
1813
|
}
|
|
1651
1814
|
else {
|
|
1652
1815
|
if (func1(data2) < 1) {
|
|
1653
|
-
|
|
1816
|
+
validate37.errors = [{ instancePath: instancePath + "/request_id", schemaPath: "#/properties/request_id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1654
1817
|
return false;
|
|
1655
1818
|
}
|
|
1656
1819
|
}
|
|
1657
1820
|
}
|
|
1658
1821
|
else {
|
|
1659
|
-
|
|
1822
|
+
validate37.errors = [{ instancePath: instancePath + "/request_id", schemaPath: "#/properties/request_id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1660
1823
|
return false;
|
|
1661
1824
|
}
|
|
1662
1825
|
}
|
|
@@ -1670,13 +1833,13 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1670
1833
|
let data3 = data.revision;
|
|
1671
1834
|
const _errs8 = errors;
|
|
1672
1835
|
if (!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) {
|
|
1673
|
-
|
|
1836
|
+
validate37.errors = [{ instancePath: instancePath + "/revision", schemaPath: "#/properties/revision/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
1674
1837
|
return false;
|
|
1675
1838
|
}
|
|
1676
1839
|
if (errors === _errs8) {
|
|
1677
1840
|
if ((typeof data3 == "number") && (isFinite(data3))) {
|
|
1678
1841
|
if (data3 < 1 || isNaN(data3)) {
|
|
1679
|
-
|
|
1842
|
+
validate37.errors = [{ instancePath: instancePath + "/revision", schemaPath: "#/properties/revision/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
1680
1843
|
return false;
|
|
1681
1844
|
}
|
|
1682
1845
|
}
|
|
@@ -1691,11 +1854,11 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1691
1854
|
let data4 = data.status;
|
|
1692
1855
|
const _errs10 = errors;
|
|
1693
1856
|
if (typeof data4 !== "string") {
|
|
1694
|
-
|
|
1857
|
+
validate37.errors = [{ instancePath: instancePath + "/status", schemaPath: "#/$defs/Status/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1695
1858
|
return false;
|
|
1696
1859
|
}
|
|
1697
1860
|
if (!(((((((data4 === "pending") || (data4 === "active")) || (data4 === "denied")) || (data4 === "canceled")) || (data4 === "expired")) || (data4 === "consumed")) || (data4 === "revoked"))) {
|
|
1698
|
-
|
|
1861
|
+
validate37.errors = [{ instancePath: instancePath + "/status", schemaPath: "#/$defs/Status/enum", keyword: "enum", params: { allowedValues: schema38.enum }, message: "must be equal to one of the allowed values" }];
|
|
1699
1862
|
return false;
|
|
1700
1863
|
}
|
|
1701
1864
|
var valid0 = _errs10 === errors;
|
|
@@ -1711,12 +1874,12 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1711
1874
|
if (errors === _errs13) {
|
|
1712
1875
|
if (typeof data5 === "string") {
|
|
1713
1876
|
if (!(formats0.validate(data5))) {
|
|
1714
|
-
|
|
1877
|
+
validate37.errors = [{ instancePath: instancePath + "/occurred_at", schemaPath: "#/properties/occurred_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
1715
1878
|
return false;
|
|
1716
1879
|
}
|
|
1717
1880
|
}
|
|
1718
1881
|
else {
|
|
1719
|
-
|
|
1882
|
+
validate37.errors = [{ instancePath: instancePath + "/occurred_at", schemaPath: "#/properties/occurred_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1720
1883
|
return false;
|
|
1721
1884
|
}
|
|
1722
1885
|
}
|
|
@@ -1731,13 +1894,13 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1731
1894
|
let data6 = data.used_count;
|
|
1732
1895
|
const _errs15 = errors;
|
|
1733
1896
|
if (!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) {
|
|
1734
|
-
|
|
1897
|
+
validate37.errors = [{ instancePath: instancePath + "/used_count", schemaPath: "#/properties/used_count/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
1735
1898
|
return false;
|
|
1736
1899
|
}
|
|
1737
1900
|
if (errors === _errs15) {
|
|
1738
1901
|
if ((typeof data6 == "number") && (isFinite(data6))) {
|
|
1739
1902
|
if (data6 < 0 || isNaN(data6)) {
|
|
1740
|
-
|
|
1903
|
+
validate37.errors = [{ instancePath: instancePath + "/used_count", schemaPath: "#/properties/used_count/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
1741
1904
|
return false;
|
|
1742
1905
|
}
|
|
1743
1906
|
}
|
|
@@ -1757,25 +1920,25 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1757
1920
|
}
|
|
1758
1921
|
}
|
|
1759
1922
|
else {
|
|
1760
|
-
|
|
1923
|
+
validate37.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1761
1924
|
return false;
|
|
1762
1925
|
}
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
function
|
|
1926
|
+
} validate37.errors = vErrors; return errors === 0; }
|
|
1927
|
+
validate37.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1928
|
+
function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/BrokerEvent" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate36.evaluated; if (evaluated0.dynamicProps) {
|
|
1766
1929
|
evaluated0.props = undefined;
|
|
1767
1930
|
} if (evaluated0.dynamicItems) {
|
|
1768
1931
|
evaluated0.items = undefined;
|
|
1769
|
-
} if (!(
|
|
1770
|
-
vErrors = vErrors === null ?
|
|
1932
|
+
} if (!(validate37(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
1933
|
+
vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);
|
|
1771
1934
|
errors = vErrors.length;
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
export const validateErrorEnvelope =
|
|
1775
|
-
const
|
|
1776
|
-
const
|
|
1777
|
-
const
|
|
1778
|
-
function
|
|
1935
|
+
} validate36.errors = vErrors; return errors === 0; }
|
|
1936
|
+
validate36.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
1937
|
+
export const validateErrorEnvelope = validate39;
|
|
1938
|
+
const schema55 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/ErrorEnvelope", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/ErrorEnvelope" };
|
|
1939
|
+
const schema56 = { "type": "object", "additionalProperties": false, "required": ["error"], "properties": { "error": { "$ref": "#/$defs/Error" } } };
|
|
1940
|
+
const schema57 = { "type": "object", "additionalProperties": false, "required": ["code", "message", "correlation_id"], "properties": { "code": { "type": "string", "enum": ["invalid_request", "unauthorized", "forbidden", "not_found", "method_not_allowed", "revision_conflict", "idempotency_conflict", "constraint_exceeded", "invalid_transition", "invalid_decision_token", "cursor_expired", "temporarily_unavailable", "internal_error"] }, "message": { "type": "string", "minLength": 1, "maxLength": 500 }, "correlation_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "current": { "$ref": "#/$defs/BrokerRequest" } } };
|
|
1941
|
+
function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate41.evaluated; if (evaluated0.dynamicProps) {
|
|
1779
1942
|
evaluated0.props = undefined;
|
|
1780
1943
|
} if (evaluated0.dynamicItems) {
|
|
1781
1944
|
evaluated0.items = undefined;
|
|
@@ -1783,14 +1946,14 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1783
1946
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1784
1947
|
let missing0;
|
|
1785
1948
|
if ((((data.code === undefined) && (missing0 = "code")) || ((data.message === undefined) && (missing0 = "message"))) || ((data.correlation_id === undefined) && (missing0 = "correlation_id"))) {
|
|
1786
|
-
|
|
1949
|
+
validate41.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1787
1950
|
return false;
|
|
1788
1951
|
}
|
|
1789
1952
|
else {
|
|
1790
1953
|
const _errs1 = errors;
|
|
1791
1954
|
for (const key0 in data) {
|
|
1792
1955
|
if (!((((key0 === "code") || (key0 === "message")) || (key0 === "correlation_id")) || (key0 === "current"))) {
|
|
1793
|
-
|
|
1956
|
+
validate41.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1794
1957
|
return false;
|
|
1795
1958
|
break;
|
|
1796
1959
|
}
|
|
@@ -1800,11 +1963,11 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1800
1963
|
let data0 = data.code;
|
|
1801
1964
|
const _errs2 = errors;
|
|
1802
1965
|
if (typeof data0 !== "string") {
|
|
1803
|
-
|
|
1966
|
+
validate41.errors = [{ instancePath: instancePath + "/code", schemaPath: "#/properties/code/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1804
1967
|
return false;
|
|
1805
1968
|
}
|
|
1806
1969
|
if (!(((((((((((((data0 === "invalid_request") || (data0 === "unauthorized")) || (data0 === "forbidden")) || (data0 === "not_found")) || (data0 === "method_not_allowed")) || (data0 === "revision_conflict")) || (data0 === "idempotency_conflict")) || (data0 === "constraint_exceeded")) || (data0 === "invalid_transition")) || (data0 === "invalid_decision_token")) || (data0 === "cursor_expired")) || (data0 === "temporarily_unavailable")) || (data0 === "internal_error"))) {
|
|
1807
|
-
|
|
1970
|
+
validate41.errors = [{ instancePath: instancePath + "/code", schemaPath: "#/properties/code/enum", keyword: "enum", params: { allowedValues: schema57.properties.code.enum }, message: "must be equal to one of the allowed values" }];
|
|
1808
1971
|
return false;
|
|
1809
1972
|
}
|
|
1810
1973
|
var valid0 = _errs2 === errors;
|
|
@@ -1819,18 +1982,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1819
1982
|
if (errors === _errs4) {
|
|
1820
1983
|
if (typeof data1 === "string") {
|
|
1821
1984
|
if (func1(data1) > 500) {
|
|
1822
|
-
|
|
1985
|
+
validate41.errors = [{ instancePath: instancePath + "/message", schemaPath: "#/properties/message/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
|
|
1823
1986
|
return false;
|
|
1824
1987
|
}
|
|
1825
1988
|
else {
|
|
1826
1989
|
if (func1(data1) < 1) {
|
|
1827
|
-
|
|
1990
|
+
validate41.errors = [{ instancePath: instancePath + "/message", schemaPath: "#/properties/message/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1828
1991
|
return false;
|
|
1829
1992
|
}
|
|
1830
1993
|
}
|
|
1831
1994
|
}
|
|
1832
1995
|
else {
|
|
1833
|
-
|
|
1996
|
+
validate41.errors = [{ instancePath: instancePath + "/message", schemaPath: "#/properties/message/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1834
1997
|
return false;
|
|
1835
1998
|
}
|
|
1836
1999
|
}
|
|
@@ -1846,18 +2009,18 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1846
2009
|
if (errors === _errs6) {
|
|
1847
2010
|
if (typeof data2 === "string") {
|
|
1848
2011
|
if (func1(data2) > 128) {
|
|
1849
|
-
|
|
2012
|
+
validate41.errors = [{ instancePath: instancePath + "/correlation_id", schemaPath: "#/properties/correlation_id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
1850
2013
|
return false;
|
|
1851
2014
|
}
|
|
1852
2015
|
else {
|
|
1853
2016
|
if (func1(data2) < 1) {
|
|
1854
|
-
|
|
2017
|
+
validate41.errors = [{ instancePath: instancePath + "/correlation_id", schemaPath: "#/properties/correlation_id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1855
2018
|
return false;
|
|
1856
2019
|
}
|
|
1857
2020
|
}
|
|
1858
2021
|
}
|
|
1859
2022
|
else {
|
|
1860
|
-
|
|
2023
|
+
validate41.errors = [{ instancePath: instancePath + "/correlation_id", schemaPath: "#/properties/correlation_id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1861
2024
|
return false;
|
|
1862
2025
|
}
|
|
1863
2026
|
}
|
|
@@ -1869,8 +2032,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1869
2032
|
if (valid0) {
|
|
1870
2033
|
if (data.current !== undefined) {
|
|
1871
2034
|
const _errs8 = errors;
|
|
1872
|
-
if (!(
|
|
1873
|
-
vErrors = vErrors === null ?
|
|
2035
|
+
if (!(validate32(data.current, { instancePath: instancePath + "/current", parentData: data, parentDataProperty: "current", rootData, dynamicAnchors }))) {
|
|
2036
|
+
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
1874
2037
|
errors = vErrors.length;
|
|
1875
2038
|
}
|
|
1876
2039
|
var valid0 = _errs8 === errors;
|
|
@@ -1885,12 +2048,12 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1885
2048
|
}
|
|
1886
2049
|
}
|
|
1887
2050
|
else {
|
|
1888
|
-
|
|
2051
|
+
validate41.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1889
2052
|
return false;
|
|
1890
2053
|
}
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
function
|
|
2054
|
+
} validate41.errors = vErrors; return errors === 0; }
|
|
2055
|
+
validate41.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2056
|
+
function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate40.evaluated; if (evaluated0.dynamicProps) {
|
|
1894
2057
|
evaluated0.props = undefined;
|
|
1895
2058
|
} if (evaluated0.dynamicItems) {
|
|
1896
2059
|
evaluated0.items = undefined;
|
|
@@ -1898,22 +2061,22 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1898
2061
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1899
2062
|
let missing0;
|
|
1900
2063
|
if ((data.error === undefined) && (missing0 = "error")) {
|
|
1901
|
-
|
|
2064
|
+
validate40.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1902
2065
|
return false;
|
|
1903
2066
|
}
|
|
1904
2067
|
else {
|
|
1905
2068
|
const _errs1 = errors;
|
|
1906
2069
|
for (const key0 in data) {
|
|
1907
2070
|
if (!(key0 === "error")) {
|
|
1908
|
-
|
|
2071
|
+
validate40.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1909
2072
|
return false;
|
|
1910
2073
|
break;
|
|
1911
2074
|
}
|
|
1912
2075
|
}
|
|
1913
2076
|
if (_errs1 === errors) {
|
|
1914
2077
|
if (data.error !== undefined) {
|
|
1915
|
-
if (!(
|
|
1916
|
-
vErrors = vErrors === null ?
|
|
2078
|
+
if (!(validate41(data.error, { instancePath: instancePath + "/error", parentData: data, parentDataProperty: "error", rootData, dynamicAnchors }))) {
|
|
2079
|
+
vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors);
|
|
1917
2080
|
errors = vErrors.length;
|
|
1918
2081
|
}
|
|
1919
2082
|
}
|
|
@@ -1921,27 +2084,27 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1921
2084
|
}
|
|
1922
2085
|
}
|
|
1923
2086
|
else {
|
|
1924
|
-
|
|
2087
|
+
validate40.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
1925
2088
|
return false;
|
|
1926
2089
|
}
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
function
|
|
2090
|
+
} validate40.errors = vErrors; return errors === 0; }
|
|
2091
|
+
validate40.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2092
|
+
function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/ErrorEnvelope" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate39.evaluated; if (evaluated0.dynamicProps) {
|
|
1930
2093
|
evaluated0.props = undefined;
|
|
1931
2094
|
} if (evaluated0.dynamicItems) {
|
|
1932
2095
|
evaluated0.items = undefined;
|
|
1933
|
-
} if (!(
|
|
1934
|
-
vErrors = vErrors === null ?
|
|
2096
|
+
} if (!(validate40(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
2097
|
+
vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);
|
|
1935
2098
|
errors = vErrors.length;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
export const validateUISnapshot =
|
|
1939
|
-
const
|
|
1940
|
-
const
|
|
1941
|
-
const
|
|
1942
|
-
const
|
|
2099
|
+
} validate39.errors = vErrors; return errors === 0; }
|
|
2100
|
+
validate39.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2101
|
+
export const validateUISnapshot = validate45;
|
|
2102
|
+
const schema58 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/UISnapshot", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshot" };
|
|
2103
|
+
const schema59 = { "type": "object", "additionalProperties": false, "required": ["api_version", "cursor", "synchronized_at", "sources", "requests"], "properties": { "api_version": { "type": "string", "const": "brokerkit.io/operator-ui/v1" }, "cursor": { "type": "string", "minLength": 1, "maxLength": 128 }, "synchronized_at": { "type": "string", "format": "date-time" }, "sources": { "type": "array", "maxItems": 100, "items": { "$ref": "#/$defs/UISourceHealth" } }, "requests": { "type": "array", "maxItems": 1000, "items": { "$ref": "#/$defs/UIRequest" } }, "delivery_failures": { "type": "integer", "minimum": 0 } } };
|
|
2104
|
+
const schema60 = { "type": "object", "additionalProperties": false, "required": ["id", "label", "healthy"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "healthy": { "type": "boolean" }, "last_sync_at": { "type": "string", "format": "date-time" }, "error": { "type": "string", "maxLength": 200 } } };
|
|
2105
|
+
const schema61 = { "type": "object", "additionalProperties": false, "required": ["source_id", "source_label", "handle", "request"], "properties": { "source_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "source_label": { "type": "string", "minLength": 1, "maxLength": 200 }, "handle": { "type": "string", "minLength": 22, "maxLength": 256, "pattern": "^[A-Za-z0-9_-]+$" }, "request": { "$ref": "#/$defs/BrokerRequest" } } };
|
|
1943
2106
|
const pattern4 = new RegExp("^[A-Za-z0-9_-]+$", "u");
|
|
1944
|
-
function
|
|
2107
|
+
function validate47(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate47.evaluated; if (evaluated0.dynamicProps) {
|
|
1945
2108
|
evaluated0.props = undefined;
|
|
1946
2109
|
} if (evaluated0.dynamicItems) {
|
|
1947
2110
|
evaluated0.items = undefined;
|
|
@@ -1949,14 +2112,14 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1949
2112
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1950
2113
|
let missing0;
|
|
1951
2114
|
if (((((data.source_id === undefined) && (missing0 = "source_id")) || ((data.source_label === undefined) && (missing0 = "source_label"))) || ((data.handle === undefined) && (missing0 = "handle"))) || ((data.request === undefined) && (missing0 = "request"))) {
|
|
1952
|
-
|
|
2115
|
+
validate47.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1953
2116
|
return false;
|
|
1954
2117
|
}
|
|
1955
2118
|
else {
|
|
1956
2119
|
const _errs1 = errors;
|
|
1957
2120
|
for (const key0 in data) {
|
|
1958
2121
|
if (!((((key0 === "source_id") || (key0 === "source_label")) || (key0 === "handle")) || (key0 === "request"))) {
|
|
1959
|
-
|
|
2122
|
+
validate47.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1960
2123
|
return false;
|
|
1961
2124
|
break;
|
|
1962
2125
|
}
|
|
@@ -1968,18 +2131,18 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1968
2131
|
if (errors === _errs2) {
|
|
1969
2132
|
if (typeof data0 === "string") {
|
|
1970
2133
|
if (func1(data0) > 128) {
|
|
1971
|
-
|
|
2134
|
+
validate47.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
1972
2135
|
return false;
|
|
1973
2136
|
}
|
|
1974
2137
|
else {
|
|
1975
2138
|
if (func1(data0) < 1) {
|
|
1976
|
-
|
|
2139
|
+
validate47.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
1977
2140
|
return false;
|
|
1978
2141
|
}
|
|
1979
2142
|
}
|
|
1980
2143
|
}
|
|
1981
2144
|
else {
|
|
1982
|
-
|
|
2145
|
+
validate47.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1983
2146
|
return false;
|
|
1984
2147
|
}
|
|
1985
2148
|
}
|
|
@@ -1995,18 +2158,18 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1995
2158
|
if (errors === _errs4) {
|
|
1996
2159
|
if (typeof data1 === "string") {
|
|
1997
2160
|
if (func1(data1) > 200) {
|
|
1998
|
-
|
|
2161
|
+
validate47.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
1999
2162
|
return false;
|
|
2000
2163
|
}
|
|
2001
2164
|
else {
|
|
2002
2165
|
if (func1(data1) < 1) {
|
|
2003
|
-
|
|
2166
|
+
validate47.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2004
2167
|
return false;
|
|
2005
2168
|
}
|
|
2006
2169
|
}
|
|
2007
2170
|
}
|
|
2008
2171
|
else {
|
|
2009
|
-
|
|
2172
|
+
validate47.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2010
2173
|
return false;
|
|
2011
2174
|
}
|
|
2012
2175
|
}
|
|
@@ -2022,24 +2185,24 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2022
2185
|
if (errors === _errs6) {
|
|
2023
2186
|
if (typeof data2 === "string") {
|
|
2024
2187
|
if (func1(data2) > 256) {
|
|
2025
|
-
|
|
2188
|
+
validate47.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" }];
|
|
2026
2189
|
return false;
|
|
2027
2190
|
}
|
|
2028
2191
|
else {
|
|
2029
2192
|
if (func1(data2) < 22) {
|
|
2030
|
-
|
|
2193
|
+
validate47.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/minLength", keyword: "minLength", params: { limit: 22 }, message: "must NOT have fewer than 22 characters" }];
|
|
2031
2194
|
return false;
|
|
2032
2195
|
}
|
|
2033
2196
|
else {
|
|
2034
2197
|
if (!pattern4.test(data2)) {
|
|
2035
|
-
|
|
2198
|
+
validate47.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
2036
2199
|
return false;
|
|
2037
2200
|
}
|
|
2038
2201
|
}
|
|
2039
2202
|
}
|
|
2040
2203
|
}
|
|
2041
2204
|
else {
|
|
2042
|
-
|
|
2205
|
+
validate47.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2043
2206
|
return false;
|
|
2044
2207
|
}
|
|
2045
2208
|
}
|
|
@@ -2051,8 +2214,8 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2051
2214
|
if (valid0) {
|
|
2052
2215
|
if (data.request !== undefined) {
|
|
2053
2216
|
const _errs8 = errors;
|
|
2054
|
-
if (!(
|
|
2055
|
-
vErrors = vErrors === null ?
|
|
2217
|
+
if (!(validate32(data.request, { instancePath: instancePath + "/request", parentData: data, parentDataProperty: "request", rootData, dynamicAnchors }))) {
|
|
2218
|
+
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
2056
2219
|
errors = vErrors.length;
|
|
2057
2220
|
}
|
|
2058
2221
|
var valid0 = _errs8 === errors;
|
|
@@ -2067,12 +2230,12 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2067
2230
|
}
|
|
2068
2231
|
}
|
|
2069
2232
|
else {
|
|
2070
|
-
|
|
2233
|
+
validate47.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2071
2234
|
return false;
|
|
2072
2235
|
}
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
function
|
|
2236
|
+
} validate47.errors = vErrors; return errors === 0; }
|
|
2237
|
+
validate47.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2238
|
+
function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate46.evaluated; if (evaluated0.dynamicProps) {
|
|
2076
2239
|
evaluated0.props = undefined;
|
|
2077
2240
|
} if (evaluated0.dynamicItems) {
|
|
2078
2241
|
evaluated0.items = undefined;
|
|
@@ -2080,14 +2243,14 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2080
2243
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2081
2244
|
let missing0;
|
|
2082
2245
|
if ((((((data.api_version === undefined) && (missing0 = "api_version")) || ((data.cursor === undefined) && (missing0 = "cursor"))) || ((data.synchronized_at === undefined) && (missing0 = "synchronized_at"))) || ((data.sources === undefined) && (missing0 = "sources"))) || ((data.requests === undefined) && (missing0 = "requests"))) {
|
|
2083
|
-
|
|
2246
|
+
validate46.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
2084
2247
|
return false;
|
|
2085
2248
|
}
|
|
2086
2249
|
else {
|
|
2087
2250
|
const _errs1 = errors;
|
|
2088
2251
|
for (const key0 in data) {
|
|
2089
2252
|
if (!((((((key0 === "api_version") || (key0 === "cursor")) || (key0 === "synchronized_at")) || (key0 === "sources")) || (key0 === "requests")) || (key0 === "delivery_failures"))) {
|
|
2090
|
-
|
|
2253
|
+
validate46.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
2091
2254
|
return false;
|
|
2092
2255
|
break;
|
|
2093
2256
|
}
|
|
@@ -2097,11 +2260,11 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2097
2260
|
let data0 = data.api_version;
|
|
2098
2261
|
const _errs2 = errors;
|
|
2099
2262
|
if (typeof data0 !== "string") {
|
|
2100
|
-
|
|
2263
|
+
validate46.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "#/properties/api_version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2101
2264
|
return false;
|
|
2102
2265
|
}
|
|
2103
2266
|
if ("brokerkit.io/operator-ui/v1" !== data0) {
|
|
2104
|
-
|
|
2267
|
+
validate46.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "#/properties/api_version/const", keyword: "const", params: { allowedValue: "brokerkit.io/operator-ui/v1" }, message: "must be equal to constant" }];
|
|
2105
2268
|
return false;
|
|
2106
2269
|
}
|
|
2107
2270
|
var valid0 = _errs2 === errors;
|
|
@@ -2116,18 +2279,18 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2116
2279
|
if (errors === _errs4) {
|
|
2117
2280
|
if (typeof data1 === "string") {
|
|
2118
2281
|
if (func1(data1) > 128) {
|
|
2119
|
-
|
|
2282
|
+
validate46.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
2120
2283
|
return false;
|
|
2121
2284
|
}
|
|
2122
2285
|
else {
|
|
2123
2286
|
if (func1(data1) < 1) {
|
|
2124
|
-
|
|
2287
|
+
validate46.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2125
2288
|
return false;
|
|
2126
2289
|
}
|
|
2127
2290
|
}
|
|
2128
2291
|
}
|
|
2129
2292
|
else {
|
|
2130
|
-
|
|
2293
|
+
validate46.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "#/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2131
2294
|
return false;
|
|
2132
2295
|
}
|
|
2133
2296
|
}
|
|
@@ -2144,12 +2307,12 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2144
2307
|
if (errors === _errs6) {
|
|
2145
2308
|
if (typeof data2 === "string") {
|
|
2146
2309
|
if (!(formats0.validate(data2))) {
|
|
2147
|
-
|
|
2310
|
+
validate46.errors = [{ instancePath: instancePath + "/synchronized_at", schemaPath: "#/properties/synchronized_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
2148
2311
|
return false;
|
|
2149
2312
|
}
|
|
2150
2313
|
}
|
|
2151
2314
|
else {
|
|
2152
|
-
|
|
2315
|
+
validate46.errors = [{ instancePath: instancePath + "/synchronized_at", schemaPath: "#/properties/synchronized_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2153
2316
|
return false;
|
|
2154
2317
|
}
|
|
2155
2318
|
}
|
|
@@ -2166,7 +2329,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2166
2329
|
if (errors === _errs8) {
|
|
2167
2330
|
if (Array.isArray(data3)) {
|
|
2168
2331
|
if (data3.length > 100) {
|
|
2169
|
-
|
|
2332
|
+
validate46.errors = [{ instancePath: instancePath + "/sources", schemaPath: "#/properties/sources/maxItems", keyword: "maxItems", params: { limit: 100 }, message: "must NOT have more than 100 items" }];
|
|
2170
2333
|
return false;
|
|
2171
2334
|
}
|
|
2172
2335
|
else {
|
|
@@ -2180,14 +2343,14 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2180
2343
|
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
2181
2344
|
let missing1;
|
|
2182
2345
|
if ((((data4.id === undefined) && (missing1 = "id")) || ((data4.label === undefined) && (missing1 = "label"))) || ((data4.healthy === undefined) && (missing1 = "healthy"))) {
|
|
2183
|
-
|
|
2346
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0, schemaPath: "#/$defs/UISourceHealth/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
2184
2347
|
return false;
|
|
2185
2348
|
}
|
|
2186
2349
|
else {
|
|
2187
2350
|
const _errs13 = errors;
|
|
2188
2351
|
for (const key1 in data4) {
|
|
2189
2352
|
if (!(((((key1 === "id") || (key1 === "label")) || (key1 === "healthy")) || (key1 === "last_sync_at")) || (key1 === "error"))) {
|
|
2190
|
-
|
|
2353
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0, schemaPath: "#/$defs/UISourceHealth/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
2191
2354
|
return false;
|
|
2192
2355
|
break;
|
|
2193
2356
|
}
|
|
@@ -2199,18 +2362,18 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2199
2362
|
if (errors === _errs14) {
|
|
2200
2363
|
if (typeof data5 === "string") {
|
|
2201
2364
|
if (func1(data5) > 128) {
|
|
2202
|
-
|
|
2365
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/id", schemaPath: "#/$defs/UISourceHealth/properties/id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
2203
2366
|
return false;
|
|
2204
2367
|
}
|
|
2205
2368
|
else {
|
|
2206
2369
|
if (func1(data5) < 1) {
|
|
2207
|
-
|
|
2370
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/id", schemaPath: "#/$defs/UISourceHealth/properties/id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2208
2371
|
return false;
|
|
2209
2372
|
}
|
|
2210
2373
|
}
|
|
2211
2374
|
}
|
|
2212
2375
|
else {
|
|
2213
|
-
|
|
2376
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/id", schemaPath: "#/$defs/UISourceHealth/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2214
2377
|
return false;
|
|
2215
2378
|
}
|
|
2216
2379
|
}
|
|
@@ -2226,18 +2389,18 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2226
2389
|
if (errors === _errs16) {
|
|
2227
2390
|
if (typeof data6 === "string") {
|
|
2228
2391
|
if (func1(data6) > 200) {
|
|
2229
|
-
|
|
2392
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/label", schemaPath: "#/$defs/UISourceHealth/properties/label/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
2230
2393
|
return false;
|
|
2231
2394
|
}
|
|
2232
2395
|
else {
|
|
2233
2396
|
if (func1(data6) < 1) {
|
|
2234
|
-
|
|
2397
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/label", schemaPath: "#/$defs/UISourceHealth/properties/label/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2235
2398
|
return false;
|
|
2236
2399
|
}
|
|
2237
2400
|
}
|
|
2238
2401
|
}
|
|
2239
2402
|
else {
|
|
2240
|
-
|
|
2403
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/label", schemaPath: "#/$defs/UISourceHealth/properties/label/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2241
2404
|
return false;
|
|
2242
2405
|
}
|
|
2243
2406
|
}
|
|
@@ -2250,7 +2413,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2250
2413
|
if (data4.healthy !== undefined) {
|
|
2251
2414
|
const _errs18 = errors;
|
|
2252
2415
|
if (typeof data4.healthy !== "boolean") {
|
|
2253
|
-
|
|
2416
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/healthy", schemaPath: "#/$defs/UISourceHealth/properties/healthy/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
2254
2417
|
return false;
|
|
2255
2418
|
}
|
|
2256
2419
|
var valid3 = _errs18 === errors;
|
|
@@ -2266,12 +2429,12 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2266
2429
|
if (errors === _errs20) {
|
|
2267
2430
|
if (typeof data8 === "string") {
|
|
2268
2431
|
if (!(formats0.validate(data8))) {
|
|
2269
|
-
|
|
2432
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/last_sync_at", schemaPath: "#/$defs/UISourceHealth/properties/last_sync_at/format", keyword: "format", params: { format: "date-time" }, message: "must match format \"" + "date-time" + "\"" }];
|
|
2270
2433
|
return false;
|
|
2271
2434
|
}
|
|
2272
2435
|
}
|
|
2273
2436
|
else {
|
|
2274
|
-
|
|
2437
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/last_sync_at", schemaPath: "#/$defs/UISourceHealth/properties/last_sync_at/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2275
2438
|
return false;
|
|
2276
2439
|
}
|
|
2277
2440
|
}
|
|
@@ -2288,12 +2451,12 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2288
2451
|
if (errors === _errs22) {
|
|
2289
2452
|
if (typeof data9 === "string") {
|
|
2290
2453
|
if (func1(data9) > 200) {
|
|
2291
|
-
|
|
2454
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/error", schemaPath: "#/$defs/UISourceHealth/properties/error/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
2292
2455
|
return false;
|
|
2293
2456
|
}
|
|
2294
2457
|
}
|
|
2295
2458
|
else {
|
|
2296
|
-
|
|
2459
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0 + "/error", schemaPath: "#/$defs/UISourceHealth/properties/error/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2297
2460
|
return false;
|
|
2298
2461
|
}
|
|
2299
2462
|
}
|
|
@@ -2310,7 +2473,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2310
2473
|
}
|
|
2311
2474
|
}
|
|
2312
2475
|
else {
|
|
2313
|
-
|
|
2476
|
+
validate46.errors = [{ instancePath: instancePath + "/sources/" + i0, schemaPath: "#/$defs/UISourceHealth/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2314
2477
|
return false;
|
|
2315
2478
|
}
|
|
2316
2479
|
}
|
|
@@ -2322,7 +2485,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2322
2485
|
}
|
|
2323
2486
|
}
|
|
2324
2487
|
else {
|
|
2325
|
-
|
|
2488
|
+
validate46.errors = [{ instancePath: instancePath + "/sources", schemaPath: "#/properties/sources/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
2326
2489
|
return false;
|
|
2327
2490
|
}
|
|
2328
2491
|
}
|
|
@@ -2338,7 +2501,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2338
2501
|
if (errors === _errs24) {
|
|
2339
2502
|
if (Array.isArray(data10)) {
|
|
2340
2503
|
if (data10.length > 1000) {
|
|
2341
|
-
|
|
2504
|
+
validate46.errors = [{ instancePath: instancePath + "/requests", schemaPath: "#/properties/requests/maxItems", keyword: "maxItems", params: { limit: 1000 }, message: "must NOT have more than 1000 items" }];
|
|
2342
2505
|
return false;
|
|
2343
2506
|
}
|
|
2344
2507
|
else {
|
|
@@ -2346,8 +2509,8 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2346
2509
|
const len1 = data10.length;
|
|
2347
2510
|
for (let i1 = 0; i1 < len1; i1++) {
|
|
2348
2511
|
const _errs26 = errors;
|
|
2349
|
-
if (!(
|
|
2350
|
-
vErrors = vErrors === null ?
|
|
2512
|
+
if (!(validate47(data10[i1], { instancePath: instancePath + "/requests/" + i1, parentData: data10, parentDataProperty: i1, rootData, dynamicAnchors }))) {
|
|
2513
|
+
vErrors = vErrors === null ? validate47.errors : vErrors.concat(validate47.errors);
|
|
2351
2514
|
errors = vErrors.length;
|
|
2352
2515
|
}
|
|
2353
2516
|
var valid4 = _errs26 === errors;
|
|
@@ -2358,7 +2521,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2358
2521
|
}
|
|
2359
2522
|
}
|
|
2360
2523
|
else {
|
|
2361
|
-
|
|
2524
|
+
validate46.errors = [{ instancePath: instancePath + "/requests", schemaPath: "#/properties/requests/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
2362
2525
|
return false;
|
|
2363
2526
|
}
|
|
2364
2527
|
}
|
|
@@ -2372,13 +2535,13 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2372
2535
|
let data12 = data.delivery_failures;
|
|
2373
2536
|
const _errs27 = errors;
|
|
2374
2537
|
if (!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))) {
|
|
2375
|
-
|
|
2538
|
+
validate46.errors = [{ instancePath: instancePath + "/delivery_failures", schemaPath: "#/properties/delivery_failures/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
2376
2539
|
return false;
|
|
2377
2540
|
}
|
|
2378
2541
|
if (errors === _errs27) {
|
|
2379
2542
|
if ((typeof data12 == "number") && (isFinite(data12))) {
|
|
2380
2543
|
if (data12 < 0 || isNaN(data12)) {
|
|
2381
|
-
|
|
2544
|
+
validate46.errors = [{ instancePath: instancePath + "/delivery_failures", schemaPath: "#/properties/delivery_failures/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
2382
2545
|
return false;
|
|
2383
2546
|
}
|
|
2384
2547
|
}
|
|
@@ -2397,24 +2560,24 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2397
2560
|
}
|
|
2398
2561
|
}
|
|
2399
2562
|
else {
|
|
2400
|
-
|
|
2563
|
+
validate46.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2401
2564
|
return false;
|
|
2402
2565
|
}
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
function
|
|
2566
|
+
} validate46.errors = vErrors; return errors === 0; }
|
|
2567
|
+
validate46.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2568
|
+
function validate45(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/UISnapshot" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate45.evaluated; if (evaluated0.dynamicProps) {
|
|
2406
2569
|
evaluated0.props = undefined;
|
|
2407
2570
|
} if (evaluated0.dynamicItems) {
|
|
2408
2571
|
evaluated0.items = undefined;
|
|
2409
|
-
} if (!(
|
|
2410
|
-
vErrors = vErrors === null ?
|
|
2572
|
+
} if (!(validate46(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
2573
|
+
vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors);
|
|
2411
2574
|
errors = vErrors.length;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
export const validateUISnapshotEvent =
|
|
2415
|
-
const
|
|
2416
|
-
const
|
|
2417
|
-
function
|
|
2575
|
+
} validate45.errors = vErrors; return errors === 0; }
|
|
2576
|
+
validate45.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2577
|
+
export const validateUISnapshotEvent = validate51;
|
|
2578
|
+
const schema62 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/UISnapshotEvent", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent" };
|
|
2579
|
+
const schema63 = { "type": "object", "additionalProperties": false, "required": ["api_version", "cursor", "changed"], "properties": { "api_version": { "type": "string", "const": "brokerkit.io/operator-ui/v1" }, "cursor": { "type": "string", "minLength": 1, "maxLength": 128 }, "changed": { "type": "boolean" } } };
|
|
2580
|
+
function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/UISnapshotEvent" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate51.evaluated; if (evaluated0.dynamicProps) {
|
|
2418
2581
|
evaluated0.props = undefined;
|
|
2419
2582
|
} if (evaluated0.dynamicItems) {
|
|
2420
2583
|
evaluated0.items = undefined;
|
|
@@ -2422,14 +2585,14 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2422
2585
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2423
2586
|
let missing0;
|
|
2424
2587
|
if ((((data.api_version === undefined) && (missing0 = "api_version")) || ((data.cursor === undefined) && (missing0 = "cursor"))) || ((data.changed === undefined) && (missing0 = "changed"))) {
|
|
2425
|
-
|
|
2588
|
+
validate51.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
2426
2589
|
return false;
|
|
2427
2590
|
}
|
|
2428
2591
|
else {
|
|
2429
2592
|
const _errs2 = errors;
|
|
2430
2593
|
for (const key0 in data) {
|
|
2431
2594
|
if (!(((key0 === "api_version") || (key0 === "cursor")) || (key0 === "changed"))) {
|
|
2432
|
-
|
|
2595
|
+
validate51.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
2433
2596
|
return false;
|
|
2434
2597
|
break;
|
|
2435
2598
|
}
|
|
@@ -2439,11 +2602,11 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2439
2602
|
let data0 = data.api_version;
|
|
2440
2603
|
const _errs3 = errors;
|
|
2441
2604
|
if (typeof data0 !== "string") {
|
|
2442
|
-
|
|
2605
|
+
validate51.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/api_version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2443
2606
|
return false;
|
|
2444
2607
|
}
|
|
2445
2608
|
if ("brokerkit.io/operator-ui/v1" !== data0) {
|
|
2446
|
-
|
|
2609
|
+
validate51.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/api_version/const", keyword: "const", params: { allowedValue: "brokerkit.io/operator-ui/v1" }, message: "must be equal to constant" }];
|
|
2447
2610
|
return false;
|
|
2448
2611
|
}
|
|
2449
2612
|
var valid1 = _errs3 === errors;
|
|
@@ -2458,18 +2621,18 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2458
2621
|
if (errors === _errs5) {
|
|
2459
2622
|
if (typeof data1 === "string") {
|
|
2460
2623
|
if (func1(data1) > 128) {
|
|
2461
|
-
|
|
2624
|
+
validate51.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/cursor/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
2462
2625
|
return false;
|
|
2463
2626
|
}
|
|
2464
2627
|
else {
|
|
2465
2628
|
if (func1(data1) < 1) {
|
|
2466
|
-
|
|
2629
|
+
validate51.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/cursor/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2467
2630
|
return false;
|
|
2468
2631
|
}
|
|
2469
2632
|
}
|
|
2470
2633
|
}
|
|
2471
2634
|
else {
|
|
2472
|
-
|
|
2635
|
+
validate51.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2473
2636
|
return false;
|
|
2474
2637
|
}
|
|
2475
2638
|
}
|
|
@@ -2482,7 +2645,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2482
2645
|
if (data.changed !== undefined) {
|
|
2483
2646
|
const _errs7 = errors;
|
|
2484
2647
|
if (typeof data.changed !== "boolean") {
|
|
2485
|
-
|
|
2648
|
+
validate51.errors = [{ instancePath: instancePath + "/changed", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/properties/changed/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
2486
2649
|
return false;
|
|
2487
2650
|
}
|
|
2488
2651
|
var valid1 = _errs7 === errors;
|
|
@@ -2496,15 +2659,15 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2496
2659
|
}
|
|
2497
2660
|
}
|
|
2498
2661
|
else {
|
|
2499
|
-
|
|
2662
|
+
validate51.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISnapshotEvent/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2500
2663
|
return false;
|
|
2501
2664
|
}
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
export const validateUISummary =
|
|
2505
|
-
const
|
|
2506
|
-
const
|
|
2507
|
-
function
|
|
2665
|
+
} validate51.errors = vErrors; return errors === 0; }
|
|
2666
|
+
validate51.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2667
|
+
export const validateUISummary = validate52;
|
|
2668
|
+
const schema64 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/UISummary", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary" };
|
|
2669
|
+
const schema65 = { "type": "object", "additionalProperties": false, "required": ["api_version", "cursor", "pending", "healthy"], "properties": { "api_version": { "type": "string", "const": "brokerkit.io/operator-ui/v1" }, "cursor": { "type": "string", "minLength": 1, "maxLength": 128 }, "pending": { "type": "integer", "minimum": 0 }, "healthy": { "type": "boolean" } } };
|
|
2670
|
+
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/UISummary" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate52.evaluated; if (evaluated0.dynamicProps) {
|
|
2508
2671
|
evaluated0.props = undefined;
|
|
2509
2672
|
} if (evaluated0.dynamicItems) {
|
|
2510
2673
|
evaluated0.items = undefined;
|
|
@@ -2512,14 +2675,14 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2512
2675
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2513
2676
|
let missing0;
|
|
2514
2677
|
if (((((data.api_version === undefined) && (missing0 = "api_version")) || ((data.cursor === undefined) && (missing0 = "cursor"))) || ((data.pending === undefined) && (missing0 = "pending"))) || ((data.healthy === undefined) && (missing0 = "healthy"))) {
|
|
2515
|
-
|
|
2678
|
+
validate52.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
2516
2679
|
return false;
|
|
2517
2680
|
}
|
|
2518
2681
|
else {
|
|
2519
2682
|
const _errs2 = errors;
|
|
2520
2683
|
for (const key0 in data) {
|
|
2521
2684
|
if (!((((key0 === "api_version") || (key0 === "cursor")) || (key0 === "pending")) || (key0 === "healthy"))) {
|
|
2522
|
-
|
|
2685
|
+
validate52.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
2523
2686
|
return false;
|
|
2524
2687
|
break;
|
|
2525
2688
|
}
|
|
@@ -2529,11 +2692,11 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2529
2692
|
let data0 = data.api_version;
|
|
2530
2693
|
const _errs3 = errors;
|
|
2531
2694
|
if (typeof data0 !== "string") {
|
|
2532
|
-
|
|
2695
|
+
validate52.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/api_version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2533
2696
|
return false;
|
|
2534
2697
|
}
|
|
2535
2698
|
if ("brokerkit.io/operator-ui/v1" !== data0) {
|
|
2536
|
-
|
|
2699
|
+
validate52.errors = [{ instancePath: instancePath + "/api_version", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/api_version/const", keyword: "const", params: { allowedValue: "brokerkit.io/operator-ui/v1" }, message: "must be equal to constant" }];
|
|
2537
2700
|
return false;
|
|
2538
2701
|
}
|
|
2539
2702
|
var valid1 = _errs3 === errors;
|
|
@@ -2548,18 +2711,18 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2548
2711
|
if (errors === _errs5) {
|
|
2549
2712
|
if (typeof data1 === "string") {
|
|
2550
2713
|
if (func1(data1) > 128) {
|
|
2551
|
-
|
|
2714
|
+
validate52.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/cursor/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
2552
2715
|
return false;
|
|
2553
2716
|
}
|
|
2554
2717
|
else {
|
|
2555
2718
|
if (func1(data1) < 1) {
|
|
2556
|
-
|
|
2719
|
+
validate52.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/cursor/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2557
2720
|
return false;
|
|
2558
2721
|
}
|
|
2559
2722
|
}
|
|
2560
2723
|
}
|
|
2561
2724
|
else {
|
|
2562
|
-
|
|
2725
|
+
validate52.errors = [{ instancePath: instancePath + "/cursor", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2563
2726
|
return false;
|
|
2564
2727
|
}
|
|
2565
2728
|
}
|
|
@@ -2573,13 +2736,13 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2573
2736
|
let data2 = data.pending;
|
|
2574
2737
|
const _errs7 = errors;
|
|
2575
2738
|
if (!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))) {
|
|
2576
|
-
|
|
2739
|
+
validate52.errors = [{ instancePath: instancePath + "/pending", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/pending/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
2577
2740
|
return false;
|
|
2578
2741
|
}
|
|
2579
2742
|
if (errors === _errs7) {
|
|
2580
2743
|
if ((typeof data2 == "number") && (isFinite(data2))) {
|
|
2581
2744
|
if (data2 < 0 || isNaN(data2)) {
|
|
2582
|
-
|
|
2745
|
+
validate52.errors = [{ instancePath: instancePath + "/pending", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/pending/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
2583
2746
|
return false;
|
|
2584
2747
|
}
|
|
2585
2748
|
}
|
|
@@ -2593,7 +2756,7 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2593
2756
|
if (data.healthy !== undefined) {
|
|
2594
2757
|
const _errs9 = errors;
|
|
2595
2758
|
if (typeof data.healthy !== "boolean") {
|
|
2596
|
-
|
|
2759
|
+
validate52.errors = [{ instancePath: instancePath + "/healthy", schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/properties/healthy/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
2597
2760
|
return false;
|
|
2598
2761
|
}
|
|
2599
2762
|
var valid1 = _errs9 === errors;
|
|
@@ -2608,14 +2771,14 @@ function validate50(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2608
2771
|
}
|
|
2609
2772
|
}
|
|
2610
2773
|
else {
|
|
2611
|
-
|
|
2774
|
+
validate52.errors = [{ instancePath, schemaPath: "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UISummary/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2612
2775
|
return false;
|
|
2613
2776
|
}
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
export const validateUIRequest =
|
|
2617
|
-
const
|
|
2618
|
-
function
|
|
2777
|
+
} validate52.errors = vErrors; return errors === 0; }
|
|
2778
|
+
validate52.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2779
|
+
export const validateUIRequest = validate53;
|
|
2780
|
+
const schema66 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://brokerkit.dev/schema/operator/v1/runtime/UIRequest", "$ref": "https://brokerkit.dev/schema/operator/v1/runtime/components#/$defs/UIRequest" };
|
|
2781
|
+
function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate54.evaluated; if (evaluated0.dynamicProps) {
|
|
2619
2782
|
evaluated0.props = undefined;
|
|
2620
2783
|
} if (evaluated0.dynamicItems) {
|
|
2621
2784
|
evaluated0.items = undefined;
|
|
@@ -2623,14 +2786,14 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2623
2786
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2624
2787
|
let missing0;
|
|
2625
2788
|
if (((((data.source_id === undefined) && (missing0 = "source_id")) || ((data.source_label === undefined) && (missing0 = "source_label"))) || ((data.handle === undefined) && (missing0 = "handle"))) || ((data.request === undefined) && (missing0 = "request"))) {
|
|
2626
|
-
|
|
2789
|
+
validate54.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
2627
2790
|
return false;
|
|
2628
2791
|
}
|
|
2629
2792
|
else {
|
|
2630
2793
|
const _errs1 = errors;
|
|
2631
2794
|
for (const key0 in data) {
|
|
2632
2795
|
if (!((((key0 === "source_id") || (key0 === "source_label")) || (key0 === "handle")) || (key0 === "request"))) {
|
|
2633
|
-
|
|
2796
|
+
validate54.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
2634
2797
|
return false;
|
|
2635
2798
|
break;
|
|
2636
2799
|
}
|
|
@@ -2642,18 +2805,18 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2642
2805
|
if (errors === _errs2) {
|
|
2643
2806
|
if (typeof data0 === "string") {
|
|
2644
2807
|
if (func1(data0) > 128) {
|
|
2645
|
-
|
|
2808
|
+
validate54.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
2646
2809
|
return false;
|
|
2647
2810
|
}
|
|
2648
2811
|
else {
|
|
2649
2812
|
if (func1(data0) < 1) {
|
|
2650
|
-
|
|
2813
|
+
validate54.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2651
2814
|
return false;
|
|
2652
2815
|
}
|
|
2653
2816
|
}
|
|
2654
2817
|
}
|
|
2655
2818
|
else {
|
|
2656
|
-
|
|
2819
|
+
validate54.errors = [{ instancePath: instancePath + "/source_id", schemaPath: "#/properties/source_id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2657
2820
|
return false;
|
|
2658
2821
|
}
|
|
2659
2822
|
}
|
|
@@ -2669,18 +2832,18 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2669
2832
|
if (errors === _errs4) {
|
|
2670
2833
|
if (typeof data1 === "string") {
|
|
2671
2834
|
if (func1(data1) > 200) {
|
|
2672
|
-
|
|
2835
|
+
validate54.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
|
|
2673
2836
|
return false;
|
|
2674
2837
|
}
|
|
2675
2838
|
else {
|
|
2676
2839
|
if (func1(data1) < 1) {
|
|
2677
|
-
|
|
2840
|
+
validate54.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
2678
2841
|
return false;
|
|
2679
2842
|
}
|
|
2680
2843
|
}
|
|
2681
2844
|
}
|
|
2682
2845
|
else {
|
|
2683
|
-
|
|
2846
|
+
validate54.errors = [{ instancePath: instancePath + "/source_label", schemaPath: "#/properties/source_label/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2684
2847
|
return false;
|
|
2685
2848
|
}
|
|
2686
2849
|
}
|
|
@@ -2696,24 +2859,24 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2696
2859
|
if (errors === _errs6) {
|
|
2697
2860
|
if (typeof data2 === "string") {
|
|
2698
2861
|
if (func1(data2) > 256) {
|
|
2699
|
-
|
|
2862
|
+
validate54.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" }];
|
|
2700
2863
|
return false;
|
|
2701
2864
|
}
|
|
2702
2865
|
else {
|
|
2703
2866
|
if (func1(data2) < 22) {
|
|
2704
|
-
|
|
2867
|
+
validate54.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/minLength", keyword: "minLength", params: { limit: 22 }, message: "must NOT have fewer than 22 characters" }];
|
|
2705
2868
|
return false;
|
|
2706
2869
|
}
|
|
2707
2870
|
else {
|
|
2708
2871
|
if (!pattern4.test(data2)) {
|
|
2709
|
-
|
|
2872
|
+
validate54.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
2710
2873
|
return false;
|
|
2711
2874
|
}
|
|
2712
2875
|
}
|
|
2713
2876
|
}
|
|
2714
2877
|
}
|
|
2715
2878
|
else {
|
|
2716
|
-
|
|
2879
|
+
validate54.errors = [{ instancePath: instancePath + "/handle", schemaPath: "#/properties/handle/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2717
2880
|
return false;
|
|
2718
2881
|
}
|
|
2719
2882
|
}
|
|
@@ -2725,8 +2888,8 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2725
2888
|
if (valid0) {
|
|
2726
2889
|
if (data.request !== undefined) {
|
|
2727
2890
|
const _errs8 = errors;
|
|
2728
|
-
if (!(
|
|
2729
|
-
vErrors = vErrors === null ?
|
|
2891
|
+
if (!(validate32(data.request, { instancePath: instancePath + "/request", parentData: data, parentDataProperty: "request", rootData, dynamicAnchors }))) {
|
|
2892
|
+
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
2730
2893
|
errors = vErrors.length;
|
|
2731
2894
|
}
|
|
2732
2895
|
var valid0 = _errs8 === errors;
|
|
@@ -2741,17 +2904,17 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2741
2904
|
}
|
|
2742
2905
|
}
|
|
2743
2906
|
else {
|
|
2744
|
-
|
|
2907
|
+
validate54.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
2745
2908
|
return false;
|
|
2746
2909
|
}
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
|
-
function
|
|
2910
|
+
} validate54.errors = vErrors; return errors === 0; }
|
|
2911
|
+
validate54.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
2912
|
+
function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://brokerkit.dev/schema/operator/v1/runtime/UIRequest" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate53.evaluated; if (evaluated0.dynamicProps) {
|
|
2750
2913
|
evaluated0.props = undefined;
|
|
2751
2914
|
} if (evaluated0.dynamicItems) {
|
|
2752
2915
|
evaluated0.items = undefined;
|
|
2753
|
-
} if (!(
|
|
2754
|
-
vErrors = vErrors === null ?
|
|
2916
|
+
} if (!(validate54(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
2917
|
+
vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
|
|
2755
2918
|
errors = vErrors.length;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2919
|
+
} validate53.errors = vErrors; return errors === 0; }
|
|
2920
|
+
validate53.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|