@confect/server 1.0.0-next.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 +12 -0
- package/LICENSE +7 -0
- package/dist/ActionCtx.d.ts +12 -0
- package/dist/ActionCtx.d.ts.map +1 -0
- package/dist/ActionCtx.js +10 -0
- package/dist/ActionCtx.js.map +1 -0
- package/dist/ActionRunner.d.ts +15 -0
- package/dist/ActionRunner.d.ts.map +1 -0
- package/dist/ActionRunner.js +23 -0
- package/dist/ActionRunner.js.map +1 -0
- package/dist/Api.d.ts +27 -0
- package/dist/Api.d.ts.map +1 -0
- package/dist/Api.js +26 -0
- package/dist/Api.js.map +1 -0
- package/dist/Auth.d.ts +30 -0
- package/dist/Auth.d.ts.map +1 -0
- package/dist/Auth.js +24 -0
- package/dist/Auth.js.map +1 -0
- package/dist/DataModel.d.ts +33 -0
- package/dist/DataModel.d.ts.map +1 -0
- package/dist/DataModel.js +6 -0
- package/dist/DataModel.js.map +1 -0
- package/dist/DatabaseReader.d.ts +73 -0
- package/dist/DatabaseReader.d.ts.map +1 -0
- package/dist/DatabaseReader.js +32 -0
- package/dist/DatabaseReader.js.map +1 -0
- package/dist/DatabaseSchema.d.ts +139 -0
- package/dist/DatabaseSchema.d.ts.map +1 -0
- package/dist/DatabaseSchema.js +45 -0
- package/dist/DatabaseSchema.js.map +1 -0
- package/dist/DatabaseWriter.d.ts +39 -0
- package/dist/DatabaseWriter.d.ts.map +1 -0
- package/dist/DatabaseWriter.js +43 -0
- package/dist/DatabaseWriter.js.map +1 -0
- package/dist/Document.d.ts +47 -0
- package/dist/Document.d.ts.map +1 -0
- package/dist/Document.js +66 -0
- package/dist/Document.js.map +1 -0
- package/dist/FunctionImpl.d.ts +34 -0
- package/dist/FunctionImpl.d.ts.map +1 -0
- package/dist/FunctionImpl.js +35 -0
- package/dist/FunctionImpl.js.map +1 -0
- package/dist/GroupImpl.d.ts +24 -0
- package/dist/GroupImpl.d.ts.map +1 -0
- package/dist/GroupImpl.js +14 -0
- package/dist/GroupImpl.js.map +1 -0
- package/dist/Handler.d.ts +31 -0
- package/dist/Handler.d.ts.map +1 -0
- package/dist/Handler.js +6 -0
- package/dist/Handler.js.map +1 -0
- package/dist/HttpApi.d.ts +26 -0
- package/dist/HttpApi.d.ts.map +1 -0
- package/dist/HttpApi.js +74 -0
- package/dist/HttpApi.js.map +1 -0
- package/dist/Impl.d.ts +24 -0
- package/dist/Impl.d.ts.map +1 -0
- package/dist/Impl.js +28 -0
- package/dist/Impl.js.map +1 -0
- package/dist/MutationCtx.d.ts +12 -0
- package/dist/MutationCtx.d.ts.map +1 -0
- package/dist/MutationCtx.js +10 -0
- package/dist/MutationCtx.js.map +1 -0
- package/dist/MutationRunner.d.ts +24 -0
- package/dist/MutationRunner.d.ts.map +1 -0
- package/dist/MutationRunner.js +33 -0
- package/dist/MutationRunner.js.map +1 -0
- package/dist/OrderedQuery.d.ts +23 -0
- package/dist/OrderedQuery.d.ts.map +1 -0
- package/dist/OrderedQuery.js +34 -0
- package/dist/OrderedQuery.js.map +1 -0
- package/dist/QueryCtx.d.ts +12 -0
- package/dist/QueryCtx.d.ts.map +1 -0
- package/dist/QueryCtx.js +10 -0
- package/dist/QueryCtx.js.map +1 -0
- package/dist/QueryInitializer.d.ts +49 -0
- package/dist/QueryInitializer.d.ts.map +1 -0
- package/dist/QueryInitializer.js +83 -0
- package/dist/QueryInitializer.js.map +1 -0
- package/dist/QueryRunner.d.ts +14 -0
- package/dist/QueryRunner.d.ts.map +1 -0
- package/dist/QueryRunner.js +23 -0
- package/dist/QueryRunner.js.map +1 -0
- package/dist/RegisteredFunctions.d.ts +66 -0
- package/dist/RegisteredFunctions.d.ts.map +1 -0
- package/dist/RegisteredFunctions.js +71 -0
- package/dist/RegisteredFunctions.js.map +1 -0
- package/dist/Registry.d.ts +15 -0
- package/dist/Registry.d.ts.map +1 -0
- package/dist/Registry.js +10 -0
- package/dist/Registry.js.map +1 -0
- package/dist/RegistryItem.d.ts +31 -0
- package/dist/RegistryItem.d.ts.map +1 -0
- package/dist/RegistryItem.js +20 -0
- package/dist/RegistryItem.js.map +1 -0
- package/dist/Scheduler.d.ts +23 -0
- package/dist/Scheduler.d.ts.map +1 -0
- package/dist/Scheduler.js +24 -0
- package/dist/Scheduler.js.map +1 -0
- package/dist/SchemaToValidator.d.ts +88 -0
- package/dist/SchemaToValidator.d.ts.map +1 -0
- package/dist/SchemaToValidator.js +155 -0
- package/dist/SchemaToValidator.js.map +1 -0
- package/dist/Storage.d.ts +69 -0
- package/dist/Storage.d.ts.map +1 -0
- package/dist/Storage.js +46 -0
- package/dist/Storage.js.map +1 -0
- package/dist/Table.d.ts +247 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +97 -0
- package/dist/Table.js.map +1 -0
- package/dist/TableInfo.d.ts +48 -0
- package/dist/TableInfo.d.ts.map +1 -0
- package/dist/TableInfo.js +6 -0
- package/dist/TableInfo.js.map +1 -0
- package/dist/VectorSearch.d.ts +42 -0
- package/dist/VectorSearch.d.ts.map +1 -0
- package/dist/VectorSearch.js +16 -0
- package/dist/VectorSearch.js.map +1 -0
- package/dist/_virtual/rolldown_runtime.js +13 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +31 -0
- package/dist/internal/utils.d.ts +15 -0
- package/dist/internal/utils.d.ts.map +1 -0
- package/dist/internal/utils.js +49 -0
- package/dist/internal/utils.js.map +1 -0
- package/package.json +90 -0
- package/src/ActionCtx.ts +9 -0
- package/src/ActionRunner.ts +28 -0
- package/src/Api.ts +63 -0
- package/src/Auth.ts +31 -0
- package/src/DataModel.ts +69 -0
- package/src/DatabaseReader.ts +75 -0
- package/src/DatabaseSchema.ts +134 -0
- package/src/DatabaseWriter.ts +166 -0
- package/src/Document.ts +200 -0
- package/src/FunctionImpl.ts +112 -0
- package/src/GroupImpl.ts +60 -0
- package/src/Handler.ts +105 -0
- package/src/HttpApi.ts +232 -0
- package/src/Impl.ts +57 -0
- package/src/MutationCtx.ts +11 -0
- package/src/MutationRunner.ts +41 -0
- package/src/OrderedQuery.ts +109 -0
- package/src/QueryCtx.ts +9 -0
- package/src/QueryInitializer.ts +308 -0
- package/src/QueryRunner.ts +29 -0
- package/src/RegisteredFunctions.ts +381 -0
- package/src/Registry.ts +13 -0
- package/src/RegistryItem.ts +44 -0
- package/src/Scheduler.ts +39 -0
- package/src/SchemaToValidator.ts +619 -0
- package/src/Storage.ts +86 -0
- package/src/Table.ts +439 -0
- package/src/TableInfo.ts +91 -0
- package/src/VectorSearch.ts +46 -0
- package/src/index.ts +29 -0
- package/src/internal/utils.ts +87 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Name, WithName } from "./Table.js";
|
|
2
|
+
import { AnyWithProps as AnyWithProps$1, IncludeSystemTables, Tables } from "./DatabaseSchema.js";
|
|
3
|
+
import { AnyWithProps as AnyWithProps$2 } from "./Api.js";
|
|
4
|
+
import { Auth as Auth$1 } from "./Auth.js";
|
|
5
|
+
import { DocumentDecodeError, DocumentEncodeError, WithoutSystemFields as WithoutSystemFields$1 } from "./Document.js";
|
|
6
|
+
import { TableInfo } from "./TableInfo.js";
|
|
7
|
+
import { DataModel, DocumentByName, FromSchema, TableInfoWithName, TableNames, ToConvex } from "./DataModel.js";
|
|
8
|
+
import { OrderedQuery as OrderedQuery$1 } from "./OrderedQuery.js";
|
|
9
|
+
import { GetByIdFailure, GetByIndexFailure } from "./QueryInitializer.js";
|
|
10
|
+
import { DatabaseReader } from "./DatabaseReader.js";
|
|
11
|
+
import { DatabaseWriter } from "./DatabaseWriter.js";
|
|
12
|
+
import { MutationCtx } from "./MutationCtx.js";
|
|
13
|
+
import { MutationRunner } from "./MutationRunner.js";
|
|
14
|
+
import { QueryRunner } from "./QueryRunner.js";
|
|
15
|
+
import { Scheduler as Scheduler$1 } from "./Scheduler.js";
|
|
16
|
+
import { StorageReader as StorageReader$1, StorageWriter as StorageWriter$1 } from "./Storage.js";
|
|
17
|
+
import { Impl } from "./Impl.js";
|
|
18
|
+
import { Effect, Layer, Types } from "effect";
|
|
19
|
+
import * as _confect_core_Ref0 from "@confect/core/Ref";
|
|
20
|
+
import * as convex_server23 from "convex/server";
|
|
21
|
+
import { DefaultFunctionArgs, FunctionVisibility, GenericMutationCtx, RegisteredAction, RegisteredMutation, RegisteredQuery } from "convex/server";
|
|
22
|
+
import * as convex_values3 from "convex/values";
|
|
23
|
+
import * as effect_ParseResult5 from "effect/ParseResult";
|
|
24
|
+
import * as Spec from "@confect/core/Spec";
|
|
25
|
+
import * as _confect_core_Types3 from "@confect/core/Types";
|
|
26
|
+
import * as FunctionSpec from "@confect/core/FunctionSpec";
|
|
27
|
+
import * as GroupSpec from "@confect/core/GroupSpec";
|
|
28
|
+
import * as effect_Duration0 from "effect/Duration";
|
|
29
|
+
import * as effect_DateTime0 from "effect/DateTime";
|
|
30
|
+
|
|
31
|
+
//#region src/RegisteredFunctions.d.ts
|
|
32
|
+
declare namespace RegisteredFunctions_d_exports {
|
|
33
|
+
export { AnyWithProps, MutationServices, RegisteredFunction, RegisteredFunctions, make, mutationLayer };
|
|
34
|
+
}
|
|
35
|
+
type RegisteredFunction = RegisteredQuery<FunctionVisibility, DefaultFunctionArgs, any> | RegisteredMutation<FunctionVisibility, DefaultFunctionArgs, any> | RegisteredAction<FunctionVisibility, DefaultFunctionArgs, any>;
|
|
36
|
+
type RegisteredFunctions<Spec_ extends Spec.AnyWithProps> = Types.Simplify<RegisteredFunctionsHelper<Spec.Groups<Spec_>>>;
|
|
37
|
+
type RegisteredFunctionsHelper<Groups extends GroupSpec.AnyWithProps> = { [GroupName in GroupSpec.Name<Groups>]: GroupSpec.WithName<Groups, GroupName> extends infer Group extends GroupSpec.AnyWithProps ? GroupSpec.Groups<Group> extends infer SubGroups extends GroupSpec.AnyWithProps ? Types.Simplify<RegisteredFunctionsHelper<SubGroups> & { [FunctionName in FunctionSpec.Name<GroupSpec.Functions<Group>>]: FunctionSpec.WithName<GroupSpec.Functions<Group>, FunctionName> extends infer Function extends FunctionSpec.AnyWithProps ? FunctionSpec.RegisteredFunction<Function> : never }> : { [FunctionName in FunctionSpec.Name<GroupSpec.Functions<Group>>]: FunctionSpec.WithName<GroupSpec.Functions<Group>, FunctionName> extends infer Function extends FunctionSpec.AnyWithProps ? FunctionSpec.RegisteredFunction<Function> : never } : never };
|
|
38
|
+
interface AnyWithProps {
|
|
39
|
+
readonly [key: string]: RegisteredFunction | AnyWithProps;
|
|
40
|
+
}
|
|
41
|
+
declare const make: <Api_ extends AnyWithProps$2>(impl: Layer.Layer<Impl<Api_, "Finalized">>) => Types.Simplify<RegisteredFunctionsHelper<Spec.Groups<Api_["spec"]>>>;
|
|
42
|
+
declare const mutationLayer: <Schema$1 extends AnyWithProps$1>(schema: Schema$1, ctx: GenericMutationCtx<ToConvex<FromSchema<Schema$1>>>) => Layer.Layer<(<Mutation extends _confect_core_Ref0.AnyMutation>(mutation: Mutation, args: _confect_core_Ref0.Args<Mutation>["Type"]) => Effect.Effect<any, effect_ParseResult5.ParseError, never>) | (<Query extends _confect_core_Ref0.AnyQuery>(query: Query, args: _confect_core_Ref0.Args<Query>["Type"]) => Effect.Effect<_confect_core_Ref0.Returns<Query>["Type"], effect_ParseResult5.ParseError>) | GenericMutationCtx<ToConvex<FromSchema<Schema$1>>> | {
|
|
43
|
+
table: <const TableName extends Name<IncludeSystemTables<Tables<Schema$1>>>>(tableName: TableName) => {
|
|
44
|
+
readonly get: {
|
|
45
|
+
(id: convex_values3.GenericId<TableName>): Effect.Effect<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["document"], GetByIdFailure | DocumentDecodeError, never>;
|
|
46
|
+
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["indexes"]>(indexName: IndexName, ...indexFieldValues: _confect_core_Types3.IndexFieldTypesForEq<ToConvex<DataModel<IncludeSystemTables<Tables<Schema$1>>>>, TableName, TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["indexes"][IndexName]>): Effect.Effect<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["document"], DocumentDecodeError | GetByIndexFailure, never>;
|
|
47
|
+
};
|
|
48
|
+
readonly index: {
|
|
49
|
+
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["indexes"]>(indexName: IndexName, indexRange?: ((q: convex_server23.IndexRangeBuilder<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["convexDocument"], convex_server23.NamedIndex<TableInfoWithName<DataModel<IncludeSystemTables<Tables<Schema$1>>>, TableName>, IndexName>, 0>) => convex_server23.IndexRange) | undefined, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>, TableName>;
|
|
50
|
+
<IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["indexes"]>(indexName: IndexName, order?: "asc" | "desc"): OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>, TableName>;
|
|
51
|
+
};
|
|
52
|
+
readonly search: <IndexName extends keyof TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["searchIndexes"]>(indexName: IndexName, searchFilter: (q: convex_server23.SearchFilterBuilder<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>["convexDocument"], convex_server23.NamedSearchIndex<TableInfoWithName<DataModel<IncludeSystemTables<Tables<Schema$1>>>, TableName>, IndexName>>) => convex_server23.SearchFilter) => OrderedQuery$1<TableInfo<WithName<IncludeSystemTables<Tables<Schema$1>>, TableName>>, TableName>;
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
insert: <TableName extends TableNames<FromSchema<Schema$1>>>(tableName: TableName, document: WithoutSystemFields$1<DocumentByName<FromSchema<Schema$1>, TableName>>) => Effect.Effect<convex_values3.GenericId<TableName>, DocumentEncodeError, never>;
|
|
56
|
+
patch: <TableName extends TableNames<FromSchema<Schema$1>>>(tableName: TableName, id: convex_values3.GenericId<TableName>, patchedValues: Partial<convex_server23.Expand<convex_server23.BetterOmit<DocumentByName<FromSchema<Schema$1>, TableName>, "_id" | "_creationTime">>>) => Effect.Effect<void, DocumentEncodeError | GetByIdFailure | DocumentDecodeError, never>;
|
|
57
|
+
replace: <TableName extends TableNames<FromSchema<Schema$1>>>(tableName: TableName, id: convex_values3.GenericId<TableName>, value: convex_server23.Expand<convex_server23.BetterOmit<DocumentByName<FromSchema<Schema$1>, TableName>, "_id" | "_creationTime">>) => Effect.Effect<void, DocumentEncodeError, never>;
|
|
58
|
+
delete: <TableName extends TableNames<FromSchema<Schema$1>>>(_tableName: TableName, id: convex_values3.GenericId<TableName>) => Effect.Effect<void, never, never>;
|
|
59
|
+
} | Auth$1 | {
|
|
60
|
+
runAfter: <FuncRef extends convex_server23.SchedulableFunctionReference>(delay: effect_Duration0.Duration, functionReference: FuncRef, ...args: convex_server23.OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values3.GenericId<"_scheduled_functions">, never, never>;
|
|
61
|
+
runAt: <FuncRef extends convex_server23.SchedulableFunctionReference>(dateTime: effect_DateTime0.DateTime, functionReference: FuncRef, ...args: convex_server23.OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values3.GenericId<"_scheduled_functions">, never, never>;
|
|
62
|
+
} | StorageReader$1 | StorageWriter$1, never, never>;
|
|
63
|
+
type MutationServices<Schema$1 extends AnyWithProps$1> = DatabaseReader<Schema$1> | DatabaseWriter<Schema$1> | Auth$1 | Scheduler$1 | StorageReader$1 | StorageWriter$1 | QueryRunner | MutationRunner | MutationCtx<ToConvex<FromSchema<Schema$1>>>;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { AnyWithProps, MutationServices, RegisteredFunction, RegisteredFunctions, RegisteredFunctions_d_exports, make, mutationLayer };
|
|
66
|
+
//# sourceMappingURL=RegisteredFunctions.d.ts.map
|
|
@@ -0,0 +1 @@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,CAAA,CAAA,UAAA,WAAA,EAAA,EAAA,0BAAA,UAAA,CAAA,EAAA,gBAAA,CAAA,IAAA,EAAA,KAAA,EAAA,KAAA,CAAA;CACiB,SAAA,GAAA;EAAoB,QAAA,EAAA,CAAA,4DAAA,CAAA,CAAA,KAAA,2BAAA,EAAA,iBAAA,SAAA,EAAA,GAAA,IAAA,kCAAA,QAAA,CAAA,EAAA,gBAAA,yBAAA,CAAA,sBAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA;EAArC,KAAA,EAAA,CAAA,4DAAA,CAAA,CAAA,QAAA,2BAAA,EAAA,iBAAA,SAAA,EAAA,GAAA,IAAA,kCAAA,QAAA,CAAA,EAAA,gBAAA,yBAAA,CAAA,sBAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA;CAAgB,kBAAA,kBAAA,EAAA,KAAA,EAAA,KAAA,CAAA;AAER,KA8MA,gBA9MmB,CAAA,iBA8Ma,cA9Mb,CAAA,GA+M3B,cA/M2B,CA+MG,QA/MH,CAAA,GAgN3B,cAhN2B,CAgNG,QAhNH,CAAA,GAiN3B,MAjN2B,GAkN3B,WAlN2B,GAmN3B,eAnN2B,GAoN3B,eApN2B,GAqN3B,WArN2B,GAsN3B,cAtN2B,GAuN3B,WAvN2B,CAuNH,QAvNG,CAuNgB,UAvNhB,CAuNqC,QAvNrC,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __export } from "./_virtual/rolldown_runtime.js";
|
|
2
|
+
import { ActionCtx } from "./ActionCtx.js";
|
|
3
|
+
import { layer } from "./ActionRunner.js";
|
|
4
|
+
import { layer as layer$1 } from "./Auth.js";
|
|
5
|
+
import { compileArgsSchema, compileReturnsSchema } from "./SchemaToValidator.js";
|
|
6
|
+
import { layer as layer$2 } from "./DatabaseReader.js";
|
|
7
|
+
import { layer as layer$3 } from "./DatabaseWriter.js";
|
|
8
|
+
import { mapLeaves } from "./internal/utils.js";
|
|
9
|
+
import { Registry } from "./Registry.js";
|
|
10
|
+
import { isRegistryItem } from "./RegistryItem.js";
|
|
11
|
+
import { layer as layer$4 } from "./MutationRunner.js";
|
|
12
|
+
import { layer as layer$5 } from "./QueryRunner.js";
|
|
13
|
+
import { layer as layer$6 } from "./Scheduler.js";
|
|
14
|
+
import { StorageActionWriter as StorageActionWriter$1, StorageReader as StorageReader$1, StorageWriter as StorageWriter$1 } from "./Storage.js";
|
|
15
|
+
import { Impl } from "./Impl.js";
|
|
16
|
+
import { MutationCtx } from "./MutationCtx.js";
|
|
17
|
+
import { QueryCtx } from "./QueryCtx.js";
|
|
18
|
+
import { layer as layer$7 } from "./VectorSearch.js";
|
|
19
|
+
import { Effect, Layer, Match, Ref, Schema, pipe } from "effect";
|
|
20
|
+
import { actionGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, mutationGeneric, queryGeneric } from "convex/server";
|
|
21
|
+
|
|
22
|
+
//#region src/RegisteredFunctions.ts
|
|
23
|
+
var RegisteredFunctions_exports = /* @__PURE__ */ __export({
|
|
24
|
+
make: () => make,
|
|
25
|
+
mutationLayer: () => mutationLayer
|
|
26
|
+
});
|
|
27
|
+
const make = (impl) => Effect.gen(function* () {
|
|
28
|
+
const registry = yield* Registry;
|
|
29
|
+
const functionImplItems = yield* Ref.get(registry);
|
|
30
|
+
const { api, finalizationStatus } = yield* Impl();
|
|
31
|
+
return yield* Match.value(finalizationStatus).pipe(Match.withReturnType(), Match.when("Unfinalized", () => Effect.dieMessage("Impl is not finalized")), Match.when("Finalized", () => Effect.succeed(mapLeaves(functionImplItems, isRegistryItem, (registryItem) => makeRegisteredFunction(api, registryItem)))), Match.exhaustive);
|
|
32
|
+
}).pipe(Effect.provide(impl), Effect.runSync);
|
|
33
|
+
const makeRegisteredFunction = (api, { function_, handler }) => Match.value(function_.functionType).pipe(Match.when("query", () => {
|
|
34
|
+
return Match.value(function_.functionVisibility).pipe(Match.when("public", () => queryGeneric), Match.when("internal", () => internalQueryGeneric), Match.exhaustive)(queryFunction(api.databaseSchema, {
|
|
35
|
+
args: function_.args,
|
|
36
|
+
returns: function_.returns,
|
|
37
|
+
handler
|
|
38
|
+
}));
|
|
39
|
+
}), Match.when("mutation", () => {
|
|
40
|
+
return Match.value(function_.functionVisibility).pipe(Match.when("public", () => mutationGeneric), Match.when("internal", () => internalMutationGeneric), Match.exhaustive)(mutationFunction(api.databaseSchema, {
|
|
41
|
+
args: function_.args,
|
|
42
|
+
returns: function_.returns,
|
|
43
|
+
handler
|
|
44
|
+
}));
|
|
45
|
+
}), Match.when("action", () => {
|
|
46
|
+
return Match.value(function_.functionVisibility).pipe(Match.when("public", () => actionGeneric), Match.when("internal", () => internalActionGeneric), Match.exhaustive)(actionFunction({
|
|
47
|
+
args: function_.args,
|
|
48
|
+
returns: function_.returns,
|
|
49
|
+
handler
|
|
50
|
+
}));
|
|
51
|
+
}), Match.exhaustive);
|
|
52
|
+
const queryFunction = (schema, { args, returns, handler }) => ({
|
|
53
|
+
args: compileArgsSchema(args),
|
|
54
|
+
returns: compileReturnsSchema(returns),
|
|
55
|
+
handler: (ctx, actualArgs) => pipe(actualArgs, Schema.decode(args), Effect.orDie, Effect.andThen((decodedArgs) => pipe(handler(decodedArgs), Effect.provide(Layer.mergeAll(layer$2(schema, ctx.db), layer$1(ctx.auth), StorageReader$1.layer(ctx.storage), layer$5(ctx.runQuery), Layer.succeed(QueryCtx(), ctx))))), Effect.andThen((convexReturns) => Schema.encodeUnknown(returns)(convexReturns)), Effect.runPromise)
|
|
56
|
+
});
|
|
57
|
+
const mutationLayer = (schema, ctx) => Layer.mergeAll(layer$2(schema, ctx.db), layer$3(schema, ctx.db), layer$1(ctx.auth), layer$6(ctx.scheduler), StorageReader$1.layer(ctx.storage), StorageWriter$1.layer(ctx.storage), layer$5(ctx.runQuery), layer$4(ctx.runMutation), Layer.succeed(MutationCtx(), ctx));
|
|
58
|
+
const mutationFunction = (schema, { args, returns, handler }) => ({
|
|
59
|
+
args: compileArgsSchema(args),
|
|
60
|
+
returns: compileReturnsSchema(returns),
|
|
61
|
+
handler: (ctx, actualArgs) => pipe(actualArgs, Schema.decode(args), Effect.orDie, Effect.andThen((decodedArgs) => handler(decodedArgs).pipe(Effect.provide(mutationLayer(schema, ctx)))), Effect.andThen((convexReturns) => Schema.encodeUnknown(returns)(convexReturns)), Effect.runPromise)
|
|
62
|
+
});
|
|
63
|
+
const actionFunction = ({ args, returns, handler }) => ({
|
|
64
|
+
args: compileArgsSchema(args),
|
|
65
|
+
returns: compileReturnsSchema(returns),
|
|
66
|
+
handler: (ctx, actualArgs) => pipe(actualArgs, Schema.decode(args), Effect.orDie, Effect.andThen((decodedArgs) => pipe(handler(decodedArgs), Effect.provide(Layer.mergeAll(layer$6(ctx.scheduler), layer$1(ctx.auth), StorageReader$1.layer(ctx.storage), StorageWriter$1.layer(ctx.storage), StorageActionWriter$1.layer(ctx.storage), layer$5(ctx.runQuery), layer$4(ctx.runMutation), layer(ctx.runAction), layer$7(ctx.vectorSearch), Layer.succeed(ActionCtx(), ctx))))), Effect.andThen((convexReturns) => Schema.encodeUnknown(returns)(convexReturns)), Effect.runPromise)
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { RegisteredFunctions_exports, make, mutationLayer };
|
|
71
|
+
//# sourceMappingURL=RegisteredFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegisteredFunctions.js","names":["Registry.Registry","Impl.Impl","RegistryItem.isRegistryItem","SchemaToValidator.compileArgsSchema","SchemaToValidator.compileReturnsSchema","DatabaseReader.layer","Auth.layer","StorageReader","QueryRunner.layer","QueryCtx.QueryCtx","DatabaseWriter.layer","Scheduler.layer","StorageWriter","MutationRunner.layer","MutationCtx.MutationCtx","StorageActionWriter","ActionRunner.layer","VectorSearch.layer","ActionCtx.ActionCtx"],"sources":["../src/RegisteredFunctions.ts"],"sourcesContent":["import type * as FunctionSpec from \"@confect/core/FunctionSpec\";\nimport type * as GroupSpec from \"@confect/core/GroupSpec\";\nimport type * as Spec from \"@confect/core/Spec\";\nimport {\n actionGeneric,\n type DefaultFunctionArgs,\n type FunctionVisibility,\n type GenericActionCtx,\n type GenericMutationCtx,\n type GenericQueryCtx,\n internalActionGeneric,\n internalMutationGeneric,\n internalQueryGeneric,\n mutationGeneric,\n queryGeneric,\n type RegisteredAction,\n type RegisteredMutation,\n type RegisteredQuery,\n} from \"convex/server\";\nimport {\n Effect,\n Layer,\n Match,\n pipe,\n Ref,\n Schema,\n type Types,\n} from \"effect\";\nimport * as ActionCtx from \"./ActionCtx\";\nimport * as ActionRunner from \"./ActionRunner\";\nimport type * as Api from \"./Api\";\nimport * as Auth from \"./Auth\";\nimport * as DatabaseReader from \"./DatabaseReader\";\nimport type * as DatabaseSchema from \"./DatabaseSchema\";\nimport * as DatabaseWriter from \"./DatabaseWriter\";\nimport type * as DataModel from \"./DataModel\";\nimport * as Impl from \"./Impl\";\nimport { mapLeaves } from \"./internal/utils\";\nimport * as MutationCtx from \"./MutationCtx\";\nimport * as MutationRunner from \"./MutationRunner\";\nimport * as QueryCtx from \"./QueryCtx\";\nimport * as QueryRunner from \"./QueryRunner\";\nimport * as Registry from \"./Registry\";\nimport * as RegistryItem from \"./RegistryItem\";\nimport * as Scheduler from \"./Scheduler\";\nimport * as SchemaToValidator from \"./SchemaToValidator\";\nimport { StorageActionWriter, StorageReader, StorageWriter } from \"./Storage\";\nimport * as VectorSearch from \"./VectorSearch\";\n\nexport type RegisteredFunction =\n | RegisteredQuery<FunctionVisibility, DefaultFunctionArgs, any>\n | RegisteredMutation<FunctionVisibility, DefaultFunctionArgs, any>\n | RegisteredAction<FunctionVisibility, DefaultFunctionArgs, any>;\n\nexport type RegisteredFunctions<Spec_ extends Spec.AnyWithProps> =\n Types.Simplify<RegisteredFunctionsHelper<Spec.Groups<Spec_>>>;\n\ntype RegisteredFunctionsHelper<Groups extends GroupSpec.AnyWithProps> = {\n [GroupName in GroupSpec.Name<Groups>]: GroupSpec.WithName<\n Groups,\n GroupName\n > extends infer Group extends GroupSpec.AnyWithProps\n ? GroupSpec.Groups<Group> extends infer SubGroups extends\n GroupSpec.AnyWithProps\n ? Types.Simplify<\n RegisteredFunctionsHelper<SubGroups> & {\n [FunctionName in FunctionSpec.Name<\n GroupSpec.Functions<Group>\n >]: FunctionSpec.WithName<\n GroupSpec.Functions<Group>,\n FunctionName\n > extends infer Function extends FunctionSpec.AnyWithProps\n ? FunctionSpec.RegisteredFunction<Function>\n : never;\n }\n >\n : {\n [FunctionName in FunctionSpec.Name<\n GroupSpec.Functions<Group>\n >]: FunctionSpec.WithName<\n GroupSpec.Functions<Group>,\n FunctionName\n > extends infer Function extends FunctionSpec.AnyWithProps\n ? FunctionSpec.RegisteredFunction<Function>\n : never;\n }\n : never;\n};\n\nexport interface AnyWithProps {\n readonly [key: string]: RegisteredFunction | AnyWithProps;\n}\n\nexport const make = <Api_ extends Api.AnyWithProps>(\n impl: Layer.Layer<Impl.Impl<Api_, \"Finalized\">>,\n) =>\n Effect.gen(function* () {\n const registry = yield* Registry.Registry;\n const functionImplItems = yield* Ref.get(registry);\n const { api, finalizationStatus } = yield* Impl.Impl<Api_, \"Finalized\">();\n\n return yield* Match.value(\n finalizationStatus as Impl.FinalizationStatus,\n ).pipe(\n Match.withReturnType<Effect.Effect<RegisteredFunctions<Api_[\"spec\"]>>>(),\n Match.when(\"Unfinalized\", () =>\n Effect.dieMessage(\"Impl is not finalized\"),\n ),\n Match.when(\"Finalized\", () =>\n Effect.succeed(\n mapLeaves<RegistryItem.AnyWithProps, RegisteredFunction>(\n functionImplItems,\n RegistryItem.isRegistryItem,\n (registryItem) => makeRegisteredFunction(api, registryItem),\n ) as RegisteredFunctions<Api_[\"spec\"]>,\n ),\n ),\n Match.exhaustive,\n );\n }).pipe(Effect.provide(impl), Effect.runSync);\n\nconst makeRegisteredFunction = <Api_ extends Api.AnyWithProps>(\n api: Api_,\n { function_, handler }: RegistryItem.AnyWithProps,\n): RegisteredFunction =>\n Match.value(function_.functionType).pipe(\n Match.when(\"query\", () => {\n const genericFunction = Match.value(function_.functionVisibility).pipe(\n Match.when(\"public\", () => queryGeneric),\n Match.when(\"internal\", () => internalQueryGeneric),\n Match.exhaustive,\n );\n\n return genericFunction(\n queryFunction(api.databaseSchema, {\n args: function_.args,\n returns: function_.returns,\n handler,\n }),\n );\n }),\n Match.when(\"mutation\", () => {\n const genericFunction = Match.value(function_.functionVisibility).pipe(\n Match.when(\"public\", () => mutationGeneric),\n Match.when(\"internal\", () => internalMutationGeneric),\n Match.exhaustive,\n );\n\n return genericFunction(\n mutationFunction(api.databaseSchema, {\n args: function_.args,\n returns: function_.returns,\n handler,\n }),\n );\n }),\n Match.when(\"action\", () => {\n const genericFunction = Match.value(function_.functionVisibility).pipe(\n Match.when(\"public\", () => actionGeneric),\n Match.when(\"internal\", () => internalActionGeneric),\n Match.exhaustive,\n );\n\n return genericFunction(\n actionFunction({\n args: function_.args,\n returns: function_.returns,\n handler,\n }),\n );\n }),\n Match.exhaustive,\n );\n\nconst queryFunction = <\n Schema extends DatabaseSchema.AnyWithProps,\n Args,\n ConvexArgs extends DefaultFunctionArgs,\n Returns,\n ConvexReturns,\n E,\n>(\n schema: Schema,\n {\n args,\n returns,\n handler,\n }: {\n args: Schema.Schema<Args, ConvexArgs>;\n returns: Schema.Schema<Returns, ConvexReturns>;\n handler: (\n a: Args,\n ) => Effect.Effect<\n Returns,\n E,\n | DatabaseReader.DatabaseReader<Schema>\n | Auth.Auth\n | StorageReader\n | QueryRunner.QueryRunner\n | QueryCtx.QueryCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>\n >;\n },\n) => ({\n args: SchemaToValidator.compileArgsSchema(args),\n returns: SchemaToValidator.compileReturnsSchema(returns),\n handler: (\n ctx: GenericQueryCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>,\n actualArgs: ConvexArgs,\n ): Promise<ConvexReturns> =>\n pipe(\n actualArgs,\n Schema.decode(args),\n Effect.orDie,\n Effect.andThen((decodedArgs) =>\n pipe(\n handler(decodedArgs),\n Effect.provide(\n Layer.mergeAll(\n DatabaseReader.layer(schema, ctx.db),\n Auth.layer(ctx.auth),\n StorageReader.layer(ctx.storage),\n QueryRunner.layer(ctx.runQuery),\n Layer.succeed(\n QueryCtx.QueryCtx<\n DataModel.ToConvex<DataModel.FromSchema<Schema>>\n >(),\n ctx,\n ),\n ),\n ),\n ),\n ),\n Effect.andThen((convexReturns) =>\n Schema.encodeUnknown(returns)(convexReturns),\n ),\n Effect.runPromise,\n ),\n});\n\nexport const mutationLayer = <Schema extends DatabaseSchema.AnyWithProps>(\n schema: Schema,\n ctx: GenericMutationCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>,\n) =>\n Layer.mergeAll(\n DatabaseReader.layer(schema, ctx.db),\n DatabaseWriter.layer(schema, ctx.db),\n Auth.layer(ctx.auth),\n Scheduler.layer(ctx.scheduler),\n StorageReader.layer(ctx.storage),\n StorageWriter.layer(ctx.storage),\n QueryRunner.layer(ctx.runQuery),\n MutationRunner.layer(ctx.runMutation),\n Layer.succeed(\n MutationCtx.MutationCtx<\n DataModel.ToConvex<DataModel.FromSchema<Schema>>\n >(),\n ctx,\n ),\n );\n\nexport type MutationServices<Schema extends DatabaseSchema.AnyWithProps> =\n | DatabaseReader.DatabaseReader<Schema>\n | DatabaseWriter.DatabaseWriter<Schema>\n | Auth.Auth\n | Scheduler.Scheduler\n | StorageReader\n | StorageWriter\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | MutationCtx.MutationCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>;\n\nconst mutationFunction = <\n Schema extends DatabaseSchema.AnyWithProps,\n Args,\n ConvexArgs extends DefaultFunctionArgs,\n Returns,\n ConvexReturns,\n E,\n>(\n schema: Schema,\n {\n args,\n returns,\n handler,\n }: {\n args: Schema.Schema<Args, ConvexArgs>;\n returns: Schema.Schema<Returns, ConvexReturns>;\n handler: (a: Args) => Effect.Effect<Returns, E, MutationServices<Schema>>;\n },\n) => ({\n args: SchemaToValidator.compileArgsSchema(args),\n returns: SchemaToValidator.compileReturnsSchema(returns),\n handler: (\n ctx: GenericMutationCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>,\n actualArgs: ConvexArgs,\n ): Promise<ConvexReturns> =>\n pipe(\n actualArgs,\n Schema.decode(args),\n Effect.orDie,\n Effect.andThen((decodedArgs) =>\n handler(decodedArgs).pipe(Effect.provide(mutationLayer(schema, ctx))),\n ),\n Effect.andThen((convexReturns) =>\n Schema.encodeUnknown(returns)(convexReturns),\n ),\n Effect.runPromise,\n ),\n});\n\nconst actionFunction = <\n Schema extends DatabaseSchema.AnyWithProps,\n Args,\n ConvexArgs extends DefaultFunctionArgs,\n Returns,\n ConvexReturns,\n E,\n>({\n args,\n returns,\n handler,\n}: {\n args: Schema.Schema<Args, ConvexArgs>;\n returns: Schema.Schema<Returns, ConvexReturns>;\n handler: (\n a: Args,\n ) => Effect.Effect<\n Returns,\n E,\n | Scheduler.Scheduler\n | Auth.Auth\n | StorageReader\n | StorageWriter\n | StorageActionWriter\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | VectorSearch.VectorSearch<DataModel.FromSchema<Schema>>\n | ActionCtx.ActionCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>\n >;\n}) => ({\n args: SchemaToValidator.compileArgsSchema(args),\n returns: SchemaToValidator.compileReturnsSchema(returns),\n handler: (\n ctx: GenericActionCtx<DataModel.ToConvex<DataModel.FromSchema<Schema>>>,\n actualArgs: ConvexArgs,\n ): Promise<ConvexReturns> =>\n pipe(\n actualArgs,\n Schema.decode(args),\n Effect.orDie,\n Effect.andThen((decodedArgs) =>\n pipe(\n handler(decodedArgs),\n Effect.provide(\n Layer.mergeAll(\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 QueryRunner.layer(ctx.runQuery),\n MutationRunner.layer(ctx.runMutation),\n ActionRunner.layer(ctx.runAction),\n VectorSearch.layer(ctx.vectorSearch),\n Layer.succeed(\n ActionCtx.ActionCtx<\n DataModel.ToConvex<DataModel.FromSchema<Schema>>\n >(),\n ctx,\n ),\n ),\n ),\n ),\n ),\n Effect.andThen((convexReturns) =>\n Schema.encodeUnknown(returns)(convexReturns),\n ),\n Effect.runPromise,\n ),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,MAAa,QACX,SAEA,OAAO,IAAI,aAAa;CACtB,MAAM,WAAW,OAAOA;CACxB,MAAM,oBAAoB,OAAO,IAAI,IAAI,SAAS;CAClD,MAAM,EAAE,KAAK,uBAAuB,OAAOC,MAA8B;AAEzE,QAAO,OAAO,MAAM,MAClB,mBACD,CAAC,KACA,MAAM,gBAAkE,EACxE,MAAM,KAAK,qBACT,OAAO,WAAW,wBAAwB,CAC3C,EACD,MAAM,KAAK,mBACT,OAAO,QACL,UACE,mBACAC,iBACC,iBAAiB,uBAAuB,KAAK,aAAa,CAC5D,CACF,CACF,EACD,MAAM,WACP;EACD,CAAC,KAAK,OAAO,QAAQ,KAAK,EAAE,OAAO,QAAQ;AAE/C,MAAM,0BACJ,KACA,EAAE,WAAW,cAEb,MAAM,MAAM,UAAU,aAAa,CAAC,KAClC,MAAM,KAAK,eAAe;AAOxB,QANwB,MAAM,MAAM,UAAU,mBAAmB,CAAC,KAChE,MAAM,KAAK,gBAAgB,aAAa,EACxC,MAAM,KAAK,kBAAkB,qBAAqB,EAClD,MAAM,WACP,CAGC,cAAc,IAAI,gBAAgB;EAChC,MAAM,UAAU;EAChB,SAAS,UAAU;EACnB;EACD,CAAC,CACH;EACD,EACF,MAAM,KAAK,kBAAkB;AAO3B,QANwB,MAAM,MAAM,UAAU,mBAAmB,CAAC,KAChE,MAAM,KAAK,gBAAgB,gBAAgB,EAC3C,MAAM,KAAK,kBAAkB,wBAAwB,EACr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ASC,qBAAuC,QAAQ;CACxD,UACE,KACA,eAEA,KACE,YACA,OAAO,OAAO,KAAK,EACnB,OAAO,OACP,OAAO,SAAS,gBACd,QAAQ,YAAY,CAAC,KAAK,OAAO,QAAQ,cAAc,QAAQ,IAAI,CAAC,CAAC,CACtE,EACD,OAAO,SAAS,kBACd,OAAO,cAAc,QAAQ,CAAC,cAAc,CAC7C,EACD,OAAO,WACR;CACJ;AAED,MAAM,kBAOJ,EACA,MACA,SACA,eAoBK;CACL,MAAMD,kBAAoC,KAAK;CAC/C,SAASC,qBAAuC,QAAQ;CACxD,UACE,KACA,eAEA,KACE,YACA,OAAO,OAAO,KAAK,EACnB,OAAO,OACP,OAAO,SAAS,gBACd,KACE,QAAQ,YAAY,EACpB,OAAO,QACL,MAAM,SACJO,QAAgB,IAAI,UAAU,EAC9BL,QAAW,IAAI,KAAK,EACpBC,gBAAc,MAAM,IAAI,QAAQ,EAChCK,gBAAc,MAAM,IAAI,QAAQ,EAChCG,sBAAoB,MAAM,IAAI,QAAQ,EACtCP,QAAkB,IAAI,SAAS,EAC/BK,QAAqB,IAAI,YAAY,EACrCG,MAAmB,IAAI,UAAU,EACjCC,QAAmB,IAAI,aAAa,EACpC,MAAM,QACJC,WAEG,EACH,IACD,CACF,CACF,CACF,CACF,EACD,OAAO,SAAS,kBACd,OAAO,cAAc,QAAQ,CAAC,cAAc,CAC7C,EACD,OAAO,WACR;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyWithProps } from "./RegistryItem.js";
|
|
2
|
+
import { Context, Ref } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/Registry.d.ts
|
|
5
|
+
declare namespace Registry_d_exports {
|
|
6
|
+
export { Registry, RegistryItems };
|
|
7
|
+
}
|
|
8
|
+
interface RegistryItems {
|
|
9
|
+
readonly [key: string]: AnyWithProps | RegistryItems;
|
|
10
|
+
}
|
|
11
|
+
declare const Registry_base: Context.ReferenceClass<Registry, "@confect/server/Registry", Ref.Ref<RegistryItems>>;
|
|
12
|
+
declare class Registry extends Registry_base {}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Registry, RegistryItems, Registry_d_exports };
|
|
15
|
+
//# sourceMappingURL=Registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Registry.d.ts","names":[],"sources":["../src/Registry.ts"],"sourcesContent":[],"mappings":";;;;;;;UAGiB,aAAA;0BACS,eAA4B;;cACrD;cAEY,QAAA,SAAiB,aAAA"}
|
package/dist/Registry.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __export } from "./_virtual/rolldown_runtime.js";
|
|
2
|
+
import { Context, Ref } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/Registry.ts
|
|
5
|
+
var Registry_exports = /* @__PURE__ */ __export({ Registry: () => Registry });
|
|
6
|
+
var Registry = class extends Context.Reference()("@confect/server/Registry", { defaultValue: () => Ref.unsafeMake({}) }) {};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Registry, Registry_exports };
|
|
10
|
+
//# sourceMappingURL=Registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Registry.js","names":[],"sources":["../src/Registry.ts"],"sourcesContent":["import { Context, Ref } from \"effect\";\nimport type * as RegistryItem from \"./RegistryItem\";\n\nexport interface RegistryItems {\n readonly [key: string]: RegistryItem.AnyWithProps | RegistryItems;\n}\n\nexport class Registry extends Context.Reference<Registry>()(\n \"@confect/server/Registry\",\n {\n defaultValue: () => Ref.unsafeMake<RegistryItems>({}),\n },\n) {}\n"],"mappings":";;;;;AAOA,IAAa,WAAb,cAA8B,QAAQ,WAAqB,CACzD,4BACA,EACE,oBAAoB,IAAI,WAA0B,EAAE,CAAC,EACtD,CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AnyWithProps as AnyWithProps$1 } from "./DatabaseSchema.js";
|
|
2
|
+
import { AnyWithProps as AnyWithProps$2, Handler } from "./Handler.js";
|
|
3
|
+
import * as FunctionSpec from "@confect/core/FunctionSpec";
|
|
4
|
+
|
|
5
|
+
//#region src/RegistryItem.d.ts
|
|
6
|
+
declare namespace RegistryItem_d_exports {
|
|
7
|
+
export { AnyWithProps, RegistryItem, TypeId, isRegistryItem, make };
|
|
8
|
+
}
|
|
9
|
+
declare const TypeId = "@confect/server/RegistryItem";
|
|
10
|
+
type TypeId = typeof TypeId;
|
|
11
|
+
declare const isRegistryItem: (value: unknown) => value is AnyWithProps;
|
|
12
|
+
interface RegistryItem<DatabaseSchema_ extends AnyWithProps$1, FunctionSpec_ extends FunctionSpec.AnyWithProps> {
|
|
13
|
+
readonly [TypeId]: TypeId;
|
|
14
|
+
readonly function_: FunctionSpec_;
|
|
15
|
+
readonly handler: Handler<DatabaseSchema_, FunctionSpec_>;
|
|
16
|
+
}
|
|
17
|
+
interface AnyWithProps {
|
|
18
|
+
readonly [TypeId]: TypeId;
|
|
19
|
+
readonly function_: FunctionSpec.AnyWithProps;
|
|
20
|
+
readonly handler: AnyWithProps$2;
|
|
21
|
+
}
|
|
22
|
+
declare const make: <DatabaseSchema_ extends AnyWithProps$1, FunctionSpec_ extends FunctionSpec.AnyWithProps>({
|
|
23
|
+
function_,
|
|
24
|
+
handler
|
|
25
|
+
}: {
|
|
26
|
+
function_: FunctionSpec_;
|
|
27
|
+
handler: Handler<DatabaseSchema_, FunctionSpec_>;
|
|
28
|
+
}) => RegistryItem<DatabaseSchema_, FunctionSpec_>;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AnyWithProps, RegistryItem, RegistryItem_d_exports, TypeId, isRegistryItem, make };
|
|
31
|
+
//# sourceMappingURL=RegistryItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegistryItem.d.ts","names":[],"sources":["../src/RegistryItem.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAKa,MAAA;KACD,MAAA,UAAgB;cAEf,6CAA4C;UAOxC,qCACS,sCACF,YAAA,CAAa;YAEzB,MAAA,GAAS;sBACC;oBACF,QAAgB,iBAAiB;;UAGpC,YAAA;YACL,MAAA,GAAS;EApBR,SAAM,SAAA,EAqBG,YAAA,CAAa,YArBhB;EACP,SAAM,OAAA,EAqBE,cArBc;AAElC;AAOiB,cAeJ,IAfgB,EAAA,CAAA,wBAgBH,cAhBG,EAAA,sBAiBL,YAAA,CAAa,YAjBR,CAAA,CAAA;EAAA,SAAA;EAAA;CAAA,EAAA;EACH,SAAA,EAqBb,aArBa;EACF,OAAA,EAqBb,OArB0B,CAqBV,eArBU,EAqBO,aArBP,CAAA;CAEhB,EAAA,GAoBjB,YApBiB,CAoBJ,eApBI,EAoBa,aApBb,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __export } from "./_virtual/rolldown_runtime.js";
|
|
2
|
+
import { Predicate } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/RegistryItem.ts
|
|
5
|
+
var RegistryItem_exports = /* @__PURE__ */ __export({
|
|
6
|
+
TypeId: () => TypeId,
|
|
7
|
+
isRegistryItem: () => isRegistryItem,
|
|
8
|
+
make: () => make
|
|
9
|
+
});
|
|
10
|
+
const TypeId = "@confect/server/RegistryItem";
|
|
11
|
+
const isRegistryItem = (value) => Predicate.hasProperty(value, TypeId);
|
|
12
|
+
const RegistryItemProto = { [TypeId]: TypeId };
|
|
13
|
+
const make = ({ function_, handler }) => Object.assign(Object.create(RegistryItemProto), {
|
|
14
|
+
function_,
|
|
15
|
+
handler
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { RegistryItem_exports, TypeId, isRegistryItem, make };
|
|
20
|
+
//# sourceMappingURL=RegistryItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegistryItem.js","names":[],"sources":["../src/RegistryItem.ts"],"sourcesContent":["import type * as FunctionSpec from \"@confect/core/FunctionSpec\";\nimport { Predicate } from \"effect\";\nimport type * as DatabaseSchema from \"./DatabaseSchema\";\nimport type * as Handler from \"./Handler\";\n\nexport const TypeId = \"@confect/server/RegistryItem\";\nexport type TypeId = typeof TypeId;\n\nexport const isRegistryItem = (value: unknown): value is AnyWithProps =>\n Predicate.hasProperty(value, TypeId);\n\nconst RegistryItemProto = {\n [TypeId]: TypeId,\n};\n\nexport interface RegistryItem<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends FunctionSpec.AnyWithProps,\n> {\n readonly [TypeId]: TypeId;\n readonly function_: FunctionSpec_;\n readonly handler: Handler.Handler<DatabaseSchema_, FunctionSpec_>;\n}\n\nexport interface AnyWithProps {\n readonly [TypeId]: TypeId;\n readonly function_: FunctionSpec.AnyWithProps;\n readonly handler: Handler.AnyWithProps;\n}\n\nexport const make = <\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends FunctionSpec.AnyWithProps,\n>({\n function_,\n handler,\n}: {\n function_: FunctionSpec_;\n handler: Handler.Handler<DatabaseSchema_, FunctionSpec_>;\n}): RegistryItem<DatabaseSchema_, FunctionSpec_> =>\n Object.assign(Object.create(RegistryItemProto), {\n function_,\n handler,\n });\n"],"mappings":";;;;;;;;;AAKA,MAAa,SAAS;AAGtB,MAAa,kBAAkB,UAC7B,UAAU,YAAY,OAAO,OAAO;AAEtC,MAAM,oBAAoB,GACvB,SAAS,QACX;AAiBD,MAAa,QAGX,EACA,WACA,cAKA,OAAO,OAAO,OAAO,OAAO,kBAAkB,EAAE;CAC9C;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Context, DateTime, Duration, Effect, Layer } from "effect";
|
|
2
|
+
import { OptionalRestArgs, SchedulableFunctionReference, Scheduler as Scheduler$1 } from "convex/server";
|
|
3
|
+
import * as convex_values10 from "convex/values";
|
|
4
|
+
|
|
5
|
+
//#region src/Scheduler.d.ts
|
|
6
|
+
declare namespace Scheduler_d_exports {
|
|
7
|
+
export { Scheduler, layer };
|
|
8
|
+
}
|
|
9
|
+
declare const Scheduler: Context.Tag<{
|
|
10
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
11
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
12
|
+
}, {
|
|
13
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
14
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
15
|
+
}>;
|
|
16
|
+
type Scheduler = typeof Scheduler.Identifier;
|
|
17
|
+
declare const layer: (scheduler: Scheduler$1) => Layer.Layer<{
|
|
18
|
+
runAfter: <FuncRef extends SchedulableFunctionReference>(delay: Duration.Duration, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
19
|
+
runAt: <FuncRef extends SchedulableFunctionReference>(dateTime: DateTime.DateTime, functionReference: FuncRef, ...args: OptionalRestArgs<FuncRef>) => Effect.Effect<convex_values10.GenericId<"_scheduled_functions">, never, never>;
|
|
20
|
+
}, never, never>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Scheduler, Scheduler_d_exports, layer };
|
|
23
|
+
//# sourceMappingURL=Scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scheduler.d.ts","names":[],"sources":["../src/Scheduler.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAgCa,WAAS,OAAA,CAAA;6BAxBO,qCAClB,QAAA,CAAS,6BACG,kBACV,iBAAiB,aAAQ,MAAA,CAAA,OAAT,eAAA,CAAS;0BAQZ,wCACZ,QAAA,CAAS,6BACA,kBACV,iBAAiB,aAAQ,MAAA,CAAA,OAAT,eAAA,CAAS;;6BAdT,qCAClB,QAAA,CAAS,6BACG,kBACV,iBAAiB,aAAQ,MAAA,CAAA,OAAT,eAAA,CAAS;0BAQZ,wCACZ,QAAA,CAAS,6BACA,kBACV,iBAAiB,aAAQ,MAAA,CAAA,OAAT,eAAA,CAAS;;KAa1B,SAAA,UAAmB,SAAA,CAAU;AAH5B,cAKA,KAHZ,EAAA,CAAA,SAAA,EAGgC,WAHhC,EAAA,GAG+C,KAAA,CAAA,KAH/C,CAAA;EA1B4B,QAAA,EAAA,CAAA,gBAAA,4BAAA,CAAA,CAAA,KAAA,EAClB,QAAA,CAAS,QADS,EAAA,iBAAA,EAEN,OAFM,EAAA,GAAA,IAAA,EAGhB,gBAHgB,CAGC,OAHD,CAAA,EAAA,GAGS,MAAA,CAAA,MAHT,CAGA,eAAA,CAAS,SAHT,CAAA,sBAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA;EAClB,KAAA,EAAS,CAAA,gBAUM,4BAVN,CAAA,CAAA,QAAA,EAWN,QAAA,CAAS,QAXH,EAAA,iBAAA,EAYG,OAZH,EAAA,GAAA,IAAA,EAaP,gBAbO,CAaU,OAbV,CAAA,EAAA,GAakB,MAAA,CAAA,MAblB,CAaS,eAAA,CAAS,SAblB,CAAA,sBAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA;CACG,EAAA,KAAA,EAAA,KAAA,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __export } from "./_virtual/rolldown_runtime.js";
|
|
2
|
+
import { Context, DateTime, Duration, Effect, Layer } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/Scheduler.ts
|
|
5
|
+
var Scheduler_exports = /* @__PURE__ */ __export({
|
|
6
|
+
Scheduler: () => Scheduler,
|
|
7
|
+
layer: () => layer
|
|
8
|
+
});
|
|
9
|
+
const make = (scheduler) => ({
|
|
10
|
+
runAfter: (delay, functionReference, ...args) => {
|
|
11
|
+
const delayMs = Duration.toMillis(delay);
|
|
12
|
+
return Effect.promise(() => scheduler.runAfter(delayMs, functionReference, ...args));
|
|
13
|
+
},
|
|
14
|
+
runAt: (dateTime, functionReference, ...args) => {
|
|
15
|
+
const timestamp = DateTime.toEpochMillis(dateTime);
|
|
16
|
+
return Effect.promise(() => scheduler.runAt(timestamp, functionReference, ...args));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const Scheduler = Context.GenericTag("@confect/server/Scheduler");
|
|
20
|
+
const layer = (scheduler) => Layer.succeed(Scheduler, make(scheduler));
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Scheduler, Scheduler_exports, layer };
|
|
24
|
+
//# sourceMappingURL=Scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scheduler.js","names":[],"sources":["../src/Scheduler.ts"],"sourcesContent":["import type {\n OptionalRestArgs,\n SchedulableFunctionReference,\n Scheduler as ConvexScheduler,\n} from \"convex/server\";\nimport { Context, DateTime, Duration, Effect, Layer } from \"effect\";\n\nconst make = (scheduler: ConvexScheduler) => ({\n runAfter: <FuncRef extends SchedulableFunctionReference>(\n delay: Duration.Duration,\n functionReference: FuncRef,\n ...args: OptionalRestArgs<FuncRef>\n ) => {\n const delayMs = Duration.toMillis(delay);\n\n return Effect.promise(() =>\n scheduler.runAfter(delayMs, functionReference, ...args),\n );\n },\n runAt: <FuncRef extends SchedulableFunctionReference>(\n dateTime: DateTime.DateTime,\n functionReference: FuncRef,\n ...args: OptionalRestArgs<FuncRef>\n ) => {\n const timestamp = DateTime.toEpochMillis(dateTime);\n\n return Effect.promise(() =>\n scheduler.runAt(timestamp, functionReference, ...args),\n );\n },\n});\n\nexport const Scheduler = Context.GenericTag<ReturnType<typeof make>>(\n \"@confect/server/Scheduler\",\n);\nexport type Scheduler = typeof Scheduler.Identifier;\n\nexport const layer = (scheduler: ConvexScheduler) =>\n Layer.succeed(Scheduler, make(scheduler));\n"],"mappings":";;;;;;;;AAOA,MAAM,QAAQ,eAAgC;CAC5C,WACE,OACA,mBACA,GAAG,SACA;EACH,MAAM,UAAU,SAAS,SAAS,MAAM;AAExC,SAAO,OAAO,cACZ,UAAU,SAAS,SAAS,mBAAmB,GAAG,KAAK,CACxD;;CAEH,QACE,UACA,mBACA,GAAG,SACA;EACH,MAAM,YAAY,SAAS,cAAc,SAAS;AAElD,SAAO,OAAO,cACZ,UAAU,MAAM,WAAW,mBAAmB,GAAG,KAAK,CACvD;;CAEJ;AAED,MAAa,YAAY,QAAQ,WAC/B,4BACD;AAGD,MAAa,SAAS,cACpB,MAAM,QAAQ,WAAW,KAAK,UAAU,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Cause, Effect, Schema, SchemaAST } from "effect";
|
|
2
|
+
import { PropertyValidators, VAny, VArray, VBoolean, VBytes, VFloat64, VId, VInt64, VLiteral, VNull, VObject, VOptional, VRecord, VString, VUnion, Validator } from "convex/values";
|
|
3
|
+
import * as GenericId$1 from "@confect/core/GenericId";
|
|
4
|
+
import * as effect_Types0 from "effect/Types";
|
|
5
|
+
import { DeepMutable, IsAny, IsOptional, IsRecord, IsRecursive, IsUnion, IsValueLiteral, TypeError, UnionToTuple } from "@confect/core/Types";
|
|
6
|
+
|
|
7
|
+
//#region src/SchemaToValidator.d.ts
|
|
8
|
+
declare namespace SchemaToValidator_d_exports {
|
|
9
|
+
export { EmptyTupleIsNotSupportedError, IndexSignaturesAreNotSupportedError, MixedIndexAndPropertySignaturesAreNotSupportedError, OptionalTupleElementsAreNotSupportedError, ReadonlyRecordValue, ReadonlyValue, TableSchemaToTableValidator, TopLevelMustBeObjectError, TopLevelMustBeObjectOrUnionError, UndefinedOrValueToValidator, UnsupportedPropertySignatureKeyTypeError, UnsupportedSchemaTypeError, ValueToValidator, compileArgsSchema, compileAst, compileReturnsSchema, compileSchema, compileTableSchema, isRecursive };
|
|
10
|
+
}
|
|
11
|
+
declare const compileArgsSchema: <ConfectValue, ConvexValue>(argsSchema: Schema.Schema<ConfectValue, ConvexValue>) => PropertyValidators;
|
|
12
|
+
declare const compileReturnsSchema: <ConfectValue, ConvexValue>(schema: Schema.Schema<ConfectValue, ConvexValue>) => Validator<any, any, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Convert a table `Schema` to a table `Validator`.
|
|
15
|
+
*/
|
|
16
|
+
type TableSchemaToTableValidator<TableSchema extends Schema.Schema.AnyNoContext> = ValueToValidator<TableSchema["Encoded"]> extends infer Vd extends VObject<any, any, any, any> | VUnion<any, any, any, any> ? Vd : never;
|
|
17
|
+
declare const compileTableSchema: <TableSchema extends Schema.Schema.AnyNoContext>(schema: TableSchema) => TableSchemaToTableValidator<TableSchema>;
|
|
18
|
+
type ReadonlyValue = string | number | bigint | boolean | ArrayBuffer | ReadonlyArrayValue | ReadonlyRecordValue | null;
|
|
19
|
+
type ReadonlyArrayValue = readonly ReadonlyValue[];
|
|
20
|
+
type ReadonlyRecordValue = {
|
|
21
|
+
readonly [key: string]: ReadonlyValue | undefined;
|
|
22
|
+
};
|
|
23
|
+
type ValueToValidator<Vl$1> = IsRecursive<Vl$1> extends true ? VAny : [Vl$1] extends [never] ? never : IsAny<Vl$1> extends true ? VAny : [Vl$1] extends [ReadonlyValue] ? Vl$1 extends {
|
|
24
|
+
__tableName: infer TableName extends string;
|
|
25
|
+
} ? VId<GenericId$1.GenericId<TableName>> : IsValueLiteral<Vl$1> extends true ? VLiteral<Vl$1> : [Vl$1] extends [null] ? VNull : [Vl$1] extends [boolean] ? VBoolean : IsUnion<Vl$1> extends true ? UnionValueToValidator<Vl$1> : [Vl$1] extends [number] ? VFloat64 : [Vl$1] extends [bigint] ? VInt64 : [Vl$1] extends [string] ? VString : [Vl$1] extends [ArrayBuffer] ? VBytes : Vl$1 extends ReadonlyArray<ReadonlyValue> ? ArrayValueToValidator<Vl$1> : Vl$1 extends ReadonlyRecordValue ? RecordValueToValidator<Vl$1> : TypeError<"Unexpected value", Vl$1> : TypeError<"Provided value is not a valid Convex value", Vl$1>;
|
|
26
|
+
type ArrayValueToValidator<Vl$1 extends ReadonlyArray<ReadonlyValue>> = Vl$1 extends ReadonlyArray<infer El extends ReadonlyValue> ? ValueToValidator<El> extends infer Vd extends Validator<any, any, any> ? VArray<DeepMutable<El[]>, Vd> : never : never;
|
|
27
|
+
type RecordValueToValidator<Vl$1> = Vl$1 extends ReadonlyRecordValue ? { -readonly [K in keyof Vl$1]-?: IsAny<Vl$1[K]> extends true ? IsOptional<Vl$1, K> extends true ? VOptional<VAny> : VAny : UndefinedOrValueToValidator<Vl$1[K]> } extends infer VdRecord extends Record<string, any> ? { -readonly [K in keyof Vl$1]: undefined extends Vl$1[K] ? DeepMutable<Exclude<Vl$1[K], undefined>> : DeepMutable<Vl$1[K]> } extends infer VlRecord extends Record<string, any> ? IsRecord<VlRecord> extends true ? VRecord<VlRecord, VString, VdRecord[keyof VdRecord]> : VObject<VlRecord, VdRecord> : never : never : never;
|
|
28
|
+
type UndefinedOrValueToValidator<Vl$1 extends ReadonlyValue | undefined> = undefined extends Vl$1 ? [Vl$1] extends [(infer Val extends ReadonlyValue) | undefined] ? ValueToValidator<Val> extends infer Vd extends Validator<any, "required", any> ? VOptional<Vd> : never : never : [Vl$1] extends [ReadonlyValue] ? ValueToValidator<Vl$1> : never;
|
|
29
|
+
type UnionValueToValidator<Vl$1 extends ReadonlyValue> = [Vl$1] extends [ReadonlyValue] ? IsUnion<Vl$1> extends true ? UnionToTuple<Vl$1> extends infer VlTuple extends ReadonlyArray<ReadonlyValue> ? ValueTupleToValidatorTuple<VlTuple> extends infer VdTuple extends Validator<any, "required", any>[] ? VUnion<DeepMutable<Vl$1>, VdTuple> : TypeError<"Failed to convert value tuple to validator tuple"> : TypeError<"Failed to convert union to tuple"> : TypeError<"Expected a union of values, but got a single value instead"> : TypeError<"Provided value is not a valid Convex value">;
|
|
30
|
+
type ValueTupleToValidatorTuple<VlTuple$1 extends ReadonlyArray<ReadonlyValue>> = VlTuple$1 extends [true, false, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] | [false, true, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] ? ValueTupleToValidatorTuple<VlRest> extends infer VdRest extends Validator<any, any, any>[] ? [VBoolean<boolean>, ...VdRest] : never : VlTuple$1 extends [infer Vl extends ReadonlyValue, ...infer VlRest extends ReadonlyArray<ReadonlyValue>] ? ValueToValidator<Vl> extends infer Vd extends Validator<any, any, any> ? ValueTupleToValidatorTuple<VlRest> extends infer VdRest extends Validator<any, "required", any>[] ? [Vd, ...VdRest] : never : never : [];
|
|
31
|
+
declare const compileSchema: <T, E>(schema: Schema.Schema<T, E>) => ValueToValidator<(typeof schema)["Encoded"]>;
|
|
32
|
+
declare const isRecursive: (ast: SchemaAST.AST) => boolean;
|
|
33
|
+
declare const compileAst: (ast: SchemaAST.AST, isOptionalPropertyOfTypeLiteral?: boolean) => Effect.Effect<Validator<any, any, any>, UnsupportedSchemaTypeError | UnsupportedPropertySignatureKeyTypeError | IndexSignaturesAreNotSupportedError | MixedIndexAndPropertySignaturesAreNotSupportedError | OptionalTupleElementsAreNotSupportedError | EmptyTupleIsNotSupportedError>;
|
|
34
|
+
declare const TopLevelMustBeObjectError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
35
|
+
readonly _tag: "TopLevelMustBeObjectError";
|
|
36
|
+
} & Readonly<A>;
|
|
37
|
+
declare class TopLevelMustBeObjectError extends TopLevelMustBeObjectError_base {
|
|
38
|
+
get message(): string;
|
|
39
|
+
}
|
|
40
|
+
declare const TopLevelMustBeObjectOrUnionError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
41
|
+
readonly _tag: "TopLevelMustBeObjectOrUnionError";
|
|
42
|
+
} & Readonly<A>;
|
|
43
|
+
declare class TopLevelMustBeObjectOrUnionError extends TopLevelMustBeObjectOrUnionError_base {
|
|
44
|
+
get message(): string;
|
|
45
|
+
}
|
|
46
|
+
declare const UnsupportedPropertySignatureKeyTypeError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
47
|
+
readonly _tag: "UnsupportedPropertySignatureKeyTypeError";
|
|
48
|
+
} & Readonly<A>;
|
|
49
|
+
declare class UnsupportedPropertySignatureKeyTypeError extends UnsupportedPropertySignatureKeyTypeError_base<{
|
|
50
|
+
readonly propertyKey: number | symbol;
|
|
51
|
+
}> {
|
|
52
|
+
get message(): string;
|
|
53
|
+
}
|
|
54
|
+
declare const EmptyTupleIsNotSupportedError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
55
|
+
readonly _tag: "EmptyTupleIsNotSupportedError";
|
|
56
|
+
} & Readonly<A>;
|
|
57
|
+
declare class EmptyTupleIsNotSupportedError extends EmptyTupleIsNotSupportedError_base {
|
|
58
|
+
get message(): string;
|
|
59
|
+
}
|
|
60
|
+
declare const UnsupportedSchemaTypeError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
61
|
+
readonly _tag: "UnsupportedSchemaTypeError";
|
|
62
|
+
} & Readonly<A>;
|
|
63
|
+
declare class UnsupportedSchemaTypeError extends UnsupportedSchemaTypeError_base<{
|
|
64
|
+
readonly schemaType: SchemaAST.AST["_tag"];
|
|
65
|
+
}> {
|
|
66
|
+
get message(): string;
|
|
67
|
+
}
|
|
68
|
+
declare const IndexSignaturesAreNotSupportedError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
69
|
+
readonly _tag: "IndexSignaturesAreNotSupportedError";
|
|
70
|
+
} & Readonly<A>;
|
|
71
|
+
declare class IndexSignaturesAreNotSupportedError extends IndexSignaturesAreNotSupportedError_base {
|
|
72
|
+
get message(): string;
|
|
73
|
+
}
|
|
74
|
+
declare const MixedIndexAndPropertySignaturesAreNotSupportedError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
75
|
+
readonly _tag: "MixedIndexAndPropertySignaturesAreNotSupportedError";
|
|
76
|
+
} & Readonly<A>;
|
|
77
|
+
declare class MixedIndexAndPropertySignaturesAreNotSupportedError extends MixedIndexAndPropertySignaturesAreNotSupportedError_base {
|
|
78
|
+
get message(): string;
|
|
79
|
+
}
|
|
80
|
+
declare const OptionalTupleElementsAreNotSupportedError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => Cause.YieldableError & {
|
|
81
|
+
readonly _tag: "OptionalTupleElementsAreNotSupportedError";
|
|
82
|
+
} & Readonly<A>;
|
|
83
|
+
declare class OptionalTupleElementsAreNotSupportedError extends OptionalTupleElementsAreNotSupportedError_base {
|
|
84
|
+
get message(): string;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { EmptyTupleIsNotSupportedError, IndexSignaturesAreNotSupportedError, MixedIndexAndPropertySignaturesAreNotSupportedError, OptionalTupleElementsAreNotSupportedError, ReadonlyRecordValue, ReadonlyValue, SchemaToValidator_d_exports, TableSchemaToTableValidator, TopLevelMustBeObjectError, TopLevelMustBeObjectOrUnionError, UndefinedOrValueToValidator, UnsupportedPropertySignatureKeyTypeError, UnsupportedSchemaTypeError, ValueToValidator, compileArgsSchema, compileAst, compileReturnsSchema, compileSchema, compileTableSchema, isRecursive };
|
|
88
|
+
//# sourceMappingURL=SchemaToValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaToValidator.d.ts","names":[],"sources":["../src/SchemaToValidator.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAmDa,2DACC,MAAA,CAAO,OAAO,cAAc,iBACvC;cAkBU,0DACH,MAAA,CAAO,OAAO,cAAc,iBACnC;;;;KAQS,gDACU,MAAA,CAAO,MAAA,CAAO,gBAElC,iBAAiB,iDACb,8BACA,6BACA;cAIO,yCACS,MAAA,CAAO,MAAA,CAAO,sBAE1B,gBACP,4BAA4B;KAmBnB,aAAA,wCAKR,cACA,qBACA;KAGC,kBAAA,YAA8B;KAEvB,mBAAA;0BACc;;KAGd,yBACV,YAAY,qBACR,QACC,gCAEC,MAAM,qBACJ,QACC,eAAa,iBACZ;;IAGE,IAAI,WAAA,CAAU,UAAU,cACxB,eAAe,qBACb,SAAS,SACR,uBACC,SACC,0BACC,WACA,QAAQ,qBACN,sBAAsB,SACrB,yBACC,YACC,yBACC,UACC,yBACC,WACC,eAAa,eACZ,SACA,aAAW,cAAc,iBACvB,sBAAsB,QACtB,aAAW,sBACT,uBAAuB,QACvB,8BAA8B,QACpD,wDAAwD;KAE/D,mCAAiC,cAAc,kBAClD,aAAW,+BAA+B,iBACtC,iBAAiB,6BAA6B,2BAC5C,OAAO,YAAY,OAAO;KAI7B,+BAA6B,aAAW,8CAEjB,SAAO,MAAM,KAAG,mBAClC,WAAW,MAAI,kBACb,UAAU,QACV,OACF,4BAA4B,KAAG,qCACJ,8CAEP,yBAAuB,KAAG,KAC5C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