@tripsam/main 2.0.5 → 2.0.7

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
@@ -43,7 +43,9 @@ module.exports = __toCommonJS(index_exports);
43
43
  var auth_exports = {};
44
44
  __export(auth_exports, {
45
45
  checkMe: () => checkMe,
46
- login: () => login
46
+ login: () => login,
47
+ sendOtp: () => sendOtp,
48
+ verifyOtp: () => verifyOtp
47
49
  });
48
50
  var import_zod = require("zod");
49
51
  var checkMe = import_zod.z.object({
@@ -53,19 +55,26 @@ var login = import_zod.z.object({
53
55
  username: import_zod.z.string().min(1, { message: "required" }).trim().toLowerCase(),
54
56
  password: import_zod.z.string().min(1, { message: "required" })
55
57
  });
58
+ var sendOtp = import_zod.z.object({
59
+ email: import_zod.z.email("invalid").nonempty("required").trim().toLowerCase()
60
+ });
61
+ var verifyOtp = import_zod.z.object({
62
+ otp: import_zod.z.string().min(4, { message: "required" }),
63
+ email: import_zod.z.string().optional()
64
+ });
56
65
 
57
66
  // src/signup.ts
58
67
  var signup_exports = {};
59
68
  __export(signup_exports, {
60
69
  onboard: () => onboard,
61
- sendOtp: () => sendOtp,
62
- verifyOtp: () => verifyOtp
70
+ sendOtp: () => sendOtp2,
71
+ verifyOtp: () => verifyOtp2
63
72
  });
64
73
  var import_zod2 = require("zod");
65
- var sendOtp = import_zod2.z.object({
74
+ var sendOtp2 = import_zod2.z.object({
66
75
  email: import_zod2.z.email("invalid").nonempty("required").trim().toLowerCase()
67
76
  });
68
- var verifyOtp = import_zod2.z.object({
77
+ var verifyOtp2 = import_zod2.z.object({
69
78
  otp: import_zod2.z.string().min(4, { message: "required" }),
70
79
  email: import_zod2.z.string().optional()
71
80
  });
@@ -81,15 +90,15 @@ var onboard = import_zod2.z.object({
81
90
  // src/reset-password.ts
82
91
  var reset_password_exports = {};
83
92
  __export(reset_password_exports, {
84
- sendOtp: () => sendOtp2,
93
+ sendOtp: () => sendOtp3,
85
94
  updatePassword: () => updatePassword,
86
- verifyOtp: () => verifyOtp2
95
+ verifyOtp: () => verifyOtp3
87
96
  });
88
97
  var import_zod3 = require("zod");
89
- var sendOtp2 = import_zod3.z.object({
98
+ var sendOtp3 = import_zod3.z.object({
90
99
  email: import_zod3.z.email("invalid").nonempty("required").trim().toLowerCase()
91
100
  });
92
- var verifyOtp2 = import_zod3.z.object({
101
+ var verifyOtp3 = import_zod3.z.object({
93
102
  otp: import_zod3.z.string().min(4, { message: "required" }),
94
103
  email: import_zod3.z.string().optional()
95
104
  });
@@ -104,7 +113,8 @@ var user_exports = {};
104
113
  __export(user_exports, {
105
114
  updatePassword: () => updatePassword2,
106
115
  updateProfile: () => updateProfile,
107
- verifyOtp: () => verifyOtp3
116
+ updateUsername: () => updateUsername,
117
+ verifyOtp: () => verifyOtp4
108
118
  });
109
119
  var import_zod4 = require("zod");
110
120
  var updatePassword2 = import_zod4.z.object({
@@ -116,9 +126,12 @@ var updateProfile = import_zod4.z.object({
116
126
  fullName: import_zod4.z.string().transform((s) => s.trim()).refine((s) => s === "" || s.length >= 3, { message: "min" }),
117
127
  phoneNumber: import_zod4.z.string().trim().regex(/^\d{7,12}$/, { message: "invalid" })
118
128
  });
119
- var verifyOtp3 = import_zod4.z.object({
129
+ var verifyOtp4 = import_zod4.z.object({
120
130
  otp: import_zod4.z.string().min(4, { message: "required" })
121
131
  });
132
+ var updateUsername = import_zod4.z.object({
133
+ fullName: import_zod4.z.string().nonempty("required").min(3, "min").max(50, "max").trim()
134
+ });
122
135
 
123
136
  // src/location.ts
124
137
  var location_exports = {};
@@ -165,7 +178,10 @@ var safariSearchSchema = import_zod6.default.object({
165
178
  adults: import_zod6.default.coerce.number().min(1).default(2),
166
179
  kids: import_zod6.default.coerce.number().min(0).default(1),
167
180
  infants: import_zod6.default.coerce.number().min(0).default(0),
168
- date: import_zod6.default.string().optional().default("")
181
+ date: import_zod6.default.string().optional().default(""),
182
+ safariTypes: import_zod6.default.string().optional().default(""),
183
+ priceMin: import_zod6.default.coerce.number().min(0).default(0),
184
+ priceMax: import_zod6.default.coerce.number().min(0).default(0)
169
185
  });
170
186
  // Annotate the CommonJS export names for ESM import in node:
171
187
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -3,19 +3,28 @@ import z$1, { z } from 'zod';
3
3
  declare const checkMe: z.ZodObject<{
4
4
  email: z.ZodEmail;
5
5
  }, z.core.$strip>;
6
- type SafeCheckMe = z.output<typeof checkMe>;
7
6
  declare const login: z.ZodObject<{
8
7
  username: z.ZodString;
9
8
  password: z.ZodString;
10
9
  }, z.core.$strip>;
10
+ declare const sendOtp$2: z.ZodObject<{
11
+ email: z.ZodEmail;
12
+ }, z.core.$strip>;
13
+ declare const verifyOtp$3: z.ZodObject<{
14
+ otp: z.ZodString;
15
+ email: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ type SafeCheckMe = z.output<typeof checkMe>;
11
18
  type SafeLogin = z.output<typeof login>;
19
+ type SafeSendOtp$2 = z.output<typeof sendOtp$2>;
20
+ type SafeVerifyOtp$3 = z.output<typeof verifyOtp$3>;
12
21
 
13
22
  type auth_SafeCheckMe = SafeCheckMe;
14
23
  type auth_SafeLogin = SafeLogin;
15
24
  declare const auth_checkMe: typeof checkMe;
16
25
  declare const auth_login: typeof login;
17
26
  declare namespace auth {
18
- export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, auth_checkMe as checkMe, auth_login as login };
27
+ export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, type SafeSendOtp$2 as SafeSendOtp, type SafeVerifyOtp$3 as SafeVerifyOtp, auth_checkMe as checkMe, auth_login as login, sendOtp$2 as sendOtp, verifyOtp$3 as verifyOtp };
19
28
  }
20
29
 
21
30
  declare const sendOtp$1: z.ZodObject<{
@@ -69,26 +78,32 @@ declare const updatePassword: z.ZodObject<{
69
78
  password: z.ZodString;
70
79
  oldPassword: z.ZodString;
71
80
  }, z.core.$strip>;
72
- type SafeUpdatePassword = z.infer<typeof updatePassword>;
73
81
  declare const updateProfile: z.ZodObject<{
74
82
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
75
83
  fullName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
76
84
  phoneNumber: z.ZodString;
77
85
  }, z.core.$strip>;
78
- type SafeUpdateProfile = z.infer<typeof updateProfile>;
79
86
  declare const verifyOtp: z.ZodObject<{
80
87
  otp: z.ZodString;
81
88
  }, z.core.$strip>;
89
+ declare const updateUsername: z.ZodObject<{
90
+ fullName: z.ZodString;
91
+ }, z.core.$strip>;
92
+ type SafeUpdateUsername = z.infer<typeof updateUsername>;
82
93
  type SafeVerifyOtp = z.infer<typeof verifyOtp>;
94
+ type SafeUpdateProfile = z.infer<typeof updateProfile>;
95
+ type SafeUpdatePassword = z.infer<typeof updatePassword>;
83
96
 
84
97
  type user_SafeUpdatePassword = SafeUpdatePassword;
85
98
  type user_SafeUpdateProfile = SafeUpdateProfile;
99
+ type user_SafeUpdateUsername = SafeUpdateUsername;
86
100
  type user_SafeVerifyOtp = SafeVerifyOtp;
87
101
  declare const user_updatePassword: typeof updatePassword;
88
102
  declare const user_updateProfile: typeof updateProfile;
103
+ declare const user_updateUsername: typeof updateUsername;
89
104
  declare const user_verifyOtp: typeof verifyOtp;
90
105
  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 };
106
+ export { type user_SafeUpdatePassword as SafeUpdatePassword, type user_SafeUpdateProfile as SafeUpdateProfile, type user_SafeUpdateUsername as SafeUpdateUsername, type user_SafeVerifyOtp as SafeVerifyOtp, user_updatePassword as updatePassword, user_updateProfile as updateProfile, user_updateUsername as updateUsername, user_verifyOtp as verifyOtp };
92
107
  }
93
108
 
94
109
  /**
@@ -139,6 +154,9 @@ declare const safariSearchSchema: z$1.ZodObject<{
139
154
  kids: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
140
155
  infants: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
141
156
  date: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
157
+ safariTypes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
158
+ priceMin: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
159
+ priceMax: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
142
160
  }, z$1.core.$strip>;
143
161
  type SafariSearch = z$1.infer<typeof safariSearchSchema>;
144
162
 
package/dist/index.d.ts CHANGED
@@ -3,19 +3,28 @@ import z$1, { z } from 'zod';
3
3
  declare const checkMe: z.ZodObject<{
4
4
  email: z.ZodEmail;
5
5
  }, z.core.$strip>;
6
- type SafeCheckMe = z.output<typeof checkMe>;
7
6
  declare const login: z.ZodObject<{
8
7
  username: z.ZodString;
9
8
  password: z.ZodString;
10
9
  }, z.core.$strip>;
10
+ declare const sendOtp$2: z.ZodObject<{
11
+ email: z.ZodEmail;
12
+ }, z.core.$strip>;
13
+ declare const verifyOtp$3: z.ZodObject<{
14
+ otp: z.ZodString;
15
+ email: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ type SafeCheckMe = z.output<typeof checkMe>;
11
18
  type SafeLogin = z.output<typeof login>;
19
+ type SafeSendOtp$2 = z.output<typeof sendOtp$2>;
20
+ type SafeVerifyOtp$3 = z.output<typeof verifyOtp$3>;
12
21
 
13
22
  type auth_SafeCheckMe = SafeCheckMe;
14
23
  type auth_SafeLogin = SafeLogin;
15
24
  declare const auth_checkMe: typeof checkMe;
16
25
  declare const auth_login: typeof login;
17
26
  declare namespace auth {
18
- export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, auth_checkMe as checkMe, auth_login as login };
27
+ export { type auth_SafeCheckMe as SafeCheckMe, type auth_SafeLogin as SafeLogin, type SafeSendOtp$2 as SafeSendOtp, type SafeVerifyOtp$3 as SafeVerifyOtp, auth_checkMe as checkMe, auth_login as login, sendOtp$2 as sendOtp, verifyOtp$3 as verifyOtp };
19
28
  }
20
29
 
21
30
  declare const sendOtp$1: z.ZodObject<{
@@ -69,26 +78,32 @@ declare const updatePassword: z.ZodObject<{
69
78
  password: z.ZodString;
70
79
  oldPassword: z.ZodString;
71
80
  }, z.core.$strip>;
72
- type SafeUpdatePassword = z.infer<typeof updatePassword>;
73
81
  declare const updateProfile: z.ZodObject<{
74
82
  country: z.ZodDefault<z.ZodOptional<z.ZodString>>;
75
83
  fullName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
76
84
  phoneNumber: z.ZodString;
77
85
  }, z.core.$strip>;
78
- type SafeUpdateProfile = z.infer<typeof updateProfile>;
79
86
  declare const verifyOtp: z.ZodObject<{
80
87
  otp: z.ZodString;
81
88
  }, z.core.$strip>;
89
+ declare const updateUsername: z.ZodObject<{
90
+ fullName: z.ZodString;
91
+ }, z.core.$strip>;
92
+ type SafeUpdateUsername = z.infer<typeof updateUsername>;
82
93
  type SafeVerifyOtp = z.infer<typeof verifyOtp>;
94
+ type SafeUpdateProfile = z.infer<typeof updateProfile>;
95
+ type SafeUpdatePassword = z.infer<typeof updatePassword>;
83
96
 
84
97
  type user_SafeUpdatePassword = SafeUpdatePassword;
85
98
  type user_SafeUpdateProfile = SafeUpdateProfile;
99
+ type user_SafeUpdateUsername = SafeUpdateUsername;
86
100
  type user_SafeVerifyOtp = SafeVerifyOtp;
87
101
  declare const user_updatePassword: typeof updatePassword;
88
102
  declare const user_updateProfile: typeof updateProfile;
103
+ declare const user_updateUsername: typeof updateUsername;
89
104
  declare const user_verifyOtp: typeof verifyOtp;
90
105
  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 };
106
+ export { type user_SafeUpdatePassword as SafeUpdatePassword, type user_SafeUpdateProfile as SafeUpdateProfile, type user_SafeUpdateUsername as SafeUpdateUsername, type user_SafeVerifyOtp as SafeVerifyOtp, user_updatePassword as updatePassword, user_updateProfile as updateProfile, user_updateUsername as updateUsername, user_verifyOtp as verifyOtp };
92
107
  }
93
108
 
94
109
  /**
@@ -139,6 +154,9 @@ declare const safariSearchSchema: z$1.ZodObject<{
139
154
  kids: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
140
155
  infants: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
141
156
  date: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
157
+ safariTypes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodString>>;
158
+ priceMin: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
159
+ priceMax: z$1.ZodDefault<z$1.ZodCoercedNumber<unknown>>;
142
160
  }, z$1.core.$strip>;
143
161
  type SafariSearch = z$1.infer<typeof safariSearchSchema>;
144
162
 
package/dist/index.js CHANGED
@@ -8,7 +8,9 @@ var __export = (target, all) => {
8
8
  var auth_exports = {};
9
9
  __export(auth_exports, {
10
10
  checkMe: () => checkMe,
11
- login: () => login
11
+ login: () => login,
12
+ sendOtp: () => sendOtp,
13
+ verifyOtp: () => verifyOtp
12
14
  });
13
15
  import { z } from "zod";
14
16
  var checkMe = z.object({
@@ -18,19 +20,26 @@ var login = z.object({
18
20
  username: z.string().min(1, { message: "required" }).trim().toLowerCase(),
19
21
  password: z.string().min(1, { message: "required" })
20
22
  });
23
+ var sendOtp = z.object({
24
+ email: z.email("invalid").nonempty("required").trim().toLowerCase()
25
+ });
26
+ var verifyOtp = z.object({
27
+ otp: z.string().min(4, { message: "required" }),
28
+ email: z.string().optional()
29
+ });
21
30
 
22
31
  // src/signup.ts
23
32
  var signup_exports = {};
24
33
  __export(signup_exports, {
25
34
  onboard: () => onboard,
26
- sendOtp: () => sendOtp,
27
- verifyOtp: () => verifyOtp
35
+ sendOtp: () => sendOtp2,
36
+ verifyOtp: () => verifyOtp2
28
37
  });
29
38
  import { z as z2 } from "zod";
30
- var sendOtp = z2.object({
39
+ var sendOtp2 = z2.object({
31
40
  email: z2.email("invalid").nonempty("required").trim().toLowerCase()
32
41
  });
33
- var verifyOtp = z2.object({
42
+ var verifyOtp2 = z2.object({
34
43
  otp: z2.string().min(4, { message: "required" }),
35
44
  email: z2.string().optional()
36
45
  });
@@ -46,15 +55,15 @@ var onboard = z2.object({
46
55
  // src/reset-password.ts
47
56
  var reset_password_exports = {};
48
57
  __export(reset_password_exports, {
49
- sendOtp: () => sendOtp2,
58
+ sendOtp: () => sendOtp3,
50
59
  updatePassword: () => updatePassword,
51
- verifyOtp: () => verifyOtp2
60
+ verifyOtp: () => verifyOtp3
52
61
  });
53
62
  import { z as z3 } from "zod";
54
- var sendOtp2 = z3.object({
63
+ var sendOtp3 = z3.object({
55
64
  email: z3.email("invalid").nonempty("required").trim().toLowerCase()
56
65
  });
57
- var verifyOtp2 = z3.object({
66
+ var verifyOtp3 = z3.object({
58
67
  otp: z3.string().min(4, { message: "required" }),
59
68
  email: z3.string().optional()
60
69
  });
@@ -69,7 +78,8 @@ var user_exports = {};
69
78
  __export(user_exports, {
70
79
  updatePassword: () => updatePassword2,
71
80
  updateProfile: () => updateProfile,
72
- verifyOtp: () => verifyOtp3
81
+ updateUsername: () => updateUsername,
82
+ verifyOtp: () => verifyOtp4
73
83
  });
74
84
  import { z as z4 } from "zod";
75
85
  var updatePassword2 = z4.object({
@@ -81,9 +91,12 @@ var updateProfile = z4.object({
81
91
  fullName: z4.string().transform((s) => s.trim()).refine((s) => s === "" || s.length >= 3, { message: "min" }),
82
92
  phoneNumber: z4.string().trim().regex(/^\d{7,12}$/, { message: "invalid" })
83
93
  });
84
- var verifyOtp3 = z4.object({
94
+ var verifyOtp4 = z4.object({
85
95
  otp: z4.string().min(4, { message: "required" })
86
96
  });
97
+ var updateUsername = z4.object({
98
+ fullName: z4.string().nonempty("required").min(3, "min").max(50, "max").trim()
99
+ });
87
100
 
88
101
  // src/location.ts
89
102
  var location_exports = {};
@@ -130,7 +143,10 @@ var safariSearchSchema = z6.object({
130
143
  adults: z6.coerce.number().min(1).default(2),
131
144
  kids: z6.coerce.number().min(0).default(1),
132
145
  infants: z6.coerce.number().min(0).default(0),
133
- date: z6.string().optional().default("")
146
+ date: z6.string().optional().default(""),
147
+ safariTypes: z6.string().optional().default(""),
148
+ priceMin: z6.coerce.number().min(0).default(0),
149
+ priceMax: z6.coerce.number().min(0).default(0)
134
150
  });
135
151
  export {
136
152
  auth_exports as Auth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tripsam/main",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",