@the-inkwell/shared 0.2.78 → 0.2.80

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.
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod/v4';
2
2
  export declare const AuthOtpCreateSchema: z.ZodObject<{
3
3
  email: z.ZodString;
4
+ isAdmin: z.ZodOptional<z.ZodBoolean>;
4
5
  }, {
5
6
  out: {};
6
7
  in: {};
7
8
  }>;
8
9
  export declare const AuthSignInCreateInputSchema: z.ZodObject<{
9
10
  code: z.ZodString;
10
- isAdmin: z.ZodOptional<z.ZodBoolean>;
11
11
  }, {
12
12
  out: {};
13
13
  in: {};
@@ -4,14 +4,14 @@ exports.AuthSignInCreateInputSchema = exports.AuthOtpCreateSchema = 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
- exports.AuthOtpCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person).pick({
8
- email: true
9
- });
10
- exports.AuthSignInCreateInputSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.otp)
7
+ exports.AuthOtpCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person)
11
8
  .pick({
12
- code: true
9
+ email: true
13
10
  })
14
11
  .extend({
15
12
  isAdmin: v4_1.z.boolean().optional()
16
13
  });
14
+ exports.AuthSignInCreateInputSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.otp).pick({
15
+ code: true
16
+ });
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/auth/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,kCAAqC;AACrC,+BAA0B;AAEb,QAAA,mBAAmB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IACjE,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,2BAA2B,GAAG,IAAA,gCAAkB,EAAC,UAAG,CAAC;KAC/D,IAAI,CAAC;IACJ,IAAI,EAAE,IAAI;CACX,CAAC;KACD,MAAM,CAAC;IACN,OAAO,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person, otp } from '../core'\nimport { z } from 'zod/v4'\n\nexport const AuthOtpCreateSchema = createInsertSchema(person).pick({\n email: true\n})\nexport const AuthSignInCreateInputSchema = createInsertSchema(otp)\n .pick({\n code: true\n })\n .extend({\n isAdmin: z.boolean().optional()\n })\n\nexport type AuthOtpCreateInput = z.infer<typeof AuthOtpCreateSchema>\n\nexport type AuthSignInCreateInput = z.infer<typeof AuthSignInCreateInputSchema>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/auth/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,kCAAqC;AACrC,+BAA0B;AAEb,QAAA,mBAAmB,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC;KAC1D,IAAI,CAAC;IACJ,KAAK,EAAE,IAAI;CACZ,CAAC;KACD,MAAM,CAAC;IACN,OAAO,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AACS,QAAA,2BAA2B,GAAG,IAAA,gCAAkB,EAAC,UAAG,CAAC,CAAC,IAAI,CAAC;IACtE,IAAI,EAAE,IAAI;CACX,CAAC,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person, otp } from '../core'\nimport { z } from 'zod/v4'\n\nexport const AuthOtpCreateSchema = createInsertSchema(person)\n .pick({\n email: true\n })\n .extend({\n isAdmin: z.boolean().optional()\n })\nexport const AuthSignInCreateInputSchema = createInsertSchema(otp).pick({\n code: true\n})\n\nexport type AuthOtpCreateInput = z.infer<typeof AuthOtpCreateSchema>\n\nexport type AuthSignInCreateInput = z.infer<typeof AuthSignInCreateInputSchema>\n"]}
@@ -5,6 +5,7 @@ export declare const PublicJoinCreateSchema: z.ZodObject<{
5
5
  lastName: z.ZodString;
6
6
  linkedInUrl: z.ZodURL;
7
7
  phone: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
8
+ affiliateIdNano: z.ZodOptional<z.ZodString>;
8
9
  }, z.core.$strict>;
9
10
  export declare const PublicJoinCreateResultSchema: z.ZodObject<{
10
11
  person: z.ZodObject<{
@@ -13,12 +13,16 @@ exports.PublicJoinCreateSchema = v4_1.z.strictObject({
13
13
  phone: utils_1.PhoneSchema.optional().or(v4_1.z.literal('')),
14
14
  email: utils_1.EmailSchema,
15
15
  linkedInUrl: utils_1.LinkedInUrlSchema
16
- }).pick({
16
+ })
17
+ .pick({
17
18
  firstName: true,
18
19
  lastName: true,
19
20
  email: true,
20
21
  phone: true,
21
22
  linkedInUrl: true
23
+ })
24
+ .extend({
25
+ affiliateIdNano: v4_1.z.string().optional()
22
26
  }).shape
23
27
  });
