@bizmap/sdk 0.0.67 → 0.0.69
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/main.d.ts +48 -29
- package/dist/main.js +29 -8
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ declare const companyServiceSelectors: z.ZodEnum<{
|
|
|
36
36
|
doctor: "doctor";
|
|
37
37
|
}>;
|
|
38
38
|
type CompanyServiceSelector = z.infer<typeof companyServiceSelectors>;
|
|
39
|
+
declare const companyTypes: z.ZodEnum<{
|
|
40
|
+
MEDICAL: "MEDICAL";
|
|
41
|
+
}>;
|
|
42
|
+
type CompanyType = z.infer<typeof companyTypes>;
|
|
39
43
|
|
|
40
44
|
declare const tiers: z.ZodEnum<{
|
|
41
45
|
basic: "basic";
|
|
@@ -67,8 +71,11 @@ declare const serviceProviders: z.ZodEnum<{
|
|
|
67
71
|
}>;
|
|
68
72
|
|
|
69
73
|
declare const CompanyDetails: z.ZodObject<{
|
|
70
|
-
_id: z.
|
|
74
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
71
75
|
identity: z.ZodObject<{
|
|
76
|
+
type: z.ZodReadonly<z.ZodEnum<{
|
|
77
|
+
MEDICAL: "MEDICAL";
|
|
78
|
+
}>>;
|
|
72
79
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
73
80
|
address: z.ZodObject<{
|
|
74
81
|
streetAddress: z.ZodString;
|
|
@@ -76,11 +83,12 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
76
83
|
parish: z.ZodString;
|
|
77
84
|
country: z.ZodString;
|
|
78
85
|
}, z.core.$strip>;
|
|
79
|
-
|
|
86
|
+
alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
80
87
|
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
88
|
contact: z.ZodObject<{
|
|
82
89
|
email: z.ZodEmail;
|
|
83
90
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
91
|
+
emailVerified: z.ZodBoolean;
|
|
84
92
|
}, z.core.$strip>;
|
|
85
93
|
tier: z.ZodObject<{
|
|
86
94
|
current: z.ZodEnum<{
|
|
@@ -91,11 +99,12 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
91
99
|
}>;
|
|
92
100
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
93
101
|
}, z.core.$strip>;
|
|
94
|
-
|
|
102
|
+
isVerified: z.ZodBoolean;
|
|
103
|
+
legal: z.ZodOptional<z.ZodObject<{
|
|
95
104
|
regNo: z.ZodReadonly<z.ZodString>;
|
|
96
105
|
trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
106
|
gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
-
}, z.core.$strip
|
|
107
|
+
}, z.core.$strip>>;
|
|
99
108
|
}, z.core.$strip>;
|
|
100
109
|
notifications: z.ZodArray<z.ZodObject<{
|
|
101
110
|
_id: z.ZodString;
|
|
@@ -276,7 +285,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
276
285
|
}, z.core.$strip>;
|
|
277
286
|
type CompanyDetails = z.infer<typeof CompanyDetails>;
|
|
278
287
|
declare const MutableCompanyDetails: z.ZodObject<{
|
|
279
|
-
_id: z.
|
|
288
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
280
289
|
identity: z.ZodOptional<z.ZodObject<{
|
|
281
290
|
address: z.ZodOptional<z.ZodObject<{
|
|
282
291
|
streetAddress: z.ZodString;
|
|
@@ -284,19 +293,21 @@ declare const MutableCompanyDetails: z.ZodObject<{
|
|
|
284
293
|
parish: z.ZodString;
|
|
285
294
|
country: z.ZodString;
|
|
286
295
|
}, z.core.$strip>>;
|
|
296
|
+
alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
287
297
|
logo: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
288
298
|
contact: z.ZodOptional<z.ZodObject<{
|
|
289
299
|
email: z.ZodEmail;
|
|
290
300
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
301
|
+
emailVerified: z.ZodBoolean;
|
|
291
302
|
}, z.core.$strip>>;
|
|
292
|
-
legal: z.ZodOptional<z.ZodObject<{
|
|
303
|
+
legal: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
293
304
|
regNo: z.ZodReadonly<z.ZodString>;
|
|
294
305
|
trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
295
306
|
gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
|
-
}, z.core.$strip
|
|
307
|
+
}, z.core.$strip>>>;
|
|
297
308
|
}, z.core.$strip>>;
|
|
298
309
|
preferences: z.ZodOptional<z.ZodObject<{
|
|
299
|
-
_id: z.ZodOptional<z.
|
|
310
|
+
_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
300
311
|
serviceSelector: z.ZodOptional<z.ZodEnum<{
|
|
301
312
|
scheduler: "scheduler";
|
|
302
313
|
doctor: "doctor";
|
|
@@ -308,7 +319,7 @@ declare const MutableCompanyDetails: z.ZodObject<{
|
|
|
308
319
|
}>>>;
|
|
309
320
|
}, z.core.$strip>>;
|
|
310
321
|
billing: z.ZodOptional<z.ZodObject<{
|
|
311
|
-
_id: z.ZodOptional<z.
|
|
322
|
+
_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
312
323
|
additionalFees: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
313
324
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
314
325
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -401,7 +412,7 @@ declare const MutableCompanyDetails: z.ZodObject<{
|
|
|
401
412
|
type MutableCompanyDetails = z.infer<typeof MutableCompanyDetails>;
|
|
402
413
|
|
|
403
414
|
declare const CompanyBilling: z.ZodObject<{
|
|
404
|
-
_id: z.
|
|
415
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
405
416
|
additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
406
417
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
407
418
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -473,7 +484,7 @@ declare const CompanyBilling: z.ZodObject<{
|
|
|
473
484
|
}, z.core.$strip>;
|
|
474
485
|
type CompanyBilling = z.infer<typeof CompanyBilling>;
|
|
475
486
|
declare const MutableCompanyBilling: z.ZodObject<{
|
|
476
|
-
_id: z.
|
|
487
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
477
488
|
additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
478
489
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
479
490
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -545,19 +556,23 @@ declare const MutableCompanyBilling: z.ZodObject<{
|
|
|
545
556
|
type MutableCompanyBilling = z.infer<typeof MutableCompanyBilling>;
|
|
546
557
|
|
|
547
558
|
declare const CompanyIdentity: z.ZodObject<{
|
|
548
|
-
_id: z.
|
|
549
|
-
|
|
559
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
560
|
+
alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
550
561
|
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
}, z.core.$strip>;
|
|
562
|
+
type: z.ZodReadonly<z.ZodEnum<{
|
|
563
|
+
MEDICAL: "MEDICAL";
|
|
564
|
+
}>>;
|
|
555
565
|
address: z.ZodObject<{
|
|
556
566
|
streetAddress: z.ZodString;
|
|
557
567
|
city: z.ZodOptional<z.ZodString>;
|
|
558
568
|
parish: z.ZodString;
|
|
559
569
|
country: z.ZodString;
|
|
560
570
|
}, z.core.$strip>;
|
|
571
|
+
contact: z.ZodObject<{
|
|
572
|
+
email: z.ZodEmail;
|
|
573
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
574
|
+
emailVerified: z.ZodBoolean;
|
|
575
|
+
}, z.core.$strip>;
|
|
561
576
|
tier: z.ZodObject<{
|
|
562
577
|
current: z.ZodEnum<{
|
|
563
578
|
basic: "basic";
|
|
@@ -567,11 +582,12 @@ declare const CompanyIdentity: z.ZodObject<{
|
|
|
567
582
|
}>;
|
|
568
583
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
569
584
|
}, z.core.$strip>;
|
|
570
|
-
|
|
585
|
+
isVerified: z.ZodBoolean;
|
|
586
|
+
legal: z.ZodOptional<z.ZodObject<{
|
|
571
587
|
regNo: z.ZodReadonly<z.ZodString>;
|
|
572
588
|
trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
573
589
|
gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
574
|
-
}, z.core.$strip
|
|
590
|
+
}, z.core.$strip>>;
|
|
575
591
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
576
592
|
}, z.core.$strip>;
|
|
577
593
|
type CompanyIdentity = z.infer<typeof CompanyIdentity>;
|
|
@@ -582,16 +598,18 @@ declare const MutableCompanyIdentity: z.ZodObject<{
|
|
|
582
598
|
parish: z.ZodString;
|
|
583
599
|
country: z.ZodString;
|
|
584
600
|
}, z.core.$strip>;
|
|
601
|
+
alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
585
602
|
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
586
603
|
contact: z.ZodObject<{
|
|
587
604
|
email: z.ZodEmail;
|
|
588
605
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
606
|
+
emailVerified: z.ZodBoolean;
|
|
589
607
|
}, z.core.$strip>;
|
|
590
|
-
legal: z.ZodObject<{
|
|
608
|
+
legal: z.ZodOptional<z.ZodObject<{
|
|
591
609
|
regNo: z.ZodReadonly<z.ZodString>;
|
|
592
610
|
trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
593
611
|
gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
594
|
-
}, z.core.$strip
|
|
612
|
+
}, z.core.$strip>>;
|
|
595
613
|
}, z.core.$strip>;
|
|
596
614
|
type MutableCompanyIdentity = z.infer<typeof MutableCompanyIdentity>;
|
|
597
615
|
|
|
@@ -611,7 +629,7 @@ declare const CompanyNotifications: z.ZodArray<z.ZodObject<{
|
|
|
611
629
|
type CompanyNotifications = z.infer<typeof CompanyNotifications>;
|
|
612
630
|
|
|
613
631
|
declare const CompanyPreferences: z.ZodObject<{
|
|
614
|
-
_id: z.
|
|
632
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
615
633
|
serviceSelector: z.ZodEnum<{
|
|
616
634
|
scheduler: "scheduler";
|
|
617
635
|
doctor: "doctor";
|
|
@@ -625,7 +643,7 @@ declare const CompanyPreferences: z.ZodObject<{
|
|
|
625
643
|
}, z.core.$strip>;
|
|
626
644
|
type CompanyPreferences = z.infer<typeof CompanyPreferences>;
|
|
627
645
|
declare const MutableCompanyPreferences: z.ZodObject<{
|
|
628
|
-
_id: z.
|
|
646
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
629
647
|
serviceSelector: z.ZodEnum<{
|
|
630
648
|
scheduler: "scheduler";
|
|
631
649
|
doctor: "doctor";
|
|
@@ -664,7 +682,7 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
664
682
|
isAvailableLastModified: z.ZodNullable<z.ZodInt>;
|
|
665
683
|
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
666
684
|
}, z.core.$strip>>;
|
|
667
|
-
_id: z.
|
|
685
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
668
686
|
partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
669
687
|
addedAt: z.ZodInt;
|
|
670
688
|
}, z.core.$strip>>>;
|
|
@@ -693,7 +711,7 @@ type CompanyStaff = z.infer<typeof CompanyStaff>;
|
|
|
693
711
|
|
|
694
712
|
/** Can only be modifiede by the server */
|
|
695
713
|
declare const CompanyState: z.ZodObject<{
|
|
696
|
-
_id: z.
|
|
714
|
+
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
697
715
|
credits: z.ZodObject<{
|
|
698
716
|
current: z.ZodNumber;
|
|
699
717
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
@@ -985,7 +1003,7 @@ declare const MiniAppointmentDetails: z.ZodObject<{
|
|
|
985
1003
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
986
1004
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
987
1005
|
_id: z.ZodUUID;
|
|
988
|
-
src: z.
|
|
1006
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
989
1007
|
tkt: z.ZodReadonly<z.ZodInt>;
|
|
990
1008
|
reason: z.ZodOptional<z.ZodObject<{
|
|
991
1009
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
@@ -1218,7 +1236,7 @@ declare const AppointmentDetails: z.ZodObject<{
|
|
|
1218
1236
|
content: z.ZodString;
|
|
1219
1237
|
}, z.core.$strip>>>;
|
|
1220
1238
|
}, z.core.$strip>>>;
|
|
1221
|
-
src: z.
|
|
1239
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1222
1240
|
timeline: z.ZodObject<{
|
|
1223
1241
|
scheduler: z.ZodObject<{
|
|
1224
1242
|
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -1384,7 +1402,7 @@ declare const MutableAppointmentDetails: z.ZodObject<{
|
|
|
1384
1402
|
content: z.ZodString;
|
|
1385
1403
|
}, z.core.$strip>>>;
|
|
1386
1404
|
}, z.core.$strip>>>;
|
|
1387
|
-
src: z.
|
|
1405
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1388
1406
|
timeline: z.ZodObject<{
|
|
1389
1407
|
scheduler: z.ZodObject<{
|
|
1390
1408
|
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -1768,10 +1786,11 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1768
1786
|
* @returns {CompanyUserRole[]} The roles that are compatible with the selected role.
|
|
1769
1787
|
* */
|
|
1770
1788
|
declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
|
|
1789
|
+
declare const parseCompanyName: (name: string) => string;
|
|
1771
1790
|
|
|
1772
1791
|
declare function createNotifId(options?: {
|
|
1773
1792
|
from: string;
|
|
1774
1793
|
to: string;
|
|
1775
1794
|
}): string;
|
|
1776
1795
|
|
|
1777
|
-
export { AppointmentDetails, type AppointmentDistAlg, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, CompanyUser, type CompanyUserRole, CreditCurrency, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, UserDetails, Vitals, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyUserRoles, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, getCompatibleRoles, healthcareProviderRoles, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
|
1796
|
+
export { AppointmentDetails, type AppointmentDistAlg, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, type CompanyType, CompanyUser, type CompanyUserRole, CreditCurrency, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, UserDetails, Vitals, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, getCompatibleRoles, healthcareProviderRoles, parseCompanyName, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
package/dist/main.js
CHANGED
|
@@ -18,6 +18,7 @@ var healthcareProviderRoles = companyUserRoles.extract([
|
|
|
18
18
|
]);
|
|
19
19
|
var appointmentDistAlgs = z.enum(["RR", "LOR"]);
|
|
20
20
|
var companyServiceSelectors = z.enum(["scheduler", "doctor"]);
|
|
21
|
+
var companyTypes = z.enum(["MEDICAL"]);
|
|
21
22
|
|
|
22
23
|
// src/enums/Global.ts
|
|
23
24
|
import * as z2 from "zod";
|
|
@@ -107,7 +108,13 @@ import * as z8 from "zod";
|
|
|
107
108
|
// src/schemas/company/components/State.ts
|
|
108
109
|
import * as z7 from "zod";
|
|
109
110
|
var CompanyState = z7.object({
|
|
110
|
-
_id: z7.
|
|
111
|
+
_id: z7.string().toLowerCase().trim().min(3).max(63).regex(/[a-z1-9\-]/).transform((data) => data.replace(/-+/g, "-").replace(/\s+/g, "")).superRefine((data, ctx) => {
|
|
112
|
+
if (!/[a-z]/.test(data[0]) || !/[a-z]/.test(data[data.length - 1])) {
|
|
113
|
+
ctx.addIssue(
|
|
114
|
+
"The first and last character of a company's name must be a letter."
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
111
118
|
credits: z7.object({
|
|
112
119
|
current: z7.number(),
|
|
113
120
|
lastModified: Timestamp.nullable()
|
|
@@ -179,33 +186,44 @@ import * as z9 from "zod";
|
|
|
179
186
|
import { Address, PhoneNumber } from "@wavy/util";
|
|
180
187
|
var CompanyIdentity = z9.object({
|
|
181
188
|
_id: CompanyState.shape._id,
|
|
182
|
-
|
|
189
|
+
alias: z9.string().trim().min(3).max(63).regex(/[a-z1-9 ]/gi).transform(
|
|
190
|
+
(data) => data.replace(/[^a-z1-9 ]/gi, "").replace(/\s+/g, " ")
|
|
191
|
+
),
|
|
183
192
|
logo: z9.string().max(150).nullish(),
|
|
184
|
-
|
|
185
|
-
|
|
193
|
+
type: companyTypes.readonly(),
|
|
194
|
+
address: Address,
|
|
186
195
|
contact: z9.object({
|
|
187
196
|
email: z9.email().max(25),
|
|
188
|
-
phoneNumber: PhoneNumber.optional()
|
|
197
|
+
phoneNumber: PhoneNumber.optional(),
|
|
198
|
+
emailVerified: z9.boolean()
|
|
189
199
|
}),
|
|
190
|
-
address: Address,
|
|
191
200
|
// Can only be changed by the server
|
|
192
201
|
tier: z9.object({
|
|
193
202
|
current: tiers,
|
|
194
203
|
lastModified: Timestamp.nullable()
|
|
195
204
|
}),
|
|
205
|
+
isVerified: z9.boolean(),
|
|
196
206
|
legal: z9.object({
|
|
197
207
|
regNo: z9.string().max(20).readonly(),
|
|
198
208
|
// The company's registration number
|
|
199
209
|
trn: z9.string().regex(/[0-9]{3}-[0-9]{3}-[0-9]{3}/).nullish(),
|
|
200
210
|
gctRegNo: z9.string().max(15).nullish()
|
|
201
|
-
}),
|
|
211
|
+
}).optional(),
|
|
202
212
|
lastModified: Timestamp.nullable()
|
|
213
|
+
}).superRefine((data, ctx) => {
|
|
214
|
+
const hasLegalInfo = "legal" in data;
|
|
215
|
+
if (data.isVerified && !hasLegalInfo) {
|
|
216
|
+
ctx.addIssue("Verified companies must have the legal field defined.");
|
|
217
|
+
} else if (!data.isVerified && hasLegalInfo) {
|
|
218
|
+
ctx.addIssue("Unverified companies can't have the legal field defined.");
|
|
219
|
+
}
|
|
203
220
|
});
|
|
204
221
|
var MutableCompanyIdentity = CompanyIdentity.pick({
|
|
205
222
|
address: true,
|
|
206
223
|
contact: true,
|
|
207
224
|
logo: true,
|
|
208
|
-
legal: true
|
|
225
|
+
legal: true,
|
|
226
|
+
alias: true
|
|
209
227
|
});
|
|
210
228
|
|
|
211
229
|
// src/schemas/company/components/Notifications.ts
|
|
@@ -409,6 +427,7 @@ var getCompatibleRoles = (role) => {
|
|
|
409
427
|
}
|
|
410
428
|
return companyUserRoles.exclude([role]).options;
|
|
411
429
|
};
|
|
430
|
+
var parseCompanyName = (name) => name.replace(/-/g, " ");
|
|
412
431
|
|
|
413
432
|
// src/schemas/company/components/User.ts
|
|
414
433
|
var MiniCompanyUser2 = z14.object({
|
|
@@ -945,6 +964,7 @@ export {
|
|
|
945
964
|
appointmentDistAlgs,
|
|
946
965
|
companyPartnerRoles,
|
|
947
966
|
companyServiceSelectors,
|
|
967
|
+
companyTypes,
|
|
948
968
|
companyUserRoles,
|
|
949
969
|
createNotifId,
|
|
950
970
|
employeeRoles,
|
|
@@ -953,6 +973,7 @@ export {
|
|
|
953
973
|
findNextAvailableStaff,
|
|
954
974
|
getCompatibleRoles,
|
|
955
975
|
healthcareProviderRoles,
|
|
976
|
+
parseCompanyName,
|
|
956
977
|
paymentMethods,
|
|
957
978
|
scheduleAppointment,
|
|
958
979
|
serviceProviders,
|