@the-inkwell/shared 0.2.51 → 0.2.53

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.
@@ -4,5 +4,6 @@ export declare const PublicJoinCreateSchema: z.ZodObject<{
4
4
  firstName: z.ZodString;
5
5
  lastName: z.ZodString;
6
6
  linkedInUrl: z.ZodURL;
7
+ phone: z.ZodString;
7
8
  }, z.core.$strict>;
8
9
  export type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>;
@@ -8,6 +8,7 @@ const utils_1 = require("../../../utils");
8
8
  exports.PublicJoinCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person, {
9
9
  firstName: utils_1.PersonFirstNameSchema,
10
10
  lastName: utils_1.PersonLastNameSchema,
11
+ phone: utils_1.PhoneSchema,
11
12
  email: utils_1.EmailSchema,
12
13
  linkedInUrl: utils_1.LinkedInUrlSchema
13
14
  })
@@ -15,6 +16,7 @@ exports.PublicJoinCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.pe
15
16
  firstName: true,
16
17
  lastName: true,
17
18
  email: true,
19
+ phone: true,
18
20
  linkedInUrl: true
19
21
  })
20
22
  .strict();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AAEnC,0CAKuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;IAC/D,SAAS,EAAE,6BAAqB;IAChC,QAAQ,EAAE,4BAAoB;IAC9B,KAAK,EAAE,mBAAW;IAClB,WAAW,EAAE,yBAAiB;CAC/B,CAAC;KACC,IAAI,CAAC;IACJ,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CAClB,CAAC;KACD,MAAM,EAAE,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicJoinCreateSchema = createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n})\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n linkedInUrl: true\n })\n .strict()\n\n//// types\n\n// create\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AAEnC,0CAMuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;IAC/D,SAAS,EAAE,6BAAqB;IAChC,QAAQ,EAAE,4BAAoB;IAC9B,KAAK,EAAE,mBAAW;IAClB,KAAK,EAAE,mBAAW;IAClB,WAAW,EAAE,yBAAiB;CAC/B,CAAC;KACC,IAAI,CAAC;IACJ,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CAClB,CAAC;KACD,MAAM,EAAE,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicJoinCreateSchema = createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n})\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n })\n .strict()\n\n//// types\n\n// create\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\n"]}
package/dist/utils.d.ts CHANGED
@@ -24,4 +24,5 @@ export declare const makeEnumFromObj: <T extends {
24
24
  export declare const PersonFirstNameSchema: z.ZodString;
25
25
  export declare const PersonLastNameSchema: z.ZodString;
26
26
  export declare const EmailSchema: z.ZodEmail;
27
+ export declare const PhoneSchema: z.ZodString;
27
28
  export declare const LinkedInUrlSchema: z.ZodURL;
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinkedInUrlSchema = exports.EmailSchema = exports.PersonLastNameSchema = exports.PersonFirstNameSchema = exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
3
+ exports.LinkedInUrlSchema = exports.PhoneSchema = exports.EmailSchema = exports.PersonLastNameSchema = exports.PersonFirstNameSchema = exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
4
4
  const v4_1 = require("zod/v4");
5
5
  exports.ListQuerySchema = v4_1.z.object({
6
6
  limit: v4_1.z.number().max(1000).optional(),
@@ -18,6 +18,7 @@ exports.makeEnumFromObj = makeEnumFromObj;
18
18
  exports.PersonFirstNameSchema = v4_1.z.string().min(1, 'First name is required');
19
19
  exports.PersonLastNameSchema = v4_1.z.string().min(1, 'Last name is required');
20
20
  exports.EmailSchema = v4_1.z.email('Invalid email address');
21
+ exports.PhoneSchema = v4_1.z.string().min(1, 'Phone number is required');
21
22
  exports.LinkedInUrlSchema = v4_1.z.url({
22
23
  protocol: /^https$/,
23
24
  hostname: /^linkedin\.com$/
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AAEK,MAAM,eAAe,GAAG,CAQ7B,GAAM,EACN,EAAE;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CACL,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ;YACpC,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ,CACrC,CAAA;IACH,CAAC,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAEY,QAAA,qBAAqB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAA;AACnE,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAEjE,QAAA,WAAW,GAAG,MAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;AAC9C,QAAA,iBAAiB,GAAG,MAAC,CAAC,GAAG,CAAC;IACrC,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,iBAAiB;CAC5B,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z.object({}).optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n\nexport const PersonFirstNameSchema = z.string().min(1, 'First name is required')\nexport const PersonLastNameSchema = z.string().min(1, 'Last name is required')\n\nexport const EmailSchema = z.email('Invalid email address')\nexport const LinkedInUrlSchema = z.url({\n protocol: /^https$/,\n hostname: /^linkedin\\.com$/\n})\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AAEK,MAAM,eAAe,GAAG,CAQ7B,GAAM,EACN,EAAE;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CACL,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ;YACpC,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ,CACrC,CAAA;IACH,CAAC,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAEY,QAAA,qBAAqB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAA;AACnE,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAEjE,QAAA,WAAW,GAAG,MAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;AAC9C,QAAA,WAAW,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAA;AAC3D,QAAA,iBAAiB,GAAG,MAAC,CAAC,GAAG,CAAC;IACrC,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,iBAAiB;CAC5B,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z.object({}).optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n\nexport const PersonFirstNameSchema = z.string().min(1, 'First name is required')\nexport const PersonLastNameSchema = z.string().min(1, 'Last name is required')\n\nexport const EmailSchema = z.email('Invalid email address')\nexport const PhoneSchema = z.string().min(1, 'Phone number is required')\nexport const LinkedInUrlSchema = z.url({\n protocol: /^https$/,\n hostname: /^linkedin\\.com$/\n})\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.51",
3
+ "version": "0.2.53",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",