@party-stack/ontology 0.19.0 → 0.20.0
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/lib/OntologyPullConfig.d.ts +15 -13
- package/lib/OntologyPullConfig.d.ts.map +1 -1
- package/lib/OntologyPullConfig.js +0 -1
- package/lib/cli/format.d.ts +4 -0
- package/lib/cli/format.d.ts.map +1 -0
- package/lib/cli/format.js +19 -0
- package/lib/cli/format.js.map +1 -0
- package/lib/cli/generate.d.ts +6 -5
- package/lib/cli/generate.d.ts.map +1 -1
- package/lib/cli/generate.js +86 -110
- package/lib/cli/generate.js.map +1 -1
- package/lib/cli/index.d.ts +1 -3
- package/lib/cli/index.js +42 -59
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/pull.d.ts +3 -1
- package/lib/cli/pull.d.ts.map +1 -1
- package/lib/cli/pull.js +42 -60
- package/lib/cli/pull.js.map +1 -1
- package/lib/examples/blog.d.ts +347 -345
- package/lib/examples/blog.d.ts.map +1 -1
- package/lib/examples/blog.js +350 -337
- package/lib/examples/blog.js.map +1 -1
- package/lib/examples/blog.live-queries.d.ts +8 -3
- package/lib/examples/blog.live-queries.d.ts.map +1 -1
- package/lib/examples/blog.live-queries.js +28 -44
- package/lib/examples/blog.live-queries.js.map +1 -1
- package/lib/examples/generated/constants.d.ts +1 -2
- package/lib/examples/generated/constants.js +0 -2
- package/lib/examples/generated/live.d.ts +5 -3
- package/lib/examples/generated/live.d.ts.map +1 -1
- package/lib/examples/generated/live.js +12 -8
- package/lib/examples/generated/live.js.map +1 -1
- package/lib/examples/generated/types.d.ts +52 -50
- package/lib/examples/generated/types.d.ts.map +1 -1
- package/lib/examples/generated/types.js +0 -2
- package/lib/generate/builders.d.ts +8 -5
- package/lib/generate/builders.d.ts.map +1 -1
- package/lib/generate/builders.js +53 -55
- package/lib/generate/builders.js.map +1 -1
- package/lib/generate/constants.d.ts +3 -1
- package/lib/generate/constants.d.ts.map +1 -1
- package/lib/generate/constants.js +23 -26
- package/lib/generate/constants.js.map +1 -1
- package/lib/generate/index.d.ts +6 -6
- package/lib/generate/index.js +6 -6
- package/lib/generate/live.d.ts +8 -6
- package/lib/generate/live.d.ts.map +1 -1
- package/lib/generate/live.js +43 -42
- package/lib/generate/live.js.map +1 -1
- package/lib/generate/ontology.d.ts +4 -2
- package/lib/generate/ontology.d.ts.map +1 -1
- package/lib/generate/ontology.js +453 -354
- package/lib/generate/ontology.js.map +1 -1
- package/lib/generate/types.d.ts +7 -5
- package/lib/generate/types.d.ts.map +1 -1
- package/lib/generate/types.js +190 -262
- package/lib/generate/types.js.map +1 -1
- package/lib/generate/utils/buildJsDocs.d.ts +7 -4
- package/lib/generate/utils/buildJsDocs.d.ts.map +1 -1
- package/lib/generate/utils/buildJsDocs.js +14 -10
- package/lib/generate/utils/buildJsDocs.js.map +1 -1
- package/lib/index.d.ts +30 -13
- package/lib/index.js +18 -10
- package/lib/infer.d.ts +129 -151
- package/lib/infer.d.ts.map +1 -1
- package/lib/infer.js +10 -6
- package/lib/infer.js.map +1 -1
- package/lib/installation/createMetaOntologyConfiguration.d.ts +6 -3
- package/lib/installation/createMetaOntologyConfiguration.d.ts.map +1 -1
- package/lib/installation/createMetaOntologyConfiguration.js +13 -11
- package/lib/installation/createMetaOntologyConfiguration.js.map +1 -1
- package/lib/installation/createOntologyBackendInstallation.d.ts +3 -1
- package/lib/installation/createOntologyBackendInstallation.d.ts.map +1 -1
- package/lib/installation/createOntologyBackendInstallation.js +205 -268
- package/lib/installation/createOntologyBackendInstallation.js.map +1 -1
- package/lib/installation/index.d.ts +4 -4
- package/lib/installation/index.js +3 -3
- package/lib/installation/types.d.ts +83 -80
- package/lib/installation/types.d.ts.map +1 -1
- package/lib/installation/types.js +0 -1
- package/lib/ir/generated/builders.d.ts +294 -382
- package/lib/ir/generated/builders.d.ts.map +1 -1
- package/lib/ir/generated/builders.js +180 -119
- package/lib/ir/generated/builders.js.map +1 -1
- package/lib/ir/generated/constants.d.ts +137 -135
- package/lib/ir/generated/constants.d.ts.map +1 -1
- package/lib/ir/generated/constants.js +162 -129
- package/lib/ir/generated/constants.js.map +1 -1
- package/lib/ir/generated/types.d.ts +236 -234
- package/lib/ir/generated/types.d.ts.map +1 -1
- package/lib/ir/generated/types.js +0 -2
- package/lib/ir/index.d.ts +4 -4
- package/lib/ir/index.js +3 -4
- package/lib/ir/schema.d.ts +2174 -2172
- package/lib/ir/schema.d.ts.map +1 -1
- package/lib/ir/schema.js +1184 -1343
- package/lib/ir/schema.js.map +1 -1
- package/lib/ir/validate.d.ts +5 -3
- package/lib/ir/validate.d.ts.map +1 -1
- package/lib/ir/validate.js +589 -707
- package/lib/ir/validate.js.map +1 -1
- package/lib/json/index.d.ts +10 -8
- package/lib/json/index.d.ts.map +1 -1
- package/lib/json/index.js +101 -135
- package/lib/json/index.js.map +1 -1
- package/lib/lenses.d.ts +7 -4
- package/lib/lenses.d.ts.map +1 -1
- package/lib/lenses.js +96 -132
- package/lib/lenses.js.map +1 -1
- package/lib/live/LiveOntology.d.ts +55 -60
- package/lib/live/LiveOntology.d.ts.map +1 -1
- package/lib/live/LiveOntology.js +98 -124
- package/lib/live/LiveOntology.js.map +1 -1
- package/lib/live/OntologyBackendAdapter.d.ts +84 -77
- package/lib/live/OntologyBackendAdapter.d.ts.map +1 -1
- package/lib/live/OntologyBackendAdapter.js +0 -1
- package/lib/live/actions/createLiveOntologyAction.d.ts +27 -24
- package/lib/live/actions/createLiveOntologyAction.d.ts.map +1 -1
- package/lib/live/actions/createLiveOntologyAction.js +24 -21
- package/lib/live/actions/createLiveOntologyAction.js.map +1 -1
- package/lib/live/actions/createLiveOntologyActions.d.ts +23 -20
- package/lib/live/actions/createLiveOntologyActions.d.ts.map +1 -1
- package/lib/live/actions/createLiveOntologyActions.js +131 -161
- package/lib/live/actions/createLiveOntologyActions.js.map +1 -1
- package/lib/live/actions/prepareActionParameters.d.ts +14 -11
- package/lib/live/actions/prepareActionParameters.d.ts.map +1 -1
- package/lib/live/actions/prepareActionParameters.js +190 -228
- package/lib/live/actions/prepareActionParameters.js.map +1 -1
- package/lib/live/attachments/attachmentSources.d.ts +7 -4
- package/lib/live/attachments/attachmentSources.d.ts.map +1 -1
- package/lib/live/attachments/attachmentSources.js +55 -71
- package/lib/live/attachments/attachmentSources.js.map +1 -1
- package/lib/live/attachments/createLiveOntologyAttachments.d.ts +47 -44
- package/lib/live/attachments/createLiveOntologyAttachments.d.ts.map +1 -1
- package/lib/live/attachments/createLiveOntologyAttachments.js +65 -83
- package/lib/live/attachments/createLiveOntologyAttachments.js.map +1 -1
- package/lib/live/attachments/types.d.ts +10 -8
- package/lib/live/attachments/types.d.ts.map +1 -1
- package/lib/live/attachments/types.js +0 -1
- package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.d.ts +3 -1
- package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.d.ts.map +1 -1
- package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.js +5 -3
- package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.js.map +1 -1
- package/lib/live/expression.d.ts +16 -13
- package/lib/live/expression.d.ts.map +1 -1
- package/lib/live/expression.js +142 -223
- package/lib/live/expression.js.map +1 -1
- package/lib/live/index.d.ts +12 -9
- package/lib/live/index.js +6 -8
- package/lib/live/mutators/OntologyEdits.d.ts +12 -9
- package/lib/live/mutators/OntologyEdits.d.ts.map +1 -1
- package/lib/live/mutators/OntologyEdits.js +57 -74
- package/lib/live/mutators/OntologyEdits.js.map +1 -1
- package/lib/live/mutators/createMutatorTx.d.ts +7 -5
- package/lib/live/mutators/createMutatorTx.d.ts.map +1 -1
- package/lib/live/mutators/createMutatorTx.js +53 -69
- package/lib/live/mutators/createMutatorTx.js.map +1 -1
- package/lib/live/mutators/runOptimisticAction.d.ts +16 -13
- package/lib/live/mutators/runOptimisticAction.d.ts.map +1 -1
- package/lib/live/mutators/runOptimisticAction.js +26 -26
- package/lib/live/mutators/runOptimisticAction.js.map +1 -1
- package/lib/live/mutators/types.d.ts +18 -16
- package/lib/live/mutators/types.d.ts.map +1 -1
- package/lib/live/mutators/types.js +0 -1
- package/lib/live/objects/OntologyObject.d.ts +2 -0
- package/lib/live/objects/OntologyObject.d.ts.map +1 -1
- package/lib/live/objects/OntologyObject.js +0 -1
- package/lib/live/objects/createLiveOntologyObjectCollection.d.ts +14 -11
- package/lib/live/objects/createLiveOntologyObjectCollection.d.ts.map +1 -1
- package/lib/live/objects/createLiveOntologyObjectCollection.js +62 -49
- package/lib/live/objects/createLiveOntologyObjectCollection.js.map +1 -1
- package/lib/live/objects/ontologyObjectCollectionId.d.ts +2 -0
- package/lib/live/objects/ontologyObjectCollectionId.d.ts.map +1 -1
- package/lib/live/objects/ontologyObjectCollectionId.js +6 -2
- package/lib/live/objects/ontologyObjectCollectionId.js.map +1 -1
- package/lib/live/outbox/createOntologyOutbox.d.ts +16 -14
- package/lib/live/outbox/createOntologyOutbox.d.ts.map +1 -1
- package/lib/live/outbox/createOntologyOutbox.js +275 -326
- package/lib/live/outbox/createOntologyOutbox.js.map +1 -1
- package/lib/live/outbox/leaderExecutor.d.ts +15 -13
- package/lib/live/outbox/leaderExecutor.d.ts.map +1 -1
- package/lib/live/outbox/leaderExecutor.js +114 -153
- package/lib/live/outbox/leaderExecutor.js.map +1 -1
- package/lib/live/outbox/outboxService.d.ts +4 -2
- package/lib/live/outbox/outboxService.d.ts.map +1 -1
- package/lib/live/outbox/outboxService.js +66 -71
- package/lib/live/outbox/outboxService.js.map +1 -1
- package/lib/live/outbox/projectionManager.d.ts +26 -24
- package/lib/live/outbox/projectionManager.d.ts.map +1 -1
- package/lib/live/outbox/projectionManager.js +121 -147
- package/lib/live/outbox/projectionManager.js.map +1 -1
- package/lib/live/outbox/repository.d.ts +27 -25
- package/lib/live/outbox/repository.d.ts.map +1 -1
- package/lib/live/outbox/repository.js +192 -241
- package/lib/live/outbox/repository.js.map +1 -1
- package/lib/live/outbox/service.d.ts +52 -50
- package/lib/live/outbox/service.d.ts.map +1 -1
- package/lib/live/outbox/service.js +5 -1
- package/lib/live/outbox/service.js.map +1 -1
- package/lib/live/outbox/types.d.ts +35 -33
- package/lib/live/outbox/types.d.ts.map +1 -1
- package/lib/live/outbox/types.js +10 -6
- package/lib/live/outbox/types.js.map +1 -1
- package/lib/live/waitForCollectionReady.d.ts +3 -1
- package/lib/live/waitForCollectionReady.d.ts.map +1 -1
- package/lib/live/waitForCollectionReady.js +44 -65
- package/lib/live/waitForCollectionReady.js.map +1 -1
- package/lib/meta/createLocalMetaOntologyBackendAdapter.d.ts +5 -2
- package/lib/meta/createLocalMetaOntologyBackendAdapter.d.ts.map +1 -1
- package/lib/meta/createLocalMetaOntologyBackendAdapter.js +37 -39
- package/lib/meta/createLocalMetaOntologyBackendAdapter.js.map +1 -1
- package/lib/meta/generated/constants.d.ts +137 -135
- package/lib/meta/generated/constants.d.ts.map +1 -1
- package/lib/meta/generated/constants.js +162 -129
- package/lib/meta/generated/constants.js.map +1 -1
- package/lib/meta/generated/live.d.ts +5 -2
- package/lib/meta/generated/live.d.ts.map +1 -1
- package/lib/meta/generated/live.js +12 -8
- package/lib/meta/generated/live.js.map +1 -1
- package/lib/meta/generated/types.d.ts +233 -231
- package/lib/meta/generated/types.d.ts.map +1 -1
- package/lib/meta/generated/types.js +0 -2
- package/lib/meta/ontology.d.ts +23 -21
- package/lib/meta/ontology.d.ts.map +1 -1
- package/lib/meta/ontology.js +100 -104
- package/lib/meta/ontology.js.map +1 -1
- package/lib/meta/pull.d.ts +8 -6
- package/lib/meta/pull.d.ts.map +1 -1
- package/lib/meta/pull.js +39 -52
- package/lib/meta/pull.js.map +1 -1
- package/lib/utils/index.d.ts +8 -8
- package/lib/utils/index.js +5 -6
- package/lib/utils/links.d.ts +34 -31
- package/lib/utils/links.d.ts.map +1 -1
- package/lib/utils/links.js +10 -17
- package/lib/utils/links.js.map +1 -1
- package/lib/utils/paths.d.ts +2 -0
- package/lib/utils/paths.d.ts.map +1 -1
- package/lib/utils/paths.js +32 -44
- package/lib/utils/paths.js.map +1 -1
- package/lib/utils/provide.d.ts +2 -0
- package/lib/utils/provide.d.ts.map +1 -1
- package/lib/utils/provide.js +7 -9
- package/lib/utils/provide.js.map +1 -1
- package/lib/utils/targets.d.ts +20 -18
- package/lib/utils/targets.d.ts.map +1 -1
- package/lib/utils/targets.js +0 -1
- package/lib/utils/typeNames.d.ts +10 -8
- package/lib/utils/typeNames.d.ts.map +1 -1
- package/lib/utils/typeNames.js +0 -1
- package/lib/utils/types.d.ts +6 -4
- package/lib/utils/types.d.ts.map +1 -1
- package/lib/utils/types.js +38 -38
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/uncertain.d.ts +5 -3
- package/lib/utils/uncertain.d.ts.map +1 -1
- package/lib/utils/uncertain.js +11 -9
- package/lib/utils/uncertain.js.map +1 -1
- package/lib/utils/validation.d.ts +4 -2
- package/lib/utils/validation.d.ts.map +1 -1
- package/lib/utils/validation.js +0 -1
- package/lib/utils/values.d.ts +18 -18
- package/lib/utils/values.d.ts.map +1 -1
- package/lib/utils/values.js +0 -1
- package/package.json +22 -26
- package/lib/OntologyPullConfig.js.map +0 -1
- package/lib/cli/index.d.ts.map +0 -1
- package/lib/cli/index.test.d.ts +0 -2
- package/lib/cli/index.test.d.ts.map +0 -1
- package/lib/cli/index.test.js +0 -34
- package/lib/cli/index.test.js.map +0 -1
- package/lib/cli/pull.test.d.ts +0 -2
- package/lib/cli/pull.test.d.ts.map +0 -1
- package/lib/cli/pull.test.js +0 -125
- package/lib/cli/pull.test.js.map +0 -1
- package/lib/examples/generated/constants.d.ts.map +0 -1
- package/lib/examples/generated/constants.js.map +0 -1
- package/lib/examples/generated/types.js.map +0 -1
- package/lib/generate/builders.test.d.ts +0 -2
- package/lib/generate/builders.test.d.ts.map +0 -1
- package/lib/generate/builders.test.js +0 -49
- package/lib/generate/builders.test.js.map +0 -1
- package/lib/generate/index.d.ts.map +0 -1
- package/lib/generate/index.js.map +0 -1
- package/lib/generate/live.test.d.ts +0 -2
- package/lib/generate/live.test.d.ts.map +0 -1
- package/lib/generate/live.test.js +0 -22
- package/lib/generate/live.test.js.map +0 -1
- package/lib/generate/ontology.test.d.ts +0 -2
- package/lib/generate/ontology.test.d.ts.map +0 -1
- package/lib/generate/ontology.test.js +0 -157
- package/lib/generate/ontology.test.js.map +0 -1
- package/lib/generate/types.test.d.ts +0 -2
- package/lib/generate/types.test.d.ts.map +0 -1
- package/lib/generate/types.test.js +0 -304
- package/lib/generate/types.test.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/infer.test.d.ts +0 -2
- package/lib/infer.test.d.ts.map +0 -1
- package/lib/infer.test.js +0 -125
- package/lib/infer.test.js.map +0 -1
- package/lib/installation/createMetaOntologyConfiguration.test.d.ts +0 -2
- package/lib/installation/createMetaOntologyConfiguration.test.d.ts.map +0 -1
- package/lib/installation/createMetaOntologyConfiguration.test.js +0 -20
- package/lib/installation/createMetaOntologyConfiguration.test.js.map +0 -1
- package/lib/installation/createOntologyBackendInstallation.test.d.ts +0 -2
- package/lib/installation/createOntologyBackendInstallation.test.d.ts.map +0 -1
- package/lib/installation/createOntologyBackendInstallation.test.js +0 -320
- package/lib/installation/createOntologyBackendInstallation.test.js.map +0 -1
- package/lib/installation/index.d.ts.map +0 -1
- package/lib/installation/index.js.map +0 -1
- package/lib/installation/types.js.map +0 -1
- package/lib/ir/generated/types.js.map +0 -1
- package/lib/ir/index.d.ts.map +0 -1
- package/lib/ir/index.js.map +0 -1
- package/lib/ir/validate.test.d.ts +0 -2
- package/lib/ir/validate.test.d.ts.map +0 -1
- package/lib/ir/validate.test.js +0 -1061
- package/lib/ir/validate.test.js.map +0 -1
- package/lib/json/index.test.d.ts +0 -2
- package/lib/json/index.test.d.ts.map +0 -1
- package/lib/json/index.test.js +0 -142
- package/lib/json/index.test.js.map +0 -1
- package/lib/lenses.test.d.ts +0 -2
- package/lib/lenses.test.d.ts.map +0 -1
- package/lib/lenses.test.js +0 -80
- package/lib/lenses.test.js.map +0 -1
- package/lib/live/LiveOntology.test.d.ts +0 -2
- package/lib/live/LiveOntology.test.d.ts.map +0 -1
- package/lib/live/LiveOntology.test.js +0 -507
- package/lib/live/LiveOntology.test.js.map +0 -1
- package/lib/live/OntologyBackendAdapter.js.map +0 -1
- package/lib/live/actions/createLiveOntologyAction.test.d.ts +0 -2
- package/lib/live/actions/createLiveOntologyAction.test.d.ts.map +0 -1
- package/lib/live/actions/createLiveOntologyAction.test.js +0 -232
- package/lib/live/actions/createLiveOntologyAction.test.js.map +0 -1
- package/lib/live/actions/prepareActionParameters.test.d.ts +0 -2
- package/lib/live/actions/prepareActionParameters.test.d.ts.map +0 -1
- package/lib/live/actions/prepareActionParameters.test.js +0 -165
- package/lib/live/actions/prepareActionParameters.test.js.map +0 -1
- package/lib/live/attachments/attachmentMetadata.test.d.ts +0 -2
- package/lib/live/attachments/attachmentMetadata.test.d.ts.map +0 -1
- package/lib/live/attachments/attachmentMetadata.test.js +0 -73
- package/lib/live/attachments/attachmentMetadata.test.js.map +0 -1
- package/lib/live/attachments/createLiveOntologyAttachments.test.d.ts +0 -2
- package/lib/live/attachments/createLiveOntologyAttachments.test.d.ts.map +0 -1
- package/lib/live/attachments/createLiveOntologyAttachments.test.js +0 -363
- package/lib/live/attachments/createLiveOntologyAttachments.test.js.map +0 -1
- package/lib/live/attachments/types.js.map +0 -1
- package/lib/live/expression.test.d.ts +0 -2
- package/lib/live/expression.test.d.ts.map +0 -1
- package/lib/live/expression.test.js +0 -311
- package/lib/live/expression.test.js.map +0 -1
- package/lib/live/index.d.ts.map +0 -1
- package/lib/live/index.js.map +0 -1
- package/lib/live/mutators/OntologyEdits.test.d.ts +0 -2
- package/lib/live/mutators/OntologyEdits.test.d.ts.map +0 -1
- package/lib/live/mutators/OntologyEdits.test.js +0 -85
- package/lib/live/mutators/OntologyEdits.test.js.map +0 -1
- package/lib/live/mutators/createMutatorTx.test.d.ts +0 -2
- package/lib/live/mutators/createMutatorTx.test.d.ts.map +0 -1
- package/lib/live/mutators/createMutatorTx.test.js +0 -180
- package/lib/live/mutators/createMutatorTx.test.js.map +0 -1
- package/lib/live/mutators/types.js.map +0 -1
- package/lib/live/objects/OntologyObject.js.map +0 -1
- package/lib/live/objects/createLiveOntologyObjectCollection.test.d.ts +0 -2
- package/lib/live/objects/createLiveOntologyObjectCollection.test.d.ts.map +0 -1
- package/lib/live/objects/createLiveOntologyObjectCollection.test.js +0 -310
- package/lib/live/objects/createLiveOntologyObjectCollection.test.js.map +0 -1
- package/lib/live/outbox/createOntologyOutbox.test.d.ts +0 -2
- package/lib/live/outbox/createOntologyOutbox.test.d.ts.map +0 -1
- package/lib/live/outbox/createOntologyOutbox.test.js +0 -1030
- package/lib/live/outbox/createOntologyOutbox.test.js.map +0 -1
- package/lib/meta/generated/types.js.map +0 -1
- package/lib/meta/ontology.test.d.ts +0 -2
- package/lib/meta/ontology.test.d.ts.map +0 -1
- package/lib/meta/ontology.test.js +0 -84
- package/lib/meta/ontology.test.js.map +0 -1
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/links.test.d.ts +0 -2
- package/lib/utils/links.test.d.ts.map +0 -1
- package/lib/utils/links.test.js +0 -109
- package/lib/utils/links.test.js.map +0 -1
- package/lib/utils/paths.test.d.ts +0 -2
- package/lib/utils/paths.test.d.ts.map +0 -1
- package/lib/utils/paths.test.js +0 -33
- package/lib/utils/paths.test.js.map +0 -1
- package/lib/utils/targets.js.map +0 -1
- package/lib/utils/typeNames.js.map +0 -1
- package/lib/utils/types.test.d.ts +0 -2
- package/lib/utils/types.test.d.ts.map +0 -1
- package/lib/utils/types.test.js +0 -157
- package/lib/utils/types.test.js.map +0 -1
- package/lib/utils/uncertain.test.d.ts +0 -2
- package/lib/utils/uncertain.test.d.ts.map +0 -1
- package/lib/utils/uncertain.test.js +0 -14
- package/lib/utils/uncertain.test.js.map +0 -1
- package/lib/utils/validation.js.map +0 -1
- package/lib/utils/values.js.map +0 -1
package/lib/examples/blog.js
CHANGED
|
@@ -1,340 +1,353 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Example: Blog ontology with Authors, Posts, and Comments.
|
|
3
|
-
*
|
|
4
|
-
* Demonstrates:
|
|
5
|
-
* - Object types with primary keys and typed properties
|
|
6
|
-
* - Value types (reusable structured types)
|
|
7
|
-
* - Link types with cardinality
|
|
8
|
-
* - Attachment properties (e.g. author avatar)
|
|
9
|
-
* - String enum constraints (e.g. post status)
|
|
10
|
-
* - Optional properties and timestamps
|
|
11
|
-
*/
|
|
12
1
|
import { o } from "../ir/generated/builders.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
2
|
+
//#region src/examples/blog.ts
|
|
3
|
+
/**
|
|
4
|
+
* Example: Blog ontology with Authors, Posts, and Comments.
|
|
5
|
+
*
|
|
6
|
+
* Demonstrates:
|
|
7
|
+
* - Object types with primary keys and typed properties
|
|
8
|
+
* - Value types (reusable structured types)
|
|
9
|
+
* - Link types with cardinality
|
|
10
|
+
* - Attachment properties (e.g. author avatar)
|
|
11
|
+
* - String enum constraints (e.g. post status)
|
|
12
|
+
* - Optional properties and timestamps
|
|
13
|
+
*/
|
|
14
|
+
var blog_default = {
|
|
15
|
+
types: [{
|
|
16
|
+
name: "Address",
|
|
17
|
+
description: "A mailing address.",
|
|
18
|
+
type: o.struct({ fields: [
|
|
19
|
+
{
|
|
20
|
+
name: "line1",
|
|
21
|
+
displayName: "Line 1",
|
|
22
|
+
type: o.string({})
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "line2",
|
|
26
|
+
displayName: "Line 2",
|
|
27
|
+
type: o.optional({ type: o.string({}) })
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "city",
|
|
31
|
+
displayName: "City",
|
|
32
|
+
type: o.string({})
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "state",
|
|
36
|
+
displayName: "State",
|
|
37
|
+
type: o.string({})
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "zip",
|
|
41
|
+
displayName: "ZIP",
|
|
42
|
+
type: o.string({})
|
|
43
|
+
}
|
|
44
|
+
] })
|
|
45
|
+
}],
|
|
46
|
+
objectTypes: [
|
|
47
|
+
{
|
|
48
|
+
name: "Author",
|
|
49
|
+
displayName: "Author",
|
|
50
|
+
pluralDisplayName: "Authors",
|
|
51
|
+
description: "A blog author.",
|
|
52
|
+
primaryKey: "authorId",
|
|
53
|
+
properties: [
|
|
54
|
+
{
|
|
55
|
+
name: "authorId",
|
|
56
|
+
displayName: "Author ID",
|
|
57
|
+
type: o.string({})
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "name",
|
|
61
|
+
displayName: "Name",
|
|
62
|
+
type: o.string({})
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "email",
|
|
66
|
+
displayName: "Email",
|
|
67
|
+
type: o.string({})
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "bio",
|
|
71
|
+
displayName: "Bio",
|
|
72
|
+
type: o.optional({ type: o.string({}) })
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "avatar",
|
|
76
|
+
displayName: "Avatar",
|
|
77
|
+
description: "The author's profile picture.",
|
|
78
|
+
type: o.optional({ type: o.attachment({}) })
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "address",
|
|
82
|
+
displayName: "Address",
|
|
83
|
+
type: o.optional({ type: o.ref({ name: "Address" }) })
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "createdAt",
|
|
87
|
+
displayName: "Created At",
|
|
88
|
+
type: o.timestamp({})
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "Post",
|
|
94
|
+
displayName: "Blog Post",
|
|
95
|
+
pluralDisplayName: "Posts",
|
|
96
|
+
description: "A blog post.",
|
|
97
|
+
primaryKey: "postId",
|
|
98
|
+
properties: [
|
|
99
|
+
{
|
|
100
|
+
name: "postId",
|
|
101
|
+
displayName: "Post ID",
|
|
102
|
+
type: o.string({})
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "title",
|
|
106
|
+
displayName: "Title",
|
|
107
|
+
type: o.string({})
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "body",
|
|
111
|
+
displayName: "Body",
|
|
112
|
+
type: o.string({})
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "authorId",
|
|
116
|
+
displayName: "Author ID",
|
|
117
|
+
type: o.string({})
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "status",
|
|
121
|
+
displayName: "Status",
|
|
122
|
+
type: o.string({ constraint: o.StringConstraint.enum({ options: [
|
|
123
|
+
{
|
|
124
|
+
value: "draft",
|
|
125
|
+
label: "Draft"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
value: "published",
|
|
129
|
+
label: "Published"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
value: "archived",
|
|
133
|
+
label: "Archived"
|
|
134
|
+
}
|
|
135
|
+
] }) })
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "coverImage",
|
|
139
|
+
displayName: "Cover Image",
|
|
140
|
+
type: o.optional({ type: o.attachment({}) })
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "tags",
|
|
144
|
+
displayName: "Tags",
|
|
145
|
+
type: o.list({ elementType: o.string({}) })
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "createdAt",
|
|
149
|
+
displayName: "Created At",
|
|
150
|
+
type: o.timestamp({})
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "publishedAt",
|
|
154
|
+
displayName: "Published At",
|
|
155
|
+
type: o.optional({ type: o.timestamp({}) })
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "Comment",
|
|
161
|
+
displayName: "Comment",
|
|
162
|
+
pluralDisplayName: "Comments",
|
|
163
|
+
description: "A comment on a blog post.",
|
|
164
|
+
primaryKey: "commentId",
|
|
165
|
+
properties: [
|
|
166
|
+
{
|
|
167
|
+
name: "commentId",
|
|
168
|
+
displayName: "Comment ID",
|
|
169
|
+
type: o.string({})
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "body",
|
|
173
|
+
displayName: "Body",
|
|
174
|
+
type: o.string({})
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "postId",
|
|
178
|
+
displayName: "Post ID",
|
|
179
|
+
type: o.string({})
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "authorId",
|
|
183
|
+
displayName: "Author ID",
|
|
184
|
+
type: o.string({})
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "createdAt",
|
|
188
|
+
displayName: "Created At",
|
|
189
|
+
type: o.timestamp({})
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
linkTypes: [
|
|
195
|
+
{
|
|
196
|
+
id: "Post:author",
|
|
197
|
+
source: {
|
|
198
|
+
objectType: "Post",
|
|
199
|
+
name: "posts",
|
|
200
|
+
displayName: "Posts"
|
|
201
|
+
},
|
|
202
|
+
target: {
|
|
203
|
+
objectType: "Author",
|
|
204
|
+
name: "author",
|
|
205
|
+
displayName: "Author"
|
|
206
|
+
},
|
|
207
|
+
foreignKey: "authorId",
|
|
208
|
+
cardinality: "many"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: "Comment:post",
|
|
212
|
+
source: {
|
|
213
|
+
objectType: "Comment",
|
|
214
|
+
name: "comments",
|
|
215
|
+
displayName: "Comments"
|
|
216
|
+
},
|
|
217
|
+
target: {
|
|
218
|
+
objectType: "Post",
|
|
219
|
+
name: "post",
|
|
220
|
+
displayName: "Post"
|
|
221
|
+
},
|
|
222
|
+
foreignKey: "postId",
|
|
223
|
+
cardinality: "many"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "Comment:author",
|
|
227
|
+
source: {
|
|
228
|
+
objectType: "Comment",
|
|
229
|
+
name: "comment",
|
|
230
|
+
displayName: "Comment"
|
|
231
|
+
},
|
|
232
|
+
target: {
|
|
233
|
+
objectType: "Author",
|
|
234
|
+
name: "author",
|
|
235
|
+
displayName: "Author"
|
|
236
|
+
},
|
|
237
|
+
foreignKey: "authorId",
|
|
238
|
+
cardinality: "one"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
actionTypes: [{
|
|
242
|
+
name: "createPost",
|
|
243
|
+
displayName: "Create Post",
|
|
244
|
+
description: "Create a new blog post.",
|
|
245
|
+
parameters: [
|
|
246
|
+
{
|
|
247
|
+
name: "postId",
|
|
248
|
+
displayName: "Post ID",
|
|
249
|
+
type: o.string({}),
|
|
250
|
+
defaultValue: o.Expression.uuid({})
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: "author",
|
|
254
|
+
displayName: "Author",
|
|
255
|
+
type: o.objectReference({ objectType: "Author" })
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "title",
|
|
259
|
+
displayName: "Title",
|
|
260
|
+
type: o.string({})
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "body",
|
|
264
|
+
displayName: "Body",
|
|
265
|
+
type: o.string({})
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
name: "status",
|
|
269
|
+
displayName: "Status",
|
|
270
|
+
type: o.string({ constraint: o.StringConstraint.enum({ options: [
|
|
271
|
+
{
|
|
272
|
+
value: "draft",
|
|
273
|
+
label: "Draft"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
value: "published",
|
|
277
|
+
label: "Published"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
value: "archived",
|
|
281
|
+
label: "Archived"
|
|
282
|
+
}
|
|
283
|
+
] }) })
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: "tags",
|
|
287
|
+
displayName: "Tags",
|
|
288
|
+
type: o.list({ elementType: o.string({}) })
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "createdAt",
|
|
292
|
+
displayName: "Created At",
|
|
293
|
+
type: o.timestamp({}),
|
|
294
|
+
defaultValue: o.Expression.now({})
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
logic: [o.ActionLogicStep.createObject({
|
|
298
|
+
objectType: "Post",
|
|
299
|
+
values: [
|
|
300
|
+
{
|
|
301
|
+
property: ["postId"],
|
|
302
|
+
value: o.Expression.inputReference({ name: "postId" })
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
property: ["title"],
|
|
306
|
+
value: o.Expression.inputReference({ name: "title" })
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
property: ["body"],
|
|
310
|
+
value: o.Expression.inputReference({ name: "body" })
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
property: ["authorId"],
|
|
314
|
+
value: o.Expression.getAt({
|
|
315
|
+
source: o.Expression.objectLookup({ reference: o.Expression.inputReference({ name: "author" }) }),
|
|
316
|
+
path: ["authorId"]
|
|
317
|
+
})
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
property: ["status"],
|
|
321
|
+
value: o.Expression.inputReference({ name: "status" })
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
property: ["tags"],
|
|
325
|
+
value: o.Expression.inputReference({ name: "tags" })
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
property: ["createdAt"],
|
|
329
|
+
value: o.Expression.inputReference({ name: "createdAt" })
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
})]
|
|
333
|
+
}],
|
|
334
|
+
queryFunctionTypes: [{
|
|
335
|
+
name: "searchPosts",
|
|
336
|
+
displayName: "Search Posts",
|
|
337
|
+
description: "Search blog posts by query text.",
|
|
338
|
+
parameters: [{
|
|
339
|
+
name: "query",
|
|
340
|
+
displayName: "Query",
|
|
341
|
+
type: o.string({})
|
|
342
|
+
}, {
|
|
343
|
+
name: "limit",
|
|
344
|
+
displayName: "Limit",
|
|
345
|
+
type: o.optional({ type: o.integer({}) })
|
|
346
|
+
}],
|
|
347
|
+
returnType: o.list({ elementType: o.objectReference({ objectType: "Post" }) })
|
|
348
|
+
}]
|
|
339
349
|
};
|
|
350
|
+
//#endregion
|
|
351
|
+
export { blog_default as default };
|
|
352
|
+
|
|
340
353
|
//# sourceMappingURL=blog.js.map
|