@bizmap/sdk 0.0.81 → 0.0.82
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 +75 -17
- package/dist/main.js +36 -5
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -63,6 +63,11 @@ declare const paymentMethods: z.ZodEnum<{
|
|
|
63
63
|
insurance: "insurance";
|
|
64
64
|
}>;
|
|
65
65
|
type PaymentMethod = z.infer<typeof paymentMethods>;
|
|
66
|
+
declare const genders: z.ZodEnum<{
|
|
67
|
+
male: "male";
|
|
68
|
+
female: "female";
|
|
69
|
+
}>;
|
|
70
|
+
type Gender = z.infer<typeof genders>;
|
|
66
71
|
|
|
67
72
|
declare const vitalKeys: z.ZodEnum<{
|
|
68
73
|
heartRate: "heartRate";
|
|
@@ -1079,12 +1084,26 @@ declare const ClientIdentity: z.ZodObject<{
|
|
|
1079
1084
|
version: z.ZodInt;
|
|
1080
1085
|
_id: z.ZodUUID;
|
|
1081
1086
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1082
|
-
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1083
1087
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1084
|
-
|
|
1085
|
-
|
|
1088
|
+
firstName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1089
|
+
middleName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1090
|
+
lastName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1086
1091
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1087
|
-
dob: z.
|
|
1092
|
+
dob: z.ZodInt;
|
|
1093
|
+
sex: z.ZodEnum<{
|
|
1094
|
+
male: "male";
|
|
1095
|
+
female: "female";
|
|
1096
|
+
}>;
|
|
1097
|
+
isGlobal: z.ZodBoolean;
|
|
1098
|
+
origin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1099
|
+
attributes: z.ZodObject<{
|
|
1100
|
+
mothersMaidenName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1101
|
+
fathersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1102
|
+
mothersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1103
|
+
oldestSiblingMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1104
|
+
firstSchoolName: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
1106
|
+
}, z.core.$strip>;
|
|
1088
1107
|
address: z.ZodOptional<z.ZodObject<{
|
|
1089
1108
|
streetAddress: z.ZodString;
|
|
1090
1109
|
city: z.ZodOptional<z.ZodString>;
|
|
@@ -1398,12 +1417,26 @@ declare const AppointmentDetails: z.ZodObject<{
|
|
|
1398
1417
|
version: z.ZodInt;
|
|
1399
1418
|
_id: z.ZodUUID;
|
|
1400
1419
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1401
|
-
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1402
1420
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1403
|
-
|
|
1404
|
-
|
|
1421
|
+
firstName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1422
|
+
middleName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1423
|
+
lastName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1405
1424
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1406
|
-
dob: z.
|
|
1425
|
+
dob: z.ZodInt;
|
|
1426
|
+
sex: z.ZodEnum<{
|
|
1427
|
+
male: "male";
|
|
1428
|
+
female: "female";
|
|
1429
|
+
}>;
|
|
1430
|
+
isGlobal: z.ZodBoolean;
|
|
1431
|
+
origin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1432
|
+
attributes: z.ZodObject<{
|
|
1433
|
+
mothersMaidenName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1434
|
+
fathersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1435
|
+
mothersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1436
|
+
oldestSiblingMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1437
|
+
firstSchoolName: z.ZodOptional<z.ZodString>;
|
|
1438
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
1439
|
+
}, z.core.$strip>;
|
|
1407
1440
|
address: z.ZodOptional<z.ZodObject<{
|
|
1408
1441
|
streetAddress: z.ZodString;
|
|
1409
1442
|
city: z.ZodOptional<z.ZodString>;
|
|
@@ -1567,12 +1600,26 @@ declare const MutableAppointmentDetails: z.ZodObject<{
|
|
|
1567
1600
|
version: z.ZodInt;
|
|
1568
1601
|
_id: z.ZodUUID;
|
|
1569
1602
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1570
|
-
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1571
1603
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1572
|
-
|
|
1573
|
-
|
|
1604
|
+
firstName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1605
|
+
middleName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1606
|
+
lastName: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1574
1607
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1575
|
-
dob: z.
|
|
1608
|
+
dob: z.ZodInt;
|
|
1609
|
+
sex: z.ZodEnum<{
|
|
1610
|
+
male: "male";
|
|
1611
|
+
female: "female";
|
|
1612
|
+
}>;
|
|
1613
|
+
isGlobal: z.ZodBoolean;
|
|
1614
|
+
origin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1615
|
+
attributes: z.ZodObject<{
|
|
1616
|
+
mothersMaidenName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1617
|
+
fathersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1618
|
+
mothersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1619
|
+
oldestSiblingMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1620
|
+
firstSchoolName: z.ZodOptional<z.ZodString>;
|
|
1621
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
1622
|
+
}, z.core.$strip>;
|
|
1576
1623
|
address: z.ZodOptional<z.ZodObject<{
|
|
1577
1624
|
streetAddress: z.ZodString;
|
|
1578
1625
|
city: z.ZodOptional<z.ZodString>;
|
|
@@ -1774,14 +1821,25 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1774
1821
|
createdAt: number;
|
|
1775
1822
|
version: number;
|
|
1776
1823
|
_id: string;
|
|
1777
|
-
|
|
1824
|
+
firstName: string;
|
|
1825
|
+
middleName: string;
|
|
1826
|
+
lastName: string;
|
|
1827
|
+
dob: number;
|
|
1828
|
+
sex: "male" | "female";
|
|
1829
|
+
isGlobal: boolean;
|
|
1830
|
+
origin: string;
|
|
1831
|
+
attributes: {
|
|
1832
|
+
mothersMaidenName?: string | undefined;
|
|
1833
|
+
fathersMiddleName?: string | undefined;
|
|
1834
|
+
mothersMiddleName?: string | undefined;
|
|
1835
|
+
oldestSiblingMiddleName?: string | undefined;
|
|
1836
|
+
firstSchoolName?: string | undefined;
|
|
1837
|
+
nickname?: string | undefined;
|
|
1838
|
+
};
|
|
1778
1839
|
lastModified?: number | null | undefined;
|
|
1779
1840
|
phoneNumber?: string | undefined;
|
|
1780
1841
|
photoUrl?: string | null | undefined;
|
|
1781
|
-
companyUids?: string[] | undefined;
|
|
1782
|
-
resumeToken?: string | undefined;
|
|
1783
1842
|
email?: string | undefined;
|
|
1784
|
-
dob?: number | undefined;
|
|
1785
1843
|
address?: {
|
|
1786
1844
|
streetAddress: string;
|
|
1787
1845
|
parish: string;
|
|
@@ -1900,4 +1958,4 @@ declare function createNotifId(options?: {
|
|
|
1900
1958
|
to: string;
|
|
1901
1959
|
}): string;
|
|
1902
1960
|
|
|
1903
|
-
export { AppointmentDetails, type AppointmentDistAlg, 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 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, Version, Vitals, adminRoles, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, getCompatibleRoles, healthcareProviderRoles, normalizeCompanyId, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
|
1961
|
+
export { AppointmentDetails, type AppointmentDistAlg, 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, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, UserDetails, Version, Vitals, adminRoles, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, genders, getCompatibleRoles, healthcareProviderRoles, normalizeCompanyId, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
package/dist/main.js
CHANGED
|
@@ -27,6 +27,7 @@ var companyUserStatus = z.enum(["inviteSent", "active", "inactive"]);
|
|
|
27
27
|
import * as z2 from "zod";
|
|
28
28
|
var tiers = z2.enum(["basic", "pro", "premium", "gold"]);
|
|
29
29
|
var paymentMethods = z2.enum(["cash", "card", "insurance"]);
|
|
30
|
+
var genders = z2.enum(["male", "female"]);
|
|
30
31
|
|
|
31
32
|
// src/enums/Medical.ts
|
|
32
33
|
import * as z3 from "zod";
|
|
@@ -680,14 +681,43 @@ var MedicalDetails = z19.object({
|
|
|
680
681
|
// src/schemas/profiles/Client.ts
|
|
681
682
|
import * as z20 from "zod";
|
|
682
683
|
import { Address as Address2 } from "@wavy/util";
|
|
683
|
-
var
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
684
|
+
var Name = z20.string().trim().min(2).transform((d) => d.replace(/-+/g, "-").replace(/'+/g, "'")).superRefine((data, ctx) => {
|
|
685
|
+
const invalidCharIdx = data.search(/[^a-z'-]/i);
|
|
686
|
+
if (invalidCharIdx >= 0) {
|
|
687
|
+
const char = data[invalidCharIdx].includes('"') ? `(${data[invalidCharIdx]})` : `"${data[invalidCharIdx]}"`;
|
|
688
|
+
ctx.addIssue(`${char} is not an allowed character.`);
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
var ClientIdentity = UserDetails.pick({
|
|
692
|
+
_id: true,
|
|
693
|
+
createdAt: true,
|
|
694
|
+
lastModified: true,
|
|
695
|
+
phoneNumber: true,
|
|
696
|
+
version: true,
|
|
697
|
+
photoUrl: true
|
|
687
698
|
}).safeExtend(
|
|
688
699
|
z20.object({
|
|
700
|
+
firstName: Name,
|
|
701
|
+
middleName: Name,
|
|
702
|
+
lastName: Name,
|
|
689
703
|
email: UserDetails.shape.email.optional(),
|
|
690
|
-
dob: Timestamp
|
|
704
|
+
dob: Timestamp,
|
|
705
|
+
sex: genders,
|
|
706
|
+
isGlobal: z20.boolean(),
|
|
707
|
+
origin: CompanyIdentity.shape._id,
|
|
708
|
+
// Don't hash the attributes, they can be used to help accurately identify a client by whoever is searching for
|
|
709
|
+
// the client
|
|
710
|
+
attributes: z20.object({
|
|
711
|
+
mothersMaidenName: Name,
|
|
712
|
+
fathersMiddleName: Name,
|
|
713
|
+
mothersMiddleName: Name,
|
|
714
|
+
oldestSiblingMiddleName: Name,
|
|
715
|
+
firstSchoolName: z20.string().trim().min(3).max(60),
|
|
716
|
+
nickname: z20.string().trim().min(1).max(40)
|
|
717
|
+
}).partial().refine(
|
|
718
|
+
(data) => Object.keys(data).length > 0,
|
|
719
|
+
"At least (1) attribute must be defined."
|
|
720
|
+
),
|
|
691
721
|
address: Address2.optional(),
|
|
692
722
|
linkedTo: UserDetails.shape._id.optional()
|
|
693
723
|
}).shape
|
|
@@ -1020,6 +1050,7 @@ export {
|
|
|
1020
1050
|
findAvailableStaff,
|
|
1021
1051
|
findConflictingPartners,
|
|
1022
1052
|
findNextAvailableStaff,
|
|
1053
|
+
genders,
|
|
1023
1054
|
getCompatibleRoles,
|
|
1024
1055
|
healthcareProviderRoles,
|
|
1025
1056
|
normalizeCompanyId,
|