@bizmap/sdk 0.0.77 → 0.0.79
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 +39 -1
- package/dist/main.js +12 -4
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
251
251
|
version: z.ZodInt;
|
|
252
252
|
members: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
253
253
|
inviteSent: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
254
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
254
255
|
email: z.ZodEmail;
|
|
255
256
|
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
256
257
|
status: z.ZodEnum<{
|
|
@@ -258,6 +259,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
258
259
|
active: "active";
|
|
259
260
|
inactive: "inactive";
|
|
260
261
|
}>;
|
|
262
|
+
isBusy: z.ZodObject<{
|
|
263
|
+
value: z.ZodBoolean;
|
|
264
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
265
|
+
}, z.core.$strip>;
|
|
261
266
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
262
267
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
263
268
|
doc: "doc";
|
|
@@ -672,6 +677,7 @@ type MutableCompanyPreferences = z.infer<typeof MutableCompanyPreferences>;
|
|
|
672
677
|
declare const CompanyStaff: z.ZodObject<{
|
|
673
678
|
members: z.ZodRecord<z.ZodUUID, z.ZodObject<{
|
|
674
679
|
inviteSent: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
680
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
675
681
|
email: z.ZodEmail;
|
|
676
682
|
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
677
683
|
status: z.ZodEnum<{
|
|
@@ -679,6 +685,10 @@ declare const CompanyStaff: z.ZodObject<{
|
|
|
679
685
|
active: "active";
|
|
680
686
|
inactive: "inactive";
|
|
681
687
|
}>;
|
|
688
|
+
isBusy: z.ZodObject<{
|
|
689
|
+
value: z.ZodBoolean;
|
|
690
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
691
|
+
}, z.core.$strip>;
|
|
682
692
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
683
693
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
684
694
|
doc: "doc";
|
|
@@ -740,7 +750,8 @@ declare const CompanyState: z.ZodObject<{
|
|
|
740
750
|
type CompanyState = z.infer<typeof CompanyState>;
|
|
741
751
|
|
|
742
752
|
declare const CompanyUserSession: z.ZodObject<{
|
|
743
|
-
|
|
753
|
+
_id: z.ZodUUID;
|
|
754
|
+
srcIp: z.ZodString;
|
|
744
755
|
user: z.ZodObject<{
|
|
745
756
|
_id: z.ZodUUID;
|
|
746
757
|
email: z.ZodEmail;
|
|
@@ -763,12 +774,19 @@ declare const CompanyUserSession: z.ZodObject<{
|
|
|
763
774
|
cshr: "cshr";
|
|
764
775
|
founder: "founder";
|
|
765
776
|
}>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
|
|
777
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
766
778
|
expiresAfter: z.ZodDate;
|
|
767
779
|
}, z.core.$strip>;
|
|
780
|
+
type CompanyUserSession = z.infer<typeof CompanyUserSession>;
|
|
768
781
|
declare const MiniCompanyUser: z.ZodObject<{
|
|
769
782
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
770
783
|
inviteSent: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
771
784
|
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
785
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
786
|
+
isBusy: z.ZodObject<{
|
|
787
|
+
value: z.ZodBoolean;
|
|
788
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
789
|
+
}, z.core.$strip>;
|
|
772
790
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
773
791
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
774
792
|
doc: "doc";
|
|
@@ -792,6 +810,11 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
792
810
|
lastActive: z.ZodNullable<z.ZodInt>;
|
|
793
811
|
inviteSent: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
794
812
|
inviteAccepted: z.ZodNullable<z.ZodInt>;
|
|
813
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
814
|
+
isBusy: z.ZodObject<{
|
|
815
|
+
value: z.ZodBoolean;
|
|
816
|
+
lastModified: z.ZodNullable<z.ZodInt>;
|
|
817
|
+
}, z.core.$strip>;
|
|
795
818
|
appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
796
819
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
797
820
|
doc: "doc";
|
|
@@ -1652,9 +1675,14 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1652
1675
|
};
|
|
1653
1676
|
staffDetails: {
|
|
1654
1677
|
members: Record<string, {
|
|
1678
|
+
lastModified: number | null;
|
|
1655
1679
|
email: string;
|
|
1656
1680
|
name: string;
|
|
1657
1681
|
status: "inviteSent" | "active" | "inactive";
|
|
1682
|
+
isBusy: {
|
|
1683
|
+
value: boolean;
|
|
1684
|
+
lastModified: number | null;
|
|
1685
|
+
};
|
|
1658
1686
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1659
1687
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1660
1688
|
lastActive: number | null;
|
|
@@ -1838,12 +1866,22 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
|
|
|
1838
1866
|
name: string;
|
|
1839
1867
|
lastActive: number | null;
|
|
1840
1868
|
inviteAccepted: number | null;
|
|
1869
|
+
lastModified: number | null;
|
|
1870
|
+
isBusy: {
|
|
1871
|
+
value: boolean;
|
|
1872
|
+
lastModified: number | null;
|
|
1873
|
+
};
|
|
1841
1874
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1842
1875
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1843
1876
|
inviteSent?: number | null | undefined;
|
|
1844
1877
|
} | {
|
|
1845
1878
|
lastActive: number | null;
|
|
1846
1879
|
inviteAccepted: number | null;
|
|
1880
|
+
lastModified: number | null;
|
|
1881
|
+
isBusy: {
|
|
1882
|
+
value: boolean;
|
|
1883
|
+
lastModified: number | null;
|
|
1884
|
+
};
|
|
1847
1885
|
appointments: Record<"ongoing" | "completed", number>;
|
|
1848
1886
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
|
|
1849
1887
|
_id: string;
|
package/dist/main.js
CHANGED
|
@@ -117,7 +117,10 @@ var CompanyState = z7.object({
|
|
|
117
117
|
const getTemplate = (subject) => `${upperFirst(subject)} character must be a letter.`;
|
|
118
118
|
const invalidCharIdx = data.search(/[^a-z1-9\-]/);
|
|
119
119
|
if (invalidCharIdx >= 0) {
|
|
120
|
-
|
|
120
|
+
const char = data[invalidCharIdx];
|
|
121
|
+
ctx.addIssue(
|
|
122
|
+
`${/"|'|`/.test(char) ? `(${char})` : `"${char}"`} is not an allowed character.`
|
|
123
|
+
);
|
|
121
124
|
}
|
|
122
125
|
if (!/[a-z]/.test(data[0])) {
|
|
123
126
|
ctx.addIssue(getTemplate("first"));
|
|
@@ -452,7 +455,8 @@ var UserDetails = z13.object({
|
|
|
452
455
|
|
|
453
456
|
// src/schemas/company/components/User.ts
|
|
454
457
|
var CompanyUserSession = z14.object({
|
|
455
|
-
|
|
458
|
+
_id: z14.uuidv4(),
|
|
459
|
+
srcIp: z14.string(),
|
|
456
460
|
user: UserDetails.pick({ _id: true, name: true, email: true }),
|
|
457
461
|
companyId: CompanyState.shape._id,
|
|
458
462
|
isAvailable: z14.object({
|
|
@@ -475,13 +479,17 @@ var CompanyUserSession = z14.object({
|
|
|
475
479
|
(role, i) => i === 0 || getCompatibleRoles(roles[0]).includes(role)
|
|
476
480
|
);
|
|
477
481
|
}, "A user is not allowed to have conflicting roles."),
|
|
482
|
+
lastModified: Timestamp.nullable(),
|
|
478
483
|
expiresAfter: z14.date()
|
|
479
484
|
});
|
|
480
485
|
var MiniCompanyUser2 = z14.object({
|
|
481
486
|
_id: UserDetails.shape._id,
|
|
482
487
|
...CompanyUserSession.pick({
|
|
483
|
-
|
|
484
|
-
|
|
488
|
+
roles: true,
|
|
489
|
+
/** Attached to help determine if a user is allowed to create a new session */
|
|
490
|
+
isBusy: true,
|
|
491
|
+
lastModified: true,
|
|
492
|
+
appointments: true
|
|
485
493
|
}).shape,
|
|
486
494
|
/** The time before the company session gets deleted */
|
|
487
495
|
lastActive: Timestamp.nullable(),
|