@the-inkwell/shared 0.2.239 → 0.2.241

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.
@@ -26,109 +26,83 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
26
26
  desc: "desc";
27
27
  }>;
28
28
  }, z.core.$strip>>;
29
- filter: z.ZodObject<{
30
- matchFilters: z.ZodNullable<z.ZodType<{
31
- industries?: string[];
32
- jobFunctions?: string[];
33
- skills?: string[];
34
- tags?: string[];
35
- networks?: string[];
36
- professionalEvents?: string[];
37
- titles?: {
38
- name: string;
39
- }[];
40
- companies?: {
41
- name: string;
42
- }[];
43
- schools?: {
44
- name: string;
45
- }[];
46
- locations?: {
47
- name: string;
48
- lat: number;
49
- lon: number;
50
- radiusInMiles: number;
51
- }[];
52
- }, {
53
- industries?: string[];
54
- jobFunctions?: string[];
55
- skills?: string[];
56
- tags?: string[];
57
- networks?: string[];
58
- professionalEvents?: string[];
59
- titles?: {
60
- name: string;
61
- }[];
62
- companies?: {
63
- name: string;
64
- }[];
65
- schools?: {
66
- name: string;
67
- }[];
68
- locations?: {
69
- name: string;
70
- lat: number;
71
- lon: number;
72
- radiusInMiles: number;
73
- }[];
74
- }>>;
75
- }, {
76
- out: {};
77
- in: {};
78
- }>;
29
+ filter: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
30
+ target: z.ZodEnum<{
31
+ person: "person";
32
+ referredPersonOrPosition: "referredPersonOrPosition";
33
+ }>;
34
+ name: z.ZodEnum<{
35
+ network: "network";
36
+ industry: "industry";
37
+ jobFunction: "jobFunction";
38
+ professionalEvent: "professionalEvent";
39
+ skill: "skill";
40
+ tag: "tag";
41
+ }>;
42
+ value: z.ZodString;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ target: z.ZodEnum<{
45
+ person: "person";
46
+ referredPersonOrPosition: "referredPersonOrPosition";
47
+ }>;
48
+ name: z.ZodEnum<{
49
+ schoolEmbedding: "schoolEmbedding";
50
+ companyEmbedding: "companyEmbedding";
51
+ titleEmbedding: "titleEmbedding";
52
+ }>;
53
+ }, z.core.$strip>]>, z.ZodObject<{
54
+ target: z.ZodEnum<{
55
+ person: "person";
56
+ referredPersonOrPosition: "referredPersonOrPosition";
57
+ }>;
58
+ name: z.ZodLiteral<"location">;
59
+ value: z.ZodObject<{
60
+ name: z.ZodString;
61
+ lat: z.ZodNumber;
62
+ lon: z.ZodNumber;
63
+ radiusInMiles: z.ZodNumber;
64
+ }, z.core.$strip>;
65
+ }, z.core.$strip>]>;
79
66
  }, z.core.$strip>;
80
67
  export declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
