@the-inkwell/shared 0.2.70 → 0.2.71

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.
@@ -8,7 +8,7 @@ export declare const PublicJoinCreateSchema: z.ZodObject<{
8
8
  }, z.core.$strict>;
9
9
  export declare const PublicJoinMemberReasonsCreateParamsSchema: z.ZodObject<{
10
10
  personId: z.ZodUUID;
11
- }, z.core.$strip>;
11
+ }, z.core.$strict>;
12
12
  export declare const PublicJoinMemberReasonsCreateSchema: z.ZodObject<{
13
13
  memberReasons: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
14
14
  REFER: "REFER";
@@ -16,9 +16,16 @@ export declare const PublicJoinMemberReasonsCreateSchema: z.ZodObject<{
16
16
  APPLY: "APPLY";
17
17
  }>>>>;
18
18
  }, z.core.$strict>;
19
+ export declare const PublicJoinBestPersonsCreateSchema: z.ZodObject<{
20
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ email: z.ZodEmail;
22
+ firstName: z.ZodString;
23
+ lastName: z.ZodString;
24
+ linkedInUrl: z.ZodURL;
25
+ }, z.core.$strict>;
19
26
  export declare const PublicJoinVerifyCreateSchema: z.ZodObject<{
20
27
  code: z.ZodString;
21
- }, z.core.$strip>;
28
+ }, z.core.$strict>;
22
29
  export declare const PublicJoinCreateResult: z.ZodObject<{
23
30
  person: z.ZodObject<{
24
31
  id: z.ZodUUID;
@@ -26,13 +33,14 @@ export declare const PublicJoinCreateResult: z.ZodObject<{
26
33
  out: {};
27
34
  in: {};
28
35
  }>;
29
- }, z.core.$strip>;
36
+ }, z.core.$strict>;
30
37
  export declare const PublicJoinVerifyResultSchema: z.ZodObject<{
31
38
  code: z.ZodString;
32
- }, z.core.$strip>;
39
+ }, z.core.$strict>;
33
40
  export type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>;
34
41
  export type PublicJoinCreateResult = z.infer<typeof PublicJoinCreateResult>;
35
42
  export type PublicJoinMemberReasonsCreateInput = z.infer<typeof PublicJoinMemberReasonsCreateSchema>;
36
43
  export type PublicJoinMemberReasonsCreateParams = z.infer<typeof PublicJoinMemberReasonsCreateParamsSchema>;
44
+ export type PublicJoinBestPersonsCreateInput = z.infer<typeof PublicJoinBestPersonsCreateSchema>;
37
45
  export type PublicJoinVerifyCreateInput = z.infer<typeof PublicJoinVerifyCreateSchema>;
38
46
  export type PublicJoinVerifyCreateResult = z.infer<typeof PublicJoinVerifyResultSchema>;
@@ -1,43 +1,59 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PublicJoinVerifyResultSchema = exports.PublicJoinCreateResult = exports.PublicJoinVerifyCreateSchema = exports.PublicJoinMemberReasonsCreateSchema = exports.PublicJoinMemberReasonsCreateParamsSchema = exports.PublicJoinCreateSchema = void 0;
3
+ exports.PublicJoinVerifyResultSchema = exports.PublicJoinCreateResult = exports.PublicJoinVerifyCreateSchema = exports.PublicJoinBestPersonsCreateSchema = exports.PublicJoinMemberReasonsCreateSchema = exports.PublicJoinMemberReasonsCreateParamsSchema = exports.PublicJoinCreateSchema = void 0;
4
4
  const drizzle_zod_1 = require("drizzle-zod");
5
5
  const core_1 = require("../../core");
6
6
  const v4_1 = require("zod/v4");
7
7
  const utils_1 = require("../../../utils");
8
8
  //// validators
