@the-inkwell/shared 0.2.237 → 0.2.238

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.
@@ -2,8 +2,6 @@ import { z } from 'zod/v4';
2
2
  export declare const AdminEmbeddingCreateSchema: z.ZodObject<{
3
3
  text: z.ZodString;
4
4
  }, z.core.$strip>;
5
- export declare const AdminEmbeddingCreateResultSchema: z.ZodObject<{
6
- embedding: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
7
- }, z.core.$strip>;
5
+ export declare const AdminEmbeddingCreateResultSchema: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
8
6
  export type AdminEmbeddingCreateInput = z.infer<typeof AdminEmbeddingCreateSchema>;
9
7
  export type AdminEmbeddingCreateResult = z.infer<typeof AdminEmbeddingCreateResultSchema>;
@@ -6,7 +6,5 @@ const v4_1 = require("zod/v4");
6
6
  exports.AdminEmbeddingCreateSchema = v4_1.z.object({
7
7
  text: v4_1.z.string()
8
8
  });
9
- exports.AdminEmbeddingCreateResultSchema = v4_1.z.object({
10
- embedding: v4_1.z.array(v4_1.z.number()).nullable()
11
- });
9
+ exports.AdminEmbeddingCreateResultSchema = v4_1.z.array(v4_1.z.number()).nullable();
12
10
  //# sourceMappingURL=index.js.map
@@ -1 +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"]}
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,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,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.array(z.number()).nullable()\n\n//// types\n\nexport type AdminEmbeddingCreateInput = z.infer<\n typeof AdminEmbeddingCreateSchema\n>\nexport type AdminEmbeddingCreateResult = z.infer<\n typeof AdminEmbeddingCreateResultSchema\n>\n"]}
@@ -26,85 +26,121 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
26
26
  desc: "desc";
27
27
  }>;
28
28
  }, z.core.$strip>>;
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
- value: z.ZodArray<z.ZodNumber>;
54
- }, z.core.$strip>]>, z.ZodObject<{
55
- target: z.ZodEnum<{
56
- person: "person";
57
- referredPersonOrPosition: "referredPersonOrPosition";
58
- }>;
59
- name: z.ZodLiteral<"location">;
60
- value: z.ZodObject<{
61
- name: z.ZodString;
62
- lat: z.ZodNumber;
63
- lon: z.ZodNumber;
64
- radiusInMiles: z.ZodNumber;
65
- }, z.core.$strip>;
66
- }, 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
+ embedding: number[];
40
+ }[];
41
+ companies?: {
42
+ name: string;
43
+ embedding: number[];
44
+ }[];
45
+ schools?: {
46
+ name: string;
47
+ embedding: number[];
48
+ }[];
49
+ locations?: {
50
+ name: string;
51
+ lat: number;
52
+ lon: number;
53
+ radiusInMiles: number;
54
+ }[];
55
+ }, {
56
+ industries?: string[];
57
+ jobFunctions?: string[];
58
+ skills?: string[];
59
+ tags?: string[];
60
+ networks?: string[];
61
+ professionalEvents?: string[];
62
+ titles?: {
63
+ name: string;
64
+ embedding: number[];
65
+ }[];
66
+ companies?: {
67
+ name: string;
68
+ embedding: number[];
69
+ }[];
70
+ schools?: {
71
+ name: string;
72
+ embedding: number[];
73
+ }[];
74
+ locations?: {
75
+ name: string;
76
+ lat: number;
77
+ lon: number;
78
+ radiusInMiles: number;
79
+ }[];
80
+ }>>;
81
+ }, {
82
+ out: {};
83
+ in: {};
84
+ }>;
67
85
  }, z.core.$strip>;
68
86
  export declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
