@confect/core 9.0.0-next.0 → 9.0.0-next.10

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +268 -4
  2. package/dist/FunctionProvenance.d.ts +101 -95
  3. package/dist/FunctionProvenance.d.ts.map +1 -1
  4. package/dist/FunctionProvenance.js +25 -6
  5. package/dist/FunctionProvenance.js.map +1 -1
  6. package/dist/FunctionSpec.d.ts +178 -218
  7. package/dist/FunctionSpec.d.ts.map +1 -1
  8. package/dist/FunctionSpec.js +2 -2
  9. package/dist/FunctionSpec.js.map +1 -1
  10. package/dist/GenericId.d.ts +7 -12
  11. package/dist/GenericId.d.ts.map +1 -1
  12. package/dist/GenericId.js +2 -1
  13. package/dist/GenericId.js.map +1 -1
  14. package/dist/GroupPath.d.ts +10 -16
  15. package/dist/GroupPath.d.ts.map +1 -1
  16. package/dist/GroupSpec.d.ts +38 -37
  17. package/dist/GroupSpec.d.ts.map +1 -1
  18. package/dist/GroupSpec.js +9 -3
  19. package/dist/GroupSpec.js.map +1 -1
  20. package/dist/Identifier.d.ts +14 -0
  21. package/dist/Identifier.d.ts.map +1 -0
  22. package/dist/{internal/utils.js → Identifier.js} +26 -3
  23. package/dist/Identifier.js.map +1 -0
  24. package/dist/Lazy.d.ts +22 -0
  25. package/dist/Lazy.d.ts.map +1 -0
  26. package/dist/Lazy.js +44 -0
  27. package/dist/Lazy.js.map +1 -0
  28. package/dist/PaginationResult.d.ts +11 -18
  29. package/dist/PaginationResult.d.ts.map +1 -1
  30. package/dist/PaginationResult.js +1 -1
  31. package/dist/PaginationResult.js.map +1 -1
  32. package/dist/Ref.d.ts +55 -51
  33. package/dist/Ref.d.ts.map +1 -1
  34. package/dist/Ref.js +17 -6
  35. package/dist/Ref.js.map +1 -1
  36. package/dist/Refs.d.ts +21 -21
  37. package/dist/Refs.d.ts.map +1 -1
  38. package/dist/Refs.js +5 -10
  39. package/dist/Refs.js.map +1 -1
  40. package/dist/Registry.d.ts +7 -11
  41. package/dist/Registry.d.ts.map +1 -1
  42. package/dist/Registry.js +2 -1
  43. package/dist/Registry.js.map +1 -1
  44. package/dist/RuntimeAndFunctionType.d.ts +36 -41
  45. package/dist/RuntimeAndFunctionType.d.ts.map +1 -1
  46. package/dist/Spec.d.ts +23 -32
  47. package/dist/Spec.d.ts.map +1 -1
  48. package/dist/Spec.js +9 -48
  49. package/dist/Spec.js.map +1 -1
  50. package/dist/SystemFields.d.ts +10 -16
  51. package/dist/SystemFields.d.ts.map +1 -1
  52. package/dist/SystemFields.js +1 -1
  53. package/dist/SystemFields.js.map +1 -1
  54. package/dist/Types.d.ts +27 -27
  55. package/dist/Types.d.ts.map +1 -1
  56. package/dist/UserIdentity.d.ts +56 -63
  57. package/dist/UserIdentity.d.ts.map +1 -1
  58. package/dist/UserIdentity.js +1 -1
  59. package/dist/UserIdentity.js.map +1 -1
  60. package/dist/index.d.ts +17 -15
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +3 -1
  63. package/dist/tsconfig.src.tsbuildinfo +1 -0
  64. package/package.json +37 -46
  65. package/src/FunctionProvenance.ts +32 -10
  66. package/src/FunctionSpec.ts +5 -5
  67. package/src/GenericId.ts +3 -1
  68. package/src/GroupSpec.ts +16 -11
  69. package/src/{internal/utils.ts → Identifier.ts} +34 -0
  70. package/src/Lazy.ts +40 -0
  71. package/src/PaginationResult.ts +1 -1
  72. package/src/Ref.ts +23 -8
  73. package/src/Refs.ts +13 -44
  74. package/src/Registry.ts +2 -1
  75. package/src/Spec.ts +18 -81
  76. package/src/SystemFields.ts +1 -1
  77. package/src/UserIdentity.ts +1 -1
  78. package/src/index.ts +2 -0
  79. package/dist/internal/utils.d.ts +0 -5
  80. package/dist/internal/utils.d.ts.map +0 -1
  81. package/dist/internal/utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"RuntimeAndFunctionType.d.ts","names":[],"sources":["../src/RuntimeAndFunctionType.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AAO,MAAM,YAAY;;;CAA2B,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAE/C,eAAO,MAAM,UAAU;;;CAAyB,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC"}
