@the-inkwell/shared 0.2.157 → 0.2.158

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.
@@ -1022,7 +1022,10 @@ export declare const AdminClientUpdateSchema: import("drizzle-zod").BuildSchema<
1022
1022
  identity: undefined;
1023
1023
  generated: undefined;
1024
1024
  }, {}, {}>;
1025
- }, undefined, undefined>;
1025
+ }, {
1026
+ initialOutreachAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
1027
+ followUpAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
1028
+ }, undefined>;
1026
1029
  export declare const AdminClientParamsSchema: z.ZodObject<{
1027
1030
  id: z.ZodUUID;
1028
1031
  }, {
@@ -33,7 +33,10 @@ exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.c
33
33
  .optional(),
34
34
  _openPositionsCount: v4_1.z.number().optional()
35
35
  });
36
- exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client);
36
+ exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client, {
37
+ initialOutreachAt: v4_1.z.coerce.date().optional(),
38
+ followUpAt: v4_1.z.coerce.date().optional()
39
+ });
37
40
  exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
38
41
  id: true
39
42
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,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,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EA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QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, client, ClientStatuses, industry, 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 industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\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 sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA+E;AAC/E,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,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,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,cAAc,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,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,EAAE;IAChE,iBAAiB,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAA;AAEW,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 { campaign, client, ClientStatuses, industry, 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 industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\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 sourceCampaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n _openPositionsCount: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().optional(),\n followUpAt: z.coerce.date().optional()\n})\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.157",
3
+ "version": "0.2.158",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",