@the-inkwell/shared 0.2.225 → 0.2.226
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.
|
@@ -1,149 +1,20 @@
|
|
|
1
1
|
import { type ListResponse } from '../../../utils';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
export declare const AdminMatchPreviewSelectSchema: z.ZodObject<{
|
|
4
|
-
matches: z.ZodObject<{
|
|
5
|
-
field: z.ZodEnum<{
|
|
6
|
-
positionId: "positionId";
|
|
7
|
-
referralId: "referralId";
|
|
8
|
-
companyEmbedding: "companyEmbedding";
|
|
9
|
-
titleEmbedding: "titleEmbedding";
|
|
10
|
-
locations: "locations";
|
|
11
|
-
excludedPersons: "excludedPersons";
|
|
12
|
-
includedPersons: "includedPersons";
|
|
13
|
-
personEmail: "personEmail";
|
|
14
|
-
personFullName: "personFullName";
|
|
15
|
-
personLinkedInUrl: "personLinkedInUrl";
|
|
16
|
-
personPhone: "personPhone";
|
|
17
|
-
personCity: "personCity";
|
|
18
|
-
personState: "personState";
|
|
19
|
-
personCountry: "personCountry";
|
|
20
|
-
personPostalCode: "personPostalCode";
|
|
21
|
-
personLat: "personLat";
|
|
22
|
-
personLon: "personLon";
|
|
23
|
-
referralSource: "referralSource";
|
|
24
|
-
positionName: "positionName";
|
|
25
|
-
positionCity: "positionCity";
|
|
26
|
-
positionState: "positionState";
|
|
27
|
-
positionCountry: "positionCountry";
|
|
28
|
-
positionEmploymentType: "positionEmploymentType";
|
|
29
|
-
positionIndustryId: "positionIndustryId";
|
|
30
|
-
positionJobFunctionId: "positionJobFunctionId";
|
|
31
|
-
candidacyStage: "candidacyStage";
|
|
32
|
-
referredPersonEmail: "referredPersonEmail";
|
|
33
|
-
referredPersonFirstName: "referredPersonFirstName";
|
|
34
|
-
referredPersonLastName: "referredPersonLastName";
|
|
35
|
-
referredPersonFullName: "referredPersonFullName";
|
|
36
|
-
referredPersonCity: "referredPersonCity";
|
|
37
|
-
referredPersonState: "referredPersonState";
|
|
38
|
-
referredPersonCountry: "referredPersonCountry";
|
|
39
|
-
referredPersonPostalCode: "referredPersonPostalCode";
|
|
40
|
-
referredPersonLat: "referredPersonLat";
|
|
41
|
-
referredPersonLon: "referredPersonLon";
|
|
42
|
-
referredPersonLinkedInUrl: "referredPersonLinkedInUrl";
|
|
43
|
-
referralPayout: "referralPayout";
|
|
44
|
-
personSkills: "personSkills";
|
|
45
|
-
personNetworks: "personNetworks";
|
|
46
|
-
personEvents: "personEvents";
|
|
47
|
-
personTags: "personTags";
|
|
48
|
-
personSchools: "personSchools";
|
|
49
|
-
personIndustries: "personIndustries";
|
|
50
|
-
personJobFunctions: "personJobFunctions";
|
|
51
|
-
personTitles: "personTitles";
|
|
52
|
-
referredPersonSkills: "referredPersonSkills";
|
|
53
|
-
referredPersonNetworks: "referredPersonNetworks";
|
|
54
|
-
referredPersonEvents: "referredPersonEvents";
|
|
55
|
-
referredPersonTags: "referredPersonTags";
|
|
56
|
-
referredPersonSchools: "referredPersonSchools";
|
|
57
|
-
referredPersonIndustries: "referredPersonIndustries";
|
|
58
|
-
referredPersonJobFunctions: "referredPersonJobFunctions";
|
|
59
|
-
referredPersonTitles: "referredPersonTitles";
|
|
60
|
-
referredIndustries: "referredIndustries";
|
|
61
|
-
referredJobFunctions: "referredJobFunctions";
|
|
62
|
-
}>;
|
|
63
|
-
matches: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
64
|
-
id: z.ZodString;
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
-
city: z.ZodString;
|
|
68
|
-
state: z.ZodString;
|
|
69
|
-
lat: z.ZodNumber;
|
|
70
|
-
lon: z.ZodNumber;
|
|
71
|
-
radiusInMiles: z.ZodNumber;
|
|
72
|
-
}, z.core.$strip>]>>;
|
|
73
|
-
}, z.core.$strip>;
|
|
74
4
|
email: z.ZodString;
|
|
75
5
|
id: z.ZodUUID;
|
|
76
6
|
fullName: z.ZodNullable<z.ZodString>;
|
|
77
7
|
phone: z.ZodNullable<z.ZodString>;
|
|
8
|
+
emailIsOptedOut: z.ZodBoolean;
|
|
9
|
+
smsIsOptedOut: z.ZodBoolean;
|
|
78
10
|
photoUri: z.ZodNullable<z.ZodString>;
|
|
79
|
-
},
|
|
11
|
+
}, {
|
|
12
|
+
out: {};
|
|
13
|
+
in: {};
|
|
14
|
+
}>;
|
|
80
15
|
export declare const AdminMatchPreviewMetaSelectSchema: z.ZodObject<{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
referralId: "referralId";
|
|
84
|
-
companyEmbedding: "companyEmbedding";
|
|
85
|
-
titleEmbedding: "titleEmbedding";
|
|
86
|
-
locations: "locations";
|
|
87
|
-
excludedPersons: "excludedPersons";
|
|
88
|
-
includedPersons: "includedPersons";
|
|
89
|
-
personEmail: "personEmail";
|
|
90
|
-
personFullName: "personFullName";
|
|
91
|
-
personLinkedInUrl: "personLinkedInUrl";
|
|
92
|
-
personPhone: "personPhone";
|
|
93
|
-
personCity: "personCity";
|
|
94
|
-
personState: "personState";
|
|
95
|
-
personCountry: "personCountry";
|
|
96
|
-
personPostalCode: "personPostalCode";
|
|
97
|
-
personLat: "personLat";
|
|
98
|
-
personLon: "personLon";
|
|
99
|
-
referralSource: "referralSource";
|
|
100
|
-
positionName: "positionName";
|
|
101
|
-
positionCity: "positionCity";
|
|
102
|
-
positionState: "positionState";
|
|
103
|
-
positionCountry: "positionCountry";
|
|
104
|
-
positionEmploymentType: "positionEmploymentType";
|
|
105
|
-
positionIndustryId: "positionIndustryId";
|
|
106
|
-
positionJobFunctionId: "positionJobFunctionId";
|
|
107
|
-
candidacyStage: "candidacyStage";
|
|
108
|
-
referredPersonEmail: "referredPersonEmail";
|
|
109
|
-
referredPersonFirstName: "referredPersonFirstName";
|
|
110
|
-
referredPersonLastName: "referredPersonLastName";
|
|
111
|
-
referredPersonFullName: "referredPersonFullName";
|
|
112
|
-
referredPersonCity: "referredPersonCity";
|
|
113
|
-
referredPersonState: "referredPersonState";
|
|
114
|
-
referredPersonCountry: "referredPersonCountry";
|
|
115
|
-
referredPersonPostalCode: "referredPersonPostalCode";
|
|
116
|
-
referredPersonLat: "referredPersonLat";
|
|
117
|
-
referredPersonLon: "referredPersonLon";
|
|
118
|
-
referredPersonLinkedInUrl: "referredPersonLinkedInUrl";
|
|
119
|
-
referralPayout: "referralPayout";
|
|
120
|
-
personSkills: "personSkills";
|
|
121
|
-
personNetworks: "personNetworks";
|
|
122
|
-
personEvents: "personEvents";
|
|
123
|
-
personTags: "personTags";
|
|
124
|
-
personSchools: "personSchools";
|
|
125
|
-
personIndustries: "personIndustries";
|
|
126
|
-
personJobFunctions: "personJobFunctions";
|
|
127
|
-
personTitles: "personTitles";
|
|
128
|
-
referredPersonSkills: "referredPersonSkills";
|
|
129
|
-
referredPersonNetworks: "referredPersonNetworks";
|
|
130
|
-
referredPersonEvents: "referredPersonEvents";
|
|
131
|
-
referredPersonTags: "referredPersonTags";
|
|
132
|
-
referredPersonSchools: "referredPersonSchools";
|
|
133
|
-
referredPersonIndustries: "referredPersonIndustries";
|
|
134
|
-
referredPersonJobFunctions: "referredPersonJobFunctions";
|
|
135
|
-
referredPersonTitles: "referredPersonTitles";
|
|
136
|
-
referredIndustries: "referredIndustries";
|
|
137
|
-
referredJobFunctions: "referredJobFunctions";
|
|
138
|
-
}>, z.ZodNever]>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
-
personCount: z.ZodNumber;
|
|
140
|
-
referrerCount: z.ZodNumber;
|
|
141
|
-
}, z.core.$strip>>>;
|
|
142
|
-
optOutCounts: z.ZodObject<{
|
|
143
|
-
email: z.ZodNumber;
|
|
144
|
-
sms: z.ZodNumber;
|
|
145
|
-
emailAndSms: z.ZodNumber;
|
|
146
|
-
}, z.core.$strip>;
|
|
16
|
+
emailCount: z.ZodNumber;
|
|
17
|
+
smsCount: z.ZodNumber;
|
|
147
18
|
}, z.core.$strip>;
|
|
148
19
|
export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
|
|
149
20
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -155,143 +26,89 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
|
|
|
155
26
|
desc: "desc";
|
|
156
27
|
}>;
|
|
157
28
|
}, z.core.$strip>>;
|
|
158
|
-
filter: z.ZodObject<{
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
referredPersonState: "referredPersonState";
|
|
193
|
-
referredPersonCountry: "referredPersonCountry";
|
|
194
|
-
referredPersonPostalCode: "referredPersonPostalCode";
|
|
195
|
-
referredPersonLat: "referredPersonLat";
|
|
196
|
-
referredPersonLon: "referredPersonLon";
|
|
197
|
-
referredPersonLinkedInUrl: "referredPersonLinkedInUrl";
|
|
198
|
-
referralPayout: "referralPayout";
|
|
199
|
-
personSkills: "personSkills";
|
|
200
|
-
personNetworks: "personNetworks";
|
|
201
|
-
personEvents: "personEvents";
|
|
202
|
-
personTags: "personTags";
|
|
203
|
-
personSchools: "personSchools";
|
|
204
|
-
personIndustries: "personIndustries";
|
|
205
|
-
personJobFunctions: "personJobFunctions";
|
|
206
|
-
personTitles: "personTitles";
|
|
207
|
-
referredPersonSkills: "referredPersonSkills";
|
|
208
|
-
referredPersonNetworks: "referredPersonNetworks";
|
|
209
|
-
referredPersonEvents: "referredPersonEvents";
|
|
210
|
-
referredPersonTags: "referredPersonTags";
|
|
211
|
-
referredPersonSchools: "referredPersonSchools";
|
|
212
|
-
referredPersonIndustries: "referredPersonIndustries";
|
|
213
|
-
referredPersonJobFunctions: "referredPersonJobFunctions";
|
|
214
|
-
referredPersonTitles: "referredPersonTitles";
|
|
215
|
-
referredIndustries: "referredIndustries";
|
|
216
|
-
referredJobFunctions: "referredJobFunctions";
|
|
217
|
-
}>, z.ZodNever]>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
218
|
-
city: z.ZodString;
|
|
219
|
-
state: z.ZodString;
|
|
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
|
+
includedPerson: "includedPerson";
|
|
42
|
+
excludedPerson: "excludedPerson";
|
|
43
|
+
}>;
|
|
44
|
+
value: z.ZodString;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
target: z.ZodEnum<{
|
|
47
|
+
person: "person";
|
|
48
|
+
referredPersonOrPosition: "referredPersonOrPosition";
|
|
49
|
+
}>;
|
|
50
|
+
name: z.ZodEnum<{
|
|
51
|
+
school: "school";
|
|
52
|
+
jobTitle: "jobTitle";
|
|
53
|
+
}>;
|
|
54
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
56
|
+
target: z.ZodEnum<{
|
|
57
|
+
person: "person";
|
|
58
|
+
referredPersonOrPosition: "referredPersonOrPosition";
|
|
59
|
+
}>;
|
|
60
|
+
name: z.ZodLiteral<"location">;
|
|
61
|
+
value: z.ZodObject<{
|
|
62
|
+
name: z.ZodString;
|
|
220
63
|
lat: z.ZodNumber;
|
|
221
|
-
lon: z.
|
|
64
|
+
lon: z.ZodString;
|
|
222
65
|
radiusInMiles: z.ZodNumber;
|
|
223
|
-
}, z.core.$strip
|
|
224
|
-
}, z.core.$strip>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$strip>]>;
|
|
225
68
|
}, z.core.$strip>;
|
|
226
|
-
|
|
227
|
-
filter: z.ZodObject<{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
referredPersonCountry: "referredPersonCountry";
|
|
262
|
-
referredPersonPostalCode: "referredPersonPostalCode";
|
|
263
|
-
referredPersonLat: "referredPersonLat";
|
|
264
|
-
referredPersonLon: "referredPersonLon";
|
|
265
|
-
referredPersonLinkedInUrl: "referredPersonLinkedInUrl";
|
|
266
|
-
referralPayout: "referralPayout";
|
|
267
|
-
personSkills: "personSkills";
|
|
268
|
-
personNetworks: "personNetworks";
|
|
269
|
-
personEvents: "personEvents";
|
|
270
|
-
personTags: "personTags";
|
|
271
|
-
personSchools: "personSchools";
|
|
272
|
-
personIndustries: "personIndustries";
|
|
273
|
-
personJobFunctions: "personJobFunctions";
|
|
274
|
-
personTitles: "personTitles";
|
|
275
|
-
referredPersonSkills: "referredPersonSkills";
|
|
276
|
-
referredPersonNetworks: "referredPersonNetworks";
|
|
277
|
-
referredPersonEvents: "referredPersonEvents";
|
|
278
|
-
referredPersonTags: "referredPersonTags";
|
|
279
|
-
referredPersonSchools: "referredPersonSchools";
|
|
280
|
-
referredPersonIndustries: "referredPersonIndustries";
|
|
281
|
-
referredPersonJobFunctions: "referredPersonJobFunctions";
|
|
282
|
-
referredPersonTitles: "referredPersonTitles";
|
|
283
|
-
referredIndustries: "referredIndustries";
|
|
284
|
-
referredJobFunctions: "referredJobFunctions";
|
|
285
|
-
}>, z.ZodNever]>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
286
|
-
city: z.ZodString;
|
|
287
|
-
state: z.ZodString;
|
|
69
|
+
declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
|
|
70
|
+
filter: 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
|
+
includedPerson: "includedPerson";
|
|
83
|
+
excludedPerson: "excludedPerson";
|
|
84
|
+
}>;
|
|
85
|
+
value: z.ZodString;
|
|
86
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
+
target: z.ZodEnum<{
|
|
88
|
+
person: "person";
|
|
89
|
+
referredPersonOrPosition: "referredPersonOrPosition";
|
|
90
|
+
}>;
|
|
91
|
+
name: z.ZodEnum<{
|
|
92
|
+
school: "school";
|
|
93
|
+
jobTitle: "jobTitle";
|
|
94
|
+
}>;
|
|
95
|
+
value: z.ZodArray<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
97
|
+
target: z.ZodEnum<{
|
|
98
|
+
person: "person";
|
|
99
|
+
referredPersonOrPosition: "referredPersonOrPosition";
|
|
100
|
+
}>;
|
|
101
|
+
name: z.ZodLiteral<"location">;
|
|
102
|
+
value: z.ZodObject<{
|
|
103
|
+
name: z.ZodString;
|
|
288
104
|
lat: z.ZodNumber;
|
|
289
|
-
lon: z.
|
|
105
|
+
lon: z.ZodString;
|
|
290
106
|
radiusInMiles: z.ZodNumber;
|
|
291
|
-
}, z.core.$strip
|
|
292
|
-
}, z.core.$strip>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
}, z.core.$strip>]>;
|
|
293
109
|
}, z.core.$strip>;
|
|
294
110
|
export type AdminMatchListPreviewQuery = z.infer<typeof AdminMatchListPreviewQuerySchema>;
|
|
295
111
|
export type AdminMatchListPreviewResult = ListResponse<z.infer<typeof AdminMatchPreviewSelectSchema>>;
|
|
296
112
|
export type AdminMatchListPreviewMetaQuery = z.infer<typeof AdminMatchListPreviewMetaQuerySchema>;
|
|
297
113
|
export type AdminMatchListPreviewMetaResult = z.infer<typeof AdminMatchPreviewMetaSelectSchema>;
|
|
114
|
+
export {};
|
|
@@ -1,51 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminMatchListPreviewQuerySchema = exports.AdminMatchPreviewMetaSelectSchema = exports.AdminMatchPreviewSelectSchema = void 0;
|
|
4
4
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const v4_1 = require("zod/v4");
|
|
8
|
-
const utils_2 = require("./utils");
|
|
9
8
|
//// validators
|
|
10
|
-
exports.AdminMatchPreviewSelectSchema =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
matches: v4_1.z.object({
|
|
19
|
-
field: v4_1.z.enum(utils_2.filterFields),
|
|
20
|
-
matches: v4_1.z.array(v4_1.z
|
|
21
|
-
.object({
|
|
22
|
-
id: v4_1.z.string(),
|
|
23
|
-
name: v4_1.z.string()
|
|
24
|
-
})
|
|
25
|
-
.or(utils_2.LocationSchema))
|
|
26
|
-
})
|
|
9
|
+
exports.AdminMatchPreviewSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
10
|
+
id: true,
|
|
11
|
+
fullName: true,
|
|
12
|
+
email: true,
|
|
13
|
+
phone: true,
|
|
14
|
+
photoUri: true,
|
|
15
|
+
smsIsOptedOut: true,
|
|
16
|
+
emailIsOptedOut: true
|
|
27
17
|
});
|
|
28
18
|
exports.AdminMatchPreviewMetaSelectSchema = v4_1.z.object({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
referrerCount: v4_1.z.number()
|
|
32
|
-
}))),
|
|
33
|
-
optOutCounts: v4_1.z.object({
|
|
34
|
-
email: v4_1.z.number(),
|
|
35
|
-
sms: v4_1.z.number(),
|
|
36
|
-
emailAndSms: v4_1.z.number()
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
const AdminMatchListPreviewFilterSchema = v4_1.z.object({
|
|
40
|
-
criteria: v4_1.z.partialRecord(v4_1.z.enum(utils_2.filterFields), v4_1.z.array(v4_1.z.string().or(utils_2.LocationSchema)).optional())
|
|
19
|
+
emailCount: v4_1.z.number(),
|
|
20
|
+
smsCount: v4_1.z.number()
|
|
41
21
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
'includedPerson',
|
|
38
|
+
'excludedPerson'
|
|
39
|
+
]),
|
|
40
|
+
value: v4_1.z.string()
|
|
41
|
+
})
|
|
42
|
+
.or(
|
|
43
|
+
// embedding fields
|
|
44
|
+
v4_1.z.object({
|
|
45
|
+
target: AdminMatchListPreviewTargetSchema,
|
|
46
|
+
name: v4_1.z.enum(['jobTitle', 'school']),
|
|
47
|
+
value: v4_1.z.array(v4_1.z.number())
|
|
48
|
+
}))
|
|
49
|
+
.or(v4_1.z.object({
|
|
50
|
+
// location field
|
|
51
|
+
target: AdminMatchListPreviewTargetSchema,
|
|
52
|
+
name: v4_1.z.literal('location'),
|
|
53
|
+
value: v4_1.z.object({
|
|
54
|
+
name: v4_1.z.string(),
|
|
55
|
+
lat: v4_1.z.number(),
|
|
56
|
+
lon: v4_1.z.string(),
|
|
57
|
+
radiusInMiles: v4_1.z.number()
|
|
46
58
|
})
|
|
59
|
+
}));
|
|
60
|
+
exports.AdminMatchListPreviewQuerySchema = utils_1.ListQuerySchema.extend({
|
|
61
|
+
filter: AdminMatchListPreviewFilterSchema
|
|
47
62
|
});
|
|
48
|
-
|
|
63
|
+
const AdminMatchListPreviewMetaQuerySchema = v4_1.z.object({
|
|
49
64
|
filter: AdminMatchListPreviewFilterSchema
|
|
50
65
|
});
|
|
51
66
|
//# sourceMappingURL=previews.js.map
|
|
@@ -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;
|
|
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;QACnB,gBAAgB;QAChB,gBAAgB;KACjB,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,UAAU,EAAE,QAAQ,CAAC,CAAC;IACpC,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;AACF,MAAM,oCAAoC,GAAG,MAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,iCAAiC;CAC1C,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(['jobTitle', 'school']),\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.string(),\n radiusInMiles: z.number()\n })\n })\n )\nexport const AdminMatchListPreviewQuerySchema = ListQuerySchema.extend({\n filter: AdminMatchListPreviewFilterSchema\n})\nconst AdminMatchListPreviewMetaQuerySchema = z.object({\n filter: AdminMatchListPreviewFilterSchema\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"]}
|