@the-inkwell/shared 0.2.273 → 0.2.274
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.
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
export declare const PublicUserSelectSchema: z.ZodObject<{
|
|
3
3
|
referrals: z.ZodArray<z.ZodObject<{
|
|
4
|
+
person: z.ZodObject<{
|
|
5
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
6
|
+
}, {
|
|
7
|
+
out: {};
|
|
8
|
+
in: {};
|
|
9
|
+
}>;
|
|
4
10
|
status: z.ZodEnum<{
|
|
5
11
|
Pending: "Pending";
|
|
6
12
|
Hired: "Hired";
|
|
@@ -24,6 +30,12 @@ export declare const PublicUserSelectSchema: z.ZodObject<{
|
|
|
24
30
|
createdAt: z.ZodString;
|
|
25
31
|
}, z.core.$strict>>;
|
|
26
32
|
candidacies: z.ZodArray<z.ZodObject<{
|
|
33
|
+
person: z.ZodObject<{
|
|
34
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
35
|
+
}, {
|
|
36
|
+
out: {};
|
|
37
|
+
in: {};
|
|
38
|
+
}>;
|
|
27
39
|
status: z.ZodEnum<{
|
|
28
40
|
Pending: "Pending";
|
|
29
41
|
Hired: "Hired";
|
|
@@ -6,6 +6,9 @@ const core_1 = require("../../core");
|
|
|
6
6
|
const v4_1 = require("zod/v4");
|
|
7
7
|
//// validators
|
|
8
8
|
const CandidacySchema = v4_1.z.strictObject({
|
|
9
|
+
person: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
10
|
+
firstName: true
|
|
11
|
+
}),
|
|
9
12
|
status: v4_1.z.enum(['Pending', 'In progress', 'Hired', 'Withdrew', 'Not a fit']),
|
|
10
13
|
position: (0, drizzle_zod_1.createSelectSchema)(core_1.position)
|
|
11
14
|
.pick({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/user/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAqD;AACrD,+BAA0B;AAE1B,eAAe;AAEf,MAAM,eAAe,GAAG,MAAC,CAAC,YAAY,CAAC;IACrC,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAC5E,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,IAAI,EAAE,IAAI;KACX,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;aAC/B,IAAI,CAAC;YACJ,IAAI,EAAE,IAAI;SACX,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;IACJ,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,MAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,MAAM,EAAE,IAAI;KACb,CAAC,CAAC,KAAK;IACR,SAAS,EAAE,MAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACnC,WAAW,EAAE,MAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACtC,CAAC,CAAA","sourcesContent":["import { createSelectSchema } from 'drizzle-zod'\nimport { client, person, position } from '../../core'\nimport { z } from 'zod/v4'\n\n//// validators\n\nconst CandidacySchema = z.strictObject({\n status: z.enum(['Pending', 'In progress', 'Hired', 'Withdrew', 'Not a fit']),\n position: createSelectSchema(position)\n .pick({\n name: true\n })\n .extend({\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .nullable()\n }),\n positionIdNano: z.string().nullable(),\n createdAt: z.string()\n})\n\nexport const PublicUserSelectSchema = z.strictObject({\n ...createSelectSchema(person).pick({\n idNano: true\n }).shape,\n referrals: z.array(CandidacySchema),\n candidacies: z.array(CandidacySchema)\n})\n\n//// types\n\ntype PublicUser = z.infer<typeof PublicUserSelectSchema>\n\n// detail\nexport type PublicUserResult = PublicUser\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/user/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAqD;AACrD,+BAA0B;AAE1B,eAAe;AAEf,MAAM,eAAe,GAAG,MAAC,CAAC,YAAY,CAAC;IACrC,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,SAAS,EAAE,IAAI;KAChB,CAAC;IACF,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAC5E,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,IAAI,EAAE,IAAI;KACX,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;aAC/B,IAAI,CAAC;YACJ,IAAI,EAAE,IAAI;SACX,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;IACJ,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,MAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,MAAM,EAAE,IAAI;KACb,CAAC,CAAC,KAAK;IACR,SAAS,EAAE,MAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACnC,WAAW,EAAE,MAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACtC,CAAC,CAAA","sourcesContent":["import { createSelectSchema } from 'drizzle-zod'\nimport { client, person, position } from '../../core'\nimport { z } from 'zod/v4'\n\n//// validators\n\nconst CandidacySchema = z.strictObject({\n person: createSelectSchema(person).pick({\n firstName: true\n }),\n status: z.enum(['Pending', 'In progress', 'Hired', 'Withdrew', 'Not a fit']),\n position: createSelectSchema(position)\n .pick({\n name: true\n })\n .extend({\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .nullable()\n }),\n positionIdNano: z.string().nullable(),\n createdAt: z.string()\n})\n\nexport const PublicUserSelectSchema = z.strictObject({\n ...createSelectSchema(person).pick({\n idNano: true\n }).shape,\n referrals: z.array(CandidacySchema),\n candidacies: z.array(CandidacySchema)\n})\n\n//// types\n\ntype PublicUser = z.infer<typeof PublicUserSelectSchema>\n\n// detail\nexport type PublicUserResult = PublicUser\n"]}
|