@the-inkwell/shared 0.2.323 → 0.2.324

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.
@@ -3,7 +3,7 @@ import { z } from 'zod/v4';
3
3
  export declare const AdminProfessionalEventCreateSchema: z.ZodObject<{
4
4
  name: z.ZodString;
5
5
  networkId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
6
- eventAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
6
+ eventAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedDate<unknown>, z.ZodNull]>>;
7
7
  }, {
8
8
  out: {};
9
9
  in: {};
@@ -43,7 +43,7 @@ export declare const AdminProfessionalEventSelectSchema: z.ZodObject<{
43
43
  export declare const AdminProfessionalEventUpdateSchema: z.ZodObject<{
44
44
  name: z.ZodOptional<z.ZodString>;
45
45
  networkId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
46
- eventAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
46
+ eventAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedDate<unknown>, z.ZodNull]>>;
47
47
  }, {
48
48
  out: {};
49
49
  in: {};
@@ -6,10 +6,15 @@ 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.AdminProfessionalEventCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.professionalEvent).pick({
9
+ const EventAtInputSchema = v4_1.z.union([v4_1.z.coerce.date(), v4_1.z.null()]).optional();
10
+ exports.AdminProfessionalEventCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.professionalEvent)
11
+ .pick({
10
12
  name: true,
11
13
  networkId: true,
12
14
  eventAt: true
15
+ })
16
+ .extend({
17
+ eventAt: EventAtInputSchema
13
18
  });
14
19
  exports.AdminProfessionalEventSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.professionalEvent).extend({
15
20
  _peopleCount: v4_1.z.number().optional(),
@@ -37,10 +42,14 @@ exports.AdminProfessionalEventSelectSchema = (0, drizzle_zod_1.createSelectSchem
37
42
  }))
38
43
  .optional()
39
44
  });
