@the-inkwell/shared 0.2.42 → 0.2.44

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.
@@ -281,7 +281,7 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
281
281
  deletedAt: z.ZodNullable<z.ZodDate>;
282
282
  createdAt: z.ZodDate;
283
283
  updatedAt: z.ZodDate;
284
- referral: z.ZodOptional<z.ZodObject<{
284
+ referral: z.ZodOptional<z.ZodNullable<z.ZodObject<{
285
285
  referrer: z.ZodObject<{
286
286
  id: z.ZodUUID;
287
287
  email: z.ZodString;
@@ -290,7 +290,7 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
290
290
  out: {};
291
291
  in: {};
292
292
  }>;
293
- }, z.core.$strip>>;
293
+ }, z.core.$strip>>>;
294
294
  _openPositionsCount: z.ZodOptional<z.ZodNumber>;
295
295
  }, {
296
296
  out: {};
@@ -16,6 +16,7 @@ exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.c
16
16
  fullName: true
17
17
  })
18
18
  })
19
+ .nullable()
19
20
  .optional(),
20
21
  _openPositionsCount: v4_1.z.number().optional()
21
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA2D;AAC3D,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;YACxC,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;IACb,mBAAmB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AACW,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AAEpD,QAAA,uBAAuB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAClE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAEF,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,IAAI,CAAC,qBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAA;AACF,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;KAC1C,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { client, ClientStatuses, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .optional(),\n _openPositionsCount: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client)\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA2D;AAC3D,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AACpD,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;YACxC,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,mBAAmB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AACW,QAAA,uBAAuB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAA;AAEpD,QAAA,uBAAuB,GAAG,+BAAuB,CAAC,IAAI,CAAC;IAClE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAEF,MAAM,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,IAAI,CAAC,qBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAA;AACF,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAChE,IAAI,CAAC;IACJ,MAAM,EAAE,IAAI;CACb,CAAC;KACD,OAAO,EAAE,CAAA;AACC,QAAA,0BAA0B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,GAAG,gCAAgC,CAAC,KAAK;QACzC,GAAG,gCAAgC,CAAC,KAAK;KAC1C,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { client, ClientStatuses, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client)\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
@@ -910,7 +910,7 @@ export declare const AdminPositionUpdateSchema: import("drizzle-zod").BuildSchem
910
910
  generated: undefined;
911
911
  }, {}, {}>;
912
912
  }, {
913
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
913
+ openedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
914
914
  closedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
915
915
  }, undefined>;
916
916
  export declare const AdminPositionParamsSchema: z.ZodObject<{
@@ -41,7 +41,7 @@ exports.AdminPositionSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1
41
41
  _openCandidaciesCount: v4_1.z.number().optional()
42
42
  });
43
43
  exports.AdminPositionUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.position, {
44
- startedAt: v4_1.z.coerce.date().nullable().optional(),
44
+ openedAt: v4_1.z.coerce.date().nullable().optional(),
45
45
  closedAt: v4_1.z.coerce.date().nullable().optional()
46
46
  });
47
47
  exports.AdminPositionParamsSchema = exports.AdminPositionSelectSchema.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,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,CAAC;SACD,QAAQ,EAAE;IACb,WAAW,EAAE,IAAA,gCAAkB,EAAC,kBAAW,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,MAAC,CAAC,KAAK,CACb,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,IAAI,CAAC;QAC7B,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC,CACH;IACD,IAAI,EAAE,MAAC,CAAC,KAAK,CACX,IAAA,gCAAkB,EAAC,UAAG,CAAC,CAAC,IAAI,CAAC;QAC3B,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC,CACH;IACD,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,qBAAqB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,EAAE;IACpE,SAAS,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,QAAQ,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAA;AAEW,QAAA,yBAAyB,GAAG,iCAAyB,CAAC,IAAI,CAAC;IACtE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,uBAAe,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAChC,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,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
+ {"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,CAAC;SACD,QAAQ,EAAE;IACb,WAAW,EAAE,IAAA,gCAAkB,EAAC,kBAAW,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,MAAC,CAAC,KAAK,CACb,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,IAAI,CAAC;QAC7B,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC,CACH;IACD,IAAI,EAAE,MAAC,CAAC,KAAK,CACX,IAAA,gCAAkB,EAAC,UAAG,CAAC,CAAC,IAAI,CAAC;QAC3B,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC,CACH;IACD,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,qBAAqB,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,EAAE;IACpE,QAAQ,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAA;AAEW,QAAA,yBAAyB,GAAG,iCAAyB,CAAC,IAAI,CAAC;IACtE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,uBAAe,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAChC,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,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 openedAt: 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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",