@gaganref/confect-server 10.3.1-fork.4 → 10.3.1-fork.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionCtx.d.ts +1 -1
- package/dist/ActionCtx.d.ts.map +1 -1
- package/dist/ActionCtx.js.map +1 -1
- package/dist/AiGatewayDecisionClient.d.ts +2 -2
- package/dist/AiGatewayDecisionClient.d.ts.map +1 -1
- package/dist/AiGatewayDecisionClient.js.map +1 -1
- package/dist/AiGatewayLanguageClient.d.ts +2 -2
- package/dist/AiGatewayLanguageClient.d.ts.map +1 -1
- package/dist/AiGatewayLanguageClient.js.map +1 -1
- package/dist/Auth.d.ts +1 -1
- package/dist/Auth.d.ts.map +1 -1
- package/dist/Auth.js.map +1 -1
- package/dist/ComponentCtx.d.ts +1 -1
- package/dist/ComponentCtx.d.ts.map +1 -1
- package/dist/ConvexFunctionDefinitions.d.ts +4 -4
- package/dist/ConvexFunctionDefinitions.d.ts.map +1 -1
- package/dist/ConvexFunctionDefinitions.js.map +1 -1
- package/dist/CronJobs.d.ts +1 -1
- package/dist/CronJobs.d.ts.map +1 -1
- package/dist/CronJobs.js.map +1 -1
- package/dist/DataModel.d.ts +3 -3
- package/dist/DataModel.d.ts.map +1 -1
- package/dist/DataModel.js.map +1 -1
- package/dist/DatabaseReader.d.ts +4 -4
- package/dist/DatabaseReader.d.ts.map +1 -1
- package/dist/DatabaseReader.js.map +1 -1
- package/dist/DatabaseSchema.d.ts +1 -1
- package/dist/DatabaseSchema.d.ts.map +1 -1
- package/dist/DatabaseSchema.js.map +1 -1
- package/dist/DatabaseWriter.d.ts +5 -5
- package/dist/DatabaseWriter.d.ts.map +1 -1
- package/dist/DatabaseWriter.js.map +1 -1
- package/dist/Document.d.ts +4 -4
- package/dist/Document.d.ts.map +1 -1
- package/dist/Document.js.map +1 -1
- package/dist/FunctionImpl.d.ts +2 -2
- package/dist/FunctionImpl.d.ts.map +1 -1
- package/dist/FunctionImpl.js.map +1 -1
- package/dist/FunctionRegistryItem.d.ts +1 -1
- package/dist/FunctionRegistryItem.d.ts.map +1 -1
- package/dist/FunctionRegistryItem.js.map +1 -1
- package/dist/GroupImpl.d.ts +3 -3
- package/dist/GroupImpl.d.ts.map +1 -1
- package/dist/GroupImpl.js.map +1 -1
- package/dist/GroupRegistry.d.ts +2 -2
- package/dist/GroupRegistry.d.ts.map +1 -1
- package/dist/GroupRegistry.js.map +1 -1
- package/dist/Handler.d.ts +23 -23
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js.map +1 -1
- package/dist/HttpRouter.d.ts +13 -13
- package/dist/HttpRouter.d.ts.map +1 -1
- package/dist/HttpRouter.js.map +1 -1
- package/dist/MiddlewareImpl.d.ts +14 -14
- package/dist/MiddlewareImpl.d.ts.map +1 -1
- package/dist/MiddlewareImpl.js.map +1 -1
- package/dist/MutationCtx.d.ts +1 -1
- package/dist/MutationCtx.d.ts.map +1 -1
- package/dist/MutationCtx.js.map +1 -1
- package/dist/MutationRunner.d.ts +1 -1
- package/dist/MutationRunner.d.ts.map +1 -1
- package/dist/MutationRunner.js.map +1 -1
- package/dist/MutationTransactionContext.d.ts +2 -2
- package/dist/MutationTransactionContext.d.ts.map +1 -1
- package/dist/MutationTransactionContext.js.map +1 -1
- package/dist/OrderedQuery.d.ts +4 -4
- package/dist/OrderedQuery.d.ts.map +1 -1
- package/dist/OrderedQuery.js.map +1 -1
- package/dist/QueryCtx.d.ts +1 -1
- package/dist/QueryCtx.d.ts.map +1 -1
- package/dist/QueryCtx.js.map +1 -1
- package/dist/QueryInitializer.d.ts +10 -10
- package/dist/QueryInitializer.d.ts.map +1 -1
- package/dist/QueryInitializer.js.map +1 -1
- package/dist/QueryRunner.d.ts +2 -2
- package/dist/QueryRunner.d.ts.map +1 -1
- package/dist/QueryRunner.js.map +1 -1
- package/dist/QueryStream.d.ts +11 -11
- package/dist/QueryStream.d.ts.map +1 -1
- package/dist/QueryStream.js.map +1 -1
- package/dist/QueryStreamCursor.d.ts +2 -2
- package/dist/QueryStreamCursor.d.ts.map +1 -1
- package/dist/QueryStreamCursor.js.map +1 -1
- package/dist/QueryStreamIndexPrefix.d.ts +2 -2
- package/dist/QueryStreamIndexPrefix.d.ts.map +1 -1
- package/dist/QueryStreamIndexPrefix.js.map +1 -1
- package/dist/QueryStreamIndexRange.d.ts +4 -4
- package/dist/QueryStreamIndexRange.d.ts.map +1 -1
- package/dist/QueryStreamIndexRange.js.map +1 -1
- package/dist/QueryStreamKey.d.ts +2 -2
- package/dist/QueryStreamKey.d.ts.map +1 -1
- package/dist/QueryStreamKey.js.map +1 -1
- package/dist/QueryStreamKeyBounds.d.ts +3 -3
- package/dist/QueryStreamKeyBounds.d.ts.map +1 -1
- package/dist/QueryStreamKeyBounds.js.map +1 -1
- package/dist/QueryStreamKeyLayout.d.ts +1 -1
- package/dist/QueryStreamKeyLayout.d.ts.map +1 -1
- package/dist/QueryStreamKeyLayout.js.map +1 -1
- package/dist/QueryStreamKeyValues.d.ts +1 -1
- package/dist/QueryStreamKeyValues.d.ts.map +1 -1
- package/dist/QueryStreamKeyValues.js.map +1 -1
- package/dist/QueryStreamPagination.d.ts +1 -1
- package/dist/QueryStreamPagination.d.ts.map +1 -1
- package/dist/QueryStreamPagination.js.map +1 -1
- package/dist/RegisteredConvexFunction.d.ts +20 -20
- package/dist/RegisteredConvexFunction.d.ts.map +1 -1
- package/dist/RegisteredConvexFunction.js.map +1 -1
- package/dist/RegisteredFunction.d.ts +26 -26
- package/dist/RegisteredFunction.d.ts.map +1 -1
- package/dist/RegisteredFunction.js.map +1 -1
- package/dist/RegisteredFunctions.d.ts +3 -3
- package/dist/RegisteredFunctions.d.ts.map +1 -1
- package/dist/RegisteredFunctions.js.map +1 -1
- package/dist/RegisteredNodeFunction.d.ts +6 -6
- package/dist/RegisteredNodeFunction.d.ts.map +1 -1
- package/dist/RegisteredNodeFunction.js.map +1 -1
- package/dist/Registry.d.ts +1 -1
- package/dist/Registry.d.ts.map +1 -1
- package/dist/Registry.js.map +1 -1
- package/dist/RegistryItems.js.map +1 -1
- package/dist/ResolvedMiddleware.d.ts +2 -2
- package/dist/ResolvedMiddleware.d.ts.map +1 -1
- package/dist/ResolvedMiddleware.js.map +1 -1
- package/dist/Storage.d.ts +6 -6
- package/dist/Storage.d.ts.map +1 -1
- package/dist/Storage.js.map +1 -1
- package/dist/StorageActionWriter.d.ts +1 -1
- package/dist/StorageActionWriter.d.ts.map +1 -1
- package/dist/StorageActionWriter.js.map +1 -1
- package/dist/StorageReader.d.ts +1 -1
- package/dist/StorageReader.d.ts.map +1 -1
- package/dist/StorageReader.js.map +1 -1
- package/dist/StorageWriter.d.ts +1 -1
- package/dist/StorageWriter.d.ts.map +1 -1
- package/dist/StorageWriter.js.map +1 -1
- package/dist/TableInfo.d.ts +2 -2
- package/dist/TableInfo.d.ts.map +1 -1
- package/dist/TableInfo.js.map +1 -1
- package/dist/VectorSearch.d.ts +1 -1
- package/dist/VectorSearch.d.ts.map +1 -1
- package/dist/VectorSearch.js.map +1 -1
- package/dist/index.d.ts +60 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/AiGatewayDecisionClient.d.ts +1 -1
- package/dist/internal/AiGatewayDecisionClient.d.ts.map +1 -1
- package/dist/internal/AiGatewayDecisionClient.js.map +1 -1
- package/dist/internal/AiGatewayLanguageClient.d.ts +1 -1
- package/dist/internal/AiGatewayLanguageClient.d.ts.map +1 -1
- package/dist/internal/AiGatewayLanguageClient.js.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ActionCtx.ts +1 -1
- package/src/AiGatewayDecisionClient.ts +3 -3
- package/src/AiGatewayLanguageClient.ts +3 -3
- package/src/Auth.ts +1 -1
- package/src/ComponentCtx.ts +1 -1
- package/src/ConvexFunctionDefinitions.ts +8 -8
- package/src/CronJobs.ts +1 -1
- package/src/DataModel.ts +3 -3
- package/src/DatabaseReader.ts +4 -4
- package/src/DatabaseSchema.ts +1 -1
- package/src/DatabaseWriter.ts +6 -6
- package/src/Document.ts +4 -4
- package/src/FunctionImpl.ts +5 -5
- package/src/FunctionRegistryItem.ts +1 -1
- package/src/GroupImpl.ts +5 -5
- package/src/GroupRegistry.ts +4 -4
- package/src/Handler.ts +23 -23
- package/src/HttpRouter.ts +17 -17
- package/src/MiddlewareImpl.ts +17 -17
- package/src/MutationCtx.ts +1 -1
- package/src/MutationRunner.ts +1 -1
- package/src/MutationTransactionContext.ts +2 -2
- package/src/OrderedQuery.ts +4 -4
- package/src/QueryCtx.ts +1 -1
- package/src/QueryInitializer.ts +9 -9
- package/src/QueryRunner.ts +2 -2
- package/src/QueryStream.ts +15 -15
- package/src/QueryStreamCursor.ts +3 -3
- package/src/QueryStreamIndexPrefix.ts +2 -2
- package/src/QueryStreamIndexRange.ts +4 -4
- package/src/QueryStreamKey.ts +2 -2
- package/src/QueryStreamKeyBounds.ts +3 -3
- package/src/QueryStreamKeyLayout.ts +1 -1
- package/src/QueryStreamKeyValues.ts +1 -1
- package/src/QueryStreamPagination.ts +2 -2
- package/src/RegisteredConvexFunction.ts +21 -21
- package/src/RegisteredFunction.ts +18 -18
- package/src/RegisteredFunctions.ts +4 -4
- package/src/RegisteredNodeFunction.ts +8 -8
- package/src/Registry.ts +1 -1
- package/src/RegistryItems.ts +2 -2
- package/src/ResolvedMiddleware.ts +2 -2
- package/src/Storage.ts +3 -3
- package/src/StorageActionWriter.ts +1 -1
- package/src/StorageReader.ts +1 -1
- package/src/StorageWriter.ts +1 -1
- package/src/TableInfo.ts +2 -2
- package/src/VectorSearch.ts +1 -1
- package/src/index.ts +60 -60
- package/src/internal/AiGatewayDecisionClient.ts +2 -2
- package/src/internal/AiGatewayLanguageClient.ts +2 -2
- package/src/node.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvedMiddleware.js","names":[],"sources":["../src/ResolvedMiddleware.ts"],"sourcesContent":["import * as MiddlewareAttachment from \"@confect/core/MiddlewareAttachment\";\nimport type * as MiddlewareSpec from \"@confect/core/MiddlewareSpec\";\nimport * as Result from \"effect/Result\";\nimport type * as FunctionRegistryItem from \"./FunctionRegistryItem\";\nimport type * as MiddlewareRegistryItem from \"./MiddlewareRegistryItem\";\n\n/**\n * A middleware spec paired with its implementation for one function's type—the\n * resolved form consumed by runtime-specific function preparation.\n */\nexport interface ResolvedMiddleware {\n readonly middlewareSpec: MiddlewareSpec.AnyMiddlewareSpec;\n readonly middlewareImpl: MiddlewareSpec.AnyMiddlewareImpl;\n readonly options?: unknown;\n}\n\n/**\n * Pair each middleware spec attached to a function with its registered\n * implementation for the function's type. Both misses are ruled out by the type\n * system (`GroupImpl.finalize` demands every attached middleware's\n * `MiddlewareImpl` service; `MiddlewareImpl.make`/`makeByFunctionType` cover\n * exactly the declared functionTypes, which `GroupSpec.middleware` requires to\n * cover every function). Spec identity is checked separately because\n * implementation services are keyed by string, so the type system cannot\n * distinguish same-key specs.\n */\nexport const resolve = (\n functionRegistryItem: FunctionRegistryItem.ConfectFunctionRegistryItem,\n middlewareRegistryItems: ReadonlyMap<\n string,\n MiddlewareRegistryItem.MiddlewareRegistryItem\n >,\n): ReadonlyArray<ResolvedMiddleware> => {\n Result.getOrThrowWith(\n MiddlewareAttachment.validateAll(\n functionRegistryItem.middlewareAttachments,\n `function \"${functionRegistryItem.name}\"`,\n ),\n (error) => new Error(MiddlewareAttachment.formatValidationError(error)),\n );\n return functionRegistryItem.middlewareAttachments.map(\n ({ spec: middlewareSpec, options }) => {\n const registered = middlewareRegistryItems.get(middlewareSpec.key);\n if (registered === undefined) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" is attached to this group's spec, but no implementation was provided—pipe the group's impl through \\`Layer.provide(MiddlewareImpl.make(...))\\` (or \\`makeByFunctionType\\`/\\`provides\\`).`,\n );\n }\n if (registered.middlewareSpec !== middlewareSpec) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" attached to function \"${functionRegistryItem.name}\" has an implementation registered for a different spec with the same key. Register the implementation using the attached middleware spec.`,\n );\n }\n\n const middlewareImpl =\n registered.impls[functionRegistryItem.functionType];\n if (middlewareImpl === undefined) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" has no implementation for function type \"${functionRegistryItem.functionType}\", the type of function \"${functionRegistryItem.name}\". Declare the function type in the middleware's \\`functionTypes\\` and cover it in \\`MiddlewareImpl.makeByFunctionType\\`.`,\n );\n }\n\n return {\n middlewareImpl,\n middlewareSpec,\n options,\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,MAAa,WACX,sBACA,4BAIsC;CACtC,OAAO,eACL,qBAAqB,YACnB,qBAAqB,uBACrB,aAAa,qBAAqB,KAAK,EACzC,IACC,UAAU,IAAI,MAAM,qBAAqB,sBAAsB,KAAK,CAAC,CACxE;CACA,OAAO,qBAAqB,sBAAsB,KAC/C,EAAE,MAAM,gBAAgB,cAAc;EACrC,MAAM,aAAa,wBAAwB,IAAI,eAAe,GAAG;EACjE,IAAI,eAAe,KAAA,GACjB,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,2LACpC;EAEF,IAAI,WAAW,mBAAmB,gBAChC,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,0BAA0B,qBAAqB,KAAK,2IACxF;EAGF,MAAM,iBACJ,WAAW,MAAM,qBAAqB;EACxC,IAAI,mBAAmB,KAAA,GACrB,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,6CAA6C,qBAAqB,aAAa,2BAA2B,qBAAqB,KAAK,0HACxK;EAGF,OAAO;GACL;GACA;GACA;EACF;CACF,CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"ResolvedMiddleware.js","names":[],"sources":["../src/ResolvedMiddleware.ts"],"sourcesContent":["import * as MiddlewareAttachment from \"@confect/core/MiddlewareAttachment\";\nimport type * as MiddlewareSpec from \"@confect/core/MiddlewareSpec\";\nimport * as Result from \"effect/Result\";\nimport type * as FunctionRegistryItem from \"./FunctionRegistryItem.js\";\nimport type * as MiddlewareRegistryItem from \"./MiddlewareRegistryItem.js\";\n\n/**\n * A middleware spec paired with its implementation for one function's type—the\n * resolved form consumed by runtime-specific function preparation.\n */\nexport interface ResolvedMiddleware {\n readonly middlewareSpec: MiddlewareSpec.AnyMiddlewareSpec;\n readonly middlewareImpl: MiddlewareSpec.AnyMiddlewareImpl;\n readonly options?: unknown;\n}\n\n/**\n * Pair each middleware spec attached to a function with its registered\n * implementation for the function's type. Both misses are ruled out by the type\n * system (`GroupImpl.finalize` demands every attached middleware's\n * `MiddlewareImpl` service; `MiddlewareImpl.make`/`makeByFunctionType` cover\n * exactly the declared functionTypes, which `GroupSpec.middleware` requires to\n * cover every function). Spec identity is checked separately because\n * implementation services are keyed by string, so the type system cannot\n * distinguish same-key specs.\n */\nexport const resolve = (\n functionRegistryItem: FunctionRegistryItem.ConfectFunctionRegistryItem,\n middlewareRegistryItems: ReadonlyMap<\n string,\n MiddlewareRegistryItem.MiddlewareRegistryItem\n >,\n): ReadonlyArray<ResolvedMiddleware> => {\n Result.getOrThrowWith(\n MiddlewareAttachment.validateAll(\n functionRegistryItem.middlewareAttachments,\n `function \"${functionRegistryItem.name}\"`,\n ),\n (error) => new Error(MiddlewareAttachment.formatValidationError(error)),\n );\n return functionRegistryItem.middlewareAttachments.map(\n ({ spec: middlewareSpec, options }) => {\n const registered = middlewareRegistryItems.get(middlewareSpec.key);\n if (registered === undefined) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" is attached to this group's spec, but no implementation was provided—pipe the group's impl through \\`Layer.provide(MiddlewareImpl.make(...))\\` (or \\`makeByFunctionType\\`/\\`provides\\`).`,\n );\n }\n if (registered.middlewareSpec !== middlewareSpec) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" attached to function \"${functionRegistryItem.name}\" has an implementation registered for a different spec with the same key. Register the implementation using the attached middleware spec.`,\n );\n }\n\n const middlewareImpl =\n registered.impls[functionRegistryItem.functionType];\n if (middlewareImpl === undefined) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" has no implementation for function type \"${functionRegistryItem.functionType}\", the type of function \"${functionRegistryItem.name}\". Declare the function type in the middleware's \\`functionTypes\\` and cover it in \\`MiddlewareImpl.makeByFunctionType\\`.`,\n );\n }\n\n return {\n middlewareImpl,\n middlewareSpec,\n options,\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,MAAa,WACX,sBACA,4BAIsC;CACtC,OAAO,eACL,qBAAqB,YACnB,qBAAqB,uBACrB,aAAa,qBAAqB,KAAK,EACzC,IACC,UAAU,IAAI,MAAM,qBAAqB,sBAAsB,KAAK,CAAC,CACxE;CACA,OAAO,qBAAqB,sBAAsB,KAC/C,EAAE,MAAM,gBAAgB,cAAc;EACrC,MAAM,aAAa,wBAAwB,IAAI,eAAe,GAAG;EACjE,IAAI,eAAe,KAAA,GACjB,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,2LACpC;EAEF,IAAI,WAAW,mBAAmB,gBAChC,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,0BAA0B,qBAAqB,KAAK,2IACxF;EAGF,MAAM,iBACJ,WAAW,MAAM,qBAAqB;EACxC,IAAI,mBAAmB,KAAA,GACrB,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,6CAA6C,qBAAqB,aAAa,2BAA2B,qBAAqB,KAAK,0HACxK;EAGF,OAAO;GACL;GACA;GACA;EACF;CACF,CACF;AACF"}
|
package/dist/Storage.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import type { GenericId } from "convex/values";
|
|
|
3
3
|
import * as Context from "effect/Context";
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import { StorageActionWriter } from "./StorageActionWriter";
|
|
7
|
-
import { StorageReader } from "./StorageReader";
|
|
8
|
-
import { StorageWriter } from "./StorageWriter";
|
|
6
|
+
import { StorageActionWriter } from "./StorageActionWriter.js";
|
|
7
|
+
import { StorageReader } from "./StorageReader.js";
|
|
8
|
+
import { StorageWriter } from "./StorageWriter.js";
|
|
9
9
|
declare const Storage_base: Context.ServiceClass<Storage, "@confect/server/Storage", {
|
|
10
|
-
getUrl: (storageId: GenericId<"_storage">) => Effect.Effect<URL, import("./BlobNotFoundError").BlobNotFoundError, never>;
|
|
10
|
+
getUrl: (storageId: GenericId<"_storage">) => Effect.Effect<URL, import("./BlobNotFoundError.js").BlobNotFoundError, never>;
|
|
11
11
|
generateUploadUrl: Effect.Effect<URL, never, StorageWriter>;
|
|
12
|
-
delete: (storageId: GenericId<"_storage">) => Effect.Effect<void, import("./BlobNotFoundError").BlobNotFoundError, StorageWriter>;
|
|
13
|
-
get: (storageId: GenericId<"_storage">) => Effect.Effect<Blob, import("./BlobNotFoundError").BlobNotFoundError, StorageActionWriter>;
|
|
12
|
+
delete: (storageId: GenericId<"_storage">) => Effect.Effect<void, import("./BlobNotFoundError.js").BlobNotFoundError, StorageWriter>;
|
|
13
|
+
get: (storageId: GenericId<"_storage">) => Effect.Effect<Blob, import("./BlobNotFoundError.js").BlobNotFoundError, StorageActionWriter>;
|
|
14
14
|
store: (blob: Blob, options?: {
|
|
15
15
|
sha256?: string;
|
|
16
16
|
}) => Effect.Effect<GenericId<"_storage">, never, StorageActionWriter>;
|
package/dist/Storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../src/Storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../src/Storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;;;wBAU3B,SAAS,CAAC,UAAU,CAAC;qBAExB,SAAS,CAAC,UAAU,CAAC;kBAExB,IAAI,YAAY;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;;AAOrD,qBAAa,OAAQ,SAAQ,YAGC;CAAG;AAEjC,eAAO,MAAM,KAAK,kBAAmB,mBAAmB,uDAGrD,CAAC"}
|
package/dist/Storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Storage.js","names":[],"sources":["../src/Storage.ts"],"sourcesContent":["import type { StorageReader as ConvexStorageReader } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport { StorageActionWriter } from \"./StorageActionWriter\";\nimport { StorageReader } from \"./StorageReader\";\nimport { StorageWriter } from \"./StorageWriter\";\n\nconst make = Effect.gen(function* () {\n const reader = yield* StorageReader;\n return {\n getUrl: reader.getUrl,\n generateUploadUrl: Effect.flatMap(\n StorageWriter,\n (writer) => writer.generateUploadUrl,\n ),\n delete: (storageId: GenericId<\"_storage\">) =>\n Effect.flatMap(StorageWriter, (writer) => writer.delete(storageId)),\n get: (storageId: GenericId<\"_storage\">) =>\n Effect.flatMap(StorageActionWriter, (writer) => writer.get(storageId)),\n store: (blob: Blob, options?: { sha256?: string }) =>\n Effect.flatMap(StorageActionWriter, (writer) =>\n writer.store(blob, options),\n ),\n };\n});\n\nexport class Storage extends Context.Service<\n Storage,\n Effect.Success<typeof make>\n>()(\"@confect/server/Storage\") {}\n\nexport const layer = (storageReader: ConvexStorageReader) =>\n Layer.effect(Storage, make).pipe(\n Layer.provideMerge(StorageReader.layer(storageReader)),\n );\n"],"mappings":";;;;;;;;;;;;AASA,MAAM,OAAO,OAAO,IAAI,aAAa;CAEnC,OAAO;EACL,SAAQ,OAFY,cAAA,CAEL;EACf,mBAAmB,OAAO,QACxB,gBACC,WAAW,OAAO,iBACrB;EACA,SAAS,cACP,OAAO,QAAQ,gBAAgB,WAAW,OAAO,OAAO,SAAS,CAAC;EACpE,MAAM,cACJ,OAAO,QAAQ,sBAAsB,WAAW,OAAO,IAAI,SAAS,CAAC;EACvE,QAAQ,MAAY,YAClB,OAAO,QAAQ,sBAAsB,WACnC,OAAO,MAAM,MAAM,OAAO,CAC5B;CACJ;AACF,CAAC;AAED,IAAa,UAAb,cAA6B,QAAQ,QAGnC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAEhC,MAAa,SAAS,kBACpB,MAAM,OAAO,SAAS,IAAI,CAAC,CAAC,KAC1B,MAAM,aAAa,cAAc,MAAM,aAAa,CAAC,CACvD"}
|
|
1
|
+
{"version":3,"file":"Storage.js","names":[],"sources":["../src/Storage.ts"],"sourcesContent":["import type { StorageReader as ConvexStorageReader } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport { StorageActionWriter } from \"./StorageActionWriter.js\";\nimport { StorageReader } from \"./StorageReader.js\";\nimport { StorageWriter } from \"./StorageWriter.js\";\n\nconst make = Effect.gen(function* () {\n const reader = yield* StorageReader;\n return {\n getUrl: reader.getUrl,\n generateUploadUrl: Effect.flatMap(\n StorageWriter,\n (writer) => writer.generateUploadUrl,\n ),\n delete: (storageId: GenericId<\"_storage\">) =>\n Effect.flatMap(StorageWriter, (writer) => writer.delete(storageId)),\n get: (storageId: GenericId<\"_storage\">) =>\n Effect.flatMap(StorageActionWriter, (writer) => writer.get(storageId)),\n store: (blob: Blob, options?: { sha256?: string }) =>\n Effect.flatMap(StorageActionWriter, (writer) =>\n writer.store(blob, options),\n ),\n };\n});\n\nexport class Storage extends Context.Service<\n Storage,\n Effect.Success<typeof make>\n>()(\"@confect/server/Storage\") {}\n\nexport const layer = (storageReader: ConvexStorageReader) =>\n Layer.effect(Storage, make).pipe(\n Layer.provideMerge(StorageReader.layer(storageReader)),\n );\n"],"mappings":";;;;;;;;;;;;AASA,MAAM,OAAO,OAAO,IAAI,aAAa;CAEnC,OAAO;EACL,SAAQ,OAFY,cAAA,CAEL;EACf,mBAAmB,OAAO,QACxB,gBACC,WAAW,OAAO,iBACrB;EACA,SAAS,cACP,OAAO,QAAQ,gBAAgB,WAAW,OAAO,OAAO,SAAS,CAAC;EACpE,MAAM,cACJ,OAAO,QAAQ,sBAAsB,WAAW,OAAO,IAAI,SAAS,CAAC;EACvE,QAAQ,MAAY,YAClB,OAAO,QAAQ,sBAAsB,WACnC,OAAO,MAAM,MAAM,OAAO,CAC5B;CACJ;AACF,CAAC;AAED,IAAa,UAAb,cAA6B,QAAQ,QAGnC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAEhC,MAAa,SAAS,kBACpB,MAAM,OAAO,SAAS,IAAI,CAAC,CAAC,KAC1B,MAAM,aAAa,cAAc,MAAM,aAAa,CAAC,CACvD"}
|
|
@@ -4,7 +4,7 @@ import type { GenericId } from "convex/values";
|
|
|
4
4
|
import * as Context from "effect/Context";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
|
-
import { BlobNotFoundError } from "./BlobNotFoundError";
|
|
7
|
+
import { BlobNotFoundError } from "./BlobNotFoundError.js";
|
|
8
8
|
import type * as ScopedId from "@confect/core/GenericId";
|
|
9
9
|
export type Service<Scope extends IdScope.IdScope = IdScope.App> = {
|
|
10
10
|
get: (id: ScopedId.GenericId<"_storage", Scope>) => ReturnType<ReturnType<typeof make>["get"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageActionWriter.d.ts","sourceRoot":"","sources":["../src/StorageActionWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,IAAI,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StorageActionWriter.d.ts","sourceRoot":"","sources":["../src/StorageActionWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,IAAI,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEzD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI;IACjE,GAAG,EAAE,CACH,EAAE,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,KACtC,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,KAAK,EAAE,CACL,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAC1B,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;CAC3D,CAAC;AACF,MAAM,MAAM,QAAQ,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,IAAI,KAAK,SAAS,OAAO,CAAC,GAAG,GAC3E,mBAAmB,GACnB;IAAE,QAAQ,CAAC,4BAA4B,EAAE,KAAK,CAAA;CAAE,CAAC;AAErD,QAAA,MAAM,IAAI,wBAAyB,yBAAyB;IAC1D,GAAG,cAAc,SAAS,CAAC,UAAU,CAAC;IAYtC,KAAK,SAAS,IAAI,YAAY;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;CAEjD,CAAC;;qBAdgB,SAAS,CAAC,UAAU,CAAC;kBAYxB,IAAI,YAAY;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;;AAInD,qBAAa,mBAAoB,SAAQ,wBAGC;IACxC,MAAM,CAAC,QAAQ,CAAC,QAAQ,GACtB,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,OACxC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CACI;IAEzD,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAI,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,uBAC7C,yBAAyB,WACrC,KAAK,gDAKZ;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageActionWriter.js","names":[],"sources":["../src/StorageActionWriter.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageActionWriter as ConvexStorageActionWriter } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { flow } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n get: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"get\"]>;\n store: (\n blob: Blob,\n options?: { sha256?: string },\n ) => Effect.Effect<ScopedId.GenericId<\"_storage\", Scope>>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageActionWriter\n : { readonly \"~ScopedStorageActionWriter\": Scope };\n\nconst make = (storageActionWriter: ConvexStorageActionWriter) => ({\n get: (storageId: GenericId<\"_storage\">) =>\n Effect.promise(() => storageActionWriter.get(storageId)).pipe(\n Effect.andThen(\n flow(\n Option.fromNullishOr,\n Option.match({\n onNone: () => Effect.fail(new BlobNotFoundError({ id: storageId })),\n onSome: Effect.succeed,\n }),\n ),\n ),\n ),\n store: (blob: Blob, options?: { sha256?: string }) =>\n Effect.promise(() => storageActionWriter.store(blob, options)),\n});\n\nexport class StorageActionWriter extends Context.Service<\n StorageActionWriter,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageActionWriter\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageActionWriter\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageActionWriter: ConvexStorageActionWriter,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageActionWriter) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;AAwBA,MAAM,QAAQ,yBAAoD;CAChE,MAAM,cACJ,OAAO,cAAc,oBAAoB,IAAI,SAAS,CAAC,CAAC,CAAC,KACvD,OAAO,QACL,KACE,OAAO,eACP,OAAO,MAAM;EACX,cAAc,OAAO,KAAK,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC,CAAC;EAClE,QAAQ,OAAO;CACjB,CAAC,CACH,CACF,CACF;CACF,QAAQ,MAAY,YAClB,OAAO,cAAc,oBAAoB,MAAM,MAAM,OAAO,CAAC;AACjE;AAEA,IAAa,sBAAb,cAAyC,QAAQ,QAG/C,CAAC,CAAC,qCAAqC,CAAC,CAAC;CACzC,OAAgB,iBAGd,QAAQ,QAAQ,qCAAqC;CAEvD,OAAgB,SACd,qBACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,mBAAmB,CAC1B;AACJ"}
|
|
1
|
+
{"version":3,"file":"StorageActionWriter.js","names":[],"sources":["../src/StorageActionWriter.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageActionWriter as ConvexStorageActionWriter } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { flow } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError.js\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n get: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"get\"]>;\n store: (\n blob: Blob,\n options?: { sha256?: string },\n ) => Effect.Effect<ScopedId.GenericId<\"_storage\", Scope>>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageActionWriter\n : { readonly \"~ScopedStorageActionWriter\": Scope };\n\nconst make = (storageActionWriter: ConvexStorageActionWriter) => ({\n get: (storageId: GenericId<\"_storage\">) =>\n Effect.promise(() => storageActionWriter.get(storageId)).pipe(\n Effect.andThen(\n flow(\n Option.fromNullishOr,\n Option.match({\n onNone: () => Effect.fail(new BlobNotFoundError({ id: storageId })),\n onSome: Effect.succeed,\n }),\n ),\n ),\n ),\n store: (blob: Blob, options?: { sha256?: string }) =>\n Effect.promise(() => storageActionWriter.store(blob, options)),\n});\n\nexport class StorageActionWriter extends Context.Service<\n StorageActionWriter,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageActionWriter\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageActionWriter\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageActionWriter: ConvexStorageActionWriter,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageActionWriter) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;AAwBA,MAAM,QAAQ,yBAAoD;CAChE,MAAM,cACJ,OAAO,cAAc,oBAAoB,IAAI,SAAS,CAAC,CAAC,CAAC,KACvD,OAAO,QACL,KACE,OAAO,eACP,OAAO,MAAM;EACX,cAAc,OAAO,KAAK,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC,CAAC;EAClE,QAAQ,OAAO;CACjB,CAAC,CACH,CACF,CACF;CACF,QAAQ,MAAY,YAClB,OAAO,cAAc,oBAAoB,MAAM,MAAM,OAAO,CAAC;AACjE;AAEA,IAAa,sBAAb,cAAyC,QAAQ,QAG/C,CAAC,CAAC,qCAAqC,CAAC,CAAC;CACzC,OAAgB,iBAGd,QAAQ,QAAQ,qCAAqC;CAEvD,OAAgB,SACd,qBACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,mBAAmB,CAC1B;AACJ"}
|
package/dist/StorageReader.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { GenericId } from "convex/values";
|
|
|
4
4
|
import * as Context from "effect/Context";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
|
-
import { BlobNotFoundError } from "./BlobNotFoundError";
|
|
7
|
+
import { BlobNotFoundError } from "./BlobNotFoundError.js";
|
|
8
8
|
import type * as ScopedId from "@confect/core/GenericId";
|
|
9
9
|
export type Service<Scope extends IdScope.IdScope = IdScope.App> = {
|
|
10
10
|
getUrl: (id: ScopedId.GenericId<"_storage", Scope>) => ReturnType<ReturnType<typeof make>["getUrl"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageReader.d.ts","sourceRoot":"","sources":["../src/StorageReader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StorageReader.d.ts","sourceRoot":"","sources":["../src/StorageReader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEzD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI;IACjE,MAAM,EAAE,CACN,EAAE,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,KACtC,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpD,CAAC;AACF,MAAM,MAAM,QAAQ,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,IAAI,KAAK,SAAS,OAAO,CAAC,GAAG,GAC3E,aAAa,GACb;IAAE,QAAQ,CAAC,sBAAsB,EAAE,KAAK,CAAA;CAAE,CAAC;AAE/C,QAAA,MAAM,IAAI,kBAAmB,mBAAmB;IAC9C,MAAM,cAAc,SAAS,CAAC,UAAU,CAAC;CAiBzC,CAAC;;wBAjBmB,SAAS,CAAC,UAAU,CAAC;;AAmB3C,qBAAa,aAAc,SAAQ,kBAGC;IAClC,MAAM,CAAC,QAAQ,CAAC,QAAQ,GACtB,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,OACxC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CACF;IAEnD,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAI,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,iBACnD,mBAAmB,WACzB,KAAK,gDAKZ;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageReader.js","names":[],"sources":["../src/StorageReader.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageReader as ConvexStorageReader } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { flow, pipe } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n getUrl: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"getUrl\"]>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageReader\n : { readonly \"~ScopedStorageReader\": Scope };\n\nconst make = (storageReader: ConvexStorageReader) => ({\n getUrl: (storageId: GenericId<\"_storage\">) =>\n Effect.promise(() => storageReader.getUrl(storageId)).pipe(\n Effect.andThen(\n flow(\n Option.fromNullishOr,\n Option.match({\n onNone: () => Effect.fail(new BlobNotFoundError({ id: storageId })),\n onSome: (doc) =>\n pipe(\n doc,\n Schema.decodeEffect(Schema.URLFromString),\n Effect.catchTag(\"SchemaError\", Effect.die),\n ),\n }),\n ),\n ),\n ),\n});\n\nexport class StorageReader extends Context.Service<\n StorageReader,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageReader\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageReader\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageReader: ConvexStorageReader,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageReader) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;;AAqBA,MAAM,QAAQ,mBAAwC,EACpD,SAAS,cACP,OAAO,cAAc,cAAc,OAAO,SAAS,CAAC,CAAC,CAAC,KACpD,OAAO,QACL,KACE,OAAO,eACP,OAAO,MAAM;CACX,cAAc,OAAO,KAAK,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC,CAAC;CAClE,SAAS,QACP,KACE,KACA,OAAO,aAAa,OAAO,aAAa,GACxC,OAAO,SAAS,eAAe,OAAO,GAAG,CAC3C;AACJ,CAAC,CACH,CACF,CACF,EACJ;AAEA,IAAa,gBAAb,cAAmC,QAAQ,QAGzC,CAAC,CAAC,+BAA+B,CAAC,CAAC;CACnC,OAAgB,iBAGd,QAAQ,QAAQ,+BAA+B;CAEjD,OAAgB,SACd,eACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,aAAa,CACpB;AACJ"}
|
|
1
|
+
{"version":3,"file":"StorageReader.js","names":[],"sources":["../src/StorageReader.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageReader as ConvexStorageReader } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { flow, pipe } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError.js\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n getUrl: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"getUrl\"]>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageReader\n : { readonly \"~ScopedStorageReader\": Scope };\n\nconst make = (storageReader: ConvexStorageReader) => ({\n getUrl: (storageId: GenericId<\"_storage\">) =>\n Effect.promise(() => storageReader.getUrl(storageId)).pipe(\n Effect.andThen(\n flow(\n Option.fromNullishOr,\n Option.match({\n onNone: () => Effect.fail(new BlobNotFoundError({ id: storageId })),\n onSome: (doc) =>\n pipe(\n doc,\n Schema.decodeEffect(Schema.URLFromString),\n Effect.catchTag(\"SchemaError\", Effect.die),\n ),\n }),\n ),\n ),\n ),\n});\n\nexport class StorageReader extends Context.Service<\n StorageReader,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageReader\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageReader\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageReader: ConvexStorageReader,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageReader) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;;AAqBA,MAAM,QAAQ,mBAAwC,EACpD,SAAS,cACP,OAAO,cAAc,cAAc,OAAO,SAAS,CAAC,CAAC,CAAC,KACpD,OAAO,QACL,KACE,OAAO,eACP,OAAO,MAAM;CACX,cAAc,OAAO,KAAK,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC,CAAC;CAClE,SAAS,QACP,KACE,KACA,OAAO,aAAa,OAAO,aAAa,GACxC,OAAO,SAAS,eAAe,OAAO,GAAG,CAC3C;AACJ,CAAC,CACH,CACF,CACF,EACJ;AAEA,IAAa,gBAAb,cAAmC,QAAQ,QAGzC,CAAC,CAAC,+BAA+B,CAAC,CAAC;CACnC,OAAgB,iBAGd,QAAQ,QAAQ,+BAA+B;CAEjD,OAAgB,SACd,eACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,aAAa,CACpB;AACJ"}
|
package/dist/StorageWriter.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { GenericId } from "convex/values";
|
|
|
4
4
|
import * as Context from "effect/Context";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
|
-
import { BlobNotFoundError } from "./BlobNotFoundError";
|
|
7
|
+
import { BlobNotFoundError } from "./BlobNotFoundError.js";
|
|
8
8
|
import type * as ScopedId from "@confect/core/GenericId";
|
|
9
9
|
export type Service<Scope extends IdScope.IdScope = IdScope.App> = {
|
|
10
10
|
generateUploadUrl: ReturnType<typeof make>["generateUploadUrl"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageWriter.d.ts","sourceRoot":"","sources":["../src/StorageWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StorageWriter.d.ts","sourceRoot":"","sources":["../src/StorageWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEzD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI;IACjE,iBAAiB,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAChE,MAAM,EAAE,CACN,EAAE,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,KACtC,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpD,CAAC;AACF,MAAM,MAAM,QAAQ,CAAC,KAAK,SAAS,OAAO,CAAC,OAAO,IAAI,KAAK,SAAS,OAAO,CAAC,GAAG,GAC3E,aAAa,GACb;IAAE,QAAQ,CAAC,sBAAsB,EAAE,KAAK,CAAA;CAAE,CAAC;AAE/C,QAAA,MAAM,IAAI,kBAAmB,mBAAmB;IAC9C,iBAAiB;IAWjB,MAAM,cAAc,SAAS,CAAC,UAAU,CAAC;CAKzC,CAAC;;;wBALmB,SAAS,CAAC,UAAU,CAAC;;AAO3C,qBAAa,aAAc,SAAQ,kBAGC;IAClC,MAAM,CAAC,QAAQ,CAAC,QAAQ,GACtB,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,OACxC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CACF;IAEnD,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAI,KAAK,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,iBACnD,mBAAmB,WACzB,KAAK,gDAKZ;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageWriter.js","names":[],"sources":["../src/StorageWriter.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageWriter as ConvexStorageWriter } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { pipe } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n generateUploadUrl: ReturnType<typeof make>[\"generateUploadUrl\"];\n delete: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"delete\"]>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageWriter\n : { readonly \"~ScopedStorageWriter\": Scope };\n\nconst make = (storageWriter: ConvexStorageWriter) => ({\n generateUploadUrl: Effect.promise(() =>\n storageWriter.generateUploadUrl(),\n ).pipe(\n Effect.andThen((url) =>\n pipe(\n url,\n Schema.decodeEffect(Schema.URLFromString),\n Effect.catchTag(\"SchemaError\", Effect.die),\n ),\n ),\n ),\n delete: (storageId: GenericId<\"_storage\">) =>\n Effect.tryPromise({\n try: () => storageWriter.delete(storageId),\n catch: () => new BlobNotFoundError({ id: storageId }),\n }),\n});\n\nexport class StorageWriter extends Context.Service<\n StorageWriter,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageWriter\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageWriter\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageWriter: ConvexStorageWriter,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageWriter) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAM,QAAQ,mBAAwC;CACpD,mBAAmB,OAAO,cACxB,cAAc,kBAAkB,CAClC,CAAC,CAAC,KACA,OAAO,SAAS,QACd,KACE,KACA,OAAO,aAAa,OAAO,aAAa,GACxC,OAAO,SAAS,eAAe,OAAO,GAAG,CAC3C,CACF,CACF;CACA,SAAS,cACP,OAAO,WAAW;EAChB,WAAW,cAAc,OAAO,SAAS;EACzC,aAAa,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC;CACtD,CAAC;AACL;AAEA,IAAa,gBAAb,cAAmC,QAAQ,QAGzC,CAAC,CAAC,+BAA+B,CAAC,CAAC;CACnC,OAAgB,iBAGd,QAAQ,QAAQ,+BAA+B;CAEjD,OAAgB,SACd,eACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,aAAa,CACpB;AACJ"}
|
|
1
|
+
{"version":3,"file":"StorageWriter.js","names":[],"sources":["../src/StorageWriter.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type { StorageWriter as ConvexStorageWriter } from \"convex/server\";\nimport type { GenericId } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport { pipe } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\nimport { BlobNotFoundError } from \"./BlobNotFoundError.js\";\nimport type * as ScopedId from \"@confect/core/GenericId\";\n\nexport type Service<Scope extends IdScope.IdScope = IdScope.App> = {\n generateUploadUrl: ReturnType<typeof make>[\"generateUploadUrl\"];\n delete: (\n id: ScopedId.GenericId<\"_storage\", Scope>,\n ) => ReturnType<ReturnType<typeof make>[\"delete\"]>;\n};\nexport type ForScope<Scope extends IdScope.IdScope> = Scope extends IdScope.App\n ? StorageWriter\n : { readonly \"~ScopedStorageWriter\": Scope };\n\nconst make = (storageWriter: ConvexStorageWriter) => ({\n generateUploadUrl: Effect.promise(() =>\n storageWriter.generateUploadUrl(),\n ).pipe(\n Effect.andThen((url) =>\n pipe(\n url,\n Schema.decodeEffect(Schema.URLFromString),\n Effect.catchTag(\"SchemaError\", Effect.die),\n ),\n ),\n ),\n delete: (storageId: GenericId<\"_storage\">) =>\n Effect.tryPromise({\n try: () => storageWriter.delete(storageId),\n catch: () => new BlobNotFoundError({ id: storageId }),\n }),\n});\n\nexport class StorageWriter extends Context.Service<\n StorageWriter,\n ReturnType<typeof make>\n>()(\"@confect/server/StorageWriter\") {\n static readonly forScope = <\n Scope extends IdScope.IdScope = IdScope.App,\n >(): Context.Service<ForScope<Scope>, Service<Scope>> =>\n Context.Service(\"@confect/server/StorageWriter\");\n\n static readonly layer = <Scope extends IdScope.IdScope = IdScope.App>(\n storageWriter: ConvexStorageWriter,\n _scope?: Scope,\n ) =>\n Layer.succeed(\n this.forScope<Scope>(),\n make(storageWriter) as unknown as Service<Scope>,\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAM,QAAQ,mBAAwC;CACpD,mBAAmB,OAAO,cACxB,cAAc,kBAAkB,CAClC,CAAC,CAAC,KACA,OAAO,SAAS,QACd,KACE,KACA,OAAO,aAAa,OAAO,aAAa,GACxC,OAAO,SAAS,eAAe,OAAO,GAAG,CAC3C,CACF,CACF;CACA,SAAS,cACP,OAAO,WAAW;EAChB,WAAW,cAAc,OAAO,SAAS;EACzC,aAAa,IAAI,kBAAkB,EAAE,IAAI,UAAU,CAAC;CACtD,CAAC;AACL;AAEA,IAAa,gBAAb,cAAmC,QAAQ,QAGzC,CAAC,CAAC,+BAA+B,CAAC,CAAC;CACnC,OAAgB,iBAGd,QAAQ,QAAQ,+BAA+B;CAEjD,OAAgB,SACd,eACA,WAEA,MAAM,QACJ,KAAK,SAAgB,GACrB,KAAK,aAAa,CACpB;AACJ"}
|
package/dist/TableInfo.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { GenericDocument, GenericFieldPaths, GenericTableIndexes, GenericTa
|
|
|
3
3
|
import type { GenericValidator } from "convex/values";
|
|
4
4
|
import type { Schema, Types } from "effect";
|
|
5
5
|
import type { WithSystemFields } from "@confect/core/SystemFields";
|
|
6
|
-
import type * as Document_ from "./Document";
|
|
7
|
-
import type * as Table from "./Table";
|
|
6
|
+
import type * as Document_ from "./Document.js";
|
|
7
|
+
import type * as Table from "./Table.js";
|
|
8
8
|
export declare const TypeId: "~@confect/server/TableInfo";
|
|
9
9
|
export type TypeId = typeof TypeId;
|
|
10
10
|
export type TableInfo<Table_ extends Table.AnyWithProps> = Table_ extends Table.Table<infer TableName, infer TableSchema_, infer TableValidator, infer Indexes, infer SearchIndexes, infer VectorIndexes, infer Scope> ? {
|
package/dist/TableInfo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableInfo.d.ts","sourceRoot":"","sources":["../src/TableInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,OAAO,EACP,YAAY,EACZ,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,KAAK,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"TableInfo.d.ts","sourceRoot":"","sources":["../src/TableInfo.ts"],"names":[],"mappings":"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"}
|
package/dist/TableInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableInfo.js","names":[],"sources":["../src/TableInfo.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type {\n GenericDocument,\n GenericFieldPaths,\n GenericTableIndexes,\n GenericTableSearchIndexes,\n GenericTableVectorIndexes,\n IdField,\n SystemFields,\n SystemIndexes,\n} from \"convex/server\";\nimport type { GenericValidator } from \"convex/values\";\nimport type { Schema, Types } from \"effect\";\nimport type { WithSystemFields } from \"@confect/core/SystemFields\";\nimport type * as Document_ from \"./Document\";\nimport type * as Table from \"./Table\";\n\nexport declare const TypeId: \"~@confect/server/TableInfo\";\nexport type TypeId = typeof TypeId;\n\nexport type TableInfo<Table_ extends Table.AnyWithProps> =\n Table_ extends Table.Table<\n infer TableName,\n infer TableSchema_,\n infer TableValidator,\n infer Indexes,\n infer SearchIndexes,\n infer VectorIndexes,\n infer Scope\n >\n ? {\n readonly [TypeId]: TypeId;\n readonly document: WithSystemFields<\n TableName,\n Schema.Schema.Type<TableSchema_>,\n Scope\n >;\n readonly encodedDocument: WithSystemFields<\n TableName,\n Schema.Codec.Encoded<TableSchema_>,\n Scope\n >;\n readonly convexDocument: ExtractConvexDocument<\n TableName,\n TableValidator,\n Scope\n >;\n readonly fieldPaths:\n | keyof IdField<TableName>\n | ExtractFieldPaths<TableValidator>;\n readonly indexes: Types.Simplify<Indexes & SystemIndexes>;\n readonly searchIndexes: SearchIndexes;\n readonly vectorIndexes: VectorIndexes;\n }\n : never;\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends Any {\n readonly document: Document_.Any;\n readonly encodedDocument: Document_.AnyEncoded;\n readonly convexDocument: GenericDocument;\n readonly fieldPaths: GenericFieldPaths;\n readonly indexes: GenericTableIndexes;\n readonly searchIndexes: GenericTableSearchIndexes;\n readonly vectorIndexes: GenericTableVectorIndexes;\n}\n\nexport type ConvexTableInfo<TableInfo_ extends AnyWithProps> = {\n document: TableInfo_[\"convexDocument\"];\n fieldPaths: TableInfo_[\"fieldPaths\"];\n indexes: TableInfo_[\"indexes\"];\n searchIndexes: TableInfo_[\"searchIndexes\"];\n vectorIndexes: TableInfo_[\"vectorIndexes\"];\n};\n\nexport type TableSchema<TableInfo_ extends AnyWithProps> = Schema.Codec<\n TableInfo_[\"document\"],\n TableInfo_[\"encodedDocument\"]\n>;\n\nexport type Document<TableInfo_ extends AnyWithProps> = TableInfo_[\"document\"];\n\n// Vendored types from convex-js, partially modified.\n// See https://github.com/get-convex/convex-js/pull/14\n\ntype ExtractFieldPaths<TableValidator extends GenericValidator> =\n | TableValidator[\"fieldPaths\"]\n | keyof SystemFields;\n\ntype ExtractConvexDocument<\n TableName extends string,\n TableValidator extends GenericValidator,\n Scope extends IdScope.IdScope = IdScope.App,\n> =\n WithSystemFields<\n TableName,\n TableValidator[\"type\"],\n Scope\n > extends GenericDocument\n ? WithSystemFields<TableName, TableValidator[\"type\"], Scope>\n : never;\n\n// End of vendored types from convex-js, partially modified.\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TableInfo.js","names":[],"sources":["../src/TableInfo.ts"],"sourcesContent":["import type * as IdScope from \"@confect/core/IdScope\";\nimport type {\n GenericDocument,\n GenericFieldPaths,\n GenericTableIndexes,\n GenericTableSearchIndexes,\n GenericTableVectorIndexes,\n IdField,\n SystemFields,\n SystemIndexes,\n} from \"convex/server\";\nimport type { GenericValidator } from \"convex/values\";\nimport type { Schema, Types } from \"effect\";\nimport type { WithSystemFields } from \"@confect/core/SystemFields\";\nimport type * as Document_ from \"./Document.js\";\nimport type * as Table from \"./Table.js\";\n\nexport declare const TypeId: \"~@confect/server/TableInfo\";\nexport type TypeId = typeof TypeId;\n\nexport type TableInfo<Table_ extends Table.AnyWithProps> =\n Table_ extends Table.Table<\n infer TableName,\n infer TableSchema_,\n infer TableValidator,\n infer Indexes,\n infer SearchIndexes,\n infer VectorIndexes,\n infer Scope\n >\n ? {\n readonly [TypeId]: TypeId;\n readonly document: WithSystemFields<\n TableName,\n Schema.Schema.Type<TableSchema_>,\n Scope\n >;\n readonly encodedDocument: WithSystemFields<\n TableName,\n Schema.Codec.Encoded<TableSchema_>,\n Scope\n >;\n readonly convexDocument: ExtractConvexDocument<\n TableName,\n TableValidator,\n Scope\n >;\n readonly fieldPaths:\n | keyof IdField<TableName>\n | ExtractFieldPaths<TableValidator>;\n readonly indexes: Types.Simplify<Indexes & SystemIndexes>;\n readonly searchIndexes: SearchIndexes;\n readonly vectorIndexes: VectorIndexes;\n }\n : never;\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends Any {\n readonly document: Document_.Any;\n readonly encodedDocument: Document_.AnyEncoded;\n readonly convexDocument: GenericDocument;\n readonly fieldPaths: GenericFieldPaths;\n readonly indexes: GenericTableIndexes;\n readonly searchIndexes: GenericTableSearchIndexes;\n readonly vectorIndexes: GenericTableVectorIndexes;\n}\n\nexport type ConvexTableInfo<TableInfo_ extends AnyWithProps> = {\n document: TableInfo_[\"convexDocument\"];\n fieldPaths: TableInfo_[\"fieldPaths\"];\n indexes: TableInfo_[\"indexes\"];\n searchIndexes: TableInfo_[\"searchIndexes\"];\n vectorIndexes: TableInfo_[\"vectorIndexes\"];\n};\n\nexport type TableSchema<TableInfo_ extends AnyWithProps> = Schema.Codec<\n TableInfo_[\"document\"],\n TableInfo_[\"encodedDocument\"]\n>;\n\nexport type Document<TableInfo_ extends AnyWithProps> = TableInfo_[\"document\"];\n\n// Vendored types from convex-js, partially modified.\n// See https://github.com/get-convex/convex-js/pull/14\n\ntype ExtractFieldPaths<TableValidator extends GenericValidator> =\n | TableValidator[\"fieldPaths\"]\n | keyof SystemFields;\n\ntype ExtractConvexDocument<\n TableName extends string,\n TableValidator extends GenericValidator,\n Scope extends IdScope.IdScope = IdScope.App,\n> =\n WithSystemFields<\n TableName,\n TableValidator[\"type\"],\n Scope\n > extends GenericDocument\n ? WithSystemFields<TableName, TableValidator[\"type\"], Scope>\n : never;\n\n// End of vendored types from convex-js, partially modified.\n"],"mappings":""}
|
package/dist/VectorSearch.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Expand, GenericActionCtx, NamedTableInfo, VectorIndexNames, Vector
|
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Layer from "effect/Layer";
|
|
5
|
-
import type * as DataModel from "./DataModel";
|
|
5
|
+
import type * as DataModel from "./DataModel.js";
|
|
6
6
|
type ConvexVectorSearch<DataModel_ extends DataModel.AnyWithProps> = GenericActionCtx<DataModel.ToConvex<DataModel_>>["vectorSearch"];
|
|
7
7
|
/**
|
|
8
8
|
* The service shape backing the `VectorSearch` tag. Named so declaration emit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorSearch.d.ts","sourceRoot":"","sources":["../src/VectorSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"VectorSearch.d.ts","sourceRoot":"","sources":["../src/VectorSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAEjD,KAAK,kBAAkB,CAAC,UAAU,SAAS,SAAS,CAAC,YAAY,IAC/D,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAClC,UAAU,SAAS,SAAS,CAAC,YAAY;IAEzC,CACE,SAAS,SAAS,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAClD,SAAS,SAAS,gBAAgB,CAChC,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,CAC1D,EAED,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,CACX,iBAAiB,CACf,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,EACzD,SAAS,CACV,CACF,GACA,MAAM,CAAC,MAAM,CACd,KAAK,CAAC;QAAE,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CACpE,CAAC;CACH;AAED,MAAM,MAAM,eAAe,CAAC,UAAU,SAAS,SAAS,CAAC,YAAY,IACnE,OAAO,CAAC,OAAO,CACb,mBAAmB,CAAC,UAAU,CAAC,EAC/B,mBAAmB,CAAC,UAAU,CAAC,CAChC,CAAC;AAEJ,eAAO,MAAM,IAAI,GACd,UAAU,SAAS,SAAS,CAAC,YAAY,gBAC1B,kBAAkB,CAAC,UAAU,CAAC,KAC3C,mBAAmB,CAAC,UAAU,CAU9B,CAAC;AAEN,eAAO,MAAM,YAAY,GACvB,UAAU,SAAS,SAAS,CAAC,YAAY,OACtC,eAAe,CAAC,UAAU,CAG5B,CAAC;AAEJ,MAAM,MAAM,YAAY,CAAC,UAAU,SAAS,SAAS,CAAC,YAAY,IAChE,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAElC,eAAO,MAAM,KAAK,GAAI,UAAU,SAAS,SAAS,CAAC,YAAY,gBAC/C,kBAAkB,CAAC,UAAU,CAAC,+DACoB,CAAC"}
|
package/dist/VectorSearch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorSearch.js","names":[],"sources":["../src/VectorSearch.ts"],"sourcesContent":["import type {\n Expand,\n GenericActionCtx,\n NamedTableInfo,\n VectorIndexNames,\n VectorSearchQuery,\n} from \"convex/server\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport type * as DataModel from \"./DataModel\";\n\ntype ConvexVectorSearch<DataModel_ extends DataModel.AnyWithProps> =\n GenericActionCtx<DataModel.ToConvex<DataModel_>>[\"vectorSearch\"];\n\n/**\n * The service shape backing the `VectorSearch` tag. Named so declaration emit\n * references it instead of expanding the call signature at every usage.\n */\nexport interface VectorSearchService<\n DataModel_ extends DataModel.AnyWithProps,\n> {\n <\n TableName extends DataModel.TableNames<DataModel_>,\n IndexName extends VectorIndexNames<\n NamedTableInfo<DataModel.ToConvex<DataModel_>, TableName>\n >,\n >(\n tableName: TableName,\n indexName: IndexName,\n query: Expand<\n VectorSearchQuery<\n NamedTableInfo<DataModel.ToConvex<DataModel_>, TableName>,\n IndexName\n >\n >,\n ): Effect.Effect<\n Array<{ _id: DataModel.Id<DataModel_, TableName>; _score: number }>\n >;\n}\n\nexport type VectorSearchTag<DataModel_ extends DataModel.AnyWithProps> =\n Context.Service<\n VectorSearchService<DataModel_>,\n VectorSearchService<DataModel_>\n >;\n\nexport const make =\n <DataModel_ extends DataModel.AnyWithProps>(\n vectorSearch: ConvexVectorSearch<DataModel_>,\n ): VectorSearchService<DataModel_> =>\n (tableName, indexName, query) =>\n Effect.promise(() => vectorSearch(tableName, indexName, query)).pipe(\n Effect.map(\n (rows) =>\n rows as unknown as Array<{\n _id: DataModel.Id<DataModel_, typeof tableName>;\n _score: number;\n }>,\n ),\n );\n\nexport const VectorSearch = <\n DataModel_ extends DataModel.AnyWithProps,\n>(): VectorSearchTag<DataModel_> =>\n Context.Service<VectorSearchService<DataModel_>>(\n \"@confect/server/VectorSearch\",\n );\n\nexport type VectorSearch<DataModel_ extends DataModel.AnyWithProps> =\n VectorSearchService<DataModel_>;\n\nexport const layer = <DataModel_ extends DataModel.AnyWithProps>(\n vectorSearch: ConvexVectorSearch<DataModel_>,\n) => Layer.succeed(VectorSearch<DataModel_>(), make(vectorSearch));\n"],"mappings":";;;;;;;;;;AA+CA,MAAa,QAET,kBAED,WAAW,WAAW,UACrB,OAAO,cAAc,aAAa,WAAW,WAAW,KAAK,CAAC,CAAC,CAAC,KAC9D,OAAO,KACJ,SACC,IAIJ,CACF;AAEJ,MAAa,qBAGX,QAAQ,QACN,8BACF;AAKF,MAAa,SACX,iBACG,MAAM,QAAQ,aAAyB,GAAG,KAAK,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"VectorSearch.js","names":[],"sources":["../src/VectorSearch.ts"],"sourcesContent":["import type {\n Expand,\n GenericActionCtx,\n NamedTableInfo,\n VectorIndexNames,\n VectorSearchQuery,\n} from \"convex/server\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport type * as DataModel from \"./DataModel.js\";\n\ntype ConvexVectorSearch<DataModel_ extends DataModel.AnyWithProps> =\n GenericActionCtx<DataModel.ToConvex<DataModel_>>[\"vectorSearch\"];\n\n/**\n * The service shape backing the `VectorSearch` tag. Named so declaration emit\n * references it instead of expanding the call signature at every usage.\n */\nexport interface VectorSearchService<\n DataModel_ extends DataModel.AnyWithProps,\n> {\n <\n TableName extends DataModel.TableNames<DataModel_>,\n IndexName extends VectorIndexNames<\n NamedTableInfo<DataModel.ToConvex<DataModel_>, TableName>\n >,\n >(\n tableName: TableName,\n indexName: IndexName,\n query: Expand<\n VectorSearchQuery<\n NamedTableInfo<DataModel.ToConvex<DataModel_>, TableName>,\n IndexName\n >\n >,\n ): Effect.Effect<\n Array<{ _id: DataModel.Id<DataModel_, TableName>; _score: number }>\n >;\n}\n\nexport type VectorSearchTag<DataModel_ extends DataModel.AnyWithProps> =\n Context.Service<\n VectorSearchService<DataModel_>,\n VectorSearchService<DataModel_>\n >;\n\nexport const make =\n <DataModel_ extends DataModel.AnyWithProps>(\n vectorSearch: ConvexVectorSearch<DataModel_>,\n ): VectorSearchService<DataModel_> =>\n (tableName, indexName, query) =>\n Effect.promise(() => vectorSearch(tableName, indexName, query)).pipe(\n Effect.map(\n (rows) =>\n rows as unknown as Array<{\n _id: DataModel.Id<DataModel_, typeof tableName>;\n _score: number;\n }>,\n ),\n );\n\nexport const VectorSearch = <\n DataModel_ extends DataModel.AnyWithProps,\n>(): VectorSearchTag<DataModel_> =>\n Context.Service<VectorSearchService<DataModel_>>(\n \"@confect/server/VectorSearch\",\n );\n\nexport type VectorSearch<DataModel_ extends DataModel.AnyWithProps> =\n VectorSearchService<DataModel_>;\n\nexport const layer = <DataModel_ extends DataModel.AnyWithProps>(\n vectorSearch: ConvexVectorSearch<DataModel_>,\n) => Layer.succeed(VectorSearch<DataModel_>(), make(vectorSearch));\n"],"mappings":";;;;;;;;;;AA+CA,MAAa,QAET,kBAED,WAAW,WAAW,UACrB,OAAO,cAAc,aAAa,WAAW,WAAW,KAAK,CAAC,CAAC,CAAC,KAC9D,OAAO,KACJ,SACC,IAIJ,CACF;AAEJ,MAAa,qBAGX,QAAQ,QACN,8BACF;AAKF,MAAa,SACX,iBACG,MAAM,QAAQ,aAAyB,GAAG,KAAK,YAAY,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
export * as AiGatewayDecisionClient from "./AiGatewayDecisionClient";
|
|
2
|
-
export * as AiGatewayDecisionModel from "./AiGatewayDecisionModel";
|
|
3
|
-
export * as AiGatewayLanguageClient from "./AiGatewayLanguageClient";
|
|
4
|
-
export * as AiGatewayLanguageModel from "./AiGatewayLanguageModel";
|
|
5
|
-
export * as ActionCtx from "./ActionCtx";
|
|
6
|
-
export * as ActionRunner from "./ActionRunner";
|
|
7
|
-
export * as Auth from "./Auth";
|
|
8
|
-
export * as BlobNotFoundError from "./BlobNotFoundError";
|
|
9
|
-
export * as Callback from "./Callback";
|
|
10
|
-
export * as ConvexConfigProvider from "./ConvexConfigProvider";
|
|
11
|
-
export * as ConvexFunctionDefinitions from "./ConvexFunctionDefinitions";
|
|
12
|
-
export * as ConvexLogger from "./ConvexLogger";
|
|
13
|
-
export * as CronJob from "./CronJob";
|
|
14
|
-
export * as CronJobs from "./CronJobs";
|
|
15
|
-
export * as DatabaseReader from "./DatabaseReader";
|
|
16
|
-
export * as DatabaseSchema from "./DatabaseSchema";
|
|
17
|
-
export * as DatabaseWriter from "./DatabaseWriter";
|
|
18
|
-
export * as DataModel from "./DataModel";
|
|
19
|
-
export * as Document from "./Document";
|
|
20
|
-
export * as ExecutionMetadata from "./ExecutionMetadata";
|
|
21
|
-
export * as FunctionImpl from "./FunctionImpl";
|
|
22
|
-
export * as FunctionRegistryItem from "./FunctionRegistryItem";
|
|
23
|
-
export * as GroupImpl from "./GroupImpl";
|
|
24
|
-
export * as Handler from "./Handler";
|
|
25
|
-
export * as HttpRouter from "./HttpRouter";
|
|
26
|
-
export * as MiddlewareImpl from "./MiddlewareImpl";
|
|
27
|
-
export * as MiddlewareRegistryItem from "./MiddlewareRegistryItem";
|
|
28
|
-
export * as MutationCtx from "./MutationCtx";
|
|
29
|
-
export * as MutationRunner from "./MutationRunner";
|
|
30
|
-
export * as MutationTransactionContext from "./MutationTransactionContext";
|
|
31
|
-
export * as OrderedQuery from "./OrderedQuery";
|
|
32
|
-
export * as QueryCtx from "./QueryCtx";
|
|
33
|
-
export * as QueryInitializer from "./QueryInitializer";
|
|
34
|
-
export * as QueryRunner from "./QueryRunner";
|
|
35
|
-
export * as QueryTransactionContext from "./QueryTransactionContext";
|
|
1
|
+
export * as AiGatewayDecisionClient from "./AiGatewayDecisionClient.js";
|
|
2
|
+
export * as AiGatewayDecisionModel from "./AiGatewayDecisionModel.js";
|
|
3
|
+
export * as AiGatewayLanguageClient from "./AiGatewayLanguageClient.js";
|
|
4
|
+
export * as AiGatewayLanguageModel from "./AiGatewayLanguageModel.js";
|
|
5
|
+
export * as ActionCtx from "./ActionCtx.js";
|
|
6
|
+
export * as ActionRunner from "./ActionRunner.js";
|
|
7
|
+
export * as Auth from "./Auth.js";
|
|
8
|
+
export * as BlobNotFoundError from "./BlobNotFoundError.js";
|
|
9
|
+
export * as Callback from "./Callback.js";
|
|
10
|
+
export * as ConvexConfigProvider from "./ConvexConfigProvider.js";
|
|
11
|
+
export * as ConvexFunctionDefinitions from "./ConvexFunctionDefinitions.js";
|
|
12
|
+
export * as ConvexLogger from "./ConvexLogger.js";
|
|
13
|
+
export * as CronJob from "./CronJob.js";
|
|
14
|
+
export * as CronJobs from "./CronJobs.js";
|
|
15
|
+
export * as DatabaseReader from "./DatabaseReader.js";
|
|
16
|
+
export * as DatabaseSchema from "./DatabaseSchema.js";
|
|
17
|
+
export * as DatabaseWriter from "./DatabaseWriter.js";
|
|
18
|
+
export * as DataModel from "./DataModel.js";
|
|
19
|
+
export * as Document from "./Document.js";
|
|
20
|
+
export * as ExecutionMetadata from "./ExecutionMetadata.js";
|
|
21
|
+
export * as FunctionImpl from "./FunctionImpl.js";
|
|
22
|
+
export * as FunctionRegistryItem from "./FunctionRegistryItem.js";
|
|
23
|
+
export * as GroupImpl from "./GroupImpl.js";
|
|
24
|
+
export * as Handler from "./Handler.js";
|
|
25
|
+
export * as HttpRouter from "./HttpRouter.js";
|
|
26
|
+
export * as MiddlewareImpl from "./MiddlewareImpl.js";
|
|
27
|
+
export * as MiddlewareRegistryItem from "./MiddlewareRegistryItem.js";
|
|
28
|
+
export * as MutationCtx from "./MutationCtx.js";
|
|
29
|
+
export * as MutationRunner from "./MutationRunner.js";
|
|
30
|
+
export * as MutationTransactionContext from "./MutationTransactionContext.js";
|
|
31
|
+
export * as OrderedQuery from "./OrderedQuery.js";
|
|
32
|
+
export * as QueryCtx from "./QueryCtx.js";
|
|
33
|
+
export * as QueryInitializer from "./QueryInitializer.js";
|
|
34
|
+
export * as QueryRunner from "./QueryRunner.js";
|
|
35
|
+
export * as QueryTransactionContext from "./QueryTransactionContext.js";
|
|
36
36
|
/**
|
|
37
37
|
* @experimental
|
|
38
38
|
*/
|
|
39
|
-
export * as QueryStream from "./QueryStream";
|
|
39
|
+
export * as QueryStream from "./QueryStream.js";
|
|
40
40
|
/**
|
|
41
41
|
* @experimental
|
|
42
42
|
*/
|
|
43
|
-
export * as QueryStreamCursor from "./QueryStreamCursor";
|
|
43
|
+
export * as QueryStreamCursor from "./QueryStreamCursor.js";
|
|
44
44
|
/**
|
|
45
45
|
* @experimental
|
|
46
46
|
*/
|
|
47
|
-
export * as QueryStreamKeyLabels from "./QueryStreamKeyLabels";
|
|
47
|
+
export * as QueryStreamKeyLabels from "./QueryStreamKeyLabels.js";
|
|
48
48
|
/**
|
|
49
49
|
* @experimental
|
|
50
50
|
*/
|
|
51
|
-
export * as QueryStreamKeyLayout from "./QueryStreamKeyLayout";
|
|
51
|
+
export * as QueryStreamKeyLayout from "./QueryStreamKeyLayout.js";
|
|
52
52
|
/**
|
|
53
53
|
* @experimental
|
|
54
54
|
*/
|
|
55
|
-
export * as QueryStreamOrderDirection from "./QueryStreamOrderDirection";
|
|
55
|
+
export * as QueryStreamOrderDirection from "./QueryStreamOrderDirection.js";
|
|
56
56
|
/**
|
|
57
57
|
* @experimental
|
|
58
58
|
*/
|
|
59
|
-
export * as QueryStreamKeyValues from "./QueryStreamKeyValues";
|
|
59
|
+
export * as QueryStreamKeyValues from "./QueryStreamKeyValues.js";
|
|
60
60
|
/**
|
|
61
61
|
* @experimental
|
|
62
62
|
*/
|
|
63
|
-
export * as QueryStreamKeyBounds from "./QueryStreamKeyBounds";
|
|
63
|
+
export * as QueryStreamKeyBounds from "./QueryStreamKeyBounds.js";
|
|
64
64
|
/**
|
|
65
65
|
* @experimental
|
|
66
66
|
*/
|
|
67
|
-
export * as QueryStreamIndexRange from "./QueryStreamIndexRange";
|
|
67
|
+
export * as QueryStreamIndexRange from "./QueryStreamIndexRange.js";
|
|
68
68
|
/**
|
|
69
69
|
* @experimental
|
|
70
70
|
*/
|
|
71
|
-
export * as QueryStreamReadBudget from "./QueryStreamReadBudget";
|
|
72
|
-
export * as RegisteredConvexFunction from "./RegisteredConvexFunction";
|
|
73
|
-
export * as RegisteredFunction from "./RegisteredFunction";
|
|
74
|
-
export * as RegisteredFunctions from "./RegisteredFunctions";
|
|
75
|
-
export * as Registry from "./Registry";
|
|
76
|
-
export * as RegistryItems from "./RegistryItems";
|
|
77
|
-
export * as ResolvedMiddleware from "./ResolvedMiddleware";
|
|
78
|
-
export * as RequestMetadata from "./RequestMetadata";
|
|
79
|
-
export * as Scheduler from "./Scheduler";
|
|
80
|
-
export * as Storage from "./Storage";
|
|
81
|
-
export * as StorageActionWriter from "./StorageActionWriter";
|
|
82
|
-
export * as StorageReader from "./StorageReader";
|
|
83
|
-
export * as StorageWriter from "./StorageWriter";
|
|
84
|
-
export * as Table from "./Table";
|
|
85
|
-
export * as TableInfo from "./TableInfo";
|
|
86
|
-
export * as TransactionMetadata from "./TransactionMetadata";
|
|
87
|
-
export * as VectorSearch from "./VectorSearch";
|
|
71
|
+
export * as QueryStreamReadBudget from "./QueryStreamReadBudget.js";
|
|
72
|
+
export * as RegisteredConvexFunction from "./RegisteredConvexFunction.js";
|
|
73
|
+
export * as RegisteredFunction from "./RegisteredFunction.js";
|
|
74
|
+
export * as RegisteredFunctions from "./RegisteredFunctions.js";
|
|
75
|
+
export * as Registry from "./Registry.js";
|
|
76
|
+
export * as RegistryItems from "./RegistryItems.js";
|
|
77
|
+
export * as ResolvedMiddleware from "./ResolvedMiddleware.js";
|
|
78
|
+
export * as RequestMetadata from "./RequestMetadata.js";
|
|
79
|
+
export * as Scheduler from "./Scheduler.js";
|
|
80
|
+
export * as Storage from "./Storage.js";
|
|
81
|
+
export * as StorageActionWriter from "./StorageActionWriter.js";
|
|
82
|
+
export * as StorageReader from "./StorageReader.js";
|
|
83
|
+
export * as StorageWriter from "./StorageWriter.js";
|
|
84
|
+
export * as Table from "./Table.js";
|
|
85
|
+
export * as TableInfo from "./TableInfo.js";
|
|
86
|
+
export * as TransactionMetadata from "./TransactionMetadata.js";
|
|
87
|
+
export * as VectorSearch from "./VectorSearch.js";
|
|
88
88
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,uBAAuB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as OpenRouterClient from "@effect/ai-openrouter/OpenRouterClient";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as AiGatewayServiceToken from "./AiGatewayServiceToken";
|
|
4
|
+
import * as AiGatewayServiceToken from "./AiGatewayServiceToken.js";
|
|
5
5
|
export declare const make: Effect.Effect<OpenRouterClient.Service, AiGatewayServiceToken.AiGatewayDisabled | AiGatewayServiceToken.AiGatewayUnavailable, AiGatewayServiceToken.AiGatewayServiceToken | import("effect/http/HttpClient").HttpClient>;
|
|
6
6
|
export declare const layer: Layer.Layer<OpenRouterClient.OpenRouterClient, AiGatewayServiceToken.AiGatewayDisabled | AiGatewayServiceToken.AiGatewayUnavailable, AiGatewayServiceToken.AiGatewayServiceToken | import("effect/http/HttpClient").HttpClient>;
|
|
7
7
|
//# sourceMappingURL=AiGatewayDecisionClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiGatewayDecisionClient.d.ts","sourceRoot":"","sources":["../../src/internal/AiGatewayDecisionClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,qBAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"AiGatewayDecisionClient.d.ts","sourceRoot":"","sources":["../../src/internal/AiGatewayDecisionClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AAGpE,eAAO,MAAM,IAAI,0NAOf,CAAC;AAEH,eAAO,MAAM,KAAK,iOAAwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiGatewayDecisionClient.js","names":["AiGatewayServiceToken.AiGatewayServiceToken","AiGatewayServiceToken.transformClientRequest"],"sources":["../../src/internal/AiGatewayDecisionClient.ts"],"sourcesContent":["import * as OpenRouterClient from \"@effect/ai-openrouter/OpenRouterClient\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as AiGatewayServiceToken from \"./AiGatewayServiceToken\";\nimport { AI_GATEWAY_API_URL } from \"./constants\";\n\nexport const make = Effect.gen(function* () {\n const serviceToken = yield* AiGatewayServiceToken.AiGatewayServiceToken;\n yield* serviceToken.get(\"ai-gateway\");\n return yield* OpenRouterClient.make({\n apiUrl: AI_GATEWAY_API_URL,\n transformClient: AiGatewayServiceToken.transformClientRequest(serviceToken),\n });\n});\n\nexport const layer = Layer.effect(OpenRouterClient.OpenRouterClient, make);\n"],"mappings":";;;;;;AAMA,MAAa,OAAO,OAAO,IAAI,aAAa;CAC1C,MAAM,eAAe,OAAOA;CAC5B,OAAO,aAAa,IAAI,YAAY;CACpC,OAAO,OAAO,iBAAiB,KAAK;EAClC,QAAQ;EACR,iBAAiBC,uBAA6C,YAAY;CAC5E,CAAC;AACH,CAAC;AAED,MAAa,QAAQ,MAAM,OAAO,iBAAiB,kBAAkB,IAAI"}
|
|
1
|
+
{"version":3,"file":"AiGatewayDecisionClient.js","names":["AiGatewayServiceToken.AiGatewayServiceToken","AiGatewayServiceToken.transformClientRequest"],"sources":["../../src/internal/AiGatewayDecisionClient.ts"],"sourcesContent":["import * as OpenRouterClient from \"@effect/ai-openrouter/OpenRouterClient\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as AiGatewayServiceToken from \"./AiGatewayServiceToken.js\";\nimport { AI_GATEWAY_API_URL } from \"./constants.js\";\n\nexport const make = Effect.gen(function* () {\n const serviceToken = yield* AiGatewayServiceToken.AiGatewayServiceToken;\n yield* serviceToken.get(\"ai-gateway\");\n return yield* OpenRouterClient.make({\n apiUrl: AI_GATEWAY_API_URL,\n transformClient: AiGatewayServiceToken.transformClientRequest(serviceToken),\n });\n});\n\nexport const layer = Layer.effect(OpenRouterClient.OpenRouterClient, make);\n"],"mappings":";;;;;;AAMA,MAAa,OAAO,OAAO,IAAI,aAAa;CAC1C,MAAM,eAAe,OAAOA;CAC5B,OAAO,aAAa,IAAI,YAAY;CACpC,OAAO,OAAO,iBAAiB,KAAK;EAClC,QAAQ;EACR,iBAAiBC,uBAA6C,YAAY;CAC5E,CAAC;AACH,CAAC;AAED,MAAa,QAAQ,MAAM,OAAO,iBAAiB,kBAAkB,IAAI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as OpenAiClient from "@effect/ai-openai-compat/OpenAiClient";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as AiGatewayServiceToken from "./AiGatewayServiceToken";
|
|
4
|
+
import * as AiGatewayServiceToken from "./AiGatewayServiceToken.js";
|
|
5
5
|
export declare const make: Effect.Effect<OpenAiClient.Service, AiGatewayServiceToken.AiGatewayDisabled | AiGatewayServiceToken.AiGatewayUnavailable, AiGatewayServiceToken.AiGatewayServiceToken | import("effect/http/HttpClient").HttpClient>;
|
|
6
6
|
export declare const layer: Layer.Layer<OpenAiClient.OpenAiClient, AiGatewayServiceToken.AiGatewayDisabled | AiGatewayServiceToken.AiGatewayUnavailable, AiGatewayServiceToken.AiGatewayServiceToken | import("effect/http/HttpClient").HttpClient>;
|
|
7
7
|
//# sourceMappingURL=AiGatewayLanguageClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiGatewayLanguageClient.d.ts","sourceRoot":"","sources":["../../src/internal/AiGatewayLanguageClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,qBAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"AiGatewayLanguageClient.d.ts","sourceRoot":"","sources":["../../src/internal/AiGatewayLanguageClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AAGpE,eAAO,MAAM,IAAI,sNAOf,CAAC;AAEH,eAAO,MAAM,KAAK,yNAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiGatewayLanguageClient.js","names":["AiGatewayServiceToken.AiGatewayServiceToken","AiGatewayServiceToken.transformClientRequest"],"sources":["../../src/internal/AiGatewayLanguageClient.ts"],"sourcesContent":["import * as OpenAiClient from \"@effect/ai-openai-compat/OpenAiClient\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as AiGatewayServiceToken from \"./AiGatewayServiceToken\";\nimport { AI_GATEWAY_API_URL } from \"./constants\";\n\nexport const make = Effect.gen(function* () {\n const serviceToken = yield* AiGatewayServiceToken.AiGatewayServiceToken;\n yield* serviceToken.get(\"ai-gateway\");\n return yield* OpenAiClient.make({\n apiUrl: AI_GATEWAY_API_URL,\n transformClient: AiGatewayServiceToken.transformClientRequest(serviceToken),\n });\n});\n\nexport const layer = Layer.effect(OpenAiClient.OpenAiClient, make);\n"],"mappings":";;;;;;AAMA,MAAa,OAAO,OAAO,IAAI,aAAa;CAC1C,MAAM,eAAe,OAAOA;CAC5B,OAAO,aAAa,IAAI,YAAY;CACpC,OAAO,OAAO,aAAa,KAAK;EAC9B,QAAQ;EACR,iBAAiBC,uBAA6C,YAAY;CAC5E,CAAC;AACH,CAAC;AAED,MAAa,QAAQ,MAAM,OAAO,aAAa,cAAc,IAAI"}
|
|
1
|
+
{"version":3,"file":"AiGatewayLanguageClient.js","names":["AiGatewayServiceToken.AiGatewayServiceToken","AiGatewayServiceToken.transformClientRequest"],"sources":["../../src/internal/AiGatewayLanguageClient.ts"],"sourcesContent":["import * as OpenAiClient from \"@effect/ai-openai-compat/OpenAiClient\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as AiGatewayServiceToken from \"./AiGatewayServiceToken.js\";\nimport { AI_GATEWAY_API_URL } from \"./constants.js\";\n\nexport const make = Effect.gen(function* () {\n const serviceToken = yield* AiGatewayServiceToken.AiGatewayServiceToken;\n yield* serviceToken.get(\"ai-gateway\");\n return yield* OpenAiClient.make({\n apiUrl: AI_GATEWAY_API_URL,\n transformClient: AiGatewayServiceToken.transformClientRequest(serviceToken),\n });\n});\n\nexport const layer = Layer.effect(OpenAiClient.OpenAiClient, make);\n"],"mappings":";;;;;;AAMA,MAAa,OAAO,OAAO,IAAI,aAAa;CAC1C,MAAM,eAAe,OAAOA;CAC5B,OAAO,aAAa,IAAI,YAAY;CACpC,OAAO,OAAO,aAAa,KAAK;EAC9B,QAAQ;EACR,iBAAiBC,uBAA6C,YAAY;CAC5E,CAAC;AACH,CAAC;AAED,MAAa,QAAQ,MAAM,OAAO,aAAa,cAAc,IAAI"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as RegisteredNodeFunction from "./RegisteredNodeFunction";
|
|
1
|
+
export * as RegisteredNodeFunction from "./RegisteredNodeFunction.js";
|
|
2
2
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaganref/confect-server",
|
|
3
|
-
"version": "10.3.1-fork.
|
|
3
|
+
"version": "10.3.1-fork.6",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@effect/ai-openai-compat": "4.0.4",
|
|
6
6
|
"@effect/ai-openrouter": "4.0.4"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@confect/core": "npm:@gaganref/confect-core@10.3.1-fork.
|
|
9
|
+
"@confect/core": "npm:@gaganref/confect-core@10.3.1-fork.6",
|
|
10
10
|
"@effect/platform-node": "^4.0.0",
|
|
11
11
|
"convex": "^1.45.0",
|
|
12
12
|
"effect": "^4.0.4"
|
package/src/ActionCtx.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as IdScope from "@confect/core/IdScope";
|
|
2
2
|
import type { GenericActionCtx, GenericDataModel } from "convex/server";
|
|
3
3
|
import * as Context from "effect/Context";
|
|
4
|
-
import type * as ComponentCtx from "./ComponentCtx";
|
|
4
|
+
import type * as ComponentCtx from "./ComponentCtx.js";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
6
|
|
|
7
7
|
export type ActionCtxTag<
|
|
@@ -2,14 +2,14 @@ import * as OpenRouterClient from "@effect/ai-openrouter/OpenRouterClient";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import type * as HttpClient from "effect/http/HttpClient";
|
|
5
|
-
import * as InternalAiGatewayDecisionClient from "./internal/AiGatewayDecisionClient";
|
|
6
|
-
import * as AiGatewayServiceToken from "./internal/AiGatewayServiceToken";
|
|
5
|
+
import * as InternalAiGatewayDecisionClient from "./internal/AiGatewayDecisionClient.js";
|
|
6
|
+
import * as AiGatewayServiceToken from "./internal/AiGatewayServiceToken.js";
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
9
|
AiGatewayDisabled,
|
|
10
10
|
AiGatewayError,
|
|
11
11
|
AiGatewayUnavailable,
|
|
12
|
-
} from "./internal/AiGatewayServiceToken";
|
|
12
|
+
} from "./internal/AiGatewayServiceToken.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The client configured for Convex AI gateway decisions.
|
|
@@ -2,14 +2,14 @@ import * as OpenAiClient from "@effect/ai-openai-compat/OpenAiClient";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import type * as HttpClient from "effect/http/HttpClient";
|
|
5
|
-
import * as InternalAiGatewayLanguageClient from "./internal/AiGatewayLanguageClient";
|
|
6
|
-
import * as AiGatewayServiceToken from "./internal/AiGatewayServiceToken";
|
|
5
|
+
import * as InternalAiGatewayLanguageClient from "./internal/AiGatewayLanguageClient.js";
|
|
6
|
+
import * as AiGatewayServiceToken from "./internal/AiGatewayServiceToken.js";
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
9
|
AiGatewayDisabled,
|
|
10
10
|
AiGatewayError,
|
|
11
11
|
AiGatewayUnavailable,
|
|
12
|
-
} from "./internal/AiGatewayServiceToken";
|
|
12
|
+
} from "./internal/AiGatewayServiceToken.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The client service configured for Convex AI gateway language models.
|
package/src/Auth.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Layer from "effect/Layer";
|
|
|
6
6
|
import * as Match from "effect/Match";
|
|
7
7
|
import * as Option from "effect/Option";
|
|
8
8
|
import * as Schema from "effect/Schema";
|
|
9
|
-
import type * as DatabaseSchema from "./DatabaseSchema";
|
|
9
|
+
import type * as DatabaseSchema from "./DatabaseSchema.js";
|
|
10
10
|
|
|
11
11
|
const make = (auth: ConvexAuth) => ({
|
|
12
12
|
getUserIdentity: Effect.promise(() => auth.getUserIdentity()).pipe(
|
package/src/ComponentCtx.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type {
|
|
|
17
17
|
VectorIndexNames,
|
|
18
18
|
VectorSearchQuery,
|
|
19
19
|
} from "convex/server";
|
|
20
|
-
import type { PatchValue } from "./DatabaseWriter";
|
|
20
|
+
import type { PatchValue } from "./DatabaseWriter.js";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Distinguishes raw component services from structurally compatible app ctxs.
|