@the-inkwell/shared 0.2.39 → 0.2.41
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.
|
@@ -281,6 +281,16 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
|
|
|
281
281
|
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
282
282
|
createdAt: z.ZodDate;
|
|
283
283
|
updatedAt: z.ZodDate;
|
|
284
|
+
referral: z.ZodNullable<z.ZodObject<{
|
|
285
|
+
referrer: z.ZodObject<{
|
|
286
|
+
id: z.ZodUUID;
|
|
287
|
+
email: z.ZodString;
|
|
288
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
289
|
+
}, {
|
|
290
|
+
out: {};
|
|
291
|
+
in: {};
|
|
292
|
+
}>;
|
|
293
|
+
}, z.core.$strip>>;
|
|
284
294
|
_openPositionsCount: z.ZodOptional<z.ZodNumber>;
|
|
285
295
|
}, {
|
|
286
296
|
out: {};
|
|
@@ -545,16 +555,6 @@ export declare const AdminClientUpdateSchema: import("drizzle-zod").BuildSchema<
|
|
|
545
555
|
}, undefined, undefined>;
|
|
546
556
|
export declare const AdminClientParamsSchema: z.ZodObject<{
|
|
547
557
|
id: z.ZodUUID;
|
|
548
|
-
referral: z.ZodOptional<z.ZodObject<{
|
|
549
|
-
referrer: z.ZodOptional<z.ZodObject<{
|
|
550
|
-
id: z.ZodUUID;
|
|
551
|
-
email: z.ZodString;
|
|
552
|
-
fullName: z.ZodNullable<z.ZodString>;
|
|
553
|
-
}, {
|
|
554
|
-
out: {};
|
|
555
|
-
in: {};
|
|
556
|
-
}>>;
|
|
557
|
-
}, z.core.$strip>>;
|
|
558
558
|
}, {
|
|
559
559
|
out: {};
|
|
560
560
|
in: {};
|
|
@@ -573,32 +573,12 @@ export declare const AdminClientListQuerySchema: z.ZodObject<{
|
|
|
573
573
|
}, z.core.$strip>;
|
|
574
574
|
export declare const AdminClientUpdateParamsSchema: z.ZodObject<{
|
|
575
575
|
id: z.ZodUUID;
|
|
576
|
-
referral: z.ZodOptional<z.ZodObject<{
|
|
577
|
-
referrer: z.ZodOptional<z.ZodObject<{
|
|
578
|
-
id: z.ZodUUID;
|
|
579
|
-
email: z.ZodString;
|
|
580
|
-
fullName: z.ZodNullable<z.ZodString>;
|
|
581
|
-
}, {
|
|
582
|
-
out: {};
|
|
583
|
-
in: {};
|
|
584
|
-
}>>;
|
|
585
|
-
}, z.core.$strip>>;
|
|
586
576
|
}, {
|
|
587
577
|
out: {};
|
|
588
578
|
in: {};
|
|
589
579
|
}>;
|
|
590
580
|
export declare const AdminClientDeleteParamsSchema: z.ZodObject<{
|
|
591
581
|
id: z.ZodUUID;
|
|
592
|
-
referral: z.ZodOptional<z.ZodObject<{
|
|
593
|
-
referrer: z.ZodOptional<z.ZodObject<{
|
|
594
|
-
id: z.ZodUUID;
|
|
595
|
-
email: z.ZodString;
|
|
596
|
-
fullName: z.ZodNullable<z.ZodString>;
|
|
597
|
-
}, {
|
|
598
|
-
out: {};
|
|
599
|
-
in: {};
|
|
600
|
-
}>>;
|
|
601
|
-
}, z.core.$strip>>;
|
|
602
582
|
}, {
|
|
603
583
|
out: {};
|
|
604
584
|
in: {};
|
|
@@ -8,12 +8,6 @@ const v4_1 = require("zod/v4");
|
|
|
8
8
|
//// validators
|
|
9
9
|
exports.AdminClientCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.client);
|
|
10
10
|
exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.client).extend({
|
|
11
|
-
_openPositionsCount: v4_1.z.number().optional()
|
|
12
|
-
});
|
|
13
|
-
exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client);
|
|
14
|
-
exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
|
|
15
|
-
id: true
|
|
16
|
-
}).extend({
|
|
17
11
|
referral: v4_1.z
|
|
18
12
|
.object({
|
|
19
13
|
referrer: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
@@ -22,8 +16,12 @@ exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
|
|
|
22
16
|
fullName: true
|
|
23
17
|
})
|
|
24
18
|
})
|
|
25
|
-
.
|
|
26
|
-
|
|
19
|
+
.nullable(),
|
|
20
|
+
_openPositionsCount: v4_1.z.number().optional()
|
|
21
|
+
});
|
|
22
|
+
exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client);
|
|
23
|
+
exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
|
|
24
|
+
id: true
|
|
27
25
|
});
|
|
28
26
|
const AdminClientListQuerySchemaStatus = v4_1.z.object({
|
|
29
27
|
status: v4_1.z.array(v4_1.z.enum(core_1.ClientStatuses.enumValues)).optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA2D;AAC3D,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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA2D;AAC3D,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,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;IACb,mBAAmB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AACW,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AAEpD,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,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;KAC1C,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 { client, ClientStatuses, 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 referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable(),\n _openPositionsCount: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client)\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 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 })\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"]}
|