@bizmap/sdk 0.0.91 → 0.0.92
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 +26 -21
- package/dist/main.js +10 -3
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare const companyUserRoles: z.ZodEnum<{
|
|
|
6
6
|
physAsst: "physAsst";
|
|
7
7
|
rcpst: "rcpst";
|
|
8
8
|
cshr: "cshr";
|
|
9
|
+
"a/r": "a/r";
|
|
9
10
|
founder: "founder";
|
|
10
11
|
}>;
|
|
11
12
|
type CompanyUserRole = z.infer<typeof companyUserRoles>;
|
|
@@ -19,6 +20,7 @@ declare const employeeRoles: z.ZodEnum<{
|
|
|
19
20
|
physAsst: "physAsst";
|
|
20
21
|
rcpst: "rcpst";
|
|
21
22
|
cshr: "cshr";
|
|
23
|
+
"a/r": "a/r";
|
|
22
24
|
}>;
|
|
23
25
|
type EmployeeRole = z.infer<typeof employeeRoles>;
|
|
24
26
|
declare const adminRoles: z.ZodEnum<{
|
|
@@ -280,8 +282,9 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
280
282
|
physAsst: "physAsst";
|
|
281
283
|
rcpst: "rcpst";
|
|
282
284
|
cshr: "cshr";
|
|
285
|
+
"a/r": "a/r";
|
|
283
286
|
founder: "founder";
|
|
284
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
287
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
285
288
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
286
289
|
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
287
290
|
}, z.core.$strip>>;
|
|
@@ -298,8 +301,9 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
298
301
|
physAsst: "physAsst";
|
|
299
302
|
rcpst: "rcpst";
|
|
300
303
|
cshr: "cshr";
|
|
304
|
+
"a/r": "a/r";
|
|
301
305
|
founder: "founder";
|
|
302
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
306
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
303
307
|
addedAt: z.ZodInt;
|
|
304
308
|
}, z.core.$strip>>;
|
|
305
309
|
}, z.core.$strip>>;
|
|
@@ -426,8 +430,9 @@ declare const MutableCompanyDetails: z.ZodObject<{
|
|
|
426
430
|
physAsst: "physAsst";
|
|
427
431
|
rcpst: "rcpst";
|
|
428
432
|
cshr: "cshr";
|
|
433
|
+
"a/r": "a/r";
|
|
429
434
|
founder: "founder";
|
|
430
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
435
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
431
436
|
addedAt: z.ZodInt;
|
|
432
437
|
}, z.core.$strip>>;
|
|
433
438
|
}, z.core.$strip>>>;
|
|
@@ -706,8 +711,9 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
706
711
|
physAsst: "physAsst";
|
|
707
712
|
rcpst: "rcpst";
|
|
708
713
|
cshr: "cshr";
|
|
714
|
+
"a/r": "a/r";
|
|
709
715
|
founder: "founder";
|
|
710
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
716
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
711
717
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
712
718
|
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
713
719
|
}, z.core.$strip>>;
|
|
@@ -725,8 +731,9 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
725
731
|
physAsst: "physAsst";
|
|
726
732
|
rcpst: "rcpst";
|
|
727
733
|
cshr: "cshr";
|
|
734
|
+
"a/r": "a/r";
|
|
728
735
|
founder: "founder";
|
|
729
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
736
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
730
737
|
addedAt: z.ZodInt;
|
|
731
738
|
}, z.core.$strip>>;
|
|
732
739
|
}, z.core.$strip>>;
|
|
@@ -783,8 +790,9 @@ declare const CompanyUserSession: z.ZodObject<{
|
|
|
783
790
|
physAsst: "physAsst";
|
|
784
791
|
rcpst: "rcpst";
|
|
785
792
|
cshr: "cshr";
|
|
793
|
+
"a/r": "a/r";
|
|
786
794
|
founder: "founder";
|
|
787
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
795
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
788
796
|
ttl: z.ZodNumber;
|
|
789
797
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
790
798
|
expiresAfter: z.ZodDate;
|
|
@@ -805,8 +813,9 @@ declare const MiniCompanyUser: z.ZodObject<{
|
|
|
805
813
|
physAsst: "physAsst";
|
|
806
814
|
rcpst: "rcpst";
|
|
807
815
|
cshr: "cshr";
|
|
816
|
+
"a/r": "a/r";
|
|
808
817
|
founder: "founder";
|
|
809
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
818
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
810
819
|
_id: z.ZodUUID;
|
|
811
820
|
}, z.core.$strip>;
|
|
812
821
|
type MiniCompanyUser = z.infer<typeof MiniCompanyUser>;
|
|
@@ -833,8 +842,9 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
833
842
|
physAsst: "physAsst";
|
|
834
843
|
rcpst: "rcpst";
|
|
835
844
|
cshr: "cshr";
|
|
845
|
+
"a/r": "a/r";
|
|
836
846
|
founder: "founder";
|
|
837
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
847
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
838
848
|
}, z.core.$strip>;
|
|
839
849
|
type CompanyUser = z.infer<typeof CompanyUser>;
|
|
840
850
|
|
|
@@ -845,8 +855,9 @@ declare const CompanyInviteList: z.ZodRecord<z.ZodEmail, z.ZodObject<{
|
|
|
845
855
|
physAsst: "physAsst";
|
|
846
856
|
rcpst: "rcpst";
|
|
847
857
|
cshr: "cshr";
|
|
858
|
+
"a/r": "a/r";
|
|
848
859
|
founder: "founder";
|
|
849
|
-
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
860
|
+
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
|
|
850
861
|
}, z.core.$strip>>;
|
|
851
862
|
type CompanyInviteList = z.infer<typeof CompanyInviteList>;
|
|
852
863
|
|
|
@@ -1136,13 +1147,6 @@ declare const ClientForm: z.ZodObject<{
|
|
|
1136
1147
|
male: "male";
|
|
1137
1148
|
female: "female";
|
|
1138
1149
|
}>>;
|
|
1139
|
-
attributes: z.ZodNonOptional<z.ZodObject<{
|
|
1140
|
-
mothersMaidenName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1141
|
-
fathersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1142
|
-
mothersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1143
|
-
oldestSiblingMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1144
|
-
firstSchoolName: z.ZodOptional<z.ZodString>;
|
|
1145
|
-
}, z.core.$strip>>;
|
|
1146
1150
|
}, z.core.$strip>;
|
|
1147
1151
|
type ClientForm = z.infer<typeof ClientForm>;
|
|
1148
1152
|
|
|
@@ -1781,7 +1785,7 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1781
1785
|
lastModified: number | null;
|
|
1782
1786
|
};
|
|
1783
1787
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1784
|
-
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1788
|
+
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
|
|
1785
1789
|
lastActive: number | null;
|
|
1786
1790
|
inviteAccepted: number | null;
|
|
1787
1791
|
inviteSent?: number | null | undefined;
|
|
@@ -1795,7 +1799,7 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1795
1799
|
addedAt: number;
|
|
1796
1800
|
} | undefined;
|
|
1797
1801
|
$CHANGE_ROLES?: {
|
|
1798
|
-
newRoles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1802
|
+
newRoles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
|
|
1799
1803
|
addedAt: number;
|
|
1800
1804
|
} | undefined;
|
|
1801
1805
|
}>;
|
|
@@ -1984,7 +1988,7 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1984
1988
|
lastModified: number | null;
|
|
1985
1989
|
};
|
|
1986
1990
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1987
|
-
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1991
|
+
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
|
|
1988
1992
|
inviteSent?: number | null | undefined;
|
|
1989
1993
|
} | {
|
|
1990
1994
|
lastActive: number | null;
|
|
@@ -1995,7 +1999,7 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1995
1999
|
lastModified: number | null;
|
|
1996
2000
|
};
|
|
1997
2001
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1998
|
-
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
2002
|
+
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
|
|
1999
2003
|
_id: string;
|
|
2000
2004
|
inviteSent?: number | null | undefined;
|
|
2001
2005
|
})[] | null;
|
|
@@ -2006,10 +2010,11 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
2006
2010
|
declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
|
|
2007
2011
|
declare const normalizeCompanyId: (id: string) => string;
|
|
2008
2012
|
declare const normalizeNidClass: (value: NidClass) => string;
|
|
2013
|
+
declare const parseClientName: ({ firstName, middleName, lastName, }: Pick<ClientIdentity, "firstName" | "middleName" | "lastName">) => string;
|
|
2009
2014
|
|
|
2010
2015
|
declare function createNotifId(options?: {
|
|
2011
2016
|
from: string;
|
|
2012
2017
|
to: string;
|
|
2013
2018
|
}): string;
|
|
2014
2019
|
|
|
2015
|
-
export { AppointmentDetails, type AppointmentDistAlg, ClientForm, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, type CompanyType, CompanyUser, type CompanyUserRole, CompanyUserSession, type CompanyUserStatus, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, type NidClass, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Version, Vitals, adminRoles, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, genders, getCompatibleRoles, healthcareProviderRoles, nidClasses, normalizeCompanyId, normalizeNidClass, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
|
2020
|
+
export { AppointmentDetails, type AppointmentDistAlg, ClientForm, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, type CompanyType, CompanyUser, type CompanyUserRole, CompanyUserSession, type CompanyUserStatus, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, type NidClass, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Version, Vitals, adminRoles, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, genders, getCompatibleRoles, healthcareProviderRoles, nidClasses, normalizeCompanyId, normalizeNidClass, parseClientName, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
package/dist/main.js
CHANGED
|
@@ -5,6 +5,7 @@ var companyUserRoles = z.enum([
|
|
|
5
5
|
"physAsst",
|
|
6
6
|
"rcpst",
|
|
7
7
|
"cshr",
|
|
8
|
+
"a/r",
|
|
8
9
|
"founder"
|
|
9
10
|
// "admin",
|
|
10
11
|
]);
|
|
@@ -439,6 +440,11 @@ var normalizeNidClass = (value) => {
|
|
|
439
440
|
if (value === "trn") return "Tax Registration No.";
|
|
440
441
|
return camelCaseToLetter(value.replace("No", "No."));
|
|
441
442
|
};
|
|
443
|
+
var parseClientName = ({
|
|
444
|
+
firstName,
|
|
445
|
+
middleName,
|
|
446
|
+
lastName
|
|
447
|
+
}) => [firstName, middleName[0] + ".", lastName].join(" ");
|
|
442
448
|
|
|
443
449
|
// src/schemas/profiles/User.ts
|
|
444
450
|
import { UserModel } from "@wavy/util";
|
|
@@ -724,7 +730,7 @@ var ClientIdentity = UserDetails.pick({
|
|
|
724
730
|
nid: z20.object({
|
|
725
731
|
class: nidClasses,
|
|
726
732
|
// Hash this value
|
|
727
|
-
value: z20.string().max(20)
|
|
733
|
+
value: z20.string().min(5).max(20)
|
|
728
734
|
}).superRefine((data, ctx) => {
|
|
729
735
|
const invalidCharIdx = data.value.search(/[^a-z0-9]/i);
|
|
730
736
|
if (data.class === "trn") {
|
|
@@ -761,8 +767,8 @@ var ClientForm = ClientIdentity.pick({
|
|
|
761
767
|
middleName: true,
|
|
762
768
|
lastName: true,
|
|
763
769
|
dob: true,
|
|
764
|
-
sex: true
|
|
765
|
-
attributes: true
|
|
770
|
+
sex: true
|
|
771
|
+
// attributes: true,
|
|
766
772
|
}).required();
|
|
767
773
|
|
|
768
774
|
// src/schemas/appointment/Appointment.ts
|
|
@@ -1102,6 +1108,7 @@ export {
|
|
|
1102
1108
|
nidClasses,
|
|
1103
1109
|
normalizeCompanyId,
|
|
1104
1110
|
normalizeNidClass,
|
|
1111
|
+
parseClientName,
|
|
1105
1112
|
paymentMethods,
|
|
1106
1113
|
scheduleAppointment,
|
|
1107
1114
|
serviceProviders,
|