@the-inkwell/shared 0.2.121 → 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;
|
|
@@ -11,10 +11,9 @@ export declare const PublicReferClientSignedInSchema: z.ZodObject<{
|
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
websiteUrl: z.ZodURL;
|
|
13
13
|
}, z.core.$strict>;
|
|
14
|
-
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
15
14
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
16
15
|
}, z.core.$strict>;
|
|
17
|
-
export declare const
|
|
16
|
+
export declare const PublicReferClientSignedOutCreateSchema: z.ZodObject<{
|
|
18
17
|
referrer: z.ZodObject<{
|
|
19
18
|
email: z.ZodEmail;
|
|
20
19
|
firstName: z.ZodString;
|
|
@@ -36,7 +35,7 @@ export declare const PublicReferClientSignedOutSchema: z.ZodObject<{
|
|
|
36
35
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
37
36
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
38
37
|
}, z.core.$strict>;
|
|
39
|
-
export declare const
|
|
38
|
+
export declare const PublicReferCandidacySignedInCreateSchema: z.ZodObject<{
|
|
40
39
|
referred: z.ZodObject<{
|
|
41
40
|
email: z.ZodEmail;
|
|
42
41
|
firstName: z.ZodString;
|
|
@@ -44,10 +43,9 @@ export declare const PublicReferCandidacySignedInSchema: z.ZodObject<{
|
|
|
44
43
|
linkedInUrl: z.ZodURL;
|
|
45
44
|
phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
46
45
|
}, z.core.$strict>;
|
|
47
|
-
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
48
46
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
49
47
|
}, z.core.$strict>;
|
|
50
|
-
export declare const
|
|
48
|
+
export declare const PublicReferCandidacySignedOutCreateSchema: z.ZodObject<{
|
|
51
49
|
referrer: z.ZodObject<{
|
|
52
50
|
email: z.ZodEmail;
|
|
53
51
|
firstName: z.ZodString;
|
|
@@ -65,7 +63,7 @@ export declare const PublicReferCandidacySignedOutSchema: z.ZodObject<{
|
|
|
65
63
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
66
64
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
67
65
|
}, z.core.$strict>;
|
|
68
|
-
export declare const
|
|
66
|
+
export declare const PublicReferCandidacyPositionSignedInCreateSchema: z.ZodObject<{
|
|
69
67
|
positionIdNano: z.ZodString;
|
|
70
68
|
referred: z.ZodObject<{
|
|
71
69
|
email: z.ZodEmail;
|
|
@@ -74,10 +72,9 @@ export declare const PublicReferCandidacyPositionSignedInSchema: z.ZodObject<{
|
|
|
74
72
|
linkedInUrl: z.ZodURL;
|
|
75
73
|
phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
76
74
|
}, z.core.$strict>;
|
|
77
|
-
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
78
75
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
79
76
|
}, z.core.$strict>;
|
|
80
|
-
export declare const
|
|
77
|
+
export declare const PublicReferCandidacyPositionSignedOutCreateSchema: z.ZodObject<{
|
|
81
78
|
positionIdNano: z.ZodString;
|
|
82
79
|
referrer: z.ZodObject<{
|
|
83
80
|
email: z.ZodEmail;
|
|
@@ -96,18 +93,18 @@ export declare const PublicReferCandidacyPositionSignedOutSchema: z.ZodObject<{
|
|
|
96
93
|
affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
97
94
|
campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
98
95
|
}, z.core.$strict>;
|
|
99
|
-
export declare const
|
|
96
|
+
export declare const PublicReferCreateResultSchema: z.ZodObject<{
|
|
100
97
|
referralId: z.ZodUUID;
|
|
101
98
|
}, z.core.$strict>;
|
|
102
99
|
export declare const PublicReferWarmIntroCreateSchema: z.ZodObject<{
|
|
103
100
|
referralId: z.ZodUUID;
|
|
104
101
|
message: z.ZodString;
|
|
105
102
|
}, z.core.$strict>;
|
|
106
|
-
export type
|
|
107
|
-
export type
|
|
108
|
-
export type
|
|
109
|
-
export type
|
|
110
|
-
export type
|
|
111
|
-
export type
|
|
112
|
-
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>;
|
|
113
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,44 +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
|
-
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
37
36
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
38
37
|
});
|
|
39
|
-
exports.
|
|
38
|
+
exports.PublicReferClientSignedOutCreateSchema = v4_1.z.strictObject({
|
|
40
39
|
referrer: PersonSchema,
|
|
41
40
|
contact: PersonSchema,
|
|
42
41
|
company: ClientSchema,
|
|
43
42
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
44
43
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
45
44
|
});
|
|
46
|
-
exports.
|
|
45
|
+
exports.PublicReferCandidacySignedInCreateSchema = v4_1.z.strictObject({
|
|
47
46
|
referred: PersonSchema,
|
|
48
|
-
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
49
47
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
50
48
|
});
|
|
51
|
-
exports.
|
|
49
|
+
exports.PublicReferCandidacySignedOutCreateSchema = v4_1.z.strictObject({
|
|
52
50
|
referrer: PersonSchema,
|
|
53
51
|
referred: PersonSchema,
|
|
54
52
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
55
53
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
56
54
|
});
|
|
57
|
-
exports.
|
|
55
|
+
exports.PublicReferCandidacyPositionSignedInCreateSchema = v4_1.z.strictObject({
|
|
58
56
|
positionIdNano: v4_1.z.string(),
|
|
59
57
|
referred: PersonSchema,
|
|
60
|
-
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
61
58
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
62
59
|
});
|
|
63
|
-
exports.
|
|
60
|
+
exports.PublicReferCandidacyPositionSignedOutCreateSchema = v4_1.z.strictObject({
|
|
64
61
|
positionIdNano: v4_1.z.string(),
|
|
65
62
|
referrer: PersonSchema,
|
|
66
63
|
referred: PersonSchema,
|
|
67
64
|
affiliateIdNano: utils_1.OptionalStringSchema,
|
|
68
65
|
campaignIdNano: utils_1.OptionalStringSchema
|
|
69
66
|
});
|
|
70
|
-
exports.
|
|
67
|
+
exports.PublicReferCreateResultSchema = v4_1.z.strictObject({
|
|
71
68
|
referralId: v4_1.z.uuid()
|
|
72
69
|
});
|
|
73
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,gCAAk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,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"]}
|