24
28
  exports.PublicJoinCreateResultSchema = v4_1.z.strictObject({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,qCAAsE;AACtE,+BAA0B;AAC1B,0CAMuB;AAEvB,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;QAC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C,CAAC,IAAI,EAAE;CACnB,CAAC,CAAA;AACW,QAAA,8BAA8B,GAAG,MAAC,CAAC,YAAY,CAAC;IAC3D,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACjC,mBAAmB,EAAE,IAAI;QACzB,mBAAmB,EAAE,IAAI;QACzB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,IAAI;QACtB,iBAAiB,EAAE,IAAI;KACxB,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,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,IAAI;KACb,CAAC;IACF,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'\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})\nexport const PublicJoinCreateResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n id: true\n })\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 PublicJoinBestPersonCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinBestPersonCreateSchema = 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 PublicJoinNetworksCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinNetworksCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n networksCommunities: true,\n conferencesAttended: true,\n whatsAppGroups: true,\n otherCommunities: true,\n discoveredThrough: true\n }).shape\n})\n\nexport const PublicJoinVerifyCreateSchema = z.strictObject({\n code: z.string()\n})\nexport const PublicJoinVerifyResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n idNano: true\n }),\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<\n typeof PublicJoinCreateResultSchema\n>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\n\n// best persons\nexport type PublicJoinBestPersonCreateParams = z.infer<\n typeof PublicJoinBestPersonCreateParamsSchema\n>\nexport type PublicJoinBestPersonCreateInput = z.infer<\n typeof PublicJoinBestPersonCreateSchema\n>\n\n// networks\nexport type PublicJoinNetworksCreateParams = z.infer<\n typeof PublicJoinNetworksCreateParamsSchema\n>\nexport type PublicJoinNetworksCreateInput = z.infer<\n typeof PublicJoinNetworksCreateSchema\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;AAEvB,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;SACC,IAAI,CAAC;QACJ,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,IAAI;KAClB,CAAC;SACD,MAAM,CAAC;QACN,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC,CAAC,KAAK;CACX,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,MAAC,CAAC,YAAY,CAAC;IACzD,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI;KACT,CAAC;CACH,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;Q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AAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,IAAI;KACb,CAAC;IACF,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'\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 })\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n phone: true,\n linkedInUrl: true\n })\n .extend({\n affiliateIdNano: z.string().optional()\n }).shape\n})\nexport const PublicJoinCreateResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n id: true\n })\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 PublicJoinBestPersonCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinBestPersonCreateSchema = 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 PublicJoinNetworksCreateParamsSchema = z.strictObject({\n personId: z.uuid()\n})\nexport const PublicJoinNetworksCreateSchema = z.strictObject({\n ...createInsertSchema(person).pick({\n networksCommunities: true,\n conferencesAttended: true,\n whatsAppGroups: true,\n otherCommunities: true,\n discoveredThrough: true\n }).shape\n})\n\nexport const PublicJoinVerifyCreateSchema = z.strictObject({\n code: z.string()\n})\nexport const PublicJoinVerifyResultSchema = z.strictObject({\n person: createSelectSchema(person).pick({\n idNano: true\n }),\n code: z.string()\n})\n\n//// types\n\n// default\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\nexport type PublicJoinCreateResult = z.infer<\n typeof PublicJoinCreateResultSchema\n>\n\n// member reasons\nexport type PublicJoinMemberReasonsCreateParams = z.infer<\n typeof PublicJoinMemberReasonsCreateParamsSchema\n>\nexport type PublicJoinMemberReasonsCreateInput = z.infer<\n typeof PublicJoinMemberReasonsCreateSchema\n>\n\n// best persons\nexport type PublicJoinBestPersonCreateParams = z.infer<\n typeof PublicJoinBestPersonCreateParamsSchema\n>\nexport type PublicJoinBestPersonCreateInput = z.infer<\n typeof PublicJoinBestPersonCreateSchema\n>\n\n// networks\nexport type PublicJoinNetworksCreateParams = z.infer<\n typeof PublicJoinNetworksCreateParamsSchema\n>\nexport type PublicJoinNetworksCreateInput = z.infer<\n typeof PublicJoinNetworksCreateSchema\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.78",
3
+ "version": "0.2.80",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",