@tripsam/onboarding 1.0.88 → 1.0.89
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/common/index.cjs +16 -0
- package/dist/common/index.d.cts +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +15 -0
- package/dist/{index-DWRF0MBf.d.cts → index-627dTKbu.d.cts} +3 -1
- package/dist/{index-DWRF0MBf.d.ts → index-627dTKbu.d.ts} +3 -1
- package/dist/{index-B5uNTRoO.d.cts → index-BdU753Gx.d.cts} +18 -2
- package/dist/{index-B5uNTRoO.d.ts → index-BdU753Gx.d.ts} +18 -2
- package/dist/index.cjs +23 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -0
- package/dist/safari/index.cjs +8 -0
- package/dist/safari/index.d.cts +1 -1
- package/dist/safari/index.d.ts +1 -1
- package/dist/safari/index.js +8 -0
- package/package.json +1 -1
package/dist/common/index.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(common_exports, {
|
|
|
33
33
|
DocumentType: () => document_exports,
|
|
34
34
|
LocationAutoSuggest: () => location_exports,
|
|
35
35
|
Onboard: () => onboard_exports,
|
|
36
|
+
Support: () => support_exports,
|
|
36
37
|
VerifyEmail: () => verify_email_exports
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(common_exports);
|
|
@@ -157,10 +158,25 @@ var get = import_zod4.default.object({
|
|
|
157
158
|
type: SafariDocuments,
|
|
158
159
|
url: import_zod4.default.string()
|
|
159
160
|
});
|
|
161
|
+
|
|
162
|
+
// src/common/support.ts
|
|
163
|
+
var support_exports = {};
|
|
164
|
+
__export(support_exports, {
|
|
165
|
+
createTicket: () => createTicket
|
|
166
|
+
});
|
|
167
|
+
var import_zod5 = __toESM(require("zod"), 1);
|
|
168
|
+
var createTicket = import_zod5.default.object({
|
|
169
|
+
email: import_zod5.default.string().email("invalid"),
|
|
170
|
+
type: import_zod5.default.enum(["SAFARI", "HOTEL"], "invalid"),
|
|
171
|
+
category: import_zod5.default.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
172
|
+
subcategory: import_zod5.default.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
173
|
+
message: import_zod5.default.string().trim().nonempty("required").min(10, "min").max(1e3, "max")
|
|
174
|
+
});
|
|
160
175
|
// Annotate the CommonJS export names for ESM import in node:
|
|
161
176
|
0 && (module.exports = {
|
|
162
177
|
DocumentType,
|
|
163
178
|
LocationAutoSuggest,
|
|
164
179
|
Onboard,
|
|
180
|
+
Support,
|
|
165
181
|
VerifyEmail
|
|
166
182
|
});
|
package/dist/common/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { d as DocumentType, l as LocationAutoSuggest, o as Onboard, v as VerifyEmail } from '../index-
|
|
1
|
+
export { d as DocumentType, l as LocationAutoSuggest, o as Onboard, s as Support, v as VerifyEmail } from '../index-BdU753Gx.cjs';
|
|
2
2
|
import 'zod';
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { d as DocumentType, l as LocationAutoSuggest, o as Onboard, v as VerifyEmail } from '../index-
|
|
1
|
+
export { d as DocumentType, l as LocationAutoSuggest, o as Onboard, s as Support, v as VerifyEmail } from '../index-BdU753Gx.js';
|
|
2
2
|
import 'zod';
|
package/dist/common/index.js
CHANGED
|
@@ -124,9 +124,24 @@ var get = z4.object({
|
|
|
124
124
|
type: SafariDocuments,
|
|
125
125
|
url: z4.string()
|
|
126
126
|
});
|
|
127
|
+
|
|
128
|
+
// src/common/support.ts
|
|
129
|
+
var support_exports = {};
|
|
130
|
+
__export(support_exports, {
|
|
131
|
+
createTicket: () => createTicket
|
|
132
|
+
});
|
|
133
|
+
import z5 from "zod";
|
|
134
|
+
var createTicket = z5.object({
|
|
135
|
+
email: z5.string().email("invalid"),
|
|
136
|
+
type: z5.enum(["SAFARI", "HOTEL"], "invalid"),
|
|
137
|
+
category: z5.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
138
|
+
subcategory: z5.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
139
|
+
message: z5.string().trim().nonempty("required").min(10, "min").max(1e3, "max")
|
|
140
|
+
});
|
|
127
141
|
export {
|
|
128
142
|
document_exports as DocumentType,
|
|
129
143
|
location_exports as LocationAutoSuggest,
|
|
130
144
|
onboard_exports as Onboard,
|
|
145
|
+
support_exports as Support,
|
|
131
146
|
verify_email_exports as VerifyEmail
|
|
132
147
|
};
|
|
@@ -151,6 +151,7 @@ declare namespace location {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
declare const time12h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
154
|
+
declare const time24h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
154
155
|
declare const create$3: z.ZodObject<{
|
|
155
156
|
name: z.ZodString;
|
|
156
157
|
description: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
@@ -194,8 +195,9 @@ type SafeRemove = z.output<typeof remove>;
|
|
|
194
195
|
type slot_SafeRemove = SafeRemove;
|
|
195
196
|
declare const slot_remove: typeof remove;
|
|
196
197
|
declare const slot_time12h: typeof time12h;
|
|
198
|
+
declare const slot_time24h: typeof time24h;
|
|
197
199
|
declare namespace slot {
|
|
198
|
-
export { type SafeCreate$3 as SafeCreate, type SafeGet$5 as SafeGet, type SafeList$2 as SafeList, type slot_SafeRemove as SafeRemove, type SafeUpdate$3 as SafeUpdate, create$3 as create, get$5 as get, list$1 as list, slot_remove as remove, slot_time12h as time12h, update$3 as update };
|
|
200
|
+
export { type SafeCreate$3 as SafeCreate, type SafeGet$5 as SafeGet, type SafeList$2 as SafeList, type slot_SafeRemove as SafeRemove, type SafeUpdate$3 as SafeUpdate, create$3 as create, get$5 as get, list$1 as list, slot_remove as remove, slot_time12h as time12h, slot_time24h as time24h, update$3 as update };
|
|
199
201
|
}
|
|
200
202
|
|
|
201
203
|
declare const Weekday: z.ZodEnum<{
|
|
@@ -151,6 +151,7 @@ declare namespace location {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
declare const time12h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
154
|
+
declare const time24h: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
154
155
|
declare const create$3: z.ZodObject<{
|
|
155
156
|
name: z.ZodString;
|
|
156
157
|
description: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
@@ -194,8 +195,9 @@ type SafeRemove = z.output<typeof remove>;
|
|
|
194
195
|
type slot_SafeRemove = SafeRemove;
|
|
195
196
|
declare const slot_remove: typeof remove;
|
|
196
197
|
declare const slot_time12h: typeof time12h;
|
|
198
|
+
declare const slot_time24h: typeof time24h;
|
|
197
199
|
declare namespace slot {
|
|
198
|
-
export { type SafeCreate$3 as SafeCreate, type SafeGet$5 as SafeGet, type SafeList$2 as SafeList, type slot_SafeRemove as SafeRemove, type SafeUpdate$3 as SafeUpdate, create$3 as create, get$5 as get, list$1 as list, slot_remove as remove, slot_time12h as time12h, update$3 as update };
|
|
200
|
+
export { type SafeCreate$3 as SafeCreate, type SafeGet$5 as SafeGet, type SafeList$2 as SafeList, type slot_SafeRemove as SafeRemove, type SafeUpdate$3 as SafeUpdate, create$3 as create, get$5 as get, list$1 as list, slot_remove as remove, slot_time12h as time12h, slot_time24h as time24h, update$3 as update };
|
|
199
201
|
}
|
|
200
202
|
|
|
201
203
|
declare const Weekday: z.ZodEnum<{
|
|
@@ -209,8 +209,24 @@ declare namespace document {
|
|
|
209
209
|
export { document_SafariDocuments as SafariDocuments, type document_SafeGet as SafeGet, type document_SafeSafariDocuments as SafeSafariDocuments, document_get as get };
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
declare const createTicket: z$1.ZodObject<{
|
|
213
|
+
email: z$1.ZodString;
|
|
214
|
+
type: z$1.ZodEnum<{
|
|
215
|
+
SAFARI: "SAFARI";
|
|
216
|
+
HOTEL: "HOTEL";
|
|
217
|
+
}>;
|
|
218
|
+
category: z$1.ZodString;
|
|
219
|
+
subcategory: z$1.ZodString;
|
|
220
|
+
message: z$1.ZodString;
|
|
221
|
+
}, z$1.core.$strip>;
|
|
222
|
+
|
|
223
|
+
declare const support_createTicket: typeof createTicket;
|
|
224
|
+
declare namespace support {
|
|
225
|
+
export { support_createTicket as createTicket };
|
|
226
|
+
}
|
|
227
|
+
|
|
212
228
|
declare namespace index {
|
|
213
|
-
export { document as DocumentType, location as LocationAutoSuggest, onboard$1 as Onboard, verifyEmail as VerifyEmail };
|
|
229
|
+
export { document as DocumentType, location as LocationAutoSuggest, onboard$1 as Onboard, support as Support, verifyEmail as VerifyEmail };
|
|
214
230
|
}
|
|
215
231
|
|
|
216
|
-
export { document as d, index as i, location as l, onboard$1 as o, verifyEmail as v };
|
|
232
|
+
export { document as d, index as i, location as l, onboard$1 as o, support as s, verifyEmail as v };
|
|
@@ -209,8 +209,24 @@ declare namespace document {
|
|
|
209
209
|
export { document_SafariDocuments as SafariDocuments, type document_SafeGet as SafeGet, type document_SafeSafariDocuments as SafeSafariDocuments, document_get as get };
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
declare const createTicket: z$1.ZodObject<{
|
|
213
|
+
email: z$1.ZodString;
|
|
214
|
+
type: z$1.ZodEnum<{
|
|
215
|
+
SAFARI: "SAFARI";
|
|
216
|
+
HOTEL: "HOTEL";
|
|
217
|
+
}>;
|
|
218
|
+
category: z$1.ZodString;
|
|
219
|
+
subcategory: z$1.ZodString;
|
|
220
|
+
message: z$1.ZodString;
|
|
221
|
+
}, z$1.core.$strip>;
|
|
222
|
+
|
|
223
|
+
declare const support_createTicket: typeof createTicket;
|
|
224
|
+
declare namespace support {
|
|
225
|
+
export { support_createTicket as createTicket };
|
|
226
|
+
}
|
|
227
|
+
|
|
212
228
|
declare namespace index {
|
|
213
|
-
export { document as DocumentType, location as LocationAutoSuggest, onboard$1 as Onboard, verifyEmail as VerifyEmail };
|
|
229
|
+
export { document as DocumentType, location as LocationAutoSuggest, onboard$1 as Onboard, support as Support, verifyEmail as VerifyEmail };
|
|
214
230
|
}
|
|
215
231
|
|
|
216
|
-
export { document as d, index as i, location as l, onboard$1 as o, verifyEmail as v };
|
|
232
|
+
export { document as d, index as i, location as l, onboard$1 as o, support as s, verifyEmail as v };
|
package/dist/index.cjs
CHANGED
|
@@ -185,10 +185,12 @@ __export(slot_exports, {
|
|
|
185
185
|
list: () => list,
|
|
186
186
|
remove: () => remove,
|
|
187
187
|
time12h: () => time12h,
|
|
188
|
+
time24h: () => time24h,
|
|
188
189
|
update: () => update3
|
|
189
190
|
});
|
|
190
191
|
var import_zod4 = require("zod");
|
|
191
192
|
var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
|
|
193
|
+
var TIME_24H = /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/;
|
|
192
194
|
var time12h = import_zod4.z.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
|
|
193
195
|
const m = v.match(TIME_12H);
|
|
194
196
|
const hh = m[1];
|
|
@@ -198,6 +200,12 @@ var time12h = import_zod4.z.string().trim().regex(TIME_12H, "Use format hh:mm AM
|
|
|
198
200
|
if (meridian === "PM") h += 12;
|
|
199
201
|
return h * 60 + parseInt(mm, 10);
|
|
200
202
|
});
|
|
203
|
+
var time24h = import_zod4.z.string().trim().regex(TIME_24H, "invalid").transform((v) => {
|
|
204
|
+
const m = v.match(TIME_24H);
|
|
205
|
+
const hh = parseInt(m[1], 10);
|
|
206
|
+
const mm = parseInt(m[2], 10);
|
|
207
|
+
return hh * 60 + mm;
|
|
208
|
+
});
|
|
201
209
|
var create3 = import_zod4.z.object({
|
|
202
210
|
name: import_zod4.z.string().trim().nonempty("required"),
|
|
203
211
|
description: import_zod4.z.string().trim().min(3, "min").max(200, "max").optional().or(import_zod4.z.literal("")),
|
|
@@ -401,6 +409,7 @@ __export(common_exports, {
|
|
|
401
409
|
DocumentType: () => document_exports,
|
|
402
410
|
LocationAutoSuggest: () => location_exports,
|
|
403
411
|
Onboard: () => onboard_exports,
|
|
412
|
+
Support: () => support_exports,
|
|
404
413
|
VerifyEmail: () => verify_email_exports
|
|
405
414
|
});
|
|
406
415
|
|
|
@@ -488,6 +497,20 @@ var get9 = import_zod14.default.object({
|
|
|
488
497
|
type: SafariDocuments,
|
|
489
498
|
url: import_zod14.default.string()
|
|
490
499
|
});
|
|
500
|
+
|
|
501
|
+
// src/common/support.ts
|
|
502
|
+
var support_exports = {};
|
|
503
|
+
__export(support_exports, {
|
|
504
|
+
createTicket: () => createTicket
|
|
505
|
+
});
|
|
506
|
+
var import_zod15 = __toESM(require("zod"), 1);
|
|
507
|
+
var createTicket = import_zod15.default.object({
|
|
508
|
+
email: import_zod15.default.string().email("invalid"),
|
|
509
|
+
type: import_zod15.default.enum(["SAFARI", "HOTEL"], "invalid"),
|
|
510
|
+
category: import_zod15.default.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
511
|
+
subcategory: import_zod15.default.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
512
|
+
message: import_zod15.default.string().trim().nonempty("required").min(10, "min").max(1e3, "max")
|
|
513
|
+
});
|
|
491
514
|
// Annotate the CommonJS export names for ESM import in node:
|
|
492
515
|
0 && (module.exports = {
|
|
493
516
|
CommonOnboarding,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { i as SafariOnboarding } from './index-
|
|
2
|
-
export { i as CommonOnboarding } from './index-
|
|
1
|
+
export { i as SafariOnboarding } from './index-627dTKbu.cjs';
|
|
2
|
+
export { i as CommonOnboarding } from './index-BdU753Gx.cjs';
|
|
3
3
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { i as SafariOnboarding } from './index-
|
|
2
|
-
export { i as CommonOnboarding } from './index-
|
|
1
|
+
export { i as SafariOnboarding } from './index-627dTKbu.js';
|
|
2
|
+
export { i as CommonOnboarding } from './index-BdU753Gx.js';
|
|
3
3
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -154,10 +154,12 @@ __export(slot_exports, {
|
|
|
154
154
|
list: () => list,
|
|
155
155
|
remove: () => remove,
|
|
156
156
|
time12h: () => time12h,
|
|
157
|
+
time24h: () => time24h,
|
|
157
158
|
update: () => update3
|
|
158
159
|
});
|
|
159
160
|
import { z as z4 } from "zod";
|
|
160
161
|
var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
|
|
162
|
+
var TIME_24H = /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/;
|
|
161
163
|
var time12h = z4.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
|
|
162
164
|
const m = v.match(TIME_12H);
|
|
163
165
|
const hh = m[1];
|
|
@@ -167,6 +169,12 @@ var time12h = z4.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").trans
|
|
|
167
169
|
if (meridian === "PM") h += 12;
|
|
168
170
|
return h * 60 + parseInt(mm, 10);
|
|
169
171
|
});
|
|
172
|
+
var time24h = z4.string().trim().regex(TIME_24H, "invalid").transform((v) => {
|
|
173
|
+
const m = v.match(TIME_24H);
|
|
174
|
+
const hh = parseInt(m[1], 10);
|
|
175
|
+
const mm = parseInt(m[2], 10);
|
|
176
|
+
return hh * 60 + mm;
|
|
177
|
+
});
|
|
170
178
|
var create3 = z4.object({
|
|
171
179
|
name: z4.string().trim().nonempty("required"),
|
|
172
180
|
description: z4.string().trim().min(3, "min").max(200, "max").optional().or(z4.literal("")),
|
|
@@ -370,6 +378,7 @@ __export(common_exports, {
|
|
|
370
378
|
DocumentType: () => document_exports,
|
|
371
379
|
LocationAutoSuggest: () => location_exports,
|
|
372
380
|
Onboard: () => onboard_exports,
|
|
381
|
+
Support: () => support_exports,
|
|
373
382
|
VerifyEmail: () => verify_email_exports
|
|
374
383
|
});
|
|
375
384
|
|
|
@@ -457,6 +466,20 @@ var get9 = z14.object({
|
|
|
457
466
|
type: SafariDocuments,
|
|
458
467
|
url: z14.string()
|
|
459
468
|
});
|
|
469
|
+
|
|
470
|
+
// src/common/support.ts
|
|
471
|
+
var support_exports = {};
|
|
472
|
+
__export(support_exports, {
|
|
473
|
+
createTicket: () => createTicket
|
|
474
|
+
});
|
|
475
|
+
import z15 from "zod";
|
|
476
|
+
var createTicket = z15.object({
|
|
477
|
+
email: z15.string().email("invalid"),
|
|
478
|
+
type: z15.enum(["SAFARI", "HOTEL"], "invalid"),
|
|
479
|
+
category: z15.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
480
|
+
subcategory: z15.string().trim().nonempty("required").min(3, "min").max(100, "max"),
|
|
481
|
+
message: z15.string().trim().nonempty("required").min(10, "min").max(1e3, "max")
|
|
482
|
+
});
|
|
460
483
|
export {
|
|
461
484
|
common_exports as CommonOnboarding,
|
|
462
485
|
safari_exports as SafariOnboarding
|
package/dist/safari/index.cjs
CHANGED
|
@@ -172,10 +172,12 @@ __export(slot_exports, {
|
|
|
172
172
|
list: () => list,
|
|
173
173
|
remove: () => remove,
|
|
174
174
|
time12h: () => time12h,
|
|
175
|
+
time24h: () => time24h,
|
|
175
176
|
update: () => update3
|
|
176
177
|
});
|
|
177
178
|
var import_zod4 = require("zod");
|
|
178
179
|
var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
|
|
180
|
+
var TIME_24H = /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/;
|
|
179
181
|
var time12h = import_zod4.z.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
|
|
180
182
|
const m = v.match(TIME_12H);
|
|
181
183
|
const hh = m[1];
|
|
@@ -185,6 +187,12 @@ var time12h = import_zod4.z.string().trim().regex(TIME_12H, "Use format hh:mm AM
|
|
|
185
187
|
if (meridian === "PM") h += 12;
|
|
186
188
|
return h * 60 + parseInt(mm, 10);
|
|
187
189
|
});
|
|
190
|
+
var time24h = import_zod4.z.string().trim().regex(TIME_24H, "invalid").transform((v) => {
|
|
191
|
+
const m = v.match(TIME_24H);
|
|
192
|
+
const hh = parseInt(m[1], 10);
|
|
193
|
+
const mm = parseInt(m[2], 10);
|
|
194
|
+
return hh * 60 + mm;
|
|
195
|
+
});
|
|
188
196
|
var create3 = import_zod4.z.object({
|
|
189
197
|
name: import_zod4.z.string().trim().nonempty("required"),
|
|
190
198
|
description: import_zod4.z.string().trim().min(3, "min").max(200, "max").optional().or(import_zod4.z.literal("")),
|
package/dist/safari/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as BasicDetails, a as BusinessDetails, d as DriverDetails, l as Location, o as OperationalDays, p as PersonalDetails, r as RateMatrix, s as Slot, c as Step, v as VehicleDetails } from '../index-
|
|
1
|
+
export { b as BasicDetails, a as BusinessDetails, d as DriverDetails, l as Location, o as OperationalDays, p as PersonalDetails, r as RateMatrix, s as Slot, c as Step, v as VehicleDetails } from '../index-627dTKbu.cjs';
|
|
2
2
|
import 'zod';
|
package/dist/safari/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as BasicDetails, a as BusinessDetails, d as DriverDetails, l as Location, o as OperationalDays, p as PersonalDetails, r as RateMatrix, s as Slot, c as Step, v as VehicleDetails } from '../index-
|
|
1
|
+
export { b as BasicDetails, a as BusinessDetails, d as DriverDetails, l as Location, o as OperationalDays, p as PersonalDetails, r as RateMatrix, s as Slot, c as Step, v as VehicleDetails } from '../index-627dTKbu.js';
|
|
2
2
|
import 'zod';
|
package/dist/safari/index.js
CHANGED
|
@@ -133,10 +133,12 @@ __export(slot_exports, {
|
|
|
133
133
|
list: () => list,
|
|
134
134
|
remove: () => remove,
|
|
135
135
|
time12h: () => time12h,
|
|
136
|
+
time24h: () => time24h,
|
|
136
137
|
update: () => update3
|
|
137
138
|
});
|
|
138
139
|
import { z as z4 } from "zod";
|
|
139
140
|
var TIME_12H = /^(0?[1-9]|1[0-2]):([0-5][0-9])(?:[\u00A0\u202F\s]*)?(AM|PM)$/i;
|
|
141
|
+
var TIME_24H = /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/;
|
|
140
142
|
var time12h = z4.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").transform((v) => {
|
|
141
143
|
const m = v.match(TIME_12H);
|
|
142
144
|
const hh = m[1];
|
|
@@ -146,6 +148,12 @@ var time12h = z4.string().trim().regex(TIME_12H, "Use format hh:mm AM/PM").trans
|
|
|
146
148
|
if (meridian === "PM") h += 12;
|
|
147
149
|
return h * 60 + parseInt(mm, 10);
|
|
148
150
|
});
|
|
151
|
+
var time24h = z4.string().trim().regex(TIME_24H, "invalid").transform((v) => {
|
|
152
|
+
const m = v.match(TIME_24H);
|
|
153
|
+
const hh = parseInt(m[1], 10);
|
|
154
|
+
const mm = parseInt(m[2], 10);
|
|
155
|
+
return hh * 60 + mm;
|
|
156
|
+
});
|
|
149
157
|
var create3 = z4.object({
|
|
150
158
|
name: z4.string().trim().nonempty("required"),
|
|
151
159
|
description: z4.string().trim().min(3, "min").max(200, "max").optional().or(z4.literal("")),
|