@the-inkwell/shared 0.2.182 → 0.2.184

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.
@@ -8,7 +8,7 @@ export declare const PublicApplySignedOutCreateSchema: z.ZodObject<{
8
8
  firstName: z.ZodString;
9
9
  lastName: z.ZodString;
10
10
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
11
- discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
+ discoveredThrough: z.ZodString;
12
12
  }, z.core.$strict>;
13
13
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
14
14
  }, z.core.$strict>;
@@ -18,7 +18,7 @@ exports.PublicApplySignedOutCreateSchema = v4_1.z.strictObject({
18
18
  phone: utils_1.OptionalPhoneSchema,
19
19
  email: utils_1.EmailSchema,
20
20
  linkedInUrl: utils_1.LinkedInUrlSchema,
21
- discoveredThrough: v4_1.z.string().optional().nullable()
21
+ discoveredThrough: utils_1.DiscoveredThroughSchema
22
22
  }).pick({
23
23
  firstName: true,
24
24
  lastName: true,
@@ -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,MAAM,eAAe,GAAG,MAAC,CAAC,YAAY,CAAC;IACrC,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,4BAAoB;CACrC,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;YAC9B,iBAAiB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SACpD,CAAC,CAAC,IAAI,CAAC;YACN,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC,KAAK;KACT,CAAC;IACF,eAAe,EAAE,4BAAoB;IACrC,GAAG,eAAe,CAAC,KAAK;CACzB,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,eAAe,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\nconst BaseApplySchema = z.strictObject({\n positionIdNano: z.string(),\n campaignIdNano: 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 discoveredThrough: z.string().optional().nullable()\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true,\n discoveredThrough: true\n }).shape\n }),\n affiliateIdNano: OptionalStringSchema,\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/apply/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,+BAA0B;AAC1B,0CAQuB;AAEvB,eAAe;AAEf,MAAM,eAAe,GAAG,MAAC,CAAC,YAAY,CAAC;IACrC,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,4BAAoB;CACrC,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;YAC9B,iBAAiB,EAAE,+BAAuB;SAC3C,CAAC,CAAC,IAAI,CAAC;YACN,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC,KAAK;KACT,CAAC;IACF,eAAe,EAAE,4BAAoB;IACrC,GAAG,eAAe,CAAC,KAAK;CACzB,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,eAAe,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n DiscoveredThroughSchema,\n EmailSchema,\n LinkedInUrlSchema,\n OptionalPhoneSchema,\n OptionalStringSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nconst BaseApplySchema = z.strictObject({\n positionIdNano: z.string(),\n campaignIdNano: 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 discoveredThrough: DiscoveredThroughSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true,\n discoveredThrough: true\n }).shape\n }),\n affiliateIdNano: OptionalStringSchema,\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"]}
@@ -6,6 +6,7 @@ export declare const PublicHireCreateSchema: z.ZodObject<{
6
6
  firstName: z.ZodString;
7
7
  lastName: z.ZodString;
8
8
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
9
+ discoveredThrough: z.ZodString;
9
10
  }, z.core.$strict>;
10
11
  positionDetails: z.ZodString;
11
12
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
@@ -14,13 +14,14 @@ exports.PublicHireCreateSchema = v4_1.z.strictObject({
14
14
  phone: utils_1.OptionalPhoneSchema,
15
15
  email: utils_1.EmailSchema,
16
16
  linkedInUrl: utils_1.LinkedInUrlSchema,
17
- discoveredThrough: v4_1.z.string().optional().nullable()
17
+ discoveredThrough: utils_1.DiscoveredThroughSchema
18
18
  }).pick({
19
19
  firstName: true,
20
20
  lastName: true,
21
21
  email: true,
22
22
  phone: true,
23
- linkedInUrl: true
23
+ linkedInUrl: true,
24
+ discoveredThrough: true
24
25
  }).shape
25
26
  }),