package/dist/Spec.d.ts CHANGED
@@ -1,36 +1,27 @@
1
- import { Runtime } from "./RuntimeAndFunctionType.js";
2
- import { AnyWithProps as AnyWithProps$1, AnyWithPropsWithRuntime as AnyWithPropsWithRuntime$1, Name, NamedAt, WithName } from "./GroupSpec.js";
3
-
4
- //#region src/Spec.d.ts
5
- declare namespace Spec_d_exports {
6
- export { Any, AnyWithProps, AnyWithPropsWithRuntime, Groups, Spec, TypeId, isConvexSpec, isNodeSpec, isSpec, make, makeNode, merge };
1
+ import * as GroupSpec from "./GroupSpec";
2
+ export declare const TypeId = "@confect/core/Spec";
3
+ export type TypeId = typeof TypeId;
4
+ export declare const isSpec: (u: unknown) => u is AnyWithProps;
5
+ /**
6
+ * A Confect spec: a flat container of function groups. Groups may be of any
7
+ * runtime — a group built with `GroupSpec.makeNode()` (a Node action group) sits
8
+ * alongside `GroupSpec.make()` groups in the same namespace. The runtime of a
9
+ * group lives on the group itself (`GroupSpec.runtime`) and on each function's
10
+ * `RuntimeAndFunctionType`; the spec does not carry a runtime of its own.
11
+ */
12
+ export interface Spec<Groups_ extends GroupSpec.AnyWithProps = never> {
13
+ readonly [TypeId]: TypeId;
14
+ readonly groups: {
15
+ [GroupName in GroupSpec.Name<Groups_>]: GroupSpec.WithName<Groups_, GroupName>;
16
+ };
17
+ add<Group extends GroupSpec.AnyWithProps>(group: Group): Spec<Groups_ | Group>;
18
+ addAt<const Name extends string, Group extends GroupSpec.AnyWithProps>(name: Name, group: Group): Spec<Groups_ | GroupSpec.NamedAt<Group, Name>>;
7
19
  }
8
- declare const TypeId = "@confect/core/Spec";
9
- type TypeId = typeof TypeId;
10
- declare const isSpec: (u: unknown) => u is AnyWithProps;
11
- declare const isConvexSpec: (u: unknown) => u is AnyWithPropsWithRuntime<"Convex">;
12
- declare const isNodeSpec: (u: unknown) => u is AnyWithPropsWithRuntime<"Node">;
13
- interface Spec<Runtime$1 extends Runtime, Groups_ extends AnyWithPropsWithRuntime$1<Runtime$1> = never> {
14
- readonly [TypeId]: TypeId;
15
- readonly runtime: Runtime$1;
16
- readonly groups: { [GroupName in Name<Groups_>]: WithName<Groups_, GroupName> };
17
- add<Group extends AnyWithPropsWithRuntime$1<Runtime$1>>(group: Group): Spec<Runtime$1, Groups_ | Group>;
18
- addAt<const Name$1 extends string, Group extends AnyWithPropsWithRuntime$1<Runtime$1>>(name: Name$1, group: Group): Spec<Runtime$1, Groups_ | NamedAt<Group, Name$1>>;
20
+ export interface Any {
21
+ readonly [TypeId]: TypeId;
19
22
  }
20
- interface Any {
21
- readonly [TypeId]: TypeId;
23
+ export interface AnyWithProps extends Spec<GroupSpec.AnyWithProps> {
22
24
  }
23
- interface AnyWithProps extends Spec<Runtime, AnyWithProps$1> {}
24
- interface AnyWithPropsWithRuntime<Runtime$2 extends Runtime> extends Spec<Runtime$2, AnyWithPropsWithRuntime$1<Runtime$2>> {}
25
- type Groups<Spec_ extends AnyWithProps> = Spec_["groups"][keyof Spec_["groups"]];
26
- declare const make: () => Spec<"Convex">;
27
- declare const makeNode: () => Spec<"Node">;
28
- /**
29
- * Merges a Convex spec with an optional Node spec for use with `Api.make`.
30
- * When `nodeSpec` is provided, its groups are merged under a "node" namespace,
31
- * mirroring the structure used by `Refs.make`.
32
- */
33
- declare const merge: <ConvexSpec extends AnyWithPropsWithRuntime<"Convex">, NodeSpec extends AnyWithPropsWithRuntime<"Node">>(convexSpec: ConvexSpec, nodeSpec?: NodeSpec) => AnyWithProps;
34
- //#endregion
35
- export { Any, AnyWithProps, AnyWithPropsWithRuntime, Groups, Spec, Spec_d_exports, TypeId, isConvexSpec, isNodeSpec, isSpec, make, makeNode, merge };
25
+ export type Groups<Spec_ extends AnyWithProps> = Spec_["groups"][keyof Spec_["groups"]];
26
+ export declare const make: () => Spec;
36
27
  //# sourceMappingURL=Spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spec.d.ts","names":[],"sources":["../src/Spec.ts"],"mappings":";;;;;;;cAIa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,cAEf,MAAA,GAAU,CAAA,cAAa,CAAA,IAAK,YAAA;AAAA,cAG5B,YAAA,GACX,CAAA,cACC,CAAA,IAAK,uBAAA;AAAA,cAKK,UAAA,GAAc,CAAA,cAAa,CAAA,IAAK,uBAAA;AAAA,UAK5B,IAAA,mBACC,OAAA,kBACA,yBAAA,CAAkC,SAAA;EAAA,UAExC,MAAA,GAAS,MAAA;EAAA,SACV,OAAA,EAAS,SAAA;EAAA,SACT,MAAA,kBACO,IAAA,CAAe,OAAA,IAAW,QAAA,CACtC,OAAA,EACA,SAAA;EAIJ,GAAA,eAAkB,yBAAA,CAAkC,SAAA,GAClD,KAAA,EAAO,KAAA,GACN,IAAA,CAAK,SAAA,EAAS,OAAA,GAAU,KAAA;EAE3B,KAAA,4CAEgB,yBAAA,CAAkC,SAAA,GAEhD,IAAA,EAAM,MAAA,EACN,KAAA,EAAO,KAAA,GACN,IAAA,CAAK,SAAA,EAAS,OAAA,GAAU,OAAA,CAAkB,KAAA,EAAO,MAAA;AAAA;AAAA,UAGrC,GAAA;EAAA,UACL,MAAA,GAAS,MAAA;AAAA;AAAA,UAGJ,YAAA,SAAqB,IAAA,CACpC,OAAA,EACA,cAAA;AAAA,UAGe,uBAAA,mBACC,OAAA,UACR,IAAA,CAAK,SAAA,EAAS,yBAAA,CAAkC,SAAA;AAAA,KAE9C,MAAA,eAAqB,YAAA,IAC/B,KAAA,iBAAsB,KAAA;AAAA,cAuCX,IAAA,QAAW,IAAA;AAAA,cAGX,QAAA,QAAe,IAAA;;;;AAjG5B;;cAyGa,KAAA,sBACQ,uBAAA,6BACF,uBAAA,UAEjB,UAAA,EAAY,UAAA,EACZ,QAAA,GAAW,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AO,MAAM,IAAI,QAAO,IAAiC,CAAC"}
package/dist/Spec.js CHANGED
@@ -1,67 +1,28 @@
1
1
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
2
- import { makeNodeAt, withName } from "./GroupSpec.js";
3
- import { Array, Option, Predicate, Record } from "effect";
2
+ import { withName } from "./GroupSpec.js";
3
+ import * as Predicate from "effect/Predicate";
4
+ import * as Record from "effect/Record";
4
5
 
5
6
  //#region src/Spec.ts
6
7
  var Spec_exports = /* @__PURE__ */ __exportAll({
7
8
  TypeId: () => TypeId,
8
- isConvexSpec: () => isConvexSpec,
9
- isNodeSpec: () => isNodeSpec,
10
9
  isSpec: () => isSpec,
11
- make: () => make,
12
- makeNode: () => makeNode,
13
- merge: () => merge
10
+ make: () => make
14
11
  });
15
12
  const TypeId = "@confect/core/Spec";
16
13
  const isSpec = (u) => Predicate.hasProperty(u, TypeId);
17
- const isConvexSpec = (u) => Predicate.hasProperty(u, TypeId) && Predicate.hasProperty(u, "runtime") && u.runtime === "Convex";
18
- const isNodeSpec = (u) => Predicate.hasProperty(u, TypeId) && Predicate.hasProperty(u, "runtime") && u.runtime === "Node";
19
14
  const Proto = {
20
15
  [TypeId]: TypeId,
21
16
  add(group) {
22
- return makeProto({
23
- runtime: this.runtime,
24
- groups: Record.set(this.groups, group.name, group)
25
- });
17
+ return makeProto({ groups: Record.set(this.groups, group.name, group) });
26
18
  },
27
19
  addAt(name, group) {
28
- return makeProto({
29
- runtime: this.runtime,
30
- groups: Record.set(this.groups, name, withName(name, group))
31
- });
20
+ return makeProto({ groups: Record.set(this.groups, name, withName(name, group)) });
32
21
  }
33
22
  };
34
- const makeProto = ({ runtime, groups }) => Object.assign(Object.create(Proto), {
35
- runtime,
36
- groups
37
- });
38
- const make = () => makeProto({
39
- runtime: "Convex",
40
- groups: {}
41
- });
42
- const makeNode = () => makeProto({
43
- runtime: "Node",
44
- groups: {}
45
- });
46
- /**
47
- * Merges a Convex spec with an optional Node spec for use with `Api.make`.
48
- * When `nodeSpec` is provided, its groups are merged under a "node" namespace,
49
- * mirroring the structure used by `Refs.make`.
50
- */
51
- const merge = (convexSpec, nodeSpec) => {
52
- const groups = Option.fromNullable(nodeSpec).pipe(Option.map((nodeSpec_) => Array.reduce(Record.toEntries(nodeSpec_.groups), makeNodeAt("node"), (nodeGroupSpec, [name, group]) => nodeGroupSpec.addGroupAt(name, group))), Option.match({
53
- onNone: () => convexSpec.groups,
54
- onSome: (nodeGroup) => ({
55
- ...convexSpec.groups,
56
- node: nodeGroup
57
- })
58
- }));
59
- return Object.assign(Object.create(Proto), {
60
- runtime: "Convex",
61
- groups
62
- });
63
- };
23
+ const makeProto = ({ groups }) => Object.assign(Object.create(Proto), { groups });
24
+ const make = () => makeProto({ groups: {} });
64
25
 
65
26
  //#endregion
66
- export { Spec_exports, TypeId, isConvexSpec, isNodeSpec, isSpec, make, makeNode, merge };
27
+ export { Spec_exports, TypeId, isSpec, make };
67
28
  //# sourceMappingURL=Spec.js.map
package/dist/Spec.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Spec.js","names":["GroupSpec.withName","GroupSpec.makeNodeAt"],"sources":["../src/Spec.ts"],"sourcesContent":["import { Array, Option, Predicate, Record } from \"effect\";\nimport * as GroupSpec from \"./GroupSpec\";\nimport type * as RuntimeAndFunctionType from \"./RuntimeAndFunctionType\";\n\nexport const TypeId = \"@confect/core/Spec\";\nexport type TypeId = typeof TypeId;\n\nexport const isSpec = (u: unknown): u is AnyWithProps =>\n Predicate.hasProperty(u, TypeId);\n\nexport const isConvexSpec = (\n u: unknown,\n): u is AnyWithPropsWithRuntime<\"Convex\"> =>\n Predicate.hasProperty(u, TypeId) &&\n Predicate.hasProperty(u, \"runtime\") &&\n u.runtime === \"Convex\";\n\nexport const isNodeSpec = (u: unknown): u is AnyWithPropsWithRuntime<\"Node\"> =>\n Predicate.hasProperty(u, TypeId) &&\n Predicate.hasProperty(u, \"runtime\") &&\n u.runtime === \"Node\";\n\nexport interface Spec<\n Runtime extends RuntimeAndFunctionType.Runtime,\n Groups_ extends GroupSpec.AnyWithPropsWithRuntime<Runtime> = never,\n> {\n readonly [TypeId]: TypeId;\n readonly runtime: Runtime;\n readonly groups: {\n [GroupName in GroupSpec.Name<Groups_>]: GroupSpec.WithName<\n Groups_,\n GroupName\n >;\n };\n\n add<Group extends GroupSpec.AnyWithPropsWithRuntime<Runtime>>(\n group: Group,\n ): Spec<Runtime, Groups_ | Group>;\n\n addAt<\n const Name extends string,\n Group extends GroupSpec.AnyWithPropsWithRuntime<Runtime>,\n >(\n name: Name,\n group: Group,\n ): Spec<Runtime, Groups_ | GroupSpec.NamedAt<Group, Name>>;\n}\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends Spec<\n RuntimeAndFunctionType.Runtime,\n GroupSpec.AnyWithProps\n> {}\n\nexport interface AnyWithPropsWithRuntime<\n Runtime extends RuntimeAndFunctionType.Runtime,\n> extends Spec<Runtime, GroupSpec.AnyWithPropsWithRuntime<Runtime>> {}\n\nexport type Groups<Spec_ extends AnyWithProps> =\n Spec_[\"groups\"][keyof Spec_[\"groups\"]];\n\nconst Proto = {\n [TypeId]: TypeId,\n\n add<Group extends GroupSpec.AnyWithProps>(this: AnyWithProps, group: Group) {\n return makeProto({\n runtime: this.runtime,\n groups: Record.set(this.groups, group.name, group),\n });\n },\n\n addAt<Group extends GroupSpec.AnyWithProps>(\n this: AnyWithProps,\n name: string,\n group: Group,\n ) {\n return makeProto({\n runtime: this.runtime,\n groups: Record.set(this.groups, name, GroupSpec.withName(name, group)),\n });\n },\n};\n\nconst makeProto = <\n Runtime extends RuntimeAndFunctionType.Runtime,\n Groups_ extends GroupSpec.AnyWithPropsWithRuntime<Runtime>,\n>({\n runtime,\n groups,\n}: {\n runtime: Runtime;\n groups: Record.ReadonlyRecord<string, Groups_>;\n}): Spec<Runtime, Groups_> =>\n Object.assign(Object.create(Proto), {\n runtime,\n groups,\n });\n\nexport const make = (): Spec<\"Convex\"> =>\n makeProto({ runtime: \"Convex\", groups: {} });\n\nexport const makeNode = (): Spec<\"Node\"> =>\n makeProto({ runtime: \"Node\", groups: {} });\n\n/**\n * Merges a Convex spec with an optional Node spec for use with `Api.make`.\n * When `nodeSpec` is provided, its groups are merged under a \"node\" namespace,\n * mirroring the structure used by `Refs.make`.\n */\nexport const merge = <\n ConvexSpec extends AnyWithPropsWithRuntime<\"Convex\">,\n NodeSpec extends AnyWithPropsWithRuntime<\"Node\">,\n>(\n convexSpec: ConvexSpec,\n nodeSpec?: NodeSpec,\n): AnyWithProps => {\n const groups = Option.fromNullable(nodeSpec).pipe(\n Option.map((nodeSpec_) =>\n Array.reduce(\n Record.toEntries(nodeSpec_.groups),\n GroupSpec.makeNodeAt(\"node\"),\n (nodeGroupSpec, [name, group]) => nodeGroupSpec.addGroupAt(name, group),\n ),\n ),\n Option.match({\n onNone: () => convexSpec.groups,\n onSome: (nodeGroup) => ({ ...convexSpec.groups, node: nodeGroup }),\n }),\n );\n\n return Object.assign(Object.create(Proto), {\n runtime: \"Convex\" as const,\n groups,\n }) as AnyWithProps;\n};\n"],"mappings":";;;;;;;;;;;;;;AAIA,MAAa,SAAS;AAGtB,MAAa,UAAU,MACrB,UAAU,YAAY,GAAG,OAAO;AAElC,MAAa,gBACX,MAEA,UAAU,YAAY,GAAG,OAAO,IAChC,UAAU,YAAY,GAAG,UAAU,IACnC,EAAE,YAAY;AAEhB,MAAa,cAAc,MACzB,UAAU,YAAY,GAAG,OAAO,IAChC,UAAU,YAAY,GAAG,UAAU,IACnC,EAAE,YAAY;AA4ChB,MAAM,QAAQ;EACX,SAAS;CAEV,IAA8D,OAAc;AAC1E,SAAO,UAAU;GACf,SAAS,KAAK;GACd,QAAQ,OAAO,IAAI,KAAK,QAAQ,MAAM,MAAM,MAAM;GACnD,CAAC;;CAGJ,MAEE,MACA,OACA;AACA,SAAO,UAAU;GACf,SAAS,KAAK;GACd,QAAQ,OAAO,IAAI,KAAK,QAAQ,MAAMA,SAAmB,MAAM,MAAM,CAAC;GACvE,CAAC;;CAEL;AAED,MAAM,aAGJ,EACA,SACA,aAKA,OAAO,OAAO,OAAO,OAAO,MAAM,EAAE;CAClC;CACA;CACD,CAAC;AAEJ,MAAa,aACX,UAAU;CAAE,SAAS;CAAU,QAAQ,EAAE;CAAE,CAAC;AAE9C,MAAa,iBACX,UAAU;CAAE,SAAS;CAAQ,QAAQ,EAAE;CAAE,CAAC;;;;;;AAO5C,MAAa,SAIX,YACA,aACiB;CACjB,MAAM,SAAS,OAAO,aAAa,SAAS,CAAC,KAC3C,OAAO,KAAK,cACV,MAAM,OACJ,OAAO,UAAU,UAAU,OAAO,EAClCC,WAAqB,OAAO,GAC3B,eAAe,CAAC,MAAM,WAAW,cAAc,WAAW,MAAM,MAAM,CACxE,CACF,EACD,OAAO,MAAM;EACX,cAAc,WAAW;EACzB,SAAS,eAAe;GAAE,GAAG,WAAW;GAAQ,MAAM;GAAW;EAClE,CAAC,CACH;AAED,QAAO,OAAO,OAAO,OAAO,OAAO,MAAM,EAAE;EACzC,SAAS;EACT;EACD,CAAC"}
1
+ {"version":3,"file":"Spec.js","names":["GroupSpec.withName"],"sources":["../src/Spec.ts"],"sourcesContent":["import * as Predicate from \"effect/Predicate\";\nimport * as Record from \"effect/Record\";\nimport * as GroupSpec from \"./GroupSpec\";\n\nexport const TypeId = \"@confect/core/Spec\";\nexport type TypeId = typeof TypeId;\n\nexport const isSpec = (u: unknown): u is AnyWithProps =>\n Predicate.hasProperty(u, TypeId);\n\n/**\n * A Confect spec: a flat container of function groups. Groups may be of any\n * runtime — a group built with `GroupSpec.makeNode()` (a Node action group) sits\n * alongside `GroupSpec.make()` groups in the same namespace. The runtime of a\n * group lives on the group itself (`GroupSpec.runtime`) and on each function's\n * `RuntimeAndFunctionType`; the spec does not carry a runtime of its own.\n */\nexport interface Spec<Groups_ extends GroupSpec.AnyWithProps = never> {\n readonly [TypeId]: TypeId;\n readonly groups: {\n [GroupName in GroupSpec.Name<Groups_>]: GroupSpec.WithName<\n Groups_,\n GroupName\n >;\n };\n\n add<Group extends GroupSpec.AnyWithProps>(\n group: Group,\n ): Spec<Groups_ | Group>;\n\n addAt<const Name extends string, Group extends GroupSpec.AnyWithProps>(\n name: Name,\n group: Group,\n ): Spec<Groups_ | GroupSpec.NamedAt<Group, Name>>;\n}\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends Spec<GroupSpec.AnyWithProps> {}\n\nexport type Groups<Spec_ extends AnyWithProps> =\n Spec_[\"groups\"][keyof Spec_[\"groups\"]];\n\nconst Proto = {\n [TypeId]: TypeId,\n\n add<Group extends GroupSpec.AnyWithProps>(this: AnyWithProps, group: Group) {\n return makeProto({\n groups: Record.set(this.groups, group.name, group),\n });\n },\n\n addAt<Group extends GroupSpec.AnyWithProps>(\n this: AnyWithProps,\n name: string,\n group: Group,\n ) {\n return makeProto({\n groups: Record.set(this.groups, name, GroupSpec.withName(name, group)),\n });\n },\n};\n\nconst makeProto = <Groups_ extends GroupSpec.AnyWithProps>({\n groups,\n}: {\n groups: Record.ReadonlyRecord<string, Groups_>;\n}): Spec<Groups_> =>\n Object.assign(Object.create(Proto), {\n groups,\n });\n\nexport const make = (): Spec => makeProto({ groups: {} });\n"],"mappings":";;;;;;;;;;;AAIA,MAAa,SAAS;AAGtB,MAAa,UAAU,MACrB,UAAU,YAAY,GAAG,OAAO;AAqClC,MAAM,QAAQ;EACX,SAAS;CAEV,IAA8D,OAAc;AAC1E,SAAO,UAAU,EACf,QAAQ,OAAO,IAAI,KAAK,QAAQ,MAAM,MAAM,MAAM,EACnD,CAAC;;CAGJ,MAEE,MACA,OACA;AACA,SAAO,UAAU,EACf,QAAQ,OAAO,IAAI,KAAK,QAAQ,MAAMA,SAAmB,MAAM,MAAM,CAAC,EACvE,CAAC;;CAEL;AAED,MAAM,aAAqD,EACzD,aAIA,OAAO,OAAO,OAAO,OAAO,MAAM,EAAE,EAClC,QACD,CAAC;AAEJ,MAAa,aAAmB,UAAU,EAAE,QAAQ,EAAE,EAAE,CAAC"}
@@ -1,28 +1,22 @@
1
- import { GenericId } from "./GenericId.js";
2
- import { Schema } from "effect";
3
- import { Expand, IdField, SystemFields as SystemFields$1 } from "convex/server";
4
-
5
- //#region src/SystemFields.d.ts
6
- declare namespace SystemFields_d_exports {
7
- export { ExtendWithSystemFields, SystemFields, WithSystemFields, extendWithSystemFields };
8
- }
1
+ import type { Expand, IdField, SystemFields as NonIdSystemFields } from "convex/server";
2
+ import * as Schema from "effect/Schema";
3
+ import * as GenericId from "./GenericId";
9
4
  type SystemFieldsSchema<TableName extends string> = Schema.Struct<{
10
- _id: Schema.Schema<GenericId<TableName>, GenericId<TableName>, never>;
11
- _creationTime: typeof Schema.Number;
5
+ _id: Schema.Schema<GenericId.GenericId<TableName>, GenericId.GenericId<TableName>, never>;
6
+ _creationTime: typeof Schema.Number;
12
7
  }>;
13
8
  /**
14
9
  * Produces a schema for Convex system fields.
15
10
  */
16
- declare const SystemFields: <TableName extends string>(tableName: TableName) => SystemFieldsSchema<TableName>;
11
+ export declare const SystemFields: <TableName extends string>(tableName: TableName) => SystemFieldsSchema<TableName>;
17
12
  /**
18
13
  * Extend a table schema with Convex system fields.
19
14
  */
20
- declare const extendWithSystemFields: <TableName extends string, TableSchema extends Schema.Schema.AnyNoContext>(tableName: TableName, schema: TableSchema) => ExtendWithSystemFields<TableName, TableSchema>;
15
+ export declare const extendWithSystemFields: <TableName extends string, TableSchema extends Schema.Schema.AnyNoContext>(tableName: TableName, schema: TableSchema) => ExtendWithSystemFields<TableName, TableSchema>;
21
16
  /**
22
17
  * Extend a table schema with Convex system fields at the type level.
23
18
  */
24
- type ExtendWithSystemFields<TableName extends string, TableSchema extends Schema.Schema.AnyNoContext> = Schema.extend<SystemFieldsSchema<TableName>, TableSchema>;
25
- type WithSystemFields<TableName extends string, Document> = Expand<Readonly<IdField<TableName>> & Readonly<SystemFields$1> & Document>;
26
- //#endregion
27
- export { ExtendWithSystemFields, SystemFields, SystemFields_d_exports, WithSystemFields, extendWithSystemFields };
19
+ export type ExtendWithSystemFields<TableName extends string, TableSchema extends Schema.Schema.AnyNoContext> = Schema.extend<SystemFieldsSchema<TableName>, TableSchema>;
20
+ export type WithSystemFields<TableName extends string, Document> = Expand<Readonly<IdField<TableName>> & Readonly<NonIdSystemFields> & Document>;
21
+ export {};
28
22
  //# sourceMappingURL=SystemFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemFields.d.ts","names":[],"sources":["../src/SystemFields.ts"],"mappings":";;;;;;;;KAQK,kBAAA,6BAA+C,MAAA,CAAO,MAAA;EACzD,GAAA,EAAK,MAAA,CAAO,MAAA,CACV,SAAA,CAAoB,SAAA,GACpB,SAAA,CAAoB,SAAA;EAGtB,aAAA,SAAsB,MAAA,CAAO,MAAA;AAAA;;;;cAMlB,YAAA,6BACX,SAAA,EAAW,SAAA,KACV,kBAAA,CAAmB,SAAA;;AAhBmB;;cAyB5B,sBAAA,iDAES,MAAA,CAAO,MAAA,CAAO,YAAA,EAElC,SAAA,EAAW,SAAA,EACX,MAAA,EAAQ,WAAA,KACP,sBAAA,CAAuB,SAAA,EAAW,WAAA;;;;KAMzB,sBAAA,+CAEU,MAAA,CAAO,MAAA,CAAO,YAAA,IAChC,MAAA,CAAO,MAAA,CAAO,kBAAA,CAAmB,SAAA,GAAY,WAAA;AAAA,KAErC,gBAAA,uCAAuD,MAAA,CACjE,QAAA,CAAS,OAAA,CAAQ,SAAA,KAAc,QAAA,CAAS,cAAA,IAAqB,QAAA"}
1
+ {"version":3,"file":"SystemFields.d.ts","sourceRoot":"","sources":["../src/SystemFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,YAAY,IAAI,iBAAiB,EAClC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,KAAK,kBAAkB,CAAC,SAAS,SAAS,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;IAChE,GAAG,EAAE,MAAM,CAAC,MAAM,CAChB,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,EAC9B,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,EAC9B,KAAK,CACN,CAAC;IACF,aAAa,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;CACrC,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,SAAS,MAAM,EACnD,WAAW,SAAS,KACnB,kBAAkB,CAAC,SAAS,CAI3B,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EAE9C,WAAW,SAAS,EACpB,QAAQ,WAAW,KAClB,sBAAsB,CAAC,SAAS,EAAE,WAAW,CACA,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAChC,SAAS,SAAS,MAAM,EACxB,WAAW,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,IAC5C,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,CAAC,SAAS,SAAS,MAAM,EAAE,QAAQ,IAAI,MAAM,CACvE,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CACtE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
2
2
  import { GenericId } from "./GenericId.js";
3
- import { Schema } from "effect";
3
+ import * as Schema from "effect/Schema";
4
4
 
5
5
  //#region src/SystemFields.ts
6
6
  var SystemFields_exports = /* @__PURE__ */ __exportAll({
@@ -1 +1 @@
1
- {"version":3,"file":"SystemFields.js","names":["GenericId.GenericId"],"sources":["../src/SystemFields.ts"],"sourcesContent":["import type {\n Expand,\n IdField,\n SystemFields as NonIdSystemFields,\n} from \"convex/server\";\nimport { Schema } from \"effect\";\nimport * as GenericId from \"./GenericId\";\n\ntype SystemFieldsSchema<TableName extends string> = Schema.Struct<{\n _id: Schema.Schema<\n GenericId.GenericId<TableName>,\n GenericId.GenericId<TableName>,\n never\n >;\n _creationTime: typeof Schema.Number;\n}>;\n\n/**\n * Produces a schema for Convex system fields.\n */\nexport const SystemFields = <TableName extends string>(\n tableName: TableName,\n): SystemFieldsSchema<TableName> =>\n Schema.Struct({\n _id: GenericId.GenericId(tableName),\n _creationTime: Schema.Number,\n });\n\n/**\n * Extend a table schema with Convex system fields.\n */\nexport const extendWithSystemFields = <\n TableName extends string,\n TableSchema extends Schema.Schema.AnyNoContext,\n>(\n tableName: TableName,\n schema: TableSchema,\n): ExtendWithSystemFields<TableName, TableSchema> =>\n Schema.extend(SystemFields(tableName), schema);\n\n/**\n * Extend a table schema with Convex system fields at the type level.\n */\nexport type ExtendWithSystemFields<\n TableName extends string,\n TableSchema extends Schema.Schema.AnyNoContext,\n> = Schema.extend<SystemFieldsSchema<TableName>, TableSchema>;\n\nexport type WithSystemFields<TableName extends string, Document> = Expand<\n Readonly<IdField<TableName>> & Readonly<NonIdSystemFields> & Document\n>;\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAa,gBACX,cAEA,OAAO,OAAO;CACZ,KAAKA,UAAoB,UAAU;CACnC,eAAe,OAAO;CACvB,CAAC;;;;AAKJ,MAAa,0BAIX,WACA,WAEA,OAAO,OAAO,aAAa,UAAU,EAAE,OAAO"}
1
+ {"version":3,"file":"SystemFields.js","names":["GenericId.GenericId"],"sources":["../src/SystemFields.ts"],"sourcesContent":["import type {\n Expand,\n IdField,\n SystemFields as NonIdSystemFields,\n} from \"convex/server\";\nimport * as Schema from \"effect/Schema\";\nimport * as GenericId from \"./GenericId\";\n\ntype SystemFieldsSchema<TableName extends string> = Schema.Struct<{\n _id: Schema.Schema<\n GenericId.GenericId<TableName>,\n GenericId.GenericId<TableName>,\n never\n >;\n _creationTime: typeof Schema.Number;\n}>;\n\n/**\n * Produces a schema for Convex system fields.\n */\nexport const SystemFields = <TableName extends string>(\n tableName: TableName,\n): SystemFieldsSchema<TableName> =>\n Schema.Struct({\n _id: GenericId.GenericId(tableName),\n _creationTime: Schema.Number,\n });\n\n/**\n * Extend a table schema with Convex system fields.\n */\nexport const extendWithSystemFields = <\n TableName extends string,\n TableSchema extends Schema.Schema.AnyNoContext,\n>(\n tableName: TableName,\n schema: TableSchema,\n): ExtendWithSystemFields<TableName, TableSchema> =>\n Schema.extend(SystemFields(tableName), schema);\n\n/**\n * Extend a table schema with Convex system fields at the type level.\n */\nexport type ExtendWithSystemFields<\n TableName extends string,\n TableSchema extends Schema.Schema.AnyNoContext,\n> = Schema.extend<SystemFieldsSchema<TableName>, TableSchema>;\n\nexport type WithSystemFields<TableName extends string, Document> = Expand<\n Readonly<IdField<TableName>> & Readonly<NonIdSystemFields> & Document\n>;\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAa,gBACX,cAEA,OAAO,OAAO;CACZ,KAAKA,UAAoB,UAAU;CACnC,eAAe,OAAO;CACvB,CAAC;;;;AAKJ,MAAa,0BAIX,WACA,WAEA,OAAO,OAAO,aAAa,UAAU,EAAE,OAAO"}
package/dist/Types.d.ts CHANGED
@@ -1,35 +1,35 @@
1
- import { Brand } from "effect";
2
- import { DocumentByName, FieldTypeFromFieldPath, GenericDataModel, GenericDatabaseReader, TableNamesInDataModel } from "convex/server";
3
- import { GenericId } from "convex/values";
4
-
5
- //#region src/Types.d.ts
6
- declare namespace Types_d_exports {
7
- export { BaseDatabaseReader, DeepMutable, IndexFieldTypesForEq, IsAny, IsOptional, IsRecord, IsRecursive, IsUnion, IsValueLiteral, TypeDefect, TypeError, UnionToTuple };
8
- }
9
- type IsOptional<T, K extends keyof T> = {} extends Pick<T, K> ? true : false;
10
- type IsAny<T> = 0 extends 1 & T ? true : false;
11
- type IsUnion<T, U extends T = T> = T extends unknown ? [U] extends [T] ? false : true : never;
12
- type IsValueLiteral<Vl> = [Vl] extends [never] ? never : IsUnion<Vl> extends true ? false : [Vl] extends [string | number | bigint | boolean] ? [string] extends [Vl] ? false : [number] extends [Vl] ? false : [boolean] extends [Vl] ? false : [bigint] extends [Vl] ? false : true : false;
1
+ import type { DocumentByName, FieldTypeFromFieldPath, GenericDatabaseReader, GenericDataModel, TableNamesInDataModel } from "convex/server";
2
+ import type { GenericId } from "convex/values";
3
+ import type { Brand } from "effect";
4
+ export type IsOptional<T, K extends keyof T> = {} extends Pick<T, K> ? true : false;
5
+ export type IsAny<T> = 0 extends 1 & T ? true : false;
6
+ export type IsUnion<T, U extends T = T> = T extends unknown ? [U] extends [T] ? false : true : never;
7
+ export type IsValueLiteral<Vl> = [Vl] extends [never] ? never : IsUnion<Vl> extends true ? false : [Vl] extends [string | number | bigint | boolean] ? [string] extends [Vl] ? false : [number] extends [Vl] ? false : [boolean] extends [Vl] ? false : [bigint] extends [Vl] ? false : true : false;
13
8
  /**
14
9
  * Only checks for records with string keys.
15
10
  */
16
- type IsRecord<T> = [T] extends [never] ? false : IsUnion<T> extends true ? false : T extends Record<string, infer V> ? string extends keyof T ? keyof T extends string ? T extends Record<string, V> ? Record<string, V> extends T ? true : false : false : false : false : false;
17
- type DeepMutable<T> = IsAny<T> extends true ? any : T extends NonRecursiveLeaf ? T : T extends ReadonlyMap<infer K, infer V> ? Map<DeepMutable<K>, DeepMutable<V>> : T extends ReadonlySet<infer V> ? Set<DeepMutable<V>> : [keyof T] extends [never] ? T : { -readonly [K in keyof T]: DeepMutable<T[K]> };
18
- type TypeError<Message extends string, T = never> = [Message, T];
19
- type TypeDefect<Message extends string, T = never> = [Message, T];
20
- type IsRecursive<T> = true extends DetectCycle<T> ? true : false;
11
+ export type IsRecord<T> = [T] extends [never] ? false : IsUnion<T> extends true ? false : T extends Record<string, infer V> ? string extends keyof T ? keyof T extends string ? T extends Record<string, V> ? Record<string, V> extends T ? true : false : false : false : false : false;
12
+ export type DeepMutable<T> = IsAny<T> extends true ? any : T extends NonRecursiveLeaf ? T : T extends ReadonlyMap<infer K, infer V> ? Map<DeepMutable<K>, DeepMutable<V>> : T extends ReadonlySet<infer V> ? Set<DeepMutable<V>> : [keyof T] extends [never] ? T : {
13
+ -readonly [K in keyof T]: DeepMutable<T[K]>;
14
+ };
15
+ export type TypeError<Message extends string, T = never> = [Message, T];
16
+ export type TypeDefect<Message extends string, T = never> = [Message, T];
17
+ export type IsRecursive<T> = true extends DetectCycle<T> ? true : false;
21
18
  type NonRecursiveLeaf = Brand.Brand<any> | GenericId<any> | ArrayBuffer;
22
- type DetectCycle<T, Cache extends any[] = []> = IsAny<T> extends true ? false : [T] extends [any] ? T extends NonRecursiveLeaf ? false : T extends Cache[number] ? true : T extends Array<infer U> ? DetectCycle<U, [...Cache, T]> : T extends Map<infer _U, infer V> ? DetectCycle<V, [...Cache, T]> : T extends Set<infer U> ? DetectCycle<U, [...Cache, T]> : T extends object ? true extends { [K in keyof T]: DetectCycle<T[K], [...Cache, T]> }[keyof T] ? true : false : false : never;
23
- type UnionToTuple<t> = _unionToTuple<t, []> extends infer result ? conform<result, t[]> : never;
19
+ type DetectCycle<T, Cache extends any[] = []> = IsAny<T> extends true ? false : [T] extends [any] ? T extends NonRecursiveLeaf ? false : T extends Cache[number] ? true : T extends Array<infer U> ? DetectCycle<U, [...Cache, T]> : T extends Map<infer _U, infer V> ? DetectCycle<V, [...Cache, T]> : T extends Set<infer U> ? DetectCycle<U, [...Cache, T]> : T extends object ? true extends {
20
+ [K in keyof T]: DetectCycle<T[K], [...Cache, T]>;
21
+ }[keyof T] ? true : false : false : never;
22
+ export type UnionToTuple<t> = _unionToTuple<t, []> extends infer result ? conform<result, t[]> : never;
24
23
  type _unionToTuple<t, result extends unknown[]> = getLastBranch<t> extends infer current ? [t] extends [never] ? result : _unionToTuple<Exclude<t, current>, [current, ...result]> : never;
25
- type getLastBranch<t> = intersectUnion<t extends unknown ? (x: t) => void : never> extends ((x: infer branch) => void) ? branch : never;
26
- type intersectUnion<t> = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;
24
+ type getLastBranch<t> = intersectUnion<t extends unknown ? (x: t) => void : never> extends (x: infer branch) => void ? branch : never;
25
+ type intersectUnion<t> = (t extends unknown ? (_: t) => void : never) extends (_: infer intersection) => void ? intersection : never;
27
26
  type conform<t, base> = t extends base ? t : base;
28
- type IndexFieldTypesForEq<ConvexDataModel extends GenericDataModel, Table extends TableNamesInDataModel<ConvexDataModel>, T extends string[]> = T extends readonly [...infer Rest, any] ? Rest extends readonly string[] ? { [K in keyof Rest]: FieldTypeFromFieldPath<DocumentByName<ConvexDataModel, Table>, Rest[K]> } : never : never;
29
- type BaseDatabaseReader<DataModel extends GenericDataModel> = {
30
- get: GenericDatabaseReader<DataModel>["get"];
31
- query: GenericDatabaseReader<DataModel>["query"];
27
+ export type IndexFieldTypesForEq<ConvexDataModel extends GenericDataModel, Table extends TableNamesInDataModel<ConvexDataModel>, T extends string[]> = T extends readonly [...infer Rest, any] ? Rest extends readonly string[] ? {
28
+ [K in keyof Rest]: FieldTypeFromFieldPath<DocumentByName<ConvexDataModel, Table>, Rest[K]>;
29
+ } : never : never;
30
+ export type BaseDatabaseReader<DataModel extends GenericDataModel> = {
31
+ get: GenericDatabaseReader<DataModel>["get"];
32
+ query: GenericDatabaseReader<DataModel>["query"];
32
33
  };
33
- //#endregion
34
- export { BaseDatabaseReader, DeepMutable, IndexFieldTypesForEq, IsAny, IsOptional, IsRecord, IsRecursive, IsUnion, IsValueLiteral, TypeDefect, TypeError, Types_d_exports, UnionToTuple };
34
+ export {};
35
35
  //# sourceMappingURL=Types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Types.d.ts","names":[],"sources":["../src/Types.ts"],"mappings":";;;;;;;;KAUY,UAAA,oBAA8B,CAAA,eAC7B,IAAA,CAAK,CAAA,EAAG,CAAA;AAAA,KAET,K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c,CAAC,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CACjE,CAAC,EAAE,MAAM,MAAM,KACZ,IAAI,GACL,MAAM,GACN,KAAK,CAAC;AAEZ,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAC5E,CAAC,EAAE,MAAM,YAAY,KAClB,IAAI,GACL,YAAY,GACZ,KAAK,CAAC;AAEV,KAAK,OAAO,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC;AAMlD,MAAM,MAAM,oBAAoB,CAC9B,eAAe,SAAS,gBAAgB,EACxC,KAAK,SAAS,qBAAqB,CAAC,eAAe,CAAC,EACpD,CAAC,SAAS,MAAM,EAAE,IAChB,CAAC,SAAS,SAAS,CAAC,GAAG,MAAM,IAAI,EAAE,GAAG,CAAC,GACvC,IAAI,SAAS,SAAS,MAAM,EAAE,GAC5B;KACG,CAAC,IAAI,MAAM,IAAI,GAAG,sBAAsB,CACvC,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,EACtC,IAAI,CAAC,CAAC,CAAC,CACR;CACF,GACD,KAAK,GACP,KAAK,CAAC;AAGV,MAAM,MAAM,kBAAkB,CAAC,SAAS,SAAS,gBAAgB,IAAI;IACnE,GAAG,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7C,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;CAClD,CAAC"}
@@ -1,65 +1,58 @@
1
- import { Schema } from "effect";
2
-
3
- //#region src/UserIdentity.d.ts
4
- declare namespace UserIdentity_d_exports {
5
- export { UserIdentity };
6
- }
7
- declare const UserIdentity: <CustomClaimsFields extends Schema.Struct.Fields>(customClaimsFields: CustomClaimsFields) => Schema.Struct<CustomClaimsFields & {
8
- tokenIdentifier: typeof Schema.String;
9
- subject: typeof Schema.String;
10
- issuer: typeof Schema.String;
11
- name: Schema.optionalWith<typeof Schema.String, {
12
- exact: true;
13
- }>;
14
- givenName: Schema.optionalWith<typeof Schema.String, {
15
- exact: true;
16
- }>;
17
- familyName: Schema.optionalWith<typeof Schema.String, {
18
- exact: true;
19
- }>;
20
- nickname: Schema.optionalWith<typeof Schema.String, {
21
- exact: true;
22
- }>;
23
- preferredUsername: Schema.optionalWith<typeof Schema.String, {
24
- exact: true;
25
- }>;
26
- profileUrl: Schema.optionalWith<typeof Schema.String, {
27
- exact: true;
28
- }>;
29
- pictureUrl: Schema.optionalWith<typeof Schema.String, {
30
- exact: true;
31
- }>;
32
- email: Schema.optionalWith<typeof Schema.String, {
33
- exact: true;
34
- }>;
35
- emailVerified: Schema.optionalWith<typeof Schema.Boolean, {
36
- exact: true;
37
- }>;
38
- gender: Schema.optionalWith<typeof Schema.String, {
39
- exact: true;
40
- }>;
41
- birthday: Schema.optionalWith<typeof Schema.String, {
42
- exact: true;
43
- }>;
44
- timezone: Schema.optionalWith<typeof Schema.String, {
45
- exact: true;
46
- }>;
47
- language: Schema.optionalWith<typeof Schema.String, {
48
- exact: true;
49
- }>;
50
- phoneNumber: Schema.optionalWith<typeof Schema.String, {
51
- exact: true;
52
- }>;
53
- phoneNumberVerified: Schema.optionalWith<typeof Schema.Boolean, {
54
- exact: true;
55
- }>;
56
- address: Schema.optionalWith<typeof Schema.String, {
57
- exact: true;
58
- }>;
59
- updatedAt: Schema.optionalWith<typeof Schema.String, {
60
- exact: true;
61
- }>;
1
+ import * as Schema from "effect/Schema";
2
+ export declare const UserIdentity: <CustomClaimsFields extends Schema.Struct.Fields>(customClaimsFields: CustomClaimsFields) => Schema.Struct<CustomClaimsFields & {
3
+ tokenIdentifier: typeof Schema.String;
4
+ subject: typeof Schema.String;
5
+ issuer: typeof Schema.String;
6
+ name: Schema.optionalWith<typeof Schema.String, {
7
+ exact: true;
8
+ }>;
9
+ givenName: Schema.optionalWith<typeof Schema.String, {
10
+ exact: true;
11
+ }>;
12
+ familyName: Schema.optionalWith<typeof Schema.String, {
13
+ exact: true;
14
+ }>;
15
+ nickname: Schema.optionalWith<typeof Schema.String, {
16
+ exact: true;
17
+ }>;
18
+ preferredUsername: Schema.optionalWith<typeof Schema.String, {
19
+ exact: true;
20
+ }>;
21
+ profileUrl: Schema.optionalWith<typeof Schema.String, {
22
+ exact: true;
23
+ }>;
24
+ pictureUrl: Schema.optionalWith<typeof Schema.String, {
25
+ exact: true;
26
+ }>;
27
+ email: Schema.optionalWith<typeof Schema.String, {
28
+ exact: true;
29
+ }>;
30
+ emailVerified: Schema.optionalWith<typeof Schema.Boolean, {
31
+ exact: true;
32
+ }>;
33
+ gender: Schema.optionalWith<typeof Schema.String, {
34
+ exact: true;
35
+ }>;
36
+ birthday: Schema.optionalWith<typeof Schema.String, {
37
+ exact: true;
38
+ }>;
39
+ timezone: Schema.optionalWith<typeof Schema.String, {
40
+ exact: true;
41
+ }>;
42
+ language: Schema.optionalWith<typeof Schema.String, {
43
+ exact: true;
44
+ }>;
45
+ phoneNumber: Schema.optionalWith<typeof Schema.String, {
46
+ exact: true;
47
+ }>;
48
+ phoneNumberVerified: Schema.optionalWith<typeof Schema.Boolean, {
49
+ exact: true;
50
+ }>;
51
+ address: Schema.optionalWith<typeof Schema.String, {
52
+ exact: true;
53
+ }>;
54
+ updatedAt: Schema.optionalWith<typeof Schema.String, {
55
+ exact: true;
56
+ }>;
62
57
  }>;
63
- //#endregion
64
- export { UserIdentity, UserIdentity_d_exports };
65
58
  //# sourceMappingURL=UserIdentity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserIdentity.d.ts","names":[],"sources":["../src/UserIdentity.ts"],"mappings":";;;;;;cAEa,YAAA,8BAA2C,MAAA,CAAO,MAAA,CAAO,MAAA,EACpE,kBAAA,EAAoB,kBAAA,KAAkB,MAAA,CAAA,MAAA,CAAA,kBAAA"}
1
+ {"version":3,"file":"UserIdentity.d.ts","sourceRoot":"","sources":["../src/UserIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,YAAY,GAAI,kBAAkB,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EAC1E,oBAAoB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBpC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
2
- import { Schema } from "effect";
2
+ import * as Schema from "effect/Schema";
3
3
 
4
4
  //#region src/UserIdentity.ts
5
5
  var UserIdentity_exports = /* @__PURE__ */ __exportAll({ UserIdentity: () => UserIdentity });
@@ -1 +1 @@
1
- {"version":3,"file":"UserIdentity.js","names":[],"sources":["../src/UserIdentity.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nexport const UserIdentity = <CustomClaimsFields extends Schema.Struct.Fields>(\n customClaimsFields: CustomClaimsFields,\n) =>\n Schema.Struct({\n ...customClaimsFields,\n tokenIdentifier: Schema.String,\n subject: Schema.String,\n issuer: Schema.String,\n name: Schema.optionalWith(Schema.String, { exact: true }),\n givenName: Schema.optionalWith(Schema.String, { exact: true }),\n familyName: Schema.optionalWith(Schema.String, { exact: true }),\n nickname: Schema.optionalWith(Schema.String, { exact: true }),\n preferredUsername: Schema.optionalWith(Schema.String, { exact: true }),\n profileUrl: Schema.optionalWith(Schema.String, { exact: true }),\n pictureUrl: Schema.optionalWith(Schema.String, { exact: true }),\n email: Schema.optionalWith(Schema.String, { exact: true }),\n emailVerified: Schema.optionalWith(Schema.Boolean, { exact: true }),\n gender: Schema.optionalWith(Schema.String, { exact: true }),\n birthday: Schema.optionalWith(Schema.String, { exact: true }),\n timezone: Schema.optionalWith(Schema.String, { exact: true }),\n language: Schema.optionalWith(Schema.String, { exact: true }),\n phoneNumber: Schema.optionalWith(Schema.String, { exact: true }),\n phoneNumberVerified: Schema.optionalWith(Schema.Boolean, { exact: true }),\n address: Schema.optionalWith(Schema.String, { exact: true }),\n updatedAt: Schema.optionalWith(Schema.String, { exact: true }),\n });\n"],"mappings":";;;;;AAEA,MAAa,gBACX,uBAEA,OAAO,OAAO;CACZ,GAAG;CACH,iBAAiB,OAAO;CACxB,SAAS,OAAO;CAChB,QAAQ,OAAO;CACf,MAAM,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CACzD,WAAW,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC9D,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,mBAAmB,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CACtE,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,OAAO,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC1D,eAAe,OAAO,aAAa,OAAO,SAAS,EAAE,OAAO,MAAM,CAAC;CACnE,QAAQ,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC3D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,aAAa,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAChE,qBAAqB,OAAO,aAAa,OAAO,SAAS,EAAE,OAAO,MAAM,CAAC;CACzE,SAAS,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC5D,WAAW,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,CAAC"}
1
+ {"version":3,"file":"UserIdentity.js","names":[],"sources":["../src/UserIdentity.ts"],"sourcesContent":["import * as Schema from \"effect/Schema\";\n\nexport const UserIdentity = <CustomClaimsFields extends Schema.Struct.Fields>(\n customClaimsFields: CustomClaimsFields,\n) =>\n Schema.Struct({\n ...customClaimsFields,\n tokenIdentifier: Schema.String,\n subject: Schema.String,\n issuer: Schema.String,\n name: Schema.optionalWith(Schema.String, { exact: true }),\n givenName: Schema.optionalWith(Schema.String, { exact: true }),\n familyName: Schema.optionalWith(Schema.String, { exact: true }),\n nickname: Schema.optionalWith(Schema.String, { exact: true }),\n preferredUsername: Schema.optionalWith(Schema.String, { exact: true }),\n profileUrl: Schema.optionalWith(Schema.String, { exact: true }),\n pictureUrl: Schema.optionalWith(Schema.String, { exact: true }),\n email: Schema.optionalWith(Schema.String, { exact: true }),\n emailVerified: Schema.optionalWith(Schema.Boolean, { exact: true }),\n gender: Schema.optionalWith(Schema.String, { exact: true }),\n birthday: Schema.optionalWith(Schema.String, { exact: true }),\n timezone: Schema.optionalWith(Schema.String, { exact: true }),\n language: Schema.optionalWith(Schema.String, { exact: true }),\n phoneNumber: Schema.optionalWith(Schema.String, { exact: true }),\n phoneNumberVerified: Schema.optionalWith(Schema.Boolean, { exact: true }),\n address: Schema.optionalWith(Schema.String, { exact: true }),\n updatedAt: Schema.optionalWith(Schema.String, { exact: true }),\n });\n"],"mappings":";;;;;AAEA,MAAa,gBACX,uBAEA,OAAO,OAAO;CACZ,GAAG;CACH,iBAAiB,OAAO;CACxB,SAAS,OAAO;CAChB,QAAQ,OAAO;CACf,MAAM,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CACzD,WAAW,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC9D,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,mBAAmB,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CACtE,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,YAAY,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,OAAO,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC1D,eAAe,OAAO,aAAa,OAAO,SAAS,EAAE,OAAO,MAAM,CAAC;CACnE,QAAQ,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC3D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,UAAU,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC7D,aAAa,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAChE,qBAAqB,OAAO,aAAa,OAAO,SAAS,EAAE,OAAO,MAAM,CAAC;CACzE,SAAS,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC5D,WAAW,OAAO,aAAa,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC;CAC/D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,15 +1,17 @@
1
- import { FunctionProvenance_d_exports } from "./FunctionProvenance.js";
2
- import { RuntimeAndFunctionType_d_exports } from "./RuntimeAndFunctionType.js";
3
- import { FunctionSpec_d_exports } from "./FunctionSpec.js";
4
- import { GenericId_d_exports } from "./GenericId.js";
5
- import { GroupSpec_d_exports } from "./GroupSpec.js";
6
- import { GroupPath_d_exports } from "./GroupPath.js";
7
- import { PaginationResult_d_exports } from "./PaginationResult.js";
8
- import { Ref_d_exports } from "./Ref.js";
9
- import { Spec_d_exports } from "./Spec.js";
10
- import { Refs_d_exports } from "./Refs.js";
11
- import { Registry_d_exports } from "./Registry.js";
12
- import { SystemFields_d_exports } from "./SystemFields.js";
13
- import { Types_d_exports } from "./Types.js";
14
- import { UserIdentity_d_exports } from "./UserIdentity.js";
15
- export { FunctionProvenance_d_exports as FunctionProvenance, FunctionSpec_d_exports as FunctionSpec, GenericId_d_exports as GenericId, GroupPath_d_exports as GroupPath, GroupSpec_d_exports as GroupSpec, PaginationResult_d_exports as PaginationResult, Ref_d_exports as Ref, Refs_d_exports as Refs, Registry_d_exports as Registry, RuntimeAndFunctionType_d_exports as RuntimeAndFunctionType, Spec_d_exports as Spec, SystemFields_d_exports as SystemFields, Types_d_exports as Types, UserIdentity_d_exports as UserIdentity };
1
+ export * as FunctionProvenance from "./FunctionProvenance";
2
+ export * as FunctionSpec from "./FunctionSpec";
3
+ export * as GenericId from "./GenericId";
4
+ export * as GroupPath from "./GroupPath";
5
+ export * as GroupSpec from "./GroupSpec";
6
+ export * as Identifier from "./Identifier";
7
+ export * as Lazy from "./Lazy";
8
+ export * as PaginationResult from "./PaginationResult";
9
+ export * as Ref from "./Ref";
10
+ export * as Refs from "./Refs";
11
+ export * as Registry from "./Registry";
12
+ export * as RuntimeAndFunctionType from "./RuntimeAndFunctionType";
13
+ export * as Spec from "./Spec";
14
+ export * as SystemFields from "./SystemFields";
15
+ export * as Types from "./Types";
16
+ export * as UserIdentity from "./UserIdentity";
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,sBAAsB,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
+ import { Lazy_exports } from "./Lazy.js";
1
2
  import { FunctionProvenance_exports } from "./FunctionProvenance.js";
3
+ import { Identifier_exports } from "./Identifier.js";
2
4
  import { RuntimeAndFunctionType_exports } from "./RuntimeAndFunctionType.js";
3
5
  import { FunctionSpec_exports } from "./FunctionSpec.js";
4
6
  import { GenericId_exports } from "./GenericId.js";
@@ -13,4 +15,4 @@ import { SystemFields_exports } from "./SystemFields.js";
13
15
  import { Types_exports } from "./Types.js";
14
16
  import { UserIdentity_exports } from "./UserIdentity.js";
15
17
 
16
- export { FunctionProvenance_exports as FunctionProvenance, FunctionSpec_exports as FunctionSpec, GenericId_exports as GenericId, GroupPath_exports as GroupPath, GroupSpec_exports as GroupSpec, PaginationResult_exports as PaginationResult, Ref_exports as Ref, Refs_exports as Refs, Registry_exports as Registry, RuntimeAndFunctionType_exports as RuntimeAndFunctionType, Spec_exports as Spec, SystemFields_exports as SystemFields, Types_exports as Types, UserIdentity_exports as UserIdentity };
18
+ export { FunctionProvenance_exports as FunctionProvenance, FunctionSpec_exports as FunctionSpec, GenericId_exports as GenericId, GroupPath_exports as GroupPath, GroupSpec_exports as GroupSpec, Identifier_exports as Identifier, Lazy_exports as Lazy, PaginationResult_exports as PaginationResult, Ref_exports as Ref, Refs_exports as Refs, Registry_exports as Registry, RuntimeAndFunctionType_exports as RuntimeAndFunctionType, Spec_exports as Spec, SystemFields_exports as SystemFields, Types_exports as Types, UserIdentity_exports as UserIdentity };