@wordrhyme/auto-crud-server 1.0.4 → 1.0.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/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
+ import { z } from "zod";
1
2
  import { PgTable } from "drizzle-orm/pg-core";
2
- import * as _trpc_server0 from "@trpc/server";
3
+ import * as _trpc_server2 from "@trpc/server";
3
4
  import { PostgresJsDatabase } from "drizzle-orm/postgres-js";
4
- import { SQL } from "drizzle-orm";
5
- import { z } from "zod";
5
+ import { AnyColumn, SQL } from "drizzle-orm";
6
6
 
7
7
  //#region src/trpc.d.ts
8
8
  /**
@@ -12,23 +12,48 @@ import { z } from "zod";
12
12
  interface Context {
13
13
  db: PostgresJsDatabase<Record<string, never>>;
14
14
  }
15
- declare const router: _trpc_server0.TRPCRouterBuilder<{
15
+ declare const router: _trpc_server2.TRPCRouterBuilder<{
16
16
  ctx: Context;
17
17
  meta: object;
18
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
18
+ errorShape: _trpc_server2.TRPCDefaultErrorShape;
19
19
  transformer: true;
20
20
  }>;
21
- declare const publicProcedure: _trpc_server0.TRPCProcedureBuilder<Context, object, object, _trpc_server0.TRPCUnsetMarker, _trpc_server0.TRPCUnsetMarker, _trpc_server0.TRPCUnsetMarker, _trpc_server0.TRPCUnsetMarker, false>;
21
+ declare const publicProcedure: _trpc_server2.TRPCProcedureBuilder<Context, object, object, _trpc_server2.TRPCUnsetMarker, _trpc_server2.TRPCUnsetMarker, _trpc_server2.TRPCUnsetMarker, _trpc_server2.TRPCUnsetMarker, false>;
22
22
  //#endregion
23
23
  //#region src/types/config.d.ts
24
- type CrudOperation = "list" | "get" | "create" | "update" | "delete" | "deleteMany" | "updateMany" | "upsert" | "export" | "import" | "createMany";
25
- type WriteOperation = "create" | "update";
24
+ type CrudOperation = 'list' | 'get' | 'create' | 'update' | 'delete' | 'deleteMany' | 'updateMany' | 'upsert' | 'export' | 'import' | 'createMany';
25
+ type WriteOperation = 'create' | 'update';
26
26
  /**
27
27
  * 表字段键类型提取
28
28
  * 用于 omitFields 的强类型支持
29
29
  */
30
- type TableColumnKeys<T extends PgTable> = keyof T["_"]["columns"];
30
+ type TableColumnKeys<T extends PgTable> = keyof T['_']['columns'];
31
31
  type AnyProcedure = any;
32
+ /**
33
+ * 过滤/排序字段的自定义 SQL expression。
34
+ *
35
+ * 普通字段无需配置 expression,直接使用字段名即可;jsonb、i18n、派生字段等
36
+ * 需要自定义查询目标时,可通过 expression 显式返回 Drizzle SQL 片段或列对象。
37
+ */
38
+ type CrudColumnExpression<TTable extends PgTable = PgTable> = (params: {
39
+ table: TTable;
40
+ }) => SQL | AnyColumn;
41
+ /**
42
+ * 过滤/排序字段配置。
43
+ *
44
+ * - string: 普通表字段,继续使用 table[id]
45
+ * - object.jsonField: 从 jsonb 字段中提取一个或多个 key 作为文本查询目标
46
+ * - object.expression: 高级场景自定义 SQL expression
47
+ */
48
+ interface CrudColumnConfig<TTable extends PgTable = PgTable> {
49
+ /** 前端传入的逻辑字段名,同时默认对应 table 上的列名 */
50
+ id: string;
51
+ /** jsonb 对象内部要读取的字段;数组按顺序 coalesce 作为 fallback */
52
+ jsonField?: string | string[];
53
+ /** 高级场景自定义查询目标,优先级高于 jsonField */
54
+ expression?: CrudColumnExpression<TTable>;
55
+ }
56
+ type CrudColumnRef<TTable extends PgTable = PgTable> = string | CrudColumnConfig<TTable>;
32
57
  interface SoftDeleteConfig {
33
58
  /** 软删除标记列名 */
34
59
  column: string;
@@ -63,7 +88,7 @@ interface ListInput {
63
88
  operator: string;
64
89
  filterId: string;
65
90
  }>;
66
- joinOperator: "and" | "or";
91
+ joinOperator: 'and' | 'or';
67
92
  }