26
27
  positionDetails: v4_1.z.string().min(1, 'Position details are required'),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/hire/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAA2C;AAC3C,+BAA0B;AAC1B,0CAOuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,OAAO,EAAE,MAAC,CAAC,YAAY,CAAC;QACtB,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;YAC9B,iBAAiB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SACpD,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,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,+BAA+B,CAAC;IACnE,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;IACpC,OAAO,EAAE,MAAC,CAAC,YAAY,CAAC;QACtB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;YAC5B,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;YACnD,UAAU,EAAE,MAAC,CAAC,GAAG,CAAC,aAAa,CAAC;SACjC,CAAC,CAAC,IAAI,CAAC;YACN,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC,KAAK;KACT,CAAC;CACH,CAAC,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { client, 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 PublicHireCreateSchema = z.strictObject({\n contact: z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: OptionalPhoneSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema,\n discoveredThrough: z.string().optional().nullable()\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n }).shape\n }),\n positionDetails: z.string().min(1, 'Position details are required'),\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema,\n company: 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})\n\n//// types\n\nexport type PublicHireCreateInput = z.infer<typeof PublicHireCreateSchema>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/hire/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAA2C;AAC3C,+BAA0B;AAC1B,0CAQuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,OAAO,EAAE,MAAC,CAAC,YAAY,CAAC;QACtB,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;YAC9B,iBAAiB,EAAE,+BAAuB;SAC3C,CAAC,CAAC,IAAI,CAAC;YACN,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC,KAAK;KACT,CAAC;IACF,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,+BAA+B,CAAC;IACnE,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;IACpC,OAAO,EAAE,MAAC,CAAC,YAAY,CAAC;QACtB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;YAC5B,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;YACnD,UAAU,EAAE,MAAC,CAAC,GAAG,CAAC,aAAa,CAAC;SACjC,CAAC,CAAC,IAAI,CAAC;YACN,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC,KAAK;KACT,CAAC;CACH,CAAC,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { client, person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n DiscoveredThroughSchema,\n EmailSchema,\n LinkedInUrlSchema,\n OptionalPhoneSchema,\n OptionalStringSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicHireCreateSchema = z.strictObject({\n contact: z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: OptionalPhoneSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema,\n discoveredThrough: DiscoveredThroughSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true,\n discoveredThrough: true\n }).shape\n }),\n positionDetails: z.string().min(1, 'Position details are required'),\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema,\n company: 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})\n\n//// types\n\nexport type PublicHireCreateInput = z.infer<typeof PublicHireCreateSchema>\n"]}
@@ -20,7 +20,7 @@ export declare const PublicReferClientSignedOutCreateSchema: z.ZodObject<{
20
20
  firstName: z.ZodString;
21
21
  lastName: z.ZodString;
22
22
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
23
- discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
+ discoveredThrough: z.ZodString;
24
24
  }, z.core.$strict>;
