@tripsam/onboarding 1.0.17 → 1.0.18
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 +10 -2
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -132,15 +132,23 @@ __export(slot_exports, {
|
|
|
132
132
|
create: () => create,
|
|
133
133
|
me: () => me3,
|
|
134
134
|
meList: () => meList,
|
|
135
|
+
time12h: () => time12h,
|
|
135
136
|
update: () => update2
|
|
136
137
|
});
|
|
137
138
|
var import_zod4 = require("zod");
|
|
139
|
+
var time12h = import_zod4.z.string().trim().regex(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i, "Use format hh:mm AM/PM").transform((v) => {
|
|
140
|
+
const [, hh, , mm, meridianRaw] = v.match(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i);
|
|
141
|
+
const meridian = meridianRaw.toUpperCase();
|
|
142
|
+
let h = parseInt(hh, 10) % 12;
|
|
143
|
+
if (meridian === "PM") h += 12;
|
|
144
|
+
return h * 60 + parseInt(mm, 10);
|
|
145
|
+
});
|
|
138
146
|
var update2 = import_zod4.z.object({
|
|
139
147
|
id: import_zod4.z.string().trim().optional(),
|
|
140
148
|
name: import_zod4.z.string().trim().nonempty("required"),
|
|
141
149
|
description: import_zod4.z.string().trim().optional(),
|
|
142
|
-
startTime:
|
|
143
|
-
endTime:
|
|
150
|
+
startTime: time12h,
|
|
151
|
+
endTime: time12h,
|
|
144
152
|
minHour: import_zod4.z.coerce.number("invalid")
|
|
145
153
|
});
|
|
146
154
|
var create = import_zod4.z.object({
|
package/dist/index.d.cts
CHANGED
|
@@ -160,12 +160,13 @@ declare namespace location {
|
|
|
160
160
|
export { type SafeMe$1 as SafeMe, type location_SafeMinimum as SafeMinimum, type location_SafeMinimumList as SafeMinimumList, type location_SafePickupLandmark as SafePickupLandmark, type location_SafeSave as SafeSave, type location_SafeSuggest as SafeSuggest, me$1 as me, location_minimum as minimum, location_minimumList as minimumList, location_pickupLandmark as pickupLandmark, location_save as save, location_suggest as suggest };
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
declare const time12h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
163
164
|
declare const update: z.ZodObject<{
|
|
164
165
|
id: z.ZodOptional<z.ZodString>;
|
|
165
166
|
name: z.ZodString;
|
|
166
167
|
description: z.ZodOptional<z.ZodString>;
|
|
167
|
-
startTime: z.ZodString
|
|
168
|
-
endTime: z.ZodString
|
|
168
|
+
startTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
169
|
+
endTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
169
170
|
minHour: z.ZodCoercedNumber<unknown>;
|
|
170
171
|
}, z.core.$strip>;
|
|
171
172
|
declare const create: z.ZodObject<{
|
|
@@ -203,9 +204,10 @@ type slot_SafeUpdate = SafeUpdate;
|
|
|
203
204
|
declare const slot_create: typeof create;
|
|
204
205
|
declare const slot_me: typeof me;
|
|
205
206
|
declare const slot_meList: typeof meList;
|
|
207
|
+
declare const slot_time12h: typeof time12h;
|
|
206
208
|
declare const slot_update: typeof update;
|
|
207
209
|
declare namespace slot {
|
|
208
|
-
export { type slot_SafeCreate as SafeCreate, type slot_SafeList as SafeList, type slot_SafeMe as SafeMe, type slot_SafeUpdate as SafeUpdate, slot_create as create, slot_me as me, slot_meList as meList, slot_update as update };
|
|
210
|
+
export { type slot_SafeCreate as SafeCreate, type slot_SafeList as SafeList, type slot_SafeMe as SafeMe, type slot_SafeUpdate as SafeUpdate, slot_create as create, slot_me as me, slot_meList as meList, slot_time12h as time12h, slot_update as update };
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
export { basicDetails as BasicDetails, location as Location, slot as Slot, verifyEmail as VerifyEmail };
|
package/dist/index.d.ts
CHANGED
|
@@ -160,12 +160,13 @@ declare namespace location {
|
|
|
160
160
|
export { type SafeMe$1 as SafeMe, type location_SafeMinimum as SafeMinimum, type location_SafeMinimumList as SafeMinimumList, type location_SafePickupLandmark as SafePickupLandmark, type location_SafeSave as SafeSave, type location_SafeSuggest as SafeSuggest, me$1 as me, location_minimum as minimum, location_minimumList as minimumList, location_pickupLandmark as pickupLandmark, location_save as save, location_suggest as suggest };
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
declare const time12h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
163
164
|
declare const update: z.ZodObject<{
|
|
164
165
|
id: z.ZodOptional<z.ZodString>;
|
|
165
166
|
name: z.ZodString;
|
|
166
167
|
description: z.ZodOptional<z.ZodString>;
|
|
167
|
-
startTime: z.ZodString
|
|
168
|
-
endTime: z.ZodString
|
|
168
|
+
startTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
169
|
+
endTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
169
170
|
minHour: z.ZodCoercedNumber<unknown>;
|
|
170
171
|
}, z.core.$strip>;
|
|
171
172
|
declare const create: z.ZodObject<{
|
|
@@ -203,9 +204,10 @@ type slot_SafeUpdate = SafeUpdate;
|
|
|
203
204
|
declare const slot_create: typeof create;
|
|
204
205
|
declare const slot_me: typeof me;
|
|
205
206
|
declare const slot_meList: typeof meList;
|
|
207
|
+
declare const slot_time12h: typeof time12h;
|
|
206
208
|
declare const slot_update: typeof update;
|
|
207
209
|
declare namespace slot {
|
|
208
|
-
export { type slot_SafeCreate as SafeCreate, type slot_SafeList as SafeList, type slot_SafeMe as SafeMe, type slot_SafeUpdate as SafeUpdate, slot_create as create, slot_me as me, slot_meList as meList, slot_update as update };
|
|
210
|
+
export { type slot_SafeCreate as SafeCreate, type slot_SafeList as SafeList, type slot_SafeMe as SafeMe, type slot_SafeUpdate as SafeUpdate, slot_create as create, slot_me as me, slot_meList as meList, slot_time12h as time12h, slot_update as update };
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
export { basicDetails as BasicDetails, location as Location, slot as Slot, verifyEmail as VerifyEmail };
|
package/dist/index.js
CHANGED
|
@@ -109,15 +109,23 @@ __export(slot_exports, {
|
|
|
109
109
|
create: () => create,
|
|
110
110
|
me: () => me3,
|
|
111
111
|
meList: () => meList,
|
|
112
|
+
time12h: () => time12h,
|
|
112
113
|
update: () => update2
|
|
113
114
|
});
|
|
114
115
|
import { z as z4 } from "zod";
|
|
116
|
+
var time12h = z4.string().trim().regex(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i, "Use format hh:mm AM/PM").transform((v) => {
|
|
117
|
+
const [, hh, , mm, meridianRaw] = v.match(/^((0[1-9]|1[0-2])):([0-5][0-9])\s?(AM|PM)$/i);
|
|
118
|
+
const meridian = meridianRaw.toUpperCase();
|
|
119
|
+
let h = parseInt(hh, 10) % 12;
|
|
120
|
+
if (meridian === "PM") h += 12;
|
|
121
|
+
return h * 60 + parseInt(mm, 10);
|
|
122
|
+
});
|
|
115
123
|
var update2 = z4.object({
|
|
116
124
|
id: z4.string().trim().optional(),
|
|
117
125
|
name: z4.string().trim().nonempty("required"),
|
|
118
126
|
description: z4.string().trim().optional(),
|
|
119
|
-
startTime:
|
|
120
|
-
endTime:
|
|
127
|
+
startTime: time12h,
|
|
128
|
+
endTime: time12h,
|
|
121
129
|
minHour: z4.coerce.number("invalid")
|
|
122
130
|
});
|
|
123
131
|
var create = z4.object({
|