@the-inkwell/shared 0.2.265 → 0.2.267

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.
@@ -577,6 +577,13 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
577
577
  out: {};
578
578
  in: {};
579
579
  }>>;
580
+ parent: z.ZodNullable<z.ZodObject<{
581
+ name: z.ZodString;
582
+ id: z.ZodUUID;
583
+ }, {
584
+ out: {};
585
+ in: {};
586
+ }>>;
580
587
  referral: z.ZodOptional<z.ZodNullable<z.ZodObject<{
581
588
  referrer: z.ZodObject<{
582
589
  email: z.ZodString;
@@ -14,6 +14,12 @@ exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.c
14
14
  name: true
15
15
  })
16
16
  .nullable(),
17
+ parent: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
18
+ .pick({
19
+ id: true,
20
+ name: true
21
+ })
22
+ .nullable(),
17
23
  referral: v4_1.z
18
24
  .object({
19
25
  referrer: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC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AAC,QAAQ,EAAE;CACnD,CAAC,CAAA;AAEW,QAAA,uBAAuB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAClE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAEF,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,IAAI,CAAC,qBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAA;AACF,MAAM,8BAA8B,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAC9D,IAAI,CAAC;IACJ,IAAI,EAAE,IAAI;CACX,CAAC;KACD,OAAO,EAAE,CAAA;AACZ,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,8BAA8B,CAAC,KAAK;KACxC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, client, ClientStatuses, industry, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable()\n .optional(),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional(),\n _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional(),\n _potentialRetainerFees: z.number().optional(),\n _potentialPlacementFees: z.number().optional(),\n _earnedRetainerFees: z.number().optional(),\n _earnedPlacementFees: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaName = createSelectSchema(client)\n .pick({\n name: true\n })\n .partial()\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape,\n ...AdminClientListQuerySchemaName.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;YACxC,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,cAAc,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,mBAAmB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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,gCAAkB,EAAC,aAAM,CAAC;KAC9D,IAAI,CAAC;IACJ,IAAI,EAAE,IAAI;CACX,CAAC;KACD,OAAO,EAAE,CAAA;AACZ,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,8BAA8B,CAAC,KAAK;KACxC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, client, ClientStatuses, industry, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n parent: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable()\n .optional(),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional(),\n _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional(),\n _potentialRetainerFees: z.number().optional(),\n _potentialPlacementFees: z.number().optional(),\n _earnedRetainerFees: z.number().optional(),\n _earnedPlacementFees: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaName = createSelectSchema(client)\n .pick({\n name: true\n })\n .partial()\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape,\n ...AdminClientListQuerySchemaName.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
@@ -0,0 +1,516 @@
1
+ import { type ListResponse } from '../../../utils';
2
+ import { z } from 'zod/v4';
3
+ export declare const AdminTodoCreateSchema: import("drizzle-zod").BuildSchema<"insert", {
4
+ id: import("drizzle-orm/pg-core").PgColumn<{
5
+ name: "id";
6
+ tableName: "todos";
7
+ dataType: "string";
8
+ columnType: "PgUUID";
9
+ data: string;
10
+ driverParam: string;
11
+ notNull: true;
12
+ hasDefault: true;
13
+ isPrimaryKey: true;
14
+ isAutoincrement: false;
15
+ hasRuntimeDefault: false;
16
+ enumValues: undefined;
17
+ baseColumn: never;
18
+ identity: undefined;
19
+ generated: undefined;
20
+ }, {}, {}>;
21
+ title: import("drizzle-orm/pg-core").PgColumn<{
22
+ name: "title";
23
+ tableName: "todos";
24
+ dataType: "string";
25
+ columnType: "PgText";
26
+ data: string;
27
+ driverParam: string;
28
+ notNull: true;
29
+ hasDefault: false;
30
+ isPrimaryKey: false;
31
+ isAutoincrement: false;
32
+ hasRuntimeDefault: false;
33
+ enumValues: [string, ...string[]];
34
+ baseColumn: never;
35
+ identity: undefined;
36
+ generated: undefined;
37
+ }, {}, {}>;
38
+ description: import("drizzle-orm/pg-core").PgColumn<{
39
+ name: "description";
40
+ tableName: "todos";
41
+ dataType: "string";
42
+ columnType: "PgText";
43
+ data: string;
44
+ driverParam: string;
45
+ notNull: false;
46
+ hasDefault: false;
47
+ isPrimaryKey: false;
48
+ isAutoincrement: false;
49
+ hasRuntimeDefault: false;
50
+ enumValues: [string, ...string[]];
51
+ baseColumn: never;
52
+ identity: undefined;
53
+ generated: undefined;
54
+ }, {}, {}>;
55
+ suggestedActions: import("drizzle-orm/pg-core").PgColumn<{
56
+ name: "suggestedActions";
57
+ tableName: "todos";
58
+ dataType: "json";
59
+ columnType: "PgJsonb";
60
+ data: string[];
61
+ driverParam: unknown;
62
+ notNull: false;
63
+ hasDefault: false;
64
+ isPrimaryKey: false;
65
+ isAutoincrement: false;
66
+ hasRuntimeDefault: false;
67
+ enumValues: undefined;
68
+ baseColumn: never;
69
+ identity: undefined;
70
+ generated: undefined;
71
+ }, {}, {
72
+ $type: string[];
73
+ }>;
74
+ resolvedAt: import("drizzle-orm/pg-core").PgColumn<{
75
+ name: "resolvedAt";
76
+ tableName: "todos";
77
+ dataType: "date";
78
+ columnType: "PgTimestamp";
79
+ data: Date;
80
+ driverParam: string;
81
+ notNull: false;
82
+ hasDefault: false;
83
+ isPrimaryKey: false;
84
+ isAutoincrement: false;
85
+ hasRuntimeDefault: false;
86
+ enumValues: undefined;
87
+ baseColumn: never;
88
+ identity: undefined;
89
+ generated: undefined;
90
+ }, {}, {}>;
91
+ dueAt: import("drizzle-orm/pg-core").PgColumn<{
92
+ name: "dueAt";
93
+ tableName: "todos";
94
+ dataType: "date";
95
+ columnType: "PgTimestamp";
96
+ data: Date;
97
+ driverParam: string;
98
+ notNull: false;
99
+ hasDefault: false;
100
+ isPrimaryKey: false;
101
+ isAutoincrement: false;
102
+ hasRuntimeDefault: false;
103
+ enumValues: undefined;
104
+ baseColumn: never;
105
+ identity: undefined;
106
+ generated: undefined;
107
+ }, {}, {}>;
108
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
109
+ name: "createdAt";
110
+ tableName: "todos";
111
+ dataType: "date";
112
+ columnType: "PgTimestamp";
113
+ data: Date;
114
+ driverParam: string;
115
+ notNull: true;
116
+ hasDefault: true;
117
+ isPrimaryKey: false;
118
+ isAutoincrement: false;
119
+ hasRuntimeDefault: false;
120
+ enumValues: undefined;
121
+ baseColumn: never;
122
+ identity: undefined;
123
+ generated: undefined;
124
+ }, {}, {}>;
125
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
126
+ name: "updatedAt";
127
+ tableName: "todos";
128
+ dataType: "date";
129
+ columnType: "PgTimestamp";
130
+ data: Date;
131
+ driverParam: string;
132
+ notNull: true;
133
+ hasDefault: true;
134
+ isPrimaryKey: false;
135
+ isAutoincrement: false;
136
+ hasRuntimeDefault: false;
137
+ enumValues: undefined;
138
+ baseColumn: never;
139
+ identity: undefined;
140
+ generated: undefined;
141
+ }, {}, {}>;
142
+ deletedAt: import("drizzle-orm/pg-core").PgColumn<{
143
+ name: "deletedAt";
144
+ tableName: "todos";
145
+ dataType: "date";
146
+ columnType: "PgTimestamp";
147
+ data: Date;
148
+ driverParam: string;
149
+ notNull: false;
150
+ hasDefault: false;
151
+ isPrimaryKey: false;
152
+ isAutoincrement: false;
153
+ hasRuntimeDefault: false;
154
+ enumValues: undefined;
155
+ baseColumn: never;
156
+ identity: undefined;
157
+ generated: undefined;
158
+ }, {}, {}>;
159
+ }, undefined, undefined>;
160
+ export declare const AdminTodoSelectSchema: import("drizzle-zod").BuildSchema<"select", {
161
+ id: import("drizzle-orm/pg-core").PgColumn<{
162
+ name: "id";
163
+ tableName: "todos";
164
+ dataType: "string";
165
+ columnType: "PgUUID";
166
+ data: string;
167
+ driverParam: string;
168
+ notNull: true;
169
+ hasDefault: true;
170
+ isPrimaryKey: true;
171
+ isAutoincrement: false;
172
+ hasRuntimeDefault: false;
173
+ enumValues: undefined;
174
+ baseColumn: never;
175
+ identity: undefined;
176
+ generated: undefined;
177
+ }, {}, {}>;
178
+ title: import("drizzle-orm/pg-core").PgColumn<{
179
+ name: "title";
180
+ tableName: "todos";
181
+ dataType: "string";
182
+ columnType: "PgText";
183
+ data: string;
184
+ driverParam: string;
185
+ notNull: true;
186
+ hasDefault: false;
187
+ isPrimaryKey: false;
188
+ isAutoincrement: false;
189
+ hasRuntimeDefault: false;
190
+ enumValues: [string, ...string[]];
191
+ baseColumn: never;
192
+ identity: undefined;
193
+ generated: undefined;
194
+ }, {}, {}>;
195
+ description: import("drizzle-orm/pg-core").PgColumn<{
196
+ name: "description";
197
+ tableName: "todos";
198
+ dataType: "string";
199
+ columnType: "PgText";
200
+ data: string;
201
+ driverParam: string;
202
+ notNull: false;
203
+ hasDefault: false;
204
+ isPrimaryKey: false;
205
+ isAutoincrement: false;
206
+ hasRuntimeDefault: false;
207
+ enumValues: [string, ...string[]];
208
+ baseColumn: never;
209
+ identity: undefined;
210
+ generated: undefined;
211
+ }, {}, {}>;
212
+ suggestedActions: import("drizzle-orm/pg-core").PgColumn<{
213
+ name: "suggestedActions";
214
+ tableName: "todos";
215
+ dataType: "json";
216
+ columnType: "PgJsonb";
217
+ data: string[];
218
+ driverParam: unknown;
219
+ notNull: false;
220
+ hasDefault: false;
221
+ isPrimaryKey: false;
222
+ isAutoincrement: false;
223
+ hasRuntimeDefault: false;
224
+ enumValues: undefined;
225
+ baseColumn: never;
226
+ identity: undefined;
227
+ generated: undefined;
228
+ }, {}, {
229
+ $type: string[];
230
+ }>;
231
+ resolvedAt: import("drizzle-orm/pg-core").PgColumn<{
232
+ name: "resolvedAt";
233
+ tableName: "todos";
234
+ dataType: "date";
235
+ columnType: "PgTimestamp";
236
+ data: Date;
237
+ driverParam: string;
238
+ notNull: false;
239
+ hasDefault: false;
240
+ isPrimaryKey: false;
241
+ isAutoincrement: false;
242
+ hasRuntimeDefault: false;
243
+ enumValues: undefined;
244
+ baseColumn: never;
245
+ identity: undefined;
246
+ generated: undefined;
247
+ }, {}, {}>;
248
+ dueAt: import("drizzle-orm/pg-core").PgColumn<{
249
+ name: "dueAt";
250
+ tableName: "todos";
251
+ dataType: "date";
252
+ columnType: "PgTimestamp";
253
+ data: Date;
254
+ driverParam: string;
255
+ notNull: false;
256
+ hasDefault: false;
257
+ isPrimaryKey: false;
258
+ isAutoincrement: false;
259
+ hasRuntimeDefault: false;
260
+ enumValues: undefined;
261
+ baseColumn: never;
262
+ identity: undefined;
263
+ generated: undefined;
264
+ }, {}, {}>;
265
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
266
+ name: "createdAt";
267
+ tableName: "todos";
268
+ dataType: "date";
269
+ columnType: "PgTimestamp";
270
+ data: Date;
271
+ driverParam: string;
272
+ notNull: true;
273
+ hasDefault: true;
274
+ isPrimaryKey: false;
275
+ isAutoincrement: false;
276
+ hasRuntimeDefault: false;
277
+ enumValues: undefined;
278
+ baseColumn: never;
279
+ identity: undefined;
280
+ generated: undefined;
281
+ }, {}, {}>;
282
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
283
+ name: "updatedAt";
284
+ tableName: "todos";
285
+ dataType: "date";
286
+ columnType: "PgTimestamp";
287
+ data: Date;
288
+ driverParam: string;
289
+ notNull: true;
290
+ hasDefault: true;
291
+ isPrimaryKey: false;
292
+ isAutoincrement: false;
293
+ hasRuntimeDefault: false;
294
+ enumValues: undefined;
295
+ baseColumn: never;
296
+ identity: undefined;
297
+ generated: undefined;
298
+ }, {}, {}>;
299
+ deletedAt: import("drizzle-orm/pg-core").PgColumn<{
300
+ name: "deletedAt";
301
+ tableName: "todos";
302
+ dataType: "date";
303
+ columnType: "PgTimestamp";
304
+ data: Date;
305
+ driverParam: string;
306
+ notNull: false;
307
+ hasDefault: false;
308
+ isPrimaryKey: false;
309
+ isAutoincrement: false;
310
+ hasRuntimeDefault: false;
311
+ enumValues: undefined;
312
+ baseColumn: never;
313
+ identity: undefined;
314
+ generated: undefined;
315
+ }, {}, {}>;
316
+ }, undefined, undefined>;
317
+ export declare const AdminTodoUpdateSchema: import("drizzle-zod").BuildSchema<"update", {
318
+ id: import("drizzle-orm/pg-core").PgColumn<{
319
+ name: "id";
320
+ tableName: "todos";
321
+ dataType: "string";
322
+ columnType: "PgUUID";
323
+ data: string;
324
+ driverParam: string;
325
+ notNull: true;
326
+ hasDefault: true;
327
+ isPrimaryKey: true;
328
+ isAutoincrement: false;
329
+ hasRuntimeDefault: false;
330
+ enumValues: undefined;
331
+ baseColumn: never;
332
+ identity: undefined;
333
+ generated: undefined;
334
+ }, {}, {}>;
335
+ title: import("drizzle-orm/pg-core").PgColumn<{
336
+ name: "title";
337
+ tableName: "todos";
338
+ dataType: "string";
339
+ columnType: "PgText";
340
+ data: string;
341
+ driverParam: string;
342
+ notNull: true;
343
+ hasDefault: false;
344
+ isPrimaryKey: false;
345
+ isAutoincrement: false;
346
+ hasRuntimeDefault: false;
347
+ enumValues: [string, ...string[]];
348
+ baseColumn: never;
349
+ identity: undefined;
350
+ generated: undefined;
351
+ }, {}, {}>;
352
+ description: import("drizzle-orm/pg-core").PgColumn<{
353
+ name: "description";
354
+ tableName: "todos";
355
+ dataType: "string";
356
+ columnType: "PgText";
357
+ data: string;
358
+ driverParam: string;
359
+ notNull: false;
360
+ hasDefault: false;
361
+ isPrimaryKey: false;
362
+ isAutoincrement: false;
363
+ hasRuntimeDefault: false;
364
+ enumValues: [string, ...string[]];
365
+ baseColumn: never;
366
+ identity: undefined;
367
+ generated: undefined;
368
+ }, {}, {}>;
369
+ suggestedActions: import("drizzle-orm/pg-core").PgColumn<{
370
+ name: "suggestedActions";
371
+ tableName: "todos";
372
+ dataType: "json";
373
+ columnType: "PgJsonb";
374
+ data: string[];
375
+ driverParam: unknown;
376
+ notNull: false;
377
+ hasDefault: false;
378
+ isPrimaryKey: false;
379
+ isAutoincrement: false;
380
+ hasRuntimeDefault: false;
381
+ enumValues: undefined;
382
+ baseColumn: never;
383
+ identity: undefined;
384
+ generated: undefined;
385
+ }, {}, {
386
+ $type: string[];
387
+ }>;
388
+ resolvedAt: import("drizzle-orm/pg-core").PgColumn<{
389
+ name: "resolvedAt";
390
+ tableName: "todos";
391
+ dataType: "date";
392
+ columnType: "PgTimestamp";
393
+ data: Date;
394
+ driverParam: string;
395
+ notNull: false;
396
+ hasDefault: false;
397
+ isPrimaryKey: false;
398
+ isAutoincrement: false;
399
+ hasRuntimeDefault: false;
400
+ enumValues: undefined;
401
+ baseColumn: never;
402
+ identity: undefined;
403
+ generated: undefined;
404
+ }, {}, {}>;
405
+ dueAt: import("drizzle-orm/pg-core").PgColumn<{
406
+ name: "dueAt";
407
+ tableName: "todos";
408
+ dataType: "date";
409
+ columnType: "PgTimestamp";
410
+ data: Date;
411
+ driverParam: string;
412
+ notNull: false;
413
+ hasDefault: false;
414
+ isPrimaryKey: false;
415
+ isAutoincrement: false;
416
+ hasRuntimeDefault: false;
417
+ enumValues: undefined;
418
+ baseColumn: never;
419
+ identity: undefined;
420
+ generated: undefined;
421
+ }, {}, {}>;
422
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
423
+ name: "createdAt";
424
+ tableName: "todos";
425
+ dataType: "date";
426
+ columnType: "PgTimestamp";
427
+ data: Date;
428
+ driverParam: string;
429
+ notNull: true;
430
+ hasDefault: true;
431
+ isPrimaryKey: false;
432
+ isAutoincrement: false;
433
+ hasRuntimeDefault: false;
434
+ enumValues: undefined;
435
+ baseColumn: never;
436
+ identity: undefined;
437
+ generated: undefined;
438
+ }, {}, {}>;
439
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
440
+ name: "updatedAt";
441
+ tableName: "todos";
442
+ dataType: "date";
443
+ columnType: "PgTimestamp";
444
+ data: Date;
445
+ driverParam: string;
446
+ notNull: true;
447
+ hasDefault: true;
448
+ isPrimaryKey: false;
449
+ isAutoincrement: false;
450
+ hasRuntimeDefault: false;
451
+ enumValues: undefined;
452
+ baseColumn: never;
453
+ identity: undefined;
454
+ generated: undefined;
455
+ }, {}, {}>;
456
+ deletedAt: import("drizzle-orm/pg-core").PgColumn<{
457
+ name: "deletedAt";
458
+ tableName: "todos";
459
+ dataType: "date";
460
+ columnType: "PgTimestamp";
461
+ data: Date;
462
+ driverParam: string;
463
+ notNull: false;
464
+ hasDefault: false;
465
+ isPrimaryKey: false;
466
+ isAutoincrement: false;
467
+ hasRuntimeDefault: false;
468
+ enumValues: undefined;
469
+ baseColumn: never;
470
+ identity: undefined;
471
+ generated: undefined;
472
+ }, {}, {}>;
473
+ }, undefined, undefined>;
474
+ export declare const AdminTodoParamsSchema: z.ZodObject<{
475
+ id: z.ZodUUID;
476
+ }, {
477
+ out: {};
478
+ in: {};
479
+ }>;
480
+ export declare const AdminTodoListQuerySchema: z.ZodObject<{
481
+ limit: z.ZodOptional<z.ZodNumber>;
482
+ offset: z.ZodOptional<z.ZodNumber>;
483
+ sort: z.ZodOptional<z.ZodObject<{
484
+ field: z.ZodString;
485
+ direction: z.ZodEnum<{
486
+ asc: "asc";
487
+ desc: "desc";
488
+ }>;
489
+ }, z.core.$strip>>;
490
+ filter: z.ZodOptional<z.ZodObject<{
491
+ isResolved: z.ZodOptional<z.ZodBoolean>;
492
+ }, z.core.$strip>>;
493
+ }, z.core.$strip>;
494
+ export declare const AdminTodoUpdateParamsSchema: z.ZodObject<{
495
+ id: z.ZodUUID;
496
+ }, {
497
+ out: {};
498
+ in: {};
499
+ }>;
500
+ export declare const AdminTodoDeleteParamsSchema: z.ZodObject<{
501
+ id: z.ZodUUID;
502
+ }, {
503
+ out: {};
504
+ in: {};
505
+ }>;
506
+ type AdminTodo = z.infer<typeof AdminTodoSelectSchema>;
507
+ export type AdminTodoParams = z.infer<typeof AdminTodoParamsSchema>;
508
+ export type AdminTodoResult = AdminTodo;
509
+ export type AdminTodoListQuery = z.infer<typeof AdminTodoListQuerySchema>;
510
+ export type AdminTodoListResult = ListResponse<z.infer<typeof AdminTodoSelectSchema>>;
511
+ export type AdminTodoCreateInput = z.infer<typeof AdminTodoCreateSchema>;
512
+ export type AdminTodoCreateResult = Pick<AdminTodo, 'id'>;
513
+ export type AdminTodoUpdateParams = z.infer<typeof AdminTodoUpdateParamsSchema>;
514
+ export type AdminTodoUpdateInput = z.infer<typeof AdminTodoUpdateSchema>;
515
+ export type AdminTodoDeleteParams = z.infer<typeof AdminTodoDeleteParamsSchema>;
516
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminTodoDeleteParamsSchema = exports.AdminTodoUpdateParamsSchema = exports.AdminTodoListQuerySchema = exports.AdminTodoParamsSchema = exports.AdminTodoUpdateSchema = exports.AdminTodoSelectSchema = exports.AdminTodoCreateSchema = void 0;
4
+ const drizzle_zod_1 = require("drizzle-zod");
5
+ const core_1 = require("../../core");
6
+ const utils_1 = require("../../../utils");
7
+ const v4_1 = require("zod/v4");
8
+ //// validators
9
+ exports.AdminTodoCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.todo);
10
+ exports.AdminTodoSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.todo);
11
+ exports.AdminTodoUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.todo);
12
+ exports.AdminTodoParamsSchema = exports.AdminTodoSelectSchema.pick({
13
+ id: true
14
+ });
15
+ exports.AdminTodoListQuerySchema = utils_1.ListQuerySchema.extend({
16
+ filter: v4_1.z
17
+ .object({
18
+ isResolved: v4_1.z.boolean().optional()
19
+ })
20
+ .optional()
21
+ });
22
+ exports.AdminTodoUpdateParamsSchema = exports.AdminTodoParamsSchema;
23
+ exports.AdminTodoDeleteParamsSchema = exports.AdminTodoParamsSchema;
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/todos/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAiC;AACjC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAA;AAChD,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAA;AAChD,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAA;AAEhD,QAAA,qBAAqB,GAAG,6BAAqB,CAAC,IAAI,CAAC;IAC9D,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,UAAU,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,2BAA2B,GAAG,6BAAqB,CAAA;AACnD,QAAA,2BAA2B,GAAG,6BAAqB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { todo } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminTodoCreateSchema = createInsertSchema(todo)\nexport const AdminTodoSelectSchema = createSelectSchema(todo)\nexport const AdminTodoUpdateSchema = createUpdateSchema(todo)\n\nexport const AdminTodoParamsSchema = AdminTodoSelectSchema.pick({\n id: true\n})\nexport const AdminTodoListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n isResolved: z.boolean().optional()\n })\n .optional()\n})\nexport const AdminTodoUpdateParamsSchema = AdminTodoParamsSchema\nexport const AdminTodoDeleteParamsSchema = AdminTodoParamsSchema\n\n//// types\n\ntype AdminTodo = z.infer<typeof AdminTodoSelectSchema>\n\n// detail\nexport type AdminTodoParams = z.infer<typeof AdminTodoParamsSchema>\nexport type AdminTodoResult = AdminTodo\n\n// list\nexport type AdminTodoListQuery = z.infer<typeof AdminTodoListQuerySchema>\nexport type AdminTodoListResult = ListResponse<\n z.infer<typeof AdminTodoSelectSchema>\n>\n\n// create\nexport type AdminTodoCreateInput = z.infer<typeof AdminTodoCreateSchema>\nexport type AdminTodoCreateResult = Pick<AdminTodo, 'id'>\n\n// update\nexport type AdminTodoUpdateParams = z.infer<typeof AdminTodoUpdateParamsSchema>\nexport type AdminTodoUpdateInput = z.infer<typeof AdminTodoUpdateSchema>\n\n// delete\nexport type AdminTodoDeleteParams = z.infer<typeof AdminTodoDeleteParamsSchema>\n"]}