@the-inkwell/shared 0.2.232 → 0.2.234

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.
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const AdminEmbeddingCreateSchema: z.ZodObject<{
3
+ text: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export declare const AdminEmbeddingCreateResultSchema: z.ZodObject<{
6
+ embedding: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
7
+ }, z.core.$strip>;
8
+ export type AdminEmbeddingCreateInput = z.infer<typeof AdminEmbeddingCreateSchema>;
9
+ export type AdminEmbeddingCreateResult = z.infer<typeof AdminEmbeddingCreateResultSchema>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminEmbeddingCreateResultSchema = exports.AdminEmbeddingCreateSchema = void 0;
4
+ const v4_1 = require("zod/v4");
5
+ //// validators
6
+ exports.AdminEmbeddingCreateSchema = v4_1.z.object({
7
+ text: v4_1.z.string()
8
+ });
9
+ exports.AdminEmbeddingCreateResultSchema = v4_1.z.object({
10
+ embedding: v4_1.z.array(v4_1.z.number()).nullable()
11
+ });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/embeddings/index.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,eAAe;AAEF,QAAA,0BAA0B,GAAG,MAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AAEW,QAAA,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IACvD,SAAS,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n//// validators\n\nexport const AdminEmbeddingCreateSchema = z.object({\n text: z.string()\n})\n\nexport const AdminEmbeddingCreateResultSchema = z.object({\n embedding: z.array(z.number()).nullable()\n})\n\n//// types\n\nexport type AdminEmbeddingCreateInput = z.infer<\n typeof AdminEmbeddingCreateSchema\n>\nexport type AdminEmbeddingCreateResult = z.infer<\n typeof AdminEmbeddingCreateResultSchema\n>\n"]}
@@ -4,6 +4,7 @@ export * from './candidacies';
4
4
  export * from './clients';
5
5
  export * from './dashboard';
6
6
  export * from './educations';
7
+ export * from './embeddings';
7
8
  export * from './experiences';
8
9
  export * from './files';
9
10
  export * from './jobFunctions';
@@ -20,6 +20,7 @@ __exportStar(require("./candidacies"), exports);
20
20
  __exportStar(require("./clients"), exports);
21
21
  __exportStar(require("./dashboard"), exports);
22
22
  __exportStar(require("./educations"), exports);
23
+ __exportStar(require("./embeddings"), exports);
23
24
  __exportStar(require("./experiences"), exports);
24
25
  __exportStar(require("./files"), exports);
25
26
  __exportStar(require("./jobFunctions"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,8CAA2B;AAC3B,gDAA6B;AAC7B,4CAAyB;AACzB,8CAA2B;AAC3B,+CAA4B;AAC5B,gDAA6B;AAC7B,0CAAuB;AACvB,iDAA8B;AAC9B,8CAA2B;AAC3B,4CAAyB;AACzB,6CAA0B;AAC1B,0CAAuB;AACvB,6CAA0B;AAC1B,4CAAyB;AACzB,yDAAsC;AACtC,sDAAmC;AACnC,gEAA6C;AAC7C,oDAAiC;AACjC,kDAA+B;AAC/B,8CAA2B;AAC3B,sDAAmC;AACnC,oDAAiC;AACjC,8CAA2B;AAC3B,wDAAqC;AACrC,4CAAyB;AACzB,6CAA0B;AAC1B,6CAA0B;AAC1B,2CAAwB;AACxB,yCAAsB;AACtB,wDAAqC;AACrC,uDAAoC;AACpC,4CAAyB","sourcesContent":["export * from './actions'\nexport * from './campaigns'\nexport * from './candidacies'\nexport * from './clients'\nexport * from './dashboard'\nexport * from './educations'\nexport * from './experiences'\nexport * from './files'\nexport * from './jobFunctions'\nexport * from './locations'\nexport * from './matches'\nexport * from './messages'\nexport * from './notes'\nexport * from './partners'\nexport * from './persons'\nexport * from './personsToBestPersons'\nexport * from './personsToNetworks'\nexport * from './personsToProfessionalEvents'\nexport * from './personsToSkills'\nexport * from './personsToTags'\nexport * from './positions'\nexport * from './positionsToSkills'\nexport * from './positionsToTags'\nexport * from './referrals'\nexport * from './referralsToMessages'\nexport * from './senders'\nexport * from './sendgrid'\nexport * from './settings'\nexport * from './skills'\nexport * from './tags'\nexport * from './websiteLandingPages'\nexport * from './websiteStaticPages'\nexport * from './flodesk'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,8CAA2B;AAC3B,gDAA6B;AAC7B,4CAAyB;AACzB,8CAA2B;AAC3B,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,0CAAuB;AACvB,iDAA8B;AAC9B,8CAA2B;AAC3B,4CAAyB;AACzB,6CAA0B;AAC1B,0CAAuB;AACvB,6CAA0B;AAC1B,4CAAyB;AACzB,yDAAsC;AACtC,sDAAmC;AACnC,gEAA6C;AAC7C,oDAAiC;AACjC,kDAA+B;AAC/B,8CAA2B;AAC3B,sDAAmC;AACnC,oDAAiC;AACjC,8CAA2B;AAC3B,wDAAqC;AACrC,4CAAyB;AACzB,6CAA0B;AAC1B,6CAA0B;AAC1B,2CAAwB;AACxB,yCAAsB;AACtB,wDAAqC;AACrC,uDAAoC;AACpC,4CAAyB","sourcesContent":["export * from './actions'\nexport * from './campaigns'\nexport * from './candidacies'\nexport * from './clients'\nexport * from './dashboard'\nexport * from './educations'\nexport * from './embeddings'\nexport * from './experiences'\nexport * from './files'\nexport * from './jobFunctions'\nexport * from './locations'\nexport * from './matches'\nexport * from './messages'\nexport * from './notes'\nexport * from './partners'\nexport * from './persons'\nexport * from './personsToBestPersons'\nexport * from './personsToNetworks'\nexport * from './personsToProfessionalEvents'\nexport * from './personsToSkills'\nexport * from './personsToTags'\nexport * from './positions'\nexport * from './positionsToSkills'\nexport * from './positionsToTags'\nexport * from './referrals'\nexport * from './referralsToMessages'\nexport * from './senders'\nexport * from './sendgrid'\nexport * from './settings'\nexport * from './skills'\nexport * from './tags'\nexport * from './websiteLandingPages'\nexport * from './websiteStaticPages'\nexport * from './flodesk'\n"]}
@@ -49,6 +49,7 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
49
49
  }>;
50
50
  name: z.ZodEnum<{
51
51
  schoolEmbedding: "schoolEmbedding";
52
+ companyEmbedding: "companyEmbedding";
52
53
  titleEmbedding: "titleEmbedding";
53
54
  }>;
54
55
  value: z.ZodArray<z.ZodNumber>;
@@ -91,6 +92,7 @@ export declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
91
92
  }>;
92
93
  name: z.ZodEnum<{
93
94
  schoolEmbedding: "schoolEmbedding";
95
+ companyEmbedding: "companyEmbedding";
94
96
  titleEmbedding: "titleEmbedding";
95
97
  }>;
96
98
  value: z.ZodArray<z.ZodNumber>;
@@ -43,7 +43,7 @@ const AdminMatchListPreviewFilterSchema = v4_1.z
43
43
  // embedding fields
44
44
  v4_1.z.object({
45
45
  target: AdminMatchListPreviewTargetSchema,
46
- name: v4_1.z.enum(['titleEmbedding', 'schoolEmbedding']),
46
+ name: v4_1.z.enum(['titleEmbedding', 'schoolEmbedding', 'companyEmbedding']),
47
47
  value: v4_1.z.array(v4_1.z.number())
48
48
  }))
