@proseql/rpc 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Simon W. Jackson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,33 @@
1
+ /**
2
+ * proseql-rpc — Type-safe Effect RPC layer for proseql databases.
3
+ *
4
+ * Derives an RpcGroup from a proseql DatabaseConfig, exposing all CRUD
5
+ * operations and queries as typed RPC procedures. The client gets full
6
+ * type inference including entity types, error channels, and relationship
7
+ * population — no schema duplication required.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { Effect, Layer } from "effect"
12
+ * import { Rpc, RpcGroup } from "@effect/rpc"
13
+ * import { createEffectDatabase } from "proseql"
14
+ * import { makeRpcGroup, makeRpcHandlers } from "proseql-rpc"
15
+ *
16
+ * // 1. Derive RPC group from your database config
17
+ * const BooksRpc = makeRpcGroup(config)
18
+ *
19
+ * // 2. Create handler layer (wires RPCs to a live database)
20
+ * const HandlerLayer = makeRpcHandlers(config, initialData)
21
+ *
22
+ * // 3. Client gets full type safety
23
+ * const result = yield* client.books.query({ where: { year: { $gt: 2000 } } })
24
+ * // ^? ReadonlyArray<Book>
25
+ * ```
26
+ *
27
+ * @module
28
+ */
29
+ export { type CollectionNotFoundError, CollectionNotFoundErrorSchema, type ConcurrencyError, ConcurrencyErrorSchema, type CrudError, CrudErrorSchema, type DanglingReferenceError, DanglingReferenceErrorSchema, type DuplicateKeyError, DuplicateKeyErrorSchema, type ForeignKeyError, ForeignKeyErrorSchema, type HookError, HookErrorSchema, type NotFoundError, NotFoundErrorSchema, type OperationError, OperationErrorSchema, type PopulationError, PopulationErrorSchema, type QueryError, QueryErrorSchema, type RpcError, RpcErrorSchema, type TransactionError, TransactionErrorSchema, type UniqueConstraintError, UniqueConstraintErrorSchema, type ValidationError, ValidationErrorSchema, ValidationIssueSchema, } from "./rpc-errors.js";
30
+ export { type AggregatePayload, AggregatePayloadSchema, AggregateResultSchema, type AggregateResultType, type CreateManyPayload, CreateManyPayloadSchema, CreateManyResultSchema, type CreateManyResultType, type CreatePayload, CreatePayloadSchema, CursorConfigSchema, CursorPageInfoSchema, type CursorPageInfoType, CursorPageResultSchema, type CursorPageResultType, type DeleteManyPayload, DeleteManyPayloadSchema, DeleteManyResultSchema, type DeleteManyResultType, type DeletePayload, DeletePayloadSchema, FilterOperatorsSchema, type FindByIdPayload, FindByIdPayloadSchema, GroupedAggregateResultSchema, type GroupedAggregateResultType, GroupResultSchema, type GroupResultType, PopulateConfigSchema, type QueryPayload, QueryPayloadSchema, SearchConfigSchema, SelectConfigSchema, SortConfigSchema, SortOrderSchema, type StreamingOptions, StreamingOptionsSchema, type UpdateManyPayload, UpdateManyPayloadSchema, UpdateManyResultSchema, type UpdateManyResultType, type UpdatePayload, UpdatePayloadSchema, type UpsertManyPayload, UpsertManyPayloadSchema, UpsertManyResultSchema, type UpsertManyResultType, type UpsertPayload, UpsertPayloadSchema, UpsertResultSchema, type UpsertResultType, WhereClauseSchema, } from "./rpc-schemas.js";
31
+ export { type AggregateRequestClass, type CollectionRpcDefinitions, type CreateManyRequestClass, type CreateRequestClass, type DeleteManyRequestClass, type DeleteRequestClass, type FindByIdRequestClass, makeAggregateRequest, makeCollectionRpcs, makeCreateManyRequest, makeCreateRequest, makeDeleteManyRequest, makeDeleteRequest, makeFindByIdRequest, makeQueryRequest, makeQueryStreamRequest, makeRpcGroup, makeUpdateManyRequest, makeUpdateRequest, makeUpsertManyRequest, makeUpsertRequest, type QueryRequestClass, type QueryStreamRequestClass, type RpcGroupFromConfig, RpcRouter, type UpdateManyRequestClass, type UpdateRequestClass, type UpsertManyRequestClass, type UpsertRequestClass, } from "./rpc-group.js";
32
+ export { type DatabaseContext, makeDatabaseContextTag, makeRpcHandlers, makeRpcHandlersFromDatabase, makeRpcHandlersLayer, makeRpcHandlersLayerFromDatabase, type RpcHandlers, } from "./rpc-handlers.js";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,OAAO,EACN,KAAK,uBAAuB,EAC5B,6BAA6B,EAC7B,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,SAAS,EAEd,eAAe,EACf,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,SAAS,EACd,eAAe,EAEf,KAAK,aAAa,EAElB,mBAAmB,EACnB,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,QAAQ,EACb,cAAc,EACd,KAA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,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EAEjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EAEtB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAE5B,KAAK,kBAAkB,EACvB,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EACN,KAAK,eAAe,EACpB,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,KAAK,WAAW,GAChB,MAAM,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,61 @@
1
+ /**
2
+ * proseql-rpc — Type-safe Effect RPC layer for proseql databases.
3
+ *
4
+ * Derives an RpcGroup from a proseql DatabaseConfig, exposing all CRUD
5
+ * operations and queries as typed RPC procedures. The client gets full
6
+ * type inference including entity types, error channels, and relationship
7
+ * population — no schema duplication required.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { Effect, Layer } from "effect"
12
+ * import { Rpc, RpcGroup } from "@effect/rpc"
13
+ * import { createEffectDatabase } from "proseql"
14
+ * import { makeRpcGroup, makeRpcHandlers } from "proseql-rpc"
15
+ *
16
+ * // 1. Derive RPC group from your database config
17
+ * const BooksRpc = makeRpcGroup(config)
18
+ *
19
+ * // 2. Create handler layer (wires RPCs to a live database)
20
+ * const HandlerLayer = makeRpcHandlers(config, initialData)
21
+ *
22
+ * // 3. Client gets full type safety
23
+ * const result = yield* client.books.query({ where: { year: { $gt: 2000 } } })
24
+ * // ^? ReadonlyArray<Book>
25
+ * ```
26
+ *
27
+ * @module
28
+ */
29
+ // ============================================================================
30
+ // Error Schemas
31
+ // ============================================================================
32
+ export { CollectionNotFoundErrorSchema, ConcurrencyErrorSchema,
33
+ // Union schemas
34
+ CrudErrorSchema, DanglingReferenceErrorSchema, DuplicateKeyErrorSchema, ForeignKeyErrorSchema, HookErrorSchema,
35
+ // Individual error schemas
36
+ NotFoundErrorSchema, OperationErrorSchema, PopulationErrorSchema, QueryErrorSchema, RpcErrorSchema, TransactionErrorSchema, UniqueConstraintErrorSchema, ValidationErrorSchema, ValidationIssueSchema, } from "./rpc-errors.js";
37
+ // ============================================================================
38
+ // Payload Schemas
39
+ // ============================================================================
40
+ export { AggregatePayloadSchema,
41
+ // Result schemas
42
+ AggregateResultSchema, CreateManyPayloadSchema, CreateManyResultSchema, CreatePayloadSchema, CursorConfigSchema, CursorPageInfoSchema, CursorPageResultSchema, DeleteManyPayloadSchema, DeleteManyResultSchema, DeletePayloadSchema, FilterOperatorsSchema,
43
+ // Payload schemas
44
+ FindByIdPayloadSchema, GroupedAggregateResultSchema, GroupResultSchema, PopulateConfigSchema, QueryPayloadSchema, SearchConfigSchema, SelectConfigSchema, SortConfigSchema,
45
+ // Common schemas
46
+ SortOrderSchema,
47
+ // Streaming options
48
+ StreamingOptionsSchema, UpdateManyPayloadSchema, UpdateManyResultSchema, UpdatePayloadSchema, UpsertManyPayloadSchema, UpsertManyResultSchema, UpsertPayloadSchema, UpsertResultSchema, WhereClauseSchema, } from "./rpc-schemas.js";
49
+ // ============================================================================
50
+ // RPC Group Derivation
51
+ // ============================================================================
52
+ export { makeAggregateRequest, makeCollectionRpcs, makeCreateManyRequest, makeCreateRequest, makeDeleteManyRequest, makeDeleteRequest,
53
+ // Request factory functions
54
+ makeFindByIdRequest, makeQueryRequest, makeQueryStreamRequest,
55
+ // Main entry point
56
+ makeRpcGroup, makeUpdateManyRequest, makeUpdateRequest, makeUpsertManyRequest, makeUpsertRequest, RpcRouter, } from "./rpc-group.js";
57
+ // ============================================================================
58
+ // RPC Handler Layer
59
+ // ============================================================================
60
+ export { makeDatabaseContextTag, makeRpcHandlers, makeRpcHandlersFromDatabase, makeRpcHandlersLayer, makeRpcHandlersLayerFromDatabase, } from "./rpc-handlers.js";
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,OAAO,EAEN,6BAA6B,EAE7B,sBAAsB;AAEtB,gBAAgB;AAChB,eAAe,EAEf,4BAA4B,EAE5B,uBAAuB,EAEvB,qBAAqB,EAErB,eAAe;AAGf,2BAA2B;AAC3B,mBAAmB,EAEnB,oBAAoB,EAEpB,qBAAqB,EAErB,gBAAgB,EAEhB,cAAc,EAEd,sBAAsB,EAEtB,2BAA2B,EAE3B,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,OAAO,EAEN,sBAAsB;AACtB,iBAAiB;AACjB,qBAAqB,EAGrB,uBAAuB,EACvB,sBAAsB,EAGtB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EAEpB,sBAAsB,EAGtB,uBAAuB,EACvB,sBAAsB,EAGtB,mBAAmB,EACnB,qBAAqB;AAErB,kBAAkB;AAClB,qBAAqB,EACrB,4BAA4B,EAE5B,iBAAiB,EAEjB,oBAAoB,EAEpB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB;AAChB,iBAAiB;AACjB,eAAe;AAGf,oBAAoB;AACpB,sBAAsB,EAEtB,uBAAuB,EACvB,sBAAsB,EAGtB,mBAAmB,EAEnB,uBAAuB,EACvB,sBAAsB,EAGtB,mBAAmB,EACnB,kBAAkB,EAElB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E,OAAO,EAQN,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB;AACjB,4BAA4B;AAC5B,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB;AACtB,mBAAmB;AACnB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EAKjB,SAAS,GAKT,MAAM,gBAAgB,CAAC;AAExB,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,OAAO,EAEN,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,oBAAoB,EACpB,gCAAgC,GAEhC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,208 @@
1
+ /**
2
+ * Serializable Effect Schemas for proseql tagged errors.
3
+ *
4
+ * These schemas enable proseql's errors to be serialized/deserialized across
5
+ * RPC transport, allowing typed errors to flow through to clients where they
6
+ * can be caught with `Effect.catchTag`.
7
+ *
8
+ * @module
9
+ */
10
+ import { Schema } from "effect";
11
+ declare const NotFoundErrorSchema_base: Schema.TaggedErrorClass<NotFoundErrorSchema, "NotFoundError", {
12
+ readonly _tag: Schema.tag<"NotFoundError">;
13
+ } & {
14
+ collection: typeof Schema.String;
15
+ id: typeof Schema.String;
16
+ message: typeof Schema.String;
17
+ }>;
18
+ /**
19
+ * Schema for NotFoundError — entity with the given ID was not found.
20
+ */
21
+ export declare class NotFoundErrorSchema extends NotFoundErrorSchema_base {
22
+ }
23
+ declare const DuplicateKeyErrorSchema_base: Schema.TaggedErrorClass<DuplicateKeyErrorSchema, "DuplicateKeyError", {
24
+ readonly _tag: Schema.tag<"DuplicateKeyError">;
25
+ } & {
26
+ collection: typeof Schema.String;
27
+ field: typeof Schema.String;
28
+ value: typeof Schema.String;
29
+ existingId: typeof Schema.String;
30
+ message: typeof Schema.String;
31
+ }>;
32
+ /**
33
+ * Schema for DuplicateKeyError — entity with the same key already exists.
34
+ */
35
+ export declare class DuplicateKeyErrorSchema extends DuplicateKeyErrorSchema_base {
36
+ }
37
+ declare const ForeignKeyErrorSchema_base: Schema.TaggedErrorClass<ForeignKeyErrorSchema, "ForeignKeyError", {
38
+ readonly _tag: Schema.tag<"ForeignKeyError">;
39
+ } & {
40
+ collection: typeof Schema.String;
41
+ field: typeof Schema.String;
42
+ value: typeof Schema.String;
43
+ targetCollection: typeof Schema.String;
44
+ message: typeof Schema.String;
45
+ }>;
46
+ /**
47
+ * Schema for ForeignKeyError — referenced entity does not exist.
48
+ */
49
+ export declare class ForeignKeyErrorSchema extends ForeignKeyErrorSchema_base {
50
+ }
51
+ /**
52
+ * Schema for a single validation issue.
53
+ */
54
+ export declare const ValidationIssueSchema: Schema.Struct<{
55
+ field: typeof Schema.String;
56
+ message: typeof Schema.String;
57
+ value: Schema.optional<typeof Schema.Unknown>;
58
+ expected: Schema.optional<typeof Schema.String>;
59
+ received: Schema.optional<typeof Schema.String>;
60
+ }>;
61
+ declare const ValidationErrorSchema_base: Schema.TaggedErrorClass<ValidationErrorSchema, "ValidationError", {
62
+ readonly _tag: Schema.tag<"ValidationError">;
63
+ } & {
64
+ message: typeof Schema.String;
65
+ issues: Schema.Array$<Schema.Struct<{
66
+ field: typeof Schema.String;
67
+ message: typeof Schema.String;
68
+ value: Schema.optional<typeof Schema.Unknown>;
69
+ expected: Schema.optional<typeof Schema.String>;
70
+ received: Schema.optional<typeof Schema.String>;
71
+ }>>;
72
+ }>;
73
+ /**
74
+ * Schema for ValidationError — schema validation failed.
75
+ */
76
+ export declare class ValidationErrorSchema extends ValidationErrorSchema_base {
77
+ }
78
+ declare const UniqueConstraintErrorSchema_base: Schema.TaggedErrorClass<UniqueConstraintErrorSchema, "UniqueConstraintError", {
79
+ readonly _tag: Schema.tag<"UniqueConstraintError">;
80
+ } & {
81
+ collection: typeof Schema.String;
82
+ constraint: typeof Schema.String;
83
+ fields: Schema.Array$<typeof Schema.String>;
84
+ values: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
85
+ existingId: typeof Schema.String;
86
+ message: typeof Schema.String;
87
+ }>;
88
+ /**
89
+ * Schema for UniqueConstraintError — unique constraint was violated.
90
+ */
91
+ export declare class UniqueConstraintErrorSchema extends UniqueConstraintErrorSchema_base {
92
+ }
93
+ declare const ConcurrencyErrorSchema_base: Schema.TaggedErrorClass<ConcurrencyErrorSchema, "ConcurrencyError", {
94
+ readonly _tag: Schema.tag<"ConcurrencyError">;
95
+ } & {
96
+ collection: typeof Schema.String;
97
+ id: typeof Schema.String;
98
+ message: typeof Schema.String;
99
+ }>;
100
+ /**
101
+ * Schema for ConcurrencyError — concurrent modification conflict.
102
+ */
103
+ export declare class ConcurrencyErrorSchema extends ConcurrencyErrorSchema_base {
104
+ }
105
+ declare const OperationErrorSchema_base: Schema.TaggedErrorClass<OperationErrorSchema, "OperationError", {
106
+ readonly _tag: Schema.tag<"OperationError">;
107
+ } & {
108
+ operation: typeof Schema.String;
109
+ reason: typeof Schema.String;
110
+ message: typeof Schema.String;
111
+ }>;
112
+ /**
113
+ * Schema for OperationError — operation was rejected (e.g., update/delete on append-only).
114
+ */
115
+ export declare class OperationErrorSchema extends OperationErrorSchema_base {
116
+ }
117
+ declare const TransactionErrorSchema_base: Schema.TaggedErrorClass<TransactionErrorSchema, "TransactionError", {
118
+ readonly _tag: Schema.tag<"TransactionError">;
119
+ } & {
120
+ operation: Schema.Literal<["begin", "commit", "rollback"]>;
121
+ reason: typeof Schema.String;
122
+ message: typeof Schema.String;
123
+ }>;
124
+ /**
125
+ * Schema for TransactionError — transaction operation failed.
126
+ */
127
+ export declare class TransactionErrorSchema extends TransactionErrorSchema_base {
128
+ }
129
+ declare const HookErrorSchema_base: Schema.TaggedErrorClass<HookErrorSchema, "HookError", {
130
+ readonly _tag: Schema.tag<"HookError">;
131
+ } & {
132
+ hook: typeof Schema.String;
133
+ collection: typeof Schema.String;
134
+ operation: Schema.Literal<["create", "update", "delete"]>;
135
+ reason: typeof Schema.String;
136
+ message: typeof Schema.String;
137
+ }>;
138
+ /**
139
+ * Schema for HookError — lifecycle hook rejected the operation.
140
+ */
141
+ export declare class HookErrorSchema extends HookErrorSchema_base {
142
+ }
143
+ declare const DanglingReferenceErrorSchema_base: Schema.TaggedErrorClass<DanglingReferenceErrorSchema, "DanglingReferenceError", {
144
+ readonly _tag: Schema.tag<"DanglingReferenceError">;
145
+ } & {
146
+ collection: typeof Schema.String;
147
+ field: typeof Schema.String;
148
+ targetId: typeof Schema.String;
149
+ message: typeof Schema.String;
150
+ }>;
151
+ /**
152
+ * Schema for DanglingReferenceError — referenced entity no longer exists.
153
+ */
154
+ export declare class DanglingReferenceErrorSchema extends DanglingReferenceErrorSchema_base {
155
+ }
156
+ declare const CollectionNotFoundErrorSchema_base: Schema.TaggedErrorClass<CollectionNotFoundErrorSchema, "CollectionNotFoundError", {
157
+ readonly _tag: Schema.tag<"CollectionNotFoundError">;
158
+ } & {
159
+ collection: typeof Schema.String;
160
+ message: typeof Schema.String;
161
+ }>;
162
+ /**
163
+ * Schema for CollectionNotFoundError — collection does not exist in config.
164
+ */
165
+ export declare class CollectionNotFoundErrorSchema extends CollectionNotFoundErrorSchema_base {
166
+ }
167
+ declare const PopulationErrorSchema_base: Schema.TaggedErrorClass<PopulationErrorSchema, "PopulationError", {
168
+ readonly _tag: Schema.tag<"PopulationError">;
169
+ } & {
170
+ collection: typeof Schema.String;
171
+ relationship: typeof Schema.String;
172
+ message: typeof Schema.String;
173
+ cause: Schema.optional<typeof Schema.Unknown>;
174
+ }>;
175
+ /**
176
+ * Schema for PopulationError — relationship population failed.
177
+ */
178
+ export declare class PopulationErrorSchema extends PopulationErrorSchema_base {
179
+ }
180
+ /**
181
+ * Union of all CRUD error schemas.
182
+ */
183
+ export declare const CrudErrorSchema: Schema.Union<[typeof NotFoundErrorSchema, typeof DuplicateKeyErrorSchema, typeof ForeignKeyErrorSchema, typeof ValidationErrorSchema, typeof UniqueConstraintErrorSchema, typeof ConcurrencyErrorSchema, typeof OperationErrorSchema, typeof TransactionErrorSchema, typeof HookErrorSchema]>;
184
+ /**
185
+ * Union of all query error schemas.
186
+ */
187
+ export declare const QueryErrorSchema: Schema.Union<[typeof DanglingReferenceErrorSchema, typeof CollectionNotFoundErrorSchema, typeof PopulationErrorSchema]>;
188
+ /**
189
+ * Union of all RPC error schemas.
190
+ */
191
+ export declare const RpcErrorSchema: Schema.Union<[typeof NotFoundErrorSchema, typeof DuplicateKeyErrorSchema, typeof ForeignKeyErrorSchema, typeof ValidationErrorSchema, typeof UniqueConstraintErrorSchema, typeof ConcurrencyErrorSchema, typeof OperationErrorSchema, typeof TransactionErrorSchema, typeof HookErrorSchema, typeof DanglingReferenceErrorSchema, typeof CollectionNotFoundErrorSchema, typeof PopulationErrorSchema]>;
192
+ export type NotFoundError = typeof NotFoundErrorSchema.Type;
193
+ export type DuplicateKeyError = typeof DuplicateKeyErrorSchema.Type;
194
+ export type ForeignKeyError = typeof ForeignKeyErrorSchema.Type;
195
+ export type ValidationError = typeof ValidationErrorSchema.Type;
196
+ export type UniqueConstraintError = typeof UniqueConstraintErrorSchema.Type;
197
+ export type ConcurrencyError = typeof ConcurrencyErrorSchema.Type;
198
+ export type OperationError = typeof OperationErrorSchema.Type;
199
+ export type TransactionError = typeof TransactionErrorSchema.Type;
200
+ export type HookError = typeof HookErrorSchema.Type;
201
+ export type DanglingReferenceError = typeof DanglingReferenceErrorSchema.Type;
202
+ export type CollectionNotFoundError = typeof CollectionNotFoundErrorSchema.Type;
203
+ export type PopulationError = typeof PopulationErrorSchema.Type;
204
+ export type CrudError = typeof CrudErrorSchema.Type;
205
+ export type QueryError = typeof QueryErrorSchema.Type;
206
+ export type RpcError = typeof RpcErrorSchema.Type;
207
+ export {};
208
+ //# sourceMappingURL=rpc-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-errors.d.ts","sourceRoot":"","sources":["../src/rpc-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;AAMhC;;GAEG;AACH,qBAA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,qBAAqB,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAClE,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AACpD,MAAM,MAAM,sBAAsB,GAAG,OAAO,4BAA4B,CAAC,IAAI,CAAC;AAC9E,MAAM,MAAM,uBAAuB,GAAG,OAAO,6BAA6B,CAAC,IAAI,CAAC;AAChF,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAC;AAChE,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AACpD,MAAM,MAAM,UAAU,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Serializable Effect Schemas for proseql tagged errors.
3
+ *
4
+ * These schemas enable proseql's errors to be serialized/deserialized across
5
+ * RPC transport, allowing typed errors to flow through to clients where they
6
+ * can be caught with `Effect.catchTag`.
7
+ *
8
+ * @module
9
+ */
10
+ import { Schema } from "effect";
11
+ // ============================================================================
12
+ // CRUD Error Schemas
13
+ // ============================================================================
14
+ /**
15
+ * Schema for NotFoundError — entity with the given ID was not found.
16
+ */
17
+ export class NotFoundErrorSchema extends Schema.TaggedError("NotFoundError")("NotFoundError", {
18
+ collection: Schema.String,
19
+ id: Schema.String,
20
+ message: Schema.String,
21
+ }) {
22
+ }
23
+ /**
24
+ * Schema for DuplicateKeyError — entity with the same key already exists.
25
+ */
26
+ export class DuplicateKeyErrorSchema extends Schema.TaggedError("DuplicateKeyError")("DuplicateKeyError", {
27
+ collection: Schema.String,
28
+ field: Schema.String,
29
+ value: Schema.String,
30
+ existingId: Schema.String,
31
+ message: Schema.String,
32
+ }) {
33
+ }
34
+ /**
35
+ * Schema for ForeignKeyError — referenced entity does not exist.
36
+ */
37
+ export class ForeignKeyErrorSchema extends Schema.TaggedError("ForeignKeyError")("ForeignKeyError", {
38
+ collection: Schema.String,
39
+ field: Schema.String,
40
+ value: Schema.String,
41
+ targetCollection: Schema.String,
42
+ message: Schema.String,
43
+ }) {
44
+ }
45
+ /**
46
+ * Schema for a single validation issue.
47
+ */
48
+ export const ValidationIssueSchema = Schema.Struct({
49
+ field: Schema.String,
50
+ message: Schema.String,
51
+ value: Schema.optional(Schema.Unknown),
52
+ expected: Schema.optional(Schema.String),
53
+ received: Schema.optional(Schema.String),
54
+ });
55
+ /**
56
+ * Schema for ValidationError — schema validation failed.
57
+ */
58
+ export class ValidationErrorSchema extends Schema.TaggedError("ValidationError")("ValidationError", {
59
+ message: Schema.String,
60
+ issues: Schema.Array(ValidationIssueSchema),
61
+ }) {
62
+ }
63
+ /**
64
+ * Schema for UniqueConstraintError — unique constraint was violated.
65
+ */
66
+ export class UniqueConstraintErrorSchema extends Schema.TaggedError("UniqueConstraintError")("UniqueConstraintError", {
67
+ collection: Schema.String,
68
+ constraint: Schema.String,
69
+ fields: Schema.Array(Schema.String),
70
+ values: Schema.Record({ key: Schema.String, value: Schema.Unknown }),
71
+ existingId: Schema.String,
72
+ message: Schema.String,
73
+ }) {
74
+ }
75
+ /**
76
+ * Schema for ConcurrencyError — concurrent modification conflict.
77
+ */
78
+ export class ConcurrencyErrorSchema extends Schema.TaggedError("ConcurrencyError")("ConcurrencyError", {
79
+ collection: Schema.String,
80
+ id: Schema.String,
81
+ message: Schema.String,
82
+ }) {
83
+ }
84
+ /**
85
+ * Schema for OperationError — operation was rejected (e.g., update/delete on append-only).
86
+ */
87
+ export class OperationErrorSchema extends Schema.TaggedError("OperationError")("OperationError", {
88
+ operation: Schema.String,
89
+ reason: Schema.String,
90
+ message: Schema.String,
91
+ }) {
92
+ }
93
+ /**
94
+ * Schema for TransactionError — transaction operation failed.
95
+ */
96
+ export class TransactionErrorSchema extends Schema.TaggedError("TransactionError")("TransactionError", {
97
+ operation: Schema.Literal("begin", "commit", "rollback"),
98
+ reason: Schema.String,
99
+ message: Schema.String,
100
+ }) {
101
+ }
102
+ /**
103
+ * Schema for HookError — lifecycle hook rejected the operation.
104
+ */
105
+ export class HookErrorSchema extends Schema.TaggedError("HookError")("HookError", {
106
+ hook: Schema.String,
107
+ collection: Schema.String,
108
+ operation: Schema.Literal("create", "update", "delete"),
109
+ reason: Schema.String,
110
+ message: Schema.String,
111
+ }) {
112
+ }
113
+ // ============================================================================
114
+ // Query Error Schemas
115
+ // ============================================================================
116
+ /**
117
+ * Schema for DanglingReferenceError — referenced entity no longer exists.
118
+ */
119
+ export class DanglingReferenceErrorSchema extends Schema.TaggedError("DanglingReferenceError")("DanglingReferenceError", {
120
+ collection: Schema.String,
121
+ field: Schema.String,
122
+ targetId: Schema.String,
123
+ message: Schema.String,
124
+ }) {
125
+ }
126
+ /**
127
+ * Schema for CollectionNotFoundError — collection does not exist in config.
128
+ */
129
+ export class CollectionNotFoundErrorSchema extends Schema.TaggedError("CollectionNotFoundError")("CollectionNotFoundError", {
130
+ collection: Schema.String,
131
+ message: Schema.String,
132
+ }) {
133
+ }
134
+ /**
135
+ * Schema for PopulationError — relationship population failed.
136
+ */
137
+ export class PopulationErrorSchema extends Schema.TaggedError("PopulationError")("PopulationError", {
138
+ collection: Schema.String,
139
+ relationship: Schema.String,
140
+ message: Schema.String,
141
+ cause: Schema.optional(Schema.Unknown),
142
+ }) {
143
+ }
144
+ // ============================================================================
145
+ // Union Schemas
146
+ // ============================================================================
147
+ /**
148
+ * Union of all CRUD error schemas.
149
+ */
150
+ export const CrudErrorSchema = Schema.Union(NotFoundErrorSchema, DuplicateKeyErrorSchema, ForeignKeyErrorSchema, ValidationErrorSchema, UniqueConstraintErrorSchema, ConcurrencyErrorSchema, OperationErrorSchema, TransactionErrorSchema, HookErrorSchema);
151
+ /**
152
+ * Union of all query error schemas.
153
+ */
154
+ export const QueryErrorSchema = Schema.Union(DanglingReferenceErrorSchema, CollectionNotFoundErrorSchema, PopulationErrorSchema);
155
+ /**
156
+ * Union of all RPC error schemas.
157
+ */
158
+ export const RpcErrorSchema = Schema.Union(NotFoundErrorSchema, DuplicateKeyErrorSchema, ForeignKeyErrorSchema, ValidationErrorSchema, UniqueConstraintErrorSchema, ConcurrencyErrorSchema, OperationErrorSchema, TransactionErrorSchema, HookErrorSchema, DanglingReferenceErrorSchema, CollectionNotFoundErrorSchema, PopulationErrorSchema);
159
+ //# sourceMappingURL=rpc-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-errors.js","sourceRoot":"","sources":["../src/rpc-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,CAC1D,eAAe,CACf,CAAC,eAAe,EAAE;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,EAAE,EAAE,MAAM,CAAC,MAAM;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM;CACtB,CAAC;CAAG;AAEL;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,MAAM,CAAC,WAAW,CAC9D,mBAAmB,CACnB,CAAC,mBAAmB,EAAE;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,OAAO,EAAE,MAAM,CAAC,MAAM;CACtB,CAAC;CAAG;AAEL;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,MAAM,C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