@enbox/dwn-sdk-js 0.3.1 → 0.3.3

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.
@@ -7864,7 +7864,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
7864
7864
  } validate66.errors = vErrors; return errors === 0; }
7865
7865
  validate66.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
7866
7866
  export const PermissionGrantData = validate67;
7867
- const schema93 = { "$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" } } };
7867
+ const schema93 = { "$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" } } } } };
7868
7868
  const schema109 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
7869
7869
  const schema96 = { "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/messages-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-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" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope" }] };
7870
7870
  const schema98 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" } } };
@@ -9474,7 +9474,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
9474
9474
  else {
9475
9475
  const _errs1 = errors;
9476
9476
  for (const key0 in data) {
9477
- if (!((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions"))) {
9477
+ if (!(((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions")) || (key0 === "delegateKeyDelivery"))) {
9478
9478
  validate67.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
9479
9479
  return false;
9480
9480
  break;
@@ -9589,6 +9589,66 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
9589
9589
  else {
9590
9590
  var valid0 = true;
9591
9591
  }
9592
+ if (valid0) {
9593
+ if (data.delegateKeyDelivery !== undefined) {
9594
+ let data7 = data.delegateKeyDelivery;
9595
+ const _errs18 = errors;
9596
+ if (errors === _errs18) {
9597
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
9598
+ let missing1;
9599
+ if (((data7.rootKeyId === undefined) && (missing1 = "rootKeyId")) || ((data7.publicKeyJwk === undefined) && (missing1 = "publicKeyJwk"))) {
9600
+ validate67.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
9601
+ return false;
9602
+ }
9603
+ else {
9604
+ const _errs20 = errors;
9605
+ for (const key2 in data7) {
9606
+ if (!((key2 === "rootKeyId") || (key2 === "publicKeyJwk"))) {
9607
+ validate67.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
9608
+ return false;
9609
+ break;
9610
+ }
9611
+ }
9612
+ if (_errs20 === errors) {
9613
+ if (data7.rootKeyId !== undefined) {
9614
+ const _errs21 = errors;
9615
+ if (typeof data7.rootKeyId !== "string") {
9616
+ validate67.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/rootKeyId", schemaPath: "#/properties/delegateKeyDelivery/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
9617
+ return false;
9618
+ }
9619
+ var valid4 = _errs21 === errors;
9620
+ }
9621
+ else {
9622
+ var valid4 = true;
9623
+ }
9624
+ if (valid4) {
9625
+ if (data7.publicKeyJwk !== undefined) {
9626
+ let data9 = data7.publicKeyJwk;
9627
+ const _errs23 = errors;
9628
+ if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
9629
+ validate67.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/publicKeyJwk", schemaPath: "#/properties/delegateKeyDelivery/properties/publicKeyJwk/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
9630
+ return false;
9631
+ }
9632
+ var valid4 = _errs23 === errors;
9633
+ }
9634
+ else {
9635
+ var valid4 = true;
9636
+ }
9637
+ }
9638
+ }
9639
+ }
9640
+ }
9641
+ else {
9642
+ validate67.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
9643
+ return false;
9644
+ }
9645
+ }
9646
+ var valid0 = _errs18 === errors;
9647
+ }
9648
+ else {
9649
+ var valid0 = true;
9650
+ }
9651
+ }
9592
9652
  }
9593
9653
  }
9594
9654
  }