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