@the-inkwell/shared 0.2.89 → 0.2.90
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,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
export declare const PublicApplyCreateSchema: z.ZodObject<{
|
|
2
|
+
export declare const PublicApplyCreateSchema: z.ZodUnion<[z.ZodObject<{
|
|
3
3
|
candidate: z.ZodObject<{
|
|
4
4
|
email: z.ZodEmail;
|
|
5
5
|
firstName: z.ZodString;
|
|
@@ -10,5 +10,9 @@ export declare const PublicApplyCreateSchema: z.ZodObject<{
|
|
|
10
10
|
positionId: z.ZodUUID;
|
|
11
11
|
isSignedIn: z.ZodLiteral<false>;
|
|
12
12
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
13
|
-
}, z.core.$strict
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
positionId: z.ZodUUID;
|
|
15
|
+
isSignedIn: z.ZodLiteral<true>;
|
|
16
|
+
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
17
|
+
}, z.core.$strict>]>;
|
|
14
18
|
export type PublicApplyCreateInput = z.infer<typeof PublicApplyCreateSchema>;
|
|
@@ -6,7 +6,8 @@ const core_1 = require("../../core");
|
|
|
6
6
|
const v4_1 = require("zod/v4");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
//// validators
|
|
9
|
-
exports.PublicApplyCreateSchema = v4_1.z
|
|
9
|
+
exports.PublicApplyCreateSchema = v4_1.z
|
|
10
|
+
.strictObject({
|
|
10
11
|
candidate: v4_1.z.strictObject({
|
|
11
12
|
...(0, drizzle_zod_1.createInsertSchema)(core_1.person, {
|
|
12
13
|
firstName: utils_1.PersonFirstNameSchema,
|
|
@@ -25,5 +26,10 @@ exports.PublicApplyCreateSchema = v4_1.z.strictObject({
|
|
|
25
26
|
positionId: v4_1.z.uuid(),
|
|
26
27
|
isSignedIn: v4_1.z.literal(false),
|
|
27
28
|
affiliateIdNano: utils_1.OptionalStringSchema
|
|
28
|
-
})
|
|
29
|
+
})
|
|
30
|
+
.or(v4_1.z.strictObject({
|
|
31
|
+
positionId: v4_1.z.uuid(),
|
|
32
|
+
isSignedIn: v4_1.z.literal(true),
|
|
33
|
+
affiliateIdNano: utils_1.OptionalStringSchema
|
|
34
|
+
}));
|
|
29
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/apply/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,+BAA0B;AAC1B,0CAOuB;AAEvB,eAAe;AAEF,QAAA,uBAAuB,GAAG,MAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/apply/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,+BAA0B;AAC1B,0CAOuB;AAEvB,eAAe;AAEF,QAAA,uBAAuB,GAAG,MAAC;KACrC,YAAY,CAAC;IACZ,SAAS,EAAE,MAAC,CAAC,YAAY,CAAC;QACxB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;YAC5B,SAAS,EAAE,6BAAqB;YAChC,QAAQ,EAAE,4BAAoB;YAC9B,KAAK,EAAE,2BAAmB;YAC1B,KAAK,EAAE,mBAAW;YAClB,WAAW,EAAE,yBAAiB;SAC/B,CAAC,CAAC,IAAI,CAAC;YACN,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC,KAAK;KACT,CAAC;IACF,UAAU,EAAE,MAAC,CAAC,IAAI,EAAE;IACpB,UAAU,EAAE,MAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,eAAe,EAAE,4BAAoB;CACtC,CAAC;KACD,EAAE,CACD,MAAC,CAAC,YAAY,CAAC;IACb,UAAU,EAAE,MAAC,CAAC,IAAI,EAAE;IACpB,UAAU,EAAE,MAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,eAAe,EAAE,4BAAoB;CACtC,CAAC,CACH,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n OptionalPhoneSchema,\n OptionalStringSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicApplyCreateSchema = z\n .strictObject({\n candidate: z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: OptionalPhoneSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n }).shape\n }),\n positionId: z.uuid(),\n isSignedIn: z.literal(false),\n affiliateIdNano: OptionalStringSchema\n })\n .or(\n z.strictObject({\n positionId: z.uuid(),\n isSignedIn: z.literal(true),\n affiliateIdNano: OptionalStringSchema\n })\n )\n\n//// types\n\nexport type PublicApplyCreateInput = z.infer<typeof PublicApplyCreateSchema>\n"]}
|