@dxos/echo 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3
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 +3727 -0
- package/dist/lib/browser/chunk-BIDAASFK.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZDLCWGEW.mjs +410 -0
- package/dist/lib/browser/chunk-ZDLCWGEW.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZFRJKT4A.mjs +585 -0
- package/dist/lib/browser/chunk-ZFRJKT4A.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +17 -4
- package/dist/lib/browser/internal/index.mjs +336 -0
- package/dist/lib/browser/internal/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/query/index.mjs +13 -0
- package/dist/lib/browser/query/index.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +231 -34
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-3SVRRCUU.mjs +3727 -0
- package/dist/lib/node-esm/chunk-3SVRRCUU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CGDHRZWH.mjs +585 -0
- package/dist/lib/node-esm/chunk-CGDHRZWH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HWS6VBQC.mjs +410 -0
- package/dist/lib/node-esm/chunk-HWS6VBQC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +17 -4
- package/dist/lib/node-esm/internal/index.mjs +336 -0
- package/dist/lib/node-esm/internal/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/query/index.mjs +13 -0
- package/dist/lib/node-esm/query/index.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +231 -34
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/Obj.d.ts +70 -8
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Ref.d.ts +1 -1
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Relation.d.ts +5 -4
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/Tag.d.ts +17 -0
- package/dist/types/src/Tag.d.ts.map +1 -0
- package/dist/types/src/Type.d.ts +16 -17
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +68 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/internal/ast/annotation-helper.d.ts +8 -0
- package/dist/types/src/internal/ast/annotation-helper.d.ts.map +1 -0
- package/dist/types/src/internal/ast/annotations.d.ts +131 -0
- package/dist/types/src/internal/ast/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/ast/annotations.test.d.ts +2 -0
- package/dist/types/src/internal/ast/annotations.test.d.ts.map +1 -0
- package/dist/types/src/internal/ast/entity-kind.d.ts +10 -0
- package/dist/types/src/internal/ast/entity-kind.d.ts.map +1 -0
- package/dist/types/src/internal/ast/index.d.ts +5 -0
- package/dist/types/src/internal/ast/index.d.ts.map +1 -0
- package/dist/types/src/internal/ast/types.d.ts +6 -0
- package/dist/types/src/internal/ast/types.d.ts.map +1 -0
- package/dist/types/src/internal/formats/date.d.ts +63 -0
- package/dist/types/src/internal/formats/date.d.ts.map +1 -0
- package/dist/types/src/internal/formats/date.test.d.ts +2 -0
- package/dist/types/src/internal/formats/date.test.d.ts.map +1 -0
- package/dist/types/src/internal/formats/format.d.ts +30 -0
- package/dist/types/src/internal/formats/format.d.ts.map +1 -0
- package/dist/types/src/internal/formats/format.test.d.ts +2 -0
- package/dist/types/src/internal/formats/format.test.d.ts.map +1 -0
- package/dist/types/src/internal/formats/index.d.ts +8 -0
- package/dist/types/src/internal/formats/index.d.ts.map +1 -0
- package/dist/types/src/internal/formats/number.d.ts +31 -0
- package/dist/types/src/internal/formats/number.d.ts.map +1 -0
- package/dist/types/src/internal/formats/object.d.ts +35 -0
- package/dist/types/src/internal/formats/object.d.ts.map +1 -0
- package/dist/types/src/internal/formats/select.d.ts +11 -0
- package/dist/types/src/internal/formats/select.d.ts.map +1 -0
- package/dist/types/src/internal/formats/string.d.ts +38 -0
- package/dist/types/src/internal/formats/string.d.ts.map +1 -0
- package/dist/types/src/internal/formats/types.d.ts +68 -0
- package/dist/types/src/internal/formats/types.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +15 -0
- package/dist/types/src/internal/index.d.ts.map +1 -0
- package/dist/types/src/internal/json/annotations.d.ts +19 -0
- package/dist/types/src/internal/json/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/json/effect-schema.test.d.ts +2 -0
- package/dist/types/src/internal/json/effect-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/json/index.d.ts +2 -0
- package/dist/types/src/internal/json/index.d.ts.map +1 -0
- package/dist/types/src/internal/json/json-schema.d.ts +28 -0
- package/dist/types/src/internal/json/json-schema.d.ts.map +1 -0
- package/dist/types/src/internal/json/json-schema.test.d.ts +2 -0
- package/dist/types/src/internal/json/json-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/index.d.ts +3 -0
- package/dist/types/src/internal/json-schema/index.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts +7 -0
- package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts.map +1 -0
- package/dist/types/src/internal/json-schema/json-schema-type.d.ts +250 -0
- package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +1 -0
- package/dist/types/src/internal/object/accessors.d.ts +37 -0
- package/dist/types/src/internal/object/accessors.d.ts.map +1 -0
- package/dist/types/src/internal/object/common.d.ts +18 -0
- package/dist/types/src/internal/object/common.d.ts.map +1 -0
- package/dist/types/src/internal/object/create.d.ts +40 -0
- package/dist/types/src/internal/object/create.d.ts.map +1 -0
- package/dist/types/src/internal/object/create.test.d.ts +2 -0
- package/dist/types/src/internal/object/create.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/deleted.d.ts +6 -0
- package/dist/types/src/internal/object/deleted.d.ts.map +1 -0
- package/dist/types/src/internal/object/entity.d.ts +33 -0
- package/dist/types/src/internal/object/entity.d.ts.map +1 -0
- package/dist/types/src/internal/object/expando.d.ts +14 -0
- package/dist/types/src/internal/object/expando.d.ts.map +1 -0
- package/dist/types/src/internal/object/ids.d.ts +6 -0
- package/dist/types/src/internal/object/ids.d.ts.map +1 -0
- package/dist/types/src/internal/object/index.d.ts +16 -0
- package/dist/types/src/internal/object/index.d.ts.map +1 -0
- package/dist/types/src/internal/object/inspect.d.ts +2 -0
- package/dist/types/src/internal/object/inspect.d.ts.map +1 -0
- package/dist/types/src/internal/object/json-serializer.d.ts +32 -0
- package/dist/types/src/internal/object/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/object/json-serializer.test.d.ts +2 -0
- package/dist/types/src/internal/object/json-serializer.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/meta.d.ts +31 -0
- package/dist/types/src/internal/object/meta.d.ts.map +1 -0
- package/dist/types/src/internal/object/model.d.ts +117 -0
- package/dist/types/src/internal/object/model.d.ts.map +1 -0
- package/dist/types/src/internal/object/relation.d.ts +17 -0
- package/dist/types/src/internal/object/relation.d.ts.map +1 -0
- package/dist/types/src/internal/object/schema-validator.d.ts +15 -0
- package/dist/types/src/internal/object/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/object/schema-validator.test.d.ts +2 -0
- package/dist/types/src/internal/object/schema-validator.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/typed-object.d.ts +31 -0
- package/dist/types/src/internal/object/typed-object.d.ts.map +1 -0
- package/dist/types/src/internal/object/typed-object.test.d.ts +2 -0
- package/dist/types/src/internal/object/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/object/typename.d.ts +15 -0
- package/dist/types/src/internal/object/typename.d.ts.map +1 -0
- package/dist/types/src/internal/object/version.d.ts +14 -0
- package/dist/types/src/internal/object/version.d.ts.map +1 -0
- package/dist/types/src/internal/projection/compose.d.ts +6 -0
- package/dist/types/src/internal/projection/compose.d.ts.map +1 -0
- package/dist/types/src/internal/projection/compose.test.d.ts +2 -0
- package/dist/types/src/internal/projection/compose.test.d.ts.map +1 -0
- package/dist/types/src/internal/projection/index.d.ts +2 -0
- package/dist/types/src/internal/projection/index.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/handler.test.d.ts +2 -0
- package/dist/types/src/internal/proxy/handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/reactive-object.d.ts +15 -0
- package/dist/types/src/internal/proxy/reactive-object.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/schema.test.d.ts +2 -0
- package/dist/types/src/internal/proxy/schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/typed-handler.d.ts +44 -0
- package/dist/types/src/internal/proxy/typed-handler.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/typed-handler.test.d.ts +2 -0
- package/dist/types/src/internal/proxy/typed-handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/proxy/typed-object.test.d.ts +2 -0
- package/dist/types/src/internal/proxy/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/query/index.d.ts +2 -0
- package/dist/types/src/internal/query/index.d.ts.map +1 -0
- package/dist/types/src/internal/query/query.d.ts +17 -0
- package/dist/types/src/internal/query/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 +206 -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/schema/echo-schema.d.ts +168 -0
- package/dist/types/src/internal/schema/echo-schema.d.ts.map +1 -0
- package/dist/types/src/internal/schema/index.d.ts +7 -0
- package/dist/types/src/internal/schema/index.d.ts.map +1 -0
- package/dist/types/src/internal/schema/manipulation.d.ts +10 -0
- package/dist/types/src/internal/schema/manipulation.d.ts.map +1 -0
- package/dist/types/src/internal/schema/runtime-schema-registry.d.ts +18 -0
- package/dist/types/src/internal/schema/runtime-schema-registry.d.ts.map +1 -0
- package/dist/types/src/internal/schema/snapshot.d.ts +6 -0
- package/dist/types/src/internal/schema/snapshot.d.ts.map +1 -0
- package/dist/types/src/internal/schema/stored-schema.d.ts +13 -0
- package/dist/types/src/internal/schema/stored-schema.d.ts.map +1 -0
- package/dist/types/src/internal/testing/index.d.ts +3 -0
- package/dist/types/src/internal/testing/index.d.ts.map +1 -0
- package/dist/types/src/internal/testing/types.d.ts +381 -0
- package/dist/types/src/internal/testing/types.d.ts.map +1 -0
- package/dist/types/src/internal/testing/utils.d.ts +10 -0
- package/dist/types/src/internal/testing/utils.d.ts.map +1 -0
- package/dist/types/src/internal/types/index.d.ts +3 -0
- package/dist/types/src/internal/types/index.d.ts.map +1 -0
- package/dist/types/src/internal/types/types.d.ts +79 -0
- package/dist/types/src/internal/types/types.d.ts.map +1 -0
- package/dist/types/src/internal/types/types.test.d.ts +2 -0
- package/dist/types/src/internal/types/types.test.d.ts.map +1 -0
- package/dist/types/src/internal/types/util.d.ts +5 -0
- package/dist/types/src/internal/types/util.d.ts.map +1 -0
- package/dist/types/src/query/index.d.ts +1 -1
- package/dist/types/src/query/index.d.ts.map +1 -1
- package/dist/types/src/query/{dsl.d.ts → query.d.ts} +52 -22
- package/dist/types/src/query/query.d.ts.map +1 -0
- package/dist/types/src/query/query.test.d.ts +2 -0
- package/dist/types/src/query/query.test.d.ts.map +1 -0
- package/dist/types/src/testing/echo-schema.d.ts +7 -0
- package/dist/types/src/testing/echo-schema.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/types.d.ts +170 -55
- package/dist/types/src/testing/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -17
- package/src/Obj.ts +195 -16
- package/src/Ref.ts +1 -2
- package/src/Relation.ts +16 -5
- package/src/Tag.ts +39 -0
- package/src/Type.ts +29 -30
- package/src/errors.ts +18 -0
- package/src/index.ts +5 -1
- package/src/internal/ast/annotation-helper.ts +22 -0
- package/src/internal/ast/annotations.test.ts +98 -0
- package/src/internal/ast/annotations.ts +226 -0
- package/src/internal/ast/entity-kind.ts +15 -0
- package/src/internal/ast/index.ts +8 -0
- package/src/internal/ast/types.ts +17 -0
- package/src/internal/formats/date.test.ts +56 -0
- package/src/internal/formats/date.ts +217 -0
- package/src/internal/formats/format.test.ts +77 -0
- package/src/internal/formats/format.ts +52 -0
- package/src/internal/formats/index.ts +12 -0
- package/src/internal/formats/number.ts +89 -0
- package/src/internal/formats/object.ts +80 -0
- package/src/internal/formats/select.ts +16 -0
- package/src/internal/formats/string.ts +76 -0
- package/src/internal/formats/types.ts +175 -0
- package/src/internal/index.ts +22 -0
- package/src/internal/json/annotations.ts +50 -0
- package/src/internal/json/effect-schema.test.ts +143 -0
- package/src/internal/json/index.ts +5 -0
- package/src/internal/json/json-schema.test.ts +849 -0
- package/src/internal/json/json-schema.ts +519 -0
- package/src/internal/json-schema/index.ts +6 -0
- package/src/internal/json-schema/json-schema-normalize.ts +109 -0
- package/src/internal/json-schema/json-schema-type.ts +403 -0
- package/src/internal/object/accessors.ts +153 -0
- package/src/internal/object/common.ts +76 -0
- package/src/internal/object/create.test.ts +118 -0
- package/src/internal/object/create.ts +96 -0
- package/src/internal/object/deleted.ts +19 -0
- package/src/internal/object/entity.ts +248 -0
- package/src/internal/object/expando.ts +21 -0
- package/src/internal/object/ids.ts +12 -0
- package/src/internal/object/index.ts +19 -0
- package/src/internal/object/inspect.ts +48 -0
- package/src/internal/object/json-serializer.test.ts +99 -0
- package/src/internal/object/json-serializer.ts +225 -0
- package/src/internal/object/meta.ts +61 -0
- package/src/internal/object/model.ts +170 -0
- package/src/internal/object/relation.ts +24 -0
- package/src/internal/object/schema-validator.test.ts +186 -0
- package/src/internal/object/schema-validator.ts +241 -0
- package/src/internal/object/typed-object.test.ts +34 -0
- package/src/internal/object/typed-object.ts +88 -0
- package/src/internal/object/typename.ts +61 -0
- package/src/internal/object/version.ts +22 -0
- package/src/internal/projection/compose.test.ts +43 -0
- package/src/internal/projection/compose.ts +36 -0
- package/src/internal/projection/index.ts +5 -0
- package/src/internal/proxy/handler.test.ts +163 -0
- package/src/internal/proxy/reactive-object.ts +108 -0
- package/src/internal/proxy/schema.test.ts +136 -0
- package/src/internal/proxy/typed-handler.test.ts +102 -0
- package/src/internal/proxy/typed-handler.ts +228 -0
- package/src/internal/proxy/typed-object.test.ts +100 -0
- package/src/internal/query/index.ts +5 -0
- package/src/internal/query/query.ts +23 -0
- package/src/internal/ref/index.ts +6 -0
- package/src/internal/ref/ref-array.ts +39 -0
- package/src/internal/ref/ref.test.ts +100 -0
- package/src/internal/ref/ref.ts +521 -0
- package/src/internal/schema/echo-schema.ts +383 -0
- package/src/internal/schema/index.ts +10 -0
- package/src/internal/schema/manipulation.ts +92 -0
- package/src/internal/schema/runtime-schema-registry.ts +78 -0
- package/src/internal/schema/snapshot.ts +25 -0
- package/src/internal/schema/stored-schema.ts +26 -0
- package/src/internal/testing/index.ts +6 -0
- package/src/internal/testing/types.ts +144 -0
- package/src/internal/testing/utils.ts +54 -0
- package/src/internal/types/index.ts +6 -0
- package/src/internal/types/types.test.ts +48 -0
- package/src/internal/types/types.ts +176 -0
- package/src/internal/types/util.ts +9 -0
- package/src/query/index.ts +2 -1
- package/src/query/query.test.ts +401 -0
- package/src/query/{dsl.ts → query.ts} +188 -45
- package/src/test/api.test.ts +16 -9
- package/src/testing/echo-schema.ts +39 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/types.ts +40 -23
- package/dist/lib/browser/chunk-2KNTYMIW.mjs +0 -697
- package/dist/lib/browser/chunk-2KNTYMIW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EXNNC62J.mjs +0 -697
- package/dist/lib/node-esm/chunk-EXNNC62J.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.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/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 -324
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/**
|
|
3
|
+
* GeoJSON Format
|
|
4
|
+
* https://datatracker.ietf.org/doc/html/rfc7946
|
|
5
|
+
* https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1
|
|
6
|
+
* https://en.wikipedia.org/wiki/Geographic_coordinate_system
|
|
7
|
+
* https://geojson.org
|
|
8
|
+
* {
|
|
9
|
+
* "type": "Point",
|
|
10
|
+
* "coordinates": [0, 51.47] // [longitude, latitude]
|
|
11
|
+
* }
|
|
12
|
+
* Note: optional third element for altitude.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GeoPoint: Schema.Tuple<[Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.Element<typeof Schema.Number, "?">]>;
|
|
15
|
+
export type GeoPoint = Schema.Schema.Type<typeof GeoPoint>;
|
|
16
|
+
export type GeoLocation = {
|
|
17
|
+
longitude: number;
|
|
18
|
+
latitude: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Geolocation utilities for working with GeoPoint format.
|
|
23
|
+
*/
|
|
24
|
+
export declare namespace GeoLocation {
|
|
25
|
+
/**
|
|
26
|
+
* Convert latitude and longitude to GeoPoint (GeoJSON format [longitude, latitude, height?]).
|
|
27
|
+
* Clamps values to valid ranges: latitude [-90, 90], longitude [-180, 180].
|
|
28
|
+
*/
|
|
29
|
+
const toGeoPoint: ({ longitude, latitude, height }: GeoLocation) => GeoPoint;
|
|
30
|
+
/**
|
|
31
|
+
* Extract latitude and longitude from GeoPoint (GeoJSON format [longitude, latitude, height?]).
|
|
32
|
+
*/
|
|
33
|
+
const fromGeoPoint: (geoPoint: GeoPoint | undefined) => GeoLocation;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,uUAYpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,yBAAiB,WAAW,CAAC;IAC3B;;;OAGG;IACI,MAAM,UAAU,GAAI,iCAAiC,WAAW,KAAG,QAKzE,CAAC;IAEF;;OAEG;IACI,MAAM,YAAY,GAAI,UAAU,QAAQ,GAAG,SAAS,KAAG,WAgB7D,CAAC;CACH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/** Schema for a single select option. Used to define choices in a {single|multi}-select field. */
|
|
3
|
+
export declare const SelectOptionSchema: Schema.mutable<Schema.Struct<{
|
|
4
|
+
/** Stable identifier for the option. */
|
|
5
|
+
id: typeof Schema.NonEmptyString;
|
|
6
|
+
title: typeof Schema.String;
|
|
7
|
+
/** Color palette used for visual styling. */
|
|
8
|
+
color: typeof Schema.String;
|
|
9
|
+
}>>;
|
|
10
|
+
export type SelectOption = Schema.Schema.Type<typeof SelectOptionSchema>;
|
|
11
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/select.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,kGAAkG;AAClG,eAAO,MAAM,kBAAkB;IAC7B,wCAAwC;;;IAGxC,6CAA6C;;GAExB,CAAC;AAExB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/**
|
|
3
|
+
* Email address (RFC 5321)
|
|
4
|
+
* https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.2
|
|
5
|
+
*/
|
|
6
|
+
export declare const Email: Schema.refine<string, typeof Schema.String>;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare const Formula: typeof Schema.String;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare const Hostname: typeof Schema.String;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export declare const JSON: typeof Schema.String;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare const Markdown: typeof Schema.String;
|
|
23
|
+
/**
|
|
24
|
+
* Regex
|
|
25
|
+
* https://json-schema.org/understanding-json-schema/reference/regular_expressions
|
|
26
|
+
* https://ecma-international.org/publications-and-standards/standards/ecma-262
|
|
27
|
+
*/
|
|
28
|
+
export declare const Regex: typeof Schema.String;
|
|
29
|
+
/**
|
|
30
|
+
* https://datatracker.ietf.org/doc/html/rfc3986#section-1.1.3
|
|
31
|
+
*/
|
|
32
|
+
export declare const URL: Schema.refine<string, typeof Schema.String>;
|
|
33
|
+
/**
|
|
34
|
+
* UUID (RFC 4122)
|
|
35
|
+
* https://datatracker.ietf.org/doc/html/rfc4122
|
|
36
|
+
*/
|
|
37
|
+
export declare const UUID: Schema.refine<string, typeof Schema.String>;
|
|
38
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../src/internal/formats/string.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC;;;GAGG;AACH,eAAO,MAAM,KAAK,6CAOjB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,OAAO,sBAA+D,CAAC;AAEpF;;GAEG;AAEH,eAAO,MAAM,QAAQ,sBAAgE,CAAC;AAEtF;;GAEG;AAEH,eAAO,MAAM,IAAI,sBAA4D,CAAC;AAE9E;;GAEG;AAEH,eAAO,MAAM,QAAQ,sBAAgE,CAAC;AAEtF;;;;GAIG;AAEH,eAAO,MAAM,KAAK,sBAA6D,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,GAAG,6CAOf,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,IAAI,6CAKhB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type * as JSONSchema from 'effect/JSONSchema';
|
|
2
|
+
import * as SchemaAST from 'effect/SchemaAST';
|
|
3
|
+
import { type JsonSchemaType } from '../json-schema';
|
|
4
|
+
export type ScalarType = JSONSchema.JsonSchema7Object | JSONSchema.JsonSchema7String | JSONSchema.JsonSchema7Number | JSONSchema.JsonSchema7Boolean | JSONSchema.JsonSchema7Ref;
|
|
5
|
+
export declare enum TypeEnum {
|
|
6
|
+
Array = "array",// TODO(burdon): Remove?
|
|
7
|
+
Object = "object",
|
|
8
|
+
String = "string",
|
|
9
|
+
Number = "number",
|
|
10
|
+
Boolean = "boolean",
|
|
11
|
+
Ref = "ref"
|
|
12
|
+
}
|
|
13
|
+
export declare const getTypeEnum: (property: JsonSchemaType) => TypeEnum | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* https://json-schema.org/understanding-json-schema/reference/schema
|
|
16
|
+
* https://json-schema.org/understanding-json-schema/reference/string#built-in-formats
|
|
17
|
+
*/
|
|
18
|
+
export declare const FormatAnnotationId: unique symbol;
|
|
19
|
+
export declare const FormatAnnotation: import("..").AnnotationHelper<FormatEnum>;
|
|
20
|
+
export declare const getFormatAnnotation: (node: SchemaAST.AST) => FormatEnum | undefined;
|
|
21
|
+
export declare enum FormatEnum {
|
|
22
|
+
None = "none",
|
|
23
|
+
String = "string",
|
|
24
|
+
Number = "number",
|
|
25
|
+
Boolean = "boolean",
|
|
26
|
+
Ref = "ref",
|
|
27
|
+
DID = "did",// Users, etc.
|
|
28
|
+
DXN = "dxn",
|
|
29
|
+
Email = "email",
|
|
30
|
+
Formula = "formula",// Spreadsheet formula.
|
|
31
|
+
Hostname = "hostname",
|
|
32
|
+
JSON = "json",
|
|
33
|
+
Markdown = "markdown",
|
|
34
|
+
Regex = "regex",
|
|
35
|
+
SingleSelect = "single-select",
|
|
36
|
+
MultiSelect = "multi-select",
|
|
37
|
+
URL = "url",
|
|
38
|
+
UUID = "uuid",
|
|
39
|
+
Currency = "currency",
|
|
40
|
+
Integer = "integer",
|
|
41
|
+
Percent = "percent",
|
|
42
|
+
Timestamp = "timestamp",
|
|
43
|
+
DateTime = "date-time",
|
|
44
|
+
Date = "date",
|
|
45
|
+
Time = "time",
|
|
46
|
+
Duration = "duration",
|
|
47
|
+
GeoPoint = "lnglat"
|
|
48
|
+
}
|
|
49
|
+
export declare const FormatEnums: FormatEnum[];
|
|
50
|
+
export declare const PropertyKind: {
|
|
51
|
+
type: typeof TypeEnum;
|
|
52
|
+
format: typeof FormatEnum;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Default formats
|
|
56
|
+
*/
|
|
57
|
+
export declare const typeToFormat: Partial<Record<TypeEnum, FormatEnum>>;
|
|
58
|
+
/**
|
|
59
|
+
* Map of format to type.
|
|
60
|
+
*/
|
|
61
|
+
export declare const formatToType: Record<FormatEnum, TypeEnum>;
|
|
62
|
+
/**
|
|
63
|
+
* Allowed value options for select.
|
|
64
|
+
*/
|
|
65
|
+
export declare const OptionsAnnotationId: unique symbol;
|
|
66
|
+
export declare const getOptionsAnnotation: (node: SchemaAST.AST) => OptionsAnnotationType[] | undefined;
|
|
67
|
+
export type OptionsAnnotationType = string | number;
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eAA+C,CAAC;AAE/E,eAAO,MAAM,gBAAgB,2CAAyD,CAAC;AAEvF,eAAO,MAAM,mBAAmB,GAAI,MAAM,SAAS,CAAC,GAAG,KAAG,UAAU,GAAG,SAC8B,CAAC;AAGtG,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,GAAG,QAAQ;IAMX,GAAG,QAAQ,CAAE,cAAc;IAC3B,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,OAAO,YAAY,CAAE,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { JsonPath, splitJsonPath, JsonProp } from '@dxos/effect';
|
|
2
|
+
export { ObjectId } from '@dxos/keys';
|
|
3
|
+
export { ForeignKey } from '@dxos/echo-protocol';
|
|
4
|
+
export * from './ast';
|
|
5
|
+
export * from './formats';
|
|
6
|
+
export * from './json';
|
|
7
|
+
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
|
+
export * from './ref';
|
|
14
|
+
export * from './schema';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type JsonSchemaEchoAnnotations, type JsonSchemaType } from '../json-schema';
|
|
2
|
+
type RootJsonSchemaProperty = keyof JsonSchemaType;
|
|
3
|
+
type NamespacedJsonSchemaProperty = keyof JsonSchemaEchoAnnotations;
|
|
4
|
+
/**
|
|
5
|
+
* List of annotations for JSON encoding/decoding.
|
|
6
|
+
* Omits default effect-schema annotations since they are encoded with default serializer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CustomAnnotations: Partial<Record<RootJsonSchemaProperty, symbol>>;
|
|
9
|
+
/**
|
|
10
|
+
* List of annotations for JSON decoding only.
|
|
11
|
+
* Includes default effect annotations.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DecodedAnnotations: Partial<Record<RootJsonSchemaProperty, symbol>>;
|
|
14
|
+
/**
|
|
15
|
+
* Annotations that go into ECHO namespace in json-schema.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EchoAnnotations: Partial<Record<NamespacedJsonSchemaProperty, symbol>>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json/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/effect-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { type JsonSchemaType } from '../json-schema';
|
|
3
|
+
export declare enum PropType {
|
|
4
|
+
NONE = 0,
|
|
5
|
+
STRING = 1,// TODO(burdon): vs TEXT?
|
|
6
|
+
NUMBER = 2,
|
|
7
|
+
BOOLEAN = 3,
|
|
8
|
+
DATE = 4,
|
|
9
|
+
REF = 5,
|
|
10
|
+
RECORD = 6,
|
|
11
|
+
ENUM = 7
|
|
12
|
+
}
|
|
13
|
+
export declare const toPropType: (type?: PropType) => string;
|
|
14
|
+
export type JsonSchemaOptions = {
|
|
15
|
+
strict?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Convert effect schema to JSON Schema.
|
|
19
|
+
* @param schema
|
|
20
|
+
*/
|
|
21
|
+
export declare const toJsonSchema: (schema: Schema.Schema.All, options?: JsonSchemaOptions) => JsonSchemaType;
|
|
22
|
+
/**
|
|
23
|
+
* Convert JSON schema to effect schema.
|
|
24
|
+
* @param root
|
|
25
|
+
* @param definitions
|
|
26
|
+
*/
|
|
27
|
+
export declare const toEffectSchema: (root: JsonSchemaType, _defs?: JsonSchemaType["$defs"]) => Schema.Schema.AnyNoContext;
|
|
28
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json/json-schema.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAaxC,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AAOxB,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;;;GAGG;AACH,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/json-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type JsonSchemaType } from './json-schema-type';
|
|
2
|
+
/**
|
|
3
|
+
* Normalize schema to to draft-07 format.
|
|
4
|
+
* Note: the input type does not necessarily match the {@link JsonSchemaType} type.
|
|
5
|
+
*/
|
|
6
|
+
export declare const normalizeSchema: (schema: JsonSchemaType) => JsonSchemaType;
|
|
7
|
+
//# sourceMappingURL=json-schema-normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-normalize.d.ts","sourceRoot":"","sources":["../../../../../src/internal/json-schema/json-schema-normalize.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,cAAc,KAAG,cAIxD,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { JsonPath, type JsonProp } from '@dxos/effect';
|
|
3
|
+
/**
|
|
4
|
+
* Go under the `annotations` property.
|
|
5
|
+
*/
|
|
6
|
+
export declare const JsonSchemaEchoAnnotations: Schema.mutable<Schema.Struct<{
|
|
7
|
+
/**
|
|
8
|
+
* Label for this schema.
|
|
9
|
+
* Mapped from {@link LabelAnnotationId}.
|
|
10
|
+
*/
|
|
11
|
+
labelProp: Schema.optional<Schema.Union<[Schema.Schema<JsonPath, JsonPath, never>, Schema.Array$<Schema.Schema<JsonPath, JsonPath, never>>]>>;
|
|
12
|
+
/**
|
|
13
|
+
* Generator function for this schema.
|
|
14
|
+
* Mapped from {@link GeneratorAnnotationId}.
|
|
15
|
+
*/
|
|
16
|
+
generator: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Tuple2<typeof Schema.String, typeof Schema.Number>]>>;
|
|
17
|
+
/**
|
|
18
|
+
* {@link PropertyMeta} annotations get serialized here.
|
|
19
|
+
*/
|
|
20
|
+
meta: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
24
|
+
type: Schema.optional<Schema.mutable<Schema.Struct<{
|
|
25
|
+
typename: typeof Schema.String;
|
|
26
|
+
version: typeof Schema.String;
|
|
27
|
+
schemaId: Schema.optional<typeof Schema.String>;
|
|
28
|
+
}>>>;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Superseded by `meta`.
|
|
31
|
+
*/
|
|
32
|
+
annotations: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
33
|
+
}>>;
|
|
34
|
+
export type JsonSchemaEchoAnnotations = Schema.Schema.Type<typeof JsonSchemaEchoAnnotations>;
|
|
35
|
+
/**
|
|
36
|
+
* Describes a schema for the JSON-schema objects stored in ECHO.
|
|
37
|
+
* Contains extensions for ECHO (e.g., references).
|
|
38
|
+
* Ref: https://json-schema.org/draft-07/schema
|
|
39
|
+
*/
|
|
40
|
+
declare const _JsonSchemaType: Schema.Struct<{
|
|
41
|
+
/**
|
|
42
|
+
* Identifier for this schema.
|
|
43
|
+
* This schema might be referenced by $ref clause in other schemas.
|
|
44
|
+
*/
|
|
45
|
+
$id: Schema.optional<typeof Schema.String>;
|
|
46
|
+
/**
|
|
47
|
+
* Schema of this schema.
|
|
48
|
+
* Set to "https://json-schema.org/draft-07/schema".
|
|
49
|
+
*/
|
|
50
|
+
$schema: Schema.optional<typeof Schema.String>;
|
|
51
|
+
/**
|
|
52
|
+
* Reference to another schema.
|
|
53
|
+
*/
|
|
54
|
+
$ref: Schema.optional<typeof Schema.String>;
|
|
55
|
+
/**
|
|
56
|
+
* Comments are ignored when interpreting the schema.
|
|
57
|
+
*/
|
|
58
|
+
$comment: Schema.optional<typeof Schema.String>;
|
|
59
|
+
/**
|
|
60
|
+
* Defines whether this schema is an object schema or a relation schema.
|
|
61
|
+
*/
|
|
62
|
+
entityKind: Schema.optional<Schema.Enums<typeof import("..").EntityKind>>;
|
|
63
|
+
/**
|
|
64
|
+
* Typename of this schema.
|
|
65
|
+
* Only on schema representing an ECHO object.
|
|
66
|
+
*
|
|
67
|
+
* @example 'example.com/type/MyType'
|
|
68
|
+
*/
|
|
69
|
+
typename: Schema.optional<typeof Schema.String>;
|
|
70
|
+
/**
|
|
71
|
+
* Version of this schema.
|
|
72
|
+
* Custom dialect for ECHO.
|
|
73
|
+
*/
|
|
74
|
+
version: Schema.optional<typeof Schema.String>;
|
|
75
|
+
/**
|
|
76
|
+
* Target of this relation.
|
|
77
|
+
* Only for relation schemas.
|
|
78
|
+
* The referenced schema must be an object schema.
|
|
79
|
+
*/
|
|
80
|
+
relationTarget: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
81
|
+
/**
|
|
82
|
+
* Source of this relation.
|
|
83
|
+
* Only for relation schemas.
|
|
84
|
+
* The referenced schema must be an object schema.
|
|
85
|
+
*/
|
|
86
|
+
relationSource: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
87
|
+
/**
|
|
88
|
+
* Title of this schema.
|
|
89
|
+
*/
|
|
90
|
+
title: Schema.optional<typeof Schema.String>;
|
|
91
|
+
/**
|
|
92
|
+
* Description of this schema.
|
|
93
|
+
*/
|
|
94
|
+
description: Schema.optional<typeof Schema.String>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether this schema is read-only.
|
|
97
|
+
*/
|
|
98
|
+
readOnly: Schema.optional<typeof Schema.Boolean>;
|
|
99
|
+
/**
|
|
100
|
+
* Whether this schema is write-only.
|
|
101
|
+
*/
|
|
102
|
+
writeOnly: Schema.optional<typeof Schema.Boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* Examples of instances of this schema.
|
|
105
|
+
*/
|
|
106
|
+
examples: Schema.optional<Schema.Array$<typeof Schema.Any>>;
|
|
107
|
+
/**
|
|
108
|
+
* Default value for this schema.
|
|
109
|
+
*/
|
|
110
|
+
default: Schema.optional<typeof Schema.Any>;
|
|
111
|
+
/**
|
|
112
|
+
* This schema only matches values that are equal to this value.
|
|
113
|
+
*/
|
|
114
|
+
const: Schema.optional<typeof Schema.Any>;
|
|
115
|
+
/**
|
|
116
|
+
* This schema only matches one of the values in this array.
|
|
117
|
+
*/
|
|
118
|
+
enum: Schema.optional<Schema.Array$<typeof Schema.Any>>;
|
|
119
|
+
/**
|
|
120
|
+
* Base type of the schema.
|
|
121
|
+
*/
|
|
122
|
+
type: Schema.optional<Schema.Union<[Schema.Literal<["array", "boolean", "integer", "null", "number", "object", "string"]>, Schema.Array$<Schema.Literal<["array", "boolean", "integer", "null", "number", "object", "string"]>>]>>;
|
|
123
|
+
multipleOf: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
124
|
+
maximum: Schema.optional<typeof Schema.Number>;
|
|
125
|
+
exclusiveMaximum: Schema.optional<typeof Schema.Number>;
|
|
126
|
+
minimum: Schema.optional<typeof Schema.Number>;
|
|
127
|
+
exclusiveMinimum: Schema.optional<typeof Schema.Number>;
|
|
128
|
+
maxLength: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
129
|
+
/**
|
|
130
|
+
* Regex pattern for strings.
|
|
131
|
+
*/
|
|
132
|
+
pattern: Schema.optional<typeof Schema.String>;
|
|
133
|
+
/**
|
|
134
|
+
* Serialized from {@link FormatAnnotationId}.
|
|
135
|
+
*/
|
|
136
|
+
format: Schema.optional<typeof Schema.String>;
|
|
137
|
+
minLength: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
138
|
+
items: Schema.optional<Schema.Union<[Schema.suspend<JsonSchemaType, JsonSchemaType, never>, Schema.Array$<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>]>>;
|
|
139
|
+
additionalItems: Schema.optional<Schema.Union<[Schema.suspend<JsonSchemaType, JsonSchemaType, never>, typeof Schema.Boolean]>>;
|
|
140
|
+
maxItems: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
141
|
+
minItems: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
142
|
+
uniqueItems: Schema.optional<typeof Schema.Boolean>;
|
|
143
|
+
contains: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
144
|
+
maxProperties: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
145
|
+
minProperties: Schema.optional<Schema.filter<typeof Schema.Number>>;
|
|
146
|
+
required: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
147
|
+
/**
|
|
148
|
+
* Non-standard JSON Schema extension.
|
|
149
|
+
* Defines the order of properties in the object.
|
|
150
|
+
* The unmentioned properties are placed at the end.
|
|
151
|
+
*
|
|
152
|
+
* Related: https://github.com/json-schema/json-schema/issues/119
|
|
153
|
+
*/
|
|
154
|
+
propertyOrder: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
155
|
+
additionalProperties: Schema.optional<Schema.Union<[Schema.suspend<JsonSchemaType, JsonSchemaType, never>, typeof Schema.Boolean]>>;
|
|
156
|
+
properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>>;
|
|
157
|
+
patternProperties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>>;
|
|
158
|
+
propertyNames: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
159
|
+
definitions: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>>;
|
|
160
|
+
dependencies: Schema.optional<Schema.Record$<typeof Schema.String, Schema.suspend<string | string[] | JsonSchemaType, string | string[] | JsonSchemaType, never>>>;
|
|
161
|
+
contentMediaType: Schema.optional<typeof Schema.String>;
|
|
162
|
+
contentEncoding: Schema.optional<typeof Schema.String>;
|
|
163
|
+
if: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
164
|
+
then: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
165
|
+
else: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
166
|
+
allOf: Schema.optional<Schema.Array$<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>;
|
|
167
|
+
anyOf: Schema.optional<Schema.Array$<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>;
|
|
168
|
+
oneOf: Schema.optional<Schema.Array$<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>;
|
|
169
|
+
not: Schema.optional<Schema.suspend<JsonSchemaType, JsonSchemaType, never>>;
|
|
170
|
+
$defs: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.suspend<JsonSchemaType, JsonSchemaType, never>>>>;
|
|
171
|
+
currency: Schema.optional<typeof Schema.String>;
|
|
172
|
+
reference: Schema.optional<Schema.mutable<Schema.Struct<{
|
|
173
|
+
schema: Schema.suspend<JsonSchemaType, JsonSchemaType, never>;
|
|
174
|
+
schemaVersion: Schema.optional<typeof Schema.String>;
|
|
175
|
+
schemaObject: Schema.optional<typeof Schema.String>;
|
|
176
|
+
}>>>;
|
|
177
|
+
/**
|
|
178
|
+
* ECHO-specific annotations.
|
|
179
|
+
*/
|
|
180
|
+
annotations: Schema.optional<Schema.mutable<Schema.mutable<Schema.Struct<{
|
|
181
|
+
/**
|
|
182
|
+
* Label for this schema.
|
|
183
|
+
* Mapped from {@link LabelAnnotationId}.
|
|
184
|
+
*/
|
|
185
|
+
labelProp: Schema.optional<Schema.Union<[Schema.Schema<JsonPath, JsonPath, never>, Schema.Array$<Schema.Schema<JsonPath, JsonPath, never>>]>>;
|
|
186
|
+
/**
|
|
187
|
+
* Generator function for this schema.
|
|
188
|
+
* Mapped from {@link GeneratorAnnotationId}.
|
|
189
|
+
*/
|
|
190
|
+
generator: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Tuple2<typeof Schema.String, typeof Schema.Number>]>>;
|
|
191
|
+
/**
|
|
192
|
+
* {@link PropertyMeta} annotations get serialized here.
|
|
193
|
+
*/
|
|
194
|
+
meta: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated
|
|
197
|
+
*/
|
|
198
|
+
type: Schema.optional<Schema.mutable<Schema.Struct<{
|
|
199
|
+
typename: typeof Schema.String;
|
|
200
|
+
version: typeof Schema.String;
|
|
201
|
+
schemaId: Schema.optional<typeof Schema.String>;
|
|
202
|
+
}>>>;
|
|
203
|
+
/**
|
|
204
|
+
* @deprecated Superseded by `meta`.
|
|
205
|
+
*/
|
|
206
|
+
annotations: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
207
|
+
}>>>>;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated Use `annotations` instead.
|
|
210
|
+
*/
|
|
211
|
+
echo: Schema.optional<Schema.mutable<Schema.mutable<Schema.Struct<{
|
|
212
|
+
/**
|
|
213
|
+
* Label for this schema.
|
|
214
|
+
* Mapped from {@link LabelAnnotationId}.
|
|
215
|
+
*/
|
|
216
|
+
labelProp: Schema.optional<Schema.Union<[Schema.Schema<JsonPath, JsonPath, never>, Schema.Array$<Schema.Schema<JsonPath, JsonPath, never>>]>>;
|
|
217
|
+
/**
|
|
218
|
+
* Generator function for this schema.
|
|
219
|
+
* Mapped from {@link GeneratorAnnotationId}.
|
|
220
|
+
*/
|
|
221
|
+
generator: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Tuple2<typeof Schema.String, typeof Schema.Number>]>>;
|
|
222
|
+
/**
|
|
223
|
+
* {@link PropertyMeta} annotations get serialized here.
|
|
224
|
+
*/
|
|
225
|
+
meta: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
226
|
+
/**
|
|
227
|
+
* @deprecated
|
|
228
|
+
*/
|
|
229
|
+
type: Schema.optional<Schema.mutable<Schema.Struct<{
|
|
230
|
+
typename: typeof Schema.String;
|
|
231
|
+
version: typeof Schema.String;
|
|
232
|
+
schemaId: Schema.optional<typeof Schema.String>;
|
|
233
|
+
}>>>;
|
|
234
|
+
/**
|
|
235
|
+
* @deprecated Superseded by `meta`.
|
|
236
|
+
*/
|
|
237
|
+
annotations: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
238
|
+
}>>>>;
|
|
239
|
+
}>;
|
|
240
|
+
export declare const JsonSchemaFields: string[];
|
|
241
|
+
/**
|
|
242
|
+
* https://json-schema.org/draft-07/schema
|
|
243
|
+
*/
|
|
244
|
+
export interface JsonSchemaType extends Schema.Schema.Type<Schema.mutable<typeof _JsonSchemaType>> {
|
|
245
|
+
}
|
|
246
|
+
export declare const JsonSchemaType: Schema.Schema<JsonSchemaType>;
|
|
247
|
+
export declare const getSchemaProperty: (schema: JsonSchemaType, property: JsonProp) => JsonSchemaType | undefined;
|
|
248
|
+
export declare const setSchemaProperty: (schema: JsonSchemaType, property: JsonProp, value: JsonSchemaType) => JsonSchemaType;
|
|
249
|
+
export {};
|
|
250
|
+
//# sourceMappingURL=json-schema-type.d.ts.map
|
|
@@ -0,0 +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;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;IAmBH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;IAiCH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;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;AACH,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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { DXN } from '@dxos/keys';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a DXN for an object or schema.
|
|
5
|
+
* @deprecated Use `Obj.getDXN`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getObjectDXN: (object: any) => DXN | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the schema for the given object if one is defined.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getSchema: (obj: unknown | undefined) => Schema.Schema.AnyNoContext | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Internal use only.
|
|
14
|
+
*/
|
|
15
|
+
export declare const setSchema: (obj: any, schema: Schema.Schema.AnyNoContext) => void;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use {@link Obj.getLabel} instead.
|
|
18
|
+
* Returns the label for a given object based on {@link LabelAnnotationId}.
|
|
19
|
+
*/
|
|
20
|
+
export declare const getLabelForObject: (obj: unknown | undefined) => string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the label for a given object based on {@link LabelAnnotationId}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const getLabel: <S extends Schema.Schema.Any>(schema: S, object: Schema.Schema.Type<S>) => string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the label for a given object based on {@link LabelAnnotationId}.
|
|
27
|
+
*/
|
|
28
|
+
export declare const setLabel: <S extends Schema.Schema.Any>(schema: S, object: Schema.Schema.Type<S>, label: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the label for a given object based on {@link LabelAnnotationId}.
|
|
31
|
+
*/
|
|
32
|
+
export declare const getDescription: <S extends Schema.Schema.Any>(schema: S, object: Schema.Schema.Type<S>) => string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the description for a given object based on {@link DescriptionAnnotationId}.
|
|
35
|
+
*/
|
|
36
|
+
export declare const setDescription: <S extends Schema.Schema.Any>(schema: S, object: Schema.Schema.Type<S>, description: string) => void;
|
|
37
|
+
//# sourceMappingURL=accessors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessors.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/accessors.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAW3C;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,KAAG,GAAG,GAAG,SAehD,CAAC;AAEF;;GAEG;AAGH,eAAO,MAAM,SAAS,GAAI,KAAK,OAAO,GAAG,SAAS,KAAG,MAAM,CAAC,MAAM,CAAC,YAAY,GAAG,SAIjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,YAAY,SAOrE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,GAAG,SAAS,KAAG,MAAM,GAAG,SAKrE,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAG,MAAM,GAAG,SAwBzG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,SAM5G,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,EACxD,QAAQ,CAAC,EACT,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAC5B,MAAM,GAAG,SAiBX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,EACxD,QAAQ,CAAC,EACT,QAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAC7B,aAAa,MAAM,SAIpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
export type TypedObjectOptions = {
|
|
3
|
+
partial?: true;
|
|
4
|
+
record?: true;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
type SimplifiedSchemaFields<SchemaFields extends Schema.Struct.Fields, Options extends TypedObjectOptions> = Options['partial'] extends boolean ? Schema.SimplifyMutable<Partial<Schema.Struct.Type<SchemaFields>>> : Schema.SimplifyMutable<Schema.Struct.Type<SchemaFields>>;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export type TypedObjectFields<SchemaFields extends Schema.Struct.Fields, Options extends TypedObjectOptions> = SimplifiedSchemaFields<SchemaFields, Options> & {
|
|
14
|
+
id: string;
|
|
15
|
+
} & (Options['record'] extends boolean ? Schema.SimplifyMutable<Schema.IndexSignature.Type<Schema.IndexSignature.Records>> : {});
|
|
16
|
+
export declare const makeTypedEntityClass: (typename: string, version: string, baseSchema: Schema.Schema.AnyNoContext) => Schema.SchemaClass<any>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/internal/object/common.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAOxC,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"}
|