@tripsam/onboarding 1.0.0 → 1.0.1

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.
package/dist/index.cjs CHANGED
@@ -27,16 +27,20 @@ module.exports = __toCommonJS(index_exports);
27
27
  // src/verify-email.ts
28
28
  var verify_email_exports = {};
29
29
  __export(verify_email_exports, {
30
- checkMe: () => checkMe,
31
- login: () => login
30
+ sendOtp: () => sendOtp,
31
+ verifyOtp: () => verifyOtp,
32
+ verifyOtpResponse: () => verifyOtpResponse
32
33
  });
33
34
  var import_zod = require("zod");
34
- var checkMe = import_zod.z.object({
35
+ var sendOtp = import_zod.z.object({
35
36
  email: import_zod.z.email("invalid").nonempty("required").trim().toLowerCase()
36
37
  });
37
- var login = import_zod.z.object({
38
- username: import_zod.z.string().min(1, { message: "required" }).trim().toLowerCase(),
39
- password: import_zod.z.string().min(1, { message: "required" })
38
+ var verifyOtp = import_zod.z.object({
39
+ otp: import_zod.z.string().min(4, { message: "required" }),
40
+ email: import_zod.z.string().optional()
41
+ });
42
+ var verifyOtpResponse = import_zod.z.object({
43
+ id: import_zod.z.uuid("invalid")
40
44
  });
41
45
  // Annotate the CommonJS export names for ESM import in node:
42
46
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -1,21 +1,27 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const checkMe: z.ZodObject<{
3
+ declare const sendOtp: z.ZodObject<{
4
4
  email: z.ZodEmail;
5
5
  }, z.core.$strip>;
6
- type SafeCheckMe = z.output<typeof checkMe>;
7
- declare const login: z.ZodObject<{
8
- username: z.ZodString;
9
- password: z.ZodString;
6
+ declare const verifyOtp: z.ZodObject<{
7
+ otp: z.ZodString;
8
+ email: z.ZodOptional<z.ZodString>;
10
9
  }, z.core.$strip>;
11
- type SafeLogin = z.output<typeof login>;
10
+ declare const verifyOtpResponse: z.ZodObject<{
11
+ id: z.ZodUUID;
12
+ }, z.core.$strip>;
13
+ type SafeSendOtp = z.output<typeof sendOtp>;
14
+ type SafeVerifyOtp = z.output<typeof verifyOtp>;
15
+ type SafeVerifyOtpResponse = z.output<typeof verifyOtpResponse>;
12
16
 
13
- type verifyEmail_SafeCheckMe = SafeCheckMe;
14
- type verifyEmail_SafeLogin = SafeLogin;
15
- declare const verifyEmail_checkMe: typeof checkMe;
16
- declare const verifyEmail_login: typeof login;
17
+ type verifyEmail_SafeSendOtp = SafeSendOtp;
18
+ type verifyEmail_SafeVerifyOtp = SafeVerifyOtp;
19
+ type verifyEmail_SafeVerifyOtpResponse = SafeVerifyOtpResponse;
20
+ declare const verifyEmail_sendOtp: typeof sendOtp;
21
+ declare const verifyEmail_verifyOtp: typeof verifyOtp;
22
+ declare const verifyEmail_verifyOtpResponse: typeof verifyOtpResponse;
17
23
  declare namespace verifyEmail {
18
- export { type verifyEmail_SafeCheckMe as SafeCheckMe, type verifyEmail_SafeLogin as SafeLogin, verifyEmail_checkMe as checkMe, verifyEmail_login as login };
24
+ export { type verifyEmail_SafeSendOtp as SafeSendOtp, type verifyEmail_SafeVerifyOtp as SafeVerifyOtp, type verifyEmail_SafeVerifyOtpResponse as SafeVerifyOtpResponse, verifyEmail_sendOtp as sendOtp, verifyEmail_verifyOtp as verifyOtp, verifyEmail_verifyOtpResponse as verifyOtpResponse };
19
25
  }
20
26
 
21
27
  export { verifyEmail as VerifyEmail };
package/dist/index.d.ts CHANGED
@@ -1,21 +1,27 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const checkMe: z.ZodObject<{
3
+ declare const sendOtp: z.ZodObject<{
4
4
  email: z.ZodEmail;
5
5
  }, z.core.$strip>;
6
- type SafeCheckMe = z.output<typeof checkMe>;
7
- declare const login: z.ZodObject<{
8
- username: z.ZodString;
9
- password: z.ZodString;
6
+ declare const verifyOtp: z.ZodObject<{
7
+ otp: z.ZodString;
8
+ email: z.ZodOptional<z.ZodString>;
10
9
  }, z.core.$strip>;
11
- type SafeLogin = z.output<typeof login>;
10
+ declare const verifyOtpResponse: z.ZodObject<{
11
+ id: z.ZodUUID;
12
+ }, z.core.$strip>;
13
+ type SafeSendOtp = z.output<typeof sendOtp>;
14
+ type SafeVerifyOtp = z.output<typeof verifyOtp>;
15
+ type SafeVerifyOtpResponse = z.output<typeof verifyOtpResponse>;
12
16
 
13
- type verifyEmail_SafeCheckMe = SafeCheckMe;
14
- type verifyEmail_SafeLogin = SafeLogin;
15
- declare const verifyEmail_checkMe: typeof checkMe;
16
- declare const verifyEmail_login: typeof login;
17
+ type verifyEmail_SafeSendOtp = SafeSendOtp;
18
+ type verifyEmail_SafeVerifyOtp = SafeVerifyOtp;
19
+ type verifyEmail_SafeVerifyOtpResponse = SafeVerifyOtpResponse;
20
+ declare const verifyEmail_sendOtp: typeof sendOtp;
21
+ declare const verifyEmail_verifyOtp: typeof verifyOtp;
22
+ declare const verifyEmail_verifyOtpResponse: typeof verifyOtpResponse;
17
23
  declare namespace verifyEmail {
18
- export { type verifyEmail_SafeCheckMe as SafeCheckMe, type verifyEmail_SafeLogin as SafeLogin, verifyEmail_checkMe as checkMe, verifyEmail_login as login };
24
+ export { type verifyEmail_SafeSendOtp as SafeSendOtp, type verifyEmail_SafeVerifyOtp as SafeVerifyOtp, type verifyEmail_SafeVerifyOtpResponse as SafeVerifyOtpResponse, verifyEmail_sendOtp as sendOtp, verifyEmail_verifyOtp as verifyOtp, verifyEmail_verifyOtpResponse as verifyOtpResponse };
19
25
  }
20
26
 
21
27
  export { verifyEmail as VerifyEmail };
package/dist/index.js CHANGED
@@ -7,16 +7,20 @@ var __export = (target, all) => {
7
7
  // src/verify-email.ts
8
8
  var verify_email_exports = {};
9
9
  __export(verify_email_exports, {
10
- checkMe: () => checkMe,
11
- login: () => login
10
+ sendOtp: () => sendOtp,
11
+ verifyOtp: () => verifyOtp,
12
+ verifyOtpResponse: () => verifyOtpResponse
12
13
  });
13
14
  import { z } from "zod";
14
- var checkMe = z.object({
15
+ var sendOtp = z.object({
15
16
  email: z.email("invalid").nonempty("required").trim().toLowerCase()
16
17
  });
17
- var login = z.object({
18
- username: z.string().min(1, { message: "required" }).trim().toLowerCase(),
19
- password: z.string().min(1, { message: "required" })
18
+ var verifyOtp = z.object({
19
+ otp: z.string().min(4, { message: "required" }),
20
+ email: z.string().optional()
21
+ });
22
+ var verifyOtpResponse = z.object({
23
+ id: z.uuid("invalid")
20
24
  });
21
25
  export {
22
26
  verify_email_exports as VerifyEmail
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tripsam/onboarding",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",