@enbox/dwn-sdk-js 0.3.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.mjs +11 -11
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +175 -512
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/dwn-error.js +1 -3
- package/dist/esm/src/core/dwn-error.js.map +1 -1
- package/dist/esm/src/core/messages-grant-authorization.js +1 -17
- package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
- package/dist/esm/src/core/replication-apply.js +200 -0
- package/dist/esm/src/core/replication-apply.js.map +1 -0
- package/dist/esm/src/dwn.js +212 -0
- package/dist/esm/src/dwn.js.map +1 -1
- package/dist/esm/src/handlers/messages-sync.js +66 -369
- package/dist/esm/src/handlers/messages-sync.js.map +1 -1
- package/dist/esm/src/handlers/records-write.js +18 -12
- package/dist/esm/src/handlers/records-write.js.map +1 -1
- package/dist/esm/src/index.js +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/interfaces/messages-sync.js +0 -11
- package/dist/esm/src/interfaces/messages-sync.js.map +1 -1
- package/dist/esm/tests/core/replication-apply.spec.js +220 -0
- package/dist/esm/tests/core/replication-apply.spec.js.map +1 -0
- package/dist/esm/tests/dwn.spec.js +139 -2
- package/dist/esm/tests/dwn.spec.js.map +1 -1
- package/dist/esm/tests/features/records-record-limit.spec.js +14 -0
- package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-sync.spec.js +1 -684
- package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-write.spec.js +43 -2
- package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
- package/dist/esm/tests/test-suite.js +0 -2
- package/dist/esm/tests/test-suite.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/dwn-error.d.ts +1 -3
- package/dist/types/src/core/dwn-error.d.ts.map +1 -1
- package/dist/types/src/core/messages-grant-authorization.d.ts +0 -1
- package/dist/types/src/core/messages-grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/replication-apply.d.ts +93 -0
- package/dist/types/src/core/replication-apply.d.ts.map +1 -0
- package/dist/types/src/dwn.d.ts +22 -1
- package/dist/types/src/dwn.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-sync.d.ts +10 -54
- package/dist/types/src/handlers/messages-sync.d.ts.map +1 -1
- package/dist/types/src/handlers/records-write.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/messages-sync.d.ts +0 -3
- package/dist/types/src/interfaces/messages-sync.d.ts.map +1 -1
- package/dist/types/src/types/messages-types.d.ts +0 -18
- package/dist/types/src/types/messages-types.d.ts.map +1 -1
- package/dist/types/tests/core/replication-apply.spec.d.ts +2 -0
- package/dist/types/tests/core/replication-apply.spec.d.ts.map +1 -0
- package/dist/types/tests/dwn.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
- package/dist/types/tests/test-suite.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/dwn-error.ts +1 -3
- package/src/core/messages-grant-authorization.ts +1 -31
- package/src/core/protocol-authorization-validation.ts +2 -2
- package/src/core/replication-apply.ts +272 -0
- package/src/dwn.ts +296 -2
- package/src/handlers/messages-sync.ts +92 -585
- package/src/handlers/records-write.ts +18 -13
- package/src/index.ts +3 -4
- package/src/interfaces/messages-sync.ts +8 -25
- package/src/types/messages-types.ts +0 -20
- package/dist/esm/src/sync/records-projection.js +0 -228
- package/dist/esm/src/sync/records-projection.js.map +0 -1
- package/dist/esm/tests/sync/records-projection.spec.js +0 -245
- package/dist/esm/tests/sync/records-projection.spec.js.map +0 -1
- package/dist/types/src/sync/records-projection.d.ts +0 -98
- package/dist/types/src/sync/records-projection.d.ts.map +0 -1
- package/dist/types/tests/sync/records-projection.spec.d.ts +0 -2
- package/dist/types/tests/sync/records-projection.spec.d.ts.map +0 -1
- package/src/sync/records-projection.ts +0 -328
|
@@ -7159,7 +7159,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7159
7159
|
} validate59.errors = vErrors; return errors === 0; }
|
|
7160
7160
|
validate59.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7161
7161
|
export const MessagesSync = validate62;
|
|
7162
|
-
const schema88 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-sync.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "action"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Sync"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "action": { "enum": ["root", "subtree", "leaves", "diff"], "type": "string" }, "protocol": { "type": "string" }, "
|
|
7162
|
+
const schema88 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-sync.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "action"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Sync"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "action": { "enum": ["root", "subtree", "leaves", "diff"], "type": "string" }, "protocol": { "type": "string" }, "prefix": { "type": "string", "pattern": "^[01]*$" }, "permissionGrantIds": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true }, "hashes": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Map of { bitPrefix: hexHash } for the 'diff' action." }, "depth": { "type": "integer", "minimum": 1, "maximum": 256, "description": "Bit depth at which the client computed its subtree hashes." } }, "allOf": [{ "if": { "properties": { "action": { "const": "subtree" } } }, "then": { "required": ["prefix"] } }, { "if": { "properties": { "action": { "const": "leaves" } } }, "then": { "required": ["prefix"] } }, { "if": { "properties": { "action": { "const": "diff" } } }, "then": { "required": ["hashes", "depth"] } }] } } };
|
|
7163
7163
|
const pattern37 = new RegExp("^[01]*$", "u");
|
|
7164
7164
|
function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-sync.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate62.evaluated; if (evaluated0.dynamicProps) {
|
|
7165
7165
|
evaluated0.props = undefined;
|
|
@@ -7202,16 +7202,17 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7202
7202
|
let valid2 = true;
|
|
7203
7203
|
const _errs7 = errors;
|
|
7204
7204
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7205
|
+
if (data1.action !== undefined) {
|
|
7206
|
+
if ("subtree" !== data1.action) {
|
|
7207
|
+
const err0 = {};
|
|
7208
|
+
if (vErrors === null) {
|
|
7209
|
+
vErrors = [err0];
|
|
7210
|
+
}
|
|
7211
|
+
else {
|
|
7212
|
+
vErrors.push(err0);
|
|
7213
|
+
}
|
|
7214
|
+
errors++;
|
|
7213
7215
|
}
|
|
7214
|
-
errors++;
|
|
7215
7216
|
}
|
|
7216
7217
|
}
|
|
7217
7218
|
var _valid0 = _errs7 === errors;
|
|
@@ -7225,57 +7226,24 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7225
7226
|
}
|
|
7226
7227
|
}
|
|
7227
7228
|
if (_valid0) {
|
|
7228
|
-
const _errs8 = errors;
|
|
7229
7229
|
const _errs9 = errors;
|
|
7230
|
-
const _errs10 = errors;
|
|
7231
7230
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7232
|
-
let
|
|
7233
|
-
if ((data1.
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
vErrors = [err1];
|
|
7237
|
-
}
|
|
7238
|
-
else {
|
|
7239
|
-
vErrors.push(err1);
|
|
7240
|
-
}
|
|
7241
|
-
errors++;
|
|
7242
|
-
}
|
|
7243
|
-
}
|
|
7244
|
-
var valid3 = _errs10 === errors;
|
|
7245
|
-
if (valid3) {
|
|
7246
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7247
|
-
return false;
|
|
7248
|
-
}
|
|
7249
|
-
else {
|
|
7250
|
-
errors = _errs9;
|
|
7251
|
-
if (vErrors !== null) {
|
|
7252
|
-
if (_errs9) {
|
|
7253
|
-
vErrors.length = _errs9;
|
|
7254
|
-
}
|
|
7255
|
-
else {
|
|
7256
|
-
vErrors = null;
|
|
7257
|
-
}
|
|
7258
|
-
}
|
|
7259
|
-
}
|
|
7260
|
-
if (errors === _errs8) {
|
|
7261
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7262
|
-
let missing3;
|
|
7263
|
-
if ((data1.projectionScopes === undefined) && (missing3 = "projectionScopes")) {
|
|
7264
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
7265
|
-
return false;
|
|
7266
|
-
}
|
|
7231
|
+
let missing1;
|
|
7232
|
+
if ((data1.prefix === undefined) && (missing1 = "prefix")) {
|
|
7233
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
7234
|
+
return false;
|
|
7267
7235
|
}
|
|
7268
7236
|
}
|
|
7269
|
-
var _valid0 =
|
|
7237
|
+
var _valid0 = _errs9 === errors;
|
|
7270
7238
|
valid2 = _valid0;
|
|
7271
7239
|
}
|
|
7272
7240
|
if (!valid2) {
|
|
7273
|
-
const
|
|
7241
|
+
const err1 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7274
7242
|
if (vErrors === null) {
|
|
7275
|
-
vErrors = [
|
|
7243
|
+
vErrors = [err1];
|
|
7276
7244
|
}
|
|
7277
7245
|
else {
|
|
7278
|
-
vErrors.push(
|
|
7246
|
+
vErrors.push(err1);
|
|
7279
7247
|
}
|
|
7280
7248
|
errors++;
|
|
7281
7249
|
validate62.errors = vErrors;
|
|
@@ -7283,28 +7251,29 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7283
7251
|
}
|
|
7284
7252
|
var valid1 = _errs5 === errors;
|
|
7285
7253
|
if (valid1) {
|
|
7254
|
+
const _errs10 = errors;
|
|
7286
7255
|
const _errs11 = errors;
|
|
7287
|
-
const _errs12 = errors;
|
|
7288
7256
|
let valid4 = true;
|
|
7289
|
-
const
|
|
7257
|
+
const _errs12 = errors;
|
|
7290
7258
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7259
|
+
if (data1.action !== undefined) {
|
|
7260
|
+
if ("leaves" !== data1.action) {
|
|
7261
|
+
const err2 = {};
|
|
7262
|
+
if (vErrors === null) {
|
|
7263
|
+
vErrors = [err2];
|
|
7264
|
+
}
|
|
7265
|
+
else {
|
|
7266
|
+
vErrors.push(err2);
|
|
7267
|
+
}
|
|
7268
|
+
errors++;
|
|
7299
7269
|
}
|
|
7300
|
-
errors++;
|
|
7301
7270
|
}
|
|
7302
7271
|
}
|
|
7303
|
-
var _valid1 =
|
|
7304
|
-
errors =
|
|
7272
|
+
var _valid1 = _errs12 === errors;
|
|
7273
|
+
errors = _errs11;
|
|
7305
7274
|
if (vErrors !== null) {
|
|
7306
|
-
if (
|
|
7307
|
-
vErrors.length =
|
|
7275
|
+
if (_errs11) {
|
|
7276
|
+
vErrors.length = _errs11;
|
|
7308
7277
|
}
|
|
7309
7278
|
else {
|
|
7310
7279
|
vErrors = null;
|
|
@@ -7312,237 +7281,94 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7312
7281
|
}
|
|
7313
7282
|
if (_valid1) {
|
|
7314
7283
|
const _errs14 = errors;
|
|
7315
|
-
const _errs15 = errors;
|
|
7316
|
-
const _errs16 = errors;
|
|
7317
7284
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7318
|
-
let
|
|
7319
|
-
if ((data1.
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
vErrors = [err4];
|
|
7323
|
-
}
|
|
7324
|
-
else {
|
|
7325
|
-
vErrors.push(err4);
|
|
7326
|
-
}
|
|
7327
|
-
errors++;
|
|
7328
|
-
}
|
|
7329
|
-
}
|
|
7330
|
-
var valid5 = _errs16 === errors;
|
|
7331
|
-
if (valid5) {
|
|
7332
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7333
|
-
return false;
|
|
7334
|
-
}
|
|
7335
|
-
else {
|
|
7336
|
-
errors = _errs15;
|
|
7337
|
-
if (vErrors !== null) {
|
|
7338
|
-
if (_errs15) {
|
|
7339
|
-
vErrors.length = _errs15;
|
|
7340
|
-
}
|
|
7341
|
-
else {
|
|
7342
|
-
vErrors = null;
|
|
7343
|
-
}
|
|
7344
|
-
}
|
|
7345
|
-
}
|
|
7346
|
-
if (errors === _errs14) {
|
|
7347
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7348
|
-
let missing6;
|
|
7349
|
-
if ((data1.projectionRootVersion === undefined) && (missing6 = "projectionRootVersion")) {
|
|
7350
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" }];
|
|
7351
|
-
return false;
|
|
7352
|
-
}
|
|
7285
|
+
let missing2;
|
|
7286
|
+
if ((data1.prefix === undefined) && (missing2 = "prefix")) {
|
|
7287
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
7288
|
+
return false;
|
|
7353
7289
|
}
|
|
7354
7290
|
}
|
|
7355
7291
|
var _valid1 = _errs14 === errors;
|
|
7356
7292
|
valid4 = _valid1;
|
|
7357
7293
|
}
|
|
7358
7294
|
if (!valid4) {
|
|
7359
|
-
const
|
|
7295
|
+
const err3 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7360
7296
|
if (vErrors === null) {
|
|
7361
|
-
vErrors = [
|
|
7297
|
+
vErrors = [err3];
|
|
7362
7298
|
}
|
|
7363
7299
|
else {
|
|
7364
|
-
vErrors.push(
|
|
7300
|
+
vErrors.push(err3);
|
|
7365
7301
|
}
|
|
7366
7302
|
errors++;
|
|
7367
7303
|
validate62.errors = vErrors;
|
|
7368
7304
|
return false;
|
|
7369
7305
|
}
|
|
7370
|
-
var valid1 =
|
|
7306
|
+
var valid1 = _errs10 === errors;
|
|
7371
7307
|
if (valid1) {
|
|
7372
|
-
const
|
|
7373
|
-
const
|
|
7308
|
+
const _errs15 = errors;
|
|
7309
|
+
const _errs16 = errors;
|
|
7374
7310
|
let valid6 = true;
|
|
7375
|
-
const
|
|
7311
|
+
const _errs17 = errors;
|
|
7376
7312
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7377
7313
|
if (data1.action !== undefined) {
|
|
7378
|
-
if ("
|
|
7379
|
-
const
|
|
7314
|
+
if ("diff" !== data1.action) {
|
|
7315
|
+
const err4 = {};
|
|
7380
7316
|
if (vErrors === null) {
|
|
7381
|
-
vErrors = [
|
|
7317
|
+
vErrors = [err4];
|
|
7382
7318
|
}
|
|
7383
7319
|
else {
|
|
7384
|
-
vErrors.push(
|
|
7320
|
+
vErrors.push(err4);
|
|
7385
7321
|
}
|
|
7386
7322
|
errors++;
|
|
7387
7323
|
}
|
|
7388
7324
|
}
|
|
7389
7325
|
}
|
|
7390
|
-
var _valid2 =
|
|
7391
|
-
errors =
|
|
7326
|
+
var _valid2 = _errs17 === errors;
|
|
7327
|
+
errors = _errs16;
|
|
7392
7328
|
if (vErrors !== null) {
|
|
7393
|
-
if (
|
|
7394
|
-
vErrors.length =
|
|
7329
|
+
if (_errs16) {
|
|
7330
|
+
vErrors.length = _errs16;
|
|
7395
7331
|
}
|
|
7396
7332
|
else {
|
|
7397
7333
|
vErrors = null;
|
|
7398
7334
|
}
|
|
7399
7335
|
}
|
|
7400
7336
|
if (_valid2) {
|
|
7401
|
-
const
|
|
7337
|
+
const _errs19 = errors;
|
|
7402
7338
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7403
|
-
let
|
|
7404
|
-
if ((data1.
|
|
7405
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/then/required", keyword: "required", params: { missingProperty:
|
|
7339
|
+
let missing3;
|
|
7340
|
+
if (((data1.hashes === undefined) && (missing3 = "hashes")) || ((data1.depth === undefined) && (missing3 = "depth"))) {
|
|
7341
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
7406
7342
|
return false;
|
|
7407
7343
|
}
|
|
7408
7344
|
}
|
|
7409
|
-
var _valid2 =
|
|
7345
|
+
var _valid2 = _errs19 === errors;
|
|
7410
7346
|
valid6 = _valid2;
|
|
7411
7347
|
}
|
|
7412
7348
|
if (!valid6) {
|
|
7413
|
-
const
|
|
7349
|
+
const err5 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7414
7350
|
if (vErrors === null) {
|
|
7415
|
-
vErrors = [
|
|
7351
|
+
vErrors = [err5];
|
|
7416
7352
|
}
|
|
7417
7353
|
else {
|
|
7418
|
-
vErrors.push(
|
|
7354
|
+
vErrors.push(err5);
|
|
7419
7355
|
}
|
|
7420
7356
|
errors++;
|
|
7421
7357
|
validate62.errors = vErrors;
|
|
7422
7358
|
return false;
|
|
7423
7359
|
}
|
|
7424
|
-
var valid1 =
|
|
7425
|
-
if (valid1) {
|
|
7426
|
-
const _errs22 = errors;
|
|
7427
|
-
const _errs23 = errors;
|
|
7428
|
-
let valid8 = true;
|
|
7429
|
-
const _errs24 = errors;
|
|
7430
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7431
|
-
if (data1.action !== undefined) {
|
|
7432
|
-
if ("leaves" !== data1.action) {
|
|
7433
|
-
const err8 = {};
|
|
7434
|
-
if (vErrors === null) {
|
|
7435
|
-
vErrors = [err8];
|
|
7436
|
-
}
|
|
7437
|
-
else {
|
|
7438
|
-
vErrors.push(err8);
|
|
7439
|
-
}
|
|
7440
|
-
errors++;
|
|
7441
|
-
}
|
|
7442
|
-
}
|
|
7443
|
-
}
|
|
7444
|
-
var _valid3 = _errs24 === errors;
|
|
7445
|
-
errors = _errs23;
|
|
7446
|
-
if (vErrors !== null) {
|
|
7447
|
-
if (_errs23) {
|
|
7448
|
-
vErrors.length = _errs23;
|
|
7449
|
-
}
|
|
7450
|
-
else {
|
|
7451
|
-
vErrors = null;
|
|
7452
|
-
}
|
|
7453
|
-
}
|
|
7454
|
-
if (_valid3) {
|
|
7455
|
-
const _errs26 = errors;
|
|
7456
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7457
|
-
let missing8;
|
|
7458
|
-
if ((data1.prefix === undefined) && (missing8 = "prefix")) {
|
|
7459
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/3/then/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" }];
|
|
7460
|
-
return false;
|
|
7461
|
-
}
|
|
7462
|
-
}
|
|
7463
|
-
var _valid3 = _errs26 === errors;
|
|
7464
|
-
valid8 = _valid3;
|
|
7465
|
-
}
|
|
7466
|
-
if (!valid8) {
|
|
7467
|
-
const err9 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/3/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7468
|
-
if (vErrors === null) {
|
|
7469
|
-
vErrors = [err9];
|
|
7470
|
-
}
|
|
7471
|
-
else {
|
|
7472
|
-
vErrors.push(err9);
|
|
7473
|
-
}
|
|
7474
|
-
errors++;
|
|
7475
|
-
validate62.errors = vErrors;
|
|
7476
|
-
return false;
|
|
7477
|
-
}
|
|
7478
|
-
var valid1 = _errs22 === errors;
|
|
7479
|
-
if (valid1) {
|
|
7480
|
-
const _errs27 = errors;
|
|
7481
|
-
const _errs28 = errors;
|
|
7482
|
-
let valid10 = true;
|
|
7483
|
-
const _errs29 = errors;
|
|
7484
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7485
|
-
if (data1.action !== undefined) {
|
|
7486
|
-
if ("diff" !== data1.action) {
|
|
7487
|
-
const err10 = {};
|
|
7488
|
-
if (vErrors === null) {
|
|
7489
|
-
vErrors = [err10];
|
|
7490
|
-
}
|
|
7491
|
-
else {
|
|
7492
|
-
vErrors.push(err10);
|
|
7493
|
-
}
|
|
7494
|
-
errors++;
|
|
7495
|
-
}
|
|
7496
|
-
}
|
|
7497
|
-
}
|
|
7498
|
-
var _valid4 = _errs29 === errors;
|
|
7499
|
-
errors = _errs28;
|
|
7500
|
-
if (vErrors !== null) {
|
|
7501
|
-
if (_errs28) {
|
|
7502
|
-
vErrors.length = _errs28;
|
|
7503
|
-
}
|
|
7504
|
-
else {
|
|
7505
|
-
vErrors = null;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
if (_valid4) {
|
|
7509
|
-
const _errs31 = errors;
|
|
7510
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7511
|
-
let missing9;
|
|
7512
|
-
if (((data1.hashes === undefined) && (missing9 = "hashes")) || ((data1.depth === undefined) && (missing9 = "depth"))) {
|
|
7513
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/4/then/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" }];
|
|
7514
|
-
return false;
|
|
7515
|
-
}
|
|
7516
|
-
}
|
|
7517
|
-
var _valid4 = _errs31 === errors;
|
|
7518
|
-
valid10 = _valid4;
|
|
7519
|
-
}
|
|
7520
|
-
if (!valid10) {
|
|
7521
|
-
const err11 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/4/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7522
|
-
if (vErrors === null) {
|
|
7523
|
-
vErrors = [err11];
|
|
7524
|
-
}
|
|
7525
|
-
else {
|
|
7526
|
-
vErrors.push(err11);
|
|
7527
|
-
}
|
|
7528
|
-
errors++;
|
|
7529
|
-
validate62.errors = vErrors;
|
|
7530
|
-
return false;
|
|
7531
|
-
}
|
|
7532
|
-
var valid1 = _errs27 === errors;
|
|
7533
|
-
}
|
|
7534
|
-
}
|
|
7360
|
+
var valid1 = _errs15 === errors;
|
|
7535
7361
|
}
|
|
7536
7362
|
}
|
|
7537
7363
|
if (errors === _errs3) {
|
|
7538
7364
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7539
|
-
let
|
|
7540
|
-
if (((((data1.interface === undefined) && (
|
|
7541
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty:
|
|
7365
|
+
let missing4;
|
|
7366
|
+
if (((((data1.interface === undefined) && (missing4 = "interface")) || ((data1.method === undefined) && (missing4 = "method"))) || ((data1.messageTimestamp === undefined) && (missing4 = "messageTimestamp"))) || ((data1.action === undefined) && (missing4 = "action"))) {
|
|
7367
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" }];
|
|
7542
7368
|
return false;
|
|
7543
7369
|
}
|
|
7544
7370
|
else {
|
|
7545
|
-
const
|
|
7371
|
+
const _errs20 = errors;
|
|
7546
7372
|
for (const key1 in data1) {
|
|
7547
7373
|
if (!(func2.call(schema88.properties.descriptor.properties, key1))) {
|
|
7548
7374
|
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
@@ -7550,10 +7376,10 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7550
7376
|
break;
|
|
7551
7377
|
}
|
|
7552
7378
|
}
|
|
7553
|
-
if (
|
|
7379
|
+
if (_errs20 === errors) {
|
|
7554
7380
|
if (data1.interface !== undefined) {
|
|
7555
7381
|
let data5 = data1.interface;
|
|
7556
|
-
const
|
|
7382
|
+
const _errs21 = errors;
|
|
7557
7383
|
if (typeof data5 !== "string") {
|
|
7558
7384
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7559
7385
|
return false;
|
|
@@ -7562,15 +7388,15 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7562
7388
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema88.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
7563
7389
|
return false;
|
|
7564
7390
|
}
|
|
7565
|
-
var
|
|
7391
|
+
var valid8 = _errs21 === errors;
|
|
7566
7392
|
}
|
|
7567
7393
|
else {
|
|
7568
|
-
var
|
|
7394
|
+
var valid8 = true;
|
|
7569
7395
|
}
|
|
7570
|
-
if (
|
|
7396
|
+
if (valid8) {
|
|
7571
7397
|
if (data1.method !== undefined) {
|
|
7572
7398
|
let data6 = data1.method;
|
|
7573
|
-
const
|
|
7399
|
+
const _errs23 = errors;
|
|
7574
7400
|
if (typeof data6 !== "string") {
|
|
7575
7401
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7576
7402
|
return false;
|
|
@@ -7579,17 +7405,17 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7579
7405
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema88.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
7580
7406
|
return false;
|
|
7581
7407
|
}
|
|
7582
|
-
var
|
|
7408
|
+
var valid8 = _errs23 === errors;
|
|
7583
7409
|
}
|
|
7584
7410
|
else {
|
|
7585
|
-
var
|
|
7411
|
+
var valid8 = true;
|
|
7586
7412
|
}
|
|
7587
|
-
if (
|
|
7413
|
+
if (valid8) {
|
|
7588
7414
|
if (data1.messageTimestamp !== undefined) {
|
|
7589
7415
|
let data7 = data1.messageTimestamp;
|
|
7590
|
-
const
|
|
7591
|
-
const
|
|
7592
|
-
if (errors ===
|
|
7416
|
+
const _errs25 = errors;
|
|
7417
|
+
const _errs26 = errors;
|
|
7418
|
+
if (errors === _errs26) {
|
|
7593
7419
|
if (typeof data7 === "string") {
|
|
7594
7420
|
if (!pattern14.test(data7)) {
|
|
7595
7421
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
@@ -7601,15 +7427,15 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7601
7427
|
return false;
|
|
7602
7428
|
}
|
|
7603
7429
|
}
|
|
7604
|
-
var
|
|
7430
|
+
var valid8 = _errs25 === errors;
|
|
7605
7431
|
}
|
|
7606
7432
|
else {
|
|
7607
|
-
var
|
|
7433
|
+
var valid8 = true;
|
|
7608
7434
|
}
|
|
7609
|
-
if (
|
|
7435
|
+
if (valid8) {
|
|
7610
7436
|
if (data1.action !== undefined) {
|
|
7611
7437
|
let data8 = data1.action;
|
|
7612
|
-
const
|
|
7438
|
+
const _errs28 = errors;
|
|
7613
7439
|
if (typeof data8 !== "string") {
|
|
7614
7440
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7615
7441
|
return false;
|
|
@@ -7618,317 +7444,154 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7618
7444
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/enum", keyword: "enum", params: { allowedValues: schema88.properties.descriptor.properties.action.enum }, message: "must be equal to one of the allowed values" }];
|
|
7619
7445
|
return false;
|
|
7620
7446
|
}
|
|
7621
|
-
var
|
|
7447
|
+
var valid8 = _errs28 === errors;
|
|
7622
7448
|
}
|
|
7623
7449
|
else {
|
|
7624
|
-
var
|
|
7450
|
+
var valid8 = true;
|
|
7625
7451
|
}
|
|
7626
|
-
if (
|
|
7452
|
+
if (valid8) {
|
|
7627
7453
|
if (data1.protocol !== undefined) {
|
|
7628
|
-
const
|
|
7454
|
+
const _errs30 = errors;
|
|
7629
7455
|
if (typeof data1.protocol !== "string") {
|
|
7630
7456
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/protocol", schemaPath: "#/properties/descriptor/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7631
7457
|
return false;
|
|
7632
7458
|
}
|
|
7633
|
-
var
|
|
7459
|
+
var valid8 = _errs30 === errors;
|
|
7634
7460
|
}
|
|
7635
7461
|
else {
|
|
7636
|
-
var
|
|
7637
|
-
}
|
|
7638
|
-
if (
|
|
7639
|
-
if (data1.
|
|
7640
|
-
let data10 = data1.
|
|
7641
|
-
const
|
|
7642
|
-
if (
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7462
|
+
var valid8 = true;
|
|
7463
|
+
}
|
|
7464
|
+
if (valid8) {
|
|
7465
|
+
if (data1.prefix !== undefined) {
|
|
7466
|
+
let data10 = data1.prefix;
|
|
7467
|
+
const _errs32 = errors;
|
|
7468
|
+
if (errors === _errs32) {
|
|
7469
|
+
if (typeof data10 === "string") {
|
|
7470
|
+
if (!pattern37.test(data10)) {
|
|
7471
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/prefix", schemaPath: "#/properties/descriptor/properties/prefix/pattern", keyword: "pattern", params: { pattern: "^[01]*$" }, message: "must match pattern \"" + "^[01]*$" + "\"" }];
|
|
7472
|
+
return false;
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
else {
|
|
7476
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/prefix", schemaPath: "#/properties/descriptor/properties/prefix/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7477
|
+
return false;
|
|
7478
|
+
}
|
|
7649
7479
|
}
|
|
7650
|
-
var
|
|
7480
|
+
var valid8 = _errs32 === errors;
|
|
7651
7481
|
}
|
|
7652
7482
|
else {
|
|
7653
|
-
var
|
|
7483
|
+
var valid8 = true;
|
|
7654
7484
|
}
|
|
7655
|
-
if (
|
|
7656
|
-
if (data1.
|
|
7657
|
-
let data11 = data1.
|
|
7658
|
-
const
|
|
7659
|
-
if (errors ===
|
|
7485
|
+
if (valid8) {
|
|
7486
|
+
if (data1.permissionGrantIds !== undefined) {
|
|
7487
|
+
let data11 = data1.permissionGrantIds;
|
|
7488
|
+
const _errs34 = errors;
|
|
7489
|
+
if (errors === _errs34) {
|
|
7660
7490
|
if (Array.isArray(data11)) {
|
|
7661
7491
|
if (data11.length < 1) {
|
|
7662
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/
|
|
7492
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
7663
7493
|
return false;
|
|
7664
7494
|
}
|
|
7665
7495
|
else {
|
|
7666
|
-
var
|
|
7496
|
+
var valid10 = true;
|
|
7667
7497
|
const len0 = data11.length;
|
|
7668
7498
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
const _errs51 = errors;
|
|
7673
|
-
if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
|
|
7674
|
-
let missing11;
|
|
7675
|
-
if (((data12.protocolPath === undefined) && (missing11 = "protocolPath")) || ((data12.contextId === undefined) && (missing11 = "contextId"))) {
|
|
7676
|
-
const err12 = {};
|
|
7677
|
-
if (vErrors === null) {
|
|
7678
|
-
vErrors = [err12];
|
|
7679
|
-
}
|
|
7680
|
-
else {
|
|
7681
|
-
vErrors.push(err12);
|
|
7682
|
-
}
|
|
7683
|
-
errors++;
|
|
7684
|
-
}
|
|
7685
|
-
}
|
|
7686
|
-
var valid15 = _errs51 === errors;
|
|
7687
|
-
if (valid15) {
|
|
7688
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0, schemaPath: "#/properties/descriptor/properties/projectionScopes/items/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7499
|
+
const _errs36 = errors;
|
|
7500
|
+
if (typeof data11[i0] !== "string") {
|
|
7501
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i0, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7689
7502
|
return false;
|
|
7690
7503
|
}
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
if (_errs50) {
|
|
7695
|
-
vErrors.length = _errs50;
|
|
7696
|
-
}
|
|
7697
|
-
else {
|
|
7698
|
-
vErrors = null;
|
|
7699
|
-
}
|
|
7700
|
-
}
|
|
7504
|
+
var valid10 = _errs36 === errors;
|
|
7505
|
+
if (!valid10) {
|
|
7506
|
+
break;
|
|
7701
7507
|
}
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7508
|
+
}
|
|
7509
|
+
if (valid10) {
|
|
7510
|
+
let i1 = data11.length;
|
|
7511
|
+
let j0;
|
|
7512
|
+
if (i1 > 1) {
|
|
7513
|
+
const indices0 = {};
|
|
7514
|
+
for (; i1--;) {
|
|
7515
|
+
let item0 = data11[i1];
|
|
7516
|
+
if (typeof item0 !== "string") {
|
|
7517
|
+
continue;
|
|
7708
7518
|
}
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
return false;
|
|
7715
|
-
break;
|
|
7716
|
-
}
|
|
7717
|
-
}
|
|
7718
|
-
if (_errs52 === errors) {
|
|
7719
|
-
if (data12.protocol !== undefined) {
|
|
7720
|
-
const _errs53 = errors;
|
|
7721
|
-
if (typeof data12.protocol !== "string") {
|
|
7722
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocol", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7723
|
-
return false;
|
|
7724
|
-
}
|
|
7725
|
-
var valid16 = _errs53 === errors;
|
|
7726
|
-
}
|
|
7727
|
-
else {
|
|
7728
|
-
var valid16 = true;
|
|
7729
|
-
}
|
|
7730
|
-
if (valid16) {
|
|
7731
|
-
if (data12.protocolPath !== undefined) {
|
|
7732
|
-
let data14 = data12.protocolPath;
|
|
7733
|
-
const _errs55 = errors;
|
|
7734
|
-
if (errors === _errs55) {
|
|
7735
|
-
if (typeof data14 === "string") {
|
|
7736
|
-
if (func1(data14) > 600) {
|
|
7737
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocolPath", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
7738
|
-
return false;
|
|
7739
|
-
}
|
|
7740
|
-
}
|
|
7741
|
-
else {
|
|
7742
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocolPath", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7743
|
-
return false;
|
|
7744
|
-
}
|
|
7745
|
-
}
|
|
7746
|
-
var valid16 = _errs55 === errors;
|
|
7747
|
-
}
|
|
7748
|
-
else {
|
|
7749
|
-
var valid16 = true;
|
|
7750
|
-
}
|
|
7751
|
-
if (valid16) {
|
|
7752
|
-
if (data12.contextId !== undefined) {
|
|
7753
|
-
let data15 = data12.contextId;
|
|
7754
|
-
const _errs57 = errors;
|
|
7755
|
-
if (errors === _errs57) {
|
|
7756
|
-
if (typeof data15 === "string") {
|
|
7757
|
-
if (func1(data15) > 600) {
|
|
7758
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/contextId", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
7759
|
-
return false;
|
|
7760
|
-
}
|
|
7761
|
-
}
|
|
7762
|
-
else {
|
|
7763
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/contextId", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7764
|
-
return false;
|
|
7765
|
-
}
|
|
7766
|
-
}
|
|
7767
|
-
var valid16 = _errs57 === errors;
|
|
7768
|
-
}
|
|
7769
|
-
else {
|
|
7770
|
-
var valid16 = true;
|
|
7771
|
-
}
|
|
7772
|
-
}
|
|
7773
|
-
}
|
|
7774
|
-
}
|
|
7519
|
+
if (typeof indices0[item0] == "number") {
|
|
7520
|
+
j0 = indices0[item0];
|
|
7521
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
7522
|
+
return false;
|
|
7523
|
+
break;
|
|
7775
7524
|
}
|
|
7776
|
-
|
|
7777
|
-
else {
|
|
7778
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0, schemaPath: "#/properties/descriptor/properties/projectionScopes/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7779
|
-
return false;
|
|
7525
|
+
indices0[item0] = i1;
|
|
7780
7526
|
}
|
|
7781
7527
|
}
|
|
7782
|
-
var valid14 = _errs48 === errors;
|
|
7783
|
-
if (!valid14) {
|
|
7784
|
-
break;
|
|
7785
|
-
}
|
|
7786
7528
|
}
|
|
7787
7529
|
}
|
|
7788
7530
|
}
|
|
7789
7531
|
else {
|
|
7790
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/
|
|
7532
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7791
7533
|
return false;
|
|
7792
7534
|
}
|
|
7793
7535
|
}
|
|
7794
|
-
var
|
|
7536
|
+
var valid8 = _errs34 === errors;
|
|
7795
7537
|
}
|
|
7796
7538
|
else {
|
|
7797
|
-
var
|
|
7539
|
+
var valid8 = true;
|
|
7798
7540
|
}
|
|
7799
|
-
if (
|
|
7800
|
-
if (data1.
|
|
7801
|
-
let
|
|
7802
|
-
const
|
|
7803
|
-
if (errors ===
|
|
7804
|
-
if (typeof
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7541
|
+
if (valid8) {
|
|
7542
|
+
if (data1.hashes !== undefined) {
|
|
7543
|
+
let data13 = data1.hashes;
|
|
7544
|
+
const _errs38 = errors;
|
|
7545
|
+
if (errors === _errs38) {
|
|
7546
|
+
if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
|
|
7547
|
+
for (const key2 in data13) {
|
|
7548
|
+
const _errs41 = errors;
|
|
7549
|
+
if (typeof data13[key2] !== "string") {
|
|
7550
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/hashes/additionalProperties/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7551
|
+
return false;
|
|
7552
|
+
}
|
|
7553
|
+
var valid12 = _errs41 === errors;
|
|
7554
|
+
if (!valid12) {
|
|
7555
|
+
break;
|
|
7556
|
+
}
|
|
7808
7557
|
}
|
|
7809
7558
|
}
|
|
7810
7559
|
else {
|
|
7811
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/
|
|
7560
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes", schemaPath: "#/properties/descriptor/properties/hashes/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7812
7561
|
return false;
|
|
7813
7562
|
}
|
|
7814
7563
|
}
|
|
7815
|
-
var
|
|
7564
|
+
var valid8 = _errs38 === errors;
|
|
7816
7565
|
}
|
|
7817
7566
|
else {
|
|
7818
|
-
var
|
|
7567
|
+
var valid8 = true;
|
|
7819
7568
|
}
|
|
7820
|
-
if (
|
|
7821
|
-
if (data1.
|
|
7822
|
-
let
|
|
7823
|
-
const
|
|
7824
|
-
if (
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7569
|
+
if (valid8) {
|
|
7570
|
+
if (data1.depth !== undefined) {
|
|
7571
|
+
let data15 = data1.depth;
|
|
7572
|
+
const _errs43 = errors;
|
|
7573
|
+
if (!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))) {
|
|
7574
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
7575
|
+
return false;
|
|
7576
|
+
}
|
|
7577
|
+
if (errors === _errs43) {
|
|
7578
|
+
if ((typeof data15 == "number") && (isFinite(data15))) {
|
|
7579
|
+
if (data15 > 256 || isNaN(data15)) {
|
|
7580
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/maximum", keyword: "maximum", params: { comparison: "<=", limit: 256 }, message: "must be <= 256" }];
|
|
7828
7581
|
return false;
|
|
7829
7582
|
}
|
|
7830
7583
|
else {
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
const _errs63 = errors;
|
|
7835
|
-
if (typeof data17[i1] !== "string") {
|
|
7836
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i1, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7837
|
-
return false;
|
|
7838
|
-
}
|
|
7839
|
-
var valid17 = _errs63 === errors;
|
|
7840
|
-
if (!valid17) {
|
|
7841
|
-
break;
|
|
7842
|
-
}
|
|
7843
|
-
}
|
|
7844
|
-
if (valid17) {
|
|
7845
|
-
let i2 = data17.length;
|
|
7846
|
-
let j0;
|
|
7847
|
-
if (i2 > 1) {
|
|
7848
|
-
const indices0 = {};
|
|
7849
|
-
for (; i2--;) {
|
|
7850
|
-
let item0 = data17[i2];
|
|
7851
|
-
if (typeof item0 !== "string") {
|
|
7852
|
-
continue;
|
|
7853
|
-
}
|
|
7854
|
-
if (typeof indices0[item0] == "number") {
|
|
7855
|
-
j0 = indices0[item0];
|
|
7856
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i2, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i2 + " are identical)" }];
|
|
7857
|
-
return false;
|
|
7858
|
-
break;
|
|
7859
|
-
}
|
|
7860
|
-
indices0[item0] = i2;
|
|
7861
|
-
}
|
|
7862
|
-
}
|
|
7584
|
+
if (data15 < 1 || isNaN(data15)) {
|
|
7585
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
7586
|
+
return false;
|
|
7863
7587
|
}
|
|
7864
7588
|
}
|
|
7865
7589
|
}
|
|
7866
|
-
else {
|
|
7867
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7868
|
-
return false;
|
|
7869
|
-
}
|
|
7870
7590
|
}
|
|
7871
|
-
var
|
|
7591
|
+
var valid8 = _errs43 === errors;
|
|
7872
7592
|
}
|
|
7873
7593
|
else {
|
|
7874
|
-
var
|
|
7875
|
-
}
|
|
7876
|
-
if (valid12) {
|
|
7877
|
-
if (data1.hashes !== undefined) {
|
|
7878
|
-
let data19 = data1.hashes;
|
|
7879
|
-
const _errs65 = errors;
|
|
7880
|
-
if (errors === _errs65) {
|
|
7881
|
-
if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
|
|
7882
|
-
for (const key3 in data19) {
|
|
7883
|
-
const _errs68 = errors;
|
|
7884
|
-
if (typeof data19[key3] !== "string") {
|
|
7885
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/hashes/additionalProperties/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7886
|
-
return false;
|
|
7887
|
-
}
|
|
7888
|
-
var valid19 = _errs68 === errors;
|
|
7889
|
-
if (!valid19) {
|
|
7890
|
-
break;
|
|
7891
|
-
}
|
|
7892
|
-
}
|
|
7893
|
-
}
|
|
7894
|
-
else {
|
|
7895
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes", schemaPath: "#/properties/descriptor/properties/hashes/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7896
|
-
return false;
|
|
7897
|
-
}
|
|
7898
|
-
}
|
|
7899
|
-
var valid12 = _errs65 === errors;
|
|
7900
|
-
}
|
|
7901
|
-
else {
|
|
7902
|
-
var valid12 = true;
|
|
7903
|
-
}
|
|
7904
|
-
if (valid12) {
|
|
7905
|
-
if (data1.depth !== undefined) {
|
|
7906
|
-
let data21 = data1.depth;
|
|
7907
|
-
const _errs70 = errors;
|
|
7908
|
-
if (!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))) {
|
|
7909
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
7910
|
-
return false;
|
|
7911
|
-
}
|
|
7912
|
-
if (errors === _errs70) {
|
|
7913
|
-
if ((typeof data21 == "number") && (isFinite(data21))) {
|
|
7914
|
-
if (data21 > 256 || isNaN(data21)) {
|
|
7915
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/maximum", keyword: "maximum", params: { comparison: "<=", limit: 256 }, message: "must be <= 256" }];
|
|
7916
|
-
return false;
|
|
7917
|
-
}
|
|
7918
|
-
else {
|
|
7919
|
-
if (data21 < 1 || isNaN(data21)) {
|
|
7920
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
7921
|
-
return false;
|
|
7922
|
-
}
|
|
7923
|
-
}
|
|
7924
|
-
}
|
|
7925
|
-
}
|
|
7926
|
-
var valid12 = _errs70 === errors;
|
|
7927
|
-
}
|
|
7928
|
-
else {
|
|
7929
|
-
var valid12 = true;
|
|
7930
|
-
}
|
|
7931
|
-
}
|
|
7594
|
+
var valid8 = true;
|
|
7932
7595
|
}
|
|
7933
7596
|
}
|
|
7934
7597
|
}
|