@the-inkwell/shared 0.2.114 → 0.2.116

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.
@@ -9,6 +9,7 @@ export declare const PublicHireCreateSchema: z.ZodObject<{
9
9
  }, z.core.$strict>;
10
10
  positionDetails: z.ZodString;
11
11
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
12
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
12
13
  company: z.ZodObject<{
13
14
  name: z.ZodString;
14
15
  websiteUrl: z.ZodURL;
@@ -24,6 +24,7 @@ exports.PublicHireCreateSchema = v4_1.z.strictObject({
24
24
  }),
25
25
  positionDetails: v4_1.z.string().min(1, 'Position details are required'),
26
26
  affiliateIdNano: utils_1.OptionalStringSchema,
27
+ campaignIdNano: utils_1.OptionalStringSchema,
27
28
  company: v4_1.z.strictObject({
28
29
  ...(0, drizzle_zod_1.createInsertSchema)(core_1.client, {
29
30
  name: v4_1.z.string().min(1, 'Company name is 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;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,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,+BAA+B,CAAC;IACnE,eAAe,EAAE,4BAAoB;IACrC,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 }).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 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,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;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,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 }).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"]}
@@ -5,7 +5,8 @@ export declare const PublicJoinCreateSchema: z.ZodObject<{
5
5
  lastName: z.ZodString;
6
6
  linkedInUrl: z.ZodURL;
7
7
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
8
- affiliateIdNano: z.ZodOptional<z.ZodString>;
8
+ affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
9
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
9
10
  }, z.core.$strict>;
10
11
  export declare const PublicJoinCreateResultSchema: z.ZodObject<{
11
12
  person: z.ZodObject<{
@@ -22,7 +22,8 @@ exports.PublicJoinCreateSchema = v4_1.z.strictObject({
22
22
  linkedInUrl: true
23
23
  })
24
24
  .extend({
25
- affiliateIdNano: v4_1.z.string().optional()
25
+ affiliateIdNano: utils_1.OptionalStringSchema,
26
+ campaignIdNano: utils_1.OptionalStringSchema
26
27
  }).shape
27
28
  });
28
29
  exports.PublicJoinCreateResultSchema = v4_1.z.strictObject({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRo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CAAC,CAAA","sourcesContent":["import { createInsertSchema, createSelectSchema } from 'drizzle-zod'\nimport { person, personToBestPerson } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicJoinCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema.optional().or(z.literal('')),\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n })\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n })\n .extend({\n affiliateIdNano: z.string().optional()\n }).shape\n})\nexport const PublicJoinCreateResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n id: true\n })\n})\n\nexport const PublicJoinMemberReasonsCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinMemberReasonsCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n memberReasons: true\n }).shape\n})\n\nexport const PublicJoinBestPersonCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinBestPersonCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n linkedInUrl: true\n }).shape,\n ...createInsertSchema(personToBestPerson).pick({\n description: true\n }).shape\n})\n\nexport const PublicJoinNetworksCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinNetworksCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n networksCommunities: true,\n conferencesAttended: true,\n whatsAppGroups: true,\n otherCommunities: true,\n discoveredThrough: true\n }).shape\n})\n\nexport const PublicJoinVerifyCreateSchema = z.strictObject({\n code: z.string()\n})\nexport const PublicJoinVerifyResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n idNano: true\n }),\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<\n typeof PublicJoinCreateResultSchema\n>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\n\n// best persons\nexport type PublicJoinBestPersonCreateParams = z.infer<\n typeof PublicJoinBestPersonCreateParamsSchema\n>\nexport type PublicJoinBestPersonCreateInput = z.infer<\n typeof PublicJoinBestPersonCreateSchema\n>\n\n// networks\nexport type PublicJoinNetworksCreateParams = z.infer<\n typeof PublicJoinNetworksCreateParamsSchema\n>\nexport type PublicJoinNetworksCreateInput = z.infer<\n typeof PublicJoinNetworksCreateSchema\n>\n\n// verify\nexport type PublicJoinVerifyCreateInput = z.infer<\n typeof PublicJoinVerifyCreateSchema\n>\nexport type PublicJoinVerifyCreateResult = z.infer<\n typeof PublicJoinVerifyResultSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAAuD;AACvD,+BAA0B;AAC1B,0CAOuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EAAE,6BAAqB;QAChC,QAAQ,EAAE,4BAAoB;QAC9B,KAAK,EAAE,mBAAW,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC/C,KAAK,EAAE,mBAAW;QAClB,WAAW,EAAE,yBAAiB;KAC/B,CAAC;SACC,IAAI,CAAC;QACJ,SAAS,EAA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;KAClB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,oCAAoC,GAAG,MAAC,CAAC,YAAY,CAAC;IACjE,QAAQ,EAAE,MAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAA;AACW,QAAA,8BAA8B,GAAG,MAAC,CAAC,YAAY,CAAC;IAC3D,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,IAAI;QACzB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,IAAI;QACtB,iBAAiB,EAAE,IAAI;KACxB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,IAAI;KACb,CAAC;IACF,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA","sourcesContent":["import { createInsertSchema, createSelectSchema } from 'drizzle-zod'\nimport { person, personToBestPerson } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n OptionalStringSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicJoinCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema.optional().or(z.literal('')),\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n })\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n })\n .extend({\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n }).shape\n})\nexport const PublicJoinCreateResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n id: true\n })\n})\n\nexport const PublicJoinMemberReasonsCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinMemberReasonsCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n memberReasons: true\n }).shape\n})\n\nexport const PublicJoinBestPersonCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinBestPersonCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n linkedInUrl: true\n }).shape,\n ...createInsertSchema(personToBestPerson).pick({\n description: true\n }).shape\n})\n\nexport const PublicJoinNetworksCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinNetworksCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n networksCommunities: true,\n conferencesAttended: true,\n whatsAppGroups: true,\n otherCommunities: true,\n discoveredThrough: true\n }).shape\n})\n\nexport const PublicJoinVerifyCreateSchema = z.strictObject({\n code: z.string()\n})\nexport const PublicJoinVerifyResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n idNano: true\n }),\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<\n typeof PublicJoinCreateResultSchema\n>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\n\n// best persons\nexport type PublicJoinBestPersonCreateParams = z.infer<\n typeof PublicJoinBestPersonCreateParamsSchema\n>\nexport type PublicJoinBestPersonCreateInput = z.infer<\n typeof PublicJoinBestPersonCreateSchema\n>\n\n// networks\nexport type PublicJoinNetworksCreateParams = z.infer<\n typeof PublicJoinNetworksCreateParamsSchema\n>\nexport type PublicJoinNetworksCreateInput = z.infer<\n typeof PublicJoinNetworksCreateSchema\n>\n\n// verify\nexport type PublicJoinVerifyCreateInput = z.infer<\n typeof PublicJoinVerifyCreateSchema\n>\nexport type PublicJoinVerifyCreateResult = z.infer<\n typeof PublicJoinVerifyResultSchema\n>\n"]}
