@enbox/dwn-sdk-js 0.4.17 → 0.4.18
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 +1 -1
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +349 -198
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/handlers/records-collection.js +200 -0
- package/dist/esm/src/handlers/records-collection.js.map +1 -0
- package/dist/esm/src/handlers/records-count.js +19 -196
- package/dist/esm/src/handlers/records-count.js.map +1 -1
- package/dist/esm/src/handlers/records-query.js +19 -376
- package/dist/esm/src/handlers/records-query.js.map +1 -1
- package/dist/esm/src/handlers/records-subscribe.js +21 -341
- package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/records-count.js +1 -1
- package/dist/esm/src/interfaces/records-count.js.map +1 -1
- package/dist/esm/src/interfaces/records-query.js +1 -1
- package/dist/esm/src/interfaces/records-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-subscribe.js +3 -1
- package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
- package/dist/esm/src/store/index-level.js +84 -32
- package/dist/esm/src/store/index-level.js.map +1 -1
- package/dist/esm/src/store/message-store-level.js +45 -11
- package/dist/esm/src/store/message-store-level.js.map +1 -1
- package/dist/esm/src/utils/record-limit-occupancy.js +5 -2
- package/dist/esm/src/utils/record-limit-occupancy.js.map +1 -1
- package/dist/esm/src/utils/records.js +14 -47
- package/dist/esm/src/utils/records.js.map +1 -1
- package/dist/esm/tests/features/records-nested-query-scope.spec.js +15 -1
- package/dist/esm/tests/features/records-nested-query-scope.spec.js.map +1 -1
- package/dist/esm/tests/features/records-record-limit.spec.js +116 -0
- package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-count.spec.js +52 -1
- package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js +76 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/store/index-level.spec.js +95 -1
- package/dist/esm/tests/store/index-level.spec.js.map +1 -1
- package/dist/esm/tests/store/message-store-level.spec.js +70 -1
- package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/handlers/records-collection.d.ts +32 -0
- package/dist/types/src/handlers/records-collection.d.ts.map +1 -0
- package/dist/types/src/handlers/records-count.d.ts +0 -35
- package/dist/types/src/handlers/records-count.d.ts.map +1 -1
- package/dist/types/src/handlers/records-query.d.ts +0 -61
- package/dist/types/src/handlers/records-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-subscribe.d.ts +1 -37
- package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/store/index-level.d.ts +27 -3
- package/dist/types/src/store/index-level.d.ts.map +1 -1
- package/dist/types/src/store/message-store-level.d.ts +1 -0
- package/dist/types/src/store/message-store-level.d.ts.map +1 -1
- package/dist/types/src/types/message-store.d.ts +6 -1
- package/dist/types/src/types/message-store.d.ts.map +1 -1
- package/dist/types/src/types/records-types.d.ts +1 -1
- package/dist/types/src/types/records-types.d.ts.map +1 -1
- package/dist/types/src/utils/record-limit-occupancy.d.ts.map +1 -1
- package/dist/types/src/utils/records.d.ts +6 -25
- package/dist/types/src/utils/records.d.ts.map +1 -1
- package/dist/types/tests/features/records-nested-query-scope.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-count.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/handlers/records-collection.ts +269 -0
- package/src/handlers/records-count.ts +21 -236
- package/src/handlers/records-query.ts +22 -447
- package/src/handlers/records-subscribe.ts +26 -404
- package/src/interfaces/records-count.ts +1 -1
- package/src/interfaces/records-query.ts +1 -1
- package/src/interfaces/records-subscribe.ts +5 -2
- package/src/store/index-level.ts +145 -37
- package/src/store/message-store-level.ts +46 -11
- package/src/types/message-store.ts +6 -1
- package/src/types/records-types.ts +1 -1
- package/src/utils/record-limit-occupancy.ts +5 -2
- package/src/utils/records.ts +17 -52
|
@@ -3428,7 +3428,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3428
3428
|
validate38.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
3429
3429
|
export const RecordsCount = validate43;
|
|
3430
3430
|
const schema57 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-count.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": ["Count"], "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" } } } } };
|
|
3431
|
-
const schema59 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-filter.json", "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "protocolPath": { "type": "string" }, "author": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } }] }, "attester": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "recipient": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } }] }, "contextId": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/contextId" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "startsWith": { "type": "string" } } }, { "$ref": "https://identity.foundation/dwn/json-schemas/string-range-filter.json" }, { "$ref": "https://identity.foundation/dwn/json-schemas/number-range-filter.json" }] } }, "recordId": { "type": "string" }, "parentId": { "type": "string" }, "published": { "type": "boolean" }, "dataFormat": { "type": "string" }, "dataSize": { "$ref": "https://identity.foundation/dwn/json-schemas/number-range-filter.json" }, "dataCid": { "type": "string" }, "dateCreated": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } }, "datePublished": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } }, "dateUpdated": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } } }, "dependencies": { "datePublished": { "oneOf": [{ "properties": { "published": { "enum": [true] } }, "required": ["published"] }, { "not": { "required": ["published"] } }] } } };
|
|
3431
|
+
const schema59 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-filter.json", "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "protocolPath": { "type": "string" }, "author": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } }] }, "attester": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "recipient": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } }] }, "contextId": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/contextId" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "startsWith": { "type": "string" } } }, { "$ref": "https://identity.foundation/dwn/json-schemas/string-range-filter.json" }, { "$ref": "https://identity.foundation/dwn/json-schemas/number-range-filter.json" }] } }, "recordId": { "type": "string" }, "parentId": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true }] }, "published": { "type": "boolean" }, "dataFormat": { "type": "string" }, "dataSize": { "$ref": "https://identity.foundation/dwn/json-schemas/number-range-filter.json" }, "dataCid": { "type": "string" }, "dateCreated": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } }, "datePublished": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } }, "dateUpdated": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "from": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "to": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" } } } }, "dependencies": { "datePublished": { "oneOf": [{ "properties": { "published": { "enum": [true] } }, "required": ["published"] }, { "not": { "required": ["published"] } }] } } };
|
|
3432
3432
|
const schema66 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/string-range-filter.json", "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "gt": { "type": "string" }, "gte": { "type": "string" }, "lt": { "type": "string" }, "lte": { "type": "string" } }, "dependencies": { "gt": { "not": { "required": ["gte"] } }, "gte": { "not": { "required": ["gt"] } }, "lt": { "not": { "required": ["lte"] } }, "lte": { "not": { "required": ["lt"] } } } };
|
|
3433
3433
|
const schema67 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/number-range-filter.json", "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "gt": { "type": "number" }, "gte": { "type": "number" }, "lt": { "type": "number" }, "lte": { "type": "number" } }, "dependencies": { "gt": { "not": { "required": ["gte"] } }, "gte": { "not": { "required": ["gt"] } }, "lt": { "not": { "required": ["lte"] } }, "lte": { "not": { "required": ["lt"] } } } };
|
|
3434
3434
|
function validate45(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-filter.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate45.evaluated; if (evaluated0.dynamicProps) {
|
|
@@ -4742,11 +4742,162 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4742
4742
|
}
|
|
4743
4743
|
if (valid4) {
|
|
4744
4744
|
if (data.parentId !== undefined) {
|
|
4745
|
+
let data22 = data.parentId;
|
|
4745
4746
|
const _errs107 = errors;
|
|
4746
|
-
|
|
4747
|
-
|
|
4747
|
+
const _errs108 = errors;
|
|
4748
|
+
let valid32 = false;
|
|
4749
|
+
let passing4 = null;
|
|
4750
|
+
const _errs109 = errors;
|
|
4751
|
+
if (errors === _errs109) {
|
|
4752
|
+
if (typeof data22 === "string") {
|
|
4753
|
+
if (func1(data22) < 1) {
|
|
4754
|
+
const err55 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf/0/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
4755
|
+
if (vErrors === null) {
|
|
4756
|
+
vErrors = [err55];
|
|
4757
|
+
}
|
|
4758
|
+
else {
|
|
4759
|
+
vErrors.push(err55);
|
|
4760
|
+
}
|
|
4761
|
+
errors++;
|
|
4762
|
+
}
|
|
4763
|
+
}
|
|
4764
|
+
else {
|
|
4765
|
+
const err56 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4766
|
+
if (vErrors === null) {
|
|
4767
|
+
vErrors = [err56];
|
|
4768
|
+
}
|
|
4769
|
+
else {
|
|
4770
|
+
vErrors.push(err56);
|
|
4771
|
+
}
|
|
4772
|
+
errors++;
|
|
4773
|
+
}
|
|
4774
|
+
}
|
|
4775
|
+
var _valid4 = _errs109 === errors;
|
|
4776
|
+
if (_valid4) {
|
|
4777
|
+
valid32 = true;
|
|
4778
|
+
passing4 = 0;
|
|
4779
|
+
}
|
|
4780
|
+
const _errs111 = errors;
|
|
4781
|
+
if (errors === _errs111) {
|
|
4782
|
+
if (Array.isArray(data22)) {
|
|
4783
|
+
if (data22.length < 1) {
|
|
4784
|
+
const err57 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf/1/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
4785
|
+
if (vErrors === null) {
|
|
4786
|
+
vErrors = [err57];
|
|
4787
|
+
}
|
|
4788
|
+
else {
|
|
4789
|
+
vErrors.push(err57);
|
|
4790
|
+
}
|
|
4791
|
+
errors++;
|
|
4792
|
+
}
|
|
4793
|
+
else {
|
|
4794
|
+
var valid33 = true;
|
|
4795
|
+
const len2 = data22.length;
|
|
4796
|
+
for (let i2 = 0; i2 < len2; i2++) {
|
|
4797
|
+
let data23 = data22[i2];
|
|
4798
|
+
const _errs113 = errors;
|
|
4799
|
+
if (errors === _errs113) {
|
|
4800
|
+
if (typeof data23 === "string") {
|
|
4801
|
+
if (func1(data23) < 1) {
|
|
4802
|
+
const err58 = { instancePath: instancePath + "/parentId/" + i2, schemaPath: "#/properties/parentId/oneOf/1/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
4803
|
+
if (vErrors === null) {
|
|
4804
|
+
vErrors = [err58];
|
|
4805
|
+
}
|
|
4806
|
+
else {
|
|
4807
|
+
vErrors.push(err58);
|
|
4808
|
+
}
|
|
4809
|
+
errors++;
|
|
4810
|
+
}
|
|
4811
|
+
}
|
|
4812
|
+
else {
|
|
4813
|
+
const err59 = { instancePath: instancePath + "/parentId/" + i2, schemaPath: "#/properties/parentId/oneOf/1/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4814
|
+
if (vErrors === null) {
|
|
4815
|
+
vErrors = [err59];
|
|
4816
|
+
}
|
|
4817
|
+
else {
|
|
4818
|
+
vErrors.push(err59);
|
|
4819
|
+
}
|
|
4820
|
+
errors++;
|
|
4821
|
+
}
|
|
4822
|
+
}
|
|
4823
|
+
var valid33 = _errs113 === errors;
|
|
4824
|
+
if (!valid33) {
|
|
4825
|
+
break;
|
|
4826
|
+
}
|
|
4827
|
+
}
|
|
4828
|
+
if (valid33) {
|
|
4829
|
+
let i3 = data22.length;
|
|
4830
|
+
let j0;
|
|
4831
|
+
if (i3 > 1) {
|
|
4832
|
+
const indices0 = {};
|
|
4833
|
+
for (; i3--;) {
|
|
4834
|
+
let item0 = data22[i3];
|
|
4835
|
+
if (typeof item0 !== "string") {
|
|
4836
|
+
continue;
|
|
4837
|
+
}
|
|
4838
|
+
if (typeof indices0[item0] == "number") {
|
|
4839
|
+
j0 = indices0[item0];
|
|
4840
|
+
const err60 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf/1/uniqueItems", keyword: "uniqueItems", params: { i: i3, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i3 + " are identical)" };
|
|
4841
|
+
if (vErrors === null) {
|
|
4842
|
+
vErrors = [err60];
|
|
4843
|
+
}
|
|
4844
|
+
else {
|
|
4845
|
+
vErrors.push(err60);
|
|
4846
|
+
}
|
|
4847
|
+
errors++;
|
|
4848
|
+
break;
|
|
4849
|
+
}
|
|
4850
|
+
indices0[item0] = i3;
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
}
|
|
4856
|
+
else {
|
|
4857
|
+
const err61 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf/1/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
4858
|
+
if (vErrors === null) {
|
|
4859
|
+
vErrors = [err61];
|
|
4860
|
+
}
|
|
4861
|
+
else {
|
|
4862
|
+
vErrors.push(err61);
|
|
4863
|
+
}
|
|
4864
|
+
errors++;
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
var _valid4 = _errs111 === errors;
|
|
4868
|
+
if (_valid4 && valid32) {
|
|
4869
|
+
valid32 = false;
|
|
4870
|
+
passing4 = [passing4, 1];
|
|
4871
|
+
}
|
|
4872
|
+
else {
|
|
4873
|
+
if (_valid4) {
|
|
4874
|
+
valid32 = true;
|
|
4875
|
+
passing4 = 1;
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4878
|
+
if (!valid32) {
|
|
4879
|
+
const err62 = { instancePath: instancePath + "/parentId", schemaPath: "#/properties/parentId/oneOf", keyword: "oneOf", params: { passingSchemas: passing4 }, message: "must match exactly one schema in oneOf" };
|
|
4880
|
+
if (vErrors === null) {
|
|
4881
|
+
vErrors = [err62];
|
|
4882
|
+
}
|
|
4883
|
+
else {
|
|
4884
|
+
vErrors.push(err62);
|
|
4885
|
+
}
|
|
4886
|
+
errors++;
|
|
4887
|
+
validate45.errors = vErrors;
|
|
4748
4888
|
return false;
|
|
4749
4889
|
}
|
|
4890
|
+
else {
|
|
4891
|
+
errors = _errs108;
|
|
4892
|
+
if (vErrors !== null) {
|
|
4893
|
+
if (_errs108) {
|
|
4894
|
+
vErrors.length = _errs108;
|
|
4895
|
+
}
|
|
4896
|
+
else {
|
|
4897
|
+
vErrors = null;
|
|
4898
|
+
}
|
|
4899
|
+
}
|
|
4900
|
+
}
|
|
4750
4901
|
var valid4 = _errs107 === errors;
|
|
4751
4902
|
}
|
|
4752
4903
|
else {
|
|
@@ -4754,255 +4905,255 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4754
4905
|
}
|
|
4755
4906
|
if (valid4) {
|
|
4756
4907
|
if (data.published !== undefined) {
|
|
4757
|
-
const
|
|
4908
|
+
const _errs115 = errors;
|
|
4758
4909
|
if (typeof data.published !== "boolean") {
|
|
4759
4910
|
validate45.errors = [{ instancePath: instancePath + "/published", schemaPath: "#/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
4760
4911
|
return false;
|
|
4761
4912
|
}
|
|
4762
|
-
var valid4 =
|
|
4913
|
+
var valid4 = _errs115 === errors;
|
|
4763
4914
|
}
|
|
4764
4915
|
else {
|
|
4765
4916
|
var valid4 = true;
|
|
4766
4917
|
}
|
|
4767
4918
|
if (valid4) {
|
|
4768
4919
|
if (data.dataFormat !== undefined) {
|
|
4769
|
-
const
|
|
4920
|
+
const _errs117 = errors;
|
|
4770
4921
|
if (typeof data.dataFormat !== "string") {
|
|
4771
4922
|
validate45.errors = [{ instancePath: instancePath + "/dataFormat", schemaPath: "#/properties/dataFormat/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
4772
4923
|
return false;
|
|
4773
4924
|
}
|
|
4774
|
-
var valid4 =
|
|
4925
|
+
var valid4 = _errs117 === errors;
|
|
4775
4926
|
}
|
|
4776
4927
|
else {
|
|
4777
4928
|
var valid4 = true;
|
|
4778
4929
|
}
|
|
4779
4930
|
if (valid4) {
|
|
4780
4931
|
if (data.dataSize !== undefined) {
|
|
4781
|
-
let
|
|
4782
|
-
const
|
|
4783
|
-
const
|
|
4784
|
-
if (errors ===
|
|
4785
|
-
if (
|
|
4786
|
-
if (Object.keys(
|
|
4932
|
+
let data26 = data.dataSize;
|
|
4933
|
+
const _errs119 = errors;
|
|
4934
|
+
const _errs120 = errors;
|
|
4935
|
+
if (errors === _errs120) {
|
|
4936
|
+
if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
|
|
4937
|
+
if (Object.keys(data26).length < 1) {
|
|
4787
4938
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
4788
4939
|
return false;
|
|
4789
4940
|
}
|
|
4790
4941
|
else {
|
|
4791
|
-
const
|
|
4792
|
-
for (const key5 in
|
|
4942
|
+
const _errs122 = errors;
|
|
4943
|
+
for (const key5 in data26) {
|
|
4793
4944
|
if (!((((key5 === "gt") || (key5 === "gte")) || (key5 === "lt")) || (key5 === "lte"))) {
|
|
4794
4945
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" }];
|
|
4795
4946
|
return false;
|
|
4796
4947
|
break;
|
|
4797
4948
|
}
|
|
4798
4949
|
}
|
|
4799
|
-
if (
|
|
4800
|
-
if (
|
|
4801
|
-
const
|
|
4802
|
-
const
|
|
4803
|
-
const
|
|
4804
|
-
if (
|
|
4950
|
+
if (_errs122 === errors) {
|
|
4951
|
+
if (data26.gt !== undefined) {
|
|
4952
|
+
const _errs123 = errors;
|
|
4953
|
+
const _errs124 = errors;
|
|
4954
|
+
const _errs125 = errors;
|
|
4955
|
+
if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
|
|
4805
4956
|
let missing10;
|
|
4806
|
-
if ((
|
|
4807
|
-
const
|
|
4957
|
+
if ((data26.gte === undefined) && (missing10 = "gte")) {
|
|
4958
|
+
const err63 = {};
|
|
4808
4959
|
if (vErrors === null) {
|
|
4809
|
-
vErrors = [
|
|
4960
|
+
vErrors = [err63];
|
|
4810
4961
|
}
|
|
4811
4962
|
else {
|
|
4812
|
-
vErrors.push(
|
|
4963
|
+
vErrors.push(err63);
|
|
4813
4964
|
}
|
|
4814
4965
|
errors++;
|
|
4815
4966
|
}
|
|
4816
4967
|
}
|
|
4817
|
-
var
|
|
4818
|
-
if (
|
|
4968
|
+
var valid37 = _errs125 === errors;
|
|
4969
|
+
if (valid37) {
|
|
4819
4970
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/dependencies/gt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
4820
4971
|
return false;
|
|
4821
4972
|
}
|
|
4822
4973
|
else {
|
|
4823
|
-
errors =
|
|
4974
|
+
errors = _errs124;
|
|
4824
4975
|
if (vErrors !== null) {
|
|
4825
|
-
if (
|
|
4826
|
-
vErrors.length =
|
|
4976
|
+
if (_errs124) {
|
|
4977
|
+
vErrors.length = _errs124;
|
|
4827
4978
|
}
|
|
4828
4979
|
else {
|
|
4829
4980
|
vErrors = null;
|
|
4830
4981
|
}
|
|
4831
4982
|
}
|
|
4832
4983
|
}
|
|
4833
|
-
var
|
|
4984
|
+
var valid36 = _errs123 === errors;
|
|
4834
4985
|
}
|
|
4835
4986
|
else {
|
|
4836
|
-
var
|
|
4987
|
+
var valid36 = true;
|
|
4837
4988
|
}
|
|
4838
|
-
if (
|
|
4839
|
-
if (
|
|
4840
|
-
const
|
|
4841
|
-
const
|
|
4842
|
-
const
|
|
4843
|
-
if (
|
|
4989
|
+
if (valid36) {
|
|
4990
|
+
if (data26.gte !== undefined) {
|
|
4991
|
+
const _errs126 = errors;
|
|
4992
|
+
const _errs127 = errors;
|
|
4993
|
+
const _errs128 = errors;
|
|
4994
|
+
if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
|
|
4844
4995
|
let missing11;
|
|
4845
|
-
if ((
|
|
4846
|
-
const
|
|
4996
|
+
if ((data26.gt === undefined) && (missing11 = "gt")) {
|
|
4997
|
+
const err64 = {};
|
|
4847
4998
|
if (vErrors === null) {
|
|
4848
|
-
vErrors = [
|
|
4999
|
+
vErrors = [err64];
|
|
4849
5000
|
}
|
|
4850
5001
|
else {
|
|
4851
|
-
vErrors.push(
|
|
5002
|
+
vErrors.push(err64);
|
|
4852
5003
|
}
|
|
4853
5004
|
errors++;
|
|
4854
5005
|
}
|
|
4855
5006
|
}
|
|
4856
|
-
var
|
|
4857
|
-
if (
|
|
5007
|
+
var valid38 = _errs128 === errors;
|
|
5008
|
+
if (valid38) {
|
|
4858
5009
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/dependencies/gte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
4859
5010
|
return false;
|
|
4860
5011
|
}
|
|
4861
5012
|
else {
|
|
4862
|
-
errors =
|
|
5013
|
+
errors = _errs127;
|
|
4863
5014
|
if (vErrors !== null) {
|
|
4864
|
-
if (
|
|
4865
|
-
vErrors.length =
|
|
5015
|
+
if (_errs127) {
|
|
5016
|
+
vErrors.length = _errs127;
|
|
4866
5017
|
}
|
|
4867
5018
|
else {
|
|
4868
5019
|
vErrors = null;
|
|
4869
5020
|
}
|
|
4870
5021
|
}
|
|
4871
5022
|
}
|
|
4872
|
-
var
|
|
5023
|
+
var valid36 = _errs126 === errors;
|
|
4873
5024
|
}
|
|
4874
5025
|
else {
|
|
4875
|
-
var
|
|
5026
|
+
var valid36 = true;
|
|
4876
5027
|
}
|
|
4877
|
-
if (
|
|
4878
|
-
if (
|
|
4879
|
-
const
|
|
4880
|
-
const
|
|
4881
|
-
const
|
|
4882
|
-
if (
|
|
5028
|
+
if (valid36) {
|
|
5029
|
+
if (data26.lt !== undefined) {
|
|
5030
|
+
const _errs129 = errors;
|
|
5031
|
+
const _errs130 = errors;
|
|
5032
|
+
const _errs131 = errors;
|
|
5033
|
+
if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
|
|
4883
5034
|
let missing12;
|
|
4884
|
-
if ((
|
|
4885
|
-
const
|
|
5035
|
+
if ((data26.lte === undefined) && (missing12 = "lte")) {
|
|
5036
|
+
const err65 = {};
|
|
4886
5037
|
if (vErrors === null) {
|
|
4887
|
-
vErrors = [
|
|
5038
|
+
vErrors = [err65];
|
|
4888
5039
|
}
|
|
4889
5040
|
else {
|
|
4890
|
-
vErrors.push(
|
|
5041
|
+
vErrors.push(err65);
|
|
4891
5042
|
}
|
|
4892
5043
|
errors++;
|
|
4893
5044
|
}
|
|
4894
5045
|
}
|
|
4895
|
-
var
|
|
4896
|
-
if (
|
|
5046
|
+
var valid39 = _errs131 === errors;
|
|
5047
|
+
if (valid39) {
|
|
4897
5048
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/dependencies/lt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
4898
5049
|
return false;
|
|
4899
5050
|
}
|
|
4900
5051
|
else {
|
|
4901
|
-
errors =
|
|
5052
|
+
errors = _errs130;
|
|
4902
5053
|
if (vErrors !== null) {
|
|
4903
|
-
if (
|
|
4904
|
-
vErrors.length =
|
|
5054
|
+
if (_errs130) {
|
|
5055
|
+
vErrors.length = _errs130;
|
|
4905
5056
|
}
|
|
4906
5057
|
else {
|
|
4907
5058
|
vErrors = null;
|
|
4908
5059
|
}
|
|
4909
5060
|
}
|
|
4910
5061
|
}
|
|
4911
|
-
var
|
|
5062
|
+
var valid36 = _errs129 === errors;
|
|
4912
5063
|
}
|
|
4913
5064
|
else {
|
|
4914
|
-
var
|
|
5065
|
+
var valid36 = true;
|
|
4915
5066
|
}
|
|
4916
|
-
if (
|
|
4917
|
-
if (
|
|
4918
|
-
const
|
|
4919
|
-
const
|
|
4920
|
-
const
|
|
4921
|
-
if (
|
|
5067
|
+
if (valid36) {
|
|
5068
|
+
if (data26.lte !== undefined) {
|
|
5069
|
+
const _errs132 = errors;
|
|
5070
|
+
const _errs133 = errors;
|
|
5071
|
+
const _errs134 = errors;
|
|
5072
|
+
if (data26 && typeof data26 == "object" && !Array.isArray(data26)) {
|
|
4922
5073
|
let missing13;
|
|
4923
|
-
if ((
|
|
4924
|
-
const
|
|
5074
|
+
if ((data26.lt === undefined) && (missing13 = "lt")) {
|
|
5075
|
+
const err66 = {};
|
|
4925
5076
|
if (vErrors === null) {
|
|
4926
|
-
vErrors = [
|
|
5077
|
+
vErrors = [err66];
|
|
4927
5078
|
}
|
|
4928
5079
|
else {
|
|
4929
|
-
vErrors.push(
|
|
5080
|
+
vErrors.push(err66);
|
|
4930
5081
|
}
|
|
4931
5082
|
errors++;
|
|
4932
5083
|
}
|
|
4933
5084
|
}
|
|
4934
|
-
var
|
|
4935
|
-
if (
|
|
5085
|
+
var valid40 = _errs134 === errors;
|
|
5086
|
+
if (valid40) {
|
|
4936
5087
|
validate45.errors = [{ instancePath: instancePath + "/dataSize", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/dependencies/lte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
4937
5088
|
return false;
|
|
4938
5089
|
}
|
|
4939
5090
|
else {
|
|
4940
|
-
errors =
|
|
5091
|
+
errors = _errs133;
|
|
4941
5092
|
if (vErrors !== null) {
|
|
4942
|
-
if (
|
|
4943
|
-
vErrors.length =
|
|
5093
|
+
if (_errs133) {
|
|
5094
|
+
vErrors.length = _errs133;
|
|
4944
5095
|
}
|
|
4945
5096
|
else {
|
|
4946
5097
|
vErrors = null;
|
|
4947
5098
|
}
|
|
4948
5099
|
}
|
|
4949
5100
|
}
|
|
4950
|
-
var
|
|
5101
|
+
var valid36 = _errs132 === errors;
|
|
4951
5102
|
}
|
|
4952
5103
|
else {
|
|
4953
|
-
var
|
|
5104
|
+
var valid36 = true;
|
|
4954
5105
|
}
|
|
4955
|
-
if (
|
|
4956
|
-
if (
|
|
4957
|
-
let
|
|
4958
|
-
const
|
|
4959
|
-
if (!((typeof
|
|
5106
|
+
if (valid36) {
|
|
5107
|
+
if (data26.gt !== undefined) {
|
|
5108
|
+
let data27 = data26.gt;
|
|
5109
|
+
const _errs135 = errors;
|
|
5110
|
+
if (!((typeof data27 == "number") && (isFinite(data27)))) {
|
|
4960
5111
|
validate45.errors = [{ instancePath: instancePath + "/dataSize/gt", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/properties/gt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
4961
5112
|
return false;
|
|
4962
5113
|
}
|
|
4963
|
-
var
|
|
5114
|
+
var valid41 = _errs135 === errors;
|
|
4964
5115
|
}
|
|
4965
5116
|
else {
|
|
4966
|
-
var
|
|
5117
|
+
var valid41 = true;
|
|
4967
5118
|
}
|
|
4968
|
-
if (
|
|
4969
|
-
if (
|
|
4970
|
-
let
|
|
4971
|
-
const
|
|
4972
|
-
if (!((typeof
|
|
5119
|
+
if (valid41) {
|
|
5120
|
+
if (data26.gte !== undefined) {
|
|
5121
|
+
let data28 = data26.gte;
|
|
5122
|
+
const _errs137 = errors;
|
|
5123
|
+
if (!((typeof data28 == "number") && (isFinite(data28)))) {
|
|
4973
5124
|
validate45.errors = [{ instancePath: instancePath + "/dataSize/gte", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/properties/gte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
4974
5125
|
return false;
|
|
4975
5126
|
}
|
|
4976
|
-
var
|
|
5127
|
+
var valid41 = _errs137 === errors;
|
|
4977
5128
|
}
|
|
4978
5129
|
else {
|
|
4979
|
-
var
|
|
5130
|
+
var valid41 = true;
|
|
4980
5131
|
}
|
|
4981
|
-
if (
|
|
4982
|
-
if (
|
|
4983
|
-
let
|
|
4984
|
-
const
|
|
4985
|
-
if (!((typeof
|
|
5132
|
+
if (valid41) {
|
|
5133
|
+
if (data26.lt !== undefined) {
|
|
5134
|
+
let data29 = data26.lt;
|
|
5135
|
+
const _errs139 = errors;
|
|
5136
|
+
if (!((typeof data29 == "number") && (isFinite(data29)))) {
|
|
4986
5137
|
validate45.errors = [{ instancePath: instancePath + "/dataSize/lt", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/properties/lt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
4987
5138
|
return false;
|
|
4988
5139
|
}
|
|
4989
|
-
var
|
|
5140
|
+
var valid41 = _errs139 === errors;
|
|
4990
5141
|
}
|
|
4991
5142
|
else {
|
|
4992
|
-
var
|
|
5143
|
+
var valid41 = true;
|
|
4993
5144
|
}
|
|
4994
|
-
if (
|
|
4995
|
-
if (
|
|
4996
|
-
let
|
|
4997
|
-
const
|
|
4998
|
-
if (!((typeof
|
|
5145
|
+
if (valid41) {
|
|
5146
|
+
if (data26.lte !== undefined) {
|
|
5147
|
+
let data30 = data26.lte;
|
|
5148
|
+
const _errs141 = errors;
|
|
5149
|
+
if (!((typeof data30 == "number") && (isFinite(data30)))) {
|
|
4999
5150
|
validate45.errors = [{ instancePath: instancePath + "/dataSize/lte", schemaPath: "https://identity.foundation/dwn/json-schemas/number-range-filter.json/properties/lte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
5000
5151
|
return false;
|
|
5001
5152
|
}
|
|
5002
|
-
var
|
|
5153
|
+
var valid41 = _errs141 === errors;
|
|
5003
5154
|
}
|
|
5004
5155
|
else {
|
|
5005
|
-
var
|
|
5156
|
+
var valid41 = true;
|
|
5006
5157
|
}
|
|
5007
5158
|
}
|
|
5008
5159
|
}
|
|
@@ -5019,50 +5170,50 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5019
5170
|
return false;
|
|
5020
5171
|
}
|
|
5021
5172
|
}
|
|
5022
|
-
var valid4 =
|
|
5173
|
+
var valid4 = _errs119 === errors;
|
|
5023
5174
|
}
|
|
5024
5175
|
else {
|
|
5025
5176
|
var valid4 = true;
|
|
5026
5177
|
}
|
|
5027
5178
|
if (valid4) {
|
|
5028
5179
|
if (data.dataCid !== undefined) {
|
|
5029
|
-
const
|
|
5180
|
+
const _errs143 = errors;
|
|
5030
5181
|
if (typeof data.dataCid !== "string") {
|
|
5031
5182
|
validate45.errors = [{ instancePath: instancePath + "/dataCid", schemaPath: "#/properties/dataCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
5032
5183
|
return false;
|
|
5033
5184
|
}
|
|
5034
|
-
var valid4 =
|
|
5185
|
+
var valid4 = _errs143 === errors;
|
|
5035
5186
|
}
|
|
5036
5187
|
else {
|
|
5037
5188
|
var valid4 = true;
|
|
5038
5189
|
}
|
|
5039
5190
|
if (valid4) {
|
|
5040
5191
|
if (data.dateCreated !== undefined) {
|
|
5041
|
-
let
|
|
5042
|
-
const
|
|
5043
|
-
if (errors ===
|
|
5044
|
-
if (
|
|
5045
|
-
if (Object.keys(
|
|
5192
|
+
let data32 = data.dateCreated;
|
|
5193
|
+
const _errs145 = errors;
|
|
5194
|
+
if (errors === _errs145) {
|
|
5195
|
+
if (data32 && typeof data32 == "object" && !Array.isArray(data32)) {
|
|
5196
|
+
if (Object.keys(data32).length < 1) {
|
|
5046
5197
|
validate45.errors = [{ instancePath: instancePath + "/dateCreated", schemaPath: "#/properties/dateCreated/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
5047
5198
|
return false;
|
|
5048
5199
|
}
|
|
5049
5200
|
else {
|
|
5050
|
-
const
|
|
5051
|
-
for (const key6 in
|
|
5201
|
+
const _errs147 = errors;
|
|
5202
|
+
for (const key6 in data32) {
|
|
5052
5203
|
if (!((key6 === "from") || (key6 === "to"))) {
|
|
5053
5204
|
validate45.errors = [{ instancePath: instancePath + "/dateCreated", schemaPath: "#/properties/dateCreated/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" }];
|
|
5054
5205
|
return false;
|
|
5055
5206
|
break;
|
|
5056
5207
|
}
|
|
5057
5208
|
}
|
|
5058
|
-
if (
|
|
5059
|
-
if (
|
|
5060
|
-
let
|
|
5061
|
-
const
|
|
5062
|
-
const
|
|
5063
|
-
if (errors ===
|
|
5064
|
-
if (typeof
|
|
5065
|
-
if (!pattern17.test(
|
|
5209
|
+
if (_errs147 === errors) {
|
|
5210
|
+
if (data32.from !== undefined) {
|
|
5211
|
+
let data33 = data32.from;
|
|
5212
|
+
const _errs148 = errors;
|
|
5213
|
+
const _errs149 = errors;
|
|
5214
|
+
if (errors === _errs149) {
|
|
5215
|
+
if (typeof data33 === "string") {
|
|
5216
|
+
if (!pattern17.test(data33)) {
|
|
5066
5217
|
validate45.errors = [{ instancePath: instancePath + "/dateCreated/from", 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$" + "\"" }];
|
|
5067
5218
|
return false;
|
|
5068
5219
|
}
|
|
@@ -5072,19 +5223,19 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5072
5223
|
return false;
|
|
5073
5224
|
}
|
|
5074
5225
|
}
|
|
5075
|
-
var
|
|
5226
|
+
var valid42 = _errs148 === errors;
|
|
5076
5227
|
}
|
|
5077
5228
|
else {
|
|
5078
|
-
var
|
|
5229
|
+
var valid42 = true;
|
|
5079
5230
|
}
|
|
5080
|
-
if (
|
|
5081
|
-
if (
|
|
5082
|
-
let
|
|
5083
|
-
const
|
|
5084
|
-
const
|
|
5085
|
-
if (errors ===
|
|
5086
|
-
if (typeof
|
|
5087
|
-
if (!pattern17.test(
|
|
5231
|
+
if (valid42) {
|
|
5232
|
+
if (data32.to !== undefined) {
|
|
5233
|
+
let data34 = data32.to;
|
|
5234
|
+
const _errs151 = errors;
|
|
5235
|
+
const _errs152 = errors;
|
|
5236
|
+
if (errors === _errs152) {
|
|
5237
|
+
if (typeof data34 === "string") {
|
|
5238
|
+
if (!pattern17.test(data34)) {
|
|
5088
5239
|
validate45.errors = [{ instancePath: instancePath + "/dateCreated/to", 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$" + "\"" }];
|
|
5089
5240
|
return false;
|
|
5090
5241
|
}
|
|
@@ -5094,10 +5245,10 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5094
5245
|
return false;
|
|
5095
5246
|
}
|
|
5096
5247
|
}
|
|
5097
|
-
var
|
|
5248
|
+
var valid42 = _errs151 === errors;
|
|
5098
5249
|
}
|
|
5099
5250
|
else {
|
|
5100
|
-
var
|
|
5251
|
+
var valid42 = true;
|
|
5101
5252
|
}
|
|
5102
5253
|
}
|
|
5103
5254
|
}
|
|
@@ -5108,38 +5259,38 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5108
5259
|
return false;
|
|
5109
5260
|
}
|
|
5110
5261
|
}
|
|
5111
|
-
var valid4 =
|
|
5262
|
+
var valid4 = _errs145 === errors;
|
|
5112
5263
|
}
|
|
5113
5264
|
else {
|
|
5114
5265
|
var valid4 = true;
|
|
5115
5266
|
}
|
|
5116
5267
|
if (valid4) {
|
|
5117
5268
|
if (data.datePublished !== undefined) {
|
|
5118
|
-
let
|
|
5119
|
-
const
|
|
5120
|
-
if (errors ===
|
|
5121
|
-
if (
|
|
5122
|
-
if (Object.keys(
|
|
5269
|
+
let data35 = data.datePublished;
|
|
5270
|
+
const _errs154 = errors;
|
|
5271
|
+
if (errors === _errs154) {
|
|
5272
|
+
if (data35 && typeof data35 == "object" && !Array.isArray(data35)) {
|
|
5273
|
+
if (Object.keys(data35).length < 1) {
|
|
5123
5274
|
validate45.errors = [{ instancePath: instancePath + "/datePublished", schemaPath: "#/properties/datePublished/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
5124
5275
|
return false;
|
|
5125
5276
|
}
|
|
5126
5277
|
else {
|
|
5127
|
-
const
|
|
5128
|
-
for (const key7 in
|
|
5278
|
+
const _errs156 = errors;
|
|
5279
|
+
for (const key7 in data35) {
|
|
5129
5280
|
if (!((key7 === "from") || (key7 === "to"))) {
|
|
5130
5281
|
validate45.errors = [{ instancePath: instancePath + "/datePublished", schemaPath: "#/properties/datePublished/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" }];
|
|
5131
5282
|
return false;
|
|
5132
5283
|
break;
|
|
5133
5284
|
}
|
|
5134
5285
|
}
|
|
5135
|
-
if (
|
|
5136
|
-
if (
|
|
5137
|
-
let
|
|
5138
|
-
const
|
|
5139
|
-
const
|
|
5140
|
-
if (errors ===
|
|
5141
|
-
if (typeof
|
|
5142
|
-
if (!pattern17.test(
|
|
5286
|
+
if (_errs156 === errors) {
|
|
5287
|
+
if (data35.from !== undefined) {
|
|
5288
|
+
let data36 = data35.from;
|
|
5289
|
+
const _errs157 = errors;
|
|
5290
|
+
const _errs158 = errors;
|
|
5291
|
+
if (errors === _errs158) {
|
|
5292
|
+
if (typeof data36 === "string") {
|
|
5293
|
+
if (!pattern17.test(data36)) {
|
|
5143
5294
|
validate45.errors = [{ instancePath: instancePath + "/datePublished/from", 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$" + "\"" }];
|
|
5144
5295
|
return false;
|
|
5145
5296
|
}
|
|
@@ -5149,19 +5300,19 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5149
5300
|
return false;
|
|
5150
5301
|
}
|
|
5151
5302
|
}
|
|
5152
|
-
var
|
|
5303
|
+
var valid45 = _errs157 === errors;
|
|
5153
5304
|
}
|
|
5154
5305
|
else {
|
|
5155
|
-
var
|
|
5306
|
+
var valid45 = true;
|
|
5156
5307
|
}
|
|
5157
|
-
if (
|
|
5158
|
-
if (
|
|
5159
|
-
let
|
|
5160
|
-
const
|
|
5161
|
-
const
|
|
5162
|
-
if (errors ===
|
|
5163
|
-
if (typeof
|
|
5164
|
-
if (!pattern17.test(
|
|
5308
|
+
if (valid45) {
|
|
5309
|
+
if (data35.to !== undefined) {
|
|
5310
|
+
let data37 = data35.to;
|
|
5311
|
+
const _errs160 = errors;
|
|
5312
|
+
const _errs161 = errors;
|
|
5313
|
+
if (errors === _errs161) {
|
|
5314
|
+
if (typeof data37 === "string") {
|
|
5315
|
+
if (!pattern17.test(data37)) {
|
|
5165
5316
|
validate45.errors = [{ instancePath: instancePath + "/datePublished/to", 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$" + "\"" }];
|
|
5166
5317
|
return false;
|
|
5167
5318
|
}
|
|
@@ -5171,10 +5322,10 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5171
5322
|
return false;
|
|
5172
5323
|
}
|
|
5173
5324
|
}
|
|
5174
|
-
var
|
|
5325
|
+
var valid45 = _errs160 === errors;
|
|
5175
5326
|
}
|
|
5176
5327
|
else {
|
|
5177
|
-
var
|
|
5328
|
+
var valid45 = true;
|
|
5178
5329
|
}
|
|
5179
5330
|
}
|
|
5180
5331
|
}
|
|
@@ -5185,38 +5336,38 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5185
5336
|
return false;
|
|
5186
5337
|
}
|
|
5187
5338
|
}
|
|
5188
|
-
var valid4 =
|
|
5339
|
+
var valid4 = _errs154 === errors;
|
|
5189
5340
|
}
|
|
5190
5341
|
else {
|
|
5191
5342
|
var valid4 = true;
|
|
5192
5343
|
}
|
|
5193
5344
|
if (valid4) {
|
|
5194
5345
|
if (data.dateUpdated !== undefined) {
|
|
5195
|
-
let
|
|
5196
|
-
const
|
|
5197
|
-
if (errors ===
|
|
5198
|
-
if (
|
|
5199
|
-
if (Object.keys(
|
|
5346
|
+
let data38 = data.dateUpdated;
|
|
5347
|
+
const _errs163 = errors;
|
|
5348
|
+
if (errors === _errs163) {
|
|
5349
|
+
if (data38 && typeof data38 == "object" && !Array.isArray(data38)) {
|
|
5350
|
+
if (Object.keys(data38).length < 1) {
|
|
5200
5351
|
validate45.errors = [{ instancePath: instancePath + "/dateUpdated", schemaPath: "#/properties/dateUpdated/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
5201
5352
|
return false;
|
|
5202
5353
|
}
|
|
5203
5354
|
else {
|
|
5204
|
-
const
|
|
5205
|
-
for (const key8 in
|
|
5355
|
+
const _errs165 = errors;
|
|
5356
|
+
for (const key8 in data38) {
|
|
5206
5357
|
if (!((key8 === "from") || (key8 === "to"))) {
|
|
5207
5358
|
validate45.errors = [{ instancePath: instancePath + "/dateUpdated", schemaPath: "#/properties/dateUpdated/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" }];
|
|
5208
5359
|
return false;
|
|
5209
5360
|
break;
|
|
5210
5361
|
}
|
|
5211
5362
|
}
|
|
5212
|
-
if (
|
|
5213
|
-
if (
|
|
5214
|
-
let
|
|
5215
|
-
const
|
|
5216
|
-
const
|
|
5217
|
-
if (errors ===
|
|
5218
|
-
if (typeof
|
|
5219
|
-
if (!pattern17.test(
|
|
5363
|
+
if (_errs165 === errors) {
|
|
5364
|
+
if (data38.from !== undefined) {
|
|
5365
|
+
let data39 = data38.from;
|
|
5366
|
+
const _errs166 = errors;
|
|
5367
|
+
const _errs167 = errors;
|
|
5368
|
+
if (errors === _errs167) {
|
|
5369
|
+
if (typeof data39 === "string") {
|
|
5370
|
+
if (!pattern17.test(data39)) {
|
|
5220
5371
|
validate45.errors = [{ instancePath: instancePath + "/dateUpdated/from", 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$" + "\"" }];
|
|
5221
5372
|
return false;
|
|
5222
5373
|
}
|
|
@@ -5226,19 +5377,19 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5226
5377
|
return false;
|
|
5227
5378
|
}
|
|
5228
5379
|
}
|
|
5229
|
-
var
|
|
5380
|
+
var valid48 = _errs166 === errors;
|
|
5230
5381
|
}
|
|
5231
5382
|
else {
|
|
5232
|
-
var
|
|
5383
|
+
var valid48 = true;
|
|
5233
5384
|
}
|
|
5234
|
-
if (
|
|
5235
|
-
if (
|
|
5236
|
-
let
|
|
5237
|
-
const
|
|
5238
|
-
const
|
|
5239
|
-
if (errors ===
|
|
5240
|
-
if (typeof
|
|
5241
|
-
if (!pattern17.test(
|
|
5385
|
+
if (valid48) {
|
|
5386
|
+
if (data38.to !== undefined) {
|
|
5387
|
+
let data40 = data38.to;
|
|
5388
|
+
const _errs169 = errors;
|
|
5389
|
+
const _errs170 = errors;
|
|
5390
|
+
if (errors === _errs170) {
|
|
5391
|
+
if (typeof data40 === "string") {
|
|
5392
|
+
if (!pattern17.test(data40)) {
|
|
5242
5393
|
validate45.errors = [{ instancePath: instancePath + "/dateUpdated/to", 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$" + "\"" }];
|
|
5243
5394
|
return false;
|
|
5244
5395
|
}
|
|
@@ -5248,10 +5399,10 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5248
5399
|
return false;
|
|
5249
5400
|
}
|
|
5250
5401
|
}
|
|
5251
|
-
var
|
|
5402
|
+
var valid48 = _errs169 === errors;
|
|
5252
5403
|
}
|
|
5253
5404
|
else {
|
|
5254
|
-
var
|
|
5405
|
+
var valid48 = true;
|
|
5255
5406
|
}
|
|
5256
5407
|
}
|
|
5257
5408
|
}
|
|
@@ -5262,7 +5413,7 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5262
5413
|
return false;
|
|
5263
5414
|
}
|
|
5264
5415
|
}
|
|
5265
|
-
var valid4 =
|
|
5416
|
+
var valid4 = _errs163 === errors;
|
|
5266
5417
|
}
|
|
5267
5418
|
else {
|
|
5268
5419
|
var valid4 = true;
|