9
- exports.PublicJoinCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person, {
10
- firstName: utils_1.PersonFirstNameSchema,
11
- lastName: utils_1.PersonLastNameSchema,
12
- phone: utils_1.PhoneSchema.optional().or(v4_1.z.literal('')),
13
- email: utils_1.EmailSchema,
14
- linkedInUrl: utils_1.LinkedInUrlSchema
15
- })
16
- .pick({
17
- firstName: true,
18
- lastName: true,
19
- email: true,
20
- phone: true,
21
- linkedInUrl: true
22
- })
23
- .strict();
24
- exports.PublicJoinMemberReasonsCreateParamsSchema = v4_1.z.object({
9
+ exports.PublicJoinCreateSchema = v4_1.z.strictObject({
10
+ ...(0, drizzle_zod_1.createInsertSchema)(core_1.person, {
11
+ firstName: utils_1.PersonFirstNameSchema,
12
+ lastName: utils_1.PersonLastNameSchema,
13
+ phone: utils_1.PhoneSchema.optional().or(v4_1.z.literal('')),
14
+ email: utils_1.EmailSchema,
15
+ linkedInUrl: utils_1.LinkedInUrlSchema
16
+ }).pick({
17
+ firstName: true,
18
+ lastName: true,
19
+ email: true,
20
+ phone: true,
21
+ linkedInUrl: true
22
+ }).shape
23
+ });
24
+ exports.PublicJoinMemberReasonsCreateParamsSchema = v4_1.z.strictObject({
25
25
  personId: v4_1.z.uuid()
26
26
  });
27
- exports.PublicJoinMemberReasonsCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person)
28
- .pick({
29
- memberReasons: true
30
- })
31
- .strict();
32
- exports.PublicJoinVerifyCreateSchema = v4_1.z.object({
27
+ exports.PublicJoinMemberReasonsCreateSchema = v4_1.z.strictObject({
28
+ ...(0, drizzle_zod_1.createInsertSchema)(core_1.person).pick({
29
+ memberReasons: true
30
+ }).shape
31
+ });
32
+ exports.PublicJoinBestPersonsCreateSchema = v4_1.z.strictObject({
33
+ ...(0, drizzle_zod_1.createInsertSchema)(core_1.person, {
34
+ firstName: utils_1.PersonFirstNameSchema,
35
+ lastName: utils_1.PersonLastNameSchema,
36
+ email: utils_1.EmailSchema,
37
+ linkedInUrl: utils_1.LinkedInUrlSchema
38
+ }).pick({
39
+ firstName: true,
40
+ lastName: true,
41
+ email: true,
42
+ linkedInUrl: true
43
+ }).shape,
44
+ ...(0, drizzle_zod_1.createInsertSchema)(core_1.personToBestPerson).pick({
45
+ description: true
46
+ }).shape
47
+ });
48
+ exports.PublicJoinVerifyCreateSchema = v4_1.z.strictObject({
33
49
  code: v4_1.z.string()
34
50
  });
35
- exports.PublicJoinCreateResult = v4_1.z.object({
51
+ exports.PublicJoinCreateResult = v4_1.z.strictObject({
36
52
  person: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
37
53
  id: true
38
54
  })
39
55
  });
40
- exports.PublicJoinVerifyResultSchema = v4_1.z.object({
56
+ exports.PublicJoinVerifyResultSchema = v4_1.z.strictObject({
41
57
  code: v4_1.z.string()
42
58
  });
43
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAAkD;AAClD,+BAA0B;AAC1B,0CAMuB;AAGvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;IAC/D,SAAS,EAAE,6BAAqB;IAChC,QAAQ,EAAE,4BAAoB;IAC9B,KAAK,EAAE,mBAAW,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/C,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;AAEE,QAAA,yCAAyC,GAAG,MAAC,CAAC,MAAM,CAAC;IAChE,QAAQ,EAAE,MAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAA;AACW,QAAA,mCAAmC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAC1E,IAAI,CAAC;IACJ,aAAa,EAAE,IAAI;CACpB,CAAC;KACD,MAAM,EAAE,CAAA;AAEE,QAAA,4BAA4B,GAAG,MAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AACW,QAAA,sBAAsB,GAAG,MAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI;KACT,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,MAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA","sourcesContent":["import { createInsertSchema, createSelectSchema } from 'drizzle-zod'\nimport { MemberReasons, person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\nimport { MEMBER_REASONS } from '../../../constants'\n\n//// validators\n\nexport const PublicJoinCreateSchema = createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema.optional().or(z.literal('')),\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\nexport const PublicJoinMemberReasonsCreateParamsSchema = z.object({\n personId: z.uuid()\n})\nexport const PublicJoinMemberReasonsCreateSchema = createInsertSchema(person)\n .pick({\n memberReasons: true\n })\n .strict()\n\nexport const PublicJoinVerifyCreateSchema = z.object({\n code: z.string()\n})\nexport const PublicJoinCreateResult = z.object({\n person: createSelectSchema(person).pick({\n id: true\n })\n})\n\nexport const PublicJoinVerifyResultSchema = z.object({\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<typeof PublicJoinCreateResult>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\n\n// verify\nexport type PublicJoinVerifyCreateInput = z.infer<\n typeof PublicJoinVerifyCreateSchema\n>\nexport type PublicJoinVerifyCreateResult = z.infer<\n typeof PublicJoinVerifyResultSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAAsE;AACtE,+BAA0B;AAC1B,0CAMuB;AAGvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EAAE,6BAAqB;QAChC,QAAQ,EAAE,4BAAoB;QAC9B,KAAK,EAAE,mBAAW,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,MAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC/C,KAAK,EAAE,mBAAW;QAClB,WAAW,EAAE,yBAAiB;KAC/B,CAAC,CAAC,IAAI,CAAC;QACN,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,yCAAyC,GAAG,MAAC,CAAC,YAAY,CAAC;IACtE,QAAQ,EAAE,MAAC,CAAC,IAAI,EAAE;CACnB,CAAC,CAAA;AACW,QAAA,mCAAmC,GAAG,MAAC,CAAC,YAAY,CAAC;IAChE,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,iCAAiC,GAAG,MAAC,CAAC,YAAY,CAAC;IAC9D,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;QAC5B,SAAS,EAAE,6BAAqB;QAChC,QAAQ,EAAE,4BAAoB;QAC9B,KAAK,EAAE,mBAAW;QAClB,WAAW,EAAE,yBAAiB;KAC/B,CAAC,CAAC,IAAI,CAAC;QACN,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC,KAAK;IACR,GAAG,IAAA,gCAAkB,EAAC,yBAAkB,CAAC,CAAC,IAAI,CAAC;QAC7C,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC,KAAK;CACT,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AACW,QAAA,sBAAsB,GAAG,MAAC,CAAC,YAAY,CAAC;IACnD,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI;KACT,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA","sourcesContent":["import { createInsertSchema, createSelectSchema } from 'drizzle-zod'\nimport { MemberReasons, person, personToBestPerson } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\nimport { MEMBER_REASONS } from '../../../constants'\n\n//// validators\n\nexport const PublicJoinCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema.optional().or(z.literal('')),\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n }).shape\n})\n\nexport const PublicJoinMemberReasonsCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinMemberReasonsCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n memberReasons: true\n }).shape\n})\n\nexport const PublicJoinBestPersonsCreateSchema = z.strictObject({\n ...createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n }).pick({\n firstName: true,\n lastName: true,\n email: true,\n linkedInUrl: true\n }).shape,\n ...createInsertSchema(personToBestPerson).pick({\n description: true\n }).shape\n})\n\nexport const PublicJoinVerifyCreateSchema = z.strictObject({\n code: z.string()\n})\nexport const PublicJoinCreateResult = z.strictObject({\n person: createSelectSchema(person).pick({\n id: true\n })\n})\n\nexport const PublicJoinVerifyResultSchema = z.strictObject({\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<typeof PublicJoinCreateResult>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\n\n// best persons\nexport type PublicJoinBestPersonsCreateInput = z.infer<\n typeof PublicJoinBestPersonsCreateSchema\n>\n\n// verify\nexport type PublicJoinVerifyCreateInput = z.infer<\n typeof PublicJoinVerifyCreateSchema\n>\nexport type PublicJoinVerifyCreateResult = z.infer<\n typeof PublicJoinVerifyResultSchema\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.70",
3
+ "version": "0.2.71",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",