@enbox/dwn-sdk-js 0.3.9 → 0.4.1
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 +11 -11
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +783 -1206
- 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 +13 -7
- 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 -61
- 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 +31 -69
- 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 +295 -0
- package/dist/esm/src/core/replication-apply.js.map +1 -0
- 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 +261 -16
- 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 +7 -8
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/interfaces/messages-query.js +49 -0
- package/dist/esm/src/interfaces/messages-query.js.map +1 -0
- package/dist/esm/src/interfaces/protocols-configure.js +7 -3
- 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/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 +274 -0
- package/dist/esm/tests/core/replication-apply.spec.js.map +1 -0
- 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 +620 -14
- 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 +84 -38
- 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 -4
- package/dist/esm/tests/test-suite.js.map +1 -1
- 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 +13 -7
- 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 -15
- 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 +13 -16
- 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 +129 -0
- package/dist/types/src/core/replication-apply.d.ts.map +1 -0
- 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 +47 -13
- 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 +16 -18
- 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 -55
- 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/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-apply.spec.d.ts +2 -0
- package/dist/types/tests/core/replication-apply.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/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 +13 -7
- package/src/core/grant-authorization.ts +11 -20
- package/src/core/message-reply.ts +6 -5
- package/src/core/messages-grant-authorization.ts +37 -100
- package/src/core/protocol-authorization-action.ts +29 -38
- package/src/core/protocol-authorization-validation.ts +41 -98
- 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 +412 -0
- package/src/core/resumable-task-manager.ts +10 -8
- package/src/core/validation-state-reader.ts +350 -0
- package/src/dwn.ts +417 -30
- 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 +16 -20
- package/src/interfaces/messages-query.ts +70 -0
- package/src/interfaces/protocols-configure.ts +12 -4
- 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 -65
- 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/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 -581
- package/dist/esm/src/handlers/messages-sync.js.map +0 -1
- package/dist/esm/src/interfaces/messages-sync.js +0 -54
- 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/sync/records-projection.js +0 -228
- package/dist/esm/src/sync/records-projection.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 -1771
- 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/esm/tests/sync/records-projection.spec.js +0 -245
- package/dist/esm/tests/sync/records-projection.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 -83
- package/dist/types/src/handlers/messages-sync.d.ts.map +0 -1
- package/dist/types/src/interfaces/messages-sync.d.ts +0 -23
- 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/sync/records-projection.d.ts +0 -98
- package/dist/types/src/sync/records-projection.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/dist/types/tests/sync/records-projection.spec.d.ts +0 -2
- package/dist/types/tests/sync/records-projection.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 -896
- package/src/interfaces/messages-sync.ts +0 -86
- 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/sync/records-projection.ts +0 -328
- 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,741 +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
|
-
let missing1;
|
|
7206
|
-
if ((data1.projectionRootVersion === undefined) && (missing1 = "projectionRootVersion")) {
|
|
7207
|
-
const err0 = {};
|
|
7208
|
-
if (vErrors === null) {
|
|
7209
|
-
vErrors = [err0];
|
|
7210
|
-
}
|
|
7211
|
-
else {
|
|
7212
|
-
vErrors.push(err0);
|
|
7213
|
-
}
|
|
7214
|
-
errors++;
|
|
7215
|
-
}
|
|
7216
|
-
}
|
|
7217
|
-
var _valid0 = _errs7 === errors;
|
|
7218
|
-
errors = _errs6;
|
|
7219
|
-
if (vErrors !== null) {
|
|
7220
|
-
if (_errs6) {
|
|
7221
|
-
vErrors.length = _errs6;
|
|
7222
|
-
}
|
|
7223
|
-
else {
|
|
7224
|
-
vErrors = null;
|
|
7225
|
-
}
|
|
7226
|
-
}
|
|
7227
|
-
if (_valid0) {
|
|
7228
|
-
const _errs8 = errors;
|
|
7229
|
-
const _errs9 = errors;
|
|
7230
|
-
const _errs10 = errors;
|
|
7231
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7232
|
-
let missing2;
|
|
7233
|
-
if ((data1.protocol === undefined) && (missing2 = "protocol")) {
|
|
7234
|
-
const err1 = {};
|
|
7235
|
-
if (vErrors === null) {
|
|
7236
|
-
vErrors = [err1];
|
|
7237
|
-
}
|
|
7238
|
-
else {
|
|
7239
|
-
vErrors.push(err1);
|
|
7240
|
-
}
|
|
7241
|
-
errors++;
|
|
7242
|
-
}
|
|
7243
|
-
}
|
|
7244
|
-
var valid3 = _errs10 === errors;
|
|
7245
|
-
if (valid3) {
|
|
7246
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7247
|
-
return false;
|
|
7248
|
-
}
|
|
7249
|
-
else {
|
|
7250
|
-
errors = _errs9;
|
|
7251
|
-
if (vErrors !== null) {
|
|
7252
|
-
if (_errs9) {
|
|
7253
|
-
vErrors.length = _errs9;
|
|
7254
|
-
}
|
|
7255
|
-
else {
|
|
7256
|
-
vErrors = null;
|
|
7257
|
-
}
|
|
7258
|
-
}
|
|
7259
|
-
}
|
|
7260
|
-
if (errors === _errs8) {
|
|
7261
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7262
|
-
let missing3;
|
|
7263
|
-
if ((data1.projectionScopes === undefined) && (missing3 = "projectionScopes")) {
|
|
7264
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/then/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
7265
|
-
return false;
|
|
7266
|
-
}
|
|
7267
|
-
}
|
|
7268
|
-
}
|
|
7269
|
-
var _valid0 = _errs8 === errors;
|
|
7270
|
-
valid2 = _valid0;
|
|
7271
|
-
}
|
|
7272
|
-
if (!valid2) {
|
|
7273
|
-
const err2 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7274
|
-
if (vErrors === null) {
|
|
7275
|
-
vErrors = [err2];
|
|
7276
|
-
}
|
|
7277
|
-
else {
|
|
7278
|
-
vErrors.push(err2);
|
|
7279
|
-
}
|
|
7280
|
-
errors++;
|
|
7281
|
-
validate62.errors = vErrors;
|
|
7282
|
-
return false;
|
|
7283
|
-
}
|
|
7284
|
-
var valid1 = _errs5 === errors;
|
|
7285
|
-
if (valid1) {
|
|
7286
|
-
const _errs11 = errors;
|
|
7287
|
-
const _errs12 = errors;
|
|
7288
|
-
let valid4 = true;
|
|
7289
|
-
const _errs13 = errors;
|
|
7290
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7291
|
-
let missing4;
|
|
7292
|
-
if ((data1.projectionScopes === undefined) && (missing4 = "projectionScopes")) {
|
|
7293
|
-
const err3 = {};
|
|
7294
|
-
if (vErrors === null) {
|
|
7295
|
-
vErrors = [err3];
|
|
7296
|
-
}
|
|
7297
|
-
else {
|
|
7298
|
-
vErrors.push(err3);
|
|
7299
|
-
}
|
|
7300
|
-
errors++;
|
|
7301
|
-
}
|
|
7302
|
-
}
|
|
7303
|
-
var _valid1 = _errs13 === errors;
|
|
7304
|
-
errors = _errs12;
|
|
7305
|
-
if (vErrors !== null) {
|
|
7306
|
-
if (_errs12) {
|
|
7307
|
-
vErrors.length = _errs12;
|
|
7308
|
-
}
|
|
7309
|
-
else {
|
|
7310
|
-
vErrors = null;
|
|
7311
|
-
}
|
|
7312
|
-
}
|
|
7313
|
-
if (_valid1) {
|
|
7314
|
-
const _errs14 = errors;
|
|
7315
|
-
const _errs15 = errors;
|
|
7316
|
-
const _errs16 = errors;
|
|
7317
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7318
|
-
let missing5;
|
|
7319
|
-
if ((data1.protocol === undefined) && (missing5 = "protocol")) {
|
|
7320
|
-
const err4 = {};
|
|
7321
|
-
if (vErrors === null) {
|
|
7322
|
-
vErrors = [err4];
|
|
7323
|
-
}
|
|
7324
|
-
else {
|
|
7325
|
-
vErrors.push(err4);
|
|
7326
|
-
}
|
|
7327
|
-
errors++;
|
|
7328
|
-
}
|
|
7329
|
-
}
|
|
7330
|
-
var valid5 = _errs16 === errors;
|
|
7331
|
-
if (valid5) {
|
|
7332
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
7333
|
-
return false;
|
|
7334
|
-
}
|
|
7335
|
-
else {
|
|
7336
|
-
errors = _errs15;
|
|
7337
|
-
if (vErrors !== null) {
|
|
7338
|
-
if (_errs15) {
|
|
7339
|
-
vErrors.length = _errs15;
|
|
7340
|
-
}
|
|
7341
|
-
else {
|
|
7342
|
-
vErrors = null;
|
|
7343
|
-
}
|
|
7344
|
-
}
|
|
7345
|
-
}
|
|
7346
|
-
if (errors === _errs14) {
|
|
7347
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7348
|
-
let missing6;
|
|
7349
|
-
if ((data1.projectionRootVersion === undefined) && (missing6 = "projectionRootVersion")) {
|
|
7350
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/then/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" }];
|
|
7351
|
-
return false;
|
|
7352
|
-
}
|
|
7353
|
-
}
|
|
7354
|
-
}
|
|
7355
|
-
var _valid1 = _errs14 === errors;
|
|
7356
|
-
valid4 = _valid1;
|
|
7357
|
-
}
|
|
7358
|
-
if (!valid4) {
|
|
7359
|
-
const err5 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/1/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7360
|
-
if (vErrors === null) {
|
|
7361
|
-
vErrors = [err5];
|
|
7362
|
-
}
|
|
7363
|
-
else {
|
|
7364
|
-
vErrors.push(err5);
|
|
7365
|
-
}
|
|
7366
|
-
errors++;
|
|
7367
|
-
validate62.errors = vErrors;
|
|
7368
|
-
return false;
|
|
7369
|
-
}
|
|
7370
|
-
var valid1 = _errs11 === errors;
|
|
7371
|
-
if (valid1) {
|
|
7372
|
-
const _errs17 = errors;
|
|
7373
|
-
const _errs18 = errors;
|
|
7374
|
-
let valid6 = true;
|
|
7375
|
-
const _errs19 = errors;
|
|
7376
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7377
|
-
if (data1.action !== undefined) {
|
|
7378
|
-
if ("subtree" !== data1.action) {
|
|
7379
|
-
const err6 = {};
|
|
7380
|
-
if (vErrors === null) {
|
|
7381
|
-
vErrors = [err6];
|
|
7382
|
-
}
|
|
7383
|
-
else {
|
|
7384
|
-
vErrors.push(err6);
|
|
7385
|
-
}
|
|
7386
|
-
errors++;
|
|
7387
|
-
}
|
|
7388
|
-
}
|
|
7389
|
-
}
|
|
7390
|
-
var _valid2 = _errs19 === errors;
|
|
7391
|
-
errors = _errs18;
|
|
7392
|
-
if (vErrors !== null) {
|
|
7393
|
-
if (_errs18) {
|
|
7394
|
-
vErrors.length = _errs18;
|
|
7395
|
-
}
|
|
7396
|
-
else {
|
|
7397
|
-
vErrors = null;
|
|
7398
|
-
}
|
|
7399
|
-
}
|
|
7400
|
-
if (_valid2) {
|
|
7401
|
-
const _errs21 = errors;
|
|
7402
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7403
|
-
let missing7;
|
|
7404
|
-
if ((data1.prefix === undefined) && (missing7 = "prefix")) {
|
|
7405
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/then/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" }];
|
|
7406
|
-
return false;
|
|
7407
|
-
}
|
|
7408
|
-
}
|
|
7409
|
-
var _valid2 = _errs21 === errors;
|
|
7410
|
-
valid6 = _valid2;
|
|
7411
|
-
}
|
|
7412
|
-
if (!valid6) {
|
|
7413
|
-
const err7 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/2/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7414
|
-
if (vErrors === null) {
|
|
7415
|
-
vErrors = [err7];
|
|
7416
|
-
}
|
|
7417
|
-
else {
|
|
7418
|
-
vErrors.push(err7);
|
|
7419
|
-
}
|
|
7420
|
-
errors++;
|
|
7421
|
-
validate62.errors = vErrors;
|
|
7422
|
-
return false;
|
|
7423
|
-
}
|
|
7424
|
-
var valid1 = _errs17 === errors;
|
|
7425
|
-
if (valid1) {
|
|
7426
|
-
const _errs22 = errors;
|
|
7427
|
-
const _errs23 = errors;
|
|
7428
|
-
let valid8 = true;
|
|
7429
|
-
const _errs24 = errors;
|
|
7430
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7431
|
-
if (data1.action !== undefined) {
|
|
7432
|
-
if ("leaves" !== data1.action) {
|
|
7433
|
-
const err8 = {};
|
|
7434
|
-
if (vErrors === null) {
|
|
7435
|
-
vErrors = [err8];
|
|
7436
|
-
}
|
|
7437
|
-
else {
|
|
7438
|
-
vErrors.push(err8);
|
|
7439
|
-
}
|
|
7440
|
-
errors++;
|
|
7441
|
-
}
|
|
7442
|
-
}
|
|
7443
|
-
}
|
|
7444
|
-
var _valid3 = _errs24 === errors;
|
|
7445
|
-
errors = _errs23;
|
|
7446
|
-
if (vErrors !== null) {
|
|
7447
|
-
if (_errs23) {
|
|
7448
|
-
vErrors.length = _errs23;
|
|
7449
|
-
}
|
|
7450
|
-
else {
|
|
7451
|
-
vErrors = null;
|
|
7452
|
-
}
|
|
7453
|
-
}
|
|
7454
|
-
if (_valid3) {
|
|
7455
|
-
const _errs26 = errors;
|
|
7456
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7457
|
-
let missing8;
|
|
7458
|
-
if ((data1.prefix === undefined) && (missing8 = "prefix")) {
|
|
7459
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/3/then/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" }];
|
|
7460
|
-
return false;
|
|
7461
|
-
}
|
|
7462
|
-
}
|
|
7463
|
-
var _valid3 = _errs26 === errors;
|
|
7464
|
-
valid8 = _valid3;
|
|
7465
|
-
}
|
|
7466
|
-
if (!valid8) {
|
|
7467
|
-
const err9 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/3/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7468
|
-
if (vErrors === null) {
|
|
7469
|
-
vErrors = [err9];
|
|
7470
|
-
}
|
|
7471
|
-
else {
|
|
7472
|
-
vErrors.push(err9);
|
|
7473
|
-
}
|
|
7474
|
-
errors++;
|
|
7475
|
-
validate62.errors = vErrors;
|
|
7476
|
-
return false;
|
|
7477
|
-
}
|
|
7478
|
-
var valid1 = _errs22 === errors;
|
|
7479
|
-
if (valid1) {
|
|
7480
|
-
const _errs27 = errors;
|
|
7481
|
-
const _errs28 = errors;
|
|
7482
|
-
let valid10 = true;
|
|
7483
|
-
const _errs29 = errors;
|
|
7484
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7485
|
-
if (data1.action !== undefined) {
|
|
7486
|
-
if ("diff" !== data1.action) {
|
|
7487
|
-
const err10 = {};
|
|
7488
|
-
if (vErrors === null) {
|
|
7489
|
-
vErrors = [err10];
|
|
7490
|
-
}
|
|
7491
|
-
else {
|
|
7492
|
-
vErrors.push(err10);
|
|
7493
|
-
}
|
|
7494
|
-
errors++;
|
|
7495
|
-
}
|
|
7496
|
-
}
|
|
7497
|
-
}
|
|
7498
|
-
var _valid4 = _errs29 === errors;
|
|
7499
|
-
errors = _errs28;
|
|
7500
|
-
if (vErrors !== null) {
|
|
7501
|
-
if (_errs28) {
|
|
7502
|
-
vErrors.length = _errs28;
|
|
7503
|
-
}
|
|
7504
|
-
else {
|
|
7505
|
-
vErrors = null;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
if (_valid4) {
|
|
7509
|
-
const _errs31 = errors;
|
|
7510
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7511
|
-
let missing9;
|
|
7512
|
-
if (((data1.hashes === undefined) && (missing9 = "hashes")) || ((data1.depth === undefined) && (missing9 = "depth"))) {
|
|
7513
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/4/then/required", keyword: "required", params: { missingProperty: missing9 }, message: "must have required property '" + missing9 + "'" }];
|
|
7514
|
-
return false;
|
|
7515
|
-
}
|
|
7516
|
-
}
|
|
7517
|
-
var _valid4 = _errs31 === errors;
|
|
7518
|
-
valid10 = _valid4;
|
|
7519
|
-
}
|
|
7520
|
-
if (!valid10) {
|
|
7521
|
-
const err11 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/4/if", keyword: "if", params: { failingKeyword: "then" }, message: "must match \"then\" schema" };
|
|
7522
|
-
if (vErrors === null) {
|
|
7523
|
-
vErrors = [err11];
|
|
7524
|
-
}
|
|
7525
|
-
else {
|
|
7526
|
-
vErrors.push(err11);
|
|
7527
|
-
}
|
|
7528
|
-
errors++;
|
|
7529
|
-
validate62.errors = vErrors;
|
|
7530
|
-
return false;
|
|
7531
|
-
}
|
|
7532
|
-
var valid1 = _errs27 === errors;
|
|
7533
|
-
}
|
|
7534
|
-
}
|
|
7535
|
-
}
|
|
7536
|
-
}
|
|
7537
7244
|
if (errors === _errs3) {
|
|
7538
7245
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
7539
|
-
let
|
|
7540
|
-
if (((((data1.interface === undefined) && (
|
|
7541
|
-
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 + "'" }];
|
|
7542
7249
|
return false;
|
|
7543
7250
|
}
|
|
7544
7251
|
else {
|
|
7545
|
-
const
|
|
7252
|
+
const _errs5 = errors;
|
|
7546
7253
|
for (const key1 in data1) {
|
|
7547
|
-
if (!(
|
|
7254
|
+
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filters")) || (key1 === "permissionGrantIds")) || (key1 === "cursor"))) {
|
|
7548
7255
|
validate62.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
7549
7256
|
return false;
|
|
7550
7257
|
break;
|
|
7551
7258
|
}
|
|
7552
7259
|
}
|
|
7553
|
-
if (
|
|
7260
|
+
if (_errs5 === errors) {
|
|
7554
7261
|
if (data1.interface !== undefined) {
|
|
7555
|
-
let
|
|
7556
|
-
const
|
|
7557
|
-
if (typeof
|
|
7262
|
+
let data2 = data1.interface;
|
|
7263
|
+
const _errs6 = errors;
|
|
7264
|
+
if (typeof data2 !== "string") {
|
|
7558
7265
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7559
7266
|
return false;
|
|
7560
7267
|
}
|
|
7561
|
-
if (!(
|
|
7562
|
-
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" }];
|
|
7563
7270
|
return false;
|
|
7564
7271
|
}
|
|
7565
|
-
var
|
|
7272
|
+
var valid1 = _errs6 === errors;
|
|
7566
7273
|
}
|
|
7567
7274
|
else {
|
|
7568
|
-
var
|
|
7275
|
+
var valid1 = true;
|
|
7569
7276
|
}
|
|
7570
|
-
if (
|
|
7277
|
+
if (valid1) {
|
|
7571
7278
|
if (data1.method !== undefined) {
|
|
7572
|
-
let
|
|
7573
|
-
const
|
|
7574
|
-
if (typeof
|
|
7279
|
+
let data3 = data1.method;
|
|
7280
|
+
const _errs8 = errors;
|
|
7281
|
+
if (typeof data3 !== "string") {
|
|
7575
7282
|
validate62.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7576
7283
|
return false;
|
|
7577
7284
|
}
|
|
7578
|
-
if (!(
|
|
7579
|
-
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" }];
|
|
7580
7287
|
return false;
|
|
7581
7288
|
}
|
|
7582
|
-
var
|
|
7289
|
+
var valid1 = _errs8 === errors;
|
|
7583
7290
|
}
|
|
7584
7291
|
else {
|
|
7585
|
-
var
|
|
7292
|
+
var valid1 = true;
|
|
7586
7293
|
}
|
|
7587
|
-
if (
|
|
7294
|
+
if (valid1) {
|
|
7588
7295
|
if (data1.messageTimestamp !== undefined) {
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
if (typeof data7 === "string") {
|
|
7594
|
-
if (!pattern14.test(data7)) {
|
|
7595
|
-
validate62.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$" + "\"" }];
|
|
7596
|
-
return false;
|
|
7597
|
-
}
|
|
7598
|
-
}
|
|
7599
|
-
else {
|
|
7600
|
-
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" }];
|
|
7601
|
-
return false;
|
|
7602
|
-
}
|
|
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;
|
|
7603
7300
|
}
|
|
7604
|
-
var
|
|
7301
|
+
var valid1 = _errs10 === errors;
|
|
7605
7302
|
}
|
|
7606
7303
|
else {
|
|
7607
|
-
var
|
|
7608
|
-
}
|
|
7609
|
-
if (
|
|
7610
|
-
if (data1.
|
|
7611
|
-
let
|
|
7612
|
-
const
|
|
7613
|
-
if (
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
if (data1.protocol !== undefined) {
|
|
7628
|
-
const _errs42 = errors;
|
|
7629
|
-
if (typeof data1.protocol !== "string") {
|
|
7630
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/protocol", schemaPath: "#/properties/descriptor/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7631
|
-
return false;
|
|
7632
|
-
}
|
|
7633
|
-
var valid12 = _errs42 === errors;
|
|
7634
|
-
}
|
|
7635
|
-
else {
|
|
7636
|
-
var valid12 = true;
|
|
7637
|
-
}
|
|
7638
|
-
if (valid12) {
|
|
7639
|
-
if (data1.projectionRootVersion !== undefined) {
|
|
7640
|
-
let data10 = data1.projectionRootVersion;
|
|
7641
|
-
const _errs44 = errors;
|
|
7642
|
-
if (typeof data10 !== "string") {
|
|
7643
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionRootVersion", schemaPath: "#/properties/descriptor/properties/projectionRootVersion/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7644
|
-
return false;
|
|
7645
|
-
}
|
|
7646
|
-
if (!(data10 === "records-primary-scope-root-v1")) {
|
|
7647
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionRootVersion", schemaPath: "#/properties/descriptor/properties/projectionRootVersion/enum", keyword: "enum", params: { allowedValues: schema88.properties.descriptor.properties.projectionRootVersion.enum }, message: "must be equal to one of the allowed values" }];
|
|
7648
|
-
return false;
|
|
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
|
+
}
|
|
7649
7324
|
}
|
|
7650
|
-
var valid12 = _errs44 === errors;
|
|
7651
7325
|
}
|
|
7652
7326
|
else {
|
|
7653
|
-
|
|
7327
|
+
validate62.errors = [{ instancePath: instancePath + "/descriptor/filters", schemaPath: "#/properties/descriptor/properties/filters/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7328
|
+
return false;
|
|
7654
7329
|
}
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7330
|
+
}
|
|
7331
|
+
var valid1 = _errs12 === errors;
|
|
7332
|
+
}
|
|
7333
|
+
else {
|
|
7334
|
+
var valid1 = true;
|
|
7335
|
+
}
|
|
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" }];
|
|
7344
|
+
return false;
|
|
7345
|
+
}
|
|
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" }];
|
|
7663
7353
|
return false;
|
|
7664
7354
|
}
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
}
|
|
7680
|
-
else {
|
|
7681
|
-
vErrors.push(err12);
|
|
7682
|
-
}
|
|
7683
|
-
errors++;
|
|
7684
|
-
}
|
|
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;
|
|
7685
7369
|
}
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/
|
|
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)" }];
|
|
7689
7373
|
return false;
|
|
7690
|
-
}
|
|
7691
|
-
else {
|
|
7692
|
-
errors = _errs50;
|
|
7693
|
-
if (vErrors !== null) {
|
|
7694
|
-
if (_errs50) {
|
|
7695
|
-
vErrors.length = _errs50;
|
|
7696
|
-
}
|
|
7697
|
-
else {
|
|
7698
|
-
vErrors = null;
|
|
7699
|
-
}
|
|
7700
|
-
}
|
|
7701
|
-
}
|
|
7702
|
-
if (errors === _errs48) {
|
|
7703
|
-
if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
|
|
7704
|
-
let missing12;
|
|
7705
|
-
if ((data12.protocol === undefined) && (missing12 = "protocol")) {
|
|
7706
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0, schemaPath: "#/properties/descriptor/properties/projectionScopes/items/required", keyword: "required", params: { missingProperty: missing12 }, message: "must have required property '" + missing12 + "'" }];
|
|
7707
|
-
return false;
|
|
7708
|
-
}
|
|
7709
|
-
else {
|
|
7710
|
-
const _errs52 = errors;
|
|
7711
|
-
for (const key2 in data12) {
|
|
7712
|
-
if (!(((key2 === "protocol") || (key2 === "protocolPath")) || (key2 === "contextId"))) {
|
|
7713
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0, schemaPath: "#/properties/descriptor/properties/projectionScopes/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
7714
|
-
return false;
|
|
7715
|
-
break;
|
|
7716
|
-
}
|
|
7717
|
-
}
|
|
7718
|
-
if (_errs52 === errors) {
|
|
7719
|
-
if (data12.protocol !== undefined) {
|
|
7720
|
-
const _errs53 = errors;
|
|
7721
|
-
if (typeof data12.protocol !== "string") {
|
|
7722
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocol", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7723
|
-
return false;
|
|
7724
|
-
}
|
|
7725
|
-
var valid16 = _errs53 === errors;
|
|
7726
|
-
}
|
|
7727
|
-
else {
|
|
7728
|
-
var valid16 = true;
|
|
7729
|
-
}
|
|
7730
|
-
if (valid16) {
|
|
7731
|
-
if (data12.protocolPath !== undefined) {
|
|
7732
|
-
let data14 = data12.protocolPath;
|
|
7733
|
-
const _errs55 = errors;
|
|
7734
|
-
if (errors === _errs55) {
|
|
7735
|
-
if (typeof data14 === "string") {
|
|
7736
|
-
if (func1(data14) > 600) {
|
|
7737
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocolPath", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocolPath/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
7738
|
-
return false;
|
|
7739
|
-
}
|
|
7740
|
-
}
|
|
7741
|
-
else {
|
|
7742
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/protocolPath", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/protocolPath/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7743
|
-
return false;
|
|
7744
|
-
}
|
|
7745
|
-
}
|
|
7746
|
-
var valid16 = _errs55 === errors;
|
|
7747
|
-
}
|
|
7748
|
-
else {
|
|
7749
|
-
var valid16 = true;
|
|
7750
|
-
}
|
|
7751
|
-
if (valid16) {
|
|
7752
|
-
if (data12.contextId !== undefined) {
|
|
7753
|
-
let data15 = data12.contextId;
|
|
7754
|
-
const _errs57 = errors;
|
|
7755
|
-
if (errors === _errs57) {
|
|
7756
|
-
if (typeof data15 === "string") {
|
|
7757
|
-
if (func1(data15) > 600) {
|
|
7758
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/contextId", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
7759
|
-
return false;
|
|
7760
|
-
}
|
|
7761
|
-
}
|
|
7762
|
-
else {
|
|
7763
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0 + "/contextId", schemaPath: "#/properties/descriptor/properties/projectionScopes/items/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7764
|
-
return false;
|
|
7765
|
-
}
|
|
7766
|
-
}
|
|
7767
|
-
var valid16 = _errs57 === errors;
|
|
7768
|
-
}
|
|
7769
|
-
else {
|
|
7770
|
-
var valid16 = true;
|
|
7771
|
-
}
|
|
7772
|
-
}
|
|
7773
|
-
}
|
|
7774
|
-
}
|
|
7775
|
-
}
|
|
7776
|
-
}
|
|
7777
|
-
else {
|
|
7778
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes/" + i0, schemaPath: "#/properties/descriptor/properties/projectionScopes/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
7779
|
-
return false;
|
|
7780
|
-
}
|
|
7781
|
-
}
|
|
7782
|
-
var valid14 = _errs48 === errors;
|
|
7783
|
-
if (!valid14) {
|
|
7784
7374
|
break;
|
|
7785
7375
|
}
|
|
7376
|
+
indices0[item0] = i2;
|
|
7786
7377
|
}
|
|
7787
7378
|
}
|
|
7788
7379
|
}
|
|
7789
|
-
else {
|
|
7790
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/projectionScopes", schemaPath: "#/properties/descriptor/properties/projectionScopes/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
7791
|
-
return false;
|
|
7792
|
-
}
|
|
7793
7380
|
}
|
|
7794
|
-
var valid12 = _errs46 === errors;
|
|
7795
7381
|
}
|
|
7796
7382
|
else {
|
|
7797
|
-
|
|
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;
|
|
7798
7385
|
}
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
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;
|
|
7403
|
+
}
|
|
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" }];
|
|
7807
7409
|
return false;
|
|
7410
|
+
break;
|
|
7808
7411
|
}
|
|
7809
7412
|
}
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
var valid12 = true;
|
|
7819
|
-
}
|
|
7820
|
-
if (valid12) {
|
|
7821
|
-
if (data1.permissionGrantIds !== undefined) {
|
|
7822
|
-
let data17 = data1.permissionGrantIds;
|
|
7823
|
-
const _errs61 = errors;
|
|
7824
|
-
if (errors === _errs61) {
|
|
7825
|
-
if (Array.isArray(data17)) {
|
|
7826
|
-
if (data17.length < 1) {
|
|
7827
|
-
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" }];
|
|
7828
|
-
return false;
|
|
7829
|
-
}
|
|
7830
|
-
else {
|
|
7831
|
-
var valid17 = true;
|
|
7832
|
-
const len1 = data17.length;
|
|
7833
|
-
for (let i1 = 0; i1 < len1; i1++) {
|
|
7834
|
-
const _errs63 = errors;
|
|
7835
|
-
if (typeof data17[i1] !== "string") {
|
|
7836
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantIds/" + i1, schemaPath: "#/properties/descriptor/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
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" }];
|
|
7837
7421
|
return false;
|
|
7838
7422
|
}
|
|
7839
|
-
var valid17 = _errs63 === errors;
|
|
7840
|
-
if (!valid17) {
|
|
7841
|
-
break;
|
|
7842
|
-
}
|
|
7843
7423
|
}
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
if (i2 > 1) {
|
|
7848
|
-
const indices0 = {};
|
|
7849
|
-
for (; i2--;) {
|
|
7850
|
-
let item0 = data17[i2];
|
|
7851
|
-
if (typeof item0 !== "string") {
|
|
7852
|
-
continue;
|
|
7853
|
-
}
|
|
7854
|
-
if (typeof indices0[item0] == "number") {
|
|
7855
|
-
j0 = indices0[item0];
|
|
7856
|
-
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)" }];
|
|
7857
|
-
return false;
|
|
7858
|
-
break;
|
|
7859
|
-
}
|
|
7860
|
-
indices0[item0] = i2;
|
|
7861
|
-
}
|
|
7862
|
-
}
|
|
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;
|
|
7863
7427
|
}
|
|
7864
7428
|
}
|
|
7429
|
+
var valid6 = _errs23 === errors;
|
|
7865
7430
|
}
|
|
7866
7431
|
else {
|
|
7867
|
-
|
|
7868
|
-
return false;
|
|
7432
|
+
var valid6 = true;
|
|
7869
7433
|
}
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
if (errors === _errs65) {
|
|
7881
|
-
if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
|
|
7882
|
-
for (const key3 in data19) {
|
|
7883
|
-
const _errs68 = errors;
|
|
7884
|
-
if (typeof data19[key3] !== "string") {
|
|
7885
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/hashes/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/hashes/additionalProperties/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
7886
|
-
return false;
|
|
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
|
+
}
|
|
7887
7444
|
}
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
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;
|
|
7891
7448
|
}
|
|
7892
7449
|
}
|
|
7450
|
+
var valid6 = _errs25 === errors;
|
|
7893
7451
|
}
|
|
7894
7452
|
else {
|
|
7895
|
-
|
|
7896
|
-
return false;
|
|
7897
|
-
}
|
|
7898
|
-
}
|
|
7899
|
-
var valid12 = _errs65 === errors;
|
|
7900
|
-
}
|
|
7901
|
-
else {
|
|
7902
|
-
var valid12 = true;
|
|
7903
|
-
}
|
|
7904
|
-
if (valid12) {
|
|
7905
|
-
if (data1.depth !== undefined) {
|
|
7906
|
-
let data21 = data1.depth;
|
|
7907
|
-
const _errs70 = errors;
|
|
7908
|
-
if (!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))) {
|
|
7909
|
-
validate62.errors = [{ instancePath: instancePath + "/descriptor/depth", schemaPath: "#/properties/descriptor/properties/depth/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
7910
|
-
return false;
|
|
7453
|
+
var valid6 = true;
|
|
7911
7454
|
}
|
|
7912
|
-
if (
|
|
7913
|
-
if (
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
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" }];
|
|
7921
7468
|
return false;
|
|
7922
7469
|
}
|
|
7923
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
|
+
}
|
|
7924
7497
|
}
|
|
7925
7498
|
}
|
|
7926
|
-
var valid12 = _errs70 === errors;
|
|
7927
|
-
}
|
|
7928
|
-
else {
|
|
7929
|
-
var valid12 = true;
|
|
7930
7499
|
}
|
|
7931
7500
|
}
|
|
7932
7501
|
}
|
|
7933
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
|
+
}
|
|
7934
7507
|
}
|
|
7508
|
+
var valid1 = _errs19 === errors;
|
|
7509
|
+
}
|
|
7510
|
+
else {
|
|
7511
|
+
var valid1 = true;
|
|
7935
7512
|
}
|
|
7936
7513
|
}
|
|
7937
7514
|
}
|
|
@@ -7961,22 +7538,22 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7961
7538
|
}
|
|
7962
7539
|
} validate62.errors = vErrors; return errors === 0; }
|
|
7963
7540
|
validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
7964
|
-
export const NumberRangeFilter =
|
|
7965
|
-
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) {
|
|
7966
7543
|
evaluated0.props = undefined;
|
|
7967
7544
|
} if (evaluated0.dynamicItems) {
|
|
7968
7545
|
evaluated0.items = undefined;
|
|
7969
7546
|
} if (errors === 0) {
|
|
7970
7547
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
7971
7548
|
if (Object.keys(data).length < 1) {
|
|
7972
|
-
|
|
7549
|
+
validate65.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
7973
7550
|
return false;
|
|
7974
7551
|
}
|
|
7975
7552
|
else {
|
|
7976
7553
|
const _errs1 = errors;
|
|
7977
7554
|
for (const key0 in data) {
|
|
7978
7555
|
if (!((((key0 === "gt") || (key0 === "gte")) || (key0 === "lt")) || (key0 === "lte"))) {
|
|
7979
|
-
|
|
7556
|
+
validate65.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
7980
7557
|
return false;
|
|
7981
7558
|
break;
|
|
7982
7559
|
}
|
|
@@ -8001,7 +7578,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8001
7578
|
}
|
|
8002
7579
|
var valid1 = _errs4 === errors;
|
|
8003
7580
|
if (valid1) {
|
|
8004
|
-
|
|
7581
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/gt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
8005
7582
|
return false;
|
|
8006
7583
|
}
|
|
8007
7584
|
else {
|
|
@@ -8040,7 +7617,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8040
7617
|
}
|
|
8041
7618
|
var valid2 = _errs7 === errors;
|
|
8042
7619
|
if (valid2) {
|
|
8043
|
-
|
|
7620
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/gte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
8044
7621
|
return false;
|
|
8045
7622
|
}
|
|
8046
7623
|
else {
|
|
@@ -8079,7 +7656,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8079
7656
|
}
|
|
8080
7657
|
var valid3 = _errs10 === errors;
|
|
8081
7658
|
if (valid3) {
|
|
8082
|
-
|
|
7659
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/lt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
8083
7660
|
return false;
|
|
8084
7661
|
}
|
|
8085
7662
|
else {
|
|
@@ -8118,7 +7695,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8118
7695
|
}
|
|
8119
7696
|
var valid4 = _errs13 === errors;
|
|
8120
7697
|
if (valid4) {
|
|
8121
|
-
|
|
7698
|
+
validate65.errors = [{ instancePath, schemaPath: "#/dependencies/lte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
8122
7699
|
return false;
|
|
8123
7700
|
}
|
|
8124
7701
|
else {
|
|
@@ -8142,7 +7719,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8142
7719
|
let data0 = data.gt;
|
|
8143
7720
|
const _errs14 = errors;
|
|
8144
7721
|
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
8145
|
-
|
|
7722
|
+
validate65.errors = [{ instancePath: instancePath + "/gt", schemaPath: "#/properties/gt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
8146
7723
|
return false;
|
|
8147
7724
|
}
|
|
8148
7725
|
var valid5 = _errs14 === errors;
|
|
@@ -8155,7 +7732,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8155
7732
|
let data1 = data.gte;
|
|
8156
7733
|
const _errs16 = errors;
|
|
8157
7734
|
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
8158
|
-
|
|
7735
|
+
validate65.errors = [{ instancePath: instancePath + "/gte", schemaPath: "#/properties/gte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
8159
7736
|
return false;
|
|
8160
7737
|
}
|
|
8161
7738
|
var valid5 = _errs16 === errors;
|
|
@@ -8168,7 +7745,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8168
7745
|
let data2 = data.lt;
|
|
8169
7746
|
const _errs18 = errors;
|
|
8170
7747
|
if (!((typeof data2 == "number") && (isFinite(data2)))) {
|
|
8171
|
-
|
|
7748
|
+
validate65.errors = [{ instancePath: instancePath + "/lt", schemaPath: "#/properties/lt/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
8172
7749
|
return false;
|
|
8173
7750
|
}
|
|
8174
7751
|
var valid5 = _errs18 === errors;
|
|
@@ -8181,7 +7758,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8181
7758
|
let data3 = data.lte;
|
|
8182
7759
|
const _errs20 = errors;
|
|
8183
7760
|
if (!((typeof data3 == "number") && (isFinite(data3)))) {
|
|
8184
|
-
|
|
7761
|
+
validate65.errors = [{ instancePath: instancePath + "/lte", schemaPath: "#/properties/lte/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
8185
7762
|
return false;
|
|
8186
7763
|
}
|
|
8187
7764
|
var valid5 = _errs20 === errors;
|
|
@@ -8200,33 +7777,33 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8200
7777
|
}
|
|
8201
7778
|
}
|
|
8202
7779
|
else {
|
|
8203
|
-
|
|
7780
|
+
validate65.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
8204
7781
|
return false;
|
|
8205
7782
|
}
|
|
8206
|
-
}
|
|
8207
|
-
|
|
8208
|
-
export const PaginationCursor =
|
|
8209
|
-
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) {
|
|
8210
7787
|
evaluated0.props = undefined;
|
|
8211
7788
|
} if (evaluated0.dynamicItems) {
|
|
8212
7789
|
evaluated0.items = undefined;
|
|
8213
7790
|
} if (errors === 0) {
|
|
8214
7791
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
8215
7792
|
if (Object.keys(data).length < 1) {
|
|
8216
|
-
|
|
7793
|
+
validate66.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
8217
7794
|
return false;
|
|
8218
7795
|
}
|
|
8219
7796
|
else {
|
|
8220
7797
|
let missing0;
|
|
8221
7798
|
if (((data.messageCid === undefined) && (missing0 = "messageCid")) || ((data.value === undefined) && (missing0 = "value"))) {
|
|
8222
|
-
|
|
7799
|
+
validate66.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
8223
7800
|
return false;
|
|
8224
7801
|
}
|
|
8225
7802
|
else {
|
|
8226
7803
|
const _errs1 = errors;
|
|
8227
7804
|
for (const key0 in data) {
|
|
8228
7805
|
if (!((key0 === "messageCid") || (key0 === "value"))) {
|
|
8229
|
-
|
|
7806
|
+
validate66.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
8230
7807
|
return false;
|
|
8231
7808
|
break;
|
|
8232
7809
|
}
|
|
@@ -8235,7 +7812,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8235
7812
|
if (data.messageCid !== undefined) {
|
|
8236
7813
|
const _errs2 = errors;
|
|
8237
7814
|
if (typeof data.messageCid !== "string") {
|
|
8238
|
-
|
|
7815
|
+
validate66.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8239
7816
|
return false;
|
|
8240
7817
|
}
|
|
8241
7818
|
var valid0 = _errs2 === errors;
|
|
@@ -8248,7 +7825,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8248
7825
|
let data1 = data.value;
|
|
8249
7826
|
const _errs4 = errors;
|
|
8250
7827
|
if ((typeof data1 !== "string") && (!((typeof data1 == "number") && (isFinite(data1))))) {
|
|
8251
|
-
|
|
7828
|
+
validate66.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/properties/value/type", keyword: "type", params: { type: schema72.properties.value.type }, message: "must be string,number" }];
|
|
8252
7829
|
return false;
|
|
8253
7830
|
}
|
|
8254
7831
|
var valid0 = _errs4 === errors;
|
|
@@ -8262,28 +7839,28 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8262
7839
|
}
|
|
8263
7840
|
}
|
|
8264
7841
|
else {
|
|
8265
|
-
|
|
7842
|
+
validate66.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
8266
7843
|
return false;
|
|
8267
7844
|
}
|
|
8268
|
-
}
|
|
8269
|
-
|
|
8270
|
-
export const ProgressToken =
|
|
8271
|
-
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) {
|
|
8272
7849
|
evaluated0.props = undefined;
|
|
8273
7850
|
} if (evaluated0.dynamicItems) {
|
|
8274
7851
|
evaluated0.items = undefined;
|
|
8275
7852
|
} if (errors === 0) {
|
|
8276
7853
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
8277
7854
|
let missing0;
|
|
8278
|
-
if ((((
|
|
8279
|
-
|
|
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 + "'" }];
|
|
8280
7857
|
return false;
|
|
8281
7858
|
}
|
|
8282
7859
|
else {
|
|
8283
7860
|
const _errs1 = errors;
|
|
8284
7861
|
for (const key0 in data) {
|
|
8285
7862
|
if (!((((key0 === "streamId") || (key0 === "epoch")) || (key0 === "position")) || (key0 === "messageCid"))) {
|
|
8286
|
-
|
|
7863
|
+
validate67.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
8287
7864
|
return false;
|
|
8288
7865
|
break;
|
|
8289
7866
|
}
|
|
@@ -8295,12 +7872,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8295
7872
|
if (errors === _errs2) {
|
|
8296
7873
|
if (typeof data0 === "string") {
|
|
8297
7874
|
if (func1(data0) < 1) {
|
|
8298
|
-
|
|
7875
|
+
validate67.errors = [{ instancePath: instancePath + "/streamId", schemaPath: "#/properties/streamId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8299
7876
|
return false;
|
|
8300
7877
|
}
|
|
8301
7878
|
}
|
|
8302
7879
|
else {
|
|
8303
|
-
|
|
7880
|
+
validate67.errors = [{ instancePath: instancePath + "/streamId", schemaPath: "#/properties/streamId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8304
7881
|
return false;
|
|
8305
7882
|
}
|
|
8306
7883
|
}
|
|
@@ -8316,12 +7893,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8316
7893
|
if (errors === _errs4) {
|
|
8317
7894
|
if (typeof data1 === "string") {
|
|
8318
7895
|
if (func1(data1) < 1) {
|
|
8319
|
-
|
|
7896
|
+
validate67.errors = [{ instancePath: instancePath + "/epoch", schemaPath: "#/properties/epoch/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8320
7897
|
return false;
|
|
8321
7898
|
}
|
|
8322
7899
|
}
|
|
8323
7900
|
else {
|
|
8324
|
-
|
|
7901
|
+
validate67.errors = [{ instancePath: instancePath + "/epoch", schemaPath: "#/properties/epoch/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8325
7902
|
return false;
|
|
8326
7903
|
}
|
|
8327
7904
|
}
|
|
@@ -8337,12 +7914,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8337
7914
|
if (errors === _errs6) {
|
|
8338
7915
|
if (typeof data2 === "string") {
|
|
8339
7916
|
if (func1(data2) < 1) {
|
|
8340
|
-
|
|
7917
|
+
validate67.errors = [{ instancePath: instancePath + "/position", schemaPath: "#/properties/position/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8341
7918
|
return false;
|
|
8342
7919
|
}
|
|
8343
7920
|
}
|
|
8344
7921
|
else {
|
|
8345
|
-
|
|
7922
|
+
validate67.errors = [{ instancePath: instancePath + "/position", schemaPath: "#/properties/position/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8346
7923
|
return false;
|
|
8347
7924
|
}
|
|
8348
7925
|
}
|
|
@@ -8358,12 +7935,12 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8358
7935
|
if (errors === _errs8) {
|
|
8359
7936
|
if (typeof data3 === "string") {
|
|
8360
7937
|
if (func1(data3) < 1) {
|
|
8361
|
-
|
|
7938
|
+
validate67.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
|
|
8362
7939
|
return false;
|
|
8363
7940
|
}
|
|
8364
7941
|
}
|
|
8365
7942
|
else {
|
|
8366
|
-
|
|
7943
|
+
validate67.errors = [{ instancePath: instancePath + "/messageCid", schemaPath: "#/properties/messageCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
8367
7944
|
return false;
|
|
8368
7945
|
}
|
|
8369
7946
|
}
|
|
@@ -8379,25 +7956,25 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8379
7956
|
}
|
|
8380
7957
|
}
|
|
8381
7958
|
else {
|
|
8382
|
-
|
|
7959
|
+
validate67.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
8383
7960
|
return false;
|
|
8384
7961
|
}
|
|
8385
|
-
}
|
|
8386
|
-
|
|
8387
|
-
export const PermissionGrantData =
|
|
8388
|
-
const
|
|
8389
|
-
const
|
|
8390
|
-
const
|
|
8391
|
-
const
|
|
8392
|
-
const
|
|
8393
|
-
const
|
|
8394
|
-
const
|
|
8395
|
-
const
|
|
8396
|
-
const
|
|
8397
|
-
const
|
|
8398
|
-
const
|
|
8399
|
-
const
|
|
8400
|
-
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) {
|
|
8401
7978
|
evaluated0.props = undefined;
|
|
8402
7979
|
} if (evaluated0.dynamicItems) {
|
|
8403
7980
|
evaluated0.items = undefined;
|
|
@@ -10025,7 +9602,7 @@ else {
|
|
|
10025
9602
|
vErrors.push(err89);
|
|
10026
9603
|
}
|
|
10027
9604
|
errors++;
|
|
10028
|
-
|
|
9605
|
+
validate70.errors = vErrors;
|
|
10029
9606
|
return false;
|
|
10030
9607
|
}
|
|
10031
9608
|
else {
|
|
@@ -10038,9 +9615,9 @@ else {
|
|
|
10038
9615
|
vErrors = null;
|
|
10039
9616
|
}
|
|
10040
9617
|
}
|
|
10041
|
-
}
|
|
10042
|
-
|
|
10043
|
-
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) {
|
|
10044
9621
|
evaluated0.props = undefined;
|
|
10045
9622
|
} if (evaluated0.dynamicItems) {
|
|
10046
9623
|
evaluated0.items = undefined;
|
|
@@ -10048,14 +9625,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10048
9625
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
10049
9626
|
let missing0;
|
|
10050
9627
|
if (((data.dateExpires === undefined) && (missing0 = "dateExpires")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
10051
|
-
|
|
9628
|
+
validate68.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
10052
9629
|
return false;
|
|
10053
9630
|
}
|
|
10054
9631
|
else {
|
|
10055
9632
|
const _errs1 = errors;
|
|
10056
9633
|
for (const key0 in data) {
|
|
10057
9634
|
if (!(((((((key0 === "description") || (key0 === "dateExpires")) || (key0 === "requestId")) || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions")) || (key0 === "delegateKeyDelivery"))) {
|
|
10058
|
-
|
|
9635
|
+
validate68.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
10059
9636
|
return false;
|
|
10060
9637
|
break;
|
|
10061
9638
|
}
|
|
@@ -10064,7 +9641,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10064
9641
|
if (data.description !== undefined) {
|
|
10065
9642
|
const _errs2 = errors;
|
|
10066
9643
|
if (typeof data.description !== "string") {
|
|
10067
|
-
|
|
9644
|
+
validate68.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
10068
9645
|
return false;
|
|
10069
9646
|
}
|
|
10070
9647
|
var valid0 = _errs2 === errors;
|
|
@@ -10080,12 +9657,12 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10080
9657
|
if (errors === _errs5) {
|
|
10081
9658
|
if (typeof data1 === "string") {
|
|
10082
9659
|
if (!pattern14.test(data1)) {
|
|
10083
|
-
|
|
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$" + "\"" }];
|
|
10084
9661
|
return false;
|
|
10085
9662
|
}
|
|
10086
9663
|
}
|
|
10087
9664
|
else {
|
|
10088
|
-
|
|
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" }];
|
|
10089
9666
|
return false;
|
|
10090
9667
|
}
|
|
10091
9668
|
}
|
|
@@ -10098,7 +9675,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10098
9675
|
if (data.requestId !== undefined) {
|
|
10099
9676
|
const _errs7 = errors;
|
|
10100
9677
|
if (typeof data.requestId !== "string") {
|
|
10101
|
-
|
|
9678
|
+
validate68.errors = [{ instancePath: instancePath + "/requestId", schemaPath: "#/properties/requestId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
10102
9679
|
return false;
|
|
10103
9680
|
}
|
|
10104
9681
|
var valid0 = _errs7 === errors;
|
|
@@ -10110,7 +9687,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10110
9687
|
if (data.delegated !== undefined) {
|
|
10111
9688
|
const _errs9 = errors;
|
|
10112
9689
|
if (typeof data.delegated !== "boolean") {
|
|
10113
|
-
|
|
9690
|
+
validate68.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
10114
9691
|
return false;
|
|
10115
9692
|
}
|
|
10116
9693
|
var valid0 = _errs9 === errors;
|
|
@@ -10121,8 +9698,8 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10121
9698
|
if (valid0) {
|
|
10122
9699
|
if (data.scope !== undefined) {
|
|
10123
9700
|
const _errs11 = errors;
|
|
10124
|
-
if (!(
|
|
10125
|
-
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);
|
|
10126
9703
|
errors = vErrors.length;
|
|
10127
9704
|
}
|
|
10128
9705
|
var valid0 = _errs11 === errors;
|
|
@@ -10140,7 +9717,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10140
9717
|
const _errs15 = errors;
|
|
10141
9718
|
for (const key1 in data5) {
|
|
10142
9719
|
if (!(key1 === "publication")) {
|
|
10143
|
-
|
|
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" }];
|
|
10144
9721
|
return false;
|
|
10145
9722
|
break;
|
|
10146
9723
|
}
|
|
@@ -10149,18 +9726,18 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10149
9726
|
if (data5.publication !== undefined) {
|
|
10150
9727
|
let data6 = data5.publication;
|
|
10151
9728
|
if (typeof data6 !== "string") {
|
|
10152
|
-
|
|
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" }];
|
|
10153
9730
|
return false;
|
|
10154
9731
|
}
|
|
10155
9732
|
if (!((data6 === "Required") || (data6 === "Prohibited"))) {
|
|
10156
|
-
|
|
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" }];
|
|
10157
9734
|
return false;
|
|
10158
9735
|
}
|
|
10159
9736
|
}
|
|
10160
9737
|
}
|
|
10161
9738
|
}
|
|
10162
9739
|
else {
|
|
10163
|
-
|
|
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" }];
|
|
10164
9741
|
return false;
|
|
10165
9742
|
}
|
|
10166
9743
|
}
|
|
@@ -10177,14 +9754,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10177
9754
|
if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
|
|
10178
9755
|
let missing1;
|
|
10179
9756
|
if (((data7.rootKeyId === undefined) && (missing1 = "rootKeyId")) || ((data7.publicKeyJwk === undefined) && (missing1 = "publicKeyJwk"))) {
|
|
10180
|
-
|
|
9757
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
10181
9758
|
return false;
|
|
10182
9759
|
}
|
|
10183
9760
|
else {
|
|
10184
9761
|
const _errs20 = errors;
|
|
10185
9762
|
for (const key2 in data7) {
|
|
10186
9763
|
if (!((key2 === "rootKeyId") || (key2 === "publicKeyJwk"))) {
|
|
10187
|
-
|
|
9764
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
10188
9765
|
return false;
|
|
10189
9766
|
break;
|
|
10190
9767
|
}
|
|
@@ -10193,7 +9770,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10193
9770
|
if (data7.rootKeyId !== undefined) {
|
|
10194
9771
|
const _errs21 = errors;
|
|
10195
9772
|
if (typeof data7.rootKeyId !== "string") {
|
|
10196
|
-
|
|
9773
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/rootKeyId", schemaPath: "#/properties/delegateKeyDelivery/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
10197
9774
|
return false;
|
|
10198
9775
|
}
|
|
10199
9776
|
var valid4 = _errs21 === errors;
|
|
@@ -10206,7 +9783,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10206
9783
|
let data9 = data7.publicKeyJwk;
|
|
10207
9784
|
const _errs23 = errors;
|
|
10208
9785
|
if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
|
|
10209
|
-
|
|
9786
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery/publicKeyJwk", schemaPath: "#/properties/delegateKeyDelivery/properties/publicKeyJwk/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
10210
9787
|
return false;
|
|
10211
9788
|
}
|
|
10212
9789
|
var valid4 = _errs23 === errors;
|
|
@@ -10219,7 +9796,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10219
9796
|
}
|
|
10220
9797
|
}
|
|
10221
9798
|
else {
|
|
10222
|
-
|
|
9799
|
+
validate68.errors = [{ instancePath: instancePath + "/delegateKeyDelivery", schemaPath: "#/properties/delegateKeyDelivery/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
10223
9800
|
return false;
|
|
10224
9801
|
}
|
|
10225
9802
|
}
|
|
@@ -10238,14 +9815,14 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
10238
9815
|
}
|
|
10239
9816
|
}
|
|
10240
9817
|
else {
|
|
10241
|
-
|
|
9818
|
+
validate68.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
10242
9819
|
return false;
|
|
10243
9820
|
}
|
|
10244
|
-
}
|
|
10245
|
-
|
|
10246
|
-
export const PermissionRequestData =
|
|
10247
|
-
const
|
|
10248
|
-
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) {
|
|
10249
9826
|
evaluated0.props = undefined;
|
|
10250
9827
|
} if (evaluated0.dynamicItems) {
|
|
10251
9828
|
evaluated0.items = undefined;
|
|
@@ -11873,7 +11450,7 @@ else {
|
|
|
11873
11450
|
vErrors.push(err89);
|
|
11874
11451
|
}
|
|
11875
11452
|
errors++;
|
|
11876
|
-
|
|
11453
|
+
validate74.errors = vErrors;
|
|
11877
11454
|
return false;
|
|
11878
11455
|
}
|
|
11879
11456
|
else {
|
|
@@ -11886,9 +11463,9 @@ else {
|
|
|
11886
11463
|
vErrors = null;
|
|
11887
11464
|
}
|
|
11888
11465
|
}
|
|
11889
|
-
}
|
|
11890
|
-
|
|
11891
|
-
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) {
|
|
11892
11469
|
evaluated0.props = undefined;
|
|
11893
11470
|
} if (evaluated0.dynamicItems) {
|
|
11894
11471
|
evaluated0.items = undefined;
|
|
@@ -11896,14 +11473,14 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11896
11473
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
11897
11474
|
let missing0;
|
|
11898
11475
|
if (((data.delegated === undefined) && (missing0 = "delegated")) || ((data.scope === undefined) && (missing0 = "scope"))) {
|
|
11899
|
-
|
|
11476
|
+
validate73.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
11900
11477
|
return false;
|
|
11901
11478
|
}
|
|
11902
11479
|
else {
|
|
11903
11480
|
const _errs1 = errors;
|
|
11904
11481
|
for (const key0 in data) {
|
|
11905
11482
|
if (!((((key0 === "description") || (key0 === "delegated")) || (key0 === "scope")) || (key0 === "conditions"))) {
|
|
11906
|
-
|
|
11483
|
+
validate73.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11907
11484
|
return false;
|
|
11908
11485
|
break;
|
|
11909
11486
|
}
|
|
@@ -11912,7 +11489,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11912
11489
|
if (data.description !== undefined) {
|
|
11913
11490
|
const _errs2 = errors;
|
|
11914
11491
|
if (typeof data.description !== "string") {
|
|
11915
|
-
|
|
11492
|
+
validate73.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11916
11493
|
return false;
|
|
11917
11494
|
}
|
|
11918
11495
|
var valid0 = _errs2 === errors;
|
|
@@ -11924,7 +11501,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11924
11501
|
if (data.delegated !== undefined) {
|
|
11925
11502
|
const _errs4 = errors;
|
|
11926
11503
|
if (typeof data.delegated !== "boolean") {
|
|
11927
|
-
|
|
11504
|
+
validate73.errors = [{ instancePath: instancePath + "/delegated", schemaPath: "#/properties/delegated/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11928
11505
|
return false;
|
|
11929
11506
|
}
|
|
11930
11507
|
var valid0 = _errs4 === errors;
|
|
@@ -11935,8 +11512,8 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11935
11512
|
if (valid0) {
|
|
11936
11513
|
if (data.scope !== undefined) {
|
|
11937
11514
|
const _errs6 = errors;
|
|
11938
|
-
if (!(
|
|
11939
|
-
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);
|
|
11940
11517
|
errors = vErrors.length;
|
|
11941
11518
|
}
|
|
11942
11519
|
var valid0 = _errs6 === errors;
|
|
@@ -11954,7 +11531,7 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11954
11531
|
const _errs10 = errors;
|
|
11955
11532
|
for (const key1 in data3) {
|
|
11956
11533
|
if (!(key1 === "publication")) {
|
|
11957
|
-
|
|
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" }];
|
|
11958
11535
|
return false;
|
|
11959
11536
|
break;
|
|
11960
11537
|
}
|
|
@@ -11963,18 +11540,18 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11963
11540
|
if (data3.publication !== undefined) {
|
|
11964
11541
|
let data4 = data3.publication;
|
|
11965
11542
|
if (typeof data4 !== "string") {
|
|
11966
|
-
|
|
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" }];
|
|
11967
11544
|
return false;
|
|
11968
11545
|
}
|
|
11969
11546
|
if (!((data4 === "Required") || (data4 === "Prohibited"))) {
|
|
11970
|
-
|
|
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" }];
|
|
11971
11548
|
return false;
|
|
11972
11549
|
}
|
|
11973
11550
|
}
|
|
11974
11551
|
}
|
|
11975
11552
|
}
|
|
11976
11553
|
else {
|
|
11977
|
-
|
|
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" }];
|
|
11978
11555
|
return false;
|
|
11979
11556
|
}
|
|
11980
11557
|
}
|
|
@@ -11990,14 +11567,14 @@ function validate72(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11990
11567
|
}
|
|
11991
11568
|
}
|
|
11992
11569
|
else {
|
|
11993
|
-
|
|
11570
|
+
validate73.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11994
11571
|
return false;
|
|
11995
11572
|
}
|
|
11996
|
-
}
|
|
11997
|
-
|
|
11998
|
-
export const PermissionRevocationData =
|
|
11999
|
-
const
|
|
12000
|
-
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) {
|
|
12001
11578
|
evaluated0.props = undefined;
|
|
12002
11579
|
} if (evaluated0.dynamicItems) {
|
|
12003
11580
|
evaluated0.items = undefined;
|
|
@@ -12006,7 +11583,7 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12006
11583
|
const _errs1 = errors;
|
|
12007
11584
|
for (const key0 in data) {
|
|
12008
11585
|
if (!(key0 === "description")) {
|
|
12009
|
-
|
|
11586
|
+
validate76.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
12010
11587
|
return false;
|
|
12011
11588
|
break;
|
|
12012
11589
|
}
|
|
@@ -12014,52 +11591,52 @@ function validate75(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12014
11591
|
if (_errs1 === errors) {
|
|
12015
11592
|
if (data.description !== undefined) {
|
|
12016
11593
|
if (typeof data.description !== "string") {
|
|
12017
|
-
|
|
11594
|
+
validate76.errors = [{ instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12018
11595
|
return false;
|
|
12019
11596
|
}
|
|
12020
11597
|
}
|
|
12021
11598
|
}
|
|
12022
11599
|
}
|
|
12023
11600
|
else {
|
|
12024
|
-
|
|
11601
|
+
validate76.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12025
11602
|
return false;
|
|
12026
11603
|
}
|
|
12027
|
-
}
|
|
12028
|
-
|
|
12029
|
-
export const PermissionsDefinitions =
|
|
12030
|
-
const
|
|
12031
|
-
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) {
|
|
12032
11609
|
evaluated0.props = undefined;
|
|
12033
11610
|
} if (evaluated0.dynamicItems) {
|
|
12034
11611
|
evaluated0.items = undefined;
|
|
12035
11612
|
} if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
12036
|
-
|
|
11613
|
+
validate69.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12037
11614
|
return false;
|
|
12038
|
-
}
|
|
12039
|
-
|
|
12040
|
-
export const PermissionsScopes =
|
|
12041
|
-
const
|
|
12042
|
-
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) {
|
|
12043
11620
|
evaluated0.props = undefined;
|
|
12044
11621
|
} if (evaluated0.dynamicItems) {
|
|
12045
11622
|
evaluated0.items = undefined;
|
|
12046
11623
|
} if (!(data && typeof data == "object" && !Array.isArray(data))) {
|
|
12047
|
-
|
|
11624
|
+
validate71.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12048
11625
|
return false;
|
|
12049
|
-
}
|
|
12050
|
-
|
|
12051
|
-
export const ProtocolDefinition =
|
|
12052
|
-
const
|
|
12053
|
-
const
|
|
12054
|
-
const
|
|
12055
|
-
const
|
|
12056
|
-
const
|
|
12057
|
-
const
|
|
12058
|
-
const
|
|
12059
|
-
const
|
|
12060
|
-
const
|
|
12061
|
-
const wrapper2 = { validate:
|
|
12062
|
-
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) {
|
|
12063
11640
|
evaluated0.props = undefined;
|
|
12064
11641
|
} if (evaluated0.dynamicItems) {
|
|
12065
11642
|
evaluated0.items = undefined;
|
|
@@ -12067,8 +11644,8 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12067
11644
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
12068
11645
|
const _errs1 = errors;
|
|
12069
11646
|
for (const key0 in data) {
|
|
12070
|
-
if (!((func2.call(
|
|
12071
|
-
|
|
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" }];
|
|
12072
11649
|
return false;
|
|
12073
11650
|
break;
|
|
12074
11651
|
}
|
|
@@ -12081,14 +11658,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12081
11658
|
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
12082
11659
|
let missing0;
|
|
12083
11660
|
if (((data0.rootKeyId === undefined) && (missing0 = "rootKeyId")) || ((data0.publicKeyJwk === undefined) && (missing0 = "publicKeyJwk"))) {
|
|
12084
|
-
|
|
11661
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
12085
11662
|
return false;
|
|
12086
11663
|
}
|
|
12087
11664
|
else {
|
|
12088
11665
|
const _errs4 = errors;
|
|
12089
11666
|
for (const key1 in data0) {
|
|
12090
11667
|
if (!((key1 === "rootKeyId") || (key1 === "publicKeyJwk"))) {
|
|
12091
|
-
|
|
11668
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
12092
11669
|
return false;
|
|
12093
11670
|
break;
|
|
12094
11671
|
}
|
|
@@ -12097,7 +11674,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12097
11674
|
if (data0.rootKeyId !== undefined) {
|
|
12098
11675
|
const _errs5 = errors;
|
|
12099
11676
|
if (typeof data0.rootKeyId !== "string") {
|
|
12100
|
-
|
|
11677
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption/rootKeyId", schemaPath: "#/properties/%24encryption/properties/rootKeyId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12101
11678
|
return false;
|
|
12102
11679
|
}
|
|
12103
11680
|
var valid1 = _errs5 === errors;
|
|
@@ -12122,7 +11699,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12122
11699
|
}
|
|
12123
11700
|
}
|
|
12124
11701
|
else {
|
|
12125
|
-
|
|
11702
|
+
validate78.errors = [{ instancePath: instancePath + "/$encryption", schemaPath: "#/properties/%24encryption/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12126
11703
|
return false;
|
|
12127
11704
|
}
|
|
12128
11705
|
}
|
|
@@ -12138,7 +11715,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12138
11715
|
if (errors === _errs8) {
|
|
12139
11716
|
if (Array.isArray(data3)) {
|
|
12140
11717
|
if (data3.length < 1) {
|
|
12141
|
-
|
|
11718
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions", schemaPath: "#/properties/%24actions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
12142
11719
|
return false;
|
|
12143
11720
|
}
|
|
12144
11721
|
else {
|
|
@@ -12148,7 +11725,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12148
11725
|
let data4 = data3[i0];
|
|
12149
11726
|
const _errs10 = errors;
|
|
12150
11727
|
if (!(data4 && typeof data4 == "object" && !Array.isArray(data4))) {
|
|
12151
|
-
|
|
11728
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions/" + i0, schemaPath: "#/properties/%24actions/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12152
11729
|
return false;
|
|
12153
11730
|
}
|
|
12154
11731
|
const _errs12 = errors;
|
|
@@ -12197,7 +11774,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12197
11774
|
errors++;
|
|
12198
11775
|
}
|
|
12199
11776
|
if (!(((data5 === "anyone") || (data5 === "author")) || (data5 === "recipient"))) {
|
|
12200
|
-
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" };
|
|
12201
11778
|
if (vErrors === null) {
|
|
12202
11779
|
vErrors = [err3];
|
|
12203
11780
|
}
|
|
@@ -12262,7 +11839,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12262
11839
|
errors++;
|
|
12263
11840
|
}
|
|
12264
11841
|
if (!(((((((((data8 === "co-delete") || (data8 === "co-prune")) || (data8 === "co-update")) || (data8 === "create")) || (data8 === "delete")) || (data8 === "prune")) || (data8 === "read")) || (data8 === "squash")) || (data8 === "update"))) {
|
|
12265
|
-
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" };
|
|
12266
11843
|
if (vErrors === null) {
|
|
12267
11844
|
vErrors = [err7];
|
|
12268
11845
|
}
|
|
@@ -12384,7 +11961,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12384
11961
|
errors++;
|
|
12385
11962
|
}
|
|
12386
11963
|
if (!(((((((((data11 === "co-delete") || (data11 === "co-prune")) || (data11 === "co-update")) || (data11 === "create")) || (data11 === "delete")) || (data11 === "prune")) || (data11 === "read")) || (data11 === "squash")) || (data11 === "update"))) {
|
|
12387
|
-
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" };
|
|
12388
11965
|
if (vErrors === null) {
|
|
12389
11966
|
vErrors = [err14];
|
|
12390
11967
|
}
|
|
@@ -12443,7 +12020,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12443
12020
|
vErrors.push(err16);
|
|
12444
12021
|
}
|
|
12445
12022
|
errors++;
|
|
12446
|
-
|
|
12023
|
+
validate78.errors = vErrors;
|
|
12447
12024
|
return false;
|
|
12448
12025
|
}
|
|
12449
12026
|
else {
|
|
@@ -12465,7 +12042,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12465
12042
|
}
|
|
12466
12043
|
}
|
|
12467
12044
|
else {
|
|
12468
|
-
|
|
12045
|
+
validate78.errors = [{ instancePath: instancePath + "/$actions", schemaPath: "#/properties/%24actions/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
12469
12046
|
return false;
|
|
12470
12047
|
}
|
|
12471
12048
|
}
|
|
@@ -12478,7 +12055,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12478
12055
|
if (data.$role !== undefined) {
|
|
12479
12056
|
const _errs32 = errors;
|
|
12480
12057
|
if (typeof data.$role !== "boolean") {
|
|
12481
|
-
|
|
12058
|
+
validate78.errors = [{ instancePath: instancePath + "/$role", schemaPath: "#/properties/%24role/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12482
12059
|
return false;
|
|
12483
12060
|
}
|
|
12484
12061
|
var valid0 = _errs32 === errors;
|
|
@@ -12492,13 +12069,13 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12492
12069
|
const _errs35 = errors;
|
|
12493
12070
|
if (errors === _errs35) {
|
|
12494
12071
|
if (typeof data13 === "string") {
|
|
12495
|
-
if (!
|
|
12496
|
-
|
|
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_-]*:.+$" + "\"" }];
|
|
12497
12074
|
return false;
|
|
12498
12075
|
}
|
|
12499
12076
|
}
|
|
12500
12077
|
else {
|
|
12501
|
-
|
|
12078
|
+
validate78.errors = [{ instancePath: instancePath + "/$ref", schemaPath: "#/properties/%24ref/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12502
12079
|
return false;
|
|
12503
12080
|
}
|
|
12504
12081
|
}
|
|
@@ -12516,7 +12093,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12516
12093
|
const _errs40 = errors;
|
|
12517
12094
|
for (const key4 in data14) {
|
|
12518
12095
|
if (!((key4 === "min") || (key4 === "max"))) {
|
|
12519
|
-
|
|
12096
|
+
validate78.errors = [{ instancePath: instancePath + "/$size", schemaPath: "#/properties/%24size/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" }];
|
|
12520
12097
|
return false;
|
|
12521
12098
|
break;
|
|
12522
12099
|
}
|
|
@@ -12528,12 +12105,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12528
12105
|
if (errors === _errs41) {
|
|
12529
12106
|
if ((typeof data15 == "number") && (isFinite(data15))) {
|
|
12530
12107
|
if (data15 < 0 || isNaN(data15)) {
|
|
12531
|
-
|
|
12108
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/min", schemaPath: "#/properties/%24size/properties/min/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
12532
12109
|
return false;
|
|
12533
12110
|
}
|
|
12534
12111
|
}
|
|
12535
12112
|
else {
|
|
12536
|
-
|
|
12113
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/min", schemaPath: "#/properties/%24size/properties/min/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
12537
12114
|
return false;
|
|
12538
12115
|
}
|
|
12539
12116
|
}
|
|
@@ -12549,12 +12126,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12549
12126
|
if (errors === _errs43) {
|
|
12550
12127
|
if ((typeof data16 == "number") && (isFinite(data16))) {
|
|
12551
12128
|
if (data16 < 0 || isNaN(data16)) {
|
|
12552
|
-
|
|
12129
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/max", schemaPath: "#/properties/%24size/properties/max/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" }];
|
|
12553
12130
|
return false;
|
|
12554
12131
|
}
|
|
12555
12132
|
}
|
|
12556
12133
|
else {
|
|
12557
|
-
|
|
12134
|
+
validate78.errors = [{ instancePath: instancePath + "/$size/max", schemaPath: "#/properties/%24size/properties/max/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
12558
12135
|
return false;
|
|
12559
12136
|
}
|
|
12560
12137
|
}
|
|
@@ -12567,7 +12144,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12567
12144
|
}
|
|
12568
12145
|
}
|
|
12569
12146
|
else {
|
|
12570
|
-
|
|
12147
|
+
validate78.errors = [{ instancePath: instancePath + "/$size", schemaPath: "#/properties/%24size/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12571
12148
|
return false;
|
|
12572
12149
|
}
|
|
12573
12150
|
}
|
|
@@ -12584,14 +12161,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12584
12161
|
if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
|
|
12585
12162
|
let missing3;
|
|
12586
12163
|
if (((data17.max === undefined) && (missing3 = "max")) || ((data17.strategy === undefined) && (missing3 = "strategy"))) {
|
|
12587
|
-
|
|
12164
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
12588
12165
|
return false;
|
|
12589
12166
|
}
|
|
12590
12167
|
else {
|
|
12591
12168
|
const _errs47 = errors;
|
|
12592
12169
|
for (const key5 in data17) {
|
|
12593
12170
|
if (!((key5 === "max") || (key5 === "strategy"))) {
|
|
12594
|
-
|
|
12171
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" }];
|
|
12595
12172
|
return false;
|
|
12596
12173
|
break;
|
|
12597
12174
|
}
|
|
@@ -12601,13 +12178,13 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12601
12178
|
let data18 = data17.max;
|
|
12602
12179
|
const _errs48 = errors;
|
|
12603
12180
|
if (!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) {
|
|
12604
|
-
|
|
12181
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
12605
12182
|
return false;
|
|
12606
12183
|
}
|
|
12607
12184
|
if (errors === _errs48) {
|
|
12608
12185
|
if ((typeof data18 == "number") && (isFinite(data18))) {
|
|
12609
12186
|
if (data18 < 1 || isNaN(data18)) {
|
|
12610
|
-
|
|
12187
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
12611
12188
|
return false;
|
|
12612
12189
|
}
|
|
12613
12190
|
}
|
|
@@ -12622,11 +12199,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12622
12199
|
let data19 = data17.strategy;
|
|
12623
12200
|
const _errs50 = errors;
|
|
12624
12201
|
if (typeof data19 !== "string") {
|
|
12625
|
-
|
|
12202
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12626
12203
|
return false;
|
|
12627
12204
|
}
|
|
12628
12205
|
if (!((data19 === "reject") || (data19 === "purgeOldest"))) {
|
|
12629
|
-
|
|
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" }];
|
|
12630
12207
|
return false;
|
|
12631
12208
|
}
|
|
12632
12209
|
var valid9 = _errs50 === errors;
|
|
@@ -12639,7 +12216,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12639
12216
|
}
|
|
12640
12217
|
}
|
|
12641
12218
|
else {
|
|
12642
|
-
|
|
12219
|
+
validate78.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12643
12220
|
return false;
|
|
12644
12221
|
}
|
|
12645
12222
|
}
|
|
@@ -12652,7 +12229,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12652
12229
|
if (data.$immutable !== undefined) {
|
|
12653
12230
|
const _errs52 = errors;
|
|
12654
12231
|
if (typeof data.$immutable !== "boolean") {
|
|
12655
|
-
|
|
12232
|
+
validate78.errors = [{ instancePath: instancePath + "/$immutable", schemaPath: "#/properties/%24immutable/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12656
12233
|
return false;
|
|
12657
12234
|
}
|
|
12658
12235
|
var valid0 = _errs52 === errors;
|
|
@@ -12665,11 +12242,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12665
12242
|
let data21 = data.$delivery;
|
|
12666
12243
|
const _errs55 = errors;
|
|
12667
12244
|
if (typeof data21 !== "string") {
|
|
12668
|
-
|
|
12245
|
+
validate78.errors = [{ instancePath: instancePath + "/$delivery", schemaPath: "#/properties/%24delivery/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12669
12246
|
return false;
|
|
12670
12247
|
}
|
|
12671
12248
|
if (!((data21 === "direct") || (data21 === "subscribe"))) {
|
|
12672
|
-
|
|
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" }];
|
|
12673
12250
|
return false;
|
|
12674
12251
|
}
|
|
12675
12252
|
var valid0 = _errs55 === errors;
|
|
@@ -12682,11 +12259,11 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12682
12259
|
let data22 = data.$squash;
|
|
12683
12260
|
const _errs58 = errors;
|
|
12684
12261
|
if (typeof data22 !== "boolean") {
|
|
12685
|
-
|
|
12262
|
+
validate78.errors = [{ instancePath: instancePath + "/$squash", schemaPath: "#/properties/%24squash/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12686
12263
|
return false;
|
|
12687
12264
|
}
|
|
12688
12265
|
if (!(data22 === true)) {
|
|
12689
|
-
|
|
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" }];
|
|
12690
12267
|
return false;
|
|
12691
12268
|
}
|
|
12692
12269
|
var valid0 = _errs58 === errors;
|
|
@@ -12701,7 +12278,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12701
12278
|
if (errors === _errs61) {
|
|
12702
12279
|
if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
|
|
12703
12280
|
if (Object.keys(data23).length < 1) {
|
|
12704
|
-
|
|
12281
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
12705
12282
|
return false;
|
|
12706
12283
|
}
|
|
12707
12284
|
else {
|
|
@@ -12715,7 +12292,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12715
12292
|
for (let i3 = 0; i3 < len3; i3++) {
|
|
12716
12293
|
const _errs65 = errors;
|
|
12717
12294
|
if (typeof data24[i3] !== "string") {
|
|
12718
|
-
|
|
12295
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$requiredTags/" + i3, schemaPath: "#/properties/%24tags/properties/%24requiredTags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12719
12296
|
return false;
|
|
12720
12297
|
}
|
|
12721
12298
|
var valid11 = _errs65 === errors;
|
|
@@ -12725,7 +12302,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12725
12302
|
}
|
|
12726
12303
|
}
|
|
12727
12304
|
else {
|
|
12728
|
-
|
|
12305
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$requiredTags", schemaPath: "#/properties/%24tags/properties/%24requiredTags/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
12729
12306
|
return false;
|
|
12730
12307
|
}
|
|
12731
12308
|
}
|
|
@@ -12738,7 +12315,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12738
12315
|
if (data23.$allowUndefinedTags !== undefined) {
|
|
12739
12316
|
const _errs67 = errors;
|
|
12740
12317
|
if (typeof data23.$allowUndefinedTags !== "boolean") {
|
|
12741
|
-
|
|
12318
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags/$allowUndefinedTags", schemaPath: "#/properties/%24tags/properties/%24allowUndefinedTags/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12742
12319
|
return false;
|
|
12743
12320
|
}
|
|
12744
12321
|
var valid10 = _errs67 === errors;
|
|
@@ -12751,15 +12328,15 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12751
12328
|
props2.$requiredTags = true;
|
|
12752
12329
|
props2.$allowUndefinedTags = true;
|
|
12753
12330
|
for (const key6 in data23) {
|
|
12754
|
-
if (
|
|
12331
|
+
if (pattern44.test(key6)) {
|
|
12755
12332
|
let data27 = data23[key6];
|
|
12756
12333
|
const _errs69 = errors;
|
|
12757
12334
|
if (errors === _errs69) {
|
|
12758
12335
|
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
12759
12336
|
const _errs71 = errors;
|
|
12760
12337
|
for (const key7 in data27) {
|
|
12761
|
-
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (
|
|
12762
|
-
|
|
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" }];
|
|
12763
12340
|
return false;
|
|
12764
12341
|
break;
|
|
12765
12342
|
}
|
|
@@ -12769,7 +12346,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12769
12346
|
let data28 = data27.type;
|
|
12770
12347
|
const _errs72 = errors;
|
|
12771
12348
|
if (!(((((data28 === "string") || (data28 === "number")) || (data28 === "integer")) || (data28 === "boolean")) || (data28 === "array"))) {
|
|
12772
|
-
|
|
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" }];
|
|
12773
12350
|
return false;
|
|
12774
12351
|
}
|
|
12775
12352
|
var valid13 = _errs72 === errors;
|
|
@@ -12787,7 +12364,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12787
12364
|
let data30 = data29.type;
|
|
12788
12365
|
const _errs75 = errors;
|
|
12789
12366
|
if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
|
|
12790
|
-
|
|
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" }];
|
|
12791
12368
|
return false;
|
|
12792
12369
|
}
|
|
12793
12370
|
var valid14 = _errs75 === errors;
|
|
@@ -12799,14 +12376,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12799
12376
|
var props3 = {};
|
|
12800
12377
|
props3.type = true;
|
|
12801
12378
|
for (const key8 in data29) {
|
|
12802
|
-
if (
|
|
12379
|
+
if (pattern46.test(key8)) {
|
|
12803
12380
|
props3[key8] = true;
|
|
12804
12381
|
}
|
|
12805
12382
|
}
|
|
12806
12383
|
}
|
|
12807
12384
|
}
|
|
12808
12385
|
else {
|
|
12809
|
-
|
|
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" }];
|
|
12810
12387
|
return false;
|
|
12811
12388
|
}
|
|
12812
12389
|
}
|
|
@@ -12825,7 +12402,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12825
12402
|
let data32 = data31.type;
|
|
12826
12403
|
const _errs78 = errors;
|
|
12827
12404
|
if (!(((data32 === "string") || (data32 === "number")) || (data32 === "integer"))) {
|
|
12828
|
-
|
|
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" }];
|
|
12829
12406
|
return false;
|
|
12830
12407
|
}
|
|
12831
12408
|
var valid16 = _errs78 === errors;
|
|
@@ -12837,14 +12414,14 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12837
12414
|
var props4 = {};
|
|
12838
12415
|
props4.type = true;
|
|
12839
12416
|
for (const key9 in data31) {
|
|
12840
|
-
if (
|
|
12417
|
+
if (pattern46.test(key9)) {
|
|
12841
12418
|
props4[key9] = true;
|
|
12842
12419
|
}
|
|
12843
12420
|
}
|
|
12844
12421
|
}
|
|
12845
12422
|
}
|
|
12846
12423
|
else {
|
|
12847
|
-
|
|
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" }];
|
|
12848
12425
|
return false;
|
|
12849
12426
|
}
|
|
12850
12427
|
}
|
|
@@ -12858,7 +12435,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12858
12435
|
}
|
|
12859
12436
|
}
|
|
12860
12437
|
else {
|
|
12861
|
-
|
|
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" }];
|
|
12862
12439
|
return false;
|
|
12863
12440
|
}
|
|
12864
12441
|
}
|
|
@@ -12870,7 +12447,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12870
12447
|
}
|
|
12871
12448
|
}
|
|
12872
12449
|
else {
|
|
12873
|
-
|
|
12450
|
+
validate78.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12874
12451
|
return false;
|
|
12875
12452
|
}
|
|
12876
12453
|
}
|
|
@@ -12882,7 +12459,7 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12882
12459
|
if (valid0) {
|
|
12883
12460
|
var valid18 = true;
|
|
12884
12461
|
for (const key10 in data) {
|
|
12885
|
-
if (
|
|
12462
|
+
if (pattern42.test(key10)) {
|
|
12886
12463
|
const _errs79 = errors;
|
|
12887
12464
|
if (!(wrapper2.validate(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData, dynamicAnchors }))) {
|
|
12888
12465
|
vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);
|
|
@@ -12907,12 +12484,12 @@ function validate77(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12907
12484
|
}
|
|
12908
12485
|
}
|
|
12909
12486
|
else {
|
|
12910
|
-
|
|
12487
|
+
validate78.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12911
12488
|
return false;
|
|
12912
12489
|
}
|
|
12913
|
-
}
|
|
12914
|
-
|
|
12915
|
-
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) {
|
|
12916
12493
|
evaluated0.props = undefined;
|
|
12917
12494
|
} if (evaluated0.dynamicItems) {
|
|
12918
12495
|
evaluated0.items = undefined;
|
|
@@ -12920,14 +12497,14 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12920
12497
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
12921
12498
|
let missing0;
|
|
12922
12499
|
if (((((data.protocol === undefined) && (missing0 = "protocol")) || ((data.published === undefined) && (missing0 = "published"))) || ((data.types === undefined) && (missing0 = "types"))) || ((data.structure === undefined) && (missing0 = "structure"))) {
|
|
12923
|
-
|
|
12500
|
+
validate77.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
12924
12501
|
return false;
|
|
12925
12502
|
}
|
|
12926
12503
|
else {
|
|
12927
12504
|
const _errs1 = errors;
|
|
12928
12505
|
for (const key0 in data) {
|
|
12929
12506
|
if (!(((((key0 === "protocol") || (key0 === "published")) || (key0 === "uses")) || (key0 === "types")) || (key0 === "structure"))) {
|
|
12930
|
-
|
|
12507
|
+
validate77.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
12931
12508
|
return false;
|
|
12932
12509
|
break;
|
|
12933
12510
|
}
|
|
@@ -12936,7 +12513,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12936
12513
|
if (data.protocol !== undefined) {
|
|
12937
12514
|
const _errs2 = errors;
|
|
12938
12515
|
if (typeof data.protocol !== "string") {
|
|
12939
|
-
|
|
12516
|
+
validate77.errors = [{ instancePath: instancePath + "/protocol", schemaPath: "#/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
12940
12517
|
return false;
|
|
12941
12518
|
}
|
|
12942
12519
|
var valid0 = _errs2 === errors;
|
|
@@ -12948,7 +12525,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12948
12525
|
if (data.published !== undefined) {
|
|
12949
12526
|
const _errs4 = errors;
|
|
12950
12527
|
if (typeof data.published !== "boolean") {
|
|
12951
|
-
|
|
12528
|
+
validate77.errors = [{ instancePath: instancePath + "/published", schemaPath: "#/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
12952
12529
|
return false;
|
|
12953
12530
|
}
|
|
12954
12531
|
var valid0 = _errs4 === errors;
|
|
@@ -12963,14 +12540,14 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12963
12540
|
if (errors === _errs6) {
|
|
12964
12541
|
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
12965
12542
|
if (Object.keys(data2).length < 1) {
|
|
12966
|
-
|
|
12543
|
+
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
12967
12544
|
return false;
|
|
12968
12545
|
}
|
|
12969
12546
|
else {
|
|
12970
12547
|
const _errs9 = errors;
|
|
12971
12548
|
for (const key1 in data2) {
|
|
12972
|
-
if (!(
|
|
12973
|
-
|
|
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" }];
|
|
12974
12551
|
return false;
|
|
12975
12552
|
break;
|
|
12976
12553
|
}
|
|
@@ -12978,10 +12555,10 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12978
12555
|
if (_errs9 === errors) {
|
|
12979
12556
|
var valid1 = true;
|
|
12980
12557
|
for (const key2 in data2) {
|
|
12981
|
-
if (
|
|
12558
|
+
if (pattern38.test(key2)) {
|
|
12982
12559
|
const _errs10 = errors;
|
|
12983
12560
|
if (typeof data2[key2] !== "string") {
|
|
12984
|
-
|
|
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" }];
|
|
12985
12562
|
return false;
|
|
12986
12563
|
}
|
|
12987
12564
|
var valid1 = _errs10 === errors;
|
|
@@ -12994,7 +12571,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
12994
12571
|
}
|
|
12995
12572
|
}
|
|
12996
12573
|
else {
|
|
12997
|
-
|
|
12574
|
+
validate77.errors = [{ instancePath: instancePath + "/uses", schemaPath: "#/properties/uses/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
12998
12575
|
return false;
|
|
12999
12576
|
}
|
|
13000
12577
|
}
|
|
@@ -13011,7 +12588,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13011
12588
|
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
13012
12589
|
var props0 = {};
|
|
13013
12590
|
for (const key3 in data4) {
|
|
13014
|
-
if (
|
|
12591
|
+
if (pattern40.test(key3)) {
|
|
13015
12592
|
let data5 = data4[key3];
|
|
13016
12593
|
const _errs14 = errors;
|
|
13017
12594
|
if (errors === _errs14) {
|
|
@@ -13019,7 +12596,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13019
12596
|
const _errs16 = errors;
|
|
13020
12597
|
for (const key4 in data5) {
|
|
13021
12598
|
if (!(((key4 === "schema") || (key4 === "dataFormats")) || (key4 === "encryptionRequired"))) {
|
|
13022
|
-
|
|
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" }];
|
|
13023
12600
|
return false;
|
|
13024
12601
|
break;
|
|
13025
12602
|
}
|
|
@@ -13028,7 +12605,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13028
12605
|
if (data5.schema !== undefined) {
|
|
13029
12606
|
const _errs17 = errors;
|
|
13030
12607
|
if (typeof data5.schema !== "string") {
|
|
13031
|
-
|
|
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" }];
|
|
13032
12609
|
return false;
|
|
13033
12610
|
}
|
|
13034
12611
|
var valid3 = _errs17 === errors;
|
|
@@ -13043,7 +12620,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13043
12620
|
if (errors === _errs19) {
|
|
13044
12621
|
if (Array.isArray(data7)) {
|
|
13045
12622
|
if (data7.length < 1) {
|
|
13046
|
-
|
|
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" }];
|
|
13047
12624
|
return false;
|
|
13048
12625
|
}
|
|
13049
12626
|
else {
|
|
@@ -13052,7 +12629,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13052
12629
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
13053
12630
|
const _errs21 = errors;
|
|
13054
12631
|
if (typeof data7[i0] !== "string") {
|
|
13055
|
-
|
|
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" }];
|
|
13056
12633
|
return false;
|
|
13057
12634
|
}
|
|
13058
12635
|
var valid4 = _errs21 === errors;
|
|
@@ -13063,7 +12640,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13063
12640
|
}
|
|
13064
12641
|
}
|
|
13065
12642
|
else {
|
|
13066
|
-
|
|
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" }];
|
|
13067
12644
|
return false;
|
|
13068
12645
|
}
|
|
13069
12646
|
}
|
|
@@ -13076,7 +12653,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13076
12653
|
if (data5.encryptionRequired !== undefined) {
|
|
13077
12654
|
const _errs23 = errors;
|
|
13078
12655
|
if (typeof data5.encryptionRequired !== "boolean") {
|
|
13079
|
-
|
|
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" }];
|
|
13080
12657
|
return false;
|
|
13081
12658
|
}
|
|
13082
12659
|
var valid3 = _errs23 === errors;
|
|
@@ -13089,7 +12666,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13089
12666
|
}
|
|
13090
12667
|
}
|
|
13091
12668
|
else {
|
|
13092
|
-
|
|
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" }];
|
|
13093
12670
|
return false;
|
|
13094
12671
|
}
|
|
13095
12672
|
}
|
|
@@ -13098,7 +12675,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13098
12675
|
}
|
|
13099
12676
|
}
|
|
13100
12677
|
else {
|
|
13101
|
-
|
|
12678
|
+
validate77.errors = [{ instancePath: instancePath + "/types", schemaPath: "#/properties/types/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13102
12679
|
return false;
|
|
13103
12680
|
}
|
|
13104
12681
|
}
|
|
@@ -13115,9 +12692,9 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13115
12692
|
if (data10 && typeof data10 == "object" && !Array.isArray(data10)) {
|
|
13116
12693
|
var props1 = {};
|
|
13117
12694
|
for (const key5 in data10) {
|
|
13118
|
-
if (
|
|
13119
|
-
if (!(
|
|
13120
|
-
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);
|
|
13121
12698
|
errors = vErrors.length;
|
|
13122
12699
|
}
|
|
13123
12700
|
props1[key5] = true;
|
|
@@ -13125,7 +12702,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13125
12702
|
}
|
|
13126
12703
|
}
|
|
13127
12704
|
else {
|
|
13128
|
-
|
|
12705
|
+
validate77.errors = [{ instancePath: instancePath + "/structure", schemaPath: "#/properties/structure/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13129
12706
|
return false;
|
|
13130
12707
|
}
|
|
13131
12708
|
}
|
|
@@ -13142,15 +12719,15 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13142
12719
|
}
|
|
13143
12720
|
}
|
|
13144
12721
|
else {
|
|
13145
|
-
|
|
12722
|
+
validate77.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13146
12723
|
return false;
|
|
13147
12724
|
}
|
|
13148
|
-
}
|
|
13149
|
-
|
|
13150
|
-
export const ProtocolRuleSet =
|
|
13151
|
-
export const ProtocolsConfigure =
|
|
13152
|
-
const
|
|
13153
|
-
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) {
|
|
13154
12731
|
evaluated0.props = undefined;
|
|
13155
12732
|
} if (evaluated0.dynamicItems) {
|
|
13156
12733
|
evaluated0.items = undefined;
|
|
@@ -13158,14 +12735,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13158
12735
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13159
12736
|
let missing0;
|
|
13160
12737
|
if (((data.authorization === undefined) && (missing0 = "authorization")) || ((data.descriptor === undefined) && (missing0 = "descriptor"))) {
|
|
13161
|
-
|
|
12738
|
+
validate81.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13162
12739
|
return false;
|
|
13163
12740
|
}
|
|
13164
12741
|
else {
|
|
13165
12742
|
const _errs1 = errors;
|
|
13166
12743
|
for (const key0 in data) {
|
|
13167
12744
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
13168
|
-
|
|
12745
|
+
validate81.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13169
12746
|
return false;
|
|
13170
12747
|
break;
|
|
13171
12748
|
}
|
|
@@ -13190,14 +12767,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13190
12767
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
13191
12768
|
let missing1;
|
|
13192
12769
|
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.definition === undefined) && (missing1 = "definition"))) {
|
|
13193
|
-
|
|
12770
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
13194
12771
|
return false;
|
|
13195
12772
|
}
|
|
13196
12773
|
else {
|
|
13197
12774
|
const _errs5 = errors;
|
|
13198
12775
|
for (const key1 in data1) {
|
|
13199
12776
|
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "definition")) || (key1 === "permissionGrantId"))) {
|
|
13200
|
-
|
|
12777
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
13201
12778
|
return false;
|
|
13202
12779
|
break;
|
|
13203
12780
|
}
|
|
@@ -13207,11 +12784,11 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13207
12784
|
let data2 = data1.interface;
|
|
13208
12785
|
const _errs6 = errors;
|
|
13209
12786
|
if (typeof data2 !== "string") {
|
|
13210
|
-
|
|
12787
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13211
12788
|
return false;
|
|
13212
12789
|
}
|
|
13213
12790
|
if (!(data2 === "Protocols")) {
|
|
13214
|
-
|
|
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" }];
|
|
13215
12792
|
return false;
|
|
13216
12793
|
}
|
|
13217
12794
|
var valid1 = _errs6 === errors;
|
|
@@ -13224,11 +12801,11 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13224
12801
|
let data3 = data1.method;
|
|
13225
12802
|
const _errs8 = errors;
|
|
13226
12803
|
if (typeof data3 !== "string") {
|
|
13227
|
-
|
|
12804
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13228
12805
|
return false;
|
|
13229
12806
|
}
|
|
13230
12807
|
if (!(data3 === "Configure")) {
|
|
13231
|
-
|
|
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" }];
|
|
13232
12809
|
return false;
|
|
13233
12810
|
}
|
|
13234
12811
|
var valid1 = _errs8 === errors;
|
|
@@ -13244,12 +12821,12 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13244
12821
|
if (errors === _errs11) {
|
|
13245
12822
|
if (typeof data4 === "string") {
|
|
13246
12823
|
if (!pattern14.test(data4)) {
|
|
13247
|
-
|
|
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$" + "\"" }];
|
|
13248
12825
|
return false;
|
|
13249
12826
|
}
|
|
13250
12827
|
}
|
|
13251
12828
|
else {
|
|
13252
|
-
|
|
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" }];
|
|
13253
12830
|
return false;
|
|
13254
12831
|
}
|
|
13255
12832
|
}
|
|
@@ -13261,8 +12838,8 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13261
12838
|
if (valid1) {
|
|
13262
12839
|
if (data1.definition !== undefined) {
|
|
13263
12840
|
const _errs13 = errors;
|
|
13264
|
-
if (!(
|
|
13265
|
-
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);
|
|
13266
12843
|
errors = vErrors.length;
|
|
13267
12844
|
}
|
|
13268
12845
|
var valid1 = _errs13 === errors;
|
|
@@ -13274,7 +12851,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13274
12851
|
if (data1.permissionGrantId !== undefined) {
|
|
13275
12852
|
const _errs14 = errors;
|
|
13276
12853
|
if (typeof data1.permissionGrantId !== "string") {
|
|
13277
|
-
|
|
12854
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13278
12855
|
return false;
|
|
13279
12856
|
}
|
|
13280
12857
|
var valid1 = _errs14 === errors;
|
|
@@ -13290,7 +12867,7 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13290
12867
|
}
|
|
13291
12868
|
}
|
|
13292
12869
|
else {
|
|
13293
|
-
|
|
12870
|
+
validate81.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13294
12871
|
return false;
|
|
13295
12872
|
}
|
|
13296
12873
|
}
|
|
@@ -13304,14 +12881,14 @@ function validate80(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13304
12881
|
}
|
|
13305
12882
|
}
|
|
13306
12883
|
else {
|
|
13307
|
-
|
|
12884
|
+
validate81.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13308
12885
|
return false;
|
|
13309
12886
|
}
|
|
13310
|
-
}
|
|
13311
|
-
|
|
13312
|
-
export const ProtocolsQuery =
|
|
13313
|
-
const
|
|
13314
|
-
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) {
|
|
13315
12892
|
evaluated0.props = undefined;
|
|
13316
12893
|
} if (evaluated0.dynamicItems) {
|
|
13317
12894
|
evaluated0.items = undefined;
|
|
@@ -13319,14 +12896,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13319
12896
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13320
12897
|
let missing0;
|
|
13321
12898
|
if ((data.descriptor === undefined) && (missing0 = "descriptor")) {
|
|
13322
|
-
|
|
12899
|
+
validate84.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13323
12900
|
return false;
|
|
13324
12901
|
}
|
|
13325
12902
|
else {
|
|
13326
12903
|
const _errs1 = errors;
|
|
13327
12904
|
for (const key0 in data) {
|
|
13328
12905
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
13329
|
-
|
|
12906
|
+
validate84.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13330
12907
|
return false;
|
|
13331
12908
|
break;
|
|
13332
12909
|
}
|
|
@@ -13351,14 +12928,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13351
12928
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
13352
12929
|
let missing1;
|
|
13353
12930
|
if ((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) {
|
|
13354
|
-
|
|
12931
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
13355
12932
|
return false;
|
|
13356
12933
|
}
|
|
13357
12934
|
else {
|
|
13358
12935
|
const _errs5 = errors;
|
|
13359
12936
|
for (const key1 in data1) {
|
|
13360
12937
|
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "permissionGrantId"))) {
|
|
13361
|
-
|
|
12938
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
13362
12939
|
return false;
|
|
13363
12940
|
break;
|
|
13364
12941
|
}
|
|
@@ -13368,11 +12945,11 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13368
12945
|
let data2 = data1.interface;
|
|
13369
12946
|
const _errs6 = errors;
|
|
13370
12947
|
if (typeof data2 !== "string") {
|
|
13371
|
-
|
|
12948
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13372
12949
|
return false;
|
|
13373
12950
|
}
|
|
13374
12951
|
if (!(data2 === "Protocols")) {
|
|
13375
|
-
|
|
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" }];
|
|
13376
12953
|
return false;
|
|
13377
12954
|
}
|
|
13378
12955
|
var valid1 = _errs6 === errors;
|
|
@@ -13385,11 +12962,11 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13385
12962
|
let data3 = data1.method;
|
|
13386
12963
|
const _errs8 = errors;
|
|
13387
12964
|
if (typeof data3 !== "string") {
|
|
13388
|
-
|
|
12965
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13389
12966
|
return false;
|
|
13390
12967
|
}
|
|
13391
12968
|
if (!(data3 === "Query")) {
|
|
13392
|
-
|
|
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" }];
|
|
13393
12970
|
return false;
|
|
13394
12971
|
}
|
|
13395
12972
|
var valid1 = _errs8 === errors;
|
|
@@ -13405,12 +12982,12 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13405
12982
|
if (errors === _errs11) {
|
|
13406
12983
|
if (typeof data4 === "string") {
|
|
13407
12984
|
if (!pattern14.test(data4)) {
|
|
13408
|
-
|
|
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$" + "\"" }];
|
|
13409
12986
|
return false;
|
|
13410
12987
|
}
|
|
13411
12988
|
}
|
|
13412
12989
|
else {
|
|
13413
|
-
|
|
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" }];
|
|
13414
12991
|
return false;
|
|
13415
12992
|
}
|
|
13416
12993
|
}
|
|
@@ -13426,14 +13003,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13426
13003
|
if (errors === _errs13) {
|
|
13427
13004
|
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
13428
13005
|
if (Object.keys(data5).length < 1) {
|
|
13429
|
-
|
|
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" }];
|
|
13430
13007
|
return false;
|
|
13431
13008
|
}
|
|
13432
13009
|
else {
|
|
13433
13010
|
const _errs15 = errors;
|
|
13434
13011
|
for (const key2 in data5) {
|
|
13435
13012
|
if (!((key2 === "protocol") || (key2 === "recipient"))) {
|
|
13436
|
-
|
|
13013
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter", schemaPath: "#/properties/descriptor/properties/filter/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
13437
13014
|
return false;
|
|
13438
13015
|
break;
|
|
13439
13016
|
}
|
|
@@ -13442,7 +13019,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13442
13019
|
if (data5.protocol !== undefined) {
|
|
13443
13020
|
const _errs16 = errors;
|
|
13444
13021
|
if (typeof data5.protocol !== "string") {
|
|
13445
|
-
|
|
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" }];
|
|
13446
13023
|
return false;
|
|
13447
13024
|
}
|
|
13448
13025
|
var valid3 = _errs16 === errors;
|
|
@@ -13458,12 +13035,12 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13458
13035
|
if (errors === _errs19) {
|
|
13459
13036
|
if (typeof data7 === "string") {
|
|
13460
13037
|
if (!pattern12.test(data7)) {
|
|
13461
|
-
|
|
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_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" + "\"" }];
|
|
13462
13039
|
return false;
|
|
13463
13040
|
}
|
|
13464
13041
|
}
|
|
13465
13042
|
else {
|
|
13466
|
-
|
|
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" }];
|
|
13467
13044
|
return false;
|
|
13468
13045
|
}
|
|
13469
13046
|
}
|
|
@@ -13477,7 +13054,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13477
13054
|
}
|
|
13478
13055
|
}
|
|
13479
13056
|
else {
|
|
13480
|
-
|
|
13057
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/filter", schemaPath: "#/properties/descriptor/properties/filter/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13481
13058
|
return false;
|
|
13482
13059
|
}
|
|
13483
13060
|
}
|
|
@@ -13490,7 +13067,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13490
13067
|
if (data1.permissionGrantId !== undefined) {
|
|
13491
13068
|
const _errs21 = errors;
|
|
13492
13069
|
if (typeof data1.permissionGrantId !== "string") {
|
|
13493
|
-
|
|
13070
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13494
13071
|
return false;
|
|
13495
13072
|
}
|
|
13496
13073
|
var valid1 = _errs21 === errors;
|
|
@@ -13506,7 +13083,7 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13506
13083
|
}
|
|
13507
13084
|
}
|
|
13508
13085
|
else {
|
|
13509
|
-
|
|
13086
|
+
validate84.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13510
13087
|
return false;
|
|
13511
13088
|
}
|
|
13512
13089
|
}
|
|
@@ -13520,14 +13097,14 @@ function validate83(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13520
13097
|
}
|
|
13521
13098
|
}
|
|
13522
13099
|
else {
|
|
13523
|
-
|
|
13100
|
+
validate84.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13524
13101
|
return false;
|
|
13525
13102
|
}
|
|
13526
|
-
}
|
|
13527
|
-
|
|
13528
|
-
export const RecordsRead =
|
|
13529
|
-
const
|
|
13530
|
-
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) {
|
|
13531
13108
|
evaluated0.props = undefined;
|
|
13532
13109
|
} if (evaluated0.dynamicItems) {
|
|
13533
13110
|
evaluated0.items = undefined;
|
|
@@ -13535,14 +13112,14 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13535
13112
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13536
13113
|
let missing0;
|
|
13537
13114
|
if ((data.descriptor === undefined) && (missing0 = "descriptor")) {
|
|
13538
|
-
|
|
13115
|
+
validate86.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13539
13116
|
return false;
|
|
13540
13117
|
}
|
|
13541
13118
|
else {
|
|
13542
13119
|
const _errs1 = errors;
|
|
13543
13120
|
for (const key0 in data) {
|
|
13544
13121
|
if (!((key0 === "authorization") || (key0 === "descriptor"))) {
|
|
13545
|
-
|
|
13122
|
+
validate86.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13546
13123
|
return false;
|
|
13547
13124
|
break;
|
|
13548
13125
|
}
|
|
@@ -13567,14 +13144,14 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13567
13144
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
13568
13145
|
let missing1;
|
|
13569
13146
|
if (((((data1.interface === undefined) && (missing1 = "interface")) || ((data1.method === undefined) && (missing1 = "method"))) || ((data1.messageTimestamp === undefined) && (missing1 = "messageTimestamp"))) || ((data1.filter === undefined) && (missing1 = "filter"))) {
|
|
13570
|
-
|
|
13147
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
13571
13148
|
return false;
|
|
13572
13149
|
}
|
|
13573
13150
|
else {
|
|
13574
13151
|
const _errs5 = errors;
|
|
13575
13152
|
for (const key1 in data1) {
|
|
13576
13153
|
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "permissionGrantId")) || (key1 === "dateSort"))) {
|
|
13577
|
-
|
|
13154
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
13578
13155
|
return false;
|
|
13579
13156
|
break;
|
|
13580
13157
|
}
|
|
@@ -13584,11 +13161,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13584
13161
|
let data2 = data1.interface;
|
|
13585
13162
|
const _errs6 = errors;
|
|
13586
13163
|
if (typeof data2 !== "string") {
|
|
13587
|
-
|
|
13164
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13588
13165
|
return false;
|
|
13589
13166
|
}
|
|
13590
13167
|
if (!(data2 === "Records")) {
|
|
13591
|
-
|
|
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" }];
|
|
13592
13169
|
return false;
|
|
13593
13170
|
}
|
|
13594
13171
|
var valid1 = _errs6 === errors;
|
|
@@ -13601,11 +13178,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13601
13178
|
let data3 = data1.method;
|
|
13602
13179
|
const _errs8 = errors;
|
|
13603
13180
|
if (typeof data3 !== "string") {
|
|
13604
|
-
|
|
13181
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13605
13182
|
return false;
|
|
13606
13183
|
}
|
|
13607
13184
|
if (!(data3 === "Read")) {
|
|
13608
|
-
|
|
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" }];
|
|
13609
13186
|
return false;
|
|
13610
13187
|
}
|
|
13611
13188
|
var valid1 = _errs8 === errors;
|
|
@@ -13621,12 +13198,12 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13621
13198
|
if (errors === _errs11) {
|
|
13622
13199
|
if (typeof data4 === "string") {
|
|
13623
13200
|
if (!pattern14.test(data4)) {
|
|
13624
|
-
|
|
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$" + "\"" }];
|
|
13625
13202
|
return false;
|
|
13626
13203
|
}
|
|
13627
13204
|
}
|
|
13628
13205
|
else {
|
|
13629
|
-
|
|
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" }];
|
|
13630
13207
|
return false;
|
|
13631
13208
|
}
|
|
13632
13209
|
}
|
|
@@ -13651,7 +13228,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13651
13228
|
if (data1.permissionGrantId !== undefined) {
|
|
13652
13229
|
const _errs14 = errors;
|
|
13653
13230
|
if (typeof data1.permissionGrantId !== "string") {
|
|
13654
|
-
|
|
13231
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13655
13232
|
return false;
|
|
13656
13233
|
}
|
|
13657
13234
|
var valid1 = _errs14 === errors;
|
|
@@ -13664,11 +13241,11 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13664
13241
|
let data7 = data1.dateSort;
|
|
13665
13242
|
const _errs16 = errors;
|
|
13666
13243
|
if (typeof data7 !== "string") {
|
|
13667
|
-
|
|
13244
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor/dateSort", schemaPath: "#/properties/descriptor/properties/dateSort/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13668
13245
|
return false;
|
|
13669
13246
|
}
|
|
13670
13247
|
if (!((((((data7 === "createdAscending") || (data7 === "createdDescending")) || (data7 === "publishedAscending")) || (data7 === "publishedDescending")) || (data7 === "updatedAscending")) || (data7 === "updatedDescending"))) {
|
|
13671
|
-
|
|
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" }];
|
|
13672
13249
|
return false;
|
|
13673
13250
|
}
|
|
13674
13251
|
var valid1 = _errs16 === errors;
|
|
@@ -13685,7 +13262,7 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13685
13262
|
}
|
|
13686
13263
|
}
|
|
13687
13264
|
else {
|
|
13688
|
-
|
|
13265
|
+
validate86.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13689
13266
|
return false;
|
|
13690
13267
|
}
|
|
13691
13268
|
}
|
|
@@ -13699,16 +13276,16 @@ function validate85(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13699
13276
|
}
|
|
13700
13277
|
}
|
|
13701
13278
|
else {
|
|
13702
|
-
|
|
13279
|
+
validate86.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13703
13280
|
return false;
|
|
13704
13281
|
}
|
|
13705
|
-
}
|
|
13706
|
-
|
|
13282
|
+
} validate86.errors = vErrors; return errors === 0; }
|
|
13283
|
+
validate86.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
13707
13284
|
export const RecordsFilter = validate41;
|
|
13708
13285
|
export const PublicJwk = validate32;
|
|
13709
|
-
export const GenericSignaturePayload =
|
|
13710
|
-
const
|
|
13711
|
-
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) {
|
|
13712
13289
|
evaluated0.props = undefined;
|
|
13713
13290
|
} if (evaluated0.dynamicItems) {
|
|
13714
13291
|
evaluated0.items = undefined;
|
|
@@ -13716,14 +13293,14 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13716
13293
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13717
13294
|
let missing0;
|
|
13718
13295
|
if ((data.descriptorCid === undefined) && (missing0 = "descriptorCid")) {
|
|
13719
|
-
|
|
13296
|
+
validate89.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13720
13297
|
return false;
|
|
13721
13298
|
}
|
|
13722
13299
|
else {
|
|
13723
13300
|
const _errs1 = errors;
|
|
13724
13301
|
for (const key0 in data) {
|
|
13725
13302
|
if (!(((((key0 === "descriptorCid") || (key0 === "delegatedGrantId")) || (key0 === "permissionGrantId")) || (key0 === "permissionGrantIds")) || (key0 === "protocolRole"))) {
|
|
13726
|
-
|
|
13303
|
+
validate89.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13727
13304
|
return false;
|
|
13728
13305
|
break;
|
|
13729
13306
|
}
|
|
@@ -13732,7 +13309,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13732
13309
|
if (data.descriptorCid !== undefined) {
|
|
13733
13310
|
const _errs2 = errors;
|
|
13734
13311
|
if (typeof data.descriptorCid !== "string") {
|
|
13735
|
-
|
|
13312
|
+
validate89.errors = [{ instancePath: instancePath + "/descriptorCid", schemaPath: "#/properties/descriptorCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13736
13313
|
return false;
|
|
13737
13314
|
}
|
|
13738
13315
|
var valid0 = _errs2 === errors;
|
|
@@ -13744,7 +13321,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13744
13321
|
if (data.delegatedGrantId !== undefined) {
|
|
13745
13322
|
const _errs4 = errors;
|
|
13746
13323
|
if (typeof data.delegatedGrantId !== "string") {
|
|
13747
|
-
|
|
13324
|
+
validate89.errors = [{ instancePath: instancePath + "/delegatedGrantId", schemaPath: "#/properties/delegatedGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13748
13325
|
return false;
|
|
13749
13326
|
}
|
|
13750
13327
|
var valid0 = _errs4 === errors;
|
|
@@ -13756,7 +13333,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13756
13333
|
if (data.permissionGrantId !== undefined) {
|
|
13757
13334
|
const _errs6 = errors;
|
|
13758
13335
|
if (typeof data.permissionGrantId !== "string") {
|
|
13759
|
-
|
|
13336
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantId", schemaPath: "#/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13760
13337
|
return false;
|
|
13761
13338
|
}
|
|
13762
13339
|
var valid0 = _errs6 === errors;
|
|
@@ -13771,7 +13348,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13771
13348
|
if (errors === _errs9) {
|
|
13772
13349
|
if (Array.isArray(data3)) {
|
|
13773
13350
|
if (data3.length < 1) {
|
|
13774
|
-
|
|
13351
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds", schemaPath: "#/properties/permissionGrantIds/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
13775
13352
|
return false;
|
|
13776
13353
|
}
|
|
13777
13354
|
else {
|
|
@@ -13780,7 +13357,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13780
13357
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
13781
13358
|
const _errs12 = errors;
|
|
13782
13359
|
if (typeof data3[i0] !== "string") {
|
|
13783
|
-
|
|
13360
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds/" + i0, schemaPath: "#/properties/permissionGrantIds/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13784
13361
|
return false;
|
|
13785
13362
|
}
|
|
13786
13363
|
var valid1 = _errs12 === errors;
|
|
@@ -13800,7 +13377,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13800
13377
|
}
|
|
13801
13378
|
if (typeof indices0[item0] == "number") {
|
|
13802
13379
|
j0 = indices0[item0];
|
|
13803
|
-
|
|
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)" }];
|
|
13804
13381
|
return false;
|
|
13805
13382
|
break;
|
|
13806
13383
|
}
|
|
@@ -13811,7 +13388,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13811
13388
|
}
|
|
13812
13389
|
}
|
|
13813
13390
|
else {
|
|
13814
|
-
|
|
13391
|
+
validate89.errors = [{ instancePath: instancePath + "/permissionGrantIds", schemaPath: "#/properties/permissionGrantIds/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
13815
13392
|
return false;
|
|
13816
13393
|
}
|
|
13817
13394
|
}
|
|
@@ -13824,7 +13401,7 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13824
13401
|
if (data.protocolRole !== undefined) {
|
|
13825
13402
|
const _errs14 = errors;
|
|
13826
13403
|
if (typeof data.protocolRole !== "string") {
|
|
13827
|
-
|
|
13404
|
+
validate89.errors = [{ instancePath: instancePath + "/protocolRole", schemaPath: "#/properties/protocolRole/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13828
13405
|
return false;
|
|
13829
13406
|
}
|
|
13830
13407
|
var valid0 = _errs14 === errors;
|
|
@@ -13840,14 +13417,14 @@ function validate88(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13840
13417
|
}
|
|
13841
13418
|
}
|
|
13842
13419
|
else {
|
|
13843
|
-
|
|
13420
|
+
validate89.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13844
13421
|
return false;
|
|
13845
13422
|
}
|
|
13846
|
-
}
|
|
13847
|
-
|
|
13848
|
-
export const RecordsWriteSignaturePayload =
|
|
13849
|
-
const
|
|
13850
|
-
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) {
|
|
13851
13428
|
evaluated0.props = undefined;
|
|
13852
13429
|
} if (evaluated0.dynamicItems) {
|
|
13853
13430
|
evaluated0.items = undefined;
|
|
@@ -13855,14 +13432,14 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13855
13432
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13856
13433
|
let missing0;
|
|
13857
13434
|
if (((data.descriptorCid === undefined) && (missing0 = "descriptorCid")) || ((data.recordId === undefined) && (missing0 = "recordId"))) {
|
|
13858
|
-
|
|
13435
|
+
validate90.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
13859
13436
|
return false;
|
|
13860
13437
|
}
|
|
13861
13438
|
else {
|
|
13862
13439
|
const _errs1 = errors;
|
|
13863
13440
|
for (const key0 in data) {
|
|
13864
13441
|
if (!((((((((key0 === "descriptorCid") || (key0 === "recordId")) || (key0 === "contextId")) || (key0 === "attestationCid")) || (key0 === "encryptionCid")) || (key0 === "delegatedGrantId")) || (key0 === "permissionGrantId")) || (key0 === "protocolRole"))) {
|
|
13865
|
-
|
|
13442
|
+
validate90.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
13866
13443
|
return false;
|
|
13867
13444
|
break;
|
|
13868
13445
|
}
|
|
@@ -13871,7 +13448,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13871
13448
|
if (data.descriptorCid !== undefined) {
|
|
13872
13449
|
const _errs2 = errors;
|
|
13873
13450
|
if (typeof data.descriptorCid !== "string") {
|
|
13874
|
-
|
|
13451
|
+
validate90.errors = [{ instancePath: instancePath + "/descriptorCid", schemaPath: "#/properties/descriptorCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13875
13452
|
return false;
|
|
13876
13453
|
}
|
|
13877
13454
|
var valid0 = _errs2 === errors;
|
|
@@ -13883,7 +13460,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13883
13460
|
if (data.recordId !== undefined) {
|
|
13884
13461
|
const _errs4 = errors;
|
|
13885
13462
|
if (typeof data.recordId !== "string") {
|
|
13886
|
-
|
|
13463
|
+
validate90.errors = [{ instancePath: instancePath + "/recordId", schemaPath: "#/properties/recordId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13887
13464
|
return false;
|
|
13888
13465
|
}
|
|
13889
13466
|
var valid0 = _errs4 === errors;
|
|
@@ -13898,12 +13475,12 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13898
13475
|
if (errors === _errs6) {
|
|
13899
13476
|
if (typeof data2 === "string") {
|
|
13900
13477
|
if (func1(data2) > 600) {
|
|
13901
|
-
|
|
13478
|
+
validate90.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
13902
13479
|
return false;
|
|
13903
13480
|
}
|
|
13904
13481
|
}
|
|
13905
13482
|
else {
|
|
13906
|
-
|
|
13483
|
+
validate90.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13907
13484
|
return false;
|
|
13908
13485
|
}
|
|
13909
13486
|
}
|
|
@@ -13916,7 +13493,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13916
13493
|
if (data.attestationCid !== undefined) {
|
|
13917
13494
|
const _errs8 = errors;
|
|
13918
13495
|
if (typeof data.attestationCid !== "string") {
|
|
13919
|
-
|
|
13496
|
+
validate90.errors = [{ instancePath: instancePath + "/attestationCid", schemaPath: "#/properties/attestationCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13920
13497
|
return false;
|
|
13921
13498
|
}
|
|
13922
13499
|
var valid0 = _errs8 === errors;
|
|
@@ -13928,7 +13505,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13928
13505
|
if (data.encryptionCid !== undefined) {
|
|
13929
13506
|
const _errs10 = errors;
|
|
13930
13507
|
if (typeof data.encryptionCid !== "string") {
|
|
13931
|
-
|
|
13508
|
+
validate90.errors = [{ instancePath: instancePath + "/encryptionCid", schemaPath: "#/properties/encryptionCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13932
13509
|
return false;
|
|
13933
13510
|
}
|
|
13934
13511
|
var valid0 = _errs10 === errors;
|
|
@@ -13940,7 +13517,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13940
13517
|
if (data.delegatedGrantId !== undefined) {
|
|
13941
13518
|
const _errs12 = errors;
|
|
13942
13519
|
if (typeof data.delegatedGrantId !== "string") {
|
|
13943
|
-
|
|
13520
|
+
validate90.errors = [{ instancePath: instancePath + "/delegatedGrantId", schemaPath: "#/properties/delegatedGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13944
13521
|
return false;
|
|
13945
13522
|
}
|
|
13946
13523
|
var valid0 = _errs12 === errors;
|
|
@@ -13952,7 +13529,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13952
13529
|
if (data.permissionGrantId !== undefined) {
|
|
13953
13530
|
const _errs14 = errors;
|
|
13954
13531
|
if (typeof data.permissionGrantId !== "string") {
|
|
13955
|
-
|
|
13532
|
+
validate90.errors = [{ instancePath: instancePath + "/permissionGrantId", schemaPath: "#/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13956
13533
|
return false;
|
|
13957
13534
|
}
|
|
13958
13535
|
var valid0 = _errs14 === errors;
|
|
@@ -13964,7 +13541,7 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13964
13541
|
if (data.protocolRole !== undefined) {
|
|
13965
13542
|
const _errs16 = errors;
|
|
13966
13543
|
if (typeof data.protocolRole !== "string") {
|
|
13967
|
-
|
|
13544
|
+
validate90.errors = [{ instancePath: instancePath + "/protocolRole", schemaPath: "#/properties/protocolRole/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
13968
13545
|
return false;
|
|
13969
13546
|
}
|
|
13970
13547
|
var valid0 = _errs16 === errors;
|
|
@@ -13983,27 +13560,27 @@ function validate89(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
13983
13560
|
}
|
|
13984
13561
|
}
|
|
13985
13562
|
else {
|
|
13986
|
-
|
|
13563
|
+
validate90.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
13987
13564
|
return false;
|
|
13988
13565
|
}
|
|
13989
|
-
}
|
|
13990
|
-
|
|
13991
|
-
export const StringRangeFilter =
|
|
13992
|
-
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) {
|
|
13993
13570
|
evaluated0.props = undefined;
|
|
13994
13571
|
} if (evaluated0.dynamicItems) {
|
|
13995
13572
|
evaluated0.items = undefined;
|
|
13996
13573
|
} if (errors === 0) {
|
|
13997
13574
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
13998
13575
|
if (Object.keys(data).length < 1) {
|
|
13999
|
-
|
|
13576
|
+
validate91.errors = [{ instancePath, schemaPath: "#/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
14000
13577
|
return false;
|
|
14001
13578
|
}
|
|
14002
13579
|
else {
|
|
14003
13580
|
const _errs1 = errors;
|
|
14004
13581
|
for (const key0 in data) {
|
|
14005
13582
|
if (!((((key0 === "gt") || (key0 === "gte")) || (key0 === "lt")) || (key0 === "lte"))) {
|
|
14006
|
-
|
|
13583
|
+
validate91.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
14007
13584
|
return false;
|
|
14008
13585
|
break;
|
|
14009
13586
|
}
|
|
@@ -14028,7 +13605,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14028
13605
|
}
|
|
14029
13606
|
var valid1 = _errs4 === errors;
|
|
14030
13607
|
if (valid1) {
|
|
14031
|
-
|
|
13608
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/gt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
14032
13609
|
return false;
|
|
14033
13610
|
}
|
|
14034
13611
|
else {
|
|
@@ -14067,7 +13644,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14067
13644
|
}
|
|
14068
13645
|
var valid2 = _errs7 === errors;
|
|
14069
13646
|
if (valid2) {
|
|
14070
|
-
|
|
13647
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/gte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
14071
13648
|
return false;
|
|
14072
13649
|
}
|
|
14073
13650
|
else {
|
|
@@ -14106,7 +13683,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14106
13683
|
}
|
|
14107
13684
|
var valid3 = _errs10 === errors;
|
|
14108
13685
|
if (valid3) {
|
|
14109
|
-
|
|
13686
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/lt/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
14110
13687
|
return false;
|
|
14111
13688
|
}
|
|
14112
13689
|
else {
|
|
@@ -14145,7 +13722,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14145
13722
|
}
|
|
14146
13723
|
var valid4 = _errs13 === errors;
|
|
14147
13724
|
if (valid4) {
|
|
14148
|
-
|
|
13725
|
+
validate91.errors = [{ instancePath, schemaPath: "#/dependencies/lte/not", keyword: "not", params: {}, message: "must NOT be valid" }];
|
|
14149
13726
|
return false;
|
|
14150
13727
|
}
|
|
14151
13728
|
else {
|
|
@@ -14168,7 +13745,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14168
13745
|
if (data.gt !== undefined) {
|
|
14169
13746
|
const _errs14 = errors;
|
|
14170
13747
|
if (typeof data.gt !== "string") {
|
|
14171
|
-
|
|
13748
|
+
validate91.errors = [{ instancePath: instancePath + "/gt", schemaPath: "#/properties/gt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
14172
13749
|
return false;
|
|
14173
13750
|
}
|
|
14174
13751
|
var valid5 = _errs14 === errors;
|
|
@@ -14180,7 +13757,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14180
13757
|
if (data.gte !== undefined) {
|
|
14181
13758
|
const _errs16 = errors;
|
|
14182
13759
|
if (typeof data.gte !== "string") {
|
|
14183
|
-
|
|
13760
|
+
validate91.errors = [{ instancePath: instancePath + "/gte", schemaPath: "#/properties/gte/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
14184
13761
|
return false;
|
|
14185
13762
|
}
|
|
14186
13763
|
var valid5 = _errs16 === errors;
|
|
@@ -14192,7 +13769,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14192
13769
|
if (data.lt !== undefined) {
|
|
14193
13770
|
const _errs18 = errors;
|
|
14194
13771
|
if (typeof data.lt !== "string") {
|
|
14195
|
-
|
|
13772
|
+
validate91.errors = [{ instancePath: instancePath + "/lt", schemaPath: "#/properties/lt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
14196
13773
|
return false;
|
|
14197
13774
|
}
|
|
14198
13775
|
var valid5 = _errs18 === errors;
|
|
@@ -14204,7 +13781,7 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14204
13781
|
if (data.lte !== undefined) {
|
|
14205
13782
|
const _errs20 = errors;
|
|
14206
13783
|
if (typeof data.lte !== "string") {
|
|
14207
|
-
|
|
13784
|
+
validate91.errors = [{ instancePath: instancePath + "/lte", schemaPath: "#/properties/lte/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
14208
13785
|
return false;
|
|
14209
13786
|
}
|
|
14210
13787
|
var valid5 = _errs20 === errors;
|
|
@@ -14223,9 +13800,9 @@ function validate90(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
14223
13800
|
}
|
|
14224
13801
|
}
|
|
14225
13802
|
else {
|
|
14226
|
-
|
|
13803
|
+
validate91.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
14227
13804
|
return false;
|
|
14228
13805
|
}
|
|
14229
|
-
}
|
|
14230
|
-
|
|
13806
|
+
} validate91.errors = vErrors; return errors === 0; }
|
|
13807
|
+
validate91.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
14231
13808
|
//# sourceMappingURL=precompiled-validators.js.map
|