@tripsam/onboarding 1.0.17 → 1.0.19

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
@@ -132,22 +132,30 @@ __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: import_zod4.z.string().trim().nonempty("required"),
143
- endTime: import_zod4.z.string().trim().nonempty("required"),
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({
147
155
  name: import_zod4.z.string().trim().nonempty("required"),
148
156
  description: import_zod4.z.string().trim().optional(),
149
- startTime: import_zod4.z.string().trim().nonempty("required"),
150
- endTime: import_zod4.z.string().trim().nonempty("required"),
157
+ startTime: time12h,
158
+ endTime: time12h,
151
159
  minHour: import_zod4.z.coerce.number("invalid")
152
160
  });
153
161
  var me3 = import_zod4.z.object({
package/dist/index.d.cts CHANGED
@@ -160,19 +160,20 @@ 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<{
172
173
  name: z.ZodString;
173
174
  description: z.ZodOptional<z.ZodString>;
174
- startTime: z.ZodString;
175
- endTime: z.ZodString;
175
+ startTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
176
+ endTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
176
177
  minHour: z.ZodCoercedNumber<unknown>;
177
178
  }, z.core.$strip>;
178
179
  declare const me: 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,19 +160,20 @@ 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<{
172
173
  name: z.ZodString;
173
174
  description: z.ZodOptional<z.ZodString>;
174
- startTime: z.ZodString;
175
- endTime: z.ZodString;
175
+ startTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
176
+ endTime: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
176
177
  minHour: z.ZodCoercedNumber<unknown>;
177
178
  }, z.core.$strip>;
178
179
  declare const me: 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,22 +109,30 @@ __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: z4.string().trim().nonempty("required"),
120
- endTime: z4.string().trim().nonempty("required"),
127
+ startTime: time12h,
128
+ endTime: time12h,
121
129
  minHour: z4.coerce.number("invalid")
122
130
  });
123
131
  var create = z4.object({
124
132
  name: z4.string().trim().nonempty("required"),
125
133
  description: z4.string().trim().optional(),
126
- startTime: z4.string().trim().nonempty("required"),
127
- endTime: z4.string().trim().nonempty("required"),
134
+ startTime: time12h,
135
+ endTime: time12h,
128
136
  minHour: z4.coerce.number("invalid")
129
137
  });
130
138
  var me3 = z4.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tripsam/onboarding",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",