@tripsam/main 2.0.0 → 2.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 +98 -7
- package/dist/index.d.cts +106 -9
- package/dist/index.d.ts +106 -9
- package/dist/index.js +93 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,21 +20,112 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
Auth: () => auth_exports
|
|
23
|
+
Auth: () => auth_exports,
|
|
24
|
+
Location: () => location_exports,
|
|
25
|
+
ResetPassword: () => reset_password_exports,
|
|
26
|
+
Signup: () => signup_exports,
|
|
27
|
+
User: () => user_exports
|
|
24
28
|
});
|
|
25
29
|
module.exports = __toCommonJS(index_exports);
|
|
26
30
|
|
|
27
31
|
// src/auth.ts
|
|
28
32
|
var auth_exports = {};
|
|
29
33
|
__export(auth_exports, {
|
|
30
|
-
|
|
34
|
+
checkMe: () => checkMe,
|
|
35
|
+
login: () => login
|
|
31
36
|
});
|
|
32
37
|
var import_zod = require("zod");
|
|
33
|
-
var
|
|
34
|
-
email: import_zod.z.
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
var checkMe = import_zod.z.object({
|
|
39
|
+
email: import_zod.z.email("invalid").nonempty("required").trim().toLowerCase()
|
|
40
|
+
});
|
|
41
|
+
var login = import_zod.z.object({
|
|
42
|
+
username: import_zod.z.string().min(1, { message: "required" }).trim().toLowerCase(),
|
|
43
|
+
password: import_zod.z.string().min(1, { message: "required" })
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// src/signup.ts
|
|
47
|
+
var signup_exports = {};
|
|
48
|
+
__export(signup_exports, {
|
|
49
|
+
onboard: () => onboard,
|
|
50
|
+
sendOtp: () => sendOtp,
|
|
51
|
+
verifyOtp: () => verifyOtp
|
|
52
|
+
});
|
|
53
|
+
var import_zod2 = require("zod");
|
|
54
|
+
var sendOtp = import_zod2.z.object({
|
|
55
|
+
email: import_zod2.z.email("invalid").nonempty("required").trim().toLowerCase()
|
|
56
|
+
});
|
|
57
|
+
var verifyOtp = import_zod2.z.object({
|
|
58
|
+
otp: import_zod2.z.string().min(4, { message: "required" }),
|
|
59
|
+
email: import_zod2.z.string().optional()
|
|
60
|
+
});
|
|
61
|
+
var onboard = import_zod2.z.object({
|
|
62
|
+
email: import_zod2.z.string().optional(),
|
|
63
|
+
token: import_zod2.z.string().optional(),
|
|
64
|
+
countryCode: import_zod2.z.string().optional().default("+91"),
|
|
65
|
+
name: import_zod2.z.string().trim().nonempty("required").min(3, "min"),
|
|
66
|
+
phone: import_zod2.z.string().trim().regex(/^\d{7,12}$/, { message: "invalid" }),
|
|
67
|
+
password: import_zod2.z.string().nonempty("required").min(8, "min").max(20, "max")
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// src/reset-password.ts
|
|
71
|
+
var reset_password_exports = {};
|
|
72
|
+
__export(reset_password_exports, {
|
|
73
|
+
sendOtp: () => sendOtp2,
|
|
74
|
+
updatePassword: () => updatePassword,
|
|
75
|
+
verifyOtp: () => verifyOtp2
|
|
76
|
+
});
|
|
77
|
+
var import_zod3 = require("zod");
|
|
78
|
+
var sendOtp2 = import_zod3.z.object({
|
|
79
|
+
email: import_zod3.z.email("invalid").nonempty("required").trim().toLowerCase()
|
|
80
|
+
});
|
|
81
|
+
var verifyOtp2 = import_zod3.z.object({
|
|
82
|
+
otp: import_zod3.z.string().min(4, { message: "required" }),
|
|
83
|
+
email: import_zod3.z.string().optional()
|
|
84
|
+
});
|
|
85
|
+
var updatePassword = import_zod3.z.object({
|
|
86
|
+
email: import_zod3.z.string().optional(),
|
|
87
|
+
token: import_zod3.z.string().optional(),
|
|
88
|
+
password: import_zod3.z.string().nonempty("required").min(8, "min").max(20, "max")
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// src/user.ts
|
|
92
|
+
var user_exports = {};
|
|
93
|
+
__export(user_exports, {
|
|
94
|
+
updatePassword: () => updatePassword2,
|
|
95
|
+
updateProfile: () => updateProfile,
|
|
96
|
+
verifyOtp: () => verifyOtp3
|
|
97
|
+
});
|
|
98
|
+
var import_zod4 = require("zod");
|
|
99
|
+
var updatePassword2 = import_zod4.z.object({
|
|
100
|
+
password: import_zod4.z.string().nonempty("required").min(8, "min").max(20, "max"),
|
|
101
|
+
oldPassword: import_zod4.z.string().nonempty("required")
|
|
102
|
+
});
|
|
103
|
+
var updateProfile = import_zod4.z.object({
|
|
104
|
+
country: import_zod4.z.string().optional().default("+91"),
|
|
105
|
+
fullName: import_zod4.z.string().transform((s) => s.trim()).refine((s) => s === "" || s.length >= 3, { message: "min" }),
|
|
106
|
+
phoneNumber: import_zod4.z.string().trim().regex(/^\d{7,12}$/, { message: "invalid" })
|
|
107
|
+
});
|
|
108
|
+
var verifyOtp3 = import_zod4.z.object({
|
|
109
|
+
otp: import_zod4.z.string().min(4, { message: "required" })
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// src/location.ts
|
|
113
|
+
var location_exports = {};
|
|
114
|
+
__export(location_exports, {
|
|
115
|
+
suggest: () => suggest
|
|
116
|
+
});
|
|
117
|
+
var import_zod5 = require("zod");
|
|
118
|
+
var suggest = import_zod5.z.object({
|
|
119
|
+
q: import_zod5.z.string().trim().optional().default(""),
|
|
120
|
+
lat: import_zod5.z.coerce.number().optional(),
|
|
121
|
+
lng: import_zod5.z.coerce.number().optional(),
|
|
122
|
+
limit: import_zod5.z.coerce.number().int().min(1).max(50).default(20)
|
|
123
|
+
});
|
|
37
124
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38
125
|
0 && (module.exports = {
|
|
39
|
-
Auth
|
|
126
|
+
Auth,
|
|
127
|
+
Location,
|
|
128
|
+
ResetPassword,
|
|
129
|
+
Signup,
|
|
130
|
+
User
|
|
40
131
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,113 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const checkMe: z.ZodObject<{
|
|
4
|
+
email: z.ZodEmail;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type SafeCheckMe = z.output<typeof checkMe>;
|
|
7
|
+
declare const login: z.ZodObject<{
|
|
8
|
+
username: z.ZodString;
|
|
6
9
|
password: z.ZodString;
|
|
7
|
-
}, z.core.$
|
|
8
|
-
type
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type SafeLogin = z.output<typeof login>;
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
type
|
|
13
|
+
type auth_SafeCheckMe = SafeCheckMe;
|
|
14
|
+
type auth_SafeLogin = SafeLogin;
|
|
15
|
+
declare const auth_checkMe: typeof checkMe;
|
|
16
|
+
declare const auth_login: typeof login;
|
|
12
17
|
declare namespace auth {
|
|
13
|
-
export {
|
|
18
|
+
export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, auth_checkMe as checkMe, auth_login as login };
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
declare const sendOtp$1: z.ZodObject<{
|
|
22
|
+
email: z.ZodEmail;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
type SafeSendOtp$1 = z.output<typeof sendOtp$1>;
|
|
25
|
+
declare const verifyOtp$2: z.ZodObject<{
|
|
26
|
+
otp: z.ZodString;
|
|
27
|
+
email: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
type SafeVerifyOtp$2 = z.output<typeof verifyOtp$2>;
|
|
30
|
+
declare const onboard: z.ZodObject<{
|
|
31
|
+
email: z.ZodOptional<z.ZodString>;
|
|
32
|
+
token: z.ZodOptional<z.ZodString>;
|
|
33
|
+
countryCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
phone: z.ZodString;
|
|
36
|
+
password: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type SafeOnboard = z.output<typeof onboard>;
|
|
39
|
+
|
|
40
|
+
type signup_SafeOnboard = SafeOnboard;
|
|
41
|
+
declare const signup_onboard: typeof onboard;
|
|
42
|
+
declare namespace signup {
|
|
43
|
+
export { type signup_SafeOnboard as SafeOnboard, type SafeSendOtp$1 as SafeSendOtp, type SafeVerifyOtp$2 as SafeVerifyOtp, signup_onboard as onboard, sendOtp$1 as sendOtp, verifyOtp$2 as verifyOtp };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare const sendOtp: z.ZodObject<{
|
|
47
|
+
email: z.ZodEmail;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
type SafeSendOtp = z.infer<typeof sendOtp>;
|
|
50
|
+
declare const verifyOtp$1: z.ZodObject<{
|
|
51
|
+
otp: z.ZodString;
|
|
52
|
+
email: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
type SafeVerifyOtp$1 = z.infer<typeof verifyOtp$1>;
|
|
55
|
+
declare const updatePassword$1: z.ZodObject<{
|
|
56
|
+
email: z.ZodOptional<z.ZodString>;
|
|
57
|
+
token: z.ZodOptional<z.ZodString>;
|
|
58
|
+
password: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
type SafeUpdatePassword$1 = z.infer<typeof updatePassword$1>;
|
|
61
|
+
|
|
62
|
+
type resetPassword_SafeSendOtp = SafeSendOtp;
|
|
63
|
+
declare const resetPassword_sendOtp: typeof sendOtp;
|
|
64
|
+
declare namespace resetPassword {
|
|
65
|
+
export { type resetPassword_SafeSendOtp as SafeSendOtp, type SafeUpdatePassword$1 as SafeUpdatePassword, type SafeVerifyOtp$1 as SafeVerifyOtp, resetPassword_sendOtp as sendOtp, updatePassword$1 as updatePassword, verifyOtp$1 as verifyOtp };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare const updatePassword: z.ZodObject<{
|
|
69
|
+
password: z.ZodString;
|
|
70
|
+
oldPassword: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
type SafeUpdatePassword = z.infer<typeof updatePassword>;
|
|
73
|
+
declare const updateProfile: z.ZodObject<{
|
|
74
|
+
country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
75
|
+
fullName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
76
|
+
phoneNumber: z.ZodString;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type SafeUpdateProfile = z.infer<typeof updateProfile>;
|
|
79
|
+
declare const verifyOtp: z.ZodObject<{
|
|
80
|
+
otp: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
type SafeVerifyOtp = z.infer<typeof verifyOtp>;
|
|
83
|
+
|
|
84
|
+
type user_SafeUpdatePassword = SafeUpdatePassword;
|
|
85
|
+
type user_SafeUpdateProfile = SafeUpdateProfile;
|
|
86
|
+
type user_SafeVerifyOtp = SafeVerifyOtp;
|
|
87
|
+
declare const user_updatePassword: typeof updatePassword;
|
|
88
|
+
declare const user_updateProfile: typeof updateProfile;
|
|
89
|
+
declare const user_verifyOtp: typeof verifyOtp;
|
|
90
|
+
declare namespace user {
|
|
91
|
+
export { type user_SafeUpdatePassword as SafeUpdatePassword, type user_SafeUpdateProfile as SafeUpdateProfile, type user_SafeVerifyOtp as SafeVerifyOtp, user_updatePassword as updatePassword, user_updateProfile as updateProfile, user_verifyOtp as verifyOtp };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* q: free text (matches name, area, landmark labels, tag names)
|
|
96
|
+
* lat/lng: optional; filter locations whose bounding box contains the point
|
|
97
|
+
* limit: number of results
|
|
98
|
+
*/
|
|
99
|
+
declare const suggest: z.ZodObject<{
|
|
100
|
+
q: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
101
|
+
lat: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
102
|
+
lng: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
103
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
type SafeSuggest = z.output<typeof suggest>;
|
|
106
|
+
|
|
107
|
+
type location_SafeSuggest = SafeSuggest;
|
|
108
|
+
declare const location_suggest: typeof suggest;
|
|
109
|
+
declare namespace location {
|
|
110
|
+
export { type location_SafeSuggest as SafeSuggest, location_suggest as suggest };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { auth as Auth, location as Location, resetPassword as ResetPassword, signup as Signup, user as User };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,113 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const checkMe: z.ZodObject<{
|
|
4
|
+
email: z.ZodEmail;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type SafeCheckMe = z.output<typeof checkMe>;
|
|
7
|
+
declare const login: z.ZodObject<{
|
|
8
|
+
username: z.ZodString;
|
|
6
9
|
password: z.ZodString;
|
|
7
|
-
}, z.core.$
|
|
8
|
-
type
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type SafeLogin = z.output<typeof login>;
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
type
|
|
13
|
+
type auth_SafeCheckMe = SafeCheckMe;
|
|
14
|
+
type auth_SafeLogin = SafeLogin;
|
|
15
|
+
declare const auth_checkMe: typeof checkMe;
|
|
16
|
+
declare const auth_login: typeof login;
|
|
12
17
|
declare namespace auth {
|
|
13
|
-
export {
|
|
18
|
+
export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, auth_checkMe as checkMe, auth_login as login };
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
declare const sendOtp$1: z.ZodObject<{
|
|
22
|
+
email: z.ZodEmail;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
type SafeSendOtp$1 = z.output<typeof sendOtp$1>;
|
|
25
|
+
declare const verifyOtp$2: z.ZodObject<{
|
|
26
|
+
otp: z.ZodString;
|
|
27
|
+
email: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
type SafeVerifyOtp$2 = z.output<typeof verifyOtp$2>;
|
|
30
|
+
declare const onboard: z.ZodObject<{
|
|
31
|
+
email: z.ZodOptional<z.ZodString>;
|
|
32
|
+
token: z.ZodOptional<z.ZodString>;
|
|
33
|
+
countryCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
phone: z.ZodString;
|
|
36
|
+
password: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type SafeOnboard = z.output<typeof onboard>;
|
|
39
|
+
|
|
40
|
+
type signup_SafeOnboard = SafeOnboard;
|
|
41
|
+
declare const signup_onboard: typeof onboard;
|
|
42
|
+
declare namespace signup {
|
|
43
|
+
export { type signup_SafeOnboard as SafeOnboard, type SafeSendOtp$1 as SafeSendOtp, type SafeVerifyOtp$2 as SafeVerifyOtp, signup_onboard as onboard, sendOtp$1 as sendOtp, verifyOtp$2 as verifyOtp };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare const sendOtp: z.ZodObject<{
|
|
47
|
+
email: z.ZodEmail;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
type SafeSendOtp = z.infer<typeof sendOtp>;
|
|
50
|
+
declare const verifyOtp$1: z.ZodObject<{
|
|
51
|
+
otp: z.ZodString;
|
|
52
|
+
email: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
type SafeVerifyOtp$1 = z.infer<typeof verifyOtp$1>;
|
|
55
|
+
declare const updatePassword$1: z.ZodObject<{
|
|
56
|
+
email: z.ZodOptional<z.ZodString>;
|
|
57
|
+
token: z.ZodOptional<z.ZodString>;
|
|
58
|
+
password: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
type SafeUpdatePassword$1 = z.infer<typeof updatePassword$1>;
|
|
61
|
+
|
|
62
|
+
type resetPassword_SafeSendOtp = SafeSendOtp;
|
|
63
|
+
declare const resetPassword_sendOtp: typeof sendOtp;
|
|
64
|
+
declare namespace resetPassword {
|
|
65
|
+
export { type resetPassword_SafeSendOtp as SafeSendOtp, type SafeUpdatePassword$1 as SafeUpdatePassword, type SafeVerifyOtp$1 as SafeVerifyOtp, resetPassword_sendOtp as sendOtp, updatePassword$1 as updatePassword, verifyOtp$1 as verifyOtp };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare const updatePassword: z.ZodObject<{
|
|
69
|
+
password: z.ZodString;
|
|
70
|
+
oldPassword: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
type SafeUpdatePassword = z.infer<typeof updatePassword>;
|
|
73
|
+
declare const updateProfile: z.ZodObject<{
|
|
74
|
+
country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
75
|
+
fullName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
76
|
+
phoneNumber: z.ZodString;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type SafeUpdateProfile = z.infer<typeof updateProfile>;
|
|
79
|
+
declare const verifyOtp: z.ZodObject<{
|
|
80
|
+
otp: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
type SafeVerifyOtp = z.infer<typeof verifyOtp>;
|
|
83
|
+
|
|
84
|
+
type user_SafeUpdatePassword = SafeUpdatePassword;
|
|
85
|
+
type user_SafeUpdateProfile = SafeUpdateProfile;
|
|
86
|
+
type user_SafeVerifyOtp = SafeVerifyOtp;
|
|
87
|
+
declare const user_updatePassword: typeof updatePassword;
|
|
88
|
+
declare const user_updateProfile: typeof updateProfile;
|
|
89
|
+
declare const user_verifyOtp: typeof verifyOtp;
|
|
90
|
+
declare namespace user {
|
|
91
|
+
export { type user_SafeUpdatePassword as SafeUpdatePassword, type user_SafeUpdateProfile as SafeUpdateProfile, type user_SafeVerifyOtp as SafeVerifyOtp, user_updatePassword as updatePassword, user_updateProfile as updateProfile, user_verifyOtp as verifyOtp };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* q: free text (matches name, area, landmark labels, tag names)
|
|
96
|
+
* lat/lng: optional; filter locations whose bounding box contains the point
|
|
97
|
+
* limit: number of results
|
|
98
|
+
*/
|
|
99
|
+
declare const suggest: z.ZodObject<{
|
|
100
|
+
q: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
101
|
+
lat: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
102
|
+
lng: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
103
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
type SafeSuggest = z.output<typeof suggest>;
|
|
106
|
+
|
|
107
|
+
type location_SafeSuggest = SafeSuggest;
|
|
108
|
+
declare const location_suggest: typeof suggest;
|
|
109
|
+
declare namespace location {
|
|
110
|
+
export { type location_SafeSuggest as SafeSuggest, location_suggest as suggest };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { auth as Auth, location as Location, resetPassword as ResetPassword, signup as Signup, user as User };
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,100 @@ var __export = (target, all) => {
|
|
|
7
7
|
// src/auth.ts
|
|
8
8
|
var auth_exports = {};
|
|
9
9
|
__export(auth_exports, {
|
|
10
|
-
|
|
10
|
+
checkMe: () => checkMe,
|
|
11
|
+
login: () => login
|
|
11
12
|
});
|
|
12
13
|
import { z } from "zod";
|
|
13
|
-
var
|
|
14
|
-
email: z.
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var checkMe = z.object({
|
|
15
|
+
email: z.email("invalid").nonempty("required").trim().toLowerCase()
|
|
16
|
+
});
|
|
17
|
+
var login = z.object({
|
|
18
|
+
username: z.string().min(1, { message: "required" }).trim().toLowerCase(),
|
|
19
|
+
password: z.string().min(1, { message: "required" })
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// src/signup.ts
|
|
23
|
+
var signup_exports = {};
|
|
24
|
+
__export(signup_exports, {
|
|
25
|
+
onboard: () => onboard,
|
|
26
|
+
sendOtp: () => sendOtp,
|
|
27
|
+
verifyOtp: () => verifyOtp
|
|
28
|
+
});
|
|
29
|
+
import { z as z2 } from "zod";
|
|
30
|
+
var sendOtp = z2.object({
|
|
31
|
+
email: z2.email("invalid").nonempty("required").trim().toLowerCase()
|
|
32
|
+
});
|
|
33
|
+
var verifyOtp = z2.object({
|
|
34
|
+
otp: z2.string().min(4, { message: "required" }),
|
|
35
|
+
email: z2.string().optional()
|
|
36
|
+
});
|
|
37
|
+
var onboard = z2.object({
|
|
38
|
+
email: z2.string().optional(),
|
|
39
|
+
token: z2.string().optional(),
|
|
40
|
+
countryCode: z2.string().optional().default("+91"),
|
|
41
|
+
name: z2.string().trim().nonempty("required").min(3, "min"),
|
|
42
|
+
phone: z2.string().trim().regex(/^\d{7,12}$/, { message: "invalid" }),
|
|
43
|
+
password: z2.string().nonempty("required").min(8, "min").max(20, "max")
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// src/reset-password.ts
|
|
47
|
+
var reset_password_exports = {};
|
|
48
|
+
__export(reset_password_exports, {
|
|
49
|
+
sendOtp: () => sendOtp2,
|
|
50
|
+
updatePassword: () => updatePassword,
|
|
51
|
+
verifyOtp: () => verifyOtp2
|
|
52
|
+
});
|
|
53
|
+
import { z as z3 } from "zod";
|
|
54
|
+
var sendOtp2 = z3.object({
|
|
55
|
+
email: z3.email("invalid").nonempty("required").trim().toLowerCase()
|
|
56
|
+
});
|
|
57
|
+
var verifyOtp2 = z3.object({
|
|
58
|
+
otp: z3.string().min(4, { message: "required" }),
|
|
59
|
+
email: z3.string().optional()
|
|
60
|
+
});
|
|
61
|
+
var updatePassword = z3.object({
|
|
62
|
+
email: z3.string().optional(),
|
|
63
|
+
token: z3.string().optional(),
|
|
64
|
+
password: z3.string().nonempty("required").min(8, "min").max(20, "max")
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// src/user.ts
|
|
68
|
+
var user_exports = {};
|
|
69
|
+
__export(user_exports, {
|
|
70
|
+
updatePassword: () => updatePassword2,
|
|
71
|
+
updateProfile: () => updateProfile,
|
|
72
|
+
verifyOtp: () => verifyOtp3
|
|
73
|
+
});
|
|
74
|
+
import { z as z4 } from "zod";
|
|
75
|
+
var updatePassword2 = z4.object({
|
|
76
|
+
password: z4.string().nonempty("required").min(8, "min").max(20, "max"),
|
|
77
|
+
oldPassword: z4.string().nonempty("required")
|
|
78
|
+
});
|
|
79
|
+
var updateProfile = z4.object({
|
|
80
|
+
country: z4.string().optional().default("+91"),
|
|
81
|
+
fullName: z4.string().transform((s) => s.trim()).refine((s) => s === "" || s.length >= 3, { message: "min" }),
|
|
82
|
+
phoneNumber: z4.string().trim().regex(/^\d{7,12}$/, { message: "invalid" })
|
|
83
|
+
});
|
|
84
|
+
var verifyOtp3 = z4.object({
|
|
85
|
+
otp: z4.string().min(4, { message: "required" })
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// src/location.ts
|
|
89
|
+
var location_exports = {};
|
|
90
|
+
__export(location_exports, {
|
|
91
|
+
suggest: () => suggest
|
|
92
|
+
});
|
|
93
|
+
import { z as z5 } from "zod";
|
|
94
|
+
var suggest = z5.object({
|
|
95
|
+
q: z5.string().trim().optional().default(""),
|
|
96
|
+
lat: z5.coerce.number().optional(),
|
|
97
|
+
lng: z5.coerce.number().optional(),
|
|
98
|
+
limit: z5.coerce.number().int().min(1).max(50).default(20)
|
|
99
|
+
});
|
|
17
100
|
export {
|
|
18
|
-
auth_exports as Auth
|
|
101
|
+
auth_exports as Auth,
|
|
102
|
+
location_exports as Location,
|
|
103
|
+
reset_password_exports as ResetPassword,
|
|
104
|
+
signup_exports as Signup,
|
|
105
|
+
user_exports as User
|
|
19
106
|
};
|