@bizmap/sdk 0.0.64 → 0.0.65
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 +19 -33
- package/dist/main.js +6 -5
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -225,6 +225,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
225
225
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
226
226
|
members: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
227
227
|
_id: z.ZodUUID;
|
|
228
|
+
email: z.ZodEmail;
|
|
229
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
230
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
231
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
232
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
229
233
|
doc: "doc";
|
|
230
234
|
physAsst: "physAsst";
|
|
@@ -243,14 +247,6 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
243
247
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
244
248
|
isAvailableLastModified: z.ZodNullable<z.ZodInt>;
|
|
245
249
|
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
246
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
247
|
-
first: "first";
|
|
248
|
-
last: "last";
|
|
249
|
-
}>, z.ZodString>;
|
|
250
|
-
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
|
-
email: z.ZodEmail;
|
|
252
|
-
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
253
|
-
uid: z.ZodString;
|
|
254
250
|
}, z.core.$strip>>;
|
|
255
251
|
partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
256
252
|
addedAt: z.ZodInt;
|
|
@@ -278,7 +274,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
278
274
|
}, z.core.$strip>;
|
|
279
275
|
type CompanyDetails = z.infer<typeof CompanyDetails>;
|
|
280
276
|
declare const MutableCompanyDetails: z.ZodObject<{
|
|
281
|
-
|
|
277
|
+
_id: z.ZodUUID;
|
|
282
278
|
identity: z.ZodOptional<z.ZodObject<{
|
|
283
279
|
address: z.ZodOptional<z.ZodObject<{
|
|
284
280
|
streetAddress: z.ZodString;
|
|
@@ -641,6 +637,10 @@ type MutableCompanyPreferences = z.infer<typeof MutableCompanyPreferences>;
|
|
|
641
637
|
declare const CompanyStaff: z.ZodObject<{
|
|
642
638
|
members: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
643
639
|
_id: z.ZodUUID;
|
|
640
|
+
email: z.ZodEmail;
|
|
641
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
642
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
643
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
644
644
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
645
645
|
doc: "doc";
|
|
646
646
|
physAsst: "physAsst";
|
|
@@ -659,14 +659,6 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
659
659
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
660
660
|
isAvailableLastModified: z.ZodNullable<z.ZodInt>;
|
|
661
661
|
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
662
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
663
|
-
first: "first";
|
|
664
|
-
last: "last";
|
|
665
|
-
}>, z.ZodString>;
|
|
666
|
-
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
667
|
-
email: z.ZodEmail;
|
|
668
|
-
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
669
|
-
uid: z.ZodString;
|
|
670
662
|
}, z.core.$strip>>;
|
|
671
663
|
_id: z.ZodUUID;
|
|
672
664
|
partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
@@ -742,6 +734,10 @@ declare const MiniCompanyUser: z.ZodObject<{
|
|
|
742
734
|
type MiniCompanyUser = z.infer<typeof MiniCompanyUser>;
|
|
743
735
|
declare const CompanyUser: z.ZodObject<{
|
|
744
736
|
_id: z.ZodUUID;
|
|
737
|
+
email: z.ZodEmail;
|
|
738
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
739
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
740
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
745
741
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
746
742
|
doc: "doc";
|
|
747
743
|
physAsst: "physAsst";
|
|
@@ -760,14 +756,6 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
760
756
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
761
757
|
isAvailableLastModified: z.ZodNullable<z.ZodInt>;
|
|
762
758
|
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
763
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
764
|
-
first: "first";
|
|
765
|
-
last: "last";
|
|
766
|
-
}>, z.ZodString>;
|
|
767
|
-
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
768
|
-
email: z.ZodEmail;
|
|
769
|
-
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
770
|
-
uid: z.ZodString;
|
|
771
759
|
}, z.core.$strip>;
|
|
772
760
|
type CompanyUser = z.infer<typeof CompanyUser>;
|
|
773
761
|
|
|
@@ -1559,6 +1547,8 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1559
1547
|
staffDetails: {
|
|
1560
1548
|
members: Record<string, {
|
|
1561
1549
|
_id: string;
|
|
1550
|
+
email: string;
|
|
1551
|
+
name: string;
|
|
1562
1552
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
1563
1553
|
isAvailable: boolean;
|
|
1564
1554
|
isBusy: boolean;
|
|
@@ -1567,11 +1557,8 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1567
1557
|
lastActive: number | null;
|
|
1568
1558
|
isAvailableLastModified: number | null;
|
|
1569
1559
|
isBusyLastModified: number | null;
|
|
1570
|
-
name: Record<"first" | "last", string>;
|
|
1571
|
-
email: string;
|
|
1572
|
-
uid: string;
|
|
1573
|
-
photoUrl?: string | null | undefined;
|
|
1574
1560
|
phoneNumber?: string | undefined;
|
|
1561
|
+
photoUrl?: string | null | undefined;
|
|
1575
1562
|
}>;
|
|
1576
1563
|
_id: string;
|
|
1577
1564
|
partnerMap: Record<string, Record<string, {
|
|
@@ -1745,6 +1732,8 @@ declare function findNextAvailableStaff(userUids: string[], algorithm: CompanyPr
|
|
|
1745
1732
|
* incompatible with the other partners, or null if none was found. */
|
|
1746
1733
|
declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyUser)[]) => ({
|
|
1747
1734
|
_id: string;
|
|
1735
|
+
email: string;
|
|
1736
|
+
name: string;
|
|
1748
1737
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
1749
1738
|
isAvailable: boolean;
|
|
1750
1739
|
isBusy: boolean;
|
|
@@ -1753,11 +1742,8 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1753
1742
|
lastActive: number | null;
|
|
1754
1743
|
isAvailableLastModified: number | null;
|
|
1755
1744
|
isBusyLastModified: number | null;
|
|
1756
|
-
name: Record<"first" | "last", string>;
|
|
1757
|
-
email: string;
|
|
1758
|
-
uid: string;
|
|
1759
|
-
photoUrl?: string | null | undefined;
|
|
1760
1745
|
phoneNumber?: string | undefined;
|
|
1746
|
+
photoUrl?: string | null | undefined;
|
|
1761
1747
|
} | {
|
|
1762
1748
|
_id: string;
|
|
1763
1749
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
package/dist/main.js
CHANGED
|
@@ -180,7 +180,7 @@ import { Address, PhoneNumber } from "@wavy/util";
|
|
|
180
180
|
var CompanyIdentity = z9.object({
|
|
181
181
|
_id: CompanyState.shape._id,
|
|
182
182
|
displayName: z9.string().min(3).max(25),
|
|
183
|
-
logo: z9.string().max(
|
|
183
|
+
logo: z9.string().max(150).nullish(),
|
|
184
184
|
/** Hash this field */
|
|
185
185
|
// password: z.string(),
|
|
186
186
|
contact: z9.object({
|
|
@@ -324,7 +324,7 @@ var UserDetails = z13.object({
|
|
|
324
324
|
_id: z13.uuidv4(),
|
|
325
325
|
name: z13.string().transform((data) => {
|
|
326
326
|
const [firstName = "", lastName = ""] = data.split(" ");
|
|
327
|
-
return firstName + lastName;
|
|
327
|
+
return (firstName + " " + lastName).trim();
|
|
328
328
|
}).superRefine((data, ctx) => {
|
|
329
329
|
data.split(" ").forEach((name, idx) => {
|
|
330
330
|
const nty = idx === 0 ? "First" : "Last";
|
|
@@ -408,8 +408,9 @@ var MiniCompanyUser2 = z14.object({
|
|
|
408
408
|
});
|
|
409
409
|
var CompanyUser = z14.object({
|
|
410
410
|
...UserModel2.shape,
|
|
411
|
-
...MiniCompanyUser2.shape
|
|
412
|
-
|
|
411
|
+
...MiniCompanyUser2.shape,
|
|
412
|
+
name: UserDetails.shape.name
|
|
413
|
+
}).omit({ uid: true });
|
|
413
414
|
|
|
414
415
|
// src/schemas/company/components/Staff.ts
|
|
415
416
|
var refineMembers = (data, ctx) => {
|
|
@@ -529,7 +530,7 @@ var CompanyDetails = z16.object({
|
|
|
529
530
|
staff: RawCompanyStaff.omit({ _id: true })
|
|
530
531
|
});
|
|
531
532
|
var MutableCompanyDetails = z16.object({
|
|
532
|
-
|
|
533
|
+
_id: CompanyDetails.shape._id,
|
|
533
534
|
identity: MutableCompanyIdentity.partial().optional(),
|
|
534
535
|
preferences: MutableCompanyPreferences.partial().optional(),
|
|
535
536
|
billing: MutableCompanyBilling.partial().optional(),
|