@the-inkwell/shared 0.2.22 → 0.2.23
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/persons/index.d.ts +36 -37
- package/dist/schema/admin/persons/index.js +6 -2
- package/dist/schema/admin/persons/index.js.map +1 -1
- package/dist/schema/admin/positions/index.d.ts +142 -587
- package/dist/schema/admin/positions/index.js +3 -1
- package/dist/schema/admin/positions/index.js.map +1 -1
- package/dist/schema/admin/websiteLandingPages/index.d.ts +29 -175
- package/dist/schema/admin/websiteLandingPages/index.js +3 -1
- package/dist/schema/admin/websiteLandingPages/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -53,24 +53,16 @@ export declare const AdminPersonExperienceSelectSchema: z.ZodObject<{
|
|
|
53
53
|
in: {};
|
|
54
54
|
}>;
|
|
55
55
|
export declare const AdminPersonCreateSchema: z.ZodObject<{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
resumeUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
resumeText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
resumeData: z.ZodOptional<z.ZodNullable<z.ZodDate | z.ZodType<Buffer<ArrayBufferLike>, unknown> | z.ZodType<any, any> | z.ZodType<any, unknown>>>;
|
|
69
|
-
photoUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
-
isMember: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
71
|
-
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
-
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
73
|
-
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
57
|
+
UNITED_STATES: "UNITED_STATES";
|
|
58
|
+
CANADA: "CANADA";
|
|
59
|
+
}>>>;
|
|
60
|
+
gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
61
|
+
MAN: "MAN";
|
|
62
|
+
WOMAN: "WOMAN";
|
|
63
|
+
NON_BINARY: "NON_BINARY";
|
|
64
|
+
UNDISCLOSED: "UNDISCLOSED";
|
|
65
|
+
}>>>;
|
|
74
66
|
state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
75
67
|
AL: "AL";
|
|
76
68
|
AK: "AK";
|
|
@@ -145,19 +137,37 @@ export declare const AdminPersonCreateSchema: z.ZodObject<{
|
|
|
145
137
|
SK: "SK";
|
|
146
138
|
YT: "YT";
|
|
147
139
|
}>>>;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
additionalEmails: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
154
|
-
additionalPhones: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
140
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
141
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
142
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
143
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
144
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
155
145
|
source: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
156
146
|
NETWORK: "NETWORK";
|
|
157
147
|
WEBSITE: "WEBSITE";
|
|
158
148
|
SOCIAL_MEDIA: "SOCIAL_MEDIA";
|
|
159
149
|
SOURCED: "SOURCED";
|
|
160
150
|
}>>>;
|
|
151
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
153
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
154
|
+
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
|
+
email: z.ZodEmail;
|
|
156
|
+
emailIsVerified: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
linkedInUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
+
phoneIsVerified: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
+
emailIsOptedOut: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
smsIsOptedOut: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
resumeUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
+
resumeText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
+
resumeData: z.ZodOptional<z.ZodNullable<z.ZodDate | z.ZodType<Buffer<ArrayBufferLike>, unknown> | z.ZodType<any, any> | z.ZodType<any, unknown>>>;
|
|
167
|
+
photoUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
168
|
+
isMember: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
169
|
+
additionalEmails: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
170
|
+
additionalPhones: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
161
171
|
sourcePersonId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
162
172
|
websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
173
|
expectedSalary: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -175,22 +185,11 @@ export declare const AdminPersonCreateSchema: z.ZodObject<{
|
|
|
175
185
|
EMAIL: "EMAIL";
|
|
176
186
|
}>>>;
|
|
177
187
|
isOpenToRelocate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
178
|
-
gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
179
|
-
MAN: "MAN";
|
|
180
|
-
WOMAN: "WOMAN";
|
|
181
|
-
NON_BINARY: "NON_BINARY";
|
|
182
|
-
UNDISCLOSED: "UNDISCLOSED";
|
|
183
|
-
}>>>;
|
|
184
188
|
discoveredThrough: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
189
|
deactivatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
186
190
|
lastSignedInAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
187
191
|
signInCount: z.ZodOptional<z.ZodInt>;
|
|
188
|
-
clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
189
192
|
addedAt: z.ZodOptional<z.ZodDate>;
|
|
190
|
-
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
191
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
192
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
193
|
-
email: z.ZodString;
|
|
194
193
|
}, {
|
|
195
194
|
out: {};
|
|
196
195
|
in: {};
|
|
@@ -575,7 +574,7 @@ export declare const AdminPersonUpdateSchema: z.ZodObject<{
|
|
|
575
574
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
576
575
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
577
576
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
578
|
-
email: z.ZodOptional<z.
|
|
577
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
579
578
|
addedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
580
579
|
phone: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodString>>>;
|
|
581
580
|
}, {
|
|
@@ -11,7 +11,7 @@ const v4_1 = require("zod/v4");
|
|
|
11
11
|
const constants_1 = require("../../../constants");
|
|
12
12
|
const phone_1 = __importDefault(require("phone"));
|
|
13
13
|
//// validators
|
|
14
|
-
const emailSchema = v4_1.z.
|
|
14
|
+
const emailSchema = v4_1.z.email().trim().toLowerCase();
|
|
15
15
|
const phoneSchema = v4_1.z
|
|
16
16
|
.string()
|
|
17
17
|
.transform((val) => (0, phone_1.default)(val.trim()).phoneNumber)
|
|
@@ -48,8 +48,12 @@ exports.AdminPersonExperienceSelectSchema = (0, drizzle_zod_1.createSelectSchema
|
|
|
48
48
|
jobFunction: v4_1.z.string().nullable(),
|
|
49
49
|
industry: v4_1.z.string().nullable()
|
|
50
50
|
});
|
|
51
|
-
exports.AdminPersonCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person)
|
|
51
|
+
exports.AdminPersonCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person)
|
|
52
|
+
.extend({
|
|
52
53
|
email: emailSchema
|
|
54
|
+
})
|
|
55
|
+
.omit({
|
|
56
|
+
idNano: true
|
|
53
57
|
});
|
|
54
58
|
exports.AdminPersonSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.person).extend({
|
|
55
59
|
skills: v4_1.z.array((0, drizzle_zod_1.createSelectSchema)(core_1.skill).pick({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/persons/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAIoB;AACpB,qCASmB;AACnB,0CAAmE;AACnE,+BAA0B;AAC1B,kDAG2B;AAC3B,kDAAyB;AAEzB,eAAe;AAEf,MAAM,WAAW,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAA;AAC3D,MAAM,WAAW,GAAG,MAAC;KAClB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,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drizzle-zod'\nimport {\n client,\n education,\n experience,\n industry,\n jobFunction,\n person,\n skill,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\nimport {\n LIST_REQUEST_SORT_DIRECTIONS,\n PERSON_LIST_OPERATORS\n} from '../../../constants'\nimport phone from 'phone'\n\n//// validators\n\nconst emailSchema = z.string().trim().toLowerCase().email()\nconst phoneSchema = z\n .string()\n .transform((val) => phone(val.trim()).phoneNumber)\n .pipe(z.string().startsWith('+'))\n .nullable()\n\nexport const AdminPersonEducationSelectSchema = createSelectSchema(education, {\n field: (schema) => schema.describe('Field of study'),\n graduatedAt: z\n .date()\n .nullable()\n .describe('Graduation date, use June 1 if exact date unknown')\n}).pick({\n id: true,\n degree: true,\n field: true,\n school: true,\n graduatedAt: true\n})\n\nexport const AdminPersonExperienceSelectSchema = createSelectSchema(\n experience,\n {\n startDate: z.date().nullable(),\n endDate: z.date().nullable()\n }\n)\n .pick({\n id: true,\n title: true,\n company: true,\n level: true,\n salary: true,\n startDate: true,\n endDate: true,\n isCurrent: true\n })\n .extend({\n jobFunction: z.string().nullable(),\n industry: z.string().nullable()\n })\n\nexport const AdminPersonCreateSchema = createInsertSchema(person).extend({\n email: emailSchema\n})\nexport const AdminPersonSelectSchema = createSelectSchema(person).extend({\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n }),\n educations: z.array(AdminPersonEducationSelectSchema),\n experiences: z.array(AdminPersonExperienceSelectSchema),\n _referralsCount: z.number().nullable().optional(),\n _referredIndustries: z.array(z.string()).nullable().optional(),\n _referredLocations: z.array(z.string()).nullable().optional(),\n _referredSkills: z.array(z.string()).nullable().optional(),\n _currentTitle: z.string().nullable().optional(),\n _currentEmployer: z.string().nullable().optional(),\n _currentSalary: z.number().nullable().optional(),\n _careerLevel: z.number().nullable().optional(),\n _currentJobFunction: z.string().nullable().optional(),\n _currentIndustry: z.string().nullable().optional(),\n _calculatedIsMember: z.boolean().optional(),\n industries: z.array(\n createSelectSchema(industry).pick({\n id: true,\n name: true,\n slug: true\n })\n ),\n jobFunctions: z.array(\n createSelectSchema(jobFunction).pick({\n id: true,\n name: true,\n slug: true\n })\n )\n})\n\nexport const AdminPersonUpdateSchema = createUpdateSchema(person).extend({\n email: emailSchema.optional(),\n addedAt: z.coerce.date().optional(),\n phone: phoneSchema.optional()\n})\n\nexport const AdminPersonParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonByEmailParamsSchema = AdminPersonSelectSchema.pick({\n email: true\n})\nexport const AdminPersonByPhoneParamsSchema = AdminPersonSelectSchema.pick({\n phone: true\n})\n\nexport const AdminPersonUpdateParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nexport const AdminPersonDeleteParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nconst FilterSchema = z.object({\n field: z.string(),\n isDynamicColumn: z.boolean(),\n operator: z.enum(PERSON_LIST_OPERATORS),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\nconst GeoSchema = z.object({\n operator: z.string(),\n referenceLat: z.number(),\n referenceLon: z.number(),\n radius: z.number()\n})\nconst CustomQuerySchema = z.object({\n custom: z.string(),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\n// TODO - add type\nconst NestedFilterSchema: z.ZodType<any> = z.lazy(() =>\n z.object({\n and: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional(),\n or: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional()\n })\n)\n\nexport const AdminPersonListQuerySchema = ListQuerySchema.extend({\n sort: z\n .array(\n z.object({\n field: z.string(),\n direction: z.enum(LIST_REQUEST_SORT_DIRECTIONS)\n })\n )\n .optional(),\n filter: z\n .union([FilterSchema, GeoSchema, CustomQuerySchema, NestedFilterSchema])\n .optional()\n})\n\nexport const AdminPersonConnectionsParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonConnectionsPersonSchema = AdminPersonSelectSchema.pick({\n id: true,\n email: true,\n fullName: true\n})\nexport const AdminPersonConnectionsResultSchema = z.object({\n sourcedPersons: z.array(AdminPersonConnectionsPersonSchema),\n sourcedBy: AdminPersonConnectionsPersonSchema.nullable(),\n bestPersons: z.array(\n z.object({ bestPerson: AdminPersonConnectionsPersonSchema })\n ),\n bestiedBy: z.array(\n z.object({ bestiedBy: AdminPersonConnectionsPersonSchema })\n ),\n referrals: z.array(\n z.object({\n candidacy: z.object({ person: AdminPersonConnectionsPersonSchema })\n })\n ),\n candidacies: z.array(\n z.object({\n referral: z\n .object({ referrer: AdminPersonConnectionsPersonSchema })\n .nullable()\n })\n )\n})\n\n//// types\n\ntype AdminPerson = z.infer<typeof AdminPersonSelectSchema>\n\nexport type AdminPersonExperienceResult = z.infer<\n typeof AdminPersonExperienceSelectSchema\n>\nexport type AdminPersonEducationResult = z.infer<\n typeof AdminPersonEducationSelectSchema\n>\n\n// detail\nexport type AdminPersonParams = z.infer<typeof AdminPersonParamsSchema>\nexport type AdminPersonByEmailParams = z.infer<\n typeof AdminPersonByEmailParamsSchema\n>\nexport type AdminPersonByPhoneParams = z.infer<\n typeof AdminPersonByPhoneParamsSchema\n>\nexport type AdminPersonResult = AdminPerson\n\n// list\nexport type AdminPersonListQuery = z.infer<typeof AdminPersonListQuerySchema>\nexport type AdminPersonListResult = ListResponse<\n z.infer<typeof AdminPersonSelectSchema>\n>\n\n// create\nexport type AdminPersonCreateInput = z.infer<typeof AdminPersonCreateSchema>\nexport type AdminPersonCreateResult = Pick<AdminPerson, 'id'>\n\n// update\nexport type AdminPersonUpdateParams = z.infer<\n typeof AdminPersonUpdateParamsSchema\n>\nexport type AdminPersonUpdateInput = Partial<AdminPerson>\n\n// delete\nexport type AdminPersonDeleteParams = z.infer<\n typeof AdminPersonDeleteParamsSchema\n>\n\nexport const ResumeParserSchema = AdminPersonSelectSchema.pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n city: true,\n state: true,\n country: true,\n gender: true,\n linkedInUrl: true,\n websiteUrl: true,\n skills: true,\n experiences: true,\n educations: true\n}).extend({\n skills: z.array(z.string()),\n experiences: z.array(\n AdminPersonExperienceSelectSchema.extend({\n jobFunction: z.string().nullable()\n })\n )\n})\n\nexport type AdminPersonResumeParseResult = z.infer<typeof ResumeParserSchema>\n\nexport type AdminPersonConnectionsParams = z.infer<\n typeof AdminPersonConnectionsParamsSchema\n>\nexport type AdminPersonConnectionsPerson = z.infer<\n typeof AdminPersonConnectionsPersonSchema\n>\nexport type AdminPersonConnectionsResult = z.infer<\n typeof AdminPersonConnectionsResultSchema\n>\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/persons/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAIoB;AACpB,qCASmB;AACnB,0CAAmE;AACnE,+BAA0B;AAC1B,kDAG2B;AAC3B,kDAAyB;AAEzB,eAAe;AAEf,MAAM,WAAW,GAAG,MAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;AAClD,MAAM,WAAW,GAAG,MAAC;KAClB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,eAAK,EAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC;KACjD,IAAI,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAChC,QAAQ,EAAE,CAAA;AAEA,QAAA,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,gBAAS,EAAE;IAC5E,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QA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C,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,0CAAkC,EAAE,CAAC;KACpE,CAAC,CACH;IACD,WAAW,EAAE,MAAC,CAAC,KAAK,CAClB,MAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,MAAC;aACR,MAAM,CAAC,EAAE,QAAQ,EAAE,0CAAkC,EAAE,CAAC;aACxD,QAAQ,EAAE;KACd,CAAC,CACH;CACF,CAAC,CAAA;AA4CW,QAAA,kBAAkB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAC7D,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC,MAAM,CAAC;IACR,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAC,CAAC,KAAK,CAClB,yCAAiC,CAAC,MAAM,CAAC;QACvC,WAAW,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH;CACF,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n client,\n education,\n experience,\n industry,\n jobFunction,\n person,\n skill,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\nimport {\n LIST_REQUEST_SORT_DIRECTIONS,\n PERSON_LIST_OPERATORS\n} from '../../../constants'\nimport phone from 'phone'\n\n//// validators\n\nconst emailSchema = z.email().trim().toLowerCase()\nconst phoneSchema = z\n .string()\n .transform((val) => phone(val.trim()).phoneNumber)\n .pipe(z.string().startsWith('+'))\n .nullable()\n\nexport const AdminPersonEducationSelectSchema = createSelectSchema(education, {\n field: (schema) => schema.describe('Field of study'),\n graduatedAt: z\n .date()\n .nullable()\n .describe('Graduation date, use June 1 if exact date unknown')\n}).pick({\n id: true,\n degree: true,\n field: true,\n school: true,\n graduatedAt: true\n})\n\nexport const AdminPersonExperienceSelectSchema = createSelectSchema(\n experience,\n {\n startDate: z.date().nullable(),\n endDate: z.date().nullable()\n }\n)\n .pick({\n id: true,\n title: true,\n company: true,\n level: true,\n salary: true,\n startDate: true,\n endDate: true,\n isCurrent: true\n })\n .extend({\n jobFunction: z.string().nullable(),\n industry: z.string().nullable()\n })\n\nexport const AdminPersonCreateSchema = createInsertSchema(person)\n .extend({\n email: emailSchema\n })\n .omit({\n idNano: true\n })\nexport const AdminPersonSelectSchema = createSelectSchema(person).extend({\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n }),\n educations: z.array(AdminPersonEducationSelectSchema),\n experiences: z.array(AdminPersonExperienceSelectSchema),\n _referralsCount: z.number().nullable().optional(),\n _referredIndustries: z.array(z.string()).nullable().optional(),\n _referredLocations: z.array(z.string()).nullable().optional(),\n _referredSkills: z.array(z.string()).nullable().optional(),\n _currentTitle: z.string().nullable().optional(),\n _currentEmployer: z.string().nullable().optional(),\n _currentSalary: z.number().nullable().optional(),\n _careerLevel: z.number().nullable().optional(),\n _currentJobFunction: z.string().nullable().optional(),\n _currentIndustry: z.string().nullable().optional(),\n _calculatedIsMember: z.boolean().optional(),\n industries: z.array(\n createSelectSchema(industry).pick({\n id: true,\n name: true,\n slug: true\n })\n ),\n jobFunctions: z.array(\n createSelectSchema(jobFunction).pick({\n id: true,\n name: true,\n slug: true\n })\n )\n})\n\nexport const AdminPersonUpdateSchema = createUpdateSchema(person).extend({\n email: emailSchema.optional(),\n addedAt: z.coerce.date().optional(),\n phone: phoneSchema.optional()\n})\n\nexport const AdminPersonParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonByEmailParamsSchema = AdminPersonSelectSchema.pick({\n email: true\n})\nexport const AdminPersonByPhoneParamsSchema = AdminPersonSelectSchema.pick({\n phone: true\n})\n\nexport const AdminPersonUpdateParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nexport const AdminPersonDeleteParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\n\nconst FilterSchema = z.object({\n field: z.string(),\n isDynamicColumn: z.boolean(),\n operator: z.enum(PERSON_LIST_OPERATORS),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\nconst GeoSchema = z.object({\n operator: z.string(),\n referenceLat: z.number(),\n referenceLon: z.number(),\n radius: z.number()\n})\nconst CustomQuerySchema = z.object({\n custom: z.string(),\n value: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])\n})\n// TODO - add type\nconst NestedFilterSchema: z.ZodType<any> = z.lazy(() =>\n z.object({\n and: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional(),\n or: z\n .array(\n z.union([\n FilterSchema,\n GeoSchema,\n CustomQuerySchema,\n NestedFilterSchema\n ])\n )\n .optional()\n })\n)\n\nexport const AdminPersonListQuerySchema = ListQuerySchema.extend({\n sort: z\n .array(\n z.object({\n field: z.string(),\n direction: z.enum(LIST_REQUEST_SORT_DIRECTIONS)\n })\n )\n .optional(),\n filter: z\n .union([FilterSchema, GeoSchema, CustomQuerySchema, NestedFilterSchema])\n .optional()\n})\n\nexport const AdminPersonConnectionsParamsSchema = AdminPersonSelectSchema.pick({\n id: true\n})\nexport const AdminPersonConnectionsPersonSchema = AdminPersonSelectSchema.pick({\n id: true,\n email: true,\n fullName: true\n})\nexport const AdminPersonConnectionsResultSchema = z.object({\n sourcedPersons: z.array(AdminPersonConnectionsPersonSchema),\n sourcedBy: AdminPersonConnectionsPersonSchema.nullable(),\n bestPersons: z.array(\n z.object({ bestPerson: AdminPersonConnectionsPersonSchema })\n ),\n bestiedBy: z.array(\n z.object({ bestiedBy: AdminPersonConnectionsPersonSchema })\n ),\n referrals: z.array(\n z.object({\n candidacy: z.object({ person: AdminPersonConnectionsPersonSchema })\n })\n ),\n candidacies: z.array(\n z.object({\n referral: z\n .object({ referrer: AdminPersonConnectionsPersonSchema })\n .nullable()\n })\n )\n})\n\n//// types\n\ntype AdminPerson = z.infer<typeof AdminPersonSelectSchema>\n\nexport type AdminPersonExperienceResult = z.infer<\n typeof AdminPersonExperienceSelectSchema\n>\nexport type AdminPersonEducationResult = z.infer<\n typeof AdminPersonEducationSelectSchema\n>\n\n// detail\nexport type AdminPersonParams = z.infer<typeof AdminPersonParamsSchema>\nexport type AdminPersonByEmailParams = z.infer<\n typeof AdminPersonByEmailParamsSchema\n>\nexport type AdminPersonByPhoneParams = z.infer<\n typeof AdminPersonByPhoneParamsSchema\n>\nexport type AdminPersonResult = AdminPerson\n\n// list\nexport type AdminPersonListQuery = z.infer<typeof AdminPersonListQuerySchema>\nexport type AdminPersonListResult = ListResponse<\n z.infer<typeof AdminPersonSelectSchema>\n>\n\n// create\nexport type AdminPersonCreateInput = z.infer<typeof AdminPersonCreateSchema>\nexport type AdminPersonCreateResult = Pick<AdminPerson, 'id'>\n\n// update\nexport type AdminPersonUpdateParams = z.infer<\n typeof AdminPersonUpdateParamsSchema\n>\nexport type AdminPersonUpdateInput = Partial<AdminPerson>\n\n// delete\nexport type AdminPersonDeleteParams = z.infer<\n typeof AdminPersonDeleteParamsSchema\n>\n\nexport const ResumeParserSchema = AdminPersonSelectSchema.pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n city: true,\n state: true,\n country: true,\n gender: true,\n linkedInUrl: true,\n websiteUrl: true,\n skills: true,\n experiences: true,\n educations: true\n}).extend({\n skills: z.array(z.string()),\n experiences: z.array(\n AdminPersonExperienceSelectSchema.extend({\n jobFunction: z.string().nullable()\n })\n )\n})\n\nexport type AdminPersonResumeParseResult = z.infer<typeof ResumeParserSchema>\n\nexport type AdminPersonConnectionsParams = z.infer<\n typeof AdminPersonConnectionsParamsSchema\n>\nexport type AdminPersonConnectionsPerson = z.infer<\n typeof AdminPersonConnectionsPersonSchema\n>\nexport type AdminPersonConnectionsResult = z.infer<\n typeof AdminPersonConnectionsResultSchema\n>\n"]}
|
|
@@ -1,592 +1,147 @@
|
|
|
1
1
|
import { type ListResponse } from '../../../utils';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
|
-
export declare const AdminPositionCreateSchema:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
hasDefault: false;
|
|
146
|
-
isPrimaryKey: false;
|
|
147
|
-
isAutoincrement: false;
|
|
148
|
-
hasRuntimeDefault: false;
|
|
149
|
-
enumValues: [string, ...string[]];
|
|
150
|
-
baseColumn: never;
|
|
151
|
-
identity: undefined;
|
|
152
|
-
generated: undefined;
|
|
153
|
-
}, {}, {}>;
|
|
154
|
-
city: import("drizzle-orm/pg-core").PgColumn<{
|
|
155
|
-
name: "city";
|
|
156
|
-
tableName: "positions";
|
|
157
|
-
dataType: "string";
|
|
158
|
-
columnType: "PgText";
|
|
159
|
-
data: string;
|
|
160
|
-
driverParam: string;
|
|
161
|
-
notNull: false;
|
|
162
|
-
hasDefault: false;
|
|
163
|
-
isPrimaryKey: false;
|
|
164
|
-
isAutoincrement: false;
|
|
165
|
-
hasRuntimeDefault: false;
|
|
166
|
-
enumValues: [string, ...string[]];
|
|
167
|
-
baseColumn: never;
|
|
168
|
-
identity: undefined;
|
|
169
|
-
generated: undefined;
|
|
170
|
-
}, {}, {}>;
|
|
171
|
-
state: import("drizzle-orm/pg-core").PgColumn<{
|
|
172
|
-
name: "state";
|
|
173
|
-
tableName: "positions";
|
|
174
|
-
dataType: "string";
|
|
175
|
-
columnType: "PgEnumColumn";
|
|
176
|
-
data: "AL" | "AK" | "AS" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FM" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "AB" | "BC" | "MB" | "NB" | "NL" | "NS" | "NT" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT";
|
|
177
|
-
driverParam: string;
|
|
178
|
-
notNull: false;
|
|
179
|
-
hasDefault: false;
|
|
180
|
-
isPrimaryKey: false;
|
|
181
|
-
isAutoincrement: false;
|
|
182
|
-
hasRuntimeDefault: false;
|
|
183
|
-
enumValues: ["AL" | "AK" | "AS" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FM" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "AB" | "BC" | "MB" | "NB" | "NL" | "NS" | "NT" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT"];
|
|
184
|
-
baseColumn: never;
|
|
185
|
-
identity: undefined;
|
|
186
|
-
generated: undefined;
|
|
187
|
-
}, {}, {}>;
|
|
188
|
-
postalCode: import("drizzle-orm/pg-core").PgColumn<{
|
|
189
|
-
name: "postalCode";
|
|
190
|
-
tableName: "positions";
|
|
191
|
-
dataType: "string";
|
|
192
|
-
columnType: "PgText";
|
|
193
|
-
data: string;
|
|
194
|
-
driverParam: string;
|
|
195
|
-
notNull: false;
|
|
196
|
-
hasDefault: false;
|
|
197
|
-
isPrimaryKey: false;
|
|
198
|
-
isAutoincrement: false;
|
|
199
|
-
hasRuntimeDefault: false;
|
|
200
|
-
enumValues: [string, ...string[]];
|
|
201
|
-
baseColumn: never;
|
|
202
|
-
identity: undefined;
|
|
203
|
-
generated: undefined;
|
|
204
|
-
}, {}, {}>;
|
|
205
|
-
country: import("drizzle-orm/pg-core").PgColumn<{
|
|
206
|
-
name: "country";
|
|
207
|
-
tableName: "positions";
|
|
208
|
-
dataType: "string";
|
|
209
|
-
columnType: "PgEnumColumn";
|
|
210
|
-
data: "UNITED_STATES" | "CANADA";
|
|
211
|
-
driverParam: string;
|
|
212
|
-
notNull: false;
|
|
213
|
-
hasDefault: false;
|
|
214
|
-
isPrimaryKey: false;
|
|
215
|
-
isAutoincrement: false;
|
|
216
|
-
hasRuntimeDefault: false;
|
|
217
|
-
enumValues: ["UNITED_STATES" | "CANADA"];
|
|
218
|
-
baseColumn: never;
|
|
219
|
-
identity: undefined;
|
|
220
|
-
generated: undefined;
|
|
221
|
-
}, {}, {}>;
|
|
222
|
-
employmentType: import("drizzle-orm/pg-core").PgColumn<{
|
|
223
|
-
name: "employmentType";
|
|
224
|
-
tableName: "positions";
|
|
225
|
-
dataType: "string";
|
|
226
|
-
columnType: "PgEnumColumn";
|
|
227
|
-
data: "FULL_TIME" | "PART_TIME";
|
|
228
|
-
driverParam: string;
|
|
229
|
-
notNull: false;
|
|
230
|
-
hasDefault: false;
|
|
231
|
-
isPrimaryKey: false;
|
|
232
|
-
isAutoincrement: false;
|
|
233
|
-
hasRuntimeDefault: false;
|
|
234
|
-
enumValues: ["FULL_TIME" | "PART_TIME"];
|
|
235
|
-
baseColumn: never;
|
|
236
|
-
identity: undefined;
|
|
237
|
-
generated: undefined;
|
|
238
|
-
}, {}, {}>;
|
|
239
|
-
employmentLocationType: import("drizzle-orm/pg-core").PgColumn<{
|
|
240
|
-
name: "employmentLocationType";
|
|
241
|
-
tableName: "positions";
|
|
242
|
-
dataType: "string";
|
|
243
|
-
columnType: "PgEnumColumn";
|
|
244
|
-
data: "REMOTE" | "ONSITE" | "HYBRID";
|
|
245
|
-
driverParam: string;
|
|
246
|
-
notNull: false;
|
|
247
|
-
hasDefault: false;
|
|
248
|
-
isPrimaryKey: false;
|
|
249
|
-
isAutoincrement: false;
|
|
250
|
-
hasRuntimeDefault: false;
|
|
251
|
-
enumValues: ["REMOTE" | "ONSITE" | "HYBRID"];
|
|
252
|
-
baseColumn: never;
|
|
253
|
-
identity: undefined;
|
|
254
|
-
generated: undefined;
|
|
255
|
-
}, {}, {}>;
|
|
256
|
-
location: import("drizzle-orm/pg-core").PgColumn<{
|
|
257
|
-
name: "location";
|
|
258
|
-
tableName: "positions";
|
|
259
|
-
dataType: "string";
|
|
260
|
-
columnType: "PgText";
|
|
261
|
-
data: string;
|
|
262
|
-
driverParam: string;
|
|
263
|
-
notNull: false;
|
|
264
|
-
hasDefault: true;
|
|
265
|
-
isPrimaryKey: false;
|
|
266
|
-
isAutoincrement: false;
|
|
267
|
-
hasRuntimeDefault: false;
|
|
268
|
-
enumValues: [string, ...string[]];
|
|
269
|
-
baseColumn: never;
|
|
270
|
-
identity: undefined;
|
|
271
|
-
generated: {
|
|
272
|
-
type: "always";
|
|
273
|
-
};
|
|
274
|
-
}, {}, {}>;
|
|
275
|
-
lat: import("drizzle-orm/pg-core").PgColumn<{
|
|
276
|
-
name: "lat";
|
|
277
|
-
tableName: "positions";
|
|
278
|
-
dataType: "number";
|
|
279
|
-
columnType: "PgDoublePrecision";
|
|
280
|
-
data: number;
|
|
281
|
-
driverParam: string | number;
|
|
282
|
-
notNull: false;
|
|
283
|
-
hasDefault: false;
|
|
284
|
-
isPrimaryKey: false;
|
|
285
|
-
isAutoincrement: false;
|
|
286
|
-
hasRuntimeDefault: false;
|
|
287
|
-
enumValues: undefined;
|
|
288
|
-
baseColumn: never;
|
|
289
|
-
identity: undefined;
|
|
290
|
-
generated: undefined;
|
|
291
|
-
}, {}, {}>;
|
|
292
|
-
lon: import("drizzle-orm/pg-core").PgColumn<{
|
|
293
|
-
name: "lon";
|
|
294
|
-
tableName: "positions";
|
|
295
|
-
dataType: "number";
|
|
296
|
-
columnType: "PgDoublePrecision";
|
|
297
|
-
data: number;
|
|
298
|
-
driverParam: string | number;
|
|
299
|
-
notNull: false;
|
|
300
|
-
hasDefault: false;
|
|
301
|
-
isPrimaryKey: false;
|
|
302
|
-
isAutoincrement: false;
|
|
303
|
-
hasRuntimeDefault: false;
|
|
304
|
-
enumValues: undefined;
|
|
305
|
-
baseColumn: never;
|
|
306
|
-
identity: undefined;
|
|
307
|
-
generated: undefined;
|
|
308
|
-
}, {}, {}>;
|
|
309
|
-
isHidden: import("drizzle-orm/pg-core").PgColumn<{
|
|
310
|
-
name: "isHidden";
|
|
311
|
-
tableName: "positions";
|
|
312
|
-
dataType: "boolean";
|
|
313
|
-
columnType: "PgBoolean";
|
|
314
|
-
data: boolean;
|
|
315
|
-
driverParam: boolean;
|
|
316
|
-
notNull: true;
|
|
317
|
-
hasDefault: true;
|
|
318
|
-
isPrimaryKey: false;
|
|
319
|
-
isAutoincrement: false;
|
|
320
|
-
hasRuntimeDefault: false;
|
|
321
|
-
enumValues: undefined;
|
|
322
|
-
baseColumn: never;
|
|
323
|
-
identity: undefined;
|
|
324
|
-
generated: undefined;
|
|
325
|
-
}, {}, {}>;
|
|
326
|
-
isHiddenClient: import("drizzle-orm/pg-core").PgColumn<{
|
|
327
|
-
name: "isHiddenClient";
|
|
328
|
-
tableName: "positions";
|
|
329
|
-
dataType: "boolean";
|
|
330
|
-
columnType: "PgBoolean";
|
|
331
|
-
data: boolean;
|
|
332
|
-
driverParam: boolean;
|
|
333
|
-
notNull: true;
|
|
334
|
-
hasDefault: true;
|
|
335
|
-
isPrimaryKey: false;
|
|
336
|
-
isAutoincrement: false;
|
|
337
|
-
hasRuntimeDefault: false;
|
|
338
|
-
enumValues: undefined;
|
|
339
|
-
baseColumn: never;
|
|
340
|
-
identity: undefined;
|
|
341
|
-
generated: undefined;
|
|
342
|
-
}, {}, {}>;
|
|
343
|
-
isPriority: import("drizzle-orm/pg-core").PgColumn<{
|
|
344
|
-
name: "isPriority";
|
|
345
|
-
tableName: "positions";
|
|
346
|
-
dataType: "boolean";
|
|
347
|
-
columnType: "PgBoolean";
|
|
348
|
-
data: boolean;
|
|
349
|
-
driverParam: boolean;
|
|
350
|
-
notNull: true;
|
|
351
|
-
hasDefault: true;
|
|
352
|
-
isPrimaryKey: false;
|
|
353
|
-
isAutoincrement: false;
|
|
354
|
-
hasRuntimeDefault: false;
|
|
355
|
-
enumValues: undefined;
|
|
356
|
-
baseColumn: never;
|
|
357
|
-
identity: undefined;
|
|
358
|
-
generated: undefined;
|
|
359
|
-
}, {}, {}>;
|
|
360
|
-
salaryMin: import("drizzle-orm/pg-core").PgColumn<{
|
|
361
|
-
name: "salaryMin";
|
|
362
|
-
tableName: "positions";
|
|
363
|
-
dataType: "number";
|
|
364
|
-
columnType: "PgInteger";
|
|
365
|
-
data: number;
|
|
366
|
-
driverParam: string | number;
|
|
367
|
-
notNull: false;
|
|
368
|
-
hasDefault: false;
|
|
369
|
-
isPrimaryKey: false;
|
|
370
|
-
isAutoincrement: false;
|
|
371
|
-
hasRuntimeDefault: false;
|
|
372
|
-
enumValues: undefined;
|
|
373
|
-
baseColumn: never;
|
|
374
|
-
identity: undefined;
|
|
375
|
-
generated: undefined;
|
|
376
|
-
}, {}, {}>;
|
|
377
|
-
salaryMax: import("drizzle-orm/pg-core").PgColumn<{
|
|
378
|
-
name: "salaryMax";
|
|
379
|
-
tableName: "positions";
|
|
380
|
-
dataType: "number";
|
|
381
|
-
columnType: "PgInteger";
|
|
382
|
-
data: number;
|
|
383
|
-
driverParam: string | number;
|
|
384
|
-
notNull: false;
|
|
385
|
-
hasDefault: false;
|
|
386
|
-
isPrimaryKey: false;
|
|
387
|
-
isAutoincrement: false;
|
|
388
|
-
hasRuntimeDefault: false;
|
|
389
|
-
enumValues: undefined;
|
|
390
|
-
baseColumn: never;
|
|
391
|
-
identity: undefined;
|
|
392
|
-
generated: undefined;
|
|
393
|
-
}, {}, {}>;
|
|
394
|
-
ratings: import("drizzle-orm/pg-core").PgColumn<{
|
|
395
|
-
name: "ratings";
|
|
396
|
-
tableName: "positions";
|
|
397
|
-
dataType: "json";
|
|
398
|
-
columnType: "PgJsonb";
|
|
399
|
-
data: {
|
|
400
|
-
COMPENSATION: number | null;
|
|
401
|
-
INTEREST: number | null;
|
|
402
|
-
};
|
|
403
|
-
driverParam: unknown;
|
|
404
|
-
notNull: false;
|
|
405
|
-
hasDefault: false;
|
|
406
|
-
isPrimaryKey: false;
|
|
407
|
-
isAutoincrement: false;
|
|
408
|
-
hasRuntimeDefault: false;
|
|
409
|
-
enumValues: undefined;
|
|
410
|
-
baseColumn: never;
|
|
411
|
-
identity: undefined;
|
|
412
|
-
generated: undefined;
|
|
413
|
-
}, {}, {
|
|
414
|
-
$type: {
|
|
415
|
-
COMPENSATION: number | null;
|
|
416
|
-
INTEREST: number | null;
|
|
417
|
-
};
|
|
418
|
-
}>;
|
|
419
|
-
referralPlacementReward: import("drizzle-orm/pg-core").PgColumn<{
|
|
420
|
-
name: "referralPlacementReward";
|
|
421
|
-
tableName: "positions";
|
|
422
|
-
dataType: "number";
|
|
423
|
-
columnType: "PgInteger";
|
|
424
|
-
data: number;
|
|
425
|
-
driverParam: string | number;
|
|
426
|
-
notNull: true;
|
|
427
|
-
hasDefault: true;
|
|
428
|
-
isPrimaryKey: false;
|
|
429
|
-
isAutoincrement: false;
|
|
430
|
-
hasRuntimeDefault: false;
|
|
431
|
-
enumValues: undefined;
|
|
432
|
-
baseColumn: never;
|
|
433
|
-
identity: undefined;
|
|
434
|
-
generated: undefined;
|
|
435
|
-
}, {}, {}>;
|
|
436
|
-
referralInterviewReward: import("drizzle-orm/pg-core").PgColumn<{
|
|
437
|
-
name: "referralInterviewReward";
|
|
438
|
-
tableName: "positions";
|
|
439
|
-
dataType: "number";
|
|
440
|
-
columnType: "PgInteger";
|
|
441
|
-
data: number;
|
|
442
|
-
driverParam: string | number;
|
|
443
|
-
notNull: false;
|
|
444
|
-
hasDefault: true;
|
|
445
|
-
isPrimaryKey: false;
|
|
446
|
-
isAutoincrement: false;
|
|
447
|
-
hasRuntimeDefault: false;
|
|
448
|
-
enumValues: undefined;
|
|
449
|
-
baseColumn: never;
|
|
450
|
-
identity: undefined;
|
|
451
|
-
generated: undefined;
|
|
452
|
-
}, {}, {}>;
|
|
453
|
-
additionalBenefits: import("drizzle-orm/pg-core").PgColumn<{
|
|
454
|
-
name: "additionalBenefits";
|
|
455
|
-
tableName: "positions";
|
|
456
|
-
dataType: "string";
|
|
457
|
-
columnType: "PgText";
|
|
458
|
-
data: string;
|
|
459
|
-
driverParam: string;
|
|
460
|
-
notNull: false;
|
|
461
|
-
hasDefault: false;
|
|
462
|
-
isPrimaryKey: false;
|
|
463
|
-
isAutoincrement: false;
|
|
464
|
-
hasRuntimeDefault: false;
|
|
465
|
-
enumValues: [string, ...string[]];
|
|
466
|
-
baseColumn: never;
|
|
467
|
-
identity: undefined;
|
|
468
|
-
generated: undefined;
|
|
469
|
-
}, {}, {}>;
|
|
470
|
-
clientId: import("drizzle-orm/pg-core").PgColumn<{
|
|
471
|
-
name: "clientId";
|
|
472
|
-
tableName: "positions";
|
|
473
|
-
dataType: "string";
|
|
474
|
-
columnType: "PgUUID";
|
|
475
|
-
data: string;
|
|
476
|
-
driverParam: string;
|
|
477
|
-
notNull: true;
|
|
478
|
-
hasDefault: false;
|
|
479
|
-
isPrimaryKey: false;
|
|
480
|
-
isAutoincrement: false;
|
|
481
|
-
hasRuntimeDefault: false;
|
|
482
|
-
enumValues: undefined;
|
|
483
|
-
baseColumn: never;
|
|
484
|
-
identity: undefined;
|
|
485
|
-
generated: undefined;
|
|
486
|
-
}, {}, {}>;
|
|
487
|
-
closedReason: import("drizzle-orm/pg-core").PgColumn<{
|
|
488
|
-
name: "closedReason";
|
|
489
|
-
tableName: "positions";
|
|
490
|
-
dataType: "string";
|
|
491
|
-
columnType: "PgEnumColumn";
|
|
492
|
-
data: "PLACED" | "CLIENT_FILLED" | "CLIENT_CANCELED" | "INKWELL_CANCELED";
|
|
493
|
-
driverParam: string;
|
|
494
|
-
notNull: false;
|
|
495
|
-
hasDefault: false;
|
|
496
|
-
isPrimaryKey: false;
|
|
497
|
-
isAutoincrement: false;
|
|
498
|
-
hasRuntimeDefault: false;
|
|
499
|
-
enumValues: ["PLACED" | "CLIENT_FILLED" | "CLIENT_CANCELED" | "INKWELL_CANCELED"];
|
|
500
|
-
baseColumn: never;
|
|
501
|
-
identity: undefined;
|
|
502
|
-
generated: undefined;
|
|
503
|
-
}, {}, {}>;
|
|
504
|
-
openedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
505
|
-
name: "openedAt";
|
|
506
|
-
tableName: "positions";
|
|
507
|
-
dataType: "date";
|
|
508
|
-
columnType: "PgTimestamp";
|
|
509
|
-
data: Date;
|
|
510
|
-
driverParam: string;
|
|
511
|
-
notNull: false;
|
|
512
|
-
hasDefault: false;
|
|
513
|
-
isPrimaryKey: false;
|
|
514
|
-
isAutoincrement: false;
|
|
515
|
-
hasRuntimeDefault: false;
|
|
516
|
-
enumValues: undefined;
|
|
517
|
-
baseColumn: never;
|
|
518
|
-
identity: undefined;
|
|
519
|
-
generated: undefined;
|
|
520
|
-
}, {}, {}>;
|
|
521
|
-
closedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
522
|
-
name: "closedAt";
|
|
523
|
-
tableName: "positions";
|
|
524
|
-
dataType: "date";
|
|
525
|
-
columnType: "PgTimestamp";
|
|
526
|
-
data: Date;
|
|
527
|
-
driverParam: string;
|
|
528
|
-
notNull: false;
|
|
529
|
-
hasDefault: false;
|
|
530
|
-
isPrimaryKey: false;
|
|
531
|
-
isAutoincrement: false;
|
|
532
|
-
hasRuntimeDefault: false;
|
|
533
|
-
enumValues: undefined;
|
|
534
|
-
baseColumn: never;
|
|
535
|
-
identity: undefined;
|
|
536
|
-
generated: undefined;
|
|
537
|
-
}, {}, {}>;
|
|
538
|
-
deletedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
539
|
-
name: "deletedAt";
|
|
540
|
-
tableName: "positions";
|
|
541
|
-
dataType: "date";
|
|
542
|
-
columnType: "PgTimestamp";
|
|
543
|
-
data: Date;
|
|
544
|
-
driverParam: string;
|
|
545
|
-
notNull: false;
|
|
546
|
-
hasDefault: false;
|
|
547
|
-
isPrimaryKey: false;
|
|
548
|
-
isAutoincrement: false;
|
|
549
|
-
hasRuntimeDefault: false;
|
|
550
|
-
enumValues: undefined;
|
|
551
|
-
baseColumn: never;
|
|
552
|
-
identity: undefined;
|
|
553
|
-
generated: undefined;
|
|
554
|
-
}, {}, {}>;
|
|
555
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
556
|
-
name: "createdAt";
|
|
557
|
-
tableName: "positions";
|
|
558
|
-
dataType: "date";
|
|
559
|
-
columnType: "PgTimestamp";
|
|
560
|
-
data: Date;
|
|
561
|
-
driverParam: string;
|
|
562
|
-
notNull: true;
|
|
563
|
-
hasDefault: true;
|
|
564
|
-
isPrimaryKey: false;
|
|
565
|
-
isAutoincrement: false;
|
|
566
|
-
hasRuntimeDefault: false;
|
|
567
|
-
enumValues: undefined;
|
|
568
|
-
baseColumn: never;
|
|
569
|
-
identity: undefined;
|
|
570
|
-
generated: undefined;
|
|
571
|
-
}, {}, {}>;
|
|
572
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
573
|
-
name: "updatedAt";
|
|
574
|
-
tableName: "positions";
|
|
575
|
-
dataType: "date";
|
|
576
|
-
columnType: "PgTimestamp";
|
|
577
|
-
data: Date;
|
|
578
|
-
driverParam: string;
|
|
579
|
-
notNull: true;
|
|
580
|
-
hasDefault: true;
|
|
581
|
-
isPrimaryKey: false;
|
|
582
|
-
isAutoincrement: false;
|
|
583
|
-
hasRuntimeDefault: false;
|
|
584
|
-
enumValues: undefined;
|
|
585
|
-
baseColumn: never;
|
|
586
|
-
identity: undefined;
|
|
587
|
-
generated: undefined;
|
|
588
|
-
}, {}, {}>;
|
|
589
|
-
}, undefined, undefined>;
|
|
3
|
+
export declare const AdminPositionCreateSchema: z.ZodObject<{
|
|
4
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
5
|
+
UNITED_STATES: "UNITED_STATES";
|
|
6
|
+
CANADA: "CANADA";
|
|
7
|
+
}>>>;
|
|
8
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
9
|
+
AL: "AL";
|
|
10
|
+
AK: "AK";
|
|
11
|
+
AS: "AS";
|
|
12
|
+
AZ: "AZ";
|
|
13
|
+
AR: "AR";
|
|
14
|
+
CA: "CA";
|
|
15
|
+
CO: "CO";
|
|
16
|
+
CT: "CT";
|
|
17
|
+
DE: "DE";
|
|
18
|
+
DC: "DC";
|
|
19
|
+
FM: "FM";
|
|
20
|
+
FL: "FL";
|
|
21
|
+
GA: "GA";
|
|
22
|
+
GU: "GU";
|
|
23
|
+
HI: "HI";
|
|
24
|
+
ID: "ID";
|
|
25
|
+
IL: "IL";
|
|
26
|
+
IN: "IN";
|
|
27
|
+
IA: "IA";
|
|
28
|
+
KS: "KS";
|
|
29
|
+
KY: "KY";
|
|
30
|
+
LA: "LA";
|
|
31
|
+
ME: "ME";
|
|
32
|
+
MH: "MH";
|
|
33
|
+
MD: "MD";
|
|
34
|
+
MA: "MA";
|
|
35
|
+
MI: "MI";
|
|
36
|
+
MN: "MN";
|
|
37
|
+
MS: "MS";
|
|
38
|
+
MO: "MO";
|
|
39
|
+
MT: "MT";
|
|
40
|
+
NE: "NE";
|
|
41
|
+
NV: "NV";
|
|
42
|
+
NH: "NH";
|
|
43
|
+
NJ: "NJ";
|
|
44
|
+
NM: "NM";
|
|
45
|
+
NY: "NY";
|
|
46
|
+
NC: "NC";
|
|
47
|
+
ND: "ND";
|
|
48
|
+
MP: "MP";
|
|
49
|
+
OH: "OH";
|
|
50
|
+
OK: "OK";
|
|
51
|
+
OR: "OR";
|
|
52
|
+
PW: "PW";
|
|
53
|
+
PA: "PA";
|
|
54
|
+
PR: "PR";
|
|
55
|
+
RI: "RI";
|
|
56
|
+
SC: "SC";
|
|
57
|
+
SD: "SD";
|
|
58
|
+
TN: "TN";
|
|
59
|
+
TX: "TX";
|
|
60
|
+
UT: "UT";
|
|
61
|
+
VT: "VT";
|
|
62
|
+
VI: "VI";
|
|
63
|
+
VA: "VA";
|
|
64
|
+
WA: "WA";
|
|
65
|
+
WV: "WV";
|
|
66
|
+
WI: "WI";
|
|
67
|
+
WY: "WY";
|
|
68
|
+
AB: "AB";
|
|
69
|
+
BC: "BC";
|
|
70
|
+
MB: "MB";
|
|
71
|
+
NB: "NB";
|
|
72
|
+
NL: "NL";
|
|
73
|
+
NS: "NS";
|
|
74
|
+
NT: "NT";
|
|
75
|
+
NU: "NU";
|
|
76
|
+
ON: "ON";
|
|
77
|
+
PE: "PE";
|
|
78
|
+
QC: "QC";
|
|
79
|
+
SK: "SK";
|
|
80
|
+
YT: "YT";
|
|
81
|
+
}>>>;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
84
|
+
clientId: z.ZodUUID;
|
|
85
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
86
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
87
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
88
|
+
openedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
89
|
+
ratings: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
90
|
+
COMPENSATION: number | null;
|
|
91
|
+
INTEREST: number | null;
|
|
92
|
+
}, {
|
|
93
|
+
COMPENSATION: number | null;
|
|
94
|
+
INTEREST: number | null;
|
|
95
|
+
}>>>;
|
|
96
|
+
closedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
97
|
+
slug: z.ZodString;
|
|
98
|
+
jobFunctionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
99
|
+
industryId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
100
|
+
jobDescription: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
101
|
+
intro?: string;
|
|
102
|
+
role?: string;
|
|
103
|
+
roleResponsibilities?: string[];
|
|
104
|
+
candidate?: string;
|
|
105
|
+
candidateQualifications?: string[];
|
|
106
|
+
}, {
|
|
107
|
+
intro?: string;
|
|
108
|
+
role?: string;
|
|
109
|
+
roleResponsibilities?: string[];
|
|
110
|
+
candidate?: string;
|
|
111
|
+
candidateQualifications?: string[];
|
|
112
|
+
}>>>;
|
|
113
|
+
teaser: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
employmentType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
117
|
+
FULL_TIME: "FULL_TIME";
|
|
118
|
+
PART_TIME: "PART_TIME";
|
|
119
|
+
}>>>;
|
|
120
|
+
employmentLocationType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
121
|
+
REMOTE: "REMOTE";
|
|
122
|
+
ONSITE: "ONSITE";
|
|
123
|
+
HYBRID: "HYBRID";
|
|
124
|
+
}>>>;
|
|
125
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
126
|
+
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
127
|
+
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
isHiddenClient: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
isPriority: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
salaryMin: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
131
|
+
salaryMax: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
132
|
+
referralPlacementReward: z.ZodOptional<z.ZodInt>;
|
|
133
|
+
referralInterviewReward: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
134
|
+
additionalBenefits: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
135
|
+
closedReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
136
|
+
PLACED: "PLACED";
|
|
137
|
+
CLIENT_FILLED: "CLIENT_FILLED";
|
|
138
|
+
CLIENT_CANCELED: "CLIENT_CANCELED";
|
|
139
|
+
INKWELL_CANCELED: "INKWELL_CANCELED";
|
|
140
|
+
}>>>;
|
|
141
|
+
}, {
|
|
142
|
+
out: {};
|
|
143
|
+
in: {};
|
|
144
|
+
}>;
|
|
590
145
|
export declare const AdminPositionSelectSchema: z.ZodObject<{
|
|
591
146
|
id: z.ZodUUID;
|
|
592
147
|
idNano: z.ZodString;
|
|
@@ -6,7 +6,9 @@ const core_1 = require("../../core");
|
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const v4_1 = require("zod/v4");
|
|
8
8
|
//// validators
|
|
9
|
-
exports.AdminPositionCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.position)
|
|
9
|
+
exports.AdminPositionCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.position).omit({
|
|
10
|
+
idNano: true
|
|
11
|
+
});
|
|
10
12
|
exports.AdminPositionSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.position).extend({
|
|
11
13
|
client: (0, drizzle_zod_1.createSelectSchema)(core_1.client)
|
|
12
14
|
.pick({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/positions/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAgF;AAChF,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/positions/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAgF;AAChF,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;IACzE,MAAM,EAAE,IAAI;CACb,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,MAAM,CAAC;IAC3E,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,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,EAAE;CACd,CAAC,CAAA;AACW,QAAA,+BAA+B,GAAG,iCAAyB,CAAA;AAC3D,QAAA,+BAA+B,GAAG,iCAAyB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { client, industry, jobFunction, position, skill, tag } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminPositionCreateSchema = createInsertSchema(position).omit({\n idNano: true\n})\nexport const AdminPositionSelectSchema = createSelectSchema(position).extend({\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n jobFunction: createSelectSchema(jobFunction)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n _referralsCount: z.number().optional(),\n _openCandidaciesCount: z.number().optional()\n})\nexport const AdminPositionUpdateSchema = createUpdateSchema(position, {\n startedAt: z.coerce.date().nullable().optional(),\n closedAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminPositionParamsSchema = AdminPositionSelectSchema.pick({\n id: true\n})\nexport const AdminPositionListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n isClosed: z.boolean().optional(),\n clientId: z.string().optional()\n })\n .partial()\n .optional()\n})\nexport const AdminPositionUpdateParamsSchema = AdminPositionParamsSchema\nexport const AdminPositionDeleteParamsSchema = AdminPositionParamsSchema\n\n//// types\n\ntype AdminPosition = z.infer<typeof AdminPositionSelectSchema>\n\n// detail\nexport type AdminPositionParams = z.infer<typeof AdminPositionParamsSchema>\nexport type AdminPositionResult = AdminPosition\n\n// list\nexport type AdminPositionListQuery = z.infer<\n typeof AdminPositionListQuerySchema\n>\nexport type AdminPositionListResult = ListResponse<\n z.infer<typeof AdminPositionSelectSchema>\n>\n\n// create\nexport type AdminPositionCreateInput = z.infer<typeof AdminPositionCreateSchema>\nexport type AdminPositionCreateResult = Pick<AdminPosition, 'id'>\n\n// update\nexport type AdminPositionUpdateParams = z.infer<\n typeof AdminPositionUpdateParamsSchema\n>\nexport type AdminPositionUpdateInput = z.infer<typeof AdminPositionUpdateSchema>\n\n// delete\nexport type AdminPositionDeleteParams = z.infer<\n typeof AdminPositionDeleteParamsSchema\n>\n"]}
|
|
@@ -1,180 +1,34 @@
|
|
|
1
1
|
import { type ListResponse } from '../../../utils';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
|
-
export declare const AdminWebsiteLandingPageCreateSchema:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
hasRuntimeDefault: false;
|
|
33
|
-
enumValues: [string, ...string[]];
|
|
34
|
-
baseColumn: never;
|
|
35
|
-
identity: undefined;
|
|
36
|
-
generated: undefined;
|
|
37
|
-
}, {}, {}>;
|
|
38
|
-
slug: import("drizzle-orm/pg-core").PgColumn<{
|
|
39
|
-
name: "slug";
|
|
40
|
-
tableName: "website_landing_pages";
|
|
41
|
-
dataType: "string";
|
|
42
|
-
columnType: "PgText";
|
|
43
|
-
data: string;
|
|
44
|
-
driverParam: string;
|
|
45
|
-
notNull: true;
|
|
46
|
-
hasDefault: false;
|
|
47
|
-
isPrimaryKey: false;
|
|
48
|
-
isAutoincrement: false;
|
|
49
|
-
hasRuntimeDefault: false;
|
|
50
|
-
enumValues: [string, ...string[]];
|
|
51
|
-
baseColumn: never;
|
|
52
|
-
identity: undefined;
|
|
53
|
-
generated: undefined;
|
|
54
|
-
}, {}, {}>;
|
|
55
|
-
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
56
|
-
name: "name";
|
|
57
|
-
tableName: "website_landing_pages";
|
|
58
|
-
dataType: "string";
|
|
59
|
-
columnType: "PgText";
|
|
60
|
-
data: string;
|
|
61
|
-
driverParam: string;
|
|
62
|
-
notNull: true;
|
|
63
|
-
hasDefault: false;
|
|
64
|
-
isPrimaryKey: false;
|
|
65
|
-
isAutoincrement: false;
|
|
66
|
-
hasRuntimeDefault: false;
|
|
67
|
-
enumValues: [string, ...string[]];
|
|
68
|
-
baseColumn: never;
|
|
69
|
-
identity: undefined;
|
|
70
|
-
generated: undefined;
|
|
71
|
-
}, {}, {}>;
|
|
72
|
-
content: import("drizzle-orm/pg-core").PgColumn<{
|
|
73
|
-
name: "content";
|
|
74
|
-
tableName: "website_landing_pages";
|
|
75
|
-
dataType: "json";
|
|
76
|
-
columnType: "PgJsonb";
|
|
77
|
-
data: {
|
|
78
|
-
title?: string;
|
|
79
|
-
body?: string;
|
|
80
|
-
positionIds?: Record<string, boolean>;
|
|
81
|
-
};
|
|
82
|
-
driverParam: unknown;
|
|
83
|
-
notNull: true;
|
|
84
|
-
hasDefault: true;
|
|
85
|
-
isPrimaryKey: false;
|
|
86
|
-
isAutoincrement: false;
|
|
87
|
-
hasRuntimeDefault: false;
|
|
88
|
-
enumValues: undefined;
|
|
89
|
-
baseColumn: never;
|
|
90
|
-
identity: undefined;
|
|
91
|
-
generated: undefined;
|
|
92
|
-
}, {}, {
|
|
93
|
-
$type: {
|
|
94
|
-
title?: string;
|
|
95
|
-
body?: string;
|
|
96
|
-
positionIds?: Record<string, boolean>;
|
|
97
|
-
};
|
|
98
|
-
}>;
|
|
99
|
-
meta: import("drizzle-orm/pg-core").PgColumn<{
|
|
100
|
-
name: "meta";
|
|
101
|
-
tableName: "website_landing_pages";
|
|
102
|
-
dataType: "json";
|
|
103
|
-
columnType: "PgJsonb";
|
|
104
|
-
data: {
|
|
105
|
-
title?: string;
|
|
106
|
-
description?: string;
|
|
107
|
-
keywords?: string;
|
|
108
|
-
};
|
|
109
|
-
driverParam: unknown;
|
|
110
|
-
notNull: true;
|
|
111
|
-
hasDefault: true;
|
|
112
|
-
isPrimaryKey: false;
|
|
113
|
-
isAutoincrement: false;
|
|
114
|
-
hasRuntimeDefault: false;
|
|
115
|
-
enumValues: undefined;
|
|
116
|
-
baseColumn: never;
|
|
117
|
-
identity: undefined;
|
|
118
|
-
generated: undefined;
|
|
119
|
-
}, {}, {
|
|
120
|
-
$type: {
|
|
121
|
-
title?: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
keywords?: string;
|
|
124
|
-
};
|
|
125
|
-
}>;
|
|
126
|
-
deletedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
127
|
-
name: "deletedAt";
|
|
128
|
-
tableName: "website_landing_pages";
|
|
129
|
-
dataType: "date";
|
|
130
|
-
columnType: "PgTimestamp";
|
|
131
|
-
data: Date;
|
|
132
|
-
driverParam: string;
|
|
133
|
-
notNull: false;
|
|
134
|
-
hasDefault: false;
|
|
135
|
-
isPrimaryKey: false;
|
|
136
|
-
isAutoincrement: false;
|
|
137
|
-
hasRuntimeDefault: false;
|
|
138
|
-
enumValues: undefined;
|
|
139
|
-
baseColumn: never;
|
|
140
|
-
identity: undefined;
|
|
141
|
-
generated: undefined;
|
|
142
|
-
}, {}, {}>;
|
|
143
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
144
|
-
name: "createdAt";
|
|
145
|
-
tableName: "website_landing_pages";
|
|
146
|
-
dataType: "date";
|
|
147
|
-
columnType: "PgTimestamp";
|
|
148
|
-
data: Date;
|
|
149
|
-
driverParam: string;
|
|
150
|
-
notNull: true;
|
|
151
|
-
hasDefault: true;
|
|
152
|
-
isPrimaryKey: false;
|
|
153
|
-
isAutoincrement: false;
|
|
154
|
-
hasRuntimeDefault: false;
|
|
155
|
-
enumValues: undefined;
|
|
156
|
-
baseColumn: never;
|
|
157
|
-
identity: undefined;
|
|
158
|
-
generated: undefined;
|
|
159
|
-
}, {}, {}>;
|
|
160
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
161
|
-
name: "updatedAt";
|
|
162
|
-
tableName: "website_landing_pages";
|
|
163
|
-
dataType: "date";
|
|
164
|
-
columnType: "PgTimestamp";
|
|
165
|
-
data: Date;
|
|
166
|
-
driverParam: string;
|
|
167
|
-
notNull: true;
|
|
168
|
-
hasDefault: true;
|
|
169
|
-
isPrimaryKey: false;
|
|
170
|
-
isAutoincrement: false;
|
|
171
|
-
hasRuntimeDefault: false;
|
|
172
|
-
enumValues: undefined;
|
|
173
|
-
baseColumn: never;
|
|
174
|
-
identity: undefined;
|
|
175
|
-
generated: undefined;
|
|
176
|
-
}, {}, {}>;
|
|
177
|
-
}, undefined, undefined>;
|
|
3
|
+
export declare const AdminWebsiteLandingPageCreateSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
id: z.ZodOptional<z.ZodUUID>;
|
|
6
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
7
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
8
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
9
|
+
slug: z.ZodString;
|
|
10
|
+
content: z.ZodOptional<z.ZodType<{
|
|
11
|
+
title?: string;
|
|
12
|
+
body?: string;
|
|
13
|
+
positionIds?: Record<string, boolean>;
|
|
14
|
+
}, {
|
|
15
|
+
title?: string;
|
|
16
|
+
body?: string;
|
|
17
|
+
positionIds?: Record<string, boolean>;
|
|
18
|
+
}>>;
|
|
19
|
+
meta: z.ZodOptional<z.ZodType<{
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
keywords?: string;
|
|
23
|
+
}, {
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
keywords?: string;
|
|
27
|
+
}>>;
|
|
28
|
+
}, {
|
|
29
|
+
out: {};
|
|
30
|
+
in: {};
|
|
31
|
+
}>;
|
|
178
32
|
export declare const AdminWebsiteLandingPageSelectSchema: import("drizzle-zod").BuildSchema<"select", {
|
|
179
33
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
180
34
|
name: "id";
|
|
@@ -5,7 +5,9 @@ const drizzle_zod_1 = require("drizzle-zod");
|
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
//// validators
|
|
8
|
-
exports.AdminWebsiteLandingPageCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.websiteLandingPage)
|
|
8
|
+
exports.AdminWebsiteLandingPageCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.websiteLandingPage).omit({
|
|
9
|
+
idNano: true
|
|
10
|
+
});
|
|
9
11
|
exports.AdminWebsiteLandingPageSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.websiteLandingPage);
|
|
10
12
|
exports.AdminWebsiteLandingPageUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.websiteLandingPage);
|
|
11
13
|
exports.AdminWebsiteLandingPageParamsSchema = exports.AdminWebsiteLandingPageSelectSchema.pick({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/websiteLandingPages/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+C;AAC/C,0CAAmE;AAGnE,eAAe;AAEF,QAAA,mCAAmC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/websiteLandingPages/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+C;AAC/C,0CAAmE;AAGnE,eAAe;AAEF,QAAA,mCAAmC,GAAG,IAAA,gCAAkB,EACnE,yBAAkB,CACnB,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,IAAI;CACb,CAAC,CAAA;AACW,QAAA,mCAAmC,GAC9C,IAAA,gCAAkB,EAAC,yBAAkB,CAAC,CAAA;AAC3B,QAAA,mCAAmC,GAC9C,IAAA,gCAAkB,EAAC,yBAAkB,CAAC,CAAA;AAE3B,QAAA,mCAAmC,GAC9C,2CAAmC,CAAC,IAAI,CAAC;IACvC,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACS,QAAA,sCAAsC,GAAG,uBAAe,CAAA;AACxD,QAAA,yCAAyC,GACpD,2CAAmC,CAAA;AACxB,QAAA,yCAAyC,GACpD,2CAAmC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { websiteLandingPage } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminWebsiteLandingPageCreateSchema = createInsertSchema(\n websiteLandingPage\n).omit({\n idNano: true\n})\nexport const AdminWebsiteLandingPageSelectSchema =\n createSelectSchema(websiteLandingPage)\nexport const AdminWebsiteLandingPageUpdateSchema =\n createUpdateSchema(websiteLandingPage)\n\nexport const AdminWebsiteLandingPageParamsSchema =\n AdminWebsiteLandingPageSelectSchema.pick({\n id: true\n })\nexport const AdminWebsiteLandingPageListQuerySchema = ListQuerySchema\nexport const AdminWebsiteLandingPageUpdateParamsSchema =\n AdminWebsiteLandingPageParamsSchema\nexport const adminWebsiteLandingPageDeleteParamsSchema =\n AdminWebsiteLandingPageParamsSchema\n\n//// types\n\ntype AdminWebsiteLandingPage = z.infer<\n typeof AdminWebsiteLandingPageSelectSchema\n>\n\n// detail\nexport type AdminWebsiteLandingPageParams = z.infer<\n typeof AdminWebsiteLandingPageParamsSchema\n>\nexport type AdminWebsiteLandingPageResult = AdminWebsiteLandingPage\n\n// list\nexport type AdminWebsiteLandingPageListQuery = z.infer<\n typeof AdminWebsiteLandingPageListQuerySchema\n>\nexport type AdminWebsiteLandingPageListResult = ListResponse<\n z.infer<typeof AdminWebsiteLandingPageSelectSchema>\n>\n\n// create\nexport type AdminWebsiteLandingPageCreateInput = z.infer<\n typeof AdminWebsiteLandingPageCreateSchema\n>\nexport type AdminWebsiteLandingPageCreateResult = Pick<\n AdminWebsiteLandingPage,\n 'id'\n>\n\n// update\nexport type AdminWebsiteLandingPageUpdateParams = z.infer<\n typeof AdminWebsiteLandingPageUpdateParamsSchema\n>\nexport type AdminWebsiteLandingPageUpdateInput = z.infer<\n typeof AdminWebsiteLandingPageUpdateSchema\n>\n\n// delete\nexport type AdminWebsiteLandingPageDeleteParams = z.infer<\n typeof adminWebsiteLandingPageDeleteParamsSchema\n>\n"]}
|