@enbox/dwn-sdk-js 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.mjs +8 -8
- package/dist/browser.mjs.map +4 -4
- package/dist/esm/generated/precompiled-validators.js +762 -911
- package/dist/esm/generated/precompiled-validators.js.map +1 -1
- package/dist/esm/src/core/abstract-message.js +4 -0
- package/dist/esm/src/core/abstract-message.js.map +1 -1
- package/dist/esm/src/core/auth.js +22 -33
- package/dist/esm/src/core/auth.js.map +1 -1
- package/dist/esm/src/core/constants.js +11 -0
- package/dist/esm/src/core/constants.js.map +1 -0
- package/dist/esm/src/core/core-protocol.js +44 -0
- package/dist/esm/src/core/core-protocol.js.map +1 -0
- package/dist/esm/src/core/dwn-constant.js +7 -7
- package/dist/esm/src/core/dwn-constant.js.map +1 -1
- package/dist/esm/src/core/dwn-error.js +10 -12
- package/dist/esm/src/core/dwn-error.js.map +1 -1
- package/dist/esm/src/core/grant-authorization.js +50 -52
- package/dist/esm/src/core/grant-authorization.js.map +1 -1
- package/dist/esm/src/core/message.js +85 -116
- package/dist/esm/src/core/message.js.map +1 -1
- package/dist/esm/src/core/messages-grant-authorization.js +63 -78
- package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/protocol-authorization-action.js +266 -0
- package/dist/esm/src/core/protocol-authorization-action.js.map +1 -0
- package/dist/esm/src/core/protocol-authorization-validation.js +321 -0
- package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -0
- package/dist/esm/src/core/protocol-authorization.js +144 -741
- package/dist/esm/src/core/protocol-authorization.js.map +1 -1
- package/dist/esm/src/core/protocols-grant-authorization.js +24 -38
- package/dist/esm/src/core/protocols-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/record-chain.js +64 -0
- package/dist/esm/src/core/record-chain.js.map +1 -0
- package/dist/esm/src/core/records-grant-authorization.js +53 -72
- package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
- package/dist/esm/src/core/resumable-task-manager.js +50 -65
- package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
- package/dist/esm/src/core/tenant-gate.js +2 -13
- package/dist/esm/src/core/tenant-gate.js.map +1 -1
- package/dist/esm/src/dwn.js +108 -101
- package/dist/esm/src/dwn.js.map +1 -1
- package/dist/esm/src/event-stream/event-emitter-event-log.js +204 -0
- package/dist/esm/src/event-stream/event-emitter-event-log.js.map +1 -0
- package/dist/esm/src/handlers/messages-read.js +67 -81
- package/dist/esm/src/handlers/messages-read.js.map +1 -1
- package/dist/esm/src/handlers/messages-subscribe.js +51 -63
- package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/messages-sync.js +75 -89
- package/dist/esm/src/handlers/messages-sync.js.map +1 -1
- package/dist/esm/src/handlers/protocols-configure.js +153 -163
- package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
- package/dist/esm/src/handlers/protocols-query.js +52 -55
- package/dist/esm/src/handlers/protocols-query.js.map +1 -1
- package/dist/esm/src/handlers/records-count.js +97 -85
- package/dist/esm/src/handlers/records-count.js.map +1 -1
- package/dist/esm/src/handlers/records-delete.js +75 -93
- package/dist/esm/src/handlers/records-delete.js.map +1 -1
- package/dist/esm/src/handlers/records-query.js +116 -105
- package/dist/esm/src/handlers/records-query.js.map +1 -1
- package/dist/esm/src/handlers/records-read.js +130 -132
- package/dist/esm/src/handlers/records-read.js.map +1 -1
- package/dist/esm/src/handlers/records-subscribe.js +164 -104
- package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
- package/dist/esm/src/handlers/records-write.js +213 -280
- package/dist/esm/src/handlers/records-write.js.map +1 -1
- package/dist/esm/src/index.js +5 -2
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/interfaces/messages-read.js +24 -32
- package/dist/esm/src/interfaces/messages-read.js.map +1 -1
- package/dist/esm/src/interfaces/messages-subscribe.js +28 -41
- package/dist/esm/src/interfaces/messages-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/messages-sync.js +26 -40
- package/dist/esm/src/interfaces/messages-sync.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-configure.js +87 -65
- package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
- package/dist/esm/src/interfaces/protocols-query.js +55 -68
- package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-count.js +50 -66
- package/dist/esm/src/interfaces/records-count.js.map +1 -1
- package/dist/esm/src/interfaces/records-delete.js +45 -55
- package/dist/esm/src/interfaces/records-delete.js.map +1 -1
- package/dist/esm/src/interfaces/records-query.js +60 -76
- package/dist/esm/src/interfaces/records-query.js.map +1 -1
- package/dist/esm/src/interfaces/records-read.js +51 -67
- package/dist/esm/src/interfaces/records-read.js.map +1 -1
- package/dist/esm/src/interfaces/records-subscribe.js +53 -68
- package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
- package/dist/esm/src/interfaces/records-write-query.js +102 -0
- package/dist/esm/src/interfaces/records-write-query.js.map +1 -0
- package/dist/esm/src/interfaces/records-write-signing.js +81 -0
- package/dist/esm/src/interfaces/records-write-signing.js.map +1 -0
- package/dist/esm/src/interfaces/records-write.js +396 -610
- package/dist/esm/src/interfaces/records-write.js.map +1 -1
- package/dist/esm/src/jose/algorithms/signing/ed25519.js +10 -19
- package/dist/esm/src/jose/algorithms/signing/ed25519.js.map +1 -1
- package/dist/esm/src/jose/jws/general/builder.js +23 -35
- package/dist/esm/src/jose/jws/general/builder.js.map +1 -1
- package/dist/esm/src/jose/jws/general/verifier.js +56 -69
- package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
- package/dist/esm/src/protocols/permission-grant.js +43 -14
- package/dist/esm/src/protocols/permission-grant.js.map +1 -1
- package/dist/esm/src/protocols/permission-request.js +28 -14
- package/dist/esm/src/protocols/permission-request.js.map +1 -1
- package/dist/esm/src/protocols/permissions.js +325 -227
- package/dist/esm/src/protocols/permissions.js.map +1 -1
- package/dist/esm/src/smt/smt-store-level.js +42 -64
- package/dist/esm/src/smt/smt-store-level.js.map +1 -1
- package/dist/esm/src/smt/smt-store-memory.js +19 -45
- package/dist/esm/src/smt/smt-store-memory.js.map +1 -1
- package/dist/esm/src/smt/smt-utils.js +28 -45
- package/dist/esm/src/smt/smt-utils.js.map +1 -1
- package/dist/esm/src/smt/sparse-merkle-tree.js +426 -471
- package/dist/esm/src/smt/sparse-merkle-tree.js.map +1 -1
- package/dist/esm/src/state-index/state-index-level.js +113 -150
- package/dist/esm/src/state-index/state-index-level.js.map +1 -1
- package/dist/esm/src/store/blockstore-level.js +54 -156
- package/dist/esm/src/store/blockstore-level.js.map +1 -1
- package/dist/esm/src/store/blockstore-mock.js +48 -153
- package/dist/esm/src/store/blockstore-mock.js.map +1 -1
- package/dist/esm/src/store/data-store-level.js +137 -100
- package/dist/esm/src/store/data-store-level.js.map +1 -1
- package/dist/esm/src/store/index-level-compound.js +246 -0
- package/dist/esm/src/store/index-level-compound.js.map +1 -0
- package/dist/esm/src/store/index-level.js +307 -715
- package/dist/esm/src/store/index-level.js.map +1 -1
- package/dist/esm/src/store/level-wrapper.js +143 -244
- package/dist/esm/src/store/level-wrapper.js.map +1 -1
- package/dist/esm/src/store/message-store-level.js +71 -94
- package/dist/esm/src/store/message-store-level.js.map +1 -1
- package/dist/esm/src/store/resumable-task-store-level.js +62 -101
- package/dist/esm/src/store/resumable-task-store-level.js.map +1 -1
- package/dist/esm/src/store/storage-controller.js +131 -146
- package/dist/esm/src/store/storage-controller.js.map +1 -1
- package/dist/esm/src/types/permission-types.js.map +1 -1
- package/dist/esm/src/types/protocols-types.js +10 -0
- package/dist/esm/src/types/protocols-types.js.map +1 -1
- package/dist/esm/src/types/records-types.js.map +1 -1
- package/dist/esm/src/utils/abort.js +8 -19
- package/dist/esm/src/utils/abort.js.map +1 -1
- package/dist/esm/src/utils/array.js +15 -49
- package/dist/esm/src/utils/array.js.map +1 -1
- package/dist/esm/src/utils/cid.js +29 -77
- package/dist/esm/src/utils/cid.js.map +1 -1
- package/dist/esm/src/utils/data-stream.js +37 -65
- package/dist/esm/src/utils/data-stream.js.map +1 -1
- package/dist/esm/src/utils/encryption.js +136 -162
- package/dist/esm/src/utils/encryption.js.map +1 -1
- package/dist/esm/src/utils/filter.js +1 -12
- package/dist/esm/src/utils/filter.js.map +1 -1
- package/dist/esm/src/utils/hd-key.js +45 -71
- package/dist/esm/src/utils/hd-key.js.map +1 -1
- package/dist/esm/src/utils/jws.js +9 -20
- package/dist/esm/src/utils/jws.js.map +1 -1
- package/dist/esm/src/utils/memory-cache.js +12 -23
- package/dist/esm/src/utils/memory-cache.js.map +1 -1
- package/dist/esm/src/utils/messages.js +21 -33
- package/dist/esm/src/utils/messages.js.map +1 -1
- package/dist/esm/src/utils/private-key-signer.js +9 -17
- package/dist/esm/src/utils/private-key-signer.js.map +1 -1
- package/dist/esm/src/utils/protocols.js +62 -70
- package/dist/esm/src/utils/protocols.js.map +1 -1
- package/dist/esm/src/utils/records.js +103 -166
- package/dist/esm/src/utils/records.js.map +1 -1
- package/dist/esm/src/utils/secp256k1.js +60 -96
- package/dist/esm/src/utils/secp256k1.js.map +1 -1
- package/dist/esm/src/utils/secp256r1.js +54 -71
- package/dist/esm/src/utils/secp256r1.js.map +1 -1
- package/dist/esm/src/utils/time.js +5 -18
- package/dist/esm/src/utils/time.js.map +1 -1
- package/dist/esm/src/utils/url.js +3 -3
- package/dist/esm/src/utils/url.js.map +1 -1
- package/dist/esm/tests/core/auth.spec.js +3 -12
- package/dist/esm/tests/core/auth.spec.js.map +1 -1
- package/dist/esm/tests/core/message.spec.js +50 -59
- package/dist/esm/tests/core/message.spec.js.map +1 -1
- package/dist/esm/tests/core/protocol-authorization.spec.js +10 -18
- package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
- package/dist/esm/tests/dwn.spec.js +65 -89
- package/dist/esm/tests/dwn.spec.js.map +1 -1
- package/dist/esm/tests/event-emitter-event-log.spec.js +305 -0
- package/dist/esm/tests/event-emitter-event-log.spec.js.map +1 -0
- package/dist/esm/tests/features/author-delegated-grant.spec.js +337 -347
- package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
- package/dist/esm/tests/features/owner-delegated-grant.spec.js +160 -172
- package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
- package/dist/esm/tests/features/owner-signature.spec.js +78 -82
- package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
- package/dist/esm/tests/features/permissions.spec.js +449 -184
- package/dist/esm/tests/features/permissions.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-composition.spec.js +981 -360
- package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-create-action.spec.js +45 -54
- package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-delete-action.spec.js +99 -108
- package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
- package/dist/esm/tests/features/protocol-update-action.spec.js +108 -117
- package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
- package/dist/esm/tests/features/records-immutable.spec.js +315 -0
- package/dist/esm/tests/features/records-immutable.spec.js.map +1 -0
- package/dist/esm/tests/features/records-prune.spec.js +178 -194
- package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
- package/dist/esm/tests/features/records-record-limit.spec.js +542 -0
- package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -0
- package/dist/esm/tests/features/records-tags.spec.js +456 -463
- package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
- package/dist/esm/tests/features/resumable-tasks.spec.js +88 -98
- package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-read.spec.js +215 -210
- package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-subscribe.spec.js +309 -171
- package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/handlers/messages-sync.spec.js +272 -199
- package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
- package/dist/esm/tests/handlers/protocols-configure.spec.js +247 -241
- package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
- package/dist/esm/tests/handlers/protocols-query.spec.js +159 -172
- package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-count.spec.js +101 -105
- package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-delete.spec.js +266 -279
- package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-query.spec.js +984 -996
- package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-read.spec.js +542 -671
- package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-subscribe.spec.js +433 -302
- package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/handlers/records-write.spec.js +1216 -1140
- package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/messages-get.spec.js +39 -48
- package/dist/esm/tests/interfaces/messages-get.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/messages-subscribe.spec.js +4 -13
- package/dist/esm/tests/interfaces/messages-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/protocols-configure.spec.js +212 -88
- package/dist/esm/tests/interfaces/protocols-configure.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/protocols-query.spec.js +8 -17
- package/dist/esm/tests/interfaces/protocols-query.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-delete.spec.js +8 -17
- package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-query.spec.js +20 -29
- package/dist/esm/tests/interfaces/records-query.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-read.spec.js +42 -51
- package/dist/esm/tests/interfaces/records-read.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-subscribe.spec.js +16 -25
- package/dist/esm/tests/interfaces/records-subscribe.spec.js.map +1 -1
- package/dist/esm/tests/interfaces/records-write.spec.js +190 -219
- package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
- package/dist/esm/tests/jose/jws/general.spec.js +36 -45
- package/dist/esm/tests/jose/jws/general.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permission-grant.spec.js +44 -50
- package/dist/esm/tests/protocols/permission-grant.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permission-request.spec.js +23 -32
- package/dist/esm/tests/protocols/permission-request.spec.js.map +1 -1
- package/dist/esm/tests/protocols/permissions.spec.js +49 -55
- package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/aggregator.spec.js +127 -138
- package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/deleted-record.spec.js +372 -36
- package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +55 -64
- package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/nested-roles.spec.js +66 -76
- package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
- package/dist/esm/tests/scenarios/subscriptions.spec.js +451 -354
- package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
- package/dist/esm/tests/smt/smt-store-level.spec.js +76 -87
- package/dist/esm/tests/smt/smt-store-level.spec.js.map +1 -1
- package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +344 -353
- package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +1 -1
- package/dist/esm/tests/state-index/state-index-level.spec.js +117 -126
- package/dist/esm/tests/state-index/state-index-level.spec.js.map +1 -1
- package/dist/esm/tests/store/blockstore-level.spec.js +44 -99
- package/dist/esm/tests/store/blockstore-level.spec.js.map +1 -1
- package/dist/esm/tests/store/blockstore-mock.spec.js +40 -120
- package/dist/esm/tests/store/blockstore-mock.spec.js.map +1 -1
- package/dist/esm/tests/store/data-store-level.spec.js +160 -108
- package/dist/esm/tests/store/data-store-level.spec.js.map +1 -1
- package/dist/esm/tests/store/index-level.spec.js +404 -414
- package/dist/esm/tests/store/index-level.spec.js.map +1 -1
- package/dist/esm/tests/store/message-store-level.spec.js +13 -22
- package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
- package/dist/esm/tests/store/message-store.spec.js +229 -238
- package/dist/esm/tests/store/message-store.spec.js.map +1 -1
- package/dist/esm/tests/test-event-stream.js +12 -13
- package/dist/esm/tests/test-event-stream.js.map +1 -1
- package/dist/esm/tests/test-stores.js +16 -13
- package/dist/esm/tests/test-stores.js.map +1 -1
- package/dist/esm/tests/test-suite.js +8 -15
- package/dist/esm/tests/test-suite.js.map +1 -1
- package/dist/esm/tests/utils/cid.spec.js +24 -33
- package/dist/esm/tests/utils/cid.spec.js.map +1 -1
- package/dist/esm/tests/utils/data-stream.spec.js +48 -57
- package/dist/esm/tests/utils/data-stream.spec.js.map +1 -1
- package/dist/esm/tests/utils/encryption-callbacks.spec.js +45 -54
- package/dist/esm/tests/utils/encryption-callbacks.spec.js.map +1 -1
- package/dist/esm/tests/utils/encryption.spec.js +229 -82
- package/dist/esm/tests/utils/encryption.spec.js.map +1 -1
- package/dist/esm/tests/utils/filters.spec.js +46 -55
- package/dist/esm/tests/utils/filters.spec.js.map +1 -1
- package/dist/esm/tests/utils/hd-key.spec.js +10 -19
- package/dist/esm/tests/utils/hd-key.spec.js.map +1 -1
- package/dist/esm/tests/utils/jws.spec.js +3 -12
- package/dist/esm/tests/utils/jws.spec.js.map +1 -1
- package/dist/esm/tests/utils/memory-cache.spec.js +9 -18
- package/dist/esm/tests/utils/memory-cache.spec.js.map +1 -1
- package/dist/esm/tests/utils/messages.spec.js +18 -20
- package/dist/esm/tests/utils/messages.spec.js.map +1 -1
- package/dist/esm/tests/utils/poller.js +22 -33
- package/dist/esm/tests/utils/poller.js.map +1 -1
- package/dist/esm/tests/utils/private-key-signer.spec.js +15 -24
- package/dist/esm/tests/utils/private-key-signer.spec.js.map +1 -1
- package/dist/esm/tests/utils/records.spec.js +14 -27
- package/dist/esm/tests/utils/records.spec.js.map +1 -1
- package/dist/esm/tests/utils/secp256k1.spec.js +16 -25
- package/dist/esm/tests/utils/secp256k1.spec.js.map +1 -1
- package/dist/esm/tests/utils/secp256r1.spec.js +18 -27
- package/dist/esm/tests/utils/secp256r1.spec.js.map +1 -1
- package/dist/esm/tests/utils/test-data-generator.js +446 -467
- package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/definitions.spec.js +2 -11
- package/dist/esm/tests/validation/json-schemas/definitions.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js +4 -13
- package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js +8 -17
- package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js +3 -12
- package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js +4 -13
- package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js +2 -11
- package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js +2 -11
- package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js.map +1 -1
- package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js +44 -24
- package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js.map +1 -1
- package/dist/types/generated/precompiled-validators.d.ts +49 -40
- package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
- package/dist/types/src/core/constants.d.ts +11 -0
- package/dist/types/src/core/constants.d.ts.map +1 -0
- package/dist/types/src/core/core-protocol.d.ts +89 -0
- package/dist/types/src/core/core-protocol.d.ts.map +1 -0
- package/dist/types/src/core/dwn-error.d.ts +9 -12
- package/dist/types/src/core/dwn-error.d.ts.map +1 -1
- package/dist/types/src/core/grant-authorization.d.ts +6 -2
- package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
- package/dist/types/src/core/protocol-authorization-action.d.ts +42 -0
- package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -0
- package/dist/types/src/core/protocol-authorization-validation.d.ts +81 -0
- package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -0
- package/dist/types/src/core/protocol-authorization.d.ts +24 -106
- package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
- package/dist/types/src/core/record-chain.d.ts +24 -0
- package/dist/types/src/core/record-chain.d.ts.map +1 -0
- package/dist/types/src/core/records-grant-authorization.d.ts.map +1 -1
- package/dist/types/src/dwn.d.ts +19 -7
- package/dist/types/src/dwn.d.ts.map +1 -1
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts +50 -0
- package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +1 -0
- package/dist/types/src/handlers/messages-read.d.ts +3 -8
- package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-subscribe.d.ts +6 -10
- package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/messages-sync.d.ts +3 -8
- package/dist/types/src/handlers/messages-sync.d.ts.map +1 -1
- package/dist/types/src/handlers/protocols-configure.d.ts +3 -10
- package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/handlers/protocols-query.d.ts +3 -8
- package/dist/types/src/handlers/protocols-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-count.d.ts +3 -6
- package/dist/types/src/handlers/records-count.d.ts.map +1 -1
- package/dist/types/src/handlers/records-delete.d.ts +3 -8
- package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
- package/dist/types/src/handlers/records-query.d.ts +3 -8
- package/dist/types/src/handlers/records-query.d.ts.map +1 -1
- package/dist/types/src/handlers/records-read.d.ts +3 -8
- package/dist/types/src/handlers/records-read.d.ts.map +1 -1
- package/dist/types/src/handlers/records-subscribe.d.ts +8 -10
- package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/handlers/records-write.d.ts +4 -24
- package/dist/types/src/handlers/records-write.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +8 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/messages-subscribe.d.ts +5 -0
- package/dist/types/src/interfaces/messages-subscribe.d.ts.map +1 -1
- package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-subscribe.d.ts +5 -0
- package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
- package/dist/types/src/interfaces/records-write-query.d.ts +33 -0
- package/dist/types/src/interfaces/records-write-query.d.ts.map +1 -0
- package/dist/types/src/interfaces/records-write-signing.d.ts +34 -0
- package/dist/types/src/interfaces/records-write-signing.d.ts.map +1 -0
- package/dist/types/src/interfaces/records-write.d.ts +13 -53
- package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
- package/dist/types/src/protocols/permission-grant.d.ts +1 -1
- package/dist/types/src/protocols/permission-grant.d.ts.map +1 -1
- package/dist/types/src/protocols/permission-request.d.ts +1 -1
- package/dist/types/src/protocols/permission-request.d.ts.map +1 -1
- package/dist/types/src/protocols/permissions.d.ts +40 -3
- package/dist/types/src/protocols/permissions.d.ts.map +1 -1
- package/dist/types/src/state-index/state-index-level.d.ts.map +1 -1
- package/dist/types/src/store/data-store-level.d.ts +20 -4
- package/dist/types/src/store/data-store-level.d.ts.map +1 -1
- package/dist/types/src/store/index-level-compound.d.ts +70 -0
- package/dist/types/src/store/index-level-compound.d.ts.map +1 -0
- package/dist/types/src/store/index-level.d.ts +4 -58
- package/dist/types/src/store/index-level.d.ts.map +1 -1
- package/dist/types/src/store/storage-controller.d.ts +4 -4
- package/dist/types/src/store/storage-controller.d.ts.map +1 -1
- package/dist/types/src/types/message-types.d.ts +3 -3
- package/dist/types/src/types/message-types.d.ts.map +1 -1
- package/dist/types/src/types/messages-types.d.ts +12 -3
- package/dist/types/src/types/messages-types.d.ts.map +1 -1
- package/dist/types/src/types/method-handler.d.ts +24 -3
- package/dist/types/src/types/method-handler.d.ts.map +1 -1
- package/dist/types/src/types/permission-types.d.ts +7 -0
- package/dist/types/src/types/permission-types.d.ts.map +1 -1
- package/dist/types/src/types/protocols-types.d.ts +41 -1
- package/dist/types/src/types/protocols-types.d.ts.map +1 -1
- package/dist/types/src/types/records-types.d.ts +16 -6
- package/dist/types/src/types/records-types.d.ts.map +1 -1
- package/dist/types/src/types/subscriptions.d.ts +151 -13
- package/dist/types/src/types/subscriptions.d.ts.map +1 -1
- package/dist/types/src/utils/hd-key.d.ts +1 -9
- package/dist/types/src/utils/hd-key.d.ts.map +1 -1
- package/dist/types/src/utils/messages.d.ts +7 -5
- package/dist/types/src/utils/messages.d.ts.map +1 -1
- package/dist/types/src/utils/protocols.d.ts +5 -0
- package/dist/types/src/utils/protocols.d.ts.map +1 -1
- package/dist/types/src/utils/records.d.ts +1 -11
- package/dist/types/src/utils/records.d.ts.map +1 -1
- package/dist/types/tests/dwn.spec.d.ts.map +1 -1
- package/dist/types/tests/event-emitter-event-log.spec.d.ts +2 -0
- package/dist/types/tests/event-emitter-event-log.spec.d.ts.map +1 -0
- 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/records-immutable.spec.d.ts +2 -0
- package/dist/types/tests/features/records-immutable.spec.d.ts.map +1 -0
- package/dist/types/tests/features/records-record-limit.spec.d.ts +2 -0
- package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -0
- 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-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/messages-sync.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/subscriptions.spec.d.ts.map +1 -1
- package/dist/types/tests/test-event-stream.d.ts +11 -12
- package/dist/types/tests/test-event-stream.d.ts.map +1 -1
- package/dist/types/tests/test-suite.d.ts +2 -2
- package/dist/types/tests/test-suite.d.ts.map +1 -1
- package/dist/types/tests/utils/test-data-generator.d.ts +18 -0
- package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/core/constants.ts +11 -0
- package/src/core/core-protocol.ts +129 -0
- package/src/core/dwn-error.ts +15 -12
- package/src/core/grant-authorization.ts +20 -3
- package/src/core/protocol-authorization-action.ts +377 -0
- package/src/core/protocol-authorization-validation.ts +487 -0
- package/src/core/protocol-authorization.ts +111 -856
- package/src/core/record-chain.ts +99 -0
- package/src/core/records-grant-authorization.ts +6 -8
- package/src/dwn.ts +58 -73
- package/src/event-stream/event-emitter-event-log.ts +283 -0
- package/src/handlers/messages-read.ts +8 -9
- package/src/handlers/messages-subscribe.ts +24 -28
- package/src/handlers/messages-sync.ts +10 -16
- package/src/handlers/protocols-configure.ts +47 -32
- package/src/handlers/protocols-query.ts +6 -9
- package/src/handlers/records-count.ts +11 -10
- package/src/handlers/records-delete.ts +12 -21
- package/src/handlers/records-query.ts +12 -12
- package/src/handlers/records-read.ts +34 -22
- package/src/handlers/records-subscribe.ts +47 -26
- package/src/handlers/records-write.ts +47 -104
- package/src/index.ts +9 -5
- package/src/interfaces/messages-subscribe.ts +7 -1
- package/src/interfaces/protocols-configure.ts +73 -8
- package/src/interfaces/records-count.ts +1 -1
- package/src/interfaces/records-delete.ts +1 -1
- package/src/interfaces/records-query.ts +1 -1
- package/src/interfaces/records-read.ts +1 -1
- package/src/interfaces/records-subscribe.ts +8 -1
- package/src/interfaces/records-write-query.ts +139 -0
- package/src/interfaces/records-write-signing.ts +123 -0
- package/src/interfaces/records-write.ts +66 -261
- package/src/protocols/permission-grant.ts +1 -1
- package/src/protocols/permission-request.ts +1 -1
- package/src/protocols/permissions.ts +148 -6
- package/src/state-index/state-index-level.ts +5 -7
- package/src/store/data-store-level.ts +124 -34
- package/src/store/index-level-compound.ts +324 -0
- package/src/store/index-level.ts +68 -341
- package/src/store/storage-controller.ts +11 -11
- package/src/types/message-types.ts +3 -3
- package/src/types/messages-types.ts +12 -3
- package/src/types/method-handler.ts +26 -4
- package/src/types/mitt.d.ts +28 -0
- package/src/types/permission-types.ts +7 -0
- package/src/types/protocols-types.ts +46 -0
- package/src/types/records-types.ts +16 -6
- package/src/types/subscriptions.ts +178 -14
- package/src/utils/hd-key.ts +0 -9
- package/src/utils/messages.ts +17 -37
- package/src/utils/protocols.ts +8 -0
- package/src/utils/records.ts +8 -59
- package/dist/esm/src/event-stream/event-emitter-stream.js +0 -60
- package/dist/esm/src/event-stream/event-emitter-stream.js.map +0 -1
- package/dist/esm/tests/event-stream/event-emitter-stream.spec.js +0 -77
- package/dist/esm/tests/event-stream/event-emitter-stream.spec.js.map +0 -1
- package/dist/esm/tests/event-stream/event-stream.spec.js +0 -123
- package/dist/esm/tests/event-stream/event-stream.spec.js.map +0 -1
- package/dist/types/src/event-stream/event-emitter-stream.d.ts +0 -23
- package/dist/types/src/event-stream/event-emitter-stream.d.ts.map +0 -1
- package/dist/types/tests/event-stream/event-emitter-stream.spec.d.ts +0 -2
- package/dist/types/tests/event-stream/event-emitter-stream.spec.d.ts.map +0 -1
- package/dist/types/tests/event-stream/event-stream.spec.d.ts +0 -2
- package/dist/types/tests/event-stream/event-stream.spec.d.ts.map +0 -1
- package/src/event-stream/event-emitter-stream.ts +0 -69
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
import func1Mod from "ajv/dist/runtime/ucs2length.js";
|
|
3
2
|
"use strict";
|
|
4
3
|
export const Authorization = validate20;
|
|
@@ -168,10 +167,10 @@ validate20.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": f
|
|
|
168
167
|
export const AuthorizationDelegatedGrant = validate24;
|
|
169
168
|
const schema37 = { "$id": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "signature": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorDelegatedGrant": { "$ref": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json" } } };
|
|
170
169
|
const schema38 = { "$id": "https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json", "$ref": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "unevaluatedProperties": false, "type": "object", "required": ["recordId", "authorization", "encodedData"], "properties": { "encodedData": { "type": "string" } } };
|
|
171
|
-
const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "protected": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "iv": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "tag": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "recipients": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "header": { "type": "object", "properties": { "kid": { "type": "string" }, "epk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "derivationScheme": { "type": "string", "enum": ["
|
|
170
|
+
const schema39 = { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://identity.foundation/dwn/json-schemas/records-write-unidentified.json", "type": "object", "required": ["descriptor", "contextId"], "properties": { "recordId": { "type": "string" }, "contextId": { "type": "string", "maxLength": 600, "pattern": "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, "attestation": { "$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json" }, "authorization": { "$ref": "https://identity.foundation/dwn/json-schemas/authorization-owner.json" }, "encryption": { "type": "object", "properties": { "protected": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "iv": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "tag": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" }, "recipients": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "header": { "type": "object", "properties": { "kid": { "type": "string" }, "epk": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" }, "derivationScheme": { "type": "string", "enum": ["protocolContext", "protocolPath"] }, "derivedPublicKey": { "$ref": "https://identity.foundation/dwn/json-schemas/public-jwk.json" } }, "additionalProperties": false, "required": ["kid", "epk", "derivationScheme"] }, "encrypted_key": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url" } }, "additionalProperties": false, "required": ["header", "encrypted_key"] } } }, "additionalProperties": false, "required": ["protected", "iv", "tag", "recipients"] }, "descriptor": { "type": "object", "properties": { "interface": { "enum": ["Records"], "type": "string" }, "method": { "enum": ["Write"], "type": "string" }, "recipient": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/did" }, "protocol": { "type": "string" }, "protocolPath": { "type": "string", "pattern": "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, "schema": { "type": "string" }, "tags": { "type": "object", "minProperties": 1, "maxProperties": 10, "additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "string" } }, { "type": "array", "minItems": 1, "maxItems": 10, "items": { "type": "number" } }] } }, "parentId": { "type": "string" }, "dataCid": { "type": "string" }, "dataSize": { "type": "number" }, "dateCreated": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "messageTimestamp": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "published": { "type": "boolean" }, "datePublished": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/date-time" }, "dataFormat": { "type": "string" }, "permissionGrantId": { "type": "string" } }, "additionalProperties": false, "required": ["interface", "method", "protocol", "protocolPath", "dataCid", "dataSize", "dateCreated", "messageTimestamp", "dataFormat"], "dependencies": { "parentId": ["protocol"] }, "allOf": [{ "$comment": "rule defining `published` and `datePublished` relationship", "anyOf": [{ "properties": { "published": { "type": "boolean", "enum": [true] } }, "required": ["published", "datePublished"] }, { "properties": { "published": { "type": "boolean", "enum": [false] } }, "not": { "required": ["datePublished"] } }, { "allOf": [{ "not": { "required": ["published"] } }, { "not": { "required": ["datePublished"] } }] }] }] } } };
|
|
172
171
|
const schema47 = { "type": "string", "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_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" };
|
|
173
172
|
const schema48 = { "type": "string", "pattern": "^\\d{4}-[0-1]\\d-[0-3]\\dT(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)\\.\\d{6}Z$" };
|
|
174
|
-
const func1 =
|
|
173
|
+
const func1 = func1Mod.default ?? func1Mod;
|
|
175
174
|
const func2 = Object.prototype.hasOwnProperty;
|
|
176
175
|
const pattern7 = new RegExp("^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$", "u");
|
|
177
176
|
const pattern12 = new RegExp("^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_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$", "u");
|
|
@@ -1435,282 +1434,37 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1435
1434
|
if (evaluated0.dynamicItems) {
|
|
1436
1435
|
evaluated0.items = undefined;
|
|
1437
1436
|
}
|
|
1438
|
-
const _errs2 = errors;
|
|
1439
|
-
let valid0 = false;
|
|
1440
|
-
const _errs3 = errors;
|
|
1441
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1442
|
-
let missing0;
|
|
1443
|
-
if ((data.contextId === undefined) && (missing0 = "contextId")) {
|
|
1444
|
-
const err0 = { instancePath, schemaPath: "#/anyOf/0/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" };
|
|
1445
|
-
if (vErrors === null) {
|
|
1446
|
-
vErrors = [err0];
|
|
1447
|
-
}
|
|
1448
|
-
else {
|
|
1449
|
-
vErrors.push(err0);
|
|
1450
|
-
}
|
|
1451
|
-
errors++;
|
|
1452
|
-
}
|
|
1453
|
-
else {
|
|
1454
|
-
if (data.descriptor !== undefined) {
|
|
1455
|
-
let data0 = data.descriptor;
|
|
1456
|
-
const _errs4 = errors;
|
|
1457
|
-
if (errors === _errs4) {
|
|
1458
|
-
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
1459
|
-
let missing1;
|
|
1460
|
-
if (((data0.protocol === undefined) && (missing1 = "protocol")) || ((data0.protocolPath === undefined) && (missing1 = "protocolPath"))) {
|
|
1461
|
-
const err1 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/0/properties/descriptor/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
|
|
1462
|
-
if (vErrors === null) {
|
|
1463
|
-
vErrors = [err1];
|
|
1464
|
-
}
|
|
1465
|
-
else {
|
|
1466
|
-
vErrors.push(err1);
|
|
1467
|
-
}
|
|
1468
|
-
errors++;
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
else {
|
|
1472
|
-
const err2 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/0/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1473
|
-
if (vErrors === null) {
|
|
1474
|
-
vErrors = [err2];
|
|
1475
|
-
}
|
|
1476
|
-
else {
|
|
1477
|
-
vErrors.push(err2);
|
|
1478
|
-
}
|
|
1479
|
-
errors++;
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
var _valid0 = _errs3 === errors;
|
|
1486
|
-
valid0 = valid0 || _valid0;
|
|
1487
|
-
if (_valid0) {
|
|
1488
|
-
var props0 = {};
|
|
1489
|
-
props0.descriptor = true;
|
|
1490
|
-
}
|
|
1491
|
-
const _errs6 = errors;
|
|
1492
|
-
const _errs7 = errors;
|
|
1493
|
-
const _errs8 = errors;
|
|
1494
|
-
const _errs9 = errors;
|
|
1495
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1496
|
-
let missing2;
|
|
1497
|
-
if ((data.contextId === undefined) && (missing2 = "contextId")) {
|
|
1498
|
-
const err3 = {};
|
|
1499
|
-
if (vErrors === null) {
|
|
1500
|
-
vErrors = [err3];
|
|
1501
|
-
}
|
|
1502
|
-
else {
|
|
1503
|
-
vErrors.push(err3);
|
|
1504
|
-
}
|
|
1505
|
-
errors++;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
var valid3 = _errs9 === errors;
|
|
1509
|
-
if (valid3) {
|
|
1510
|
-
const err4 = { instancePath, schemaPath: "#/anyOf/1/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
1511
|
-
if (vErrors === null) {
|
|
1512
|
-
vErrors = [err4];
|
|
1513
|
-
}
|
|
1514
|
-
else {
|
|
1515
|
-
vErrors.push(err4);
|
|
1516
|
-
}
|
|
1517
|
-
errors++;
|
|
1518
|
-
}
|
|
1519
|
-
else {
|
|
1520
|
-
errors = _errs8;
|
|
1521
|
-
if (vErrors !== null) {
|
|
1522
|
-
if (_errs8) {
|
|
1523
|
-
vErrors.length = _errs8;
|
|
1524
|
-
}
|
|
1525
|
-
else {
|
|
1526
|
-
vErrors = null;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
var valid2 = _errs7 === errors;
|
|
1531
|
-
if (valid2) {
|
|
1532
|
-
const _errs10 = errors;
|
|
1533
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1534
|
-
if (data.descriptor !== undefined) {
|
|
1535
|
-
let data1 = data.descriptor;
|
|
1536
|
-
if (!(data1 && typeof data1 == "object" && !Array.isArray(data1))) {
|
|
1537
|
-
const err5 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/1/allOf/1/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1538
|
-
if (vErrors === null) {
|
|
1539
|
-
vErrors = [err5];
|
|
1540
|
-
}
|
|
1541
|
-
else {
|
|
1542
|
-
vErrors.push(err5);
|
|
1543
|
-
}
|
|
1544
|
-
errors++;
|
|
1545
|
-
}
|
|
1546
|
-
const _errs13 = errors;
|
|
1547
|
-
const _errs14 = errors;
|
|
1548
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
1549
|
-
let missing3;
|
|
1550
|
-
if ((data1.protocol === undefined) && (missing3 = "protocol")) {
|
|
1551
|
-
const err6 = {};
|
|
1552
|
-
if (vErrors === null) {
|
|
1553
|
-
vErrors = [err6];
|
|
1554
|
-
}
|
|
1555
|
-
else {
|
|
1556
|
-
vErrors.push(err6);
|
|
1557
|
-
}
|
|
1558
|
-
errors++;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
var valid5 = _errs14 === errors;
|
|
1562
|
-
if (valid5) {
|
|
1563
|
-
const err7 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/1/allOf/1/properties/descriptor/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
1564
|
-
if (vErrors === null) {
|
|
1565
|
-
vErrors = [err7];
|
|
1566
|
-
}
|
|
1567
|
-
else {
|
|
1568
|
-
vErrors.push(err7);
|
|
1569
|
-
}
|
|
1570
|
-
errors++;
|
|
1571
|
-
}
|
|
1572
|
-
else {
|
|
1573
|
-
errors = _errs13;
|
|
1574
|
-
if (vErrors !== null) {
|
|
1575
|
-
if (_errs13) {
|
|
1576
|
-
vErrors.length = _errs13;
|
|
1577
|
-
}
|
|
1578
|
-
else {
|
|
1579
|
-
vErrors = null;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
var valid2 = _errs10 === errors;
|
|
1586
|
-
if (valid2) {
|
|
1587
|
-
const _errs15 = errors;
|
|
1588
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1589
|
-
if (data.descriptor !== undefined) {
|
|
1590
|
-
let data2 = data.descriptor;
|
|
1591
|
-
if (!(data2 && typeof data2 == "object" && !Array.isArray(data2))) {
|
|
1592
|
-
const err8 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/1/allOf/2/properties/descriptor/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1593
|
-
if (vErrors === null) {
|
|
1594
|
-
vErrors = [err8];
|
|
1595
|
-
}
|
|
1596
|
-
else {
|
|
1597
|
-
vErrors.push(err8);
|
|
1598
|
-
}
|
|
1599
|
-
errors++;
|
|
1600
|
-
}
|
|
1601
|
-
const _errs18 = errors;
|
|
1602
|
-
const _errs19 = errors;
|
|
1603
|
-
if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
|
|
1604
|
-
let missing4;
|
|
1605
|
-
if ((data2.protocolPath === undefined) && (missing4 = "protocolPath")) {
|
|
1606
|
-
const err9 = {};
|
|
1607
|
-
if (vErrors === null) {
|
|
1608
|
-
vErrors = [err9];
|
|
1609
|
-
}
|
|
1610
|
-
else {
|
|
1611
|
-
vErrors.push(err9);
|
|
1612
|
-
}
|
|
1613
|
-
errors++;
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
var valid7 = _errs19 === errors;
|
|
1617
|
-
if (valid7) {
|
|
1618
|
-
const err10 = { instancePath: instancePath + "/descriptor", schemaPath: "#/anyOf/1/allOf/2/properties/descriptor/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
1619
|
-
if (vErrors === null) {
|
|
1620
|
-
vErrors = [err10];
|
|
1621
|
-
}
|
|
1622
|
-
else {
|
|
1623
|
-
vErrors.push(err10);
|
|
1624
|
-
}
|
|
1625
|
-
errors++;
|
|
1626
|
-
}
|
|
1627
|
-
else {
|
|
1628
|
-
errors = _errs18;
|
|
1629
|
-
if (vErrors !== null) {
|
|
1630
|
-
if (_errs18) {
|
|
1631
|
-
vErrors.length = _errs18;
|
|
1632
|
-
}
|
|
1633
|
-
else {
|
|
1634
|
-
vErrors = null;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
var valid2 = _errs15 === errors;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
var _valid0 = _errs6 === errors;
|
|
1644
|
-
valid0 = valid0 || _valid0;
|
|
1645
|
-
if (_valid0) {
|
|
1646
|
-
if (props0 !== true) {
|
|
1647
|
-
props0 = props0 || {};
|
|
1648
|
-
props0.descriptor = true;
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
if (!valid0) {
|
|
1652
|
-
const err11 = { instancePath, schemaPath: "#/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
1653
|
-
if (vErrors === null) {
|
|
1654
|
-
vErrors = [err11];
|
|
1655
|
-
}
|
|
1656
|
-
else {
|
|
1657
|
-
vErrors.push(err11);
|
|
1658
|
-
}
|
|
1659
|
-
errors++;
|
|
1660
|
-
validate27.errors = vErrors;
|
|
1661
|
-
return false;
|
|
1662
|
-
}
|
|
1663
|
-
else {
|
|
1664
|
-
errors = _errs2;
|
|
1665
|
-
if (vErrors !== null) {
|
|
1666
|
-
if (_errs2) {
|
|
1667
|
-
vErrors.length = _errs2;
|
|
1668
|
-
}
|
|
1669
|
-
else {
|
|
1670
|
-
vErrors = null;
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
1437
|
if (errors === 0) {
|
|
1675
1438
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1676
|
-
let
|
|
1677
|
-
if ((data.descriptor === undefined) && (
|
|
1678
|
-
validate27.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty:
|
|
1439
|
+
let missing0;
|
|
1440
|
+
if (((data.descriptor === undefined) && (missing0 = "descriptor")) || ((data.contextId === undefined) && (missing0 = "contextId"))) {
|
|
1441
|
+
validate27.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
|
|
1679
1442
|
return false;
|
|
1680
1443
|
}
|
|
1681
1444
|
else {
|
|
1682
|
-
if (props0 !== true) {
|
|
1683
|
-
props0 = props0 || {};
|
|
1684
|
-
props0.recordId = true;
|
|
1685
|
-
props0.contextId = true;
|
|
1686
|
-
props0.attestation = true;
|
|
1687
|
-
props0.authorization = true;
|
|
1688
|
-
props0.encryption = true;
|
|
1689
|
-
props0.descriptor = true;
|
|
1690
|
-
}
|
|
1691
1445
|
if (data.recordId !== undefined) {
|
|
1692
|
-
const
|
|
1446
|
+
const _errs1 = errors;
|
|
1693
1447
|
if (typeof data.recordId !== "string") {
|
|
1694
1448
|
validate27.errors = [{ instancePath: instancePath + "/recordId", schemaPath: "#/properties/recordId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1695
1449
|
return false;
|
|
1696
1450
|
}
|
|
1697
|
-
var
|
|
1451
|
+
var valid0 = _errs1 === errors;
|
|
1698
1452
|
}
|
|
1699
1453
|
else {
|
|
1700
|
-
var
|
|
1454
|
+
var valid0 = true;
|
|
1701
1455
|
}
|
|
1702
|
-
if (
|
|
1456
|
+
if (valid0) {
|
|
1703
1457
|
if (data.contextId !== undefined) {
|
|
1704
|
-
let
|
|
1705
|
-
const
|
|
1706
|
-
if (errors ===
|
|
1707
|
-
if (typeof
|
|
1708
|
-
if (func1(
|
|
1458
|
+
let data1 = data.contextId;
|
|
1459
|
+
const _errs3 = errors;
|
|
1460
|
+
if (errors === _errs3) {
|
|
1461
|
+
if (typeof data1 === "string") {
|
|
1462
|
+
if (func1(data1) > 600) {
|
|
1709
1463
|
validate27.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/maxLength", keyword: "maxLength", params: { limit: 600 }, message: "must NOT have more than 600 characters" }];
|
|
1710
1464
|
return false;
|
|
1711
1465
|
}
|
|
1712
1466
|
else {
|
|
1713
|
-
if (!pattern7.test(
|
|
1467
|
+
if (!pattern7.test(data1)) {
|
|
1714
1468
|
validate27.errors = [{ instancePath: instancePath + "/contextId", schemaPath: "#/properties/contextId/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" }, message: "must match pattern \"" + "^[a-zA-Z0-9]+(/[a-zA-Z0-9]+)*$" + "\"" }];
|
|
1715
1469
|
return false;
|
|
1716
1470
|
}
|
|
@@ -1721,63 +1475,63 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1721
1475
|
return false;
|
|
1722
1476
|
}
|
|
1723
1477
|
}
|
|
1724
|
-
var
|
|
1478
|
+
var valid0 = _errs3 === errors;
|
|
1725
1479
|
}
|
|
1726
1480
|
else {
|
|
1727
|
-
var
|
|
1481
|
+
var valid0 = true;
|
|
1728
1482
|
}
|
|
1729
|
-
if (
|
|
1483
|
+
if (valid0) {
|
|
1730
1484
|
if (data.attestation !== undefined) {
|
|
1731
|
-
const
|
|
1485
|
+
const _errs5 = errors;
|
|
1732
1486
|
if (!(validate21(data.attestation, { instancePath: instancePath + "/attestation", parentData: data, parentDataProperty: "attestation", rootData, dynamicAnchors }))) {
|
|
1733
1487
|
vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
|
|
1734
1488
|
errors = vErrors.length;
|
|
1735
1489
|
}
|
|
1736
|
-
var
|
|
1490
|
+
var valid0 = _errs5 === errors;
|
|
1737
1491
|
}
|
|
1738
1492
|
else {
|
|
1739
|
-
var
|
|
1493
|
+
var valid0 = true;
|
|
1740
1494
|
}
|
|
1741
|
-
if (
|
|
1495
|
+
if (valid0) {
|
|
1742
1496
|
if (data.authorization !== undefined) {
|
|
1743
|
-
const
|
|
1497
|
+
const _errs6 = errors;
|
|
1744
1498
|
if (!(validate29(data.authorization, { instancePath: instancePath + "/authorization", parentData: data, parentDataProperty: "authorization", rootData, dynamicAnchors }))) {
|
|
1745
1499
|
vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
|
|
1746
1500
|
errors = vErrors.length;
|
|
1747
1501
|
}
|
|
1748
|
-
var
|
|
1502
|
+
var valid0 = _errs6 === errors;
|
|
1749
1503
|
}
|
|
1750
1504
|
else {
|
|
1751
|
-
var
|
|
1505
|
+
var valid0 = true;
|
|
1752
1506
|
}
|
|
1753
|
-
if (
|
|
1507
|
+
if (valid0) {
|
|
1754
1508
|
if (data.encryption !== undefined) {
|
|
1755
|
-
let
|
|
1756
|
-
const
|
|
1757
|
-
if (errors ===
|
|
1758
|
-
if (
|
|
1759
|
-
let
|
|
1760
|
-
if (((((
|
|
1761
|
-
validate27.errors = [{ instancePath: instancePath + "/encryption", schemaPath: "#/properties/encryption/required", keyword: "required", params: { missingProperty:
|
|
1509
|
+
let data4 = data.encryption;
|
|
1510
|
+
const _errs7 = errors;
|
|
1511
|
+
if (errors === _errs7) {
|
|
1512
|
+
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
1513
|
+
let missing1;
|
|
1514
|
+
if (((((data4.protected === undefined) && (missing1 = "protected")) || ((data4.iv === undefined) && (missing1 = "iv"))) || ((data4.tag === undefined) && (missing1 = "tag"))) || ((data4.recipients === undefined) && (missing1 = "recipients"))) {
|
|
1515
|
+
validate27.errors = [{ instancePath: instancePath + "/encryption", schemaPath: "#/properties/encryption/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
|
|
1762
1516
|
return false;
|
|
1763
1517
|
}
|
|
1764
1518
|
else {
|
|
1765
|
-
const
|
|
1766
|
-
for (const key0 in
|
|
1519
|
+
const _errs9 = errors;
|
|
1520
|
+
for (const key0 in data4) {
|
|
1767
1521
|
if (!((((key0 === "protected") || (key0 === "iv")) || (key0 === "tag")) || (key0 === "recipients"))) {
|
|
1768
1522
|
validate27.errors = [{ instancePath: instancePath + "/encryption", schemaPath: "#/properties/encryption/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
1769
1523
|
return false;
|
|
1770
1524
|
break;
|
|
1771
1525
|
}
|
|
1772
1526
|
}
|
|
1773
|
-
if (
|
|
1774
|
-
if (
|
|
1775
|
-
let
|
|
1776
|
-
const
|
|
1777
|
-
const
|
|
1778
|
-
if (errors ===
|
|
1779
|
-
if (typeof
|
|
1780
|
-
if (!pattern4.test(
|
|
1527
|
+
if (_errs9 === errors) {
|
|
1528
|
+
if (data4.protected !== undefined) {
|
|
1529
|
+
let data5 = data4.protected;
|
|
1530
|
+
const _errs10 = errors;
|
|
1531
|
+
const _errs11 = errors;
|
|
1532
|
+
if (errors === _errs11) {
|
|
1533
|
+
if (typeof data5 === "string") {
|
|
1534
|
+
if (!pattern4.test(data5)) {
|
|
1781
1535
|
validate27.errors = [{ instancePath: instancePath + "/encryption/protected", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
1782
1536
|
return false;
|
|
1783
1537
|
}
|
|
@@ -1787,19 +1541,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1787
1541
|
return false;
|
|
1788
1542
|
}
|
|
1789
1543
|
}
|
|
1790
|
-
var
|
|
1544
|
+
var valid1 = _errs10 === errors;
|
|
1791
1545
|
}
|
|
1792
1546
|
else {
|
|
1793
|
-
var
|
|
1547
|
+
var valid1 = true;
|
|
1794
1548
|
}
|
|
1795
|
-
if (
|
|
1796
|
-
if (
|
|
1797
|
-
let
|
|
1798
|
-
const
|
|
1799
|
-
const
|
|
1800
|
-
if (errors ===
|
|
1801
|
-
if (typeof
|
|
1802
|
-
if (!pattern4.test(
|
|
1549
|
+
if (valid1) {
|
|
1550
|
+
if (data4.iv !== undefined) {
|
|
1551
|
+
let data6 = data4.iv;
|
|
1552
|
+
const _errs13 = errors;
|
|
1553
|
+
const _errs14 = errors;
|
|
1554
|
+
if (errors === _errs14) {
|
|
1555
|
+
if (typeof data6 === "string") {
|
|
1556
|
+
if (!pattern4.test(data6)) {
|
|
1803
1557
|
validate27.errors = [{ instancePath: instancePath + "/encryption/iv", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
1804
1558
|
return false;
|
|
1805
1559
|
}
|
|
@@ -1809,19 +1563,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1809
1563
|
return false;
|
|
1810
1564
|
}
|
|
1811
1565
|
}
|
|
1812
|
-
var
|
|
1566
|
+
var valid1 = _errs13 === errors;
|
|
1813
1567
|
}
|
|
1814
1568
|
else {
|
|
1815
|
-
var
|
|
1569
|
+
var valid1 = true;
|
|
1816
1570
|
}
|
|
1817
|
-
if (
|
|
1818
|
-
if (
|
|
1819
|
-
let
|
|
1820
|
-
const
|
|
1821
|
-
const
|
|
1822
|
-
if (errors ===
|
|
1823
|
-
if (typeof
|
|
1824
|
-
if (!pattern4.test(
|
|
1571
|
+
if (valid1) {
|
|
1572
|
+
if (data4.tag !== undefined) {
|
|
1573
|
+
let data7 = data4.tag;
|
|
1574
|
+
const _errs16 = errors;
|
|
1575
|
+
const _errs17 = errors;
|
|
1576
|
+
if (errors === _errs17) {
|
|
1577
|
+
if (typeof data7 === "string") {
|
|
1578
|
+
if (!pattern4.test(data7)) {
|
|
1825
1579
|
validate27.errors = [{ instancePath: instancePath + "/encryption/tag", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
1826
1580
|
return false;
|
|
1827
1581
|
}
|
|
@@ -1831,115 +1585,115 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1831
1585
|
return false;
|
|
1832
1586
|
}
|
|
1833
1587
|
}
|
|
1834
|
-
var
|
|
1588
|
+
var valid1 = _errs16 === errors;
|
|
1835
1589
|
}
|
|
1836
1590
|
else {
|
|
1837
|
-
var
|
|
1838
|
-
}
|
|
1839
|
-
if (
|
|
1840
|
-
if (
|
|
1841
|
-
let
|
|
1842
|
-
const
|
|
1843
|
-
if (errors ===
|
|
1844
|
-
if (Array.isArray(
|
|
1845
|
-
if (
|
|
1591
|
+
var valid1 = true;
|
|
1592
|
+
}
|
|
1593
|
+
if (valid1) {
|
|
1594
|
+
if (data4.recipients !== undefined) {
|
|
1595
|
+
let data8 = data4.recipients;
|
|
1596
|
+
const _errs19 = errors;
|
|
1597
|
+
if (errors === _errs19) {
|
|
1598
|
+
if (Array.isArray(data8)) {
|
|
1599
|
+
if (data8.length < 1) {
|
|
1846
1600
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients", schemaPath: "#/properties/encryption/properties/recipients/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" }];
|
|
1847
1601
|
return false;
|
|
1848
1602
|
}
|
|
1849
1603
|
else {
|
|
1850
|
-
var
|
|
1851
|
-
const len0 =
|
|
1604
|
+
var valid5 = true;
|
|
1605
|
+
const len0 = data8.length;
|
|
1852
1606
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
1853
|
-
let
|
|
1854
|
-
const
|
|
1855
|
-
if (errors ===
|
|
1856
|
-
if (
|
|
1857
|
-
let
|
|
1858
|
-
if (((
|
|
1859
|
-
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/required", keyword: "required", params: { missingProperty:
|
|
1607
|
+
let data9 = data8[i0];
|
|
1608
|
+
const _errs21 = errors;
|
|
1609
|
+
if (errors === _errs21) {
|
|
1610
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
1611
|
+
let missing2;
|
|
1612
|
+
if (((data9.header === undefined) && (missing2 = "header")) || ((data9.encrypted_key === undefined) && (missing2 = "encrypted_key"))) {
|
|
1613
|
+
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
|
|
1860
1614
|
return false;
|
|
1861
1615
|
}
|
|
1862
1616
|
else {
|
|
1863
|
-
const
|
|
1864
|
-
for (const key1 in
|
|
1617
|
+
const _errs23 = errors;
|
|
1618
|
+
for (const key1 in data9) {
|
|
1865
1619
|
if (!((key1 === "header") || (key1 === "encrypted_key"))) {
|
|
1866
1620
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0, schemaPath: "#/properties/encryption/properties/recipients/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
1867
1621
|
return false;
|
|
1868
1622
|
break;
|
|
1869
1623
|
}
|
|
1870
1624
|
}
|
|
1871
|
-
if (
|
|
1872
|
-
if (
|
|
1873
|
-
let
|
|
1874
|
-
const
|
|
1875
|
-
if (errors ===
|
|
1876
|
-
if (
|
|
1877
|
-
let
|
|
1878
|
-
if ((((
|
|
1879
|
-
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/required", keyword: "required", params: { missingProperty:
|
|
1625
|
+
if (_errs23 === errors) {
|
|
1626
|
+
if (data9.header !== undefined) {
|
|
1627
|
+
let data10 = data9.header;
|
|
1628
|
+
const _errs24 = errors;
|
|
1629
|
+
if (errors === _errs24) {
|
|
1630
|
+
if (data10 && typeof data10 == "object" && !Array.isArray(data10)) {
|
|
1631
|
+
let missing3;
|
|
1632
|
+
if ((((data10.kid === undefined) && (missing3 = "kid")) || ((data10.epk === undefined) && (missing3 = "epk"))) || ((data10.derivationScheme === undefined) && (missing3 = "derivationScheme"))) {
|
|
1633
|
+
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
1880
1634
|
return false;
|
|
1881
1635
|
}
|
|
1882
1636
|
else {
|
|
1883
|
-
const
|
|
1884
|
-
for (const key2 in
|
|
1637
|
+
const _errs26 = errors;
|
|
1638
|
+
for (const key2 in data10) {
|
|
1885
1639
|
if (!((((key2 === "kid") || (key2 === "epk")) || (key2 === "derivationScheme")) || (key2 === "derivedPublicKey"))) {
|
|
1886
1640
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" }];
|
|
1887
1641
|
return false;
|
|
1888
1642
|
break;
|
|
1889
1643
|
}
|
|
1890
1644
|
}
|
|
1891
|
-
if (
|
|
1892
|
-
if (
|
|
1893
|
-
const
|
|
1894
|
-
if (typeof
|
|
1645
|
+
if (_errs26 === errors) {
|
|
1646
|
+
if (data10.kid !== undefined) {
|
|
1647
|
+
const _errs27 = errors;
|
|
1648
|
+
if (typeof data10.kid !== "string") {
|
|
1895
1649
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/kid", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/kid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1896
1650
|
return false;
|
|
1897
1651
|
}
|
|
1898
|
-
var
|
|
1652
|
+
var valid7 = _errs27 === errors;
|
|
1899
1653
|
}
|
|
1900
1654
|
else {
|
|
1901
|
-
var
|
|
1655
|
+
var valid7 = true;
|
|
1902
1656
|
}
|
|
1903
|
-
if (
|
|
1904
|
-
if (
|
|
1905
|
-
const
|
|
1906
|
-
if (!(validate32(
|
|
1657
|
+
if (valid7) {
|
|
1658
|
+
if (data10.epk !== undefined) {
|
|
1659
|
+
const _errs29 = errors;
|
|
1660
|
+
if (!(validate32(data10.epk, { instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/epk", parentData: data10, parentDataProperty: "epk", rootData, dynamicAnchors }))) {
|
|
1907
1661
|
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
1908
1662
|
errors = vErrors.length;
|
|
1909
1663
|
}
|
|
1910
|
-
var
|
|
1664
|
+
var valid7 = _errs29 === errors;
|
|
1911
1665
|
}
|
|
1912
1666
|
else {
|
|
1913
|
-
var
|
|
1667
|
+
var valid7 = true;
|
|
1914
1668
|
}
|
|
1915
|
-
if (
|
|
1916
|
-
if (
|
|
1917
|
-
let
|
|
1918
|
-
const
|
|
1919
|
-
if (typeof
|
|
1669
|
+
if (valid7) {
|
|
1670
|
+
if (data10.derivationScheme !== undefined) {
|
|
1671
|
+
let data13 = data10.derivationScheme;
|
|
1672
|
+
const _errs30 = errors;
|
|
1673
|
+
if (typeof data13 !== "string") {
|
|
1920
1674
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivationScheme", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/derivationScheme/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
1921
1675
|
return false;
|
|
1922
1676
|
}
|
|
1923
|
-
if (!((
|
|
1677
|
+
if (!((data13 === "protocolContext") || (data13 === "protocolPath"))) {
|
|
1924
1678
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivationScheme", schemaPath: "#/properties/encryption/properties/recipients/items/properties/header/properties/derivationScheme/enum", keyword: "enum", params: { allowedValues: schema39.properties.encryption.properties.recipients.items.properties.header.properties.derivationScheme.enum }, message: "must be equal to one of the allowed values" }];
|
|
1925
1679
|
return false;
|
|
1926
1680
|
}
|
|
1927
|
-
var
|
|
1681
|
+
var valid7 = _errs30 === errors;
|
|
1928
1682
|
}
|
|
1929
1683
|
else {
|
|
1930
|
-
var
|
|
1684
|
+
var valid7 = true;
|
|
1931
1685
|
}
|
|
1932
|
-
if (
|
|
1933
|
-
if (
|
|
1934
|
-
const
|
|
1935
|
-
if (!(validate32(
|
|
1686
|
+
if (valid7) {
|
|
1687
|
+
if (data10.derivedPublicKey !== undefined) {
|
|
1688
|
+
const _errs32 = errors;
|
|
1689
|
+
if (!(validate32(data10.derivedPublicKey, { instancePath: instancePath + "/encryption/recipients/" + i0 + "/header/derivedPublicKey", parentData: data10, parentDataProperty: "derivedPublicKey", rootData, dynamicAnchors }))) {
|
|
1936
1690
|
vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
|
|
1937
1691
|
errors = vErrors.length;
|
|
1938
1692
|
}
|
|
1939
|
-
var
|
|
1693
|
+
var valid7 = _errs32 === errors;
|
|
1940
1694
|
}
|
|
1941
1695
|
else {
|
|
1942
|
-
var
|
|
1696
|
+
var valid7 = true;
|
|
1943
1697
|
}
|
|
1944
1698
|
}
|
|
1945
1699
|
}
|
|
@@ -1952,19 +1706,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1952
1706
|
return false;
|
|
1953
1707
|
}
|
|
1954
1708
|
}
|
|
1955
|
-
var
|
|
1709
|
+
var valid6 = _errs24 === errors;
|
|
1956
1710
|
}
|
|
1957
1711
|
else {
|
|
1958
|
-
var
|
|
1712
|
+
var valid6 = true;
|
|
1959
1713
|
}
|
|
1960
|
-
if (
|
|
1961
|
-
if (
|
|
1962
|
-
let
|
|
1963
|
-
const
|
|
1964
|
-
const
|
|
1965
|
-
if (errors ===
|
|
1966
|
-
if (typeof
|
|
1967
|
-
if (!pattern4.test(
|
|
1714
|
+
if (valid6) {
|
|
1715
|
+
if (data9.encrypted_key !== undefined) {
|
|
1716
|
+
let data15 = data9.encrypted_key;
|
|
1717
|
+
const _errs33 = errors;
|
|
1718
|
+
const _errs34 = errors;
|
|
1719
|
+
if (errors === _errs34) {
|
|
1720
|
+
if (typeof data15 === "string") {
|
|
1721
|
+
if (!pattern4.test(data15)) {
|
|
1968
1722
|
validate27.errors = [{ instancePath: instancePath + "/encryption/recipients/" + i0 + "/encrypted_key", schemaPath: "https://identity.foundation/dwn/json-schemas/defs.json#/$defs/base64url/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: "must match pattern \"" + "^[A-Za-z0-9_-]+$" + "\"" }];
|
|
1969
1723
|
return false;
|
|
1970
1724
|
}
|
|
@@ -1974,10 +1728,10 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1974
1728
|
return false;
|
|
1975
1729
|
}
|
|
1976
1730
|
}
|
|
1977
|
-
var
|
|
1731
|
+
var valid6 = _errs33 === errors;
|
|
1978
1732
|
}
|
|
1979
1733
|
else {
|
|
1980
|
-
var
|
|
1734
|
+
var valid6 = true;
|
|
1981
1735
|
}
|
|
1982
1736
|
}
|
|
1983
1737
|
}
|
|
@@ -1988,8 +1742,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1988
1742
|
return false;
|
|
1989
1743
|
}
|
|
1990
1744
|
}
|
|
1991
|
-
var
|
|
1992
|
-
if (!
|
|
1745
|
+
var valid5 = _errs21 === errors;
|
|
1746
|
+
if (!valid5) {
|
|
1993
1747
|
break;
|
|
1994
1748
|
}
|
|
1995
1749
|
}
|
|
@@ -2000,10 +1754,10 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2000
1754
|
return false;
|
|
2001
1755
|
}
|
|
2002
1756
|
}
|
|
2003
|
-
var
|
|
1757
|
+
var valid1 = _errs19 === errors;
|
|
2004
1758
|
}
|
|
2005
1759
|
else {
|
|
2006
|
-
var
|
|
1760
|
+
var valid1 = true;
|
|
2007
1761
|
}
|
|
2008
1762
|
}
|
|
2009
1763
|
}
|
|
@@ -2016,308 +1770,308 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2016
1770
|
return false;
|
|
2017
1771
|
}
|
|
2018
1772
|
}
|
|
2019
|
-
var
|
|
1773
|
+
var valid0 = _errs7 === errors;
|
|
2020
1774
|
}
|
|
2021
1775
|
else {
|
|
2022
|
-
var
|
|
1776
|
+
var valid0 = true;
|
|
2023
1777
|
}
|
|
2024
|
-
if (
|
|
1778
|
+
if (valid0) {
|
|
2025
1779
|
if (data.descriptor !== undefined) {
|
|
2026
|
-
let
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
let
|
|
2030
|
-
const
|
|
2031
|
-
if (
|
|
2032
|
-
let
|
|
2033
|
-
if (((
|
|
2034
|
-
const
|
|
1780
|
+
let data16 = data.descriptor;
|
|
1781
|
+
const _errs36 = errors;
|
|
1782
|
+
const _errs40 = errors;
|
|
1783
|
+
let valid10 = false;
|
|
1784
|
+
const _errs41 = errors;
|
|
1785
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1786
|
+
let missing4;
|
|
1787
|
+
if (((data16.published === undefined) && (missing4 = "published")) || ((data16.datePublished === undefined) && (missing4 = "datePublished"))) {
|
|
1788
|
+
const err0 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
|
|
2035
1789
|
if (vErrors === null) {
|
|
2036
|
-
vErrors = [
|
|
1790
|
+
vErrors = [err0];
|
|
2037
1791
|
}
|
|
2038
1792
|
else {
|
|
2039
|
-
vErrors.push(
|
|
1793
|
+
vErrors.push(err0);
|
|
2040
1794
|
}
|
|
2041
1795
|
errors++;
|
|
2042
1796
|
}
|
|
2043
1797
|
else {
|
|
2044
|
-
if (
|
|
2045
|
-
let
|
|
2046
|
-
if (typeof
|
|
2047
|
-
const
|
|
1798
|
+
if (data16.published !== undefined) {
|
|
1799
|
+
let data17 = data16.published;
|
|
1800
|
+
if (typeof data17 !== "boolean") {
|
|
1801
|
+
const err1 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
2048
1802
|
if (vErrors === null) {
|
|
2049
|
-
vErrors = [
|
|
1803
|
+
vErrors = [err1];
|
|
2050
1804
|
}
|
|
2051
1805
|
else {
|
|
2052
|
-
vErrors.push(
|
|
1806
|
+
vErrors.push(err1);
|
|
2053
1807
|
}
|
|
2054
1808
|
errors++;
|
|
2055
1809
|
}
|
|
2056
|
-
if (!(
|
|
2057
|
-
const
|
|
1810
|
+
if (!(data17 === true)) {
|
|
1811
|
+
const err2 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/0/properties/published/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.allOf[0].anyOf[0].properties.published.enum }, message: "must be equal to one of the allowed values" };
|
|
2058
1812
|
if (vErrors === null) {
|
|
2059
|
-
vErrors = [
|
|
1813
|
+
vErrors = [err2];
|
|
2060
1814
|
}
|
|
2061
1815
|
else {
|
|
2062
|
-
vErrors.push(
|
|
1816
|
+
vErrors.push(err2);
|
|
2063
1817
|
}
|
|
2064
1818
|
errors++;
|
|
2065
1819
|
}
|
|
2066
1820
|
}
|
|
2067
1821
|
}
|
|
2068
1822
|
}
|
|
2069
|
-
var
|
|
2070
|
-
|
|
2071
|
-
if (
|
|
2072
|
-
var
|
|
2073
|
-
|
|
1823
|
+
var _valid0 = _errs41 === errors;
|
|
1824
|
+
valid10 = valid10 || _valid0;
|
|
1825
|
+
if (_valid0) {
|
|
1826
|
+
var props2 = {};
|
|
1827
|
+
props2.published = true;
|
|
2074
1828
|
}
|
|
2075
|
-
const
|
|
2076
|
-
const
|
|
2077
|
-
const
|
|
2078
|
-
if (
|
|
2079
|
-
let
|
|
2080
|
-
if ((
|
|
2081
|
-
const
|
|
1829
|
+
const _errs44 = errors;
|
|
1830
|
+
const _errs45 = errors;
|
|
1831
|
+
const _errs46 = errors;
|
|
1832
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1833
|
+
let missing5;
|
|
1834
|
+
if ((data16.datePublished === undefined) && (missing5 = "datePublished")) {
|
|
1835
|
+
const err3 = {};
|
|
2082
1836
|
if (vErrors === null) {
|
|
2083
|
-
vErrors = [
|
|
1837
|
+
vErrors = [err3];
|
|
2084
1838
|
}
|
|
2085
1839
|
else {
|
|
2086
|
-
vErrors.push(
|
|
1840
|
+
vErrors.push(err3);
|
|
2087
1841
|
}
|
|
2088
1842
|
errors++;
|
|
2089
1843
|
}
|
|
2090
1844
|
}
|
|
2091
|
-
var
|
|
2092
|
-
if (
|
|
2093
|
-
const
|
|
1845
|
+
var valid12 = _errs46 === errors;
|
|
1846
|
+
if (valid12) {
|
|
1847
|
+
const err4 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2094
1848
|
if (vErrors === null) {
|
|
2095
|
-
vErrors = [
|
|
1849
|
+
vErrors = [err4];
|
|
2096
1850
|
}
|
|
2097
1851
|
else {
|
|
2098
|
-
vErrors.push(
|
|
1852
|
+
vErrors.push(err4);
|
|
2099
1853
|
}
|
|
2100
1854
|
errors++;
|
|
2101
1855
|
}
|
|
2102
1856
|
else {
|
|
2103
|
-
errors =
|
|
1857
|
+
errors = _errs45;
|
|
2104
1858
|
if (vErrors !== null) {
|
|
2105
|
-
if (
|
|
2106
|
-
vErrors.length =
|
|
1859
|
+
if (_errs45) {
|
|
1860
|
+
vErrors.length = _errs45;
|
|
2107
1861
|
}
|
|
2108
1862
|
else {
|
|
2109
1863
|
vErrors = null;
|
|
2110
1864
|
}
|
|
2111
1865
|
}
|
|
2112
1866
|
}
|
|
2113
|
-
if (errors ===
|
|
2114
|
-
if (
|
|
2115
|
-
if (
|
|
2116
|
-
let
|
|
2117
|
-
if (typeof
|
|
2118
|
-
const
|
|
1867
|
+
if (errors === _errs44) {
|
|
1868
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1869
|
+
if (data16.published !== undefined) {
|
|
1870
|
+
let data18 = data16.published;
|
|
1871
|
+
if (typeof data18 !== "boolean") {
|
|
1872
|
+
const err5 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
2119
1873
|
if (vErrors === null) {
|
|
2120
|
-
vErrors = [
|
|
1874
|
+
vErrors = [err5];
|
|
2121
1875
|
}
|
|
2122
1876
|
else {
|
|
2123
|
-
vErrors.push(
|
|
1877
|
+
vErrors.push(err5);
|
|
2124
1878
|
}
|
|
2125
1879
|
errors++;
|
|
2126
1880
|
}
|
|
2127
|
-
if (!(
|
|
2128
|
-
const
|
|
1881
|
+
if (!(data18 === false)) {
|
|
1882
|
+
const err6 = { instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/allOf/0/anyOf/1/properties/published/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.allOf[0].anyOf[1].properties.published.enum }, message: "must be equal to one of the allowed values" };
|
|
2129
1883
|
if (vErrors === null) {
|
|
2130
|
-
vErrors = [
|
|
1884
|
+
vErrors = [err6];
|
|
2131
1885
|
}
|
|
2132
1886
|
else {
|
|
2133
|
-
vErrors.push(
|
|
1887
|
+
vErrors.push(err6);
|
|
2134
1888
|
}
|
|
2135
1889
|
errors++;
|
|
2136
1890
|
}
|
|
2137
1891
|
}
|
|
2138
1892
|
}
|
|
2139
1893
|
}
|
|
2140
|
-
var
|
|
2141
|
-
|
|
2142
|
-
if (
|
|
2143
|
-
if (
|
|
2144
|
-
|
|
2145
|
-
|
|
1894
|
+
var _valid0 = _errs44 === errors;
|
|
1895
|
+
valid10 = valid10 || _valid0;
|
|
1896
|
+
if (_valid0) {
|
|
1897
|
+
if (props2 !== true) {
|
|
1898
|
+
props2 = props2 || {};
|
|
1899
|
+
props2.published = true;
|
|
2146
1900
|
}
|
|
2147
1901
|
}
|
|
2148
|
-
const
|
|
2149
|
-
const
|
|
2150
|
-
const
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
let
|
|
2154
|
-
if ((
|
|
2155
|
-
const
|
|
1902
|
+
const _errs49 = errors;
|
|
1903
|
+
const _errs50 = errors;
|
|
1904
|
+
const _errs51 = errors;
|
|
1905
|
+
const _errs52 = errors;
|
|
1906
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1907
|
+
let missing6;
|
|
1908
|
+
if ((data16.published === undefined) && (missing6 = "published")) {
|
|
1909
|
+
const err7 = {};
|
|
2156
1910
|
if (vErrors === null) {
|
|
2157
|
-
vErrors = [
|
|
1911
|
+
vErrors = [err7];
|
|
2158
1912
|
}
|
|
2159
1913
|
else {
|
|
2160
|
-
vErrors.push(
|
|
1914
|
+
vErrors.push(err7);
|
|
2161
1915
|
}
|
|
2162
1916
|
errors++;
|
|
2163
1917
|
}
|
|
2164
1918
|
}
|
|
2165
|
-
var
|
|
2166
|
-
if (
|
|
2167
|
-
const
|
|
1919
|
+
var valid15 = _errs52 === errors;
|
|
1920
|
+
if (valid15) {
|
|
1921
|
+
const err8 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/2/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2168
1922
|
if (vErrors === null) {
|
|
2169
|
-
vErrors = [
|
|
1923
|
+
vErrors = [err8];
|
|
2170
1924
|
}
|
|
2171
1925
|
else {
|
|
2172
|
-
vErrors.push(
|
|
1926
|
+
vErrors.push(err8);
|
|
2173
1927
|
}
|
|
2174
1928
|
errors++;
|
|
2175
1929
|
}
|
|
2176
1930
|
else {
|
|
2177
|
-
errors =
|
|
1931
|
+
errors = _errs51;
|
|
2178
1932
|
if (vErrors !== null) {
|
|
2179
|
-
if (
|
|
2180
|
-
vErrors.length =
|
|
1933
|
+
if (_errs51) {
|
|
1934
|
+
vErrors.length = _errs51;
|
|
2181
1935
|
}
|
|
2182
1936
|
else {
|
|
2183
1937
|
vErrors = null;
|
|
2184
1938
|
}
|
|
2185
1939
|
}
|
|
2186
1940
|
}
|
|
2187
|
-
var
|
|
2188
|
-
if (
|
|
2189
|
-
const
|
|
2190
|
-
const
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2193
|
-
let
|
|
2194
|
-
if ((
|
|
2195
|
-
const
|
|
1941
|
+
var valid14 = _errs50 === errors;
|
|
1942
|
+
if (valid14) {
|
|
1943
|
+
const _errs53 = errors;
|
|
1944
|
+
const _errs54 = errors;
|
|
1945
|
+
const _errs55 = errors;
|
|
1946
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
1947
|
+
let missing7;
|
|
1948
|
+
if ((data16.datePublished === undefined) && (missing7 = "datePublished")) {
|
|
1949
|
+
const err9 = {};
|
|
2196
1950
|
if (vErrors === null) {
|
|
2197
|
-
vErrors = [
|
|
1951
|
+
vErrors = [err9];
|
|
2198
1952
|
}
|
|
2199
1953
|
else {
|
|
2200
|
-
vErrors.push(
|
|
1954
|
+
vErrors.push(err9);
|
|
2201
1955
|
}
|
|
2202
1956
|
errors++;
|
|
2203
1957
|
}
|
|
2204
1958
|
}
|
|
2205
|
-
var
|
|
2206
|
-
if (
|
|
2207
|
-
const
|
|
1959
|
+
var valid16 = _errs55 === errors;
|
|
1960
|
+
if (valid16) {
|
|
1961
|
+
const err10 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf/2/allOf/1/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2208
1962
|
if (vErrors === null) {
|
|
2209
|
-
vErrors = [
|
|
1963
|
+
vErrors = [err10];
|
|
2210
1964
|
}
|
|
2211
1965
|
else {
|
|
2212
|
-
vErrors.push(
|
|
1966
|
+
vErrors.push(err10);
|
|
2213
1967
|
}
|
|
2214
1968
|
errors++;
|
|
2215
1969
|
}
|
|
2216
1970
|
else {
|
|
2217
|
-
errors =
|
|
1971
|
+
errors = _errs54;
|
|
2218
1972
|
if (vErrors !== null) {
|
|
2219
|
-
if (
|
|
2220
|
-
vErrors.length =
|
|
1973
|
+
if (_errs54) {
|
|
1974
|
+
vErrors.length = _errs54;
|
|
2221
1975
|
}
|
|
2222
1976
|
else {
|
|
2223
1977
|
vErrors = null;
|
|
2224
1978
|
}
|
|
2225
1979
|
}
|
|
2226
1980
|
}
|
|
2227
|
-
var
|
|
1981
|
+
var valid14 = _errs53 === errors;
|
|
2228
1982
|
}
|
|
2229
|
-
var
|
|
2230
|
-
|
|
2231
|
-
if (!
|
|
2232
|
-
const
|
|
1983
|
+
var _valid0 = _errs49 === errors;
|
|
1984
|
+
valid10 = valid10 || _valid0;
|
|
1985
|
+
if (!valid10) {
|
|
1986
|
+
const err11 = { instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/allOf/0/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
2233
1987
|
if (vErrors === null) {
|
|
2234
|
-
vErrors = [
|
|
1988
|
+
vErrors = [err11];
|
|
2235
1989
|
}
|
|
2236
1990
|
else {
|
|
2237
|
-
vErrors.push(
|
|
1991
|
+
vErrors.push(err11);
|
|
2238
1992
|
}
|
|
2239
1993
|
errors++;
|
|
2240
1994
|
validate27.errors = vErrors;
|
|
2241
1995
|
return false;
|
|
2242
1996
|
}
|
|
2243
1997
|
else {
|
|
2244
|
-
errors =
|
|
1998
|
+
errors = _errs40;
|
|
2245
1999
|
if (vErrors !== null) {
|
|
2246
|
-
if (
|
|
2247
|
-
vErrors.length =
|
|
2000
|
+
if (_errs40) {
|
|
2001
|
+
vErrors.length = _errs40;
|
|
2248
2002
|
}
|
|
2249
2003
|
else {
|
|
2250
2004
|
vErrors = null;
|
|
2251
2005
|
}
|
|
2252
2006
|
}
|
|
2253
2007
|
}
|
|
2254
|
-
if (errors ===
|
|
2255
|
-
if (
|
|
2256
|
-
let
|
|
2257
|
-
if ((((((((
|
|
2258
|
-
validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty:
|
|
2008
|
+
if (errors === _errs36) {
|
|
2009
|
+
if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
|
|
2010
|
+
let missing8;
|
|
2011
|
+
if ((((((((((data16.interface === undefined) && (missing8 = "interface")) || ((data16.method === undefined) && (missing8 = "method"))) || ((data16.protocol === undefined) && (missing8 = "protocol"))) || ((data16.protocolPath === undefined) && (missing8 = "protocolPath"))) || ((data16.dataCid === undefined) && (missing8 = "dataCid"))) || ((data16.dataSize === undefined) && (missing8 = "dataSize"))) || ((data16.dateCreated === undefined) && (missing8 = "dateCreated"))) || ((data16.messageTimestamp === undefined) && (missing8 = "messageTimestamp"))) || ((data16.dataFormat === undefined) && (missing8 = "dataFormat"))) {
|
|
2012
|
+
validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/required", keyword: "required", params: { missingProperty: missing8 }, message: "must have required property '" + missing8 + "'" }];
|
|
2259
2013
|
return false;
|
|
2260
2014
|
}
|
|
2261
2015
|
else {
|
|
2262
|
-
const
|
|
2263
|
-
for (const key3 in
|
|
2016
|
+
const _errs56 = errors;
|
|
2017
|
+
for (const key3 in data16) {
|
|
2264
2018
|
if (!(func2.call(schema39.properties.descriptor.properties, key3))) {
|
|
2265
2019
|
validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" }];
|
|
2266
2020
|
return false;
|
|
2267
2021
|
break;
|
|
2268
2022
|
}
|
|
2269
2023
|
}
|
|
2270
|
-
if (
|
|
2271
|
-
let
|
|
2272
|
-
if (
|
|
2024
|
+
if (_errs56 === errors) {
|
|
2025
|
+
let missing9;
|
|
2026
|
+
if (data16.parentId !== undefined && ((data16.protocol === undefined) && (missing9 = "protocol"))) {
|
|
2273
2027
|
validate27.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/dependencies", keyword: "dependencies", params: { property: "parentId",
|
|
2274
|
-
missingProperty:
|
|
2028
|
+
missingProperty: missing9,
|
|
2275
2029
|
depsCount: 1,
|
|
2276
2030
|
deps: "protocol" }, message: "must have property protocol when property parentId is present" }];
|
|
2277
2031
|
return false;
|
|
2278
2032
|
}
|
|
2279
2033
|
else {
|
|
2280
|
-
if (
|
|
2281
|
-
let
|
|
2282
|
-
const
|
|
2283
|
-
if (typeof
|
|
2034
|
+
if (data16.interface !== undefined) {
|
|
2035
|
+
let data19 = data16.interface;
|
|
2036
|
+
const _errs57 = errors;
|
|
2037
|
+
if (typeof data19 !== "string") {
|
|
2284
2038
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2285
2039
|
return false;
|
|
2286
2040
|
}
|
|
2287
|
-
if (!(
|
|
2041
|
+
if (!(data19 === "Records")) {
|
|
2288
2042
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/interface", schemaPath: "#/properties/descriptor/properties/interface/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.properties.interface.enum }, message: "must be equal to one of the allowed values" }];
|
|
2289
2043
|
return false;
|
|
2290
2044
|
}
|
|
2291
|
-
var
|
|
2045
|
+
var valid18 = _errs57 === errors;
|
|
2292
2046
|
}
|
|
2293
2047
|
else {
|
|
2294
|
-
var
|
|
2048
|
+
var valid18 = true;
|
|
2295
2049
|
}
|
|
2296
|
-
if (
|
|
2297
|
-
if (
|
|
2298
|
-
let
|
|
2299
|
-
const
|
|
2300
|
-
if (typeof
|
|
2050
|
+
if (valid18) {
|
|
2051
|
+
if (data16.method !== undefined) {
|
|
2052
|
+
let data20 = data16.method;
|
|
2053
|
+
const _errs59 = errors;
|
|
2054
|
+
if (typeof data20 !== "string") {
|
|
2301
2055
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2302
2056
|
return false;
|
|
2303
2057
|
}
|
|
2304
|
-
if (!(
|
|
2058
|
+
if (!(data20 === "Write")) {
|
|
2305
2059
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/method", schemaPath: "#/properties/descriptor/properties/method/enum", keyword: "enum", params: { allowedValues: schema39.properties.descriptor.properties.method.enum }, message: "must be equal to one of the allowed values" }];
|
|
2306
2060
|
return false;
|
|
2307
2061
|
}
|
|
2308
|
-
var
|
|
2062
|
+
var valid18 = _errs59 === errors;
|
|
2309
2063
|
}
|
|
2310
2064
|
else {
|
|
2311
|
-
var
|
|
2065
|
+
var valid18 = true;
|
|
2312
2066
|
}
|
|
2313
|
-
if (
|
|
2314
|
-
if (
|
|
2315
|
-
let
|
|
2316
|
-
const
|
|
2317
|
-
const
|
|
2318
|
-
if (errors ===
|
|
2319
|
-
if (typeof
|
|
2320
|
-
if (!pattern12.test(
|
|
2067
|
+
if (valid18) {
|
|
2068
|
+
if (data16.recipient !== undefined) {
|
|
2069
|
+
let data21 = data16.recipient;
|
|
2070
|
+
const _errs61 = errors;
|
|
2071
|
+
const _errs62 = errors;
|
|
2072
|
+
if (errors === _errs62) {
|
|
2073
|
+
if (typeof data21 === "string") {
|
|
2074
|
+
if (!pattern12.test(data21)) {
|
|
2321
2075
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/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_.:%-]*)*)(/[^#?]*)?([?][^#]*)?(#.*)?$" + "\"" }];
|
|
2322
2076
|
return false;
|
|
2323
2077
|
}
|
|
@@ -2327,30 +2081,30 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2327
2081
|
return false;
|
|
2328
2082
|
}
|
|
2329
2083
|
}
|
|
2330
|
-
var
|
|
2084
|
+
var valid18 = _errs61 === errors;
|
|
2331
2085
|
}
|
|
2332
2086
|
else {
|
|
2333
|
-
var
|
|
2087
|
+
var valid18 = true;
|
|
2334
2088
|
}
|
|
2335
|
-
if (
|
|
2336
|
-
if (
|
|
2337
|
-
const
|
|
2338
|
-
if (typeof
|
|
2089
|
+
if (valid18) {
|
|
2090
|
+
if (data16.protocol !== undefined) {
|
|
2091
|
+
const _errs64 = errors;
|
|
2092
|
+
if (typeof data16.protocol !== "string") {
|
|
2339
2093
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/protocol", schemaPath: "#/properties/descriptor/properties/protocol/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2340
2094
|
return false;
|
|
2341
2095
|
}
|
|
2342
|
-
var
|
|
2096
|
+
var valid18 = _errs64 === errors;
|
|
2343
2097
|
}
|
|
2344
2098
|
else {
|
|
2345
|
-
var
|
|
2099
|
+
var valid18 = true;
|
|
2346
2100
|
}
|
|
2347
|
-
if (
|
|
2348
|
-
if (
|
|
2349
|
-
let
|
|
2350
|
-
const
|
|
2351
|
-
if (errors ===
|
|
2352
|
-
if (typeof
|
|
2353
|
-
if (!pattern13.test(
|
|
2101
|
+
if (valid18) {
|
|
2102
|
+
if (data16.protocolPath !== undefined) {
|
|
2103
|
+
let data23 = data16.protocolPath;
|
|
2104
|
+
const _errs66 = errors;
|
|
2105
|
+
if (errors === _errs66) {
|
|
2106
|
+
if (typeof data23 === "string") {
|
|
2107
|
+
if (!pattern13.test(data23)) {
|
|
2354
2108
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/protocolPath", schemaPath: "#/properties/descriptor/properties/protocolPath/pattern", keyword: "pattern", params: { pattern: "^[a-zA-Z]+(/[a-zA-Z]+)*$" }, message: "must match pattern \"" + "^[a-zA-Z]+(/[a-zA-Z]+)*$" + "\"" }];
|
|
2355
2109
|
return false;
|
|
2356
2110
|
}
|
|
@@ -2360,144 +2114,144 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2360
2114
|
return false;
|
|
2361
2115
|
}
|
|
2362
2116
|
}
|
|
2363
|
-
var
|
|
2117
|
+
var valid18 = _errs66 === errors;
|
|
2364
2118
|
}
|
|
2365
2119
|
else {
|
|
2366
|
-
var
|
|
2120
|
+
var valid18 = true;
|
|
2367
2121
|
}
|
|
2368
|
-
if (
|
|
2369
|
-
if (
|
|
2370
|
-
const
|
|
2371
|
-
if (typeof
|
|
2122
|
+
if (valid18) {
|
|
2123
|
+
if (data16.schema !== undefined) {
|
|
2124
|
+
const _errs68 = errors;
|
|
2125
|
+
if (typeof data16.schema !== "string") {
|
|
2372
2126
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/schema", schemaPath: "#/properties/descriptor/properties/schema/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2373
2127
|
return false;
|
|
2374
2128
|
}
|
|
2375
|
-
var
|
|
2129
|
+
var valid18 = _errs68 === errors;
|
|
2376
2130
|
}
|
|
2377
2131
|
else {
|
|
2378
|
-
var
|
|
2132
|
+
var valid18 = true;
|
|
2379
2133
|
}
|
|
2380
|
-
if (
|
|
2381
|
-
if (
|
|
2382
|
-
let
|
|
2383
|
-
const
|
|
2384
|
-
if (errors ===
|
|
2385
|
-
if (
|
|
2386
|
-
if (Object.keys(
|
|
2134
|
+
if (valid18) {
|
|
2135
|
+
if (data16.tags !== undefined) {
|
|
2136
|
+
let data25 = data16.tags;
|
|
2137
|
+
const _errs70 = errors;
|
|
2138
|
+
if (errors === _errs70) {
|
|
2139
|
+
if (data25 && typeof data25 == "object" && !Array.isArray(data25)) {
|
|
2140
|
+
if (Object.keys(data25).length > 10) {
|
|
2387
2141
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/tags", schemaPath: "#/properties/descriptor/properties/tags/maxProperties", keyword: "maxProperties", params: { limit: 10 }, message: "must NOT have more than 10 properties" }];
|
|
2388
2142
|
return false;
|
|
2389
2143
|
}
|
|
2390
2144
|
else {
|
|
2391
|
-
if (Object.keys(
|
|
2145
|
+
if (Object.keys(data25).length < 1) {
|
|
2392
2146
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/tags", schemaPath: "#/properties/descriptor/properties/tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
2393
2147
|
return false;
|
|
2394
2148
|
}
|
|
2395
2149
|
else {
|
|
2396
|
-
for (const key4 in
|
|
2397
|
-
let
|
|
2398
|
-
const
|
|
2399
|
-
const
|
|
2400
|
-
let
|
|
2150
|
+
for (const key4 in data25) {
|
|
2151
|
+
let data26 = data25[key4];
|
|
2152
|
+
const _errs73 = errors;
|
|
2153
|
+
const _errs74 = errors;
|
|
2154
|
+
let valid21 = false;
|
|
2401
2155
|
let passing0 = null;
|
|
2402
|
-
const
|
|
2403
|
-
if (typeof
|
|
2404
|
-
const
|
|
2156
|
+
const _errs75 = errors;
|
|
2157
|
+
if (typeof data26 !== "string") {
|
|
2158
|
+
const err12 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2405
2159
|
if (vErrors === null) {
|
|
2406
|
-
vErrors = [
|
|
2160
|
+
vErrors = [err12];
|
|
2407
2161
|
}
|
|
2408
2162
|
else {
|
|
2409
|
-
vErrors.push(
|
|
2163
|
+
vErrors.push(err12);
|
|
2410
2164
|
}
|
|
2411
2165
|
errors++;
|
|
2412
2166
|
}
|
|
2413
|
-
var
|
|
2414
|
-
if (
|
|
2415
|
-
|
|
2167
|
+
var _valid1 = _errs75 === errors;
|
|
2168
|
+
if (_valid1) {
|
|
2169
|
+
valid21 = true;
|
|
2416
2170
|
passing0 = 0;
|
|
2417
2171
|
}
|
|
2418
|
-
const
|
|
2419
|
-
if (!((typeof
|
|
2420
|
-
const
|
|
2172
|
+
const _errs77 = errors;
|
|
2173
|
+
if (!((typeof data26 == "number") && (isFinite(data26)))) {
|
|
2174
|
+
const err13 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
2421
2175
|
if (vErrors === null) {
|
|
2422
|
-
vErrors = [
|
|
2176
|
+
vErrors = [err13];
|
|
2423
2177
|
}
|
|
2424
2178
|
else {
|
|
2425
|
-
vErrors.push(
|
|
2179
|
+
vErrors.push(err13);
|
|
2426
2180
|
}
|
|
2427
2181
|
errors++;
|
|
2428
2182
|
}
|
|
2429
|
-
var
|
|
2430
|
-
if (
|
|
2431
|
-
|
|
2183
|
+
var _valid1 = _errs77 === errors;
|
|
2184
|
+
if (_valid1 && valid21) {
|
|
2185
|
+
valid21 = false;
|
|
2432
2186
|
passing0 = [passing0, 1];
|
|
2433
2187
|
}
|
|
2434
2188
|
else {
|
|
2435
|
-
if (
|
|
2436
|
-
|
|
2189
|
+
if (_valid1) {
|
|
2190
|
+
valid21 = true;
|
|
2437
2191
|
passing0 = 1;
|
|
2438
2192
|
}
|
|
2439
|
-
const
|
|
2440
|
-
if (typeof
|
|
2441
|
-
const
|
|
2193
|
+
const _errs79 = errors;
|
|
2194
|
+
if (typeof data26 !== "boolean") {
|
|
2195
|
+
const err14 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/2/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
2442
2196
|
if (vErrors === null) {
|
|
2443
|
-
vErrors = [
|
|
2197
|
+
vErrors = [err14];
|
|
2444
2198
|
}
|
|
2445
2199
|
else {
|
|
2446
|
-
vErrors.push(
|
|
2200
|
+
vErrors.push(err14);
|
|
2447
2201
|
}
|
|
2448
2202
|
errors++;
|
|
2449
2203
|
}
|
|
2450
|
-
var
|
|
2451
|
-
if (
|
|
2452
|
-
|
|
2204
|
+
var _valid1 = _errs79 === errors;
|
|
2205
|
+
if (_valid1 && valid21) {
|
|
2206
|
+
valid21 = false;
|
|
2453
2207
|
passing0 = [passing0, 2];
|
|
2454
2208
|
}
|
|
2455
2209
|
else {
|
|
2456
|
-
if (
|
|
2457
|
-
|
|
2210
|
+
if (_valid1) {
|
|
2211
|
+
valid21 = true;
|
|
2458
2212
|
passing0 = 2;
|
|
2459
2213
|
}
|
|
2460
|
-
const
|
|
2461
|
-
if (errors ===
|
|
2462
|
-
if (Array.isArray(
|
|
2463
|
-
if (
|
|
2464
|
-
const
|
|
2214
|
+
const _errs81 = errors;
|
|
2215
|
+
if (errors === _errs81) {
|
|
2216
|
+
if (Array.isArray(data26)) {
|
|
2217
|
+
if (data26.length > 10) {
|
|
2218
|
+
const err15 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
|
|
2465
2219
|
if (vErrors === null) {
|
|
2466
|
-
vErrors = [
|
|
2220
|
+
vErrors = [err15];
|
|
2467
2221
|
}
|
|
2468
2222
|
else {
|
|
2469
|
-
vErrors.push(
|
|
2223
|
+
vErrors.push(err15);
|
|
2470
2224
|
}
|
|
2471
2225
|
errors++;
|
|
2472
2226
|
}
|
|
2473
2227
|
else {
|
|
2474
|
-
if (
|
|
2475
|
-
const
|
|
2228
|
+
if (data26.length < 1) {
|
|
2229
|
+
const err16 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
2476
2230
|
if (vErrors === null) {
|
|
2477
|
-
vErrors = [
|
|
2231
|
+
vErrors = [err16];
|
|
2478
2232
|
}
|
|
2479
2233
|
else {
|
|
2480
|
-
vErrors.push(
|
|
2234
|
+
vErrors.push(err16);
|
|
2481
2235
|
}
|
|
2482
2236
|
errors++;
|
|
2483
2237
|
}
|
|
2484
2238
|
else {
|
|
2485
|
-
var
|
|
2486
|
-
const len1 =
|
|
2239
|
+
var valid22 = true;
|
|
2240
|
+
const len1 = data26.length;
|
|
2487
2241
|
for (let i1 = 0; i1 < len1; i1++) {
|
|
2488
|
-
const
|
|
2489
|
-
if (typeof
|
|
2490
|
-
const
|
|
2242
|
+
const _errs83 = errors;
|
|
2243
|
+
if (typeof data26[i1] !== "string") {
|
|
2244
|
+
const err17 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i1, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2491
2245
|
if (vErrors === null) {
|
|
2492
|
-
vErrors = [
|
|
2246
|
+
vErrors = [err17];
|
|
2493
2247
|
}
|
|
2494
2248
|
else {
|
|
2495
|
-
vErrors.push(
|
|
2249
|
+
vErrors.push(err17);
|
|
2496
2250
|
}
|
|
2497
2251
|
errors++;
|
|
2498
2252
|
}
|
|
2499
|
-
var
|
|
2500
|
-
if (!
|
|
2253
|
+
var valid22 = _errs83 === errors;
|
|
2254
|
+
if (!valid22) {
|
|
2501
2255
|
break;
|
|
2502
2256
|
}
|
|
2503
2257
|
}
|
|
@@ -2505,69 +2259,69 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2505
2259
|
}
|
|
2506
2260
|
}
|
|
2507
2261
|
else {
|
|
2508
|
-
const
|
|
2262
|
+
const err18 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2509
2263
|
if (vErrors === null) {
|
|
2510
|
-
vErrors = [
|
|
2264
|
+
vErrors = [err18];
|
|
2511
2265
|
}
|
|
2512
2266
|
else {
|
|
2513
|
-
vErrors.push(
|
|
2267
|
+
vErrors.push(err18);
|
|
2514
2268
|
}
|
|
2515
2269
|
errors++;
|
|
2516
2270
|
}
|
|
2517
2271
|
}
|
|
2518
|
-
var
|
|
2519
|
-
if (
|
|
2520
|
-
|
|
2272
|
+
var _valid1 = _errs81 === errors;
|
|
2273
|
+
if (_valid1 && valid21) {
|
|
2274
|
+
valid21 = false;
|
|
2521
2275
|
passing0 = [passing0, 3];
|
|
2522
2276
|
}
|
|
2523
2277
|
else {
|
|
2524
|
-
if (
|
|
2525
|
-
|
|
2278
|
+
if (_valid1) {
|
|
2279
|
+
valid21 = true;
|
|
2526
2280
|
passing0 = 3;
|
|
2527
2281
|
var items0 = true;
|
|
2528
2282
|
}
|
|
2529
|
-
const
|
|
2530
|
-
if (errors ===
|
|
2531
|
-
if (Array.isArray(
|
|
2532
|
-
if (
|
|
2533
|
-
const
|
|
2283
|
+
const _errs85 = errors;
|
|
2284
|
+
if (errors === _errs85) {
|
|
2285
|
+
if (Array.isArray(data26)) {
|
|
2286
|
+
if (data26.length > 10) {
|
|
2287
|
+
const err19 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/maxItems", keyword: "maxItems", params: { limit: 10 }, message: "must NOT have more than 10 items" };
|
|
2534
2288
|
if (vErrors === null) {
|
|
2535
|
-
vErrors = [
|
|
2289
|
+
vErrors = [err19];
|
|
2536
2290
|
}
|
|
2537
2291
|
else {
|
|
2538
|
-
vErrors.push(
|
|
2292
|
+
vErrors.push(err19);
|
|
2539
2293
|
}
|
|
2540
2294
|
errors++;
|
|
2541
2295
|
}
|
|
2542
2296
|
else {
|
|
2543
|
-
if (
|
|
2544
|
-
const
|
|
2297
|
+
if (data26.length < 1) {
|
|
2298
|
+
const err20 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
2545
2299
|
if (vErrors === null) {
|
|
2546
|
-
vErrors = [
|
|
2300
|
+
vErrors = [err20];
|
|
2547
2301
|
}
|
|
2548
2302
|
else {
|
|
2549
|
-
vErrors.push(
|
|
2303
|
+
vErrors.push(err20);
|
|
2550
2304
|
}
|
|
2551
2305
|
errors++;
|
|
2552
2306
|
}
|
|
2553
2307
|
else {
|
|
2554
|
-
var
|
|
2555
|
-
const len2 =
|
|
2308
|
+
var valid23 = true;
|
|
2309
|
+
const len2 = data26.length;
|
|
2556
2310
|
for (let i2 = 0; i2 < len2; i2++) {
|
|
2557
|
-
let
|
|
2558
|
-
const
|
|
2559
|
-
if (!((typeof
|
|
2560
|
-
const
|
|
2311
|
+
let data28 = data26[i2];
|
|
2312
|
+
const _errs87 = errors;
|
|
2313
|
+
if (!((typeof data28 == "number") && (isFinite(data28)))) {
|
|
2314
|
+
const err21 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1") + "/" + i2, schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/items/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
2561
2315
|
if (vErrors === null) {
|
|
2562
|
-
vErrors = [
|
|
2316
|
+
vErrors = [err21];
|
|
2563
2317
|
}
|
|
2564
2318
|
else {
|
|
2565
|
-
vErrors.push(
|
|
2319
|
+
vErrors.push(err21);
|
|
2566
2320
|
}
|
|
2567
2321
|
errors++;
|
|
2568
2322
|
}
|
|
2569
|
-
var
|
|
2570
|
-
if (!
|
|
2323
|
+
var valid23 = _errs87 === errors;
|
|
2324
|
+
if (!valid23) {
|
|
2571
2325
|
break;
|
|
2572
2326
|
}
|
|
2573
2327
|
}
|
|
@@ -2575,24 +2329,24 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2575
2329
|
}
|
|
2576
2330
|
}
|
|
2577
2331
|
else {
|
|
2578
|
-
const
|
|
2332
|
+
const err22 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf/4/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2579
2333
|
if (vErrors === null) {
|
|
2580
|
-
vErrors = [
|
|
2334
|
+
vErrors = [err22];
|
|
2581
2335
|
}
|
|
2582
2336
|
else {
|
|
2583
|
-
vErrors.push(
|
|
2337
|
+
vErrors.push(err22);
|
|
2584
2338
|
}
|
|
2585
2339
|
errors++;
|
|
2586
2340
|
}
|
|
2587
2341
|
}
|
|
2588
|
-
var
|
|
2589
|
-
if (
|
|
2590
|
-
|
|
2342
|
+
var _valid1 = _errs85 === errors;
|
|
2343
|
+
if (_valid1 && valid21) {
|
|
2344
|
+
valid21 = false;
|
|
2591
2345
|
passing0 = [passing0, 4];
|
|
2592
2346
|
}
|
|
2593
2347
|
else {
|
|
2594
|
-
if (
|
|
2595
|
-
|
|
2348
|
+
if (_valid1) {
|
|
2349
|
+
valid21 = true;
|
|
2596
2350
|
passing0 = 4;
|
|
2597
2351
|
if (items0 !== true) {
|
|
2598
2352
|
items0 = true;
|
|
@@ -2602,31 +2356,31 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2602
2356
|
}
|
|
2603
2357
|
}
|
|
2604
2358
|
}
|
|
2605
|
-
if (!
|
|
2606
|
-
const
|
|
2359
|
+
if (!valid21) {
|
|
2360
|
+
const err23 = { instancePath: instancePath + "/descriptor/tags/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"), schemaPath: "#/properties/descriptor/properties/tags/additionalProperties/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
2607
2361
|
if (vErrors === null) {
|
|
2608
|
-
vErrors = [
|
|
2362
|
+
vErrors = [err23];
|
|
2609
2363
|
}
|
|
2610
2364
|
else {
|
|
2611
|
-
vErrors.push(
|
|
2365
|
+
vErrors.push(err23);
|
|
2612
2366
|
}
|
|
2613
2367
|
errors++;
|
|
2614
2368
|
validate27.errors = vErrors;
|
|
2615
2369
|
return false;
|
|
2616
2370
|
}
|
|
2617
2371
|
else {
|
|
2618
|
-
errors =
|
|
2372
|
+
errors = _errs74;
|
|
2619
2373
|
if (vErrors !== null) {
|
|
2620
|
-
if (
|
|
2621
|
-
vErrors.length =
|
|
2374
|
+
if (_errs74) {
|
|
2375
|
+
vErrors.length = _errs74;
|
|
2622
2376
|
}
|
|
2623
2377
|
else {
|
|
2624
2378
|
vErrors = null;
|
|
2625
2379
|
}
|
|
2626
2380
|
}
|
|
2627
2381
|
}
|
|
2628
|
-
var
|
|
2629
|
-
if (!
|
|
2382
|
+
var valid20 = _errs73 === errors;
|
|
2383
|
+
if (!valid20) {
|
|
2630
2384
|
break;
|
|
2631
2385
|
}
|
|
2632
2386
|
}
|
|
@@ -2638,56 +2392,56 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2638
2392
|
return false;
|
|
2639
2393
|
}
|
|
2640
2394
|
}
|
|
2641
|
-
var
|
|
2395
|
+
var valid18 = _errs70 === errors;
|
|
2642
2396
|
}
|
|
2643
2397
|
else {
|
|
2644
|
-
var
|
|
2398
|
+
var valid18 = true;
|
|
2645
2399
|
}
|
|
2646
|
-
if (
|
|
2647
|
-
if (
|
|
2648
|
-
const
|
|
2649
|
-
if (typeof
|
|
2400
|
+
if (valid18) {
|
|
2401
|
+
if (data16.parentId !== undefined) {
|
|
2402
|
+
const _errs89 = errors;
|
|
2403
|
+
if (typeof data16.parentId !== "string") {
|
|
2650
2404
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/parentId", schemaPath: "#/properties/descriptor/properties/parentId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2651
2405
|
return false;
|
|
2652
2406
|
}
|
|
2653
|
-
var
|
|
2407
|
+
var valid18 = _errs89 === errors;
|
|
2654
2408
|
}
|
|
2655
2409
|
else {
|
|
2656
|
-
var
|
|
2410
|
+
var valid18 = true;
|
|
2657
2411
|
}
|
|
2658
|
-
if (
|
|
2659
|
-
if (
|
|
2660
|
-
const
|
|
2661
|
-
if (typeof
|
|
2412
|
+
if (valid18) {
|
|
2413
|
+
if (data16.dataCid !== undefined) {
|
|
2414
|
+
const _errs91 = errors;
|
|
2415
|
+
if (typeof data16.dataCid !== "string") {
|
|
2662
2416
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/dataCid", schemaPath: "#/properties/descriptor/properties/dataCid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2663
2417
|
return false;
|
|
2664
2418
|
}
|
|
2665
|
-
var
|
|
2419
|
+
var valid18 = _errs91 === errors;
|
|
2666
2420
|
}
|
|
2667
2421
|
else {
|
|
2668
|
-
var
|
|
2422
|
+
var valid18 = true;
|
|
2669
2423
|
}
|
|
2670
|
-
if (
|
|
2671
|
-
if (
|
|
2672
|
-
let
|
|
2673
|
-
const
|
|
2674
|
-
if (!((typeof
|
|
2424
|
+
if (valid18) {
|
|
2425
|
+
if (data16.dataSize !== undefined) {
|
|
2426
|
+
let data31 = data16.dataSize;
|
|
2427
|
+
const _errs93 = errors;
|
|
2428
|
+
if (!((typeof data31 == "number") && (isFinite(data31)))) {
|
|
2675
2429
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/dataSize", schemaPath: "#/properties/descriptor/properties/dataSize/type", keyword: "type", params: { type: "number" }, message: "must be number" }];
|
|
2676
2430
|
return false;
|
|
2677
2431
|
}
|
|
2678
|
-
var
|
|
2432
|
+
var valid18 = _errs93 === errors;
|
|
2679
2433
|
}
|
|
2680
2434
|
else {
|
|
2681
|
-
var
|
|
2435
|
+
var valid18 = true;
|
|
2682
2436
|
}
|
|
2683
|
-
if (
|
|
2684
|
-
if (
|
|
2685
|
-
let
|
|
2686
|
-
const
|
|
2687
|
-
const
|
|
2688
|
-
if (errors ===
|
|
2689
|
-
if (typeof
|
|
2690
|
-
if (!pattern14.test(
|
|
2437
|
+
if (valid18) {
|
|
2438
|
+
if (data16.dateCreated !== undefined) {
|
|
2439
|
+
let data32 = data16.dateCreated;
|
|
2440
|
+
const _errs95 = errors;
|
|
2441
|
+
const _errs96 = errors;
|
|
2442
|
+
if (errors === _errs96) {
|
|
2443
|
+
if (typeof data32 === "string") {
|
|
2444
|
+
if (!pattern14.test(data32)) {
|
|
2691
2445
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/dateCreated", 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$" + "\"" }];
|
|
2692
2446
|
return false;
|
|
2693
2447
|
}
|
|
@@ -2697,19 +2451,19 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2697
2451
|
return false;
|
|
2698
2452
|
}
|
|
2699
2453
|
}
|
|
2700
|
-
var
|
|
2454
|
+
var valid18 = _errs95 === errors;
|
|
2701
2455
|
}
|
|
2702
2456
|
else {
|
|
2703
|
-
var
|
|
2457
|
+
var valid18 = true;
|
|
2704
2458
|
}
|
|
2705
|
-
if (
|
|
2706
|
-
if (
|
|
2707
|
-
let
|
|
2708
|
-
const
|
|
2709
|
-
const
|
|
2710
|
-
if (errors ===
|
|
2711
|
-
if (typeof
|
|
2712
|
-
if (!pattern14.test(
|
|
2459
|
+
if (valid18) {
|
|
2460
|
+
if (data16.messageTimestamp !== undefined) {
|
|
2461
|
+
let data33 = data16.messageTimestamp;
|
|
2462
|
+
const _errs98 = errors;
|
|
2463
|
+
const _errs99 = errors;
|
|
2464
|
+
if (errors === _errs99) {
|
|
2465
|
+
if (typeof data33 === "string") {
|
|
2466
|
+
if (!pattern14.test(data33)) {
|
|
2713
2467
|
validate27.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$" + "\"" }];
|
|
2714
2468
|
return false;
|
|
2715
2469
|
}
|
|
@@ -2719,31 +2473,31 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2719
2473
|
return false;
|
|
2720
2474
|
}
|
|
2721
2475
|
}
|
|
2722
|
-
var
|
|
2476
|
+
var valid18 = _errs98 === errors;
|
|
2723
2477
|
}
|
|
2724
2478
|
else {
|
|
2725
|
-
var
|
|
2479
|
+
var valid18 = true;
|
|
2726
2480
|
}
|
|
2727
|
-
if (
|
|
2728
|
-
if (
|
|
2729
|
-
const
|
|
2730
|
-
if (typeof
|
|
2481
|
+
if (valid18) {
|
|
2482
|
+
if (data16.published !== undefined) {
|
|
2483
|
+
const _errs101 = errors;
|
|
2484
|
+
if (typeof data16.published !== "boolean") {
|
|
2731
2485
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/published", schemaPath: "#/properties/descriptor/properties/published/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
2732
2486
|
return false;
|
|
2733
2487
|
}
|
|
2734
|
-
var
|
|
2488
|
+
var valid18 = _errs101 === errors;
|
|
2735
2489
|
}
|
|
2736
2490
|
else {
|
|
2737
|
-
var
|
|
2491
|
+
var valid18 = true;
|
|
2738
2492
|
}
|
|
2739
|
-
if (
|
|
2740
|
-
if (
|
|
2741
|
-
let
|
|
2742
|
-
const
|
|
2743
|
-
const
|
|
2744
|
-
if (errors ===
|
|
2745
|
-
if (typeof
|
|
2746
|
-
if (!pattern14.test(
|
|
2493
|
+
if (valid18) {
|
|
2494
|
+
if (data16.datePublished !== undefined) {
|
|
2495
|
+
let data35 = data16.datePublished;
|
|
2496
|
+
const _errs103 = errors;
|
|
2497
|
+
const _errs104 = errors;
|
|
2498
|
+
if (errors === _errs104) {
|
|
2499
|
+
if (typeof data35 === "string") {
|
|
2500
|
+
if (!pattern14.test(data35)) {
|
|
2747
2501
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/datePublished", 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$" + "\"" }];
|
|
2748
2502
|
return false;
|
|
2749
2503
|
}
|
|
@@ -2753,34 +2507,34 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2753
2507
|
return false;
|
|
2754
2508
|
}
|
|
2755
2509
|
}
|
|
2756
|
-
var
|
|
2510
|
+
var valid18 = _errs103 === errors;
|
|
2757
2511
|
}
|
|
2758
2512
|
else {
|
|
2759
|
-
var
|
|
2513
|
+
var valid18 = true;
|
|
2760
2514
|
}
|
|
2761
|
-
if (
|
|
2762
|
-
if (
|
|
2763
|
-
const
|
|
2764
|
-
if (typeof
|
|
2515
|
+
if (valid18) {
|
|
2516
|
+
if (data16.dataFormat !== undefined) {
|
|
2517
|
+
const _errs106 = errors;
|
|
2518
|
+
if (typeof data16.dataFormat !== "string") {
|
|
2765
2519
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/dataFormat", schemaPath: "#/properties/descriptor/properties/dataFormat/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2766
2520
|
return false;
|
|
2767
2521
|
}
|
|
2768
|
-
var
|
|
2522
|
+
var valid18 = _errs106 === errors;
|
|
2769
2523
|
}
|
|
2770
2524
|
else {
|
|
2771
|
-
var
|
|
2525
|
+
var valid18 = true;
|
|
2772
2526
|
}
|
|
2773
|
-
if (
|
|
2774
|
-
if (
|
|
2775
|
-
const
|
|
2776
|
-
if (typeof
|
|
2527
|
+
if (valid18) {
|
|
2528
|
+
if (data16.permissionGrantId !== undefined) {
|
|
2529
|
+
const _errs108 = errors;
|
|
2530
|
+
if (typeof data16.permissionGrantId !== "string") {
|
|
2777
2531
|
validate27.errors = [{ instancePath: instancePath + "/descriptor/permissionGrantId", schemaPath: "#/properties/descriptor/properties/permissionGrantId/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
2778
2532
|
return false;
|
|
2779
2533
|
}
|
|
2780
|
-
var
|
|
2534
|
+
var valid18 = _errs108 === errors;
|
|
2781
2535
|
}
|
|
2782
2536
|
else {
|
|
2783
|
-
var
|
|
2537
|
+
var valid18 = true;
|
|
2784
2538
|
}
|
|
2785
2539
|
}
|
|
2786
2540
|
}
|
|
@@ -2806,10 +2560,10 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2806
2560
|
return false;
|
|
2807
2561
|
}
|
|
2808
2562
|
}
|
|
2809
|
-
var
|
|
2563
|
+
var valid0 = _errs36 === errors;
|
|
2810
2564
|
}
|
|
2811
2565
|
else {
|
|
2812
|
-
var
|
|
2566
|
+
var valid0 = true;
|
|
2813
2567
|
}
|
|
2814
2568
|
}
|
|
2815
2569
|
}
|
|
@@ -2824,10 +2578,9 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2824
2578
|
}
|
|
2825
2579
|
}
|
|
2826
2580
|
validate27.errors = vErrors;
|
|
2827
|
-
evaluated0.props = props0;
|
|
2828
2581
|
return errors === 0;
|
|
2829
2582
|
}
|
|
2830
|
-
validate27.evaluated = { "
|
|
2583
|
+
validate27.evaluated = { "props": { "recordId": true, "contextId": true, "attestation": true, "authorization": true, "encryption": true, "descriptor": true }, "dynamicProps": false, "dynamicItems": false };
|
|
2831
2584
|
function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { /*# sourceURL="https://identity.foundation/dwn/json-schemas/records-write-data-encoded.json" */ ; let vErrors = null; let errors = 0; const evaluated0 = validate26.evaluated; if (evaluated0.dynamicProps) {
|
|
2832
2585
|
evaluated0.props = undefined;
|
|
2833
2586
|
} if (evaluated0.dynamicItems) {
|
|
@@ -2835,9 +2588,6 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2835
2588
|
} if (!(validate27(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
2836
2589
|
vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
|
|
2837
2590
|
errors = vErrors.length;
|
|
2838
|
-
}
|
|
2839
|
-
else {
|
|
2840
|
-
var props0 = validate27.evaluated.props;
|
|
2841
2591
|
} if (errors === 0) {
|
|
2842
2592
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2843
2593
|
let missing0;
|
|
@@ -2846,10 +2596,6 @@ else {
|
|
|
2846
2596
|
return false;
|
|
2847
2597
|
}
|
|
2848
2598
|
else {
|
|
2849
|
-
if (props0 !== true) {
|
|
2850
|
-
props0 = props0 || {};
|
|
2851
|
-
props0.encodedData = true;
|
|
2852
|
-
}
|
|
2853
2599
|
if (data.encodedData !== undefined) {
|
|
2854
2600
|
const _errs1 = errors;
|
|
2855
2601
|
if (typeof data.encodedData !== "string") {
|
|
@@ -2862,13 +2608,11 @@ else {
|
|
|
2862
2608
|
var valid0 = true;
|
|
2863
2609
|
}
|
|
2864
2610
|
if (valid0) {
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
break;
|
|
2871
|
-
}
|
|
2611
|
+
for (const key0 in data) {
|
|
2612
|
+
if (((((((key0 !== "encodedData") && (key0 !== "recordId")) && (key0 !== "contextId")) && (key0 !== "attestation")) && (key0 !== "authorization")) && (key0 !== "encryption")) && (key0 !== "descriptor")) {
|
|
2613
|
+
validate26.errors = [{ instancePath, schemaPath: "#/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
2614
|
+
return false;
|
|
2615
|
+
break;
|
|
2872
2616
|
}
|
|
2873
2617
|
}
|
|
2874
2618
|
}
|
|
@@ -5378,7 +5122,7 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5378
5122
|
} validate45.errors = vErrors; return errors === 0; }
|
|
5379
5123
|
validate45.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
5380
5124
|
export const RecordsSubscribe = validate48;
|
|
5381
|
-
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" }, "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" } } } } };
|
|
5125
|
+
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" }, "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": { "type": "string" } } } } };
|
|
5382
5126
|
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) {
|
|
5383
5127
|
evaluated0.props = undefined;
|
|
5384
5128
|
} if (evaluated0.dynamicItems) {
|
|
@@ -5425,7 +5169,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5425
5169
|
else {
|
|
5426
5170
|
const _errs5 = errors;
|
|
5427
5171
|
for (const key1 in data1) {
|
|
5428
|
-
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "pagination")) || (key1 === "dateSort"))) {
|
|
5172
|
+
if (!(((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filter")) || (key1 === "pagination")) || (key1 === "dateSort")) || (key1 === "cursor"))) {
|
|
5429
5173
|
validate48.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
5430
5174
|
return false;
|
|
5431
5175
|
break;
|
|
@@ -5630,6 +5374,19 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5630
5374
|
else {
|
|
5631
5375
|
var valid1 = true;
|
|
5632
5376
|
}
|
|
5377
|
+
if (valid1) {
|
|
5378
|
+
if (data1.cursor !== undefined) {
|
|
5379
|
+
const _errs29 = errors;
|
|
5380
|
+
if (typeof data1.cursor !== "string") {
|
|
5381
|
+
validate48.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "#/properties/descriptor/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
5382
|
+
return false;
|
|
5383
|
+
}
|
|
5384
|
+
var valid1 = _errs29 === errors;
|
|
5385
|
+
}
|
|
5386
|
+
else {
|
|
5387
|
+
var valid1 = true;
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5633
5390
|
}
|
|
5634
5391
|
}
|
|
5635
5392
|
}
|
|
@@ -5667,9 +5424,6 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5667
5424
|
} if (!(validate27(data, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }))) {
|
|
5668
5425
|
vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
|
|
5669
5426
|
errors = vErrors.length;
|
|
5670
|
-
}
|
|
5671
|
-
else {
|
|
5672
|
-
var props0 = validate27.evaluated.props;
|
|
5673
5427
|
} if (errors === 0) {
|
|
5674
5428
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
5675
5429
|
let missing0;
|
|
@@ -5678,13 +5432,11 @@ else {
|
|
|
5678
5432
|
return false;
|
|
5679
5433
|
}
|
|
5680
5434
|
else {
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
break;
|
|
5687
|
-
}
|
|
5435
|
+
for (const key0 in data) {
|
|
5436
|
+
if ((((((key0 !== "recordId") && (key0 !== "contextId")) && (key0 !== "attestation")) && (key0 !== "authorization")) && (key0 !== "encryption")) && (key0 !== "descriptor")) {
|
|
5437
|
+
validate51.errors = [{ instancePath, schemaPath: "#/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
|
|
5438
|
+
return false;
|
|
5439
|
+
break;
|
|
5688
5440
|
}
|
|
5689
5441
|
}
|
|
5690
5442
|
}
|
|
@@ -6822,7 +6574,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6822
6574
|
} validate57.errors = vErrors; return errors === 0; }
|
|
6823
6575
|
validate57.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
|
|
6824
6576
|
export const MessagesSubscribe = validate59;
|
|
6825
|
-
const schema85 = { "$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" } }, "permissionGrantId": { "type": "string" } } } } };
|
|
6577
|
+
const schema85 = { "$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" } }, "permissionGrantId": { "type": "string" }, "cursor": { "type": "string" } } } } };
|
|
6826
6578
|
function validate59(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 = validate59.evaluated; if (evaluated0.dynamicProps) {
|
|
6827
6579
|
evaluated0.props = undefined;
|
|
6828
6580
|
} if (evaluated0.dynamicItems) {
|
|
@@ -6869,7 +6621,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6869
6621
|
else {
|
|
6870
6622
|
const _errs5 = errors;
|
|
6871
6623
|
for (const key1 in data1) {
|
|
6872
|
-
if (!(((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filters")) || (key1 === "permissionGrantId"))) {
|
|
6624
|
+
if (!((((((key1 === "interface") || (key1 === "method")) || (key1 === "messageTimestamp")) || (key1 === "filters")) || (key1 === "permissionGrantId")) || (key1 === "cursor"))) {
|
|
6873
6625
|
validate59.errors = [{ instancePath: instancePath + "/descriptor", schemaPath: "#/properties/descriptor/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
|
|
6874
6626
|
return false;
|
|
6875
6627
|
break;
|
|
@@ -6963,6 +6715,19 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
6963
6715
|
else {
|
|
6964
6716
|
var valid1 = true;
|
|
6965
6717
|
}
|
|
6718
|
+
if (valid1) {
|
|
6719
|
+
if (data1.cursor !== undefined) {
|
|
6720
|
+
const _errs17 = errors;
|
|
6721
|
+
if (typeof data1.cursor !== "string") {
|
|
6722
|
+
validate59.errors = [{ instancePath: instancePath + "/descriptor/cursor", schemaPath: "#/properties/descriptor/properties/cursor/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
6723
|
+
return false;
|
|
6724
|
+
}
|
|
6725
|
+
var valid1 = _errs17 === errors;
|
|
6726
|
+
}
|
|
6727
|
+
else {
|
|
6728
|
+
var valid1 = true;
|
|
6729
|
+
}
|
|
6730
|
+
}
|
|
6966
6731
|
}
|
|
6967
6732
|
}
|
|
6968
6733
|
}
|
|
@@ -11094,7 +10859,7 @@ export const ProtocolDefinition = validate75;
|
|
|
11094
10859
|
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" } } } } };
|
|
11095
10860
|
const pattern39 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");
|
|
11096
10861
|
const pattern41 = new RegExp(".*", "u");
|
|
11097
|
-
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", "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", "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 } } }, "$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" } } };
|
|
10862
|
+
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", "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", "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" }, "$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" } } };
|
|
11098
10863
|
const pattern43 = new RegExp("^[^$].*$", "u");
|
|
11099
10864
|
const pattern44 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*:.+$", "u");
|
|
11100
10865
|
const pattern45 = new RegExp("^(?!\\$requiredTags$|\\$allowUndefinedTags$).*$", "u");
|
|
@@ -11109,7 +10874,7 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11109
10874
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
11110
10875
|
const _errs1 = errors;
|
|
11111
10876
|
for (const key0 in data) {
|
|
11112
|
-
if (!(((((((key0 === "$encryption") || (key0 === "$actions")) || (key0 === "$role")) || (key0 === "$ref")) || (key0 === "$size")) || (key0 === "$tags")) || (pattern43.test(key0)))) {
|
|
10877
|
+
if (!(((((((((key0 === "$encryption") || (key0 === "$actions")) || (key0 === "$role")) || (key0 === "$ref")) || (key0 === "$size")) || (key0 === "$recordLimit")) || (key0 === "$immutable")) || (key0 === "$tags")) || (pattern43.test(key0)))) {
|
|
11113
10878
|
validate76.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
|
|
11114
10879
|
return false;
|
|
11115
10880
|
break;
|
|
@@ -11619,202 +11384,288 @@ function validate76(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
11619
11384
|
var valid0 = true;
|
|
11620
11385
|
}
|
|
11621
11386
|
if (valid0) {
|
|
11622
|
-
if (data.$
|
|
11623
|
-
let data17 = data.$
|
|
11387
|
+
if (data.$recordLimit !== undefined) {
|
|
11388
|
+
let data17 = data.$recordLimit;
|
|
11624
11389
|
const _errs45 = errors;
|
|
11625
11390
|
if (errors === _errs45) {
|
|
11626
11391
|
if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
|
|
11627
|
-
|
|
11628
|
-
|
|
11392
|
+
let missing3;
|
|
11393
|
+
if (((data17.max === undefined) && (missing3 = "max")) || ((data17.strategy === undefined) && (missing3 = "strategy"))) {
|
|
11394
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
|
|
11629
11395
|
return false;
|
|
11630
11396
|
}
|
|
11631
11397
|
else {
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11398
|
+
const _errs47 = errors;
|
|
11399
|
+
for (const key5 in data17) {
|
|
11400
|
+
if (!((key5 === "max") || (key5 === "strategy"))) {
|
|
11401
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" }];
|
|
11402
|
+
return false;
|
|
11403
|
+
break;
|
|
11404
|
+
}
|
|
11405
|
+
}
|
|
11406
|
+
if (_errs47 === errors) {
|
|
11407
|
+
if (data17.max !== undefined) {
|
|
11408
|
+
let data18 = data17.max;
|
|
11409
|
+
const _errs48 = errors;
|
|
11410
|
+
if (!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) {
|
|
11411
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
|
|
11412
|
+
return false;
|
|
11413
|
+
}
|
|
11414
|
+
if (errors === _errs48) {
|
|
11415
|
+
if ((typeof data18 == "number") && (isFinite(data18))) {
|
|
11416
|
+
if (data18 < 1 || isNaN(data18)) {
|
|
11417
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit/max", schemaPath: "#/properties/%24recordLimit/properties/max/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" }];
|
|
11643
11418
|
return false;
|
|
11644
11419
|
}
|
|
11645
|
-
var valid10 = _errs49 === errors;
|
|
11646
|
-
if (!valid10) {
|
|
11647
|
-
break;
|
|
11648
|
-
}
|
|
11649
11420
|
}
|
|
11650
11421
|
}
|
|
11422
|
+
var valid9 = _errs48 === errors;
|
|
11423
|
+
}
|
|
11424
|
+
else {
|
|
11425
|
+
var valid9 = true;
|
|
11426
|
+
}
|
|
11427
|
+
if (valid9) {
|
|
11428
|
+
if (data17.strategy !== undefined) {
|
|
11429
|
+
let data19 = data17.strategy;
|
|
11430
|
+
const _errs50 = errors;
|
|
11431
|
+
if (typeof data19 !== "string") {
|
|
11432
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit/strategy", schemaPath: "#/properties/%24recordLimit/properties/strategy/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11433
|
+
return false;
|
|
11434
|
+
}
|
|
11435
|
+
if (!((data19 === "reject") || (data19 === "purgeOldest"))) {
|
|
11436
|
+
validate76.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" }];
|
|
11437
|
+
return false;
|
|
11438
|
+
}
|
|
11439
|
+
var valid9 = _errs50 === errors;
|
|
11440
|
+
}
|
|
11651
11441
|
else {
|
|
11652
|
-
|
|
11653
|
-
return false;
|
|
11442
|
+
var valid9 = true;
|
|
11654
11443
|
}
|
|
11655
11444
|
}
|
|
11656
|
-
var valid9 = _errs47 === errors;
|
|
11657
|
-
}
|
|
11658
|
-
else {
|
|
11659
|
-
var valid9 = true;
|
|
11660
11445
|
}
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11446
|
+
}
|
|
11447
|
+
}
|
|
11448
|
+
else {
|
|
11449
|
+
validate76.errors = [{ instancePath: instancePath + "/$recordLimit", schemaPath: "#/properties/%24recordLimit/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11450
|
+
return false;
|
|
11451
|
+
}
|
|
11452
|
+
}
|
|
11453
|
+
var valid0 = _errs45 === errors;
|
|
11454
|
+
}
|
|
11455
|
+
else {
|
|
11456
|
+
var valid0 = true;
|
|
11457
|
+
}
|
|
11458
|
+
if (valid0) {
|
|
11459
|
+
if (data.$immutable !== undefined) {
|
|
11460
|
+
const _errs52 = errors;
|
|
11461
|
+
if (typeof data.$immutable !== "boolean") {
|
|
11462
|
+
validate76.errors = [{ instancePath: instancePath + "/$immutable", schemaPath: "#/properties/%24immutable/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11463
|
+
return false;
|
|
11464
|
+
}
|
|
11465
|
+
var valid0 = _errs52 === errors;
|
|
11466
|
+
}
|
|
11467
|
+
else {
|
|
11468
|
+
var valid0 = true;
|
|
11469
|
+
}
|
|
11470
|
+
if (valid0) {
|
|
11471
|
+
if (data.$tags !== undefined) {
|
|
11472
|
+
let data21 = data.$tags;
|
|
11473
|
+
const _errs55 = errors;
|
|
11474
|
+
if (errors === _errs55) {
|
|
11475
|
+
if (data21 && typeof data21 == "object" && !Array.isArray(data21)) {
|
|
11476
|
+
if (Object.keys(data21).length < 1) {
|
|
11477
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/minProperties", keyword: "minProperties", params: { limit: 1 }, message: "must NOT have fewer than 1 properties" }];
|
|
11478
|
+
return false;
|
|
11669
11479
|
}
|
|
11670
11480
|
else {
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
const _errs55 = errors;
|
|
11684
|
-
for (const key6 in data21) {
|
|
11685
|
-
if (!((((key6 === "type") || (key6 === "items")) || (key6 === "contains")) || (pattern46.test(key6)))) {
|
|
11686
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.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: key6 }, message: "must NOT have additional properties" }];
|
|
11687
|
-
return false;
|
|
11688
|
-
break;
|
|
11689
|
-
}
|
|
11481
|
+
if (data21.$requiredTags !== undefined) {
|
|
11482
|
+
let data22 = data21.$requiredTags;
|
|
11483
|
+
const _errs57 = errors;
|
|
11484
|
+
if (errors === _errs57) {
|
|
11485
|
+
if (Array.isArray(data22)) {
|
|
11486
|
+
var valid11 = true;
|
|
11487
|
+
const len3 = data22.length;
|
|
11488
|
+
for (let i3 = 0; i3 < len3; i3++) {
|
|
11489
|
+
const _errs59 = errors;
|
|
11490
|
+
if (typeof data22[i3] !== "string") {
|
|
11491
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$requiredTags/" + i3, schemaPath: "#/properties/%24tags/properties/%24requiredTags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
|
|
11492
|
+
return false;
|
|
11690
11493
|
}
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11494
|
+
var valid11 = _errs59 === errors;
|
|
11495
|
+
if (!valid11) {
|
|
11496
|
+
break;
|
|
11497
|
+
}
|
|
11498
|
+
}
|
|
11499
|
+
}
|
|
11500
|
+
else {
|
|
11501
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$requiredTags", schemaPath: "#/properties/%24tags/properties/%24requiredTags/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
|
|
11502
|
+
return false;
|
|
11503
|
+
}
|
|
11504
|
+
}
|
|
11505
|
+
var valid10 = _errs57 === errors;
|
|
11506
|
+
}
|
|
11507
|
+
else {
|
|
11508
|
+
var valid10 = true;
|
|
11509
|
+
}
|
|
11510
|
+
if (valid10) {
|
|
11511
|
+
if (data21.$allowUndefinedTags !== undefined) {
|
|
11512
|
+
const _errs61 = errors;
|
|
11513
|
+
if (typeof data21.$allowUndefinedTags !== "boolean") {
|
|
11514
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags/$allowUndefinedTags", schemaPath: "#/properties/%24tags/properties/%24allowUndefinedTags/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
|
|
11515
|
+
return false;
|
|
11516
|
+
}
|
|
11517
|
+
var valid10 = _errs61 === errors;
|
|
11518
|
+
}
|
|
11519
|
+
else {
|
|
11520
|
+
var valid10 = true;
|
|
11521
|
+
}
|
|
11522
|
+
if (valid10) {
|
|
11523
|
+
var props2 = {};
|
|
11524
|
+
props2.$requiredTags = true;
|
|
11525
|
+
props2.$allowUndefinedTags = true;
|
|
11526
|
+
for (const key6 in data21) {
|
|
11527
|
+
if (pattern45.test(key6)) {
|
|
11528
|
+
let data25 = data21[key6];
|
|
11529
|
+
const _errs63 = errors;
|
|
11530
|
+
if (errors === _errs63) {
|
|
11531
|
+
if (data25 && typeof data25 == "object" && !Array.isArray(data25)) {
|
|
11532
|
+
const _errs65 = errors;
|
|
11533
|
+
for (const key7 in data25) {
|
|
11534
|
+
if (!((((key7 === "type") || (key7 === "items")) || (key7 === "contains")) || (pattern46.test(key7)))) {
|
|
11535
|
+
validate76.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" }];
|
|
11536
|
+
return false;
|
|
11537
|
+
break;
|
|
11538
|
+
}
|
|
11698
11539
|
}
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
if (data21.items !== undefined) {
|
|
11706
|
-
let data23 = data21.items;
|
|
11707
|
-
const _errs57 = errors;
|
|
11708
|
-
if (errors === _errs57) {
|
|
11709
|
-
if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
|
|
11710
|
-
if (data23.type !== undefined) {
|
|
11711
|
-
let data24 = data23.type;
|
|
11712
|
-
const _errs59 = errors;
|
|
11713
|
-
if (!(((data24 === "string") || (data24 === "number")) || (data24 === "integer"))) {
|
|
11714
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.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" }];
|
|
11715
|
-
return false;
|
|
11716
|
-
}
|
|
11717
|
-
var valid13 = _errs59 === errors;
|
|
11718
|
-
}
|
|
11719
|
-
else {
|
|
11720
|
-
var valid13 = true;
|
|
11721
|
-
}
|
|
11722
|
-
if (valid13) {
|
|
11723
|
-
var props3 = {};
|
|
11724
|
-
props3.type = true;
|
|
11725
|
-
for (const key7 in data23) {
|
|
11726
|
-
if (pattern47.test(key7)) {
|
|
11727
|
-
props3[key7] = true;
|
|
11728
|
-
}
|
|
11729
|
-
}
|
|
11730
|
-
}
|
|
11731
|
-
}
|
|
11732
|
-
else {
|
|
11733
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.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" }];
|
|
11540
|
+
if (_errs65 === errors) {
|
|
11541
|
+
if (data25.type !== undefined) {
|
|
11542
|
+
let data26 = data25.type;
|
|
11543
|
+
const _errs66 = errors;
|
|
11544
|
+
if (!(((((data26 === "string") || (data26 === "number")) || (data26 === "integer")) || (data26 === "boolean")) || (data26 === "array"))) {
|
|
11545
|
+
validate76.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" }];
|
|
11734
11546
|
return false;
|
|
11735
11547
|
}
|
|
11548
|
+
var valid13 = _errs66 === errors;
|
|
11736
11549
|
}
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11550
|
+
else {
|
|
11551
|
+
var valid13 = true;
|
|
11552
|
+
}
|
|
11553
|
+
if (valid13) {
|
|
11554
|
+
if (data25.items !== undefined) {
|
|
11555
|
+
let data27 = data25.items;
|
|
11556
|
+
const _errs67 = errors;
|
|
11557
|
+
if (errors === _errs67) {
|
|
11558
|
+
if (data27 && typeof data27 == "object" && !Array.isArray(data27)) {
|
|
11559
|
+
if (data27.type !== undefined) {
|
|
11560
|
+
let data28 = data27.type;
|
|
11561
|
+
const _errs69 = errors;
|
|
11562
|
+
if (!(((data28 === "string") || (data28 === "number")) || (data28 === "integer"))) {
|
|
11563
|
+
validate76.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" }];
|
|
11564
|
+
return false;
|
|
11565
|
+
}
|
|
11566
|
+
var valid14 = _errs69 === errors;
|
|
11567
|
+
}
|
|
11568
|
+
else {
|
|
11569
|
+
var valid14 = true;
|
|
11570
|
+
}
|
|
11571
|
+
if (valid14) {
|
|
11572
|
+
var props3 = {};
|
|
11573
|
+
props3.type = true;
|
|
11574
|
+
for (const key8 in data27) {
|
|
11575
|
+
if (pattern47.test(key8)) {
|
|
11576
|
+
props3[key8] = true;
|
|
11577
|
+
}
|
|
11578
|
+
}
|
|
11754
11579
|
}
|
|
11755
|
-
var valid15 = _errs62 === errors;
|
|
11756
11580
|
}
|
|
11757
11581
|
else {
|
|
11758
|
-
|
|
11582
|
+
validate76.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" }];
|
|
11583
|
+
return false;
|
|
11759
11584
|
}
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11585
|
+
}
|
|
11586
|
+
var valid13 = _errs67 === errors;
|
|
11587
|
+
}
|
|
11588
|
+
else {
|
|
11589
|
+
var valid13 = true;
|
|
11590
|
+
}
|
|
11591
|
+
if (valid13) {
|
|
11592
|
+
if (data25.contains !== undefined) {
|
|
11593
|
+
let data29 = data25.contains;
|
|
11594
|
+
const _errs70 = errors;
|
|
11595
|
+
if (errors === _errs70) {
|
|
11596
|
+
if (data29 && typeof data29 == "object" && !Array.isArray(data29)) {
|
|
11597
|
+
if (data29.type !== undefined) {
|
|
11598
|
+
let data30 = data29.type;
|
|
11599
|
+
const _errs72 = errors;
|
|
11600
|
+
if (!(((data30 === "string") || (data30 === "number")) || (data30 === "integer"))) {
|
|
11601
|
+
validate76.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" }];
|
|
11602
|
+
return false;
|
|
11603
|
+
}
|
|
11604
|
+
var valid16 = _errs72 === errors;
|
|
11605
|
+
}
|
|
11606
|
+
else {
|
|
11607
|
+
var valid16 = true;
|
|
11608
|
+
}
|
|
11609
|
+
if (valid16) {
|
|
11610
|
+
var props4 = {};
|
|
11611
|
+
props4.type = true;
|
|
11612
|
+
for (const key9 in data29) {
|
|
11613
|
+
if (pattern47.test(key9)) {
|
|
11614
|
+
props4[key9] = true;
|
|
11615
|
+
}
|
|
11616
|
+
}
|
|
11766
11617
|
}
|
|
11767
11618
|
}
|
|
11619
|
+
else {
|
|
11620
|
+
validate76.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" }];
|
|
11621
|
+
return false;
|
|
11622
|
+
}
|
|
11768
11623
|
}
|
|
11624
|
+
var valid13 = _errs70 === errors;
|
|
11769
11625
|
}
|
|
11770
11626
|
else {
|
|
11771
|
-
|
|
11772
|
-
return false;
|
|
11627
|
+
var valid13 = true;
|
|
11773
11628
|
}
|
|
11774
11629
|
}
|
|
11775
|
-
var valid12 = _errs60 === errors;
|
|
11776
|
-
}
|
|
11777
|
-
else {
|
|
11778
|
-
var valid12 = true;
|
|
11779
11630
|
}
|
|
11780
11631
|
}
|
|
11781
11632
|
}
|
|
11633
|
+
else {
|
|
11634
|
+
validate76.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" }];
|
|
11635
|
+
return false;
|
|
11636
|
+
}
|
|
11782
11637
|
}
|
|
11783
|
-
|
|
11784
|
-
else {
|
|
11785
|
-
validate76.errors = [{ instancePath: instancePath + "/$tags/" + key5.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" }];
|
|
11786
|
-
return false;
|
|
11638
|
+
props2[key6] = true;
|
|
11787
11639
|
}
|
|
11788
11640
|
}
|
|
11789
|
-
props2[key5] = true;
|
|
11790
11641
|
}
|
|
11791
11642
|
}
|
|
11792
11643
|
}
|
|
11793
11644
|
}
|
|
11645
|
+
else {
|
|
11646
|
+
validate76.errors = [{ instancePath: instancePath + "/$tags", schemaPath: "#/properties/%24tags/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
|
|
11647
|
+
return false;
|
|
11648
|
+
}
|
|
11794
11649
|
}
|
|
11650
|
+
var valid0 = _errs55 === errors;
|
|
11795
11651
|
}
|
|
11796
11652
|
else {
|
|
11797
|
-
|
|
11798
|
-
return false;
|
|
11653
|
+
var valid0 = true;
|
|
11799
11654
|
}
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
}
|
|
11815
|
-
var valid17 = _errs63 === errors;
|
|
11816
|
-
if (!valid17) {
|
|
11817
|
-
break;
|
|
11655
|
+
if (valid0) {
|
|
11656
|
+
var valid18 = true;
|
|
11657
|
+
for (const key10 in data) {
|
|
11658
|
+
if (pattern43.test(key10)) {
|
|
11659
|
+
const _errs73 = errors;
|
|
11660
|
+
if (!(wrapper2.validate(data[key10], { instancePath: instancePath + "/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"), parentData: data, parentDataProperty: key10, rootData, dynamicAnchors }))) {
|
|
11661
|
+
vErrors = vErrors === null ? wrapper2.validate.errors : vErrors.concat(wrapper2.validate.errors);
|
|
11662
|
+
errors = vErrors.length;
|
|
11663
|
+
}
|
|
11664
|
+
var valid18 = _errs73 === errors;
|
|
11665
|
+
if (!valid18) {
|
|
11666
|
+
break;
|
|
11667
|
+
}
|
|
11668
|
+
}
|
|
11818
11669
|
}
|
|
11819
11670
|
}
|
|
11820
11671
|
}
|