@the-inkwell/shared 0.2.122 → 0.2.123
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
|
|
2
|
+
export declare const PublicReferClientSignedInCreateSchema: z.ZodObject<{
|
|
3
3
|
contact: z.ZodObject<{
|
|
4
4
|
email: z.ZodEmail;
|
|
5
5
|
firstName: z.ZodString;
|
|
@@ -13,7 +13,7 @@ export declare const PublicReferClientSignedInSchema: z.ZodObject<{
|
|
|
13
13
|
}, z.core.$strict>;
|
|
14
14
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
15
15
|
}, z.core.$strict>;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const PublicReferClientSignedOutCreateSchema: z.ZodObject<{
|
|
17
17
|
referrer: z.ZodObject<{
|
|
18
18
|
email: z.ZodEmail;
|
|
19
19
|
firstName: z.ZodString;
|
|
@@ -35,7 +35,7 @@ export declare const PublicReferClientSignedOutSchema: z.ZodObject<{
|
|
|
35
35
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
36
36
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
37
37
|
}, z.core.$strict>;
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const PublicReferCandidacySignedInCreateSchema: z.ZodObject<{
|
|
39
39
|
referred: z.ZodObject<{
|
|
40
40
|
email: z.ZodEmail;
|
|
41
41
|
firstName: z.ZodString;
|
|
@@ -45,7 +45,7 @@ export declare const PublicReferCandidacySignedInSchema: z.ZodObject<{
|
|
|
45
45
|
}, z.core.$strict>;
|
|
46
46
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
47
47
|
}, z.core.$strict>;
|
|
48
|
-
export declare const
|
|
48
|
+
export declare const PublicReferCandidacySignedOutCreateSchema: z.ZodObject<{
|
|
49
49
|
referrer: z.ZodObject<{
|
|
50
50
|
email: z.ZodEmail;
|
|
51
51
|
firstName: z.ZodString;
|
|
@@ -63,7 +63,7 @@ export declare const PublicReferCandidacySignedOutSchema: z.ZodObject<{
|
|
|
63
63
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
64
64
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
65
65
|
}, z.core.$strict>;
|
|
66
|
-
export declare const
|
|
66
|
+
export declare const PublicReferCandidacyPositionSignedInCreateSchema: z.ZodObject<{
|
|
67
67
|
positionIdNano: z.ZodString;
|
|
68
68
|
referred: z.ZodObject<{
|
|
69
69
|
email: z.ZodEmail;
|
|
@@ -74,7 +74,7 @@ export declare const PublicReferCandidacyPositionSignedInSchema: z.ZodObject<{
|
|
|
74
74
|
}, z.core.$strict>;
|
|
75
75
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
76
76
|
}, z.core.$strict>;
|
|
77
|
-
export declare const
|
|
77
|
+
export declare const PublicReferCandidacyPositionSignedOutCreateSchema: z.ZodObject<{
|
|
78
78
|
positionIdNano: z.ZodString;
|
|
79
79
|
referrer: z.ZodObject<{
|
|
80
80
|
email: z.ZodEmail;
|
|
@@ -93,18 +93,18 @@ export declare const PublicReferCandidacyPositionSignedOutSchema: z.ZodObject<{
|
|
|
93
93
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
94
94
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
95
95
|
}, z.core.$strict>;
|
|
96
|
-
export declare const
|
|
96
|
+
export declare const PublicReferCreateResultSchema: z.ZodObject<{
|
|
97
97
|
referralId: z.ZodUUID;
|
|
98
98
|
}, z.core.$strict>;
|
|
99
99
|
export declare const PublicReferWarmIntroCreateSchema: z.ZodObject<{
|
|
100
100
|
referralId: z.ZodUUID;
|
|
101
101
|
message: z.ZodString;
|
|
102
102
|
}, z.core.$strict>;
|
|
103
|
-
export type
|
|
104
|
-
export type
|
|
105
|
-
export type
|
|
106
|
-
export type
|
|
107
|
-
export type
|
|
108
|
-
export type
|
|
109
|
-
export type
|
|
103
|
+
export type PublicReferClientSignedInCreateInput = z.infer<typeof PublicReferClientSignedInCreateSchema>;
|
|
104
|
+
export type PublicReferClientSignedOutCreateInput = z.infer<typeof PublicReferClientSignedOutCreateSchema>;
|
|
105
|
+
export type PublicReferCandidacySignedInCreateInput = z.infer<typeof PublicReferCandidacySignedInCreateSchema>;
|
|
106
|
+
export type PublicReferCandidacySignedOutCreateInput = z.infer<typeof PublicReferCandidacySignedOutCreateSchema>;
|
|
107
|
+
export type PublicReferCandidacyPositionSignedInCreateInput = z.infer<typeof PublicReferCandidacyPositionSignedInCreateSchema>;
|
|
108
|
+
export type PublicReferCandidacyPositionSignedOutCreateInput = z.infer<typeof PublicReferCandidacyPositionSignedOutCreateSchema>;
|
|
109
|
+
export type PublicReferCreateResult = z.infer<typeof PublicReferCreateResultSchema>;
|
|
110
110
|
export type PublicReferWarmIntroCreateInput = z.infer<typeof PublicReferWarmIntroCreateSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PublicReferWarmIntroCreateSchema = exports.
|
|
3
|
+
exports.PublicReferWarmIntroCreateSchema = exports.PublicReferCreateResultSchema = exports.PublicReferCandidacyPositionSignedOutCreateSchema = exports.PublicReferCandidacyPositionSignedInCreateSchema = exports.PublicReferCandidacySignedOutCreateSchema = exports.PublicReferCandidacySignedInCreateSchema = exports.PublicReferClientSignedOutCreateSchema = exports.PublicReferClientSignedInCreateSchema = void 0;
|
|
4
4
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
5
|
const v4_1 = require("zod/v4");
|
|
6
6
|
const core_1 = require("../../core");
|
|
@@ -30,41 +30,41 @@ const ClientSchema = v4_1.z.strictObject({
|
|
|
30
30
|
websiteUrl: true
|
|
31
31
|
}).shape
|
|
32
32
|
});
|
|
33
|
-
exports.
|
|
33
|
+
exports.PublicReferClientSignedInCreateSchema = v4_1.z.strictObject({
|
|
34
34
|
contact: PersonSchema,
|
|
35
35
|
company: ClientSchema,
|
|
36
36
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
37
37
|
});
|
|
38
|
-
exports.
|
|
38
|
+
exports.PublicReferClientSignedOutCreateSchema = v4_1.z.strictObject({
|
|
39
39
|
referrer: PersonSchema,
|
|
40
40
|
contact: PersonSchema,
|
|
41
41
|
company: ClientSchema,
|
|
42
42
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
43
43
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
44
44
|
});
|
|
45
|
-
exports.
|
|
45
|
+
exports.PublicReferCandidacySignedInCreateSchema = v4_1.z.strictObject({
|
|
46
46
|
referred: PersonSchema,
|
|
47
47
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
48
48
|
});
|
|
49
|
-
exports.
|
|
49
|
+
exports.PublicReferCandidacySignedOutCreateSchema = v4_1.z.strictObject({
|
|
50
50
|
referrer: PersonSchema,
|
|
51
51
|
referred: PersonSchema,
|
|
52
52
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
53
53
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
54
54
|
});
|
|
55
|
-
exports.
|
|
55
|
+
exports.PublicReferCandidacyPositionSignedInCreateSchema = v4_1.z.strictObject({
|
|
56
56
|
positionIdNano: v4_1.z.string(),
|
|
57
57
|
referred: PersonSchema,
|
|
58
58
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
59
59
|
});
|
|
60
|
-
exports.
|
|
60
|
+
exports.PublicReferCandidacyPositionSignedOutCreateSchema = v4_1.z.strictObject({
|
|
61
61
|
positionIdNano: v4_1.z.string(),
|
|
62
62
|
referrer: PersonSchema,
|
|
63
63
|
referred: PersonSchema,
|
|
64
64
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
65
65
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
66
66
|
});
|
|
67
|
-
exports.
|
|
67
|
+
exports.PublicReferCreateResultSchema = v4_1.z.strictObject({
|
|
68
68
|
referralId: v4_1.z.uuid()
|
|
69
69
|
});
|
|
70
70
|
exports.PublicReferWarmIntroCreateSchema = v4_1.z.strictObject({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/refer/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,+BAA0B;AAC1B,qCAAqD;AACrD,0CAOuB;AAEvB,eAAe;AAEf,MAAM,YAAY,GAAG,MAAC,CAAC,YAAY,CAAC;IAClC,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EAAE,6BAAqB;QAChC,QAAQ,EAAE,4BAAoB;QAC9B,KAAK,EAAE,2BAAmB;QAC1B,KAAK,EAAE,mBAAW;QAClB,WAAW,EAAE,yBAAiB;KAC/B,CAAC,CAAC,IAAI,CAAC;QACN,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,MAAC,CAAC,YAAY,CAAC;IAClC,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;QACnD,UAAU,EAAE,MAAC,CAAC,GAAG,CAAC,aAAa,CAAC;KACjC,CAAC,CAAC,IAAI,CA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,EAAE,YAAY;IACtB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;IACrB,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,wCAAwC,GAAG,MAAC,CAAC,YAAY,CAAC;IACrE,QAAQ,EAAE,YAAY;IACtB,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,yCAAyC,GAAG,MAAC,CAAC,YAAY,CAAC;IACtE,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,gDAAgD,GAAG,MAAC,CAAC,YAAY,CAAC;IAC7E,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,YAAY;IACtB,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,iDAAiD,GAAG,MAAC,CAAC,YAAY,CAC7E;IACE,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;CACrC,CACF,CAAA;AAEY,QAAA,6BAA6B,GAAG,MAAC,CAAC,YAAY,CAAC;IAC1D,UAAU,EAAE,MAAC,CAAC,IAAI,EAAE;CACrB,CAAC,CAAA;AAEW,QAAA,gCAAgC,GAAG,MAAC,CAAC,YAAY,CAAC;IAC7D,UAAU,EAAE,MAAC,CAAC,IAAI,EAAE;IACpB,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qBAAqB,CAAC;CAClD,CAAC,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { z } from 'zod/v4'\nimport { campaign, client, person } from '../../core'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n OptionalPhoneSchema,\n OptionalStringSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nconst PersonSchema = 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\nconst ClientSchema = z.strictObject({\n ...createInsertSchema(client, {\n name: z.string().min(1, 'Company name is required'),\n websiteUrl: z.url('Invalid URL')\n }).pick({\n name: true,\n websiteUrl: true\n }).shape\n})\n\nexport const PublicReferClientSignedInCreateSchema = z.strictObject({\n contact: PersonSchema,\n company: ClientSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferClientSignedOutCreateSchema = z.strictObject({\n referrer: PersonSchema,\n contact: PersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedInCreateSchema = z.strictObject({\n referred: PersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedOutCreateSchema = z.strictObject({\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedInCreateSchema = z.strictObject({\n positionIdNano: z.string(),\n referred: PersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedOutCreateSchema = z.strictObject(\n {\n positionIdNano: z.string(),\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n }\n)\n\nexport const PublicReferCreateResultSchema = z.strictObject({\n referralId: z.uuid()\n})\n\nexport const PublicReferWarmIntroCreateSchema = z.strictObject({\n referralId: z.uuid(),\n message: z.string().min(1, 'Message is required')\n})\n\n//// types\n\n// referral\n\nexport type PublicReferClientSignedInCreateInput = z.infer<\n typeof PublicReferClientSignedInCreateSchema\n>\nexport type PublicReferClientSignedOutCreateInput = z.infer<\n typeof PublicReferClientSignedOutCreateSchema\n>\nexport type PublicReferCandidacySignedInCreateInput = z.infer<\n typeof PublicReferCandidacySignedInCreateSchema\n>\nexport type PublicReferCandidacySignedOutCreateInput = z.infer<\n typeof PublicReferCandidacySignedOutCreateSchema\n>\nexport type PublicReferCandidacyPositionSignedInCreateInput = z.infer<\n typeof PublicReferCandidacyPositionSignedInCreateSchema\n>\nexport type PublicReferCandidacyPositionSignedOutCreateInput = z.infer<\n typeof PublicReferCandidacyPositionSignedOutCreateSchema\n>\n\nexport type PublicReferCreateResult = z.infer<\n typeof PublicReferCreateResultSchema\n>\n\n// warm intro\n\nexport type PublicReferWarmIntroCreateInput = z.infer<\n typeof PublicReferWarmIntroCreateSchema\n>\n"]}
|