@the-inkwell/shared 0.2.328 → 0.2.330

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.
@@ -868,6 +868,7 @@ export declare const AdminMessageSendSchema: z.ZodObject<{
868
868
  EMAIL: "EMAIL";
869
869
  }>;
870
870
  personIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
871
+ toEmail: z.ZodOptional<z.ZodString>;
871
872
  outboundSenderId: z.ZodString;
872
873
  text: z.ZodString;
873
874
  subject: z.ZodOptional<z.ZodString>;
@@ -47,6 +47,7 @@ exports.AdminMessageSendSchema = exports.AdminMessageCreateSchema.pick({
47
47
  channel: true
48
48
  }).extend({
49
49
  personIds: v4_1.z.array(v4_1.z.string()).optional(),
50
+ toEmail: v4_1.z.string().trim().min(1).optional(),
50
51
  outboundSenderId: v4_1.z.string(),
51
52
  text: v4_1.z.string(),
52
53
  subject: v4_1.z.string().optional(),
@@ -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;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"]}
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,OAAO,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,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 toEmail: z.string().trim().min(1).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"]}
@@ -2,5 +2,6 @@ export * from './apply';
2
2
  export * from './join';
3
3
  export * from './hire';
4
4
  export * from './positions';
5
+ export * from './newsletters';
5
6
  export * from './refer';
6
7
  export * from './user';
@@ -18,6 +18,7 @@ __exportStar(require("./apply"), exports);
18
18
  __exportStar(require("./join"), exports);
19
19
  __exportStar(require("./hire"), exports);
20
20
  __exportStar(require("./positions"), exports);
21
+ __exportStar(require("./newsletters"), exports);
21
22
  __exportStar(require("./refer"), exports);
22
23
  __exportStar(require("./user"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/public/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,yCAAsB;AACtB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,yCAAsB","sourcesContent":["export * from './apply'\nexport * from './join'\nexport * from './hire'\nexport * from './positions'\nexport * from './refer'\nexport * from './user'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/public/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,yCAAsB;AACtB,yCAAsB;AACtB,8CAA2B;AAC3B,gDAA6B;AAC7B,0CAAuB;AACvB,yCAAsB","sourcesContent":["export * from './apply'\nexport * from './join'\nexport * from './hire'\nexport * from './positions'\nexport * from './newsletters'\nexport * from './refer'\nexport * from './user'\n"]}
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod/v4';
2
+ import { ListResponse } from '../../../utils';
3
+ export declare const PublicNewsletterSelectSchema: z.ZodObject<{
4
+ id: z.ZodUUID;
5
+ createdAt: z.ZodDate;
6
+ idNano: z.ZodNullable<z.ZodString>;
7
+ content: z.ZodString;
8
+ title: z.ZodString;
9
+ publishedDate: z.ZodDate;
10
+ htmlContent: z.ZodString;
11
+ author: z.ZodNullable<z.ZodString>;
12
+ }, {
13
+ out: {};
14
+ in: {};
15
+ }>;
16
+ export declare const PublicNewsletterParamsSchema: z.ZodObject<{
17
+ idNano: z.ZodNullable<z.ZodString>;
18
+ }, {
19
+ out: {};
20
+ in: {};
21
+ }>;
22
+ type PublicNewsletter = z.infer<typeof PublicNewsletterSelectSchema>;
23
+ export type PublicNewsletterParams = z.infer<typeof PublicNewsletterParamsSchema>;
24
+ export type PublicNewsletterResult = PublicNewsletter;
25
+ export type PublicNewsletterListResult = ListResponse<z.infer<typeof PublicNewsletterSelectSchema>>;
26
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicNewsletterParamsSchema = exports.PublicNewsletterSelectSchema = void 0;
4
+ const drizzle_zod_1 = require("drizzle-zod");
5
+ const core_1 = require("../../core");
6
+ exports.PublicNewsletterSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.newsletters).pick({
7
+ id: true,
8
+ idNano: true,
9
+ title: true,
10
+ content: true,
11
+ htmlContent: true,
12
+ author: true,
13
+ publishedDate: true,
14
+ createdAt: true
15
+ });
16
+ exports.PublicNewsletterParamsSchema = exports.PublicNewsletterSelectSchema.pick({
17
+ idNano: true
18
+ });
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/newsletters/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAwC;AAK3B,QAAA,4BAA4B,GAAG,IAAA,gCAAkB,EAC5D,kBAAW,CACZ,CAAC,IAAI,CAAC;IACL,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;CAChB,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,oCAA4B,CAAC,IAAI,CAAC;IAC5E,MAAM,EAAE,IAAI;CACb,CAAC,CAAA","sourcesContent":["import { createSelectSchema } from 'drizzle-zod'\nimport { newsletters } from '../../core'\nimport { z } from 'zod/v4'\n\nimport { ListResponse } from '../../../utils'\n\nexport const PublicNewsletterSelectSchema = createSelectSchema(\n newsletters\n).pick({\n id: true,\n idNano: true,\n title: true,\n content: true,\n htmlContent: true,\n author: true,\n publishedDate: true,\n createdAt: true\n})\n\nexport const PublicNewsletterParamsSchema = PublicNewsletterSelectSchema.pick({\n idNano: true\n})\n\n//// types\n\ntype PublicNewsletter = z.infer<typeof PublicNewsletterSelectSchema>\n\n// detail\nexport type PublicNewsletterParams = z.infer<\n typeof PublicNewsletterParamsSchema\n>\nexport type PublicNewsletterResult = PublicNewsletter\n\n// list\nexport type PublicNewsletterListResult = ListResponse<\n z.infer<typeof PublicNewsletterSelectSchema>\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.328",
3
+ "version": "0.2.330",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",