@the-inkwell/shared 0.2.180 → 0.2.182

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.
@@ -1127,6 +1127,7 @@ export declare const AdminClientListQuerySchema: z.ZodObject<{
1127
1127
  }>;
1128
1128
  }, z.core.$strip>>;
1129
1129
  filter: z.ZodOptional<z.ZodObject<{
1130
+ name: z.ZodOptional<z.ZodString>;
1130
1131
  isLead: z.ZodOptional<z.ZodBoolean>;
1131
1132
  status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1132
1133
  ACTIVE: "ACTIVE";
@@ -57,6 +57,11 @@ exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
57
57
  const AdminClientListQuerySchemaStatus = v4_1.z.object({
58
58
  status: v4_1.z.array(v4_1.z.enum(core_1.ClientStatuses.enumValues)).optional()
59
59
  });
60
+ const AdminClientListQuerySchemaName = (0, drizzle_zod_1.createSelectSchema)(core_1.client)
61
+ .pick({
62
+ name: true
63
+ })
64
+ .partial();
60
65
  const AdminClientListQuerySchemaIsLead = (0, drizzle_zod_1.createSelectSchema)(core_1.client)
61
66
  .pick({
62
67
  isLead: true
@@ -66,7 +71,8 @@ exports.AdminClientListQuerySchema = utils_1.ListQuerySchema.extend({
66
71
  filter: v4_1.z
67
72
  .object({
68
73
  ...AdminClientListQuerySchemaStatus.shape,
69
- ...AdminClientListQuerySchemaIsLead.shape
74
+ ...AdminClientListQuerySchemaIsLead.shape,
75
+ ...AdminClientListQuerySchemaName.shape
70
76
  })
71
77
  .optional()
72
78
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG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I,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxD,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,eAAe,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtD,WAAW,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAA;AAEW,QAAA,uBAAuB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAClE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAEF,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,IAAI,CAAC,qBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAA;AACF,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;KAC1C,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, client, ClientStatuses, industry, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable()\n .optional(),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional(),\n _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional(),\n _potentialRetainerFees: z.number().optional(),\n _potentialPlacementFees: z.number().optional(),\n _earnedRetainerFees: z.number().optional(),\n _earnedPlacementFees: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;YACxC,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,cAAc,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,mBAAmB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,aAAa,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SACtC,IAAI,CAAC;QACJ,EAAE,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O,EAAE,CAAA;AACZ,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,8BAA8B,CAAC,KAAK;KACxC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, client, ClientStatuses, industry, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable()\n .optional(),\n sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional(),\n _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional(),\n _potentialRetainerFees: z.number().optional(),\n _potentialPlacementFees: z.number().optional(),\n _earnedRetainerFees: z.number().optional(),\n _earnedPlacementFees: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaName = createSelectSchema(client)\n .pick({\n name: true\n })\n .partial()\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape,\n ...AdminClientListQuerySchemaName.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
@@ -8,6 +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
12
  }, z.core.$strict>;
12
13
  affiliateIdNano: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
13
14
  }, z.core.$strict>;
@@ -17,13 +17,15 @@ exports.PublicApplySignedOutCreateSchema = v4_1.z.strictObject({
17
17
  lastName: utils_1.PersonLastNameSchema,
18
18
  phone: utils_1.OptionalPhoneSchema,
19
19
  email: utils_1.EmailSchema,
20
- linkedInUrl: utils_1.LinkedInUrlSchema
20
+ linkedInUrl: utils_1.LinkedInUrlSchema,
21
+ discoveredThrough: v4_1.z.string().optional().nullable()
21
22
  }).pick({
22
23
  firstName: true,
23
24
  lastName: true,
24
25
  email: true,
25
26
  phone: true,
26
- linkedInUrl: true
27
+ linkedInUrl: true,
28
+ discoveredThrough: true
27
29
  }).shape
28
30
  }),
29
31
  affiliateIdNano: utils_1.OptionalStringSchema,
@@ -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;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,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 }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: 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,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"]}
@@ -13,7 +13,8 @@ exports.PublicHireCreateSchema = v4_1.z.strictObject({
13
13
  lastName: utils_1.PersonLastNameSchema,
14
14
  phone: utils_1.OptionalPhoneSchema,
15
15
  email: utils_1.EmailSchema,
16
- linkedInUrl: utils_1.LinkedInUrlSchema
16
+ linkedInUrl: utils_1.LinkedInUrlSchema,
17
+ discoveredThrough: v4_1.z.string().optional().nullable()
17
18
  }).pick({
18
19
  firstName: true,
19
20
  lastName: true,
@@ -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,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"]}
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"]}
@@ -20,6 +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
24
  }, z.core.$strict>;
24
25
  contact: z.ZodObject<{
25
26
  email: z.ZodEmail;
@@ -52,6 +53,7 @@ export declare const PublicReferCandidacySignedOutCreateSchema: z.ZodObject<{
52
53
  firstName: z.ZodString;
53
54
  lastName: z.ZodString;
54
55
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
56
+ discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
55
57
  }, z.core.$strict>;
56
58
  referred: z.ZodObject<{
57
59
  email: z.ZodEmail;
@@ -82,6 +84,7 @@ export declare const PublicReferCandidacyPositionSignedOutCreateSchema: z.ZodObj
82
84
  firstName: z.ZodString;
83
85
  lastName: z.ZodString;
84
86
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
87
+ discoveredThrough: z.ZodNullable<z.ZodOptional<z.ZodString>>;
85
88
  }, z.core.$strict>;
86
89
  referred: z.ZodObject<{
87
90
  email: z.ZodEmail;
@@ -12,15 +12,21 @@ const PersonSchema = v4_1.z.strictObject({
12
12
  lastName: utils_1.PersonLastNameSchema,
13
13
  phone: utils_1.OptionalPhoneSchema,
14
14
  email: utils_1.EmailSchema,
15
- linkedInUrl: utils_1.LinkedInUrlSchema
15
+ linkedInUrl: utils_1.LinkedInUrlSchema,
16
+ discoveredThrough: v4_1.z.string().optional().nullable()
16
17
  }).pick({
17
18
  firstName: true,
18
19
  lastName: true,
19
20
  email: true,
20
21
  phone: true,
21
- linkedInUrl: true
22
+ linkedInUrl: true,
23
+ discoveredThrough: true
22
24
  }).shape
23
25
  });
26
+ const ReferredPersonSchema = PersonSchema.omit({
27
+ discoveredThrough: true
28
+ });
29
+ const ReferrerPersonSchema = PersonSchema;
24
30
  const ClientSchema = v4_1.z.strictObject({
25
31
  ...(0, drizzle_zod_1.createInsertSchema)(core_1.client, {
26
32
  name: v4_1.z.string().min(1, 'Company name is required'),
@@ -31,36 +37,36 @@ const ClientSchema = v4_1.z.strictObject({
31
37
  }).shape
32
38
  });
33
39
  exports.PublicReferClientSignedInCreateSchema = v4_1.z.strictObject({
34
- contact: PersonSchema,
40
+ contact: ReferredPersonSchema,
35
41
  company: ClientSchema,
36
42
  campaignIdNano: utils_1.OptionalStringSchema
37
43
  });
38
44
  exports.PublicReferClientSignedOutCreateSchema = v4_1.z.strictObject({
39
- referrer: PersonSchema,
40
- contact: PersonSchema,
45
+ referrer: ReferrerPersonSchema,
46
+ contact: ReferredPersonSchema,
41
47
  company: ClientSchema,
42
48
  affiliateIdNano: utils_1.OptionalStringSchema,
43
49
  campaignIdNano: utils_1.OptionalStringSchema
44
50
  });
45
51
  exports.PublicReferCandidacySignedInCreateSchema = v4_1.z.strictObject({
46
- referred: PersonSchema,
52
+ referred: ReferredPersonSchema,
47
53
  campaignIdNano: utils_1.OptionalStringSchema
48
54
  });
49
55
  exports.PublicReferCandidacySignedOutCreateSchema = v4_1.z.strictObject({
50
- referrer: PersonSchema,
51
- referred: PersonSchema,
56
+ referrer: ReferrerPersonSchema,
57
+ referred: ReferredPersonSchema,
52
58
  affiliateIdNano: utils_1.OptionalStringSchema,
53
59
  campaignIdNano: utils_1.OptionalStringSchema
54
60
  });
55
61
  exports.PublicReferCandidacyPositionSignedInCreateSchema = v4_1.z.strictObject({
56
62
  positionIdNano: v4_1.z.string(),
57
- referred: PersonSchema,
63
+ referred: ReferredPersonSchema,
58
64
  campaignIdNano: utils_1.OptionalStringSchema
59
65
  });
60
66
  exports.PublicReferCandidacyPositionSignedOutCreateSchema = v4_1.z.strictObject({
61
67
  positionIdNano: v4_1.z.string(),
62
- referrer: PersonSchema,
63
- referred: PersonSchema,
68
+ referrer: ReferrerPersonSchema,
69
+ referred: ReferredPersonSchema,
64
70
  affiliateIdNano: utils_1.OptionalStringSchema,
65
71
  campaignIdNano: utils_1.OptionalStringSchema
66
72
  });
@@ -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,E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EY,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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/refer/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,+BAA0B;AAC1B,qCAA2C;AAC3C,0CAOuB;AAEvB,eAAe;AAEf,MAAM,YAAY,GAAG,MAAC,CAAC,YAAY,CAAC;IAClC,GAAG,IAAA,gCAA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EAAE,4BAAoB;IACrC,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,wCAAwC,GAAG,MAAC,CAAC,YAAY,CAAC;IACrE,QAAQ,EAAE,oBAAoB;IAC9B,cAAc,EAAE,4BAAoB;CACrC,CAAC,CAAA;AAEW,QAAA,yCAAyC,GAAG,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 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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.180",
3
+ "version": "0.2.182",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",