@the-inkwell/shared 0.2.90 → 0.2.91
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,7 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PublicApplySignedOutCreateSchema: z.ZodObject<{
|
|
3
|
+
positionId: z.ZodUUID;
|
|
4
|
+
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
3
5
|
candidate: z.ZodObject<{
|
|
4
6
|
email: z.ZodEmail;
|
|
5
7
|
firstName: z.ZodString;
|
|
@@ -7,12 +9,10 @@ export declare const PublicApplyCreateSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
7
9
|
linkedInUrl: z.ZodURL;
|
|
8
10
|
phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
9
11
|
}, z.core.$strict>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare const PublicApplySignedInCreateSchema: z.ZodObject<{
|
|
10
14
|
positionId: z.ZodUUID;
|
|
11
|
-
isSignedIn: z.ZodLiteral<false>;
|
|
12
|
-
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
13
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
-
positionId: z.ZodUUID;
|
|
15
|
-
isSignedIn: z.ZodLiteral<true>;
|
|
16
15
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
17
|
-
}, z.core.$strict
|
|
18
|
-
export type
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type PublicApplySignedOutCreateInput = z.infer<typeof PublicApplySignedOutCreateSchema>;
|
|
18
|
+
export type PublicApplySignedInCreateInput = z.infer<typeof PublicApplySignedInCreateSchema>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PublicApplySignedInCreateSchema = exports.PublicApplySignedOutCreateSchema = void 0;
|
|
4
4
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
6
|
const v4_1 = require("zod/v4");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
//// validators
|
|
9
|
-
|
|
10
|
-
.
|
|
9
|
+
const BaseApplySchema = v4_1.z.strictObject({
|
|
10
|
+
positionId: v4_1.z.uuid(),
|
|
11
|
+
affiliateIdNano: utils_1.OptionalStringSchema
|
|
12
|
+
});
|
|
13
|
+
exports.PublicApplySignedOutCreateSchema = v4_1.z.strictObject({
|
|
11
14
|
candidate: v4_1.z.strictObject({
|
|
12
15
|
...(0, drizzle_zod_1.createInsertSchema)(core_1.person, {
|
|
13
16
|
firstName: utils_1.PersonFirstNameSchema,
|
|
@@ -23,13 +26,7 @@ exports.PublicApplyCreateSchema = v4_1.z
|
|
|
23
26
|
linkedInUrl: true
|
|
24
27
|
}).shape
|
|
25
28
|
}),
|
|
26
|
-
|
|
27
|
-
|
|
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
|
+
...BaseApplySchema.shape
|
|
30
|
+
});
|
|
31
|
+
exports.PublicApplySignedInCreateSchema = BaseApplySchema;
|
|
35
32
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/apply/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAA6C;AAC7C,+BAA0B;AAC1B,0CAOuB;AAEvB,eAAe;AAEf,MAAM,eAAe,GAAG,MAAC,CAAC,YAAY,CAAC;IACrC,UAAU,EAAE,MAAC,CAAC,IAAI,EAAE;IACpB,eAAe,EAAE,4BAAoB;CACtC,CAAC,CAAA;AAEW,QAAA,gCAAgC,GAAG,MAAC,CAAC,YAAY,CAAC;IAC7D,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,GAAG,eAAe,CAAC,KAAK;CACzB,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,eAAe,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person, position } 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\nconst BaseApplySchema = z.strictObject({\n positionId: z.uuid(),\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicApplySignedOutCreateSchema = z.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 ...BaseApplySchema.shape\n})\n\nexport const PublicApplySignedInCreateSchema = BaseApplySchema\n\n//// types\n\nexport type PublicApplySignedOutCreateInput = z.infer<\n typeof PublicApplySignedOutCreateSchema\n>\nexport type PublicApplySignedInCreateInput = z.infer<\n typeof PublicApplySignedInCreateSchema\n>\n"]}
|