25
25
  contact: z.ZodObject<{
26
26
  email: z.ZodEmail;
@@ -53,7 +53,7 @@ export declare const PublicReferCandidacySignedOutCreateSchema: z.ZodObject<{
53
53
  firstName: z.ZodString;
54
54
  lastName: z.ZodString;
55
55
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
56
- discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
56
+ discoveredThrough: z.ZodString;
57
57
  }, z.core.$strict>;
58
58
  referred: z.ZodObject<{
59
59
  email: z.ZodEmail;
@@ -84,7 +84,7 @@ export declare const PublicReferCandidacyPositionSignedOutCreateSchema: z.ZodObj
84
84
  firstName: z.ZodString;
85
85
  lastName: z.ZodString;
86
86
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
87
- discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
87
+ discoveredThrough: z.ZodString;
88
88
  }, z.core.$strict>;
89
89
  referred: z.ZodObject<{
90
90
  email: z.ZodEmail;
@@ -13,7 +13,7 @@ const PersonSchema = v4_1.z.strictObject({
13
13
  phone: utils_1.OptionalPhoneSchema,
14
14
  email: utils_1.EmailSchema,
15
15
  linkedInUrl: utils_1.LinkedInUrlSchema,
16
- discoveredThrough: v4_1.z.string().optional().nullable()
16
+ discoveredThrough: utils_1.DiscoveredThroughSchema
17
17
  }).pick({
18
18
  firstName: true,
19
19
  lastName: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/refer/index.ts"],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import { createInsertSchema } from 'drizzle-zod'\nimport { z } from 'zod/v4'\nimport { 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 discoveredThrough: z.string().optional().nullable()\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true,\n discoveredThrough: true\n }).shape\n})\n\nconst ReferredPersonSchema = PersonSchema.omit({\n discoveredThrough: true\n})\n\nconst ReferrerPersonSchema = PersonSchema\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: ReferredPersonSchema,\n company: ClientSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferClientSignedOutCreateSchema = z.strictObject({\n referrer: ReferrerPersonSchema,\n contact: ReferredPersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedInCreateSchema = z.strictObject({\n referred: ReferredPersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedOutCreateSchema = z.strictObject({\n referrer: ReferrerPersonSchema,\n referred: ReferredPersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedInCreateSchema = z.strictObject({\n positionIdNano: z.string(),\n referred: ReferredPersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedOutCreateSchema = z.strictObject(\n {\n positionIdNano: z.string(),\n referrer: ReferrerPersonSchema,\n referred: ReferredPersonSchema,\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/refer/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,+BAA0B;AAC1B,qCAA2C;AAC3C,0CAQuB;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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MAAC,CAAC,YAAY,CAAC;IACtE,QAAQ,EAAE,oBAAoB;IAC9B,QAAQ,EAAE,oBAAoB;IAC9B,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,oBAAoB;IAC9B,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,iDAAiD,GAAG,MAAC,CAAC,YAAY,CAC7E;IACE,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,oBAAoB;IAC9B,QAAQ,EAAE,oBAAoB;IAC9B,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 { client, person } from '../../core'\nimport {\n DiscoveredThroughSchema,\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 discoveredThrough: DiscoveredThroughSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true,\n discoveredThrough: true\n }).shape\n})\n\nconst ReferredPersonSchema = PersonSchema.omit({\n discoveredThrough: true\n})\n\nconst ReferrerPersonSchema = PersonSchema\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: ReferredPersonSchema,\n company: ClientSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferClientSignedOutCreateSchema = z.strictObject({\n referrer: ReferrerPersonSchema,\n contact: ReferredPersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedInCreateSchema = z.strictObject({\n referred: ReferredPersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedOutCreateSchema = z.strictObject({\n referrer: ReferrerPersonSchema,\n referred: ReferredPersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedInCreateSchema = z.strictObject({\n positionIdNano: z.string(),\n referred: ReferredPersonSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedOutCreateSchema = z.strictObject(\n {\n positionIdNano: z.string(),\n referrer: ReferrerPersonSchema,\n referred: ReferredPersonSchema,\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"]}
package/dist/utils.d.ts CHANGED
@@ -29,6 +29,7 @@ export declare const makeEnumFromObj: <T extends {
29
29
  }>(obj: T) => [keyof typeof obj];
30
30
  export declare const PersonFirstNameSchema: z.ZodString;
31
31
  export declare const PersonLastNameSchema: z.ZodString;
32
+ export declare const DiscoveredThroughSchema: z.ZodString;
32
33
  export declare const EmailSchema: z.ZodEmail;
33
34
  export declare const PhoneSchema: z.ZodString;
34
35
  export declare const LinkedInUrlSchema: z.ZodURL;
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OptionalUUIDSchema = exports.OptionalPhoneSchema = exports.OptionalStringSchema = exports.LinkedInUrlSchema = exports.PhoneSchema = exports.EmailSchema = exports.PersonLastNameSchema = exports.PersonFirstNameSchema = exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
3
+ exports.OptionalUUIDSchema = exports.OptionalPhoneSchema = exports.OptionalStringSchema = exports.LinkedInUrlSchema = exports.PhoneSchema = exports.EmailSchema = exports.DiscoveredThroughSchema = exports.PersonLastNameSchema = exports.PersonFirstNameSchema = exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
4
4
  const v4_1 = require("zod/v4");
5
5
  exports.ListQuerySchema = v4_1.z.object({
6
6
  limit: v4_1.z.number().max(1000).optional(),
@@ -22,6 +22,9 @@ const makeEnumFromObj = (obj) => {
22
22
  exports.makeEnumFromObj = makeEnumFromObj;
23
23
  exports.PersonFirstNameSchema = v4_1.z.string().min(1, 'First name is required');
24
24
  exports.PersonLastNameSchema = v4_1.z.string().min(1, 'Last name is required');
25
+ exports.DiscoveredThroughSchema = v4_1.z
26
+ .string()
27
+ .min(1, 'How you heard about us is required');
25
28
  exports.EmailSchema = v4_1.z.email('Valid email address is required');
26
29
  exports.PhoneSchema = v4_1.z.string().min(1, 'Phone number is required');
27
30
  exports.LinkedInUrlSchema = v4_1.z.url({
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC;SACJ,MAAM,CAAC;QACN,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;QACjB,SAAS,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KACnC,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AAEK,MAAM,eAAe,GAAG,CAQ7B,GAAM,EACN,EAAE;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CACL,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ;YACpC,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ,CACrC,CAAA;IACH,CAAC,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAEY,QAAA,qBAAqB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAA;AACnE,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAEjE,QAAA,WAAW,GAAG,MAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAA;AACxD,QAAA,WAAW,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAA;AAC3D,QAAA,iBAAiB,GAAG,MAAC,CAAC,GAAG,CAAC;IACrC,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,sBAAsB;IAChC,KAAK,EAAE,4BAA4B;CACpC,CAAC,CAAA;AACW,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;AAC9D,QAAA,mBAAmB,GAAG,mBAAW,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;AAC9D,QAAA,kBAAkB,GAAG,MAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z\n .object({\n field: z.string(),\n direction: z.enum(['asc', 'desc'])\n })\n .optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n\nexport const PersonFirstNameSchema = z.string().min(1, 'First name is required')\nexport const PersonLastNameSchema = z.string().min(1, 'Last name is required')\n\nexport const EmailSchema = z.email('Valid email address is required')\nexport const PhoneSchema = z.string().min(1, 'Phone number is required')\nexport const LinkedInUrlSchema = z.url({\n protocol: /^https$/,\n hostname: /^www\\.linkedin\\.com$/,\n error: 'Enter a valid LinkedIn URL'\n})\nexport const OptionalStringSchema = z.string().optional().or(z.literal(''))\nexport const OptionalPhoneSchema = PhoneSchema.optional().or(z.literal(''))\nexport const OptionalUUIDSchema = z.uuid().optional().or(z.literal(''))\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC;SACJ,MAAM,CAAC;QACN,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;QACjB,SAAS,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KACnC,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,MAAC,CAAC,MAAM,CA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AAC,EAAE,CAAC,CAAC,CAAA;AAC9D,QAAA,kBAAkB,GAAG,MAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z\n .object({\n field: z.string(),\n direction: z.enum(['asc', 'desc'])\n })\n .optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n\nexport const PersonFirstNameSchema = z.string().min(1, 'First name is required')\nexport const PersonLastNameSchema = z.string().min(1, 'Last name is required')\nexport const DiscoveredThroughSchema = z\n .string()\n .min(1, 'How you heard about us is required')\n\nexport const EmailSchema = z.email('Valid email address is required')\nexport const PhoneSchema = z.string().min(1, 'Phone number is required')\nexport const LinkedInUrlSchema = z.url({\n protocol: /^https$/,\n hostname: /^www\\.linkedin\\.com$/,\n error: 'Enter a valid LinkedIn URL'\n})\nexport const OptionalStringSchema = z.string().optional().or(z.literal(''))\nexport const OptionalPhoneSchema = PhoneSchema.optional().or(z.literal(''))\nexport const OptionalUUIDSchema = z.uuid().optional().or(z.literal(''))\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.182",
3
+ "version": "0.2.184",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",