@enbox/dwn-sdk-js 0.4.2 → 0.4.4
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 +3 -3
- package/dist/browser.mjs.map +3 -3
- package/dist/esm/generated/precompiled-validators.js +1376 -2156
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/grant-authorization.js +14 -1
- package/dist/esm/src/core/grant-authorization.js.map +1 -1
- package/dist/esm/src/protocols/permission-grant.js +5 -0
- package/dist/esm/src/protocols/permission-grant.js.map +1 -1
- package/dist/esm/src/protocols/permissions.js +1 -0
- package/dist/esm/src/protocols/permissions.js.map +1 -1
- package/dist/esm/src/types/permission-types.js.map +1 -1
- package/dist/esm/tests/core/grant-authorization.spec.js +82 -4
- package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -1
- package/dist/esm/tests/core/records-grant-authorization.spec.js +22 -5
- package/dist/esm/tests/core/records-grant-authorization.spec.js.map +1 -1
- package/dist/esm/tests/features/author-delegated-grant.spec.js +134 -10
- package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
- package/dist/esm/tests/features/permissions.spec.js +6 -6
- package/dist/esm/tests/features/permissions.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-count.spec.js +2 -2
- package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-query.spec.js +2 -2
- package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-read.spec.js +8 -2
- package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js +2 -2
- package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permission-grant.spec.js +55 -0
- package/dist/esm/tests/protocols/permission-grant.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permission-request.spec.js +4 -4
- package/dist/esm/tests/protocols/permission-request.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permissions.spec.js +35 -2
- package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/grant-authorization.d.ts +2 -1
- package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
- package/dist/types/src/protocols/permission-grant.d.ts +5 -1
- package/dist/types/src/protocols/permission-grant.d.ts.map +1 -1
- package/dist/types/src/protocols/permissions.d.ts +2 -1
- package/dist/types/src/protocols/permissions.d.ts.map +1 -1
- package/dist/types/src/types/permission-types.d.ts +48 -1
- package/dist/types/src/types/permission-types.d.ts.map +1 -1
- package/dist/types/tests/features/author-delegated-grant.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/grant-authorization.ts +18 -1
- package/src/protocols/permission-grant.ts +7 -2
- package/src/protocols/permissions.ts +8 -6
- package/src/types/permission-types.ts +62 -1
|
@@ -7962,18 +7962,15 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7962
7962
|
} validate67.errors = vErrors; return errors === 0; }
|
|
7963
7963
|
validate67.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7964
7964
|
export const PermissionGrantData = validate68;
|
|
7965
|
-
const schema94 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-grant-data.json", "type": "object", "additionalProperties": false, "required": ["dateExpires", "scope"], "properties": { "description": { "type": "string" }, "dateExpires": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "requestId": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" }, "delegateKeyDelivery": { "type": "object", "additionalProperties": false, "required": ["rootKeyId", "publicKeyJwk"], "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "type": "object" } } } } };
|
|
7966
|
-
const
|
|
7967
|
-
const schema97 = { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }
|
|
7965
|
+
const schema94 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-grant-data.json", "type": "object", "additionalProperties": false, "required": ["dateExpires", "scope"], "properties": { "description": { "type": "string" }, "dateExpires": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "requestId": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" }, "delegateKeyDelivery": { "type": "object", "additionalProperties": false, "required": ["rootKeyId", "publicKeyJwk"], "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "type": "object" } } }, "connectSession": { "type": "object", "additionalProperties": false, "required": ["id", "createdAt", "expiresAt"], "properties": { "id": { "type": "string", "maxLength": 128 }, "appName": { "type": "string", "maxLength": 128 }, "appIcon": { "type": "string", "maxLength": 2048 }, "origin": { "type": "string", "maxLength": 512 }, "userAgent": { "type": "string", "maxLength": 512 }, "platform": { "type": "string", "maxLength": 128 }, "language": { "type": "string", "maxLength": 64 }, "languages": { "type": "array", "maxItems": 16, "items": { "type": "string", "maxLength": 64 } }, "timezone": { "type": "string", "maxLength": 128 }, "transport": { "enum": ["relay", "postMessage"] }, "createdAt": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "expiresAt": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } } } };
|
|
7966
|
+
const schema105 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
|
|
7967
|
+
const schema97 = { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }] };
|
|
7968
7968
|
const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } }, "allOf": [{ "not": { "required": ["contextId", "protocolPath"] } }, { "if": { "anyOf": [{ "required": ["contextId"] }, { "required": ["protocolPath"] }] }, "then": { "required": ["protocol"] } }] };
|
|
7969
7969
|
const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
|
|
7970
7970
|
const schema101 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
|
|
7971
7971
|
const schema102 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7972
7972
|
const schema103 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7973
7973
|
const schema104 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7974
|
-
const schema105 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7975
|
-
const schema106 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7976
|
-
const schema107 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7977
7974
|
function validate70(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate70.evaluated; if (evaluated0.dynamicProps) {
|
|
7978
7975
|
evaluated0.props = undefined;
|
|
7979
7976
|
} if (evaluated0.dynamicItems) {
|
|
@@ -9043,816 +9040,585 @@ else {
|
|
|
9043
9040
|
props0 = true;
|
|
9044
9041
|
}
|
|
9045
9042
|
}
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9043
|
+
}
|
|
9044
|
+
}
|
|
9045
|
+
}
|
|
9046
|
+
}
|
|
9047
|
+
} if (!valid0) {
|
|
9048
|
+
const err59 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
9049
|
+
if (vErrors === null) {
|
|
9050
|
+
vErrors = [err59];
|
|
9051
|
+
}
|
|
9052
|
+
else {
|
|
9053
|
+
vErrors.push(err59);
|
|
9054
|
+
}
|
|
9055
|
+
errors++;
|
|
9056
|
+
validate70.errors = vErrors;
|
|
9057
|
+
return false;
|
|
9058
|
+
}
|
|
9059
|
+
else {
|
|
9060
|
+
errors = _errs0;
|
|
9061
|
+
if (vErrors !== null) {
|
|
9062
|
+
if (_errs0) {
|
|
9063
|
+
vErrors.length = _errs0;
|
|
9064
|
+
}
|
|
9065
|
+
else {
|
|
9066
|
+
vErrors = null;
|
|
9067
|
+
}
|
|
9068
|
+
}
|
|
9069
|
+
} validate70.errors = vErrors; evaluated0.props = props0; return errors === 0; }
|
|
9070
|
+
validate70.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
9071
|
+
function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-grant-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate68.evaluated; if (evaluated0.dynamicProps) {
|
|
9072
|
+
evaluated0.props = undefined;
|
|
9073
|
+
} if (evaluated0.dynamicItems) {
|
|
9074
|
+
evaluated0.items = undefined;
|
|
9075
|
+
} if (errors === 0) {
|
|
9076
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9077
|
+
let missing0;
|
|
9078
|
+
if (((data.dateExpires === undefined) && (missing0 = "dateExpires")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
9079
|
+
validate68.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
9080
|
+
return false;
|
|
9081
|
+
}
|
|
9082
|
+
else {
|
|
9083
|
+
const _errs1 = errors;
|
|
9084
|
+
for (const key0 in data) {
|
|
9085
|
+
if (!((((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions")) || (key0 === "delegateKeyDelivery")) || (key0 === "connectSession"))) {
|
|
9086
|
+
validate68.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
9087
|
+
return false;
|
|
9088
|
+
break;
|
|
9089
|
+
}
|
|
9090
|
+
}
|
|
9091
|
+
if (_errs1 === errors) {
|
|
9092
|
+
if (data.description !== undefined) {
|
|
9093
|
+
const _errs2 = errors;
|
|
9094
|
+
if (typeof data.description !== "string") {
|
|
9095
|
+
validate68.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9096
|
+
return false;
|
|
9097
|
+
}
|
|
9098
|
+
var valid0 = _errs2 === errors;
|
|
9099
|
+
}
|
|
9100
|
+
else {
|
|
9101
|
+
var valid0 = true;
|
|
9102
|
+
}
|
|
9103
|
+
if (valid0) {
|
|
9104
|
+
if (data.dateExpires !== undefined) {
|
|
9105
|
+
let data1 = data.dateExpires;
|
|
9106
|
+
const _errs4 = errors;
|
|
9107
|
+
const _errs5 = errors;
|
|
9108
|
+
if (errors === _errs5) {
|
|
9109
|
+
if (typeof data1 === "string") {
|
|
9110
|
+
if (!pattern14.test(data1)) {
|
|
9111
|
+
validate68.errors = [{ instancePath: instancePath + "/dateExpires", 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$" + "\"" }];
|
|
9112
|
+
return false;
|
|
9055
9113
|
}
|
|
9056
|
-
|
|
9057
|
-
|
|
9114
|
+
}
|
|
9115
|
+
else {
|
|
9116
|
+
validate68.errors = [{ instancePath: instancePath + "/dateExpires", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9117
|
+
return false;
|
|
9118
|
+
}
|
|
9119
|
+
}
|
|
9120
|
+
var valid0 = _errs4 === errors;
|
|
9121
|
+
}
|
|
9122
|
+
else {
|
|
9123
|
+
var valid0 = true;
|
|
9124
|
+
}
|
|
9125
|
+
if (valid0) {
|
|
9126
|
+
if (data.requestId !== undefined) {
|
|
9127
|
+
const _errs7 = errors;
|
|
9128
|
+
if (typeof data.requestId !== "string") {
|
|
9129
|
+
validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "#/properties/requestId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9130
|
+
return false;
|
|
9131
|
+
}
|
|
9132
|
+
var valid0 = _errs7 === errors;
|
|
9133
|
+
}
|
|
9134
|
+
else {
|
|
9135
|
+
var valid0 = true;
|
|
9136
|
+
}
|
|
9137
|
+
if (valid0) {
|
|
9138
|
+
if (data.delegated !== undefined) {
|
|
9139
|
+
const _errs9 = errors;
|
|
9140
|
+
if (typeof data.delegated !== "boolean") {
|
|
9141
|
+
validate68.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
9142
|
+
return false;
|
|
9058
9143
|
}
|
|
9059
|
-
errors
|
|
9144
|
+
var valid0 = _errs9 === errors;
|
|
9060
9145
|
}
|
|
9061
9146
|
else {
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
vErrors.push(err60);
|
|
9071
|
-
}
|
|
9072
|
-
errors++;
|
|
9073
|
-
break;
|
|
9147
|
+
var valid0 = true;
|
|
9148
|
+
}
|
|
9149
|
+
if (valid0) {
|
|
9150
|
+
if (data.scope !== undefined) {
|
|
9151
|
+
const _errs11 = errors;
|
|
9152
|
+
if (!(validate70(data.scope, { instancePath: instancePath + "/scope", parentData: data, parentDataProperty: "scope", rootData, dynamicAnchors }))) {
|
|
9153
|
+
vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);
|
|
9154
|
+
errors = vErrors.length;
|
|
9074
9155
|
}
|
|
9156
|
+
var valid0 = _errs11 === errors;
|
|
9075
9157
|
}
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9158
|
+
else {
|
|
9159
|
+
var valid0 = true;
|
|
9160
|
+
}
|
|
9161
|
+
if (valid0) {
|
|
9162
|
+
if (data.conditions !== undefined) {
|
|
9163
|
+
let data5 = data.conditions;
|
|
9164
|
+
const _errs12 = errors;
|
|
9165
|
+
const _errs13 = errors;
|
|
9166
|
+
if (errors === _errs13) {
|
|
9167
|
+
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
9168
|
+
const _errs15 = errors;
|
|
9169
|
+
for (const key1 in data5) {
|
|
9170
|
+
if (!(key1 === "publication")) {
|
|
9171
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
9172
|
+
return false;
|
|
9173
|
+
break;
|
|
9174
|
+
}
|
|
9175
|
+
}
|
|
9176
|
+
if (_errs15 === errors) {
|
|
9177
|
+
if (data5.publication !== undefined) {
|
|
9178
|
+
let data6 = data5.publication;
|
|
9179
|
+
if (typeof data6 !== "string") {
|
|
9180
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9181
|
+
return false;
|
|
9182
|
+
}
|
|
9183
|
+
if (!((data6 === "Required") || (data6 === "Prohibited"))) {
|
|
9184
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema105.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
|
|
9185
|
+
return false;
|
|
9186
|
+
}
|
|
9187
|
+
}
|
|
9188
|
+
}
|
|
9083
9189
|
}
|
|
9084
9190
|
else {
|
|
9085
|
-
|
|
9191
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9192
|
+
return false;
|
|
9086
9193
|
}
|
|
9087
|
-
errors++;
|
|
9088
9194
|
}
|
|
9089
|
-
var
|
|
9195
|
+
var valid0 = _errs12 === errors;
|
|
9090
9196
|
}
|
|
9091
9197
|
else {
|
|
9092
|
-
var
|
|
9198
|
+
var valid0 = true;
|
|
9093
9199
|
}
|
|
9094
|
-
if (
|
|
9095
|
-
if (data.
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
if (
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
}
|
|
9105
|
-
errors++;
|
|
9106
|
-
}
|
|
9107
|
-
var valid18 = _errs80 === errors;
|
|
9108
|
-
}
|
|
9109
|
-
else {
|
|
9110
|
-
var valid18 = true;
|
|
9111
|
-
}
|
|
9112
|
-
if (valid18) {
|
|
9113
|
-
if (data.protocol !== undefined) {
|
|
9114
|
-
const _errs81 = errors;
|
|
9115
|
-
if (typeof data.protocol !== "string") {
|
|
9116
|
-
const err63 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9117
|
-
if (vErrors === null) {
|
|
9118
|
-
vErrors = [err63];
|
|
9200
|
+
if (valid0) {
|
|
9201
|
+
if (data.delegateKeyDelivery !== undefined) {
|
|
9202
|
+
let data7 = data.delegateKeyDelivery;
|
|
9203
|
+
const _errs18 = errors;
|
|
9204
|
+
if (errors === _errs18) {
|
|
9205
|
+
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
9206
|
+
let missing1;
|
|
9207
|
+
if (((data7.rootKeyId === undefined) && (missing1 = "rootKeyId")) || ((data7.publicKeyJwk === undefined) && (missing1 = "publicKeyJwk"))) {
|
|
9208
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
9209
|
+
return false;
|
|
9119
9210
|
}
|
|
9120
9211
|
else {
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
else {
|
|
9128
|
-
var valid18 = true;
|
|
9129
|
-
}
|
|
9130
|
-
if (valid18) {
|
|
9131
|
-
if (data.contextId !== undefined) {
|
|
9132
|
-
let data29 = data.contextId;
|
|
9133
|
-
const _errs83 = errors;
|
|
9134
|
-
if (errors === _errs83) {
|
|
9135
|
-
if (typeof data29 === "string") {
|
|
9136
|
-
if (func1(data29) > 600) {
|
|
9137
|
-
const err64 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9138
|
-
if (vErrors === null) {
|
|
9139
|
-
vErrors = [err64];
|
|
9140
|
-
}
|
|
9141
|
-
else {
|
|
9142
|
-
vErrors.push(err64);
|
|
9143
|
-
}
|
|
9144
|
-
errors++;
|
|
9212
|
+
const _errs20 = errors;
|
|
9213
|
+
for (const key2 in data7) {
|
|
9214
|
+
if (!((key2 === "rootKeyId") || (key2 === "publicKeyJwk"))) {
|
|
9215
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
9216
|
+
return false;
|
|
9217
|
+
break;
|
|
9145
9218
|
}
|
|
9146
9219
|
}
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9220
|
+
if (_errs20 === errors) {
|
|
9221
|
+
if (data7.rootKeyId !== undefined) {
|
|
9222
|
+
const _errs21 = errors;
|
|
9223
|
+
if (typeof data7.rootKeyId !== "string") {
|
|
9224
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/rootKeyId", schemaPath: "#/properties/delegateKeyDelivery/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9225
|
+
return false;
|
|
9226
|
+
}
|
|
9227
|
+
var valid4 = _errs21 === errors;
|
|
9151
9228
|
}
|
|
9152
9229
|
else {
|
|
9153
|
-
|
|
9230
|
+
var valid4 = true;
|
|
9154
9231
|
}
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
}
|
|
9163
|
-
if (valid18) {
|
|
9164
|
-
if (data.protocolPath !== undefined) {
|
|
9165
|
-
let data30 = data.protocolPath;
|
|
9166
|
-
const _errs85 = errors;
|
|
9167
|
-
if (errors === _errs85) {
|
|
9168
|
-
if (typeof data30 === "string") {
|
|
9169
|
-
if (func1(data30) > 600) {
|
|
9170
|
-
const err66 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9171
|
-
if (vErrors === null) {
|
|
9172
|
-
vErrors = [err66];
|
|
9173
|
-
}
|
|
9174
|
-
else {
|
|
9175
|
-
vErrors.push(err66);
|
|
9232
|
+
if (valid4) {
|
|
9233
|
+
if (data7.publicKeyJwk !== undefined) {
|
|
9234
|
+
let data9 = data7.publicKeyJwk;
|
|
9235
|
+
const _errs23 = errors;
|
|
9236
|
+
if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
|
|
9237
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/publicKeyJwk", schemaPath: "#/properties/delegateKeyDelivery/properties/publicKeyJwk/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9238
|
+
return false;
|
|
9176
9239
|
}
|
|
9177
|
-
errors
|
|
9178
|
-
}
|
|
9179
|
-
}
|
|
9180
|
-
else {
|
|
9181
|
-
const err67 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9182
|
-
if (vErrors === null) {
|
|
9183
|
-
vErrors = [err67];
|
|
9240
|
+
var valid4 = _errs23 === errors;
|
|
9184
9241
|
}
|
|
9185
9242
|
else {
|
|
9186
|
-
|
|
9243
|
+
var valid4 = true;
|
|
9187
9244
|
}
|
|
9188
|
-
errors++;
|
|
9189
9245
|
}
|
|
9190
9246
|
}
|
|
9191
|
-
var valid18 = _errs85 === errors;
|
|
9192
|
-
}
|
|
9193
|
-
else {
|
|
9194
|
-
var valid18 = true;
|
|
9195
9247
|
}
|
|
9196
9248
|
}
|
|
9249
|
+
else {
|
|
9250
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9251
|
+
return false;
|
|
9252
|
+
}
|
|
9197
9253
|
}
|
|
9198
|
-
|
|
9199
|
-
}
|
|
9200
|
-
}
|
|
9201
|
-
}
|
|
9202
|
-
}
|
|
9203
|
-
else {
|
|
9204
|
-
const err68 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9205
|
-
if (vErrors === null) {
|
|
9206
|
-
vErrors = [err68];
|
|
9207
|
-
}
|
|
9208
|
-
else {
|
|
9209
|
-
vErrors.push(err68);
|
|
9210
|
-
}
|
|
9211
|
-
errors++;
|
|
9212
|
-
}
|
|
9213
|
-
}
|
|
9214
|
-
var _valid0 = _errs75 === errors;
|
|
9215
|
-
if (_valid0 && valid0) {
|
|
9216
|
-
valid0 = false;
|
|
9217
|
-
passing0 = [passing0, 6];
|
|
9218
|
-
}
|
|
9219
|
-
else {
|
|
9220
|
-
if (_valid0) {
|
|
9221
|
-
valid0 = true;
|
|
9222
|
-
passing0 = 6;
|
|
9223
|
-
if (props0 !== true) {
|
|
9224
|
-
props0 = true;
|
|
9225
|
-
}
|
|
9226
|
-
}
|
|
9227
|
-
const _errs87 = errors;
|
|
9228
|
-
const _errs88 = errors;
|
|
9229
|
-
if (errors === _errs88) {
|
|
9230
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9231
|
-
let missing11;
|
|
9232
|
-
if ((((data.interface === undefined) && (missing11 = "interface")) || ((data.method === undefined) && (missing11 = "method"))) || ((data.protocol === undefined) && (missing11 = "protocol"))) {
|
|
9233
|
-
const err69 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'" };
|
|
9234
|
-
if (vErrors === null) {
|
|
9235
|
-
vErrors = [err69];
|
|
9236
|
-
}
|
|
9237
|
-
else {
|
|
9238
|
-
vErrors.push(err69);
|
|
9239
|
-
}
|
|
9240
|
-
errors++;
|
|
9241
|
-
}
|
|
9242
|
-
else {
|
|
9243
|
-
const _errs90 = errors;
|
|
9244
|
-
for (const key7 in data) {
|
|
9245
|
-
if (!(((((key7 === "interface") || (key7 === "method")) || (key7 === "protocol")) || (key7 === "contextId")) || (key7 === "protocolPath"))) {
|
|
9246
|
-
const err70 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
|
|
9247
|
-
if (vErrors === null) {
|
|
9248
|
-
vErrors = [err70];
|
|
9249
|
-
}
|
|
9250
|
-
else {
|
|
9251
|
-
vErrors.push(err70);
|
|
9252
|
-
}
|
|
9253
|
-
errors++;
|
|
9254
|
-
break;
|
|
9255
|
-
}
|
|
9256
|
-
}
|
|
9257
|
-
if (_errs90 === errors) {
|
|
9258
|
-
if (data.interface !== undefined) {
|
|
9259
|
-
const _errs91 = errors;
|
|
9260
|
-
if ("Records" !== data.interface) {
|
|
9261
|
-
const err71 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
9262
|
-
if (vErrors === null) {
|
|
9263
|
-
vErrors = [err71];
|
|
9264
|
-
}
|
|
9265
|
-
else {
|
|
9266
|
-
vErrors.push(err71);
|
|
9267
|
-
}
|
|
9268
|
-
errors++;
|
|
9269
|
-
}
|
|
9270
|
-
var valid20 = _errs91 === errors;
|
|
9254
|
+
var valid0 = _errs18 === errors;
|
|
9271
9255
|
}
|
|
9272
9256
|
else {
|
|
9273
|
-
var
|
|
9257
|
+
var valid0 = true;
|
|
9274
9258
|
}
|
|
9275
|
-
if (
|
|
9276
|
-
if (data.
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
if (
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
}
|
|
9286
|
-
errors++;
|
|
9287
|
-
}
|
|
9288
|
-
var valid20 = _errs92 === errors;
|
|
9289
|
-
}
|
|
9290
|
-
else {
|
|
9291
|
-
var valid20 = true;
|
|
9292
|
-
}
|
|
9293
|
-
if (valid20) {
|
|
9294
|
-
if (data.protocol !== undefined) {
|
|
9295
|
-
const _errs93 = errors;
|
|
9296
|
-
if (typeof data.protocol !== "string") {
|
|
9297
|
-
const err73 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9298
|
-
if (vErrors === null) {
|
|
9299
|
-
vErrors = [err73];
|
|
9259
|
+
if (valid0) {
|
|
9260
|
+
if (data.connectSession !== undefined) {
|
|
9261
|
+
let data10 = data.connectSession;
|
|
9262
|
+
const _errs25 = errors;
|
|
9263
|
+
if (errors === _errs25) {
|
|
9264
|
+
if (data10 && typeof data10 == "object" && !Array.isArray(data10)) {
|
|
9265
|
+
let missing2;
|
|
9266
|
+
if ((((data10.id === undefined) && (missing2 = "id")) || ((data10.createdAt === undefined) && (missing2 = "createdAt"))) || ((data10.expiresAt === undefined) && (missing2 = "expiresAt"))) {
|
|
9267
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession", schemaPath: "#/properties/connectSession/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
9268
|
+
return false;
|
|
9300
9269
|
}
|
|
9301
9270
|
else {
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
else {
|
|
9309
|
-
var valid20 = true;
|
|
9310
|
-
}
|
|
9311
|
-
if (valid20) {
|
|
9312
|
-
if (data.contextId !== undefined) {
|
|
9313
|
-
let data34 = data.contextId;
|
|
9314
|
-
const _errs95 = errors;
|
|
9315
|
-
if (errors === _errs95) {
|
|
9316
|
-
if (typeof data34 === "string") {
|
|
9317
|
-
if (func1(data34) > 600) {
|
|
9318
|
-
const err74 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9319
|
-
if (vErrors === null) {
|
|
9320
|
-
vErrors = [err74];
|
|
9321
|
-
}
|
|
9322
|
-
else {
|
|
9323
|
-
vErrors.push(err74);
|
|
9324
|
-
}
|
|
9325
|
-
errors++;
|
|
9326
|
-
}
|
|
9327
|
-
}
|
|
9328
|
-
else {
|
|
9329
|
-
const err75 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9330
|
-
if (vErrors === null) {
|
|
9331
|
-
vErrors = [err75];
|
|
9332
|
-
}
|
|
9333
|
-
else {
|
|
9334
|
-
vErrors.push(err75);
|
|
9271
|
+
const _errs27 = errors;
|
|
9272
|
+
for (const key3 in data10) {
|
|
9273
|
+
if (!(func2.call(schema94.properties.connectSession.properties, key3))) {
|
|
9274
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession", schemaPath: "#/properties/connectSession/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" }];
|
|
9275
|
+
return false;
|
|
9276
|
+
break;
|
|
9335
9277
|
}
|
|
9336
|
-
errors++;
|
|
9337
9278
|
}
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
if (errors === _errs97) {
|
|
9349
|
-
if (typeof data35 === "string") {
|
|
9350
|
-
if (func1(data35) > 600) {
|
|
9351
|
-
const err76 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9352
|
-
if (vErrors === null) {
|
|
9353
|
-
vErrors = [err76];
|
|
9279
|
+
if (_errs27 === errors) {
|
|
9280
|
+
if (data10.id !== undefined) {
|
|
9281
|
+
let data11 = data10.id;
|
|
9282
|
+
const _errs28 = errors;
|
|
9283
|
+
if (errors === _errs28) {
|
|
9284
|
+
if (typeof data11 === "string") {
|
|
9285
|
+
if (func1(data11) > 128) {
|
|
9286
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/id", schemaPath: "#/properties/connectSession/properties/id/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
9287
|
+
return false;
|
|
9288
|
+
}
|
|
9354
9289
|
}
|
|
9355
9290
|
else {
|
|
9356
|
-
|
|
9291
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/id", schemaPath: "#/properties/connectSession/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9292
|
+
return false;
|
|
9357
9293
|
}
|
|
9358
|
-
errors++;
|
|
9359
9294
|
}
|
|
9295
|
+
var valid5 = _errs28 === errors;
|
|
9360
9296
|
}
|
|
9361
9297
|
else {
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9298
|
+
var valid5 = true;
|
|
9299
|
+
}
|
|
9300
|
+
if (valid5) {
|
|
9301
|
+
if (data10.appName !== undefined) {
|
|
9302
|
+
let data12 = data10.appName;
|
|
9303
|
+
const _errs30 = errors;
|
|
9304
|
+
if (errors === _errs30) {
|
|
9305
|
+
if (typeof data12 === "string") {
|
|
9306
|
+
if (func1(data12) > 128) {
|
|
9307
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/appName", schemaPath: "#/properties/connectSession/properties/appName/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
9308
|
+
return false;
|
|
9309
|
+
}
|
|
9310
|
+
}
|
|
9311
|
+
else {
|
|
9312
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/appName", schemaPath: "#/properties/connectSession/properties/appName/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9313
|
+
return false;
|
|
9314
|
+
}
|
|
9315
|
+
}
|
|
9316
|
+
var valid5 = _errs30 === errors;
|
|
9365
9317
|
}
|
|
9366
9318
|
else {
|
|
9367
|
-
|
|
9319
|
+
var valid5 = true;
|
|
9320
|
+
}
|
|
9321
|
+
if (valid5) {
|
|
9322
|
+
if (data10.appIcon !== undefined) {
|
|
9323
|
+
let data13 = data10.appIcon;
|
|
9324
|
+
const _errs32 = errors;
|
|
9325
|
+
if (errors === _errs32) {
|
|
9326
|
+
if (typeof data13 === "string") {
|
|
9327
|
+
if (func1(data13) > 2048) {
|
|
9328
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/appIcon", schemaPath: "#/properties/connectSession/properties/appIcon/maxLength", keyword: "maxLength", params: { limit: 2048 }, message: "must NOT have more than 2048 characters" }];
|
|
9329
|
+
return false;
|
|
9330
|
+
}
|
|
9331
|
+
}
|
|
9332
|
+
else {
|
|
9333
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/appIcon", schemaPath: "#/properties/connectSession/properties/appIcon/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9334
|
+
return false;
|
|
9335
|
+
}
|
|
9336
|
+
}
|
|
9337
|
+
var valid5 = _errs32 === errors;
|
|
9338
|
+
}
|
|
9339
|
+
else {
|
|
9340
|
+
var valid5 = true;
|
|
9341
|
+
}
|
|
9342
|
+
if (valid5) {
|
|
9343
|
+
if (data10.origin !== undefined) {
|
|
9344
|
+
let data14 = data10.origin;
|
|
9345
|
+
const _errs34 = errors;
|
|
9346
|
+
if (errors === _errs34) {
|
|
9347
|
+
if (typeof data14 === "string") {
|
|
9348
|
+
if (func1(data14) > 512) {
|
|
9349
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/origin", schemaPath: "#/properties/connectSession/properties/origin/maxLength", keyword: "maxLength", params: { limit: 512 }, message: "must NOT have more than 512 characters" }];
|
|
9350
|
+
return false;
|
|
9351
|
+
}
|
|
9352
|
+
}
|
|
9353
|
+
else {
|
|
9354
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/origin", schemaPath: "#/properties/connectSession/properties/origin/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9355
|
+
return false;
|
|
9356
|
+
}
|
|
9357
|
+
}
|
|
9358
|
+
var valid5 = _errs34 === errors;
|
|
9359
|
+
}
|
|
9360
|
+
else {
|
|
9361
|
+
var valid5 = true;
|
|
9362
|
+
}
|
|
9363
|
+
if (valid5) {
|
|
9364
|
+
if (data10.userAgent !== undefined) {
|
|
9365
|
+
let data15 = data10.userAgent;
|
|
9366
|
+
const _errs36 = errors;
|
|
9367
|
+
if (errors === _errs36) {
|
|
9368
|
+
if (typeof data15 === "string") {
|
|
9369
|
+
if (func1(data15) > 512) {
|
|
9370
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/userAgent", schemaPath: "#/properties/connectSession/properties/userAgent/maxLength", keyword: "maxLength", params: { limit: 512 }, message: "must NOT have more than 512 characters" }];
|
|
9371
|
+
return false;
|
|
9372
|
+
}
|
|
9373
|
+
}
|
|
9374
|
+
else {
|
|
9375
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/userAgent", schemaPath: "#/properties/connectSession/properties/userAgent/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9376
|
+
return false;
|
|
9377
|
+
}
|
|
9378
|
+
}
|
|
9379
|
+
var valid5 = _errs36 === errors;
|
|
9380
|
+
}
|
|
9381
|
+
else {
|
|
9382
|
+
var valid5 = true;
|
|
9383
|
+
}
|
|
9384
|
+
if (valid5) {
|
|
9385
|
+
if (data10.platform !== undefined) {
|
|
9386
|
+
let data16 = data10.platform;
|
|
9387
|
+
const _errs38 = errors;
|
|
9388
|
+
if (errors === _errs38) {
|
|
9389
|
+
if (typeof data16 === "string") {
|
|
9390
|
+
if (func1(data16) > 128) {
|
|
9391
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/platform", schemaPath: "#/properties/connectSession/properties/platform/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
9392
|
+
return false;
|
|
9393
|
+
}
|
|
9394
|
+
}
|
|
9395
|
+
else {
|
|
9396
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/platform", schemaPath: "#/properties/connectSession/properties/platform/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9397
|
+
return false;
|
|
9398
|
+
}
|
|
9399
|
+
}
|
|
9400
|
+
var valid5 = _errs38 === errors;
|
|
9401
|
+
}
|
|
9402
|
+
else {
|
|
9403
|
+
var valid5 = true;
|
|
9404
|
+
}
|
|
9405
|
+
if (valid5) {
|
|
9406
|
+
if (data10.language !== undefined) {
|
|
9407
|
+
let data17 = data10.language;
|
|
9408
|
+
const _errs40 = errors;
|
|
9409
|
+
if (errors === _errs40) {
|
|
9410
|
+
if (typeof data17 === "string") {
|
|
9411
|
+
if (func1(data17) > 64) {
|
|
9412
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/language", schemaPath: "#/properties/connectSession/properties/language/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" }];
|
|
9413
|
+
return false;
|
|
9414
|
+
}
|
|
9415
|
+
}
|
|
9416
|
+
else {
|
|
9417
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/language", schemaPath: "#/properties/connectSession/properties/language/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9418
|
+
return false;
|
|
9419
|
+
}
|
|
9420
|
+
}
|
|
9421
|
+
var valid5 = _errs40 === errors;
|
|
9422
|
+
}
|
|
9423
|
+
else {
|
|
9424
|
+
var valid5 = true;
|
|
9425
|
+
}
|
|
9426
|
+
if (valid5) {
|
|
9427
|
+
if (data10.languages !== undefined) {
|
|
9428
|
+
let data18 = data10.languages;
|
|
9429
|
+
const _errs42 = errors;
|
|
9430
|
+
if (errors === _errs42) {
|
|
9431
|
+
if (Array.isArray(data18)) {
|
|
9432
|
+
if (data18.length > 16) {
|
|
9433
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/languages", schemaPath: "#/properties/connectSession/properties/languages/maxItems", keyword: "maxItems", params: { limit: 16 }, message: "must NOT have more than 16 items" }];
|
|
9434
|
+
return false;
|
|
9435
|
+
}
|
|
9436
|
+
else {
|
|
9437
|
+
var valid6 = true;
|
|
9438
|
+
const len0 = data18.length;
|
|
9439
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
9440
|
+
let data19 = data18[i0];
|
|
9441
|
+
const _errs44 = errors;
|
|
9442
|
+
if (errors === _errs44) {
|
|
9443
|
+
if (typeof data19 === "string") {
|
|
9444
|
+
if (func1(data19) > 64) {
|
|
9445
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/languages/" + i0, schemaPath: "#/properties/connectSession/properties/languages/items/maxLength", keyword: "maxLength", params: { limit: 64 }, message: "must NOT have more than 64 characters" }];
|
|
9446
|
+
return false;
|
|
9447
|
+
}
|
|
9448
|
+
}
|
|
9449
|
+
else {
|
|
9450
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/languages/" + i0, schemaPath: "#/properties/connectSession/properties/languages/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9451
|
+
return false;
|
|
9452
|
+
}
|
|
9453
|
+
}
|
|
9454
|
+
var valid6 = _errs44 === errors;
|
|
9455
|
+
if (!valid6) {
|
|
9456
|
+
break;
|
|
9457
|
+
}
|
|
9458
|
+
}
|
|
9459
|
+
}
|
|
9460
|
+
}
|
|
9461
|
+
else {
|
|
9462
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/languages", schemaPath: "#/properties/connectSession/properties/languages/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
9463
|
+
return false;
|
|
9464
|
+
}
|
|
9465
|
+
}
|
|
9466
|
+
var valid5 = _errs42 === errors;
|
|
9467
|
+
}
|
|
9468
|
+
else {
|
|
9469
|
+
var valid5 = true;
|
|
9470
|
+
}
|
|
9471
|
+
if (valid5) {
|
|
9472
|
+
if (data10.timezone !== undefined) {
|
|
9473
|
+
let data20 = data10.timezone;
|
|
9474
|
+
const _errs46 = errors;
|
|
9475
|
+
if (errors === _errs46) {
|
|
9476
|
+
if (typeof data20 === "string") {
|
|
9477
|
+
if (func1(data20) > 128) {
|
|
9478
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/timezone", schemaPath: "#/properties/connectSession/properties/timezone/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" }];
|
|
9479
|
+
return false;
|
|
9480
|
+
}
|
|
9481
|
+
}
|
|
9482
|
+
else {
|
|
9483
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/timezone", schemaPath: "#/properties/connectSession/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9484
|
+
return false;
|
|
9485
|
+
}
|
|
9486
|
+
}
|
|
9487
|
+
var valid5 = _errs46 === errors;
|
|
9488
|
+
}
|
|
9489
|
+
else {
|
|
9490
|
+
var valid5 = true;
|
|
9491
|
+
}
|
|
9492
|
+
if (valid5) {
|
|
9493
|
+
if (data10.transport !== undefined) {
|
|
9494
|
+
let data21 = data10.transport;
|
|
9495
|
+
const _errs48 = errors;
|
|
9496
|
+
if (!((data21 === "relay") || (data21 === "postMessage"))) {
|
|
9497
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/transport", schemaPath: "#/properties/connectSession/properties/transport/enum", keyword: "enum", params: { allowedValues: schema94.properties.connectSession.properties.transport.enum }, message: "must be equal to one of the allowed values" }];
|
|
9498
|
+
return false;
|
|
9499
|
+
}
|
|
9500
|
+
var valid5 = _errs48 === errors;
|
|
9501
|
+
}
|
|
9502
|
+
else {
|
|
9503
|
+
var valid5 = true;
|
|
9504
|
+
}
|
|
9505
|
+
if (valid5) {
|
|
9506
|
+
if (data10.createdAt !== undefined) {
|
|
9507
|
+
let data22 = data10.createdAt;
|
|
9508
|
+
const _errs49 = errors;
|
|
9509
|
+
const _errs50 = errors;
|
|
9510
|
+
if (errors === _errs50) {
|
|
9511
|
+
if (typeof data22 === "string") {
|
|
9512
|
+
if (!pattern14.test(data22)) {
|
|
9513
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/createdAt", 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$" + "\"" }];
|
|
9514
|
+
return false;
|
|
9515
|
+
}
|
|
9516
|
+
}
|
|
9517
|
+
else {
|
|
9518
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/createdAt", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9519
|
+
return false;
|
|
9520
|
+
}
|
|
9521
|
+
}
|
|
9522
|
+
var valid5 = _errs49 === errors;
|
|
9523
|
+
}
|
|
9524
|
+
else {
|
|
9525
|
+
var valid5 = true;
|
|
9526
|
+
}
|
|
9527
|
+
if (valid5) {
|
|
9528
|
+
if (data10.expiresAt !== undefined) {
|
|
9529
|
+
let data23 = data10.expiresAt;
|
|
9530
|
+
const _errs52 = errors;
|
|
9531
|
+
const _errs53 = errors;
|
|
9532
|
+
if (errors === _errs53) {
|
|
9533
|
+
if (typeof data23 === "string") {
|
|
9534
|
+
if (!pattern14.test(data23)) {
|
|
9535
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/expiresAt", 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$" + "\"" }];
|
|
9536
|
+
return false;
|
|
9537
|
+
}
|
|
9538
|
+
}
|
|
9539
|
+
else {
|
|
9540
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession/expiresAt", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9541
|
+
return false;
|
|
9542
|
+
}
|
|
9543
|
+
}
|
|
9544
|
+
var valid5 = _errs52 === errors;
|
|
9545
|
+
}
|
|
9546
|
+
else {
|
|
9547
|
+
var valid5 = true;
|
|
9548
|
+
}
|
|
9549
|
+
}
|
|
9550
|
+
}
|
|
9551
|
+
}
|
|
9552
|
+
}
|
|
9553
|
+
}
|
|
9554
|
+
}
|
|
9555
|
+
}
|
|
9556
|
+
}
|
|
9557
|
+
}
|
|
9368
9558
|
}
|
|
9369
|
-
errors++;
|
|
9370
9559
|
}
|
|
9371
9560
|
}
|
|
9372
|
-
var valid20 = _errs97 === errors;
|
|
9373
|
-
}
|
|
9374
|
-
else {
|
|
9375
|
-
var valid20 = true;
|
|
9376
9561
|
}
|
|
9377
9562
|
}
|
|
9563
|
+
else {
|
|
9564
|
+
validate68.errors = [{ instancePath: instancePath + "/connectSession", schemaPath: "#/properties/connectSession/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9565
|
+
return false;
|
|
9566
|
+
}
|
|
9378
9567
|
}
|
|
9568
|
+
var valid0 = _errs25 === errors;
|
|
9569
|
+
}
|
|
9570
|
+
else {
|
|
9571
|
+
var valid0 = true;
|
|
9379
9572
|
}
|
|
9380
9573
|
}
|
|
9381
9574
|
}
|
|
9382
9575
|
}
|
|
9383
9576
|
}
|
|
9384
|
-
else {
|
|
9385
|
-
const err78 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9386
|
-
if (vErrors === null) {
|
|
9387
|
-
vErrors = [err78];
|
|
9388
|
-
}
|
|
9389
|
-
else {
|
|
9390
|
-
vErrors.push(err78);
|
|
9391
|
-
}
|
|
9392
|
-
errors++;
|
|
9393
|
-
}
|
|
9394
|
-
}
|
|
9395
|
-
var _valid0 = _errs87 === errors;
|
|
9396
|
-
if (_valid0 && valid0) {
|
|
9397
|
-
valid0 = false;
|
|
9398
|
-
passing0 = [passing0, 7];
|
|
9399
|
-
}
|
|
9400
|
-
else {
|
|
9401
|
-
if (_valid0) {
|
|
9402
|
-
valid0 = true;
|
|
9403
|
-
passing0 = 7;
|
|
9404
|
-
if (props0 !== true) {
|
|
9405
|
-
props0 = true;
|
|
9406
|
-
}
|
|
9407
|
-
}
|
|
9408
|
-
const _errs99 = errors;
|
|
9409
|
-
const _errs100 = errors;
|
|
9410
|
-
if (errors === _errs100) {
|
|
9411
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9412
|
-
let missing12;
|
|
9413
|
-
if ((((data.interface === undefined) && (missing12 = "interface")) || ((data.method === undefined) && (missing12 = "method"))) || ((data.protocol === undefined) && (missing12 = "protocol"))) {
|
|
9414
|
-
const err79 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" };
|
|
9415
|
-
if (vErrors === null) {
|
|
9416
|
-
vErrors = [err79];
|
|
9417
|
-
}
|
|
9418
|
-
else {
|
|
9419
|
-
vErrors.push(err79);
|
|
9420
|
-
}
|
|
9421
|
-
errors++;
|
|
9422
|
-
}
|
|
9423
|
-
else {
|
|
9424
|
-
const _errs102 = errors;
|
|
9425
|
-
for (const key8 in data) {
|
|
9426
|
-
if (!(((((key8 === "interface") || (key8 === "method")) || (key8 === "protocol")) || (key8 === "contextId")) || (key8 === "protocolPath"))) {
|
|
9427
|
-
const err80 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
|
|
9428
|
-
if (vErrors === null) {
|
|
9429
|
-
vErrors = [err80];
|
|
9430
|
-
}
|
|
9431
|
-
else {
|
|
9432
|
-
vErrors.push(err80);
|
|
9433
|
-
}
|
|
9434
|
-
errors++;
|
|
9435
|
-
break;
|
|
9436
|
-
}
|
|
9437
|
-
}
|
|
9438
|
-
if (_errs102 === errors) {
|
|
9439
|
-
if (data.interface !== undefined) {
|
|
9440
|
-
const _errs103 = errors;
|
|
9441
|
-
if ("Records" !== data.interface) {
|
|
9442
|
-
const err81 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
9443
|
-
if (vErrors === null) {
|
|
9444
|
-
vErrors = [err81];
|
|
9445
|
-
}
|
|
9446
|
-
else {
|
|
9447
|
-
vErrors.push(err81);
|
|
9448
|
-
}
|
|
9449
|
-
errors++;
|
|
9450
|
-
}
|
|
9451
|
-
var valid22 = _errs103 === errors;
|
|
9452
|
-
}
|
|
9453
|
-
else {
|
|
9454
|
-
var valid22 = true;
|
|
9455
|
-
}
|
|
9456
|
-
if (valid22) {
|
|
9457
|
-
if (data.method !== undefined) {
|
|
9458
|
-
const _errs104 = errors;
|
|
9459
|
-
if ("Count" !== data.method) {
|
|
9460
|
-
const err82 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/method/const", keyword: "const", params: { allowedValue: "Count" }, message: "must be equal to constant" };
|
|
9461
|
-
if (vErrors === null) {
|
|
9462
|
-
vErrors = [err82];
|
|
9463
|
-
}
|
|
9464
|
-
else {
|
|
9465
|
-
vErrors.push(err82);
|
|
9466
|
-
}
|
|
9467
|
-
errors++;
|
|
9468
|
-
}
|
|
9469
|
-
var valid22 = _errs104 === errors;
|
|
9470
|
-
}
|
|
9471
|
-
else {
|
|
9472
|
-
var valid22 = true;
|
|
9473
|
-
}
|
|
9474
|
-
if (valid22) {
|
|
9475
|
-
if (data.protocol !== undefined) {
|
|
9476
|
-
const _errs105 = errors;
|
|
9477
|
-
if (typeof data.protocol !== "string") {
|
|
9478
|
-
const err83 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9479
|
-
if (vErrors === null) {
|
|
9480
|
-
vErrors = [err83];
|
|
9481
|
-
}
|
|
9482
|
-
else {
|
|
9483
|
-
vErrors.push(err83);
|
|
9484
|
-
}
|
|
9485
|
-
errors++;
|
|
9486
|
-
}
|
|
9487
|
-
var valid22 = _errs105 === errors;
|
|
9488
|
-
}
|
|
9489
|
-
else {
|
|
9490
|
-
var valid22 = true;
|
|
9491
|
-
}
|
|
9492
|
-
if (valid22) {
|
|
9493
|
-
if (data.contextId !== undefined) {
|
|
9494
|
-
let data39 = data.contextId;
|
|
9495
|
-
const _errs107 = errors;
|
|
9496
|
-
if (errors === _errs107) {
|
|
9497
|
-
if (typeof data39 === "string") {
|
|
9498
|
-
if (func1(data39) > 600) {
|
|
9499
|
-
const err84 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9500
|
-
if (vErrors === null) {
|
|
9501
|
-
vErrors = [err84];
|
|
9502
|
-
}
|
|
9503
|
-
else {
|
|
9504
|
-
vErrors.push(err84);
|
|
9505
|
-
}
|
|
9506
|
-
errors++;
|
|
9507
|
-
}
|
|
9508
|
-
}
|
|
9509
|
-
else {
|
|
9510
|
-
const err85 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9511
|
-
if (vErrors === null) {
|
|
9512
|
-
vErrors = [err85];
|
|
9513
|
-
}
|
|
9514
|
-
else {
|
|
9515
|
-
vErrors.push(err85);
|
|
9516
|
-
}
|
|
9517
|
-
errors++;
|
|
9518
|
-
}
|
|
9519
|
-
}
|
|
9520
|
-
var valid22 = _errs107 === errors;
|
|
9521
|
-
}
|
|
9522
|
-
else {
|
|
9523
|
-
var valid22 = true;
|
|
9524
|
-
}
|
|
9525
|
-
if (valid22) {
|
|
9526
|
-
if (data.protocolPath !== undefined) {
|
|
9527
|
-
let data40 = data.protocolPath;
|
|
9528
|
-
const _errs109 = errors;
|
|
9529
|
-
if (errors === _errs109) {
|
|
9530
|
-
if (typeof data40 === "string") {
|
|
9531
|
-
if (func1(data40) > 600) {
|
|
9532
|
-
const err86 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9533
|
-
if (vErrors === null) {
|
|
9534
|
-
vErrors = [err86];
|
|
9535
|
-
}
|
|
9536
|
-
else {
|
|
9537
|
-
vErrors.push(err86);
|
|
9538
|
-
}
|
|
9539
|
-
errors++;
|
|
9540
|
-
}
|
|
9541
|
-
}
|
|
9542
|
-
else {
|
|
9543
|
-
const err87 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9544
|
-
if (vErrors === null) {
|
|
9545
|
-
vErrors = [err87];
|
|
9546
|
-
}
|
|
9547
|
-
else {
|
|
9548
|
-
vErrors.push(err87);
|
|
9549
|
-
}
|
|
9550
|
-
errors++;
|
|
9551
|
-
}
|
|
9552
|
-
}
|
|
9553
|
-
var valid22 = _errs109 === errors;
|
|
9554
|
-
}
|
|
9555
|
-
else {
|
|
9556
|
-
var valid22 = true;
|
|
9557
|
-
}
|
|
9558
|
-
}
|
|
9559
|
-
}
|
|
9560
|
-
}
|
|
9561
|
-
}
|
|
9562
|
-
}
|
|
9563
|
-
}
|
|
9564
|
-
}
|
|
9565
|
-
else {
|
|
9566
|
-
const err88 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9567
|
-
if (vErrors === null) {
|
|
9568
|
-
vErrors = [err88];
|
|
9569
|
-
}
|
|
9570
|
-
else {
|
|
9571
|
-
vErrors.push(err88);
|
|
9572
|
-
}
|
|
9573
|
-
errors++;
|
|
9574
|
-
}
|
|
9575
|
-
}
|
|
9576
|
-
var _valid0 = _errs99 === errors;
|
|
9577
|
-
if (_valid0 && valid0) {
|
|
9578
|
-
valid0 = false;
|
|
9579
|
-
passing0 = [passing0, 8];
|
|
9580
|
-
}
|
|
9581
|
-
else {
|
|
9582
|
-
if (_valid0) {
|
|
9583
|
-
valid0 = true;
|
|
9584
|
-
passing0 = 8;
|
|
9585
|
-
if (props0 !== true) {
|
|
9586
|
-
props0 = true;
|
|
9587
|
-
}
|
|
9588
|
-
}
|
|
9589
|
-
}
|
|
9590
9577
|
}
|
|
9591
9578
|
}
|
|
9592
9579
|
}
|
|
9593
9580
|
}
|
|
9594
9581
|
}
|
|
9595
9582
|
}
|
|
9596
|
-
|
|
9597
|
-
|
|
9583
|
+
else {
|
|
9584
|
+
validate68.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9585
|
+
return false;
|
|
9586
|
+
}
|
|
9587
|
+
} validate68.errors = vErrors; return errors === 0; }
|
|
9588
|
+
validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
9589
|
+
export const PermissionRequestData = validate73;
|
|
9590
|
+
const schema108 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-request-data.json", "type": "object", "additionalProperties": false, "required": ["delegated", "scope"], "properties": { "description": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
|
|
9591
|
+
function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate74.evaluated; if (evaluated0.dynamicProps) {
|
|
9592
|
+
evaluated0.props = undefined;
|
|
9593
|
+
} if (evaluated0.dynamicItems) {
|
|
9594
|
+
evaluated0.items = undefined;
|
|
9595
|
+
} const _errs0 = errors; let valid0 = false; let passing0 = null; const _errs1 = errors; const _errs2 = errors; const _errs4 = errors; const _errs5 = errors; const _errs6 = errors; if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9596
|
+
let missing0;
|
|
9597
|
+
if (((data.contextId === undefined) && (missing0 = "contextId")) || ((data.protocolPath === undefined) && (missing0 = "protocolPath"))) {
|
|
9598
|
+
const err0 = {};
|
|
9599
|
+
if (vErrors === null) {
|
|
9600
|
+
vErrors = [err0];
|
|
9601
|
+
}
|
|
9602
|
+
else {
|
|
9603
|
+
vErrors.push(err0);
|
|
9604
|
+
}
|
|
9605
|
+
errors++;
|
|
9606
|
+
}
|
|
9607
|
+
} var valid3 = _errs6 === errors; if (valid3) {
|
|
9608
|
+
const err1 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
9598
9609
|
if (vErrors === null) {
|
|
9599
|
-
vErrors = [
|
|
9610
|
+
vErrors = [err1];
|
|
9600
9611
|
}
|
|
9601
9612
|
else {
|
|
9602
|
-
vErrors.push(
|
|
9613
|
+
vErrors.push(err1);
|
|
9603
9614
|
}
|
|
9604
9615
|
errors++;
|
|
9605
|
-
validate70.errors = vErrors;
|
|
9606
|
-
return false;
|
|
9607
9616
|
}
|
|
9608
9617
|
else {
|
|
9609
|
-
errors =
|
|
9618
|
+
errors = _errs5;
|
|
9610
9619
|
if (vErrors !== null) {
|
|
9611
|
-
if (
|
|
9612
|
-
vErrors.length =
|
|
9613
|
-
}
|
|
9614
|
-
else {
|
|
9615
|
-
vErrors = null;
|
|
9616
|
-
}
|
|
9617
|
-
}
|
|
9618
|
-
} validate70.errors = vErrors; evaluated0.props = props0; return errors === 0; }
|
|
9619
|
-
validate70.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
9620
|
-
function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-grant-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate68.evaluated; if (evaluated0.dynamicProps) {
|
|
9621
|
-
evaluated0.props = undefined;
|
|
9622
|
-
} if (evaluated0.dynamicItems) {
|
|
9623
|
-
evaluated0.items = undefined;
|
|
9624
|
-
} if (errors === 0) {
|
|
9625
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9626
|
-
let missing0;
|
|
9627
|
-
if (((data.dateExpires === undefined) && (missing0 = "dateExpires")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
9628
|
-
validate68.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
9629
|
-
return false;
|
|
9630
|
-
}
|
|
9631
|
-
else {
|
|
9632
|
-
const _errs1 = errors;
|
|
9633
|
-
for (const key0 in data) {
|
|
9634
|
-
if (!(((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions")) || (key0 === "delegateKeyDelivery"))) {
|
|
9635
|
-
validate68.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
9636
|
-
return false;
|
|
9637
|
-
break;
|
|
9638
|
-
}
|
|
9639
|
-
}
|
|
9640
|
-
if (_errs1 === errors) {
|
|
9641
|
-
if (data.description !== undefined) {
|
|
9642
|
-
const _errs2 = errors;
|
|
9643
|
-
if (typeof data.description !== "string") {
|
|
9644
|
-
validate68.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9645
|
-
return false;
|
|
9646
|
-
}
|
|
9647
|
-
var valid0 = _errs2 === errors;
|
|
9648
|
-
}
|
|
9649
|
-
else {
|
|
9650
|
-
var valid0 = true;
|
|
9651
|
-
}
|
|
9652
|
-
if (valid0) {
|
|
9653
|
-
if (data.dateExpires !== undefined) {
|
|
9654
|
-
let data1 = data.dateExpires;
|
|
9655
|
-
const _errs4 = errors;
|
|
9656
|
-
const _errs5 = errors;
|
|
9657
|
-
if (errors === _errs5) {
|
|
9658
|
-
if (typeof data1 === "string") {
|
|
9659
|
-
if (!pattern14.test(data1)) {
|
|
9660
|
-
validate68.errors = [{ instancePath: instancePath + "/dateExpires", 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$" + "\"" }];
|
|
9661
|
-
return false;
|
|
9662
|
-
}
|
|
9663
|
-
}
|
|
9664
|
-
else {
|
|
9665
|
-
validate68.errors = [{ instancePath: instancePath + "/dateExpires", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9666
|
-
return false;
|
|
9667
|
-
}
|
|
9668
|
-
}
|
|
9669
|
-
var valid0 = _errs4 === errors;
|
|
9670
|
-
}
|
|
9671
|
-
else {
|
|
9672
|
-
var valid0 = true;
|
|
9673
|
-
}
|
|
9674
|
-
if (valid0) {
|
|
9675
|
-
if (data.requestId !== undefined) {
|
|
9676
|
-
const _errs7 = errors;
|
|
9677
|
-
if (typeof data.requestId !== "string") {
|
|
9678
|
-
validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "#/properties/requestId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9679
|
-
return false;
|
|
9680
|
-
}
|
|
9681
|
-
var valid0 = _errs7 === errors;
|
|
9682
|
-
}
|
|
9683
|
-
else {
|
|
9684
|
-
var valid0 = true;
|
|
9685
|
-
}
|
|
9686
|
-
if (valid0) {
|
|
9687
|
-
if (data.delegated !== undefined) {
|
|
9688
|
-
const _errs9 = errors;
|
|
9689
|
-
if (typeof data.delegated !== "boolean") {
|
|
9690
|
-
validate68.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
9691
|
-
return false;
|
|
9692
|
-
}
|
|
9693
|
-
var valid0 = _errs9 === errors;
|
|
9694
|
-
}
|
|
9695
|
-
else {
|
|
9696
|
-
var valid0 = true;
|
|
9697
|
-
}
|
|
9698
|
-
if (valid0) {
|
|
9699
|
-
if (data.scope !== undefined) {
|
|
9700
|
-
const _errs11 = errors;
|
|
9701
|
-
if (!(validate70(data.scope, { instancePath: instancePath + "/scope", parentData: data, parentDataProperty: "scope", rootData, dynamicAnchors }))) {
|
|
9702
|
-
vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);
|
|
9703
|
-
errors = vErrors.length;
|
|
9704
|
-
}
|
|
9705
|
-
var valid0 = _errs11 === errors;
|
|
9706
|
-
}
|
|
9707
|
-
else {
|
|
9708
|
-
var valid0 = true;
|
|
9709
|
-
}
|
|
9710
|
-
if (valid0) {
|
|
9711
|
-
if (data.conditions !== undefined) {
|
|
9712
|
-
let data5 = data.conditions;
|
|
9713
|
-
const _errs12 = errors;
|
|
9714
|
-
const _errs13 = errors;
|
|
9715
|
-
if (errors === _errs13) {
|
|
9716
|
-
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
9717
|
-
const _errs15 = errors;
|
|
9718
|
-
for (const key1 in data5) {
|
|
9719
|
-
if (!(key1 === "publication")) {
|
|
9720
|
-
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
9721
|
-
return false;
|
|
9722
|
-
break;
|
|
9723
|
-
}
|
|
9724
|
-
}
|
|
9725
|
-
if (_errs15 === errors) {
|
|
9726
|
-
if (data5.publication !== undefined) {
|
|
9727
|
-
let data6 = data5.publication;
|
|
9728
|
-
if (typeof data6 !== "string") {
|
|
9729
|
-
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9730
|
-
return false;
|
|
9731
|
-
}
|
|
9732
|
-
if (!((data6 === "Required") || (data6 === "Prohibited"))) {
|
|
9733
|
-
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema108.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
|
|
9734
|
-
return false;
|
|
9735
|
-
}
|
|
9736
|
-
}
|
|
9737
|
-
}
|
|
9738
|
-
}
|
|
9739
|
-
else {
|
|
9740
|
-
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9741
|
-
return false;
|
|
9742
|
-
}
|
|
9743
|
-
}
|
|
9744
|
-
var valid0 = _errs12 === errors;
|
|
9745
|
-
}
|
|
9746
|
-
else {
|
|
9747
|
-
var valid0 = true;
|
|
9748
|
-
}
|
|
9749
|
-
if (valid0) {
|
|
9750
|
-
if (data.delegateKeyDelivery !== undefined) {
|
|
9751
|
-
let data7 = data.delegateKeyDelivery;
|
|
9752
|
-
const _errs18 = errors;
|
|
9753
|
-
if (errors === _errs18) {
|
|
9754
|
-
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
9755
|
-
let missing1;
|
|
9756
|
-
if (((data7.rootKeyId === undefined) && (missing1 = "rootKeyId")) || ((data7.publicKeyJwk === undefined) && (missing1 = "publicKeyJwk"))) {
|
|
9757
|
-
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
9758
|
-
return false;
|
|
9759
|
-
}
|
|
9760
|
-
else {
|
|
9761
|
-
const _errs20 = errors;
|
|
9762
|
-
for (const key2 in data7) {
|
|
9763
|
-
if (!((key2 === "rootKeyId") || (key2 === "publicKeyJwk"))) {
|
|
9764
|
-
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
9765
|
-
return false;
|
|
9766
|
-
break;
|
|
9767
|
-
}
|
|
9768
|
-
}
|
|
9769
|
-
if (_errs20 === errors) {
|
|
9770
|
-
if (data7.rootKeyId !== undefined) {
|
|
9771
|
-
const _errs21 = errors;
|
|
9772
|
-
if (typeof data7.rootKeyId !== "string") {
|
|
9773
|
-
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/rootKeyId", schemaPath: "#/properties/delegateKeyDelivery/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9774
|
-
return false;
|
|
9775
|
-
}
|
|
9776
|
-
var valid4 = _errs21 === errors;
|
|
9777
|
-
}
|
|
9778
|
-
else {
|
|
9779
|
-
var valid4 = true;
|
|
9780
|
-
}
|
|
9781
|
-
if (valid4) {
|
|
9782
|
-
if (data7.publicKeyJwk !== undefined) {
|
|
9783
|
-
let data9 = data7.publicKeyJwk;
|
|
9784
|
-
const _errs23 = errors;
|
|
9785
|
-
if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
|
|
9786
|
-
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/publicKeyJwk", schemaPath: "#/properties/delegateKeyDelivery/properties/publicKeyJwk/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9787
|
-
return false;
|
|
9788
|
-
}
|
|
9789
|
-
var valid4 = _errs23 === errors;
|
|
9790
|
-
}
|
|
9791
|
-
else {
|
|
9792
|
-
var valid4 = true;
|
|
9793
|
-
}
|
|
9794
|
-
}
|
|
9795
|
-
}
|
|
9796
|
-
}
|
|
9797
|
-
}
|
|
9798
|
-
else {
|
|
9799
|
-
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9800
|
-
return false;
|
|
9801
|
-
}
|
|
9802
|
-
}
|
|
9803
|
-
var valid0 = _errs18 === errors;
|
|
9804
|
-
}
|
|
9805
|
-
else {
|
|
9806
|
-
var valid0 = true;
|
|
9807
|
-
}
|
|
9808
|
-
}
|
|
9809
|
-
}
|
|
9810
|
-
}
|
|
9811
|
-
}
|
|
9812
|
-
}
|
|
9813
|
-
}
|
|
9814
|
-
}
|
|
9815
|
-
}
|
|
9816
|
-
}
|
|
9817
|
-
else {
|
|
9818
|
-
validate68.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9819
|
-
return false;
|
|
9820
|
-
}
|
|
9821
|
-
} validate68.errors = vErrors; return errors === 0; }
|
|
9822
|
-
validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
9823
|
-
export const PermissionRequestData = validate73;
|
|
9824
|
-
const schema109 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-request-data.json", "type": "object", "additionalProperties": false, "required": ["delegated", "scope"], "properties": { "description": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
|
|
9825
|
-
function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate74.evaluated; if (evaluated0.dynamicProps) {
|
|
9826
|
-
evaluated0.props = undefined;
|
|
9827
|
-
} if (evaluated0.dynamicItems) {
|
|
9828
|
-
evaluated0.items = undefined;
|
|
9829
|
-
} const _errs0 = errors; let valid0 = false; let passing0 = null; const _errs1 = errors; const _errs2 = errors; const _errs4 = errors; const _errs5 = errors; const _errs6 = errors; if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9830
|
-
let missing0;
|
|
9831
|
-
if (((data.contextId === undefined) && (missing0 = "contextId")) || ((data.protocolPath === undefined) && (missing0 = "protocolPath"))) {
|
|
9832
|
-
const err0 = {};
|
|
9833
|
-
if (vErrors === null) {
|
|
9834
|
-
vErrors = [err0];
|
|
9835
|
-
}
|
|
9836
|
-
else {
|
|
9837
|
-
vErrors.push(err0);
|
|
9838
|
-
}
|
|
9839
|
-
errors++;
|
|
9840
|
-
}
|
|
9841
|
-
} var valid3 = _errs6 === errors; if (valid3) {
|
|
9842
|
-
const err1 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
9843
|
-
if (vErrors === null) {
|
|
9844
|
-
vErrors = [err1];
|
|
9845
|
-
}
|
|
9846
|
-
else {
|
|
9847
|
-
vErrors.push(err1);
|
|
9848
|
-
}
|
|
9849
|
-
errors++;
|
|
9850
|
-
}
|
|
9851
|
-
else {
|
|
9852
|
-
errors = _errs5;
|
|
9853
|
-
if (vErrors !== null) {
|
|
9854
|
-
if (_errs5) {
|
|
9855
|
-
vErrors.length = _errs5;
|
|
9620
|
+
if (_errs5) {
|
|
9621
|
+
vErrors.length = _errs5;
|
|
9856
9622
|
}
|
|
9857
9623
|
else {
|
|
9858
9624
|
vErrors = null;
|
|
@@ -9860,1594 +9626,1048 @@ else {
|
|
|
9860
9626
|
}
|
|
9861
9627
|
} var valid2 = _errs4 === errors; if (valid2) {
|
|
9862
9628
|
const _errs7 = errors;
|
|
9863
|
-
const _errs8 = errors;
|
|
9864
|
-
let valid4 = true;
|
|
9865
|
-
const _errs9 = errors;
|
|
9866
|
-
const _errs10 = errors;
|
|
9867
|
-
let valid5 = false;
|
|
9868
|
-
const _errs11 = errors;
|
|
9869
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9870
|
-
let missing1;
|
|
9871
|
-
if ((data.contextId === undefined) && (missing1 = "contextId")) {
|
|
9872
|
-
const err2 = {};
|
|
9873
|
-
if (vErrors === null) {
|
|
9874
|
-
vErrors = [err2];
|
|
9875
|
-
}
|
|
9876
|
-
else {
|
|
9877
|
-
vErrors.push(err2);
|
|
9878
|
-
}
|
|
9879
|
-
errors++;
|
|
9880
|
-
}
|
|
9881
|
-
}
|
|
9882
|
-
var _valid2 = _errs11 === errors;
|
|
9883
|
-
valid5 = valid5 || _valid2;
|
|
9884
|
-
const _errs12 = errors;
|
|
9885
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9886
|
-
let missing2;
|
|
9887
|
-
if ((data.protocolPath === undefined) && (missing2 = "protocolPath")) {
|
|
9888
|
-
const err3 = {};
|
|
9889
|
-
if (vErrors === null) {
|
|
9890
|
-
vErrors = [err3];
|
|
9891
|
-
}
|
|
9892
|
-
else {
|
|
9893
|
-
vErrors.push(err3);
|
|
9894
|
-
}
|
|
9895
|
-
errors++;
|
|
9896
|
-
}
|
|
9897
|
-
}
|
|
9898
|
-
var _valid2 = _errs12 === errors;
|
|
9899
|
-
valid5 = valid5 || _valid2;
|
|
9900
|
-
if (!valid5) {
|
|
9901
|
-
const err4 = {};
|
|
9902
|
-
if (vErrors === null) {
|
|
9903
|
-
vErrors = [err4];
|
|
9904
|
-
}
|
|
9905
|
-
else {
|
|
9906
|
-
vErrors.push(err4);
|
|
9907
|
-
}
|
|
9908
|
-
errors++;
|
|
9909
|
-
}
|
|
9910
|
-
else {
|
|
9911
|
-
errors = _errs10;
|
|
9912
|
-
if (vErrors !== null) {
|
|
9913
|
-
if (_errs10) {
|
|
9914
|
-
vErrors.length = _errs10;
|
|
9915
|
-
}
|
|
9916
|
-
else {
|
|
9917
|
-
vErrors = null;
|
|
9918
|
-
}
|
|
9919
|
-
}
|
|
9920
|
-
}
|
|
9921
|
-
var _valid1 = _errs9 === errors;
|
|
9922
|
-
errors = _errs8;
|
|
9923
|
-
if (vErrors !== null) {
|
|
9924
|
-
if (_errs8) {
|
|
9925
|
-
vErrors.length = _errs8;
|
|
9926
|
-
}
|
|
9927
|
-
else {
|
|
9928
|
-
vErrors = null;
|
|
9929
|
-
}
|
|
9930
|
-
}
|
|
9931
|
-
if (_valid1) {
|
|
9932
|
-
const _errs13 = errors;
|
|
9933
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9934
|
-
let missing3;
|
|
9935
|
-
if ((data.protocol === undefined) && (missing3 = "protocol")) {
|
|
9936
|
-
const err5 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/1/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
|
|
9937
|
-
if (vErrors === null) {
|
|
9938
|
-
vErrors = [err5];
|
|
9939
|
-
}
|
|
9940
|
-
else {
|
|
9941
|
-
vErrors.push(err5);
|
|
9942
|
-
}
|
|
9943
|
-
errors++;
|
|
9944
|
-
}
|
|
9945
|
-
}
|
|
9946
|
-
var _valid1 = _errs13 === errors;
|
|
9947
|
-
valid4 = _valid1;
|
|
9948
|
-
}
|
|
9949
|
-
if (!valid4) {
|
|
9950
|
-
const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
9951
|
-
if (vErrors === null) {
|
|
9952
|
-
vErrors = [err6];
|
|
9953
|
-
}
|
|
9954
|
-
else {
|
|
9955
|
-
vErrors.push(err6);
|
|
9956
|
-
}
|
|
9957
|
-
errors++;
|
|
9958
|
-
}
|
|
9959
|
-
var valid2 = _errs7 === errors;
|
|
9960
|
-
} if (errors === _errs2) {
|
|
9961
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9962
|
-
let missing4;
|
|
9963
|
-
if (((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) {
|
|
9964
|
-
const err7 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
|
|
9965
|
-
if (vErrors === null) {
|
|
9966
|
-
vErrors = [err7];
|
|
9967
|
-
}
|
|
9968
|
-
else {
|
|
9969
|
-
vErrors.push(err7);
|
|
9970
|
-
}
|
|
9971
|
-
errors++;
|
|
9972
|
-
}
|
|
9973
|
-
else {
|
|
9974
|
-
const _errs14 = errors;
|
|
9975
|
-
for (const key0 in data) {
|
|
9976
|
-
if (!(((((key0 === "interface") || (key0 === "method")) || (key0 === "protocol")) || (key0 === "contextId")) || (key0 === "protocolPath"))) {
|
|
9977
|
-
const err8 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
9978
|
-
if (vErrors === null) {
|
|
9979
|
-
vErrors = [err8];
|
|
9980
|
-
}
|
|
9981
|
-
else {
|
|
9982
|
-
vErrors.push(err8);
|
|
9983
|
-
}
|
|
9984
|
-
errors++;
|
|
9985
|
-
break;
|
|
9986
|
-
}
|
|
9987
|
-
}
|
|
9988
|
-
if (_errs14 === errors) {
|
|
9989
|
-
if (data.interface !== undefined) {
|
|
9990
|
-
const _errs15 = errors;
|
|
9991
|
-
if ("Messages" !== data.interface) {
|
|
9992
|
-
const err9 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
|
|
9993
|
-
if (vErrors === null) {
|
|
9994
|
-
vErrors = [err9];
|
|
9995
|
-
}
|
|
9996
|
-
else {
|
|
9997
|
-
vErrors.push(err9);
|
|
9998
|
-
}
|
|
9999
|
-
errors++;
|
|
10000
|
-
}
|
|
10001
|
-
var valid6 = _errs15 === errors;
|
|
10002
|
-
}
|
|
10003
|
-
else {
|
|
10004
|
-
var valid6 = true;
|
|
10005
|
-
}
|
|
10006
|
-
if (valid6) {
|
|
10007
|
-
if (data.method !== undefined) {
|
|
10008
|
-
const _errs16 = errors;
|
|
10009
|
-
if ("Read" !== data.method) {
|
|
10010
|
-
const err10 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/method/const", keyword: "const", params: { allowedValue: "Read" }, message: "must be equal to constant" };
|
|
10011
|
-
if (vErrors === null) {
|
|
10012
|
-
vErrors = [err10];
|
|
10013
|
-
}
|
|
10014
|
-
else {
|
|
10015
|
-
vErrors.push(err10);
|
|
10016
|
-
}
|
|
10017
|
-
errors++;
|
|
10018
|
-
}
|
|
10019
|
-
var valid6 = _errs16 === errors;
|
|
10020
|
-
}
|
|
10021
|
-
else {
|
|
10022
|
-
var valid6 = true;
|
|
10023
|
-
}
|
|
10024
|
-
if (valid6) {
|
|
10025
|
-
if (data.protocol !== undefined) {
|
|
10026
|
-
const _errs17 = errors;
|
|
10027
|
-
if (typeof data.protocol !== "string") {
|
|
10028
|
-
const err11 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10029
|
-
if (vErrors === null) {
|
|
10030
|
-
vErrors = [err11];
|
|
10031
|
-
}
|
|
10032
|
-
else {
|
|
10033
|
-
vErrors.push(err11);
|
|
10034
|
-
}
|
|
10035
|
-
errors++;
|
|
10036
|
-
}
|
|
10037
|
-
var valid6 = _errs17 === errors;
|
|
10038
|
-
}
|
|
10039
|
-
else {
|
|
10040
|
-
var valid6 = true;
|
|
10041
|
-
}
|
|
10042
|
-
if (valid6) {
|
|
10043
|
-
if (data.contextId !== undefined) {
|
|
10044
|
-
let data3 = data.contextId;
|
|
10045
|
-
const _errs19 = errors;
|
|
10046
|
-
if (errors === _errs19) {
|
|
10047
|
-
if (typeof data3 === "string") {
|
|
10048
|
-
if (func1(data3) > 600) {
|
|
10049
|
-
const err12 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10050
|
-
if (vErrors === null) {
|
|
10051
|
-
vErrors = [err12];
|
|
10052
|
-
}
|
|
10053
|
-
else {
|
|
10054
|
-
vErrors.push(err12);
|
|
10055
|
-
}
|
|
10056
|
-
errors++;
|
|
10057
|
-
}
|
|
10058
|
-
}
|
|
10059
|
-
else {
|
|
10060
|
-
const err13 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10061
|
-
if (vErrors === null) {
|
|
10062
|
-
vErrors = [err13];
|
|
10063
|
-
}
|
|
10064
|
-
else {
|
|
10065
|
-
vErrors.push(err13);
|
|
10066
|
-
}
|
|
10067
|
-
errors++;
|
|
10068
|
-
}
|
|
10069
|
-
}
|
|
10070
|
-
var valid6 = _errs19 === errors;
|
|
10071
|
-
}
|
|
10072
|
-
else {
|
|
10073
|
-
var valid6 = true;
|
|
10074
|
-
}
|
|
10075
|
-
if (valid6) {
|
|
10076
|
-
if (data.protocolPath !== undefined) {
|
|
10077
|
-
let data4 = data.protocolPath;
|
|
10078
|
-
const _errs21 = errors;
|
|
10079
|
-
if (errors === _errs21) {
|
|
10080
|
-
if (typeof data4 === "string") {
|
|
10081
|
-
if (func1(data4) > 600) {
|
|
10082
|
-
const err14 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10083
|
-
if (vErrors === null) {
|
|
10084
|
-
vErrors = [err14];
|
|
10085
|
-
}
|
|
10086
|
-
else {
|
|
10087
|
-
vErrors.push(err14);
|
|
10088
|
-
}
|
|
10089
|
-
errors++;
|
|
10090
|
-
}
|
|
10091
|
-
}
|
|
10092
|
-
else {
|
|
10093
|
-
const err15 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10094
|
-
if (vErrors === null) {
|
|
10095
|
-
vErrors = [err15];
|
|
10096
|
-
}
|
|
10097
|
-
else {
|
|
10098
|
-
vErrors.push(err15);
|
|
10099
|
-
}
|
|
10100
|
-
errors++;
|
|
10101
|
-
}
|
|
10102
|
-
}
|
|
10103
|
-
var valid6 = _errs21 === errors;
|
|
10104
|
-
}
|
|
10105
|
-
else {
|
|
10106
|
-
var valid6 = true;
|
|
10107
|
-
}
|
|
10108
|
-
}
|
|
10109
|
-
}
|
|
10110
|
-
}
|
|
10111
|
-
}
|
|
10112
|
-
}
|
|
10113
|
-
}
|
|
10114
|
-
}
|
|
10115
|
-
else {
|
|
10116
|
-
const err16 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10117
|
-
if (vErrors === null) {
|
|
10118
|
-
vErrors = [err16];
|
|
10119
|
-
}
|
|
10120
|
-
else {
|
|
10121
|
-
vErrors.push(err16);
|
|
10122
|
-
}
|
|
10123
|
-
errors++;
|
|
10124
|
-
}
|
|
10125
|
-
} var _valid0 = _errs1 === errors; if (_valid0) {
|
|
10126
|
-
valid0 = true;
|
|
10127
|
-
passing0 = 0;
|
|
10128
|
-
var props0 = true;
|
|
10129
|
-
} const _errs23 = errors; const _errs24 = errors; if (errors === _errs24) {
|
|
10130
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10131
|
-
let missing5;
|
|
10132
|
-
if (((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) {
|
|
10133
|
-
const err17 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
|
|
10134
|
-
if (vErrors === null) {
|
|
10135
|
-
vErrors = [err17];
|
|
10136
|
-
}
|
|
10137
|
-
else {
|
|
10138
|
-
vErrors.push(err17);
|
|
10139
|
-
}
|
|
10140
|
-
errors++;
|
|
10141
|
-
}
|
|
10142
|
-
else {
|
|
10143
|
-
const _errs26 = errors;
|
|
10144
|
-
for (const key1 in data) {
|
|
10145
|
-
if (!(((key1 === "interface") || (key1 === "method")) || (key1 === "protocol"))) {
|
|
10146
|
-
const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
10147
|
-
if (vErrors === null) {
|
|
10148
|
-
vErrors = [err18];
|
|
10149
|
-
}
|
|
10150
|
-
else {
|
|
10151
|
-
vErrors.push(err18);
|
|
10152
|
-
}
|
|
10153
|
-
errors++;
|
|
10154
|
-
break;
|
|
10155
|
-
}
|
|
10156
|
-
}
|
|
10157
|
-
if (_errs26 === errors) {
|
|
10158
|
-
if (data.interface !== undefined) {
|
|
10159
|
-
const _errs27 = errors;
|
|
10160
|
-
if ("Protocols" !== data.interface) {
|
|
10161
|
-
const err19 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Protocols" }, message: "must be equal to constant" };
|
|
10162
|
-
if (vErrors === null) {
|
|
10163
|
-
vErrors = [err19];
|
|
10164
|
-
}
|
|
10165
|
-
else {
|
|
10166
|
-
vErrors.push(err19);
|
|
10167
|
-
}
|
|
10168
|
-
errors++;
|
|
10169
|
-
}
|
|
10170
|
-
var valid8 = _errs27 === errors;
|
|
10171
|
-
}
|
|
10172
|
-
else {
|
|
10173
|
-
var valid8 = true;
|
|
10174
|
-
}
|
|
10175
|
-
if (valid8) {
|
|
10176
|
-
if (data.method !== undefined) {
|
|
10177
|
-
const _errs28 = errors;
|
|
10178
|
-
if ("Configure" !== data.method) {
|
|
10179
|
-
const err20 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/method/const", keyword: "const", params: { allowedValue: "Configure" }, message: "must be equal to constant" };
|
|
10180
|
-
if (vErrors === null) {
|
|
10181
|
-
vErrors = [err20];
|
|
10182
|
-
}
|
|
10183
|
-
else {
|
|
10184
|
-
vErrors.push(err20);
|
|
10185
|
-
}
|
|
10186
|
-
errors++;
|
|
10187
|
-
}
|
|
10188
|
-
var valid8 = _errs28 === errors;
|
|
10189
|
-
}
|
|
10190
|
-
else {
|
|
10191
|
-
var valid8 = true;
|
|
10192
|
-
}
|
|
10193
|
-
if (valid8) {
|
|
10194
|
-
if (data.protocol !== undefined) {
|
|
10195
|
-
const _errs29 = errors;
|
|
10196
|
-
if (typeof data.protocol !== "string") {
|
|
10197
|
-
const err21 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10198
|
-
if (vErrors === null) {
|
|
10199
|
-
vErrors = [err21];
|
|
10200
|
-
}
|
|
10201
|
-
else {
|
|
10202
|
-
vErrors.push(err21);
|
|
10203
|
-
}
|
|
10204
|
-
errors++;
|
|
10205
|
-
}
|
|
10206
|
-
var valid8 = _errs29 === errors;
|
|
10207
|
-
}
|
|
10208
|
-
else {
|
|
10209
|
-
var valid8 = true;
|
|
10210
|
-
}
|
|
10211
|
-
}
|
|
10212
|
-
}
|
|
10213
|
-
}
|
|
10214
|
-
}
|
|
10215
|
-
}
|
|
10216
|
-
else {
|
|
10217
|
-
const err22 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10218
|
-
if (vErrors === null) {
|
|
10219
|
-
vErrors = [err22];
|
|
10220
|
-
}
|
|
10221
|
-
else {
|
|
10222
|
-
vErrors.push(err22);
|
|
10223
|
-
}
|
|
10224
|
-
errors++;
|
|
10225
|
-
}
|
|
10226
|
-
} var _valid0 = _errs23 === errors; if (_valid0 && valid0) {
|
|
10227
|
-
valid0 = false;
|
|
10228
|
-
passing0 = [passing0, 1];
|
|
10229
|
-
}
|
|
10230
|
-
else {
|
|
10231
|
-
if (_valid0) {
|
|
10232
|
-
valid0 = true;
|
|
10233
|
-
passing0 = 1;
|
|
10234
|
-
if (props0 !== true) {
|
|
10235
|
-
props0 = true;
|
|
10236
|
-
}
|
|
10237
|
-
}
|
|
10238
|
-
const _errs31 = errors;
|
|
10239
|
-
const _errs32 = errors;
|
|
10240
|
-
if (errors === _errs32) {
|
|
10241
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10242
|
-
let missing6;
|
|
10243
|
-
if (((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) {
|
|
10244
|
-
const err23 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
|
|
10245
|
-
if (vErrors === null) {
|
|
10246
|
-
vErrors = [err23];
|
|
10247
|
-
}
|
|
10248
|
-
else {
|
|
10249
|
-
vErrors.push(err23);
|
|
10250
|
-
}
|
|
10251
|
-
errors++;
|
|
10252
|
-
}
|
|
10253
|
-
else {
|
|
10254
|
-
const _errs34 = errors;
|
|
10255
|
-
for (const key2 in data) {
|
|
10256
|
-
if (!(((key2 === "interface") || (key2 === "method")) || (key2 === "protocol"))) {
|
|
10257
|
-
const err24 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
10258
|
-
if (vErrors === null) {
|
|
10259
|
-
vErrors = [err24];
|
|
10260
|
-
}
|
|
10261
|
-
else {
|
|
10262
|
-
vErrors.push(err24);
|
|
10263
|
-
}
|
|
10264
|
-
errors++;
|
|
10265
|
-
break;
|
|
10266
|
-
}
|
|
10267
|
-
}
|
|
10268
|
-
if (_errs34 === errors) {
|
|
10269
|
-
if (data.interface !== undefined) {
|
|
10270
|
-
const _errs35 = errors;
|
|
10271
|
-
if ("Protocols" !== data.interface) {
|
|
10272
|
-
const err25 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Protocols" }, message: "must be equal to constant" };
|
|
10273
|
-
if (vErrors === null) {
|
|
10274
|
-
vErrors = [err25];
|
|
10275
|
-
}
|
|
10276
|
-
else {
|
|
10277
|
-
vErrors.push(err25);
|
|
10278
|
-
}
|
|
10279
|
-
errors++;
|
|
10280
|
-
}
|
|
10281
|
-
var valid10 = _errs35 === errors;
|
|
10282
|
-
}
|
|
10283
|
-
else {
|
|
10284
|
-
var valid10 = true;
|
|
10285
|
-
}
|
|
10286
|
-
if (valid10) {
|
|
10287
|
-
if (data.method !== undefined) {
|
|
10288
|
-
const _errs36 = errors;
|
|
10289
|
-
if ("Query" !== data.method) {
|
|
10290
|
-
const err26 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/method/const", keyword: "const", params: { allowedValue: "Query" }, message: "must be equal to constant" };
|
|
10291
|
-
if (vErrors === null) {
|
|
10292
|
-
vErrors = [err26];
|
|
10293
|
-
}
|
|
10294
|
-
else {
|
|
10295
|
-
vErrors.push(err26);
|
|
10296
|
-
}
|
|
10297
|
-
errors++;
|
|
10298
|
-
}
|
|
10299
|
-
var valid10 = _errs36 === errors;
|
|
10300
|
-
}
|
|
10301
|
-
else {
|
|
10302
|
-
var valid10 = true;
|
|
10303
|
-
}
|
|
10304
|
-
if (valid10) {
|
|
10305
|
-
if (data.protocol !== undefined) {
|
|
10306
|
-
const _errs37 = errors;
|
|
10307
|
-
if (typeof data.protocol !== "string") {
|
|
10308
|
-
const err27 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10309
|
-
if (vErrors === null) {
|
|
10310
|
-
vErrors = [err27];
|
|
10311
|
-
}
|
|
10312
|
-
else {
|
|
10313
|
-
vErrors.push(err27);
|
|
10314
|
-
}
|
|
10315
|
-
errors++;
|
|
10316
|
-
}
|
|
10317
|
-
var valid10 = _errs37 === errors;
|
|
10318
|
-
}
|
|
10319
|
-
else {
|
|
10320
|
-
var valid10 = true;
|
|
10321
|
-
}
|
|
10322
|
-
}
|
|
10323
|
-
}
|
|
10324
|
-
}
|
|
10325
|
-
}
|
|
10326
|
-
}
|
|
10327
|
-
else {
|
|
10328
|
-
const err28 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10329
|
-
if (vErrors === null) {
|
|
10330
|
-
vErrors = [err28];
|
|
10331
|
-
}
|
|
10332
|
-
else {
|
|
10333
|
-
vErrors.push(err28);
|
|
10334
|
-
}
|
|
10335
|
-
errors++;
|
|
10336
|
-
}
|
|
10337
|
-
}
|
|
10338
|
-
var _valid0 = _errs31 === errors;
|
|
10339
|
-
if (_valid0 && valid0) {
|
|
10340
|
-
valid0 = false;
|
|
10341
|
-
passing0 = [passing0, 2];
|
|
10342
|
-
}
|
|
10343
|
-
else {
|
|
10344
|
-
if (_valid0) {
|
|
10345
|
-
valid0 = true;
|
|
10346
|
-
passing0 = 2;
|
|
10347
|
-
if (props0 !== true) {
|
|
10348
|
-
props0 = true;
|
|
10349
|
-
}
|
|
10350
|
-
}
|
|
10351
|
-
const _errs39 = errors;
|
|
10352
|
-
const _errs40 = errors;
|
|
10353
|
-
if (errors === _errs40) {
|
|
10354
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10355
|
-
let missing7;
|
|
10356
|
-
if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
|
|
10357
|
-
const err29 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
|
|
10358
|
-
if (vErrors === null) {
|
|
10359
|
-
vErrors = [err29];
|
|
10360
|
-
}
|
|
10361
|
-
else {
|
|
10362
|
-
vErrors.push(err29);
|
|
10363
|
-
}
|
|
10364
|
-
errors++;
|
|
10365
|
-
}
|
|
10366
|
-
else {
|
|
10367
|
-
const _errs42 = errors;
|
|
10368
|
-
for (const key3 in data) {
|
|
10369
|
-
if (!(((((key3 === "interface") || (key3 === "method")) || (key3 === "protocol")) || (key3 === "contextId")) || (key3 === "protocolPath"))) {
|
|
10370
|
-
const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
10371
|
-
if (vErrors === null) {
|
|
10372
|
-
vErrors = [err30];
|
|
10373
|
-
}
|
|
10374
|
-
else {
|
|
10375
|
-
vErrors.push(err30);
|
|
10376
|
-
}
|
|
10377
|
-
errors++;
|
|
10378
|
-
break;
|
|
10379
|
-
}
|
|
10380
|
-
}
|
|
10381
|
-
if (_errs42 === errors) {
|
|
10382
|
-
if (data.interface !== undefined) {
|
|
10383
|
-
const _errs43 = errors;
|
|
10384
|
-
if ("Records" !== data.interface) {
|
|
10385
|
-
const err31 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
10386
|
-
if (vErrors === null) {
|
|
10387
|
-
vErrors = [err31];
|
|
10388
|
-
}
|
|
10389
|
-
else {
|
|
10390
|
-
vErrors.push(err31);
|
|
10391
|
-
}
|
|
10392
|
-
errors++;
|
|
10393
|
-
}
|
|
10394
|
-
var valid12 = _errs43 === errors;
|
|
10395
|
-
}
|
|
10396
|
-
else {
|
|
10397
|
-
var valid12 = true;
|
|
10398
|
-
}
|
|
10399
|
-
if (valid12) {
|
|
10400
|
-
if (data.method !== undefined) {
|
|
10401
|
-
const _errs44 = errors;
|
|
10402
|
-
if ("Read" !== data.method) {
|
|
10403
|
-
const err32 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/method/const", keyword: "const", params: { allowedValue: "Read" }, message: "must be equal to constant" };
|
|
10404
|
-
if (vErrors === null) {
|
|
10405
|
-
vErrors = [err32];
|
|
10406
|
-
}
|
|
10407
|
-
else {
|
|
10408
|
-
vErrors.push(err32);
|
|
10409
|
-
}
|
|
10410
|
-
errors++;
|
|
10411
|
-
}
|
|
10412
|
-
var valid12 = _errs44 === errors;
|
|
10413
|
-
}
|
|
10414
|
-
else {
|
|
10415
|
-
var valid12 = true;
|
|
10416
|
-
}
|
|
10417
|
-
if (valid12) {
|
|
10418
|
-
if (data.protocol !== undefined) {
|
|
10419
|
-
const _errs45 = errors;
|
|
10420
|
-
if (typeof data.protocol !== "string") {
|
|
10421
|
-
const err33 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10422
|
-
if (vErrors === null) {
|
|
10423
|
-
vErrors = [err33];
|
|
10424
|
-
}
|
|
10425
|
-
else {
|
|
10426
|
-
vErrors.push(err33);
|
|
10427
|
-
}
|
|
10428
|
-
errors++;
|
|
10429
|
-
}
|
|
10430
|
-
var valid12 = _errs45 === errors;
|
|
10431
|
-
}
|
|
10432
|
-
else {
|
|
10433
|
-
var valid12 = true;
|
|
10434
|
-
}
|
|
10435
|
-
if (valid12) {
|
|
10436
|
-
if (data.contextId !== undefined) {
|
|
10437
|
-
let data14 = data.contextId;
|
|
10438
|
-
const _errs47 = errors;
|
|
10439
|
-
if (errors === _errs47) {
|
|
10440
|
-
if (typeof data14 === "string") {
|
|
10441
|
-
if (func1(data14) > 600) {
|
|
10442
|
-
const err34 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10443
|
-
if (vErrors === null) {
|
|
10444
|
-
vErrors = [err34];
|
|
10445
|
-
}
|
|
10446
|
-
else {
|
|
10447
|
-
vErrors.push(err34);
|
|
10448
|
-
}
|
|
10449
|
-
errors++;
|
|
10450
|
-
}
|
|
10451
|
-
}
|
|
10452
|
-
else {
|
|
10453
|
-
const err35 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10454
|
-
if (vErrors === null) {
|
|
10455
|
-
vErrors = [err35];
|
|
10456
|
-
}
|
|
10457
|
-
else {
|
|
10458
|
-
vErrors.push(err35);
|
|
10459
|
-
}
|
|
10460
|
-
errors++;
|
|
10461
|
-
}
|
|
10462
|
-
}
|
|
10463
|
-
var valid12 = _errs47 === errors;
|
|
10464
|
-
}
|
|
10465
|
-
else {
|
|
10466
|
-
var valid12 = true;
|
|
10467
|
-
}
|
|
10468
|
-
if (valid12) {
|
|
10469
|
-
if (data.protocolPath !== undefined) {
|
|
10470
|
-
let data15 = data.protocolPath;
|
|
10471
|
-
const _errs49 = errors;
|
|
10472
|
-
if (errors === _errs49) {
|
|
10473
|
-
if (typeof data15 === "string") {
|
|
10474
|
-
if (func1(data15) > 600) {
|
|
10475
|
-
const err36 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10476
|
-
if (vErrors === null) {
|
|
10477
|
-
vErrors = [err36];
|
|
10478
|
-
}
|
|
10479
|
-
else {
|
|
10480
|
-
vErrors.push(err36);
|
|
10481
|
-
}
|
|
10482
|
-
errors++;
|
|
10483
|
-
}
|
|
10484
|
-
}
|
|
10485
|
-
else {
|
|
10486
|
-
const err37 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10487
|
-
if (vErrors === null) {
|
|
10488
|
-
vErrors = [err37];
|
|
10489
|
-
}
|
|
10490
|
-
else {
|
|
10491
|
-
vErrors.push(err37);
|
|
10492
|
-
}
|
|
10493
|
-
errors++;
|
|
10494
|
-
}
|
|
10495
|
-
}
|
|
10496
|
-
var valid12 = _errs49 === errors;
|
|
10497
|
-
}
|
|
10498
|
-
else {
|
|
10499
|
-
var valid12 = true;
|
|
10500
|
-
}
|
|
10501
|
-
}
|
|
10502
|
-
}
|
|
10503
|
-
}
|
|
10504
|
-
}
|
|
10505
|
-
}
|
|
10506
|
-
}
|
|
9629
|
+
const _errs8 = errors;
|
|
9630
|
+
let valid4 = true;
|
|
9631
|
+
const _errs9 = errors;
|
|
9632
|
+
const _errs10 = errors;
|
|
9633
|
+
let valid5 = false;
|
|
9634
|
+
const _errs11 = errors;
|
|
9635
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9636
|
+
let missing1;
|
|
9637
|
+
if ((data.contextId === undefined) && (missing1 = "contextId")) {
|
|
9638
|
+
const err2 = {};
|
|
9639
|
+
if (vErrors === null) {
|
|
9640
|
+
vErrors = [err2];
|
|
10507
9641
|
}
|
|
10508
9642
|
else {
|
|
10509
|
-
|
|
9643
|
+
vErrors.push(err2);
|
|
9644
|
+
}
|
|
9645
|
+
errors++;
|
|
9646
|
+
}
|
|
9647
|
+
}
|
|
9648
|
+
var _valid2 = _errs11 === errors;
|
|
9649
|
+
valid5 = valid5 || _valid2;
|
|
9650
|
+
const _errs12 = errors;
|
|
9651
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9652
|
+
let missing2;
|
|
9653
|
+
if ((data.protocolPath === undefined) && (missing2 = "protocolPath")) {
|
|
9654
|
+
const err3 = {};
|
|
9655
|
+
if (vErrors === null) {
|
|
9656
|
+
vErrors = [err3];
|
|
9657
|
+
}
|
|
9658
|
+
else {
|
|
9659
|
+
vErrors.push(err3);
|
|
9660
|
+
}
|
|
9661
|
+
errors++;
|
|
9662
|
+
}
|
|
9663
|
+
}
|
|
9664
|
+
var _valid2 = _errs12 === errors;
|
|
9665
|
+
valid5 = valid5 || _valid2;
|
|
9666
|
+
if (!valid5) {
|
|
9667
|
+
const err4 = {};
|
|
9668
|
+
if (vErrors === null) {
|
|
9669
|
+
vErrors = [err4];
|
|
9670
|
+
}
|
|
9671
|
+
else {
|
|
9672
|
+
vErrors.push(err4);
|
|
9673
|
+
}
|
|
9674
|
+
errors++;
|
|
9675
|
+
}
|
|
9676
|
+
else {
|
|
9677
|
+
errors = _errs10;
|
|
9678
|
+
if (vErrors !== null) {
|
|
9679
|
+
if (_errs10) {
|
|
9680
|
+
vErrors.length = _errs10;
|
|
9681
|
+
}
|
|
9682
|
+
else {
|
|
9683
|
+
vErrors = null;
|
|
9684
|
+
}
|
|
9685
|
+
}
|
|
9686
|
+
}
|
|
9687
|
+
var _valid1 = _errs9 === errors;
|
|
9688
|
+
errors = _errs8;
|
|
9689
|
+
if (vErrors !== null) {
|
|
9690
|
+
if (_errs8) {
|
|
9691
|
+
vErrors.length = _errs8;
|
|
9692
|
+
}
|
|
9693
|
+
else {
|
|
9694
|
+
vErrors = null;
|
|
9695
|
+
}
|
|
9696
|
+
}
|
|
9697
|
+
if (_valid1) {
|
|
9698
|
+
const _errs13 = errors;
|
|
9699
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9700
|
+
let missing3;
|
|
9701
|
+
if ((data.protocol === undefined) && (missing3 = "protocol")) {
|
|
9702
|
+
const err5 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/1/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
|
|
10510
9703
|
if (vErrors === null) {
|
|
10511
|
-
vErrors = [
|
|
9704
|
+
vErrors = [err5];
|
|
10512
9705
|
}
|
|
10513
9706
|
else {
|
|
10514
|
-
vErrors.push(
|
|
9707
|
+
vErrors.push(err5);
|
|
10515
9708
|
}
|
|
10516
9709
|
errors++;
|
|
10517
9710
|
}
|
|
10518
9711
|
}
|
|
10519
|
-
var
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
9712
|
+
var _valid1 = _errs13 === errors;
|
|
9713
|
+
valid4 = _valid1;
|
|
9714
|
+
}
|
|
9715
|
+
if (!valid4) {
|
|
9716
|
+
const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
9717
|
+
if (vErrors === null) {
|
|
9718
|
+
vErrors = [err6];
|
|
10523
9719
|
}
|
|
10524
9720
|
else {
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
9721
|
+
vErrors.push(err6);
|
|
9722
|
+
}
|
|
9723
|
+
errors++;
|
|
9724
|
+
}
|
|
9725
|
+
var valid2 = _errs7 === errors;
|
|
9726
|
+
} if (errors === _errs2) {
|
|
9727
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9728
|
+
let missing4;
|
|
9729
|
+
if (((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) {
|
|
9730
|
+
const err7 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
|
|
9731
|
+
if (vErrors === null) {
|
|
9732
|
+
vErrors = [err7];
|
|
9733
|
+
}
|
|
9734
|
+
else {
|
|
9735
|
+
vErrors.push(err7);
|
|
9736
|
+
}
|
|
9737
|
+
errors++;
|
|
9738
|
+
}
|
|
9739
|
+
else {
|
|
9740
|
+
const _errs14 = errors;
|
|
9741
|
+
for (const key0 in data) {
|
|
9742
|
+
if (!(((((key0 === "interface") || (key0 === "method")) || (key0 === "protocol")) || (key0 === "contextId")) || (key0 === "protocolPath"))) {
|
|
9743
|
+
const err8 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
9744
|
+
if (vErrors === null) {
|
|
9745
|
+
vErrors = [err8];
|
|
9746
|
+
}
|
|
9747
|
+
else {
|
|
9748
|
+
vErrors.push(err8);
|
|
9749
|
+
}
|
|
9750
|
+
errors++;
|
|
9751
|
+
break;
|
|
10530
9752
|
}
|
|
10531
9753
|
}
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
|
|
10538
|
-
const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
|
|
9754
|
+
if (_errs14 === errors) {
|
|
9755
|
+
if (data.interface !== undefined) {
|
|
9756
|
+
const _errs15 = errors;
|
|
9757
|
+
if ("Messages" !== data.interface) {
|
|
9758
|
+
const err9 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
|
|
10539
9759
|
if (vErrors === null) {
|
|
10540
|
-
vErrors = [
|
|
9760
|
+
vErrors = [err9];
|
|
10541
9761
|
}
|
|
10542
9762
|
else {
|
|
10543
|
-
vErrors.push(
|
|
9763
|
+
vErrors.push(err9);
|
|
10544
9764
|
}
|
|
10545
9765
|
errors++;
|
|
10546
9766
|
}
|
|
9767
|
+
var valid6 = _errs15 === errors;
|
|
9768
|
+
}
|
|
9769
|
+
else {
|
|
9770
|
+
var valid6 = true;
|
|
9771
|
+
}
|
|
9772
|
+
if (valid6) {
|
|
9773
|
+
if (data.method !== undefined) {
|
|
9774
|
+
const _errs16 = errors;
|
|
9775
|
+
if ("Read" !== data.method) {
|
|
9776
|
+
const err10 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/method/const", keyword: "const", params: { allowedValue: "Read" }, message: "must be equal to constant" };
|
|
9777
|
+
if (vErrors === null) {
|
|
9778
|
+
vErrors = [err10];
|
|
9779
|
+
}
|
|
9780
|
+
else {
|
|
9781
|
+
vErrors.push(err10);
|
|
9782
|
+
}
|
|
9783
|
+
errors++;
|
|
9784
|
+
}
|
|
9785
|
+
var valid6 = _errs16 === errors;
|
|
9786
|
+
}
|
|
10547
9787
|
else {
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
9788
|
+
var valid6 = true;
|
|
9789
|
+
}
|
|
9790
|
+
if (valid6) {
|
|
9791
|
+
if (data.protocol !== undefined) {
|
|
9792
|
+
const _errs17 = errors;
|
|
9793
|
+
if (typeof data.protocol !== "string") {
|
|
9794
|
+
const err11 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10552
9795
|
if (vErrors === null) {
|
|
10553
|
-
vErrors = [
|
|
9796
|
+
vErrors = [err11];
|
|
10554
9797
|
}
|
|
10555
9798
|
else {
|
|
10556
|
-
vErrors.push(
|
|
9799
|
+
vErrors.push(err11);
|
|
10557
9800
|
}
|
|
10558
9801
|
errors++;
|
|
10559
|
-
break;
|
|
10560
9802
|
}
|
|
9803
|
+
var valid6 = _errs17 === errors;
|
|
10561
9804
|
}
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
errors++;
|
|
10574
|
-
}
|
|
10575
|
-
var valid14 = _errs55 === errors;
|
|
10576
|
-
}
|
|
10577
|
-
else {
|
|
10578
|
-
var valid14 = true;
|
|
10579
|
-
}
|
|
10580
|
-
if (valid14) {
|
|
10581
|
-
if (data.method !== undefined) {
|
|
10582
|
-
const _errs56 = errors;
|
|
10583
|
-
if ("Delete" !== data.method) {
|
|
10584
|
-
const err42 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/method/const", keyword: "const", params: { allowedValue: "Delete" }, message: "must be equal to constant" };
|
|
10585
|
-
if (vErrors === null) {
|
|
10586
|
-
vErrors = [err42];
|
|
10587
|
-
}
|
|
10588
|
-
else {
|
|
10589
|
-
vErrors.push(err42);
|
|
10590
|
-
}
|
|
10591
|
-
errors++;
|
|
10592
|
-
}
|
|
10593
|
-
var valid14 = _errs56 === errors;
|
|
10594
|
-
}
|
|
10595
|
-
else {
|
|
10596
|
-
var valid14 = true;
|
|
10597
|
-
}
|
|
10598
|
-
if (valid14) {
|
|
10599
|
-
if (data.protocol !== undefined) {
|
|
10600
|
-
const _errs57 = errors;
|
|
10601
|
-
if (typeof data.protocol !== "string") {
|
|
10602
|
-
const err43 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9805
|
+
else {
|
|
9806
|
+
var valid6 = true;
|
|
9807
|
+
}
|
|
9808
|
+
if (valid6) {
|
|
9809
|
+
if (data.contextId !== undefined) {
|
|
9810
|
+
let data3 = data.contextId;
|
|
9811
|
+
const _errs19 = errors;
|
|
9812
|
+
if (errors === _errs19) {
|
|
9813
|
+
if (typeof data3 === "string") {
|
|
9814
|
+
if (func1(data3) > 600) {
|
|
9815
|
+
const err12 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10603
9816
|
if (vErrors === null) {
|
|
10604
|
-
vErrors = [
|
|
9817
|
+
vErrors = [err12];
|
|
10605
9818
|
}
|
|
10606
9819
|
else {
|
|
10607
|
-
vErrors.push(
|
|
9820
|
+
vErrors.push(err12);
|
|
10608
9821
|
}
|
|
10609
9822
|
errors++;
|
|
10610
9823
|
}
|
|
10611
|
-
var valid14 = _errs57 === errors;
|
|
10612
9824
|
}
|
|
10613
9825
|
else {
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
9826
|
+
const err13 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9827
|
+
if (vErrors === null) {
|
|
9828
|
+
vErrors = [err13];
|
|
9829
|
+
}
|
|
9830
|
+
else {
|
|
9831
|
+
vErrors.push(err13);
|
|
9832
|
+
}
|
|
9833
|
+
errors++;
|
|
9834
|
+
}
|
|
9835
|
+
}
|
|
9836
|
+
var valid6 = _errs19 === errors;
|
|
9837
|
+
}
|
|
9838
|
+
else {
|
|
9839
|
+
var valid6 = true;
|
|
9840
|
+
}
|
|
9841
|
+
if (valid6) {
|
|
9842
|
+
if (data.protocolPath !== undefined) {
|
|
9843
|
+
let data4 = data.protocolPath;
|
|
9844
|
+
const _errs21 = errors;
|
|
9845
|
+
if (errors === _errs21) {
|
|
9846
|
+
if (typeof data4 === "string") {
|
|
9847
|
+
if (func1(data4) > 600) {
|
|
9848
|
+
const err14 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
9849
|
+
if (vErrors === null) {
|
|
9850
|
+
vErrors = [err14];
|
|
10632
9851
|
}
|
|
10633
9852
|
else {
|
|
10634
|
-
|
|
10635
|
-
if (vErrors === null) {
|
|
10636
|
-
vErrors = [err45];
|
|
10637
|
-
}
|
|
10638
|
-
else {
|
|
10639
|
-
vErrors.push(err45);
|
|
10640
|
-
}
|
|
10641
|
-
errors++;
|
|
9853
|
+
vErrors.push(err14);
|
|
10642
9854
|
}
|
|
9855
|
+
errors++;
|
|
10643
9856
|
}
|
|
10644
|
-
var valid14 = _errs59 === errors;
|
|
10645
9857
|
}
|
|
10646
9858
|
else {
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
if (data.protocolPath !== undefined) {
|
|
10651
|
-
let data20 = data.protocolPath;
|
|
10652
|
-
const _errs61 = errors;
|
|
10653
|
-
if (errors === _errs61) {
|
|
10654
|
-
if (typeof data20 === "string") {
|
|
10655
|
-
if (func1(data20) > 600) {
|
|
10656
|
-
const err46 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10657
|
-
if (vErrors === null) {
|
|
10658
|
-
vErrors = [err46];
|
|
10659
|
-
}
|
|
10660
|
-
else {
|
|
10661
|
-
vErrors.push(err46);
|
|
10662
|
-
}
|
|
10663
|
-
errors++;
|
|
10664
|
-
}
|
|
10665
|
-
}
|
|
10666
|
-
else {
|
|
10667
|
-
const err47 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10668
|
-
if (vErrors === null) {
|
|
10669
|
-
vErrors = [err47];
|
|
10670
|
-
}
|
|
10671
|
-
else {
|
|
10672
|
-
vErrors.push(err47);
|
|
10673
|
-
}
|
|
10674
|
-
errors++;
|
|
10675
|
-
}
|
|
10676
|
-
}
|
|
10677
|
-
var valid14 = _errs61 === errors;
|
|
9859
|
+
const err15 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9860
|
+
if (vErrors === null) {
|
|
9861
|
+
vErrors = [err15];
|
|
10678
9862
|
}
|
|
10679
9863
|
else {
|
|
10680
|
-
|
|
9864
|
+
vErrors.push(err15);
|
|
10681
9865
|
}
|
|
9866
|
+
errors++;
|
|
10682
9867
|
}
|
|
10683
9868
|
}
|
|
9869
|
+
var valid6 = _errs21 === errors;
|
|
9870
|
+
}
|
|
9871
|
+
else {
|
|
9872
|
+
var valid6 = true;
|
|
10684
9873
|
}
|
|
10685
9874
|
}
|
|
10686
9875
|
}
|
|
10687
9876
|
}
|
|
10688
9877
|
}
|
|
10689
|
-
|
|
10690
|
-
|
|
9878
|
+
}
|
|
9879
|
+
}
|
|
9880
|
+
}
|
|
9881
|
+
else {
|
|
9882
|
+
const err16 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9883
|
+
if (vErrors === null) {
|
|
9884
|
+
vErrors = [err16];
|
|
9885
|
+
}
|
|
9886
|
+
else {
|
|
9887
|
+
vErrors.push(err16);
|
|
9888
|
+
}
|
|
9889
|
+
errors++;
|
|
9890
|
+
}
|
|
9891
|
+
} var _valid0 = _errs1 === errors; if (_valid0) {
|
|
9892
|
+
valid0 = true;
|
|
9893
|
+
passing0 = 0;
|
|
9894
|
+
var props0 = true;
|
|
9895
|
+
} const _errs23 = errors; const _errs24 = errors; if (errors === _errs24) {
|
|
9896
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9897
|
+
let missing5;
|
|
9898
|
+
if (((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) {
|
|
9899
|
+
const err17 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
|
|
9900
|
+
if (vErrors === null) {
|
|
9901
|
+
vErrors = [err17];
|
|
9902
|
+
}
|
|
9903
|
+
else {
|
|
9904
|
+
vErrors.push(err17);
|
|
9905
|
+
}
|
|
9906
|
+
errors++;
|
|
9907
|
+
}
|
|
9908
|
+
else {
|
|
9909
|
+
const _errs26 = errors;
|
|
9910
|
+
for (const key1 in data) {
|
|
9911
|
+
if (!(((key1 === "interface") || (key1 === "method")) || (key1 === "protocol"))) {
|
|
9912
|
+
const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
10691
9913
|
if (vErrors === null) {
|
|
10692
|
-
vErrors = [
|
|
9914
|
+
vErrors = [err18];
|
|
10693
9915
|
}
|
|
10694
9916
|
else {
|
|
10695
|
-
vErrors.push(
|
|
9917
|
+
vErrors.push(err18);
|
|
10696
9918
|
}
|
|
10697
9919
|
errors++;
|
|
9920
|
+
break;
|
|
10698
9921
|
}
|
|
10699
9922
|
}
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
9923
|
+
if (_errs26 === errors) {
|
|
9924
|
+
if (data.interface !== undefined) {
|
|
9925
|
+
const _errs27 = errors;
|
|
9926
|
+
if ("Protocols" !== data.interface) {
|
|
9927
|
+
const err19 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Protocols" }, message: "must be equal to constant" };
|
|
9928
|
+
if (vErrors === null) {
|
|
9929
|
+
vErrors = [err19];
|
|
9930
|
+
}
|
|
9931
|
+
else {
|
|
9932
|
+
vErrors.push(err19);
|
|
9933
|
+
}
|
|
9934
|
+
errors++;
|
|
9935
|
+
}
|
|
9936
|
+
var valid8 = _errs27 === errors;
|
|
9937
|
+
}
|
|
9938
|
+
else {
|
|
9939
|
+
var valid8 = true;
|
|
9940
|
+
}
|
|
9941
|
+
if (valid8) {
|
|
9942
|
+
if (data.method !== undefined) {
|
|
9943
|
+
const _errs28 = errors;
|
|
9944
|
+
if ("Configure" !== data.method) {
|
|
9945
|
+
const err20 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/method/const", keyword: "const", params: { allowedValue: "Configure" }, message: "must be equal to constant" };
|
|
9946
|
+
if (vErrors === null) {
|
|
9947
|
+
vErrors = [err20];
|
|
9948
|
+
}
|
|
9949
|
+
else {
|
|
9950
|
+
vErrors.push(err20);
|
|
9951
|
+
}
|
|
9952
|
+
errors++;
|
|
9953
|
+
}
|
|
9954
|
+
var valid8 = _errs28 === errors;
|
|
9955
|
+
}
|
|
9956
|
+
else {
|
|
9957
|
+
var valid8 = true;
|
|
9958
|
+
}
|
|
9959
|
+
if (valid8) {
|
|
9960
|
+
if (data.protocol !== undefined) {
|
|
9961
|
+
const _errs29 = errors;
|
|
9962
|
+
if (typeof data.protocol !== "string") {
|
|
9963
|
+
const err21 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
9964
|
+
if (vErrors === null) {
|
|
9965
|
+
vErrors = [err21];
|
|
9966
|
+
}
|
|
9967
|
+
else {
|
|
9968
|
+
vErrors.push(err21);
|
|
9969
|
+
}
|
|
9970
|
+
errors++;
|
|
9971
|
+
}
|
|
9972
|
+
var valid8 = _errs29 === errors;
|
|
9973
|
+
}
|
|
9974
|
+
else {
|
|
9975
|
+
var valid8 = true;
|
|
9976
|
+
}
|
|
9977
|
+
}
|
|
9978
|
+
}
|
|
9979
|
+
}
|
|
9980
|
+
}
|
|
9981
|
+
}
|
|
9982
|
+
else {
|
|
9983
|
+
const err22 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
9984
|
+
if (vErrors === null) {
|
|
9985
|
+
vErrors = [err22];
|
|
9986
|
+
}
|
|
9987
|
+
else {
|
|
9988
|
+
vErrors.push(err22);
|
|
9989
|
+
}
|
|
9990
|
+
errors++;
|
|
9991
|
+
}
|
|
9992
|
+
} var _valid0 = _errs23 === errors; if (_valid0 && valid0) {
|
|
9993
|
+
valid0 = false;
|
|
9994
|
+
passing0 = [passing0, 1];
|
|
9995
|
+
}
|
|
9996
|
+
else {
|
|
9997
|
+
if (_valid0) {
|
|
9998
|
+
valid0 = true;
|
|
9999
|
+
passing0 = 1;
|
|
10000
|
+
if (props0 !== true) {
|
|
10001
|
+
props0 = true;
|
|
10002
|
+
}
|
|
10003
|
+
}
|
|
10004
|
+
const _errs31 = errors;
|
|
10005
|
+
const _errs32 = errors;
|
|
10006
|
+
if (errors === _errs32) {
|
|
10007
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10008
|
+
let missing6;
|
|
10009
|
+
if (((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) {
|
|
10010
|
+
const err23 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
|
|
10011
|
+
if (vErrors === null) {
|
|
10012
|
+
vErrors = [err23];
|
|
10013
|
+
}
|
|
10014
|
+
else {
|
|
10015
|
+
vErrors.push(err23);
|
|
10016
|
+
}
|
|
10017
|
+
errors++;
|
|
10704
10018
|
}
|
|
10705
10019
|
else {
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10020
|
+
const _errs34 = errors;
|
|
10021
|
+
for (const key2 in data) {
|
|
10022
|
+
if (!(((key2 === "interface") || (key2 === "method")) || (key2 === "protocol"))) {
|
|
10023
|
+
const err24 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
10024
|
+
if (vErrors === null) {
|
|
10025
|
+
vErrors = [err24];
|
|
10026
|
+
}
|
|
10027
|
+
else {
|
|
10028
|
+
vErrors.push(err24);
|
|
10029
|
+
}
|
|
10030
|
+
errors++;
|
|
10031
|
+
break;
|
|
10711
10032
|
}
|
|
10712
10033
|
}
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
|
|
10719
|
-
const err49 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
|
|
10034
|
+
if (_errs34 === errors) {
|
|
10035
|
+
if (data.interface !== undefined) {
|
|
10036
|
+
const _errs35 = errors;
|
|
10037
|
+
if ("Protocols" !== data.interface) {
|
|
10038
|
+
const err25 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Protocols" }, message: "must be equal to constant" };
|
|
10720
10039
|
if (vErrors === null) {
|
|
10721
|
-
vErrors = [
|
|
10040
|
+
vErrors = [err25];
|
|
10722
10041
|
}
|
|
10723
10042
|
else {
|
|
10724
|
-
vErrors.push(
|
|
10043
|
+
vErrors.push(err25);
|
|
10044
|
+
}
|
|
10045
|
+
errors++;
|
|
10046
|
+
}
|
|
10047
|
+
var valid10 = _errs35 === errors;
|
|
10048
|
+
}
|
|
10049
|
+
else {
|
|
10050
|
+
var valid10 = true;
|
|
10051
|
+
}
|
|
10052
|
+
if (valid10) {
|
|
10053
|
+
if (data.method !== undefined) {
|
|
10054
|
+
const _errs36 = errors;
|
|
10055
|
+
if ("Query" !== data.method) {
|
|
10056
|
+
const err26 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/method/const", keyword: "const", params: { allowedValue: "Query" }, message: "must be equal to constant" };
|
|
10057
|
+
if (vErrors === null) {
|
|
10058
|
+
vErrors = [err26];
|
|
10059
|
+
}
|
|
10060
|
+
else {
|
|
10061
|
+
vErrors.push(err26);
|
|
10062
|
+
}
|
|
10063
|
+
errors++;
|
|
10725
10064
|
}
|
|
10726
|
-
errors
|
|
10065
|
+
var valid10 = _errs36 === errors;
|
|
10727
10066
|
}
|
|
10728
10067
|
else {
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10068
|
+
var valid10 = true;
|
|
10069
|
+
}
|
|
10070
|
+
if (valid10) {
|
|
10071
|
+
if (data.protocol !== undefined) {
|
|
10072
|
+
const _errs37 = errors;
|
|
10073
|
+
if (typeof data.protocol !== "string") {
|
|
10074
|
+
const err27 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10733
10075
|
if (vErrors === null) {
|
|
10734
|
-
vErrors = [
|
|
10076
|
+
vErrors = [err27];
|
|
10735
10077
|
}
|
|
10736
10078
|
else {
|
|
10737
|
-
vErrors.push(
|
|
10079
|
+
vErrors.push(err27);
|
|
10738
10080
|
}
|
|
10739
10081
|
errors++;
|
|
10740
|
-
break;
|
|
10741
10082
|
}
|
|
10083
|
+
var valid10 = _errs37 === errors;
|
|
10742
10084
|
}
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
const _errs67 = errors;
|
|
10746
|
-
if ("Records" !== data.interface) {
|
|
10747
|
-
const err51 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
10748
|
-
if (vErrors === null) {
|
|
10749
|
-
vErrors = [err51];
|
|
10750
|
-
}
|
|
10751
|
-
else {
|
|
10752
|
-
vErrors.push(err51);
|
|
10753
|
-
}
|
|
10754
|
-
errors++;
|
|
10755
|
-
}
|
|
10756
|
-
var valid16 = _errs67 === errors;
|
|
10757
|
-
}
|
|
10758
|
-
else {
|
|
10759
|
-
var valid16 = true;
|
|
10760
|
-
}
|
|
10761
|
-
if (valid16) {
|
|
10762
|
-
if (data.method !== undefined) {
|
|
10763
|
-
const _errs68 = errors;
|
|
10764
|
-
if ("Write" !== data.method) {
|
|
10765
|
-
const err52 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/method/const", keyword: "const", params: { allowedValue: "Write" }, message: "must be equal to constant" };
|
|
10766
|
-
if (vErrors === null) {
|
|
10767
|
-
vErrors = [err52];
|
|
10768
|
-
}
|
|
10769
|
-
else {
|
|
10770
|
-
vErrors.push(err52);
|
|
10771
|
-
}
|
|
10772
|
-
errors++;
|
|
10773
|
-
}
|
|
10774
|
-
var valid16 = _errs68 === errors;
|
|
10775
|
-
}
|
|
10776
|
-
else {
|
|
10777
|
-
var valid16 = true;
|
|
10778
|
-
}
|
|
10779
|
-
if (valid16) {
|
|
10780
|
-
if (data.protocol !== undefined) {
|
|
10781
|
-
const _errs69 = errors;
|
|
10782
|
-
if (typeof data.protocol !== "string") {
|
|
10783
|
-
const err53 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10784
|
-
if (vErrors === null) {
|
|
10785
|
-
vErrors = [err53];
|
|
10786
|
-
}
|
|
10787
|
-
else {
|
|
10788
|
-
vErrors.push(err53);
|
|
10789
|
-
}
|
|
10790
|
-
errors++;
|
|
10791
|
-
}
|
|
10792
|
-
var valid16 = _errs69 === errors;
|
|
10793
|
-
}
|
|
10794
|
-
else {
|
|
10795
|
-
var valid16 = true;
|
|
10796
|
-
}
|
|
10797
|
-
if (valid16) {
|
|
10798
|
-
if (data.contextId !== undefined) {
|
|
10799
|
-
let data24 = data.contextId;
|
|
10800
|
-
const _errs71 = errors;
|
|
10801
|
-
if (errors === _errs71) {
|
|
10802
|
-
if (typeof data24 === "string") {
|
|
10803
|
-
if (func1(data24) > 600) {
|
|
10804
|
-
const err54 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10805
|
-
if (vErrors === null) {
|
|
10806
|
-
vErrors = [err54];
|
|
10807
|
-
}
|
|
10808
|
-
else {
|
|
10809
|
-
vErrors.push(err54);
|
|
10810
|
-
}
|
|
10811
|
-
errors++;
|
|
10812
|
-
}
|
|
10813
|
-
}
|
|
10814
|
-
else {
|
|
10815
|
-
const err55 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10816
|
-
if (vErrors === null) {
|
|
10817
|
-
vErrors = [err55];
|
|
10818
|
-
}
|
|
10819
|
-
else {
|
|
10820
|
-
vErrors.push(err55);
|
|
10821
|
-
}
|
|
10822
|
-
errors++;
|
|
10823
|
-
}
|
|
10824
|
-
}
|
|
10825
|
-
var valid16 = _errs71 === errors;
|
|
10826
|
-
}
|
|
10827
|
-
else {
|
|
10828
|
-
var valid16 = true;
|
|
10829
|
-
}
|
|
10830
|
-
if (valid16) {
|
|
10831
|
-
if (data.protocolPath !== undefined) {
|
|
10832
|
-
let data25 = data.protocolPath;
|
|
10833
|
-
const _errs73 = errors;
|
|
10834
|
-
if (errors === _errs73) {
|
|
10835
|
-
if (typeof data25 === "string") {
|
|
10836
|
-
if (func1(data25) > 600) {
|
|
10837
|
-
const err56 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10838
|
-
if (vErrors === null) {
|
|
10839
|
-
vErrors = [err56];
|
|
10840
|
-
}
|
|
10841
|
-
else {
|
|
10842
|
-
vErrors.push(err56);
|
|
10843
|
-
}
|
|
10844
|
-
errors++;
|
|
10845
|
-
}
|
|
10846
|
-
}
|
|
10847
|
-
else {
|
|
10848
|
-
const err57 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10849
|
-
if (vErrors === null) {
|
|
10850
|
-
vErrors = [err57];
|
|
10851
|
-
}
|
|
10852
|
-
else {
|
|
10853
|
-
vErrors.push(err57);
|
|
10854
|
-
}
|
|
10855
|
-
errors++;
|
|
10856
|
-
}
|
|
10857
|
-
}
|
|
10858
|
-
var valid16 = _errs73 === errors;
|
|
10859
|
-
}
|
|
10860
|
-
else {
|
|
10861
|
-
var valid16 = true;
|
|
10862
|
-
}
|
|
10863
|
-
}
|
|
10864
|
-
}
|
|
10865
|
-
}
|
|
10866
|
-
}
|
|
10085
|
+
else {
|
|
10086
|
+
var valid10 = true;
|
|
10867
10087
|
}
|
|
10868
10088
|
}
|
|
10869
10089
|
}
|
|
10090
|
+
}
|
|
10091
|
+
}
|
|
10092
|
+
}
|
|
10093
|
+
else {
|
|
10094
|
+
const err28 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10095
|
+
if (vErrors === null) {
|
|
10096
|
+
vErrors = [err28];
|
|
10097
|
+
}
|
|
10098
|
+
else {
|
|
10099
|
+
vErrors.push(err28);
|
|
10100
|
+
}
|
|
10101
|
+
errors++;
|
|
10102
|
+
}
|
|
10103
|
+
}
|
|
10104
|
+
var _valid0 = _errs31 === errors;
|
|
10105
|
+
if (_valid0 && valid0) {
|
|
10106
|
+
valid0 = false;
|
|
10107
|
+
passing0 = [passing0, 2];
|
|
10108
|
+
}
|
|
10109
|
+
else {
|
|
10110
|
+
if (_valid0) {
|
|
10111
|
+
valid0 = true;
|
|
10112
|
+
passing0 = 2;
|
|
10113
|
+
if (props0 !== true) {
|
|
10114
|
+
props0 = true;
|
|
10115
|
+
}
|
|
10116
|
+
}
|
|
10117
|
+
const _errs39 = errors;
|
|
10118
|
+
const _errs40 = errors;
|
|
10119
|
+
if (errors === _errs40) {
|
|
10120
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10121
|
+
let missing7;
|
|
10122
|
+
if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
|
|
10123
|
+
const err29 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
|
|
10124
|
+
if (vErrors === null) {
|
|
10125
|
+
vErrors = [err29];
|
|
10126
|
+
}
|
|
10870
10127
|
else {
|
|
10871
|
-
|
|
10872
|
-
if (vErrors === null) {
|
|
10873
|
-
vErrors = [err58];
|
|
10874
|
-
}
|
|
10875
|
-
else {
|
|
10876
|
-
vErrors.push(err58);
|
|
10877
|
-
}
|
|
10878
|
-
errors++;
|
|
10128
|
+
vErrors.push(err29);
|
|
10879
10129
|
}
|
|
10880
|
-
|
|
10881
|
-
var _valid0 = _errs63 === errors;
|
|
10882
|
-
if (_valid0 && valid0) {
|
|
10883
|
-
valid0 = false;
|
|
10884
|
-
passing0 = [passing0, 5];
|
|
10130
|
+
errors++;
|
|
10885
10131
|
}
|
|
10886
10132
|
else {
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10133
|
+
const _errs42 = errors;
|
|
10134
|
+
for (const key3 in data) {
|
|
10135
|
+
if (!(((((key3 === "interface") || (key3 === "method")) || (key3 === "protocol")) || (key3 === "contextId")) || (key3 === "protocolPath"))) {
|
|
10136
|
+
const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
10137
|
+
if (vErrors === null) {
|
|
10138
|
+
vErrors = [err30];
|
|
10139
|
+
}
|
|
10140
|
+
else {
|
|
10141
|
+
vErrors.push(err30);
|
|
10142
|
+
}
|
|
10143
|
+
errors++;
|
|
10144
|
+
break;
|
|
10892
10145
|
}
|
|
10893
10146
|
}
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
if ((((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) || ((data.protocol === undefined) && (missing10 = "protocol"))) {
|
|
10900
|
-
const err59 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
|
|
10147
|
+
if (_errs42 === errors) {
|
|
10148
|
+
if (data.interface !== undefined) {
|
|
10149
|
+
const _errs43 = errors;
|
|
10150
|
+
if ("Records" !== data.interface) {
|
|
10151
|
+
const err31 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
10901
10152
|
if (vErrors === null) {
|
|
10902
|
-
vErrors = [
|
|
10153
|
+
vErrors = [err31];
|
|
10903
10154
|
}
|
|
10904
10155
|
else {
|
|
10905
|
-
vErrors.push(
|
|
10156
|
+
vErrors.push(err31);
|
|
10906
10157
|
}
|
|
10907
10158
|
errors++;
|
|
10908
10159
|
}
|
|
10160
|
+
var valid12 = _errs43 === errors;
|
|
10161
|
+
}
|
|
10162
|
+
else {
|
|
10163
|
+
var valid12 = true;
|
|
10164
|
+
}
|
|
10165
|
+
if (valid12) {
|
|
10166
|
+
if (data.method !== undefined) {
|
|
10167
|
+
const _errs44 = errors;
|
|
10168
|
+
if ("Read" !== data.method) {
|
|
10169
|
+
const err32 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/method/const", keyword: "const", params: { allowedValue: "Read" }, message: "must be equal to constant" };
|
|
10170
|
+
if (vErrors === null) {
|
|
10171
|
+
vErrors = [err32];
|
|
10172
|
+
}
|
|
10173
|
+
else {
|
|
10174
|
+
vErrors.push(err32);
|
|
10175
|
+
}
|
|
10176
|
+
errors++;
|
|
10177
|
+
}
|
|
10178
|
+
var valid12 = _errs44 === errors;
|
|
10179
|
+
}
|
|
10909
10180
|
else {
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10181
|
+
var valid12 = true;
|
|
10182
|
+
}
|
|
10183
|
+
if (valid12) {
|
|
10184
|
+
if (data.protocol !== undefined) {
|
|
10185
|
+
const _errs45 = errors;
|
|
10186
|
+
if (typeof data.protocol !== "string") {
|
|
10187
|
+
const err33 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10914
10188
|
if (vErrors === null) {
|
|
10915
|
-
vErrors = [
|
|
10189
|
+
vErrors = [err33];
|
|
10916
10190
|
}
|
|
10917
10191
|
else {
|
|
10918
|
-
vErrors.push(
|
|
10192
|
+
vErrors.push(err33);
|
|
10919
10193
|
}
|
|
10920
10194
|
errors++;
|
|
10921
|
-
break;
|
|
10922
10195
|
}
|
|
10196
|
+
var valid12 = _errs45 === errors;
|
|
10923
10197
|
}
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10198
|
+
else {
|
|
10199
|
+
var valid12 = true;
|
|
10200
|
+
}
|
|
10201
|
+
if (valid12) {
|
|
10202
|
+
if (data.contextId !== undefined) {
|
|
10203
|
+
let data14 = data.contextId;
|
|
10204
|
+
const _errs47 = errors;
|
|
10205
|
+
if (errors === _errs47) {
|
|
10206
|
+
if (typeof data14 === "string") {
|
|
10207
|
+
if (func1(data14) > 600) {
|
|
10208
|
+
const err34 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10209
|
+
if (vErrors === null) {
|
|
10210
|
+
vErrors = [err34];
|
|
10211
|
+
}
|
|
10212
|
+
else {
|
|
10213
|
+
vErrors.push(err34);
|
|
10214
|
+
}
|
|
10215
|
+
errors++;
|
|
10216
|
+
}
|
|
10931
10217
|
}
|
|
10932
10218
|
else {
|
|
10933
|
-
|
|
10934
|
-
}
|
|
10935
|
-
errors++;
|
|
10936
|
-
}
|
|
10937
|
-
var valid18 = _errs79 === errors;
|
|
10938
|
-
}
|
|
10939
|
-
else {
|
|
10940
|
-
var valid18 = true;
|
|
10941
|
-
}
|
|
10942
|
-
if (valid18) {
|
|
10943
|
-
if (data.method !== undefined) {
|
|
10944
|
-
const _errs80 = errors;
|
|
10945
|
-
if ("Query" !== data.method) {
|
|
10946
|
-
const err62 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/method/const", keyword: "const", params: { allowedValue: "Query" }, message: "must be equal to constant" };
|
|
10219
|
+
const err35 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10947
10220
|
if (vErrors === null) {
|
|
10948
|
-
vErrors = [
|
|
10221
|
+
vErrors = [err35];
|
|
10949
10222
|
}
|
|
10950
10223
|
else {
|
|
10951
|
-
vErrors.push(
|
|
10224
|
+
vErrors.push(err35);
|
|
10952
10225
|
}
|
|
10953
10226
|
errors++;
|
|
10954
10227
|
}
|
|
10955
|
-
var valid18 = _errs80 === errors;
|
|
10956
|
-
}
|
|
10957
|
-
else {
|
|
10958
|
-
var valid18 = true;
|
|
10959
10228
|
}
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
else {
|
|
10976
|
-
var valid18 = true;
|
|
10977
|
-
}
|
|
10978
|
-
if (valid18) {
|
|
10979
|
-
if (data.contextId !== undefined) {
|
|
10980
|
-
let data29 = data.contextId;
|
|
10981
|
-
const _errs83 = errors;
|
|
10982
|
-
if (errors === _errs83) {
|
|
10983
|
-
if (typeof data29 === "string") {
|
|
10984
|
-
if (func1(data29) > 600) {
|
|
10985
|
-
const err64 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10986
|
-
if (vErrors === null) {
|
|
10987
|
-
vErrors = [err64];
|
|
10988
|
-
}
|
|
10989
|
-
else {
|
|
10990
|
-
vErrors.push(err64);
|
|
10991
|
-
}
|
|
10992
|
-
errors++;
|
|
10993
|
-
}
|
|
10229
|
+
var valid12 = _errs47 === errors;
|
|
10230
|
+
}
|
|
10231
|
+
else {
|
|
10232
|
+
var valid12 = true;
|
|
10233
|
+
}
|
|
10234
|
+
if (valid12) {
|
|
10235
|
+
if (data.protocolPath !== undefined) {
|
|
10236
|
+
let data15 = data.protocolPath;
|
|
10237
|
+
const _errs49 = errors;
|
|
10238
|
+
if (errors === _errs49) {
|
|
10239
|
+
if (typeof data15 === "string") {
|
|
10240
|
+
if (func1(data15) > 600) {
|
|
10241
|
+
const err36 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10242
|
+
if (vErrors === null) {
|
|
10243
|
+
vErrors = [err36];
|
|
10994
10244
|
}
|
|
10995
10245
|
else {
|
|
10996
|
-
|
|
10997
|
-
if (vErrors === null) {
|
|
10998
|
-
vErrors = [err65];
|
|
10999
|
-
}
|
|
11000
|
-
else {
|
|
11001
|
-
vErrors.push(err65);
|
|
11002
|
-
}
|
|
11003
|
-
errors++;
|
|
10246
|
+
vErrors.push(err36);
|
|
11004
10247
|
}
|
|
10248
|
+
errors++;
|
|
11005
10249
|
}
|
|
11006
|
-
var valid18 = _errs83 === errors;
|
|
11007
10250
|
}
|
|
11008
10251
|
else {
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
if (data.protocolPath !== undefined) {
|
|
11013
|
-
let data30 = data.protocolPath;
|
|
11014
|
-
const _errs85 = errors;
|
|
11015
|
-
if (errors === _errs85) {
|
|
11016
|
-
if (typeof data30 === "string") {
|
|
11017
|
-
if (func1(data30) > 600) {
|
|
11018
|
-
const err66 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
11019
|
-
if (vErrors === null) {
|
|
11020
|
-
vErrors = [err66];
|
|
11021
|
-
}
|
|
11022
|
-
else {
|
|
11023
|
-
vErrors.push(err66);
|
|
11024
|
-
}
|
|
11025
|
-
errors++;
|
|
11026
|
-
}
|
|
11027
|
-
}
|
|
11028
|
-
else {
|
|
11029
|
-
const err67 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11030
|
-
if (vErrors === null) {
|
|
11031
|
-
vErrors = [err67];
|
|
11032
|
-
}
|
|
11033
|
-
else {
|
|
11034
|
-
vErrors.push(err67);
|
|
11035
|
-
}
|
|
11036
|
-
errors++;
|
|
11037
|
-
}
|
|
11038
|
-
}
|
|
11039
|
-
var valid18 = _errs85 === errors;
|
|
10252
|
+
const err37 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10253
|
+
if (vErrors === null) {
|
|
10254
|
+
vErrors = [err37];
|
|
11040
10255
|
}
|
|
11041
10256
|
else {
|
|
11042
|
-
|
|
10257
|
+
vErrors.push(err37);
|
|
11043
10258
|
}
|
|
10259
|
+
errors++;
|
|
11044
10260
|
}
|
|
11045
10261
|
}
|
|
10262
|
+
var valid12 = _errs49 === errors;
|
|
10263
|
+
}
|
|
10264
|
+
else {
|
|
10265
|
+
var valid12 = true;
|
|
11046
10266
|
}
|
|
11047
10267
|
}
|
|
11048
10268
|
}
|
|
11049
10269
|
}
|
|
11050
10270
|
}
|
|
10271
|
+
}
|
|
10272
|
+
}
|
|
10273
|
+
}
|
|
10274
|
+
else {
|
|
10275
|
+
const err38 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10276
|
+
if (vErrors === null) {
|
|
10277
|
+
vErrors = [err38];
|
|
10278
|
+
}
|
|
10279
|
+
else {
|
|
10280
|
+
vErrors.push(err38);
|
|
10281
|
+
}
|
|
10282
|
+
errors++;
|
|
10283
|
+
}
|
|
10284
|
+
}
|
|
10285
|
+
var _valid0 = _errs39 === errors;
|
|
10286
|
+
if (_valid0 && valid0) {
|
|
10287
|
+
valid0 = false;
|
|
10288
|
+
passing0 = [passing0, 3];
|
|
10289
|
+
}
|
|
10290
|
+
else {
|
|
10291
|
+
if (_valid0) {
|
|
10292
|
+
valid0 = true;
|
|
10293
|
+
passing0 = 3;
|
|
10294
|
+
if (props0 !== true) {
|
|
10295
|
+
props0 = true;
|
|
10296
|
+
}
|
|
10297
|
+
}
|
|
10298
|
+
const _errs51 = errors;
|
|
10299
|
+
const _errs52 = errors;
|
|
10300
|
+
if (errors === _errs52) {
|
|
10301
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10302
|
+
let missing8;
|
|
10303
|
+
if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
|
|
10304
|
+
const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
|
|
10305
|
+
if (vErrors === null) {
|
|
10306
|
+
vErrors = [err39];
|
|
10307
|
+
}
|
|
11051
10308
|
else {
|
|
11052
|
-
|
|
11053
|
-
if (vErrors === null) {
|
|
11054
|
-
vErrors = [err68];
|
|
11055
|
-
}
|
|
11056
|
-
else {
|
|
11057
|
-
vErrors.push(err68);
|
|
11058
|
-
}
|
|
11059
|
-
errors++;
|
|
10309
|
+
vErrors.push(err39);
|
|
11060
10310
|
}
|
|
11061
|
-
|
|
11062
|
-
var _valid0 = _errs75 === errors;
|
|
11063
|
-
if (_valid0 && valid0) {
|
|
11064
|
-
valid0 = false;
|
|
11065
|
-
passing0 = [passing0, 6];
|
|
10311
|
+
errors++;
|
|
11066
10312
|
}
|
|
11067
10313
|
else {
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
10314
|
+
const _errs54 = errors;
|
|
10315
|
+
for (const key4 in data) {
|
|
10316
|
+
if (!(((((key4 === "interface") || (key4 === "method")) || (key4 === "protocol")) || (key4 === "contextId")) || (key4 === "protocolPath"))) {
|
|
10317
|
+
const err40 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
|
|
10318
|
+
if (vErrors === null) {
|
|
10319
|
+
vErrors = [err40];
|
|
10320
|
+
}
|
|
10321
|
+
else {
|
|
10322
|
+
vErrors.push(err40);
|
|
10323
|
+
}
|
|
10324
|
+
errors++;
|
|
10325
|
+
break;
|
|
11073
10326
|
}
|
|
11074
10327
|
}
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
if ((((data.interface === undefined) && (missing11 = "interface")) || ((data.method === undefined) && (missing11 = "method"))) || ((data.protocol === undefined) && (missing11 = "protocol"))) {
|
|
11081
|
-
const err69 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing11 }, message: "must have required property '" + missing11 + "'" };
|
|
10328
|
+
if (_errs54 === errors) {
|
|
10329
|
+
if (data.interface !== undefined) {
|
|
10330
|
+
const _errs55 = errors;
|
|
10331
|
+
if ("Records" !== data.interface) {
|
|
10332
|
+
const err41 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
11082
10333
|
if (vErrors === null) {
|
|
11083
|
-
vErrors = [
|
|
10334
|
+
vErrors = [err41];
|
|
11084
10335
|
}
|
|
11085
10336
|
else {
|
|
11086
|
-
vErrors.push(
|
|
10337
|
+
vErrors.push(err41);
|
|
11087
10338
|
}
|
|
11088
10339
|
errors++;
|
|
11089
10340
|
}
|
|
10341
|
+
var valid14 = _errs55 === errors;
|
|
10342
|
+
}
|
|
10343
|
+
else {
|
|
10344
|
+
var valid14 = true;
|
|
10345
|
+
}
|
|
10346
|
+
if (valid14) {
|
|
10347
|
+
if (data.method !== undefined) {
|
|
10348
|
+
const _errs56 = errors;
|
|
10349
|
+
if ("Delete" !== data.method) {
|
|
10350
|
+
const err42 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/method/const", keyword: "const", params: { allowedValue: "Delete" }, message: "must be equal to constant" };
|
|
10351
|
+
if (vErrors === null) {
|
|
10352
|
+
vErrors = [err42];
|
|
10353
|
+
}
|
|
10354
|
+
else {
|
|
10355
|
+
vErrors.push(err42);
|
|
10356
|
+
}
|
|
10357
|
+
errors++;
|
|
10358
|
+
}
|
|
10359
|
+
var valid14 = _errs56 === errors;
|
|
10360
|
+
}
|
|
11090
10361
|
else {
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
10362
|
+
var valid14 = true;
|
|
10363
|
+
}
|
|
10364
|
+
if (valid14) {
|
|
10365
|
+
if (data.protocol !== undefined) {
|
|
10366
|
+
const _errs57 = errors;
|
|
10367
|
+
if (typeof data.protocol !== "string") {
|
|
10368
|
+
const err43 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11095
10369
|
if (vErrors === null) {
|
|
11096
|
-
vErrors = [
|
|
10370
|
+
vErrors = [err43];
|
|
11097
10371
|
}
|
|
11098
10372
|
else {
|
|
11099
|
-
vErrors.push(
|
|
10373
|
+
vErrors.push(err43);
|
|
11100
10374
|
}
|
|
11101
10375
|
errors++;
|
|
11102
|
-
break;
|
|
11103
10376
|
}
|
|
10377
|
+
var valid14 = _errs57 === errors;
|
|
11104
10378
|
}
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
10379
|
+
else {
|
|
10380
|
+
var valid14 = true;
|
|
10381
|
+
}
|
|
10382
|
+
if (valid14) {
|
|
10383
|
+
if (data.contextId !== undefined) {
|
|
10384
|
+
let data19 = data.contextId;
|
|
10385
|
+
const _errs59 = errors;
|
|
10386
|
+
if (errors === _errs59) {
|
|
10387
|
+
if (typeof data19 === "string") {
|
|
10388
|
+
if (func1(data19) > 600) {
|
|
10389
|
+
const err44 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10390
|
+
if (vErrors === null) {
|
|
10391
|
+
vErrors = [err44];
|
|
10392
|
+
}
|
|
10393
|
+
else {
|
|
10394
|
+
vErrors.push(err44);
|
|
10395
|
+
}
|
|
10396
|
+
errors++;
|
|
10397
|
+
}
|
|
11112
10398
|
}
|
|
11113
10399
|
else {
|
|
11114
|
-
|
|
11115
|
-
}
|
|
11116
|
-
errors++;
|
|
11117
|
-
}
|
|
11118
|
-
var valid20 = _errs91 === errors;
|
|
11119
|
-
}
|
|
11120
|
-
else {
|
|
11121
|
-
var valid20 = true;
|
|
11122
|
-
}
|
|
11123
|
-
if (valid20) {
|
|
11124
|
-
if (data.method !== undefined) {
|
|
11125
|
-
const _errs92 = errors;
|
|
11126
|
-
if ("Subscribe" !== data.method) {
|
|
11127
|
-
const err72 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/method/const", keyword: "const", params: { allowedValue: "Subscribe" }, message: "must be equal to constant" };
|
|
10400
|
+
const err45 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11128
10401
|
if (vErrors === null) {
|
|
11129
|
-
vErrors = [
|
|
10402
|
+
vErrors = [err45];
|
|
11130
10403
|
}
|
|
11131
10404
|
else {
|
|
11132
|
-
vErrors.push(
|
|
10405
|
+
vErrors.push(err45);
|
|
11133
10406
|
}
|
|
11134
10407
|
errors++;
|
|
11135
10408
|
}
|
|
11136
|
-
var valid20 = _errs92 === errors;
|
|
11137
|
-
}
|
|
11138
|
-
else {
|
|
11139
|
-
var valid20 = true;
|
|
11140
10409
|
}
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
else {
|
|
11157
|
-
var valid20 = true;
|
|
11158
|
-
}
|
|
11159
|
-
if (valid20) {
|
|
11160
|
-
if (data.contextId !== undefined) {
|
|
11161
|
-
let data34 = data.contextId;
|
|
11162
|
-
const _errs95 = errors;
|
|
11163
|
-
if (errors === _errs95) {
|
|
11164
|
-
if (typeof data34 === "string") {
|
|
11165
|
-
if (func1(data34) > 600) {
|
|
11166
|
-
const err74 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
11167
|
-
if (vErrors === null) {
|
|
11168
|
-
vErrors = [err74];
|
|
11169
|
-
}
|
|
11170
|
-
else {
|
|
11171
|
-
vErrors.push(err74);
|
|
11172
|
-
}
|
|
11173
|
-
errors++;
|
|
11174
|
-
}
|
|
10410
|
+
var valid14 = _errs59 === errors;
|
|
10411
|
+
}
|
|
10412
|
+
else {
|
|
10413
|
+
var valid14 = true;
|
|
10414
|
+
}
|
|
10415
|
+
if (valid14) {
|
|
10416
|
+
if (data.protocolPath !== undefined) {
|
|
10417
|
+
let data20 = data.protocolPath;
|
|
10418
|
+
const _errs61 = errors;
|
|
10419
|
+
if (errors === _errs61) {
|
|
10420
|
+
if (typeof data20 === "string") {
|
|
10421
|
+
if (func1(data20) > 600) {
|
|
10422
|
+
const err46 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10423
|
+
if (vErrors === null) {
|
|
10424
|
+
vErrors = [err46];
|
|
11175
10425
|
}
|
|
11176
10426
|
else {
|
|
11177
|
-
|
|
11178
|
-
if (vErrors === null) {
|
|
11179
|
-
vErrors = [err75];
|
|
11180
|
-
}
|
|
11181
|
-
else {
|
|
11182
|
-
vErrors.push(err75);
|
|
11183
|
-
}
|
|
11184
|
-
errors++;
|
|
10427
|
+
vErrors.push(err46);
|
|
11185
10428
|
}
|
|
10429
|
+
errors++;
|
|
11186
10430
|
}
|
|
11187
|
-
var valid20 = _errs95 === errors;
|
|
11188
10431
|
}
|
|
11189
10432
|
else {
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
if (data.protocolPath !== undefined) {
|
|
11194
|
-
let data35 = data.protocolPath;
|
|
11195
|
-
const _errs97 = errors;
|
|
11196
|
-
if (errors === _errs97) {
|
|
11197
|
-
if (typeof data35 === "string") {
|
|
11198
|
-
if (func1(data35) > 600) {
|
|
11199
|
-
const err76 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
11200
|
-
if (vErrors === null) {
|
|
11201
|
-
vErrors = [err76];
|
|
11202
|
-
}
|
|
11203
|
-
else {
|
|
11204
|
-
vErrors.push(err76);
|
|
11205
|
-
}
|
|
11206
|
-
errors++;
|
|
11207
|
-
}
|
|
11208
|
-
}
|
|
11209
|
-
else {
|
|
11210
|
-
const err77 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11211
|
-
if (vErrors === null) {
|
|
11212
|
-
vErrors = [err77];
|
|
11213
|
-
}
|
|
11214
|
-
else {
|
|
11215
|
-
vErrors.push(err77);
|
|
11216
|
-
}
|
|
11217
|
-
errors++;
|
|
11218
|
-
}
|
|
11219
|
-
}
|
|
11220
|
-
var valid20 = _errs97 === errors;
|
|
10433
|
+
const err47 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10434
|
+
if (vErrors === null) {
|
|
10435
|
+
vErrors = [err47];
|
|
11221
10436
|
}
|
|
11222
10437
|
else {
|
|
11223
|
-
|
|
10438
|
+
vErrors.push(err47);
|
|
11224
10439
|
}
|
|
10440
|
+
errors++;
|
|
11225
10441
|
}
|
|
11226
10442
|
}
|
|
10443
|
+
var valid14 = _errs61 === errors;
|
|
10444
|
+
}
|
|
10445
|
+
else {
|
|
10446
|
+
var valid14 = true;
|
|
11227
10447
|
}
|
|
11228
10448
|
}
|
|
11229
10449
|
}
|
|
11230
10450
|
}
|
|
11231
10451
|
}
|
|
10452
|
+
}
|
|
10453
|
+
}
|
|
10454
|
+
}
|
|
10455
|
+
else {
|
|
10456
|
+
const err48 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10457
|
+
if (vErrors === null) {
|
|
10458
|
+
vErrors = [err48];
|
|
10459
|
+
}
|
|
10460
|
+
else {
|
|
10461
|
+
vErrors.push(err48);
|
|
10462
|
+
}
|
|
10463
|
+
errors++;
|
|
10464
|
+
}
|
|
10465
|
+
}
|
|
10466
|
+
var _valid0 = _errs51 === errors;
|
|
10467
|
+
if (_valid0 && valid0) {
|
|
10468
|
+
valid0 = false;
|
|
10469
|
+
passing0 = [passing0, 4];
|
|
10470
|
+
}
|
|
10471
|
+
else {
|
|
10472
|
+
if (_valid0) {
|
|
10473
|
+
valid0 = true;
|
|
10474
|
+
passing0 = 4;
|
|
10475
|
+
if (props0 !== true) {
|
|
10476
|
+
props0 = true;
|
|
10477
|
+
}
|
|
10478
|
+
}
|
|
10479
|
+
const _errs63 = errors;
|
|
10480
|
+
const _errs64 = errors;
|
|
10481
|
+
if (errors === _errs64) {
|
|
10482
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10483
|
+
let missing9;
|
|
10484
|
+
if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
|
|
10485
|
+
const err49 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
|
|
10486
|
+
if (vErrors === null) {
|
|
10487
|
+
vErrors = [err49];
|
|
10488
|
+
}
|
|
11232
10489
|
else {
|
|
11233
|
-
|
|
11234
|
-
if (vErrors === null) {
|
|
11235
|
-
vErrors = [err78];
|
|
11236
|
-
}
|
|
11237
|
-
else {
|
|
11238
|
-
vErrors.push(err78);
|
|
11239
|
-
}
|
|
11240
|
-
errors++;
|
|
10490
|
+
vErrors.push(err49);
|
|
11241
10491
|
}
|
|
11242
|
-
|
|
11243
|
-
var _valid0 = _errs87 === errors;
|
|
11244
|
-
if (_valid0 && valid0) {
|
|
11245
|
-
valid0 = false;
|
|
11246
|
-
passing0 = [passing0, 7];
|
|
10492
|
+
errors++;
|
|
11247
10493
|
}
|
|
11248
10494
|
else {
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
10495
|
+
const _errs66 = errors;
|
|
10496
|
+
for (const key5 in data) {
|
|
10497
|
+
if (!(((((key5 === "interface") || (key5 === "method")) || (key5 === "protocol")) || (key5 === "contextId")) || (key5 === "protocolPath"))) {
|
|
10498
|
+
const err50 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
|
|
10499
|
+
if (vErrors === null) {
|
|
10500
|
+
vErrors = [err50];
|
|
10501
|
+
}
|
|
10502
|
+
else {
|
|
10503
|
+
vErrors.push(err50);
|
|
10504
|
+
}
|
|
10505
|
+
errors++;
|
|
10506
|
+
break;
|
|
11254
10507
|
}
|
|
11255
10508
|
}
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
if ((((data.interface === undefined) && (missing12 = "interface")) || ((data.method === undefined) && (missing12 = "method"))) || ((data.protocol === undefined) && (missing12 = "protocol"))) {
|
|
11262
|
-
const err79 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" };
|
|
10509
|
+
if (_errs66 === errors) {
|
|
10510
|
+
if (data.interface !== undefined) {
|
|
10511
|
+
const _errs67 = errors;
|
|
10512
|
+
if ("Records" !== data.interface) {
|
|
10513
|
+
const err51 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
|
|
11263
10514
|
if (vErrors === null) {
|
|
11264
|
-
vErrors = [
|
|
10515
|
+
vErrors = [err51];
|
|
11265
10516
|
}
|
|
11266
10517
|
else {
|
|
11267
|
-
vErrors.push(
|
|
10518
|
+
vErrors.push(err51);
|
|
11268
10519
|
}
|
|
11269
10520
|
errors++;
|
|
11270
10521
|
}
|
|
10522
|
+
var valid16 = _errs67 === errors;
|
|
10523
|
+
}
|
|
10524
|
+
else {
|
|
10525
|
+
var valid16 = true;
|
|
10526
|
+
}
|
|
10527
|
+
if (valid16) {
|
|
10528
|
+
if (data.method !== undefined) {
|
|
10529
|
+
const _errs68 = errors;
|
|
10530
|
+
if ("Write" !== data.method) {
|
|
10531
|
+
const err52 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/method/const", keyword: "const", params: { allowedValue: "Write" }, message: "must be equal to constant" };
|
|
10532
|
+
if (vErrors === null) {
|
|
10533
|
+
vErrors = [err52];
|
|
10534
|
+
}
|
|
10535
|
+
else {
|
|
10536
|
+
vErrors.push(err52);
|
|
10537
|
+
}
|
|
10538
|
+
errors++;
|
|
10539
|
+
}
|
|
10540
|
+
var valid16 = _errs68 === errors;
|
|
10541
|
+
}
|
|
11271
10542
|
else {
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
10543
|
+
var valid16 = true;
|
|
10544
|
+
}
|
|
10545
|
+
if (valid16) {
|
|
10546
|
+
if (data.protocol !== undefined) {
|
|
10547
|
+
const _errs69 = errors;
|
|
10548
|
+
if (typeof data.protocol !== "string") {
|
|
10549
|
+
const err53 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11276
10550
|
if (vErrors === null) {
|
|
11277
|
-
vErrors = [
|
|
10551
|
+
vErrors = [err53];
|
|
11278
10552
|
}
|
|
11279
10553
|
else {
|
|
11280
|
-
vErrors.push(
|
|
10554
|
+
vErrors.push(err53);
|
|
11281
10555
|
}
|
|
11282
10556
|
errors++;
|
|
11283
|
-
break;
|
|
11284
10557
|
}
|
|
10558
|
+
var valid16 = _errs69 === errors;
|
|
11285
10559
|
}
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
10560
|
+
else {
|
|
10561
|
+
var valid16 = true;
|
|
10562
|
+
}
|
|
10563
|
+
if (valid16) {
|
|
10564
|
+
if (data.contextId !== undefined) {
|
|
10565
|
+
let data24 = data.contextId;
|
|
10566
|
+
const _errs71 = errors;
|
|
10567
|
+
if (errors === _errs71) {
|
|
10568
|
+
if (typeof data24 === "string") {
|
|
10569
|
+
if (func1(data24) > 600) {
|
|
10570
|
+
const err54 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10571
|
+
if (vErrors === null) {
|
|
10572
|
+
vErrors = [err54];
|
|
10573
|
+
}
|
|
10574
|
+
else {
|
|
10575
|
+
vErrors.push(err54);
|
|
10576
|
+
}
|
|
10577
|
+
errors++;
|
|
10578
|
+
}
|
|
11293
10579
|
}
|
|
11294
10580
|
else {
|
|
11295
|
-
|
|
11296
|
-
}
|
|
11297
|
-
errors++;
|
|
11298
|
-
}
|
|
11299
|
-
var valid22 = _errs103 === errors;
|
|
11300
|
-
}
|
|
11301
|
-
else {
|
|
11302
|
-
var valid22 = true;
|
|
11303
|
-
}
|
|
11304
|
-
if (valid22) {
|
|
11305
|
-
if (data.method !== undefined) {
|
|
11306
|
-
const _errs104 = errors;
|
|
11307
|
-
if ("Count" !== data.method) {
|
|
11308
|
-
const err82 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/method/const", keyword: "const", params: { allowedValue: "Count" }, message: "must be equal to constant" };
|
|
10581
|
+
const err55 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11309
10582
|
if (vErrors === null) {
|
|
11310
|
-
vErrors = [
|
|
10583
|
+
vErrors = [err55];
|
|
11311
10584
|
}
|
|
11312
10585
|
else {
|
|
11313
|
-
vErrors.push(
|
|
10586
|
+
vErrors.push(err55);
|
|
11314
10587
|
}
|
|
11315
10588
|
errors++;
|
|
11316
10589
|
}
|
|
11317
|
-
var valid22 = _errs104 === errors;
|
|
11318
|
-
}
|
|
11319
|
-
else {
|
|
11320
|
-
var valid22 = true;
|
|
11321
10590
|
}
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
else {
|
|
11338
|
-
var valid22 = true;
|
|
11339
|
-
}
|
|
11340
|
-
if (valid22) {
|
|
11341
|
-
if (data.contextId !== undefined) {
|
|
11342
|
-
let data39 = data.contextId;
|
|
11343
|
-
const _errs107 = errors;
|
|
11344
|
-
if (errors === _errs107) {
|
|
11345
|
-
if (typeof data39 === "string") {
|
|
11346
|
-
if (func1(data39) > 600) {
|
|
11347
|
-
const err84 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
11348
|
-
if (vErrors === null) {
|
|
11349
|
-
vErrors = [err84];
|
|
11350
|
-
}
|
|
11351
|
-
else {
|
|
11352
|
-
vErrors.push(err84);
|
|
11353
|
-
}
|
|
11354
|
-
errors++;
|
|
11355
|
-
}
|
|
10591
|
+
var valid16 = _errs71 === errors;
|
|
10592
|
+
}
|
|
10593
|
+
else {
|
|
10594
|
+
var valid16 = true;
|
|
10595
|
+
}
|
|
10596
|
+
if (valid16) {
|
|
10597
|
+
if (data.protocolPath !== undefined) {
|
|
10598
|
+
let data25 = data.protocolPath;
|
|
10599
|
+
const _errs73 = errors;
|
|
10600
|
+
if (errors === _errs73) {
|
|
10601
|
+
if (typeof data25 === "string") {
|
|
10602
|
+
if (func1(data25) > 600) {
|
|
10603
|
+
const err56 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
10604
|
+
if (vErrors === null) {
|
|
10605
|
+
vErrors = [err56];
|
|
11356
10606
|
}
|
|
11357
10607
|
else {
|
|
11358
|
-
|
|
11359
|
-
if (vErrors === null) {
|
|
11360
|
-
vErrors = [err85];
|
|
11361
|
-
}
|
|
11362
|
-
else {
|
|
11363
|
-
vErrors.push(err85);
|
|
11364
|
-
}
|
|
11365
|
-
errors++;
|
|
10608
|
+
vErrors.push(err56);
|
|
11366
10609
|
}
|
|
10610
|
+
errors++;
|
|
11367
10611
|
}
|
|
11368
|
-
var valid22 = _errs107 === errors;
|
|
11369
10612
|
}
|
|
11370
10613
|
else {
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
if (data.protocolPath !== undefined) {
|
|
11375
|
-
let data40 = data.protocolPath;
|
|
11376
|
-
const _errs109 = errors;
|
|
11377
|
-
if (errors === _errs109) {
|
|
11378
|
-
if (typeof data40 === "string") {
|
|
11379
|
-
if (func1(data40) > 600) {
|
|
11380
|
-
const err86 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" };
|
|
11381
|
-
if (vErrors === null) {
|
|
11382
|
-
vErrors = [err86];
|
|
11383
|
-
}
|
|
11384
|
-
else {
|
|
11385
|
-
vErrors.push(err86);
|
|
11386
|
-
}
|
|
11387
|
-
errors++;
|
|
11388
|
-
}
|
|
11389
|
-
}
|
|
11390
|
-
else {
|
|
11391
|
-
const err87 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
11392
|
-
if (vErrors === null) {
|
|
11393
|
-
vErrors = [err87];
|
|
11394
|
-
}
|
|
11395
|
-
else {
|
|
11396
|
-
vErrors.push(err87);
|
|
11397
|
-
}
|
|
11398
|
-
errors++;
|
|
11399
|
-
}
|
|
11400
|
-
}
|
|
11401
|
-
var valid22 = _errs109 === errors;
|
|
10614
|
+
const err57 = { instancePath: instancePath + "/protocolPath", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
10615
|
+
if (vErrors === null) {
|
|
10616
|
+
vErrors = [err57];
|
|
11402
10617
|
}
|
|
11403
10618
|
else {
|
|
11404
|
-
|
|
10619
|
+
vErrors.push(err57);
|
|
11405
10620
|
}
|
|
10621
|
+
errors++;
|
|
11406
10622
|
}
|
|
11407
10623
|
}
|
|
10624
|
+
var valid16 = _errs73 === errors;
|
|
10625
|
+
}
|
|
10626
|
+
else {
|
|
10627
|
+
var valid16 = true;
|
|
11408
10628
|
}
|
|
11409
10629
|
}
|
|
11410
10630
|
}
|
|
11411
10631
|
}
|
|
11412
10632
|
}
|
|
11413
|
-
else {
|
|
11414
|
-
const err88 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
11415
|
-
if (vErrors === null) {
|
|
11416
|
-
vErrors = [err88];
|
|
11417
|
-
}
|
|
11418
|
-
else {
|
|
11419
|
-
vErrors.push(err88);
|
|
11420
|
-
}
|
|
11421
|
-
errors++;
|
|
11422
|
-
}
|
|
11423
|
-
}
|
|
11424
|
-
var _valid0 = _errs99 === errors;
|
|
11425
|
-
if (_valid0 && valid0) {
|
|
11426
|
-
valid0 = false;
|
|
11427
|
-
passing0 = [passing0, 8];
|
|
11428
|
-
}
|
|
11429
|
-
else {
|
|
11430
|
-
if (_valid0) {
|
|
11431
|
-
valid0 = true;
|
|
11432
|
-
passing0 = 8;
|
|
11433
|
-
if (props0 !== true) {
|
|
11434
|
-
props0 = true;
|
|
11435
|
-
}
|
|
11436
|
-
}
|
|
11437
10633
|
}
|
|
11438
10634
|
}
|
|
11439
10635
|
}
|
|
10636
|
+
else {
|
|
10637
|
+
const err58 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
10638
|
+
if (vErrors === null) {
|
|
10639
|
+
vErrors = [err58];
|
|
10640
|
+
}
|
|
10641
|
+
else {
|
|
10642
|
+
vErrors.push(err58);
|
|
10643
|
+
}
|
|
10644
|
+
errors++;
|
|
10645
|
+
}
|
|
10646
|
+
}
|
|
10647
|
+
var _valid0 = _errs63 === errors;
|
|
10648
|
+
if (_valid0 && valid0) {
|
|
10649
|
+
valid0 = false;
|
|
10650
|
+
passing0 = [passing0, 5];
|
|
10651
|
+
}
|
|
10652
|
+
else {
|
|
10653
|
+
if (_valid0) {
|
|
10654
|
+
valid0 = true;
|
|
10655
|
+
passing0 = 5;
|
|
10656
|
+
if (props0 !== true) {
|
|
10657
|
+
props0 = true;
|
|
10658
|
+
}
|
|
10659
|
+
}
|
|
11440
10660
|
}
|
|
11441
10661
|
}
|
|
11442
10662
|
}
|
|
11443
10663
|
}
|
|
11444
10664
|
} if (!valid0) {
|
|
11445
|
-
const
|
|
10665
|
+
const err59 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
11446
10666
|
if (vErrors === null) {
|
|
11447
|
-
vErrors = [
|
|
10667
|
+
vErrors = [err59];
|
|
11448
10668
|
}
|
|
11449
10669
|
else {
|
|
11450
|
-
vErrors.push(
|
|
10670
|
+
vErrors.push(err59);
|
|
11451
10671
|
}
|
|
11452
10672
|
errors++;
|
|
11453
10673
|
validate74.errors = vErrors;
|
|
@@ -11544,7 +10764,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11544
10764
|
return false;
|
|
11545
10765
|
}
|
|
11546
10766
|
if (!((data4 === "Required") || (data4 === "Prohibited"))) {
|
|
11547
|
-
validate73.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues:
|
|
10767
|
+
validate73.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema105.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
|
|
11548
10768
|
return false;
|
|
11549
10769
|
}
|
|
11550
10770
|
}
|
|
@@ -11573,7 +10793,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11573
10793
|
} validate73.errors = vErrors; return errors === 0; }
|
|
11574
10794
|
validate73.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11575
10795
|
export const PermissionRevocationData = validate76;
|
|
11576
|
-
const
|
|
10796
|
+
const schema117 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-revoke-data.json", "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" } } };
|
|
11577
10797
|
function validate76(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-revoke-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate76.evaluated; if (evaluated0.dynamicProps) {
|
|
11578
10798
|
evaluated0.props = undefined;
|
|
11579
10799
|
} if (evaluated0.dynamicItems) {
|
|
@@ -11604,7 +10824,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11604
10824
|
} validate76.errors = vErrors; return errors === 0; }
|
|
11605
10825
|
validate76.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11606
10826
|
export const PermissionsDefinitions = validate69;
|
|
11607
|
-
const schema96 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", "type": "object", "$defs": { "scope": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }
|
|
10827
|
+
const schema96 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", "type": "object", "$defs": { "scope": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }] }, "conditions": { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } } } };
|
|
11608
10828
|
function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/defs.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate69.evaluated; if (evaluated0.dynamicProps) {
|
|
11609
10829
|
evaluated0.props = undefined;
|
|
11610
10830
|
} if (evaluated0.dynamicItems) {
|
|
@@ -11615,7 +10835,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11615
10835
|
} validate69.errors = vErrors; return errors === 0; }
|
|
11616
10836
|
validate69.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
11617
10837
|
export const PermissionsScopes = validate71;
|
|
11618
|
-
const schema98 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json", "type": "object", "$defs": { "messages-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } }, "allOf": [{ "not": { "required": ["contextId", "protocolPath"] } }, { "if": { "anyOf": [{ "required": ["contextId"] }, { "required": ["protocolPath"] }] }, "then": { "required": ["protocol"] } }] }, "protocols-configure-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } }, "protocols-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } }, "records-delete-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-write-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }
|
|
10838
|
+
const schema98 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json", "type": "object", "$defs": { "messages-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } }, "allOf": [{ "not": { "required": ["contextId", "protocolPath"] } }, { "if": { "anyOf": [{ "required": ["contextId"] }, { "required": ["protocolPath"] }] }, "then": { "required": ["protocol"] } }] }, "protocols-configure-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } }, "protocols-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } }, "records-delete-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-write-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } } } };
|
|
11619
10839
|
function validate71(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/scopes.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate71.evaluated; if (evaluated0.dynamicProps) {
|
|
11620
10840
|
evaluated0.props = undefined;
|
|
11621
10841
|
} if (evaluated0.dynamicItems) {
|
|
@@ -11626,15 +10846,15 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11626
10846
|
} validate71.errors = vErrors; return errors === 0; }
|
|
11627
10847
|
validate71.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
11628
10848
|
export const ProtocolDefinition = validate77;
|
|
11629
|
-
const
|
|
11630
|
-
const
|
|
11631
|
-
const
|
|
11632
|
-
const
|
|
11633
|
-
const
|
|
11634
|
-
const
|
|
11635
|
-
const
|
|
11636
|
-
const
|
|
11637
|
-
const
|
|
10849
|
+
const schema118 = { "$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" } } } } };
|
|
10850
|
+
const pattern40 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
|
|
10851
|
+
const pattern42 = new RegExp(".*", "u");
|
|
10852
|
+
const schema119 = { "$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" } } };
|
|
10853
|
+
const pattern44 = new RegExp("^[^$].*$", "u");
|
|
10854
|
+
const pattern45 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
|
|
10855
|
+
const pattern46 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
|
|
10856
|
+
const pattern47 = new RegExp("^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$", "u");
|
|
10857
|
+
const pattern48 = new RegExp("^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$", "u");
|
|
11638
10858
|
const wrapper2 = { validate: validate78 };
|
|
11639
10859
|
function validate78(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate78.evaluated; if (evaluated0.dynamicProps) {
|
|
11640
10860
|
evaluated0.props = undefined;
|
|
@@ -11644,7 +10864,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11644
10864
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
11645
10865
|
const _errs1 = errors;
|
|
11646
10866
|
for (const key0 in data) {
|
|
11647
|
-
if (!((func2.call(
|
|
10867
|
+
if (!((func2.call(schema119.properties, key0)) || (pattern44.test(key0)))) {
|
|
11648
10868
|
validate78.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11649
10869
|
return false;
|
|
11650
10870
|
break;
|
|
@@ -11774,7 +10994,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11774
10994
|
errors++;
|
|
11775
10995
|
}
|
|
11776
10996
|
if (!(((data5 === "anyone") || (data5 === "author")) || (data5 === "recipient"))) {
|
|
11777
|
-
const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues:
|
|
10997
|
+
const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema119.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
|
|
11778
10998
|
if (vErrors === null) {
|
|
11779
10999
|
vErrors = [err3];
|
|
11780
11000
|
}
|
|
@@ -11839,7 +11059,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11839
11059
|
errors++;
|
|
11840
11060
|
}
|
|
11841
11061
|
if (!(((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "squash")) || (data8 === "update"))) {
|
|
11842
|
-
const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues:
|
|
11062
|
+
const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema119.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
11843
11063
|
if (vErrors === null) {
|
|
11844
11064
|
vErrors = [err7];
|
|
11845
11065
|
}
|
|
@@ -11961,7 +11181,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11961
11181
|
errors++;
|
|
11962
11182
|
}
|
|
11963
11183
|
if (!(((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "squash")) || (data11 === "update"))) {
|
|
11964
|
-
const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues:
|
|
11184
|
+
const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema119.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
11965
11185
|
if (vErrors === null) {
|
|
11966
11186
|
vErrors = [err14];
|
|
11967
11187
|
}
|
|
@@ -12069,7 +11289,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12069
11289
|
const _errs35 = errors;
|
|
12070
11290
|
if (errors === _errs35) {
|
|
12071
11291
|
if (typeof data13 === "string") {
|
|
12072
|
-
if (!
|
|
11292
|
+
if (!pattern45.test(data13)) {
|
|
12073
11293
|
validate78.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, message: "must match pattern \"" + "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" + "\"" }];
|
|
12074
11294
|
return false;
|
|
12075
11295
|
}
|
|
@@ -12203,7 +11423,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12203
11423
|
return false;
|
|
12204
11424
|
}
|
|
12205
11425
|
if (!((data19 === "reject") || (data19 === "purgeOldest"))) {
|
|
12206
|
-
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/enum", keyword: "enum", params: { allowedValues:
|
|
11426
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/enum", keyword: "enum", params: { allowedValues: schema119.properties.$recordLimit.properties.strategy.enum }, message: "must be equal to one of the allowed values" }];
|
|
12207
11427
|
return false;
|
|
12208
11428
|
}
|
|
12209
11429
|
var valid9 = _errs50 === errors;
|
|
@@ -12246,7 +11466,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12246
11466
|
return false;
|
|
12247
11467
|
}
|
|
12248
11468
|
if (!((data21 === "direct") || (data21 === "subscribe"))) {
|
|
12249
|
-
validate78.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues:
|
|
11469
|
+
validate78.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues: schema119.properties.$delivery.enum }, message: "must be equal to one of the allowed values" }];
|
|
12250
11470
|
return false;
|
|
12251
11471
|
}
|
|
12252
11472
|
var valid0 = _errs55 === errors;
|
|
@@ -12263,7 +11483,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12263
11483
|
return false;
|
|
12264
11484
|
}
|
|
12265
11485
|
if (!(data22 === true)) {
|
|
12266
|
-
validate78.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues:
|
|
11486
|
+
validate78.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues: schema119.properties.$squash.enum }, message: "must be equal to one of the allowed values" }];
|
|
12267
11487
|
return false;
|
|
12268
11488
|
}
|
|
12269
11489
|
var valid0 = _errs58 === errors;
|
|
@@ -12328,14 +11548,14 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12328
11548
|
props2.$requiredTags = true;
|
|
12329
11549
|
props2.$allowUndefinedTags = true;
|
|
12330
11550
|
for (const key6 in data23) {
|
|
12331
|
-
if (
|
|
11551
|
+
if (pattern46.test(key6)) {
|
|
12332
11552
|
let data27 = data23[key6];
|
|
12333
11553
|
const _errs69 = errors;
|
|
12334
11554
|
if (errors === _errs69) {
|
|
12335
11555
|
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
12336
11556
|
const _errs71 = errors;
|
|
12337
11557
|
for (const key7 in data27) {
|
|
12338
|
-
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (
|
|
11558
|
+
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (pattern47.test(key7)))) {
|
|
12339
11559
|
validate78.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" }];
|
|
12340
11560
|
return false;
|
|
12341
11561
|
break;
|
|
@@ -12346,7 +11566,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12346
11566
|
let data28 = data27.type;
|
|
12347
11567
|
const _errs72 = errors;
|
|
12348
11568
|
if (!(((((data28 === "string") || (data28 === "number")) || (data28 === "integer")) || (data28 === "boolean")) || (data28 === "array"))) {
|
|
12349
|
-
validate78.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:
|
|
11569
|
+
validate78.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: schema119.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12350
11570
|
return false;
|
|
12351
11571
|
}
|
|
12352
11572
|
var valid13 = _errs72 === errors;
|
|
@@ -12364,7 +11584,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12364
11584
|
let data30 = data29.type;
|
|
12365
11585
|
const _errs75 = errors;
|
|
12366
11586
|
if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
|
|
12367
|
-
validate78.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:
|
|
11587
|
+
validate78.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: schema119.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12368
11588
|
return false;
|
|
12369
11589
|
}
|
|
12370
11590
|
var valid14 = _errs75 === errors;
|
|
@@ -12376,7 +11596,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12376
11596
|
var props3 = {};
|
|
12377
11597
|
props3.type = true;
|
|
12378
11598
|
for (const key8 in data29) {
|
|
12379
|
-
if (
|
|
11599
|
+
if (pattern48.test(key8)) {
|
|
12380
11600
|
props3[key8] = true;
|
|
12381
11601
|
}
|
|
12382
11602
|
}
|
|
@@ -12402,7 +11622,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12402
11622
|
let data32 = data31.type;
|
|
12403
11623
|
const _errs78 = errors;
|
|
12404
11624
|
if (!(((data32 === "string") || (data32 === "number")) || (data32 === "integer"))) {
|
|
12405
|
-
validate78.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:
|
|
11625
|
+
validate78.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: schema119.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12406
11626
|
return false;
|
|
12407
11627
|
}
|
|
12408
11628
|
var valid16 = _errs78 === errors;
|
|
@@ -12414,7 +11634,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12414
11634
|
var props4 = {};
|
|
12415
11635
|
props4.type = true;
|
|
12416
11636
|
for (const key9 in data31) {
|
|
12417
|
-
if (
|
|
11637
|
+
if (pattern48.test(key9)) {
|
|
12418
11638
|
props4[key9] = true;
|
|
12419
11639
|
}
|
|
12420
11640
|
}
|
|
@@ -12459,7 +11679,7 @@ function validate78(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12459
11679
|
if (valid0) {
|
|
12460
11680
|
var valid18 = true;
|
|
12461
11681
|
for (const key10 in data) {
|
|
12462
|
-
if (
|
|
11682
|
+
if (pattern44.test(key10)) {
|
|
12463
11683
|
const _errs79 = errors;
|
|
12464
11684
|
if (!(wrapper2.validate(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData, dynamicAnchors }))) {
|
|
12465
11685
|
vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);
|
|
@@ -12546,7 +11766,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12546
11766
|
else {
|
|
12547
11767
|
const _errs9 = errors;
|
|
12548
11768
|
for (const key1 in data2) {
|
|
12549
|
-
if (!(
|
|
11769
|
+
if (!(pattern40.test(key1))) {
|
|
12550
11770
|
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
12551
11771
|
return false;
|
|
12552
11772
|
break;
|
|
@@ -12555,7 +11775,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12555
11775
|
if (_errs9 === errors) {
|
|
12556
11776
|
var valid1 = true;
|
|
12557
11777
|
for (const key2 in data2) {
|
|
12558
|
-
if (
|
|
11778
|
+
if (pattern40.test(key2)) {
|
|
12559
11779
|
const _errs10 = errors;
|
|
12560
11780
|
if (typeof data2[key2] !== "string") {
|
|
12561
11781
|
validate77.errors = [{ instancePath: instancePath + "/uses/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/uses/patternProperties/%5E%5Ba-zA-Z%5D%5Ba-zA-Z0-9_-%5D*%24/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
@@ -12588,7 +11808,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12588
11808
|
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
12589
11809
|
var props0 = {};
|
|
12590
11810
|
for (const key3 in data4) {
|
|
12591
|
-
if (
|
|
11811
|
+
if (pattern42.test(key3)) {
|
|
12592
11812
|
let data5 = data4[key3];
|
|
12593
11813
|
const _errs14 = errors;
|
|
12594
11814
|
if (errors === _errs14) {
|
|
@@ -12692,7 +11912,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12692
11912
|
if (data10 && typeof data10 == "object" && !Array.isArray(data10)) {
|
|
12693
11913
|
var props1 = {};
|
|
12694
11914
|
for (const key5 in data10) {
|
|
12695
|
-
if (
|
|
11915
|
+
if (pattern42.test(key5)) {
|
|
12696
11916
|
if (!(validate78(data10[key5], { instancePath: instancePath + "/structure/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data10, parentDataProperty: key5, rootData, dynamicAnchors }))) {
|
|
12697
11917
|
vErrors = vErrors === null ? validate78.errors : vErrors.concat(validate78.errors);
|
|
12698
11918
|
errors = vErrors.length;
|
|
@@ -12726,7 +11946,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12726
11946
|
validate77.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12727
11947
|
export const ProtocolRuleSet = validate78;
|
|
12728
11948
|
export const ProtocolsConfigure = validate81;
|
|
12729
|
-
const
|
|
11949
|
+
const schema120 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-configure.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "definition"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Configure"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "definition": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-definition.json" }, "permissionGrantId": { "type": "string" } } } } };
|
|
12730
11950
|
function validate81(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-configure.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate81.evaluated; if (evaluated0.dynamicProps) {
|
|
12731
11951
|
evaluated0.props = undefined;
|
|
12732
11952
|
} if (evaluated0.dynamicItems) {
|
|
@@ -12788,7 +12008,7 @@ function validate81(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12788
12008
|
return false;
|
|
12789
12009
|
}
|
|
12790
12010
|
if (!(data2 === "Protocols")) {
|
|
12791
|
-
validate81.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues:
|
|
12011
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema120.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
12792
12012
|
return false;
|
|
12793
12013
|
}
|
|
12794
12014
|
var valid1 = _errs6 === errors;
|
|
@@ -12805,7 +12025,7 @@ function validate81(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12805
12025
|
return false;
|
|
12806
12026
|
}
|
|
12807
12027
|
if (!(data3 === "Configure")) {
|
|
12808
|
-
validate81.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues:
|
|
12028
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema120.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
12809
12029
|
return false;
|
|
12810
12030
|
}
|
|
12811
12031
|
var valid1 = _errs8 === errors;
|
|
@@ -12887,7 +12107,7 @@ function validate81(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12887
12107
|
} validate81.errors = vErrors; return errors === 0; }
|
|
12888
12108
|
validate81.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12889
12109
|
export const ProtocolsQuery = validate84;
|
|
12890
|
-
const
|
|
12110
|
+
const schema122 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-query.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Query"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } } }, "permissionGrantId": { "type": "string" } } } } };
|
|
12891
12111
|
function validate84(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-query.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate84.evaluated; if (evaluated0.dynamicProps) {
|
|
12892
12112
|
evaluated0.props = undefined;
|
|
12893
12113
|
} if (evaluated0.dynamicItems) {
|
|
@@ -12949,7 +12169,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12949
12169
|
return false;
|
|
12950
12170
|
}
|
|
12951
12171
|
if (!(data2 === "Protocols")) {
|
|
12952
|
-
validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues:
|
|
12172
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema122.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
12953
12173
|
return false;
|
|
12954
12174
|
}
|
|
12955
12175
|
var valid1 = _errs6 === errors;
|
|
@@ -12966,7 +12186,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12966
12186
|
return false;
|
|
12967
12187
|
}
|
|
12968
12188
|
if (!(data3 === "Query")) {
|
|
12969
|
-
validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues:
|
|
12189
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema122.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
12970
12190
|
return false;
|
|
12971
12191
|
}
|
|
12972
12192
|
var valid1 = _errs8 === errors;
|
|
@@ -13103,7 +12323,7 @@ function validate84(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13103
12323
|
} validate84.errors = vErrors; return errors === 0; }
|
|
13104
12324
|
validate84.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13105
12325
|
export const RecordsRead = validate86;
|
|
13106
|
-
const
|
|
12326
|
+
const schema125 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-read.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" }, "permissionGrantId": { "type": "string" }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" } } } } };
|
|
13107
12327
|
function validate86(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-read.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate86.evaluated; if (evaluated0.dynamicProps) {
|
|
13108
12328
|
evaluated0.props = undefined;
|
|
13109
12329
|
} if (evaluated0.dynamicItems) {
|
|
@@ -13165,7 +12385,7 @@ function validate86(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13165
12385
|
return false;
|
|
13166
12386
|
}
|
|
13167
12387
|
if (!(data2 === "Records")) {
|
|
13168
|
-
validate86.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues:
|
|
12388
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema125.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
13169
12389
|
return false;
|
|
13170
12390
|
}
|
|
13171
12391
|
var valid1 = _errs6 === errors;
|
|
@@ -13182,7 +12402,7 @@ function validate86(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13182
12402
|
return false;
|
|
13183
12403
|
}
|
|
13184
12404
|
if (!(data3 === "Read")) {
|
|
13185
|
-
validate86.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues:
|
|
12405
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema125.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
13186
12406
|
return false;
|
|
13187
12407
|
}
|
|
13188
12408
|
var valid1 = _errs8 === errors;
|
|
@@ -13245,7 +12465,7 @@ function validate86(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13245
12465
|
return false;
|
|
13246
12466
|
}
|
|
13247
12467
|
if (!((((((data7 === "createdAscending") || (data7 === "createdDescending")) || (data7 === "publishedAscending")) || (data7 === "publishedDescending")) || (data7 === "updatedAscending")) || (data7 === "updatedDescending"))) {
|
|
13248
|
-
validate86.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues:
|
|
12468
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema125.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
|
|
13249
12469
|
return false;
|
|
13250
12470
|
}
|
|
13251
12471
|
var valid1 = _errs16 === errors;
|
|
@@ -13284,7 +12504,7 @@ validate86.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
|
|
|
13284
12504
|
export const RecordsFilter = validate41;
|
|
13285
12505
|
export const PublicJwk = validate32;
|
|
13286
12506
|
export const GenericSignaturePayload = validate89;
|
|
13287
|
-
const
|
|
12507
|
+
const schema127 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid"], "properties": { "descriptorCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "$comment": "Direct Records and Protocols operations invoke a single grant with permissionGrantId. Message.createSignature rejects payloads that also include permissionGrantIds.", "type": "string" }, "permissionGrantIds": { "$comment": "Messages operations invoke grants with permissionGrantIds, including the single-grant case. Message.createSignature rejects payloads that also include permissionGrantId.", "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
|
|
13288
12508
|
function validate89(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate89.evaluated; if (evaluated0.dynamicProps) {
|
|
13289
12509
|
evaluated0.props = undefined;
|
|
13290
12510
|
} if (evaluated0.dynamicItems) {
|
|
@@ -13423,7 +12643,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13423
12643
|
} validate89.errors = vErrors; return errors === 0; }
|
|
13424
12644
|
validate89.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13425
12645
|
export const RecordsWriteSignaturePayload = validate90;
|
|
13426
|
-
const
|
|
12646
|
+
const schema128 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid", "recordId"], "properties": { "descriptorCid": { "type": "string" }, "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "attestationCid": { "type": "string" }, "encryptionCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "type": "string" } } };
|
|
13427
12647
|
function validate90(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate90.evaluated; if (evaluated0.dynamicProps) {
|
|
13428
12648
|
evaluated0.props = undefined;
|
|
13429
12649
|
} if (evaluated0.dynamicItems) {
|