@confect/server 9.0.0-next.8 → 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.
- package/CHANGELOG.md +182 -4
- package/dist/ActionCtx.d.ts +3 -10
- package/dist/ActionCtx.d.ts.map +1 -1
- package/dist/ActionRunner.d.ts +7 -14
- package/dist/ActionRunner.d.ts.map +1 -1
- package/dist/Auth.d.ts +15 -23
- package/dist/Auth.d.ts.map +1 -1
- package/dist/BlobNotFoundError.d.ts +5 -11
- package/dist/BlobNotFoundError.d.ts.map +1 -1
- package/dist/ConvexConfigProvider.d.ts +1 -8
- package/dist/ConvexConfigProvider.d.ts.map +1 -1
- package/dist/CronJob.d.ts +12 -19
- package/dist/CronJob.d.ts.map +1 -1
- package/dist/CronJobs.d.ts +11 -18
- package/dist/CronJobs.d.ts.map +1 -1
- package/dist/DataModel.d.ts +24 -29
- package/dist/DataModel.d.ts.map +1 -1
- package/dist/DatabaseReader.d.ts +4313 -4328
- package/dist/DatabaseReader.d.ts.map +1 -1
- package/dist/DatabaseSchema.d.ts +20 -25
- package/dist/DatabaseSchema.d.ts.map +1 -1
- package/dist/DatabaseSchema.js.map +1 -1
- package/dist/DatabaseWriter.d.ts +36 -42
- package/dist/DatabaseWriter.d.ts.map +1 -1
- package/dist/Document.d.ts +26 -36
- package/dist/Document.d.ts.map +1 -1
- package/dist/FunctionImpl.d.ts +11 -20
- package/dist/FunctionImpl.d.ts.map +1 -1
- package/dist/GroupImpl.d.ts +29 -35
- package/dist/GroupImpl.d.ts.map +1 -1
- package/dist/Handler.d.ts +34 -40
- package/dist/Handler.d.ts.map +1 -1
- package/dist/HttpApi.d.ts +19 -25
- package/dist/HttpApi.d.ts.map +1 -1
- package/dist/HttpApi.js +4 -4
- package/dist/HttpApi.js.map +1 -1
- package/dist/MutationCtx.d.ts +3 -10
- package/dist/MutationCtx.d.ts.map +1 -1
- package/dist/MutationRunner.d.ts +7 -14
- package/dist/MutationRunner.d.ts.map +1 -1
- package/dist/OrderedQuery.d.ts +15 -22
- package/dist/OrderedQuery.d.ts.map +1 -1
- package/dist/QueryCtx.d.ts +3 -10
- package/dist/QueryCtx.d.ts.map +1 -1
- package/dist/QueryInitializer.d.ts +32 -38
- package/dist/QueryInitializer.d.ts.map +1 -1
- package/dist/QueryRunner.d.ts +7 -14
- package/dist/QueryRunner.d.ts.map +1 -1
- package/dist/RegisteredConvexFunction.d.ts +1099 -1121
- package/dist/RegisteredConvexFunction.d.ts.map +1 -1
- package/dist/RegisteredConvexFunction.js +4 -4
- package/dist/RegisteredConvexFunction.js.map +1 -1
- package/dist/RegisteredFunction.d.ts +46 -64
- package/dist/RegisteredFunction.d.ts.map +1 -1
- package/dist/RegisteredFunction.js +4 -4
- package/dist/RegisteredFunction.js.map +1 -1
- package/dist/RegisteredFunctions.d.ts +20 -22
- package/dist/RegisteredFunctions.d.ts.map +1 -1
- package/dist/RegisteredNodeFunction.d.ts +4 -14
- package/dist/RegisteredNodeFunction.d.ts.map +1 -1
- package/dist/RegistryItem.d.ts +17 -27
- package/dist/RegistryItem.d.ts.map +1 -1
- package/dist/Scheduler.d.ts +14 -22
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/SchemaToValidator.d.ts +68 -64
- package/dist/SchemaToValidator.d.ts.map +1 -1
- package/dist/SchemaToValidator.js +2 -2
- package/dist/SchemaToValidator.js.map +1 -1
- package/dist/StorageActionWriter.d.ts +20 -28
- package/dist/StorageActionWriter.d.ts.map +1 -1
- package/dist/StorageReader.d.ts +13 -21
- package/dist/StorageReader.d.ts.map +1 -1
- package/dist/StorageWriter.d.ts +15 -23
- package/dist/StorageWriter.d.ts.map +1 -1
- package/dist/Table.d.ts +202 -203
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/Table.js.map +1 -1
- package/dist/TableInfo.d.ts +35 -41
- package/dist/TableInfo.d.ts.map +1 -1
- package/dist/VectorSearch.d.ts +28 -35
- package/dist/VectorSearch.d.ts.map +1 -1
- package/dist/index.d.ts +35 -35
- package/dist/index.d.ts.map +1 -0
- package/dist/internal/utils.d.ts +10 -13
- package/dist/internal/utils.d.ts.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.d.ts.map +1 -0
- package/dist/tsconfig.src.tsbuildinfo +1 -0
- package/package.json +4 -12
- package/src/DatabaseSchema.ts +1 -1
package/dist/Handler.d.ts
CHANGED
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type
|
|
28
|
-
type
|
|
29
|
-
type
|
|
30
|
-
type ConfectProvenanceQuery<DatabaseSchema_ extends AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyQuery>> = Base<FunctionSpec_, DatabaseReader<DatabaseSchema_> | Auth | StorageReader | QueryRunner | QueryCtx<ToConvex<FromSchema<DatabaseSchema_>>>>;
|
|
31
|
-
type ConfectProvenanceMutation<DatabaseSchema_ extends AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyMutation>> = Base<FunctionSpec_, DatabaseReader<DatabaseSchema_> | DatabaseWriter<DatabaseSchema_> | Auth | Scheduler | StorageReader | StorageWriter | QueryRunner | MutationRunner | MutationCtx<ToConvex<FromSchema<DatabaseSchema_>>>>;
|
|
32
|
-
type ActionServices<DatabaseSchema_ extends AnyWithProps> = Scheduler | Auth | StorageReader | StorageWriter | StorageActionWriter | QueryRunner | MutationRunner | ActionRunner | VectorSearch<FromSchema<DatabaseSchema_>> | ActionCtx<ToConvex<FromSchema<DatabaseSchema_>>>;
|
|
33
|
-
type ConvexRuntimeAction<DatabaseSchema_ extends AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyAction>> = Base<FunctionSpec_, ActionServices<DatabaseSchema_>>;
|
|
34
|
-
type NodeRuntimeAction<DatabaseSchema_ extends AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.NodeAction>> = Base<FunctionSpec_, ActionServices<DatabaseSchema_> | NodeContext.NodeContext>;
|
|
1
|
+
import type { FunctionSpec, RuntimeAndFunctionType } from "@confect/core";
|
|
2
|
+
import type * as FunctionProvenance from "@confect/core/FunctionProvenance";
|
|
3
|
+
import type { NodeContext } from "@effect/platform-node";
|
|
4
|
+
import type { Effect } from "effect";
|
|
5
|
+
import type * as ActionCtx from "./ActionCtx";
|
|
6
|
+
import type * as ActionRunner from "./ActionRunner";
|
|
7
|
+
import type * as Auth from "./Auth";
|
|
8
|
+
import type * as DatabaseReader from "./DatabaseReader";
|
|
9
|
+
import type * as DatabaseSchema from "./DatabaseSchema";
|
|
10
|
+
import type * as DatabaseWriter from "./DatabaseWriter";
|
|
11
|
+
import type * as DataModel from "./DataModel";
|
|
12
|
+
import type * as MutationCtx from "./MutationCtx";
|
|
13
|
+
import type * as MutationRunner from "./MutationRunner";
|
|
14
|
+
import type * as QueryCtx from "./QueryCtx";
|
|
15
|
+
import type * as QueryRunner from "./QueryRunner";
|
|
16
|
+
import type * as RegisteredFunction from "./RegisteredFunction";
|
|
17
|
+
import type * as Scheduler from "./Scheduler";
|
|
18
|
+
import type { StorageActionWriter } from "./StorageActionWriter";
|
|
19
|
+
import type { StorageReader } from "./StorageReader";
|
|
20
|
+
import type { StorageWriter } from "./StorageWriter";
|
|
21
|
+
import type * as VectorSearch from "./VectorSearch";
|
|
22
|
+
export type Handler<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithProps> = FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<FunctionSpec_, FunctionProvenance.AnyConvex> ? ConvexProvenanceHandler<FunctionSpec_> : FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<FunctionSpec_, FunctionProvenance.AnyConfect> ? ConfectProvenanceHandler<DatabaseSchema_, FunctionSpec_> : never;
|
|
23
|
+
type ConvexProvenanceHandler<FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConvex>> = RegisteredFunction.ConvexRegisteredFunction<FunctionSpec_>;
|
|
24
|
+
type ConfectProvenanceHandler<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConfect>> = FunctionSpec_ extends FunctionSpec.WithFunctionType<FunctionSpec_, "query"> ? ConfectProvenanceQuery<DatabaseSchema_, FunctionSpec_> : FunctionSpec_ extends FunctionSpec.WithFunctionType<FunctionSpec_, "mutation"> ? ConfectProvenanceMutation<DatabaseSchema_, FunctionSpec_> : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<FunctionSpec_, RuntimeAndFunctionType.ConvexAction> ? ConvexRuntimeAction<DatabaseSchema_, FunctionSpec_> : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<FunctionSpec_, RuntimeAndFunctionType.NodeAction> ? NodeRuntimeAction<DatabaseSchema_, FunctionSpec_> : never;
|
|
25
|
+
export type ConfectProvenanceQuery<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyQuery>> = Base<FunctionSpec_, DatabaseReader.DatabaseReader<DatabaseSchema_> | Auth.Auth | StorageReader | QueryRunner.QueryRunner | QueryCtx.QueryCtx<DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>>>;
|
|
26
|
+
export type ConfectProvenanceMutation<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyMutation>> = Base<FunctionSpec_, DatabaseReader.DatabaseReader<DatabaseSchema_> | DatabaseWriter.DatabaseWriter<DatabaseSchema_> | Auth.Auth | Scheduler.Scheduler | StorageReader | StorageWriter | QueryRunner.QueryRunner | MutationRunner.MutationRunner | MutationCtx.MutationCtx<DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>>>;
|
|
27
|
+
type ActionServices<DatabaseSchema_ extends DatabaseSchema.AnyWithProps> = Scheduler.Scheduler | Auth.Auth | StorageReader | StorageWriter | StorageActionWriter | QueryRunner.QueryRunner | MutationRunner.MutationRunner | ActionRunner.ActionRunner | VectorSearch.VectorSearch<DataModel.FromSchema<DatabaseSchema_>> | ActionCtx.ActionCtx<DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>>;
|
|
28
|
+
export type ConvexRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyAction>> = Base<FunctionSpec_, ActionServices<DatabaseSchema_>>;
|
|
29
|
+
export type NodeRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.NodeAction>> = Base<FunctionSpec_, ActionServices<DatabaseSchema_> | NodeContext.NodeContext>;
|
|
35
30
|
type Base<FunctionSpec_ extends FunctionSpec.AnyWithProps, R> = (args: FunctionSpec.Args<FunctionSpec_>) => Effect.Effect<FunctionSpec.Returns<FunctionSpec_>, FunctionSpec.Error<FunctionSpec_>, R>;
|
|
36
|
-
type Any = AnyConfectProvenance | AnyConvexProvenance;
|
|
37
|
-
type AnyConfectProvenance = Base<FunctionSpec.AnyConfect, any>;
|
|
38
|
-
type AnyConvexProvenance = Any
|
|
39
|
-
type WithName<DatabaseSchema_ extends AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithProps, FunctionName extends string> = Handler<DatabaseSchema_, FunctionSpec.WithName<FunctionSpec_, FunctionName>>;
|
|
40
|
-
|
|
41
|
-
export { Any, AnyConfectProvenance, AnyConvexProvenance, ConfectProvenanceMutation, ConfectProvenanceQuery, ConvexRuntimeAction, Handler, Handler_d_exports, NodeRuntimeAction, WithName };
|
|
31
|
+
export type Any = AnyConfectProvenance | AnyConvexProvenance;
|
|
32
|
+
export type AnyConfectProvenance = Base<FunctionSpec.AnyConfect, any>;
|
|
33
|
+
export type AnyConvexProvenance = RegisteredFunction.Any;
|
|
34
|
+
export type WithName<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithProps, FunctionName extends string> = Handler<DatabaseSchema_, FunctionSpec.WithName<FunctionSpec_, FunctionName>>;
|
|
35
|
+
export {};
|
|
42
36
|
//# sourceMappingURL=Handler.d.ts.map
|
package/dist/Handler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Handler.d.ts","
|
|
1
|
+
{"version":3,"file":"Handler.d.ts","sourceRoot":"","sources":["../src/Handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,KAAK,kBAAkB,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,KAAK,YAAY,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,KAAK,IAAI,MAAM,QAAQ,CAAC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,CAAC,aAAa,CAAC,EACnC,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,EACjC,CAAC,CACF,CAAC;AAEF,MAAM,MAAM,GAAG,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,GAAG,CAAC;AAEzD,MAAM,MAAM,QAAQ,CAClB,eAAe,SAAS,cAAc,CAAC,YAAY,EACnD,aAAa,SAAS,YAAY,CAAC,YAAY,EAC/C,YAAY,SAAS,MAAM,IACzB,OAAO,CACT,eAAe,EACf,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC,CACnD,CAAC"}
|
package/dist/HttpApi.d.ts
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Auth as Auth$1 } from "./Auth.js";
|
|
3
|
-
import { MutationRunner } from "./MutationRunner.js";
|
|
4
|
-
import { QueryRunner } from "./QueryRunner.js";
|
|
5
|
-
import { Scheduler as Scheduler$1 } from "./Scheduler.js";
|
|
6
|
-
import { StorageActionWriter as StorageActionWriter$1 } from "./StorageActionWriter.js";
|
|
7
|
-
import { StorageReader as StorageReader$1 } from "./StorageReader.js";
|
|
8
|
-
import { StorageWriter as StorageWriter$1 } from "./StorageWriter.js";
|
|
9
|
-
import { HttpRouter } from "convex/server";
|
|
10
|
-
import * as Layer from "effect/Layer";
|
|
1
|
+
import type { HttpApi, HttpApp, HttpRouter } from "@effect/platform";
|
|
11
2
|
import * as HttpApiBuilder from "@effect/platform/HttpApiBuilder";
|
|
12
3
|
import * as HttpApiScalar from "@effect/platform/HttpApiScalar";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
import { type HttpRouter as ConvexHttpRouter } from "convex/server";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as ActionRunner from "./ActionRunner";
|
|
7
|
+
import * as Auth from "./Auth";
|
|
8
|
+
import * as MutationRunner from "./MutationRunner";
|
|
9
|
+
import * as QueryRunner from "./QueryRunner";
|
|
10
|
+
import * as Scheduler from "./Scheduler";
|
|
11
|
+
import { StorageActionWriter } from "./StorageActionWriter";
|
|
12
|
+
import { StorageReader } from "./StorageReader";
|
|
13
|
+
import { StorageWriter } from "./StorageWriter";
|
|
14
|
+
type Middleware = (httpApp: HttpApp.Default) => HttpApp.Default<never, HttpApi.Api | HttpApiBuilder.Router | HttpRouter.HttpRouter.DefaultServices>;
|
|
15
|
+
export type HttpApi_ = {
|
|
16
|
+
apiLive: Layer.Layer<HttpApi.Api, never, QueryRunner.QueryRunner | MutationRunner.MutationRunner | ActionRunner.ActionRunner | Scheduler.Scheduler | Auth.Auth | StorageReader | StorageWriter | StorageActionWriter>;
|
|
17
|
+
middleware?: Middleware;
|
|
18
|
+
scalar?: HttpApiScalar.ScalarConfig;
|
|
24
19
|
};
|
|
25
|
-
type RoutePath = "/" | `/${string}/`;
|
|
20
|
+
export type RoutePath = "/" | `/${string}/`;
|
|
26
21
|
type HttpApis = Partial<Record<RoutePath, HttpApi_>>;
|
|
27
|
-
declare const make: (httpApis: HttpApis) =>
|
|
28
|
-
|
|
29
|
-
export { HttpApi_, HttpApi_d_exports, RoutePath, make };
|
|
22
|
+
export declare const make: (httpApis: HttpApis) => ConvexHttpRouter;
|
|
23
|
+
export {};
|
|
30
24
|
//# sourceMappingURL=HttpApi.d.ts.map
|
package/dist/HttpApi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApi.d.ts","
|
|
1
|
+
{"version":3,"file":"HttpApi.d.ts","sourceRoot":"","sources":["../src/HttpApi.ts"],"names":[],"mappings":"AAAA,OAAO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GAAG,GAAG,GAAG,IAAI,MAAM,GAAG,CAAC;AA8C5C,KAAK,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAErD,eAAO,MAAM,IAAI,GAAI,UAAU,QAAQ,KAAG,gBAiBzC,CAAC"}
|
package/dist/HttpApi.js
CHANGED
|
@@ -6,9 +6,9 @@ import { make as make$1 } from "./ConvexConfigProvider.js";
|
|
|
6
6
|
import { layer as layer$2 } from "./MutationRunner.js";
|
|
7
7
|
import { layer as layer$3 } from "./QueryRunner.js";
|
|
8
8
|
import { layer as layer$4 } from "./Scheduler.js";
|
|
9
|
-
import { StorageActionWriter
|
|
10
|
-
import { StorageReader
|
|
11
|
-
import { StorageWriter
|
|
9
|
+
import { StorageActionWriter } from "./StorageActionWriter.js";
|
|
10
|
+
import { StorageReader } from "./StorageReader.js";
|
|
11
|
+
import { StorageWriter } from "./StorageWriter.js";
|
|
12
12
|
import { ROUTABLE_HTTP_METHODS, httpActionGeneric, httpRouter } from "convex/server";
|
|
13
13
|
import * as Layer from "effect/Layer";
|
|
14
14
|
import { pipe } from "effect/Function";
|
|
@@ -21,7 +21,7 @@ import * as HttpServer from "@effect/platform/HttpServer";
|
|
|
21
21
|
//#region src/HttpApi.ts
|
|
22
22
|
var HttpApi_exports = /* @__PURE__ */ __exportAll({ make: () => make });
|
|
23
23
|
const makeHandler = ({ pathPrefix, apiLive, middleware, scalar }) => (ctx, request) => {
|
|
24
|
-
const ApiLive = apiLive.pipe(Layer.provide(Layer.mergeAll(layer$3(ctx.runQuery), layer$2(ctx.runMutation), layer(ctx.runAction), layer$4(ctx.scheduler), layer$1(ctx.auth), StorageReader
|
|
24
|
+
const ApiLive = apiLive.pipe(Layer.provide(Layer.mergeAll(layer$3(ctx.runQuery), layer$2(ctx.runMutation), layer(ctx.runAction), layer$4(ctx.scheduler), layer$1(ctx.auth), StorageReader.layer(ctx.storage), StorageWriter.layer(ctx.storage), StorageActionWriter.layer(ctx.storage), Layer.succeed(ActionCtx(), ctx))));
|
|
25
25
|
const ApiDocsLive = HttpApiScalar.layer({
|
|
26
26
|
path: `${pathPrefix}docs`,
|
|
27
27
|
scalar: {
|
package/dist/HttpApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApi.js","names":["QueryRunner.layer","MutationRunner.layer","ActionRunner.layer","Scheduler.layer","Auth.layer","
|
|
1
|
+
{"version":3,"file":"HttpApi.js","names":["QueryRunner.layer","MutationRunner.layer","ActionRunner.layer","Scheduler.layer","Auth.layer","ActionCtx.ActionCtx","ConvexConfigProvider.make"],"sources":["../src/HttpApi.ts"],"sourcesContent":["import type { HttpApi, HttpApp, HttpRouter } from \"@effect/platform\";\nimport * as HttpApiBuilder from \"@effect/platform/HttpApiBuilder\";\nimport * as HttpApiScalar from \"@effect/platform/HttpApiScalar\";\nimport * as HttpServer from \"@effect/platform/HttpServer\";\nimport {\n type HttpRouter as ConvexHttpRouter,\n type GenericActionCtx,\n type GenericDataModel,\n httpActionGeneric,\n httpRouter,\n ROUTABLE_HTTP_METHODS,\n type RouteSpecWithPathPrefix,\n} from \"convex/server\";\nimport { pipe } from \"effect/Function\";\nimport * as Array from \"effect/Array\";\nimport * as Layer from \"effect/Layer\";\nimport * as Record from \"effect/Record\";\nimport * as ActionCtx from \"./ActionCtx\";\nimport * as ActionRunner from \"./ActionRunner\";\nimport * as Auth from \"./Auth\";\nimport * as ConvexConfigProvider from \"./ConvexConfigProvider\";\nimport * as MutationRunner from \"./MutationRunner\";\nimport * as QueryRunner from \"./QueryRunner\";\nimport * as Scheduler from \"./Scheduler\";\nimport { StorageActionWriter } from \"./StorageActionWriter\";\nimport { StorageReader } from \"./StorageReader\";\nimport { StorageWriter } from \"./StorageWriter\";\n\ntype Middleware = (\n httpApp: HttpApp.Default,\n) => HttpApp.Default<\n never,\n HttpApi.Api | HttpApiBuilder.Router | HttpRouter.HttpRouter.DefaultServices\n>;\n\nconst makeHandler =\n <DataModel extends GenericDataModel>({\n pathPrefix,\n apiLive,\n middleware,\n scalar,\n }: {\n pathPrefix: RoutePath;\n apiLive: Layer.Layer<\n HttpApi.Api,\n never,\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | Scheduler.Scheduler\n | Auth.Auth\n | StorageReader\n | StorageWriter\n | StorageActionWriter\n | GenericActionCtx<DataModel>\n >;\n middleware?: Middleware;\n scalar?: HttpApiScalar.ScalarConfig;\n }) =>\n (ctx: GenericActionCtx<DataModel>, request: Request): Promise<Response> => {\n const ApiLive = apiLive.pipe(\n Layer.provide(\n Layer.mergeAll(\n QueryRunner.layer(ctx.runQuery),\n MutationRunner.layer(ctx.runMutation),\n ActionRunner.layer(ctx.runAction),\n Scheduler.layer(ctx.scheduler),\n Auth.layer(ctx.auth),\n StorageReader.layer(ctx.storage),\n StorageWriter.layer(ctx.storage),\n StorageActionWriter.layer(ctx.storage),\n Layer.succeed(ActionCtx.ActionCtx<DataModel>(), ctx),\n ),\n ),\n );\n\n const ApiDocsLive = HttpApiScalar.layer({\n path: `${pathPrefix}docs`,\n scalar: {\n baseServerURL: `${process.env[\"CONVEX_SITE_URL\"]}${pathPrefix}`,\n ...scalar,\n },\n }).pipe(Layer.provide(ApiLive));\n\n const EnvLive = Layer.mergeAll(\n ApiLive,\n ApiDocsLive,\n HttpServer.layerContext,\n Layer.setConfigProvider(ConvexConfigProvider.make()),\n );\n\n const { handler } = HttpApiBuilder.toWebHandler(\n EnvLive,\n middleware ? { middleware } : {},\n );\n\n return handler(request);\n };\n\nconst makeHttpAction = <DataModel extends GenericDataModel>({\n pathPrefix,\n apiLive,\n middleware,\n scalar,\n}: {\n pathPrefix: RoutePath;\n apiLive: Layer.Layer<\n HttpApi.Api,\n never,\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | Scheduler.Scheduler\n | Auth.Auth\n | StorageReader\n | StorageWriter\n | StorageActionWriter\n | GenericActionCtx<DataModel>\n >;\n middleware?: Middleware;\n scalar?: HttpApiScalar.ScalarConfig;\n}) =>\n httpActionGeneric(\n makeHandler<DataModel>({\n pathPrefix,\n apiLive,\n ...(middleware ? { middleware } : {}),\n ...(scalar ? { scalar } : {}),\n }) as unknown as (\n ctx: GenericActionCtx<GenericDataModel>,\n request: Request,\n ) => Promise<Response>,\n );\n\nexport type HttpApi_ = {\n apiLive: Layer.Layer<\n HttpApi.Api,\n never,\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | Scheduler.Scheduler\n | Auth.Auth\n | StorageReader\n | StorageWriter\n | StorageActionWriter\n >;\n middleware?: Middleware;\n scalar?: HttpApiScalar.ScalarConfig;\n};\n\nexport type RoutePath = \"/\" | `/${string}/`;\n\nconst mountEffectHttpApi =\n <DataModel extends GenericDataModel>({\n pathPrefix,\n apiLive,\n middleware,\n scalar,\n }: {\n pathPrefix: RoutePath;\n apiLive: Layer.Layer<\n HttpApi.Api,\n never,\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | Scheduler.Scheduler\n | Auth.Auth\n | StorageReader\n | StorageWriter\n | StorageActionWriter\n | GenericActionCtx<DataModel>\n >;\n middleware?: Middleware;\n scalar?: HttpApiScalar.ScalarConfig;\n }) =>\n (convexHttpRouter: ConvexHttpRouter): ConvexHttpRouter => {\n const handler = makeHttpAction<DataModel>({\n pathPrefix,\n apiLive,\n ...(middleware ? { middleware } : {}),\n ...(scalar ? { scalar } : {}),\n });\n\n Array.forEach(ROUTABLE_HTTP_METHODS, (method) => {\n const routeSpec: RouteSpecWithPathPrefix = {\n pathPrefix,\n method,\n handler,\n };\n convexHttpRouter.route(routeSpec);\n });\n\n return convexHttpRouter;\n };\n\ntype HttpApis = Partial<Record<RoutePath, HttpApi_>>;\n\nexport const make = (httpApis: HttpApis): ConvexHttpRouter => {\n applyMonkeyPatches();\n\n return pipe(\n httpApis as Record<RoutePath, HttpApi_>,\n Record.toEntries,\n Array.reduce(\n httpRouter(),\n (convexHttpRouter, [pathPrefix, { apiLive, middleware, scalar }]) =>\n mountEffectHttpApi({\n pathPrefix: pathPrefix as RoutePath,\n apiLive,\n ...(middleware ? { middleware } : {}),\n ...(scalar ? { scalar } : {}),\n })(convexHttpRouter),\n ),\n );\n};\n\nconst applyMonkeyPatches = () => {\n // These are necessary until the Convex runtime supports these APIs. See https://discord.com/channels/1019350475847499849/1281364098419785760\n\n // eslint-disable-next-line no-global-assign\n URL = class extends URL {\n override get username() {\n return \"\";\n }\n override get password() {\n return \"\";\n }\n };\n\n Object.defineProperty(Request.prototype, \"signal\", {\n get: () => new AbortSignal(),\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,eACiC,EACnC,YACA,SACA,YACA,cAmBD,KAAkC,YAAwC;CACzE,MAAM,UAAU,QAAQ,KACtB,MAAM,QACJ,MAAM,SACJA,QAAkB,IAAI,SAAS,EAC/BC,QAAqB,IAAI,YAAY,EACrCC,MAAmB,IAAI,UAAU,EACjCC,QAAgB,IAAI,UAAU,EAC9BC,QAAW,IAAI,KAAK,EACpB,cAAc,MAAM,IAAI,QAAQ,EAChC,cAAc,MAAM,IAAI,QAAQ,EAChC,oBAAoB,MAAM,IAAI,QAAQ,EACtC,MAAM,QAAQC,WAAgC,EAAE,IAAI,CACrD,CACF,CACF;CAED,MAAM,cAAc,cAAc,MAAM;EACtC,MAAM,GAAG,WAAW;EACpB,QAAQ;GACN,eAAe,GAAG,QAAQ,IAAI,qBAAqB;GACnD,GAAG;GACJ;EACF,CAAC,CAAC,KAAK,MAAM,QAAQ,QAAQ,CAAC;CAE/B,MAAM,UAAU,MAAM,SACpB,SACA,aACA,WAAW,cACX,MAAM,kBAAkBC,QAA2B,CAAC,CACrD;CAED,MAAM,EAAE,YAAY,eAAe,aACjC,SACA,aAAa,EAAE,YAAY,GAAG,EAAE,CACjC;AAED,QAAO,QAAQ,QAAQ;;AAG3B,MAAM,kBAAsD,EAC1D,YACA,SACA,YACA,aAmBA,kBACE,YAAuB;CACrB;CACA;CACA,GAAI,aAAa,EAAE,YAAY,GAAG,EAAE;CACpC,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;CAC7B,CAAC,CAIH;AAqBH,MAAM,sBACiC,EACnC,YACA,SACA,YACA,cAmBD,qBAAyD;CACxD,MAAM,UAAU,eAA0B;EACxC;EACA;EACA,GAAI,aAAa,EAAE,YAAY,GAAG,EAAE;EACpC,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;EAC7B,CAAC;AAEF,OAAM,QAAQ,wBAAwB,WAAW;EAC/C,MAAM,YAAqC;GACzC;GACA;GACA;GACD;AACD,mBAAiB,MAAM,UAAU;GACjC;AAEF,QAAO;;AAKX,MAAa,QAAQ,aAAyC;AAC5D,qBAAoB;AAEpB,QAAO,KACL,UACA,OAAO,WACP,MAAM,OACJ,YAAY,GACX,kBAAkB,CAAC,YAAY,EAAE,SAAS,YAAY,cACrD,mBAAmB;EACL;EACZ;EACA,GAAI,aAAa,EAAE,YAAY,GAAG,EAAE;EACpC,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;EAC7B,CAAC,CAAC,iBAAiB,CACvB,CACF;;AAGH,MAAM,2BAA2B;AAI/B,OAAM,cAAc,IAAI;EACtB,IAAa,WAAW;AACtB,UAAO;;EAET,IAAa,WAAW;AACtB,UAAO;;;AAIX,QAAO,eAAe,QAAQ,WAAW,UAAU,EACjD,WAAW,IAAI,aAAa,EAC7B,CAAC"}
|
package/dist/MutationCtx.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
+
import type { GenericDataModel, GenericMutationCtx } from "convex/server";
|
|
1
2
|
import * as Context from "effect/Context";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/MutationCtx.d.ts
|
|
5
|
-
declare namespace MutationCtx_d_exports {
|
|
6
|
-
export { MutationCtx };
|
|
7
|
-
}
|
|
8
|
-
declare const MutationCtx: <DataModel extends GenericDataModel>() => Context.Tag<GenericMutationCtx<DataModel>, GenericMutationCtx<DataModel>>;
|
|
9
|
-
type MutationCtx<DataModel extends GenericDataModel> = ReturnType<typeof MutationCtx<DataModel>>["Identifier"];
|
|
10
|
-
//#endregion
|
|
11
|
-
export { MutationCtx, MutationCtx_d_exports };
|
|
3
|
+
export declare const MutationCtx: <DataModel extends GenericDataModel>() => Context.Tag<GenericMutationCtx<DataModel>, GenericMutationCtx<DataModel>>;
|
|
4
|
+
export type MutationCtx<DataModel extends GenericDataModel> = ReturnType<typeof MutationCtx<DataModel>>["Identifier"];
|
|
12
5
|
//# sourceMappingURL=MutationCtx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutationCtx.d.ts","
|
|
1
|
+
{"version":3,"file":"MutationCtx.d.ts","sourceRoot":"","sources":["../src/MutationCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,eAAO,MAAM,WAAW,GAAI,SAAS,SAAS,gBAAgB,gFAG3D,CAAC;AAEJ,MAAM,MAAM,WAAW,CAAC,SAAS,SAAS,gBAAgB,IAAI,UAAU,CACtE,OAAO,WAAW,CAAC,SAAS,CAAC,CAC9B,CAAC,YAAY,CAAC,CAAC"}
|
package/dist/MutationRunner.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
1
|
import * as Ref from "@confect/core/Ref";
|
|
3
|
-
import { GenericMutationCtx } from "convex/server";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
declare const MutationRunner: Context.Tag<(<Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>), <Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>>;
|
|
12
|
-
type MutationRunner = typeof MutationRunner.Identifier;
|
|
13
|
-
declare const layer: (runMutation: GenericMutationCtx<any>["runMutation"]) => Layer$1.Layer<(<Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>), never, never>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { MutationRunner, MutationRunner_d_exports, layer };
|
|
2
|
+
import { type GenericMutationCtx } from "convex/server";
|
|
3
|
+
import type { ParseResult, Effect } from "effect";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
export declare const MutationRunner: Context.Tag<(<Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>), <Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>>;
|
|
7
|
+
export type MutationRunner = typeof MutationRunner.Identifier;
|
|
8
|
+
export declare const layer: (runMutation: GenericMutationCtx<any>["runMutation"]) => Layer.Layer<(<Mutation extends Ref.AnyMutation>(mutation: Mutation, ...args: Ref.OptionalArgs<Mutation>) => Effect.Effect<Ref.Returns<Mutation>, Ref.Error<Mutation> | ParseResult.ParseError>), never, never>;
|
|
16
9
|
//# sourceMappingURL=MutationRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutationRunner.d.ts","
|
|
1
|
+
{"version":3,"file":"Mutation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d.ts
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import * as Effect$1 from "effect/Effect";
|
|
1
|
+
import type { ExpressionOrValue, FilterBuilder, OrderedQuery as ConvexOrderedQuery, PaginationResult } from "convex/server";
|
|
2
|
+
import type { Option } from "effect";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
5
4
|
import * as Stream from "effect/Stream";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly paginate: (options: {
|
|
18
|
-
cursor: string | null;
|
|
19
|
-
numItems: number;
|
|
20
|
-
}, filter?: (q: FilterBuilder<ConvexTableInfo<TableInfo_>>) => ExpressionOrValue<boolean>) => Effect$1.Effect<PaginationResult<TableInfo_["document"]>, DocumentDecodeError>;
|
|
5
|
+
import * as Document from "./Document";
|
|
6
|
+
import type * as TableInfo from "./TableInfo";
|
|
7
|
+
export type OrderedQuery<TableInfo_ extends TableInfo.AnyWithProps, _TableName extends string> = {
|
|
8
|
+
readonly first: () => Effect.Effect<Option.Option<TableInfo_["document"]>, Document.DocumentDecodeError>;
|
|
9
|
+
readonly take: (n: number) => Effect.Effect<ReadonlyArray<TableInfo_["document"]>, Document.DocumentDecodeError>;
|
|
10
|
+
readonly collect: () => Effect.Effect<ReadonlyArray<TableInfo_["document"]>, Document.DocumentDecodeError>;
|
|
11
|
+
readonly stream: () => Stream.Stream<TableInfo_["document"], Document.DocumentDecodeError>;
|
|
12
|
+
readonly paginate: (options: {
|
|
13
|
+
cursor: string | null;
|
|
14
|
+
numItems: number;
|
|
15
|
+
}, filter?: (q: FilterBuilder<TableInfo.ConvexTableInfo<TableInfo_>>) => ExpressionOrValue<boolean>) => Effect.Effect<PaginationResult<TableInfo_["document"]>, Document.DocumentDecodeError>;
|
|
21
16
|
};
|
|
22
|
-
declare const make: <TableInfo_ extends AnyWithProps, TableName extends string>(query:
|
|
23
|
-
//#endregion
|
|
24
|
-
export { OrderedQuery, OrderedQuery_d_exports, make };
|
|
17
|
+
export declare const make: <TableInfo_ extends TableInfo.AnyWithProps, TableName extends string>(query: ConvexOrderedQuery<TableInfo.ConvexTableInfo<TableInfo_>>, tableName: TableName, tableSchema: TableInfo.TableSchema<TableInfo_>) => OrderedQuery<TableInfo_, TableName>;
|
|
25
18
|
//# sourceMappingURL=OrderedQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedQuery.d.ts","
|
|
1
|
+
{"version":3,"file":"OrderedQuery.d.ts","sourceRoot":"","sources":["../src/OrderedQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,YAAY,CACtB,UAAU,SAAS,SAAS,CAAC,YAAY,EACzC,UAAU,SAAS,MAAM,IACvB;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAC,MAAM,CACjC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,EACrC,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;IACF,QAAQ,CAAC,IAAI,EAAE,CACb,CAAC,EAAE,MAAM,KACN,MAAM,CAAC,MAAM,CAChB,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,EACrC,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,CACnC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,EACrC,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,CAClC,UAAU,CAAC,UAAU,CAAC,EACtB,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,CACjB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;KAClB,EACD,MAAM,CAAC,EAAE,CACP,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,KACpD,iBAAiB,CAAC,OAAO,CAAC,KAC5B,MAAM,CAAC,MAAM,CAChB,gBAAgB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,EACxC,QAAQ,CAAC,mBAAmB,CAC7B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,IAAI,GACf,UAAU,SAAS,SAAS,CAAC,YAAY,EACzC,SAAS,SAAS,MAAM,EAExB,OAAO,kBAAkB,CAAC,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAChE,WAAW,SAAS,EACpB,aAAa,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,KAC7C,YAAY,CAAC,UAAU,EAAE,SAAS,CAgEpC,CAAC"}
|
package/dist/QueryCtx.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
+
import type { GenericDataModel, GenericQueryCtx } from "convex/server";
|
|
1
2
|
import * as Context from "effect/Context";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/QueryCtx.d.ts
|
|
5
|
-
declare namespace QueryCtx_d_exports {
|
|
6
|
-
export { QueryCtx };
|
|
7
|
-
}
|
|
8
|
-
declare const QueryCtx: <DataModel extends GenericDataModel>() => Context.Tag<GenericQueryCtx<DataModel>, GenericQueryCtx<DataModel>>;
|
|
9
|
-
type QueryCtx<DataModel extends GenericDataModel> = ReturnType<typeof QueryCtx<DataModel>>["Identifier"];
|
|
10
|
-
//#endregion
|
|
11
|
-
export { QueryCtx, QueryCtx_d_exports };
|
|
3
|
+
export declare const QueryCtx: <DataModel extends GenericDataModel>() => Context.Tag<GenericQueryCtx<DataModel>, GenericQueryCtx<DataModel>>;
|
|
4
|
+
export type QueryCtx<DataModel extends GenericDataModel> = ReturnType<typeof QueryCtx<DataModel>>["Identifier"];
|
|
12
5
|
//# sourceMappingURL=QueryCtx.d.ts.map
|
package/dist/QueryCtx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryCtx.d.ts","
|
|
1
|
+
{"version":3,"file":"QueryCtx.d.ts","sourceRoot":"","sources":["../src/QueryCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,eAAO,MAAM,QAAQ,GAAI,SAAS,SAAS,gBAAgB,0EACiB,CAAC;AAE7E,MAAM,MAAM,QAAQ,CAAC,SAAS,SAAS,gBAAgB,IAAI,UAAU,CACnE,OAAO,QAAQ,CAAC,SAAS,CAAC,CAC3B,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AnyWithProps as AnyWithProps$1 } from "./TableInfo.js";
|
|
4
|
-
import { AnyWithProps as AnyWithProps$2, DataModel, FromTables, TableInfoWithName, TableInfoWithName_, TableNames, ToConvex } from "./DataModel.js";
|
|
5
|
-
import { OrderedQuery as OrderedQuery$1 } from "./OrderedQuery.js";
|
|
6
|
-
import { DocumentByInfo, GenericTableInfo, IndexRange, IndexRangeBuilder, Indexes, NamedIndex, NamedSearchIndex, SearchFilter, SearchFilterBuilder, SearchIndexes } from "convex/server";
|
|
1
|
+
import type { DocumentByInfo, GenericTableInfo, Indexes, IndexRange, IndexRangeBuilder, NamedIndex, NamedSearchIndex, SearchFilter, SearchFilterBuilder, SearchIndexes } from "convex/server";
|
|
2
|
+
import type { GenericId } from "convex/values";
|
|
7
3
|
import * as Effect from "effect/Effect";
|
|
8
4
|
import * as Schema from "effect/Schema";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly search: <IndexName extends keyof SearchIndexes<_ConvexTableInfo>>(indexName: IndexName, searchFilter: (q: SearchFilterBuilder<DocumentByInfo<_ConvexTableInfo>, NamedSearchIndex<_ConvexTableInfo, IndexName>>) => SearchFilter) => OrderedQuery$1<_TableInfo, TableName>;
|
|
5
|
+
import type { BaseDatabaseReader, IndexFieldTypesForEq } from "@confect/core/Types";
|
|
6
|
+
import type * as DataModel from "./DataModel";
|
|
7
|
+
import * as Document from "./Document";
|
|
8
|
+
import * as OrderedQuery from "./OrderedQuery";
|
|
9
|
+
import type * as Table from "./Table";
|
|
10
|
+
import type * as TableInfo from "./TableInfo";
|
|
11
|
+
type QueryInitializer<DataModel_ extends DataModel.AnyWithProps, TableName extends DataModel.TableNames<DataModel_>, _ConvexTableInfo extends GenericTableInfo, _TableInfo extends TableInfo.AnyWithProps> = {
|
|
12
|
+
readonly get: {
|
|
13
|
+
(id: GenericId<TableName>): Effect.Effect<_TableInfo["document"], Document.DocumentDecodeError | GetByIdFailure>;
|
|
14
|
+
<IndexName extends keyof Indexes<_ConvexTableInfo>>(indexName: IndexName, ...indexFieldValues: IndexFieldTypesForEq<DataModel.ToConvex<DataModel_>, TableName, Indexes<_ConvexTableInfo>[IndexName]>): Effect.Effect<_TableInfo["document"], Document.DocumentDecodeError | GetByIndexFailure>;
|
|
15
|
+
};
|
|
16
|
+
readonly index: {
|
|
17
|
+
<IndexName extends keyof Indexes<_ConvexTableInfo>>(indexName: IndexName, indexRange?: (q: IndexRangeBuilder<_TableInfo["convexDocument"], NamedIndex<_ConvexTableInfo, IndexName>>) => IndexRange, order?: "asc" | "desc"): OrderedQuery.OrderedQuery<_TableInfo, TableName>;
|
|
18
|
+
<IndexName extends keyof Indexes<_ConvexTableInfo>>(indexName: IndexName, order?: "asc" | "desc"): OrderedQuery.OrderedQuery<_TableInfo, TableName>;
|
|
19
|
+
};
|
|
20
|
+
readonly search: <IndexName extends keyof SearchIndexes<_ConvexTableInfo>>(indexName: IndexName, searchFilter: (q: SearchFilterBuilder<DocumentByInfo<_ConvexTableInfo>, NamedSearchIndex<_ConvexTableInfo, IndexName>>) => SearchFilter) => OrderedQuery.OrderedQuery<_TableInfo, TableName>;
|
|
26
21
|
};
|
|
27
|
-
declare const make: <Tables extends AnyWithProps, TableName extends Name<Tables>>(tableName: TableName, convexDatabaseReader: BaseDatabaseReader<ToConvex<FromTables<Tables>>>, table: WithName<Tables, TableName>) => QueryInitializer<DataModel<Tables>, TableName, TableInfoWithName<DataModel<Tables>, TableName>, TableInfoWithName_<DataModel<Tables>, TableName>>;
|
|
28
|
-
declare const getById: <Tables extends AnyWithProps, TableName extends Name<Tables>>(tableName: TableName, convexDatabaseReader: BaseDatabaseReader<ToConvex<FromTables<Tables>>>, table: WithName<Tables, TableName>) => (id: GenericId<TableName>) => Effect.Effect<any,
|
|
22
|
+
export declare const make: <Tables extends Table.AnyWithProps, TableName extends Table.Name<Tables>>(tableName: TableName, convexDatabaseReader: BaseDatabaseReader<DataModel.ToConvex<DataModel.FromTables<Tables>>>, table: Table.WithName<Tables, TableName>) => QueryInitializer<DataModel.DataModel<Tables>, TableName, DataModel.TableInfoWithName<DataModel.DataModel<Tables>, TableName>, DataModel.TableInfoWithName_<DataModel.DataModel<Tables>, TableName>>;
|
|
23
|
+
export declare const getById: <Tables extends Table.AnyWithProps, TableName extends Table.Name<Tables>>(tableName: TableName, convexDatabaseReader: BaseDatabaseReader<DataModel.ToConvex<DataModel.FromTables<Tables>>>, table: Table.WithName<Tables, TableName>) => (id: GenericId<TableName>) => Effect.Effect<any, Document.DocumentDecodeError | GetByIdFailure, never>;
|
|
29
24
|
declare const GetByIdFailure_base: Schema.TaggedErrorClass<GetByIdFailure, "GetByIdFailure", {
|
|
30
|
-
|
|
25
|
+
readonly _tag: Schema.tag<"GetByIdFailure">;
|
|
31
26
|
} & {
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
id: typeof Schema.String;
|
|
28
|
+
tableName: typeof Schema.String;
|
|
34
29
|
}>;
|
|
35
|
-
declare class GetByIdFailure extends GetByIdFailure_base {
|
|
36
|
-
|
|
30
|
+
export declare class GetByIdFailure extends GetByIdFailure_base {
|
|
31
|
+
get message(): string;
|
|
37
32
|
}
|
|
38
33
|
declare const GetByIndexFailure_base: Schema.TaggedErrorClass<GetByIndexFailure, "GetByIndexFailure", {
|
|
39
|
-
|
|
34
|
+
readonly _tag: Schema.tag<"GetByIndexFailure">;
|
|
40
35
|
} & {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
tableName: typeof Schema.String;
|
|
37
|
+
indexName: typeof Schema.String;
|
|
38
|
+
indexFieldValues: Schema.Array$<typeof Schema.String>;
|
|
44
39
|
}>;
|
|
45
|
-
declare class GetByIndexFailure extends GetByIndexFailure_base {
|
|
46
|
-
|
|
40
|
+
export declare class GetByIndexFailure extends GetByIndexFailure_base {
|
|
41
|
+
get message(): string;
|
|
47
42
|
}
|
|
48
|
-
|
|
49
|
-
export { GetByIdFailure, GetByIndexFailure, QueryInitializer_d_exports, getById, make };
|
|
43
|
+
export {};
|
|
50
44
|
//# sourceMappingURL=QueryInitializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryInitializer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Q,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CACjD,EACD,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,KACvC,gBAAgB,CACjB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAC3B,SAAS,EACT,SAAS,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,EACnE,SAAS,CAAC,kBAAkB,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAiLrE,CAAC;AAEF,eAAO,MAAM,OAAO,GACjB,MAAM,SAAS,KAAK,CAAC,YAAY,EAAE,SAAS,SAAS,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EACtE,WAAW,SAAS,EACpB,sBAAsB,kBAAkB,CACtC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CACjD,EACD,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAEzC,IAAI,SAAS,CAAC,SAAS,CAAC,6EAOtB,CAAC;;;;;;;AAEN,qBAAa,cAAe,SAAQ,mBAMnC;IACC,IAAa,OAAO,IAAI,MAAM,CAM7B;CACF;;;;;;;;AAED,qBAAa,iBAAkB,SAAQ,sBAOtC;IACC,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF"}
|
package/dist/QueryRunner.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
1
|
import * as Ref from "@confect/core/Ref";
|
|
3
|
-
import { GenericQueryCtx } from "convex/server";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
declare const QueryRunner: Context.Tag<(<Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>), <Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>>;
|
|
12
|
-
type QueryRunner = typeof QueryRunner.Identifier;
|
|
13
|
-
declare const layer: (runQuery: GenericQueryCtx<any>["runQuery"]) => Layer$1.Layer<(<Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>), never, never>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { QueryRunner, QueryRunner_d_exports, layer };
|
|
2
|
+
import { type GenericQueryCtx } from "convex/server";
|
|
3
|
+
import type { ParseResult, Effect } from "effect";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
export declare const QueryRunner: Context.Tag<(<Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>), <Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>>;
|
|
7
|
+
export type QueryRunner = typeof QueryRunner.Identifier;
|
|
8
|
+
export declare const layer: (runQuery: GenericQueryCtx<any>["runQuery"]) => Layer.Layer<(<Query extends Ref.AnyQuery>(query: Query, ...args: Ref.OptionalArgs<Query>) => Effect.Effect<Ref.Returns<Query>, Ref.Error<Query> | ParseResult.ParseError>), never, never>;
|
|
16
9
|
//# sourceMappingURL=QueryRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRunner.d.ts","
|
|
1
|
+
{"version":3,"file":"QueryRunner.d.ts","sourceRoot":"","sources":["../src/QueryRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,M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