@the-inkwell/shared 0.2.168 → 0.2.170

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.
@@ -585,6 +585,10 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
585
585
  out: {};
586
586
  in: {};
587
587
  }>>>;
588
+ _potentialRetainerFees: z.ZodOptional<z.ZodNumber>;
589
+ _potentialPlacementFees: z.ZodOptional<z.ZodNumber>;
590
+ _earnedRetainerFees: z.ZodOptional<z.ZodNumber>;
591
+ _earnedPlacementFees: z.ZodOptional<z.ZodNumber>;
588
592
  }, {
589
593
  out: {};
590
594
  in: {};
@@ -39,7 +39,11 @@ exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.c
39
39
  fullName: true
40
40
  })
41
41
  .nullable()
42
- .optional()
42
+ .optional(),
43
+ _potentialRetainerFees: v4_1.z.number().optional(),
44
+ _potentialPlacementFees: v4_1.z.number().optional(),
45
+ _earnedRetainerFees: v4_1.z.number().optional(),
46
+ _earnedPlacementFees: v4_1.z.number().optional()
43
47
  });
44
48
  exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client, {
45
49
  initialOutreachAt: v4_1.z.coerce.date().nullable().optional(),
@@ -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,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,E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gC,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 _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().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"]}
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,E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AAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,eAAe,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtD,WAAW,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACnD,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 _firstContact: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n .optional(),\n _potentialRetainerFees: z.number().optional(),\n _potentialPlacementFees: z.number().optional(),\n _earnedRetainerFees: z.number().optional(),\n _earnedPlacementFees: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client, {\n initialOutreachAt: z.coerce.date().nullable().optional(),\n followUpAt: z.coerce.date().nullable().optional(),\n lastContactedAt: z.coerce.date().nullable().optional(),\n convertedAt: z.coerce.date().nullable().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.168",
3
+ "version": "0.2.170",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",