@enbox/dwn-sdk-js 0.3.4 → 0.3.5

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.
Files changed (199) hide show
  1. package/dist/browser.mjs +8 -8
  2. package/dist/browser.mjs.map +3 -3
  3. package/dist/esm/generated/precompiled-validators.js +766 -1224
  4. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  5. package/dist/esm/src/core/abstract-message.js +3 -3
  6. package/dist/esm/src/core/abstract-message.js.map +1 -1
  7. package/dist/esm/src/core/grant-authorization.js +6 -2
  8. package/dist/esm/src/core/grant-authorization.js.map +1 -1
  9. package/dist/esm/src/core/message.js +3 -3
  10. package/dist/esm/src/core/message.js.map +1 -1
  11. package/dist/esm/src/core/protocol-authorization-action.js +3 -3
  12. package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
  13. package/dist/esm/src/core/protocol-authorization-validation.js +1 -1
  14. package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
  15. package/dist/esm/src/core/protocol-authorization.js +11 -11
  16. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  17. package/dist/esm/src/core/records-grant-authorization.js +1 -1
  18. package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
  19. package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
  20. package/dist/esm/src/dwn.js.map +1 -1
  21. package/dist/esm/src/event-stream/event-emitter-event-log.js +12 -12
  22. package/dist/esm/src/event-stream/event-emitter-event-log.js.map +1 -1
  23. package/dist/esm/src/handlers/messages-read.js +7 -7
  24. package/dist/esm/src/handlers/messages-read.js.map +1 -1
  25. package/dist/esm/src/handlers/messages-subscribe.js +1 -1
  26. package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
  27. package/dist/esm/src/handlers/messages-sync.js +18 -18
  28. package/dist/esm/src/handlers/messages-sync.js.map +1 -1
  29. package/dist/esm/src/handlers/protocols-configure.js +1 -1
  30. package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
  31. package/dist/esm/src/handlers/protocols-query.js.map +1 -1
  32. package/dist/esm/src/handlers/records-count.js.map +1 -1
  33. package/dist/esm/src/handlers/records-delete.js.map +1 -1
  34. package/dist/esm/src/handlers/records-query.js.map +1 -1
  35. package/dist/esm/src/handlers/records-read.js +6 -6
  36. package/dist/esm/src/handlers/records-read.js.map +1 -1
  37. package/dist/esm/src/handlers/records-subscribe.js +1 -1
  38. package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
  39. package/dist/esm/src/handlers/records-write.js +16 -16
  40. package/dist/esm/src/handlers/records-write.js.map +1 -1
  41. package/dist/esm/src/index.js +2 -2
  42. package/dist/esm/src/index.js.map +1 -1
  43. package/dist/esm/src/interfaces/protocols-configure.js +9 -9
  44. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  45. package/dist/esm/src/interfaces/records-delete.js.map +1 -1
  46. package/dist/esm/src/interfaces/records-write.js +8 -8
  47. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  48. package/dist/esm/src/jose/jws/general/builder.js.map +1 -1
  49. package/dist/esm/src/jose/jws/general/verifier.js +30 -2
  50. package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
  51. package/dist/esm/src/protocols/permissions.js +1 -1
  52. package/dist/esm/src/protocols/permissions.js.map +1 -1
  53. package/dist/esm/src/smt/smt-store-level.js.map +1 -1
  54. package/dist/esm/src/smt/smt-store-memory.js.map +1 -1
  55. package/dist/esm/src/smt/sparse-merkle-tree.js +2 -2
  56. package/dist/esm/src/smt/sparse-merkle-tree.js.map +1 -1
  57. package/dist/esm/src/state-index/state-index-level.js.map +1 -1
  58. package/dist/esm/src/store/index-level-compound.js +10 -10
  59. package/dist/esm/src/store/index-level-compound.js.map +1 -1
  60. package/dist/esm/src/store/index-level.js +2 -2
  61. package/dist/esm/src/store/index-level.js.map +1 -1
  62. package/dist/esm/src/store/level-wrapper.js +1 -1
  63. package/dist/esm/src/store/level-wrapper.js.map +1 -1
  64. package/dist/esm/src/store/storage-controller.js +23 -10
  65. package/dist/esm/src/store/storage-controller.js.map +1 -1
  66. package/dist/esm/src/types/permission-types.js.map +1 -1
  67. package/dist/esm/src/utils/memory-cache.js.map +1 -1
  68. package/dist/esm/src/utils/messages.js +1 -1
  69. package/dist/esm/src/utils/messages.js.map +1 -1
  70. package/dist/esm/src/utils/object.js +1 -4
  71. package/dist/esm/src/utils/object.js.map +1 -1
  72. package/dist/esm/src/utils/private-key-signer.js.map +1 -1
  73. package/dist/esm/src/utils/records.js.map +1 -1
  74. package/dist/esm/tests/core/grant-authorization.spec.js +38 -0
  75. package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -0
  76. package/dist/esm/tests/features/permissions.spec.js +1 -1
  77. package/dist/esm/tests/features/permissions.spec.js.map +1 -1
  78. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js +422 -0
  79. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js.map +1 -0
  80. package/dist/esm/tests/handlers/messages-subscribe.spec.js +3 -26
  81. package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
  82. package/dist/esm/tests/handlers/messages-sync.spec.js +3 -26
  83. package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
  84. package/dist/esm/tests/handlers/protocols-query.spec.js +4 -3
  85. package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
  86. package/dist/esm/tests/jose/jws/general.spec.js +115 -0
  87. package/dist/esm/tests/jose/jws/general.spec.js.map +1 -1
  88. package/dist/esm/tests/test-suite.js +2 -0
  89. package/dist/esm/tests/test-suite.js.map +1 -1
  90. package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
  91. package/dist/types/src/core/abstract-message.d.ts +4 -4
  92. package/dist/types/src/core/abstract-message.d.ts.map +1 -1
  93. package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
  94. package/dist/types/src/core/resumable-task-manager.d.ts +2 -2
  95. package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
  96. package/dist/types/src/dwn.d.ts +12 -12
  97. package/dist/types/src/dwn.d.ts.map +1 -1
  98. package/dist/types/src/event-stream/event-emitter-event-log.d.ts +5 -5
  99. package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +1 -1
  100. package/dist/types/src/handlers/messages-read.d.ts +1 -1
  101. package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
  102. package/dist/types/src/handlers/messages-subscribe.d.ts +1 -1
  103. package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
  104. package/dist/types/src/handlers/messages-sync.d.ts +1 -1
  105. package/dist/types/src/handlers/messages-sync.d.ts.map +1 -1
  106. package/dist/types/src/handlers/protocols-configure.d.ts +1 -1
  107. package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
  108. package/dist/types/src/handlers/protocols-query.d.ts +1 -1
  109. package/dist/types/src/handlers/protocols-query.d.ts.map +1 -1
  110. package/dist/types/src/handlers/records-count.d.ts +1 -1
  111. package/dist/types/src/handlers/records-count.d.ts.map +1 -1
  112. package/dist/types/src/handlers/records-delete.d.ts +1 -1
  113. package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
  114. package/dist/types/src/handlers/records-query.d.ts +1 -1
  115. package/dist/types/src/handlers/records-query.d.ts.map +1 -1
  116. package/dist/types/src/handlers/records-read.d.ts +1 -1
  117. package/dist/types/src/handlers/records-read.d.ts.map +1 -1
  118. package/dist/types/src/handlers/records-subscribe.d.ts +1 -1
  119. package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
  120. package/dist/types/src/handlers/records-write.d.ts +1 -1
  121. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  122. package/dist/types/src/index.d.ts +5 -5
  123. package/dist/types/src/index.d.ts.map +1 -1
  124. package/dist/types/src/interfaces/records-write.d.ts +2 -2
  125. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  126. package/dist/types/src/jose/jws/general/builder.d.ts +1 -1
  127. package/dist/types/src/jose/jws/general/builder.d.ts.map +1 -1
  128. package/dist/types/src/jose/jws/general/verifier.d.ts +13 -0
  129. package/dist/types/src/jose/jws/general/verifier.d.ts.map +1 -1
  130. package/dist/types/src/smt/smt-store-level.d.ts +1 -1
  131. package/dist/types/src/smt/smt-store-level.d.ts.map +1 -1
  132. package/dist/types/src/smt/smt-store-memory.d.ts +1 -1
  133. package/dist/types/src/smt/smt-store-memory.d.ts.map +1 -1
  134. package/dist/types/src/smt/sparse-merkle-tree.d.ts +1 -1
  135. package/dist/types/src/smt/sparse-merkle-tree.d.ts.map +1 -1
  136. package/dist/types/src/state-index/state-index-level.d.ts +3 -3
  137. package/dist/types/src/state-index/state-index-level.d.ts.map +1 -1
  138. package/dist/types/src/store/index-level.d.ts +2 -2
  139. package/dist/types/src/store/index-level.d.ts.map +1 -1
  140. package/dist/types/src/store/storage-controller.d.ts +19 -5
  141. package/dist/types/src/store/storage-controller.d.ts.map +1 -1
  142. package/dist/types/src/types/permission-types.d.ts +3 -4
  143. package/dist/types/src/types/permission-types.d.ts.map +1 -1
  144. package/dist/types/src/utils/memory-cache.d.ts +2 -2
  145. package/dist/types/src/utils/memory-cache.d.ts.map +1 -1
  146. package/dist/types/src/utils/object.d.ts.map +1 -1
  147. package/dist/types/src/utils/private-key-signer.d.ts +2 -2
  148. package/dist/types/src/utils/private-key-signer.d.ts.map +1 -1
  149. package/dist/types/tests/core/grant-authorization.spec.d.ts +2 -0
  150. package/dist/types/tests/core/grant-authorization.spec.d.ts.map +1 -0
  151. package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts +29 -0
  152. package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts.map +1 -0
  153. package/dist/types/tests/handlers/messages-subscribe.spec.d.ts.map +1 -1
  154. package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +1 -1
  155. package/dist/types/tests/handlers/protocols-query.spec.d.ts.map +1 -1
  156. package/dist/types/tests/test-suite.d.ts.map +1 -1
  157. package/package.json +1 -1
  158. package/src/core/abstract-message.ts +8 -8
  159. package/src/core/grant-authorization.ts +9 -2
  160. package/src/core/message.ts +3 -3
  161. package/src/core/protocol-authorization-action.ts +3 -3
  162. package/src/core/protocol-authorization-validation.ts +9 -9
  163. package/src/core/protocol-authorization.ts +24 -24
  164. package/src/core/records-grant-authorization.ts +1 -1
  165. package/src/core/resumable-task-manager.ts +2 -2
  166. package/src/dwn.ts +13 -13
  167. package/src/event-stream/event-emitter-event-log.ts +15 -15
  168. package/src/handlers/messages-read.ts +7 -7
  169. package/src/handlers/messages-subscribe.ts +2 -2
  170. package/src/handlers/messages-sync.ts +19 -19
  171. package/src/handlers/protocols-configure.ts +2 -2
  172. package/src/handlers/protocols-query.ts +1 -1
  173. package/src/handlers/records-count.ts +1 -1
  174. package/src/handlers/records-delete.ts +1 -1
  175. package/src/handlers/records-query.ts +1 -1
  176. package/src/handlers/records-read.ts +6 -6
  177. package/src/handlers/records-subscribe.ts +2 -2
  178. package/src/handlers/records-write.ts +18 -18
  179. package/src/index.ts +5 -5
  180. package/src/interfaces/protocols-configure.ts +12 -12
  181. package/src/interfaces/records-delete.ts +1 -1
  182. package/src/interfaces/records-write.ts +11 -11
  183. package/src/jose/jws/general/builder.ts +1 -1
  184. package/src/jose/jws/general/verifier.ts +44 -3
  185. package/src/protocols/permissions.ts +1 -1
  186. package/src/smt/smt-store-level.ts +1 -1
  187. package/src/smt/smt-store-memory.ts +1 -1
  188. package/src/smt/sparse-merkle-tree.ts +10 -10
  189. package/src/state-index/state-index-level.ts +3 -3
  190. package/src/store/index-level-compound.ts +11 -11
  191. package/src/store/index-level.ts +4 -4
  192. package/src/store/level-wrapper.ts +1 -1
  193. package/src/store/storage-controller.ts +31 -16
  194. package/src/types/permission-types.ts +3 -4
  195. package/src/utils/memory-cache.ts +2 -2
  196. package/src/utils/messages.ts +2 -2
  197. package/src/utils/object.ts +1 -5
  198. package/src/utils/private-key-signer.ts +2 -2
  199. package/src/utils/records.ts +1 -1
@@ -7865,19 +7865,17 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
7865
7865
  validate66.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
7866
7866
  export const PermissionGrantData = validate67;
