@confect/core 9.0.0-next.9 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,45 @@
1
- import { Runtime } from "./RuntimeAndFunctionType.js";
2
- import { AnyWithProps as AnyWithProps$1, AnyWithPropsWithRuntime as AnyWithPropsWithRuntime$1, Name as Name$1, WithName as WithName$1 } from "./FunctionSpec.js";
3
-
4
- //#region src/GroupSpec.d.ts
5
- declare namespace GroupSpec_d_exports {
6
- export { Any, AnyWithProps, AnyWithPropsWithRuntime, Functions, GroupNames, GroupSpec, Groups, Name, NamedAt, TypeId, WithName, isGroupSpec, make, makeAt, makeNode, makeNodeAt, withName };
1
+ import type * as FunctionSpec from "./FunctionSpec";
2
+ import type * as RuntimeAndFunctionType from "./RuntimeAndFunctionType";
3
+ export declare const TypeId = "@confect/core/GroupSpec";
4
+ export type TypeId = typeof TypeId;
5
+ export declare const isGroupSpec: (u: unknown) => u is AnyWithProps;
6
+ export interface GroupSpec<Runtime extends RuntimeAndFunctionType.Runtime, Name_ extends string, Functions_ extends FunctionSpec.AnyWithPropsWithRuntime<Runtime> = never, Groups_ extends AnyWithProps = never> {
7
+ readonly [TypeId]: TypeId;
8
+ readonly runtime: Runtime;
9
+ readonly name: Name_;
10
+ readonly functions: {
11
+ [FunctionName in FunctionSpec.Name<FunctionSpec.AnyWithPropsWithRuntime<Runtime>>]: FunctionSpec.WithName<Functions_, FunctionName>;
12
+ };
13
+ readonly groups: {
14
+ [GroupName in Name<Groups_>]: WithName<Groups_, GroupName>;
15
+ };
16
+ addFunction<Function extends FunctionSpec.AnyWithPropsWithRuntime<Runtime>>(function_: Function): GroupSpec<Runtime, Name_, Functions_ | Function, Groups_>;
17
+ addGroup<Group extends AnyWithProps>(group: Group): GroupSpec<Runtime, Name_, Functions_, Groups_ | Group>;
18
+ addGroupAt<const AtName extends string, Group extends AnyWithProps>(name: AtName, group: Group): GroupSpec<Runtime, Name_, Functions_, Groups_ | NamedAt<Group, AtName>>;
7
19
  }
8
- declare const TypeId = "@confect/core/GroupSpec";
9
- type TypeId = typeof TypeId;
10
- declare const isGroupSpec: (u: unknown) => u is AnyWithProps;
11
- interface GroupSpec<Runtime$1 extends Runtime, Name_ extends string, Functions_ extends AnyWithPropsWithRuntime$1<Runtime$1> = never, Groups_ extends AnyWithProps = never> {
12
- readonly [TypeId]: TypeId;
13
- readonly runtime: Runtime$1;
14
- readonly name: Name_;
15
- readonly functions: { [FunctionName in Name$1<AnyWithPropsWithRuntime$1<Runtime$1>>]: WithName$1<Functions_, FunctionName> };
16
- readonly groups: { [GroupName in Name<Groups_>]: WithName<Groups_, GroupName> };
17
- addFunction<Function extends AnyWithPropsWithRuntime$1<Runtime$1>>(function_: Function): GroupSpec<Runtime$1, Name_, Functions_ | Function, Groups_>;
18
- addGroup<Group extends AnyWithProps>(group: Group): GroupSpec<Runtime$1, Name_, Functions_, Groups_ | Group>;
19
- addGroupAt<const AtName extends string, Group extends AnyWithProps>(name: AtName, group: Group): GroupSpec<Runtime$1, Name_, Functions_, Groups_ | NamedAt<Group, AtName>>;
20
+ export interface Any {
21
+ readonly [TypeId]: TypeId;
20
22
  }
21
- interface Any {
22
- readonly [TypeId]: TypeId;
23
+ export interface AnyWithProps extends GroupSpec<RuntimeAndFunctionType.Runtime, string, FunctionSpec.AnyWithProps, AnyWithProps> {
23
24
  }
24
- interface AnyWithProps extends GroupSpec<Runtime, string, AnyWithProps$1, AnyWithProps> {}
25
- interface AnyWithPropsWithRuntime<Runtime$2 extends Runtime> extends GroupSpec<Runtime$2, string, AnyWithPropsWithRuntime$1<Runtime$2>, AnyWithPropsWithRuntime<Runtime$2>> {}
26
- type Name<Group extends AnyWithProps> = Group["name"];
27
- type Functions<Group extends AnyWithProps> = Group["functions"][keyof Group["functions"]];
28
- type Groups<Group extends AnyWithProps> = Group["groups"][keyof Group["groups"]];
29
- type GroupNames<Group extends AnyWithProps> = [Groups<Group>] extends [never] ? never : Name<Groups<Group>>;
30
- type WithName<Group extends AnyWithProps, Name_ extends Name<Group>> = Extract<Group, {
31
- readonly name: Name_;
25
+ export interface AnyWithPropsWithRuntime<Runtime extends RuntimeAndFunctionType.Runtime> extends GroupSpec<Runtime, string, FunctionSpec.AnyWithPropsWithRuntime<Runtime>, AnyWithPropsWithRuntime<Runtime>> {
26
+ }
27
+ export type Name<Group extends AnyWithProps> = Group["name"];
28
+ export type Functions<Group extends AnyWithProps> = Group["functions"][keyof Group["functions"]];
29
+ export type Groups<Group extends AnyWithProps> = Group["groups"][keyof Group["groups"]];
30
+ export type GroupNames<Group extends AnyWithProps> = [Groups<Group>] extends [
31
+ never
32
+ ] ? never : Name<Groups<Group>>;
33
+ export type WithName<Group extends AnyWithProps, Name_ extends Name<Group>> = Extract<Group, {
34
+ readonly name: Name_;
32
35
  }>;
33
36
  /** Assigns a segment name to a leaf group created with {@link make} for typing and refs. */
34
- type NamedAt<Group extends Any, Name_ extends string> = Omit<Group, "name"> & {
35
- readonly name: Name_;
37
+ export type NamedAt<Group extends Any, Name_ extends string> = Omit<Group, "name"> & {
38
+ readonly name: Name_;
36
39
  };
37
- declare const make: () => GroupSpec<"Convex", "">;
38
- declare const makeAt: <const Name_ extends string>(name: Name_) => GroupSpec<"Convex", Name_>;
39
- declare const makeNode: () => GroupSpec<"Node", "">;
40
- declare const makeNodeAt: <const Name_ extends string>(name: Name_) => GroupSpec<"Node", Name_>;
41
- declare const withName: <const Name_ extends string>(name: Name_, group: Any) => AnyWithProps;
42
- //#endregion
43
- export { Any, AnyWithProps, AnyWithPropsWithRuntime, Functions, GroupNames, GroupSpec, GroupSpec_d_exports, Groups, Name, NamedAt, TypeId, WithName, isGroupSpec, make, makeAt, makeNode, makeNodeAt, withName };
40
+ export declare const make: () => GroupSpec<"Convex", "">;
41
+ export declare const makeAt: <const Name_ extends string>(name: Name_) => GroupSpec<"Convex", Name_>;
42
+ export declare const makeNode: () => GroupSpec<"Node", "">;
43
+ export declare const makeNodeAt: <const Name_ extends string>(name: Name_) => GroupSpec<"Node", Name_>;
44
+ export declare const withName: <const Name_ extends string>(name: Name_, group: Any) => AnyWithProps;
44
45
  //# sourceMappingURL=GroupSpec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupSpec.d.ts","names":[],"sources":["../src/GroupSpec.ts"],"mappings":";;;;;;;cAMa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,cAEf,WAAA,GAAe,CAAA,cAAa,CAAA,IAAK,YAAA;AAAA,UAG7B,SAAA,mBACC,OAAA,2CAEG,yBAAA,CAAqC,SAAA,2BAKxC,YAAA;EAAA,UAEN,MAAA,GAAS,MAAA;EAAA,SACV,OAAA,EAAS,SAAA;EAAA,SACT,IAAA,EAAM,KAAA;EAAA,SACN,SAAA,qBACU,MAAA,CACf,yBAAA,CAAqC,SAAA,KACnC,UAAA,CAAsB,UAAA,EAAY,YAAA;EAAA,SAE/B,MAAA,kBACO,IAAA,CAAK,OAAA,IAAW,QAAA,CAAS,OAAA,EAAS,SAAA;EAGlD,WAAA,kBAA6B,yBAAA,CAAqC,SAAA,GAChE,SAAA,EAAW,QAAA,GACV,SAAA,CAAU,SAAA,EAAS,KAAA,EAAO,UAAA,GAAa,QAAA,EAAU,OAAA;EAEpD,QAAA,eAAuB,YAAA,EACrB,KAAA,EAAO,KAAA,GACN,SAAA,CAAU,SAAA,EAAS,KAAA,EAAO,UAAA,EAAY,OAAA,GAAU,KAAA;EAEnD,UAAA,4CAAsD,YAAA,EACpD,IAAA,EAAM,MAAA,EACN,KAAA,EAAO,KAAA,GACN,SAAA,CAAU,SAAA,EAAS,KAAA,EAAO,UAAA,EAAY,OAAA,GAAU,OAAA,CAAQ,KAAA,EAAO,MAAA;AAAA;AAAA,UAGnD,GAAA;EAAA,UACL,MAAA,GAAS,MAAA;AAAA;AAAA,UAGJ,YAAA,SAAqB,SAAA,CACpC,OAAA,UAEA,cAAA,EACA,YAAA;AAAA,UAGe,uBAAA,mBACC,O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AAO,MAAM,IAAI,QAAO,SAAS,CAAC,QAAQ,EAAE,EAAE,CAM1C,CAAC;AAEL,eAAO,MAAM,MAAM,GAAI,KAAK,CAAC,KAAK,SAAS,MAAM,EAC/C,MAAM,KAAK,KACV,SAAS,CAAC,QAAQ,EAAE,KAAK,CAS3B,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,SAAS,CAAC,MAAM,EAAE,EAAE,CAM5C,CAAC;AAEL,eAAO,MAAM,UAAU,GAAI,KAAK,CAAC,KAAK,SAAS,MAAM,EACnD,MAAM,KAAK,KACV,SAAS,CAAC,MAAM,EAAE,KAAK,CASzB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,KAAK,CAAC,KAAK,SAAS,MAAM,EACjD,MAAM,KAAK,EACX,OAAO,GAAG,KACT,YAcF,CAAC"}
@@ -1,7 +1,4 @@
1
- declare namespace Identifier_d_exports {
2
- export { validateConfectFunctionIdentifier, validateConfectTableIdentifier };
3
- }
4
- declare const validateConfectFunctionIdentifier: (identifier: string) => void;
1
+ export declare const validateConfectFunctionIdentifier: (identifier: string) => void;
5
2
  /**
6
3
  * Validate that `identifier` is suitable as a Convex table name (and, equivalently,
7
4
  * as a `confect/tables/<identifier>.ts` filename).
@@ -13,7 +10,5 @@ declare const validateConfectFunctionIdentifier: (identifier: string) => void;
13
10
  * - Must not be a reserved JavaScript identifier, so the name can also be used
14
11
  * as a binding name in generated code without escaping.
15
12
  */
16
- declare const validateConfectTableIdentifier: (identifier: string) => void;
17
- //#endregion
18
- export { Identifier_d_exports, validateConfectFunctionIdentifier, validateConfectTableIdentifier };
13
+ export declare const validateConfectTableIdentifier: (identifier: string) => void;
19
14
  //# sourceMappingURL=Identifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Identifier.d.ts","names":[],"sources":["../src/Identifier.ts"],"mappings":";;;cA4Ea,iCAAA,GAAqC,UAAA;;;;;;;AAAlD;;;;;cA+Ba,8BAAA,GAAkC,UAAA"}
1
+ {"version":3,"file":"Identifier.d.ts","sourceRoot":"","sources":["../src/Identifier.ts"],"names":[],"mappings":"AA4EA,eAAO,MAAM,iCAAiC,GAAI,YAAY,MAAM,SAkBnE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,GAAI,YAAY,MAAM,SAYhE,CAAC"}
package/dist/Lazy.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- declare namespace Lazy_d_exports {
2
- export { defineProperty };
3
- }
4
1
  /**
5
2
  * Install a lazy memoised property on `target`. The first access runs
6
3
  * `compute()` and replaces the getter with a plain, non-writable data
@@ -21,7 +18,5 @@ declare namespace Lazy_d_exports {
21
18
  * `Table` `Fields` / `Doc` / `tableDefinition`), so there is no chance of the
22
19
  * two drifting apart.
23
20
  */
24
- declare const defineProperty: <T extends object, K extends PropertyKey>(target: T, key: K, compute: () => unknown) => void;
25
- //#endregion
26
- export { Lazy_d_exports, defineProperty };
21
+ export declare const defineProperty: <T extends object, K extends PropertyKey>(target: T, key: K, compute: () => unknown) => void;
27
22
  //# sourceMappingURL=Lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Lazy.d.ts","names":[],"sources":["../src/Lazy.ts"],"mappings":";;;;;;;AAoBA;;;;;;;;;;;;;;;;cAAa,cAAA,+BAA8C,WAAA,EACzD,MAAA,EAAQ,CAAA,EACR,GAAA,EAAK,CAAA,EACL,OAAA"}
1
+ {"version":3,"file":"Lazy.d.ts","sourceRoot":"","sources":["../src/Lazy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,WAAW,EACpE,QAAQ,CAAC,EACT,KAAK,CAAC,EACN,SAAS,MAAM,OAAO,KACrB,IAeF,CAAC"}
@@ -1,20 +1,13 @@
1
1
  import * as Schema from "effect/Schema";
2
-
3
- //#region src/PaginationResult.d.ts
4
- declare namespace PaginationResult_d_exports {
5
- export { PaginationResult };
6
- }
7
- declare const PaginationResult: <Doc extends Schema.Schema.AnyNoContext>(Doc: Doc) => Schema.Struct<{
8
- page: Schema.mutable<Schema.Array$<Doc>>;
9
- isDone: typeof Schema.Boolean;
10
- continueCursor: typeof Schema.String;
11
- splitCursor: Schema.optionalWith<Schema.Union<[typeof Schema.String, typeof Schema.Null]>, {
12
- exact: true;
13
- }>;
14
- pageStatus: Schema.optionalWith<Schema.Union<[Schema.Literal<["SplitRecommended"]>, Schema.Literal<["SplitRequired"]>, typeof Schema.Null]>, {
15
- exact: true;
16
- }>;
2
+ export declare const PaginationResult: <Doc extends Schema.Schema.AnyNoContext>(Doc: Doc) => Schema.Struct<{
3
+ page: Schema.mutable<Schema.Array$<Doc>>;
4
+ isDone: typeof Schema.Boolean;
5
+ continueCursor: typeof Schema.String;
6
+ splitCursor: Schema.optionalWith<Schema.Union<[typeof Schema.String, typeof Schema.Null]>, {
7
+ exact: true;
8
+ }>;
9
+ pageStatus: Schema.optionalWith<Schema.Union<[Schema.Literal<["SplitRecommended"]>, Schema.Literal<["SplitRequired"]>, typeof Schema.Null]>, {
10
+ exact: true;
11
+ }>;
17
12
  }>;
18
- //#endregion
19
- export { PaginationResult, PaginationResult_d_exports };
20
13
  //# sourceMappingURL=PaginationResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationResult.d.ts","names":[],"sources":["../src/PaginationResult.ts"],"mappings":";;;;;;cAEa,gBAAA,eAAgC,MAAA,CAAO,MAAA,CAAO,YAAA,EACzD,GAAA,EAAK,GAAA,KAAG,MAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"PaginationResult.d.ts","sourceRoot":"","sources":["../src/PaginationResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,gBAAgB,GAAI,GAAG,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,EACrE,KAAK,GAAG;;;;;;;;;;EAiBN,CAAC"}
package/dist/Ref.d.ts CHANGED
@@ -1,57 +1,61 @@
1
- import { AnyAction as AnyAction$1, AnyMutation as AnyMutation$1, AnyQuery as AnyQuery$1, GetFunctionType as GetFunctionType$1, GetRuntime as GetRuntime$1, RuntimeAndFunctionType } from "./RuntimeAndFunctionType.js";
2
- import { AnyWithProps, Args as Args$1, Error as Error$1, GetFunctionVisibility as GetFunctionVisibility$1, GetRuntimeAndFunctionType as GetRuntimeAndFunctionType$1, Returns as Returns$1 } from "./FunctionSpec.js";
3
- import { FunctionReference as FunctionReference$1, FunctionVisibility } from "convex/server";
4
- import { ConvexError, Value } from "convex/values";
1
+ import type { FunctionReference as ConvexFunctionReference, FunctionVisibility } from "convex/server";
2
+ import type { Value } from "convex/values";
3
+ import { ConvexError } from "convex/values";
4
+ import type { ParseResult } from "effect";
5
5
  import * as Effect from "effect/Effect";
6
- import * as Option$1 from "effect/Option";
7
- import { ParseResult } from "effect";
8
-
9
- //#region src/Ref.d.ts
10
- declare namespace Ref_d_exports {
11
- export { Any, AnyAction, AnyInternal, AnyMutation, AnyPublic, AnyPublicAction, AnyPublicMutation, AnyPublicQuery, AnyQuery, Args, Error, FromFunctionSpec, FunctionReference, GetFunctionType, GetFunctionVisibility, GetRuntime, GetRuntimeAndFunctionType, OptionalArgs, Ref, Returns, decodeError, decodeErrorOrElse, decodeErrorSync, decodeReturns, decodeReturnsSync, encodeArgs, encodeArgsSync, getConvexFunctionName, getFunctionReference, hasErrorSchema, isConvexError, make, maybeDecodeErrorSync, runWithCodec };
6
+ import * as Option from "effect/Option";
7
+ import type * as FunctionSpec from "./FunctionSpec";
8
+ import type * as RuntimeAndFunctionType from "./RuntimeAndFunctionType";
9
+ export interface Ref<_RuntimeAndFunctionType extends RuntimeAndFunctionType.RuntimeAndFunctionType, _FunctionVisibility extends FunctionVisibility, _Args, _Returns, _Error = never> {
10
+ readonly _RuntimeAndFunctionType?: _RuntimeAndFunctionType;
11
+ readonly _FunctionVisibility?: _FunctionVisibility;
12
+ readonly _Args?: _Args;
13
+ readonly _Returns?: _Returns;
14
+ readonly _Error?: _Error;
12
15
  }
13
- interface Ref<_RuntimeAndFunctionType extends RuntimeAndFunctionType, _FunctionVisibility extends FunctionVisibility, _Args, _Returns, _Error = never> {
14
- readonly _RuntimeAndFunctionType?: _RuntimeAndFunctionType;
15
- readonly _FunctionVisibility?: _FunctionVisibility;
16
- readonly _Args?: _Args;
17
- readonly _Returns?: _Returns;
18
- readonly _Error?: _Error;
16
+ export interface Any extends Ref<any, any, any, any, any> {
19
17
  }
20
- interface Any extends Ref<any, any, any, any, any> {}
21
- interface AnyInternal extends Ref<any, "internal", any, any, any> {}
22
- interface AnyPublic extends Ref<any, "public", any, any, any> {}
23
- interface AnyQuery extends Ref<AnyQuery$1, FunctionVisibility, any, any, any> {}
24
- interface AnyMutation extends Ref<AnyMutation$1, FunctionVisibility, any, any, any> {}
25
- interface AnyAction extends Ref<AnyAction$1, FunctionVisibility, any, any, any> {}
26
- interface AnyPublicQuery extends Ref<AnyQuery$1, "public", any, any, any> {}
27
- interface AnyPublicMutation extends Ref<AnyMutation$1, "public", any, any, any> {}
28
- interface AnyPublicAction extends Ref<AnyAction$1, "public", any, any, any> {}
29
- type GetRuntimeAndFunctionType<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? RuntimeAndFunctionType_ : never;
30
- type GetRuntime<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? GetRuntime$1<RuntimeAndFunctionType_> : never;
31
- type GetFunctionType<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? GetFunctionType$1<RuntimeAndFunctionType_> : never;
32
- type GetFunctionVisibility<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer FunctionVisibility_, infer _Args, infer _Returns, infer _Error> ? FunctionVisibility_ : never;
33
- type Args<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer Args_, infer _Returns, infer _Error> ? Args_ : never;
34
- type OptionalArgs<Ref_ extends Any> = keyof Args<Ref_> extends never ? [args?: Args<Ref_>] : [args: Args<Ref_>];
35
- type Returns<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer _Args, infer Returns_, infer _Error> ? Returns_ : never;
36
- type Error<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer _Args, infer _Returns, infer Error_> ? Error_ : never;
37
- type FunctionReference<Ref_ extends Any> = FunctionReference$1<GetFunctionType<Ref_>, GetFunctionVisibility<Ref_>>;
38
- type FromFunctionSpec<FunctionSpec_ extends AnyWithProps> = Ref<GetRuntimeAndFunctionType$1<FunctionSpec_>, GetFunctionVisibility$1<FunctionSpec_>, Args$1<FunctionSpec_>, Returns$1<FunctionSpec_>, Error$1<FunctionSpec_>>;
39
- declare const make: <FunctionSpec_ extends AnyWithProps>(
18
+ export interface AnyInternal extends Ref<any, "internal", any, any, any> {
19
+ }
20
+ export interface AnyPublic extends Ref<any, "public", any, any, any> {
21
+ }
22
+ export interface AnyQuery extends Ref<RuntimeAndFunctionType.AnyQuery, FunctionVisibility, any, any, any> {
23
+ }
24
+ export interface AnyMutation extends Ref<RuntimeAndFunctionType.AnyMutation, FunctionVisibility, any, any, any> {
25
+ }
26
+ export interface AnyAction extends Ref<RuntimeAndFunctionType.AnyAction, FunctionVisibility, any, any, any> {
27
+ }
28
+ export interface AnyPublicQuery extends Ref<RuntimeAndFunctionType.AnyQuery, "public", any, any, any> {
29
+ }
30
+ export interface AnyPublicMutation extends Ref<RuntimeAndFunctionType.AnyMutation, "public", any, any, any> {
31
+ }
32
+ export interface AnyPublicAction extends Ref<RuntimeAndFunctionType.AnyAction, "public", any, any, any> {
33
+ }
34
+ export type GetRuntimeAndFunctionType<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? RuntimeAndFunctionType_ : never;
35
+ export type GetRuntime<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? RuntimeAndFunctionType.GetRuntime<RuntimeAndFunctionType_> : never;
36
+ export type GetFunctionType<Ref_> = Ref_ extends Ref<infer RuntimeAndFunctionType_, infer _FunctionVisibility, infer _Args, infer _Returns, infer _Error> ? RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> : never;
37
+ export type GetFunctionVisibility<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer FunctionVisibility_, infer _Args, infer _Returns, infer _Error> ? FunctionVisibility_ : never;
38
+ export type Args<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer Args_, infer _Returns, infer _Error> ? Args_ : never;
39
+ export type OptionalArgs<Ref_ extends Any> = keyof Args<Ref_> extends never ? [args?: Args<Ref_>] : [args: Args<Ref_>];
40
+ export type Returns<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer _Args, infer Returns_, infer _Error> ? Returns_ : never;
41
+ export type Error<Ref_> = Ref_ extends Ref<infer _RuntimeAndFunctionType, infer _FunctionVisibility, infer _Args, infer _Returns, infer Error_> ? Error_ : never;
42
+ export type FunctionReference<Ref_ extends Any> = ConvexFunctionReference<GetFunctionType<Ref_>, GetFunctionVisibility<Ref_>>;
43
+ export type FromFunctionSpec<FunctionSpec_ extends FunctionSpec.AnyWithProps> = Ref<FunctionSpec.GetRuntimeAndFunctionType<FunctionSpec_>, FunctionSpec.GetFunctionVisibility<FunctionSpec_>, FunctionSpec.Args<FunctionSpec_>, FunctionSpec.Returns<FunctionSpec_>, FunctionSpec.Error<FunctionSpec_>>;
44
+ export declare const make: <FunctionSpec_ extends FunctionSpec.AnyWithProps>(
40
45
  /**
41
46
  * The namespace portion of a Convex function name, i.e. the part before the
42
47
  * colon. For example, for `myGroupDir/myGroupMod:myFunc` this would be
43
48
  * `myGroupDir/myGroupMod`.
44
49
  */
45
-
46
50
  functionNamespace: string, functionSpec: FunctionSpec_) => FromFunctionSpec<FunctionSpec_>;
47
- declare const getConvexFunctionName: (ref: Any) => string;
48
- declare const getFunctionReference: <Ref_ extends Any>(ref: Ref_) => FunctionReference<Ref_>;
49
- declare const hasErrorSchema: (ref: Any) => boolean;
50
- declare const encodeArgs: <Ref_ extends Any>(ref: Ref_, args: Args<Ref_>) => Effect.Effect<unknown, ParseResult.ParseError>;
51
- declare const decodeReturns: <Ref_ extends Any>(ref: Ref_, returns: unknown) => Effect.Effect<Returns<Ref_>, ParseResult.ParseError>;
52
- declare const encodeArgsSync: <Ref_ extends Any>(ref: Ref_, args: Args<Ref_>) => unknown;
53
- declare const decodeReturnsSync: <Ref_ extends Any>(ref: Ref_, encodedReturns: unknown) => Returns<Ref_>;
54
- declare const isConvexError: (error: unknown) => error is ConvexError<Value>;
51
+ export declare const getConvexFunctionName: (ref: Any) => string;
52
+ export declare const getFunctionReference: <Ref_ extends Any>(ref: Ref_) => FunctionReference<Ref_>;
53
+ export declare const hasErrorSchema: (ref: Any) => boolean;
54
+ export declare const encodeArgs: <Ref_ extends Any>(ref: Ref_, args: Args<Ref_>) => Effect.Effect<unknown, ParseResult.ParseError>;
55
+ export declare const decodeReturns: <Ref_ extends Any>(ref: Ref_, returns: unknown) => Effect.Effect<Returns<Ref_>, ParseResult.ParseError>;
56
+ export declare const encodeArgsSync: <Ref_ extends Any>(ref: Ref_, args: Args<Ref_>) => unknown;
57
+ export declare const decodeReturnsSync: <Ref_ extends Any>(ref: Ref_, encodedReturns: unknown) => Returns<Ref_>;
58
+ export declare const isConvexError: (error: unknown) => error is ConvexError<Value>;
55
59
  /**
56
60
  * Build a callback-style handler that decodes the ref's typed error from a
57
61
  * caught `ConvexError`, or else forwards the value to `mapUnknownError`. The
@@ -61,7 +65,7 @@ declare const isConvexError: (error: unknown) => error is ConvexError<Value>;
61
65
  * emitter callbacks for streamed subscriptions) to the same error semantics
62
66
  * that `runWithCodec` provides.
63
67
  */
64
- declare const decodeErrorOrElse: <Ref_ extends Any, E>(ref: Ref_, mapUnknownError: (error: unknown) => E) => (error: unknown) => Error<Ref_> | E;
68
+ export declare const decodeErrorOrElse: <Ref_ extends Any, E>(ref: Ref_, mapUnknownError: (error: unknown) => E) => (error: unknown) => Error<Ref_> | E;
65
69
  /**
66
70
  * Decode `encodedError` against the ref's error schema. Returns `None` if the
67
71
  * ref doesn't declare a typed error (Confect ref without an `error` schema, or
@@ -69,13 +73,13 @@ declare const decodeErrorOrElse: <Ref_ extends Any, E>(ref: Ref_, mapUnknownErro
69
73
  * into, and the caller is responsible for deciding what to do (typically:
70
74
  * surface the original value as a defect).
71
75
  */
72
- declare const decodeError: <Ref_ extends Any>(ref: Ref_, encodedError: unknown) => Effect.Effect<Option$1.Option<Error<Ref_>>, ParseResult.ParseError>;
76
+ export declare const decodeError: <Ref_ extends Any>(ref: Ref_, encodedError: unknown) => Effect.Effect<Option.Option<Error<Ref_>>, ParseResult.ParseError>;
73
77
  /**
74
78
  * Synchronous counterpart to `decodeError`. Throws on schema decode failure;
75
79
  * returns `None` when the ref doesn't declare a typed error.
76
80
  */
77
- declare const decodeErrorSync: <Ref_ extends Any>(ref: Ref_, encodedError: unknown) => Option$1.Option<Error<Ref_>>;
78
- declare const maybeDecodeErrorSync: <Ref_ extends Any>(ref: Ref_, error: unknown) => unknown;
81
+ export declare const decodeErrorSync: <Ref_ extends Any>(ref: Ref_, encodedError: unknown) => Option.Option<Error<Ref_>>;
82
+ export declare const maybeDecodeErrorSync: <Ref_ extends Any>(ref: Ref_, error: unknown) => unknown;
79
83
  /**
80
84
  * Encode args via the ref's args schema, invoke `call`, decode returns via the
81
85
  * ref's returns schema, and translate any thrown `ConvexError` into the ref's
@@ -84,7 +88,5 @@ declare const maybeDecodeErrorSync: <Ref_ extends Any>(ref: Ref_, error: unknown
84
88
  * `mapUnknownError` to be turned into a typed `E`, or surfaced as a defect when
85
89
  * no handler is provided.
86
90
  */
87
- declare const runWithCodec: <Ref_ extends Any, E = never>(ref: Ref_, args: Args<Ref_>, call: (functionReference: FunctionReference<Ref_>, encodedArgs: unknown) => PromiseLike<unknown>, mapUnknownError?: (error: unknown) => E) => Effect.Effect<Returns<Ref_>, E | Error<Ref_> | ParseResult.ParseError>;
88
- //#endregion
89
- export { Any, AnyAction, AnyInternal, AnyMutation, AnyPublic, AnyPublicAction, AnyPublicMutation, AnyPublicQuery, AnyQuery, Args, Error, FromFunctionSpec, FunctionReference, GetFunctionType, GetFunctionVisibility, GetRuntime, GetRuntimeAndFunctionType, OptionalArgs, Ref, Ref_d_exports, Returns, decodeError, decodeErrorOrElse, decodeErrorSync, decodeReturns, decodeReturnsSync, encodeArgs, encodeArgsSync, getConvexFunctionName, getFunctionReference, hasErrorSchema, isConvexError, make, maybeDecodeErrorSync, runWithCodec };
91
+ export declare const runWithCodec: <Ref_ extends Any, E = never>(ref: Ref_, args: Args<Ref_>, call: (functionReference: FunctionReference<Ref_>, encodedArgs: unknown) => PromiseLike<unknown>, mapUnknownError?: (error: unknown) => E) => Effect.Effect<Returns<Ref_>, E | Error<Ref_> | ParseResult.ParseError>;
90
92
  //# sourceMappingURL=Ref.d.ts.map
package/dist/Ref.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Ref.d.ts","names":[],"sources":["../src/Ref.ts"],"mappings":";;;;;;;;;;;;UAeiB,GAAA,iCACiB,sBAAA,8BACJ,kBAAA;EAAA,SAKnB,uBAAA,GAA0B,uBAAA;EAAA,SAC1B,mBAAA,GAAsB,mBAAA;EAAA,SACtB,KAAA,GAAQ,KAAA;EAAA,SACR,QAAA,GAAW,QAAA;EAAA,SACX,MAAA,GAAS,MAAA;AAAA;AAAA,UAOH,GAAA,SAAY,GAAA;AAAA,UAEZ,WAAA,SAAoB,GAAA;AAAA,UAEpB,SAAA,SAAkB,GAAA;AAAA,U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;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,GAAG,EAAE,CAAC,GAAG,KAAK,EACtD,KAAK,IAAI,EACT,MAAM,IAAI,CAAC,IAAI,CAAC,EAChB,MAAM,CACJ,iBAAiB,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAC1C,WAAW,EAAE,OAAO,KACjB,WAAW,CAAC,OAAO,CAAC,EACzB,kBAAkB,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,KACtC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,UAAU,CAqCpE,CAAC"}
package/dist/Refs.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { AnyWithProps, GetFunctionVisibility, GetRuntimeAndFunctionType, Name as Name$1, WithName } from "./FunctionSpec.js";
2
- import { AnyWithProps as AnyWithProps$1, Functions, Groups, Name as Name$2, WithName as WithName$1 } from "./GroupSpec.js";
3
- import { Any, AnyInternal, AnyPublic, FromFunctionSpec, Ref } from "./Ref.js";
4
- import { AnyWithProps as AnyWithProps$2, Groups as Groups$1 } from "./Spec.js";
5
- import { Types } from "effect";
6
-
7
- //#region src/Refs.d.ts
8
- declare namespace Refs_d_exports {
9
- export { Refs, make };
10
- }
11
- type Refs<Spec_ extends AnyWithProps$2, Predicate extends Any = Any> = Types.Simplify<OmitEmpty<Helper<Groups$1<Spec_>, Predicate>>>;
12
- type GroupRefs<Group extends AnyWithProps$1, Predicate extends Any> = Types.Simplify<OmitEmpty<Helper<Groups<Group>, Predicate>> & FilteredFunctions<Functions<Group>, Predicate>>;
13
- type OmitEmpty<T> = { [K in keyof T as keyof T[K] extends never ? never : K]: T[K] };
14
- type FunctionSpecMatchesPredicate<FunctionSpec_ extends AnyWithProps, Predicate extends Any> = Ref<GetRuntimeAndFunctionType<FunctionSpec_>, GetFunctionVisibility<FunctionSpec_>, any, any> extends Predicate ? true : false;
15
- type FilteredFunctions<FunctionSpecs extends AnyWithProps, Predicate extends Any> = { [Name in Name$1<FunctionSpecs> as WithName<FunctionSpecs, Name> extends infer FunctionSpec_ extends AnyWithProps ? FunctionSpecMatchesPredicate<FunctionSpec_, Predicate> extends true ? Name : never : never]: WithName<FunctionSpecs, Name> extends infer F extends AnyWithProps ? FromFunctionSpec<F> : never };
16
- type Helper<Groups extends AnyWithProps$1, Predicate extends Any> = { [GroupName in Name$2<Groups>]: WithName$1<Groups, GroupName> extends infer Group extends AnyWithProps$1 ? GroupRefs<Group, Predicate> : never };
17
- declare const make: <Spec_ extends AnyWithProps$2>(spec: Spec_) => {
18
- public: Refs<Spec_, AnyPublic>;
19
- internal: Refs<Spec_, AnyInternal>;
1
+ import type { Types } from "effect";
2
+ import type * as FunctionSpec from "./FunctionSpec";
3
+ import type * as GroupSpec from "./GroupSpec";
4
+ import * as Ref from "./Ref";
5
+ import type * as Spec from "./Spec";
6
+ export type Refs<Spec_ extends Spec.AnyWithProps, Predicate extends Ref.Any = Ref.Any> = Types.Simplify<OmitEmpty<Helper<Spec.Groups<Spec_>, Predicate>>>;
7
+ type GroupRefs<Group extends GroupSpec.AnyWithProps, Predicate extends Ref.Any> = Types.Simplify<OmitEmpty<Helper<GroupSpec.Groups<Group>, Predicate>> & FilteredFunctions<GroupSpec.Functions<Group>, Predicate>>;
8
+ type OmitEmpty<T> = {
9
+ [K in keyof T as keyof T[K] extends never ? never : K]: T[K];
20
10
  };
21
- //#endregion
22
- export { Refs, Refs_d_exports, make };
11
+ type FunctionSpecMatchesPredicate<FunctionSpec_ extends FunctionSpec.AnyWithProps, Predicate extends Ref.Any> = Ref.Ref<FunctionSpec.GetRuntimeAndFunctionType<FunctionSpec_>, FunctionSpec.GetFunctionVisibility<FunctionSpec_>, any, any> extends Predicate ? true : false;
12
+ type FilteredFunctions<FunctionSpecs extends FunctionSpec.AnyWithProps, Predicate extends Ref.Any> = {
13
+ [Name in FunctionSpec.Name<FunctionSpecs> as FunctionSpec.WithName<FunctionSpecs, Name> extends infer FunctionSpec_ extends FunctionSpec.AnyWithProps ? FunctionSpecMatchesPredicate<FunctionSpec_, Predicate> extends true ? Name : never : never]: FunctionSpec.WithName<FunctionSpecs, Name> extends infer F extends FunctionSpec.AnyWithProps ? Ref.FromFunctionSpec<F> : never;
14
+ };
15
+ type Helper<Groups extends GroupSpec.AnyWithProps, Predicate extends Ref.Any> = {
16
+ [GroupName in GroupSpec.Name<Groups>]: GroupSpec.WithName<Groups, GroupName> extends infer Group extends GroupSpec.AnyWithProps ? GroupRefs<Group, Predicate> : never;
17
+ };
18
+ export declare const make: <Spec_ extends Spec.AnyWithProps>(spec: Spec_) => {
19
+ public: Refs<Spec_, Ref.AnyPublic>;
20
+ internal: Refs<Spec_, Ref.AnyInternal>;
21
+ };
22
+ export {};
23
23
  //# sourceMappingURL=Refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Refs.d.ts","names":[],"sources":["../src/Refs.ts"],"mappings":";;;;;;;;;;KASY,IAAA,eACI,cAAA,oBACI,GAAA,GAAU,GAAA,IAC1B,KAAA,CAAM,QAAA,CAAS,SAAA,CAAU,MAAA,CAAO,QAAA,CAAY,KAAA,GAAQ,SAAA;AAAA,KAEnD,SAAA,eACW,cAAA,oBACI,GAAA,IAChB,KAAA,CAAM,QAAA,CACR,SAAA,CAAU,MAAA,CAAO,MAAA,CAAiB,KAAA,GAAQ,SAAA,KACxC,iBAAA,CAAkB,SAAA,CAAoB,KAAA,GAAQ,SAAA;AAAA,KAG7C,SAAA,oBACS,CAAA,UAAW,CAAA,CAAE,CAAA,0BAA2B,CAAA,GAAI,CAAA,CAAE,CAAA;AAAA,KAGvD,4BAAA,uBACmB,YAAA,oBACJ,GAAA,IAElB,GAAA,CACE,yBAAA,CAAuC,aAAA,GACvC,qBAAA,CAAmC,aAAA,qBAG3B,SAAA;AAAA,KAIP,iBAAA,uBACmB,YAAA,oBACJ,GAAA,eAET,MAAA,CAAkB,a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AC,MAAM,CAAC,GAAG,SAAS,CAAC,QAAQ,CACvD,MAAM,EACN,SAAS,CACV,SAAS,MAAM,KAAK,SAAS,SAAS,CAAC,YAAY,GAChD,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,GAC3B,KAAK;CACV,CAAC;AAQF,eAAO,MAAM,IAAI,GAAI,KAAK,SAAS,IAAI,CAAC,YAAY,EAClD,MAAM,KAAK,KACV;IACD,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CAOxC,CAAC"}
@@ -1,10 +1,5 @@
1
1
  import * as Context from "effect/Context";
2
2
  import * as Ref from "effect/Ref";
3
-
4
- //#region src/Registry.d.ts
5
- declare namespace Registry_d_exports {
6
- export { Registry, RegistryItems };
7
- }
8
3
  /**
9
4
  * Recursive tree that mirrors a `Spec`'s group structure. Leaves are the
10
5
  * per-function items written by each `FunctionImpl`'s layer initializer. The
@@ -13,8 +8,8 @@ declare namespace Registry_d_exports {
13
8
  * consumers (the server runtime and the CLI's `implValidation`) narrow as
14
9
  * needed.
15
10
  */
16
- interface RegistryItems {
17
- readonly [key: string]: unknown | RegistryItems;
11
+ export interface RegistryItems {
12
+ readonly [key: string]: unknown | RegistryItems;
18
13
  }
19
14
  declare const Registry_base: Context.ReferenceClass<Registry, "@confect/core/Registry", Ref.Ref<RegistryItems>>;
20
15
  /**
@@ -26,7 +21,7 @@ declare const Registry_base: Context.ReferenceClass<Registry, "@confect/core/Reg
26
21
  * Effect's global default-value cache to align two separately-defined tags
27
22
  * by string key.
28
23
  */
29
- declare class Registry extends Registry_base {}
30
- //#endregion
31
- export { Registry, RegistryItems, Registry_d_exports };
24
+ export declare class Registry extends Registry_base {
25
+ }
26
+ export {};
32
27
  //# sourceMappingURL=Registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Registry.d.ts","names":[],"sources":["../src/Registry.ts"],"mappings":";;;;;;;;;;;;;;AAWA;UAAiB,aAAA;EAAA,UACL,GAAA,qBAAwB,aAAA;AAAA;AAAA,cACnC,aAAA;AAAA;;;;;;;;;AAAA,cAWY,QAAA,SAAiB,aAAA"}
1
+ {"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../src/Registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,GAAG,MAAM,YAAY,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;CACjD;;AAED;;;;;;;;GAQG;AACH,qBAAa,QAAS,SAAQ,aAK7B;CAAG"}
@@ -1,54 +1,49 @@
1
- declare namespace RuntimeAndFunctionType_d_exports {
2
- export { AnyAction, AnyMutation, AnyQuery, ConvexAction, ConvexMutation, ConvexQuery, GetFunctionType, GetRuntime, NodeAction, Runtime, RuntimeAndFunctionType, WithRuntime };
3
- }
4
- type RuntimeAndFunctionType = {
5
- readonly runtime: "Convex";
6
- readonly functionType: "query";
1
+ export type RuntimeAndFunctionType = {
2
+ readonly runtime: "Convex";
3
+ readonly functionType: "query";
7
4
  } | {
8
- readonly runtime: "Convex";
9
- readonly functionType: "mutation";
5
+ readonly runtime: "Convex";
6
+ readonly functionType: "mutation";
10
7
  } | {
11
- readonly runtime: "Convex";
12
- readonly functionType: "action";
8
+ readonly runtime: "Convex";
9
+ readonly functionType: "action";
13
10
  } | {
14
- readonly runtime: "Node";
15
- readonly functionType: "action";
11
+ readonly runtime: "Node";
12
+ readonly functionType: "action";
16
13
  };
17
- type Runtime = RuntimeAndFunctionType["runtime"];
18
- type AnyQuery = Extract<RuntimeAndFunctionType, {
19
- readonly functionType: "query";
14
+ export type Runtime = RuntimeAndFunctionType["runtime"];
15
+ export type AnyQuery = Extract<RuntimeAndFunctionType, {
16
+ readonly functionType: "query";
20
17
  }>;
21
- type AnyMutation = Extract<RuntimeAndFunctionType, {
22
- readonly functionType: "mutation";
18
+ export type AnyMutation = Extract<RuntimeAndFunctionType, {
19
+ readonly functionType: "mutation";
23
20
  }>;
24
- type AnyAction = Extract<RuntimeAndFunctionType, {
25
- readonly functionType: "action";
21
+ export type AnyAction = Extract<RuntimeAndFunctionType, {
22
+ readonly functionType: "action";
26
23
  }>;
27
- type WithRuntime<Runtime_ extends Runtime> = Extract<RuntimeAndFunctionType, {
28
- readonly runtime: Runtime_;
24
+ export type WithRuntime<Runtime_ extends Runtime> = Extract<RuntimeAndFunctionType, {
25
+ readonly runtime: Runtime_;
29
26
  }>;
30
- type GetRuntime<RuntimeAndFunctionType_ extends RuntimeAndFunctionType> = RuntimeAndFunctionType_["runtime"];
31
- type GetFunctionType<RuntimeAndFunctionType_ extends RuntimeAndFunctionType> = RuntimeAndFunctionType_["functionType"];
32
- declare const ConvexQuery: {
33
- readonly runtime: "Convex";
34
- readonly functionType: "query";
27
+ export type GetRuntime<RuntimeAndFunctionType_ extends RuntimeAndFunctionType> = RuntimeAndFunctionType_["runtime"];
28
+ export type GetFunctionType<RuntimeAndFunctionType_ extends RuntimeAndFunctionType> = RuntimeAndFunctionType_["functionType"];
29
+ export declare const ConvexQuery: {
30
+ readonly runtime: "Convex";
31
+ readonly functionType: "query";
35
32
  };
36
- type ConvexQuery = typeof ConvexQuery;
37
- declare const ConvexMutation: {
38
- readonly runtime: "Convex";
39
- readonly functionType: "mutation";
33
+ export type ConvexQuery = typeof ConvexQuery;
34
+ export declare const ConvexMutation: {
35
+ readonly runtime: "Convex";
36
+ readonly functionType: "mutation";
40
37
  };
41
- type ConvexMutation = typeof ConvexMutation;
42
- declare const ConvexAction: {
43
- readonly runtime: "Convex";
44
- readonly functionType: "action";
38
+ export type ConvexMutation = typeof ConvexMutation;
39
+ export declare const ConvexAction: {
40
+ readonly runtime: "Convex";
41
+ readonly functionType: "action";
45
42
  };
46
- type ConvexAction = typeof ConvexAction;
47
- declare const NodeAction: {
48
- readonly runtime: "Node";
49
- readonly functionType: "action";
43
+ export type ConvexAction = typeof ConvexAction;
44
+ export declare const NodeAction: {
45
+ readonly runtime: "Node";
46
+ readonly functionType: "action";
50
47
  };
51
- type NodeAction = typeof NodeAction;
52
- //#endregion
53
- export { AnyAction, AnyMutation, AnyQuery, ConvexAction, ConvexMutation, ConvexQuery, GetFunctionType, GetRuntime, NodeAction, Runtime, RuntimeAndFunctionType, RuntimeAndFunctionType_d_exports, WithRuntime };
48
+ export type NodeAction = typeof NodeAction;
54
49
  //# sourceMappingURL=RuntimeAndFunctionType.d.ts.map