69
87
  filter: z.ZodObject<{
70
- criteria: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
71
- target: z.ZodEnum<{
72
- person: "person";
73
- referredPersonOrPosition: "referredPersonOrPosition";
74
- }>;
75
- name: z.ZodEnum<{
76
- network: "network";
77
- industry: "industry";
78
- jobFunction: "jobFunction";
79
- professionalEvent: "professionalEvent";
80
- skill: "skill";
81
- tag: "tag";
82
- }>;
83
- value: z.ZodString;
84
- }, z.core.$strip>, z.ZodObject<{
85
- target: z.ZodEnum<{
86
- person: "person";
87
- referredPersonOrPosition: "referredPersonOrPosition";
88
- }>;
89
- name: z.ZodEnum<{
90
- schoolEmbedding: "schoolEmbedding";
91
- companyEmbedding: "companyEmbedding";
92
- titleEmbedding: "titleEmbedding";
93
- }>;
94
- value: z.ZodArray<z.ZodNumber>;
95
- }, z.core.$strip>]>, z.ZodObject<{
96
- target: z.ZodEnum<{
97
- person: "person";
98
- referredPersonOrPosition: "referredPersonOrPosition";
99
- }>;
100
- name: z.ZodLiteral<"location">;
101
- value: z.ZodObject<{
102
- name: z.ZodString;
103
- lat: z.ZodNumber;
104
- lon: z.ZodNumber;
105
- radiusInMiles: z.ZodNumber;
106
- }, z.core.$strip>;
107
- }, z.core.$strip>]>>;
88
+ criteria: z.ZodArray<z.ZodObject<{
89
+ matchFilters: z.ZodNullable<z.ZodType<{
90
+ industries?: string[];
91
+ jobFunctions?: string[];
92
+ skills?: string[];
93
+ tags?: string[];
94
+ networks?: string[];
95
+ professionalEvents?: string[];
96
+ titles?: {
97
+ name: string;
98
+ embedding: number[];
99
+ }[];
100
+ companies?: {
101
+ name: string;
102
+ embedding: number[];
103
+ }[];
104
+ schools?: {
105
+ name: string;
106
+ embedding: number[];
107
+ }[];
108
+ locations?: {
109
+ name: string;
110
+ lat: number;
111
+ lon: number;
112
+ radiusInMiles: number;
113
+ }[];
114
+ }, {
115
+ industries?: string[];
116
+ jobFunctions?: string[];
117
+ skills?: string[];
118
+ tags?: string[];
119
+ networks?: string[];
120
+ professionalEvents?: string[];
121
+ titles?: {
122
+ name: string;
123
+ embedding: number[];
124
+ }[];
125
+ companies?: {
126
+ name: string;
127
+ embedding: number[];
128
+ }[];
129
+ schools?: {
130
+ name: string;
131
+ embedding: number[];
132
+ }[];
133
+ locations?: {
134
+ name: string;
135
+ lat: number;
136
+ lon: number;
137
+ radiusInMiles: number;
138
+ }[];
139
+ }>>;
140
+ }, {
141
+ out: {};
142
+ in: {};
143
+ }>>;
108
144
  includedPersonIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
109
145
  excludedPersonIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
146
  }, z.core.$strip>;
@@ -19,42 +19,9 @@ exports.AdminMatchPreviewMetaSelectSchema = v4_1.z.object({
19
19
  emailCount: v4_1.z.number(),
20
20
  smsCount: v4_1.z.number()
21
21
  });
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
- value: v4_1.z.array(v4_1.z.number())
46
- }))
47
- .or(v4_1.z.object({
48
- // location field
49
- target: AdminMatchListPreviewTargetSchema,
50
- name: v4_1.z.literal('location'),
51
- value: v4_1.z.object({
52
- name: v4_1.z.string(),
53
- lat: v4_1.z.number(),
54
- lon: v4_1.z.number(),
55
- radiusInMiles: v4_1.z.number()
56
- })
57
- }));
22
+ const AdminMatchListPreviewFilterSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.campaign).pick({
23
+ matchFilters: true
24
+ });
58
25
  exports.AdminMatchListPreviewQuerySchema = utils_1.ListQuerySchema.extend({
59
26
  filter: AdminMatchListPreviewFilterSchema
60
27
  });
@@ -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;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,MAAC,CAAC,IAAI,CAAC;IAC/C,QAAQ;IACR,0BAA0B;CAC3B,CAAC,CAAA;AAEF,MAAM,iCAAiC,GAAG,MAAC;KACxC,MAAM,CAAC;IACN,YAAY;IACZ,MAAM,EAAE,iCAAiC;IACzC,IAAI,EAAE,MAAC,CAAC,IAAI,CAAC;QACX,UAAU;QACV,aAAa;QACb,OAAO;QACP,KAAK;QACL,SAAS;QACT,mBAAmB;KACpB,CAAC;IACF,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACD,EAAE;AACD,mBAAmB;AACnB,MAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,iCAAiC;IACzC,IAAI,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IACvE,KAAK,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC;CAC3B,CAAC,CACH;KACA,EAAE,CACD,MAAC,CAAC,MAAM,CAAC;IACP,iBAAiB;IACjB,MAAM,EAAE,iCAAiC;IACzC,IAAI,EAAE,MAAC,CAAC,OAAO,CAAC,UAAU,CAAC;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 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,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.237",
3
+ "version": "0.2.238",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",