@the-inkwell/shared 0.2.130 → 0.2.131
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.
|
@@ -405,7 +405,7 @@ export declare const AdminMessageSelectSchema: z.ZodObject<{
|
|
|
405
405
|
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
406
406
|
createdAt: z.ZodDate;
|
|
407
407
|
updatedAt: z.ZodDate;
|
|
408
|
-
person: z.ZodObject<{
|
|
408
|
+
person: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
409
409
|
email: z.ZodString;
|
|
410
410
|
id: z.ZodUUID;
|
|
411
411
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -413,7 +413,7 @@ export declare const AdminMessageSelectSchema: z.ZodObject<{
|
|
|
413
413
|
}, {
|
|
414
414
|
out: {};
|
|
415
415
|
in: {};
|
|
416
|
-
}
|
|
416
|
+
}>>>;
|
|
417
417
|
outboundSender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
418
418
|
email: z.ZodString;
|
|
419
419
|
name: z.ZodString;
|
|
@@ -8,12 +8,15 @@ const v4_1 = require("zod/v4");
|
|
|
8
8
|
//// validators
|
|
9
9
|
exports.AdminMessageCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.message);
|
|
10
10
|
exports.AdminMessageSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.message).extend({
|
|
11
|
-
person: (0, drizzle_zod_1.createSelectSchema)(core_1.person)
|
|
11
|
+
person: (0, drizzle_zod_1.createSelectSchema)(core_1.person)
|
|
12
|
+
.pick({
|
|
12
13
|
id: true,
|
|
13
14
|
email: true,
|
|
14
15
|
fullName: true,
|
|
15
16
|
phone: true
|
|
16
|
-
})
|
|
17
|
+
})
|
|
18
|
+
.nullable()
|
|
19
|
+
.optional(),
|
|
17
20
|
outboundSender: (0, drizzle_zod_1.createSelectSchema)(core_1.sender)
|
|
18
21
|
.pick({
|
|
19
22
|
id: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/messages/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAoD;AACpD,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAA;AACtD,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/messages/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAoD;AACpD,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAA;AACtD,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,cAAc,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SACvC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAA;AAEtD,QAAA,wBAAwB,GAAG,gCAAwB,CAAC,IAAI,CAAC;IACpE,EAAE,EAAE,IAAI;IACR,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC,OAAO,EAAE,CAAA;AAEC,QAAA,2BAA2B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAChE,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,UAAU,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAClC,SAAS,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,8BAA8B,GAAG,gCAAwB,CAAA;AACzD,QAAA,8BAA8B,GAAG,gCAAwB,CAAA;AA+BzD,QAAA,sBAAsB,GAAG,gCAAwB,CAAC,IAAI,CAAC;IAClE,OAAO,EAAE,IAAI;CACd,CAAC,CAAC,MAAM,CAAC;IACR,SAAS,EAAE,MAAC,CAAC,KAAK,CAAC,MAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,gBAAgB,EAAE,MAAC,CAAC,MAAM,EAAE;IAC5B,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { message, person, sender } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMessageCreateSchema = createInsertSchema(message)\nexport const AdminMessageSelectSchema = createSelectSchema(message).extend({\n person: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true,\n phone: true\n })\n .nullable()\n .optional(),\n outboundSender: createSelectSchema(sender)\n .pick({\n id: true,\n name: true,\n email: true,\n smsNumber: true\n })\n .nullable()\n .optional()\n})\nexport const AdminMessageUpdateSchema = createUpdateSchema(message)\n\nexport const AdminMessageParamsSchema = AdminMessageSelectSchema.pick({\n id: true,\n externalId: true\n}).partial()\n\nexport const AdminMessageListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n personId: z.string().optional(),\n isReviewed: z.boolean().optional(),\n isInbound: z.boolean().optional()\n })\n .optional()\n})\nexport const AdminMessageUpdateParamsSchema = AdminMessageParamsSchema\nexport const AdminMessageDeleteParamsSchema = AdminMessageParamsSchema\n\n//// types\n\ntype AdminMessage = z.infer<typeof AdminMessageSelectSchema>\n\n// detail\nexport type AdminMessageParams = z.infer<typeof AdminMessageParamsSchema>\nexport type AdminMessageResult = AdminMessage\n\n// list\nexport type AdminMessageListQuery = z.infer<typeof AdminMessageListQuerySchema>\nexport type AdminMessageListResult = ListResponse<\n z.infer<typeof AdminMessageSelectSchema>\n>\n\n// create\nexport type AdminMessageCreateInput = z.infer<typeof AdminMessageCreateSchema>\nexport type AdminMessageCreateResult = Pick<AdminMessage, 'id'>\n\n// update\nexport type AdminMessageUpdateParams = z.infer<\n typeof AdminMessageUpdateParamsSchema\n>\nexport type AdminMessageUpdateInput = Partial<AdminMessage>\n\n// delete\nexport type AdminMessageDeleteParams = z.infer<\n typeof AdminMessageDeleteParamsSchema\n>\n\nexport const AdminMessageSendSchema = AdminMessageCreateSchema.pick({\n channel: true\n}).extend({\n personIds: z.array(z.string()).optional(),\n outboundSenderId: z.string(),\n text: z.string(),\n subject: z.string().optional(),\n html: z.string().optional()\n})\n\nexport type AdminMessageSendInput = z.infer<typeof AdminMessageSendSchema>\n"]}
|