@bizmap/sdk 0.0.69 → 0.0.70
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 +115 -86
- package/dist/main.js +10 -13
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -247,17 +247,23 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
247
247
|
cshr: "cshr";
|
|
248
248
|
admin: "admin";
|
|
249
249
|
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
|
|
250
|
-
isAvailable: z.
|
|
251
|
-
|
|
250
|
+
isAvailable: z.ZodObject<{
|
|
251
|
+
value: z.ZodBoolean;
|
|
252
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
isBusy: z.ZodObject<{
|
|
255
|
+
value: z.ZodBoolean;
|
|
256
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
257
|
+
}, z.core.$strip>;
|
|
252
258
|
status: z.ZodEnum<{
|
|
253
259
|
inviteSent: "inviteSent";
|
|
254
260
|
active: "active";
|
|
255
261
|
inactive: "inactive";
|
|
256
262
|
}>;
|
|
263
|
+
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
257
264
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
258
265
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
259
|
-
|
|
260
|
-
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
266
|
+
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
261
267
|
}, z.core.$strip>>;
|
|
262
268
|
partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
263
269
|
addedAt: z.ZodInt;
|
|
@@ -277,10 +283,6 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
277
283
|
addedAt: z.ZodInt;
|
|
278
284
|
}, z.core.$strip>>;
|
|
279
285
|
}, z.core.$strip>>;
|
|
280
|
-
timeline: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
281
|
-
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
282
|
-
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
283
|
-
}, z.core.$strip>>;
|
|
284
286
|
}, z.core.$strip>;
|
|
285
287
|
}, z.core.$strip>;
|
|
286
288
|
type CompanyDetails = z.infer<typeof CompanyDetails>;
|
|
@@ -670,17 +672,23 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
670
672
|
cshr: "cshr";
|
|
671
673
|
admin: "admin";
|
|
672
674
|
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
|
|
673
|
-
isAvailable: z.
|
|
674
|
-
|
|
675
|
+
isAvailable: z.ZodObject<{
|
|
676
|
+
value: z.ZodBoolean;
|
|
677
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
678
|
+
}, z.core.$strip>;
|
|
679
|
+
isBusy: z.ZodObject<{
|
|
680
|
+
value: z.ZodBoolean;
|
|
681
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
682
|
+
}, z.core.$strip>;
|
|
675
683
|
status: z.ZodEnum<{
|
|
676
684
|
inviteSent: "inviteSent";
|
|
677
685
|
active: "active";
|
|
678
686
|
inactive: "inactive";
|
|
679
687
|
}>;
|
|
688
|
+
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
680
689
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
681
690
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
682
|
-
|
|
683
|
-
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
691
|
+
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
684
692
|
}, z.core.$strip>>;
|
|
685
693
|
_id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
686
694
|
partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
@@ -701,10 +709,6 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
701
709
|
addedAt: z.ZodInt;
|
|
702
710
|
}, z.core.$strip>>;
|
|
703
711
|
}, z.core.$strip>>;
|
|
704
|
-
timeline: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
705
|
-
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
706
|
-
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
707
|
-
}, z.core.$strip>>;
|
|
708
712
|
lastModified: z.ZodNullable<z.ZodInt>;
|
|
709
713
|
}, z.core.$strip>;
|
|
710
714
|
type CompanyStaff = z.infer<typeof CompanyStaff>;
|
|
@@ -741,8 +745,14 @@ declare const MiniCompanyUser: z.ZodObject<{
|
|
|
741
745
|
cshr: "cshr";
|
|
742
746
|
admin: "admin";
|
|
743
747
|
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
|
|
744
|
-
isAvailable: z.
|
|
745
|
-
|
|
748
|
+
isAvailable: z.ZodObject<{
|
|
749
|
+
value: z.ZodBoolean;
|
|
750
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
751
|
+
}, z.core.$strip>;
|
|
752
|
+
isBusy: z.ZodObject<{
|
|
753
|
+
value: z.ZodBoolean;
|
|
754
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
755
|
+
}, z.core.$strip>;
|
|
746
756
|
status: z.ZodEnum<{
|
|
747
757
|
inviteSent: "inviteSent";
|
|
748
758
|
active: "active";
|
|
@@ -750,8 +760,8 @@ declare const MiniCompanyUser: z.ZodObject<{
|
|
|
750
760
|
}>;
|
|
751
761
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
752
762
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
753
|
-
|
|
754
|
-
|
|
763
|
+
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
764
|
+
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
755
765
|
}, z.core.$strip>;
|
|
756
766
|
type MiniCompanyUser = z.infer<typeof MiniCompanyUser>;
|
|
757
767
|
declare const CompanyUser: z.ZodObject<{
|
|
@@ -767,17 +777,23 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
767
777
|
cshr: "cshr";
|
|
768
778
|
admin: "admin";
|
|
769
779
|
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
|
|
770
|
-
isAvailable: z.
|
|
771
|
-
|
|
780
|
+
isAvailable: z.ZodObject<{
|
|
781
|
+
value: z.ZodBoolean;
|
|
782
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
783
|
+
}, z.core.$strip>;
|
|
784
|
+
isBusy: z.ZodObject<{
|
|
785
|
+
value: z.ZodBoolean;
|
|
786
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
787
|
+
}, z.core.$strip>;
|
|
772
788
|
status: z.ZodEnum<{
|
|
773
789
|
inviteSent: "inviteSent";
|
|
774
790
|
active: "active";
|
|
775
791
|
inactive: "inactive";
|
|
776
792
|
}>;
|
|
793
|
+
inviteSent: z.ZodNullable<z.ZodInt>;
|
|
777
794
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
778
795
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
779
|
-
|
|
780
|
-
isBusyLastModified: z.ZodNullable<z.ZodInt>;
|
|
796
|
+
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
781
797
|
}, z.core.$strip>;
|
|
782
798
|
type CompanyUser = z.infer<typeof CompanyUser>;
|
|
783
799
|
|
|
@@ -1237,24 +1253,6 @@ declare const AppointmentDetails: z.ZodObject<{
|
|
|
1237
1253
|
}, z.core.$strip>>>;
|
|
1238
1254
|
}, z.core.$strip>>>;
|
|
1239
1255
|
src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1240
|
-
timeline: z.ZodObject<{
|
|
1241
|
-
scheduler: z.ZodObject<{
|
|
1242
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1243
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1244
|
-
}, z.core.$strip>;
|
|
1245
|
-
physAsst: z.ZodUnion<[z.ZodObject<{
|
|
1246
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1247
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1248
|
-
}, z.core.$strip>, z.ZodLiteral<"none">]>;
|
|
1249
|
-
doctor: z.ZodObject<{
|
|
1250
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1251
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1252
|
-
}, z.core.$strip>;
|
|
1253
|
-
cashier: z.ZodNullable<z.ZodObject<{
|
|
1254
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1255
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1256
|
-
}, z.core.$strip>>;
|
|
1257
|
-
}, z.core.$strip>;
|
|
1258
1256
|
tkt: z.ZodReadonly<z.ZodInt>;
|
|
1259
1257
|
reason: z.ZodOptional<z.ZodObject<{
|
|
1260
1258
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
@@ -1296,6 +1294,24 @@ declare const AppointmentDetails: z.ZodObject<{
|
|
|
1296
1294
|
}>;
|
|
1297
1295
|
amount: z.ZodNumber;
|
|
1298
1296
|
}, z.core.$strip>>>>;
|
|
1297
|
+
timeline: z.ZodObject<{
|
|
1298
|
+
scheduler: z.ZodObject<{
|
|
1299
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1300
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1301
|
+
}, z.core.$strip>;
|
|
1302
|
+
physAsst: z.ZodUnion<[z.ZodObject<{
|
|
1303
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1304
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1305
|
+
}, z.core.$strip>, z.ZodLiteral<"none">]>;
|
|
1306
|
+
doctor: z.ZodObject<{
|
|
1307
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1308
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1309
|
+
}, z.core.$strip>;
|
|
1310
|
+
cashier: z.ZodNullable<z.ZodObject<{
|
|
1311
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1312
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1313
|
+
}, z.core.$strip>>;
|
|
1314
|
+
}, z.core.$strip>;
|
|
1299
1315
|
client: z.ZodObject<{
|
|
1300
1316
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
1301
1317
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -1403,24 +1419,6 @@ declare const MutableAppointmentDetails: z.ZodObject<{
|
|
|
1403
1419
|
}, z.core.$strip>>>;
|
|
1404
1420
|
}, z.core.$strip>>>;
|
|
1405
1421
|
src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1406
|
-
timeline: z.ZodObject<{
|
|
1407
|
-
scheduler: z.ZodObject<{
|
|
1408
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1409
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1410
|
-
}, z.core.$strip>;
|
|
1411
|
-
physAsst: z.ZodUnion<[z.ZodObject<{
|
|
1412
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1413
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1414
|
-
}, z.core.$strip>, z.ZodLiteral<"none">]>;
|
|
1415
|
-
doctor: z.ZodObject<{
|
|
1416
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1417
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1418
|
-
}, z.core.$strip>;
|
|
1419
|
-
cashier: z.ZodNullable<z.ZodObject<{
|
|
1420
|
-
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1421
|
-
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1422
|
-
}, z.core.$strip>>;
|
|
1423
|
-
}, z.core.$strip>;
|
|
1424
1422
|
tkt: z.ZodReadonly<z.ZodInt>;
|
|
1425
1423
|
reason: z.ZodOptional<z.ZodObject<{
|
|
1426
1424
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
@@ -1462,6 +1460,24 @@ declare const MutableAppointmentDetails: z.ZodObject<{
|
|
|
1462
1460
|
}>;
|
|
1463
1461
|
amount: z.ZodNumber;
|
|
1464
1462
|
}, z.core.$strip>>>>;
|
|
1463
|
+
timeline: z.ZodObject<{
|
|
1464
|
+
scheduler: z.ZodObject<{
|
|
1465
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1466
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1467
|
+
}, z.core.$strip>;
|
|
1468
|
+
physAsst: z.ZodUnion<[z.ZodObject<{
|
|
1469
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1470
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1471
|
+
}, z.core.$strip>, z.ZodLiteral<"none">]>;
|
|
1472
|
+
doctor: z.ZodObject<{
|
|
1473
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1474
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1475
|
+
}, z.core.$strip>;
|
|
1476
|
+
cashier: z.ZodNullable<z.ZodObject<{
|
|
1477
|
+
postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1478
|
+
userUid: z.ZodNonOptional<z.ZodUUID>;
|
|
1479
|
+
}, z.core.$strip>>;
|
|
1480
|
+
}, z.core.$strip>;
|
|
1465
1481
|
client: z.ZodObject<{
|
|
1466
1482
|
createdAt: z.ZodReadonly<z.ZodInt>;
|
|
1467
1483
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
@@ -1576,13 +1592,19 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1576
1592
|
email: string;
|
|
1577
1593
|
name: string;
|
|
1578
1594
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
1579
|
-
isAvailable:
|
|
1580
|
-
|
|
1595
|
+
isAvailable: {
|
|
1596
|
+
value: boolean;
|
|
1597
|
+
lastModified: number | null;
|
|
1598
|
+
};
|
|
1599
|
+
isBusy: {
|
|
1600
|
+
value: boolean;
|
|
1601
|
+
lastModified: number | null;
|
|
1602
|
+
};
|
|
1581
1603
|
status: "inviteSent" | "active" | "inactive";
|
|
1604
|
+
inviteSent: number | null;
|
|
1582
1605
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1583
1606
|
lastActive: number | null;
|
|
1584
|
-
|
|
1585
|
-
isBusyLastModified: number | null;
|
|
1607
|
+
inviteAccepted: number | null;
|
|
1586
1608
|
phoneNumber?: string | undefined;
|
|
1587
1609
|
photoUrl?: string | null | undefined;
|
|
1588
1610
|
}>;
|
|
@@ -1599,10 +1621,6 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1599
1621
|
addedAt: number;
|
|
1600
1622
|
} | undefined;
|
|
1601
1623
|
}>;
|
|
1602
|
-
timeline: Record<string, {
|
|
1603
|
-
inviteSent: number | null;
|
|
1604
|
-
inviteAccepted: number | null;
|
|
1605
|
-
}>;
|
|
1606
1624
|
lastModified: number | null;
|
|
1607
1625
|
};
|
|
1608
1626
|
};
|
|
@@ -1643,6 +1661,14 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1643
1661
|
description?: string | undefined;
|
|
1644
1662
|
}[] | null;
|
|
1645
1663
|
src: string;
|
|
1664
|
+
tkt: number;
|
|
1665
|
+
charges: {
|
|
1666
|
+
createdAt: number;
|
|
1667
|
+
currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
|
|
1668
|
+
item: string;
|
|
1669
|
+
cost: number;
|
|
1670
|
+
lastModified?: number | null | undefined;
|
|
1671
|
+
}[];
|
|
1646
1672
|
timeline: {
|
|
1647
1673
|
scheduler: {
|
|
1648
1674
|
userUid: string;
|
|
@@ -1661,14 +1687,6 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1661
1687
|
postedAt?: number | null | undefined;
|
|
1662
1688
|
} | null;
|
|
1663
1689
|
};
|
|
1664
|
-
tkt: number;
|
|
1665
|
-
charges: {
|
|
1666
|
-
createdAt: number;
|
|
1667
|
-
currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
|
|
1668
|
-
item: string;
|
|
1669
|
-
cost: number;
|
|
1670
|
-
lastModified?: number | null | undefined;
|
|
1671
|
-
}[];
|
|
1672
1690
|
client: {
|
|
1673
1691
|
createdAt: number;
|
|
1674
1692
|
_id: string;
|
|
@@ -1761,36 +1779,47 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1761
1779
|
email: string;
|
|
1762
1780
|
name: string;
|
|
1763
1781
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
1764
|
-
isAvailable:
|
|
1765
|
-
|
|
1782
|
+
isAvailable: {
|
|
1783
|
+
value: boolean;
|
|
1784
|
+
lastModified: number | null;
|
|
1785
|
+
};
|
|
1786
|
+
isBusy: {
|
|
1787
|
+
value: boolean;
|
|
1788
|
+
lastModified: number | null;
|
|
1789
|
+
};
|
|
1766
1790
|
status: "inviteSent" | "active" | "inactive";
|
|
1791
|
+
inviteSent: number | null;
|
|
1767
1792
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1768
1793
|
lastActive: number | null;
|
|
1769
|
-
|
|
1770
|
-
isBusyLastModified: number | null;
|
|
1794
|
+
inviteAccepted: number | null;
|
|
1771
1795
|
phoneNumber?: string | undefined;
|
|
1772
1796
|
photoUrl?: string | null | undefined;
|
|
1773
1797
|
} | {
|
|
1774
1798
|
_id: string;
|
|
1775
1799
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
1776
|
-
isAvailable:
|
|
1777
|
-
|
|
1800
|
+
isAvailable: {
|
|
1801
|
+
value: boolean;
|
|
1802
|
+
lastModified: number | null;
|
|
1803
|
+
};
|
|
1804
|
+
isBusy: {
|
|
1805
|
+
value: boolean;
|
|
1806
|
+
lastModified: number | null;
|
|
1807
|
+
};
|
|
1778
1808
|
status: "inviteSent" | "active" | "inactive";
|
|
1779
1809
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1780
1810
|
lastActive: number | null;
|
|
1781
|
-
|
|
1782
|
-
|
|
1811
|
+
inviteSent: number | null;
|
|
1812
|
+
inviteAccepted: number | null;
|
|
1783
1813
|
})[] | null;
|
|
1784
1814
|
/**
|
|
1785
1815
|
* @param {CompanyUserRole} role
|
|
1786
1816
|
* @returns {CompanyUserRole[]} The roles that are compatible with the selected role.
|
|
1787
1817
|
* */
|
|
1788
1818
|
declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
|
|
1789
|
-
declare const parseCompanyName: (name: string) => string;
|
|
1790
1819
|
|
|
1791
1820
|
declare function createNotifId(options?: {
|
|
1792
1821
|
from: string;
|
|
1793
1822
|
to: string;
|
|
1794
1823
|
}): string;
|
|
1795
1824
|
|
|
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,
|
|
1825
|
+
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, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
|
package/dist/main.js
CHANGED
|
@@ -427,7 +427,6 @@ var getCompatibleRoles = (role) => {
|
|
|
427
427
|
}
|
|
428
428
|
return companyUserRoles.exclude([role]).options;
|
|
429
429
|
};
|
|
430
|
-
var parseCompanyName = (name) => name.replace(/-/g, " ");
|
|
431
430
|
|
|
432
431
|
// src/schemas/company/components/User.ts
|
|
433
432
|
var MiniCompanyUser2 = z14.object({
|
|
@@ -443,13 +442,19 @@ var MiniCompanyUser2 = z14.object({
|
|
|
443
442
|
(role, i) => i === 0 || getCompatibleRoles(roles[0]).includes(role)
|
|
444
443
|
);
|
|
445
444
|
}, "A user is not allowed to have conflicting roles."),
|
|
446
|
-
isAvailable: z14.
|
|
447
|
-
|
|
445
|
+
isAvailable: z14.object({
|
|
446
|
+
value: z14.boolean(),
|
|
447
|
+
lastModified: Timestamp.nullable()
|
|
448
|
+
}),
|
|
449
|
+
isBusy: z14.object({
|
|
450
|
+
value: z14.boolean(),
|
|
451
|
+
lastModified: Timestamp.nullable()
|
|
452
|
+
}),
|
|
448
453
|
status: z14.enum(["inviteSent", "active", "inactive"]),
|
|
449
454
|
appointments: z14.record(z14.literal(["ongoing", "completed"]), z14.int().min(0)),
|
|
450
455
|
lastActive: Timestamp.nullable(),
|
|
451
|
-
|
|
452
|
-
|
|
456
|
+
inviteSent: Timestamp.nullable(),
|
|
457
|
+
inviteAccepted: Timestamp.nullable()
|
|
453
458
|
}).superRefine((data, ctx) => {
|
|
454
459
|
if (!data.isAvailable && data.status !== "active") {
|
|
455
460
|
ctx.addIssue('Unavailable users MUST also have the "active" status.');
|
|
@@ -496,13 +501,6 @@ var MiniRawCompanyStaff = z15.object({
|
|
|
496
501
|
})
|
|
497
502
|
}).partial()
|
|
498
503
|
),
|
|
499
|
-
timeline: z15.record(
|
|
500
|
-
CompanyUser.shape._id,
|
|
501
|
-
z15.object({
|
|
502
|
-
inviteSent: Timestamp.nullable(),
|
|
503
|
-
inviteAccepted: Timestamp.nullable()
|
|
504
|
-
})
|
|
505
|
-
),
|
|
506
504
|
lastModified: Timestamp.nullable()
|
|
507
505
|
});
|
|
508
506
|
var RawCompanyStaff = z15.object({
|
|
@@ -973,7 +971,6 @@ export {
|
|
|
973
971
|
findNextAvailableStaff,
|
|
974
972
|
getCompatibleRoles,
|
|
975
973
|
healthcareProviderRoles,
|
|
976
|
-
parseCompanyName,
|
|
977
974
|
paymentMethods,
|
|
978
975
|
scheduleAppointment,
|
|
979
976
|
serviceProviders,
|