68
93
  /**
69
94
  * 列表查询结果类型
@@ -75,6 +100,14 @@ interface ListResult<TSelect> {
75
100
  perPage: number;
76
101
  pageCount: number;
77
102
  }
103
+ /**
104
+ * 单条查询输入类型
105
+ * - string: 兼容旧的 get(id) 调用
106
+ * - object: 支持通过 getInputSchema 扩展 include 等控制参数
107
+ */
108
+ type GetInput = string | {
109
+ id: string;
110
+ };
78
111
  /**
79
112
  * 导出查询输入类型(复用 ListInput 的筛选/排序,无分页)
80
113
  */
@@ -90,7 +123,7 @@ interface ExportInput {
90
123
  operator: string;
91
124
  filterId: string;
92
125
  }>;
93
- joinOperator?: "and" | "or";
126
+ joinOperator?: 'and' | 'or';
94
127
  /** 导出数量限制,会被 clamp 到 [1, maxExportSize] */
95
128
  limit?: number;
96
129
  }
@@ -137,17 +170,18 @@ interface ImportInput {
137
170
  * - "upsert": 存在则更新,不存在则新建
138
171
  * - "error": 冲突行计入失败
139
172
  */
140
- onConflict?: "skip" | "upsert" | "error";
173
+ onConflict?: 'skip' | 'upsert' | 'error';
141
174
  }