49
49
  .or(v4_1.z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"previews.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/previews.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;A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ACd,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;QAChB,GAAG,EAAE,MAAC,CAAC,MAAM,EAAE;QACf,GAAG,EAAE,MAAC,CAAC,MAAM,EAAE;QACf,aAAa,EAAE,MAAC,CAAC,MAAM,EAAE;KAC1B,CAAC;CACH,CAAC,CACH,CAAA;AACU,QAAA,gCAAgC,GAAG,uBAAe,CAAC,MAAM,CAAC;IACrE,MAAM,EAAE,iCAAiC;CAC1C,CAAC,CAAA;AACW,QAAA,oCAAoC,GAAG,MAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,MAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;QACpD,iBAAiB,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACjD,iBAAiB,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC;CACH,CAAC,CAAA","sourcesContent":["import { createSelectSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMatchPreviewSelectSchema = createSelectSchema(person).pick({\n id: true,\n fullName: true,\n email: true,\n phone: true,\n photoUri: true,\n smsIsOptedOut: true,\n emailIsOptedOut: true\n})\nexport const AdminMatchPreviewMetaSelectSchema = z.object({\n emailCount: z.number(),\n smsCount: z.number()\n})\n\nconst AdminMatchListPreviewTargetSchema = z.enum([\n 'person',\n 'referredPersonOrPosition'\n])\n\nconst AdminMatchListPreviewFilterSchema = z\n .object({\n // id fields\n target: AdminMatchListPreviewTargetSchema,\n name: z.enum([\n 'industry',\n 'jobFunction',\n 'skill',\n 'tag',\n 'network',\n 'professionalEvent',\n 'includedPerson',\n 'excludedPerson'\n ]),\n value: z.string()\n })\n .or(\n // embedding fields\n z.object({\n target: AdminMatchListPreviewTargetSchema,\n name: z.enum(['titleEmbedding', 'schoolEmbedding']),\n value: z.array(z.number())\n })\n )\n .or(\n z.object({\n // location field\n target: AdminMatchListPreviewTargetSchema,\n name: z.literal('location'),\n value: z.object({\n name: z.string(),\n lat: z.number(),\n lon: z.number(),\n radiusInMiles: z.number()\n })\n })\n )\nexport const AdminMatchListPreviewQuerySchema = ListQuerySchema.extend({\n filter: AdminMatchListPreviewFilterSchema\n})\nexport const AdminMatchListPreviewMetaQuerySchema = z.object({\n filter: z.object({\n criteria: z.array(AdminMatchListPreviewFilterSchema),\n includedPersonIds: z.array(z.string()).optional(),\n excludedPersonIds: z.array(z.string()).optional()\n })\n})\n\n//// types\n\n// list\nexport type AdminMatchListPreviewQuery = z.infer<\n typeof AdminMatchListPreviewQuerySchema\n>\nexport type AdminMatchListPreviewResult = ListResponse<\n z.infer<typeof AdminMatchPreviewSelectSchema>\n>\n\nexport type AdminMatchListPreviewMetaQuery = z.infer<\n typeof AdminMatchListPreviewMetaQuerySchema\n>\nexport type AdminMatchListPreviewMetaResult = z.infer<\n typeof AdminMatchPreviewMetaSelectSchema\n>\n"]}