7867
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
- const schema109 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
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" }] };
7868
+ const schema107 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
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/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" } } };
7871
- const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } };
7872
- const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } };
7873
- const schema101 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
7874
- const schema102 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
7875
- const schema103 = { "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" } } };
7876
- const schema104 = { "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" } } };
7877
- const schema105 = { "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" } } };
7878
- const schema106 = { "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" } } };
7879
- const schema107 = { "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" } } };
7880
- const schema108 = { "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" } } };
7871
+ const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
7872
+ const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
7873
+ const schema101 = { "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" } } };
7874
+ const schema102 = { "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" } } };
7875
+ const schema103 = { "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" } } };
7876
+ const schema104 = { "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" } } };
7877
+ const schema105 = { "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" } } };
7878
+ const schema106 = { "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" } } };
7881
7879
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate69.evaluated; if (evaluated0.dynamicProps) {
7882
7880
  evaluated0.props = undefined;
7883
7881
  } if (evaluated0.dynamicItems) {
@@ -7987,7 +7985,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
7987
7985
  if (data && typeof data == "object" && !Array.isArray(data)) {
7988
7986
  let missing1;
7989
7987
  if (((data.interface === undefined) && (missing1 = "interface")) || ((data.method === undefined) && (missing1 = "method"))) {
7990
- const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
7988
+ const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
7991
7989
  if (vErrors === null) {
7992
7990
  vErrors = [err6];
7993
7991
  }
@@ -8000,7 +7998,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
8000
7998
  const _errs12 = errors;
8001
7999
  for (const key1 in data) {
8002
8000
  if (!(((key1 === "interface") || (key1 === "method")) || (key1 === "protocol"))) {
8003
- const err7 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
8001
+ const err7 = { 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" };
8004
8002
  if (vErrors === null) {
8005
8003
  vErrors = [err7];
8006
8004
  }
@@ -8014,8 +8012,8 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
8014
8012
  if (_errs12 === errors) {
8015
8013
  if (data.interface !== undefined) {
8016
8014
  const _errs13 = errors;
8017
- if ("Messages" !== data.interface) {
8018
- const err8 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
8015
+ if ("Protocols" !== data.interface) {
8016
+ const err8 = { 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" };
8019
8017
  if (vErrors === null) {
8020
8018
  vErrors = [err8];
8021
8019
  }
@@ -8032,8 +8030,8 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
8032
8030
  if (valid4) {
8033
8031
  if (data.method !== undefined) {
8034
8032
  const _errs14 = errors;
8035
- if ("Subscribe" !== data.method) {
8036
- const err9 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/method/const", keyword: "const", params: { allowedValue: "Subscribe" }, message: "must be equal to constant" };
8033
+ if ("Configure" !== data.method) {
8034
+ const err9 = { 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" };
8037
8035
  if (vErrors === null) {
8038
8036
  vErrors = [err9];
8039
8037
  }
@@ -8051,7 +8049,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
8051
8049
  if (data.protocol !== undefined) {
8052
8050
  const _errs15 = errors;
8053
8051
  if (typeof data.protocol !== "string") {
8054
- const err10 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8052
+ const err10 = { 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" };
8055
8053
  if (vErrors === null) {
8056
8054
  vErrors = [err10];
8057
8055
  }
@@ -8071,7 +8069,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
8071
8069
  }
8072
8070
  }
8073
8071
  else {
8074
- const err11 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8072
+ const err11 = { 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" };
8075
8073
  if (vErrors === null) {
8076
8074
  vErrors = [err11];
8077
8075
  }
@@ -8098,7 +8096,7 @@ else {
8098
8096
  if (data && typeof data == "object" && !Array.isArray(data)) {
8099
8097
  let missing2;
8100
8098
  if (((data.interface === undefined) && (missing2 = "interface")) || ((data.method === undefined) && (missing2 = "method"))) {
8101
- const err12 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
8099
+ const err12 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
8102
8100
  if (vErrors === null) {
8103
8101
  vErrors = [err12];
8104
8102
  }
@@ -8111,7 +8109,7 @@ else {
8111
8109
  const _errs20 = errors;
8112
8110
  for (const key2 in data) {
8113
8111
  if (!(((key2 === "interface") || (key2 === "method")) || (key2 === "protocol"))) {
8114
- const err13 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
8112
+ const err13 = { 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" };
8115
8113
  if (vErrors === null) {
8116
8114
  vErrors = [err13];
8117
8115
  }
@@ -8125,8 +8123,8 @@ else {
8125
8123
  if (_errs20 === errors) {
8126
8124
  if (data.interface !== undefined) {
8127
8125
  const _errs21 = errors;
8128
- if ("Messages" !== data.interface) {
8129
- const err14 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
8126
+ if ("Protocols" !== data.interface) {
8127
+ const err14 = { 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" };
8130
8128
  if (vErrors === null) {
8131
8129
  vErrors = [err14];
8132
8130
  }
@@ -8143,8 +8141,8 @@ else {
8143
8141
  if (valid6) {
8144
8142
  if (data.method !== undefined) {
8145
8143
  const _errs22 = errors;
8146
- if ("Sync" !== data.method) {
8147
- const err15 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/method/const", keyword: "const", params: { allowedValue: "Sync" }, message: "must be equal to constant" };
8144
+ if ("Query" !== data.method) {
8145
+ const err15 = { 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" };
8148
8146
  if (vErrors === null) {
8149
8147
  vErrors = [err15];
8150
8148
  }
@@ -8162,7 +8160,7 @@ else {
8162
8160
  if (data.protocol !== undefined) {
8163
8161
  const _errs23 = errors;
8164
8162
  if (typeof data.protocol !== "string") {
8165
- const err16 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8163
+ const err16 = { 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" };
8166
8164
  if (vErrors === null) {
8167
8165
  vErrors = [err16];
8168
8166
  }
@@ -8182,7 +8180,7 @@ else {
8182
8180
  }
8183
8181
  }
8184
8182
  else {
8185
- const err17 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8183
+ const err17 = { 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" };
8186
8184
  if (vErrors === null) {
8187
8185
  vErrors = [err17];
8188
8186
  }
@@ -8210,8 +8208,8 @@ else {
8210
8208
  if (errors === _errs26) {
8211
8209
  if (data && typeof data == "object" && !Array.isArray(data)) {
8212
8210
  let missing3;
8213
- if (((data.interface === undefined) && (missing3 = "interface")) || ((data.method === undefined) && (missing3 = "method"))) {
8214
- const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
8211
+ if ((((data.interface === undefined) && (missing3 = "interface")) || ((data.method === undefined) && (missing3 = "method"))) || ((data.protocol === undefined) && (missing3 = "protocol"))) {
8212
+ const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
8215
8213
  if (vErrors === null) {
8216
8214
  vErrors = [err18];
8217
8215
  }
@@ -8223,8 +8221,8 @@ else {
8223
8221
  else {
8224
8222
  const _errs28 = errors;
8225
8223
  for (const key3 in data) {
8226
- if (!(((key3 === "interface") || (key3 === "method")) || (key3 === "protocol"))) {
8227
- const err19 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
8224
+ if (!(((((key3 === "interface") || (key3 === "method")) || (key3 === "protocol")) || (key3 === "contextId")) || (key3 === "protocolPath"))) {
8225
+ const err19 = { 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" };
8228
8226
  if (vErrors === null) {
8229
8227
  vErrors = [err19];
8230
8228
  }
@@ -8238,8 +8236,8 @@ else {
8238
8236
  if (_errs28 === errors) {
8239
8237
  if (data.interface !== undefined) {
8240
8238
  const _errs29 = errors;
8241
- if ("Protocols" !== data.interface) {
8242
- const err20 = { 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" };
8239
+ if ("Records" !== data.interface) {
8240
+ const err20 = { 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" };
8243
8241
  if (vErrors === null) {
8244
8242
  vErrors = [err20];
8245
8243
  }
@@ -8256,8 +8254,8 @@ else {
8256
8254
  if (valid8) {
8257
8255
  if (data.method !== undefined) {
8258
8256
  const _errs30 = errors;
8259
- if ("Configure" !== data.method) {
8260
- const err21 = { 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" };
8257
+ if ("Read" !== data.method) {
8258
+ const err21 = { 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" };
8261
8259
  if (vErrors === null) {
8262
8260
  vErrors = [err21];
8263
8261
  }
@@ -8275,7 +8273,7 @@ else {
8275
8273
  if (data.protocol !== undefined) {
8276
8274
  const _errs31 = errors;
8277
8275
  if (typeof data.protocol !== "string") {
8278
- const err22 = { 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" };
8276
+ const err22 = { 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" };
8279
8277
  if (vErrors === null) {
8280
8278
  vErrors = [err22];
8281
8279
  }
@@ -8289,18 +8287,71 @@ else {
8289
8287
  else {
8290
8288
  var valid8 = true;
8291
8289
  }
8290
+ if (valid8) {
8291
+ if (data.contextId !== undefined) {
8292
+ let data12 = data.contextId;
8293
+ const _errs33 = errors;
8294
+ if (errors === _errs33) {
8295
+ if (typeof data12 === "string") {
8296
+ if (func1(data12) > 600) {
8297
+ const err23 = { 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" };
8298
+ if (vErrors === null) {
8299
+ vErrors = [err23];
8300
+ }
8301
+ else {
8302
+ vErrors.push(err23);
8303
+ }
8304
+ errors++;
8305
+ }
8306
+ }
8307
+ else {
8308
+ const err24 = { 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" };
8309
+ if (vErrors === null) {
8310
+ vErrors = [err24];
8311
+ }
8312
+ else {
8313
+ vErrors.push(err24);
8314
+ }
8315
+ errors++;
8316
+ }
8317
+ }
8318
+ var valid8 = _errs33 === errors;
8319
+ }
8320
+ else {
8321
+ var valid8 = true;
8322
+ }
8323
+ if (valid8) {
8324
+ if (data.protocolPath !== undefined) {
8325
+ const _errs35 = errors;
8326
+ if (typeof data.protocolPath !== "string") {
8327
+ const err25 = { 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" };
8328
+ if (vErrors === null) {
8329
+ vErrors = [err25];
8330
+ }
8331
+ else {
8332
+ vErrors.push(err25);
8333
+ }
8334
+ errors++;
8335
+ }
8336
+ var valid8 = _errs35 === errors;
8337
+ }
8338
+ else {
8339
+ var valid8 = true;
8340
+ }
8341
+ }
8342
+ }
8292
8343
  }
8293
8344
  }
8294
8345
  }
8295
8346
  }
8296
8347
  }
8297
8348
  else {
8298
- const err23 = { 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" };
8349
+ const err26 = { 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" };
8299
8350
  if (vErrors === null) {
8300
- vErrors = [err23];
8351
+ vErrors = [err26];
8301
8352
  }
8302
8353
  else {
8303
- vErrors.push(err23);
8354
+ vErrors.push(err26);
8304
8355
  }
8305
8356
  errors++;
8306
8357
  }
@@ -8318,107 +8369,160 @@ else {
8318
8369
  props0 = true;
8319
8370
  }
8320
8371
  }
8321
- const _errs33 = errors;
8322
- const _errs34 = errors;
8323
- if (errors === _errs34) {
8372
+ const _errs37 = errors;
8373
+ const _errs38 = errors;
8374
+ if (errors === _errs38) {
8324
8375
  if (data && typeof data == "object" && !Array.isArray(data)) {
8325
8376
  let missing4;
8326
- if (((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) {
8327
- const err24 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
8377
+ if ((((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) || ((data.protocol === undefined) && (missing4 = "protocol"))) {
8378
+ const err27 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
8328
8379
  if (vErrors === null) {
8329
- vErrors = [err24];
8380
+ vErrors = [err27];
8330
8381
  }
8331
8382
  else {
8332
- vErrors.push(err24);
8383
+ vErrors.push(err27);
8333
8384
  }
8334
8385
  errors++;
8335
8386
  }
8336
8387
  else {
8337
- const _errs36 = errors;
8388
+ const _errs40 = errors;
8338
8389
  for (const key4 in data) {
8339
- if (!(((key4 === "interface") || (key4 === "method")) || (key4 === "protocol"))) {
8340
- const err25 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
8390
+ if (!(((((key4 === "interface") || (key4 === "method")) || (key4 === "protocol")) || (key4 === "contextId")) || (key4 === "protocolPath"))) {
8391
+ const err28 = { 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" };
8341
8392
  if (vErrors === null) {
8342
- vErrors = [err25];
8393
+ vErrors = [err28];
8343
8394
  }
8344
8395
  else {
8345
- vErrors.push(err25);
8396
+ vErrors.push(err28);
8346
8397
  }
8347
8398
  errors++;
8348
8399
  break;
8349
8400
  }
8350
8401
  }
8351
- if (_errs36 === errors) {
8402
+ if (_errs40 === errors) {
8352
8403
  if (data.interface !== undefined) {
8353
- const _errs37 = errors;
8354
- if ("Protocols" !== data.interface) {
8355
- const err26 = { 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" };
8404
+ const _errs41 = errors;
8405
+ if ("Records" !== data.interface) {
8406
+ const err29 = { 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" };
8356
8407
  if (vErrors === null) {
8357
- vErrors = [err26];
8408
+ vErrors = [err29];
8358
8409
  }
8359
8410
  else {
8360
- vErrors.push(err26);
8411
+ vErrors.push(err29);
8361
8412
  }
8362
8413
  errors++;
8363
8414
  }
8364
- var valid10 = _errs37 === errors;
8415
+ var valid10 = _errs41 === errors;
8365
8416
  }
8366
8417
  else {
8367
8418
  var valid10 = true;
8368
8419
  }
8369
8420
  if (valid10) {
8370
8421
  if (data.method !== undefined) {
8371
- const _errs38 = errors;
8372
- if ("Query" !== data.method) {
8373
- const err27 = { 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" };
8422
+ const _errs42 = errors;
8423
+ if ("Delete" !== data.method) {
8424
+ const err30 = { 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" };
8374
8425
  if (vErrors === null) {
8375
- vErrors = [err27];
8426
+ vErrors = [err30];
8376
8427
  }
8377
8428
  else {
8378
- vErrors.push(err27);
8429
+ vErrors.push(err30);
8379
8430
  }
8380
8431
  errors++;
8381
8432
  }
8382
- var valid10 = _errs38 === errors;
8433
+ var valid10 = _errs42 === errors;
8383
8434
  }
8384
8435
  else {
8385
8436
  var valid10 = true;
8386
8437
  }
8387
8438
  if (valid10) {
8388
8439
  if (data.protocol !== undefined) {
8389
- const _errs39 = errors;
8440
+ const _errs43 = errors;
8390
8441
  if (typeof data.protocol !== "string") {
8391
- const err28 = { 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" };
8442
+ const err31 = { 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" };
8392
8443
  if (vErrors === null) {
8393
- vErrors = [err28];
8444
+ vErrors = [err31];
8394
8445
  }
8395
8446
  else {
8396
- vErrors.push(err28);
8447
+ vErrors.push(err31);
8397
8448
  }
8398
8449
  errors++;
8399
8450
  }
8400
- var valid10 = _errs39 === errors;
8451
+ var valid10 = _errs43 === errors;
8401
8452
  }
8402
8453
  else {
8403
8454
  var valid10 = true;
8404
8455
  }
8456
+ if (valid10) {
8457
+ if (data.contextId !== undefined) {
8458
+ let data17 = data.contextId;
8459
+ const _errs45 = errors;
8460
+ if (errors === _errs45) {
8461
+ if (typeof data17 === "string") {
8462
+ if (func1(data17) > 600) {
8463
+ const err32 = { 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" };
8464
+ if (vErrors === null) {
8465
+ vErrors = [err32];
8466
+ }
8467
+ else {
8468
+ vErrors.push(err32);
8469
+ }
8470
+ errors++;
8471
+ }
8472
+ }
8473
+ else {
8474
+ const err33 = { 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" };
8475
+ if (vErrors === null) {
8476
+ vErrors = [err33];
8477
+ }
8478
+ else {
8479
+ vErrors.push(err33);
8480
+ }
8481
+ errors++;
8482
+ }
8483
+ }
8484
+ var valid10 = _errs45 === errors;
8485
+ }
8486
+ else {
8487
+ var valid10 = true;
8488
+ }
8489
+ if (valid10) {
8490
+ if (data.protocolPath !== undefined) {
8491
+ const _errs47 = errors;
8492
+ if (typeof data.protocolPath !== "string") {
8493
+ const err34 = { 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" };
8494
+ if (vErrors === null) {
8495
+ vErrors = [err34];
8496
+ }
8497
+ else {
8498
+ vErrors.push(err34);
8499
+ }
8500
+ errors++;
8501
+ }
8502
+ var valid10 = _errs47 === errors;
8503
+ }
8504
+ else {
8505
+ var valid10 = true;
8506
+ }
8507
+ }
8508
+ }
8405
8509
  }
8406
8510
  }
8407
8511
  }
8408
8512
  }
8409
8513
  }
8410
8514
  else {
8411
- const err29 = { 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" };
8515
+ const err35 = { 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" };
8412
8516
  if (vErrors === null) {
8413
- vErrors = [err29];
8517
+ vErrors = [err35];
8414
8518
  }
8415
8519
  else {
8416
- vErrors.push(err29);
8520
+ vErrors.push(err35);
8417
8521
  }
8418
8522
  errors++;
8419
8523
  }
8420
8524
  }
8421
- var _valid0 = _errs33 === errors;
8525
+ var _valid0 = _errs37 === errors;
8422
8526
  if (_valid0 && valid0) {
8423
8527
  valid0 = false;
8424
8528
  passing0 = [passing0, 4];
@@ -8431,137 +8535,137 @@ else {
8431
8535
  props0 = true;
8432
8536
  }
8433
8537
  }
8434
- const _errs41 = errors;
8435
- const _errs42 = errors;
8436
- if (errors === _errs42) {
8538
+ const _errs49 = errors;
8539
+ const _errs50 = errors;
8540
+ if (errors === _errs50) {
8437
8541
  if (data && typeof data == "object" && !Array.isArray(data)) {
8438
8542
  let missing5;
8439
8543
  if ((((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) || ((data.protocol === undefined) && (missing5 = "protocol"))) {
8440
- const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
8544
+ const err36 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
8441
8545
  if (vErrors === null) {
8442
- vErrors = [err30];
8546
+ vErrors = [err36];
8443
8547
  }
8444
8548
  else {
8445
- vErrors.push(err30);
8549
+ vErrors.push(err36);
8446
8550
  }
8447
8551
  errors++;
8448
8552
  }
8449
8553
  else {
8450
- const _errs44 = errors;
8554
+ const _errs52 = errors;
8451
8555
  for (const key5 in data) {
8452
8556
  if (!(((((key5 === "interface") || (key5 === "method")) || (key5 === "protocol")) || (key5 === "contextId")) || (key5 === "protocolPath"))) {
8453
- const err31 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
8557
+ const err37 = { 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" };
8454
8558
  if (vErrors === null) {
8455
- vErrors = [err31];
8559
+ vErrors = [err37];
8456
8560
  }
8457
8561
  else {
8458
- vErrors.push(err31);
8562
+ vErrors.push(err37);
8459
8563
  }
8460
8564
  errors++;
8461
8565
  break;
8462
8566
  }
8463
8567
  }
8464
- if (_errs44 === errors) {
8568
+ if (_errs52 === errors) {
8465
8569
  if (data.interface !== undefined) {
8466
- const _errs45 = errors;
8570
+ const _errs53 = errors;
8467
8571
  if ("Records" !== data.interface) {
8468
- const err32 = { 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" };
8572
+ const err38 = { 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" };
8469
8573
  if (vErrors === null) {
8470
- vErrors = [err32];
8574
+ vErrors = [err38];
8471
8575
  }
8472
8576
  else {
8473
- vErrors.push(err32);
8577
+ vErrors.push(err38);
8474
8578
  }
8475
8579
  errors++;
8476
8580
  }
8477
- var valid12 = _errs45 === errors;
8581
+ var valid12 = _errs53 === errors;
8478
8582
  }
8479
8583
  else {
8480
8584
  var valid12 = true;
8481
8585
  }
8482
8586
  if (valid12) {
8483
8587
  if (data.method !== undefined) {
8484
- const _errs46 = errors;
8485
- if ("Read" !== data.method) {
8486
- const err33 = { 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" };
8588
+ const _errs54 = errors;
8589
+ if ("Write" !== data.method) {
8590
+ const err39 = { 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" };
8487
8591
  if (vErrors === null) {
8488
- vErrors = [err33];
8592
+ vErrors = [err39];
8489
8593
  }
8490
8594
  else {
8491
- vErrors.push(err33);
8595
+ vErrors.push(err39);
8492
8596
  }
8493
8597
  errors++;
8494
8598
  }
8495
- var valid12 = _errs46 === errors;
8599
+ var valid12 = _errs54 === errors;
8496
8600
  }
8497
8601
  else {
8498
8602
  var valid12 = true;
8499
8603
  }
8500
8604
  if (valid12) {
8501
8605
  if (data.protocol !== undefined) {
8502
- const _errs47 = errors;
8606
+ const _errs55 = errors;
8503
8607
  if (typeof data.protocol !== "string") {
8504
- const err34 = { 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" };
8608
+ const err40 = { 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" };
8505
8609
  if (vErrors === null) {
8506
- vErrors = [err34];
8610
+ vErrors = [err40];
8507
8611
  }
8508
8612
  else {
8509
- vErrors.push(err34);
8613
+ vErrors.push(err40);
8510
8614
  }
8511
8615
  errors++;
8512
8616
  }
8513
- var valid12 = _errs47 === errors;
8617
+ var valid12 = _errs55 === errors;
8514
8618
  }
8515
8619
  else {
8516
8620
  var valid12 = true;
8517
8621
  }
8518
8622
  if (valid12) {
8519
8623
  if (data.contextId !== undefined) {
8520
- let data18 = data.contextId;
8521
- const _errs49 = errors;
8522
- if (errors === _errs49) {
8523
- if (typeof data18 === "string") {
8524
- if (func1(data18) > 600) {
8525
- const err35 = { 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" };
8624
+ let data22 = data.contextId;
8625
+ const _errs57 = errors;
8626
+ if (errors === _errs57) {
8627
+ if (typeof data22 === "string") {
8628
+ if (func1(data22) > 600) {
8629
+ const err41 = { 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" };
8526
8630
  if (vErrors === null) {
8527
- vErrors = [err35];
8631
+ vErrors = [err41];
8528
8632
  }
8529
8633
  else {
8530
- vErrors.push(err35);
8634
+ vErrors.push(err41);
8531
8635
  }
8532
8636
  errors++;
8533
8637
  }
8534
8638
  }
8535
8639
  else {
8536
- const err36 = { 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" };
8640
+ const err42 = { 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" };
8537
8641
  if (vErrors === null) {
8538
- vErrors = [err36];
8642
+ vErrors = [err42];
8539
8643
  }
8540
8644
  else {
8541
- vErrors.push(err36);
8645
+ vErrors.push(err42);
8542
8646
  }
8543
8647
  errors++;
8544
8648
  }
8545
8649
  }
8546
- var valid12 = _errs49 === errors;
8650
+ var valid12 = _errs57 === errors;
8547
8651
  }
8548
8652
  else {
8549
8653
  var valid12 = true;
8550
8654
  }
8551
8655
  if (valid12) {
8552
8656
  if (data.protocolPath !== undefined) {
8553
- const _errs51 = errors;
8657
+ const _errs59 = errors;
8554
8658
  if (typeof data.protocolPath !== "string") {
8555
- 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" };
8659
+ const err43 = { 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" };
8556
8660
  if (vErrors === null) {
8557
- vErrors = [err37];
8661
+ vErrors = [err43];
8558
8662
  }
8559
8663
  else {
8560
- vErrors.push(err37);
8664
+ vErrors.push(err43);
8561
8665
  }
8562
8666
  errors++;
8563
8667
  }
8564
- var valid12 = _errs51 === errors;
8668
+ var valid12 = _errs59 === errors;
8565
8669
  }
8566
8670
  else {
8567
8671
  var valid12 = true;
@@ -8574,17 +8678,17 @@ else {
8574
8678
  }
8575
8679
  }
8576
8680
  else {
8577
- 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" };
8681
+ const err44 = { 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" };
8578
8682
  if (vErrors === null) {
8579
- vErrors = [err38];
8683
+ vErrors = [err44];
8580
8684
  }
8581
8685
  else {
8582
- vErrors.push(err38);
8686
+ vErrors.push(err44);
8583
8687
  }
8584
8688
  errors++;
8585
8689
  }
8586
8690
  }
8587
- var _valid0 = _errs41 === errors;
8691
+ var _valid0 = _errs49 === errors;
8588
8692
  if (_valid0 && valid0) {
8589
8693
  valid0 = false;
8590
8694
  passing0 = [passing0, 5];
@@ -8597,137 +8701,137 @@ else {
8597
8701
  props0 = true;
8598
8702
  }
8599
8703
  }
8600
- const _errs53 = errors;
8601
- const _errs54 = errors;
8602
- if (errors === _errs54) {
8704
+ const _errs61 = errors;
8705
+ const _errs62 = errors;
8706
+ if (errors === _errs62) {
8603
8707
  if (data && typeof data == "object" && !Array.isArray(data)) {
8604
8708
  let missing6;
8605
8709
  if ((((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) || ((data.protocol === undefined) && (missing6 = "protocol"))) {
8606
- const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
8710
+ const err45 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
8607
8711
  if (vErrors === null) {
8608
- vErrors = [err39];
8712
+ vErrors = [err45];
8609
8713
  }
8610
8714
  else {
8611
- vErrors.push(err39);
8715
+ vErrors.push(err45);
8612
8716
  }
8613
8717
  errors++;
8614
8718
  }
8615
8719
  else {
8616
- const _errs56 = errors;
8720
+ const _errs64 = errors;
8617
8721
  for (const key6 in data) {
8618
8722
  if (!(((((key6 === "interface") || (key6 === "method")) || (key6 === "protocol")) || (key6 === "contextId")) || (key6 === "protocolPath"))) {
8619
- const err40 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
8723
+ const err46 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
8620
8724
  if (vErrors === null) {
8621
- vErrors = [err40];
8725
+ vErrors = [err46];
8622
8726
  }
8623
8727
  else {
8624
- vErrors.push(err40);
8728
+ vErrors.push(err46);
8625
8729
  }
8626
8730
  errors++;
8627
8731
  break;
8628
8732
  }
8629
8733
  }
8630
- if (_errs56 === errors) {
8734
+ if (_errs64 === errors) {
8631
8735
  if (data.interface !== undefined) {
8632
- const _errs57 = errors;
8736
+ const _errs65 = errors;
8633
8737
  if ("Records" !== data.interface) {
8634
- 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" };
8738
+ const err47 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
8635
8739
  if (vErrors === null) {
8636
- vErrors = [err41];
8740
+ vErrors = [err47];
8637
8741
  }
8638
8742
  else {
8639
- vErrors.push(err41);
8743
+ vErrors.push(err47);
8640
8744
  }
8641
8745
  errors++;
8642
8746
  }
8643
- var valid14 = _errs57 === errors;
8747
+ var valid14 = _errs65 === errors;
8644
8748
  }
8645
8749
  else {
8646
8750
  var valid14 = true;
8647
8751
  }
8648
8752
  if (valid14) {
8649
8753
  if (data.method !== undefined) {
8650
- const _errs58 = errors;
8651
- if ("Delete" !== data.method) {
8652
- 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" };
8754
+ const _errs66 = errors;
8755
+ if ("Query" !== data.method) {
8756
+ const err48 = { 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" };
8653
8757
  if (vErrors === null) {
8654
- vErrors = [err42];
8758
+ vErrors = [err48];
8655
8759
  }
8656
8760
  else {
8657
- vErrors.push(err42);
8761
+ vErrors.push(err48);
8658
8762
  }
8659
8763
  errors++;
8660
8764
  }
8661
- var valid14 = _errs58 === errors;
8765
+ var valid14 = _errs66 === errors;
8662
8766
  }
8663
8767
  else {
8664
8768
  var valid14 = true;
8665
8769
  }
8666
8770
  if (valid14) {
8667
8771
  if (data.protocol !== undefined) {
8668
- const _errs59 = errors;
8772
+ const _errs67 = errors;
8669
8773
  if (typeof data.protocol !== "string") {
8670
- 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" };
8774
+ const err49 = { 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" };
8671
8775
  if (vErrors === null) {
8672
- vErrors = [err43];
8776
+ vErrors = [err49];
8673
8777
  }
8674
8778
  else {
8675
- vErrors.push(err43);
8779
+ vErrors.push(err49);
8676
8780
  }
8677
8781
  errors++;
8678
8782
  }
8679
- var valid14 = _errs59 === errors;
8783
+ var valid14 = _errs67 === errors;
8680
8784
  }
8681
8785
  else {
8682
8786
  var valid14 = true;
8683
8787
  }
8684
8788
  if (valid14) {
8685
8789
  if (data.contextId !== undefined) {
8686
- let data23 = data.contextId;
8687
- const _errs61 = errors;
8688
- if (errors === _errs61) {
8689
- if (typeof data23 === "string") {
8690
- if (func1(data23) > 600) {
8691
- 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" };
8790
+ let data27 = data.contextId;
8791
+ const _errs69 = errors;
8792
+ if (errors === _errs69) {
8793
+ if (typeof data27 === "string") {
8794
+ if (func1(data27) > 600) {
8795
+ const err50 = { 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" };
8692
8796
  if (vErrors === null) {
8693
- vErrors = [err44];
8797
+ vErrors = [err50];
8694
8798
  }
8695
8799
  else {
8696
- vErrors.push(err44);
8800
+ vErrors.push(err50);
8697
8801
  }
8698
8802
  errors++;
8699
8803
  }
8700
8804
  }
8701
8805
  else {
8702
- 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" };
8806
+ const err51 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8703
8807
  if (vErrors === null) {
8704
- vErrors = [err45];
8808
+ vErrors = [err51];
8705
8809
  }
8706
8810
  else {
8707
- vErrors.push(err45);
8811
+ vErrors.push(err51);
8708
8812
  }
8709
8813
  errors++;
8710
8814
  }
8711
8815
  }
8712
- var valid14 = _errs61 === errors;
8816
+ var valid14 = _errs69 === errors;
8713
8817
  }
8714
8818
  else {
8715
8819
  var valid14 = true;
8716
8820
  }
8717
8821
  if (valid14) {
8718
8822
  if (data.protocolPath !== undefined) {
8719
- const _errs63 = errors;
8823
+ const _errs71 = errors;
8720
8824
  if (typeof data.protocolPath !== "string") {
8721
- const err46 = { 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" };
8825
+ const err52 = { 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" };
8722
8826
  if (vErrors === null) {
8723
- vErrors = [err46];
8827
+ vErrors = [err52];
8724
8828
  }
8725
8829
  else {
8726
- vErrors.push(err46);
8830
+ vErrors.push(err52);
8727
8831
  }
8728
8832
  errors++;
8729
8833
  }
8730
- var valid14 = _errs63 === errors;
8834
+ var valid14 = _errs71 === errors;
8731
8835
  }
8732
8836
  else {
8733
8837
  var valid14 = true;
@@ -8740,17 +8844,17 @@ else {
8740
8844
  }
8741
8845
  }
8742
8846
  else {
8743
- const err47 = { 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" };
8847
+ const err53 = { 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" };
8744
8848
  if (vErrors === null) {
8745
- vErrors = [err47];
8849
+ vErrors = [err53];
8746
8850
  }
8747
8851
  else {
8748
- vErrors.push(err47);
8852
+ vErrors.push(err53);
8749
8853
  }
8750
8854
  errors++;
8751
8855
  }
8752
8856
  }
8753
- var _valid0 = _errs53 === errors;
8857
+ var _valid0 = _errs61 === errors;
8754
8858
  if (_valid0 && valid0) {
8755
8859
  valid0 = false;
8756
8860
  passing0 = [passing0, 6];
@@ -8763,137 +8867,137 @@ else {
8763
8867
  props0 = true;
8764
8868
  }
8765
8869
  }
8766
- const _errs65 = errors;
8767
- const _errs66 = errors;
8768
- if (errors === _errs66) {
8870
+ const _errs73 = errors;
8871
+ const _errs74 = errors;
8872
+ if (errors === _errs74) {
8769
8873
  if (data && typeof data == "object" && !Array.isArray(data)) {
8770
8874
  let missing7;
8771
8875
  if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
8772
- const err48 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
8876
+ const err54 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
8773
8877
  if (vErrors === null) {
8774
- vErrors = [err48];
8878
+ vErrors = [err54];
8775
8879
  }
8776
8880
  else {
8777
- vErrors.push(err48);
8881
+ vErrors.push(err54);
8778
8882
  }
8779
8883
  errors++;
8780
8884
  }
8781
8885
  else {
8782
- const _errs68 = errors;
8886
+ const _errs76 = errors;
8783
8887
  for (const key7 in data) {
8784
8888
  if (!(((((key7 === "interface") || (key7 === "method")) || (key7 === "protocol")) || (key7 === "contextId")) || (key7 === "protocolPath"))) {
8785
- const err49 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
8889
+ const err55 = { 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" };
8786
8890
  if (vErrors === null) {
8787
- vErrors = [err49];
8891
+ vErrors = [err55];
8788
8892
  }
8789
8893
  else {
8790
- vErrors.push(err49);
8894
+ vErrors.push(err55);
8791
8895
  }
8792
8896
  errors++;
8793
8897
  break;
8794
8898
  }
8795
8899
  }
8796
- if (_errs68 === errors) {
8900
+ if (_errs76 === errors) {
8797
8901
  if (data.interface !== undefined) {
8798
- const _errs69 = errors;
8902
+ const _errs77 = errors;
8799
8903
  if ("Records" !== data.interface) {
8800
- const err50 = { 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" };
8904
+ const err56 = { 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" };
8801
8905
  if (vErrors === null) {
8802
- vErrors = [err50];
8906
+ vErrors = [err56];
8803
8907
  }
8804
8908
  else {
8805
- vErrors.push(err50);
8909
+ vErrors.push(err56);
8806
8910
  }
8807
8911
  errors++;
8808
8912
  }
8809
- var valid16 = _errs69 === errors;
8913
+ var valid16 = _errs77 === errors;
8810
8914
  }
8811
8915
  else {
8812
8916
  var valid16 = true;
8813
8917
  }
8814
8918
  if (valid16) {
8815
8919
  if (data.method !== undefined) {
8816
- const _errs70 = errors;
8817
- if ("Write" !== data.method) {
8818
- const err51 = { 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" };
8920
+ const _errs78 = errors;
8921
+ if ("Subscribe" !== data.method) {
8922
+ const err57 = { 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" };
8819
8923
  if (vErrors === null) {
8820
- vErrors = [err51];
8924
+ vErrors = [err57];
8821
8925
  }
8822
8926
  else {
8823
- vErrors.push(err51);
8927
+ vErrors.push(err57);
8824
8928
  }
8825
8929
  errors++;
8826
8930
  }
8827
- var valid16 = _errs70 === errors;
8931
+ var valid16 = _errs78 === errors;
8828
8932
  }
8829
8933
  else {
8830
8934
  var valid16 = true;
8831
8935
  }
8832
8936
  if (valid16) {
8833
8937
  if (data.protocol !== undefined) {
8834
- const _errs71 = errors;
8938
+ const _errs79 = errors;
8835
8939
  if (typeof data.protocol !== "string") {
8836
- const err52 = { 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" };
8940
+ const err58 = { 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" };
8837
8941
  if (vErrors === null) {
8838
- vErrors = [err52];
8942
+ vErrors = [err58];
8839
8943
  }
8840
8944
  else {
8841
- vErrors.push(err52);
8945
+ vErrors.push(err58);
8842
8946
  }
8843
8947
  errors++;
8844
8948
  }
8845
- var valid16 = _errs71 === errors;
8949
+ var valid16 = _errs79 === errors;
8846
8950
  }
8847
8951
  else {
8848
8952
  var valid16 = true;
8849
8953
  }
8850
8954
  if (valid16) {
8851
8955
  if (data.contextId !== undefined) {
8852
- let data28 = data.contextId;
8853
- const _errs73 = errors;
8854
- if (errors === _errs73) {
8855
- if (typeof data28 === "string") {
8856
- if (func1(data28) > 600) {
8857
- const err53 = { 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" };
8956
+ let data32 = data.contextId;
8957
+ const _errs81 = errors;
8958
+ if (errors === _errs81) {
8959
+ if (typeof data32 === "string") {
8960
+ if (func1(data32) > 600) {
8961
+ const err59 = { 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" };
8858
8962
  if (vErrors === null) {
8859
- vErrors = [err53];
8963
+ vErrors = [err59];
8860
8964
  }
8861
8965
  else {
8862
- vErrors.push(err53);
8966
+ vErrors.push(err59);
8863
8967
  }
8864
8968
  errors++;
8865
8969
  }
8866
8970
  }
8867
8971
  else {
8868
- const err54 = { 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" };
8972
+ const err60 = { 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" };
8869
8973
  if (vErrors === null) {
8870
- vErrors = [err54];
8974
+ vErrors = [err60];
8871
8975
  }
8872
8976
  else {
8873
- vErrors.push(err54);
8977
+ vErrors.push(err60);
8874
8978
  }
8875
8979
  errors++;
8876
8980
  }
8877
8981
  }
8878
- var valid16 = _errs73 === errors;
8982
+ var valid16 = _errs81 === errors;
8879
8983
  }
8880
8984
  else {
8881
8985
  var valid16 = true;
8882
8986
  }
8883
8987
  if (valid16) {
8884
8988
  if (data.protocolPath !== undefined) {
8885
- const _errs75 = errors;
8989
+ const _errs83 = errors;
8886
8990
  if (typeof data.protocolPath !== "string") {
8887
- const err55 = { 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" };
8991
+ const err61 = { 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" };
8888
8992
  if (vErrors === null) {
8889
- vErrors = [err55];
8993
+ vErrors = [err61];
8890
8994
  }
8891
8995
  else {
8892
- vErrors.push(err55);
8996
+ vErrors.push(err61);
8893
8997
  }
8894
8998
  errors++;
8895
8999
  }
8896
- var valid16 = _errs75 === errors;
9000
+ var valid16 = _errs83 === errors;
8897
9001
  }
8898
9002
  else {
8899
9003
  var valid16 = true;
@@ -8906,17 +9010,17 @@ else {
8906
9010
  }
8907
9011
  }
8908
9012
  else {
8909
- const err56 = { 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" };
9013
+ const err62 = { 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" };
8910
9014
  if (vErrors === null) {
8911
- vErrors = [err56];
9015
+ vErrors = [err62];
8912
9016
  }
8913
9017
  else {
8914
- vErrors.push(err56);
9018
+ vErrors.push(err62);
8915
9019
  }
8916
9020
  errors++;
8917
9021
  }
8918
9022
  }
8919
- var _valid0 = _errs65 === errors;
9023
+ var _valid0 = _errs73 === errors;
8920
9024
  if (_valid0 && valid0) {
8921
9025
  valid0 = false;
8922
9026
  passing0 = [passing0, 7];
@@ -8929,137 +9033,137 @@ else {
8929
9033
  props0 = true;
8930
9034
  }
8931
9035
  }
8932
- const _errs77 = errors;
8933
- const _errs78 = errors;
8934
- if (errors === _errs78) {
9036
+ const _errs85 = errors;
9037
+ const _errs86 = errors;
9038
+ if (errors === _errs86) {
8935
9039
  if (data && typeof data == "object" && !Array.isArray(data)) {
8936
9040
  let missing8;
8937
9041
  if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
8938
- const err57 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
9042
+ const err63 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
8939
9043
  if (vErrors === null) {
8940
- vErrors = [err57];
9044
+ vErrors = [err63];
8941
9045
  }
8942
9046
  else {
8943
- vErrors.push(err57);
9047
+ vErrors.push(err63);
8944
9048
  }
8945
9049
  errors++;
8946
9050
  }
8947
9051
  else {
8948
- const _errs80 = errors;
9052
+ const _errs88 = errors;
8949
9053
  for (const key8 in data) {
8950
9054
  if (!(((((key8 === "interface") || (key8 === "method")) || (key8 === "protocol")) || (key8 === "contextId")) || (key8 === "protocolPath"))) {
8951
- const err58 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
9055
+ const err64 = { 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" };
8952
9056
  if (vErrors === null) {
8953
- vErrors = [err58];
9057
+ vErrors = [err64];
8954
9058
  }
8955
9059
  else {
8956
- vErrors.push(err58);
9060
+ vErrors.push(err64);
8957
9061
  }
8958
9062
  errors++;
8959
9063
  break;
8960
9064
  }
8961
9065
  }
8962
- if (_errs80 === errors) {
9066
+ if (_errs88 === errors) {
8963
9067
  if (data.interface !== undefined) {
8964
- const _errs81 = errors;
9068
+ const _errs89 = errors;
8965
9069
  if ("Records" !== data.interface) {
8966
- const err59 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
9070
+ const err65 = { 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" };
8967
9071
  if (vErrors === null) {
8968
- vErrors = [err59];
9072
+ vErrors = [err65];
8969
9073
  }
8970
9074
  else {
8971
- vErrors.push(err59);
9075
+ vErrors.push(err65);
8972
9076
  }
8973
9077
  errors++;
8974
9078
  }
8975
- var valid18 = _errs81 === errors;
9079
+ var valid18 = _errs89 === errors;
8976
9080
  }
8977
9081
  else {
8978
9082
  var valid18 = true;
8979
9083
  }
8980
9084
  if (valid18) {
8981
9085
  if (data.method !== undefined) {
8982
- const _errs82 = errors;
8983
- if ("Query" !== data.method) {
8984
- const err60 = { 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" };
9086
+ const _errs90 = errors;
9087
+ if ("Count" !== data.method) {
9088
+ const err66 = { 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" };
8985
9089
  if (vErrors === null) {
8986
- vErrors = [err60];
9090
+ vErrors = [err66];
8987
9091
  }
8988
9092
  else {
8989
- vErrors.push(err60);
9093
+ vErrors.push(err66);
8990
9094
  }
8991
9095
  errors++;
8992
9096
  }
8993
- var valid18 = _errs82 === errors;
9097
+ var valid18 = _errs90 === errors;
8994
9098
  }
8995
9099
  else {
8996
9100
  var valid18 = true;
8997
9101
  }
8998
9102
  if (valid18) {
8999
9103
  if (data.protocol !== undefined) {
9000
- const _errs83 = errors;
9104
+ const _errs91 = errors;
9001
9105
  if (typeof data.protocol !== "string") {
9002
- const err61 = { 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" };
9106
+ const err67 = { 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" };
9003
9107
  if (vErrors === null) {
9004
- vErrors = [err61];
9108
+ vErrors = [err67];
9005
9109
  }
9006
9110
  else {
9007
- vErrors.push(err61);
9111
+ vErrors.push(err67);
9008
9112
  }
9009
9113
  errors++;
9010
9114
  }
9011
- var valid18 = _errs83 === errors;
9115
+ var valid18 = _errs91 === errors;
9012
9116
  }
9013
9117
  else {
9014
9118
  var valid18 = true;
9015
9119
  }
9016
9120
  if (valid18) {
9017
9121
  if (data.contextId !== undefined) {
9018
- let data33 = data.contextId;
9019
- const _errs85 = errors;
9020
- if (errors === _errs85) {
9021
- if (typeof data33 === "string") {
9022
- if (func1(data33) > 600) {
9023
- const err62 = { 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" };
9122
+ let data37 = data.contextId;
9123
+ const _errs93 = errors;
9124
+ if (errors === _errs93) {
9125
+ if (typeof data37 === "string") {
9126
+ if (func1(data37) > 600) {
9127
+ const err68 = { 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" };
9024
9128
  if (vErrors === null) {
9025
- vErrors = [err62];
9129
+ vErrors = [err68];
9026
9130
  }
9027
9131
  else {
9028
- vErrors.push(err62);
9132
+ vErrors.push(err68);
9029
9133
  }
9030
9134
  errors++;
9031
9135
  }
9032
9136
  }
9033
9137
  else {
9034
- const err63 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9138
+ const err69 = { 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" };
9035
9139
  if (vErrors === null) {
9036
- vErrors = [err63];
9140
+ vErrors = [err69];
9037
9141
  }
9038
9142
  else {
9039
- vErrors.push(err63);
9143
+ vErrors.push(err69);
9040
9144
  }
9041
9145
  errors++;
9042
9146
  }
9043
9147
  }
9044
- var valid18 = _errs85 === errors;
9148
+ var valid18 = _errs93 === errors;
9045
9149
  }
9046
9150
  else {
9047
9151
  var valid18 = true;
9048
9152
  }
9049
9153
  if (valid18) {
9050
9154
  if (data.protocolPath !== undefined) {
9051
- const _errs87 = errors;
9155
+ const _errs95 = errors;
9052
9156
  if (typeof data.protocolPath !== "string") {
9053
- const err64 = { 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" };
9157
+ const err70 = { 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" };
9054
9158
  if (vErrors === null) {
9055
- vErrors = [err64];
9159
+ vErrors = [err70];
9056
9160
  }
9057
9161
  else {
9058
- vErrors.push(err64);
9162
+ vErrors.push(err70);
9059
9163
  }
9060
9164
  errors++;
9061
9165
  }
9062
- var valid18 = _errs87 === errors;
9166
+ var valid18 = _errs95 === errors;
9063
9167
  }
9064
9168
  else {
9065
9169
  var valid18 = true;
@@ -9072,17 +9176,17 @@ else {
9072
9176
  }
9073
9177
  }
9074
9178
  else {
9075
- const err65 = { 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" };
9179
+ const err71 = { 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" };
9076
9180
  if (vErrors === null) {
9077
- vErrors = [err65];
9181
+ vErrors = [err71];
9078
9182
  }
9079
9183
  else {
9080
- vErrors.push(err65);
9184
+ vErrors.push(err71);
9081
9185
  }
9082
9186
  errors++;
9083
9187
  }
9084
9188
  }
9085
- var _valid0 = _errs77 === errors;
9189
+ var _valid0 = _errs85 === errors;
9086
9190
  if (_valid0 && valid0) {
9087
9191
  valid0 = false;
9088
9192
  passing0 = [passing0, 8];
@@ -9095,340 +9199,6 @@ else {
9095
9199
  props0 = true;
9096
9200
  }
9097
9201
  }
9098
- const _errs89 = errors;
9099
- const _errs90 = errors;
9100
- if (errors === _errs90) {
9101
- if (data && typeof data == "object" && !Array.isArray(data)) {
9102
- let missing9;
9103
- if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
9104
- const err66 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
9105
- if (vErrors === null) {
9106
- vErrors = [err66];
9107
- }
9108
- else {
9109
- vErrors.push(err66);
9110
- }
9111
- errors++;
9112
- }
9113
- else {
9114
- const _errs92 = errors;
9115
- for (const key9 in data) {
9116
- if (!(((((key9 === "interface") || (key9 === "method")) || (key9 === "protocol")) || (key9 === "contextId")) || (key9 === "protocolPath"))) {
9117
- const err67 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key9 }, message: "must NOT have additional properties" };
9118
- if (vErrors === null) {
9119
- vErrors = [err67];
9120
- }
9121
- else {
9122
- vErrors.push(err67);
9123
- }
9124
- errors++;
9125
- break;
9126
- }
9127
- }
9128
- if (_errs92 === errors) {
9129
- if (data.interface !== undefined) {
9130
- const _errs93 = errors;
9131
- if ("Records" !== data.interface) {
9132
- const err68 = { 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" };
9133
- if (vErrors === null) {
9134
- vErrors = [err68];
9135
- }
9136
- else {
9137
- vErrors.push(err68);
9138
- }
9139
- errors++;
9140
- }
9141
- var valid20 = _errs93 === errors;
9142
- }
9143
- else {
9144
- var valid20 = true;
9145
- }
9146
- if (valid20) {
9147
- if (data.method !== undefined) {
9148
- const _errs94 = errors;
9149
- if ("Subscribe" !== data.method) {
9150
- const err69 = { 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" };
9151
- if (vErrors === null) {
9152
- vErrors = [err69];
9153
- }
9154
- else {
9155
- vErrors.push(err69);
9156
- }
9157
- errors++;
9158
- }
9159
- var valid20 = _errs94 === errors;
9160
- }
9161
- else {
9162
- var valid20 = true;
9163
- }
9164
- if (valid20) {
9165
- if (data.protocol !== undefined) {
9166
- const _errs95 = errors;
9167
- if (typeof data.protocol !== "string") {
9168
- const err70 = { 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" };
9169
- if (vErrors === null) {
9170
- vErrors = [err70];
9171
- }
9172
- else {
9173
- vErrors.push(err70);
9174
- }
9175
- errors++;
9176
- }
9177
- var valid20 = _errs95 === errors;
9178
- }
9179
- else {
9180
- var valid20 = true;
9181
- }
9182
- if (valid20) {
9183
- if (data.contextId !== undefined) {
9184
- let data38 = data.contextId;
9185
- const _errs97 = errors;
9186
- if (errors === _errs97) {
9187
- if (typeof data38 === "string") {
9188
- if (func1(data38) > 600) {
9189
- const err71 = { 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" };
9190
- if (vErrors === null) {
9191
- vErrors = [err71];
9192
- }
9193
- else {
9194
- vErrors.push(err71);
9195
- }
9196
- errors++;
9197
- }
9198
- }
9199
- else {
9200
- const err72 = { 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" };
9201
- if (vErrors === null) {
9202
- vErrors = [err72];
9203
- }
9204
- else {
9205
- vErrors.push(err72);
9206
- }
9207
- errors++;
9208
- }
9209
- }
9210
- var valid20 = _errs97 === errors;
9211
- }
9212
- else {
9213
- var valid20 = true;
9214
- }
9215
- if (valid20) {
9216
- if (data.protocolPath !== undefined) {
9217
- const _errs99 = errors;
9218
- if (typeof data.protocolPath !== "string") {
9219
- const err73 = { 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" };
9220
- if (vErrors === null) {
9221
- vErrors = [err73];
9222
- }
9223
- else {
9224
- vErrors.push(err73);
9225
- }
9226
- errors++;
9227
- }
9228
- var valid20 = _errs99 === errors;
9229
- }
9230
- else {
9231
- var valid20 = true;
9232
- }
9233
- }
9234
- }
9235
- }
9236
- }
9237
- }
9238
- }
9239
- }
9240
- else {
9241
- const err74 = { 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" };
9242
- if (vErrors === null) {
9243
- vErrors = [err74];
9244
- }
9245
- else {
9246
- vErrors.push(err74);
9247
- }
9248
- errors++;
9249
- }
9250
- }
9251
- var _valid0 = _errs89 === errors;
9252
- if (_valid0 && valid0) {
9253
- valid0 = false;
9254
- passing0 = [passing0, 9];
9255
- }
9256
- else {
9257
- if (_valid0) {
9258
- valid0 = true;
9259
- passing0 = 9;
9260
- if (props0 !== true) {
9261
- props0 = true;
9262
- }
9263
- }
9264
- const _errs101 = errors;
9265
- const _errs102 = errors;
9266
- if (errors === _errs102) {
9267
- if (data && typeof data == "object" && !Array.isArray(data)) {
9268
- let missing10;
9269
- if ((((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) || ((data.protocol === undefined) && (missing10 = "protocol"))) {
9270
- const err75 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
9271
- if (vErrors === null) {
9272
- vErrors = [err75];
9273
- }
9274
- else {
9275
- vErrors.push(err75);
9276
- }
9277
- errors++;
9278
- }
9279
- else {
9280
- const _errs104 = errors;
9281
- for (const key10 in data) {
9282
- if (!(((((key10 === "interface") || (key10 === "method")) || (key10 === "protocol")) || (key10 === "contextId")) || (key10 === "protocolPath"))) {
9283
- const err76 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key10 }, message: "must NOT have additional properties" };
9284
- if (vErrors === null) {
9285
- vErrors = [err76];
9286
- }
9287
- else {
9288
- vErrors.push(err76);
9289
- }
9290
- errors++;
9291
- break;
9292
- }
9293
- }
9294
- if (_errs104 === errors) {
9295
- if (data.interface !== undefined) {
9296
- const _errs105 = errors;
9297
- if ("Records" !== data.interface) {
9298
- const err77 = { 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" };
9299
- if (vErrors === null) {
9300
- vErrors = [err77];
9301
- }
9302
- else {
9303
- vErrors.push(err77);
9304
- }
9305
- errors++;
9306
- }
9307
- var valid22 = _errs105 === errors;
9308
- }
9309
- else {
9310
- var valid22 = true;
9311
- }
9312
- if (valid22) {
9313
- if (data.method !== undefined) {
9314
- const _errs106 = errors;
9315
- if ("Count" !== data.method) {
9316
- const err78 = { 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" };
9317
- if (vErrors === null) {
9318
- vErrors = [err78];
9319
- }
9320
- else {
9321
- vErrors.push(err78);
9322
- }
9323
- errors++;
9324
- }
9325
- var valid22 = _errs106 === errors;
9326
- }
9327
- else {
9328
- var valid22 = true;
9329
- }
9330
- if (valid22) {
9331
- if (data.protocol !== undefined) {
9332
- const _errs107 = errors;
9333
- if (typeof data.protocol !== "string") {
9334
- const err79 = { 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" };
9335
- if (vErrors === null) {
9336
- vErrors = [err79];
9337
- }
9338
- else {
9339
- vErrors.push(err79);
9340
- }
9341
- errors++;
9342
- }
9343
- var valid22 = _errs107 === errors;
9344
- }
9345
- else {
9346
- var valid22 = true;
9347
- }
9348
- if (valid22) {
9349
- if (data.contextId !== undefined) {
9350
- let data43 = data.contextId;
9351
- const _errs109 = errors;
9352
- if (errors === _errs109) {
9353
- if (typeof data43 === "string") {
9354
- if (func1(data43) > 600) {
9355
- const err80 = { 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" };
9356
- if (vErrors === null) {
9357
- vErrors = [err80];
9358
- }
9359
- else {
9360
- vErrors.push(err80);
9361
- }
9362
- errors++;
9363
- }
9364
- }
9365
- else {
9366
- const err81 = { 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" };
9367
- if (vErrors === null) {
9368
- vErrors = [err81];
9369
- }
9370
- else {
9371
- vErrors.push(err81);
9372
- }
9373
- errors++;
9374
- }
9375
- }
9376
- var valid22 = _errs109 === errors;
9377
- }
9378
- else {
9379
- var valid22 = true;
9380
- }
9381
- if (valid22) {
9382
- if (data.protocolPath !== undefined) {
9383
- const _errs111 = errors;
9384
- if (typeof data.protocolPath !== "string") {
9385
- const err82 = { 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" };
9386
- if (vErrors === null) {
9387
- vErrors = [err82];
9388
- }
9389
- else {
9390
- vErrors.push(err82);
9391
- }
9392
- errors++;
9393
- }
9394
- var valid22 = _errs111 === errors;
9395
- }
9396
- else {
9397
- var valid22 = true;
9398
- }
9399
- }
9400
- }
9401
- }
9402
- }
9403
- }
9404
- }
9405
- }
9406
- else {
9407
- const err83 = { 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" };
9408
- if (vErrors === null) {
9409
- vErrors = [err83];
9410
- }
9411
- else {
9412
- vErrors.push(err83);
9413
- }
9414
- errors++;
9415
- }
9416
- }
9417
- var _valid0 = _errs101 === errors;
9418
- if (_valid0 && valid0) {
9419
- valid0 = false;
9420
- passing0 = [passing0, 10];
9421
- }
9422
- else {
9423
- if (_valid0) {
9424
- valid0 = true;
9425
- passing0 = 10;
9426
- if (props0 !== true) {
9427
- props0 = true;
9428
- }
9429
- }
9430
- }
9431
- }
9432
9202
  }
9433
9203
  }
9434
9204
  }
@@ -9437,12 +9207,12 @@ else {
9437
9207
  }
9438
9208
  }
9439
9209
  } if (!valid0) {
9440
- const err84 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
9210
+ const err72 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
9441
9211
  if (vErrors === null) {
9442
- vErrors = [err84];
9212
+ vErrors = [err72];
9443
9213
  }
9444
9214
  else {
9445
- vErrors.push(err84);
9215
+ vErrors.push(err72);
9446
9216
  }
9447
9217
  errors++;
9448
9218
  validate69.errors = vErrors;
@@ -9573,7 +9343,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
9573
9343
  return false;
9574
9344
  }
9575
9345
  if (!((data6 === "Required") || (data6 === "Prohibited"))) {
9576
- validate67.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema109.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
9346
+ validate67.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema107.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
9577
9347
  return false;
9578
9348
  }
9579
9349
  }
@@ -9664,7 +9434,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
9664
9434
  } validate67.errors = vErrors; return errors === 0; }
9665
9435
  validate67.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
9666
9436
  export const PermissionRequestData = validate72;
9667
- const schema110 = { "$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" } } };
9437
+ 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" } } };
9668
9438
  function validate73(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate73.evaluated; if (evaluated0.dynamicProps) {
9669
9439
  evaluated0.props = undefined;
9670
9440
  } if (evaluated0.dynamicItems) {
@@ -9774,7 +9544,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9774
9544
  if (data && typeof data == "object" && !Array.isArray(data)) {
9775
9545
  let missing1;
9776
9546
  if (((data.interface === undefined) && (missing1 = "interface")) || ((data.method === undefined) && (missing1 = "method"))) {
9777
- const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
9547
+ const err6 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
9778
9548
  if (vErrors === null) {
9779
9549
  vErrors = [err6];
9780
9550
  }
@@ -9787,7 +9557,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9787
9557
  const _errs12 = errors;
9788
9558
  for (const key1 in data) {
9789
9559
  if (!(((key1 === "interface") || (key1 === "method")) || (key1 === "protocol"))) {
9790
- const err7 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
9560
+ const err7 = { 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" };
9791
9561
  if (vErrors === null) {
9792
9562
  vErrors = [err7];
9793
9563
  }
@@ -9801,8 +9571,8 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9801
9571
  if (_errs12 === errors) {
9802
9572
  if (data.interface !== undefined) {
9803
9573
  const _errs13 = errors;
9804
- if ("Messages" !== data.interface) {
9805
- const err8 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
9574
+ if ("Protocols" !== data.interface) {
9575
+ const err8 = { 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" };
9806
9576
  if (vErrors === null) {
9807
9577
  vErrors = [err8];
9808
9578
  }
@@ -9819,8 +9589,8 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9819
9589
  if (valid4) {
9820
9590
  if (data.method !== undefined) {
9821
9591
  const _errs14 = errors;
9822
- if ("Subscribe" !== data.method) {
9823
- const err9 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/method/const", keyword: "const", params: { allowedValue: "Subscribe" }, message: "must be equal to constant" };
9592
+ if ("Configure" !== data.method) {
9593
+ const err9 = { 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" };
9824
9594
  if (vErrors === null) {
9825
9595
  vErrors = [err9];
9826
9596
  }
@@ -9838,7 +9608,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9838
9608
  if (data.protocol !== undefined) {
9839
9609
  const _errs15 = errors;
9840
9610
  if (typeof data.protocol !== "string") {
9841
- const err10 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9611
+ const err10 = { 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" };
9842
9612
  if (vErrors === null) {
9843
9613
  vErrors = [err10];
9844
9614
  }
@@ -9858,7 +9628,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
9858
9628
  }
9859
9629
  }
9860
9630
  else {
9861
- const err11 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-subscribe-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9631
+ const err11 = { 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" };
9862
9632
  if (vErrors === null) {
9863
9633
  vErrors = [err11];
9864
9634
  }
@@ -9885,7 +9655,7 @@ else {
9885
9655
  if (data && typeof data == "object" && !Array.isArray(data)) {
9886
9656
  let missing2;
9887
9657
  if (((data.interface === undefined) && (missing2 = "interface")) || ((data.method === undefined) && (missing2 = "method"))) {
9888
- const err12 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
9658
+ const err12 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
9889
9659
  if (vErrors === null) {
9890
9660
  vErrors = [err12];
9891
9661
  }
@@ -9898,7 +9668,7 @@ else {
9898
9668
  const _errs20 = errors;
9899
9669
  for (const key2 in data) {
9900
9670
  if (!(((key2 === "interface") || (key2 === "method")) || (key2 === "protocol"))) {
9901
- const err13 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
9671
+ const err13 = { 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" };
9902
9672
  if (vErrors === null) {
9903
9673
  vErrors = [err13];
9904
9674
  }
@@ -9912,8 +9682,8 @@ else {
9912
9682
  if (_errs20 === errors) {
9913
9683
  if (data.interface !== undefined) {
9914
9684
  const _errs21 = errors;
9915
- if ("Messages" !== data.interface) {
9916
- const err14 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Messages" }, message: "must be equal to constant" };
9685
+ if ("Protocols" !== data.interface) {
9686
+ const err14 = { 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" };
9917
9687
  if (vErrors === null) {
9918
9688
  vErrors = [err14];
9919
9689
  }
@@ -9930,8 +9700,8 @@ else {
9930
9700
  if (valid6) {
9931
9701
  if (data.method !== undefined) {
9932
9702
  const _errs22 = errors;
9933
- if ("Sync" !== data.method) {
9934
- const err15 = { instancePath: instancePath + "/method", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/method/const", keyword: "const", params: { allowedValue: "Sync" }, message: "must be equal to constant" };
9703
+ if ("Query" !== data.method) {
9704
+ const err15 = { 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" };
9935
9705
  if (vErrors === null) {
9936
9706
  vErrors = [err15];
9937
9707
  }
@@ -9949,7 +9719,7 @@ else {
9949
9719
  if (data.protocol !== undefined) {
9950
9720
  const _errs23 = errors;
9951
9721
  if (typeof data.protocol !== "string") {
9952
- const err16 = { instancePath: instancePath + "/protocol", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" };
9722
+ const err16 = { 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" };
9953
9723
  if (vErrors === null) {
9954
9724
  vErrors = [err16];
9955
9725
  }
@@ -9969,7 +9739,7 @@ else {
9969
9739
  }
9970
9740
  }
9971
9741
  else {
9972
- const err17 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-sync-scope/type", keyword: "type", params: { type: "object" }, message: "must be object" };
9742
+ const err17 = { 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" };
9973
9743
  if (vErrors === null) {
9974
9744
  vErrors = [err17];
9975
9745
  }
@@ -9997,8 +9767,8 @@ else {
9997
9767
  if (errors === _errs26) {
9998
9768
  if (data && typeof data == "object" && !Array.isArray(data)) {
9999
9769
  let missing3;
10000
- if (((data.interface === undefined) && (missing3 = "interface")) || ((data.method === undefined) && (missing3 = "method"))) {
10001
- const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
9770
+ if ((((data.interface === undefined) && (missing3 = "interface")) || ((data.method === undefined) && (missing3 = "method"))) || ((data.protocol === undefined) && (missing3 = "protocol"))) {
9771
+ const err18 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
10002
9772
  if (vErrors === null) {
10003
9773
  vErrors = [err18];
10004
9774
  }
@@ -10010,8 +9780,8 @@ else {
10010
9780
  else {
10011
9781
  const _errs28 = errors;
10012
9782
  for (const key3 in data) {
10013
- if (!(((key3 === "interface") || (key3 === "method")) || (key3 === "protocol"))) {
10014
- const err19 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
9783
+ if (!(((((key3 === "interface") || (key3 === "method")) || (key3 === "protocol")) || (key3 === "contextId")) || (key3 === "protocolPath"))) {
9784
+ const err19 = { 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" };
10015
9785
  if (vErrors === null) {
10016
9786
  vErrors = [err19];
10017
9787
  }
@@ -10025,8 +9795,8 @@ else {
10025
9795
  if (_errs28 === errors) {
10026
9796
  if (data.interface !== undefined) {
10027
9797
  const _errs29 = errors;
10028
- if ("Protocols" !== data.interface) {
10029
- const err20 = { 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" };
9798
+ if ("Records" !== data.interface) {
9799
+ const err20 = { 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" };
10030
9800
  if (vErrors === null) {
10031
9801
  vErrors = [err20];
10032
9802
  }
@@ -10043,8 +9813,8 @@ else {
10043
9813
  if (valid8) {
10044
9814
  if (data.method !== undefined) {
10045
9815
  const _errs30 = errors;
10046
- if ("Configure" !== data.method) {
10047
- const err21 = { 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" };
9816
+ if ("Read" !== data.method) {
9817
+ const err21 = { 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" };
10048
9818
  if (vErrors === null) {
10049
9819
  vErrors = [err21];
10050
9820
  }
@@ -10062,7 +9832,7 @@ else {
10062
9832
  if (data.protocol !== undefined) {
10063
9833
  const _errs31 = errors;
10064
9834
  if (typeof data.protocol !== "string") {
10065
- const err22 = { 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" };
9835
+ const err22 = { 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" };
10066
9836
  if (vErrors === null) {
10067
9837
  vErrors = [err22];
10068
9838
  }
@@ -10076,18 +9846,71 @@ else {
10076
9846
  else {
10077
9847
  var valid8 = true;
10078
9848
  }
9849
+ if (valid8) {
9850
+ if (data.contextId !== undefined) {
9851
+ let data12 = data.contextId;
9852
+ const _errs33 = errors;
9853
+ if (errors === _errs33) {
9854
+ if (typeof data12 === "string") {
9855
+ if (func1(data12) > 600) {
9856
+ const err23 = { 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" };
9857
+ if (vErrors === null) {
9858
+ vErrors = [err23];
9859
+ }
9860
+ else {
9861
+ vErrors.push(err23);
9862
+ }
9863
+ errors++;
9864
+ }
9865
+ }
9866
+ else {
9867
+ const err24 = { 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" };
9868
+ if (vErrors === null) {
9869
+ vErrors = [err24];
9870
+ }
9871
+ else {
9872
+ vErrors.push(err24);
9873
+ }
9874
+ errors++;
9875
+ }
9876
+ }
9877
+ var valid8 = _errs33 === errors;
9878
+ }
9879
+ else {
9880
+ var valid8 = true;
9881
+ }
9882
+ if (valid8) {
9883
+ if (data.protocolPath !== undefined) {
9884
+ const _errs35 = errors;
9885
+ if (typeof data.protocolPath !== "string") {
9886
+ const err25 = { 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" };
9887
+ if (vErrors === null) {
9888
+ vErrors = [err25];
9889
+ }
9890
+ else {
9891
+ vErrors.push(err25);
9892
+ }
9893
+ errors++;
9894
+ }
9895
+ var valid8 = _errs35 === errors;
9896
+ }
9897
+ else {
9898
+ var valid8 = true;
9899
+ }
9900
+ }
9901
+ }
10079
9902
  }
10080
9903
  }
10081
9904
  }
10082
9905
  }
10083
9906
  }
10084
9907
  else {
10085
- const err23 = { 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" };
9908
+ const err26 = { 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" };
10086
9909
  if (vErrors === null) {
10087
- vErrors = [err23];
9910
+ vErrors = [err26];
10088
9911
  }
10089
9912
  else {
10090
- vErrors.push(err23);
9913
+ vErrors.push(err26);
10091
9914
  }
10092
9915
  errors++;
10093
9916
  }
@@ -10105,107 +9928,160 @@ else {
10105
9928
  props0 = true;
10106
9929
  }
10107
9930
  }
10108
- const _errs33 = errors;
10109
- const _errs34 = errors;
10110
- if (errors === _errs34) {
9931
+ const _errs37 = errors;
9932
+ const _errs38 = errors;
9933
+ if (errors === _errs38) {
10111
9934
  if (data && typeof data == "object" && !Array.isArray(data)) {
10112
9935
  let missing4;
10113
- if (((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) {
10114
- const err24 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
9936
+ if ((((data.interface === undefined) && (missing4 = "interface")) || ((data.method === undefined) && (missing4 = "method"))) || ((data.protocol === undefined) && (missing4 = "protocol"))) {
9937
+ const err27 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
10115
9938
  if (vErrors === null) {
10116
- vErrors = [err24];
9939
+ vErrors = [err27];
10117
9940
  }
10118
9941
  else {
10119
- vErrors.push(err24);
9942
+ vErrors.push(err27);
10120
9943
  }
10121
9944
  errors++;
10122
9945
  }
10123
9946
  else {
10124
- const _errs36 = errors;
9947
+ const _errs40 = errors;
10125
9948
  for (const key4 in data) {
10126
- if (!(((key4 === "interface") || (key4 === "method")) || (key4 === "protocol"))) {
10127
- const err25 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
9949
+ if (!(((((key4 === "interface") || (key4 === "method")) || (key4 === "protocol")) || (key4 === "contextId")) || (key4 === "protocolPath"))) {
9950
+ const err28 = { 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" };
10128
9951
  if (vErrors === null) {
10129
- vErrors = [err25];
9952
+ vErrors = [err28];
10130
9953
  }
10131
9954
  else {
10132
- vErrors.push(err25);
9955
+ vErrors.push(err28);
10133
9956
  }
10134
9957
  errors++;
10135
9958
  break;
10136
9959
  }
10137
9960
  }
10138
- if (_errs36 === errors) {
9961
+ if (_errs40 === errors) {
10139
9962
  if (data.interface !== undefined) {
10140
- const _errs37 = errors;
10141
- if ("Protocols" !== data.interface) {
10142
- const err26 = { 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" };
9963
+ const _errs41 = errors;
9964
+ if ("Records" !== data.interface) {
9965
+ const err29 = { 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" };
10143
9966
  if (vErrors === null) {
10144
- vErrors = [err26];
9967
+ vErrors = [err29];
10145
9968
  }
10146
9969
  else {
10147
- vErrors.push(err26);
9970
+ vErrors.push(err29);
10148
9971
  }
10149
9972
  errors++;
10150
9973
  }
10151
- var valid10 = _errs37 === errors;
9974
+ var valid10 = _errs41 === errors;
10152
9975
  }
10153
9976
  else {
10154
9977
  var valid10 = true;
10155
9978
  }
10156
9979
  if (valid10) {
10157
9980
  if (data.method !== undefined) {
10158
- const _errs38 = errors;
10159
- if ("Query" !== data.method) {
10160
- const err27 = { 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" };
9981
+ const _errs42 = errors;
9982
+ if ("Delete" !== data.method) {
9983
+ const err30 = { 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" };
10161
9984
  if (vErrors === null) {
10162
- vErrors = [err27];
9985
+ vErrors = [err30];
10163
9986
  }
10164
9987
  else {
10165
- vErrors.push(err27);
9988
+ vErrors.push(err30);
10166
9989
  }
10167
9990
  errors++;
10168
9991
  }
10169
- var valid10 = _errs38 === errors;
9992
+ var valid10 = _errs42 === errors;
10170
9993
  }
10171
9994
  else {
10172
9995
  var valid10 = true;
10173
9996
  }
10174
9997
  if (valid10) {
10175
9998
  if (data.protocol !== undefined) {
10176
- const _errs39 = errors;
9999
+ const _errs43 = errors;
10177
10000
  if (typeof data.protocol !== "string") {
10178
- const err28 = { 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" };
10001
+ const err31 = { 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" };
10179
10002
  if (vErrors === null) {
10180
- vErrors = [err28];
10003
+ vErrors = [err31];
10181
10004
  }
10182
10005
  else {
10183
- vErrors.push(err28);
10006
+ vErrors.push(err31);
10184
10007
  }
10185
10008
  errors++;
10186
10009
  }
10187
- var valid10 = _errs39 === errors;
10010
+ var valid10 = _errs43 === errors;
10188
10011
  }
10189
10012
  else {
10190
10013
  var valid10 = true;
10191
10014
  }
10015
+ if (valid10) {
10016
+ if (data.contextId !== undefined) {
10017
+ let data17 = data.contextId;
10018
+ const _errs45 = errors;
10019
+ if (errors === _errs45) {
10020
+ if (typeof data17 === "string") {
10021
+ if (func1(data17) > 600) {
10022
+ const err32 = { 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" };
10023
+ if (vErrors === null) {
10024
+ vErrors = [err32];
10025
+ }
10026
+ else {
10027
+ vErrors.push(err32);
10028
+ }
10029
+ errors++;
10030
+ }
10031
+ }
10032
+ else {
10033
+ const err33 = { 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" };
10034
+ if (vErrors === null) {
10035
+ vErrors = [err33];
10036
+ }
10037
+ else {
10038
+ vErrors.push(err33);
10039
+ }
10040
+ errors++;
10041
+ }
10042
+ }
10043
+ var valid10 = _errs45 === errors;
10044
+ }
10045
+ else {
10046
+ var valid10 = true;
10047
+ }
10048
+ if (valid10) {
10049
+ if (data.protocolPath !== undefined) {
10050
+ const _errs47 = errors;
10051
+ if (typeof data.protocolPath !== "string") {
10052
+ const err34 = { 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" };
10053
+ if (vErrors === null) {
10054
+ vErrors = [err34];
10055
+ }
10056
+ else {
10057
+ vErrors.push(err34);
10058
+ }
10059
+ errors++;
10060
+ }
10061
+ var valid10 = _errs47 === errors;
10062
+ }
10063
+ else {
10064
+ var valid10 = true;
10065
+ }
10066
+ }
10067
+ }
10192
10068
  }
10193
10069
  }
10194
10070
  }
10195
10071
  }
10196
10072
  }
10197
10073
  else {
10198
- const err29 = { 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" };
10074
+ const err35 = { 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" };
10199
10075
  if (vErrors === null) {
10200
- vErrors = [err29];
10076
+ vErrors = [err35];
10201
10077
  }
10202
10078
  else {
10203
- vErrors.push(err29);
10079
+ vErrors.push(err35);
10204
10080
  }
10205
10081
  errors++;
10206
10082
  }
10207
10083
  }
10208
- var _valid0 = _errs33 === errors;
10084
+ var _valid0 = _errs37 === errors;
10209
10085
  if (_valid0 && valid0) {
10210
10086
  valid0 = false;
10211
10087
  passing0 = [passing0, 4];
@@ -10218,137 +10094,137 @@ else {
10218
10094
  props0 = true;
10219
10095
  }
10220
10096
  }
10221
- const _errs41 = errors;
10222
- const _errs42 = errors;
10223
- if (errors === _errs42) {
10097
+ const _errs49 = errors;
10098
+ const _errs50 = errors;
10099
+ if (errors === _errs50) {
10224
10100
  if (data && typeof data == "object" && !Array.isArray(data)) {
10225
10101
  let missing5;
10226
10102
  if ((((data.interface === undefined) && (missing5 = "interface")) || ((data.method === undefined) && (missing5 = "method"))) || ((data.protocol === undefined) && (missing5 = "protocol"))) {
10227
- const err30 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
10103
+ const err36 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
10228
10104
  if (vErrors === null) {
10229
- vErrors = [err30];
10105
+ vErrors = [err36];
10230
10106
  }
10231
10107
  else {
10232
- vErrors.push(err30);
10108
+ vErrors.push(err36);
10233
10109
  }
10234
10110
  errors++;
10235
10111
  }
10236
10112
  else {
10237
- const _errs44 = errors;
10113
+ const _errs52 = errors;
10238
10114
  for (const key5 in data) {
10239
10115
  if (!(((((key5 === "interface") || (key5 === "method")) || (key5 === "protocol")) || (key5 === "contextId")) || (key5 === "protocolPath"))) {
10240
- const err31 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
10116
+ const err37 = { 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" };
10241
10117
  if (vErrors === null) {
10242
- vErrors = [err31];
10118
+ vErrors = [err37];
10243
10119
  }
10244
10120
  else {
10245
- vErrors.push(err31);
10121
+ vErrors.push(err37);
10246
10122
  }
10247
10123
  errors++;
10248
10124
  break;
10249
10125
  }
10250
10126
  }
10251
- if (_errs44 === errors) {
10127
+ if (_errs52 === errors) {
10252
10128
  if (data.interface !== undefined) {
10253
- const _errs45 = errors;
10129
+ const _errs53 = errors;
10254
10130
  if ("Records" !== data.interface) {
10255
- const err32 = { 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" };
10131
+ const err38 = { 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" };
10256
10132
  if (vErrors === null) {
10257
- vErrors = [err32];
10133
+ vErrors = [err38];
10258
10134
  }
10259
10135
  else {
10260
- vErrors.push(err32);
10136
+ vErrors.push(err38);
10261
10137
  }
10262
10138
  errors++;
10263
10139
  }
10264
- var valid12 = _errs45 === errors;
10140
+ var valid12 = _errs53 === errors;
10265
10141
  }
10266
10142
  else {
10267
10143
  var valid12 = true;
10268
10144
  }
10269
10145
  if (valid12) {
10270
10146
  if (data.method !== undefined) {
10271
- const _errs46 = errors;
10272
- if ("Read" !== data.method) {
10273
- const err33 = { 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" };
10147
+ const _errs54 = errors;
10148
+ if ("Write" !== data.method) {
10149
+ const err39 = { 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" };
10274
10150
  if (vErrors === null) {
10275
- vErrors = [err33];
10151
+ vErrors = [err39];
10276
10152
  }
10277
10153
  else {
10278
- vErrors.push(err33);
10154
+ vErrors.push(err39);
10279
10155
  }
10280
10156
  errors++;
10281
10157
  }
10282
- var valid12 = _errs46 === errors;
10158
+ var valid12 = _errs54 === errors;
10283
10159
  }
10284
10160
  else {
10285
10161
  var valid12 = true;
10286
10162
  }
10287
10163
  if (valid12) {
10288
10164
  if (data.protocol !== undefined) {
10289
- const _errs47 = errors;
10165
+ const _errs55 = errors;
10290
10166
  if (typeof data.protocol !== "string") {
10291
- const err34 = { 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" };
10167
+ const err40 = { 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" };
10292
10168
  if (vErrors === null) {
10293
- vErrors = [err34];
10169
+ vErrors = [err40];
10294
10170
  }
10295
10171
  else {
10296
- vErrors.push(err34);
10172
+ vErrors.push(err40);
10297
10173
  }
10298
10174
  errors++;
10299
10175
  }
10300
- var valid12 = _errs47 === errors;
10176
+ var valid12 = _errs55 === errors;
10301
10177
  }
10302
10178
  else {
10303
10179
  var valid12 = true;
10304
10180
  }
10305
10181
  if (valid12) {
10306
10182
  if (data.contextId !== undefined) {
10307
- let data18 = data.contextId;
10308
- const _errs49 = errors;
10309
- if (errors === _errs49) {
10310
- if (typeof data18 === "string") {
10311
- if (func1(data18) > 600) {
10312
- const err35 = { 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" };
10183
+ let data22 = data.contextId;
10184
+ const _errs57 = errors;
10185
+ if (errors === _errs57) {
10186
+ if (typeof data22 === "string") {
10187
+ if (func1(data22) > 600) {
10188
+ const err41 = { 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" };
10313
10189
  if (vErrors === null) {
10314
- vErrors = [err35];
10190
+ vErrors = [err41];
10315
10191
  }
10316
10192
  else {
10317
- vErrors.push(err35);
10193
+ vErrors.push(err41);
10318
10194
  }
10319
10195
  errors++;
10320
10196
  }
10321
10197
  }
10322
10198
  else {
10323
- const err36 = { 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" };
10199
+ const err42 = { 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" };
10324
10200
  if (vErrors === null) {
10325
- vErrors = [err36];
10201
+ vErrors = [err42];
10326
10202
  }
10327
10203
  else {
10328
- vErrors.push(err36);
10204
+ vErrors.push(err42);
10329
10205
  }
10330
10206
  errors++;
10331
10207
  }
10332
10208
  }
10333
- var valid12 = _errs49 === errors;
10209
+ var valid12 = _errs57 === errors;
10334
10210
  }
10335
10211
  else {
10336
10212
  var valid12 = true;
10337
10213
  }
10338
10214
  if (valid12) {
10339
10215
  if (data.protocolPath !== undefined) {
10340
- const _errs51 = errors;
10216
+ const _errs59 = errors;
10341
10217
  if (typeof data.protocolPath !== "string") {
10342
- 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" };
10218
+ const err43 = { 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" };
10343
10219
  if (vErrors === null) {
10344
- vErrors = [err37];
10220
+ vErrors = [err43];
10345
10221
  }
10346
10222
  else {
10347
- vErrors.push(err37);
10223
+ vErrors.push(err43);
10348
10224
  }
10349
10225
  errors++;
10350
10226
  }
10351
- var valid12 = _errs51 === errors;
10227
+ var valid12 = _errs59 === errors;
10352
10228
  }
10353
10229
  else {
10354
10230
  var valid12 = true;
@@ -10361,17 +10237,17 @@ else {
10361
10237
  }
10362
10238
  }
10363
10239
  else {
10364
- 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" };
10240
+ const err44 = { 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" };
10365
10241
  if (vErrors === null) {
10366
- vErrors = [err38];
10242
+ vErrors = [err44];
10367
10243
  }
10368
10244
  else {
10369
- vErrors.push(err38);
10245
+ vErrors.push(err44);
10370
10246
  }
10371
10247
  errors++;
10372
10248
  }
10373
10249
  }
10374
- var _valid0 = _errs41 === errors;
10250
+ var _valid0 = _errs49 === errors;
10375
10251
  if (_valid0 && valid0) {
10376
10252
  valid0 = false;
10377
10253
  passing0 = [passing0, 5];
@@ -10384,137 +10260,137 @@ else {
10384
10260
  props0 = true;
10385
10261
  }
10386
10262
  }
10387
- const _errs53 = errors;
10388
- const _errs54 = errors;
10389
- if (errors === _errs54) {
10263
+ const _errs61 = errors;
10264
+ const _errs62 = errors;
10265
+ if (errors === _errs62) {
10390
10266
  if (data && typeof data == "object" && !Array.isArray(data)) {
10391
10267
  let missing6;
10392
10268
  if ((((data.interface === undefined) && (missing6 = "interface")) || ((data.method === undefined) && (missing6 = "method"))) || ((data.protocol === undefined) && (missing6 = "protocol"))) {
10393
- const err39 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
10269
+ const err45 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
10394
10270
  if (vErrors === null) {
10395
- vErrors = [err39];
10271
+ vErrors = [err45];
10396
10272
  }
10397
10273
  else {
10398
- vErrors.push(err39);
10274
+ vErrors.push(err45);
10399
10275
  }
10400
10276
  errors++;
10401
10277
  }
10402
10278
  else {
10403
- const _errs56 = errors;
10279
+ const _errs64 = errors;
10404
10280
  for (const key6 in data) {
10405
10281
  if (!(((((key6 === "interface") || (key6 === "method")) || (key6 === "protocol")) || (key6 === "contextId")) || (key6 === "protocolPath"))) {
10406
- const err40 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
10282
+ const err46 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
10407
10283
  if (vErrors === null) {
10408
- vErrors = [err40];
10284
+ vErrors = [err46];
10409
10285
  }
10410
10286
  else {
10411
- vErrors.push(err40);
10287
+ vErrors.push(err46);
10412
10288
  }
10413
10289
  errors++;
10414
10290
  break;
10415
10291
  }
10416
10292
  }
10417
- if (_errs56 === errors) {
10293
+ if (_errs64 === errors) {
10418
10294
  if (data.interface !== undefined) {
10419
- const _errs57 = errors;
10295
+ const _errs65 = errors;
10420
10296
  if ("Records" !== data.interface) {
10421
- 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" };
10297
+ const err47 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
10422
10298
  if (vErrors === null) {
10423
- vErrors = [err41];
10299
+ vErrors = [err47];
10424
10300
  }
10425
10301
  else {
10426
- vErrors.push(err41);
10302
+ vErrors.push(err47);
10427
10303
  }
10428
10304
  errors++;
10429
10305
  }
10430
- var valid14 = _errs57 === errors;
10306
+ var valid14 = _errs65 === errors;
10431
10307
  }
10432
10308
  else {
10433
10309
  var valid14 = true;
10434
10310
  }
10435
10311
  if (valid14) {
10436
10312
  if (data.method !== undefined) {
10437
- const _errs58 = errors;
10438
- if ("Delete" !== data.method) {
10439
- 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" };
10313
+ const _errs66 = errors;
10314
+ if ("Query" !== data.method) {
10315
+ const err48 = { 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" };
10440
10316
  if (vErrors === null) {
10441
- vErrors = [err42];
10317
+ vErrors = [err48];
10442
10318
  }
10443
10319
  else {
10444
- vErrors.push(err42);
10320
+ vErrors.push(err48);
10445
10321
  }
10446
10322
  errors++;
10447
10323
  }
10448
- var valid14 = _errs58 === errors;
10324
+ var valid14 = _errs66 === errors;
10449
10325
  }
10450
10326
  else {
10451
10327
  var valid14 = true;
10452
10328
  }
10453
10329
  if (valid14) {
10454
10330
  if (data.protocol !== undefined) {
10455
- const _errs59 = errors;
10331
+ const _errs67 = errors;
10456
10332
  if (typeof data.protocol !== "string") {
10457
- 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" };
10333
+ const err49 = { 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" };
10458
10334
  if (vErrors === null) {
10459
- vErrors = [err43];
10335
+ vErrors = [err49];
10460
10336
  }
10461
10337
  else {
10462
- vErrors.push(err43);
10338
+ vErrors.push(err49);
10463
10339
  }
10464
10340
  errors++;
10465
10341
  }
10466
- var valid14 = _errs59 === errors;
10342
+ var valid14 = _errs67 === errors;
10467
10343
  }
10468
10344
  else {
10469
10345
  var valid14 = true;
10470
10346
  }
10471
10347
  if (valid14) {
10472
10348
  if (data.contextId !== undefined) {
10473
- let data23 = data.contextId;
10474
- const _errs61 = errors;
10475
- if (errors === _errs61) {
10476
- if (typeof data23 === "string") {
10477
- if (func1(data23) > 600) {
10478
- 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" };
10349
+ let data27 = data.contextId;
10350
+ const _errs69 = errors;
10351
+ if (errors === _errs69) {
10352
+ if (typeof data27 === "string") {
10353
+ if (func1(data27) > 600) {
10354
+ const err50 = { 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" };
10479
10355
  if (vErrors === null) {
10480
- vErrors = [err44];
10356
+ vErrors = [err50];
10481
10357
  }
10482
10358
  else {
10483
- vErrors.push(err44);
10359
+ vErrors.push(err50);
10484
10360
  }
10485
10361
  errors++;
10486
10362
  }
10487
10363
  }
10488
10364
  else {
10489
- 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" };
10365
+ const err51 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
10490
10366
  if (vErrors === null) {
10491
- vErrors = [err45];
10367
+ vErrors = [err51];
10492
10368
  }
10493
10369
  else {
10494
- vErrors.push(err45);
10370
+ vErrors.push(err51);
10495
10371
  }
10496
10372
  errors++;
10497
10373
  }
10498
10374
  }
10499
- var valid14 = _errs61 === errors;
10375
+ var valid14 = _errs69 === errors;
10500
10376
  }
10501
10377
  else {
10502
10378
  var valid14 = true;
10503
10379
  }
10504
10380
  if (valid14) {
10505
10381
  if (data.protocolPath !== undefined) {
10506
- const _errs63 = errors;
10382
+ const _errs71 = errors;
10507
10383
  if (typeof data.protocolPath !== "string") {
10508
- const err46 = { 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" };
10384
+ const err52 = { 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" };
10509
10385
  if (vErrors === null) {
10510
- vErrors = [err46];
10386
+ vErrors = [err52];
10511
10387
  }
10512
10388
  else {
10513
- vErrors.push(err46);
10389
+ vErrors.push(err52);
10514
10390
  }
10515
10391
  errors++;
10516
10392
  }
10517
- var valid14 = _errs63 === errors;
10393
+ var valid14 = _errs71 === errors;
10518
10394
  }
10519
10395
  else {
10520
10396
  var valid14 = true;
@@ -10527,17 +10403,17 @@ else {
10527
10403
  }
10528
10404
  }
10529
10405
  else {
10530
- const err47 = { 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" };
10406
+ const err53 = { 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" };
10531
10407
  if (vErrors === null) {
10532
- vErrors = [err47];
10408
+ vErrors = [err53];
10533
10409
  }
10534
10410
  else {
10535
- vErrors.push(err47);
10411
+ vErrors.push(err53);
10536
10412
  }
10537
10413
  errors++;
10538
10414
  }
10539
10415
  }
10540
- var _valid0 = _errs53 === errors;
10416
+ var _valid0 = _errs61 === errors;
10541
10417
  if (_valid0 && valid0) {
10542
10418
  valid0 = false;
10543
10419
  passing0 = [passing0, 6];
@@ -10550,137 +10426,137 @@ else {
10550
10426
  props0 = true;
10551
10427
  }
10552
10428
  }
10553
- const _errs65 = errors;
10554
- const _errs66 = errors;
10555
- if (errors === _errs66) {
10429
+ const _errs73 = errors;
10430
+ const _errs74 = errors;
10431
+ if (errors === _errs74) {
10556
10432
  if (data && typeof data == "object" && !Array.isArray(data)) {
10557
10433
  let missing7;
10558
10434
  if ((((data.interface === undefined) && (missing7 = "interface")) || ((data.method === undefined) && (missing7 = "method"))) || ((data.protocol === undefined) && (missing7 = "protocol"))) {
10559
- const err48 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
10435
+ const err54 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
10560
10436
  if (vErrors === null) {
10561
- vErrors = [err48];
10437
+ vErrors = [err54];
10562
10438
  }
10563
10439
  else {
10564
- vErrors.push(err48);
10440
+ vErrors.push(err54);
10565
10441
  }
10566
10442
  errors++;
10567
10443
  }
10568
10444
  else {
10569
- const _errs68 = errors;
10445
+ const _errs76 = errors;
10570
10446
  for (const key7 in data) {
10571
10447
  if (!(((((key7 === "interface") || (key7 === "method")) || (key7 === "protocol")) || (key7 === "contextId")) || (key7 === "protocolPath"))) {
10572
- const err49 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
10448
+ const err55 = { 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" };
10573
10449
  if (vErrors === null) {
10574
- vErrors = [err49];
10450
+ vErrors = [err55];
10575
10451
  }
10576
10452
  else {
10577
- vErrors.push(err49);
10453
+ vErrors.push(err55);
10578
10454
  }
10579
10455
  errors++;
10580
10456
  break;
10581
10457
  }
10582
10458
  }
10583
- if (_errs68 === errors) {
10459
+ if (_errs76 === errors) {
10584
10460
  if (data.interface !== undefined) {
10585
- const _errs69 = errors;
10461
+ const _errs77 = errors;
10586
10462
  if ("Records" !== data.interface) {
10587
- const err50 = { 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" };
10463
+ const err56 = { 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" };
10588
10464
  if (vErrors === null) {
10589
- vErrors = [err50];
10465
+ vErrors = [err56];
10590
10466
  }
10591
10467
  else {
10592
- vErrors.push(err50);
10468
+ vErrors.push(err56);
10593
10469
  }
10594
10470
  errors++;
10595
10471
  }
10596
- var valid16 = _errs69 === errors;
10472
+ var valid16 = _errs77 === errors;
10597
10473
  }
10598
10474
  else {
10599
10475
  var valid16 = true;
10600
10476
  }
10601
10477
  if (valid16) {
10602
10478
  if (data.method !== undefined) {
10603
- const _errs70 = errors;
10604
- if ("Write" !== data.method) {
10605
- const err51 = { 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" };
10479
+ const _errs78 = errors;
10480
+ if ("Subscribe" !== data.method) {
10481
+ const err57 = { 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" };
10606
10482
  if (vErrors === null) {
10607
- vErrors = [err51];
10483
+ vErrors = [err57];
10608
10484
  }
10609
10485
  else {
10610
- vErrors.push(err51);
10486
+ vErrors.push(err57);
10611
10487
  }
10612
10488
  errors++;
10613
10489
  }
10614
- var valid16 = _errs70 === errors;
10490
+ var valid16 = _errs78 === errors;
10615
10491
  }
10616
10492
  else {
10617
10493
  var valid16 = true;
10618
10494
  }
10619
10495
  if (valid16) {
10620
10496
  if (data.protocol !== undefined) {
10621
- const _errs71 = errors;
10497
+ const _errs79 = errors;
10622
10498
  if (typeof data.protocol !== "string") {
10623
- const err52 = { 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" };
10499
+ const err58 = { 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" };
10624
10500
  if (vErrors === null) {
10625
- vErrors = [err52];
10501
+ vErrors = [err58];
10626
10502
  }
10627
10503
  else {
10628
- vErrors.push(err52);
10504
+ vErrors.push(err58);
10629
10505
  }
10630
10506
  errors++;
10631
10507
  }
10632
- var valid16 = _errs71 === errors;
10508
+ var valid16 = _errs79 === errors;
10633
10509
  }
10634
10510
  else {
10635
10511
  var valid16 = true;
10636
10512
  }
10637
10513
  if (valid16) {
10638
10514
  if (data.contextId !== undefined) {
10639
- let data28 = data.contextId;
10640
- const _errs73 = errors;
10641
- if (errors === _errs73) {
10642
- if (typeof data28 === "string") {
10643
- if (func1(data28) > 600) {
10644
- const err53 = { 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" };
10515
+ let data32 = data.contextId;
10516
+ const _errs81 = errors;
10517
+ if (errors === _errs81) {
10518
+ if (typeof data32 === "string") {
10519
+ if (func1(data32) > 600) {
10520
+ const err59 = { 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" };
10645
10521
  if (vErrors === null) {
10646
- vErrors = [err53];
10522
+ vErrors = [err59];
10647
10523
  }
10648
10524
  else {
10649
- vErrors.push(err53);
10525
+ vErrors.push(err59);
10650
10526
  }
10651
10527
  errors++;
10652
10528
  }
10653
10529
  }
10654
10530
  else {
10655
- const err54 = { 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" };
10531
+ const err60 = { 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" };
10656
10532
  if (vErrors === null) {
10657
- vErrors = [err54];
10533
+ vErrors = [err60];
10658
10534
  }
10659
10535
  else {
10660
- vErrors.push(err54);
10536
+ vErrors.push(err60);
10661
10537
  }
10662
10538
  errors++;
10663
10539
  }
10664
10540
  }
10665
- var valid16 = _errs73 === errors;
10541
+ var valid16 = _errs81 === errors;
10666
10542
  }
10667
10543
  else {
10668
10544
  var valid16 = true;
10669
10545
  }
10670
10546
  if (valid16) {
10671
10547
  if (data.protocolPath !== undefined) {
10672
- const _errs75 = errors;
10548
+ const _errs83 = errors;
10673
10549
  if (typeof data.protocolPath !== "string") {
10674
- const err55 = { 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" };
10550
+ const err61 = { 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" };
10675
10551
  if (vErrors === null) {
10676
- vErrors = [err55];
10552
+ vErrors = [err61];
10677
10553
  }
10678
10554
  else {
10679
- vErrors.push(err55);
10555
+ vErrors.push(err61);
10680
10556
  }
10681
10557
  errors++;
10682
10558
  }
10683
- var valid16 = _errs75 === errors;
10559
+ var valid16 = _errs83 === errors;
10684
10560
  }
10685
10561
  else {
10686
10562
  var valid16 = true;
@@ -10693,17 +10569,17 @@ else {
10693
10569
  }
10694
10570
  }
10695
10571
  else {
10696
- const err56 = { 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" };
10572
+ const err62 = { 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" };
10697
10573
  if (vErrors === null) {
10698
- vErrors = [err56];
10574
+ vErrors = [err62];
10699
10575
  }
10700
10576
  else {
10701
- vErrors.push(err56);
10577
+ vErrors.push(err62);
10702
10578
  }
10703
10579
  errors++;
10704
10580
  }
10705
10581
  }
10706
- var _valid0 = _errs65 === errors;
10582
+ var _valid0 = _errs73 === errors;
10707
10583
  if (_valid0 && valid0) {
10708
10584
  valid0 = false;
10709
10585
  passing0 = [passing0, 7];
@@ -10716,137 +10592,137 @@ else {
10716
10592
  props0 = true;
10717
10593
  }
10718
10594
  }
10719
- const _errs77 = errors;
10720
- const _errs78 = errors;
10721
- if (errors === _errs78) {
10595
+ const _errs85 = errors;
10596
+ const _errs86 = errors;
10597
+ if (errors === _errs86) {
10722
10598
  if (data && typeof data == "object" && !Array.isArray(data)) {
10723
10599
  let missing8;
10724
10600
  if ((((data.interface === undefined) && (missing8 = "interface")) || ((data.method === undefined) && (missing8 = "method"))) || ((data.protocol === undefined) && (missing8 = "protocol"))) {
10725
- const err57 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
10601
+ const err63 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" };
10726
10602
  if (vErrors === null) {
10727
- vErrors = [err57];
10603
+ vErrors = [err63];
10728
10604
  }
10729
10605
  else {
10730
- vErrors.push(err57);
10606
+ vErrors.push(err63);
10731
10607
  }
10732
10608
  errors++;
10733
10609
  }
10734
10610
  else {
10735
- const _errs80 = errors;
10611
+ const _errs88 = errors;
10736
10612
  for (const key8 in data) {
10737
10613
  if (!(((((key8 === "interface") || (key8 === "method")) || (key8 === "protocol")) || (key8 === "contextId")) || (key8 === "protocolPath"))) {
10738
- const err58 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
10614
+ const err64 = { 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" };
10739
10615
  if (vErrors === null) {
10740
- vErrors = [err58];
10616
+ vErrors = [err64];
10741
10617
  }
10742
10618
  else {
10743
- vErrors.push(err58);
10619
+ vErrors.push(err64);
10744
10620
  }
10745
10621
  errors++;
10746
10622
  break;
10747
10623
  }
10748
10624
  }
10749
- if (_errs80 === errors) {
10625
+ if (_errs88 === errors) {
10750
10626
  if (data.interface !== undefined) {
10751
- const _errs81 = errors;
10627
+ const _errs89 = errors;
10752
10628
  if ("Records" !== data.interface) {
10753
- const err59 = { instancePath: instancePath + "/interface", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/interface/const", keyword: "const", params: { allowedValue: "Records" }, message: "must be equal to constant" };
10629
+ const err65 = { 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" };
10754
10630
  if (vErrors === null) {
10755
- vErrors = [err59];
10631
+ vErrors = [err65];
10756
10632
  }
10757
10633
  else {
10758
- vErrors.push(err59);
10634
+ vErrors.push(err65);
10759
10635
  }
10760
10636
  errors++;
10761
10637
  }
10762
- var valid18 = _errs81 === errors;
10638
+ var valid18 = _errs89 === errors;
10763
10639
  }
10764
10640
  else {
10765
10641
  var valid18 = true;
10766
10642
  }
10767
10643
  if (valid18) {
10768
10644
  if (data.method !== undefined) {
10769
- const _errs82 = errors;
10770
- if ("Query" !== data.method) {
10771
- const err60 = { 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" };
10645
+ const _errs90 = errors;
10646
+ if ("Count" !== data.method) {
10647
+ const err66 = { 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" };
10772
10648
  if (vErrors === null) {
10773
- vErrors = [err60];
10649
+ vErrors = [err66];
10774
10650
  }
10775
10651
  else {
10776
- vErrors.push(err60);
10652
+ vErrors.push(err66);
10777
10653
  }
10778
10654
  errors++;
10779
10655
  }
10780
- var valid18 = _errs82 === errors;
10656
+ var valid18 = _errs90 === errors;
10781
10657
  }
10782
10658
  else {
10783
10659
  var valid18 = true;
10784
10660
  }
10785
10661
  if (valid18) {
10786
10662
  if (data.protocol !== undefined) {
10787
- const _errs83 = errors;
10663
+ const _errs91 = errors;
10788
10664
  if (typeof data.protocol !== "string") {
10789
- const err61 = { 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" };
10665
+ const err67 = { 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" };
10790
10666
  if (vErrors === null) {
10791
- vErrors = [err61];
10667
+ vErrors = [err67];
10792
10668
  }
10793
10669
  else {
10794
- vErrors.push(err61);
10670
+ vErrors.push(err67);
10795
10671
  }
10796
10672
  errors++;
10797
10673
  }
10798
- var valid18 = _errs83 === errors;
10674
+ var valid18 = _errs91 === errors;
10799
10675
  }
10800
10676
  else {
10801
10677
  var valid18 = true;
10802
10678
  }
10803
10679
  if (valid18) {
10804
10680
  if (data.contextId !== undefined) {
10805
- let data33 = data.contextId;
10806
- const _errs85 = errors;
10807
- if (errors === _errs85) {
10808
- if (typeof data33 === "string") {
10809
- if (func1(data33) > 600) {
10810
- const err62 = { 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" };
10681
+ let data37 = data.contextId;
10682
+ const _errs93 = errors;
10683
+ if (errors === _errs93) {
10684
+ if (typeof data37 === "string") {
10685
+ if (func1(data37) > 600) {
10686
+ const err68 = { 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" };
10811
10687
  if (vErrors === null) {
10812
- vErrors = [err62];
10688
+ vErrors = [err68];
10813
10689
  }
10814
10690
  else {
10815
- vErrors.push(err62);
10691
+ vErrors.push(err68);
10816
10692
  }
10817
10693
  errors++;
10818
10694
  }
10819
10695
  }
10820
10696
  else {
10821
- const err63 = { instancePath: instancePath + "/contextId", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-query-scope/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
10697
+ const err69 = { 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" };
10822
10698
  if (vErrors === null) {
10823
- vErrors = [err63];
10699
+ vErrors = [err69];
10824
10700
  }
10825
10701
  else {
10826
- vErrors.push(err63);
10702
+ vErrors.push(err69);
10827
10703
  }
10828
10704
  errors++;
10829
10705
  }
10830
10706
  }
10831
- var valid18 = _errs85 === errors;
10707
+ var valid18 = _errs93 === errors;
10832
10708
  }
10833
10709
  else {
10834
10710
  var valid18 = true;
10835
10711
  }
10836
10712
  if (valid18) {
10837
10713
  if (data.protocolPath !== undefined) {
10838
- const _errs87 = errors;
10714
+ const _errs95 = errors;
10839
10715
  if (typeof data.protocolPath !== "string") {
10840
- const err64 = { 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" };
10716
+ const err70 = { 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" };
10841
10717
  if (vErrors === null) {
10842
- vErrors = [err64];
10718
+ vErrors = [err70];
10843
10719
  }
10844
10720
  else {
10845
- vErrors.push(err64);
10721
+ vErrors.push(err70);
10846
10722
  }
10847
10723
  errors++;
10848
10724
  }
10849
- var valid18 = _errs87 === errors;
10725
+ var valid18 = _errs95 === errors;
10850
10726
  }
10851
10727
  else {
10852
10728
  var valid18 = true;
@@ -10859,17 +10735,17 @@ else {
10859
10735
  }
10860
10736
  }
10861
10737
  else {
10862
- const err65 = { 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" };
10738
+ const err71 = { 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" };
10863
10739
  if (vErrors === null) {
10864
- vErrors = [err65];
10740
+ vErrors = [err71];
10865
10741
  }
10866
10742
  else {
10867
- vErrors.push(err65);
10743
+ vErrors.push(err71);
10868
10744
  }
10869
10745
  errors++;
10870
10746
  }
10871
10747
  }
10872
- var _valid0 = _errs77 === errors;
10748
+ var _valid0 = _errs85 === errors;
10873
10749
  if (_valid0 && valid0) {
10874
10750
  valid0 = false;
10875
10751
  passing0 = [passing0, 8];
@@ -10882,340 +10758,6 @@ else {
10882
10758
  props0 = true;
10883
10759
  }
10884
10760
  }
10885
- const _errs89 = errors;
10886
- const _errs90 = errors;
10887
- if (errors === _errs90) {
10888
- if (data && typeof data == "object" && !Array.isArray(data)) {
10889
- let missing9;
10890
- if ((((data.interface === undefined) && (missing9 = "interface")) || ((data.method === undefined) && (missing9 = "method"))) || ((data.protocol === undefined) && (missing9 = "protocol"))) {
10891
- const err66 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" };
10892
- if (vErrors === null) {
10893
- vErrors = [err66];
10894
- }
10895
- else {
10896
- vErrors.push(err66);
10897
- }
10898
- errors++;
10899
- }
10900
- else {
10901
- const _errs92 = errors;
10902
- for (const key9 in data) {
10903
- if (!(((((key9 === "interface") || (key9 === "method")) || (key9 === "protocol")) || (key9 === "contextId")) || (key9 === "protocolPath"))) {
10904
- const err67 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-subscribe-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key9 }, message: "must NOT have additional properties" };
10905
- if (vErrors === null) {
10906
- vErrors = [err67];
10907
- }
10908
- else {
10909
- vErrors.push(err67);
10910
- }
10911
- errors++;
10912
- break;
10913
- }
10914
- }
10915
- if (_errs92 === errors) {
10916
- if (data.interface !== undefined) {
10917
- const _errs93 = errors;
10918
- if ("Records" !== data.interface) {
10919
- const err68 = { 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" };
10920
- if (vErrors === null) {
10921
- vErrors = [err68];
10922
- }
10923
- else {
10924
- vErrors.push(err68);
10925
- }
10926
- errors++;
10927
- }
10928
- var valid20 = _errs93 === errors;
10929
- }
10930
- else {
10931
- var valid20 = true;
10932
- }
10933
- if (valid20) {
10934
- if (data.method !== undefined) {
10935
- const _errs94 = errors;
10936
- if ("Subscribe" !== data.method) {
10937
- const err69 = { 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" };
10938
- if (vErrors === null) {
10939
- vErrors = [err69];
10940
- }
10941
- else {
10942
- vErrors.push(err69);
10943
- }
10944
- errors++;
10945
- }
10946
- var valid20 = _errs94 === errors;
10947
- }
10948
- else {
10949
- var valid20 = true;
10950
- }
10951
- if (valid20) {
10952
- if (data.protocol !== undefined) {
10953
- const _errs95 = errors;
10954
- if (typeof data.protocol !== "string") {
10955
- const err70 = { 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" };
10956
- if (vErrors === null) {
10957
- vErrors = [err70];
10958
- }
10959
- else {
10960
- vErrors.push(err70);
10961
- }
10962
- errors++;
10963
- }
10964
- var valid20 = _errs95 === errors;
10965
- }
10966
- else {
10967
- var valid20 = true;
10968
- }
10969
- if (valid20) {
10970
- if (data.contextId !== undefined) {
10971
- let data38 = data.contextId;
10972
- const _errs97 = errors;
10973
- if (errors === _errs97) {
10974
- if (typeof data38 === "string") {
10975
- if (func1(data38) > 600) {
10976
- const err71 = { 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" };
10977
- if (vErrors === null) {
10978
- vErrors = [err71];
10979
- }
10980
- else {
10981
- vErrors.push(err71);
10982
- }
10983
- errors++;
10984
- }
10985
- }
10986
- else {
10987
- const err72 = { 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" };
10988
- if (vErrors === null) {
10989
- vErrors = [err72];
10990
- }
10991
- else {
10992
- vErrors.push(err72);
10993
- }
10994
- errors++;
10995
- }
10996
- }
10997
- var valid20 = _errs97 === errors;
10998
- }
10999
- else {
11000
- var valid20 = true;
11001
- }
11002
- if (valid20) {
11003
- if (data.protocolPath !== undefined) {
11004
- const _errs99 = errors;
11005
- if (typeof data.protocolPath !== "string") {
11006
- const err73 = { 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" };
11007
- if (vErrors === null) {
11008
- vErrors = [err73];
11009
- }
11010
- else {
11011
- vErrors.push(err73);
11012
- }
11013
- errors++;
11014
- }
11015
- var valid20 = _errs99 === errors;
11016
- }
11017
- else {
11018
- var valid20 = true;
11019
- }
11020
- }
11021
- }
11022
- }
11023
- }
11024
- }
11025
- }
11026
- }
11027
- else {
11028
- const err74 = { 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" };
11029
- if (vErrors === null) {
11030
- vErrors = [err74];
11031
- }
11032
- else {
11033
- vErrors.push(err74);
11034
- }
11035
- errors++;
11036
- }
11037
- }
11038
- var _valid0 = _errs89 === errors;
11039
- if (_valid0 && valid0) {
11040
- valid0 = false;
11041
- passing0 = [passing0, 9];
11042
- }
11043
- else {
11044
- if (_valid0) {
11045
- valid0 = true;
11046
- passing0 = 9;
11047
- if (props0 !== true) {
11048
- props0 = true;
11049
- }
11050
- }
11051
- const _errs101 = errors;
11052
- const _errs102 = errors;
11053
- if (errors === _errs102) {
11054
- if (data && typeof data == "object" && !Array.isArray(data)) {
11055
- let missing10;
11056
- if ((((data.interface === undefined) && (missing10 = "interface")) || ((data.method === undefined) && (missing10 = "method"))) || ((data.protocol === undefined) && (missing10 = "protocol"))) {
11057
- const err75 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/required", keyword: "required", params: { missingProperty: missing10 }, message: "must have required property '" + missing10 + "'" };
11058
- if (vErrors === null) {
11059
- vErrors = [err75];
11060
- }
11061
- else {
11062
- vErrors.push(err75);
11063
- }
11064
- errors++;
11065
- }
11066
- else {
11067
- const _errs104 = errors;
11068
- for (const key10 in data) {
11069
- if (!(((((key10 === "interface") || (key10 === "method")) || (key10 === "protocol")) || (key10 === "contextId")) || (key10 === "protocolPath"))) {
11070
- const err76 = { instancePath, schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-count-scope/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key10 }, message: "must NOT have additional properties" };
11071
- if (vErrors === null) {
11072
- vErrors = [err76];
11073
- }
11074
- else {
11075
- vErrors.push(err76);
11076
- }
11077
- errors++;
11078
- break;
11079
- }
11080
- }
11081
- if (_errs104 === errors) {
11082
- if (data.interface !== undefined) {
11083
- const _errs105 = errors;
11084
- if ("Records" !== data.interface) {
11085
- const err77 = { 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" };
11086
- if (vErrors === null) {
11087
- vErrors = [err77];
11088
- }
11089
- else {
11090
- vErrors.push(err77);
11091
- }
11092
- errors++;
11093
- }
11094
- var valid22 = _errs105 === errors;
11095
- }
11096
- else {
11097
- var valid22 = true;
11098
- }
11099
- if (valid22) {
11100
- if (data.method !== undefined) {
11101
- const _errs106 = errors;
11102
- if ("Count" !== data.method) {
11103
- const err78 = { 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" };
11104
- if (vErrors === null) {
11105
- vErrors = [err78];
11106
- }
11107
- else {
11108
- vErrors.push(err78);
11109
- }
11110
- errors++;
11111
- }
11112
- var valid22 = _errs106 === errors;
11113
- }
11114
- else {
11115
- var valid22 = true;
11116
- }
11117
- if (valid22) {
11118
- if (data.protocol !== undefined) {
11119
- const _errs107 = errors;
11120
- if (typeof data.protocol !== "string") {
11121
- const err79 = { 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" };
11122
- if (vErrors === null) {
11123
- vErrors = [err79];
11124
- }
11125
- else {
11126
- vErrors.push(err79);
11127
- }
11128
- errors++;
11129
- }
11130
- var valid22 = _errs107 === errors;
11131
- }
11132
- else {
11133
- var valid22 = true;
11134
- }
11135
- if (valid22) {
11136
- if (data.contextId !== undefined) {
11137
- let data43 = data.contextId;
11138
- const _errs109 = errors;
11139
- if (errors === _errs109) {
11140
- if (typeof data43 === "string") {
11141
- if (func1(data43) > 600) {
11142
- const err80 = { 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" };
11143
- if (vErrors === null) {
11144
- vErrors = [err80];
11145
- }
11146
- else {
11147
- vErrors.push(err80);
11148
- }
11149
- errors++;
11150
- }
11151
- }
11152
- else {
11153
- const err81 = { 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" };
11154
- if (vErrors === null) {
11155
- vErrors = [err81];
11156
- }
11157
- else {
11158
- vErrors.push(err81);
11159
- }
11160
- errors++;
11161
- }
11162
- }
11163
- var valid22 = _errs109 === errors;
11164
- }
11165
- else {
11166
- var valid22 = true;
11167
- }
11168
- if (valid22) {
11169
- if (data.protocolPath !== undefined) {
11170
- const _errs111 = errors;
11171
- if (typeof data.protocolPath !== "string") {
11172
- const err82 = { 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" };
11173
- if (vErrors === null) {
11174
- vErrors = [err82];
11175
- }
11176
- else {
11177
- vErrors.push(err82);
11178
- }
11179
- errors++;
11180
- }
11181
- var valid22 = _errs111 === errors;
11182
- }
11183
- else {
11184
- var valid22 = true;
11185
- }
11186
- }
11187
- }
11188
- }
11189
- }
11190
- }
11191
- }
11192
- }
11193
- else {
11194
- const err83 = { 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" };
11195
- if (vErrors === null) {
11196
- vErrors = [err83];
11197
- }
11198
- else {
11199
- vErrors.push(err83);
11200
- }
11201
- errors++;
11202
- }
11203
- }
11204
- var _valid0 = _errs101 === errors;
11205
- if (_valid0 && valid0) {
11206
- valid0 = false;
11207
- passing0 = [passing0, 10];
11208
- }
11209
- else {
11210
- if (_valid0) {
11211
- valid0 = true;
11212
- passing0 = 10;
11213
- if (props0 !== true) {
11214
- props0 = true;
11215
- }
11216
- }
11217
- }
11218
- }
11219
10761
  }
11220
10762
  }
11221
10763
  }
@@ -11224,12 +10766,12 @@ else {
11224
10766
  }
11225
10767
  }
11226
10768
  } if (!valid0) {
11227
- const err84 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
10769
+ const err72 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
11228
10770
  if (vErrors === null) {
11229
- vErrors = [err84];
10771
+ vErrors = [err72];
11230
10772
  }
11231
10773
  else {
11232
- vErrors.push(err84);
10774
+ vErrors.push(err72);
11233
10775
  }
11234
10776
  errors++;
11235
10777
  validate73.errors = vErrors;
@@ -11326,7 +10868,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
11326
10868
  return false;
11327
10869
  }
11328
10870
  if (!((data4 === "Required") || (data4 === "Prohibited"))) {
11329
- validate72.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema109.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
10871
+ validate72.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema107.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
11330
10872
  return false;
11331
10873
  }
11332
10874
  }
@@ -11355,7 +10897,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
11355
10897
  } validate72.errors = vErrors; return errors === 0; }
11356
10898
  validate72.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
11357
10899
  export const PermissionRevocationData = validate75;
11358
- const schema124 = { "$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" } } };
10900
+ const schema120 = { "$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" } } };
11359
10901
  function validate75(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 = validate75.evaluated; if (evaluated0.dynamicProps) {
11360
10902
  evaluated0.props = undefined;
11361
10903
  } if (evaluated0.dynamicItems) {
@@ -11386,7 +10928,7 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
11386
10928
  } validate75.errors = vErrors; return errors === 0; }
11387
10929
  validate75.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
11388
10930
  export const PermissionsDefinitions = validate68;
11389
- const schema95 = { "$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/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" }] }, "conditions": { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } } } };
10931
+ const schema95 = { "$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" }, { "$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" }] }, "conditions": { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } } } };
11390
10932
  function validate68(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 = validate68.evaluated; if (evaluated0.dynamicProps) {
11391
10933
  evaluated0.props = undefined;
11392
10934
  } if (evaluated0.dynamicItems) {
@@ -11397,7 +10939,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
11397
10939
  } validate68.errors = vErrors; return errors === 0; }
11398
10940
  validate68.evaluated = { "dynamicProps": false, "dynamicItems": false };
11399
10941
  export const PermissionsScopes = validate70;
11400
- const schema97 = { "$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" } } }, "messages-subscribe-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" } } }, "messages-sync-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Sync" }, "protocol": { "type": "string" } } }, "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" } } }, "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" } } }, "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" } } }, "records-query-scope": { "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" } } }, "records-subscribe-scope": { "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" } } }, "records-count-scope": { "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" } } } } };
10942
+ const schema97 = { "$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" } } }, "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" } } }, "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" } } }, "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" } } }, "records-query-scope": { "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" } } }, "records-subscribe-scope": { "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" } } }, "records-count-scope": { "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" } } } } };
11401
10943
  function validate70(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 = validate70.evaluated; if (evaluated0.dynamicProps) {
11402
10944
  evaluated0.props = undefined;
11403
10945
  } if (evaluated0.dynamicItems) {
@@ -11408,10 +10950,10 @@ function validate70(data, { instancePath = "", parentData, parentDataProperty, r
11408
10950
  } validate70.errors = vErrors; return errors === 0; }
11409
10951
  validate70.evaluated = { "dynamicProps": false, "dynamicItems": false };
11410
10952
  export const ProtocolDefinition = validate76;
11411
- const schema125 = { "$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" } } } } };
10953
+ const schema121 = { "$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" } } } } };
11412
10954
  const pattern39 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
11413
10955
  const pattern41 = new RegExp(".*", "u");
11414
- const schema126 = { "$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" } } };
10956
+ const schema122 = { "$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" } } };
11415
10957
  const pattern43 = new RegExp("^[^$].*$", "u");
11416
10958
  const pattern44 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
11417
10959
  const pattern45 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
@@ -11426,7 +10968,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
11426
10968
  if (data && typeof data == "object" && !Array.isArray(data)) {
11427
10969
  const _errs1 = errors;
11428
10970
  for (const key0 in data) {
11429
- if (!((func2.call(schema126.properties, key0)) || (pattern43.test(key0)))) {
10971
+ if (!((func2.call(schema122.properties, key0)) || (pattern43.test(key0)))) {
11430
10972
  validate77.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
11431
10973
  return false;
11432
10974
  break;
@@ -11556,7 +11098,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
11556
11098
  errors++;
11557
11099
  }
11558
11100
  if (!(((data5 === "anyone") || (data5 === "author")) || (data5 === "recipient"))) {
11559
- const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema126.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
11101
+ const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
11560
11102
  if (vErrors === null) {
11561
11103
  vErrors = [err3];
11562
11104
  }
@@ -11621,7 +11163,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
11621
11163
  errors++;
11622
11164
  }
11623
11165
  if (!(((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "squash")) || (data8 === "update"))) {
11624
- const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema126.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11166
+ const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11625
11167
  if (vErrors === null) {
11626
11168
  vErrors = [err7];
11627
11169
  }
@@ -11743,7 +11285,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
11743
11285
  errors++;
11744
11286
  }
11745
11287
  if (!(((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "squash")) || (data11 === "update"))) {
11746
- const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema126.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11288
+ const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema122.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
11747
11289
  if (vErrors === null) {
11748
11290
  vErrors = [err14];
11749
11291
  }
@@ -11985,7 +11527,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
11985
11527
  return false;
11986
11528
  }
11987
11529
  if (!((data19 === "reject") || (data19 === "purgeOldest"))) {
11988
- validate77.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/enum", keyword: "enum", params: { allowedValues: schema126.properties.$recordLimit.properties.strategy.enum }, message: "must be equal to one of the allowed values" }];
11530
+ validate77.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/enum", keyword: "enum", params: { allowedValues: schema122.properties.$recordLimit.properties.strategy.enum }, message: "must be equal to one of the allowed values" }];
11989
11531
  return false;
11990
11532
  }
11991
11533
  var valid9 = _errs50 === errors;
@@ -12028,7 +11570,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
12028
11570
  return false;
12029
11571
  }
12030
11572
  if (!((data21 === "direct") || (data21 === "subscribe"))) {
12031
- validate77.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues: schema126.properties.$delivery.enum }, message: "must be equal to one of the allowed values" }];
11573
+ validate77.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues: schema122.properties.$delivery.enum }, message: "must be equal to one of the allowed values" }];
12032
11574
  return false;
12033
11575
  }
12034
11576
  var valid0 = _errs55 === errors;
@@ -12045,7 +11587,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
12045
11587
  return false;
12046
11588
  }
12047
11589
  if (!(data22 === true)) {
12048
- validate77.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues: schema126.properties.$squash.enum }, message: "must be equal to one of the allowed values" }];
11590
+ validate77.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues: schema122.properties.$squash.enum }, message: "must be equal to one of the allowed values" }];
12049
11591
  return false;
12050
11592
  }
12051
11593
  var valid0 = _errs58 === errors;
@@ -12128,7 +11670,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
12128
11670
  let data28 = data27.type;
12129
11671
  const _errs72 = errors;
12130
11672
  if (!(((((data28 === "string") || (data28 === "number")) || (data28 === "integer")) || (data28 === "boolean")) || (data28 === "array"))) {
12131
- validate77.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: schema126.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
11673
+ validate77.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: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
12132
11674
  return false;
12133
11675
  }
12134
11676
  var valid13 = _errs72 === errors;
@@ -12146,7 +11688,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
12146
11688
  let data30 = data29.type;
12147
11689
  const _errs75 = errors;
12148
11690
  if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
12149
- validate77.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: schema126.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11691
+ validate77.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: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
12150
11692
  return false;
12151
11693
  }
12152
11694
  var valid14 = _errs75 === errors;
@@ -12184,7 +11726,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
12184
11726
  let data32 = data31.type;
12185
11727
  const _errs78 = errors;
12186
11728
  if (!(((data32 === "string") || (data32 === "number")) || (data32 === "integer"))) {
12187
- validate77.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: schema126.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
11729
+ validate77.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: schema122.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
12188
11730
  return false;
12189
11731
  }
12190
11732
  var valid16 = _errs78 === errors;
@@ -12508,7 +12050,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
12508
12050
  validate76.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12509
12051
  export const ProtocolRuleSet = validate77;
12510
12052
  export const ProtocolsConfigure = validate80;
12511
- const schema127 = { "$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" } } } } };
12053
+ const schema123 = { "$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" } } } } };
12512
12054
  function validate80(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 = validate80.evaluated; if (evaluated0.dynamicProps) {
12513
12055
  evaluated0.props = undefined;
12514
12056
  } if (evaluated0.dynamicItems) {
@@ -12570,7 +12112,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
12570
12112
  return false;
12571
12113
  }
12572
12114
  if (!(data2 === "Protocols")) {
12573
- validate80.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema127.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12115
+ validate80.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema123.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12574
12116
  return false;
12575
12117
  }
12576
12118
  var valid1 = _errs6 === errors;
@@ -12587,7 +12129,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
12587
12129
  return false;
12588
12130
  }
12589
12131
  if (!(data3 === "Configure")) {
12590
- validate80.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema127.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12132
+ validate80.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema123.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12591
12133
  return false;
12592
12134
  }
12593
12135
  var valid1 = _errs8 === errors;
@@ -12669,7 +12211,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
12669
12211
  } validate80.errors = vErrors; return errors === 0; }
12670
12212
  validate80.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12671
12213
  export const ProtocolsQuery = validate83;
12672
- const schema129 = { "$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" } } } } };
12214
+ const schema125 = { "$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" } } } } };
12673
12215
  function validate83(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 = validate83.evaluated; if (evaluated0.dynamicProps) {
12674
12216
  evaluated0.props = undefined;
12675
12217
  } if (evaluated0.dynamicItems) {
@@ -12731,7 +12273,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
12731
12273
  return false;
12732
12274
  }
12733
12275
  if (!(data2 === "Protocols")) {
12734
- validate83.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12276
+ validate83.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" }];
12735
12277
  return false;
12736
12278
  }
12737
12279
  var valid1 = _errs6 === errors;
@@ -12748,7 +12290,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
12748
12290
  return false;
12749
12291
  }
12750
12292
  if (!(data3 === "Query")) {
12751
- validate83.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12293
+ validate83.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" }];
12752
12294
  return false;
12753
12295
  }
12754
12296
  var valid1 = _errs8 === errors;
@@ -12885,7 +12427,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
12885
12427
  } validate83.errors = vErrors; return errors === 0; }
12886
12428
  validate83.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
12887
12429
  export const RecordsRead = validate85;
12888
- const schema132 = { "$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" } } } } };
12430
+ const schema128 = { "$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" } } } } };
12889
12431
  function validate85(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 = validate85.evaluated; if (evaluated0.dynamicProps) {
12890
12432
  evaluated0.props = undefined;
12891
12433
  } if (evaluated0.dynamicItems) {
@@ -12947,7 +12489,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
12947
12489
  return false;
12948
12490
  }
12949
12491
  if (!(data2 === "Records")) {
12950
- validate85.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema132.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12492
+ validate85.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
12951
12493
  return false;
12952
12494
  }
12953
12495
  var valid1 = _errs6 === errors;
@@ -12964,7 +12506,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
12964
12506
  return false;
12965
12507
  }
12966
12508
  if (!(data3 === "Read")) {
12967
- validate85.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema132.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12509
+ validate85.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
12968
12510
  return false;
12969
12511
  }
12970
12512
  var valid1 = _errs8 === errors;
@@ -13027,7 +12569,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
13027
12569
  return false;
13028
12570
  }
13029
12571
  if (!((((((data7 === "createdAscending") || (data7 === "createdDescending")) || (data7 === "publishedAscending")) || (data7 === "publishedDescending")) || (data7 === "updatedAscending")) || (data7 === "updatedDescending"))) {
13030
- validate85.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema132.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
12572
+ validate85.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema128.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
13031
12573
  return false;
13032
12574
  }
13033
12575
  var valid1 = _errs16 === errors;
@@ -13066,7 +12608,7 @@ validate85.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
13066
12608
  export const RecordsFilter = validate41;
13067
12609
  export const PublicJwk = validate32;
13068
12610
  export const GenericSignaturePayload = validate88;
13069
- const schema134 = { "$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": { "type": "string" }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
12611
+ const schema130 = { "$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": { "type": "string" }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
13070
12612
  function validate88(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 = validate88.evaluated; if (evaluated0.dynamicProps) {
13071
12613
  evaluated0.props = undefined;
13072
12614
  } if (evaluated0.dynamicItems) {
@@ -13148,7 +12690,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
13148
12690
  } validate88.errors = vErrors; return errors === 0; }
13149
12691
  validate88.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
13150
12692
  export const RecordsWriteSignaturePayload = validate89;
13151
- const schema135 = { "$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" } } };
12693
+ const schema131 = { "$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" } } };
13152
12694
  function validate89(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 = validate89.evaluated; if (evaluated0.dynamicProps) {
13153
12695
  evaluated0.props = undefined;
13154
12696
  } if (evaluated0.dynamicItems) {