142
- interface ListMiddlewareParams<TContext, TSelect> {
175
+ interface ListMiddlewareParams<TContext, TSelect, TListInput extends ListInput = ListInput> {
143
176
  ctx: TContext;
144
- input: ListInput;
145
- next: (input?: ListInput) => Promise<ListResult<TSelect>>;
177
+ input: TListInput;
178
+ next: (input?: TListInput) => Promise<ListResult<TSelect>>;
146
179
  }
147
- interface GetMiddlewareParams<TContext, TSelect> {
180
+ interface GetMiddlewareParams<TContext, TSelect, TGetInput extends GetInput = GetInput> {
148
181
  ctx: TContext;
149
182
  id: string;
150
- next: () => Promise<TSelect | null>;
183
+ input: TGetInput;
184
+ next: (input?: TGetInput) => Promise<TSelect | null>;
151
185
  }
152
186
  interface CreateMiddlewareParams<TContext, TSelect, TInsert> {
153
187
  ctx: TContext;
@@ -190,10 +224,10 @@ interface UpsertMiddlewareParams<TContext, TSelect, TInsert> {
190
224
  isNew: boolean;
191
225
  }>;
192
226
  }
193
- interface ExportMiddlewareParams<TContext, TSelect> {
227
+ interface ExportMiddlewareParams<TContext, TSelect, TExportInput extends ExportInput = ExportInput> {
194
228
  ctx: TContext;
195
- input: ExportInput;
196
- next: (input?: ExportInput) => Promise<ExportResult<TSelect>>;
229
+ input: TExportInput;
230
+ next: (input?: TExportInput) => Promise<ExportResult<TSelect>>;
197
231
  }
198
232
  interface ImportMiddlewareParams<TContext> {
199
233
  ctx: TContext;
@@ -234,15 +268,15 @@ interface CreateManyMiddlewareParams<TContext, TSelect, TInsert> {
234
268
  * },
235
269
  * }
236
270
  */
237
- interface CrudMiddleware<TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown> {
271
+ interface CrudMiddleware<TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown, TListInput extends ListInput = ListInput, TGetInput extends GetInput = GetInput, TExportInput extends ExportInput = ExportInput> {
238
272
  /**
239
273
  * 列表查询包装器
240
274
  */
241
- list?: (params: ListMiddlewareParams<TContext, TSelect>) => Promise<ListResult<TSelect>>;
275
+ list?: (params: ListMiddlewareParams<TContext, TSelect, TListInput>) => Promise<ListResult<TSelect>>;
242
276
  /**
243
277
  * 单条查询包装器
244
278
  */
245
- get?: (params: GetMiddlewareParams<TContext, TSelect>) => Promise<TSelect | null>;
279
+ get?: (params: GetMiddlewareParams<TContext, TSelect, TGetInput>) => Promise<TSelect | null>;
246
280
  /**
247
281
  * 创建包装器
248
282
  */
@@ -281,7 +315,7 @@ interface CrudMiddleware<TContext = unknown, TSelect = unknown, TInsert = unknow
281
315
  * 导出包装器
282
316
  * 可用于审计日志、限流、异步队列调度
283
317
  */
284
- export?: (params: ExportMiddlewareParams<TContext, TSelect>) => Promise<ExportResult<TSelect>>;
318
+ export?: (params: ExportMiddlewareParams<TContext, TSelect, TExportInput>) => Promise<ExportResult<TSelect>>;
285
319
  /**
286
320
  * 导入包装器
287
321
  * 可用于审计日志、限流、异步队列调度
@@ -377,7 +411,7 @@ type ProcedureConfig = AnyProcedure | ProcedureMap | ProcedureFactory;
377
411
  * authorize: (ctx, resource) => resource.ownerId === ctx.user.id,
378
412
  * })
379
413
  */
380
- interface CrudRouterConfig<TTable extends PgTable = PgTable, TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown> {
414
+ interface CrudRouterConfig<TTable extends PgTable = PgTable, TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown, TListInput extends ListInput = ListInput, TGetInput extends GetInput = GetInput, TExportInput extends ExportInput = ExportInput> {
381
415
  /** Drizzle 表定义 */
382
416
  table: TTable;
383
417
  /**
@@ -408,6 +442,35 @@ interface CrudRouterConfig<TTable extends PgTable = PgTable, TContext = unknown,
408
442
  updateSchema?: z.ZodType<TUpdate>;
409
443
  /** 查询返回 Schema */
410
444
  selectSchema?: z.ZodType<TSelect>;
445
+ /**
446
+ * 列表查询输入 Schema(可选)
447
+ * - 默认使用内置基础列表输入:page、perPage、sort、filters、joinOperator
448
+ * - 业务侧可以基于 baseListInputSchema.extend(...) 增加自定义参数
449
+ * - 默认查询逻辑只读取基础字段,额外字段会保留给 middleware.list 使用
450
+ *
451
+ * @example
452
+ * listInputSchema: baseListInputSchema.extend({
453
+ * include: z.object({ skus: z.boolean().optional() }).optional(),
454
+ * })
455
+ */
456
+ listInputSchema?: z.ZodType<TListInput>;
457
+ /**
458
+ * 单条查询输入 Schema(可选)
459
+ * - 默认兼容 get(id) 和 get({ id })
460
+ * - 业务侧可以基于 baseGetInputSchema.extend(...) 增加 include 等控制参数
461
+ * - 配置后仍保留 get(id) 字符串调用兼容性
462
+ * - 默认查询逻辑只读取 id,额外字段会保留给 middleware.get 使用
463
+ */
464
+ getInputSchema?: z.ZodType<Extract<TGetInput, {
465
+ id: string;
466
+ }>>;
467
+ /**
468
+ * 导出查询输入 Schema(可选)
469
+ * - 默认使用内置基础导出输入:sort、filters、joinOperator、limit
470
+ * - 业务侧可以基于 baseExportInputSchema.extend(...) 增加自定义参数
471
+ * - 默认查询逻辑只读取基础字段,额外字段会保留给 middleware.export 使用
472
+ */
473
+ exportInputSchema?: z.ZodType<TExportInput>;
411
474
  /**
412
475
  * Procedure 配置(统一字段)
413
476
  *
@@ -458,10 +521,25 @@ interface CrudRouterConfig<TTable extends PgTable = PgTable, TContext = unknown,
458
521
  omitFields?: TableColumnKeys<TTable>[];
459
522
  /** ID 字段名,默认 "id" */
460
523
  idField?: string;
461
- /** 可过滤的列白名单 */
462
- filterableColumns?: string[];
463
- /** 可排序的列白名单 */
464
- sortableColumns?: string[];
524
+ /**
525
+ * 可过滤的列白名单。
526
+ *
527
+ * 普通字段使用字符串;jsonb/i18n 字段可用对象配置 jsonField,
528
+ * 由服务端显式生成 text expression,前端仍然传 id。
529
+ *
530
+ * @example
531
+ * filterableColumns: [
532
+ * 'status',
533
+ * { id: 'name', jsonField: ['zh-CN', 'en-US', 'en', 'zh'] },
534
+ * ]
535
+ */
536
+ filterableColumns?: CrudColumnRef<TTable>[];
537
+ /**
538
+ * 可排序的列白名单。
539
+ *
540
+ * 与 filterableColumns 相同,普通字段使用字符串,jsonb/i18n 字段可配置 jsonField。
541
+ */
542
+ sortableColumns?: CrudColumnRef<TTable>[];
465
543
  /** 批量操作的最大数量限制,默认 100 */
466
544
  maxBatchSize?: number;
467
545
  /**
@@ -516,7 +594,7 @@ interface CrudRouterConfig<TTable extends PgTable = PgTable, TContext = unknown,
516
594
  * }),
517
595
  * }
518
596
  */
519
- middleware?: CrudMiddleware<TContext, TSelect, TInsert, TUpdate>;
597
+ middleware?: CrudMiddleware<TContext, TSelect, TInsert, TUpdate, TListInput, TGetInput, TExportInput>;
520
598
  }
521
599
  interface CrudProcedures {
522
600
  list: AnyProcedure;
@@ -540,6 +618,94 @@ interface CrudProcedures {
540
618
  type CrudRouterReturn = ReturnType<typeof router> & {
541
619
  procedures: CrudProcedures;
542
620
  };
621
+ declare const baseListInputSchema: z.ZodObject<{
622
+ page: z.ZodDefault<z.ZodNumber>;
623
+ perPage: z.ZodDefault<z.ZodNumber>;
624
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
625
+ id: z.ZodString;
626
+ desc: z.ZodBoolean;
627
+ }, z.core.$strip>>>;
628
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
629
+ id: z.ZodString;
630
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
631
+ variant: z.ZodEnum<{
632
+ number: "number";
633
+ boolean: "boolean";
634
+ date: "date";
635
+ text: "text";
636
+ range: "range";
637
+ dateRange: "dateRange";
638
+ select: "select";
639
+ multiSelect: "multiSelect";
640
+ }>;
641
+ operator: z.ZodEnum<{
642
+ iLike: "iLike";
643
+ notILike: "notILike";
644
+ eq: "eq";
645
+ ne: "ne";
646
+ isEmpty: "isEmpty";
647
+ isNotEmpty: "isNotEmpty";
648
+ lt: "lt";
649
+ lte: "lte";
650
+ gt: "gt";
651
+ gte: "gte";
652
+ isBetween: "isBetween";
653
+ isRelativeToToday: "isRelativeToToday";
654
+ inArray: "inArray";
655
+ notInArray: "notInArray";
656
+ }>;
657
+ filterId: z.ZodString;
658
+ }, z.core.$strip>>>;
659
+ joinOperator: z.ZodDefault<z.ZodEnum<{
660
+ and: "and";
661
+ or: "or";
662
+ }>>;
663
+ }, z.core.$strip>;
664
+ declare const baseGetInputSchema: z.ZodObject<{
665
+ id: z.ZodString;
666
+ }, z.core.$strip>;
667
+ declare const baseExportInputSchema: z.ZodObject<{
668
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
669
+ id: z.ZodString;
670
+ desc: z.ZodBoolean;
671
+ }, z.core.$strip>>>;
672
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
673
+ id: z.ZodString;
674
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
675
+ variant: z.ZodEnum<{
676
+ number: "number";
677
+ boolean: "boolean";
678
+ date: "date";
679
+ text: "text";
680
+ range: "range";
681
+ dateRange: "dateRange";
682
+ select: "select";
683
+ multiSelect: "multiSelect";
684
+ }>;
685
+ operator: z.ZodEnum<{
686
+ iLike: "iLike";
687
+ notILike: "notILike";
688
+ eq: "eq";
689
+ ne: "ne";
690
+ isEmpty: "isEmpty";
691
+ isNotEmpty: "isNotEmpty";
692
+ lt: "lt";
693
+ lte: "lte";
694
+ gt: "gt";
695
+ gte: "gte";
696
+ isBetween: "isBetween";
697
+ isRelativeToToday: "isRelativeToToday";
698
+ inArray: "inArray";
699
+ notInArray: "notInArray";
700
+ }>;
701
+ filterId: z.ZodString;
702
+ }, z.core.$strip>>>;
703
+ joinOperator: z.ZodDefault<z.ZodEnum<{
704
+ and: "and";
705
+ or: "or";
706
+ }>>;
707
+ limit: z.ZodOptional<z.ZodNumber>;
708
+ }, z.core.$strip>;
543
709
  /**
544
710
  * 创建 CRUD Router
545
711
  *
@@ -552,7 +718,7 @@ type CrudRouterReturn = ReturnType<typeof router> & {
552
718
  * @typeParam TInsert - 创建输入类型
553
719
  * @typeParam TUpdate - 更新输入类型
554
720
  */
555
- declare function createCrudRouter<TTable extends PgTable = PgTable, TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown>(config: CrudRouterConfig<TTable, TContext, TSelect, TInsert, TUpdate>): CrudRouterReturn;
721
+ declare function createCrudRouter<TTable extends PgTable = PgTable, TContext = unknown, TSelect = unknown, TInsert = unknown, TUpdate = unknown, TListInput extends ListInput = ListInput, TGetInput extends GetInput = GetInput, TExportInput extends ExportInput = ExportInput>(config: CrudRouterConfig<TTable, TContext, TSelect, TInsert, TUpdate, TListInput, TGetInput, TExportInput>): CrudRouterReturn;
556
722
  //#endregion
557
723
  //#region src/lib/middleware-helpers.d.ts
558
724
  /**
@@ -612,34 +778,6 @@ type AnyMiddlewareParams<TContext> = {
612
778
  declare function composeMiddleware<TContext, TResult>(...middlewares: Array<(params: AnyMiddlewareParams<TContext>) => Promise<any>>): (params: AnyMiddlewareParams<TContext>) => Promise<TResult>;
613
779
  //#endregion
614
780
  //#region src/types/hook-types.d.ts
615
- /**
616
- * Hook 系统类型工具
617
- *
618
- * 提供 CrudHookEventMap 类型——从 Zod Schema / Drizzle Table 推导出
619
- * auto-crud 相关的所有 Hook 事件类型。
620
- *
621
- * 下游插件通过 module augmentation 合并到全局 HookEventMap:
622
- *
623
- * @example
624
- * ```typescript
625
- * import type { CrudHookEventMap } from "@wordrhyme/auto-crud-server";
626
- * import type { z } from "zod";
627
- * import type { InferSelectModel } from "drizzle-orm";
628
- *
629
- * declare module "@wordrhyme/plugin" {
630
- * interface HookEventMap extends CrudHookEventMap<
631
- * "crm",
632
- * "customers",
633
- * z.infer<typeof createCustomerSchema>,
634
- * z.infer<typeof updateCustomerSchema>,
635
- * InferSelectModel<typeof customerTable>
636
- * > {}
637
- * }
638
- *
639
- * // 使用效果:
640
- * // ctx.hooks.emit('crm.customers. ← IDE 自动补全所有 hook 名和 payload
641
- * ```
642
- */
643
781
  /**
644
782
  * 从 CRUD Schema 类型自动推导 Hook 事件映射
645
783
  *
@@ -652,8 +790,11 @@ declare function composeMiddleware<TContext, TResult>(...middlewares: Array<(par
652
790
  * @typeParam TCreate - 创建输入类型(z.infer<typeof createSchema>)
653
791
  * @typeParam TUpdate - 更新输入类型(z.infer<typeof updateSchema>)
654
792
  * @typeParam TSelect - 查询返回类型(InferSelectModel<typeof table>)
793
+ * @typeParam TListInput - list procedure 输入类型
794
+ * @typeParam TGetInput - get procedure 输入类型
795
+ * @typeParam TExportInput - export procedure 输入类型
655
796
  */
656
- type CrudHookEventMap<PluginId extends string, ResourceName extends string, TCreate, TUpdate, TSelect> = { [K in `${PluginId}.${ResourceName}.beforeCreate`]: TCreate } & { [K in `${PluginId}.${ResourceName}.afterCreate`]: TSelect } & { [K in `${PluginId}.${ResourceName}.beforeUpdate`]: {
797
+ type CrudHookEventMap<PluginId extends string, ResourceName extends string, TCreate, TUpdate, TSelect, TListInput extends ListInput = ListInput, TGetInput extends GetInput = string, TExportInput extends ExportInput = ExportInput> = { [K in `${PluginId}.${ResourceName}.beforeCreate`]: TCreate } & { [K in `${PluginId}.${ResourceName}.afterCreate`]: TSelect } & { [K in `${PluginId}.${ResourceName}.beforeUpdate`]: {
657
798
  id: string;
658
799
  data: TUpdate;
659
800
  } } & { [K in `${PluginId}.${ResourceName}.afterUpdate`]: TSelect } & { [K in `${PluginId}.${ResourceName}.beforeDelete`]: {
@@ -664,47 +805,18 @@ type CrudHookEventMap<PluginId extends string, ResourceName extends string, TCre
664
805
  } } & { [K in `${PluginId}.${ResourceName}.delete`]: string } & { [K in `${PluginId}.${ResourceName}.deleteMany`]: string[] } & { [K in `${PluginId}.${ResourceName}.updateMany`]: {
665
806
  ids: string[];
666
807
  data: TUpdate;
667
- } } & { [K in `${PluginId}.${ResourceName}.upsert`]: TCreate } & { [K in `${PluginId}.${ResourceName}.get`]: string } & { [K in `${PluginId}.${ResourceName}.list`]: {
668
- page: number;
669
- perPage: number;
670
- sort?: Array<{
671
- id: string;
672
- desc: boolean;
673
- }>;
674
- filters?: Array<{
675
- id: string;
676
- value: string | string[];
677
- variant: string;
678
- operator: string;
679
- filterId: string;
680
- }>;
681
- joinOperator: "and" | "or";
682
- } } & { [K in `${PluginId}.${ResourceName}.export`]: {
683
- sort?: Array<{
684
- id: string;
685
- desc: boolean;
686
- }>;
687
- filters?: Array<{
688
- id: string;
689
- value: string | string[];
690
- variant: string;
691
- operator: string;
692
- filterId: string;
693
- }>;
694
- joinOperator?: "and" | "or";
695
- limit?: number;
696
- } } & { [K in `${PluginId}.${ResourceName}.import`]: {
808
+ } } & { [K in `${PluginId}.${ResourceName}.upsert`]: TCreate } & { [K in `${PluginId}.${ResourceName}.get`]: TGetInput } & { [K in `${PluginId}.${ResourceName}.list`]: TListInput } & { [K in `${PluginId}.${ResourceName}.export`]: TExportInput } & { [K in `${PluginId}.${ResourceName}.import`]: {
697
809
  rows: unknown[];
698
- onConflict?: "skip" | "upsert" | "error";
810
+ onConflict?: 'skip' | 'upsert' | 'error';
699
811
  } } & { [K in `${PluginId}.${ResourceName}.createMany`]: TCreate[] };
700
812
  //#endregion
701
813
  //#region src/routers/index.d.ts
702
- declare const appRouter: _trpc_server0.TRPCBuiltRouter<{
814
+ declare const appRouter: _trpc_server2.TRPCBuiltRouter<{
703
815
  ctx: Context;
704
816
  meta: object;
705
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
817
+ errorShape: _trpc_server2.TRPCDefaultErrorShape;
706
818
  transformer: true;
707
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{}>>;
819
+ }, _trpc_server2.TRPCDecorateCreateRouterOptions<{}>>;
708
820
  type AppRouter = typeof appRouter;
709
821
  //#endregion
710
- export { type AnyProcedure, type AppRouter, type CreateManyMiddlewareParams, type CreateMiddlewareParams, type CrudHookEventMap, type CrudMiddleware, type CrudOperation, type CrudProcedures, type CrudRouterConfig, type DeleteManyMiddlewareParams, type DeleteMiddlewareParams, type ExportInput, type ExportMiddlewareParams, type ExportResult, type GetMiddlewareParams, type ImportFailedRow, type ImportInput, type ImportMiddlewareParams, type ImportResult, type ListInput, type ListMiddlewareParams, type ListResult, type ProcedureConfig, type ProcedureFactory, type ProcedureMap, type SoftDeleteConfig, type SoftDeleteOption, type UpdateManyMiddlewareParams, type UpdateMiddlewareParams, type UpsertMiddlewareParams, type WriteOperation, afterMiddleware, appRouter, beforeMiddleware, composeMiddleware, createCrudRouter, publicProcedure, router };
822
+ export { type AnyProcedure, type AppRouter, type CreateManyMiddlewareParams, type CreateMiddlewareParams, type CrudColumnConfig, type CrudColumnExpression, type CrudColumnRef, type CrudHookEventMap, type CrudMiddleware, type CrudOperation, type CrudProcedures, type CrudRouterConfig, type DeleteManyMiddlewareParams, type DeleteMiddlewareParams, type ExportInput, type ExportMiddlewareParams, type ExportResult, type GetInput, type GetMiddlewareParams, type ImportFailedRow, type ImportInput, type ImportMiddlewareParams, type ImportResult, type ListInput, type ListMiddlewareParams, type ListResult, type ProcedureConfig, type ProcedureFactory, type ProcedureMap, type SoftDeleteConfig, type SoftDeleteOption, type UpdateManyMiddlewareParams, type UpdateMiddlewareParams, type UpsertMiddlewareParams, type WriteOperation, afterMiddleware, appRouter, baseExportInputSchema, baseGetInputSchema, baseListInputSchema, beforeMiddleware, composeMiddleware, createCrudRouter, publicProcedure, router };