@enbox/dwn-sdk-js 0.0.8 → 0.1.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 +5 -5
- package/dist/browser.mjs.map +3 -3
- package/dist/esm/generated/precompiled-validators.js +219 -165
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/dwn-error.js +3 -0
- package/dist/esm/src/core/dwn-error.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-action.js +5 -0
- package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js +24 -0
- package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization.js +3 -1
- package/dist/esm/src/core/protocol-authorization.js.map +1 -1
- package/dist/esm/src/core/resumable-task-manager.js +2 -0
- package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
- package/dist/esm/src/handlers/records-write.js +81 -0
- package/dist/esm/src/handlers/records-write.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-configure.js +9 -1
- package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
- package/dist/esm/src/interfaces/records-write.js +3 -0
- package/dist/esm/src/interfaces/records-write.js.map +1 -1
- package/dist/esm/src/store/storage-controller.js +64 -0
- package/dist/esm/src/store/storage-controller.js.map +1 -1
- package/dist/esm/src/types/protocols-types.js +1 -0
- package/dist/esm/src/types/protocols-types.js.map +1 -1
- package/dist/esm/tests/features/records-delivery.spec.js +236 -0
- package/dist/esm/tests/features/records-delivery.spec.js.map +1 -0
- package/dist/esm/tests/features/records-squash.spec.js +1055 -0
- package/dist/esm/tests/features/records-squash.spec.js.map +1 -0
- package/dist/esm/tests/handlers/records-write.spec.js +3 -0
- package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
- package/dist/esm/tests/test-suite.js +4 -0
- package/dist/esm/tests/test-suite.js.map +1 -1
- package/dist/esm/tests/utils/test-data-generator.js +1 -0
- package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/dwn-error.d.ts +3 -0
- package/dist/types/src/core/dwn-error.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization-validation.d.ts +9 -0
- package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
- package/dist/types/src/core/resumable-task-manager.d.ts +2 -1
- package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
- package/dist/types/src/handlers/records-write.d.ts +8 -0
- package/dist/types/src/handlers/records-write.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-write.d.ts +6 -0
- package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
- package/dist/types/src/store/storage-controller.d.ts +16 -2
- package/dist/types/src/store/storage-controller.d.ts.map +1 -1
- package/dist/types/src/types/protocols-types.d.ts +29 -2
- package/dist/types/src/types/protocols-types.d.ts.map +1 -1
- package/dist/types/src/types/records-types.d.ts +7 -0
- package/dist/types/src/types/records-types.d.ts.map +1 -1
- package/dist/types/tests/features/records-delivery.spec.d.ts +2 -0
- package/dist/types/tests/features/records-delivery.spec.d.ts.map +1 -0
- package/dist/types/tests/features/records-squash.spec.d.ts +2 -0
- package/dist/types/tests/features/records-squash.spec.d.ts.map +1 -0
- 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/dist/types/tests/utils/test-data-generator.d.ts +1 -0
- package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/dwn-error.ts +3 -0
- package/src/core/protocol-authorization-action.ts +5 -0
- package/src/core/protocol-authorization-validation.ts +37 -0
- package/src/core/protocol-authorization.ts +4 -0
- package/src/core/resumable-task-manager.ts +3 -1
- package/src/handlers/records-write.ts +106 -0
- package/src/index.ts +1 -1
- package/src/interfaces/protocols-configure.ts +12 -1
- package/src/interfaces/records-write.ts +10 -0
- package/src/store/storage-controller.ts +78 -1
- package/src/types/protocols-types.ts +32 -1
- package/src/types/records-types.ts +8 -0
|
@@ -167,7 +167,7 @@ validate20.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
|
|
|
167
167
|
export const AuthorizationDelegatedGrant = validate24;
|
|
168
168
|
const schema37 = { "$id": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "signature": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorDelegatedGrant": { "$ref": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json" } } };
|
|
169
169
|
const schema38 = { "$id": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json", "$ref": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "unevaluatedProperties": false, "type": "object", "required": ["recordId", "authorization", "encodedData"], "properties": { "encodedData": { "type": "string" } } };
|
|
170
|
-
const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor", "contextId"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "protected": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "iv": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "tag": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "recipients": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "header": { "type": "object", "properties": { "kid": { "type": "string" }, "epk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "derivationScheme": { "type": "string", "enum": ["protocolContext", "protocolPath"] }, "derivedPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "additionalProperties": false, "required": ["kid", "epk", "derivationScheme"] }, "encrypted_key": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" } }, "additionalProperties": false, "required": ["header", "encrypted_key"] } } }, "additionalProperties": false, "required": ["protected", "iv", "tag", "recipients"] }, "descriptor": { "type": "object", "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Write"], "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "protocol": { "type": "string" }, "protocolPath": { "type": "string", "pattern": "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "maxProperties": 10, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "number" } }] } }, "parentId": { "type": "string" }, "dataCid": { "type": "string" }, "dataSize": { "type": "number" }, "dateCreated": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "published": { "type": "boolean" }, "datePublished": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "dataFormat": { "type": "string" }, "permissionGrantId": { "type": "string" } }, "additionalProperties": false, "required": ["interface", "method", "protocol", "protocolPath", "dataCid", "dataSize", "dateCreated", "messageTimestamp", "dataFormat"], "dependencies": { "parentId": ["protocol"] }, "allOf": [{ "$comment": "rule defining `published` and `datePublished` relationship", "anyOf": [{ "properties": { "published": { "type": "boolean", "enum": [true] } }, "required": ["published", "datePublished"] }, { "properties": { "published": { "type": "boolean", "enum": [false] } }, "not": { "required": ["datePublished"] } }, { "allOf": [{ "not": { "required": ["published"] } }, { "not": { "required": ["datePublished"] } }] }] }] } } };
|
|
170
|
+
const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor", "contextId"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "protected": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "iv": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "tag": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "recipients": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "header": { "type": "object", "properties": { "kid": { "type": "string" }, "epk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "derivationScheme": { "type": "string", "enum": ["protocolContext", "protocolPath"] }, "derivedPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "additionalProperties": false, "required": ["kid", "epk", "derivationScheme"] }, "encrypted_key": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" } }, "additionalProperties": false, "required": ["header", "encrypted_key"] } } }, "additionalProperties": false, "required": ["protected", "iv", "tag", "recipients"] }, "descriptor": { "type": "object", "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Write"], "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "protocol": { "type": "string" }, "protocolPath": { "type": "string", "pattern": "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "maxProperties": 10, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "number" } }] } }, "parentId": { "type": "string" }, "dataCid": { "type": "string" }, "dataSize": { "type": "number" }, "dateCreated": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "published": { "type": "boolean" }, "datePublished": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "dataFormat": { "type": "string" }, "permissionGrantId": { "type": "string" }, "squash": { "type": "boolean", "enum": [true] } }, "additionalProperties": false, "required": ["interface", "method", "protocol", "protocolPath", "dataCid", "dataSize", "dateCreated", "messageTimestamp", "dataFormat"], "dependencies": { "parentId": ["protocol"] }, "allOf": [{ "$comment": "rule defining `published` and `datePublished` relationship", "anyOf": [{ "properties": { "published": { "type": "boolean", "enum": [true] } }, "required": ["published", "datePublished"] }, { "properties": { "published": { "type": "boolean", "enum": [false] } }, "not": { "required": ["datePublished"] } }, { "allOf": [{ "not": { "required": ["published"] } }, { "not": { "required": ["datePublished"] } }] }] }] } } };
|
|
171
171
|
const schema47 = { "type": "string", "pattern": "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" };
|
|
172
172
|
const schema48 = { "type": "string", "pattern": "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" };
|
|
173
173
|
const func1 = func1Mod.default ?? func1Mod;
|
|
@@ -2536,6 +2536,24 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2536
2536
|
else {
|
|
2537
2537
|
var valid18 = true;
|
|
2538
2538
|
}
|
|
2539
|
+
if (valid18) {
|
|
2540
|
+
if (data16.squash !== undefined) {
|
|
2541
|
+
let data38 = data16.squash;
|
|
2542
|
+
const _errs110 = errors;
|
|
2543
|
+
if (typeof data38 !== "boolean") {
|
|
2544
|
+
validate27.errors = [{ instancePath: instancePath + "/descriptor/squash", schemaPath: "#/properties/descriptor/properties/squash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
2545
|
+
return false;
|
|
2546
|
+
}
|
|
2547
|
+
if (!(data38 === true)) {
|
|
2548
|
+
validate27.errors = [{ instancePath: instancePath + "/descriptor/squash", schemaPath: "#/properties/descriptor/properties/squash/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.properties.squash.enum }, message: "must be equal to one of the allowed values" }];
|
|
2549
|
+
return false;
|
|
2550
|
+
}
|
|
2551
|
+
var valid18 = _errs110 === errors;
|
|
2552
|
+
}
|
|
2553
|
+
else {
|
|
2554
|
+
var valid18 = true;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2539
2557
|
}
|
|
2540
2558
|
}
|
|
2541
2559
|
}
|
|
@@ -10859,7 +10877,7 @@ export const ProtocolDefinition = validate75;
|
|
|
10859
10877
|
const schema122 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-definition.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["protocol", "published", "types", "structure"], "properties": { "protocol": { "type": "string" }, "published": { "type": "boolean" }, "uses": { "$comment": "Maps alias names to external protocol URIs for composition. Each alias can be used in $ref values and cross-protocol role/of references using 'alias:path' syntax.", "type": "object", "minProperties": 1, "patternProperties": { "^[a-zA-Z][a-zA-Z0-9_-]*$": { "type": "string" } }, "additionalProperties": false }, "types": { "type": "object", "patternProperties": { ".*": { "type": "object", "additionalProperties": false, "properties": { "schema": { "type": "string" }, "dataFormats": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "encryptionRequired": { "type": "boolean" } } } } }, "structure": { "type": "object", "patternProperties": { ".*": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } } } };
|
|
10860
10878
|
const pattern39 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
|
|
10861
10879
|
const pattern41 = new RegExp(".*", "u");
|
|
10862
|
-
const schema123 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "$encryption": { "type": "object", "additionalProperties": false, "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "required": ["rootKeyId", "publicKeyJwk"] }, "$actions": { "type": "array", "minItems": 1, "items": { "type": "object", "oneOf": [{ "required": ["who", "can"], "additionalProperties": false, "properties": { "who": { "type": "string", "enum": ["anyone", "author", "recipient"] }, "of": { "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }, { "required": ["role", "can"], "additionalProperties": false, "properties": { "role": { "$comment": "Must be the protocol path of a role record type", "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "update"] } } } }] } }, "$role": { "$comment": "When `true`, this turns a record into `role` that may be used within a context/sub-context", "type": "boolean" }, "$ref": { "$comment": "References a type from an external protocol declared in `uses`. Format: 'alias:typePath'. A $ref node is a pure attachment point and must not have $actions, $role, $size, $tags, or $encryption.", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, "$size": { "type": "object", "additionalProperties": false, "properties": { "min": { "type": "number", "minimum": 0 }, "max": { "type": "number", "minimum": 0 } } }, "$recordLimit": { "type": "object", "additionalProperties": false, "required": ["max", "strategy"], "properties": { "max": { "type": "integer", "minimum": 1 }, "strategy": { "type": "string", "enum": ["reject", "purgeOldest"] } } }, "$immutable": { "$comment": "When true, records at this protocol path cannot be updated after initial write", "type": "boolean" }, "$tags": { "type": "object", "minProperties": 1, "properties": { "$requiredTags": { "type": "array", "items": { "type": "string" } }, "$allowUndefinedTags": { "type": "boolean" } }, "patternProperties": { "^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["string", "number", "integer", "boolean", "array"] }, "items": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } }, "contains": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {} } } } } }, "patternProperties": { "^[^$].*$": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } };
|
|
10880
|
+
const schema123 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "$encryption": { "type": "object", "additionalProperties": false, "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "required": ["rootKeyId", "publicKeyJwk"] }, "$actions": { "type": "array", "minItems": 1, "items": { "type": "object", "oneOf": [{ "required": ["who", "can"], "additionalProperties": false, "properties": { "who": { "type": "string", "enum": ["anyone", "author", "recipient"] }, "of": { "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "squash", "update"] } } } }, { "required": ["role", "can"], "additionalProperties": false, "properties": { "role": { "$comment": "Must be the protocol path of a role record type", "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "squash", "update"] } } } }] } }, "$role": { "$comment": "When `true`, this turns a record into `role` that may be used within a context/sub-context", "type": "boolean" }, "$ref": { "$comment": "References a type from an external protocol declared in `uses`. Format: 'alias:typePath'. A $ref node is a pure attachment point and must not have $actions, $role, $size, $tags, or $encryption.", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, "$size": { "type": "object", "additionalProperties": false, "properties": { "min": { "type": "number", "minimum": 0 }, "max": { "type": "number", "minimum": 0 } } }, "$recordLimit": { "type": "object", "additionalProperties": false, "required": ["max", "strategy"], "properties": { "max": { "type": "integer", "minimum": 1 }, "strategy": { "type": "string", "enum": ["reject", "purgeOldest"] } } }, "$immutable": { "$comment": "When true, records at this protocol path cannot be updated after initial write", "type": "boolean" }, "$delivery": { "$comment": "Delivery strategy hint for records at this protocol path. 'direct' = origin pushes to all participant DWN endpoints; 'subscribe' = participant providers subscribe to the origin DWN.", "type": "string", "enum": ["direct", "subscribe"] }, "$squash": { "$comment": "When true, enables squash writes at this protocol path — a RecordsWrite with squash: true atomically creates a snapshot and deletes all older sibling records", "type": "boolean", "enum": [true] }, "$tags": { "type": "object", "minProperties": 1, "properties": { "$requiredTags": { "type": "array", "items": { "type": "string" } }, "$allowUndefinedTags": { "type": "boolean" } }, "patternProperties": { "^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["string", "number", "integer", "boolean", "array"] }, "items": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } }, "contains": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {} } } } } }, "patternProperties": { "^[^$].*$": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } };
|
|
10863
10881
|
const pattern43 = new RegExp("^[^$].*$", "u");
|
|
10864
10882
|
const pattern44 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
|
|
10865
10883
|
const pattern45 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
|
|
@@ -10874,7 +10892,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10874
10892
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10875
10893
|
const _errs1 = errors;
|
|
10876
10894
|
for (const key0 in data) {
|
|
10877
|
-
if (!(((
|
|
10895
|
+
if (!((func2.call(schema123.properties, key0)) || (pattern43.test(key0)))) {
|
|
10878
10896
|
validate76.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
10879
10897
|
return false;
|
|
10880
10898
|
break;
|
|
@@ -11068,7 +11086,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11068
11086
|
}
|
|
11069
11087
|
errors++;
|
|
11070
11088
|
}
|
|
11071
|
-
if (!((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "update"))) {
|
|
11089
|
+
if (!(((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "squash")) || (data8 === "update"))) {
|
|
11072
11090
|
const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
11073
11091
|
if (vErrors === null) {
|
|
11074
11092
|
vErrors = [err7];
|
|
@@ -11190,7 +11208,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11190
11208
|
}
|
|
11191
11209
|
errors++;
|
|
11192
11210
|
}
|
|
11193
|
-
if (!((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "update"))) {
|
|
11211
|
+
if (!(((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "squash")) || (data11 === "update"))) {
|
|
11194
11212
|
const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
11195
11213
|
if (vErrors === null) {
|
|
11196
11214
|
vErrors = [err14];
|
|
@@ -11468,202 +11486,238 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11468
11486
|
var valid0 = true;
|
|
11469
11487
|
}
|
|
11470
11488
|
if (valid0) {
|
|
11471
|
-
if (data.$
|
|
11472
|
-
let data21 = data.$
|
|
11489
|
+
if (data.$delivery !== undefined) {
|
|
11490
|
+
let data21 = data.$delivery;
|
|
11473
11491
|
const _errs55 = errors;
|
|
11474
|
-
if (
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11492
|
+
if (typeof data21 !== "string") {
|
|
11493
|
+
validate76.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11494
|
+
return false;
|
|
11495
|
+
}
|
|
11496
|
+
if (!((data21 === "direct") || (data21 === "subscribe"))) {
|
|
11497
|
+
validate76.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues: schema123.properties.$delivery.enum }, message: "must be equal to one of the allowed values" }];
|
|
11498
|
+
return false;
|
|
11499
|
+
}
|
|
11500
|
+
var valid0 = _errs55 === errors;
|
|
11501
|
+
}
|
|
11502
|
+
else {
|
|
11503
|
+
var valid0 = true;
|
|
11504
|
+
}
|
|
11505
|
+
if (valid0) {
|
|
11506
|
+
if (data.$squash !== undefined) {
|
|
11507
|
+
let data22 = data.$squash;
|
|
11508
|
+
const _errs58 = errors;
|
|
11509
|
+
if (typeof data22 !== "boolean") {
|
|
11510
|
+
validate76.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11511
|
+
return false;
|
|
11512
|
+
}
|
|
11513
|
+
if (!(data22 === true)) {
|
|
11514
|
+
validate76.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues: schema123.properties.$squash.enum }, message: "must be equal to one of the allowed values" }];
|
|
11515
|
+
return false;
|
|
11516
|
+
}
|
|
11517
|
+
var valid0 = _errs58 === errors;
|
|
11518
|
+
}
|
|
11519
|
+
else {
|
|
11520
|
+
var valid0 = true;
|
|
11521
|
+
}
|
|
11522
|
+
if (valid0) {
|
|
11523
|
+
if (data.$tags !== undefined) {
|
|
11524
|
+
let data23 = data.$tags;
|
|
11525
|
+
const _errs61 = errors;
|
|
11526
|
+
if (errors === _errs61) {
|
|
11527
|
+
if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
|
|
11528
|
+
if (Object.keys(data23).length < 1) {
|
|
11529
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
11530
|
+
return false;
|
|
11531
|
+
}
|
|
11532
|
+
else {
|
|
11533
|
+
if (data23.$requiredTags !== undefined) {
|
|
11534
|
+
let data24 = data23.$requiredTags;
|
|
11535
|
+
const _errs63 = errors;
|
|
11536
|
+
if (errors === _errs63) {
|
|
11537
|
+
if (Array.isArray(data24)) {
|
|
11538
|
+
var valid11 = true;
|
|
11539
|
+
const len3 = data24.length;
|
|
11540
|
+
for (let i3 = 0; i3 < len3; i3++) {
|
|
11541
|
+
const _errs65 = errors;
|
|
11542
|
+
if (typeof data24[i3] !== "string") {
|
|
11543
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$requiredTags/" + i3, schemaPath: "#/properties/%24tags/properties/%24requiredTags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11544
|
+
return false;
|
|
11545
|
+
}
|
|
11546
|
+
var valid11 = _errs65 === errors;
|
|
11547
|
+
if (!valid11) {
|
|
11548
|
+
break;
|
|
11549
|
+
}
|
|
11550
|
+
}
|
|
11493
11551
|
}
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11552
|
+
else {
|
|
11553
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$requiredTags", schemaPath: "#/properties/%24tags/properties/%24requiredTags/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
11554
|
+
return false;
|
|
11497
11555
|
}
|
|
11498
11556
|
}
|
|
11557
|
+
var valid10 = _errs63 === errors;
|
|
11499
11558
|
}
|
|
11500
11559
|
else {
|
|
11501
|
-
|
|
11502
|
-
return false;
|
|
11560
|
+
var valid10 = true;
|
|
11503
11561
|
}
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
for (const key7 in data25) {
|
|
11534
|
-
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (pattern46.test(key7)))) {
|
|
11535
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" }];
|
|
11536
|
-
return false;
|
|
11537
|
-
break;
|
|
11538
|
-
}
|
|
11539
|
-
}
|
|
11540
|
-
if (_errs65 === errors) {
|
|
11541
|
-
if (data25.type !== undefined) {
|
|
11542
|
-
let data26 = data25.type;
|
|
11543
|
-
const _errs66 = errors;
|
|
11544
|
-
if (!(((((data26 === "string") || (data26 === "number")) || (data26 === "integer")) || (data26 === "boolean")) || (data26 === "array"))) {
|
|
11545
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
11546
|
-
return false;
|
|
11562
|
+
if (valid10) {
|
|
11563
|
+
if (data23.$allowUndefinedTags !== undefined) {
|
|
11564
|
+
const _errs67 = errors;
|
|
11565
|
+
if (typeof data23.$allowUndefinedTags !== "boolean") {
|
|
11566
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$allowUndefinedTags", schemaPath: "#/properties/%24tags/properties/%24allowUndefinedTags/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11567
|
+
return false;
|
|
11568
|
+
}
|
|
11569
|
+
var valid10 = _errs67 === errors;
|
|
11570
|
+
}
|
|
11571
|
+
else {
|
|
11572
|
+
var valid10 = true;
|
|
11573
|
+
}
|
|
11574
|
+
if (valid10) {
|
|
11575
|
+
var props2 = {};
|
|
11576
|
+
props2.$requiredTags = true;
|
|
11577
|
+
props2.$allowUndefinedTags = true;
|
|
11578
|
+
for (const key6 in data23) {
|
|
11579
|
+
if (pattern45.test(key6)) {
|
|
11580
|
+
let data27 = data23[key6];
|
|
11581
|
+
const _errs69 = errors;
|
|
11582
|
+
if (errors === _errs69) {
|
|
11583
|
+
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
11584
|
+
const _errs71 = errors;
|
|
11585
|
+
for (const key7 in data27) {
|
|
11586
|
+
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (pattern46.test(key7)))) {
|
|
11587
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" }];
|
|
11588
|
+
return false;
|
|
11589
|
+
break;
|
|
11590
|
+
}
|
|
11547
11591
|
}
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
if (data25.items !== undefined) {
|
|
11555
|
-
let data27 = data25.items;
|
|
11556
|
-
const _errs67 = errors;
|
|
11557
|
-
if (errors === _errs67) {
|
|
11558
|
-
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
11559
|
-
if (data27.type !== undefined) {
|
|
11560
|
-
let data28 = data27.type;
|
|
11561
|
-
const _errs69 = errors;
|
|
11562
|
-
if (!(((data28 === "string") || (data28 === "number")) || (data28 === "integer"))) {
|
|
11563
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
11564
|
-
return false;
|
|
11565
|
-
}
|
|
11566
|
-
var valid14 = _errs69 === errors;
|
|
11567
|
-
}
|
|
11568
|
-
else {
|
|
11569
|
-
var valid14 = true;
|
|
11570
|
-
}
|
|
11571
|
-
if (valid14) {
|
|
11572
|
-
var props3 = {};
|
|
11573
|
-
props3.type = true;
|
|
11574
|
-
for (const key8 in data27) {
|
|
11575
|
-
if (pattern47.test(key8)) {
|
|
11576
|
-
props3[key8] = true;
|
|
11577
|
-
}
|
|
11578
|
-
}
|
|
11579
|
-
}
|
|
11580
|
-
}
|
|
11581
|
-
else {
|
|
11582
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11592
|
+
if (_errs71 === errors) {
|
|
11593
|
+
if (data27.type !== undefined) {
|
|
11594
|
+
let data28 = data27.type;
|
|
11595
|
+
const _errs72 = errors;
|
|
11596
|
+
if (!(((((data28 === "string") || (data28 === "number")) || (data28 === "integer")) || (data28 === "boolean")) || (data28 === "array"))) {
|
|
11597
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
11583
11598
|
return false;
|
|
11584
11599
|
}
|
|
11600
|
+
var valid13 = _errs72 === errors;
|
|
11585
11601
|
}
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11602
|
+
else {
|
|
11603
|
+
var valid13 = true;
|
|
11604
|
+
}
|
|
11605
|
+
if (valid13) {
|
|
11606
|
+
if (data27.items !== undefined) {
|
|
11607
|
+
let data29 = data27.items;
|
|
11608
|
+
const _errs73 = errors;
|
|
11609
|
+
if (errors === _errs73) {
|
|
11610
|
+
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
11611
|
+
if (data29.type !== undefined) {
|
|
11612
|
+
let data30 = data29.type;
|
|
11613
|
+
const _errs75 = errors;
|
|
11614
|
+
if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
|
|
11615
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
11616
|
+
return false;
|
|
11617
|
+
}
|
|
11618
|
+
var valid14 = _errs75 === errors;
|
|
11619
|
+
}
|
|
11620
|
+
else {
|
|
11621
|
+
var valid14 = true;
|
|
11622
|
+
}
|
|
11623
|
+
if (valid14) {
|
|
11624
|
+
var props3 = {};
|
|
11625
|
+
props3.type = true;
|
|
11626
|
+
for (const key8 in data29) {
|
|
11627
|
+
if (pattern47.test(key8)) {
|
|
11628
|
+
props3[key8] = true;
|
|
11629
|
+
}
|
|
11630
|
+
}
|
|
11603
11631
|
}
|
|
11604
|
-
var valid16 = _errs72 === errors;
|
|
11605
11632
|
}
|
|
11606
11633
|
else {
|
|
11607
|
-
|
|
11634
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11635
|
+
return false;
|
|
11608
11636
|
}
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11637
|
+
}
|
|
11638
|
+
var valid13 = _errs73 === errors;
|
|
11639
|
+
}
|
|
11640
|
+
else {
|
|
11641
|
+
var valid13 = true;
|
|
11642
|
+
}
|
|
11643
|
+
if (valid13) {
|
|
11644
|
+
if (data27.contains !== undefined) {
|
|
11645
|
+
let data31 = data27.contains;
|
|
11646
|
+
const _errs76 = errors;
|
|
11647
|
+
if (errors === _errs76) {
|
|
11648
|
+
if (data31 && typeof data31 == "object" && !Array.isArray(data31)) {
|
|
11649
|
+
if (data31.type !== undefined) {
|
|
11650
|
+
let data32 = data31.type;
|
|
11651
|
+
const _errs78 = errors;
|
|
11652
|
+
if (!(((data32 === "string") || (data32 === "number")) || (data32 === "integer"))) {
|
|
11653
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
11654
|
+
return false;
|
|
11655
|
+
}
|
|
11656
|
+
var valid16 = _errs78 === errors;
|
|
11657
|
+
}
|
|
11658
|
+
else {
|
|
11659
|
+
var valid16 = true;
|
|
11615
11660
|
}
|
|
11661
|
+
if (valid16) {
|
|
11662
|
+
var props4 = {};
|
|
11663
|
+
props4.type = true;
|
|
11664
|
+
for (const key9 in data31) {
|
|
11665
|
+
if (pattern47.test(key9)) {
|
|
11666
|
+
props4[key9] = true;
|
|
11667
|
+
}
|
|
11668
|
+
}
|
|
11669
|
+
}
|
|
11670
|
+
}
|
|
11671
|
+
else {
|
|
11672
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11673
|
+
return false;
|
|
11616
11674
|
}
|
|
11617
11675
|
}
|
|
11676
|
+
var valid13 = _errs76 === errors;
|
|
11618
11677
|
}
|
|
11619
11678
|
else {
|
|
11620
|
-
|
|
11621
|
-
return false;
|
|
11679
|
+
var valid13 = true;
|
|
11622
11680
|
}
|
|
11623
11681
|
}
|
|
11624
|
-
var valid13 = _errs70 === errors;
|
|
11625
|
-
}
|
|
11626
|
-
else {
|
|
11627
|
-
var valid13 = true;
|
|
11628
11682
|
}
|
|
11629
11683
|
}
|
|
11630
11684
|
}
|
|
11685
|
+
else {
|
|
11686
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11687
|
+
return false;
|
|
11688
|
+
}
|
|
11631
11689
|
}
|
|
11632
|
-
|
|
11633
|
-
else {
|
|
11634
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11635
|
-
return false;
|
|
11690
|
+
props2[key6] = true;
|
|
11636
11691
|
}
|
|
11637
11692
|
}
|
|
11638
|
-
props2[key6] = true;
|
|
11639
11693
|
}
|
|
11640
11694
|
}
|
|
11641
11695
|
}
|
|
11642
11696
|
}
|
|
11697
|
+
else {
|
|
11698
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11699
|
+
return false;
|
|
11700
|
+
}
|
|
11643
11701
|
}
|
|
11702
|
+
var valid0 = _errs61 === errors;
|
|
11644
11703
|
}
|
|
11645
11704
|
else {
|
|
11646
|
-
|
|
11647
|
-
return false;
|
|
11705
|
+
var valid0 = true;
|
|
11648
11706
|
}
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
}
|
|
11664
|
-
var valid18 = _errs73 === errors;
|
|
11665
|
-
if (!valid18) {
|
|
11666
|
-
break;
|
|
11707
|
+
if (valid0) {
|
|
11708
|
+
var valid18 = true;
|
|
11709
|
+
for (const key10 in data) {
|
|
11710
|
+
if (pattern43.test(key10)) {
|
|
11711
|
+
const _errs79 = errors;
|
|
11712
|
+
if (!(wrapper2.validate(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData, dynamicAnchors }))) {
|
|
11713
|
+
vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);
|
|
11714
|
+
errors = vErrors.length;
|
|
11715
|
+
}
|
|
11716
|
+
var valid18 = _errs79 === errors;
|
|
11717
|
+
if (!valid18) {
|
|
11718
|
+
break;
|
|
11719
|
+
}
|
|
11720
|
+
}
|
|
11667
11721
|
}
|
|
11668
11722
|
}
|
|
11669
11723
|
}
|