40
- exports.AdminProfessionalEventUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.professionalEvent).pick({
45
+ exports.AdminProfessionalEventUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.professionalEvent)
46
+ .pick({
41
47
  name: true,
42
48
  networkId: true,
43
49
  eventAt: true
50
+ })
51
+ .extend({
52
+ eventAt: EventAtInputSchema
44
53
  });
45
54
  exports.AdminProfessionalEventParamsSchema = exports.AdminProfessionalEventSelectSchema.pick({
46
55
  id: true
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/professionalEvents/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAKmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,kCAAkC,GAAG,IAAA,gCAAkB,EAClE,wBAAiB,CAClB,CAAC,IAAI,CAAC;IACL,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEW,QAAA,kCAAkC,GAAG,IAAA,gCAAkB,EAClE,wBAAiB,CAClB,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,IAAA,gCAAkB,EAAC,cAAO,CAAC;SACjC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,OAAO,EAAE,MAAC;SACP,KAAK,CACJ,IAAA,gCAAkB,EAAC,gCAAyB,CAAC;SAC1C,IAAI,CAAC;QACJ,QAAQ,EAAE,IAAI;QACd,mBAAmB,EAAE,IAAI;KAC1B,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;aAC/B,IAAI,CAAC;YACJ,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;aACD,QAAQ,EAAE;KACd,CAAC,CACL;SACA,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,kCAAkC,GAAG,IAAA,gCAAkB,EAClE,wBAAiB,CAClB,CAAC,IAAI,CAAC;IACL,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEW,QAAA,kCAAkC,GAC7C,0CAAkC,CAAC,IAAI,CAAC;IACtC,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAES,QAAA,qCAAqC,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC1E,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,wCAAwC,GACnD,0CAAkC,CAAA;AAEvB,QAAA,wCAAwC,GACnD,0CAAkC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n network,\n person,\n personToProfessionalEvent,\n professionalEvent\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminProfessionalEventCreateSchema = createInsertSchema(\n professionalEvent\n).pick({\n name: true,\n networkId: true,\n eventAt: true\n})\n\nexport const AdminProfessionalEventSelectSchema = createSelectSchema(\n professionalEvent\n).extend({\n _peopleCount: z.number().optional(),\n network: createSelectSchema(network)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n persons: z\n .array(\n createSelectSchema(personToProfessionalEvent)\n .pick({\n personId: true,\n professionalEventId: true\n })\n .extend({\n person: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n })\n )\n .optional()\n})\n\nexport const AdminProfessionalEventUpdateSchema = createUpdateSchema(\n professionalEvent\n).pick({\n name: true,\n networkId: true,\n eventAt: true\n})\n\nexport const AdminProfessionalEventParamsSchema =\n AdminProfessionalEventSelectSchema.pick({\n id: true\n })\n\nexport const AdminProfessionalEventListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n name: z.string().optional()\n })\n .optional()\n})\n\nexport const AdminProfessionalEventUpdateParamsSchema =\n AdminProfessionalEventParamsSchema\n\nexport const AdminProfessionalEventDeleteParamsSchema =\n AdminProfessionalEventParamsSchema\n\n//// types\n\ntype AdminProfessionalEvent = z.infer<typeof AdminProfessionalEventSelectSchema>\n\n// detail\nexport type AdminProfessionalEventParams = z.infer<\n typeof AdminProfessionalEventParamsSchema\n>\nexport type AdminProfessionalEventResult = AdminProfessionalEvent\n\n// list\nexport type AdminProfessionalEventListQuery = z.infer<\n typeof AdminProfessionalEventListQuerySchema\n>\nexport type AdminProfessionalEventListResult =\n ListResponse<AdminProfessionalEvent>\n\n// create\nexport type AdminProfessionalEventCreateInput = z.infer<\n typeof AdminProfessionalEventCreateSchema\n>\nexport type AdminProfessionalEventCreateResult = Pick<\n AdminProfessionalEvent,\n 'id'\n>\n\n// update\nexport type AdminProfessionalEventUpdateParams = z.infer<\n typeof AdminProfessionalEventUpdateParamsSchema\n>\nexport type AdminProfessionalEventUpdateInput = z.infer<\n typeof AdminProfessionalEventUpdateSchema\n>\n\n// delete\nexport type AdminProfessionalEventDeleteParams = z.infer<\n typeof AdminProfessionalEventDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/professionalEvents/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAKmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEf,MAAM,kBAAk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;IACN,OAAO,EAAE,kBAAkB;CAC5B,CAAC,CAAA;AAES,QAAA,kCAAkC,GAC7C,0CAAkC,CAAC,IAAI,CAAC;IACtC,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AAES,QAAA,qCAAqC,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC1E,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,wCAAwC,GACnD,0CAAkC,CAAA;AAEvB,QAAA,wCAAwC,GACnD,0CAAkC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n network,\n person,\n personToProfessionalEvent,\n professionalEvent\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nconst EventAtInputSchema = z.union([z.coerce.date(), z.null()]).optional()\n\nexport const AdminProfessionalEventCreateSchema = createInsertSchema(\n professionalEvent\n)\n .pick({\n name: true,\n networkId: true,\n eventAt: true\n })\n .extend({\n eventAt: EventAtInputSchema\n })\n\nexport const AdminProfessionalEventSelectSchema = createSelectSchema(\n professionalEvent\n).extend({\n _peopleCount: z.number().optional(),\n network: createSelectSchema(network)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n persons: z\n .array(\n createSelectSchema(personToProfessionalEvent)\n .pick({\n personId: true,\n professionalEventId: true\n })\n .extend({\n person: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n })\n )\n .optional()\n})\n\nexport const AdminProfessionalEventUpdateSchema = createUpdateSchema(\n professionalEvent\n)\n .pick({\n name: true,\n networkId: true,\n eventAt: true\n })\n .extend({\n eventAt: EventAtInputSchema\n })\n\nexport const AdminProfessionalEventParamsSchema =\n AdminProfessionalEventSelectSchema.pick({\n id: true\n })\n\nexport const AdminProfessionalEventListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n name: z.string().optional()\n })\n .optional()\n})\n\nexport const AdminProfessionalEventUpdateParamsSchema =\n AdminProfessionalEventParamsSchema\n\nexport const AdminProfessionalEventDeleteParamsSchema =\n AdminProfessionalEventParamsSchema\n\n//// types\n\ntype AdminProfessionalEvent = z.infer<typeof AdminProfessionalEventSelectSchema>\n\n// detail\nexport type AdminProfessionalEventParams = z.infer<\n typeof AdminProfessionalEventParamsSchema\n>\nexport type AdminProfessionalEventResult = AdminProfessionalEvent\n\n// list\nexport type AdminProfessionalEventListQuery = z.infer<\n typeof AdminProfessionalEventListQuerySchema\n>\nexport type AdminProfessionalEventListResult =\n ListResponse<AdminProfessionalEvent>\n\n// create\nexport type AdminProfessionalEventCreateInput = z.infer<\n typeof AdminProfessionalEventCreateSchema\n>\nexport type AdminProfessionalEventCreateResult = Pick<\n AdminProfessionalEvent,\n 'id'\n>\n\n// update\nexport type AdminProfessionalEventUpdateParams = z.infer<\n typeof AdminProfessionalEventUpdateParamsSchema\n>\nexport type AdminProfessionalEventUpdateInput = z.infer<\n typeof AdminProfessionalEventUpdateSchema\n>\n\n// delete\nexport type AdminProfessionalEventDeleteParams = z.infer<\n typeof AdminProfessionalEventDeleteParamsSchema\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.323",
3
+ "version": "0.2.324",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",