@tripsam/onboarding 1.0.32 → 1.0.34

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,7 +1,48 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2
19
 
3
- var _chunkWAQCUSA4cjs = require('../chunk-WAQCUSA4.cjs');
4
- require('../chunk-75ZPJI57.cjs');
20
+ // src/common/index.ts
21
+ var common_exports = {};
22
+ __export(common_exports, {
23
+ VerifyEmail: () => verify_email_exports
24
+ });
25
+ module.exports = __toCommonJS(common_exports);
5
26
 
6
-
7
- exports.VerifyEmail = _chunkWAQCUSA4cjs.verify_email_exports;
27
+ // src/common/verify-email.ts
28
+ var verify_email_exports = {};
29
+ __export(verify_email_exports, {
30
+ sendOtp: () => sendOtp,
31
+ verifyOtp: () => verifyOtp,
32
+ verifyOtpResponse: () => verifyOtpResponse
33
+ });
34
+ var import_zod = require("zod");
35
+ var sendOtp = import_zod.z.object({
36
+ email: import_zod.z.email("invalid").nonempty("required").trim().toLowerCase()
37
+ });
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.string()
44
+ });
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ VerifyEmail
48
+ });
@@ -1,2 +1,27 @@
1
- export { v as VerifyEmail } from '../index-Bv8ss_jR.cjs';
2
- import 'zod';
1
+ import { z } from 'zod';
2
+
3
+ declare const sendOtp: z.ZodObject<{
4
+ email: z.ZodEmail;
5
+ }, z.core.$strip>;
6
+ declare const verifyOtp: z.ZodObject<{
7
+ otp: z.ZodString;
8
+ email: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ declare const verifyOtpResponse: z.ZodObject<{
11
+ id: z.ZodString;
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>;
16
+
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;
23
+ declare namespace verifyEmail {
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 };
25
+ }
26
+
27
+ export { verifyEmail as VerifyEmail };
@@ -1,2 +1,27 @@
1
- export { v as VerifyEmail } from '../index-Bv8ss_jR.js';
2
- import 'zod';
1
+ import { z } from 'zod';
2
+
3
+ declare const sendOtp: z.ZodObject<{
4
+ email: z.ZodEmail;
5
+ }, z.core.$strip>;
6
+ declare const verifyOtp: z.ZodObject<{
7
+ otp: z.ZodString;
8
+ email: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ declare const verifyOtpResponse: z.ZodObject<{
11
+ id: z.ZodString;
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>;
16
+
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;
23
+ declare namespace verifyEmail {
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 };
25
+ }
26
+
27
+ export { verifyEmail as VerifyEmail };
@@ -1,7 +1,27 @@
1
- import {
2
- verify_email_exports
3
- } from "../chunk-WRA5B4FU.js";
4
- import "../chunk-MLKGABMK.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // src/common/verify-email.ts
8
+ var verify_email_exports = {};
9
+ __export(verify_email_exports, {
10
+ sendOtp: () => sendOtp,
11
+ verifyOtp: () => verifyOtp,
12
+ verifyOtpResponse: () => verifyOtpResponse
13
+ });
14
+ import { z } from "zod";
15
+ var sendOtp = z.object({
16
+ email: z.email("invalid").nonempty("required").trim().toLowerCase()
17
+ });
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.string()
24
+ });
5
25
  export {
6
26
  verify_email_exports as VerifyEmail
7
27
  };
@@ -1,7 +1,272 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2
19
 
3
- var _chunkB7RPJ66Ncjs = require('../chunk-B7RPJ66N.cjs');
4
- require('../chunk-75ZPJI57.cjs');
20
+ // src/safari/index.ts
21
+ var safari_exports = {};
22
+ __export(safari_exports, {
23
+ BasicDetails: () => basic_details_exports,
24
+ BusinessDetails: () => business_details_exports,
25
+ DriverDetails: () => driver_details_exports,
26
+ Location: () => location_exports,
27
+ OperationalDays: () => operational_days_exports,
28
+ PersonalDetails: () => personal_details_exports,
29
+ Slot: () => slot_exports,
30
+ VehicleDetails: () => vehicle_details_exports
31
+ });
32
+ module.exports = __toCommonJS(safari_exports);
5
33
 
34
+ // src/safari/basic-details.ts
35
+ var basic_details_exports = {};
36
+ __export(basic_details_exports, {
37
+ me: () => me,
38
+ update: () => update
39
+ });
40
+ var import_zod = require("zod");
41
+ var me = import_zod.z.object({
42
+ id: import_zod.z.string(),
43
+ email: import_zod.z.string(),
44
+ name: import_zod.z.string().trim().optional().default(""),
45
+ countryCode: import_zod.z.string().optional().default("+91"),
46
+ phoneNumber: import_zod.z.string().optional().default(""),
47
+ isPhoneVerified: import_zod.z.boolean().optional().default(false),
48
+ completed: import_zod.z.boolean()
49
+ });
50
+ var update = import_zod.z.object({
51
+ name: import_zod.z.string().nonempty("required").trim(),
52
+ countryCode: import_zod.z.string().optional().default("+91"),
53
+ phoneNumber: import_zod.z.string().nonempty("required")
54
+ });
6
55
 
