@the-inkwell/shared 0.2.199 → 0.2.200
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.
- package/dist/schema/admin/matches/positions.d.ts +2 -2
- package/dist/schema/admin/matches/positions.js +1 -1
- package/dist/schema/admin/matches/positions.js.map +1 -1
- package/dist/schema/admin/matches/previews.d.ts +6 -6
- package/dist/schema/admin/matches/previews.js +2 -3
- package/dist/schema/admin/matches/previews.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
export declare const AdminMatchPositionFiltersSelectSchema: z.ZodRecord<z.ZodEnum<{
|
|
2
|
+
export declare const AdminMatchPositionFiltersSelectSchema: z.ZodRecord<z.ZodUnion<[z.ZodEnum<{
|
|
3
3
|
excludedPersons: "excludedPersons";
|
|
4
4
|
includedPersons: "includedPersons";
|
|
5
5
|
positionId: "positionId";
|
|
@@ -54,7 +54,7 @@ export declare const AdminMatchPositionFiltersSelectSchema: z.ZodRecord<z.ZodEnu
|
|
|
54
54
|
referredPersonTitles: "referredPersonTitles";
|
|
55
55
|
referredIndustries: "referredIndustries";
|
|
56
56
|
referredJobFunctions: "referredJobFunctions";
|
|
57
|
-
}>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
57
|
+
}>, z.ZodNever]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
58
58
|
city: z.ZodString;
|
|
59
59
|
state: z.ZodString;
|
|
60
60
|
lat: z.ZodNumber;
|
|
@@ -5,7 +5,7 @@ const v4_1 = require("zod/v4");
|
|
|
5
5
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
6
6
|
const core_1 = require("../../core");
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
|
-
exports.AdminMatchPositionFiltersSelectSchema = v4_1.z.
|
|
8
|
+
exports.AdminMatchPositionFiltersSelectSchema = v4_1.z.partialRecord(v4_1.z.enum(utils_1.filterFields), v4_1.z.array(v4_1.z.string().or(utils_1.LocationSchema)));
|
|
9
9
|
exports.AdminMatchPositionMessagesSelectSchema = v4_1.z.object({
|
|
10
10
|
email: v4_1.z
|
|
11
11
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positions.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/positions.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,6CAAgD;AAChD,qCAAqC;AACrC,mCAAsD;AAEzC,QAAA,qCAAqC,GAAG,MAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"positions.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/positions.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,6CAAgD;AAChD,qCAAqC;AACrC,mCAAsD;AAEzC,QAAA,qCAAqC,GAAG,MAAC,CAAC,aAAa,CAClE,MAAC,CAAC,IAAI,CAAC,oBAAY,CAAC,EACpB,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,sBAAc,CAAC,CAAC,CACvC,CAAA;AACY,QAAA,sCAAsC,GAAG,MAAC,CAAC,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAC;SACL,MAAM,CAAC;QACN,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;KACjB,CAAC;SACD,QAAQ,EAAE;IACb,GAAG,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAA;AAEF,MAAM,8BAA8B,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;IACvE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,qCAAqC,GAChD,8BAA8B,CAAA;AACnB,QAAA,sCAAsC,GACjD,8BAA8B,CAAA","sourcesContent":["import { z } from 'zod/v4'\nimport { createSelectSchema } from 'drizzle-zod'\nimport { position } from '../../core'\nimport { filterFields, LocationSchema } from './utils'\n\nexport const AdminMatchPositionFiltersSelectSchema = z.partialRecord(\n z.enum(filterFields),\n z.array(z.string().or(LocationSchema))\n)\nexport const AdminMatchPositionMessagesSelectSchema = z.object({\n email: z\n .object({\n html: z.string(),\n text: z.string()\n })\n .nullable(),\n sms: z.string().nullable()\n})\n\nconst AdminMatchPositionParamsSchema = createSelectSchema(position).pick({\n id: true\n})\nexport const AdminMatchPositionFiltersParamsSchema =\n AdminMatchPositionParamsSchema\nexport const AdminMatchPositionMessagesParamsSchema =\n AdminMatchPositionParamsSchema\n\nexport type AdminMatchPositionFiltersResult = z.infer<\n typeof AdminMatchPositionFiltersSelectSchema\n>\nexport type AdminMatchPositionMessagesResult = z.infer<\n typeof AdminMatchPositionMessagesSelectSchema\n>\n\nexport type AdminMatchPositionFiltersParams = z.infer<\n typeof AdminMatchPositionFiltersParamsSchema\n>\nexport type AdminMatchPositionMessagesParams = z.infer<\n typeof AdminMatchPositionMessagesParamsSchema\n>\n"]}
|
|
@@ -74,7 +74,7 @@ export declare const AdminMatchPreviewSelectSchema: z.ZodObject<{
|
|
|
74
74
|
phone: z.ZodNullable<z.ZodString>;
|
|
75
75
|
}, z.core.$strip>;
|
|
76
76
|
export declare const AdminMatchPreviewMetaSelectSchema: z.ZodObject<{
|
|
77
|
-
filters: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<{
|
|
77
|
+
filters: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodUnion<[z.ZodEnum<{
|
|
78
78
|
excludedPersons: "excludedPersons";
|
|
79
79
|
includedPersons: "includedPersons";
|
|
80
80
|
positionId: "positionId";
|
|
@@ -129,7 +129,7 @@ export declare const AdminMatchPreviewMetaSelectSchema: z.ZodObject<{
|
|
|
129
129
|
referredPersonTitles: "referredPersonTitles";
|
|
130
130
|
referredIndustries: "referredIndustries";
|
|
131
131
|
referredJobFunctions: "referredJobFunctions";
|
|
132
|
-
}>, z.ZodObject<{
|
|
132
|
+
}>, z.ZodNever]>, z.ZodObject<{
|
|
133
133
|
personCount: z.ZodNumber;
|
|
134
134
|
referrerCount: z.ZodNumber;
|
|
135
135
|
}, z.core.$strip>>>;
|
|
@@ -151,7 +151,7 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
|
|
|
151
151
|
}, z.core.$strip>>;
|
|
152
152
|
filter: z.ZodObject<{
|
|
153
153
|
search: z.ZodOptional<z.ZodString>;
|
|
154
|
-
criteria: z.ZodRecord<z.ZodEnum<{
|
|
154
|
+
criteria: z.ZodRecord<z.ZodUnion<[z.ZodEnum<{
|
|
155
155
|
excludedPersons: "excludedPersons";
|
|
156
156
|
includedPersons: "includedPersons";
|
|
157
157
|
positionId: "positionId";
|
|
@@ -206,7 +206,7 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
|
|
|
206
206
|
referredPersonTitles: "referredPersonTitles";
|
|
207
207
|
referredIndustries: "referredIndustries";
|
|
208
208
|
referredJobFunctions: "referredJobFunctions";
|
|
209
|
-
}>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
209
|
+
}>, z.ZodNever]>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
210
210
|
city: z.ZodString;
|
|
211
211
|
state: z.ZodString;
|
|
212
212
|
lat: z.ZodNumber;
|
|
@@ -217,7 +217,7 @@ export declare const AdminMatchListPreviewQuerySchema: z.ZodObject<{
|
|
|
217
217
|
}, z.core.$strip>;
|
|
218
218
|
export declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
|
|
219
219
|
filter: z.ZodObject<{
|
|
220
|
-
criteria: z.ZodRecord<z.ZodEnum<{
|
|
220
|
+
criteria: z.ZodRecord<z.ZodUnion<[z.ZodEnum<{
|
|
221
221
|
excludedPersons: "excludedPersons";
|
|
222
222
|
includedPersons: "includedPersons";
|
|
223
223
|
positionId: "positionId";
|
|
@@ -272,7 +272,7 @@ export declare const AdminMatchListPreviewMetaQuerySchema: z.ZodObject<{
|
|
|
272
272
|
referredPersonTitles: "referredPersonTitles";
|
|
273
273
|
referredIndustries: "referredIndustries";
|
|
274
274
|
referredJobFunctions: "referredJobFunctions";
|
|
275
|
-
}>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
275
|
+
}>, z.ZodNever]>, z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
276
276
|
city: z.ZodString;
|
|
277
277
|
state: z.ZodString;
|
|
278
278
|
lat: z.ZodNumber;
|
|
@@ -24,8 +24,7 @@ exports.AdminMatchPreviewSelectSchema = v4_1.z.object({
|
|
|
24
24
|
})
|
|
25
25
|
});
|
|
26
26
|
exports.AdminMatchPreviewMetaSelectSchema = v4_1.z.object({
|
|
27
|
-
filters: v4_1.z.record(v4_1.z.string(), v4_1.z.
|
|
28
|
-
// location fields -> location:[{}]
|
|
27
|
+
filters: v4_1.z.record(v4_1.z.string(), v4_1.z.partialRecord(v4_1.z.enum(utils_2.filterFields), v4_1.z.object({
|
|
29
28
|
personCount: v4_1.z.number(),
|
|
30
29
|
referrerCount: v4_1.z.number()
|
|
31
30
|
}))),
|
|
@@ -36,7 +35,7 @@ exports.AdminMatchPreviewMetaSelectSchema = v4_1.z.object({
|
|
|
36
35
|
})
|
|
37
36
|
});
|
|
38
37
|
const AdminMatchListPreviewFilterSchema = v4_1.z.object({
|
|
39
|
-
criteria: v4_1.z.
|
|
38
|
+
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())
|
|
40
39
|
});
|
|
41
40
|
exports.AdminMatchListPreviewQuerySchema = utils_1.ListQuerySchema.extend({
|
|
42
41
|
filter: 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;AAC1B,mCAAsD;AAEtD,eAAe;AAEF,QAAA,6BAA6B,GAAG,MAAC,CAAC,MAAM,CAAC;IACpD,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,KAAK;IACR,OAAO,EAAE,MAAC,CAAC,MAAM,CAAC;QAChB,KAAK,EAAE,MAAC,CAAC,IAAI,CAAC,oBAAY,CAAC;QAC3B,OAAO,EAAE,MAAC,CAAC,KAAK,CACd,MAAC;aACE,MAAM,CAAC;YACN,EAAE,EAAE,MAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;SACjB,CAAC;aACD,EAAE,CAAC,sBAAc,CAAC,CACtB;KACF,CAAC;CACH,CAAC,CAAA;AACW,QAAA,iCAAiC,GAAG,MAAC,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,MAAC,CAAC,MAAM,CACf,MAAC,CAAC,MAAM,EAAE,EACV,MAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"previews.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/previews.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AACnC,0CAAmE;AACnE,+BAA0B;AAC1B,mCAAsD;AAEtD,eAAe;AAEF,QAAA,6BAA6B,GAAG,MAAC,CAAC,MAAM,CAAC;IACpD,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,KAAK;IACR,OAAO,EAAE,MAAC,CAAC,MAAM,CAAC;QAChB,KAAK,EAAE,MAAC,CAAC,IAAI,CAA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ACW,QAAA,oCAAoC,GAAG,MAAC,CAAC,MAAM,CAAC;IAC3D,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'\nimport { filterFields, LocationSchema } from './utils'\n\n//// validators\n\nexport const AdminMatchPreviewSelectSchema = z.object({\n ...createSelectSchema(person).pick({\n fullName: true,\n email: true,\n phone: true\n }).shape,\n matches: z.object({\n field: z.enum(filterFields),\n matches: z.array(\n z\n .object({\n id: z.string(),\n name: z.string()\n })\n .or(LocationSchema)\n )\n })\n})\nexport const AdminMatchPreviewMetaSelectSchema = z.object({\n filters: z.record(\n z.string(),\n z.partialRecord(\n z.enum(filterFields),\n z.object({\n personCount: z.number(),\n referrerCount: z.number()\n })\n )\n ),\n optOutCounts: z.object({\n email: z.number(),\n sms: z.number(),\n emailAndSms: z.number()\n })\n})\n\nconst AdminMatchListPreviewFilterSchema = z.object({\n criteria: z.partialRecord(\n z.enum(filterFields),\n z.array(z.string().or(LocationSchema)).optional()\n )\n})\n\nexport const AdminMatchListPreviewQuerySchema = ListQuerySchema.extend({\n filter: z.object({\n ...AdminMatchListPreviewFilterSchema.shape,\n search: z.string().optional()\n })\n})\nexport const 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"]}
|