@the-inkwell/shared 0.2.150 → 0.2.152
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.
|
@@ -17,25 +17,37 @@ export declare const PublicAccountUpdateSchema: z.ZodObject<{
|
|
|
17
17
|
phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
18
18
|
}, z.core.$strict>;
|
|
19
19
|
export declare const PublicAccountReferralSelectSchema: z.ZodObject<{
|
|
20
|
-
person: {
|
|
20
|
+
person: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
wasHired: z.ZodOptional<z.ZodBoolean>;
|
|
21
22
|
firstName: z.ZodNullable<z.ZodString>;
|
|
22
23
|
lastName: z.ZodNullable<z.ZodString>;
|
|
23
|
-
}
|
|
24
|
+
}, z.core.$strict>>;
|
|
24
25
|
client: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
hasHired: z.ZodOptional<z.ZodBoolean>;
|
|
25
27
|
name: z.ZodString;
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
}, z.core.$strict>>;
|
|
29
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
}, {
|
|
33
|
+
out: {};
|
|
34
|
+
in: {};
|
|
35
|
+
}>>;
|
|
36
|
+
candidacy: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
person: z.ZodObject<{
|
|
38
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
39
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
stage: z.ZodString;
|
|
42
|
+
}, z.core.$strict>>;
|
|
31
43
|
name: z.ZodString;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
createdAt: z.ZodDate;
|
|
46
|
+
referralType: z.ZodNullable<z.ZodEnum<{
|
|
47
|
+
CLIENT: "CLIENT";
|
|
48
|
+
PERSON: "PERSON";
|
|
49
|
+
CANDIDACY: "CANDIDACY";
|
|
50
|
+
}>>;
|
|
39
51
|
}, z.core.$strict>;
|
|
40
52
|
export declare const PublicAccountApplicationSelectSchema: z.ZodObject<{
|
|
41
53
|
client: z.ZodOptional<z.ZodObject<{
|
|
@@ -27,23 +27,50 @@ exports.PublicAccountUpdateSchema = v4_1.z.strictObject({
|
|
|
27
27
|
}).shape
|
|
28
28
|
});
|
|
29
29
|
exports.PublicAccountReferralSelectSchema = v4_1.z.strictObject({
|
|
30
|
-
|
|
30
|
+
...(0, drizzle_zod_1.createSelectSchema)(core_1.referral).pick({
|
|
31
|
+
referralType: true,
|
|
32
|
+
createdAt: true
|
|
33
|
+
}).shape,
|
|
34
|
+
person: v4_1.z
|
|
35
|
+
.strictObject({
|
|
31
36
|
...(0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
32
37
|
firstName: true,
|
|
33
38
|
lastName: true
|
|
34
|
-
}).shape
|
|
35
|
-
|
|
36
|
-
client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
|
|
37
|
-
.pick({
|
|
38
|
-
name: true
|
|
39
|
+
}).shape,
|
|
40
|
+
wasHired: v4_1.z.boolean().optional()
|
|
39
41
|
})
|
|
40
42
|
.optional(),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
client: v4_1.z
|
|
44
|
+
.strictObject({
|
|
45
|
+
...(0, drizzle_zod_1.createSelectSchema)(core_1.client).pick({
|
|
46
|
+
name: true
|
|
47
|
+
}).shape,
|
|
48
|
+
hasHired: v4_1.z.boolean().optional()
|
|
49
|
+
})
|
|
50
|
+
.optional(),
|
|
51
|
+
position: v4_1.z
|
|
52
|
+
.strictObject({
|
|
53
|
+
...(0, drizzle_zod_1.createSelectSchema)(core_1.position).pick({
|
|
54
|
+
name: true
|
|
55
|
+
}).shape,
|
|
56
|
+
client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
|
|
57
|
+
.pick({
|
|
58
|
+
name: true
|
|
59
|
+
})
|
|
60
|
+
.optional(),
|
|
61
|
+
candidacy: v4_1.z
|
|
62
|
+
.strictObject({
|
|
63
|
+
person: v4_1.z.strictObject({
|
|
64
|
+
...(0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
65
|
+
firstName: true,
|
|
66
|
+
lastName: true
|
|
67
|
+
}).shape
|
|
68
|
+
}),
|
|
69
|
+
stage: v4_1.z.string()
|
|
70
|
+
})
|
|
71
|
+
.optional()
|
|
72
|
+
})
|
|
73
|
+
.optional()
|
|
47
74
|
});
|
|
48
75
|
exports.PublicAccountApplicationSelectSchema = v4_1.z.strictObject({
|
|
49
76
|
client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/account/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/account/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAA+D;AAC/D,+BAA0B;AAC1B,0CAMuB;AAEvB,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IACvE,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AAEW,QAAA,yBAAyB,GAAG,MAAC,CAAC,YAAY,CAAC;IACtD,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EA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S,EAAE,MAAC;aACT,YAAY,CAAC;YACZ,MAAM,EAAE,MAAC,CAAC,YAAY,CAAC;gBACrB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;oBACjC,SAAS,EAAE,IAAI;oBACf,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC,KAAK;aACT,CAAC;YACF,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;SAClB,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,oCAAoC,GAAG,MAAC,CAAC,YAAY,CAAC;IACjE,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,IAAI;KACX,CAAC;IACF,SAAS,EAAE;QACT,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;KAClB;CACF,CAAC,CAAA","sourcesContent":["import { createSelectSchema, createUpdateSchema } from 'drizzle-zod'\nimport { client, person, position, referral } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n ListResponse,\n OptionalPhoneSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicAccountSelectSchema = createSelectSchema(person).pick({\n idNano: true,\n firstName: true,\n lastName: true,\n email: true,\n phone: true\n})\n\nexport const PublicAccountUpdateSchema = z.strictObject({\n ...createUpdateSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: OptionalPhoneSchema,\n email: EmailSchema\n }).pick({\n firstName: true,\n lastName: true,\n phone: true,\n email: true\n }).shape\n})\n\nexport const PublicAccountReferralSelectSchema = z.strictObject({\n ...createSelectSchema(referral).pick({\n referralType: true,\n createdAt: true\n }).shape,\n person: z\n .strictObject({\n ...createSelectSchema(person).pick({\n firstName: true,\n lastName: true\n }).shape,\n wasHired: z.boolean().optional()\n })\n .optional(),\n client: z\n .strictObject({\n ...createSelectSchema(client).pick({\n name: true\n }).shape,\n hasHired: z.boolean().optional()\n })\n .optional(),\n position: z\n .strictObject({\n ...createSelectSchema(position).pick({\n name: true\n }).shape,\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .optional(),\n candidacy: z\n .strictObject({\n person: z.strictObject({\n ...createSelectSchema(person).pick({\n firstName: true,\n lastName: true\n }).shape\n }),\n stage: z.string()\n })\n .optional()\n })\n .optional()\n})\n\nexport const PublicAccountApplicationSelectSchema = z.strictObject({\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .optional(),\n position: createSelectSchema(position).pick({\n name: true\n }),\n candidacy: {\n stage: z.string()\n }\n})\n\n//// types\n\nexport type PublicAccountResult = z.infer<typeof PublicAccountSelectSchema>\n\nexport type PublicAccountUpdateInput = z.infer<typeof PublicAccountUpdateSchema>\n\nexport type PublicAccountReferralListResult = ListResponse<\n z.infer<typeof PublicAccountReferralSelectSchema>\n>\n\nexport type PublicAccountApplicationListResult = ListResponse<\n z.infer<typeof PublicAccountApplicationSelectSchema>\n>\n"]}
|