@enbox/dwn-sdk-js 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/browser.mjs +3 -10
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +799 -885
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/dwn-constant.js +5 -0
- package/dist/esm/src/core/dwn-constant.js.map +1 -1
- package/dist/esm/src/core/dwn-error.js +12 -4
- package/dist/esm/src/core/dwn-error.js.map +1 -1
- package/dist/esm/src/core/grant-authorization.js +9 -18
- package/dist/esm/src/core/grant-authorization.js.map +1 -1
- package/dist/esm/src/core/message-reply.js.map +1 -1
- package/dist/esm/src/core/messages-grant-authorization.js +28 -45
- package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-action.js +25 -27
- package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-validation.js +34 -89
- package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization.js +44 -118
- package/dist/esm/src/core/protocol-authorization.js.map +1 -1
- package/dist/esm/src/core/protocols-grant-authorization.js +5 -5
- package/dist/esm/src/core/protocols-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/recording-validation-state-reader.js +84 -0
- package/dist/esm/src/core/recording-validation-state-reader.js.map +1 -0
- package/dist/esm/src/core/records-grant-authorization.js +11 -11
- package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/replication-apply.js +123 -28
- package/dist/esm/src/core/replication-apply.js.map +1 -1
- package/dist/esm/src/core/resumable-task-manager.js +5 -4
- package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
- package/dist/esm/src/core/validation-state-reader.js +237 -0
- package/dist/esm/src/core/validation-state-reader.js.map +1 -0
- package/dist/esm/src/dwn.js +165 -132
- package/dist/esm/src/dwn.js.map +1 -1
- package/dist/esm/src/enums/dwn-interface-method.js +0 -1
- package/dist/esm/src/enums/dwn-interface-method.js.map +1 -1
- package/dist/esm/src/event-stream/durable-event-log.js +365 -0
- package/dist/esm/src/event-stream/durable-event-log.js.map +1 -0
- package/dist/esm/src/event-stream/event-emitter-wake-publisher.js +25 -0
- package/dist/esm/src/event-stream/event-emitter-wake-publisher.js.map +1 -0
- package/dist/esm/src/handlers/messages-query.js +159 -0
- package/dist/esm/src/handlers/messages-query.js.map +1 -0
- package/dist/esm/src/handlers/messages-read.js +5 -5
- package/dist/esm/src/handlers/messages-read.js.map +1 -1
- package/dist/esm/src/handlers/messages-subscribe.js +8 -8
- package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/protocols-configure.js +30 -49
- package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
- package/dist/esm/src/handlers/protocols-query.js +1 -1
- package/dist/esm/src/handlers/protocols-query.js.map +1 -1
- package/dist/esm/src/handlers/records-count.js +20 -11
- package/dist/esm/src/handlers/records-count.js.map +1 -1
- package/dist/esm/src/handlers/records-delete.js +20 -16
- package/dist/esm/src/handlers/records-delete.js.map +1 -1
- package/dist/esm/src/handlers/records-query.js +35 -11
- package/dist/esm/src/handlers/records-query.js.map +1 -1
- package/dist/esm/src/handlers/records-read.js +52 -42
- package/dist/esm/src/handlers/records-read.js.map +1 -1
- package/dist/esm/src/handlers/records-subscribe.js +107 -11
- package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/records-write.js +62 -116
- package/dist/esm/src/handlers/records-write.js.map +1 -1
- package/dist/esm/src/index.js +6 -7
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/interfaces/{messages-sync.js → messages-query.js} +21 -15
- package/dist/esm/src/interfaces/messages-query.js.map +1 -0
- package/dist/esm/src/interfaces/protocols-configure.js +12 -9
- package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-query.js +3 -4
- package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-count.js +4 -3
- package/dist/esm/src/interfaces/records-count.js.map +1 -1
- package/dist/esm/src/interfaces/records-delete.js +21 -4
- package/dist/esm/src/interfaces/records-delete.js.map +1 -1
- package/dist/esm/src/interfaces/records-query.js +4 -3
- package/dist/esm/src/interfaces/records-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-read.js +3 -3
- package/dist/esm/src/interfaces/records-read.js.map +1 -1
- package/dist/esm/src/interfaces/records-subscribe.js +4 -3
- package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/records-write.js +27 -13
- package/dist/esm/src/interfaces/records-write.js.map +1 -1
- package/dist/esm/src/protocols/permissions.js +27 -34
- package/dist/esm/src/protocols/permissions.js.map +1 -1
- package/dist/esm/src/store/index-level.js +24 -9
- package/dist/esm/src/store/index-level.js.map +1 -1
- package/dist/esm/src/store/level-wrapper.js +7 -0
- package/dist/esm/src/store/level-wrapper.js.map +1 -1
- package/dist/esm/src/store/message-store-level.js +536 -42
- package/dist/esm/src/store/message-store-level.js.map +1 -1
- package/dist/esm/src/store/storage-controller.js +58 -49
- package/dist/esm/src/store/storage-controller.js.map +1 -1
- package/dist/esm/src/types/message-types.js.map +1 -1
- package/dist/esm/src/types/validation-state-reader.js +2 -0
- package/dist/esm/src/types/validation-state-reader.js.map +1 -0
- package/dist/esm/src/utils/messages.js +17 -0
- package/dist/esm/src/utils/messages.js.map +1 -1
- package/dist/esm/src/utils/protocol-tags.js +262 -0
- package/dist/esm/src/utils/protocol-tags.js.map +1 -0
- package/dist/esm/src/utils/record-limit-occupancy.js +244 -0
- package/dist/esm/src/utils/record-limit-occupancy.js.map +1 -0
- package/dist/esm/src/utils/records.js +50 -14
- package/dist/esm/src/utils/records.js.map +1 -1
- package/dist/esm/src/utils/replication.js +85 -0
- package/dist/esm/src/utils/replication.js.map +1 -0
- package/dist/esm/tests/core/grant-authorization.spec.js +4 -4
- package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -1
- package/dist/esm/tests/core/process-message-parity.spec.js +222 -0
- package/dist/esm/tests/core/process-message-parity.spec.js.map +1 -0
- package/dist/esm/tests/core/protocol-authorization.spec.js +5 -2
- package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
- package/dist/esm/tests/core/records-grant-authorization.spec.js +5 -5
- package/dist/esm/tests/core/records-grant-authorization.spec.js.map +1 -1
- package/dist/esm/tests/core/replication-apply.spec.js +55 -1
- package/dist/esm/tests/core/replication-apply.spec.js.map +1 -1
- package/dist/esm/tests/core/replication-replay-property.spec.js +350 -0
- package/dist/esm/tests/core/replication-replay-property.spec.js.map +1 -0
- package/dist/esm/tests/core/validation-read-closure.spec.js +469 -0
- package/dist/esm/tests/core/validation-read-closure.spec.js.map +1 -0
- package/dist/esm/tests/core/validation-state-reader.spec.js +716 -0
- package/dist/esm/tests/core/validation-state-reader.spec.js.map +1 -0
- package/dist/esm/tests/durable-event-log.spec.js +373 -0
- package/dist/esm/tests/durable-event-log.spec.js.map +1 -0
- package/dist/esm/tests/dwn.spec.js +504 -35
- package/dist/esm/tests/dwn.spec.js.map +1 -1
- package/dist/esm/tests/features/author-delegated-grant.spec.js +9 -6
- package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
- package/dist/esm/tests/features/owner-delegated-grant.spec.js +1 -4
- package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
- package/dist/esm/tests/features/owner-signature.spec.js +1 -4
- package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
- package/dist/esm/tests/features/permissions.spec.js +165 -4
- package/dist/esm/tests/features/permissions.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-composition.spec.js +8 -11
- package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-create-action.spec.js +1 -4
- package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-delete-action.spec.js +3 -5
- package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-update-action.spec.js +3 -6
- package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
- package/dist/esm/tests/features/records-delivery.spec.js +1 -4
- package/dist/esm/tests/features/records-delivery.spec.js.map +1 -1
- package/dist/esm/tests/features/records-immutable.spec.js +1 -4
- package/dist/esm/tests/features/records-immutable.spec.js.map +1 -1
- package/dist/esm/tests/features/records-nested-query-scope.spec.js +281 -0
- package/dist/esm/tests/features/records-nested-query-scope.spec.js.map +1 -0
- package/dist/esm/tests/features/records-prune-cross-protocol.spec.js +3 -7
- package/dist/esm/tests/features/records-prune-cross-protocol.spec.js.map +1 -1
- package/dist/esm/tests/features/records-prune.spec.js +11 -22
- package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
- package/dist/esm/tests/features/records-record-limit.spec.js +441 -231
- package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -1
- package/dist/esm/tests/features/records-squash.spec.js +6 -4
- package/dist/esm/tests/features/records-squash.spec.js.map +1 -1
- package/dist/esm/tests/features/records-tags.spec.js +1 -4
- package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
- package/dist/esm/tests/features/resumable-tasks.spec.js +3 -5
- package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
- package/dist/esm/tests/fuzz/message-store.fuzz.spec.js +1 -2
- package/dist/esm/tests/fuzz/message-store.fuzz.spec.js.map +1 -1
- package/dist/esm/tests/fuzz/process-message.fuzz.spec.js +2 -4
- package/dist/esm/tests/fuzz/process-message.fuzz.spec.js.map +1 -1
- package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js +1 -1
- package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-query.spec.js +246 -0
- package/dist/esm/tests/handlers/messages-query.spec.js.map +1 -0
- package/dist/esm/tests/handlers/messages-read.spec.js +2 -5
- package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-subscribe.spec.js +3 -14
- package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/handlers/protocols-configure.spec.js +27 -26
- package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
- package/dist/esm/tests/handlers/protocols-query.spec.js +1 -4
- package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-count.spec.js +1 -4
- package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-delete.spec.js +312 -30
- package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-query.spec.js +32 -9
- package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-read.spec.js +4 -4
- package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js +33 -14
- package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-write.spec.js +82 -36
- package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-delete.spec.js +69 -2
- package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-write.spec.js +4 -3
- package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permissions.spec.js +55 -6
- package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/aggregator.spec.js +1 -4
- package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/deleted-record.spec.js +1 -4
- package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +1 -4
- package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/nested-roles.spec.js +1 -4
- package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/subscriptions.spec.js +1 -4
- package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
- package/dist/esm/tests/store/message-store-level.spec.js +361 -5
- package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
- package/dist/esm/tests/store/message-store.spec.js +60 -0
- package/dist/esm/tests/store/message-store.spec.js.map +1 -1
- package/dist/esm/tests/test-event-stream.js +7 -3
- package/dist/esm/tests/test-event-stream.js.map +1 -1
- package/dist/esm/tests/test-stores.js +19 -9
- package/dist/esm/tests/test-stores.js.map +1 -1
- package/dist/esm/tests/test-suite.js +4 -2
- package/dist/esm/tests/test-suite.js.map +1 -1
- package/dist/esm/tests/utils/protocol-tags.spec.js +96 -0
- package/dist/esm/tests/utils/protocol-tags.spec.js.map +1 -0
- package/dist/esm/tests/utils/test-data-generator.js +25 -0
- package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
- package/dist/esm/tests/utils/test-stub-generator.js.map +1 -1
- package/dist/esm/tests/utils/test-validation-state-reader.js +16 -0
- package/dist/esm/tests/utils/test-validation-state-reader.js.map +1 -0
- package/dist/types/generated/precompiled-validators.d.ts +6 -6
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/core-protocol.d.ts +3 -3
- package/dist/types/src/core/core-protocol.d.ts.map +1 -1
- package/dist/types/src/core/dwn-constant.d.ts +5 -0
- package/dist/types/src/core/dwn-constant.d.ts.map +1 -1
- package/dist/types/src/core/dwn-error.d.ts +12 -4
- package/dist/types/src/core/dwn-error.d.ts.map +1 -1
- package/dist/types/src/core/grant-authorization.d.ts +5 -5
- package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/message-reply.d.ts +5 -4
- package/dist/types/src/core/message-reply.d.ts.map +1 -1
- package/dist/types/src/core/messages-grant-authorization.d.ts +12 -14
- package/dist/types/src/core/messages-grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization-action.d.ts +4 -5
- package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization-validation.d.ts +14 -17
- package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization.d.ts +8 -33
- package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
- package/dist/types/src/core/protocols-grant-authorization.d.ts +4 -4
- package/dist/types/src/core/protocols-grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/recording-validation-state-reader.d.ts +75 -0
- package/dist/types/src/core/recording-validation-state-reader.d.ts.map +1 -0
- package/dist/types/src/core/records-grant-authorization.d.ts +8 -8
- package/dist/types/src/core/records-grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/replication-apply.d.ts +36 -0
- package/dist/types/src/core/replication-apply.d.ts.map +1 -1
- package/dist/types/src/core/resumable-task-manager.d.ts +1 -1
- package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
- package/dist/types/src/core/validation-state-reader.d.ts +79 -0
- package/dist/types/src/core/validation-state-reader.d.ts.map +1 -0
- package/dist/types/src/dwn.d.ts +33 -20
- package/dist/types/src/dwn.d.ts.map +1 -1
- package/dist/types/src/enums/dwn-interface-method.d.ts +0 -1
- package/dist/types/src/enums/dwn-interface-method.d.ts.map +1 -1
- package/dist/types/src/event-stream/durable-event-log.d.ts +69 -0
- package/dist/types/src/event-stream/durable-event-log.d.ts.map +1 -0
- package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts +13 -0
- package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts.map +1 -0
- package/dist/types/src/handlers/messages-query.d.ts +20 -0
- package/dist/types/src/handlers/messages-query.d.ts.map +1 -0
- package/dist/types/src/handlers/messages-read.d.ts +1 -1
- package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/protocols-configure.d.ts +0 -5
- package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/handlers/records-count.d.ts +2 -1
- package/dist/types/src/handlers/records-count.d.ts.map +1 -1
- package/dist/types/src/handlers/records-delete.d.ts +2 -2
- package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
- package/dist/types/src/handlers/records-query.d.ts +1 -1
- package/dist/types/src/handlers/records-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-read.d.ts +2 -1
- package/dist/types/src/handlers/records-read.d.ts.map +1 -1
- package/dist/types/src/handlers/records-subscribe.d.ts +4 -5
- package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/records-write.d.ts +3 -11
- package/dist/types/src/handlers/records-write.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +14 -16
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/messages-query.d.ts +23 -0
- package/dist/types/src/interfaces/messages-query.d.ts.map +1 -0
- package/dist/types/src/interfaces/protocols-configure.d.ts +3 -3
- package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/interfaces/protocols-query.d.ts +2 -2
- package/dist/types/src/interfaces/protocols-query.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-count.d.ts +3 -3
- package/dist/types/src/interfaces/records-count.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-delete.d.ts +11 -3
- package/dist/types/src/interfaces/records-delete.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-query.d.ts +3 -3
- package/dist/types/src/interfaces/records-query.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-read.d.ts +3 -3
- package/dist/types/src/interfaces/records-read.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-subscribe.d.ts +3 -3
- package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-write.d.ts +15 -7
- package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
- package/dist/types/src/protocols/permissions.d.ts +9 -12
- package/dist/types/src/protocols/permissions.d.ts.map +1 -1
- package/dist/types/src/store/index-level.d.ts +10 -1
- package/dist/types/src/store/index-level.d.ts.map +1 -1
- package/dist/types/src/store/level-wrapper.d.ts +5 -0
- package/dist/types/src/store/level-wrapper.d.ts.map +1 -1
- package/dist/types/src/store/message-store-level.d.ts +94 -14
- package/dist/types/src/store/message-store-level.d.ts.map +1 -1
- package/dist/types/src/store/storage-controller.d.ts +17 -14
- package/dist/types/src/store/storage-controller.d.ts.map +1 -1
- package/dist/types/src/types/message-store.d.ts +29 -1
- package/dist/types/src/types/message-store.d.ts.map +1 -1
- package/dist/types/src/types/message-types.d.ts +2 -0
- package/dist/types/src/types/message-types.d.ts.map +1 -1
- package/dist/types/src/types/messages-types.d.ts +21 -37
- package/dist/types/src/types/messages-types.d.ts.map +1 -1
- package/dist/types/src/types/method-handler.d.ts +2 -2
- package/dist/types/src/types/method-handler.d.ts.map +1 -1
- package/dist/types/src/types/permission-types.d.ts +1 -1
- package/dist/types/src/types/subscriptions.d.ts +50 -39
- package/dist/types/src/types/subscriptions.d.ts.map +1 -1
- package/dist/types/src/types/validation-state-reader.d.ts +116 -0
- package/dist/types/src/types/validation-state-reader.d.ts.map +1 -0
- package/dist/types/src/utils/messages.d.ts +10 -0
- package/dist/types/src/utils/messages.d.ts.map +1 -1
- package/dist/types/src/utils/protocol-tags.d.ts +15 -0
- package/dist/types/src/utils/protocol-tags.d.ts.map +1 -0
- package/dist/types/src/utils/record-limit-occupancy.d.ts +40 -0
- package/dist/types/src/utils/record-limit-occupancy.d.ts.map +1 -0
- package/dist/types/src/utils/records.d.ts +25 -3
- package/dist/types/src/utils/records.d.ts.map +1 -1
- package/dist/types/src/utils/replication.d.ts +22 -0
- package/dist/types/src/utils/replication.d.ts.map +1 -0
- package/dist/types/tests/core/process-message-parity.spec.d.ts +2 -0
- package/dist/types/tests/core/process-message-parity.spec.d.ts.map +1 -0
- package/dist/types/tests/core/replication-replay-property.spec.d.ts +2 -0
- package/dist/types/tests/core/replication-replay-property.spec.d.ts.map +1 -0
- package/dist/types/tests/core/validation-read-closure.spec.d.ts +2 -0
- package/dist/types/tests/core/validation-read-closure.spec.d.ts.map +1 -0
- package/dist/types/tests/core/validation-state-reader.spec.d.ts +2 -0
- package/dist/types/tests/core/validation-state-reader.spec.d.ts.map +1 -0
- package/dist/types/tests/durable-event-log.spec.d.ts +2 -0
- package/dist/types/tests/durable-event-log.spec.d.ts.map +1 -0
- package/dist/types/tests/dwn.spec.d.ts.map +1 -1
- package/dist/types/tests/features/author-delegated-grant.spec.d.ts.map +1 -1
- package/dist/types/tests/features/owner-delegated-grant.spec.d.ts.map +1 -1
- package/dist/types/tests/features/owner-signature.spec.d.ts.map +1 -1
- package/dist/types/tests/features/permissions.spec.d.ts.map +1 -1
- package/dist/types/tests/features/protocol-composition.spec.d.ts.map +1 -1
- package/dist/types/tests/features/protocol-create-action.spec.d.ts.map +1 -1
- package/dist/types/tests/features/protocol-delete-action.spec.d.ts.map +1 -1
- package/dist/types/tests/features/protocol-update-action.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-delivery.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-immutable.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-nested-query-scope.spec.d.ts +2 -0
- package/dist/types/tests/features/records-nested-query-scope.spec.d.ts.map +1 -0
- package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-prune.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-squash.spec.d.ts.map +1 -1
- package/dist/types/tests/features/records-tags.spec.d.ts.map +1 -1
- package/dist/types/tests/features/resumable-tasks.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/messages-query.spec.d.ts +2 -0
- package/dist/types/tests/handlers/messages-query.spec.d.ts.map +1 -0
- package/dist/types/tests/handlers/messages-read.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/messages-subscribe.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/protocols-configure.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/protocols-query.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-count.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-delete.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-query.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
- package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
- package/dist/types/tests/scenarios/deleted-record.spec.d.ts.map +1 -1
- package/dist/types/tests/scenarios/end-to-end-tests.spec.d.ts.map +1 -1
- package/dist/types/tests/scenarios/nested-roles.spec.d.ts.map +1 -1
- package/dist/types/tests/scenarios/subscriptions.spec.d.ts.map +1 -1
- package/dist/types/tests/store/message-store.spec.d.ts.map +1 -1
- package/dist/types/tests/test-event-stream.d.ts +1 -1
- package/dist/types/tests/test-event-stream.d.ts.map +1 -1
- package/dist/types/tests/test-stores.d.ts +5 -4
- package/dist/types/tests/test-stores.d.ts.map +1 -1
- package/dist/types/tests/test-suite.d.ts +1 -2
- package/dist/types/tests/test-suite.d.ts.map +1 -1
- package/dist/types/tests/utils/protocol-tags.spec.d.ts +2 -0
- package/dist/types/tests/utils/protocol-tags.spec.d.ts.map +1 -0
- package/dist/types/tests/utils/test-data-generator.d.ts +20 -1
- package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
- package/dist/types/tests/utils/test-validation-state-reader.d.ts +15 -0
- package/dist/types/tests/utils/test-validation-state-reader.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/core/core-protocol.ts +3 -3
- package/src/core/dwn-constant.ts +7 -1
- package/src/core/dwn-error.ts +12 -4
- package/src/core/grant-authorization.ts +11 -20
- package/src/core/message-reply.ts +6 -5
- package/src/core/messages-grant-authorization.ts +37 -70
- package/src/core/protocol-authorization-action.ts +29 -38
- package/src/core/protocol-authorization-validation.ts +47 -121
- package/src/core/protocol-authorization.ts +56 -202
- package/src/core/protocols-grant-authorization.ts +9 -9
- package/src/core/recording-validation-state-reader.ts +130 -0
- package/src/core/records-grant-authorization.ts +16 -16
- package/src/core/replication-apply.ts +172 -32
- package/src/core/resumable-task-manager.ts +10 -8
- package/src/core/validation-state-reader.ts +350 -0
- package/src/dwn.ts +285 -192
- package/src/enums/dwn-interface-method.ts +0 -1
- package/src/event-stream/durable-event-log.ts +509 -0
- package/src/event-stream/event-emitter-wake-publisher.ts +34 -0
- package/src/handlers/messages-query.ts +203 -0
- package/src/handlers/messages-read.ts +9 -10
- package/src/handlers/messages-subscribe.ts +12 -13
- package/src/handlers/protocols-configure.ts +37 -58
- package/src/handlers/protocols-query.ts +1 -1
- package/src/handlers/records-count.ts +24 -17
- package/src/handlers/records-delete.ts +29 -27
- package/src/handlers/records-query.ts +38 -17
- package/src/handlers/records-read.ts +63 -50
- package/src/handlers/records-subscribe.ts +132 -19
- package/src/handlers/records-write.ts +77 -168
- package/src/index.ts +14 -17
- package/src/interfaces/messages-query.ts +70 -0
- package/src/interfaces/protocols-configure.ts +20 -10
- package/src/interfaces/protocols-query.ts +4 -5
- package/src/interfaces/records-count.ts +9 -4
- package/src/interfaces/records-delete.ts +25 -5
- package/src/interfaces/records-query.ts +9 -4
- package/src/interfaces/records-read.ts +4 -4
- package/src/interfaces/records-subscribe.ts +9 -4
- package/src/interfaces/records-write.ts +41 -13
- package/src/protocols/permissions.ts +32 -52
- package/src/store/index-level.ts +30 -9
- package/src/store/level-wrapper.ts +9 -1
- package/src/store/message-store-level.ts +757 -47
- package/src/store/storage-controller.ts +74 -63
- package/src/types/message-store.ts +45 -2
- package/src/types/message-types.ts +3 -1
- package/src/types/messages-types.ts +26 -45
- package/src/types/method-handler.ts +3 -3
- package/src/types/permission-types.ts +1 -1
- package/src/types/subscriptions.ts +53 -42
- package/src/types/validation-state-reader.ts +127 -0
- package/src/utils/messages.ts +25 -1
- package/src/utils/protocol-tags.ts +366 -0
- package/src/utils/record-limit-occupancy.ts +377 -0
- package/src/utils/records.ts +69 -13
- package/src/utils/replication.ts +122 -0
- package/dist/esm/src/core/record-chain.js +0 -64
- package/dist/esm/src/core/record-chain.js.map +0 -1
- package/dist/esm/src/event-stream/event-emitter-event-log.js +0 -334
- package/dist/esm/src/event-stream/event-emitter-event-log.js.map +0 -1
- package/dist/esm/src/handlers/messages-sync.js +0 -278
- package/dist/esm/src/handlers/messages-sync.js.map +0 -1
- package/dist/esm/src/interfaces/messages-sync.js.map +0 -1
- package/dist/esm/src/smt/smt-store-level.js +0 -103
- package/dist/esm/src/smt/smt-store-level.js.map +0 -1
- package/dist/esm/src/smt/smt-store-memory.js +0 -41
- package/dist/esm/src/smt/smt-store-memory.js.map +0 -1
- package/dist/esm/src/smt/smt-utils.js +0 -129
- package/dist/esm/src/smt/smt-utils.js.map +0 -1
- package/dist/esm/src/smt/sparse-merkle-tree.js +0 -577
- package/dist/esm/src/smt/sparse-merkle-tree.js.map +0 -1
- package/dist/esm/src/state-index/state-index-level.js +0 -191
- package/dist/esm/src/state-index/state-index-level.js.map +0 -1
- package/dist/esm/src/types/smt-types.js +0 -5
- package/dist/esm/src/types/smt-types.js.map +0 -1
- package/dist/esm/src/types/state-index.js +0 -2
- package/dist/esm/src/types/state-index.js.map +0 -1
- package/dist/esm/tests/event-emitter-event-log.spec.js +0 -499
- package/dist/esm/tests/event-emitter-event-log.spec.js.map +0 -1
- package/dist/esm/tests/handlers/messages-sync.spec.js +0 -1088
- package/dist/esm/tests/handlers/messages-sync.spec.js.map +0 -1
- package/dist/esm/tests/smt/smt-store-level.spec.js +0 -132
- package/dist/esm/tests/smt/smt-store-level.spec.js.map +0 -1
- package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +0 -732
- package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +0 -1
- package/dist/esm/tests/state-index/state-index-level.spec.js +0 -245
- package/dist/esm/tests/state-index/state-index-level.spec.js.map +0 -1
- package/dist/types/src/core/record-chain.d.ts +0 -24
- package/dist/types/src/core/record-chain.d.ts.map +0 -1
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts +0 -80
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +0 -1
- package/dist/types/src/handlers/messages-sync.d.ts +0 -39
- package/dist/types/src/handlers/messages-sync.d.ts.map +0 -1
- package/dist/types/src/interfaces/messages-sync.d.ts +0 -20
- package/dist/types/src/interfaces/messages-sync.d.ts.map +0 -1
- package/dist/types/src/smt/smt-store-level.d.ts +0 -32
- package/dist/types/src/smt/smt-store-level.d.ts.map +0 -1
- package/dist/types/src/smt/smt-store-memory.d.ts +0 -22
- package/dist/types/src/smt/smt-store-memory.d.ts.map +0 -1
- package/dist/types/src/smt/smt-utils.d.ts +0 -58
- package/dist/types/src/smt/smt-utils.d.ts.map +0 -1
- package/dist/types/src/smt/sparse-merkle-tree.d.ts +0 -124
- package/dist/types/src/smt/sparse-merkle-tree.d.ts.map +0 -1
- package/dist/types/src/state-index/state-index-level.d.ts +0 -83
- package/dist/types/src/state-index/state-index-level.d.ts.map +0 -1
- package/dist/types/src/types/smt-types.d.ts +0 -81
- package/dist/types/src/types/smt-types.d.ts.map +0 -1
- package/dist/types/src/types/state-index.d.ts +0 -90
- package/dist/types/src/types/state-index.d.ts.map +0 -1
- package/dist/types/tests/event-emitter-event-log.spec.d.ts +0 -2
- package/dist/types/tests/event-emitter-event-log.spec.d.ts.map +0 -1
- package/dist/types/tests/handlers/messages-sync.spec.d.ts +0 -2
- package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +0 -1
- package/dist/types/tests/smt/smt-store-level.spec.d.ts +0 -2
- package/dist/types/tests/smt/smt-store-level.spec.d.ts.map +0 -1
- package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts +0 -2
- package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts.map +0 -1
- package/dist/types/tests/state-index/state-index-level.spec.d.ts +0 -2
- package/dist/types/tests/state-index/state-index-level.spec.d.ts.map +0 -1
- package/src/core/record-chain.ts +0 -99
- package/src/event-stream/event-emitter-event-log.ts +0 -430
- package/src/handlers/messages-sync.ts +0 -403
- package/src/interfaces/messages-sync.ts +0 -69
- package/src/smt/smt-store-level.ts +0 -143
- package/src/smt/smt-store-memory.ts +0 -53
- package/src/smt/smt-utils.ts +0 -149
- package/src/smt/sparse-merkle-tree.ts +0 -698
- package/src/state-index/state-index-level.ts +0 -239
- package/src/types/smt-types.ts +0 -95
- package/src/types/state-index.ts +0 -100
|
@@ -5180,7 +5180,7 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5180
5180
|
validate45.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
5181
5181
|
export const RecordsSubscribe = validate48;
|
|
5182
5182
|
const schema73 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-subscribe.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": ["Subscribe"], "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" }, "pagination": { "type": "object", "additionalProperties": false, "properties": { "limit": { "type": "number", "minimum": 1 }, "cursor": { "$ref": "https://identity.foundation/dwn/json-schemas/pagination-cursor.json" } } }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" }, "cursor": { "$ref": "https://identity.foundation/dwn/json-schemas/progress-token.json" } } } } };
|
|
5183
|
-
const schema76 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/progress-token.json", "type": "object", "additionalProperties": false, "required": ["streamId", "epoch", "position"
|
|
5183
|
+
const schema76 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/progress-token.json", "type": "object", "additionalProperties": false, "required": ["streamId", "epoch", "position"], "properties": { "streamId": { "type": "string", "minLength": 1 }, "epoch": { "type": "string", "minLength": 1 }, "position": { "type": "string", "minLength": 1 }, "messageCid": { "type": "string", "minLength": 1 } } };
|
|
5184
5184
|
function validate48(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-subscribe.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate48.evaluated; if (evaluated0.dynamicProps) {
|
|
5185
5185
|
evaluated0.props = undefined;
|
|
5186
5186
|
} if (evaluated0.dynamicItems) {
|
|
@@ -5452,7 +5452,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5452
5452
|
if (errors === _errs32) {
|
|
5453
5453
|
if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
|
|
5454
5454
|
let missing3;
|
|
5455
|
-
if ((((
|
|
5455
|
+
if ((((data13.streamId === undefined) && (missing3 = "streamId")) || ((data13.epoch === undefined) && (missing3 = "epoch"))) || ((data13.position === undefined) && (missing3 = "position"))) {
|
|
5456
5456
|
validate48.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
5457
5457
|
return false;
|
|
5458
5458
|
}
|
|
@@ -6618,9 +6618,9 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6618
6618
|
}
|
|
6619
6619
|
} validate56.errors = vErrors; return errors === 0; }
|
|
6620
6620
|
validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
6621
|
-
export const
|
|
6622
|
-
const schema84 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-
|
|
6623
|
-
function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-
|
|
6621
|
+
export const MessagesQuery = validate57;
|
|
6622
|
+
const schema84 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-query.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filters"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Query"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filters": { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/messages-filter.json" } }, "permissionGrantIds": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true }, "cursor": { "$ref": "https://identity.foundation/dwn/json-schemas/progress-token.json" }, "limit": { "type": "integer", "minimum": 0 }, "cidsOnly": { "type": "boolean" } } } } };
|
|
6623
|
+
function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-query.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate57.evaluated; if (evaluated0.dynamicProps) {
|
|
6624
6624
|
evaluated0.props = undefined;
|
|
6625
6625
|
} if (evaluated0.dynamicItems) {
|
|
6626
6626
|
evaluated0.items = undefined;
|
|
@@ -6659,14 +6659,14 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6659
6659
|
if (errors === _errs3) {
|
|
6660
6660
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
6661
6661
|
let missing1;
|
|
6662
|
-
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.
|
|
6662
|
+
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.filters === undefined) && (missing1 = "filters"))) {
|
|
6663
6663
|
validate57.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
6664
6664
|
return false;
|
|
6665
6665
|
}
|
|
6666
6666
|
else {
|
|
6667
6667
|
const _errs5 = errors;
|
|
6668
6668
|
for (const key1 in data1) {
|
|
6669
|
-
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "
|
|
6669
|
+
if (!((((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filters")) || (key1 === "permissionGrantIds")) || (key1 === "cursor")) || (key1 === "limit")) || (key1 === "cidsOnly"))) {
|
|
6670
6670
|
validate57.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
6671
6671
|
return false;
|
|
6672
6672
|
break;
|
|
@@ -6697,7 +6697,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6697
6697
|
validate57.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6698
6698
|
return false;
|
|
6699
6699
|
}
|
|
6700
|
-
if (!(data3 === "
|
|
6700
|
+
if (!(data3 === "Query")) {
|
|
6701
6701
|
validate57.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema84.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
6702
6702
|
return false;
|
|
6703
6703
|
}
|
|
@@ -6729,11 +6729,29 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6729
6729
|
var valid1 = true;
|
|
6730
6730
|
}
|
|
6731
6731
|
if (valid1) {
|
|
6732
|
-
if (data1.
|
|
6732
|
+
if (data1.filters !== undefined) {
|
|
6733
|
+
let data5 = data1.filters;
|
|
6733
6734
|
const _errs13 = errors;
|
|
6734
|
-
if (
|
|
6735
|
-
|
|
6736
|
-
|
|
6735
|
+
if (errors === _errs13) {
|
|
6736
|
+
if (Array.isArray(data5)) {
|
|
6737
|
+
var valid3 = true;
|
|
6738
|
+
const len0 = data5.length;
|
|
6739
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
6740
|
+
const _errs15 = errors;
|
|
6741
|
+
if (!(validate56(data5[i0], { instancePath: instancePath + "/descriptor/filters/" + i0, parentData: data5, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
6742
|
+
vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
|
|
6743
|
+
errors = vErrors.length;
|
|
6744
|
+
}
|
|
6745
|
+
var valid3 = _errs15 === errors;
|
|
6746
|
+
if (!valid3) {
|
|
6747
|
+
break;
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
}
|
|
6751
|
+
else {
|
|
6752
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/filters", schemaPath: "#/properties/descriptor/properties/filters/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
6753
|
+
return false;
|
|
6754
|
+
}
|
|
6737
6755
|
}
|
|
6738
6756
|
var valid1 = _errs13 === errors;
|
|
6739
6757
|
}
|
|
@@ -6742,45 +6760,45 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6742
6760
|
}
|
|
6743
6761
|
if (valid1) {
|
|
6744
6762
|
if (data1.permissionGrantIds !== undefined) {
|
|
6745
|
-
let
|
|
6746
|
-
const
|
|
6747
|
-
if (errors ===
|
|
6748
|
-
if (Array.isArray(
|
|
6749
|
-
if (
|
|
6763
|
+
let data7 = data1.permissionGrantIds;
|
|
6764
|
+
const _errs16 = errors;
|
|
6765
|
+
if (errors === _errs16) {
|
|
6766
|
+
if (Array.isArray(data7)) {
|
|
6767
|
+
if (data7.length < 1) {
|
|
6750
6768
|
validate57.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
6751
6769
|
return false;
|
|
6752
6770
|
}
|
|
6753
6771
|
else {
|
|
6754
|
-
var
|
|
6755
|
-
const
|
|
6756
|
-
for (let
|
|
6757
|
-
const
|
|
6758
|
-
if (typeof
|
|
6759
|
-
validate57.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" +
|
|
6772
|
+
var valid4 = true;
|
|
6773
|
+
const len1 = data7.length;
|
|
6774
|
+
for (let i1 = 0; i1 < len1; i1++) {
|
|
6775
|
+
const _errs18 = errors;
|
|
6776
|
+
if (typeof data7[i1] !== "string") {
|
|
6777
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i1, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6760
6778
|
return false;
|
|
6761
6779
|
}
|
|
6762
|
-
var
|
|
6763
|
-
if (!
|
|
6780
|
+
var valid4 = _errs18 === errors;
|
|
6781
|
+
if (!valid4) {
|
|
6764
6782
|
break;
|
|
6765
6783
|
}
|
|
6766
6784
|
}
|
|
6767
|
-
if (
|
|
6768
|
-
let
|
|
6785
|
+
if (valid4) {
|
|
6786
|
+
let i2 = data7.length;
|
|
6769
6787
|
let j0;
|
|
6770
|
-
if (
|
|
6788
|
+
if (i2 > 1) {
|
|
6771
6789
|
const indices0 = {};
|
|
6772
|
-
for (;
|
|
6773
|
-
let item0 =
|
|
6790
|
+
for (; i2--;) {
|
|
6791
|
+
let item0 = data7[i2];
|
|
6774
6792
|
if (typeof item0 !== "string") {
|
|
6775
6793
|
continue;
|
|
6776
6794
|
}
|
|
6777
6795
|
if (typeof indices0[item0] == "number") {
|
|
6778
6796
|
j0 = indices0[item0];
|
|
6779
|
-
validate57.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i:
|
|
6797
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i2, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i2 + " are identical)" }];
|
|
6780
6798
|
return false;
|
|
6781
6799
|
break;
|
|
6782
6800
|
}
|
|
6783
|
-
indices0[item0] =
|
|
6801
|
+
indices0[item0] = i2;
|
|
6784
6802
|
}
|
|
6785
6803
|
}
|
|
6786
6804
|
}
|
|
@@ -6791,11 +6809,168 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6791
6809
|
return false;
|
|
6792
6810
|
}
|
|
6793
6811
|
}
|
|
6794
|
-
var valid1 =
|
|
6812
|
+
var valid1 = _errs16 === errors;
|
|
6795
6813
|
}
|
|
6796
6814
|
else {
|
|
6797
6815
|
var valid1 = true;
|
|
6798
6816
|
}
|
|
6817
|
+
if (valid1) {
|
|
6818
|
+
if (data1.cursor !== undefined) {
|
|
6819
|
+
let data9 = data1.cursor;
|
|
6820
|
+
const _errs20 = errors;
|
|
6821
|
+
const _errs21 = errors;
|
|
6822
|
+
if (errors === _errs21) {
|
|
6823
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
6824
|
+
let missing2;
|
|
6825
|
+
if ((((data9.streamId === undefined) && (missing2 = "streamId")) || ((data9.epoch === undefined) && (missing2 = "epoch"))) || ((data9.position === undefined) && (missing2 = "position"))) {
|
|
6826
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
6827
|
+
return false;
|
|
6828
|
+
}
|
|
6829
|
+
else {
|
|
6830
|
+
const _errs23 = errors;
|
|
6831
|
+
for (const key2 in data9) {
|
|
6832
|
+
if (!((((key2 === "streamId") || (key2 === "epoch")) || (key2 === "position")) || (key2 === "messageCid"))) {
|
|
6833
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
6834
|
+
return false;
|
|
6835
|
+
break;
|
|
6836
|
+
}
|
|
6837
|
+
}
|
|
6838
|
+
if (_errs23 === errors) {
|
|
6839
|
+
if (data9.streamId !== undefined) {
|
|
6840
|
+
let data10 = data9.streamId;
|
|
6841
|
+
const _errs24 = errors;
|
|
6842
|
+
if (errors === _errs24) {
|
|
6843
|
+
if (typeof data10 === "string") {
|
|
6844
|
+
if (func1(data10) < 1) {
|
|
6845
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
6846
|
+
return false;
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
else {
|
|
6850
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6851
|
+
return false;
|
|
6852
|
+
}
|
|
6853
|
+
}
|
|
6854
|
+
var valid7 = _errs24 === errors;
|
|
6855
|
+
}
|
|
6856
|
+
else {
|
|
6857
|
+
var valid7 = true;
|
|
6858
|
+
}
|
|
6859
|
+
if (valid7) {
|
|
6860
|
+
if (data9.epoch !== undefined) {
|
|
6861
|
+
let data11 = data9.epoch;
|
|
6862
|
+
const _errs26 = errors;
|
|
6863
|
+
if (errors === _errs26) {
|
|
6864
|
+
if (typeof data11 === "string") {
|
|
6865
|
+
if (func1(data11) < 1) {
|
|
6866
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
6867
|
+
return false;
|
|
6868
|
+
}
|
|
6869
|
+
}
|
|
6870
|
+
else {
|
|
6871
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6872
|
+
return false;
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6875
|
+
var valid7 = _errs26 === errors;
|
|
6876
|
+
}
|
|
6877
|
+
else {
|
|
6878
|
+
var valid7 = true;
|
|
6879
|
+
}
|
|
6880
|
+
if (valid7) {
|
|
6881
|
+
if (data9.position !== undefined) {
|
|
6882
|
+
let data12 = data9.position;
|
|
6883
|
+
const _errs28 = errors;
|
|
6884
|
+
if (errors === _errs28) {
|
|
6885
|
+
if (typeof data12 === "string") {
|
|
6886
|
+
if (func1(data12) < 1) {
|
|
6887
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
6888
|
+
return false;
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
else {
|
|
6892
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6893
|
+
return false;
|
|
6894
|
+
}
|
|
6895
|
+
}
|
|
6896
|
+
var valid7 = _errs28 === errors;
|
|
6897
|
+
}
|
|
6898
|
+
else {
|
|
6899
|
+
var valid7 = true;
|
|
6900
|
+
}
|
|
6901
|
+
if (valid7) {
|
|
6902
|
+
if (data9.messageCid !== undefined) {
|
|
6903
|
+
let data13 = data9.messageCid;
|
|
6904
|
+
const _errs30 = errors;
|
|
6905
|
+
if (errors === _errs30) {
|
|
6906
|
+
if (typeof data13 === "string") {
|
|
6907
|
+
if (func1(data13) < 1) {
|
|
6908
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
6909
|
+
return false;
|
|
6910
|
+
}
|
|
6911
|
+
}
|
|
6912
|
+
else {
|
|
6913
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6914
|
+
return false;
|
|
6915
|
+
}
|
|
6916
|
+
}
|
|
6917
|
+
var valid7 = _errs30 === errors;
|
|
6918
|
+
}
|
|
6919
|
+
else {
|
|
6920
|
+
var valid7 = true;
|
|
6921
|
+
}
|
|
6922
|
+
}
|
|
6923
|
+
}
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
6926
|
+
}
|
|
6927
|
+
}
|
|
6928
|
+
else {
|
|
6929
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
6930
|
+
return false;
|
|
6931
|
+
}
|
|
6932
|
+
}
|
|
6933
|
+
var valid1 = _errs20 === errors;
|
|
6934
|
+
}
|
|
6935
|
+
else {
|
|
6936
|
+
var valid1 = true;
|
|
6937
|
+
}
|
|
6938
|
+
if (valid1) {
|
|
6939
|
+
if (data1.limit !== undefined) {
|
|
6940
|
+
let data14 = data1.limit;
|
|
6941
|
+
const _errs32 = errors;
|
|
6942
|
+
if (!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))) {
|
|
6943
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/limit", schemaPath: "#/properties/descriptor/properties/limit/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
6944
|
+
return false;
|
|
6945
|
+
}
|
|
6946
|
+
if (errors === _errs32) {
|
|
6947
|
+
if ((typeof data14 == "number") && (isFinite(data14))) {
|
|
6948
|
+
if (data14 < 0 || isNaN(data14)) {
|
|
6949
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/limit", schemaPath: "#/properties/descriptor/properties/limit/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
6950
|
+
return false;
|
|
6951
|
+
}
|
|
6952
|
+
}
|
|
6953
|
+
}
|
|
6954
|
+
var valid1 = _errs32 === errors;
|
|
6955
|
+
}
|
|
6956
|
+
else {
|
|
6957
|
+
var valid1 = true;
|
|
6958
|
+
}
|
|
6959
|
+
if (valid1) {
|
|
6960
|
+
if (data1.cidsOnly !== undefined) {
|
|
6961
|
+
const _errs34 = errors;
|
|
6962
|
+
if (typeof data1.cidsOnly !== "boolean") {
|
|
6963
|
+
validate57.errors = [{ instancePath: instancePath + "/descriptor/cidsOnly", schemaPath: "#/properties/descriptor/properties/cidsOnly/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
6964
|
+
return false;
|
|
6965
|
+
}
|
|
6966
|
+
var valid1 = _errs34 === errors;
|
|
6967
|
+
}
|
|
6968
|
+
else {
|
|
6969
|
+
var valid1 = true;
|
|
6970
|
+
}
|
|
6971
|
+
}
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6799
6974
|
}
|
|
6800
6975
|
}
|
|
6801
6976
|
}
|
|
@@ -6823,24 +6998,24 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6823
6998
|
}
|
|
6824
6999
|
} validate57.errors = vErrors; return errors === 0; }
|
|
6825
7000
|
validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
6826
|
-
export const
|
|
6827
|
-
const
|
|
6828
|
-
function
|
|
7001
|
+
export const MessagesRead = validate60;
|
|
7002
|
+
const schema87 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-read.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "messageCid"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageCid": { "type": "string" }, "permissionGrantIds": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true } } } } };
|
|
7003
|
+
function validate60(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-read.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate60.evaluated; if (evaluated0.dynamicProps) {
|
|
6829
7004
|
evaluated0.props = undefined;
|
|
6830
7005
|
} if (evaluated0.dynamicItems) {
|
|
6831
7006
|
evaluated0.items = undefined;
|
|
6832
7007
|
} if (errors === 0) {
|
|
6833
7008
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
6834
7009
|
let missing0;
|
|
6835
|
-
if (((data.
|
|
6836
|
-
|
|
7010
|
+
if (((data.authorization === undefined) && (missing0 = "authorization")) || ((data.descriptor === undefined) && (missing0 = "descriptor"))) {
|
|
7011
|
+
validate60.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
6837
7012
|
return false;
|
|
6838
7013
|
}
|
|
6839
7014
|
else {
|
|
6840
7015
|
const _errs1 = errors;
|
|
6841
7016
|
for (const key0 in data) {
|
|
6842
7017
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
6843
|
-
|
|
7018
|
+
validate60.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
6844
7019
|
return false;
|
|
6845
7020
|
break;
|
|
6846
7021
|
}
|
|
@@ -6864,15 +7039,15 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6864
7039
|
if (errors === _errs3) {
|
|
6865
7040
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
6866
7041
|
let missing1;
|
|
6867
|
-
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.
|
|
6868
|
-
|
|
7042
|
+
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.messageCid === undefined) && (missing1 = "messageCid"))) {
|
|
7043
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
6869
7044
|
return false;
|
|
6870
7045
|
}
|
|
6871
7046
|
else {
|
|
6872
7047
|
const _errs5 = errors;
|
|
6873
7048
|
for (const key1 in data1) {
|
|
6874
|
-
if (!(((((
|
|
6875
|
-
|
|
7049
|
+
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "messageCid")) || (key1 === "permissionGrantIds"))) {
|
|
7050
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
6876
7051
|
return false;
|
|
6877
7052
|
break;
|
|
6878
7053
|
}
|
|
@@ -6882,11 +7057,11 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6882
7057
|
let data2 = data1.interface;
|
|
6883
7058
|
const _errs6 = errors;
|
|
6884
7059
|
if (typeof data2 !== "string") {
|
|
6885
|
-
|
|
7060
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6886
7061
|
return false;
|
|
6887
7062
|
}
|
|
6888
7063
|
if (!(data2 === "Messages")) {
|
|
6889
|
-
|
|
7064
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema87.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
6890
7065
|
return false;
|
|
6891
7066
|
}
|
|
6892
7067
|
var valid1 = _errs6 === errors;
|
|
@@ -6899,11 +7074,11 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6899
7074
|
let data3 = data1.method;
|
|
6900
7075
|
const _errs8 = errors;
|
|
6901
7076
|
if (typeof data3 !== "string") {
|
|
6902
|
-
|
|
7077
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6903
7078
|
return false;
|
|
6904
7079
|
}
|
|
6905
|
-
if (!(data3 === "
|
|
6906
|
-
|
|
7080
|
+
if (!(data3 === "Read")) {
|
|
7081
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema87.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
6907
7082
|
return false;
|
|
6908
7083
|
}
|
|
6909
7084
|
var valid1 = _errs8 === errors;
|
|
@@ -6913,10 +7088,20 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6913
7088
|
}
|
|
6914
7089
|
if (valid1) {
|
|
6915
7090
|
if (data1.messageTimestamp !== undefined) {
|
|
7091
|
+
let data4 = data1.messageTimestamp;
|
|
6916
7092
|
const _errs10 = errors;
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
7093
|
+
const _errs11 = errors;
|
|
7094
|
+
if (errors === _errs11) {
|
|
7095
|
+
if (typeof data4 === "string") {
|
|
7096
|
+
if (!pattern14.test(data4)) {
|
|
7097
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
7098
|
+
return false;
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7101
|
+
else {
|
|
7102
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7103
|
+
return false;
|
|
7104
|
+
}
|
|
6920
7105
|
}
|
|
6921
7106
|
var valid1 = _errs10 === errors;
|
|
6922
7107
|
}
|
|
@@ -6924,52 +7109,34 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6924
7109
|
var valid1 = true;
|
|
6925
7110
|
}
|
|
6926
7111
|
if (valid1) {
|
|
6927
|
-
if (data1.
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
var valid2 = true;
|
|
6933
|
-
const len0 = data5.length;
|
|
6934
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
6935
|
-
const _errs14 = errors;
|
|
6936
|
-
if (!(validate56(data5[i0], { instancePath: instancePath + "/descriptor/filters/" + i0, parentData: data5, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
6937
|
-
vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
|
|
6938
|
-
errors = vErrors.length;
|
|
6939
|
-
}
|
|
6940
|
-
var valid2 = _errs14 === errors;
|
|
6941
|
-
if (!valid2) {
|
|
6942
|
-
break;
|
|
6943
|
-
}
|
|
6944
|
-
}
|
|
6945
|
-
}
|
|
6946
|
-
else {
|
|
6947
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/filters", schemaPath: "#/properties/descriptor/properties/filters/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
6948
|
-
return false;
|
|
6949
|
-
}
|
|
7112
|
+
if (data1.messageCid !== undefined) {
|
|
7113
|
+
const _errs13 = errors;
|
|
7114
|
+
if (typeof data1.messageCid !== "string") {
|
|
7115
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/messageCid", schemaPath: "#/properties/descriptor/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7116
|
+
return false;
|
|
6950
7117
|
}
|
|
6951
|
-
var valid1 =
|
|
7118
|
+
var valid1 = _errs13 === errors;
|
|
6952
7119
|
}
|
|
6953
7120
|
else {
|
|
6954
7121
|
var valid1 = true;
|
|
6955
7122
|
}
|
|
6956
7123
|
if (valid1) {
|
|
6957
7124
|
if (data1.permissionGrantIds !== undefined) {
|
|
6958
|
-
let
|
|
7125
|
+
let data6 = data1.permissionGrantIds;
|
|
6959
7126
|
const _errs15 = errors;
|
|
6960
7127
|
if (errors === _errs15) {
|
|
6961
|
-
if (Array.isArray(
|
|
6962
|
-
if (
|
|
6963
|
-
|
|
7128
|
+
if (Array.isArray(data6)) {
|
|
7129
|
+
if (data6.length < 1) {
|
|
7130
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
6964
7131
|
return false;
|
|
6965
7132
|
}
|
|
6966
7133
|
else {
|
|
6967
7134
|
var valid3 = true;
|
|
6968
|
-
const
|
|
6969
|
-
for (let
|
|
7135
|
+
const len0 = data6.length;
|
|
7136
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
6970
7137
|
const _errs17 = errors;
|
|
6971
|
-
if (typeof
|
|
6972
|
-
|
|
7138
|
+
if (typeof data6[i0] !== "string") {
|
|
7139
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i0, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6973
7140
|
return false;
|
|
6974
7141
|
}
|
|
6975
7142
|
var valid3 = _errs17 === errors;
|
|
@@ -6978,29 +7145,29 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6978
7145
|
}
|
|
6979
7146
|
}
|
|
6980
7147
|
if (valid3) {
|
|
6981
|
-
let
|
|
7148
|
+
let i1 = data6.length;
|
|
6982
7149
|
let j0;
|
|
6983
|
-
if (
|
|
7150
|
+
if (i1 > 1) {
|
|
6984
7151
|
const indices0 = {};
|
|
6985
|
-
for (;
|
|
6986
|
-
let item0 =
|
|
7152
|
+
for (; i1--;) {
|
|
7153
|
+
let item0 = data6[i1];
|
|
6987
7154
|
if (typeof item0 !== "string") {
|
|
6988
7155
|
continue;
|
|
6989
7156
|
}
|
|
6990
7157
|
if (typeof indices0[item0] == "number") {
|
|
6991
7158
|
j0 = indices0[item0];
|
|
6992
|
-
|
|
7159
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
6993
7160
|
return false;
|
|
6994
7161
|
break;
|
|
6995
7162
|
}
|
|
6996
|
-
indices0[item0] =
|
|
7163
|
+
indices0[item0] = i1;
|
|
6997
7164
|
}
|
|
6998
7165
|
}
|
|
6999
7166
|
}
|
|
7000
7167
|
}
|
|
7001
7168
|
}
|
|
7002
7169
|
else {
|
|
7003
|
-
|
|
7170
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7004
7171
|
return false;
|
|
7005
7172
|
}
|
|
7006
7173
|
}
|
|
@@ -7009,128 +7176,6 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7009
7176
|
else {
|
|
7010
7177
|
var valid1 = true;
|
|
7011
7178
|
}
|
|
7012
|
-
if (valid1) {
|
|
7013
|
-
if (data1.cursor !== undefined) {
|
|
7014
|
-
let data9 = data1.cursor;
|
|
7015
|
-
const _errs19 = errors;
|
|
7016
|
-
const _errs20 = errors;
|
|
7017
|
-
if (errors === _errs20) {
|
|
7018
|
-
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
7019
|
-
let missing2;
|
|
7020
|
-
if (((((data9.streamId === undefined) && (missing2 = "streamId")) || ((data9.epoch === undefined) && (missing2 = "epoch"))) || ((data9.position === undefined) && (missing2 = "position"))) || ((data9.messageCid === undefined) && (missing2 = "messageCid"))) {
|
|
7021
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
7022
|
-
return false;
|
|
7023
|
-
}
|
|
7024
|
-
else {
|
|
7025
|
-
const _errs22 = errors;
|
|
7026
|
-
for (const key2 in data9) {
|
|
7027
|
-
if (!((((key2 === "streamId") || (key2 === "epoch")) || (key2 === "position")) || (key2 === "messageCid"))) {
|
|
7028
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
7029
|
-
return false;
|
|
7030
|
-
break;
|
|
7031
|
-
}
|
|
7032
|
-
}
|
|
7033
|
-
if (_errs22 === errors) {
|
|
7034
|
-
if (data9.streamId !== undefined) {
|
|
7035
|
-
let data10 = data9.streamId;
|
|
7036
|
-
const _errs23 = errors;
|
|
7037
|
-
if (errors === _errs23) {
|
|
7038
|
-
if (typeof data10 === "string") {
|
|
7039
|
-
if (func1(data10) < 1) {
|
|
7040
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7041
|
-
return false;
|
|
7042
|
-
}
|
|
7043
|
-
}
|
|
7044
|
-
else {
|
|
7045
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7046
|
-
return false;
|
|
7047
|
-
}
|
|
7048
|
-
}
|
|
7049
|
-
var valid6 = _errs23 === errors;
|
|
7050
|
-
}
|
|
7051
|
-
else {
|
|
7052
|
-
var valid6 = true;
|
|
7053
|
-
}
|
|
7054
|
-
if (valid6) {
|
|
7055
|
-
if (data9.epoch !== undefined) {
|
|
7056
|
-
let data11 = data9.epoch;
|
|
7057
|
-
const _errs25 = errors;
|
|
7058
|
-
if (errors === _errs25) {
|
|
7059
|
-
if (typeof data11 === "string") {
|
|
7060
|
-
if (func1(data11) < 1) {
|
|
7061
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7062
|
-
return false;
|
|
7063
|
-
}
|
|
7064
|
-
}
|
|
7065
|
-
else {
|
|
7066
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7067
|
-
return false;
|
|
7068
|
-
}
|
|
7069
|
-
}
|
|
7070
|
-
var valid6 = _errs25 === errors;
|
|
7071
|
-
}
|
|
7072
|
-
else {
|
|
7073
|
-
var valid6 = true;
|
|
7074
|
-
}
|
|
7075
|
-
if (valid6) {
|
|
7076
|
-
if (data9.position !== undefined) {
|
|
7077
|
-
let data12 = data9.position;
|
|
7078
|
-
const _errs27 = errors;
|
|
7079
|
-
if (errors === _errs27) {
|
|
7080
|
-
if (typeof data12 === "string") {
|
|
7081
|
-
if (func1(data12) < 1) {
|
|
7082
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7083
|
-
return false;
|
|
7084
|
-
}
|
|
7085
|
-
}
|
|
7086
|
-
else {
|
|
7087
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7088
|
-
return false;
|
|
7089
|
-
}
|
|
7090
|
-
}
|
|
7091
|
-
var valid6 = _errs27 === errors;
|
|
7092
|
-
}
|
|
7093
|
-
else {
|
|
7094
|
-
var valid6 = true;
|
|
7095
|
-
}
|
|
7096
|
-
if (valid6) {
|
|
7097
|
-
if (data9.messageCid !== undefined) {
|
|
7098
|
-
let data13 = data9.messageCid;
|
|
7099
|
-
const _errs29 = errors;
|
|
7100
|
-
if (errors === _errs29) {
|
|
7101
|
-
if (typeof data13 === "string") {
|
|
7102
|
-
if (func1(data13) < 1) {
|
|
7103
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7104
|
-
return false;
|
|
7105
|
-
}
|
|
7106
|
-
}
|
|
7107
|
-
else {
|
|
7108
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7109
|
-
return false;
|
|
7110
|
-
}
|
|
7111
|
-
}
|
|
7112
|
-
var valid6 = _errs29 === errors;
|
|
7113
|
-
}
|
|
7114
|
-
else {
|
|
7115
|
-
var valid6 = true;
|
|
7116
|
-
}
|
|
7117
|
-
}
|
|
7118
|
-
}
|
|
7119
|
-
}
|
|
7120
|
-
}
|
|
7121
|
-
}
|
|
7122
|
-
}
|
|
7123
|
-
else {
|
|
7124
|
-
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7125
|
-
return false;
|
|
7126
|
-
}
|
|
7127
|
-
}
|
|
7128
|
-
var valid1 = _errs19 === errors;
|
|
7129
|
-
}
|
|
7130
|
-
else {
|
|
7131
|
-
var valid1 = true;
|
|
7132
|
-
}
|
|
7133
|
-
}
|
|
7134
7179
|
}
|
|
7135
7180
|
}
|
|
7136
7181
|
}
|
|
@@ -7139,7 +7184,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7139
7184
|
}
|
|
7140
7185
|
}
|
|
7141
7186
|
else {
|
|
7142
|
-
|
|
7187
|
+
validate60.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7143
7188
|
return false;
|
|
7144
7189
|
}
|
|
7145
7190
|
}
|
|
@@ -7153,22 +7198,21 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7153
7198
|
}
|
|
7154
7199
|
}
|
|
7155
7200
|
else {
|
|
7156
|
-
|
|
7201
|
+
validate60.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7157
7202
|
return false;
|
|
7158
7203
|
}
|
|
7159
|
-
}
|
|
7160
|
-
|
|
7161
|
-
export const
|
|
7162
|
-
const
|
|
7163
|
-
|
|
7164
|
-
function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-sync.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate62.evaluated; if (evaluated0.dynamicProps) {
|
|
7204
|
+
} validate60.errors = vErrors; return errors === 0; }
|
|
7205
|
+
validate60.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7206
|
+
export const MessagesSubscribe = validate62;
|
|
7207
|
+
const schema89 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/messages-subscribe.json", "type": "object", "additionalProperties": false, "required": ["descriptor", "authorization"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filters"], "properties": { "interface": { "enum": ["Messages"], "type": "string" }, "method": { "enum": ["Subscribe"], "type": "string" }, "messageTimestamp": { "type": "string" }, "filters": { "type": "array", "items": { "$ref": "https://identity.foundation/dwn/json-schemas/messages-filter.json" } }, "permissionGrantIds": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true }, "cursor": { "$ref": "https://identity.foundation/dwn/json-schemas/progress-token.json" } } } } };
|
|
7208
|
+
function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/messages-subscribe.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate62.evaluated; if (evaluated0.dynamicProps) {
|
|
7165
7209
|
evaluated0.props = undefined;
|
|
7166
7210
|
} if (evaluated0.dynamicItems) {
|
|
7167
7211
|
evaluated0.items = undefined;
|
|
7168
7212
|
} if (errors === 0) {
|
|
7169
7213
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
7170
7214
|
let missing0;
|
|
7171
|
-
if (((data.
|
|
7215
|
+
if (((data.descriptor === undefined) && (missing0 = "descriptor")) || ((data.authorization === undefined) && (missing0 = "authorization"))) {
|
|
7172
7216
|
validate62.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
7173
7217
|
return false;
|
|
7174
7218
|
}
|
|
@@ -7197,404 +7241,274 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7197
7241
|
if (data.descriptor !== undefined) {
|
|
7198
7242
|
let data1 = data.descriptor;
|
|
7199
7243
|
const _errs3 = errors;
|
|
7200
|
-
const _errs5 = errors;
|
|
7201
|
-
const _errs6 = errors;
|
|
7202
|
-
let valid2 = true;
|
|
7203
|
-
const _errs7 = errors;
|
|
7204
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7205
|
-
if (data1.action !== undefined) {
|
|
7206
|
-
if ("subtree" !== data1.action) {
|
|
7207
|
-
const err0 = {};
|
|
7208
|
-
if (vErrors === null) {
|
|
7209
|
-
vErrors = [err0];
|
|
7210
|
-
}
|
|
7211
|
-
else {
|
|
7212
|
-
vErrors.push(err0);
|
|
7213
|
-
}
|
|
7214
|
-
errors++;
|
|
7215
|
-
}
|
|
7216
|
-
}
|
|
7217
|
-
}
|
|
7218
|
-
var _valid0 = _errs7 === errors;
|
|
7219
|
-
errors = _errs6;
|
|
7220
|
-
if (vErrors !== null) {
|
|
7221
|
-
if (_errs6) {
|
|
7222
|
-
vErrors.length = _errs6;
|
|
7223
|
-
}
|
|
7224
|
-
else {
|
|
7225
|
-
vErrors = null;
|
|
7226
|
-
}
|
|
7227
|
-
}
|
|
7228
|
-
if (_valid0) {
|
|
7229
|
-
const _errs9 = errors;
|
|
7230
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7231
|
-
let missing1;
|
|
7232
|
-
if ((data1.prefix === undefined) && (missing1 = "prefix")) {
|
|
7233
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
7234
|
-
return false;
|
|
7235
|
-
}
|
|
7236
|
-
}
|
|
7237
|
-
var _valid0 = _errs9 === errors;
|
|
7238
|
-
valid2 = _valid0;
|
|
7239
|
-
}
|
|
7240
|
-
if (!valid2) {
|
|
7241
|
-
const err1 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7242
|
-
if (vErrors === null) {
|
|
7243
|
-
vErrors = [err1];
|
|
7244
|
-
}
|
|
7245
|
-
else {
|
|
7246
|
-
vErrors.push(err1);
|
|
7247
|
-
}
|
|
7248
|
-
errors++;
|
|
7249
|
-
validate62.errors = vErrors;
|
|
7250
|
-
return false;
|
|
7251
|
-
}
|
|
7252
|
-
var valid1 = _errs5 === errors;
|
|
7253
|
-
if (valid1) {
|
|
7254
|
-
const _errs10 = errors;
|
|
7255
|
-
const _errs11 = errors;
|
|
7256
|
-
let valid4 = true;
|
|
7257
|
-
const _errs12 = errors;
|
|
7258
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7259
|
-
if (data1.action !== undefined) {
|
|
7260
|
-
if ("leaves" !== data1.action) {
|
|
7261
|
-
const err2 = {};
|
|
7262
|
-
if (vErrors === null) {
|
|
7263
|
-
vErrors = [err2];
|
|
7264
|
-
}
|
|
7265
|
-
else {
|
|
7266
|
-
vErrors.push(err2);
|
|
7267
|
-
}
|
|
7268
|
-
errors++;
|
|
7269
|
-
}
|
|
7270
|
-
}
|
|
7271
|
-
}
|
|
7272
|
-
var _valid1 = _errs12 === errors;
|
|
7273
|
-
errors = _errs11;
|
|
7274
|
-
if (vErrors !== null) {
|
|
7275
|
-
if (_errs11) {
|
|
7276
|
-
vErrors.length = _errs11;
|
|
7277
|
-
}
|
|
7278
|
-
else {
|
|
7279
|
-
vErrors = null;
|
|
7280
|
-
}
|
|
7281
|
-
}
|
|
7282
|
-
if (_valid1) {
|
|
7283
|
-
const _errs14 = errors;
|
|
7284
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7285
|
-
let missing2;
|
|
7286
|
-
if ((data1.prefix === undefined) && (missing2 = "prefix")) {
|
|
7287
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
7288
|
-
return false;
|
|
7289
|
-
}
|
|
7290
|
-
}
|
|
7291
|
-
var _valid1 = _errs14 === errors;
|
|
7292
|
-
valid4 = _valid1;
|
|
7293
|
-
}
|
|
7294
|
-
if (!valid4) {
|
|
7295
|
-
const err3 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7296
|
-
if (vErrors === null) {
|
|
7297
|
-
vErrors = [err3];
|
|
7298
|
-
}
|
|
7299
|
-
else {
|
|
7300
|
-
vErrors.push(err3);
|
|
7301
|
-
}
|
|
7302
|
-
errors++;
|
|
7303
|
-
validate62.errors = vErrors;
|
|
7304
|
-
return false;
|
|
7305
|
-
}
|
|
7306
|
-
var valid1 = _errs10 === errors;
|
|
7307
|
-
if (valid1) {
|
|
7308
|
-
const _errs15 = errors;
|
|
7309
|
-
const _errs16 = errors;
|
|
7310
|
-
let valid6 = true;
|
|
7311
|
-
const _errs17 = errors;
|
|
7312
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7313
|
-
if (data1.action !== undefined) {
|
|
7314
|
-
if ("diff" !== data1.action) {
|
|
7315
|
-
const err4 = {};
|
|
7316
|
-
if (vErrors === null) {
|
|
7317
|
-
vErrors = [err4];
|
|
7318
|
-
}
|
|
7319
|
-
else {
|
|
7320
|
-
vErrors.push(err4);
|
|
7321
|
-
}
|
|
7322
|
-
errors++;
|
|
7323
|
-
}
|
|
7324
|
-
}
|
|
7325
|
-
}
|
|
7326
|
-
var _valid2 = _errs17 === errors;
|
|
7327
|
-
errors = _errs16;
|
|
7328
|
-
if (vErrors !== null) {
|
|
7329
|
-
if (_errs16) {
|
|
7330
|
-
vErrors.length = _errs16;
|
|
7331
|
-
}
|
|
7332
|
-
else {
|
|
7333
|
-
vErrors = null;
|
|
7334
|
-
}
|
|
7335
|
-
}
|
|
7336
|
-
if (_valid2) {
|
|
7337
|
-
const _errs19 = errors;
|
|
7338
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7339
|
-
let missing3;
|
|
7340
|
-
if (((data1.hashes === undefined) && (missing3 = "hashes")) || ((data1.depth === undefined) && (missing3 = "depth"))) {
|
|
7341
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
7342
|
-
return false;
|
|
7343
|
-
}
|
|
7344
|
-
}
|
|
7345
|
-
var _valid2 = _errs19 === errors;
|
|
7346
|
-
valid6 = _valid2;
|
|
7347
|
-
}
|
|
7348
|
-
if (!valid6) {
|
|
7349
|
-
const err5 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7350
|
-
if (vErrors === null) {
|
|
7351
|
-
vErrors = [err5];
|
|
7352
|
-
}
|
|
7353
|
-
else {
|
|
7354
|
-
vErrors.push(err5);
|
|
7355
|
-
}
|
|
7356
|
-
errors++;
|
|
7357
|
-
validate62.errors = vErrors;
|
|
7358
|
-
return false;
|
|
7359
|
-
}
|
|
7360
|
-
var valid1 = _errs15 === errors;
|
|
7361
|
-
}
|
|
7362
|
-
}
|
|
7363
7244
|
if (errors === _errs3) {
|
|
7364
7245
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7365
|
-
let
|
|
7366
|
-
if (((((data1.interface === undefined) && (
|
|
7367
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty:
|
|
7246
|
+
let missing1;
|
|
7247
|
+
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.filters === undefined) && (missing1 = "filters"))) {
|
|
7248
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
7368
7249
|
return false;
|
|
7369
7250
|
}
|
|
7370
7251
|
else {
|
|
7371
|
-
const
|
|
7252
|
+
const _errs5 = errors;
|
|
7372
7253
|
for (const key1 in data1) {
|
|
7373
|
-
if (!(
|
|
7254
|
+
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filters")) || (key1 === "permissionGrantIds")) || (key1 === "cursor"))) {
|
|
7374
7255
|
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
7375
7256
|
return false;
|
|
7376
7257
|
break;
|
|
7377
7258
|
}
|
|
7378
7259
|
}
|
|
7379
|
-
if (
|
|
7260
|
+
if (_errs5 === errors) {
|
|
7380
7261
|
if (data1.interface !== undefined) {
|
|
7381
|
-
let
|
|
7382
|
-
const
|
|
7383
|
-
if (typeof
|
|
7262
|
+
let data2 = data1.interface;
|
|
7263
|
+
const _errs6 = errors;
|
|
7264
|
+
if (typeof data2 !== "string") {
|
|
7384
7265
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7385
7266
|
return false;
|
|
7386
7267
|
}
|
|
7387
|
-
if (!(
|
|
7388
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues:
|
|
7268
|
+
if (!(data2 === "Messages")) {
|
|
7269
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema89.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
7389
7270
|
return false;
|
|
7390
7271
|
}
|
|
7391
|
-
var
|
|
7272
|
+
var valid1 = _errs6 === errors;
|
|
7392
7273
|
}
|
|
7393
7274
|
else {
|
|
7394
|
-
var
|
|
7275
|
+
var valid1 = true;
|
|
7395
7276
|
}
|
|
7396
|
-
if (
|
|
7277
|
+
if (valid1) {
|
|
7397
7278
|
if (data1.method !== undefined) {
|
|
7398
|
-
let
|
|
7399
|
-
const
|
|
7400
|
-
if (typeof
|
|
7279
|
+
let data3 = data1.method;
|
|
7280
|
+
const _errs8 = errors;
|
|
7281
|
+
if (typeof data3 !== "string") {
|
|
7401
7282
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7402
7283
|
return false;
|
|
7403
7284
|
}
|
|
7404
|
-
if (!(
|
|
7405
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues:
|
|
7285
|
+
if (!(data3 === "Subscribe")) {
|
|
7286
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema89.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
7406
7287
|
return false;
|
|
7407
7288
|
}
|
|
7408
|
-
var
|
|
7289
|
+
var valid1 = _errs8 === errors;
|
|
7409
7290
|
}
|
|
7410
7291
|
else {
|
|
7411
|
-
var
|
|
7292
|
+
var valid1 = true;
|
|
7412
7293
|
}
|
|
7413
|
-
if (
|
|
7294
|
+
if (valid1) {
|
|
7414
7295
|
if (data1.messageTimestamp !== undefined) {
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7296
|
+
const _errs10 = errors;
|
|
7297
|
+
if (typeof data1.messageTimestamp !== "string") {
|
|
7298
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "#/properties/descriptor/properties/messageTimestamp/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7299
|
+
return false;
|
|
7300
|
+
}
|
|
7301
|
+
var valid1 = _errs10 === errors;
|
|
7302
|
+
}
|
|
7303
|
+
else {
|
|
7304
|
+
var valid1 = true;
|
|
7305
|
+
}
|
|
7306
|
+
if (valid1) {
|
|
7307
|
+
if (data1.filters !== undefined) {
|
|
7308
|
+
let data5 = data1.filters;
|
|
7309
|
+
const _errs12 = errors;
|
|
7310
|
+
if (errors === _errs12) {
|
|
7311
|
+
if (Array.isArray(data5)) {
|
|
7312
|
+
var valid2 = true;
|
|
7313
|
+
const len0 = data5.length;
|
|
7314
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
7315
|
+
const _errs14 = errors;
|
|
7316
|
+
if (!(validate56(data5[i0], { instancePath: instancePath + "/descriptor/filters/" + i0, parentData: data5, parentDataProperty: i0, rootData, dynamicAnchors }))) {
|
|
7317
|
+
vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
|
|
7318
|
+
errors = vErrors.length;
|
|
7319
|
+
}
|
|
7320
|
+
var valid2 = _errs14 === errors;
|
|
7321
|
+
if (!valid2) {
|
|
7322
|
+
break;
|
|
7323
|
+
}
|
|
7324
|
+
}
|
|
7325
|
+
}
|
|
7326
|
+
else {
|
|
7327
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/filters", schemaPath: "#/properties/descriptor/properties/filters/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7422
7328
|
return false;
|
|
7423
7329
|
}
|
|
7424
7330
|
}
|
|
7425
|
-
|
|
7426
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7427
|
-
return false;
|
|
7428
|
-
}
|
|
7429
|
-
}
|
|
7430
|
-
var valid8 = _errs25 === errors;
|
|
7431
|
-
}
|
|
7432
|
-
else {
|
|
7433
|
-
var valid8 = true;
|
|
7434
|
-
}
|
|
7435
|
-
if (valid8) {
|
|
7436
|
-
if (data1.action !== undefined) {
|
|
7437
|
-
let data8 = data1.action;
|
|
7438
|
-
const _errs28 = errors;
|
|
7439
|
-
if (typeof data8 !== "string") {
|
|
7440
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7441
|
-
return false;
|
|
7442
|
-
}
|
|
7443
|
-
if (!((((data8 === "root") || (data8 === "subtree")) || (data8 === "leaves")) || (data8 === "diff"))) {
|
|
7444
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/action", schemaPath: "#/properties/descriptor/properties/action/enum", keyword: "enum", params: { allowedValues: schema88.properties.descriptor.properties.action.enum }, message: "must be equal to one of the allowed values" }];
|
|
7445
|
-
return false;
|
|
7446
|
-
}
|
|
7447
|
-
var valid8 = _errs28 === errors;
|
|
7331
|
+
var valid1 = _errs12 === errors;
|
|
7448
7332
|
}
|
|
7449
7333
|
else {
|
|
7450
|
-
var
|
|
7334
|
+
var valid1 = true;
|
|
7451
7335
|
}
|
|
7452
|
-
if (
|
|
7453
|
-
if (data1.
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
}
|
|
7461
|
-
else {
|
|
7462
|
-
var valid8 = true;
|
|
7463
|
-
}
|
|
7464
|
-
if (valid8) {
|
|
7465
|
-
if (data1.prefix !== undefined) {
|
|
7466
|
-
let data10 = data1.prefix;
|
|
7467
|
-
const _errs32 = errors;
|
|
7468
|
-
if (errors === _errs32) {
|
|
7469
|
-
if (typeof data10 === "string") {
|
|
7470
|
-
if (!pattern37.test(data10)) {
|
|
7471
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/prefix", schemaPath: "#/properties/descriptor/properties/prefix/pattern", keyword: "pattern", params: { pattern: "^[01]*$" }, message: "must match pattern \"" + "^[01]*$" + "\"" }];
|
|
7472
|
-
return false;
|
|
7473
|
-
}
|
|
7474
|
-
}
|
|
7475
|
-
else {
|
|
7476
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/prefix", schemaPath: "#/properties/descriptor/properties/prefix/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7336
|
+
if (valid1) {
|
|
7337
|
+
if (data1.permissionGrantIds !== undefined) {
|
|
7338
|
+
let data7 = data1.permissionGrantIds;
|
|
7339
|
+
const _errs15 = errors;
|
|
7340
|
+
if (errors === _errs15) {
|
|
7341
|
+
if (Array.isArray(data7)) {
|
|
7342
|
+
if (data7.length < 1) {
|
|
7343
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
7477
7344
|
return false;
|
|
7478
7345
|
}
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
if (data1.permissionGrantIds !== undefined) {
|
|
7487
|
-
let data11 = data1.permissionGrantIds;
|
|
7488
|
-
const _errs34 = errors;
|
|
7489
|
-
if (errors === _errs34) {
|
|
7490
|
-
if (Array.isArray(data11)) {
|
|
7491
|
-
if (data11.length < 1) {
|
|
7492
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
7346
|
+
else {
|
|
7347
|
+
var valid3 = true;
|
|
7348
|
+
const len1 = data7.length;
|
|
7349
|
+
for (let i1 = 0; i1 < len1; i1++) {
|
|
7350
|
+
const _errs17 = errors;
|
|
7351
|
+
if (typeof data7[i1] !== "string") {
|
|
7352
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i1, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7493
7353
|
return false;
|
|
7494
7354
|
}
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7355
|
+
var valid3 = _errs17 === errors;
|
|
7356
|
+
if (!valid3) {
|
|
7357
|
+
break;
|
|
7358
|
+
}
|
|
7359
|
+
}
|
|
7360
|
+
if (valid3) {
|
|
7361
|
+
let i2 = data7.length;
|
|
7362
|
+
let j0;
|
|
7363
|
+
if (i2 > 1) {
|
|
7364
|
+
const indices0 = {};
|
|
7365
|
+
for (; i2--;) {
|
|
7366
|
+
let item0 = data7[i2];
|
|
7367
|
+
if (typeof item0 !== "string") {
|
|
7368
|
+
continue;
|
|
7503
7369
|
}
|
|
7504
|
-
|
|
7505
|
-
|
|
7370
|
+
if (typeof indices0[item0] == "number") {
|
|
7371
|
+
j0 = indices0[item0];
|
|
7372
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i2, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i2 + " are identical)" }];
|
|
7373
|
+
return false;
|
|
7506
7374
|
break;
|
|
7507
7375
|
}
|
|
7508
|
-
|
|
7509
|
-
if (valid10) {
|
|
7510
|
-
let i1 = data11.length;
|
|
7511
|
-
let j0;
|
|
7512
|
-
if (i1 > 1) {
|
|
7513
|
-
const indices0 = {};
|
|
7514
|
-
for (; i1--;) {
|
|
7515
|
-
let item0 = data11[i1];
|
|
7516
|
-
if (typeof item0 !== "string") {
|
|
7517
|
-
continue;
|
|
7518
|
-
}
|
|
7519
|
-
if (typeof indices0[item0] == "number") {
|
|
7520
|
-
j0 = indices0[item0];
|
|
7521
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
7522
|
-
return false;
|
|
7523
|
-
break;
|
|
7524
|
-
}
|
|
7525
|
-
indices0[item0] = i1;
|
|
7526
|
-
}
|
|
7527
|
-
}
|
|
7376
|
+
indices0[item0] = i2;
|
|
7528
7377
|
}
|
|
7529
7378
|
}
|
|
7530
7379
|
}
|
|
7531
|
-
else {
|
|
7532
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7533
|
-
return false;
|
|
7534
|
-
}
|
|
7535
7380
|
}
|
|
7536
|
-
var valid8 = _errs34 === errors;
|
|
7537
7381
|
}
|
|
7538
7382
|
else {
|
|
7539
|
-
|
|
7383
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds", schemaPath: "#/properties/descriptor/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7384
|
+
return false;
|
|
7540
7385
|
}
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
}
|
|
7559
|
-
else {
|
|
7560
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes", schemaPath: "#/properties/descriptor/properties/hashes/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7561
|
-
return false;
|
|
7562
|
-
}
|
|
7386
|
+
}
|
|
7387
|
+
var valid1 = _errs15 === errors;
|
|
7388
|
+
}
|
|
7389
|
+
else {
|
|
7390
|
+
var valid1 = true;
|
|
7391
|
+
}
|
|
7392
|
+
if (valid1) {
|
|
7393
|
+
if (data1.cursor !== undefined) {
|
|
7394
|
+
let data9 = data1.cursor;
|
|
7395
|
+
const _errs19 = errors;
|
|
7396
|
+
const _errs20 = errors;
|
|
7397
|
+
if (errors === _errs20) {
|
|
7398
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
7399
|
+
let missing2;
|
|
7400
|
+
if ((((data9.streamId === undefined) && (missing2 = "streamId")) || ((data9.epoch === undefined) && (missing2 = "epoch"))) || ((data9.position === undefined) && (missing2 = "position"))) {
|
|
7401
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
7402
|
+
return false;
|
|
7563
7403
|
}
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
const _errs43 = errors;
|
|
7573
|
-
if (!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))) {
|
|
7574
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
7575
|
-
return false;
|
|
7404
|
+
else {
|
|
7405
|
+
const _errs22 = errors;
|
|
7406
|
+
for (const key2 in data9) {
|
|
7407
|
+
if (!((((key2 === "streamId") || (key2 === "epoch")) || (key2 === "position")) || (key2 === "messageCid"))) {
|
|
7408
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
7409
|
+
return false;
|
|
7410
|
+
break;
|
|
7411
|
+
}
|
|
7576
7412
|
}
|
|
7577
|
-
if (
|
|
7578
|
-
if (
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7413
|
+
if (_errs22 === errors) {
|
|
7414
|
+
if (data9.streamId !== undefined) {
|
|
7415
|
+
let data10 = data9.streamId;
|
|
7416
|
+
const _errs23 = errors;
|
|
7417
|
+
if (errors === _errs23) {
|
|
7418
|
+
if (typeof data10 === "string") {
|
|
7419
|
+
if (func1(data10) < 1) {
|
|
7420
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7421
|
+
return false;
|
|
7422
|
+
}
|
|
7423
|
+
}
|
|
7424
|
+
else {
|
|
7425
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/streamId", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/streamId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7426
|
+
return false;
|
|
7427
|
+
}
|
|
7428
|
+
}
|
|
7429
|
+
var valid6 = _errs23 === errors;
|
|
7430
|
+
}
|
|
7431
|
+
else {
|
|
7432
|
+
var valid6 = true;
|
|
7433
|
+
}
|
|
7434
|
+
if (valid6) {
|
|
7435
|
+
if (data9.epoch !== undefined) {
|
|
7436
|
+
let data11 = data9.epoch;
|
|
7437
|
+
const _errs25 = errors;
|
|
7438
|
+
if (errors === _errs25) {
|
|
7439
|
+
if (typeof data11 === "string") {
|
|
7440
|
+
if (func1(data11) < 1) {
|
|
7441
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7442
|
+
return false;
|
|
7443
|
+
}
|
|
7444
|
+
}
|
|
7445
|
+
else {
|
|
7446
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/epoch", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/epoch/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7447
|
+
return false;
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
var valid6 = _errs25 === errors;
|
|
7582
7451
|
}
|
|
7583
7452
|
else {
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7453
|
+
var valid6 = true;
|
|
7454
|
+
}
|
|
7455
|
+
if (valid6) {
|
|
7456
|
+
if (data9.position !== undefined) {
|
|
7457
|
+
let data12 = data9.position;
|
|
7458
|
+
const _errs27 = errors;
|
|
7459
|
+
if (errors === _errs27) {
|
|
7460
|
+
if (typeof data12 === "string") {
|
|
7461
|
+
if (func1(data12) < 1) {
|
|
7462
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7463
|
+
return false;
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
else {
|
|
7467
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/position", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/position/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7468
|
+
return false;
|
|
7469
|
+
}
|
|
7470
|
+
}
|
|
7471
|
+
var valid6 = _errs27 === errors;
|
|
7472
|
+
}
|
|
7473
|
+
else {
|
|
7474
|
+
var valid6 = true;
|
|
7475
|
+
}
|
|
7476
|
+
if (valid6) {
|
|
7477
|
+
if (data9.messageCid !== undefined) {
|
|
7478
|
+
let data13 = data9.messageCid;
|
|
7479
|
+
const _errs29 = errors;
|
|
7480
|
+
if (errors === _errs29) {
|
|
7481
|
+
if (typeof data13 === "string") {
|
|
7482
|
+
if (func1(data13) < 1) {
|
|
7483
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7484
|
+
return false;
|
|
7485
|
+
}
|
|
7486
|
+
}
|
|
7487
|
+
else {
|
|
7488
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor/messageCid", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7489
|
+
return false;
|
|
7490
|
+
}
|
|
7491
|
+
}
|
|
7492
|
+
var valid6 = _errs29 === errors;
|
|
7493
|
+
}
|
|
7494
|
+
else {
|
|
7495
|
+
var valid6 = true;
|
|
7496
|
+
}
|
|
7587
7497
|
}
|
|
7588
7498
|
}
|
|
7589
7499
|
}
|
|
7590
7500
|
}
|
|
7591
|
-
var valid8 = _errs43 === errors;
|
|
7592
|
-
}
|
|
7593
|
-
else {
|
|
7594
|
-
var valid8 = true;
|
|
7595
7501
|
}
|
|
7596
7502
|
}
|
|
7503
|
+
else {
|
|
7504
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "https://identity.foundation/dwn/json-schemas/progress-token.json/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7505
|
+
return false;
|
|
7506
|
+
}
|
|
7597
7507
|
}
|
|
7508
|
+
var valid1 = _errs19 === errors;
|
|
7509
|
+
}
|
|
7510
|
+
else {
|
|
7511
|
+
var valid1 = true;
|
|
7598
7512
|
}
|
|
7599
7513
|
}
|
|
7600
7514
|
}
|
|
@@ -7624,22 +7538,22 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7624
7538
|
}
|
|
7625
7539
|
} validate62.errors = vErrors; return errors === 0; }
|
|
7626
7540
|
validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7627
|
-
export const NumberRangeFilter =
|
|
7628
|
-
function
|
|
7541
|
+
export const NumberRangeFilter = validate65;
|
|
7542
|
+
function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/number-range-filter.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate65.evaluated; if (evaluated0.dynamicProps) {
|
|
7629
7543
|
evaluated0.props = undefined;
|
|
7630
7544
|
} if (evaluated0.dynamicItems) {
|
|
7631
7545
|
evaluated0.items = undefined;
|
|
7632
7546
|
} if (errors === 0) {
|
|
7633
7547
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
7634
7548
|
if (Object.keys(data).length < 1) {
|
|
7635
|
-
|
|
7549
|
+
validate65.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
7636
7550
|
return false;
|
|
7637
7551
|
}
|
|
7638
7552
|
else {
|
|
7639
7553
|
const _errs1 = errors;
|
|
7640
7554
|
for (const key0 in data) {
|
|
7641
7555
|
if (!((((key0 === "gt") || (key0 === "gte")) || (key0 === "lt")) || (key0 === "lte"))) {
|
|
7642
|
-
|
|
7556
|
+
validate65.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
7643
7557
|
return false;
|
|
7644
7558
|
break;
|
|
7645
7559
|
}
|
|
@@ -7664,7 +7578,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7664
7578
|
}
|
|
7665
7579
|
var valid1 = _errs4 === errors;
|
|
7666
7580
|
if (valid1) {
|
|
7667
|
-
|
|
7581
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/gt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7668
7582
|
return false;
|
|
7669
7583
|
}
|
|
7670
7584
|
else {
|
|
@@ -7703,7 +7617,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7703
7617
|
}
|
|
7704
7618
|
var valid2 = _errs7 === errors;
|
|
7705
7619
|
if (valid2) {
|
|
7706
|
-
|
|
7620
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/gte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7707
7621
|
return false;
|
|
7708
7622
|
}
|
|
7709
7623
|
else {
|
|
@@ -7742,7 +7656,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7742
7656
|
}
|
|
7743
7657
|
var valid3 = _errs10 === errors;
|
|
7744
7658
|
if (valid3) {
|
|
7745
|
-
|
|
7659
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/lt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7746
7660
|
return false;
|
|
7747
7661
|
}
|
|
7748
7662
|
else {
|
|
@@ -7781,7 +7695,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7781
7695
|
}
|
|
7782
7696
|
var valid4 = _errs13 === errors;
|
|
7783
7697
|
if (valid4) {
|
|
7784
|
-
|
|
7698
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/lte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7785
7699
|
return false;
|
|
7786
7700
|
}
|
|
7787
7701
|
else {
|
|
@@ -7805,7 +7719,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7805
7719
|
let data0 = data.gt;
|
|
7806
7720
|
const _errs14 = errors;
|
|
7807
7721
|
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
7808
|
-
|
|
7722
|
+
validate65.errors = [{ instancePath: instancePath + "/gt", schemaPath: "#/properties/gt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
7809
7723
|
return false;
|
|
7810
7724
|
}
|
|
7811
7725
|
var valid5 = _errs14 === errors;
|
|
@@ -7818,7 +7732,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7818
7732
|
let data1 = data.gte;
|
|
7819
7733
|
const _errs16 = errors;
|
|
7820
7734
|
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
7821
|
-
|
|
7735
|
+
validate65.errors = [{ instancePath: instancePath + "/gte", schemaPath: "#/properties/gte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
7822
7736
|
return false;
|
|
7823
7737
|
}
|
|
7824
7738
|
var valid5 = _errs16 === errors;
|
|
@@ -7831,7 +7745,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7831
7745
|
let data2 = data.lt;
|
|
7832
7746
|
const _errs18 = errors;
|
|
7833
7747
|
if (!((typeof data2 == "number") && (isFinite(data2)))) {
|
|
7834
|
-
|
|
7748
|
+
validate65.errors = [{ instancePath: instancePath + "/lt", schemaPath: "#/properties/lt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
7835
7749
|
return false;
|
|
7836
7750
|
}
|
|
7837
7751
|
var valid5 = _errs18 === errors;
|
|
@@ -7844,7 +7758,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7844
7758
|
let data3 = data.lte;
|
|
7845
7759
|
const _errs20 = errors;
|
|
7846
7760
|
if (!((typeof data3 == "number") && (isFinite(data3)))) {
|
|
7847
|
-
|
|
7761
|
+
validate65.errors = [{ instancePath: instancePath + "/lte", schemaPath: "#/properties/lte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
7848
7762
|
return false;
|
|
7849
7763
|
}
|
|
7850
7764
|
var valid5 = _errs20 === errors;
|
|
@@ -7863,33 +7777,33 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7863
7777
|
}
|
|
7864
7778
|
}
|
|
7865
7779
|
else {
|
|
7866
|
-
|
|
7780
|
+
validate65.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7867
7781
|
return false;
|
|
7868
7782
|
}
|
|
7869
|
-
}
|
|
7870
|
-
|
|
7871
|
-
export const PaginationCursor =
|
|
7872
|
-
function
|
|
7783
|
+
} validate65.errors = vErrors; return errors === 0; }
|
|
7784
|
+
validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7785
|
+
export const PaginationCursor = validate66;
|
|
7786
|
+
function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/pagination-cursor.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate66.evaluated; if (evaluated0.dynamicProps) {
|
|
7873
7787
|
evaluated0.props = undefined;
|
|
7874
7788
|
} if (evaluated0.dynamicItems) {
|
|
7875
7789
|
evaluated0.items = undefined;
|
|
7876
7790
|
} if (errors === 0) {
|
|
7877
7791
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
7878
7792
|
if (Object.keys(data).length < 1) {
|
|
7879
|
-
|
|
7793
|
+
validate66.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
7880
7794
|
return false;
|
|
7881
7795
|
}
|
|
7882
7796
|
else {
|
|
7883
7797
|
let missing0;
|
|
7884
7798
|
if (((data.messageCid === undefined) && (missing0 = "messageCid")) || ((data.value === undefined) && (missing0 = "value"))) {
|
|
7885
|
-
|
|
7799
|
+
validate66.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
7886
7800
|
return false;
|
|
7887
7801
|
}
|
|
7888
7802
|
else {
|
|
7889
7803
|
const _errs1 = errors;
|
|
7890
7804
|
for (const key0 in data) {
|
|
7891
7805
|
if (!((key0 === "messageCid") || (key0 === "value"))) {
|
|
7892
|
-
|
|
7806
|
+
validate66.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
7893
7807
|
return false;
|
|
7894
7808
|
break;
|
|
7895
7809
|
}
|
|
@@ -7898,7 +7812,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7898
7812
|
if (data.messageCid !== undefined) {
|
|
7899
7813
|
const _errs2 = errors;
|
|
7900
7814
|
if (typeof data.messageCid !== "string") {
|
|
7901
|
-
|
|
7815
|
+
validate66.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7902
7816
|
return false;
|
|
7903
7817
|
}
|
|
7904
7818
|
var valid0 = _errs2 === errors;
|
|
@@ -7911,7 +7825,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7911
7825
|
let data1 = data.value;
|
|
7912
7826
|
const _errs4 = errors;
|
|
7913
7827
|
if ((typeof data1 !== "string") && (!((typeof data1 == "number") && (isFinite(data1))))) {
|
|
7914
|
-
|
|
7828
|
+
validate66.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/properties/value/type", keyword: "type", params: { type: schema72.properties.value.type }, message: "must be string,number" }];
|
|
7915
7829
|
return false;
|
|
7916
7830
|
}
|
|
7917
7831
|
var valid0 = _errs4 === errors;
|
|
@@ -7925,28 +7839,28 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7925
7839
|
}
|
|
7926
7840
|
}
|
|
7927
7841
|
else {
|
|
7928
|
-
|
|
7842
|
+
validate66.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7929
7843
|
return false;
|
|
7930
7844
|
}
|
|
7931
|
-
}
|
|
7932
|
-
|
|
7933
|
-
export const ProgressToken =
|
|
7934
|
-
function
|
|
7845
|
+
} validate66.errors = vErrors; return errors === 0; }
|
|
7846
|
+
validate66.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7847
|
+
export const ProgressToken = validate67;
|
|
7848
|
+
function validate67(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/progress-token.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate67.evaluated; if (evaluated0.dynamicProps) {
|
|
7935
7849
|
evaluated0.props = undefined;
|
|
7936
7850
|
} if (evaluated0.dynamicItems) {
|
|
7937
7851
|
evaluated0.items = undefined;
|
|
7938
7852
|
} if (errors === 0) {
|
|
7939
7853
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
7940
7854
|
let missing0;
|
|
7941
|
-
if ((((
|
|
7942
|
-
|
|
7855
|
+
if ((((data.streamId === undefined) && (missing0 = "streamId")) || ((data.epoch === undefined) && (missing0 = "epoch"))) || ((data.position === undefined) && (missing0 = "position"))) {
|
|
7856
|
+
validate67.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
7943
7857
|
return false;
|
|
7944
7858
|
}
|
|
7945
7859
|
else {
|
|
7946
7860
|
const _errs1 = errors;
|
|
7947
7861
|
for (const key0 in data) {
|
|
7948
7862
|
if (!((((key0 === "streamId") || (key0 === "epoch")) || (key0 === "position")) || (key0 === "messageCid"))) {
|
|
7949
|
-
|
|
7863
|
+
validate67.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
7950
7864
|
return false;
|
|
7951
7865
|
break;
|
|
7952
7866
|
}
|
|
@@ -7958,12 +7872,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7958
7872
|
if (errors === _errs2) {
|
|
7959
7873
|
if (typeof data0 === "string") {
|
|
7960
7874
|
if (func1(data0) < 1) {
|
|
7961
|
-
|
|
7875
|
+
validate67.errors = [{ instancePath: instancePath + "/streamId", schemaPath: "#/properties/streamId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7962
7876
|
return false;
|
|
7963
7877
|
}
|
|
7964
7878
|
}
|
|
7965
7879
|
else {
|
|
7966
|
-
|
|
7880
|
+
validate67.errors = [{ instancePath: instancePath + "/streamId", schemaPath: "#/properties/streamId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7967
7881
|
return false;
|
|
7968
7882
|
}
|
|
7969
7883
|
}
|
|
@@ -7979,12 +7893,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7979
7893
|
if (errors === _errs4) {
|
|
7980
7894
|
if (typeof data1 === "string") {
|
|
7981
7895
|
if (func1(data1) < 1) {
|
|
7982
|
-
|
|
7896
|
+
validate67.errors = [{ instancePath: instancePath + "/epoch", schemaPath: "#/properties/epoch/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
7983
7897
|
return false;
|
|
7984
7898
|
}
|
|
7985
7899
|
}
|
|
7986
7900
|
else {
|
|
7987
|
-
|
|
7901
|
+
validate67.errors = [{ instancePath: instancePath + "/epoch", schemaPath: "#/properties/epoch/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7988
7902
|
return false;
|
|
7989
7903
|
}
|
|
7990
7904
|
}
|
|
@@ -8000,12 +7914,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8000
7914
|
if (errors === _errs6) {
|
|
8001
7915
|
if (typeof data2 === "string") {
|
|
8002
7916
|
if (func1(data2) < 1) {
|
|
8003
|
-
|
|
7917
|
+
validate67.errors = [{ instancePath: instancePath + "/position", schemaPath: "#/properties/position/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8004
7918
|
return false;
|
|
8005
7919
|
}
|
|
8006
7920
|
}
|
|
8007
7921
|
else {
|
|
8008
|
-
|
|
7922
|
+
validate67.errors = [{ instancePath: instancePath + "/position", schemaPath: "#/properties/position/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8009
7923
|
return false;
|
|
8010
7924
|
}
|
|
8011
7925
|
}
|
|
@@ -8021,12 +7935,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8021
7935
|
if (errors === _errs8) {
|
|
8022
7936
|
if (typeof data3 === "string") {
|
|
8023
7937
|
if (func1(data3) < 1) {
|
|
8024
|
-
|
|
7938
|
+
validate67.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8025
7939
|
return false;
|
|
8026
7940
|
}
|
|
8027
7941
|
}
|
|
8028
7942
|
else {
|
|
8029
|
-
|
|
7943
|
+
validate67.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8030
7944
|
return false;
|
|
8031
7945
|
}
|
|
8032
7946
|
}
|
|
@@ -8042,25 +7956,25 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8042
7956
|
}
|
|
8043
7957
|
}
|
|
8044
7958
|
else {
|
|
8045
|
-
|
|
7959
|
+
validate67.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
8046
7960
|
return false;
|
|
8047
7961
|
}
|
|
8048
|
-
}
|
|
8049
|
-
|
|
8050
|
-
export const PermissionGrantData =
|
|
8051
|
-
const
|
|
8052
|
-
const
|
|
8053
|
-
const
|
|
8054
|
-
const
|
|
8055
|
-
const
|
|
8056
|
-
const
|
|
8057
|
-
const
|
|
8058
|
-
const
|
|
8059
|
-
const
|
|
8060
|
-
const
|
|
8061
|
-
const
|
|
8062
|
-
const
|
|
8063
|
-
function
|
|
7962
|
+
} validate67.errors = vErrors; return errors === 0; }
|
|
7963
|
+
validate67.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7964
|
+
export const PermissionGrantData = validate68;
|
|
7965
|
+
const schema94 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-grant-data.json", "type": "object", "additionalProperties": false, "required": ["dateExpires", "scope"], "properties": { "description": { "type": "string" }, "dateExpires": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "requestId": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" }, "delegateKeyDelivery": { "type": "object", "additionalProperties": false, "required": ["rootKeyId", "publicKeyJwk"], "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "type": "object" } } } } };
|
|
7966
|
+
const schema108 = { "type": "object", "additionalProperties": false, "properties": { "publication": { "enum": ["Required", "Prohibited"], "type": "string" } } };
|
|
7967
|
+
const schema97 = { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$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" }] };
|
|
7968
|
+
const schema99 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } }, "allOf": [{ "not": { "required": ["contextId", "protocolPath"] } }, { "if": { "anyOf": [{ "required": ["contextId"] }, { "required": ["protocolPath"] }] }, "then": { "required": ["protocol"] } }] };
|
|
7969
|
+
const schema100 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } };
|
|
7970
|
+
const schema101 = { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } };
|
|
7971
|
+
const schema102 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7972
|
+
const schema103 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7973
|
+
const schema104 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7974
|
+
const schema105 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Query" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7975
|
+
const schema106 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Subscribe" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7976
|
+
const schema107 = { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Count" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } };
|
|
7977
|
+
function validate70(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate70.evaluated; if (evaluated0.dynamicProps) {
|
|
8064
7978
|
evaluated0.props = undefined;
|
|
8065
7979
|
} if (evaluated0.dynamicItems) {
|
|
8066
7980
|
evaluated0.items = undefined;
|
|
@@ -9688,7 +9602,7 @@ else {
|
|
|
9688
9602
|
vErrors.push(err89);
|
|
9689
9603
|
}
|
|
9690
9604
|
errors++;
|
|
9691
|
-
|
|
9605
|
+
validate70.errors = vErrors;
|
|
9692
9606
|
return false;
|
|
9693
9607
|
}
|
|
9694
9608
|
else {
|
|
@@ -9701,9 +9615,9 @@ else {
|
|
|
9701
9615
|
vErrors = null;
|
|
9702
9616
|
}
|
|
9703
9617
|
}
|
|
9704
|
-
}
|
|
9705
|
-
|
|
9706
|
-
function
|
|
9618
|
+
} validate70.errors = vErrors; evaluated0.props = props0; return errors === 0; }
|
|
9619
|
+
validate70.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
9620
|
+
function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-grant-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate68.evaluated; if (evaluated0.dynamicProps) {
|
|
9707
9621
|
evaluated0.props = undefined;
|
|
9708
9622
|
} if (evaluated0.dynamicItems) {
|
|
9709
9623
|
evaluated0.items = undefined;
|
|
@@ -9711,14 +9625,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9711
9625
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9712
9626
|
let missing0;
|
|
9713
9627
|
if (((data.dateExpires === undefined) && (missing0 = "dateExpires")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
9714
|
-
|
|
9628
|
+
validate68.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
9715
9629
|
return false;
|
|
9716
9630
|
}
|
|
9717
9631
|
else {
|
|
9718
9632
|
const _errs1 = errors;
|
|
9719
9633
|
for (const key0 in data) {
|
|
9720
9634
|
if (!(((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions")) || (key0 === "delegateKeyDelivery"))) {
|
|
9721
|
-
|
|
9635
|
+
validate68.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
9722
9636
|
return false;
|
|
9723
9637
|
break;
|
|
9724
9638
|
}
|
|
@@ -9727,7 +9641,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9727
9641
|
if (data.description !== undefined) {
|
|
9728
9642
|
const _errs2 = errors;
|
|
9729
9643
|
if (typeof data.description !== "string") {
|
|
9730
|
-
|
|
9644
|
+
validate68.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9731
9645
|
return false;
|
|
9732
9646
|
}
|
|
9733
9647
|
var valid0 = _errs2 === errors;
|
|
@@ -9743,12 +9657,12 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9743
9657
|
if (errors === _errs5) {
|
|
9744
9658
|
if (typeof data1 === "string") {
|
|
9745
9659
|
if (!pattern14.test(data1)) {
|
|
9746
|
-
|
|
9660
|
+
validate68.errors = [{ instancePath: instancePath + "/dateExpires", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
9747
9661
|
return false;
|
|
9748
9662
|
}
|
|
9749
9663
|
}
|
|
9750
9664
|
else {
|
|
9751
|
-
|
|
9665
|
+
validate68.errors = [{ instancePath: instancePath + "/dateExpires", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9752
9666
|
return false;
|
|
9753
9667
|
}
|
|
9754
9668
|
}
|
|
@@ -9761,7 +9675,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9761
9675
|
if (data.requestId !== undefined) {
|
|
9762
9676
|
const _errs7 = errors;
|
|
9763
9677
|
if (typeof data.requestId !== "string") {
|
|
9764
|
-
|
|
9678
|
+
validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "#/properties/requestId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9765
9679
|
return false;
|
|
9766
9680
|
}
|
|
9767
9681
|
var valid0 = _errs7 === errors;
|
|
@@ -9773,7 +9687,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9773
9687
|
if (data.delegated !== undefined) {
|
|
9774
9688
|
const _errs9 = errors;
|
|
9775
9689
|
if (typeof data.delegated !== "boolean") {
|
|
9776
|
-
|
|
9690
|
+
validate68.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
9777
9691
|
return false;
|
|
9778
9692
|
}
|
|
9779
9693
|
var valid0 = _errs9 === errors;
|
|
@@ -9784,8 +9698,8 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9784
9698
|
if (valid0) {
|
|
9785
9699
|
if (data.scope !== undefined) {
|
|
9786
9700
|
const _errs11 = errors;
|
|
9787
|
-
if (!(
|
|
9788
|
-
vErrors = vErrors === null ?
|
|
9701
|
+
if (!(validate70(data.scope, { instancePath: instancePath + "/scope", parentData: data, parentDataProperty: "scope", rootData, dynamicAnchors }))) {
|
|
9702
|
+
vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);
|
|
9789
9703
|
errors = vErrors.length;
|
|
9790
9704
|
}
|
|
9791
9705
|
var valid0 = _errs11 === errors;
|
|
@@ -9803,7 +9717,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9803
9717
|
const _errs15 = errors;
|
|
9804
9718
|
for (const key1 in data5) {
|
|
9805
9719
|
if (!(key1 === "publication")) {
|
|
9806
|
-
|
|
9720
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
9807
9721
|
return false;
|
|
9808
9722
|
break;
|
|
9809
9723
|
}
|
|
@@ -9812,18 +9726,18 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9812
9726
|
if (data5.publication !== undefined) {
|
|
9813
9727
|
let data6 = data5.publication;
|
|
9814
9728
|
if (typeof data6 !== "string") {
|
|
9815
|
-
|
|
9729
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9816
9730
|
return false;
|
|
9817
9731
|
}
|
|
9818
9732
|
if (!((data6 === "Required") || (data6 === "Prohibited"))) {
|
|
9819
|
-
|
|
9733
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema108.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
|
|
9820
9734
|
return false;
|
|
9821
9735
|
}
|
|
9822
9736
|
}
|
|
9823
9737
|
}
|
|
9824
9738
|
}
|
|
9825
9739
|
else {
|
|
9826
|
-
|
|
9740
|
+
validate68.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9827
9741
|
return false;
|
|
9828
9742
|
}
|
|
9829
9743
|
}
|
|
@@ -9840,14 +9754,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9840
9754
|
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
9841
9755
|
let missing1;
|
|
9842
9756
|
if (((data7.rootKeyId === undefined) && (missing1 = "rootKeyId")) || ((data7.publicKeyJwk === undefined) && (missing1 = "publicKeyJwk"))) {
|
|
9843
|
-
|
|
9757
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
9844
9758
|
return false;
|
|
9845
9759
|
}
|
|
9846
9760
|
else {
|
|
9847
9761
|
const _errs20 = errors;
|
|
9848
9762
|
for (const key2 in data7) {
|
|
9849
9763
|
if (!((key2 === "rootKeyId") || (key2 === "publicKeyJwk"))) {
|
|
9850
|
-
|
|
9764
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
9851
9765
|
return false;
|
|
9852
9766
|
break;
|
|
9853
9767
|
}
|
|
@@ -9856,7 +9770,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9856
9770
|
if (data7.rootKeyId !== undefined) {
|
|
9857
9771
|
const _errs21 = errors;
|
|
9858
9772
|
if (typeof data7.rootKeyId !== "string") {
|
|
9859
|
-
|
|
9773
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/rootKeyId", schemaPath: "#/properties/delegateKeyDelivery/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
9860
9774
|
return false;
|
|
9861
9775
|
}
|
|
9862
9776
|
var valid4 = _errs21 === errors;
|
|
@@ -9869,7 +9783,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9869
9783
|
let data9 = data7.publicKeyJwk;
|
|
9870
9784
|
const _errs23 = errors;
|
|
9871
9785
|
if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
|
|
9872
|
-
|
|
9786
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/publicKeyJwk", schemaPath: "#/properties/delegateKeyDelivery/properties/publicKeyJwk/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9873
9787
|
return false;
|
|
9874
9788
|
}
|
|
9875
9789
|
var valid4 = _errs23 === errors;
|
|
@@ -9882,7 +9796,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9882
9796
|
}
|
|
9883
9797
|
}
|
|
9884
9798
|
else {
|
|
9885
|
-
|
|
9799
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9886
9800
|
return false;
|
|
9887
9801
|
}
|
|
9888
9802
|
}
|
|
@@ -9901,14 +9815,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
9901
9815
|
}
|
|
9902
9816
|
}
|
|
9903
9817
|
else {
|
|
9904
|
-
|
|
9818
|
+
validate68.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
9905
9819
|
return false;
|
|
9906
9820
|
}
|
|
9907
|
-
}
|
|
9908
|
-
|
|
9909
|
-
export const PermissionRequestData =
|
|
9910
|
-
const
|
|
9911
|
-
function
|
|
9821
|
+
} validate68.errors = vErrors; return errors === 0; }
|
|
9822
|
+
validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
9823
|
+
export const PermissionRequestData = validate73;
|
|
9824
|
+
const schema109 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-request-data.json", "type": "object", "additionalProperties": false, "required": ["delegated", "scope"], "properties": { "description": { "type": "string" }, "delegated": { "type": "boolean" }, "scope": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/scope" }, "conditions": { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions" } } };
|
|
9825
|
+
function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate74.evaluated; if (evaluated0.dynamicProps) {
|
|
9912
9826
|
evaluated0.props = undefined;
|
|
9913
9827
|
} if (evaluated0.dynamicItems) {
|
|
9914
9828
|
evaluated0.items = undefined;
|
|
@@ -11536,7 +11450,7 @@ else {
|
|
|
11536
11450
|
vErrors.push(err89);
|
|
11537
11451
|
}
|
|
11538
11452
|
errors++;
|
|
11539
|
-
|
|
11453
|
+
validate74.errors = vErrors;
|
|
11540
11454
|
return false;
|
|
11541
11455
|
}
|
|
11542
11456
|
else {
|
|
@@ -11549,9 +11463,9 @@ else {
|
|
|
11549
11463
|
vErrors = null;
|
|
11550
11464
|
}
|
|
11551
11465
|
}
|
|
11552
|
-
}
|
|
11553
|
-
|
|
11554
|
-
function
|
|
11466
|
+
} validate74.errors = vErrors; evaluated0.props = props0; return errors === 0; }
|
|
11467
|
+
validate74.evaluated = { "dynamicProps": true, "dynamicItems": false };
|
|
11468
|
+
function validate73(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-request-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate73.evaluated; if (evaluated0.dynamicProps) {
|
|
11555
11469
|
evaluated0.props = undefined;
|
|
11556
11470
|
} if (evaluated0.dynamicItems) {
|
|
11557
11471
|
evaluated0.items = undefined;
|
|
@@ -11559,14 +11473,14 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11559
11473
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
11560
11474
|
let missing0;
|
|
11561
11475
|
if (((data.delegated === undefined) && (missing0 = "delegated")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
11562
|
-
|
|
11476
|
+
validate73.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
11563
11477
|
return false;
|
|
11564
11478
|
}
|
|
11565
11479
|
else {
|
|
11566
11480
|
const _errs1 = errors;
|
|
11567
11481
|
for (const key0 in data) {
|
|
11568
11482
|
if (!((((key0 === "description") || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions"))) {
|
|
11569
|
-
|
|
11483
|
+
validate73.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11570
11484
|
return false;
|
|
11571
11485
|
break;
|
|
11572
11486
|
}
|
|
@@ -11575,7 +11489,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11575
11489
|
if (data.description !== undefined) {
|
|
11576
11490
|
const _errs2 = errors;
|
|
11577
11491
|
if (typeof data.description !== "string") {
|
|
11578
|
-
|
|
11492
|
+
validate73.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11579
11493
|
return false;
|
|
11580
11494
|
}
|
|
11581
11495
|
var valid0 = _errs2 === errors;
|
|
@@ -11587,7 +11501,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11587
11501
|
if (data.delegated !== undefined) {
|
|
11588
11502
|
const _errs4 = errors;
|
|
11589
11503
|
if (typeof data.delegated !== "boolean") {
|
|
11590
|
-
|
|
11504
|
+
validate73.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11591
11505
|
return false;
|
|
11592
11506
|
}
|
|
11593
11507
|
var valid0 = _errs4 === errors;
|
|
@@ -11598,8 +11512,8 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11598
11512
|
if (valid0) {
|
|
11599
11513
|
if (data.scope !== undefined) {
|
|
11600
11514
|
const _errs6 = errors;
|
|
11601
|
-
if (!(
|
|
11602
|
-
vErrors = vErrors === null ?
|
|
11515
|
+
if (!(validate74(data.scope, { instancePath: instancePath + "/scope", parentData: data, parentDataProperty: "scope", rootData, dynamicAnchors }))) {
|
|
11516
|
+
vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors);
|
|
11603
11517
|
errors = vErrors.length;
|
|
11604
11518
|
}
|
|
11605
11519
|
var valid0 = _errs6 === errors;
|
|
@@ -11617,7 +11531,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11617
11531
|
const _errs10 = errors;
|
|
11618
11532
|
for (const key1 in data3) {
|
|
11619
11533
|
if (!(key1 === "publication")) {
|
|
11620
|
-
|
|
11534
|
+
validate73.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
11621
11535
|
return false;
|
|
11622
11536
|
break;
|
|
11623
11537
|
}
|
|
@@ -11626,18 +11540,18 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11626
11540
|
if (data3.publication !== undefined) {
|
|
11627
11541
|
let data4 = data3.publication;
|
|
11628
11542
|
if (typeof data4 !== "string") {
|
|
11629
|
-
|
|
11543
|
+
validate73.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11630
11544
|
return false;
|
|
11631
11545
|
}
|
|
11632
11546
|
if (!((data4 === "Required") || (data4 === "Prohibited"))) {
|
|
11633
|
-
|
|
11547
|
+
validate73.errors = [{ instancePath: instancePath + "/conditions/publication", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/properties/publication/enum", keyword: "enum", params: { allowedValues: schema108.properties.publication.enum }, message: "must be equal to one of the allowed values" }];
|
|
11634
11548
|
return false;
|
|
11635
11549
|
}
|
|
11636
11550
|
}
|
|
11637
11551
|
}
|
|
11638
11552
|
}
|
|
11639
11553
|
else {
|
|
11640
|
-
|
|
11554
|
+
validate73.errors = [{ instancePath: instancePath + "/conditions", schemaPath: "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/$defs/conditions/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11641
11555
|
return false;
|
|
11642
11556
|
}
|
|
11643
11557
|
}
|
|
@@ -11653,14 +11567,14 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11653
11567
|
}
|
|
11654
11568
|
}
|
|
11655
11569
|
else {
|
|
11656
|
-
|
|
11570
|
+
validate73.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11657
11571
|
return false;
|
|
11658
11572
|
}
|
|
11659
|
-
}
|
|
11660
|
-
|
|
11661
|
-
export const PermissionRevocationData =
|
|
11662
|
-
const
|
|
11663
|
-
function
|
|
11573
|
+
} validate73.errors = vErrors; return errors === 0; }
|
|
11574
|
+
validate73.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11575
|
+
export const PermissionRevocationData = validate76;
|
|
11576
|
+
const schema121 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permission-revoke-data.json", "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string" } } };
|
|
11577
|
+
function validate76(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permission-revoke-data.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate76.evaluated; if (evaluated0.dynamicProps) {
|
|
11664
11578
|
evaluated0.props = undefined;
|
|
11665
11579
|
} if (evaluated0.dynamicItems) {
|
|
11666
11580
|
evaluated0.items = undefined;
|
|
@@ -11669,7 +11583,7 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11669
11583
|
const _errs1 = errors;
|
|
11670
11584
|
for (const key0 in data) {
|
|
11671
11585
|
if (!(key0 === "description")) {
|
|
11672
|
-
|
|
11586
|
+
validate76.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11673
11587
|
return false;
|
|
11674
11588
|
break;
|
|
11675
11589
|
}
|
|
@@ -11677,52 +11591,52 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11677
11591
|
if (_errs1 === errors) {
|
|
11678
11592
|
if (data.description !== undefined) {
|
|
11679
11593
|
if (typeof data.description !== "string") {
|
|
11680
|
-
|
|
11594
|
+
validate76.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11681
11595
|
return false;
|
|
11682
11596
|
}
|
|
11683
11597
|
}
|
|
11684
11598
|
}
|
|
11685
11599
|
}
|
|
11686
11600
|
else {
|
|
11687
|
-
|
|
11601
|
+
validate76.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11688
11602
|
return false;
|
|
11689
11603
|
}
|
|
11690
|
-
}
|
|
11691
|
-
|
|
11692
|
-
export const PermissionsDefinitions =
|
|
11693
|
-
const
|
|
11694
|
-
function
|
|
11604
|
+
} validate76.errors = vErrors; return errors === 0; }
|
|
11605
|
+
validate76.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
11606
|
+
export const PermissionsDefinitions = validate69;
|
|
11607
|
+
const schema96 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json", "type": "object", "$defs": { "scope": { "oneOf": [{ "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/messages-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-configure-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/protocols-query-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-read-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-delete-scope" }, { "$ref": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json#/$defs/records-write-scope" }, { "$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" } } } } };
|
|
11608
|
+
function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/defs.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate69.evaluated; if (evaluated0.dynamicProps) {
|
|
11695
11609
|
evaluated0.props = undefined;
|
|
11696
11610
|
} if (evaluated0.dynamicItems) {
|
|
11697
11611
|
evaluated0.items = undefined;
|
|
11698
11612
|
} if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
11699
|
-
|
|
11613
|
+
validate69.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11700
11614
|
return false;
|
|
11701
|
-
}
|
|
11702
|
-
|
|
11703
|
-
export const PermissionsScopes =
|
|
11704
|
-
const
|
|
11705
|
-
function
|
|
11615
|
+
} validate69.errors = vErrors; return errors === 0; }
|
|
11616
|
+
validate69.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
11617
|
+
export const PermissionsScopes = validate71;
|
|
11618
|
+
const schema98 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/permissions/scopes.json", "type": "object", "$defs": { "messages-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Messages" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } }, "allOf": [{ "not": { "required": ["contextId", "protocolPath"] } }, { "if": { "anyOf": [{ "required": ["contextId"] }, { "required": ["protocolPath"] }] }, "then": { "required": ["protocol"] } }] }, "protocols-configure-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Configure" }, "protocol": { "type": "string" } } }, "protocols-query-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method"], "properties": { "interface": { "const": "Protocols" }, "method": { "const": "Query" }, "protocol": { "type": "string" } } }, "records-delete-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Delete" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-read-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Read" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "records-write-scope": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "protocol"], "properties": { "interface": { "const": "Records" }, "method": { "const": "Write" }, "protocol": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "protocolPath": { "type": "string", "maxLength": 600 } } }, "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", "maxLength": 600 } } }, "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", "maxLength": 600 } } }, "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", "maxLength": 600 } } } } };
|
|
11619
|
+
function validate71(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/permissions/scopes.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate71.evaluated; if (evaluated0.dynamicProps) {
|
|
11706
11620
|
evaluated0.props = undefined;
|
|
11707
11621
|
} if (evaluated0.dynamicItems) {
|
|
11708
11622
|
evaluated0.items = undefined;
|
|
11709
11623
|
} if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
11710
|
-
|
|
11624
|
+
validate71.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11711
11625
|
return false;
|
|
11712
|
-
}
|
|
11713
|
-
|
|
11714
|
-
export const ProtocolDefinition =
|
|
11715
|
-
const
|
|
11716
|
-
const
|
|
11717
|
-
const
|
|
11718
|
-
const
|
|
11719
|
-
const
|
|
11720
|
-
const
|
|
11721
|
-
const
|
|
11722
|
-
const
|
|
11723
|
-
const
|
|
11724
|
-
const wrapper2 = { validate:
|
|
11725
|
-
function
|
|
11626
|
+
} validate71.errors = vErrors; return errors === 0; }
|
|
11627
|
+
validate71.evaluated = { "dynamicProps": false, "dynamicItems": false };
|
|
11628
|
+
export const ProtocolDefinition = validate77;
|
|
11629
|
+
const schema122 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-definition.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "required": ["protocol", "published", "types", "structure"], "properties": { "protocol": { "type": "string" }, "published": { "type": "boolean" }, "uses": { "$comment": "Maps alias names to external protocol URIs for composition. Each alias can be used in $ref values and cross-protocol role/of references using 'alias:path' syntax.", "type": "object", "minProperties": 1, "patternProperties": { "^[a-zA-Z][a-zA-Z0-9_-]*$": { "type": "string" } }, "additionalProperties": false }, "types": { "type": "object", "patternProperties": { ".*": { "type": "object", "additionalProperties": false, "properties": { "schema": { "type": "string" }, "dataFormats": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "encryptionRequired": { "type": "boolean" } } } } }, "structure": { "type": "object", "patternProperties": { ".*": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } } } };
|
|
11630
|
+
const pattern38 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
|
|
11631
|
+
const pattern40 = new RegExp(".*", "u");
|
|
11632
|
+
const schema123 = { "$id": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "$encryption": { "type": "object", "additionalProperties": false, "properties": { "rootKeyId": { "type": "string" }, "publicKeyJwk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "required": ["rootKeyId", "publicKeyJwk"] }, "$actions": { "type": "array", "minItems": 1, "items": { "type": "object", "oneOf": [{ "required": ["who", "can"], "additionalProperties": false, "properties": { "who": { "type": "string", "enum": ["anyone", "author", "recipient"] }, "of": { "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "squash", "update"] } } } }, { "required": ["role", "can"], "additionalProperties": false, "properties": { "role": { "$comment": "Must be the protocol path of a role record type", "type": "string" }, "can": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["co-delete", "co-prune", "co-update", "create", "delete", "prune", "read", "squash", "update"] } } } }] } }, "$role": { "$comment": "When `true`, this turns a record into `role` that may be used within a context/sub-context", "type": "boolean" }, "$ref": { "$comment": "References a type from an external protocol declared in `uses`. Format: 'alias:typePath'. A $ref node is a pure attachment point and must not have $actions, $role, $size, $tags, or $encryption.", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, "$size": { "type": "object", "additionalProperties": false, "properties": { "min": { "type": "number", "minimum": 0 }, "max": { "type": "number", "minimum": 0 } } }, "$recordLimit": { "type": "object", "additionalProperties": false, "required": ["max", "strategy"], "properties": { "max": { "type": "integer", "minimum": 1 }, "strategy": { "type": "string", "enum": ["reject", "purgeOldest"] } } }, "$immutable": { "$comment": "When true, records at this protocol path cannot be updated after initial write", "type": "boolean" }, "$delivery": { "$comment": "Delivery strategy hint for records at this protocol path. 'direct' = origin pushes to all participant DWN endpoints; 'subscribe' = participant providers subscribe to the origin DWN.", "type": "string", "enum": ["direct", "subscribe"] }, "$squash": { "$comment": "When true, enables squash writes at this protocol path — a RecordsWrite with squash: true atomically creates a snapshot and deletes all older sibling records", "type": "boolean", "enum": [true] }, "$tags": { "type": "object", "minProperties": 1, "properties": { "$requiredTags": { "type": "array", "items": { "type": "string" } }, "$allowUndefinedTags": { "type": "boolean" } }, "patternProperties": { "^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$": { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": ["string", "number", "integer", "boolean", "array"] }, "items": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } }, "contains": { "type": "object", "properties": { "type": { "enum": ["string", "number", "integer"] } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$": {} } } }, "patternProperties": { "^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$": {} } } } } }, "patternProperties": { "^[^$].*$": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" } } };
|
|
11633
|
+
const pattern42 = new RegExp("^[^$].*$", "u");
|
|
11634
|
+
const pattern43 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
|
|
11635
|
+
const pattern44 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
|
|
11636
|
+
const pattern45 = new RegExp("^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minContains|maxContains)$", "u");
|
|
11637
|
+
const pattern46 = new RegExp("^(enum|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength)$", "u");
|
|
11638
|
+
const wrapper2 = { validate: validate78 };
|
|
11639
|
+
function validate78(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocol-rule-set.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate78.evaluated; if (evaluated0.dynamicProps) {
|
|
11726
11640
|
evaluated0.props = undefined;
|
|
11727
11641
|
} if (evaluated0.dynamicItems) {
|
|
11728
11642
|
evaluated0.items = undefined;
|
|
@@ -11730,8 +11644,8 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11730
11644
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
11731
11645
|
const _errs1 = errors;
|
|
11732
11646
|
for (const key0 in data) {
|
|
11733
|
-
if (!((func2.call(
|
|
11734
|
-
|
|
11647
|
+
if (!((func2.call(schema123.properties, key0)) || (pattern42.test(key0)))) {
|
|
11648
|
+
validate78.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11735
11649
|
return false;
|
|
11736
11650
|
break;
|
|
11737
11651
|
}
|
|
@@ -11744,14 +11658,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11744
11658
|
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
11745
11659
|
let missing0;
|
|
11746
11660
|
if (((data0.rootKeyId === undefined) && (missing0 = "rootKeyId")) || ((data0.publicKeyJwk === undefined) && (missing0 = "publicKeyJwk"))) {
|
|
11747
|
-
|
|
11661
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
11748
11662
|
return false;
|
|
11749
11663
|
}
|
|
11750
11664
|
else {
|
|
11751
11665
|
const _errs4 = errors;
|
|
11752
11666
|
for (const key1 in data0) {
|
|
11753
11667
|
if (!((key1 === "rootKeyId") || (key1 === "publicKeyJwk"))) {
|
|
11754
|
-
|
|
11668
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
11755
11669
|
return false;
|
|
11756
11670
|
break;
|
|
11757
11671
|
}
|
|
@@ -11760,7 +11674,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11760
11674
|
if (data0.rootKeyId !== undefined) {
|
|
11761
11675
|
const _errs5 = errors;
|
|
11762
11676
|
if (typeof data0.rootKeyId !== "string") {
|
|
11763
|
-
|
|
11677
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption/rootKeyId", schemaPath: "#/properties/%24encryption/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11764
11678
|
return false;
|
|
11765
11679
|
}
|
|
11766
11680
|
var valid1 = _errs5 === errors;
|
|
@@ -11785,7 +11699,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11785
11699
|
}
|
|
11786
11700
|
}
|
|
11787
11701
|
else {
|
|
11788
|
-
|
|
11702
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11789
11703
|
return false;
|
|
11790
11704
|
}
|
|
11791
11705
|
}
|
|
@@ -11801,7 +11715,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11801
11715
|
if (errors === _errs8) {
|
|
11802
11716
|
if (Array.isArray(data3)) {
|
|
11803
11717
|
if (data3.length < 1) {
|
|
11804
|
-
|
|
11718
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions", schemaPath: "#/properties/%24actions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
11805
11719
|
return false;
|
|
11806
11720
|
}
|
|
11807
11721
|
else {
|
|
@@ -11811,7 +11725,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11811
11725
|
let data4 = data3[i0];
|
|
11812
11726
|
const _errs10 = errors;
|
|
11813
11727
|
if (!(data4 && typeof data4 == "object" && !Array.isArray(data4))) {
|
|
11814
|
-
|
|
11728
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions/" + i0, schemaPath: "#/properties/%24actions/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11815
11729
|
return false;
|
|
11816
11730
|
}
|
|
11817
11731
|
const _errs12 = errors;
|
|
@@ -11860,7 +11774,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11860
11774
|
errors++;
|
|
11861
11775
|
}
|
|
11862
11776
|
if (!(((data5 === "anyone") || (data5 === "author")) || (data5 === "recipient"))) {
|
|
11863
|
-
const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues:
|
|
11777
|
+
const err3 = { instancePath: instancePath + "/$actions/" + i0 + "/who", schemaPath: "#/properties/%24actions/items/oneOf/0/properties/who/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[0].properties.who.enum }, message: "must be equal to one of the allowed values" };
|
|
11864
11778
|
if (vErrors === null) {
|
|
11865
11779
|
vErrors = [err3];
|
|
11866
11780
|
}
|
|
@@ -11925,7 +11839,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11925
11839
|
errors++;
|
|
11926
11840
|
}
|
|
11927
11841
|
if (!(((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "squash")) || (data8 === "update"))) {
|
|
11928
|
-
const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues:
|
|
11842
|
+
const err7 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i1, schemaPath: "#/properties/%24actions/items/oneOf/0/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[0].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
11929
11843
|
if (vErrors === null) {
|
|
11930
11844
|
vErrors = [err7];
|
|
11931
11845
|
}
|
|
@@ -12047,7 +11961,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12047
11961
|
errors++;
|
|
12048
11962
|
}
|
|
12049
11963
|
if (!(((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "squash")) || (data11 === "update"))) {
|
|
12050
|
-
const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues:
|
|
11964
|
+
const err14 = { instancePath: instancePath + "/$actions/" + i0 + "/can/" + i2, schemaPath: "#/properties/%24actions/items/oneOf/1/properties/can/items/enum", keyword: "enum", params: { allowedValues: schema123.properties.$actions.items.oneOf[1].properties.can.items.enum }, message: "must be equal to one of the allowed values" };
|
|
12051
11965
|
if (vErrors === null) {
|
|
12052
11966
|
vErrors = [err14];
|
|
12053
11967
|
}
|
|
@@ -12106,7 +12020,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12106
12020
|
vErrors.push(err16);
|
|
12107
12021
|
}
|
|
12108
12022
|
errors++;
|
|
12109
|
-
|
|
12023
|
+
validate78.errors = vErrors;
|
|
12110
12024
|
return false;
|
|
12111
12025
|
}
|
|
12112
12026
|
else {
|
|
@@ -12128,7 +12042,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12128
12042
|
}
|
|
12129
12043
|
}
|
|
12130
12044
|
else {
|
|
12131
|
-
|
|
12045
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions", schemaPath: "#/properties/%24actions/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
12132
12046
|
return false;
|
|
12133
12047
|
}
|
|
12134
12048
|
}
|
|
@@ -12141,7 +12055,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12141
12055
|
if (data.$role !== undefined) {
|
|
12142
12056
|
const _errs32 = errors;
|
|
12143
12057
|
if (typeof data.$role !== "boolean") {
|
|
12144
|
-
|
|
12058
|
+
validate78.errors = [{ instancePath: instancePath + "/$role", schemaPath: "#/properties/%24role/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12145
12059
|
return false;
|
|
12146
12060
|
}
|
|
12147
12061
|
var valid0 = _errs32 === errors;
|
|
@@ -12155,13 +12069,13 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12155
12069
|
const _errs35 = errors;
|
|
12156
12070
|
if (errors === _errs35) {
|
|
12157
12071
|
if (typeof data13 === "string") {
|
|
12158
|
-
if (!
|
|
12159
|
-
|
|
12072
|
+
if (!pattern43.test(data13)) {
|
|
12073
|
+
validate78.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" }, message: "must match pattern \"" + "^[a-zA-Z][a-zA-Z0-9_-]*:.+$" + "\"" }];
|
|
12160
12074
|
return false;
|
|
12161
12075
|
}
|
|
12162
12076
|
}
|
|
12163
12077
|
else {
|
|
12164
|
-
|
|
12078
|
+
validate78.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12165
12079
|
return false;
|
|
12166
12080
|
}
|
|
12167
12081
|
}
|
|
@@ -12179,7 +12093,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12179
12093
|
const _errs40 = errors;
|
|
12180
12094
|
for (const key4 in data14) {
|
|
12181
12095
|
if (!((key4 === "min") || (key4 === "max"))) {
|
|
12182
|
-
|
|
12096
|
+
validate78.errors = [{ instancePath: instancePath + "/$size", schemaPath: "#/properties/%24size/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" }];
|
|
12183
12097
|
return false;
|
|
12184
12098
|
break;
|
|
12185
12099
|
}
|
|
@@ -12191,12 +12105,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12191
12105
|
if (errors === _errs41) {
|
|
12192
12106
|
if ((typeof data15 == "number") && (isFinite(data15))) {
|
|
12193
12107
|
if (data15 < 0 || isNaN(data15)) {
|
|
12194
|
-
|
|
12108
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/min", schemaPath: "#/properties/%24size/properties/min/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
12195
12109
|
return false;
|
|
12196
12110
|
}
|
|
12197
12111
|
}
|
|
12198
12112
|
else {
|
|
12199
|
-
|
|
12113
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/min", schemaPath: "#/properties/%24size/properties/min/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
12200
12114
|
return false;
|
|
12201
12115
|
}
|
|
12202
12116
|
}
|
|
@@ -12212,12 +12126,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12212
12126
|
if (errors === _errs43) {
|
|
12213
12127
|
if ((typeof data16 == "number") && (isFinite(data16))) {
|
|
12214
12128
|
if (data16 < 0 || isNaN(data16)) {
|
|
12215
|
-
|
|
12129
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/max", schemaPath: "#/properties/%24size/properties/max/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
12216
12130
|
return false;
|
|
12217
12131
|
}
|
|
12218
12132
|
}
|
|
12219
12133
|
else {
|
|
12220
|
-
|
|
12134
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/max", schemaPath: "#/properties/%24size/properties/max/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
12221
12135
|
return false;
|
|
12222
12136
|
}
|
|
12223
12137
|
}
|
|
@@ -12230,7 +12144,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12230
12144
|
}
|
|
12231
12145
|
}
|
|
12232
12146
|
else {
|
|
12233
|
-
|
|
12147
|
+
validate78.errors = [{ instancePath: instancePath + "/$size", schemaPath: "#/properties/%24size/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12234
12148
|
return false;
|
|
12235
12149
|
}
|
|
12236
12150
|
}
|
|
@@ -12247,14 +12161,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12247
12161
|
if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
|
|
12248
12162
|
let missing3;
|
|
12249
12163
|
if (((data17.max === undefined) && (missing3 = "max")) || ((data17.strategy === undefined) && (missing3 = "strategy"))) {
|
|
12250
|
-
|
|
12164
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
12251
12165
|
return false;
|
|
12252
12166
|
}
|
|
12253
12167
|
else {
|
|
12254
12168
|
const _errs47 = errors;
|
|
12255
12169
|
for (const key5 in data17) {
|
|
12256
12170
|
if (!((key5 === "max") || (key5 === "strategy"))) {
|
|
12257
|
-
|
|
12171
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" }];
|
|
12258
12172
|
return false;
|
|
12259
12173
|
break;
|
|
12260
12174
|
}
|
|
@@ -12264,13 +12178,13 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12264
12178
|
let data18 = data17.max;
|
|
12265
12179
|
const _errs48 = errors;
|
|
12266
12180
|
if (!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) {
|
|
12267
|
-
|
|
12181
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
12268
12182
|
return false;
|
|
12269
12183
|
}
|
|
12270
12184
|
if (errors === _errs48) {
|
|
12271
12185
|
if ((typeof data18 == "number") && (isFinite(data18))) {
|
|
12272
12186
|
if (data18 < 1 || isNaN(data18)) {
|
|
12273
|
-
|
|
12187
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
12274
12188
|
return false;
|
|
12275
12189
|
}
|
|
12276
12190
|
}
|
|
@@ -12285,11 +12199,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12285
12199
|
let data19 = data17.strategy;
|
|
12286
12200
|
const _errs50 = errors;
|
|
12287
12201
|
if (typeof data19 !== "string") {
|
|
12288
|
-
|
|
12202
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12289
12203
|
return false;
|
|
12290
12204
|
}
|
|
12291
12205
|
if (!((data19 === "reject") || (data19 === "purgeOldest"))) {
|
|
12292
|
-
|
|
12206
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/enum", keyword: "enum", params: { allowedValues: schema123.properties.$recordLimit.properties.strategy.enum }, message: "must be equal to one of the allowed values" }];
|
|
12293
12207
|
return false;
|
|
12294
12208
|
}
|
|
12295
12209
|
var valid9 = _errs50 === errors;
|
|
@@ -12302,7 +12216,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12302
12216
|
}
|
|
12303
12217
|
}
|
|
12304
12218
|
else {
|
|
12305
|
-
|
|
12219
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12306
12220
|
return false;
|
|
12307
12221
|
}
|
|
12308
12222
|
}
|
|
@@ -12315,7 +12229,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12315
12229
|
if (data.$immutable !== undefined) {
|
|
12316
12230
|
const _errs52 = errors;
|
|
12317
12231
|
if (typeof data.$immutable !== "boolean") {
|
|
12318
|
-
|
|
12232
|
+
validate78.errors = [{ instancePath: instancePath + "/$immutable", schemaPath: "#/properties/%24immutable/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12319
12233
|
return false;
|
|
12320
12234
|
}
|
|
12321
12235
|
var valid0 = _errs52 === errors;
|
|
@@ -12328,11 +12242,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12328
12242
|
let data21 = data.$delivery;
|
|
12329
12243
|
const _errs55 = errors;
|
|
12330
12244
|
if (typeof data21 !== "string") {
|
|
12331
|
-
|
|
12245
|
+
validate78.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12332
12246
|
return false;
|
|
12333
12247
|
}
|
|
12334
12248
|
if (!((data21 === "direct") || (data21 === "subscribe"))) {
|
|
12335
|
-
|
|
12249
|
+
validate78.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/enum", keyword: "enum", params: { allowedValues: schema123.properties.$delivery.enum }, message: "must be equal to one of the allowed values" }];
|
|
12336
12250
|
return false;
|
|
12337
12251
|
}
|
|
12338
12252
|
var valid0 = _errs55 === errors;
|
|
@@ -12345,11 +12259,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12345
12259
|
let data22 = data.$squash;
|
|
12346
12260
|
const _errs58 = errors;
|
|
12347
12261
|
if (typeof data22 !== "boolean") {
|
|
12348
|
-
|
|
12262
|
+
validate78.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12349
12263
|
return false;
|
|
12350
12264
|
}
|
|
12351
12265
|
if (!(data22 === true)) {
|
|
12352
|
-
|
|
12266
|
+
validate78.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/enum", keyword: "enum", params: { allowedValues: schema123.properties.$squash.enum }, message: "must be equal to one of the allowed values" }];
|
|
12353
12267
|
return false;
|
|
12354
12268
|
}
|
|
12355
12269
|
var valid0 = _errs58 === errors;
|
|
@@ -12364,7 +12278,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12364
12278
|
if (errors === _errs61) {
|
|
12365
12279
|
if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
|
|
12366
12280
|
if (Object.keys(data23).length < 1) {
|
|
12367
|
-
|
|
12281
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
12368
12282
|
return false;
|
|
12369
12283
|
}
|
|
12370
12284
|
else {
|
|
@@ -12378,7 +12292,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12378
12292
|
for (let i3 = 0; i3 < len3; i3++) {
|
|
12379
12293
|
const _errs65 = errors;
|
|
12380
12294
|
if (typeof data24[i3] !== "string") {
|
|
12381
|
-
|
|
12295
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$requiredTags/" + i3, schemaPath: "#/properties/%24tags/properties/%24requiredTags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12382
12296
|
return false;
|
|
12383
12297
|
}
|
|
12384
12298
|
var valid11 = _errs65 === errors;
|
|
@@ -12388,7 +12302,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12388
12302
|
}
|
|
12389
12303
|
}
|
|
12390
12304
|
else {
|
|
12391
|
-
|
|
12305
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$requiredTags", schemaPath: "#/properties/%24tags/properties/%24requiredTags/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
12392
12306
|
return false;
|
|
12393
12307
|
}
|
|
12394
12308
|
}
|
|
@@ -12401,7 +12315,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12401
12315
|
if (data23.$allowUndefinedTags !== undefined) {
|
|
12402
12316
|
const _errs67 = errors;
|
|
12403
12317
|
if (typeof data23.$allowUndefinedTags !== "boolean") {
|
|
12404
|
-
|
|
12318
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$allowUndefinedTags", schemaPath: "#/properties/%24tags/properties/%24allowUndefinedTags/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12405
12319
|
return false;
|
|
12406
12320
|
}
|
|
12407
12321
|
var valid10 = _errs67 === errors;
|
|
@@ -12414,15 +12328,15 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12414
12328
|
props2.$requiredTags = true;
|
|
12415
12329
|
props2.$allowUndefinedTags = true;
|
|
12416
12330
|
for (const key6 in data23) {
|
|
12417
|
-
if (
|
|
12331
|
+
if (pattern44.test(key6)) {
|
|
12418
12332
|
let data27 = data23[key6];
|
|
12419
12333
|
const _errs69 = errors;
|
|
12420
12334
|
if (errors === _errs69) {
|
|
12421
12335
|
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
12422
12336
|
const _errs71 = errors;
|
|
12423
12337
|
for (const key7 in data27) {
|
|
12424
|
-
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (
|
|
12425
|
-
|
|
12338
|
+
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (pattern45.test(key7)))) {
|
|
12339
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" }];
|
|
12426
12340
|
return false;
|
|
12427
12341
|
break;
|
|
12428
12342
|
}
|
|
@@ -12432,7 +12346,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12432
12346
|
let data28 = data27.type;
|
|
12433
12347
|
const _errs72 = errors;
|
|
12434
12348
|
if (!(((((data28 === "string") || (data28 === "number")) || (data28 === "integer")) || (data28 === "boolean")) || (data28 === "array"))) {
|
|
12435
|
-
|
|
12349
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12436
12350
|
return false;
|
|
12437
12351
|
}
|
|
12438
12352
|
var valid13 = _errs72 === errors;
|
|
@@ -12450,7 +12364,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12450
12364
|
let data30 = data29.type;
|
|
12451
12365
|
const _errs75 = errors;
|
|
12452
12366
|
if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
|
|
12453
|
-
|
|
12367
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.items.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12454
12368
|
return false;
|
|
12455
12369
|
}
|
|
12456
12370
|
var valid14 = _errs75 === errors;
|
|
@@ -12462,14 +12376,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12462
12376
|
var props3 = {};
|
|
12463
12377
|
props3.type = true;
|
|
12464
12378
|
for (const key8 in data29) {
|
|
12465
|
-
if (
|
|
12379
|
+
if (pattern46.test(key8)) {
|
|
12466
12380
|
props3[key8] = true;
|
|
12467
12381
|
}
|
|
12468
12382
|
}
|
|
12469
12383
|
}
|
|
12470
12384
|
}
|
|
12471
12385
|
else {
|
|
12472
|
-
|
|
12386
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/items", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12473
12387
|
return false;
|
|
12474
12388
|
}
|
|
12475
12389
|
}
|
|
@@ -12488,7 +12402,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12488
12402
|
let data32 = data31.type;
|
|
12489
12403
|
const _errs78 = errors;
|
|
12490
12404
|
if (!(((data32 === "string") || (data32 === "number")) || (data32 === "integer"))) {
|
|
12491
|
-
|
|
12405
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains/type", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/properties/type/enum", keyword: "enum", params: { allowedValues: schema123.properties.$tags.patternProperties["^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$"].properties.contains.properties.type.enum }, message: "must be equal to one of the allowed values" }];
|
|
12492
12406
|
return false;
|
|
12493
12407
|
}
|
|
12494
12408
|
var valid16 = _errs78 === errors;
|
|
@@ -12500,14 +12414,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12500
12414
|
var props4 = {};
|
|
12501
12415
|
props4.type = true;
|
|
12502
12416
|
for (const key9 in data31) {
|
|
12503
|
-
if (
|
|
12417
|
+
if (pattern46.test(key9)) {
|
|
12504
12418
|
props4[key9] = true;
|
|
12505
12419
|
}
|
|
12506
12420
|
}
|
|
12507
12421
|
}
|
|
12508
12422
|
}
|
|
12509
12423
|
else {
|
|
12510
|
-
|
|
12424
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1") + "/contains", schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/properties/contains/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12511
12425
|
return false;
|
|
12512
12426
|
}
|
|
12513
12427
|
}
|
|
@@ -12521,7 +12435,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12521
12435
|
}
|
|
12522
12436
|
}
|
|
12523
12437
|
else {
|
|
12524
|
-
|
|
12438
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/%24tags/patternProperties/%5E(%3F!%5C%24requiredTags%24%7C%5C%24allowUndefinedTags%24).*%24/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12525
12439
|
return false;
|
|
12526
12440
|
}
|
|
12527
12441
|
}
|
|
@@ -12533,7 +12447,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12533
12447
|
}
|
|
12534
12448
|
}
|
|
12535
12449
|
else {
|
|
12536
|
-
|
|
12450
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12537
12451
|
return false;
|
|
12538
12452
|
}
|
|
12539
12453
|
}
|
|
@@ -12545,7 +12459,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12545
12459
|
if (valid0) {
|
|
12546
12460
|
var valid18 = true;
|
|
12547
12461
|
for (const key10 in data) {
|
|
12548
|
-
if (
|
|
12462
|
+
if (pattern42.test(key10)) {
|
|
12549
12463
|
const _errs79 = errors;
|
|
12550
12464
|
if (!(wrapper2.validate(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData, dynamicAnchors }))) {
|
|
12551
12465
|
vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);
|
|
@@ -12570,12 +12484,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12570
12484
|
}
|
|
12571
12485
|
}
|
|
12572
12486
|
else {
|
|
12573
|
-
|
|
12487
|
+
validate78.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12574
12488
|
return false;
|
|
12575
12489
|
}
|
|
12576
|
-
}
|
|
12577
|
-
|
|
12578
|
-
function
|
|
12490
|
+
} validate78.errors = vErrors; return errors === 0; }
|
|
12491
|
+
validate78.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12492
|
+
function validate77(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocol-definition.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate77.evaluated; if (evaluated0.dynamicProps) {
|
|
12579
12493
|
evaluated0.props = undefined;
|
|
12580
12494
|
} if (evaluated0.dynamicItems) {
|
|
12581
12495
|
evaluated0.items = undefined;
|
|
@@ -12583,14 +12497,14 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12583
12497
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
12584
12498
|
let missing0;
|
|
12585
12499
|
if (((((data.protocol === undefined) && (missing0 = "protocol")) || ((data.published === undefined) && (missing0 = "published"))) || ((data.types === undefined) && (missing0 = "types"))) || ((data.structure === undefined) && (missing0 = "structure"))) {
|
|
12586
|
-
|
|
12500
|
+
validate77.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
12587
12501
|
return false;
|
|
12588
12502
|
}
|
|
12589
12503
|
else {
|
|
12590
12504
|
const _errs1 = errors;
|
|
12591
12505
|
for (const key0 in data) {
|
|
12592
12506
|
if (!(((((key0 === "protocol") || (key0 === "published")) || (key0 === "uses")) || (key0 === "types")) || (key0 === "structure"))) {
|
|
12593
|
-
|
|
12507
|
+
validate77.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
12594
12508
|
return false;
|
|
12595
12509
|
break;
|
|
12596
12510
|
}
|
|
@@ -12599,7 +12513,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12599
12513
|
if (data.protocol !== undefined) {
|
|
12600
12514
|
const _errs2 = errors;
|
|
12601
12515
|
if (typeof data.protocol !== "string") {
|
|
12602
|
-
|
|
12516
|
+
validate77.errors = [{ instancePath: instancePath + "/protocol", schemaPath: "#/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12603
12517
|
return false;
|
|
12604
12518
|
}
|
|
12605
12519
|
var valid0 = _errs2 === errors;
|
|
@@ -12611,7 +12525,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12611
12525
|
if (data.published !== undefined) {
|
|
12612
12526
|
const _errs4 = errors;
|
|
12613
12527
|
if (typeof data.published !== "boolean") {
|
|
12614
|
-
|
|
12528
|
+
validate77.errors = [{ instancePath: instancePath + "/published", schemaPath: "#/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12615
12529
|
return false;
|
|
12616
12530
|
}
|
|
12617
12531
|
var valid0 = _errs4 === errors;
|
|
@@ -12626,14 +12540,14 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12626
12540
|
if (errors === _errs6) {
|
|
12627
12541
|
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
12628
12542
|
if (Object.keys(data2).length < 1) {
|
|
12629
|
-
|
|
12543
|
+
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
12630
12544
|
return false;
|
|
12631
12545
|
}
|
|
12632
12546
|
else {
|
|
12633
12547
|
const _errs9 = errors;
|
|
12634
12548
|
for (const key1 in data2) {
|
|
12635
|
-
if (!(
|
|
12636
|
-
|
|
12549
|
+
if (!(pattern38.test(key1))) {
|
|
12550
|
+
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
12637
12551
|
return false;
|
|
12638
12552
|
break;
|
|
12639
12553
|
}
|
|
@@ -12641,10 +12555,10 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12641
12555
|
if (_errs9 === errors) {
|
|
12642
12556
|
var valid1 = true;
|
|
12643
12557
|
for (const key2 in data2) {
|
|
12644
|
-
if (
|
|
12558
|
+
if (pattern38.test(key2)) {
|
|
12645
12559
|
const _errs10 = errors;
|
|
12646
12560
|
if (typeof data2[key2] !== "string") {
|
|
12647
|
-
|
|
12561
|
+
validate77.errors = [{ instancePath: instancePath + "/uses/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/uses/patternProperties/%5E%5Ba-zA-Z%5D%5Ba-zA-Z0-9_-%5D*%24/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12648
12562
|
return false;
|
|
12649
12563
|
}
|
|
12650
12564
|
var valid1 = _errs10 === errors;
|
|
@@ -12657,7 +12571,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12657
12571
|
}
|
|
12658
12572
|
}
|
|
12659
12573
|
else {
|
|
12660
|
-
|
|
12574
|
+
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12661
12575
|
return false;
|
|
12662
12576
|
}
|
|
12663
12577
|
}
|
|
@@ -12674,7 +12588,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12674
12588
|
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
12675
12589
|
var props0 = {};
|
|
12676
12590
|
for (const key3 in data4) {
|
|
12677
|
-
if (
|
|
12591
|
+
if (pattern40.test(key3)) {
|
|
12678
12592
|
let data5 = data4[key3];
|
|
12679
12593
|
const _errs14 = errors;
|
|
12680
12594
|
if (errors === _errs14) {
|
|
@@ -12682,7 +12596,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12682
12596
|
const _errs16 = errors;
|
|
12683
12597
|
for (const key4 in data5) {
|
|
12684
12598
|
if (!(((key4 === "schema") || (key4 === "dataFormats")) || (key4 === "encryptionRequired"))) {
|
|
12685
|
-
|
|
12599
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/types/patternProperties/.*/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" }];
|
|
12686
12600
|
return false;
|
|
12687
12601
|
break;
|
|
12688
12602
|
}
|
|
@@ -12691,7 +12605,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12691
12605
|
if (data5.schema !== undefined) {
|
|
12692
12606
|
const _errs17 = errors;
|
|
12693
12607
|
if (typeof data5.schema !== "string") {
|
|
12694
|
-
|
|
12608
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/schema", schemaPath: "#/properties/types/patternProperties/.*/properties/schema/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12695
12609
|
return false;
|
|
12696
12610
|
}
|
|
12697
12611
|
var valid3 = _errs17 === errors;
|
|
@@ -12706,7 +12620,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12706
12620
|
if (errors === _errs19) {
|
|
12707
12621
|
if (Array.isArray(data7)) {
|
|
12708
12622
|
if (data7.length < 1) {
|
|
12709
|
-
|
|
12623
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/dataFormats", schemaPath: "#/properties/types/patternProperties/.*/properties/dataFormats/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
12710
12624
|
return false;
|
|
12711
12625
|
}
|
|
12712
12626
|
else {
|
|
@@ -12715,7 +12629,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12715
12629
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
12716
12630
|
const _errs21 = errors;
|
|
12717
12631
|
if (typeof data7[i0] !== "string") {
|
|
12718
|
-
|
|
12632
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/dataFormats/" + i0, schemaPath: "#/properties/types/patternProperties/.*/properties/dataFormats/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12719
12633
|
return false;
|
|
12720
12634
|
}
|
|
12721
12635
|
var valid4 = _errs21 === errors;
|
|
@@ -12726,7 +12640,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12726
12640
|
}
|
|
12727
12641
|
}
|
|
12728
12642
|
else {
|
|
12729
|
-
|
|
12643
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/dataFormats", schemaPath: "#/properties/types/patternProperties/.*/properties/dataFormats/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
12730
12644
|
return false;
|
|
12731
12645
|
}
|
|
12732
12646
|
}
|
|
@@ -12739,7 +12653,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12739
12653
|
if (data5.encryptionRequired !== undefined) {
|
|
12740
12654
|
const _errs23 = errors;
|
|
12741
12655
|
if (typeof data5.encryptionRequired !== "boolean") {
|
|
12742
|
-
|
|
12656
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1") + "/encryptionRequired", schemaPath: "#/properties/types/patternProperties/.*/properties/encryptionRequired/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12743
12657
|
return false;
|
|
12744
12658
|
}
|
|
12745
12659
|
var valid3 = _errs23 === errors;
|
|
@@ -12752,7 +12666,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12752
12666
|
}
|
|
12753
12667
|
}
|
|
12754
12668
|
else {
|
|
12755
|
-
|
|
12669
|
+
validate77.errors = [{ instancePath: instancePath + "/types/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/types/patternProperties/.*/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12756
12670
|
return false;
|
|
12757
12671
|
}
|
|
12758
12672
|
}
|
|
@@ -12761,7 +12675,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12761
12675
|
}
|
|
12762
12676
|
}
|
|
12763
12677
|
else {
|
|
12764
|
-
|
|
12678
|
+
validate77.errors = [{ instancePath: instancePath + "/types", schemaPath: "#/properties/types/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12765
12679
|
return false;
|
|
12766
12680
|
}
|
|
12767
12681
|
}
|
|
@@ -12778,9 +12692,9 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12778
12692
|
if (data10 && typeof data10 == "object" && !Array.isArray(data10)) {
|
|
12779
12693
|
var props1 = {};
|
|
12780
12694
|
for (const key5 in data10) {
|
|
12781
|
-
if (
|
|
12782
|
-
if (!(
|
|
12783
|
-
vErrors = vErrors === null ?
|
|
12695
|
+
if (pattern40.test(key5)) {
|
|
12696
|
+
if (!(validate78(data10[key5], { instancePath: instancePath + "/structure/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data10, parentDataProperty: key5, rootData, dynamicAnchors }))) {
|
|
12697
|
+
vErrors = vErrors === null ? validate78.errors : vErrors.concat(validate78.errors);
|
|
12784
12698
|
errors = vErrors.length;
|
|
12785
12699
|
}
|
|
12786
12700
|
props1[key5] = true;
|
|
@@ -12788,7 +12702,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12788
12702
|
}
|
|
12789
12703
|
}
|
|
12790
12704
|
else {
|
|
12791
|
-
|
|
12705
|
+
validate77.errors = [{ instancePath: instancePath + "/structure", schemaPath: "#/properties/structure/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12792
12706
|
return false;
|
|
12793
12707
|
}
|
|
12794
12708
|
}
|
|
@@ -12805,15 +12719,15 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12805
12719
|
}
|
|
12806
12720
|
}
|
|
12807
12721
|
else {
|
|
12808
|
-
|
|
12722
|
+
validate77.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12809
12723
|
return false;
|
|
12810
12724
|
}
|
|
12811
|
-
}
|
|
12812
|
-
|
|
12813
|
-
export const ProtocolRuleSet =
|
|
12814
|
-
export const ProtocolsConfigure =
|
|
12815
|
-
const
|
|
12816
|
-
function
|
|
12725
|
+
} validate77.errors = vErrors; return errors === 0; }
|
|
12726
|
+
validate77.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12727
|
+
export const ProtocolRuleSet = validate78;
|
|
12728
|
+
export const ProtocolsConfigure = validate81;
|
|
12729
|
+
const schema124 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-configure.json", "type": "object", "additionalProperties": false, "required": ["authorization", "descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "definition"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Configure"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "definition": { "$ref": "https://identity.foundation/dwn/json-schemas/protocol-definition.json" }, "permissionGrantId": { "type": "string" } } } } };
|
|
12730
|
+
function validate81(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-configure.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate81.evaluated; if (evaluated0.dynamicProps) {
|
|
12817
12731
|
evaluated0.props = undefined;
|
|
12818
12732
|
} if (evaluated0.dynamicItems) {
|
|
12819
12733
|
evaluated0.items = undefined;
|
|
@@ -12821,14 +12735,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12821
12735
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
12822
12736
|
let missing0;
|
|
12823
12737
|
if (((data.authorization === undefined) && (missing0 = "authorization")) || ((data.descriptor === undefined) && (missing0 = "descriptor"))) {
|
|
12824
|
-
|
|
12738
|
+
validate81.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
12825
12739
|
return false;
|
|
12826
12740
|
}
|
|
12827
12741
|
else {
|
|
12828
12742
|
const _errs1 = errors;
|
|
12829
12743
|
for (const key0 in data) {
|
|
12830
12744
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
12831
|
-
|
|
12745
|
+
validate81.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
12832
12746
|
return false;
|
|
12833
12747
|
break;
|
|
12834
12748
|
}
|
|
@@ -12853,14 +12767,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12853
12767
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
12854
12768
|
let missing1;
|
|
12855
12769
|
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.definition === undefined) && (missing1 = "definition"))) {
|
|
12856
|
-
|
|
12770
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
12857
12771
|
return false;
|
|
12858
12772
|
}
|
|
12859
12773
|
else {
|
|
12860
12774
|
const _errs5 = errors;
|
|
12861
12775
|
for (const key1 in data1) {
|
|
12862
12776
|
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "definition")) || (key1 === "permissionGrantId"))) {
|
|
12863
|
-
|
|
12777
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
12864
12778
|
return false;
|
|
12865
12779
|
break;
|
|
12866
12780
|
}
|
|
@@ -12870,11 +12784,11 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12870
12784
|
let data2 = data1.interface;
|
|
12871
12785
|
const _errs6 = errors;
|
|
12872
12786
|
if (typeof data2 !== "string") {
|
|
12873
|
-
|
|
12787
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12874
12788
|
return false;
|
|
12875
12789
|
}
|
|
12876
12790
|
if (!(data2 === "Protocols")) {
|
|
12877
|
-
|
|
12791
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema124.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
12878
12792
|
return false;
|
|
12879
12793
|
}
|
|
12880
12794
|
var valid1 = _errs6 === errors;
|
|
@@ -12887,11 +12801,11 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12887
12801
|
let data3 = data1.method;
|
|
12888
12802
|
const _errs8 = errors;
|
|
12889
12803
|
if (typeof data3 !== "string") {
|
|
12890
|
-
|
|
12804
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12891
12805
|
return false;
|
|
12892
12806
|
}
|
|
12893
12807
|
if (!(data3 === "Configure")) {
|
|
12894
|
-
|
|
12808
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema124.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
12895
12809
|
return false;
|
|
12896
12810
|
}
|
|
12897
12811
|
var valid1 = _errs8 === errors;
|
|
@@ -12907,12 +12821,12 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12907
12821
|
if (errors === _errs11) {
|
|
12908
12822
|
if (typeof data4 === "string") {
|
|
12909
12823
|
if (!pattern14.test(data4)) {
|
|
12910
|
-
|
|
12824
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
12911
12825
|
return false;
|
|
12912
12826
|
}
|
|
12913
12827
|
}
|
|
12914
12828
|
else {
|
|
12915
|
-
|
|
12829
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12916
12830
|
return false;
|
|
12917
12831
|
}
|
|
12918
12832
|
}
|
|
@@ -12924,8 +12838,8 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12924
12838
|
if (valid1) {
|
|
12925
12839
|
if (data1.definition !== undefined) {
|
|
12926
12840
|
const _errs13 = errors;
|
|
12927
|
-
if (!(
|
|
12928
|
-
vErrors = vErrors === null ?
|
|
12841
|
+
if (!(validate77(data1.definition, { instancePath: instancePath + "/descriptor/definition", parentData: data1, parentDataProperty: "definition", rootData, dynamicAnchors }))) {
|
|
12842
|
+
vErrors = vErrors === null ? validate77.errors : vErrors.concat(validate77.errors);
|
|
12929
12843
|
errors = vErrors.length;
|
|
12930
12844
|
}
|
|
12931
12845
|
var valid1 = _errs13 === errors;
|
|
@@ -12937,7 +12851,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12937
12851
|
if (data1.permissionGrantId !== undefined) {
|
|
12938
12852
|
const _errs14 = errors;
|
|
12939
12853
|
if (typeof data1.permissionGrantId !== "string") {
|
|
12940
|
-
|
|
12854
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12941
12855
|
return false;
|
|
12942
12856
|
}
|
|
12943
12857
|
var valid1 = _errs14 === errors;
|
|
@@ -12953,7 +12867,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12953
12867
|
}
|
|
12954
12868
|
}
|
|
12955
12869
|
else {
|
|
12956
|
-
|
|
12870
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12957
12871
|
return false;
|
|
12958
12872
|
}
|
|
12959
12873
|
}
|
|
@@ -12967,14 +12881,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12967
12881
|
}
|
|
12968
12882
|
}
|
|
12969
12883
|
else {
|
|
12970
|
-
|
|
12884
|
+
validate81.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12971
12885
|
return false;
|
|
12972
12886
|
}
|
|
12973
|
-
}
|
|
12974
|
-
|
|
12975
|
-
export const ProtocolsQuery =
|
|
12976
|
-
const
|
|
12977
|
-
function
|
|
12887
|
+
} validate81.errors = vErrors; return errors === 0; }
|
|
12888
|
+
validate81.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
12889
|
+
export const ProtocolsQuery = validate84;
|
|
12890
|
+
const schema126 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/protocols-query.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp"], "properties": { "interface": { "enum": ["Protocols"], "type": "string" }, "method": { "enum": ["Query"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "type": "object", "minProperties": 1, "additionalProperties": false, "properties": { "protocol": { "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" } } }, "permissionGrantId": { "type": "string" } } } } };
|
|
12891
|
+
function validate84(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/protocols-query.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate84.evaluated; if (evaluated0.dynamicProps) {
|
|
12978
12892
|
evaluated0.props = undefined;
|
|
12979
12893
|
} if (evaluated0.dynamicItems) {
|
|
12980
12894
|
evaluated0.items = undefined;
|
|
@@ -12982,14 +12896,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12982
12896
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
12983
12897
|
let missing0;
|
|
12984
12898
|
if ((data.descriptor === undefined) && (missing0 = "descriptor")) {
|
|
12985
|
-
|
|
12899
|
+
validate84.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
12986
12900
|
return false;
|
|
12987
12901
|
}
|
|
12988
12902
|
else {
|
|
12989
12903
|
const _errs1 = errors;
|
|
12990
12904
|
for (const key0 in data) {
|
|
12991
12905
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
12992
|
-
|
|
12906
|
+
validate84.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
12993
12907
|
return false;
|
|
12994
12908
|
break;
|
|
12995
12909
|
}
|
|
@@ -13014,14 +12928,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13014
12928
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
13015
12929
|
let missing1;
|
|
13016
12930
|
if ((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) {
|
|
13017
|
-
|
|
12931
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
13018
12932
|
return false;
|
|
13019
12933
|
}
|
|
13020
12934
|
else {
|
|
13021
12935
|
const _errs5 = errors;
|
|
13022
12936
|
for (const key1 in data1) {
|
|
13023
12937
|
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "permissionGrantId"))) {
|
|
13024
|
-
|
|
12938
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
13025
12939
|
return false;
|
|
13026
12940
|
break;
|
|
13027
12941
|
}
|
|
@@ -13031,11 +12945,11 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13031
12945
|
let data2 = data1.interface;
|
|
13032
12946
|
const _errs6 = errors;
|
|
13033
12947
|
if (typeof data2 !== "string") {
|
|
13034
|
-
|
|
12948
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13035
12949
|
return false;
|
|
13036
12950
|
}
|
|
13037
12951
|
if (!(data2 === "Protocols")) {
|
|
13038
|
-
|
|
12952
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema126.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
13039
12953
|
return false;
|
|
13040
12954
|
}
|
|
13041
12955
|
var valid1 = _errs6 === errors;
|
|
@@ -13048,11 +12962,11 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13048
12962
|
let data3 = data1.method;
|
|
13049
12963
|
const _errs8 = errors;
|
|
13050
12964
|
if (typeof data3 !== "string") {
|
|
13051
|
-
|
|
12965
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13052
12966
|
return false;
|
|
13053
12967
|
}
|
|
13054
12968
|
if (!(data3 === "Query")) {
|
|
13055
|
-
|
|
12969
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema126.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
13056
12970
|
return false;
|
|
13057
12971
|
}
|
|
13058
12972
|
var valid1 = _errs8 === errors;
|
|
@@ -13068,12 +12982,12 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13068
12982
|
if (errors === _errs11) {
|
|
13069
12983
|
if (typeof data4 === "string") {
|
|
13070
12984
|
if (!pattern14.test(data4)) {
|
|
13071
|
-
|
|
12985
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
13072
12986
|
return false;
|
|
13073
12987
|
}
|
|
13074
12988
|
}
|
|
13075
12989
|
else {
|
|
13076
|
-
|
|
12990
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13077
12991
|
return false;
|
|
13078
12992
|
}
|
|
13079
12993
|
}
|
|
@@ -13089,14 +13003,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13089
13003
|
if (errors === _errs13) {
|
|
13090
13004
|
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
13091
13005
|
if (Object.keys(data5).length < 1) {
|
|
13092
|
-
|
|
13006
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter", schemaPath: "#/properties/descriptor/properties/filter/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
13093
13007
|
return false;
|
|
13094
13008
|
}
|
|
13095
13009
|
else {
|
|
13096
13010
|
const _errs15 = errors;
|
|
13097
13011
|
for (const key2 in data5) {
|
|
13098
13012
|
if (!((key2 === "protocol") || (key2 === "recipient"))) {
|
|
13099
|
-
|
|
13013
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter", schemaPath: "#/properties/descriptor/properties/filter/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
13100
13014
|
return false;
|
|
13101
13015
|
break;
|
|
13102
13016
|
}
|
|
@@ -13105,7 +13019,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13105
13019
|
if (data5.protocol !== undefined) {
|
|
13106
13020
|
const _errs16 = errors;
|
|
13107
13021
|
if (typeof data5.protocol !== "string") {
|
|
13108
|
-
|
|
13022
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter/protocol", schemaPath: "#/properties/descriptor/properties/filter/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13109
13023
|
return false;
|
|
13110
13024
|
}
|
|
13111
13025
|
var valid3 = _errs16 === errors;
|
|
@@ -13121,12 +13035,12 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13121
13035
|
if (errors === _errs19) {
|
|
13122
13036
|
if (typeof data7 === "string") {
|
|
13123
13037
|
if (!pattern12.test(data7)) {
|
|
13124
|
-
|
|
13038
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter/recipient", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did/pattern", keyword: "pattern", params: { pattern: "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" }, message: "must match pattern \"" + "^did:([a-z0-9]+):((?:(?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))*:)*((?:[a-zA-Z0-9._-]|(?:%[0-9a-fA-F]{2}))+))((;[a-zA-Z0-9_.:%-]+=[a-zA-Z0-9_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" + "\"" }];
|
|
13125
13039
|
return false;
|
|
13126
13040
|
}
|
|
13127
13041
|
}
|
|
13128
13042
|
else {
|
|
13129
|
-
|
|
13043
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter/recipient", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13130
13044
|
return false;
|
|
13131
13045
|
}
|
|
13132
13046
|
}
|
|
@@ -13140,7 +13054,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13140
13054
|
}
|
|
13141
13055
|
}
|
|
13142
13056
|
else {
|
|
13143
|
-
|
|
13057
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter", schemaPath: "#/properties/descriptor/properties/filter/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13144
13058
|
return false;
|
|
13145
13059
|
}
|
|
13146
13060
|
}
|
|
@@ -13153,7 +13067,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13153
13067
|
if (data1.permissionGrantId !== undefined) {
|
|
13154
13068
|
const _errs21 = errors;
|
|
13155
13069
|
if (typeof data1.permissionGrantId !== "string") {
|
|
13156
|
-
|
|
13070
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13157
13071
|
return false;
|
|
13158
13072
|
}
|
|
13159
13073
|
var valid1 = _errs21 === errors;
|
|
@@ -13169,7 +13083,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13169
13083
|
}
|
|
13170
13084
|
}
|
|
13171
13085
|
else {
|
|
13172
|
-
|
|
13086
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13173
13087
|
return false;
|
|
13174
13088
|
}
|
|
13175
13089
|
}
|
|
@@ -13183,14 +13097,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13183
13097
|
}
|
|
13184
13098
|
}
|
|
13185
13099
|
else {
|
|
13186
|
-
|
|
13100
|
+
validate84.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13187
13101
|
return false;
|
|
13188
13102
|
}
|
|
13189
|
-
}
|
|
13190
|
-
|
|
13191
|
-
export const RecordsRead =
|
|
13192
|
-
const
|
|
13193
|
-
function
|
|
13103
|
+
} validate84.errors = vErrors; return errors === 0; }
|
|
13104
|
+
validate84.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13105
|
+
export const RecordsRead = validate86;
|
|
13106
|
+
const schema129 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-read.json", "type": "object", "additionalProperties": false, "required": ["descriptor"], "properties": { "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" }, "descriptor": { "type": "object", "additionalProperties": false, "required": ["interface", "method", "messageTimestamp", "filter"], "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Read"], "type": "string" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "filter": { "$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" }, "permissionGrantId": { "type": "string" }, "dateSort": { "enum": ["createdAscending", "createdDescending", "publishedAscending", "publishedDescending", "updatedAscending", "updatedDescending"], "type": "string" } } } } };
|
|
13107
|
+
function validate86(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-read.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate86.evaluated; if (evaluated0.dynamicProps) {
|
|
13194
13108
|
evaluated0.props = undefined;
|
|
13195
13109
|
} if (evaluated0.dynamicItems) {
|
|
13196
13110
|
evaluated0.items = undefined;
|
|
@@ -13198,14 +13112,14 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13198
13112
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13199
13113
|
let missing0;
|
|
13200
13114
|
if ((data.descriptor === undefined) && (missing0 = "descriptor")) {
|
|
13201
|
-
|
|
13115
|
+
validate86.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13202
13116
|
return false;
|
|
13203
13117
|
}
|
|
13204
13118
|
else {
|
|
13205
13119
|
const _errs1 = errors;
|
|
13206
13120
|
for (const key0 in data) {
|
|
13207
13121
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
13208
|
-
|
|
13122
|
+
validate86.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13209
13123
|
return false;
|
|
13210
13124
|
break;
|
|
13211
13125
|
}
|
|
@@ -13230,14 +13144,14 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13230
13144
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
13231
13145
|
let missing1;
|
|
13232
13146
|
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.filter === undefined) && (missing1 = "filter"))) {
|
|
13233
|
-
|
|
13147
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
13234
13148
|
return false;
|
|
13235
13149
|
}
|
|
13236
13150
|
else {
|
|
13237
13151
|
const _errs5 = errors;
|
|
13238
13152
|
for (const key1 in data1) {
|
|
13239
13153
|
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "permissionGrantId")) || (key1 === "dateSort"))) {
|
|
13240
|
-
|
|
13154
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
13241
13155
|
return false;
|
|
13242
13156
|
break;
|
|
13243
13157
|
}
|
|
@@ -13247,11 +13161,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13247
13161
|
let data2 = data1.interface;
|
|
13248
13162
|
const _errs6 = errors;
|
|
13249
13163
|
if (typeof data2 !== "string") {
|
|
13250
|
-
|
|
13164
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13251
13165
|
return false;
|
|
13252
13166
|
}
|
|
13253
13167
|
if (!(data2 === "Records")) {
|
|
13254
|
-
|
|
13168
|
+
validate86.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" }];
|
|
13255
13169
|
return false;
|
|
13256
13170
|
}
|
|
13257
13171
|
var valid1 = _errs6 === errors;
|
|
@@ -13264,11 +13178,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13264
13178
|
let data3 = data1.method;
|
|
13265
13179
|
const _errs8 = errors;
|
|
13266
13180
|
if (typeof data3 !== "string") {
|
|
13267
|
-
|
|
13181
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13268
13182
|
return false;
|
|
13269
13183
|
}
|
|
13270
13184
|
if (!(data3 === "Read")) {
|
|
13271
|
-
|
|
13185
|
+
validate86.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" }];
|
|
13272
13186
|
return false;
|
|
13273
13187
|
}
|
|
13274
13188
|
var valid1 = _errs8 === errors;
|
|
@@ -13284,12 +13198,12 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13284
13198
|
if (errors === _errs11) {
|
|
13285
13199
|
if (typeof data4 === "string") {
|
|
13286
13200
|
if (!pattern14.test(data4)) {
|
|
13287
|
-
|
|
13201
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/pattern", keyword: "pattern", params: { pattern: "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" }, message: "must match pattern \"" + "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" + "\"" }];
|
|
13288
13202
|
return false;
|
|
13289
13203
|
}
|
|
13290
13204
|
}
|
|
13291
13205
|
else {
|
|
13292
|
-
|
|
13206
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/messageTimestamp", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13293
13207
|
return false;
|
|
13294
13208
|
}
|
|
13295
13209
|
}
|
|
@@ -13314,7 +13228,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13314
13228
|
if (data1.permissionGrantId !== undefined) {
|
|
13315
13229
|
const _errs14 = errors;
|
|
13316
13230
|
if (typeof data1.permissionGrantId !== "string") {
|
|
13317
|
-
|
|
13231
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13318
13232
|
return false;
|
|
13319
13233
|
}
|
|
13320
13234
|
var valid1 = _errs14 === errors;
|
|
@@ -13327,11 +13241,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13327
13241
|
let data7 = data1.dateSort;
|
|
13328
13242
|
const _errs16 = errors;
|
|
13329
13243
|
if (typeof data7 !== "string") {
|
|
13330
|
-
|
|
13244
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13331
13245
|
return false;
|
|
13332
13246
|
}
|
|
13333
13247
|
if (!((((((data7 === "createdAscending") || (data7 === "createdDescending")) || (data7 === "publishedAscending")) || (data7 === "publishedDescending")) || (data7 === "updatedAscending")) || (data7 === "updatedDescending"))) {
|
|
13334
|
-
|
|
13248
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/enum", keyword: "enum", params: { allowedValues: schema129.properties.descriptor.properties.dateSort.enum }, message: "must be equal to one of the allowed values" }];
|
|
13335
13249
|
return false;
|
|
13336
13250
|
}
|
|
13337
13251
|
var valid1 = _errs16 === errors;
|
|
@@ -13348,7 +13262,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13348
13262
|
}
|
|
13349
13263
|
}
|
|
13350
13264
|
else {
|
|
13351
|
-
|
|
13265
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13352
13266
|
return false;
|
|
13353
13267
|
}
|
|
13354
13268
|
}
|
|
@@ -13362,16 +13276,16 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13362
13276
|
}
|
|
13363
13277
|
}
|
|
13364
13278
|
else {
|
|
13365
|
-
|
|
13279
|
+
validate86.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13366
13280
|
return false;
|
|
13367
13281
|
}
|
|
13368
|
-
}
|
|
13369
|
-
|
|
13282
|
+
} validate86.errors = vErrors; return errors === 0; }
|
|
13283
|
+
validate86.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13370
13284
|
export const RecordsFilter = validate41;
|
|
13371
13285
|
export const PublicJwk = validate32;
|
|
13372
|
-
export const GenericSignaturePayload =
|
|
13373
|
-
const
|
|
13374
|
-
function
|
|
13286
|
+
export const GenericSignaturePayload = validate89;
|
|
13287
|
+
const schema131 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid"], "properties": { "descriptorCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "$comment": "Direct Records and Protocols operations invoke a single grant with permissionGrantId. Message.createSignature rejects payloads that also include permissionGrantIds.", "type": "string" }, "permissionGrantIds": { "$comment": "Messages operations invoke grants with permissionGrantIds, including the single-grant case. Message.createSignature rejects payloads that also include permissionGrantId.", "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true }, "protocolRole": { "$comment": "Used in the Records interface to authorize role-authorized actions for protocol records", "type": "string" } } };
|
|
13288
|
+
function validate89(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/generic-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate89.evaluated; if (evaluated0.dynamicProps) {
|
|
13375
13289
|
evaluated0.props = undefined;
|
|
13376
13290
|
} if (evaluated0.dynamicItems) {
|
|
13377
13291
|
evaluated0.items = undefined;
|
|
@@ -13379,14 +13293,14 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13379
13293
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13380
13294
|
let missing0;
|
|
13381
13295
|
if ((data.descriptorCid === undefined) && (missing0 = "descriptorCid")) {
|
|
13382
|
-
|
|
13296
|
+
validate89.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13383
13297
|
return false;
|
|
13384
13298
|
}
|
|
13385
13299
|
else {
|
|
13386
13300
|
const _errs1 = errors;
|
|
13387
13301
|
for (const key0 in data) {
|
|
13388
13302
|
if (!(((((key0 === "descriptorCid") || (key0 === "delegatedGrantId")) || (key0 === "permissionGrantId")) || (key0 === "permissionGrantIds")) || (key0 === "protocolRole"))) {
|
|
13389
|
-
|
|
13303
|
+
validate89.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13390
13304
|
return false;
|
|
13391
13305
|
break;
|
|
13392
13306
|
}
|
|
@@ -13395,7 +13309,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13395
13309
|
if (data.descriptorCid !== undefined) {
|
|
13396
13310
|
const _errs2 = errors;
|
|
13397
13311
|
if (typeof data.descriptorCid !== "string") {
|
|
13398
|
-
|
|
13312
|
+
validate89.errors = [{ instancePath: instancePath + "/descriptorCid", schemaPath: "#/properties/descriptorCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13399
13313
|
return false;
|
|
13400
13314
|
}
|
|
13401
13315
|
var valid0 = _errs2 === errors;
|
|
@@ -13407,7 +13321,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13407
13321
|
if (data.delegatedGrantId !== undefined) {
|
|
13408
13322
|
const _errs4 = errors;
|
|
13409
13323
|
if (typeof data.delegatedGrantId !== "string") {
|
|
13410
|
-
|
|
13324
|
+
validate89.errors = [{ instancePath: instancePath + "/delegatedGrantId", schemaPath: "#/properties/delegatedGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13411
13325
|
return false;
|
|
13412
13326
|
}
|
|
13413
13327
|
var valid0 = _errs4 === errors;
|
|
@@ -13419,7 +13333,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13419
13333
|
if (data.permissionGrantId !== undefined) {
|
|
13420
13334
|
const _errs6 = errors;
|
|
13421
13335
|
if (typeof data.permissionGrantId !== "string") {
|
|
13422
|
-
|
|
13336
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantId", schemaPath: "#/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13423
13337
|
return false;
|
|
13424
13338
|
}
|
|
13425
13339
|
var valid0 = _errs6 === errors;
|
|
@@ -13434,7 +13348,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13434
13348
|
if (errors === _errs9) {
|
|
13435
13349
|
if (Array.isArray(data3)) {
|
|
13436
13350
|
if (data3.length < 1) {
|
|
13437
|
-
|
|
13351
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds", schemaPath: "#/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
13438
13352
|
return false;
|
|
13439
13353
|
}
|
|
13440
13354
|
else {
|
|
@@ -13443,7 +13357,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13443
13357
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
13444
13358
|
const _errs12 = errors;
|
|
13445
13359
|
if (typeof data3[i0] !== "string") {
|
|
13446
|
-
|
|
13360
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds/" + i0, schemaPath: "#/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13447
13361
|
return false;
|
|
13448
13362
|
}
|
|
13449
13363
|
var valid1 = _errs12 === errors;
|
|
@@ -13463,7 +13377,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13463
13377
|
}
|
|
13464
13378
|
if (typeof indices0[item0] == "number") {
|
|
13465
13379
|
j0 = indices0[item0];
|
|
13466
|
-
|
|
13380
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds", schemaPath: "#/properties/permissionGrantIds/uniqueItems", keyword: "uniqueItems", params: { i: i1, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i1 + " are identical)" }];
|
|
13467
13381
|
return false;
|
|
13468
13382
|
break;
|
|
13469
13383
|
}
|
|
@@ -13474,7 +13388,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13474
13388
|
}
|
|
13475
13389
|
}
|
|
13476
13390
|
else {
|
|
13477
|
-
|
|
13391
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds", schemaPath: "#/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
13478
13392
|
return false;
|
|
13479
13393
|
}
|
|
13480
13394
|
}
|
|
@@ -13487,7 +13401,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13487
13401
|
if (data.protocolRole !== undefined) {
|
|
13488
13402
|
const _errs14 = errors;
|
|
13489
13403
|
if (typeof data.protocolRole !== "string") {
|
|
13490
|
-
|
|
13404
|
+
validate89.errors = [{ instancePath: instancePath + "/protocolRole", schemaPath: "#/properties/protocolRole/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13491
13405
|
return false;
|
|
13492
13406
|
}
|
|
13493
13407
|
var valid0 = _errs14 === errors;
|
|
@@ -13503,14 +13417,14 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13503
13417
|
}
|
|
13504
13418
|
}
|
|
13505
13419
|
else {
|
|
13506
|
-
|
|
13420
|
+
validate89.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13507
13421
|
return false;
|
|
13508
13422
|
}
|
|
13509
|
-
}
|
|
13510
|
-
|
|
13511
|
-
export const RecordsWriteSignaturePayload =
|
|
13512
|
-
const
|
|
13513
|
-
function
|
|
13423
|
+
} validate89.errors = vErrors; return errors === 0; }
|
|
13424
|
+
validate89.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13425
|
+
export const RecordsWriteSignaturePayload = validate90;
|
|
13426
|
+
const schema132 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json", "type": "object", "additionalProperties": false, "required": ["descriptorCid", "recordId"], "properties": { "descriptorCid": { "type": "string" }, "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600 }, "attestationCid": { "type": "string" }, "encryptionCid": { "type": "string" }, "delegatedGrantId": { "type": "string" }, "permissionGrantId": { "type": "string" }, "protocolRole": { "type": "string" } } };
|
|
13427
|
+
function validate90(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/signature-payloads/records-write-signature-payload.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate90.evaluated; if (evaluated0.dynamicProps) {
|
|
13514
13428
|
evaluated0.props = undefined;
|
|
13515
13429
|
} if (evaluated0.dynamicItems) {
|
|
13516
13430
|
evaluated0.items = undefined;
|
|
@@ -13518,14 +13432,14 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13518
13432
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13519
13433
|
let missing0;
|
|
13520
13434
|
if (((data.descriptorCid === undefined) && (missing0 = "descriptorCid")) || ((data.recordId === undefined) && (missing0 = "recordId"))) {
|
|
13521
|
-
|
|
13435
|
+
validate90.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13522
13436
|
return false;
|
|
13523
13437
|
}
|
|
13524
13438
|
else {
|
|
13525
13439
|
const _errs1 = errors;
|
|
13526
13440
|
for (const key0 in data) {
|
|
13527
13441
|
if (!((((((((key0 === "descriptorCid") || (key0 === "recordId")) || (key0 === "contextId")) || (key0 === "attestationCid")) || (key0 === "encryptionCid")) || (key0 === "delegatedGrantId")) || (key0 === "permissionGrantId")) || (key0 === "protocolRole"))) {
|
|
13528
|
-
|
|
13442
|
+
validate90.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13529
13443
|
return false;
|
|
13530
13444
|
break;
|
|
13531
13445
|
}
|
|
@@ -13534,7 +13448,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13534
13448
|
if (data.descriptorCid !== undefined) {
|
|
13535
13449
|
const _errs2 = errors;
|
|
13536
13450
|
if (typeof data.descriptorCid !== "string") {
|
|
13537
|
-
|
|
13451
|
+
validate90.errors = [{ instancePath: instancePath + "/descriptorCid", schemaPath: "#/properties/descriptorCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13538
13452
|
return false;
|
|
13539
13453
|
}
|
|
13540
13454
|
var valid0 = _errs2 === errors;
|
|
@@ -13546,7 +13460,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13546
13460
|
if (data.recordId !== undefined) {
|
|
13547
13461
|
const _errs4 = errors;
|
|
13548
13462
|
if (typeof data.recordId !== "string") {
|
|
13549
|
-
|
|
13463
|
+
validate90.errors = [{ instancePath: instancePath + "/recordId", schemaPath: "#/properties/recordId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13550
13464
|
return false;
|
|
13551
13465
|
}
|
|
13552
13466
|
var valid0 = _errs4 === errors;
|
|
@@ -13561,12 +13475,12 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13561
13475
|
if (errors === _errs6) {
|
|
13562
13476
|
if (typeof data2 === "string") {
|
|
13563
13477
|
if (func1(data2) > 600) {
|
|
13564
|
-
|
|
13478
|
+
validate90.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
13565
13479
|
return false;
|
|
13566
13480
|
}
|
|
13567
13481
|
}
|
|
13568
13482
|
else {
|
|
13569
|
-
|
|
13483
|
+
validate90.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13570
13484
|
return false;
|
|
13571
13485
|
}
|
|
13572
13486
|
}
|
|
@@ -13579,7 +13493,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13579
13493
|
if (data.attestationCid !== undefined) {
|
|
13580
13494
|
const _errs8 = errors;
|
|
13581
13495
|
if (typeof data.attestationCid !== "string") {
|
|
13582
|
-
|
|
13496
|
+
validate90.errors = [{ instancePath: instancePath + "/attestationCid", schemaPath: "#/properties/attestationCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13583
13497
|
return false;
|
|
13584
13498
|
}
|
|
13585
13499
|
var valid0 = _errs8 === errors;
|
|
@@ -13591,7 +13505,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13591
13505
|
if (data.encryptionCid !== undefined) {
|
|
13592
13506
|
const _errs10 = errors;
|
|
13593
13507
|
if (typeof data.encryptionCid !== "string") {
|
|
13594
|
-
|
|
13508
|
+
validate90.errors = [{ instancePath: instancePath + "/encryptionCid", schemaPath: "#/properties/encryptionCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13595
13509
|
return false;
|
|
13596
13510
|
}
|
|
13597
13511
|
var valid0 = _errs10 === errors;
|
|
@@ -13603,7 +13517,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13603
13517
|
if (data.delegatedGrantId !== undefined) {
|
|
13604
13518
|
const _errs12 = errors;
|
|
13605
13519
|
if (typeof data.delegatedGrantId !== "string") {
|
|
13606
|
-
|
|
13520
|
+
validate90.errors = [{ instancePath: instancePath + "/delegatedGrantId", schemaPath: "#/properties/delegatedGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13607
13521
|
return false;
|
|
13608
13522
|
}
|
|
13609
13523
|
var valid0 = _errs12 === errors;
|
|
@@ -13615,7 +13529,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13615
13529
|
if (data.permissionGrantId !== undefined) {
|
|
13616
13530
|
const _errs14 = errors;
|
|
13617
13531
|
if (typeof data.permissionGrantId !== "string") {
|
|
13618
|
-
|
|
13532
|
+
validate90.errors = [{ instancePath: instancePath + "/permissionGrantId", schemaPath: "#/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13619
13533
|
return false;
|
|
13620
13534
|
}
|
|
13621
13535
|
var valid0 = _errs14 === errors;
|
|
@@ -13627,7 +13541,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13627
13541
|
if (data.protocolRole !== undefined) {
|
|
13628
13542
|
const _errs16 = errors;
|
|
13629
13543
|
if (typeof data.protocolRole !== "string") {
|
|
13630
|
-
|
|
13544
|
+
validate90.errors = [{ instancePath: instancePath + "/protocolRole", schemaPath: "#/properties/protocolRole/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13631
13545
|
return false;
|
|
13632
13546
|
}
|
|
13633
13547
|
var valid0 = _errs16 === errors;
|
|
@@ -13646,27 +13560,27 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13646
13560
|
}
|
|
13647
13561
|
}
|
|
13648
13562
|
else {
|
|
13649
|
-
|
|
13563
|
+
validate90.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13650
13564
|
return false;
|
|
13651
13565
|
}
|
|
13652
|
-
}
|
|
13653
|
-
|
|
13654
|
-
export const StringRangeFilter =
|
|
13655
|
-
function
|
|
13566
|
+
} validate90.errors = vErrors; return errors === 0; }
|
|
13567
|
+
validate90.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13568
|
+
export const StringRangeFilter = validate91;
|
|
13569
|
+
function validate91(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/string-range-filter.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate91.evaluated; if (evaluated0.dynamicProps) {
|
|
13656
13570
|
evaluated0.props = undefined;
|
|
13657
13571
|
} if (evaluated0.dynamicItems) {
|
|
13658
13572
|
evaluated0.items = undefined;
|
|
13659
13573
|
} if (errors === 0) {
|
|
13660
13574
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13661
13575
|
if (Object.keys(data).length < 1) {
|
|
13662
|
-
|
|
13576
|
+
validate91.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
13663
13577
|
return false;
|
|
13664
13578
|
}
|
|
13665
13579
|
else {
|
|
13666
13580
|
const _errs1 = errors;
|
|
13667
13581
|
for (const key0 in data) {
|
|
13668
13582
|
if (!((((key0 === "gt") || (key0 === "gte")) || (key0 === "lt")) || (key0 === "lte"))) {
|
|
13669
|
-
|
|
13583
|
+
validate91.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13670
13584
|
return false;
|
|
13671
13585
|
break;
|
|
13672
13586
|
}
|
|
@@ -13691,7 +13605,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13691
13605
|
}
|
|
13692
13606
|
var valid1 = _errs4 === errors;
|
|
13693
13607
|
if (valid1) {
|
|
13694
|
-
|
|
13608
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/gt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
13695
13609
|
return false;
|
|
13696
13610
|
}
|
|
13697
13611
|
else {
|
|
@@ -13730,7 +13644,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13730
13644
|
}
|
|
13731
13645
|
var valid2 = _errs7 === errors;
|
|
13732
13646
|
if (valid2) {
|
|
13733
|
-
|
|
13647
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/gte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
13734
13648
|
return false;
|
|
13735
13649
|
}
|
|
13736
13650
|
else {
|
|
@@ -13769,7 +13683,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13769
13683
|
}
|
|
13770
13684
|
var valid3 = _errs10 === errors;
|
|
13771
13685
|
if (valid3) {
|
|
13772
|
-
|
|
13686
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/lt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
13773
13687
|
return false;
|
|
13774
13688
|
}
|
|
13775
13689
|
else {
|
|
@@ -13808,7 +13722,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13808
13722
|
}
|
|
13809
13723
|
var valid4 = _errs13 === errors;
|
|
13810
13724
|
if (valid4) {
|
|
13811
|
-
|
|
13725
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/lte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
13812
13726
|
return false;
|
|
13813
13727
|
}
|
|
13814
13728
|
else {
|
|
@@ -13831,7 +13745,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13831
13745
|
if (data.gt !== undefined) {
|
|
13832
13746
|
const _errs14 = errors;
|
|
13833
13747
|
if (typeof data.gt !== "string") {
|
|
13834
|
-
|
|
13748
|
+
validate91.errors = [{ instancePath: instancePath + "/gt", schemaPath: "#/properties/gt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13835
13749
|
return false;
|
|
13836
13750
|
}
|
|
13837
13751
|
var valid5 = _errs14 === errors;
|
|
@@ -13843,7 +13757,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13843
13757
|
if (data.gte !== undefined) {
|
|
13844
13758
|
const _errs16 = errors;
|
|
13845
13759
|
if (typeof data.gte !== "string") {
|
|
13846
|
-
|
|
13760
|
+
validate91.errors = [{ instancePath: instancePath + "/gte", schemaPath: "#/properties/gte/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13847
13761
|
return false;
|
|
13848
13762
|
}
|
|
13849
13763
|
var valid5 = _errs16 === errors;
|
|
@@ -13855,7 +13769,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13855
13769
|
if (data.lt !== undefined) {
|
|
13856
13770
|
const _errs18 = errors;
|
|
13857
13771
|
if (typeof data.lt !== "string") {
|
|
13858
|
-
|
|
13772
|
+
validate91.errors = [{ instancePath: instancePath + "/lt", schemaPath: "#/properties/lt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13859
13773
|
return false;
|
|
13860
13774
|
}
|
|
13861
13775
|
var valid5 = _errs18 === errors;
|
|
@@ -13867,7 +13781,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13867
13781
|
if (data.lte !== undefined) {
|
|
13868
13782
|
const _errs20 = errors;
|
|
13869
13783
|
if (typeof data.lte !== "string") {
|
|
13870
|
-
|
|
13784
|
+
validate91.errors = [{ instancePath: instancePath + "/lte", schemaPath: "#/properties/lte/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13871
13785
|
return false;
|
|
13872
13786
|
}
|
|
13873
13787
|
var valid5 = _errs20 === errors;
|
|
@@ -13886,9 +13800,9 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13886
13800
|
}
|
|
13887
13801
|
}
|
|
13888
13802
|
else {
|
|
13889
|
-
|
|
13803
|
+
validate91.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13890
13804
|
return false;
|
|
13891
13805
|
}
|
|
13892
|
-
}
|
|
13893
|
-
|
|
13806
|
+
} validate91.errors = vErrors; return errors === 0; }
|
|
13807
|
+
validate91.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13894
13808
|
//# sourceMappingURL=precompiled-validators.js.map
|