7
- exports.default = _chunkB7RPJ66Ncjs.safari_default;
56
+ // src/safari/location.ts
57
+ var location_exports = {};
58
+ __export(location_exports, {
59
+ me: () => me2,
60
+ minimum: () => minimum,
61
+ minimumList: () => minimumList,
62
+ pickupLandmark: () => pickupLandmark,
63
+ save: () => save,
64
+ suggest: () => suggest
65
+ });
66
+ var import_zod2 = require("zod");
67
+ var suggest = import_zod2.z.object({
68
+ q: import_zod2.z.string().trim().optional().default(""),
69
+ lat: import_zod2.z.coerce.number().optional(),
70
+ lng: import_zod2.z.coerce.number().optional(),
71
+ limit: import_zod2.z.coerce.number().int().min(1).max(50).default(20)
72
+ });
73
+ var minimum = import_zod2.z.object({
74
+ id: import_zod2.z.string(),
75
+ name: import_zod2.z.string(),
76
+ area: import_zod2.z.string(),
77
+ startLat: import_zod2.z.coerce.number(),
78
+ startLng: import_zod2.z.coerce.number(),
79
+ endLat: import_zod2.z.coerce.number(),
80
+ endLng: import_zod2.z.coerce.number(),
81
+ address: import_zod2.z.object({
82
+ city: import_zod2.z.string(),
83
+ state: import_zod2.z.string()
84
+ }),
85
+ metadata: import_zod2.z.object(),
86
+ landmarks: import_zod2.z.array(import_zod2.z.object({
87
+ id: import_zod2.z.string(),
88
+ label: import_zod2.z.string(),
89
+ type: import_zod2.z.string().optional().default(""),
90
+ distanceKm: import_zod2.z.coerce.number()
91
+ }))
92
+ });
93
+ var pickupLandmark = import_zod2.z.object({
94
+ id: import_zod2.z.string().optional(),
95
+ label: import_zod2.z.string(),
96
+ type: import_zod2.z.string().optional(),
97
+ distanceKm: import_zod2.z.coerce.number()
98
+ });
99
+ var save = import_zod2.z.object({
100
+ locationId: import_zod2.z.string().trim().nonempty("required"),
101
+ safariLocation: import_zod2.z.string().trim().nonempty("required"),
102
+ pickupLocation: import_zod2.z.string().trim().nonempty("required"),
103
+ pickupLandmarks: import_zod2.z.array(pickupLandmark)
104
+ });
105
+ var me2 = import_zod2.z.object({
106
+ location: minimum,
107
+ safariLocation: import_zod2.z.string(),
108
+ pickupLocation: import_zod2.z.string(),
109
+ pickupLandmarks: import_zod2.z.array(pickupLandmark),
110
+ completed: import_zod2.z.boolean()
111
+ });
112
+ var minimumList = import_zod2.z.array(minimum);
113
+
114
+ // src/safari/slot.ts
115
+ var slot_exports = {};
116
+ __export(slot_exports, {
117
+ create: () => create,
118
+ me: () => me3,
119
+ meList: () => meList,
120
+ time12h: () => time12h,
121
+ update: () => update2
122
+ });
123
+ var import_zod3 = require("zod");
124
+ var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
125
+ var time12h = import_zod3.z.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
126
+ const m = v.match(TIME_12H);
127
+ const hh = m[1];
128
+ const mm = m[2];
129
+ const meridian = m[3].toUpperCase();
130
+ let h = parseInt(hh, 10) % 12;
131
+ if (meridian === "PM") h += 12;
132
+ return h * 60 + parseInt(mm, 10);
133
+ });
134
+ var update2 = import_zod3.z.object({
135
+ id: import_zod3.z.string().trim().optional(),
136
+ name: import_zod3.z.string().trim().nonempty("required"),
137
+ description: import_zod3.z.string().trim().optional(),
138
+ startTime: time12h,
139
+ endTime: time12h,
140
+ minHour: import_zod3.z.coerce.number("invalid")
141
+ });
142
+ var create = import_zod3.z.object({
143
+ name: import_zod3.z.string().trim().nonempty("required"),
144
+ description: import_zod3.z.string().trim().optional(),
145
+ startTime: time12h,
146
+ endTime: time12h,
147
+ minHour: import_zod3.z.coerce.number("invalid")
148
+ });
149
+ var me3 = import_zod3.z.object({
150
+ id: import_zod3.z.string().trim(),
151
+ name: import_zod3.z.string().trim().nonempty("required"),
152
+ description: import_zod3.z.string().trim().optional(),
153
+ startTime: import_zod3.z.coerce.number(),
154
+ endTime: import_zod3.z.coerce.number(),
155
+ minHour: import_zod3.z.coerce.number("invalid")
156
+ });
157
+ var meList = import_zod3.z.array(me3);
158
+
159
+ // src/safari/operational-days.ts
160
+ var operational_days_exports = {};
161
+ __export(operational_days_exports, {
162
+ Weekday: () => Weekday,
163
+ me: () => me4
164
+ });
165
+ var import_zod4 = require("zod");
166
+ var Weekday = import_zod4.z.enum([
167
+ "sunday",
168
+ "monday",
169
+ "tuesday",
170
+ "wednesday",
171
+ "thursday",
172
+ "friday",
173
+ "saturday"
174
+ ]);
175
+ var me4 = import_zod4.z.object({
176
+ operationalDays: import_zod4.z.array(Weekday).transform((arr) => Array.from(new Set(arr)))
177
+ });
178
+
179
+ // src/safari/vehicle-details.ts
180
+ var vehicle_details_exports = {};
181
+ __export(vehicle_details_exports, {
182
+ me: () => me5,
183
+ save: () => save2
184
+ });
185
+ var import_zod5 = require("zod");
186
+ var me5 = import_zod5.z.object({
187
+ id: import_zod5.z.string(),
188
+ vehicleName: import_zod5.z.string().trim(),
189
+ registrationNumber: import_zod5.z.string().trim().toUpperCase(),
190
+ serviceRoutine: import_zod5.z.coerce.number(),
191
+ operatedSince: import_zod5.z.coerce.number().min(2010),
192
+ maxCapacity: import_zod5.z.coerce.number().min(2).max(15)
193
+ });
194
+ var save2 = import_zod5.z.object({
195
+ vehicleName: import_zod5.z.string().trim().nonempty("required"),
196
+ registrationNumber: import_zod5.z.string().trim().nonempty("required").toUpperCase(),
197
+ serviceRoutine: import_zod5.z.coerce.number("invalid"),
198
+ operatedSince: import_zod5.z.coerce.number("invalid").min(2010, "min"),
199
+ maxCapacity: import_zod5.z.coerce.number("invalid").min(2, "min").max(15, "max")
200
+ });
201
+
202
+ // src/safari/driver-details.ts
203
+ var driver_details_exports = {};
204
+ __export(driver_details_exports, {
205
+ create: () => create2,
206
+ me: () => me6,
207
+ meList: () => meList2
208
+ });
209
+ var import_zod6 = require("zod");
210
+ var me6 = import_zod6.z.object({
211
+ id: import_zod6.z.string(),
212
+ driverName: import_zod6.z.string().trim(),
213
+ licenseNumber: import_zod6.z.string().trim().toUpperCase(),
214
+ experience: import_zod6.z.coerce.number()
215
+ });
216
+ var create2 = import_zod6.z.object({
217
+ driverName: import_zod6.z.string().trim().nonempty("required"),
218
+ licenseNumber: import_zod6.z.string().trim().nonempty("required").toUpperCase(),
219
+ experience: import_zod6.z.coerce.number().min(1, "min")
220
+ });
221
+ var meList2 = import_zod6.z.array(me6);
222
+
223
+ // src/safari/business-details.ts
224
+ var business_details_exports = {};
225
+ __export(business_details_exports, {
226
+ create: () => create3,
227
+ me: () => me7
228
+ });
229
+ var import_zod7 = require("zod");
230
+ var me7 = import_zod7.z.object({
231
+ bankAccountNumber: import_zod7.z.string().trim(),
232
+ bankName: import_zod7.z.string().trim(),
233
+ accountHolderName: import_zod7.z.string().trim(),
234
+ gstNumber: import_zod7.z.string().trim().optional(),
235
+ businessNumber: import_zod7.z.string().trim().optional(),
236
+ ifscCode: import_zod7.z.string().trim()
237
+ });
238
+ var create3 = import_zod7.z.object({
239
+ bankAccountNumber: import_zod7.z.string().trim().nonempty("required"),
240
+ bankName: import_zod7.z.string().trim().nonempty("required"),
241
+ accountHolderName: import_zod7.z.string().trim().nonempty("required"),
242
+ ifscCode: import_zod7.z.string().trim().nonempty("required"),
243
+ gstNumber: import_zod7.z.string().trim().optional(),
244
+ businessNumber: import_zod7.z.string().trim().optional()
245
+ });
246
+
247
+ // src/safari/personal-details.ts
248
+ var personal_details_exports = {};
249
+ __export(personal_details_exports, {
250
+ me: () => me8,
251
+ save: () => save3
252
+ });
253
+ var import_zod8 = require("zod");
254
+ var me8 = import_zod8.z.object({
255
+ adhaarNumber: import_zod8.z.string().trim(),
256
+ address: import_zod8.z.string().trim()
257
+ });
258
+ var save3 = import_zod8.z.object({
259
+ adhaarNumber: import_zod8.z.string().trim().nonempty("required"),
260
+ address: import_zod8.z.string().trim().nonempty("required")
261
+ });
262
+ // Annotate the CommonJS export names for ESM import in node:
263
+ 0 && (module.exports = {
264
+ BasicDetails,
265
+ BusinessDetails,
266
+ DriverDetails,
267
+ Location,
268
+ OperationalDays,
269
+ PersonalDetails,
270
+ Slot,
271
+ VehicleDetails
272
+ });