81
68
  filter: z.ZodObject<{
82
- criteria: z.ZodArray<z.ZodObject<{
83
- matchFilters: z.ZodNullable<z.ZodType<{
84
- industries?: string[];
85
- jobFunctions?: string[];
86
- skills?: string[];
87
- tags?: string[];
88
- networks?: string[];
89
- professionalEvents?: string[];
90
- titles?: {
91
- name: string;
92
- }[];
93
- companies?: {
94
- name: string;
95
- }[];
96
- schools?: {
97
- name: string;
98
- }[];
99
- locations?: {
100
- name: string;
101
- lat: number;
102
- lon: number;
103
- radiusInMiles: number;
104
- }[];
105
- }, {
106
- industries?: string[];
107
- jobFunctions?: string[];
108
- skills?: string[];
109
- tags?: string[];
110
- networks?: string[];
111
- professionalEvents?: string[];
112
- titles?: {
113
- name: string;
114
- }[];
115
- companies?: {
116
- name: string;
117
- }[];
118
- schools?: {
119
- name: string;
120
- }[];
121
- locations?: {
122
- name: string;
123
- lat: number;
124
- lon: number;
125
- radiusInMiles: number;
126
- }[];
127
- }>>;
128
- }, {
129
- out: {};
130
- in: {};
131
- }>>;
69
+ criteria: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
70
+ target: z.ZodEnum<{
71
+ person: "person";
72
+ referredPersonOrPosition: "referredPersonOrPosition";
73
+ }>;
74
+ name: z.ZodEnum<{
75
+ network: "network";
76
+ industry: "industry";
77
+ jobFunction: "jobFunction";
78
+ professionalEvent: "professionalEvent";
79
+ skill: "skill";
80
+ tag: "tag";
81
+ }>;
82
+ value: z.ZodString;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ target: z.ZodEnum<{
85
+ person: "person";
86
+ referredPersonOrPosition: "referredPersonOrPosition";
87
+ }>;
88
+ name: z.ZodEnum<{
89
+ schoolEmbedding: "schoolEmbedding";
90
+ companyEmbedding: "companyEmbedding";
91
+ titleEmbedding: "titleEmbedding";
92
+ }>;
93
+ }, z.core.$strip>]>, z.ZodObject<{
94
+ target: z.ZodEnum<{
95
+ person: "person";
96
+ referredPersonOrPosition: "referredPersonOrPosition";
97
+ }>;
98
+ name: z.ZodLiteral<"location">;
99
+ value: z.ZodObject<{
100
+ name: z.ZodString;
101
+ lat: z.ZodNumber;
102
+ lon: z.ZodNumber;
103
+ radiusInMiles: z.ZodNumber;
104
+ }, z.core.$strip>;
105
+ }, z.core.$strip>]>>;
132
106
  includedPersonIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
107
  excludedPersonIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
108
  }, z.core.$strip>;
@@ -19,9 +19,41 @@ exports.AdminMatchPreviewMetaSelectSchema = v4_1.z.object({
19
19
  emailCount: v4_1.z.number(),
20
20
  smsCount: v4_1.z.number()
21
21
  });
22
- const AdminMatchListPreviewFilterSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.campaign).pick({
23
- matchFilters: true
24
- });
22
+ const AdminMatchListPreviewTargetSchema = v4_1.z.enum([
23
+ 'person',
24
+ 'referredPersonOrPosition'
25
+ ]);
26
+ const AdminMatchListPreviewFilterSchema = v4_1.z
27
+ .object({
28
+ // id fields
29
+ target: AdminMatchListPreviewTargetSchema,
30
+ name: v4_1.z.enum([
31
+ 'industry',
32
+ 'jobFunction',
33
+ 'skill',
34
+ 'tag',
35
+ 'network',
36
+ 'professionalEvent'
37
+ ]),
38
+ value: v4_1.z.string()
39
+ })
40
+ .or(
41
+ // embedding fields
42
+ v4_1.z.object({
43
+ target: AdminMatchListPreviewTargetSchema,
44
+ name: v4_1.z.enum(['titleEmbedding', 'schoolEmbedding', 'companyEmbedding'])
45
+ }))
46
+ .or(v4_1.z.object({
47
+ // location field
48
+ target: AdminMatchListPreviewTargetSchema,
49
+ name: v4_1.z.literal('location'),
50
+ value: v4_1.z.object({
51
+ name: v4_1.z.string(),
52
+ lat: v4_1.z.number(),
53
+ lon: v4_1.z.number(),
54
+ radiusInMiles: v4_1.z.number()
55
+ })
56
+ }));
25
57
  exports.AdminMatchListPreviewQuerySchema = utils_1.ListQuerySchema.extend({
26
58
  filter: AdminMatchListPreviewFilterSchema
27
59
  });
@@ -1 +1 @@
1
- {"version":3,"file":"previews.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/previews.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAA6C;AAC7C,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,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAEF,MAAM,iCAAiC,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;IAC1E,YAAY,EAAE,IAAI;CACnB,CAAC,CAAA;AACW,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 { campaign, 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 AdminMatchListPreviewFilterSchema = createSelectSchema(campaign).pick({\n matchFilters: true\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":"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AC;IAC3B,KAAK,EAAE,MAAC,CAAC,MAAM,CAAC;QACd,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 ]),\n value: z.string()\n })\n .or(\n // embedding fields\n z.object({\n target: AdminMatchListPreviewTargetSchema,\n name: z.enum(['titleEmbedding', 'schoolEmbedding', 'companyEmbedding'])\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.239",
3
+ "version": "0.2.241",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",