@@ -12,8 +12,9 @@ export declare const PublicReferClientSignedInSchema: z.ZodObject<{
12
12
  websiteUrl: z.ZodURL;
13
13
  }, z.core.$strict>;
14
14
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
15
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
15
16
  }, z.core.$strict>;
16
- export declare const PublidReferClientSignedOutSchema: z.ZodObject<{
17
+ export declare const PublicReferClientSignedOutSchema: z.ZodObject<{
17
18
  referrer: z.ZodObject<{
18
19
  email: z.ZodEmail;
19
20
  firstName: z.ZodString;
@@ -33,6 +34,7 @@ export declare const PublidReferClientSignedOutSchema: z.ZodObject<{
33
34
  websiteUrl: z.ZodURL;
34
35
  }, z.core.$strict>;
35
36
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
37
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
36
38
  }, z.core.$strict>;
37
39
  export declare const PublicReferCandidacySignedInSchema: z.ZodObject<{
38
40
  referred: z.ZodObject<{
@@ -43,6 +45,7 @@ export declare const PublicReferCandidacySignedInSchema: z.ZodObject<{
43
45
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
44
46
  }, z.core.$strict>;
45
47
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
48
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
46
49
  }, z.core.$strict>;
47
50
  export declare const PublicReferCandidacySignedOutSchema: z.ZodObject<{
48
51
  referrer: z.ZodObject<{
@@ -60,6 +63,7 @@ export declare const PublicReferCandidacySignedOutSchema: z.ZodObject<{
60
63
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
61
64
  }, z.core.$strict>;
62
65
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
66
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
63
67
  }, z.core.$strict>;
64
68
  export declare const PublicReferCandidacyPositionSignedInSchema: z.ZodObject<{
65
69
  positionIdNano: z.ZodString;
@@ -71,6 +75,7 @@ export declare const PublicReferCandidacyPositionSignedInSchema: z.ZodObject<{
71
75
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
72
76
  }, z.core.$strict>;
73
77
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
78
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
74
79
  }, z.core.$strict>;
75
80
  export declare const PublicReferCandidacyPositionSignedOutSchema: z.ZodObject<{
76
81
  positionIdNano: z.ZodString;
@@ -89,6 +94,7 @@ export declare const PublicReferCandidacyPositionSignedOutSchema: z.ZodObject<{
89
94
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
90
95
  }, z.core.$strict>;
91
96
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
97
+ campaignIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
92
98
  }, z.core.$strict>;
93
99
  export declare const PublicReferResultSchema: z.ZodObject<{
94
100
  referralId: z.ZodUUID;
@@ -98,7 +104,7 @@ export declare const PublicReferWarmIntroCreateSchema: z.ZodObject<{
98
104
  message: z.ZodString;
99
105
  }, z.core.$strict>;
100
106
  export type PublicReferClientSignedInInput = z.infer<typeof PublicReferClientSignedInSchema>;
101
- export type PublicReferClientSignedOutInput = z.infer<typeof PublidReferClientSignedOutSchema>;
107
+ export type PublicReferClientSignedOutInput = z.infer<typeof PublicReferClientSignedOutSchema>;
102
108
  export type PublicReferCandidacySignedInInput = z.infer<typeof PublicReferCandidacySignedInSchema>;
103
109
  export type PublicReferCandidacySignedOutInput = z.infer<typeof PublicReferCandidacySignedOutSchema>;
104
110
  export type PublicReferCandidacyPositionSignedInInput = z.infer<typeof PublicReferCandidacyPositionSignedInSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PublicReferWarmIntroCreateSchema = exports.PublicReferResultSchema = exports.PublicReferCandidacyPositionSignedOutSchema = exports.PublicReferCandidacyPositionSignedInSchema = exports.PublicReferCandidacySignedOutSchema = exports.PublicReferCandidacySignedInSchema = exports.PublidReferClientSignedOutSchema = exports.PublicReferClientSignedInSchema = void 0;
3
+ exports.PublicReferWarmIntroCreateSchema = exports.PublicReferResultSchema = exports.PublicReferCandidacyPositionSignedOutSchema = exports.PublicReferCandidacyPositionSignedInSchema = exports.PublicReferCandidacySignedOutSchema = exports.PublicReferCandidacySignedInSchema = exports.PublicReferClientSignedOutSchema = exports.PublicReferClientSignedInSchema = 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");
@@ -33,33 +33,39 @@ const ClientSchema = v4_1.z.strictObject({
33
33
  exports.PublicReferClientSignedInSchema = v4_1.z.strictObject({
34
34
  contact: PersonSchema,
35
35
  company: ClientSchema,
36
- affiliateIdNano: utils_1.OptionalStringSchema
36
+ affiliateIdNano: utils_1.OptionalStringSchema,
37
+ campaignIdNano: utils_1.OptionalStringSchema
37
38
  });
38
- exports.PublidReferClientSignedOutSchema = v4_1.z.strictObject({
39
+ exports.PublicReferClientSignedOutSchema = v4_1.z.strictObject({
39
40
  referrer: PersonSchema,
40
41
  contact: PersonSchema,
41
42
  company: ClientSchema,
42
- affiliateIdNano: utils_1.OptionalStringSchema
43
+ affiliateIdNano: utils_1.OptionalStringSchema,
44
+ campaignIdNano: utils_1.OptionalStringSchema
43
45
  });
44
46
  exports.PublicReferCandidacySignedInSchema = v4_1.z.strictObject({
45
47
  referred: PersonSchema,
46
- affiliateIdNano: utils_1.OptionalStringSchema
48
+ affiliateIdNano: utils_1.OptionalStringSchema,
49
+ campaignIdNano: utils_1.OptionalStringSchema
47
50
  });
48
51
  exports.PublicReferCandidacySignedOutSchema = v4_1.z.strictObject({
49
52
  referrer: PersonSchema,
50
53
  referred: PersonSchema,
51
- affiliateIdNano: utils_1.OptionalStringSchema
54
+ affiliateIdNano: utils_1.OptionalStringSchema,
55
+ campaignIdNano: utils_1.OptionalStringSchema
52
56
  });
53
57
  exports.PublicReferCandidacyPositionSignedInSchema = v4_1.z.strictObject({
54
58
  positionIdNano: v4_1.z.string(),
55
59
  referred: PersonSchema,
56
- affiliateIdNano: utils_1.OptionalStringSchema
60
+ affiliateIdNano: utils_1.OptionalStringSchema,
61
+ campaignIdNano: utils_1.OptionalStringSchema
57
62
  });
58
63
  exports.PublicReferCandidacyPositionSignedOutSchema = v4_1.z.strictObject({
59
64
  positionIdNano: v4_1.z.string(),
60
65
  referrer: PersonSchema,
61
66
  referred: PersonSchema,
62
- affiliateIdNano: utils_1.OptionalStringSchema
67
+ affiliateIdNano: utils_1.OptionalStringSchema,
68
+ campaignIdNano: utils_1.OptionalStringSchema
63
69
  });
64
70
  exports.PublicReferResultSchema = v4_1.z.strictObject({
65
71
  referralId: v4_1.z.uuid()
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/refer/index.ts"],"names":[],"mappings":";;;AAAA,6C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Ae,EAAE,4BAAoB;CACtC,CAAC,CAAA;AAEW,QAAA,mCAAmC,GAAG,MAAC,CAAC,YAAY,CAAC;IAChE,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,4BAAoB;CACtC,CAAC,CAAA;AAEW,QAAA,0CAA0C,GAAG,MAAC,CAAC,YAAY,CAAC;IACvE,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,4BAAoB;CACtC,CAAC,CAAA;AAEW,QAAA,2CAA2C,GAAG,MAAC,CAAC,YAAY,CAAC;IACxE,cAAc,EAAE,MAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,4BAAoB;CACtC,CAAC,CAAA;AAEW,QAAA,uBAAuB,GAAG,MAAC,CAAC,YAAY,CAAC;IACpD,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 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 PublicReferClientSignedInSchema = z.strictObject({\n contact: PersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublidReferClientSignedOutSchema = z.strictObject({\n referrer: PersonSchema,\n contact: PersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedInSchema = z.strictObject({\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedOutSchema = z.strictObject({\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedInSchema = z.strictObject({\n positionIdNano: z.string(),\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedOutSchema = z.strictObject({\n positionIdNano: z.string(),\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema\n})\n\nexport const PublicReferResultSchema = 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 PublicReferClientSignedInInput = z.infer<\n typeof PublicReferClientSignedInSchema\n>\nexport type PublicReferClientSignedOutInput = z.infer<\n typeof PublidReferClientSignedOutSchema\n>\nexport type PublicReferCandidacySignedInInput = z.infer<\n typeof PublicReferCandidacySignedInSchema\n>\nexport type PublicReferCandidacySignedOutInput = z.infer<\n typeof PublicReferCandidacySignedOutSchema\n>\nexport type PublicReferCandidacyPositionSignedInInput = z.infer<\n typeof PublicReferCandidacyPositionSignedInSchema\n>\nexport type PublicReferCandidacyPositionSignedOutInput = z.infer<\n typeof PublicReferCandidacyPositionSignedOutSchema\n>\n\nexport type PublicReferResult = z.infer<typeof PublicReferResultSchema>\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,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,CAAC;QACN,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,MAAC,CAAC,YAAY,CAAC;IAC5D,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;IACrB,eAAe,EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;CACrC,CAA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,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 PublicReferClientSignedInSchema = z.strictObject({\n contact: PersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferClientSignedOutSchema = z.strictObject({\n referrer: PersonSchema,\n contact: PersonSchema,\n company: ClientSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedInSchema = z.strictObject({\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacySignedOutSchema = z.strictObject({\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedInSchema = z.strictObject({\n positionIdNano: z.string(),\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferCandidacyPositionSignedOutSchema = z.strictObject({\n positionIdNano: z.string(),\n referrer: PersonSchema,\n referred: PersonSchema,\n affiliateIdNano: OptionalStringSchema,\n campaignIdNano: OptionalStringSchema\n})\n\nexport const PublicReferResultSchema = 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 PublicReferClientSignedInInput = z.infer<\n typeof PublicReferClientSignedInSchema\n>\nexport type PublicReferClientSignedOutInput = z.infer<\n typeof PublicReferClientSignedOutSchema\n>\nexport type PublicReferCandidacySignedInInput = z.infer<\n typeof PublicReferCandidacySignedInSchema\n>\nexport type PublicReferCandidacySignedOutInput = z.infer<\n typeof PublicReferCandidacySignedOutSchema\n>\nexport type PublicReferCandidacyPositionSignedInInput = z.infer<\n typeof PublicReferCandidacyPositionSignedInSchema\n>\nexport type PublicReferCandidacyPositionSignedOutInput = z.infer<\n typeof PublicReferCandidacyPositionSignedOutSchema\n>\n\nexport type PublicReferResult = z.infer<typeof PublicReferResultSchema>\n\n// warm intro\n\nexport type PublicReferWarmIntroCreateInput = z.infer<\n typeof PublicReferWarmIntroCreateSchema\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.114",
3
+ "version": "0.2.116",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",