@dxos/echo 0.8.4-main.dedc0f3 → 0.8.4-main.e00bdcdb52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/lib/neutral/Annotation.mjs +37 -0
- package/dist/lib/neutral/Database.mjs +49 -0
- package/dist/lib/neutral/Entity.mjs +61 -0
- package/dist/lib/neutral/Entity.mjs.map +7 -0
- package/dist/lib/neutral/Err.mjs +12 -0
- package/dist/lib/neutral/Err.mjs.map +7 -0
- package/dist/lib/neutral/Extension.mjs +18 -0
- package/dist/lib/neutral/Extension.mjs.map +7 -0
- package/dist/lib/neutral/Feed.mjs +50 -0
- package/dist/lib/neutral/Feed.mjs.map +7 -0
- package/dist/lib/neutral/Filter.mjs +72 -0
- package/dist/lib/neutral/Filter.mjs.map +7 -0
- package/dist/lib/neutral/Format.mjs +66 -0
- package/dist/lib/neutral/Format.mjs.map +7 -0
- package/dist/lib/neutral/JsonSchema.mjs +19 -0
- package/dist/lib/neutral/JsonSchema.mjs.map +7 -0
- package/dist/lib/neutral/Key.mjs +12 -0
- package/dist/lib/neutral/Key.mjs.map +7 -0
- package/dist/lib/neutral/Migration.mjs +17 -0
- package/dist/lib/neutral/Migration.mjs.map +7 -0
- package/dist/lib/neutral/Obj.mjs +113 -0
- package/dist/lib/neutral/Obj.mjs.map +7 -0
- package/dist/lib/neutral/Order.mjs +12 -0
- package/dist/lib/neutral/Order.mjs.map +7 -0
- package/dist/lib/neutral/Query.mjs +38 -0
- package/dist/lib/neutral/Query.mjs.map +7 -0
- package/dist/lib/neutral/QueryResult.mjs +2 -0
- package/dist/lib/neutral/QueryResult.mjs.map +7 -0
- package/dist/lib/neutral/Ref.mjs +24 -0
- package/dist/lib/neutral/Ref.mjs.map +7 -0
- package/dist/lib/neutral/Relation.mjs +94 -0
- package/dist/lib/neutral/Relation.mjs.map +7 -0
- package/dist/lib/neutral/SchemaRegistry.mjs +2 -0
- package/dist/lib/neutral/SchemaRegistry.mjs.map +7 -0
- package/dist/lib/neutral/Tag.mjs +29 -0
- package/dist/lib/neutral/Tag.mjs.map +7 -0
- package/dist/lib/neutral/Type.mjs +37 -0
- package/dist/lib/neutral/Type.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2T22UGGN.mjs +206 -0
- package/dist/lib/neutral/chunk-2T22UGGN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-44HT3MEC.mjs +73 -0
- package/dist/lib/neutral/chunk-44HT3MEC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6VC3FI5E.mjs +125 -0
- package/dist/lib/neutral/chunk-6VC3FI5E.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7JFW72MX.mjs +132 -0
- package/dist/lib/neutral/chunk-7JFW72MX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7RVZT53K.mjs +21 -0
- package/dist/lib/neutral/chunk-7RVZT53K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BICZKPQG.mjs +7 -0
- package/dist/lib/neutral/chunk-BICZKPQG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CIWZ5MHQ.mjs +36 -0
- package/dist/lib/neutral/chunk-CIWZ5MHQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DUNXPKAC.mjs +56 -0
- package/dist/lib/neutral/chunk-DUNXPKAC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FAW7PJRO.mjs +34 -0
- package/dist/lib/neutral/chunk-FAW7PJRO.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FAYW32CW.mjs +27 -0
- package/dist/lib/neutral/chunk-FAYW32CW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GWFFC34K.mjs +50 -0
- package/dist/lib/neutral/chunk-GWFFC34K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-I2MFJ76N.mjs +354 -0
- package/dist/lib/neutral/chunk-I2MFJ76N.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JALF2CVV.mjs +345 -0
- package/dist/lib/neutral/chunk-JALF2CVV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KQUQZ3CB.mjs +128 -0
- package/dist/lib/neutral/chunk-KQUQZ3CB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LOTZLYHB.mjs +420 -0
- package/dist/lib/neutral/chunk-LOTZLYHB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-N4B7FHQT.mjs +67 -0
- package/dist/lib/neutral/chunk-N4B7FHQT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NKXEKBP5.mjs +81 -0
- package/dist/lib/neutral/chunk-NKXEKBP5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NSMLBSFS.mjs +270 -0
- package/dist/lib/neutral/chunk-NSMLBSFS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QBIGOSRF.mjs +45 -0
- package/dist/lib/neutral/chunk-QBIGOSRF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QBLYZ4IV.mjs +734 -0
- package/dist/lib/neutral/chunk-QBLYZ4IV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QEVM3JUP.mjs +318 -0
- package/dist/lib/neutral/chunk-QEVM3JUP.mjs.map +7 -0
- package/dist/lib/neutral/chunk-REP7WWAQ.mjs +346 -0
- package/dist/lib/neutral/chunk-REP7WWAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TRPZU2HV.mjs +402 -0
- package/dist/lib/neutral/chunk-TRPZU2HV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TTCSATUD.mjs +42 -0
- package/dist/lib/neutral/chunk-TTCSATUD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TW76K7H5.mjs +45 -0
- package/dist/lib/neutral/chunk-TW76K7H5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UYJYDSD7.mjs +2436 -0
- package/dist/lib/neutral/chunk-UYJYDSD7.mjs.map +7 -0
- package/dist/lib/neutral/chunk-V72DY6LU.mjs +7 -0
- package/dist/lib/neutral/chunk-V72DY6LU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZISMEVKD.mjs +51 -0
- package/dist/lib/neutral/chunk-ZISMEVKD.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +107 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/internal/index.mjs +474 -0
- package/dist/lib/neutral/internal/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/testing/index.mjs +375 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/Annotation.d.ts +24 -0
- package/dist/types/src/Annotation.d.ts.map +1 -0
- package/dist/types/src/Collection.d.ts +16 -0
- package/dist/types/src/Collection.d.ts.map +1 -0
- package/dist/types/src/Database.d.ts +201 -0
- package/dist/types/src/Database.d.ts.map +1 -0
- package/dist/types/src/Dataset.d.ts +19 -0
- package/dist/types/src/Dataset.d.ts.map +1 -0
- package/dist/types/src/Entity.d.ts +174 -0
- package/dist/types/src/Entity.d.ts.map +1 -0
- package/dist/types/src/Entity.test.d.ts +2 -0
- package/dist/types/src/Entity.test.d.ts.map +1 -0
- package/dist/types/src/Err.d.ts +107 -0
- package/dist/types/src/Err.d.ts.map +1 -0
- package/dist/types/src/Extension.d.ts +80 -0
- package/dist/types/src/Extension.d.ts.map +1 -0
- package/dist/types/src/Extension.test.d.ts +2 -0
- package/dist/types/src/Extension.test.d.ts.map +1 -0
- package/dist/types/src/Feed.d.ts +182 -0
- package/dist/types/src/Feed.d.ts.map +1 -0
- package/dist/types/src/Filter.d.ts +149 -0
- package/dist/types/src/Filter.d.ts.map +1 -0
- package/dist/types/src/Filter.test.d.ts +2 -0
- package/dist/types/src/Filter.test.d.ts.map +1 -0
- package/dist/types/src/Format.d.ts +4 -0
- package/dist/types/src/Format.d.ts.map +1 -0
- package/dist/types/src/Hypergraph.d.ts +65 -0
- package/dist/types/src/Hypergraph.d.ts.map +1 -0
- package/dist/types/src/Json.d.ts +33 -0
- package/dist/types/src/Json.d.ts.map +1 -0
- package/dist/types/src/Json.test.d.ts +2 -0
- package/dist/types/src/Json.test.d.ts.map +1 -0
- package/dist/types/src/JsonSchema.d.ts +16 -0
- package/dist/types/src/JsonSchema.d.ts.map +1 -0
- package/dist/types/src/Key.d.ts +1 -0
- package/dist/types/src/Key.d.ts.map +1 -1
- package/dist/types/src/Migration.d.ts +57 -0
- package/dist/types/src/Migration.d.ts.map +1 -0
- package/dist/types/src/Obj.d.ts +440 -91
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Obj.test.d.ts +2 -0
- package/dist/types/src/Obj.test.d.ts.map +1 -0
- package/dist/types/src/Order.d.ts +16 -0
- package/dist/types/src/Order.d.ts.map +1 -0
- package/dist/types/src/Query.d.ts +213 -0
- package/dist/types/src/Query.d.ts.map +1 -0
- package/dist/types/src/Query.test.d.ts +2 -0
- package/dist/types/src/Query.test.d.ts.map +1 -0
- package/dist/types/src/QueryResult.d.ts +80 -0
- package/dist/types/src/QueryResult.d.ts.map +1 -0
- package/dist/types/src/Ref.d.ts +61 -11
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Relation.d.ts +288 -21
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/Relation.test.d.ts +2 -0
- package/dist/types/src/Relation.test.d.ts.map +1 -0
- package/dist/types/src/SchemaRegistry.d.ts +84 -0
- package/dist/types/src/SchemaRegistry.d.ts.map +1 -0
- package/dist/types/src/Tag.d.ts +18 -0
- package/dist/types/src/Tag.d.ts.map +1 -0
- package/dist/types/src/Type.d.ts +123 -100
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/Type.test.d.ts +2 -0
- package/dist/types/src/Type.test.d.ts.map +1 -0
- package/dist/types/src/View.d.ts +68 -0
- package/dist/types/src/View.d.ts.map +1 -0
- package/dist/types/src/hierarchy.test.d.ts +2 -0
- package/dist/types/src/hierarchy.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +22 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/internal/Annotation/annotations.d.ts +231 -0
- package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/annotations.test.d.ts +2 -0
- package/dist/types/src/internal/Annotation/annotations.test.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/index.d.ts +4 -0
- package/dist/types/src/internal/Annotation/index.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/sorting.d.ts +24 -0
- package/dist/types/src/internal/Annotation/sorting.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/util.d.ts +39 -0
- package/dist/types/src/internal/Annotation/util.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/api.d.ts +13 -0
- package/dist/types/src/internal/Entity/api.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/entity.d.ts +20 -0
- package/dist/types/src/internal/Entity/entity.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/index.d.ts +8 -0
- package/dist/types/src/internal/Entity/index.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/model.d.ts +55 -0
- package/dist/types/src/internal/Entity/model.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/object.d.ts +18 -0
- package/dist/types/src/internal/Entity/object.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/relation.d.ts +35 -0
- package/dist/types/src/internal/Entity/relation.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/util.d.ts +2 -0
- package/dist/types/src/internal/Entity/util.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/version.d.ts +42 -0
- package/dist/types/src/internal/Entity/version.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.d.ts +63 -0
- package/dist/types/src/internal/Format/date.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.test.d.ts +2 -0
- package/dist/types/src/internal/Format/date.test.d.ts.map +1 -0
- package/dist/types/src/internal/Format/format.d.ts +32 -0
- package/dist/types/src/internal/Format/format.d.ts.map +1 -0
- package/dist/types/src/internal/Format/format.test.d.ts +2 -0
- package/dist/types/src/internal/Format/format.test.d.ts.map +1 -0
- package/dist/types/src/internal/Format/index.d.ts +8 -0
- package/dist/types/src/internal/Format/index.d.ts.map +1 -0
- package/dist/types/src/internal/Format/number.d.ts +31 -0
- package/dist/types/src/internal/Format/number.d.ts.map +1 -0
- package/dist/types/src/internal/Format/object.d.ts +35 -0
- package/dist/types/src/internal/Format/object.d.ts.map +1 -0
- package/dist/types/src/internal/Format/select.d.ts +13 -0
- package/dist/types/src/internal/Format/select.d.ts.map +1 -0
- package/dist/types/src/internal/Format/string.d.ts +42 -0
- package/dist/types/src/internal/Format/string.d.ts.map +1 -0
- package/dist/types/src/internal/Format/types.d.ts +72 -0
- package/dist/types/src/internal/Format/types.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/annotations.d.ts +19 -0
- package/dist/types/src/internal/JsonSchema/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/effect-schema.test.d.ts +2 -0
- package/dist/types/src/internal/JsonSchema/effect-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/index.d.ts +5 -0
- package/dist/types/src/internal/JsonSchema/index.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts +7 -0
- package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts +351 -0
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts +30 -0
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema.test.d.ts +2 -0
- package/dist/types/src/internal/JsonSchema/json-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/clone.d.ts +8 -0
- package/dist/types/src/internal/Obj/clone.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/common.d.ts +18 -0
- package/dist/types/src/internal/Obj/common.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/create-object.d.ts +39 -0
- package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/create-object.test.d.ts +2 -0
- package/dist/types/src/internal/Obj/create-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/deleted.d.ts +6 -0
- package/dist/types/src/internal/Obj/deleted.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/ids.d.ts +6 -0
- package/dist/types/src/internal/Obj/ids.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/index.d.ts +11 -0
- package/dist/types/src/internal/Obj/index.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/inspect.d.ts +2 -0
- package/dist/types/src/internal/Obj/inspect.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/json-serializer.d.ts +45 -0
- package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/json-serializer.test.d.ts +2 -0
- package/dist/types/src/internal/Obj/json-serializer.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts +2 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.test.d.ts +2 -0
- package/dist/types/src/internal/Obj/schema-validator.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/set-value.d.ts +7 -0
- package/dist/types/src/internal/Obj/set-value.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/set-value.test.d.ts +2 -0
- package/dist/types/src/internal/Obj/set-value.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/snapshot.d.ts +6 -0
- package/dist/types/src/internal/Obj/snapshot.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/typed-object.d.ts +25 -0
- package/dist/types/src/internal/Obj/typed-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/typed-object.test.d.ts +2 -0
- package/dist/types/src/internal/Obj/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/Query.d.ts +10 -0
- package/dist/types/src/internal/Query.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/index.d.ts +3 -0
- package/dist/types/src/internal/Ref/index.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/ref-array.d.ts +21 -0
- package/dist/types/src/internal/Ref/ref-array.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/ref.d.ts +244 -0
- package/dist/types/src/internal/Ref/ref.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/ref.test.d.ts +2 -0
- package/dist/types/src/internal/Ref/ref.test.d.ts.map +1 -0
- package/dist/types/src/internal/Type/compose.d.ts +7 -0
- package/dist/types/src/internal/Type/compose.d.ts.map +1 -0
- package/dist/types/src/internal/Type/compose.test.d.ts +2 -0
- package/dist/types/src/internal/Type/compose.test.d.ts.map +1 -0
- package/dist/types/src/internal/Type/echo-schema.d.ts +181 -0
- package/dist/types/src/internal/Type/echo-schema.d.ts.map +1 -0
- package/dist/types/src/internal/Type/index.d.ts +4 -0
- package/dist/types/src/internal/Type/index.d.ts.map +1 -0
- package/dist/types/src/internal/Type/manipulation.d.ts +10 -0
- package/dist/types/src/internal/Type/manipulation.d.ts.map +1 -0
- package/dist/types/src/internal/Type/persistent-schema.d.ts +20 -0
- package/dist/types/src/internal/Type/persistent-schema.d.ts.map +1 -0
- package/dist/types/src/internal/common/api/index.d.ts +11 -0
- package/dist/types/src/internal/common/api/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/api/meta.d.ts +42 -0
- package/dist/types/src/internal/common/api/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/index.d.ts +4 -0
- package/dist/types/src/internal/common/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/change-context.d.ts +55 -0
- package/dist/types/src/internal/common/proxy/change-context.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/change.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/change.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts +5 -0
- package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/errors.d.ts +19 -0
- package/dist/types/src/internal/common/proxy/errors.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/event-batch.d.ts +10 -0
- package/dist/types/src/internal/common/proxy/event-batch.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/handler.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/index.d.ts +14 -0
- package/dist/types/src/internal/common/proxy/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/json-serializer.d.ts +6 -0
- package/dist/types/src/internal/common/proxy/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/make-object.d.ts +14 -0
- package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/ownership.d.ts +57 -0
- package/dist/types/src/internal/common/proxy/ownership.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-types.d.ts +18 -0
- package/dist/types/src/internal/common/proxy/proxy-types.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-utils.d.ts +47 -0
- package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/reactive-array.d.ts +8 -0
- package/dist/types/src/internal/common/proxy/reactive-array.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/reactive.d.ts +39 -0
- package/dist/types/src/internal/common/proxy/reactive.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/reactive.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/reactive.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/schema-validator.d.ts +15 -0
- package/dist/types/src/internal/common/proxy/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/schema.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/symbols.d.ts +3 -0
- package/dist/types/src/internal/common/proxy/symbols.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts +48 -0
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-handler.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/typed-handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-object.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/base.d.ts +27 -0
- package/dist/types/src/internal/common/types/base.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/entity.d.ts +37 -0
- package/dist/types/src/internal/common/types/entity.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/index.d.ts +7 -0
- package/dist/types/src/internal/common/types/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/meta.d.ts +33 -0
- package/dist/types/src/internal/common/types/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts +54 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/typename.d.ts +21 -0
- package/dist/types/src/internal/common/types/typename.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/version.d.ts +15 -0
- package/dist/types/src/internal/common/types/version.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +11 -0
- package/dist/types/src/internal/index.d.ts.map +1 -0
- package/dist/types/src/{test → testing}/api.test.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +18 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/testing/test-schema.d.ts +304 -0
- package/dist/types/src/testing/test-schema.d.ts.map +1 -0
- package/dist/types/src/testing/util.d.ts +21 -0
- package/dist/types/src/testing/util.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +119 -56
- package/src/Annotation.ts +48 -0
- package/src/Collection.ts +37 -0
- package/src/Database.ts +352 -0
- package/src/Dataset.ts +26 -0
- package/src/Entity.test.ts +22 -0
- package/src/Entity.ts +243 -0
- package/src/Err.ts +40 -0
- package/src/Extension.test.ts +235 -0
- package/src/Extension.ts +122 -0
- package/src/Feed.ts +304 -0
- package/src/Filter.test.ts +90 -0
- package/src/Filter.ts +454 -0
- package/src/Format.ts +9 -0
- package/src/Hypergraph.ts +79 -0
- package/src/Json.test.ts +175 -0
- package/src/Json.ts +102 -0
- package/src/JsonSchema.ts +26 -0
- package/src/Key.ts +3 -0
- package/src/Migration.ts +94 -0
- package/src/Obj.test.ts +539 -0
- package/src/Obj.ts +716 -212
- package/src/Order.ts +46 -0
- package/src/Query.test.ts +822 -0
- package/src/Query.ts +567 -0
- package/src/QueryResult.ts +106 -0
- package/src/Ref.ts +78 -9
- package/src/Relation.test.ts +88 -0
- package/src/Relation.ts +452 -53
- package/src/SchemaRegistry.ts +106 -0
- package/src/Tag.ts +41 -0
- package/src/Type.test.ts +52 -0
- package/src/Type.ts +168 -155
- package/src/View.ts +107 -0
- package/src/hierarchy.test.ts +33 -0
- package/src/index.ts +25 -5
- package/src/internal/Annotation/annotations.test.ts +145 -0
- package/src/internal/Annotation/annotations.ts +577 -0
- package/src/internal/Annotation/index.ts +7 -0
- package/src/internal/Annotation/sorting.ts +51 -0
- package/src/internal/Annotation/util.ts +85 -0
- package/src/internal/Entity/api.ts +30 -0
- package/src/internal/Entity/entity.ts +128 -0
- package/src/internal/Entity/index.ts +11 -0
- package/src/internal/Entity/model.ts +109 -0
- package/src/internal/Entity/object.ts +57 -0
- package/src/internal/Entity/relation.ts +154 -0
- package/src/internal/Entity/util.ts +33 -0
- package/src/internal/Entity/version.ts +96 -0
- package/src/internal/Format/date.test.ts +55 -0
- package/src/internal/Format/date.ts +217 -0
- package/src/internal/Format/format.test.ts +76 -0
- package/src/internal/Format/format.ts +54 -0
- package/src/internal/Format/index.ts +12 -0
- package/src/internal/Format/number.ts +89 -0
- package/src/internal/Format/object.ts +80 -0
- package/src/internal/Format/select.ts +18 -0
- package/src/internal/Format/string.ts +81 -0
- package/src/internal/Format/types.ts +186 -0
- package/src/internal/JsonSchema/annotations.ts +50 -0
- package/src/internal/JsonSchema/effect-schema.test.ts +143 -0
- package/src/internal/JsonSchema/index.ts +8 -0
- package/src/internal/JsonSchema/json-schema-normalize.ts +111 -0
- package/src/internal/JsonSchema/json-schema-type.ts +403 -0
- package/src/internal/JsonSchema/json-schema.test.ts +860 -0
- package/src/internal/JsonSchema/json-schema.ts +533 -0
- package/src/internal/Obj/clone.ts +48 -0
- package/src/internal/Obj/common.ts +75 -0
- package/src/internal/Obj/create-object.test.ts +114 -0
- package/src/internal/Obj/create-object.ts +94 -0
- package/src/internal/Obj/deleted.ts +19 -0
- package/src/internal/Obj/ids.ts +12 -0
- package/src/internal/Obj/index.ts +14 -0
- package/src/internal/Obj/inspect.ts +46 -0
- package/src/internal/Obj/json-serializer.test.ts +120 -0
- package/src/internal/Obj/json-serializer.ts +222 -0
- package/src/internal/Obj/schema-validator.test.ts +182 -0
- package/src/internal/Obj/schema-validator.ts +6 -0
- package/src/internal/Obj/set-value.test.ts +281 -0
- package/src/internal/Obj/set-value.ts +165 -0
- package/src/internal/Obj/snapshot.ts +105 -0
- package/src/internal/Obj/typed-object.test.ts +34 -0
- package/src/internal/Obj/typed-object.ts +30 -0
- package/src/internal/Query.ts +137 -0
- package/src/internal/Ref/index.ts +6 -0
- package/src/internal/Ref/ref-array.ts +38 -0
- package/src/internal/Ref/ref.test.ts +100 -0
- package/src/internal/Ref/ref.ts +589 -0
- package/src/internal/Type/compose.test.ts +41 -0
- package/src/internal/Type/compose.ts +41 -0
- package/src/internal/Type/echo-schema.ts +423 -0
- package/src/internal/Type/index.ts +7 -0
- package/src/internal/Type/manipulation.ts +92 -0
- package/src/internal/Type/persistent-schema.ts +33 -0
- package/src/internal/common/README.md +102 -0
- package/src/internal/common/api/index.ts +15 -0
- package/src/internal/common/api/meta.ts +88 -0
- package/src/internal/common/index.ts +7 -0
- package/src/internal/common/proxy/change-context.ts +138 -0
- package/src/internal/common/proxy/change.test.ts +519 -0
- package/src/internal/common/proxy/define-hidden-property.ts +14 -0
- package/src/internal/common/proxy/errors.ts +42 -0
- package/src/internal/common/proxy/event-batch.ts +44 -0
- package/src/internal/common/proxy/handler.test.ts +121 -0
- package/src/internal/common/proxy/index.ts +17 -0
- package/src/internal/common/proxy/json-serializer.ts +90 -0
- package/src/internal/common/proxy/make-object.ts +105 -0
- package/src/internal/common/proxy/ownership.ts +252 -0
- package/src/internal/common/proxy/proxy-types.ts +23 -0
- package/src/internal/common/proxy/proxy-utils.ts +150 -0
- package/src/internal/common/proxy/reactive-array.ts +71 -0
- package/src/internal/common/proxy/reactive.test.ts +54 -0
- package/src/internal/common/proxy/reactive.ts +77 -0
- package/src/internal/common/proxy/schema-validator.ts +244 -0
- package/src/internal/common/proxy/schema.test.ts +145 -0
- package/src/internal/common/proxy/symbols.ts +7 -0
- package/src/internal/common/proxy/typed-handler.test.ts +313 -0
- package/src/internal/common/proxy/typed-handler.ts +447 -0
- package/src/internal/common/proxy/typed-object.test.ts +115 -0
- package/src/internal/common/types/base.ts +43 -0
- package/src/internal/common/types/entity.ts +54 -0
- package/src/internal/common/types/index.ts +10 -0
- package/src/internal/common/types/meta.ts +67 -0
- package/src/internal/common/types/model-symbols.ts +69 -0
- package/src/internal/common/types/typename.ts +55 -0
- package/src/internal/common/types/version.ts +19 -0
- package/src/internal/index.ts +17 -0
- package/src/testing/api.test.ts +125 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +129 -0
- package/src/testing/test-schema.ts +240 -0
- package/src/testing/util.ts +85 -0
- package/dist/lib/browser/chunk-MTR3E5S2.mjs +0 -786
- package/dist/lib/browser/chunk-MTR3E5S2.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -26
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/testing/index.mjs +0 -70
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MYZLAJSR.mjs +0 -786
- package/dist/lib/node-esm/chunk-MYZLAJSR.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -26
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -70
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/experimental/database.d.ts +0 -8
- package/dist/types/src/experimental/database.d.ts.map +0 -1
- package/dist/types/src/experimental/index.d.ts +0 -1
- package/dist/types/src/experimental/index.d.ts.map +0 -1
- package/dist/types/src/experimental/queue.d.ts +0 -8
- package/dist/types/src/experimental/queue.d.ts.map +0 -1
- package/dist/types/src/experimental/space.d.ts +0 -8
- package/dist/types/src/experimental/space.d.ts.map +0 -1
- package/dist/types/src/query/dsl.d.ts +0 -238
- package/dist/types/src/query/dsl.d.ts.map +0 -1
- package/dist/types/src/query/dsl.test.d.ts +0 -2
- package/dist/types/src/query/dsl.test.d.ts.map +0 -1
- package/dist/types/src/query/index.d.ts +0 -2
- package/dist/types/src/query/index.d.ts.map +0 -1
- package/dist/types/src/testing/types.d.ts +0 -113
- package/dist/types/src/testing/types.d.ts.map +0 -1
- package/src/experimental/database.ts +0 -11
- package/src/experimental/index.ts +0 -7
- package/src/experimental/queue.ts +0 -11
- package/src/experimental/space.ts +0 -11
- package/src/query/dsl.test.ts +0 -332
- package/src/query/dsl.ts +0 -704
- package/src/query/index.ts +0 -5
- package/src/test/api.test.ts +0 -180
- package/src/testing/types.ts +0 -91
- /package/dist/lib/{browser/index.mjs.map → neutral/Annotation.mjs.map} +0 -0
- /package/dist/lib/{node-esm/index.mjs.map → neutral/Database.mjs.map} +0 -0
- /package/dist/types/src/{test → testing}/api.test.d.ts +0 -0
package/src/Relation.ts
CHANGED
|
@@ -2,137 +2,536 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
6
8
|
|
|
7
9
|
import { raise } from '@dxos/debug';
|
|
8
|
-
import
|
|
10
|
+
import type { ForeignKey } from '@dxos/echo-protocol';
|
|
11
|
+
import { createJsonPath } from '@dxos/effect';
|
|
9
12
|
import { assertArgument, invariant } from '@dxos/invariant';
|
|
10
|
-
import { DXN } from '@dxos/keys';
|
|
11
|
-
import { type Live, live } from '@dxos/live-object';
|
|
13
|
+
import { DXN, type ObjectId } from '@dxos/keys';
|
|
12
14
|
import { assumeType } from '@dxos/util';
|
|
13
15
|
|
|
14
|
-
import type * as
|
|
16
|
+
import type * as Database from './Database';
|
|
17
|
+
import * as Entity from './Entity';
|
|
18
|
+
import * as internal from './internal';
|
|
19
|
+
import * as entityInternal from './internal/Entity';
|
|
20
|
+
import * as Obj from './Obj';
|
|
15
21
|
import type * as Type from './Type';
|
|
16
22
|
|
|
23
|
+
export type Endpoints<Source, Target> = {
|
|
24
|
+
[Source]: Source;
|
|
25
|
+
[Target]: Target;
|
|
26
|
+
};
|
|
27
|
+
|
|
17
28
|
/**
|
|
18
|
-
*
|
|
29
|
+
* Base type for all ECHO relations.
|
|
30
|
+
* @private
|
|
19
31
|
*/
|
|
20
32
|
interface BaseRelation<Source, Target>
|
|
21
|
-
extends
|
|
22
|
-
Type.Relation.Endpoints<Source, Target>,
|
|
23
|
-
Type.OfKind<EchoSchema.EntityKind.Relation> {}
|
|
33
|
+
extends internal.AnyEntity, Endpoints<Source, Target>, Entity.OfKind<internal.EntityKind.Relation> {}
|
|
24
34
|
|
|
25
35
|
/**
|
|
26
|
-
* Relation
|
|
36
|
+
* Relation with no known properties beyond id, kind, source, and target.
|
|
37
|
+
* Use this when the relation's schema/properties are not known.
|
|
38
|
+
*
|
|
39
|
+
* NOTE: This is a TypeScript type only, not a schema.
|
|
40
|
+
* To validate that a value is an ECHO relation, use `Relation.isRelation`.
|
|
27
41
|
*/
|
|
28
|
-
export
|
|
42
|
+
export interface Unknown extends BaseRelation<Obj.Unknown, Obj.Unknown> {}
|
|
29
43
|
|
|
30
44
|
/**
|
|
31
|
-
*
|
|
45
|
+
* Runtime Effect schema for any ECHO relation.
|
|
46
|
+
* Use for validation, parsing, or as a reference target for collections.
|
|
47
|
+
* A relation has `id`, source, and target fields plus any additional properties.
|
|
48
|
+
*
|
|
49
|
+
* NOTE: `Schema.is(Type.Relation)` does STRUCTURAL validation only (checks for `id` field).
|
|
50
|
+
* Use `Relation.isRelation()` for proper ECHO instance type guards that check the KindId brand.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* // Structural type guard (accepts any object with id field)
|
|
55
|
+
* if (Schema.is(Type.Relation)(unknownValue)) { ... }
|
|
56
|
+
*
|
|
57
|
+
* // ECHO instance type guard (checks KindId brand)
|
|
58
|
+
* if (Relation.isRelation(unknownValue)) { ... }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
// TODO(dmaretskyi): Change ObjModule.Any to ObjModule.Unknown to have stricter types.
|
|
62
|
+
export const Unknown: Type.Relation<Unknown, Obj.Any, Obj.Any> = Schema.Struct({
|
|
63
|
+
id: Schema.String,
|
|
64
|
+
}).pipe(
|
|
65
|
+
Schema.extend(Schema.Record({ key: Schema.String, value: Schema.Unknown })),
|
|
66
|
+
// TODO(dmaretskyi): Clean this up.
|
|
67
|
+
// NOTE: The EchoRelationSchema annotation is required for Ref.Ref(Relation.Unknown) to work.
|
|
68
|
+
// The typename/version/source/target only satisfy ECHO schema machinery for reference targets.
|
|
69
|
+
internal.EchoRelationSchema({
|
|
70
|
+
typename: 'org.dxos.schema.anyRelation',
|
|
71
|
+
version: '0.0.0',
|
|
72
|
+
source: Obj.Unknown,
|
|
73
|
+
target: Obj.Unknown,
|
|
74
|
+
}),
|
|
75
|
+
(schema) =>
|
|
76
|
+
Object.assign(schema, {
|
|
77
|
+
[internal.SchemaKindId]: (schema as any)[internal.SchemaKindId],
|
|
78
|
+
}) as unknown as Type.Relation<Unknown, Obj.Any, Obj.Any>,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Relation type with specific source and target types.
|
|
83
|
+
*/
|
|
84
|
+
export type OfShape<Source extends Obj.Unknown, Target extends Obj.Unknown, Props> = BaseRelation<Source, Target> &
|
|
85
|
+
Props;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Base type for snapshot relations (has SnapshotKindId instead of KindId).
|
|
32
89
|
*/
|
|
33
|
-
|
|
90
|
+
interface BaseRelationSnapshot<Source, Target> extends internal.AnyEntity, Endpoints<Source, Target> {
|
|
91
|
+
readonly [Entity.SnapshotKindId]: internal.EntityKind.Relation;
|
|
92
|
+
readonly id: ObjectId;
|
|
93
|
+
}
|
|
34
94
|
|
|
35
|
-
|
|
36
|
-
|
|
95
|
+
/**
|
|
96
|
+
* JSON-encoded properties for relations.
|
|
97
|
+
*/
|
|
98
|
+
export interface BaseRelationJson {
|
|
99
|
+
id: string;
|
|
100
|
+
[internal.ATTR_RELATION_SOURCE]: string;
|
|
101
|
+
[internal.ATTR_RELATION_TARGET]: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Immutable snapshot of an ECHO relation.
|
|
106
|
+
* Branded with SnapshotKindId (not KindId).
|
|
107
|
+
* Property values are frozen at the time the snapshot was created.
|
|
108
|
+
* Returned by getSnapshot() and hooks.
|
|
109
|
+
*/
|
|
110
|
+
export type Snapshot<T extends Unknown = Unknown> = Omit<T, Entity.KindId> &
|
|
111
|
+
BaseRelationSnapshot<Obj.Unknown, Obj.Unknown>;
|
|
112
|
+
|
|
113
|
+
export const Source: unique symbol = entityInternal.RelationSourceId as any;
|
|
37
114
|
export type Source = typeof Source;
|
|
38
|
-
|
|
115
|
+
|
|
116
|
+
export const Target: unique symbol = entityInternal.RelationTargetId as any;
|
|
39
117
|
export type Target = typeof Target;
|
|
40
118
|
|
|
41
|
-
|
|
42
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Get relation source type.
|
|
121
|
+
*/
|
|
122
|
+
export type SourceOf<A> = A extends Endpoints<infer S, infer _T> ? S : never;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Get relation target type.
|
|
126
|
+
*/
|
|
127
|
+
export type TargetOf<A> = A extends Endpoints<infer _S, infer T> ? T : never;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Internal props type for relation instance creation.
|
|
131
|
+
*/
|
|
132
|
+
type MakePropsInternal<T extends Unknown> = {
|
|
133
|
+
id?: ObjectId;
|
|
134
|
+
[Meta]?: internal.ObjectMeta;
|
|
43
135
|
[Source]: T[Source];
|
|
44
136
|
[Target]: T[Target];
|
|
45
|
-
} &
|
|
137
|
+
} & Entity.Properties<T>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Props type for relation creation with a given schema.
|
|
141
|
+
* Takes a schema type (created with Type.Relation) and extracts the props type.
|
|
142
|
+
*/
|
|
143
|
+
export type MakeProps<S extends Type.AnyRelation> = MakePropsInternal<Schema.Schema.Type<S>>;
|
|
46
144
|
|
|
47
145
|
/**
|
|
48
146
|
* Creates new relation.
|
|
49
147
|
* @param schema - Relation schema.
|
|
50
148
|
* @param props - Relation properties. Endpoints are passed as [Relation.Source] and [Relation.Target] keys.
|
|
51
|
-
* @param meta - Relation metadata.
|
|
149
|
+
* @param meta - Relation metadata. (deprecated; use [Obj.Meta] instead)
|
|
52
150
|
* @returns
|
|
53
151
|
*/
|
|
54
152
|
// NOTE: Writing the definition this way (with generic over schema) makes typescript perfer to infer the type from the first param (this schema) rather than the second param (the props).
|
|
55
153
|
// TODO(dmaretskyi): Move meta into props.
|
|
56
|
-
export const make = <S extends Type.
|
|
154
|
+
export const make = <S extends Type.AnyRelation>(
|
|
57
155
|
schema: S,
|
|
58
|
-
props: NoInfer<MakeProps<
|
|
59
|
-
|
|
60
|
-
): Live<Schema.Schema.Type<S> & Type.OfKind<EchoSchema.EntityKind.Relation>> => {
|
|
156
|
+
props: NoInfer<MakeProps<S>>,
|
|
157
|
+
): Schema.Schema.Type<S> & Entity.OfKind<typeof Entity.Kind.Relation> => {
|
|
61
158
|
assertArgument(
|
|
62
|
-
|
|
159
|
+
internal.getTypeAnnotation(schema)?.kind === internal.EntityKind.Relation,
|
|
63
160
|
'schema',
|
|
64
161
|
'Expected a relation schema',
|
|
65
162
|
);
|
|
163
|
+
assertArgument(props[internal.ParentId] === undefined, 'props', 'Parent is not allowed for relations');
|
|
164
|
+
|
|
165
|
+
let meta: internal.ObjectMeta | undefined = undefined;
|
|
66
166
|
|
|
67
|
-
if (props[
|
|
68
|
-
meta = props[
|
|
69
|
-
delete props[
|
|
167
|
+
if (props[internal.MetaId] != null) {
|
|
168
|
+
meta = props[internal.MetaId] as any;
|
|
169
|
+
delete props[internal.MetaId];
|
|
70
170
|
}
|
|
71
171
|
|
|
72
|
-
const sourceDXN =
|
|
73
|
-
const targetDXN =
|
|
74
|
-
(props as any)[EchoSchema.RelationSourceDXNId] = sourceDXN;
|
|
75
|
-
(props as any)[EchoSchema.RelationTargetDXNId] = targetDXN;
|
|
172
|
+
const sourceDXN = internal.getObjectDXN(props[Source]) ?? raise(new Error('Unresolved relation source'));
|
|
173
|
+
const targetDXN = internal.getObjectDXN(props[Target]) ?? raise(new Error('Unresolved relation target'));
|
|
76
174
|
|
|
77
|
-
|
|
175
|
+
(props as any)[internal.RelationSourceDXNId] = sourceDXN;
|
|
176
|
+
(props as any)[internal.RelationTargetDXNId] = targetDXN;
|
|
177
|
+
|
|
178
|
+
return internal.makeObject<Schema.Schema.Type<S>>(schema, props as any, meta);
|
|
78
179
|
};
|
|
79
180
|
|
|
80
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Type guard for relations.
|
|
183
|
+
* Returns true for both reactive relations and relation snapshots.
|
|
184
|
+
*/
|
|
185
|
+
export const isRelation = (value: unknown): value is Unknown => {
|
|
81
186
|
if (typeof value !== 'object' || value === null) {
|
|
82
187
|
return false;
|
|
83
188
|
}
|
|
84
|
-
if (
|
|
189
|
+
if (internal.ATTR_RELATION_SOURCE in value || internal.ATTR_RELATION_TARGET in value) {
|
|
85
190
|
return true;
|
|
86
191
|
}
|
|
87
192
|
|
|
88
|
-
|
|
89
|
-
|
|
193
|
+
// Check for reactive relation (KindId) or snapshot (SnapshotKindId).
|
|
194
|
+
const kind = (value as any)[Entity.KindId] ?? (value as any)[Entity.SnapshotKindId];
|
|
195
|
+
return kind === internal.EntityKind.Relation;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export const isSnapshot = (value: unknown): value is Snapshot => {
|
|
199
|
+
if (typeof value !== 'object' || value === null) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
return (value as any)[Entity.SnapshotKindId] === internal.EntityKind.Relation;
|
|
90
203
|
};
|
|
91
204
|
|
|
92
205
|
/**
|
|
93
206
|
* @returns Relation source DXN.
|
|
207
|
+
* Accepts both reactive relations and snapshots.
|
|
94
208
|
* @throws If the object is not a relation.
|
|
95
209
|
*/
|
|
96
|
-
export const getSourceDXN = (value:
|
|
210
|
+
export const getSourceDXN = (value: Unknown | Snapshot): DXN => {
|
|
97
211
|
assertArgument(isRelation(value), 'Expected a relation');
|
|
98
|
-
assumeType<
|
|
99
|
-
const dxn = (value as
|
|
212
|
+
assumeType<internal.InternalObjectProps>(value);
|
|
213
|
+
const dxn = (value as internal.InternalObjectProps)[internal.RelationSourceDXNId];
|
|
100
214
|
invariant(dxn instanceof DXN);
|
|
101
215
|
return dxn;
|
|
102
216
|
};
|
|
103
217
|
|
|
104
218
|
/**
|
|
105
219
|
* @returns Relation target DXN.
|
|
220
|
+
* Accepts both reactive relations and snapshots.
|
|
106
221
|
* @throws If the object is not a relation.
|
|
107
222
|
*/
|
|
108
|
-
export const getTargetDXN = (value:
|
|
223
|
+
export const getTargetDXN = (value: Unknown | Snapshot): DXN => {
|
|
109
224
|
assertArgument(isRelation(value), 'Expected a relation');
|
|
110
|
-
assumeType<
|
|
111
|
-
const dxn = (value as
|
|
225
|
+
assumeType<internal.InternalObjectProps>(value);
|
|
226
|
+
const dxn = (value as internal.InternalObjectProps)[internal.RelationTargetDXNId];
|
|
112
227
|
invariant(dxn instanceof DXN);
|
|
113
228
|
return dxn;
|
|
114
229
|
};
|
|
115
230
|
|
|
116
231
|
/**
|
|
117
232
|
* @returns Relation source.
|
|
233
|
+
* Accepts both reactive relations and snapshots.
|
|
118
234
|
* @throws If the object is not a relation.
|
|
119
235
|
*/
|
|
120
|
-
export const getSource = <T extends
|
|
236
|
+
export const getSource = <T extends Unknown | Snapshot>(relation: T): SourceOf<T> => {
|
|
121
237
|
assertArgument(isRelation(relation), 'Expected a relation');
|
|
122
|
-
assumeType<
|
|
123
|
-
const obj = (relation as
|
|
124
|
-
|
|
125
|
-
|
|
238
|
+
assumeType<internal.InternalObjectProps>(relation);
|
|
239
|
+
const obj = (relation as internal.InternalObjectProps)[internal.RelationSourceId];
|
|
240
|
+
if (obj === undefined) {
|
|
241
|
+
throw new Error(`Relation source could not be resolved.`);
|
|
242
|
+
}
|
|
243
|
+
return obj as SourceOf<T>;
|
|
126
244
|
};
|
|
127
245
|
|
|
128
246
|
/**
|
|
129
247
|
* @returns Relation target.
|
|
248
|
+
* Accepts both reactive relations and snapshots.
|
|
130
249
|
* @throws If the object is not a relation.
|
|
131
250
|
*/
|
|
132
|
-
export const getTarget = <T extends
|
|
251
|
+
export const getTarget = <T extends Unknown | Snapshot>(relation: T): TargetOf<T> => {
|
|
133
252
|
assertArgument(isRelation(relation), 'Expected a relation');
|
|
134
|
-
assumeType<
|
|
135
|
-
const obj = (relation as
|
|
136
|
-
|
|
137
|
-
|
|
253
|
+
assumeType<internal.InternalObjectProps>(relation);
|
|
254
|
+
const obj = (relation as internal.InternalObjectProps)[internal.RelationTargetId];
|
|
255
|
+
if (obj === undefined) {
|
|
256
|
+
throw new Error(`Relation target could not be resolved.`);
|
|
257
|
+
}
|
|
258
|
+
return obj as TargetOf<T>;
|
|
138
259
|
};
|
|
260
|
+
|
|
261
|
+
//
|
|
262
|
+
// Change
|
|
263
|
+
//
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Makes all properties mutable recursively.
|
|
267
|
+
* Used to provide a mutable view of a relation within `Relation.update`.
|
|
268
|
+
*/
|
|
269
|
+
export type Mutable<T> = internal.Mutable<T>;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Perform mutations on an echo relation within a controlled context.
|
|
273
|
+
*
|
|
274
|
+
* All mutations within the callback are batched and trigger a single notification
|
|
275
|
+
* when the callback completes. Direct mutations outside of `Relation.update` will throw
|
|
276
|
+
* an error for echo relations.
|
|
277
|
+
*
|
|
278
|
+
* @param relation - The echo relation to mutate. Use `Obj.update` for objects.
|
|
279
|
+
* @param callback - The callback that performs mutations on the relation.
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```ts
|
|
283
|
+
* const worksFor = Relation.make(EmployedBy, {
|
|
284
|
+
* [Relation.Source]: person,
|
|
285
|
+
* [Relation.Target]: company,
|
|
286
|
+
* role: 'Engineer',
|
|
287
|
+
* });
|
|
288
|
+
*
|
|
289
|
+
* // Mutate within Relation.update
|
|
290
|
+
* Relation.update(worksFor, (obj) => {
|
|
291
|
+
* obj.role = 'Senior Engineer';
|
|
292
|
+
* });
|
|
293
|
+
* ```
|
|
294
|
+
*
|
|
295
|
+
* Note: Only accepts relations. Use `Obj.update` for objects.
|
|
296
|
+
*/
|
|
297
|
+
export const update = <T extends Unknown>(relation: T, callback: internal.ChangeCallback<T>): void => {
|
|
298
|
+
internal.change(relation, callback);
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
//
|
|
302
|
+
// Snapshot
|
|
303
|
+
//
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Returns an immutable snapshot of a relation.
|
|
307
|
+
* The snapshot is branded with SnapshotKindId instead of KindId,
|
|
308
|
+
* making it distinguishable from the reactive relation at the type level.
|
|
309
|
+
*/
|
|
310
|
+
export const getSnapshot: <T extends Unknown>(rel: T) => Snapshot<T> = internal.getSnapshot as any;
|
|
311
|
+
|
|
312
|
+
//
|
|
313
|
+
// Subscribe
|
|
314
|
+
//
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Subscribe to relation updates.
|
|
318
|
+
* The callback is called synchronously when the relation is modified.
|
|
319
|
+
* Only accepts reactive relations (not snapshots).
|
|
320
|
+
* @returns Unsubscribe function.
|
|
321
|
+
*/
|
|
322
|
+
export const subscribe = (rel: Unknown, callback: () => void): (() => void) => {
|
|
323
|
+
return internal.subscribe(rel, callback);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
//
|
|
327
|
+
// Property Access
|
|
328
|
+
//
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Get a deeply nested property from a relation.
|
|
332
|
+
* Accepts both reactive relations and snapshots.
|
|
333
|
+
*/
|
|
334
|
+
export const getValue = (rel: Unknown | Snapshot, path: readonly (string | number)[]): any => {
|
|
335
|
+
return internal.getValue(rel, createJsonPath(path));
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Set a deeply nested property on a relation.
|
|
340
|
+
* Must be called within a `Relation.update` callback.
|
|
341
|
+
*
|
|
342
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
343
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
344
|
+
*/
|
|
345
|
+
export const setValue: (rel: Mutable<Unknown>, path: readonly (string | number)[], value: any) => void =
|
|
346
|
+
internal.setValue as any;
|
|
347
|
+
|
|
348
|
+
//
|
|
349
|
+
// Type
|
|
350
|
+
//
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Get the DXN of the relation.
|
|
354
|
+
* Accepts both reactive relations and snapshots.
|
|
355
|
+
*/
|
|
356
|
+
export const getDXN = (entity: Unknown | Snapshot): DXN => internal.getDXN(entity);
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @returns The DXN of the relation's type.
|
|
360
|
+
*/
|
|
361
|
+
export const getTypeDXN = internal.getTypeDXN;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Get the schema of the relation.
|
|
365
|
+
* Returns the branded ECHO schema used to create the relation.
|
|
366
|
+
*/
|
|
367
|
+
export const getSchema: (rel: unknown | undefined) => Type.AnyEntity | undefined = internal.getSchema as any;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @returns The typename of the relation's type.
|
|
371
|
+
* Accepts both reactive relations and snapshots.
|
|
372
|
+
*/
|
|
373
|
+
export const getTypename = (entity: Unknown | Snapshot): string | undefined => internal.getTypename(entity);
|
|
374
|
+
|
|
375
|
+
//
|
|
376
|
+
// Database
|
|
377
|
+
//
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Get the database the relation belongs to.
|
|
381
|
+
* Accepts both reactive relations and snapshots.
|
|
382
|
+
*/
|
|
383
|
+
export const getDatabase = (entity: Unknown | Snapshot): Database.Database | undefined => internal.getDatabase(entity);
|
|
384
|
+
|
|
385
|
+
//
|
|
386
|
+
// Meta
|
|
387
|
+
//
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Property that accesses metadata for an entity.
|
|
391
|
+
*
|
|
392
|
+
* Alias for `Entity.Meta`.
|
|
393
|
+
*/
|
|
394
|
+
export const Meta = internal.MetaId;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Deeply read-only version of ObjectMeta.
|
|
398
|
+
*/
|
|
399
|
+
export type ReadonlyMeta = internal.ReadonlyMeta;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Mutable meta type returned by `Relation.getMeta` inside a `Relation.update` callback.
|
|
403
|
+
*/
|
|
404
|
+
export type Meta = internal.Meta;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Get the metadata for a relation.
|
|
408
|
+
* Returns mutable meta when passed a mutable relation (inside `Relation.update` callback).
|
|
409
|
+
* Returns read-only meta when passed a regular relation or snapshot.
|
|
410
|
+
*/
|
|
411
|
+
// TODO(wittjosiah): When passed a Snapshot, should return a snapshot of meta, not the live meta proxy.
|
|
412
|
+
export function getMeta(entity: Mutable<Unknown>): Meta;
|
|
413
|
+
export function getMeta(entity: Unknown | Snapshot): ReadonlyMeta;
|
|
414
|
+
export function getMeta(entity: Unknown | Snapshot | Mutable<Unknown>): Meta | ReadonlyMeta {
|
|
415
|
+
return internal.getMetaChecked(entity);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @returns Foreign keys for the relation from the specified source.
|
|
420
|
+
* Accepts both reactive relations and snapshots.
|
|
421
|
+
*/
|
|
422
|
+
export const getKeys = (entity: Unknown | Snapshot, source: string): ForeignKey[] => internal.getKeys(entity, source);
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Delete all keys from the relation for the specified source.
|
|
426
|
+
* Must be called within a `Relation.update` callback.
|
|
427
|
+
*
|
|
428
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
429
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
430
|
+
*/
|
|
431
|
+
export const deleteKeys = (entity: Mutable<Unknown>, source: string): void => internal.deleteKeys(entity, source);
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Add a tag to the relation.
|
|
435
|
+
* Must be called within a `Relation.update` callback.
|
|
436
|
+
*
|
|
437
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
438
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
439
|
+
*/
|
|
440
|
+
export const addTag = (entity: Mutable<Unknown>, tag: string): void => internal.addTag(entity, tag);
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Remove a tag from the relation.
|
|
444
|
+
* Must be called within a `Relation.update` callback.
|
|
445
|
+
*
|
|
446
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
447
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
448
|
+
*/
|
|
449
|
+
export const removeTag = (entity: Mutable<Unknown>, tag: string): void => internal.removeTag(entity, tag);
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Check if the relation is deleted.
|
|
453
|
+
* Accepts both reactive relations and snapshots.
|
|
454
|
+
*/
|
|
455
|
+
export const isDeleted = (entity: Unknown | Snapshot): boolean => internal.isDeleted(entity);
|
|
456
|
+
|
|
457
|
+
//
|
|
458
|
+
// Annotations
|
|
459
|
+
//
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Get the label of the relation.
|
|
463
|
+
* Accepts both reactive relations and snapshots.
|
|
464
|
+
*/
|
|
465
|
+
export const getLabel = (entity: Unknown | Snapshot): string | undefined => internal.getLabel(entity);
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Set the label of the relation.
|
|
469
|
+
* Must be called within a `Relation.update` callback.
|
|
470
|
+
*
|
|
471
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
472
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
473
|
+
*/
|
|
474
|
+
export const setLabel = (entity: Mutable<Unknown>, label: string): void => internal.setLabel(entity, label);
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Get the description of the relation.
|
|
478
|
+
* Accepts both reactive relations and snapshots.
|
|
479
|
+
*/
|
|
480
|
+
export const getDescription = (entity: Unknown | Snapshot): string | undefined => internal.getDescription(entity);
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Set the description of the relation.
|
|
484
|
+
* Must be called within a `Relation.update` callback.
|
|
485
|
+
*
|
|
486
|
+
* NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`
|
|
487
|
+
* parameters, so there is no compile-time error. Enforcement is runtime-only.
|
|
488
|
+
*/
|
|
489
|
+
export const setDescription = (entity: Mutable<Unknown>, description: string): void =>
|
|
490
|
+
internal.setDescription(entity, description);
|
|
491
|
+
|
|
492
|
+
//
|
|
493
|
+
// JSON
|
|
494
|
+
//
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* JSON representation of a relation.
|
|
498
|
+
*/
|
|
499
|
+
export type JSON = internal.ObjectJSON;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Converts relation to its JSON representation.
|
|
503
|
+
* Accepts both reactive relations and snapshots.
|
|
504
|
+
*/
|
|
505
|
+
export const toJSON = (entity: Unknown | Snapshot): JSON => internal.objectToJSON(entity);
|
|
506
|
+
|
|
507
|
+
//
|
|
508
|
+
// Sorting
|
|
509
|
+
//
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Comparator function type for sorting relations.
|
|
513
|
+
* Accepts both reactive relations and snapshots.
|
|
514
|
+
*/
|
|
515
|
+
export type Comparator = internal.Comparator<Unknown | Snapshot>;
|
|
516
|
+
|
|
517
|
+
export const sortByLabel: Comparator = internal.sortByLabel as Comparator;
|
|
518
|
+
export const sortByTypename: Comparator = internal.sortByTypename as Comparator;
|
|
519
|
+
export const sort = (...comparators: Comparator[]): Comparator => internal.sort(...comparators) as Comparator;
|
|
520
|
+
|
|
521
|
+
//
|
|
522
|
+
// Version
|
|
523
|
+
//
|
|
524
|
+
|
|
525
|
+
export const VersionTypeId = internal.VersionTypeId;
|
|
526
|
+
export const isVersion = internal.isVersion;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Represent relation version.
|
|
530
|
+
*/
|
|
531
|
+
export type Version = internal.EntityVersion;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Returns the version of the relation.
|
|
535
|
+
* Accepts both reactive relations and snapshots.
|
|
536
|
+
*/
|
|
537
|
+
export const version = (entity: Unknown | Snapshot): Version => internal.version(entity);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type * as Types from 'effect/Types';
|
|
6
|
+
|
|
7
|
+
import type * as JsonSchema from './JsonSchema';
|
|
8
|
+
import type * as Key from './Key';
|
|
9
|
+
import type * as QueryResult from './QueryResult';
|
|
10
|
+
import type * as Type from './Type';
|
|
11
|
+
|
|
12
|
+
// TODO(wittjosiah): Replace w/ Query.Query.
|
|
13
|
+
export type Query = {
|
|
14
|
+
/**
|
|
15
|
+
* Filter by schema ID.
|
|
16
|
+
* Schema id is a DXN with `echo` or `type` kind.
|
|
17
|
+
*/
|
|
18
|
+
id?: string | string[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Id of the backing ECHO object.
|
|
22
|
+
*/
|
|
23
|
+
backingObjectId?: Key.ObjectId | Key.ObjectId[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* One or more typenames to filter by.
|
|
27
|
+
*/
|
|
28
|
+
typename?: string | string[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* [Semver Range](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges) for the schema version.
|
|
32
|
+
*/
|
|
33
|
+
version?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Where to look for the schema.
|
|
37
|
+
*
|
|
38
|
+
* Database schema are stored in the database of the current space.
|
|
39
|
+
* Runtime schema are registered in the runtime.
|
|
40
|
+
*
|
|
41
|
+
* @default ['database']
|
|
42
|
+
*/
|
|
43
|
+
location?: ('database' | 'runtime')[];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Include system schemas.
|
|
47
|
+
* @default false
|
|
48
|
+
*
|
|
49
|
+
* The system schema include but are not limited to:
|
|
50
|
+
* - org.dxos.type.schema
|
|
51
|
+
*/
|
|
52
|
+
includeSystem?: boolean;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Input for schema registration.
|
|
57
|
+
* The typename, version and schema mutability metadata is read from the schema annotations.
|
|
58
|
+
*
|
|
59
|
+
* Accepts:
|
|
60
|
+
* - Branded ECHO schemas created with Type.Obj() or Type.Relation()
|
|
61
|
+
* - JSON schema with typename and version
|
|
62
|
+
*/
|
|
63
|
+
export type RegisterSchemaInput =
|
|
64
|
+
| Type.AnyEntity
|
|
65
|
+
| {
|
|
66
|
+
typename: string;
|
|
67
|
+
version: string;
|
|
68
|
+
jsonSchema: JsonSchema.JsonSchema;
|
|
69
|
+
/**
|
|
70
|
+
* Display name of the schema.
|
|
71
|
+
*/
|
|
72
|
+
name?: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ExtractQueryResult<Query> = Query extends { location: ('database' | 'runtime')[] }
|
|
76
|
+
? Type.AnyEntity
|
|
77
|
+
: Type.RuntimeType;
|
|
78
|
+
|
|
79
|
+
// TODO(dmaretskyi): Rename TypeRegistry
|
|
80
|
+
export interface SchemaRegistry {
|
|
81
|
+
/**
|
|
82
|
+
* Checks if the provided schema is registered.
|
|
83
|
+
*/
|
|
84
|
+
// TODO(burdon): Type?
|
|
85
|
+
hasSchema(schema: Type.AnyEntity): boolean;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Registers the provided schema.
|
|
89
|
+
*
|
|
90
|
+
* @returns Mutable runtime instances of schemas that were registered.
|
|
91
|
+
*
|
|
92
|
+
* The behavior of this method depends on the state of the database.
|
|
93
|
+
* The general principle is that the schema will be upserted into the space.
|
|
94
|
+
* If an equivalent schema with the same name and version already exists, the method does nothing.
|
|
95
|
+
* If a different schema with the same name and version exists, the method throws an error.
|
|
96
|
+
* If no schema with the same name and version exists, a new schema will be inserted based on semantic versioning rules.
|
|
97
|
+
*/
|
|
98
|
+
register(input: RegisterSchemaInput[]): Promise<Type.RuntimeType[]>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
query<Q extends Types.NoExcessProperties<Query, Q>>(
|
|
104
|
+
query?: Q & Query,
|
|
105
|
+
): QueryResult.QueryResult<ExtractQueryResult<Q>>;
|
|
106
|
+
}
|