@dxos/echo 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-BIDAASFK.mjs → chunk-7GH6RXJ3.mjs} +2246 -2290
- package/dist/lib/browser/chunk-7GH6RXJ3.mjs.map +7 -0
- package/dist/lib/browser/chunk-E4UTVJNF.mjs +1111 -0
- package/dist/lib/browser/chunk-E4UTVJNF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +18 -8
- package/dist/lib/browser/internal/index.mjs +45 -45
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +252 -191
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-JE5RXM2I.mjs +1111 -0
- package/dist/lib/node-esm/chunk-JE5RXM2I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3SVRRCUU.mjs → chunk-M4B6BMD2.mjs} +2246 -2290
- package/dist/lib/node-esm/chunk-M4B6BMD2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +18 -8
- package/dist/lib/node-esm/internal/index.mjs +45 -45
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +252 -191
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/Annotation.d.ts +2 -0
- package/dist/types/src/Annotation.d.ts.map +1 -0
- package/dist/types/src/Database.d.ts +137 -0
- package/dist/types/src/Database.d.ts.map +1 -0
- package/dist/types/src/Entity.d.ts +36 -0
- package/dist/types/src/Entity.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/JsonSchema.d.ts +9 -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/Obj.d.ts +79 -70
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Ref.d.ts +10 -10
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Relation.d.ts +14 -11
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/Tag.d.ts +1 -1
- package/dist/types/src/Tag.d.ts.map +1 -1
- package/dist/types/src/Type.d.ts +39 -49
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +6 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/internal/annotations/annotations.d.ts +174 -0
- package/dist/types/src/internal/annotations/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/annotations/annotations.test.d.ts.map +1 -0
- package/dist/types/src/internal/annotations/index.d.ts +3 -0
- package/dist/types/src/internal/annotations/index.d.ts.map +1 -0
- package/dist/types/src/internal/annotations/util.d.ts +26 -0
- package/dist/types/src/internal/annotations/util.d.ts.map +1 -0
- package/dist/types/src/internal/entities/entity.d.ts +10 -0
- package/dist/types/src/internal/entities/entity.d.ts.map +1 -0
- package/dist/types/src/internal/{object → entities}/expando.d.ts +3 -1
- package/dist/types/src/internal/entities/expando.d.ts.map +1 -0
- package/dist/types/src/internal/entities/index.d.ts +6 -0
- package/dist/types/src/internal/entities/index.d.ts.map +1 -0
- package/dist/types/src/internal/entities/model.d.ts +70 -0
- package/dist/types/src/internal/entities/model.d.ts.map +1 -0
- package/dist/types/src/internal/entities/object.d.ts +11 -0
- package/dist/types/src/internal/entities/object.d.ts.map +1 -0
- package/dist/types/src/internal/entities/relation.d.ts +55 -0
- package/dist/types/src/internal/entities/relation.d.ts.map +1 -0
- package/dist/types/src/internal/entities/util.d.ts +2 -0
- package/dist/types/src/internal/entities/util.d.ts.map +1 -0
- package/dist/types/src/internal/formats/format.d.ts +2 -0
- package/dist/types/src/internal/formats/format.d.ts.map +1 -1
- package/dist/types/src/internal/formats/types.d.ts +7 -7
- package/dist/types/src/internal/formats/types.d.ts.map +1 -1
- package/dist/types/src/internal/index.d.ts +6 -10
- package/dist/types/src/internal/index.d.ts.map +1 -1
- package/dist/types/src/internal/json-schema/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/effect-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/index.d.ts +2 -0
- package/dist/types/src/internal/json-schema/index.d.ts.map +1 -1
- package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +1 -1
- package/dist/types/src/internal/{json → json-schema}/json-schema.d.ts +2 -1
- package/dist/types/src/internal/json-schema/json-schema.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/json-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/common.d.ts.map +1 -1
- package/dist/types/src/internal/object/{create.d.ts → create-object.d.ts} +8 -9
- package/dist/types/src/internal/object/create-object.d.ts.map +1 -0
- package/dist/types/src/internal/object/create-object.test.d.ts +2 -0
- package/dist/types/src/internal/object/create-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/deleted.d.ts +2 -2
- package/dist/types/src/internal/object/deleted.d.ts.map +1 -1
- package/dist/types/src/internal/object/ids.d.ts.map +1 -1
- package/dist/types/src/internal/object/index.d.ts +3 -11
- package/dist/types/src/internal/object/index.d.ts.map +1 -1
- package/dist/types/src/internal/object/json-serializer.d.ts +1 -2
- package/dist/types/src/internal/object/json-serializer.d.ts.map +1 -1
- package/dist/types/src/internal/object/schema-validator.d.ts.map +1 -1
- package/dist/types/src/internal/object/typed-object.d.ts +1 -1
- package/dist/types/src/internal/object/typed-object.d.ts.map +1 -1
- package/dist/types/src/internal/proxy/index.d.ts +3 -0
- package/dist/types/src/internal/proxy/index.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/make-object.d.ts +16 -0
- package/dist/types/src/internal/proxy/make-object.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/typed-handler.d.ts +1 -1
- package/dist/types/src/internal/proxy/typed-handler.d.ts.map +1 -1
- package/dist/types/src/internal/ref/ref.d.ts +15 -12
- package/dist/types/src/internal/ref/ref.d.ts.map +1 -1
- package/dist/types/src/internal/schema/compose.d.ts.map +1 -0
- package/dist/types/src/internal/schema/compose.test.d.ts.map +1 -0
- package/dist/types/src/internal/schema/echo-schema.d.ts +9 -9
- package/dist/types/src/internal/schema/echo-schema.d.ts.map +1 -1
- package/dist/types/src/internal/schema/index.d.ts +3 -4
- package/dist/types/src/internal/schema/index.d.ts.map +1 -1
- package/dist/types/src/internal/schema/persistent-schema.d.ts +18 -0
- package/dist/types/src/internal/schema/persistent-schema.d.ts.map +1 -0
- package/dist/types/src/internal/schema/runtime-schema-registry.d.ts +1 -1
- package/dist/types/src/internal/schema/runtime-schema-registry.d.ts.map +1 -1
- package/dist/types/src/internal/types/base.d.ts +37 -0
- package/dist/types/src/internal/types/base.d.ts.map +1 -0
- package/dist/types/src/internal/{ast/entity-kind.d.ts → types/entity.d.ts} +3 -1
- package/dist/types/src/internal/types/entity.d.ts.map +1 -0
- package/dist/types/src/internal/types/index.d.ts +5 -2
- package/dist/types/src/internal/types/index.d.ts.map +1 -1
- package/dist/types/src/internal/{object → types}/meta.d.ts +20 -11
- package/dist/types/src/internal/types/meta.d.ts.map +1 -0
- package/dist/types/src/internal/types/typename.d.ts +13 -0
- package/dist/types/src/internal/types/typename.d.ts.map +1 -0
- package/dist/types/src/internal/{object → types}/version.d.ts +3 -2
- package/dist/types/src/internal/types/version.d.ts.map +1 -0
- package/dist/types/src/query/filter.d.ts +167 -0
- package/dist/types/src/query/filter.d.ts.map +1 -0
- package/dist/types/src/query/index.d.ts +3 -0
- package/dist/types/src/query/index.d.ts.map +1 -1
- package/dist/types/src/query/order.d.ts +12 -0
- package/dist/types/src/query/order.d.ts.map +1 -0
- package/dist/types/src/query/query.d.ts +9 -145
- package/dist/types/src/query/query.d.ts.map +1 -1
- package/dist/types/src/query/testing.d.ts +51 -0
- package/dist/types/src/query/testing.d.ts.map +1 -0
- package/dist/types/src/{internal/query/query.d.ts → query/types.d.ts} +1 -1
- package/dist/types/src/query/types.d.ts.map +1 -0
- package/dist/types/src/query/util.d.ts +8 -0
- package/dist/types/src/query/util.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 -3
- 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/{types.d.ts → test-schema.d.ts} +166 -57
- package/dist/types/src/testing/test-schema.d.ts.map +1 -0
- package/dist/types/src/{internal/testing/utils.d.ts → testing/util.d.ts} +11 -5
- package/dist/types/src/testing/util.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -38
- package/src/Annotation.ts +17 -0
- package/src/Database.ts +189 -0
- package/src/Entity.ts +51 -0
- package/src/Format.ts +11 -0
- package/src/JsonSchema.ts +16 -0
- package/src/Key.ts +3 -0
- package/src/Obj.ts +248 -181
- package/src/Ref.ts +9 -9
- package/src/Relation.ts +58 -44
- package/src/Tag.ts +2 -1
- package/src/Type.ts +96 -83
- package/src/index.ts +9 -4
- package/src/internal/README.md +83 -0
- package/src/internal/{ast → annotations}/annotations.test.ts +13 -15
- package/src/internal/annotations/annotations.ts +463 -0
- package/src/internal/annotations/index.ts +6 -0
- package/src/internal/annotations/util.ts +70 -0
- package/src/internal/entities/entity.ts +109 -0
- package/src/internal/{object → entities}/expando.ts +7 -5
- package/src/internal/entities/index.ts +9 -0
- package/src/internal/{object → entities}/model.ts +49 -90
- package/src/internal/entities/object.ts +45 -0
- package/src/internal/entities/relation.ts +155 -0
- package/src/internal/entities/util.ts +33 -0
- package/src/internal/formats/date.test.ts +1 -1
- package/src/internal/formats/date.ts +5 -5
- package/src/internal/formats/format.test.ts +5 -5
- package/src/internal/formats/format.ts +3 -0
- package/src/internal/formats/number.ts +5 -5
- package/src/internal/formats/object.ts +2 -2
- package/src/internal/formats/string.ts +9 -9
- package/src/internal/formats/types.ts +44 -39
- package/src/internal/index.ts +29 -13
- package/src/internal/{json → json-schema}/annotations.ts +1 -1
- package/src/internal/json-schema/index.ts +2 -0
- package/src/internal/json-schema/json-schema-type.ts +4 -3
- package/src/internal/{json → json-schema}/json-schema.test.ts +48 -38
- package/src/internal/{json → json-schema}/json-schema.ts +16 -7
- package/src/internal/object/common.ts +3 -4
- package/src/internal/object/{create.test.ts → create-object.test.ts} +30 -32
- package/src/internal/object/{create.ts → create-object.ts} +33 -34
- package/src/internal/object/deleted.ts +6 -6
- package/src/internal/object/ids.ts +1 -1
- package/src/internal/object/index.ts +3 -11
- package/src/internal/object/inspect.ts +3 -5
- package/src/internal/object/json-serializer.test.ts +33 -38
- package/src/internal/object/json-serializer.ts +43 -38
- package/src/internal/object/schema-validator.ts +3 -2
- package/src/internal/object/typed-object.test.ts +1 -1
- package/src/internal/object/typed-object.ts +11 -5
- package/src/internal/proxy/handler.test.ts +30 -20
- package/src/internal/proxy/index.ts +6 -0
- package/src/internal/proxy/{reactive-object.ts → make-object.ts} +19 -14
- package/src/internal/proxy/schema.test.ts +5 -4
- package/src/internal/proxy/typed-handler.test.ts +28 -28
- package/src/internal/proxy/typed-handler.ts +8 -3
- package/src/internal/proxy/typed-object.test.ts +16 -11
- package/src/internal/ref/ref.test.ts +8 -7
- package/src/internal/ref/ref.ts +24 -20
- package/src/internal/{projection → schema}/compose.test.ts +5 -6
- package/src/internal/{projection → schema}/compose.ts +2 -1
- package/src/internal/schema/echo-schema.ts +30 -28
- package/src/internal/schema/index.ts +3 -4
- package/src/internal/schema/manipulation.ts +1 -1
- package/src/internal/schema/persistent-schema.ts +28 -0
- package/src/internal/schema/runtime-schema-registry.ts +4 -4
- package/src/internal/types/base.ts +58 -0
- package/src/internal/{ast/entity-kind.ts → types/entity.ts} +8 -0
- package/src/internal/types/index.ts +5 -2
- package/src/internal/{object → types}/meta.ts +32 -17
- package/src/internal/types/typename.ts +45 -0
- package/src/internal/types/version.ts +20 -0
- package/src/query/filter.ts +455 -0
- package/src/query/index.ts +4 -1
- package/src/query/order.ts +34 -0
- package/src/query/query.test.ts +48 -115
- package/src/query/query.ts +16 -502
- package/src/query/testing.ts +64 -0
- package/src/query/util.ts +25 -0
- package/src/testing/api.test.ts +100 -0
- package/src/testing/index.ts +3 -3
- package/src/testing/test-data.ts +130 -0
- package/src/testing/test-schema.ts +213 -0
- package/src/{internal/testing/utils.ts → testing/util.ts} +38 -14
- package/dist/lib/browser/chunk-BIDAASFK.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZDLCWGEW.mjs +0 -410
- package/dist/lib/browser/chunk-ZDLCWGEW.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZFRJKT4A.mjs +0 -585
- package/dist/lib/browser/chunk-ZFRJKT4A.mjs.map +0 -7
- package/dist/lib/browser/query/index.mjs +0 -13
- package/dist/lib/browser/query/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3SVRRCUU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CGDHRZWH.mjs +0 -585
- package/dist/lib/node-esm/chunk-CGDHRZWH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HWS6VBQC.mjs +0 -410
- package/dist/lib/node-esm/chunk-HWS6VBQC.mjs.map +0 -7
- package/dist/lib/node-esm/query/index.mjs +0 -13
- package/dist/lib/node-esm/query/index.mjs.map +0 -7
- package/dist/types/src/internal/ast/annotation-helper.d.ts +0 -8
- package/dist/types/src/internal/ast/annotation-helper.d.ts.map +0 -1
- package/dist/types/src/internal/ast/annotations.d.ts +0 -131
- package/dist/types/src/internal/ast/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/ast/annotations.test.d.ts.map +0 -1
- package/dist/types/src/internal/ast/entity-kind.d.ts.map +0 -1
- package/dist/types/src/internal/ast/index.d.ts +0 -5
- package/dist/types/src/internal/ast/index.d.ts.map +0 -1
- package/dist/types/src/internal/ast/types.d.ts +0 -6
- package/dist/types/src/internal/ast/types.d.ts.map +0 -1
- package/dist/types/src/internal/json/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/json/effect-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/json/index.d.ts +0 -2
- package/dist/types/src/internal/json/index.d.ts.map +0 -1
- package/dist/types/src/internal/json/json-schema.d.ts.map +0 -1
- package/dist/types/src/internal/json/json-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/accessors.d.ts +0 -37
- package/dist/types/src/internal/object/accessors.d.ts.map +0 -1
- package/dist/types/src/internal/object/create.d.ts.map +0 -1
- package/dist/types/src/internal/object/create.test.d.ts +0 -2
- package/dist/types/src/internal/object/create.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/entity.d.ts +0 -33
- package/dist/types/src/internal/object/entity.d.ts.map +0 -1
- package/dist/types/src/internal/object/expando.d.ts.map +0 -1
- package/dist/types/src/internal/object/meta.d.ts.map +0 -1
- package/dist/types/src/internal/object/model.d.ts +0 -117
- package/dist/types/src/internal/object/model.d.ts.map +0 -1
- package/dist/types/src/internal/object/relation.d.ts +0 -17
- package/dist/types/src/internal/object/relation.d.ts.map +0 -1
- package/dist/types/src/internal/object/typename.d.ts +0 -15
- package/dist/types/src/internal/object/typename.d.ts.map +0 -1
- package/dist/types/src/internal/object/version.d.ts.map +0 -1
- package/dist/types/src/internal/projection/compose.d.ts.map +0 -1
- package/dist/types/src/internal/projection/compose.test.d.ts.map +0 -1
- package/dist/types/src/internal/projection/index.d.ts +0 -2
- package/dist/types/src/internal/projection/index.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/reactive-object.d.ts +0 -15
- package/dist/types/src/internal/proxy/reactive-object.d.ts.map +0 -1
- package/dist/types/src/internal/query/index.d.ts +0 -2
- package/dist/types/src/internal/query/index.d.ts.map +0 -1
- package/dist/types/src/internal/query/query.d.ts.map +0 -1
- package/dist/types/src/internal/schema/stored-schema.d.ts +0 -13
- package/dist/types/src/internal/schema/stored-schema.d.ts.map +0 -1
- package/dist/types/src/internal/testing/index.d.ts +0 -3
- package/dist/types/src/internal/testing/index.d.ts.map +0 -1
- package/dist/types/src/internal/testing/types.d.ts +0 -381
- package/dist/types/src/internal/testing/types.d.ts.map +0 -1
- package/dist/types/src/internal/testing/utils.d.ts.map +0 -1
- package/dist/types/src/internal/types/types.d.ts +0 -79
- package/dist/types/src/internal/types/types.d.ts.map +0 -1
- package/dist/types/src/internal/types/types.test.d.ts +0 -2
- package/dist/types/src/internal/types/types.test.d.ts.map +0 -1
- package/dist/types/src/internal/types/util.d.ts +0 -5
- package/dist/types/src/internal/types/util.d.ts.map +0 -1
- package/dist/types/src/testing/echo-schema.d.ts +0 -7
- package/dist/types/src/testing/echo-schema.d.ts.map +0 -1
- package/dist/types/src/testing/types.d.ts.map +0 -1
- package/src/internal/ast/annotation-helper.ts +0 -22
- package/src/internal/ast/annotations.ts +0 -226
- package/src/internal/ast/index.ts +0 -8
- package/src/internal/ast/types.ts +0 -17
- package/src/internal/json/index.ts +0 -5
- package/src/internal/object/accessors.ts +0 -153
- package/src/internal/object/entity.ts +0 -248
- package/src/internal/object/relation.ts +0 -24
- package/src/internal/object/typename.ts +0 -61
- package/src/internal/object/version.ts +0 -22
- package/src/internal/projection/index.ts +0 -5
- package/src/internal/query/index.ts +0 -5
- package/src/internal/schema/stored-schema.ts +0 -26
- package/src/internal/testing/index.ts +0 -6
- package/src/internal/testing/types.ts +0 -144
- package/src/internal/types/types.test.ts +0 -48
- package/src/internal/types/types.ts +0 -176
- package/src/internal/types/util.ts +0 -9
- package/src/test/api.test.ts +0 -180
- package/src/testing/echo-schema.ts +0 -39
- package/src/testing/types.ts +0 -108
- /package/dist/types/src/internal/{ast → annotations}/annotations.test.d.ts +0 -0
- /package/dist/types/src/internal/{json → json-schema}/annotations.d.ts +0 -0
- /package/dist/types/src/internal/{json → json-schema}/effect-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{json → json-schema}/json-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{projection → schema}/compose.d.ts +0 -0
- /package/dist/types/src/internal/{projection → schema}/compose.test.d.ts +0 -0
- /package/dist/types/src/{test → testing}/api.test.d.ts +0 -0
- /package/src/internal/{json → json-schema}/effect-schema.test.ts +0 -0
- /package/src/{internal/query/query.ts → query/types.ts} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { type TypeMeta } from '../annotations';
|
|
3
|
+
import { type EchoTypeSchema } from './entity';
|
|
4
|
+
/**
|
|
5
|
+
* Property name for relation source when object is serialized to JSON.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ATTR_RELATION_SOURCE = "@relationSource";
|
|
8
|
+
/**
|
|
9
|
+
* Used to access relation source ref on live ECHO objects.
|
|
10
|
+
* Reading this symbol must return `Live<EchoObjectSchema<any>>` or a DXN.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RelationSourceId: unique symbol;
|
|
13
|
+
/**
|
|
14
|
+
* Used to access relation source ref on live ECHO objects.
|
|
15
|
+
* Reading this symbol must return `Live<EchoObjectSchema<any>>` or a DXN.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RelationSourceDXNId: unique symbol;
|
|
18
|
+
/**
|
|
19
|
+
* Property name for relation target when object is serialized to JSON.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ATTR_RELATION_TARGET = "@relationTarget";
|
|
22
|
+
/**
|
|
23
|
+
* Used to access relation target ref on live ECHO objects.
|
|
24
|
+
* Reading this symbol must return `Live<EchoObjectSchema<any>>` or a DXN.
|
|
25
|
+
*/
|
|
26
|
+
export declare const RelationTargetId: unique symbol;
|
|
27
|
+
/**
|
|
28
|
+
* Used to access relation target ref on live ECHO objects.
|
|
29
|
+
* Reading this symbol must return `Live<EchoObjectSchema<any>>` or a DXN.
|
|
30
|
+
*/
|
|
31
|
+
export declare const RelationTargetDXNId: unique symbol;
|
|
32
|
+
/**
|
|
33
|
+
* Source and target props on relations.
|
|
34
|
+
*/
|
|
35
|
+
export type RelationSourceTargetRefs<Source = any, Target = any> = {
|
|
36
|
+
/**
|
|
37
|
+
* Source ECHO live object.
|
|
38
|
+
*/
|
|
39
|
+
[RelationSourceId]: Source;
|
|
40
|
+
/**
|
|
41
|
+
* Target ECHO live object.
|
|
42
|
+
*/
|
|
43
|
+
[RelationTargetId]: Target;
|
|
44
|
+
};
|
|
45
|
+
export type RelationSource<R> = R extends RelationSourceTargetRefs<infer Source, infer _Target> ? Source : never;
|
|
46
|
+
export type RelationTarget<R> = R extends RelationSourceTargetRefs<infer _Source, infer Target> ? Target : never;
|
|
47
|
+
export type EchoRelationSchemaOptions<TSource extends Schema.Schema.AnyNoContext, TTarget extends Schema.Schema.AnyNoContext> = TypeMeta & {
|
|
48
|
+
source: TSource;
|
|
49
|
+
target: TTarget;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Schema for Relation entity types.
|
|
53
|
+
*/
|
|
54
|
+
export declare const EchoRelationSchema: <Source extends Schema.Schema.AnyNoContext, Target extends Schema.Schema.AnyNoContext>({ source, target, typename, version, }: EchoRelationSchemaOptions<Source, Target>) => <Self extends Schema.Schema.Any>(self: Self) => EchoTypeSchema<Self, RelationSourceTargetRefs<Schema.Schema.Type<Source>, Schema.Schema.Type<Target>>>;
|
|
55
|
+
//# sourceMappingURL=relation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../../../../../src/internal/entities/relation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAOxC,OAAO,EAGL,KAAK,QAAQ,EAKd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,MAAgD,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAAmD,CAAC;AAE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AAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CA6BzG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/internal/entities/util.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
2
|
import * as NumberUtil from './number';
|
|
3
3
|
import * as ObjectUtil from './object';
|
|
4
|
+
import { TypeFormat as TypeFormatEnum } from './types';
|
|
4
5
|
/**
|
|
5
6
|
* Formats.
|
|
6
7
|
* https://json-schema.org/understanding-json-schema/reference/string#built-in-formats
|
|
7
8
|
* NOTE: A JSON Schema validator will ignore any format type that it does not understand.
|
|
8
9
|
*/
|
|
9
10
|
export declare namespace Format {
|
|
11
|
+
export import TypeFormat = TypeFormatEnum;
|
|
10
12
|
const DXN: Schema.refine<string, typeof Schema.NonEmptyString>;
|
|
11
13
|
const Email: Schema.refine<string, typeof Schema.String>;
|
|
12
14
|
const Formula: typeof Schema.String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/format.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/format.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAMvD;;;;GAIG;AAEH,yBAAiB,MAAM,CAAC;IACtB,MAAM,QAAQ,UAAU,GAAG,cAAc,CAAC;IAGnC,MAAM,GAAG,qDAAkB,CAAC;IAC5B,MAAM,KAAK,6CAAmB,CAAC;IAC/B,MAAM,OAAO,sBAAqB,CAAC;IACnC,MAAM,QAAQ,sBAAsB,CAAC;IACrC,MAAM,IAAI,sBAAkB,CAAC;IAC7B,MAAM,QAAQ,sBAAsB,CAAC;IACrC,MAAM,KAAK,sBAAmB,CAAC;IAC/B,MAAM,GAAG,6CAAiB,CAAC;IAC3B,MAAM,IAAI,oBAAc,CAAC;IAIzB,MAAM,QAAQ,8FAAsB,CAAC;IACrC,MAAM,OAAO,mDAAqB,CAAC;IACnC,MAAM,OAAO,uFAAqB,CAAC;IACnC,MAAM,SAAS,2CAAuB,CAAC;IAGvC,MAAM,QAAQ,2CAAoB,CAAC;IACnC,MAAM,IAAI,2CAAoB,CAAC;IAC/B,MAAM,IAAI,2CAAoB,CAAC;IAC/B,MAAM,QAAQ,2CAAoB,CAAC;IAGnC,MAAM,QAAQ,uUAAsB,CAAC;IAC5C,KAAY,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;CAC5C"}
|
|
@@ -16,9 +16,9 @@ export declare const getTypeEnum: (property: JsonSchemaType) => TypeEnum | undef
|
|
|
16
16
|
* https://json-schema.org/understanding-json-schema/reference/string#built-in-formats
|
|
17
17
|
*/
|
|
18
18
|
export declare const FormatAnnotationId: unique symbol;
|
|
19
|
-
export declare const FormatAnnotation: import("..").AnnotationHelper<
|
|
20
|
-
export declare const getFormatAnnotation: (node: SchemaAST.AST) =>
|
|
21
|
-
export declare enum
|
|
19
|
+
export declare const FormatAnnotation: import("..").AnnotationHelper<TypeFormat>;
|
|
20
|
+
export declare const getFormatAnnotation: (node: SchemaAST.AST) => TypeFormat | undefined;
|
|
21
|
+
export declare enum TypeFormat {
|
|
22
22
|
None = "none",
|
|
23
23
|
String = "string",
|
|
24
24
|
Number = "number",
|
|
@@ -46,19 +46,19 @@ export declare enum FormatEnum {
|
|
|
46
46
|
Duration = "duration",
|
|
47
47
|
GeoPoint = "lnglat"
|
|
48
48
|
}
|
|
49
|
-
export declare const FormatEnums:
|
|
49
|
+
export declare const FormatEnums: TypeFormat[];
|
|
50
50
|
export declare const PropertyKind: {
|
|
51
51
|
type: typeof TypeEnum;
|
|
52
|
-
format: typeof
|
|
52
|
+
format: typeof TypeFormat;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* Default formats
|
|
56
56
|
*/
|
|
57
|
-
export declare const typeToFormat: Partial<Record<TypeEnum,
|
|
57
|
+
export declare const typeToFormat: Partial<Record<TypeEnum, TypeFormat>>;
|
|
58
58
|
/**
|
|
59
59
|
* Map of format to type.
|
|
60
60
|
*/
|
|
61
|
-
export declare const formatToType: Record<
|
|
61
|
+
export declare const formatToType: Record<TypeFormat, TypeEnum>;
|
|
62
62
|
/**
|
|
63
63
|
* Allowed value options for select.
|
|
64
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,MAAM,MAAM,UAAU,GAClB,UAAU,CAAC,iBAAiB,GAC5B,UAAU,CAAC,iBAAiB,GAC5B,UAAU,CAAC,iBAAiB,GAC5B,UAAU,CAAC,kBAAkB,GAC7B,UAAU,CAAC,cAAc,CAAC;AAI9B,oBAAY,QAAQ;IAClB,KAAK,UAAU,CAAE,wBAAwB;IACzC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAGD,eAAO,MAAM,WAAW,GAAI,UAAU,cAAc,KAAG,QAAQ,GAAG,SAejE,CAAC;AAE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AE,uBAAuB;IAC5C,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAC5B,GAAG,QAAQ;IACX,IAAI,SAAS;IAMb,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IAMvB,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,QAAQ,aAAa;IAMrB,QAAQ,WAAW;CACpB;AAED,eAAO,MAAM,WAAW,cAAmC,CAAC;AAE5D,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAI9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,CAmCrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAgD,CAAC;AAEjF,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,CAAC,GAAG,KAAG,qBAAqB,EAAE,GAAG,SAC8B,CAAC;AAEpH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
export { JsonPath,
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export * from './ast';
|
|
1
|
+
export { JsonPath, JsonProp, getValue, setValue, splitJsonPath } from '@dxos/effect';
|
|
2
|
+
export * from './annotations';
|
|
3
|
+
export * from './entities';
|
|
5
4
|
export * from './formats';
|
|
6
|
-
export * from './json';
|
|
7
5
|
export * from './json-schema';
|
|
8
|
-
export * from './object';
|
|
9
|
-
export * from './types';
|
|
10
|
-
export { defineHiddenProperty } from '@dxos/live-object';
|
|
11
|
-
export * from './projection';
|
|
12
|
-
export { live } from './proxy/reactive-object';
|
|
13
6
|
export * from './ref';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './object';
|
|
9
|
+
export * from './proxy';
|
|
14
10
|
export * from './schema';
|
|
15
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAErF,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/annotations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOrF,KAAK,sBAAsB,GAAG,MAAM,cAAc,CAAC;AAGnD,KAAK,4BAA4B,GAAG,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AAEH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAG7E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAG9E,CAAC;AAEF;;GAEG;AAGH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAKjF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-schema.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/effect-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/index.ts"],"names":[],"mappings":"AAIA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/json-schema-type.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAqBvD;;GAEG;AACH,eAAO,MAAM,yBAAyB;IACpC;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAQH;;OAEG;;;;;;IAYH;;OAEG;;GAOkB,CAAC;AACxB,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7F;;;;GAIG;AAGH,QAAA,MAAM,eAAe;IACnB;;;OAGG;;IAKH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;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;;;;;;;;;;;;;;;;;;;;;;;IAuEH;;OAEG;;QArSH;;;WAGG;;QAGH;;;WAGG;;QAGH;;WAEG;;QAQH;;WAEG;;;;;;QAYH;;WAEG;;;IAmQH;;OAEG;;QA3SH;;;WAGG;;QAGH;;;WAGG;;QAGH;;WAEG;;QAQH;;WAEG;;;;;;QAYH;;WAEG;;;EAuQmE,CAAC;AAEzE,eAAO,MAAM,gBAAgB,UAAsC,CAAC;AAEpE;;GAEG;AAEH,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;CAAG;AAErG,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAwC,CAAC;AAIlG,eAAO,MAAM,iBAAiB,GAAI,QAAQ,cAAc,EAAE,UAAU,QAAQ,KAAG,cAAc,GAAG,SAE/F,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,cAAc,EAAE,UAAU,QAAQ,EAAE,OAAO,cAAc,mBAIlG,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { type JsonSchemaType } from '
|
|
2
|
+
import { type JsonSchemaType } from './json-schema-type';
|
|
3
3
|
export declare enum PropType {
|
|
4
4
|
NONE = 0,
|
|
5
5
|
STRING = 1,// TODO(burdon): vs TEXT?
|
|
@@ -16,6 +16,7 @@ export type JsonSchemaOptions = {
|
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Convert effect schema to JSON Schema.
|
|
19
|
+
* NOTE: This handles custom annotations.
|
|
19
20
|
* @param schema
|
|
20
21
|
*/
|
|
21
22
|
export declare const toJsonSchema: (schema: Schema.Schema.All, options?: JsonSchemaOptions) => JsonSchemaType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/json-schema.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAsBxC,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,oBAAoB,CAAC;AAG5B,oBAAY,QAAQ;IAClB,IAAI,IAAI;IACR,MAAM,IAAI,CAAE,yBAAyB;IACrC,MAAM,IAAI;IACV,OAAO,IAAI;IACX,IAAI,IAAI;IACR,GAAG,IAAI;IACP,MAAM,IAAI;IACV,IAAI,IAAI;CACT;AAGD,eAAO,MAAM,UAAU,GAAI,OAAO,QAAQ,KAAG,MAiB5C,CAAC;AAIF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AAGH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,UAAS,iBAAsB,KAAG,cAqBzF,CAAC;AAkEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,cAAc,EAAE,QAAQ,cAAc,CAAC,OAAO,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,YA0GpG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/json-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/common.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/common.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,MAAM,MAAM,kBAAkB,GAAG;IAE/B,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf,MAAM,CAAC,EAAE,IAAI,CAAC;CACf,CAAC;AAEF;;GAEG;AAGH,KAAK,sBAAsB,CACzB,YAAY,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EACzC,OAAO,SAAS,kBAAkB,IAChC,OAAO,CAAC,SAAS,CAAC,SAAS,OAAO,GAClC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GACjE,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;AAE7D;;GAEG;AAGH,MAAM,MAAM,iBAAiB,CAC3B,YAAY,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EACzC,OAAO,SAAS,kBAAkB,IAChC,sBAAsB,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,OAAO,GACjG,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GACjF,EAAE,CAAC,CAAC;AAEV,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,SAAS,MAAM,EACf,YAAY,MAAM,CAAC,MAAM,CAAC,YAAY,KACrC,MAAM,CAAC,WAAW,CAAC,GAAG,CAuBxB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as Schema from 'effect/Schema';
|
|
2
|
-
import {
|
|
3
|
-
type
|
|
2
|
+
import { EntityKind, KindId } from '../types';
|
|
3
|
+
export type CreateObjectProps<T> = T extends {
|
|
4
4
|
id: string;
|
|
5
|
-
} ? Omit<T, 'id' |
|
|
5
|
+
} ? Omit<T, 'id' | KindId> & {
|
|
6
6
|
id?: string;
|
|
7
7
|
} : T;
|
|
8
8
|
/**
|
|
@@ -10,7 +10,7 @@ type CreateData<T> = T extends {
|
|
|
10
10
|
* This static version creates plain JavaScript objects that are not reactive/observable.
|
|
11
11
|
* For reactive objects that automatically update UI when changed, use the regular live() function.
|
|
12
12
|
*
|
|
13
|
-
* @param schema - The Effect schema that defines the object's structure and type, piped into
|
|
13
|
+
* @param schema - The Effect schema that defines the object's structure and type, piped into EchoObjectSchema
|
|
14
14
|
* @param data - The data to initialize the object with. The id and @type fields are handled automatically.
|
|
15
15
|
* @returns A new non-reactive object instance conforming to the schema
|
|
16
16
|
* @throws {Error} If the schema is not an object schema
|
|
@@ -26,15 +26,14 @@ type CreateData<T> = T extends {
|
|
|
26
26
|
* version: '0.1.0',
|
|
27
27
|
* }))
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
* const contact = create(Contact, {
|
|
29
|
+
* const contact = createObject(Contact, {
|
|
31
30
|
* name: "John",
|
|
32
31
|
* email: "john@example.com",
|
|
33
32
|
* })
|
|
34
33
|
* ```
|
|
35
34
|
*/
|
|
36
|
-
export declare const
|
|
35
|
+
export declare const createObject: <S extends Schema.Schema.AnyNoContext>(schema: S, props: CreateObjectProps<Schema.Schema.Type<S>>) => CreateObjectProps<Schema.Schema.Type<S>> & {
|
|
37
36
|
id: string;
|
|
37
|
+
[KindId]: EntityKind;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=create.d.ts.map
|
|
39
|
+
//# sourceMappingURL=create-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-object.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/create-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAgB7C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAqB,MAAM,UAAU,CAAC;AAKjE,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,CAAC;AAE3G;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EAC/D,QAAQ,CAAC,EACT,OAAO,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAC9C,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,CAAC,MAAM,CAAC,EAAE,UAAU,CAAA;CAoC/E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-object.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/create-object.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AnyProperties } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* @returns `true` if the object has been marked as deleted.
|
|
4
4
|
*/
|
|
5
|
-
export declare const isDeleted: (obj:
|
|
5
|
+
export declare const isDeleted: (obj: AnyProperties) => boolean;
|
|
6
6
|
//# sourceMappingURL=deleted.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleted.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/deleted.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deleted.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/deleted.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,aAAa,KAAG,OAQ9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/ids.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAA+B,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/ids.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAA+B,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvE;;GAEG;AAEH,eAAO,MAAM,cAAc,GAAI,iBAA0B,EAAE,gBAA2B,QACjB,CAAC"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
export * from './common';
|
|
2
|
-
export * from './create';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './expando';
|
|
2
|
+
export * from './create-object';
|
|
3
|
+
export * from './deleted';
|
|
5
4
|
export * from './ids';
|
|
6
5
|
export * from './json-serializer';
|
|
7
|
-
export * from './meta';
|
|
8
|
-
export type * from './relation';
|
|
9
|
-
export * from './typed-object';
|
|
10
|
-
export * from './typename';
|
|
11
|
-
export * from './deleted';
|
|
12
|
-
export * from './model';
|
|
13
|
-
export * from './accessors';
|
|
14
6
|
export * from './schema-validator';
|
|
15
|
-
export * from './
|
|
7
|
+
export * from './typed-object';
|
|
16
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type EncodedReference } from '@dxos/echo-protocol';
|
|
2
2
|
import { DXN } from '@dxos/keys';
|
|
3
|
+
import { type ObjectJSON } from '../entities';
|
|
3
4
|
import { Ref, type RefResolver } from '../ref';
|
|
4
5
|
import { type AnyEchoObject } from '../types';
|
|
5
|
-
import { type ObjectJSON } from './model';
|
|
6
6
|
type DeepReplaceRef<T> = T extends Ref<any> ? EncodedReference : T extends object ? {
|
|
7
7
|
[K in keyof T]: DeepReplaceRef<T[K]>;
|
|
8
8
|
} : T;
|
|
@@ -19,7 +19,6 @@ export declare const objectToJSON: <T extends AnyEchoObject>(obj: T) => Serializ
|
|
|
19
19
|
* Creates an object from it's json representation.
|
|
20
20
|
* Performs schema validation.
|
|
21
21
|
* References and schema will be resolvable if the `refResolver` is provided.
|
|
22
|
-
*
|
|
23
22
|
* The function need to be async to support resolving the schema as well as the relation endpoints.
|
|
24
23
|
*/
|
|
25
24
|
export declare const objectFromJSON: (jsonData: unknown, { refResolver, dxn }?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-serializer.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/json-serializer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,gBAAgB,EAAuC,MAAM,qBAAqB,CAAC;AAEjG,OAAO,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAK3C,OAAO,
|
|
1
|
+
{"version":3,"file":"json-serializer.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/json-serializer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,gBAAgB,EAAuC,MAAM,qBAAqB,CAAC;AAEjG,OAAO,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAK3C,OAAO,EAKL,KAAK,UAAU,EAOhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,KAAK,WAAW,EAA2C,MAAM,QAAQ,CAAC;AACxF,OAAO,EAGL,KAAK,aAAa,EAOnB,MAAM,UAA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AAO,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-object.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/typed-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,
|
|
1
|
+
{"version":3,"file":"typed-object.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/typed-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAGL,KAAK,QAAQ,EAId,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAwB,MAAM,UAAU,CAAC;AAEjG;;;;;;GAMG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG;AAEvF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/E,wBAAwB;IACxB,QAAQ,KAAK,GAAG,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IAExC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,wEAIzB,gBAAgB,MAOT,YAAY,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,SAAS,kBAAkB,EACnF,QAAQ,YAAY,EACpB,UAAU,OAAO,KAChB,oBAAoB,CAAC,iBAAiB,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CA8BtG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/proxy/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Schema from 'effect/Schema';
|
|
2
|
+
import { type Live } from '@dxos/live-object';
|
|
3
|
+
import { type AnyProperties, KindId, type ObjectMeta } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export type MakeObjectProps<T extends AnyProperties> = Omit<T, 'id' | KindId>;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a reactive object from a plain Javascript object.
|
|
10
|
+
* Optionally provides a TS-effect schema.
|
|
11
|
+
*/
|
|
12
|
+
export declare const makeObject: {
|
|
13
|
+
<T extends AnyProperties>(obj: T): Live<T>;
|
|
14
|
+
<T extends AnyProperties>(schema: Schema.Schema<T, any, never>, obj: NoInfer<MakeObjectProps<T>>, meta?: ObjectMeta): Live<T>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=make-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-object.d.ts","sourceRoot":"","sources":["../../../../../src/internal/proxy/make-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAG7C,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,EAAU,KAAK,UAAU,EAAoB,MAAM,UAAU,CAAC;AAIjG;;GAEG;AAEH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,aAAa,IAAI,IAAI,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AAE9E;;;GAGG;AAKH,eAAO,MAAM,UAAU,EAAE;IACvB,CAAC,CAAC,SAAS,aAAa,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,SAAS,aAAa,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EACpC,GAAG,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAChC,IAAI,CAAC,EAAE,UAAU,GAChB,IAAI,CAAC,CAAC,CAAC,CAAC;CAcZ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
2
|
import { type GenericSignal } from '@dxos/echo-signals/runtime';
|
|
3
3
|
import { type ReactiveHandler } from '@dxos/live-object';
|
|
4
|
-
import { SchemaId, TypeId } from '../
|
|
4
|
+
import { SchemaId, TypeId } from '../types';
|
|
5
5
|
declare const symbolSignal: unique symbol;
|
|
6
6
|
declare const symbolPropertySignal: unique symbol;
|
|
7
7
|
type ProxyTarget = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-handler.d.ts","sourceRoot":"","sources":["../../../../../src/internal/proxy/typed-handler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAEL,KAAK,eAAe,EAMrB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"typed-handler.d.ts","sourceRoot":"","sources":["../../../../../src/internal/proxy/typed-handler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAEL,KAAK,eAAe,EAMrB,MAAM,mBAAmB,CAA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;CAajB;AA8BD,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAUxE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import * as SchemaAST from 'effect/SchemaAST';
|
|
|
3
3
|
import { type EncodedReference } from '@dxos/echo-protocol';
|
|
4
4
|
import { DXN, ObjectId } from '@dxos/keys';
|
|
5
5
|
import { type JsonSchemaType } from '../json-schema';
|
|
6
|
-
import type {
|
|
6
|
+
import type { AnyProperties, WithId } from '../types';
|
|
7
7
|
/**
|
|
8
8
|
* The `$id` and `$ref` fields for an ECHO reference schema.
|
|
9
9
|
*/
|
|
@@ -30,14 +30,17 @@ export declare const RefTypeId: unique symbol;
|
|
|
30
30
|
/**
|
|
31
31
|
* Reference Schema.
|
|
32
32
|
*/
|
|
33
|
-
export interface
|
|
33
|
+
export interface RefSchema<T extends WithId> extends Schema.SchemaClass<Ref<T>, EncodedReference> {
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Type of the `Ref` function and extra methods attached to it.
|
|
37
|
+
*/
|
|
35
38
|
export interface RefFn {
|
|
36
|
-
<S extends Schema.Schema.Any>(schema: S):
|
|
39
|
+
<S extends Schema.Schema.Any>(schema: S): RefSchema<Schema.Schema.Type<S>>;
|
|
37
40
|
/**
|
|
38
41
|
* @returns True if the object is a reference.
|
|
39
42
|
*/
|
|
40
|
-
isRef: (obj:
|
|
43
|
+
isRef: (obj: unknown) => obj is Ref<any>;
|
|
41
44
|
/**
|
|
42
45
|
* @returns True if the reference points to the given object id.
|
|
43
46
|
*/
|
|
@@ -45,7 +48,7 @@ export interface RefFn {
|
|
|
45
48
|
/**
|
|
46
49
|
* @returns True if the schema is a reference schema.
|
|
47
50
|
*/
|
|
48
|
-
isRefSchema: (schema: Schema.Schema<any, any>) => schema is
|
|
51
|
+
isRefSchema: (schema: Schema.Schema<any, any>) => schema is RefSchema<any>;
|
|
49
52
|
/**
|
|
50
53
|
* @returns True if the schema AST is a reference schema.
|
|
51
54
|
*/
|
|
@@ -140,11 +143,11 @@ export interface RefResolver {
|
|
|
140
143
|
* @param load If true the resolver should attempt to load the object from disk.
|
|
141
144
|
* @param onLoad Callback to call when the object is loaded.
|
|
142
145
|
*/
|
|
143
|
-
resolveSync(dxn: DXN, load: boolean, onLoad?: () => void):
|
|
146
|
+
resolveSync(dxn: DXN, load: boolean, onLoad?: () => void): AnyProperties | undefined;
|
|
144
147
|
/**
|
|
145
148
|
* Resolver ref asynchronously.
|
|
146
149
|
*/
|
|
147
|
-
resolve(dxn: DXN): Promise<
|
|
150
|
+
resolve(dxn: DXN): Promise<AnyProperties | undefined>;
|
|
148
151
|
resolveSchema(dxn: DXN): Promise<Schema.Schema.AnyNoContext | undefined>;
|
|
149
152
|
}
|
|
150
153
|
export declare class RefImpl<T> implements Ref<T> {
|
|
@@ -192,15 +195,15 @@ export declare const setRefResolver: (ref: Ref<any>, resolver: RefResolver) => v
|
|
|
192
195
|
/**
|
|
193
196
|
* Internal API for getting the saved target on a reference.
|
|
194
197
|
*/
|
|
195
|
-
export declare const getRefSavedTarget: (ref: Ref<any>) =>
|
|
198
|
+
export declare const getRefSavedTarget: (ref: Ref<any>) => AnyProperties | undefined;
|
|
196
199
|
export declare const refFromEncodedReference: (encodedReference: EncodedReference, resolver?: RefResolver) => Ref<any>;
|
|
197
200
|
export declare class StaticRefResolver implements RefResolver {
|
|
198
|
-
objects: Map<string,
|
|
201
|
+
objects: Map<string, AnyProperties>;
|
|
199
202
|
schemas: Map<DXN.String, Schema.Schema.AnyNoContext>;
|
|
200
|
-
addObject(obj:
|
|
203
|
+
addObject(obj: AnyProperties): this;
|
|
201
204
|
addSchema(schema: Schema.Schema.AnyNoContext): this;
|
|
202
|
-
resolveSync(dxn: DXN, _load: boolean, _onLoad?: () => void):
|
|
203
|
-
resolve(dxn: DXN): Promise<
|
|
205
|
+
resolveSync(dxn: DXN, _load: boolean, _onLoad?: () => void): AnyProperties | undefined;
|
|
206
|
+
resolve(dxn: DXN): Promise<AnyProperties | undefined>;
|
|
204
207
|
resolveSchema(dxn: DXN): Promise<Schema.Schema.AnyNoContext | undefined>;
|
|
205
208
|
}
|
|
206
209
|
//# sourceMappingURL=ref.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../../../../src/internal/ref/ref.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,KAAK,gBAAgB,EAAa,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../../../../src/internal/ref/ref.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,KAAK,gBAAgB,EAAa,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,GAAI,UAAU,cAAc,KAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,SAKpF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,KAAG,cASxD,CAAC;AAEF;;GA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,IAAI,GAAG,aAAa,GAAG,SAAS;IAShF,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IASrD,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,SAAS,CAAC;CAG/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../../../src/internal/schema/compose.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;GAEG;AAGH,eAAO,MAAM,aAAa,GAAI,QAAQ,cAAc,EAAE,QAAQ,cAAc,KAAG,cAqB9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/schema/compose.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
2
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
3
3
|
import { type ObjectId } from '@dxos/keys';
|
|
4
|
-
import { type SchemaMeta, SchemaMetaSymbol } from '../
|
|
4
|
+
import { type SchemaMeta, SchemaMetaSymbol } from '../annotations';
|
|
5
5
|
import { type JsonSchemaType } from '../json-schema';
|
|
6
6
|
import { type TypedObject, type TypedObjectPrototype } from '../object';
|
|
7
|
-
import {
|
|
7
|
+
import { PersistentSchema } from './persistent-schema';
|
|
8
8
|
/**
|
|
9
9
|
* Base schema type.
|
|
10
10
|
*/
|
|
@@ -66,7 +66,7 @@ export declare class ImmutableSchema<A = any, I = any> implements BaseSchema<A,
|
|
|
66
66
|
export declare const isMutable: (schema: Schema.Schema.AnyNoContext) => schema is EchoSchema;
|
|
67
67
|
declare const EchoSchema_base: TypedObjectPrototype<any, any>;
|
|
68
68
|
/**
|
|
69
|
-
* Represents a schema that is
|
|
69
|
+
* Represents a schema that is persisted in the ECHO database.
|
|
70
70
|
* Schema can me mutable or readonly (specified by the {@link EchoSchema.readonly} field).
|
|
71
71
|
*
|
|
72
72
|
* Schema that can be modified at runtime via the API.
|
|
@@ -84,13 +84,13 @@ declare const EchoSchema_base: TypedObjectPrototype<any, any>;
|
|
|
84
84
|
* }) {}
|
|
85
85
|
* ```
|
|
86
86
|
*
|
|
87
|
-
* The ECHO API will translate any references to
|
|
87
|
+
* The ECHO API will translate any references to PersistentSchema objects to be resolved as EchoSchema objects.
|
|
88
88
|
*/
|
|
89
89
|
export declare class EchoSchema<A = any, I = any> extends EchoSchema_base implements BaseSchema<A, I> {
|
|
90
|
-
private readonly
|
|
90
|
+
private readonly _persistentSchema;
|
|
91
91
|
private _schema;
|
|
92
92
|
private _isDirty;
|
|
93
|
-
constructor(
|
|
93
|
+
constructor(_persistentSchema: PersistentSchema);
|
|
94
94
|
get [Schema.TypeId](): {
|
|
95
95
|
_A: (_: any) => any;
|
|
96
96
|
_I: (_: any) => any;
|
|
@@ -127,9 +127,9 @@ export declare class EchoSchema<A = any, I = any> extends EchoSchema_base implem
|
|
|
127
127
|
get name(): string | undefined;
|
|
128
128
|
get [SchemaMetaSymbol](): SchemaMeta;
|
|
129
129
|
/**
|
|
130
|
-
* Reference to the underlying
|
|
130
|
+
* Reference to the underlying persistent schema object.
|
|
131
131
|
*/
|
|
132
|
-
get
|
|
132
|
+
get persistentSchema(): PersistentSchema;
|
|
133
133
|
getProperties(): SchemaAST.PropertySignature[];
|
|
134
134
|
/**
|
|
135
135
|
* @throws Error if the schema is readonly.
|
|
@@ -162,7 +162,7 @@ export declare class EchoSchema<A = any, I = any> extends EchoSchema_base implem
|
|
|
162
162
|
* Rebuilds this schema if it is dirty.
|
|
163
163
|
*/
|
|
164
164
|
_rebuild(): void;
|
|
165
|
-
|
|
165
|
+
_getSchema(): Schema.Schema.AnyNoContext;
|
|
166
166
|
}
|
|
167
167
|
export {};
|
|
168
168
|
//# sourceMappingURL=echo-schema.d.ts.map
|