1
+ {"version":3,"file":"previews.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/previews.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,6BAA6B,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IAC3E,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;CACtB,CAAC,CAAA;AACW,QAAA,iCAAiC,GAAG,MAAC,CAAC,MAAM,CAAC;IACxD,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE;IACtB,QAA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C3D,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,MAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC;QACpD,iBAAiB,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACjD,iBAAiB,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC;CACH,CAAC,CAAA","sourcesContent":["import { createSelectSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMatchPreviewSelectSchema = createSelectSchema(person).pick({\n id: true,\n fullName: true,\n email: true,\n phone: true,\n photoUri: true,\n smsIsOptedOut: true,\n emailIsOptedOut: true\n})\nexport const AdminMatchPreviewMetaSelectSchema = z.object({\n emailCount: z.number(),\n smsCount: z.number()\n})\n\nconst AdminMatchListPreviewTargetSchema = z.enum([\n 'person',\n 'referredPersonOrPosition'\n])\n\nconst AdminMatchListPreviewFilterSchema = z\n .object({\n // id fields\n target: AdminMatchListPreviewTargetSchema,\n name: z.enum([\n 'industry',\n 'jobFunction',\n 'skill',\n 'tag',\n 'network',\n 'professionalEvent',\n 'includedPerson',\n 'excludedPerson'\n ]),\n value: z.string()\n })\n .or(\n // embedding fields\n z.object({\n target: AdminMatchListPreviewTargetSchema,\n name: z.enum(['titleEmbedding', 'schoolEmbedding', 'companyEmbedding']),\n value: z.array(z.number())\n })\n )\n .or(\n z.object({\n // location field\n target: AdminMatchListPreviewTargetSchema,\n name: z.literal('location'),\n value: z.object({\n name: z.string(),\n lat: z.number(),\n lon: z.number(),\n radiusInMiles: z.number()\n })\n })\n )\nexport const AdminMatchListPreviewQuerySchema = ListQuerySchema.extend({\n filter: AdminMatchListPreviewFilterSchema\n})\nexport const AdminMatchListPreviewMetaQuerySchema = z.object({\n filter: z.object({\n criteria: z.array(AdminMatchListPreviewFilterSchema),\n includedPersonIds: z.array(z.string()).optional(),\n excludedPersonIds: z.array(z.string()).optional()\n })\n})\n\n//// types\n\n// list\nexport type AdminMatchListPreviewQuery = z.infer<\n typeof AdminMatchListPreviewQuerySchema\n>\nexport type AdminMatchListPreviewResult = ListResponse<\n z.infer<typeof AdminMatchPreviewSelectSchema>\n>\n\nexport type AdminMatchListPreviewMetaQuery = z.infer<\n typeof AdminMatchListPreviewMetaQuerySchema\n>\nexport type AdminMatchListPreviewMetaResult = z.infer<\n typeof AdminMatchPreviewMetaSelectSchema\n>\n"]}
@@ -0,0 +1,72 @@
1
+ import { z } from 'zod/v4';
2
+ import { ListResponse } from '../../../utils';
3
+ export declare const PublicAccountSelectSchema: z.ZodObject<{
4
+ email: z.ZodString;
5
+ idNano: z.ZodString;
6
+ firstName: z.ZodNullable<z.ZodString>;
7
+ lastName: z.ZodNullable<z.ZodString>;
8
+ phone: z.ZodNullable<z.ZodString>;
9
+ }, {
10
+ out: {};
11
+ in: {};
12
+ }>;
13
+ export declare const PublicAccountUpdateSchema: z.ZodObject<{
14
+ email: z.ZodEmail;
15
+ firstName: z.ZodString;
16
+ lastName: z.ZodString;
17
+ phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
18
+ }, z.core.$strict>;
19
+ export declare const PublicAccountReferralSelectSchema: z.ZodObject<{
20
+ person: z.ZodOptional<z.ZodObject<{
21
+ wasHired: z.ZodOptional<z.ZodBoolean>;
22
+ firstName: z.ZodNullable<z.ZodString>;
23
+ lastName: z.ZodNullable<z.ZodString>;
24
+ }, z.core.$strict>>;
25
+ client: z.ZodOptional<z.ZodObject<{
26
+ hasHired: z.ZodOptional<z.ZodBoolean>;
27
+ name: z.ZodString;
28
+ }, z.core.$strict>>;
29
+ position: z.ZodOptional<z.ZodObject<{
30
+ client: z.ZodOptional<z.ZodObject<{
31
+ name: z.ZodString;
32
+ }, {
33
+ out: {};
34
+ in: {};
35
+ }>>;
36
+ candidacy: z.ZodOptional<z.ZodObject<{
37
+ person: z.ZodObject<{
38
+ firstName: z.ZodNullable<z.ZodString>;
39
+ lastName: z.ZodNullable<z.ZodString>;
40
+ }, z.core.$strict>;
41
+ stage: z.ZodString;
42
+ }, z.core.$strict>>;
43
+ name: z.ZodString;
44
+ }, z.core.$strict>>;
45
+ createdAt: z.ZodDate;
46
+ referralType: z.ZodNullable<z.ZodEnum<{
47
+ CLIENT: "CLIENT";
48
+ PERSON: "PERSON";
49
+ CANDIDACY: "CANDIDACY";
50
+ }>>;
51
+ }, z.core.$strict>;
52
+ export declare const PublicAccountApplicationSelectSchema: z.ZodObject<{
53
+ client: z.ZodOptional<z.ZodObject<{
54
+ name: z.ZodString;
55
+ }, {
56
+ out: {};
57
+ in: {};
58
+ }>>;
59
+ position: z.ZodObject<{
60
+ name: z.ZodString;
61
+ }, {
62
+ out: {};
63
+ in: {};
64
+ }>;
65
+ candidacy: {
66
+ stage: z.ZodString;
67
+ };
68
+ }, z.core.$strict>;
69
+ export type PublicAccountResult = z.infer<typeof PublicAccountSelectSchema>;
70
+ export type PublicAccountUpdateInput = z.infer<typeof PublicAccountUpdateSchema>;
71
+ export type PublicAccountReferralListResult = ListResponse<z.infer<typeof PublicAccountReferralSelectSchema>>;
72
+ export type PublicAccountApplicationListResult = ListResponse<z.infer<typeof PublicAccountApplicationSelectSchema>>;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicAccountApplicationSelectSchema = exports.PublicAccountReferralSelectSchema = exports.PublicAccountUpdateSchema = exports.PublicAccountSelectSchema = void 0;
4
+ const drizzle_zod_1 = require("drizzle-zod");
5
+ const core_1 = require("../../core");
6
+ const v4_1 = require("zod/v4");
7
+ const utils_1 = require("../../../utils");
8
+ //// validators
9
+ exports.PublicAccountSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
10
+ idNano: true,
11
+ firstName: true,
12
+ lastName: true,
13
+ email: true,
14
+ phone: true
15
+ });
16
+ exports.PublicAccountUpdateSchema = v4_1.z.strictObject({
17
+ ...(0, drizzle_zod_1.createUpdateSchema)(core_1.person, {
18
+ firstName: utils_1.PersonFirstNameSchema,
19
+ lastName: utils_1.PersonLastNameSchema,
20
+ phone: utils_1.OptionalPhoneSchema,
21
+ email: utils_1.EmailSchema
22
+ }).pick({
23
+ firstName: true,
24
+ lastName: true,
25
+ phone: true,
26
+ email: true
27
+ }).shape
28
+ });
29
+ exports.PublicAccountReferralSelectSchema = v4_1.z.strictObject({
30
+ ...(0, drizzle_zod_1.createSelectSchema)(core_1.referral).pick({
31
+ referralType: true,
32
+ createdAt: true
33
+ }).shape,
34
+ person: v4_1.z
35
+ .strictObject({
36
+ ...(0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
37
+ firstName: true,
38
+ lastName: true
39
+ }).shape,
40
+ wasHired: v4_1.z.boolean().optional()
41
+ })
42
+ .optional(),
43
+ client: v4_1.z
44
+ .strictObject({
45
+ ...(0, drizzle_zod_1.createSelectSchema)(core_1.client).pick({
46
+ name: true
47
+ }).shape,
48
+ hasHired: v4_1.z.boolean().optional()
49
+ })
50
+ .optional(),
51
+ position: v4_1.z
52
+ .strictObject({
53
+ ...(0, drizzle_zod_1.createSelectSchema)(core_1.position).pick({
54
+ name: true
55
+ }).shape,
56
+ client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
57
+ .pick({
58
+ name: true
59
+ })
60
+ .optional(),
61
+ candidacy: v4_1.z
62
+ .strictObject({
63
+ person: v4_1.z.strictObject({
64
+ ...(0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
65
+ firstName: true,
66
+ lastName: true
67
+ }).shape
68
+ }),
69
+ stage: v4_1.z.string()
70
+ })
71
+ .optional()
72
+ })
73
+ .optional()
74
+ });
75
+ exports.PublicAccountApplicationSelectSchema = v4_1.z.strictObject({
76
+ client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
77
+ .pick({
78
+ name: true
79
+ })
80
+ .optional(),
81
+ position: (0, drizzle_zod_1.createSelectSchema)(core_1.position).pick({
82
+ name: true
83
+ }),
84
+ candidacy: {
85
+ stage: v4_1.z.string()
86
+ }
87
+ });
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/account/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAA+D;AAC/D,+BAA0B;AAC1B,0CAMuB;AAEvB,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IACvE,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AAEW,QAAA,yBAAyB,GAAG,MAAC,CAAC,YAAY,CAAC;IACtD,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EAAE,6BAAqB;QAChC,QAAQ,EAAE,4BAAoB;QAC9B,KAAK,EAAE,2BAAmB;QAC1B,KAAK,EAAE,mBAAW;KACnB,CAAC,CAAC,IAAI,CAAC;QACN,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,iCAAiC,GAAG,MAAC,CAAC,YAAY,CAAC;IAC9D,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;QACnC,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC,KAAK;IACR,MAAM,EAAE,MAAC;SACN,YAAY,CAAC;QACZ,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;YACjC,SAAS,EAAE,IAAI;Y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AI,CAAC;QAC1C,IAAI,EAAE,IAAI;KACX,CAAC;IACF,SAAS,EAAE;QACT,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;KAClB;CACF,CAAC,CAAA","sourcesContent":["import { createSelectSchema, createUpdateSchema } from 'drizzle-zod'\nimport { client, person, position, referral } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n ListResponse,\n OptionalPhoneSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicAccountSelectSchema = createSelectSchema(person).pick({\n idNano: true,\n firstName: true,\n lastName: true,\n email: true,\n phone: true\n})\n\nexport const PublicAccountUpdateSchema = z.strictObject({\n ...createUpdateSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: OptionalPhoneSchema,\n email: EmailSchema\n }).pick({\n firstName: true,\n lastName: true,\n phone: true,\n email: true\n }).shape\n})\n\nexport const PublicAccountReferralSelectSchema = z.strictObject({\n ...createSelectSchema(referral).pick({\n referralType: true,\n createdAt: true\n }).shape,\n person: z\n .strictObject({\n ...createSelectSchema(person).pick({\n firstName: true,\n lastName: true\n }).shape,\n wasHired: z.boolean().optional()\n })\n .optional(),\n client: z\n .strictObject({\n ...createSelectSchema(client).pick({\n name: true\n }).shape,\n hasHired: z.boolean().optional()\n })\n .optional(),\n position: z\n .strictObject({\n ...createSelectSchema(position).pick({\n name: true\n }).shape,\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .optional(),\n candidacy: z\n .strictObject({\n person: z.strictObject({\n ...createSelectSchema(person).pick({\n firstName: true,\n lastName: true\n }).shape\n }),\n stage: z.string()\n })\n .optional()\n })\n .optional()\n})\n\nexport const PublicAccountApplicationSelectSchema = z.strictObject({\n client: createSelectSchema(client)\n .pick({\n name: true\n })\n .optional(),\n position: createSelectSchema(position).pick({\n name: true\n }),\n candidacy: {\n stage: z.string()\n }\n})\n\n//// types\n\nexport type PublicAccountResult = z.infer<typeof PublicAccountSelectSchema>\n\nexport type PublicAccountUpdateInput = z.infer<typeof PublicAccountUpdateSchema>\n\nexport type PublicAccountReferralListResult = ListResponse<\n z.infer<typeof PublicAccountReferralSelectSchema>\n>\n\nexport type PublicAccountApplicationListResult = ListResponse<\n z.infer<typeof PublicAccountApplicationSelectSchema>\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.232",
3
+ "version": "0.2.234",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",