@bizmap/sdk 0.0.31 → 0.0.32
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 +56 -0
- package/dist/main.js +8 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -101,6 +101,10 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
101
101
|
active: "active";
|
|
102
102
|
inactive: "inactive";
|
|
103
103
|
}>;
|
|
104
|
+
availability: z.ZodObject<{
|
|
105
|
+
isAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
+
lastModified: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
104
108
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
105
109
|
doc: "doc";
|
|
106
110
|
physAsst: "physAsst";
|
|
@@ -255,6 +259,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
255
259
|
active: "active";
|
|
256
260
|
inactive: "inactive";
|
|
257
261
|
}>;
|
|
262
|
+
availability: z.ZodObject<{
|
|
263
|
+
isAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
264
|
+
lastModified: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
|
|
265
|
+
}, z.core.$strip>;
|
|
258
266
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
259
267
|
doc: "doc";
|
|
260
268
|
physAsst: "physAsst";
|
|
@@ -279,6 +287,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
279
287
|
createdAt: number;
|
|
280
288
|
uid: string;
|
|
281
289
|
status: "inviteSent" | "active" | "inactive";
|
|
290
|
+
availability: {
|
|
291
|
+
isAvailable: boolean;
|
|
292
|
+
lastModified: number | null;
|
|
293
|
+
};
|
|
282
294
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
283
295
|
lastActive: number;
|
|
284
296
|
name: Record<"first" | "last", string>;
|
|
@@ -295,6 +307,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
295
307
|
createdAt: number;
|
|
296
308
|
uid: string;
|
|
297
309
|
status: "inviteSent" | "active" | "inactive";
|
|
310
|
+
availability: {
|
|
311
|
+
isAvailable: boolean;
|
|
312
|
+
lastModified: number | null;
|
|
313
|
+
};
|
|
298
314
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
299
315
|
lastActive: number;
|
|
300
316
|
name: Record<"first" | "last", string>;
|
|
@@ -316,6 +332,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
316
332
|
active: "active";
|
|
317
333
|
inactive: "inactive";
|
|
318
334
|
}>;
|
|
335
|
+
availability: z.ZodObject<{
|
|
336
|
+
isAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
337
|
+
lastModified: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
|
|
338
|
+
}, z.core.$strip>;
|
|
319
339
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
320
340
|
doc: "doc";
|
|
321
341
|
physAsst: "physAsst";
|
|
@@ -340,6 +360,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
340
360
|
createdAt: number;
|
|
341
361
|
uid: string;
|
|
342
362
|
status: "inviteSent" | "active" | "inactive";
|
|
363
|
+
availability: {
|
|
364
|
+
isAvailable: boolean;
|
|
365
|
+
lastModified: number | null;
|
|
366
|
+
};
|
|
343
367
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
344
368
|
lastActive: number;
|
|
345
369
|
name: Record<"first" | "last", string>;
|
|
@@ -356,6 +380,10 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
356
380
|
createdAt: number;
|
|
357
381
|
uid: string;
|
|
358
382
|
status: "inviteSent" | "active" | "inactive";
|
|
383
|
+
availability: {
|
|
384
|
+
isAvailable: boolean;
|
|
385
|
+
lastModified: number | null;
|
|
386
|
+
};
|
|
359
387
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
360
388
|
lastActive: number;
|
|
361
389
|
name: Record<"first" | "last", string>;
|
|
@@ -508,6 +536,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
508
536
|
active: "active";
|
|
509
537
|
inactive: "inactive";
|
|
510
538
|
}>;
|
|
539
|
+
availability: z.ZodObject<{
|
|
540
|
+
isAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
541
|
+
lastModified: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
|
|
542
|
+
}, z.core.$strip>;
|
|
511
543
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
512
544
|
doc: "doc";
|
|
513
545
|
physAsst: "physAsst";
|
|
@@ -532,6 +564,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
532
564
|
createdAt: number;
|
|
533
565
|
uid: string;
|
|
534
566
|
status: "inviteSent" | "active" | "inactive";
|
|
567
|
+
availability: {
|
|
568
|
+
isAvailable: boolean;
|
|
569
|
+
lastModified: number | null;
|
|
570
|
+
};
|
|
535
571
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
536
572
|
lastActive: number;
|
|
537
573
|
name: Record<"first" | "last", string>;
|
|
@@ -548,6 +584,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
548
584
|
createdAt: number;
|
|
549
585
|
uid: string;
|
|
550
586
|
status: "inviteSent" | "active" | "inactive";
|
|
587
|
+
availability: {
|
|
588
|
+
isAvailable: boolean;
|
|
589
|
+
lastModified: number | null;
|
|
590
|
+
};
|
|
551
591
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
552
592
|
lastActive: number;
|
|
553
593
|
name: Record<"first" | "last", string>;
|
|
@@ -569,6 +609,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
569
609
|
active: "active";
|
|
570
610
|
inactive: "inactive";
|
|
571
611
|
}>;
|
|
612
|
+
availability: z.ZodObject<{
|
|
613
|
+
isAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
614
|
+
lastModified: z.ZodDefault<z.ZodNullable<z.ZodInt>>;
|
|
615
|
+
}, z.core.$strip>;
|
|
572
616
|
roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
573
617
|
doc: "doc";
|
|
574
618
|
physAsst: "physAsst";
|
|
@@ -593,6 +637,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
593
637
|
createdAt: number;
|
|
594
638
|
uid: string;
|
|
595
639
|
status: "inviteSent" | "active" | "inactive";
|
|
640
|
+
availability: {
|
|
641
|
+
isAvailable: boolean;
|
|
642
|
+
lastModified: number | null;
|
|
643
|
+
};
|
|
596
644
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
597
645
|
lastActive: number;
|
|
598
646
|
name: Record<"first" | "last", string>;
|
|
@@ -609,6 +657,10 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
609
657
|
createdAt: number;
|
|
610
658
|
uid: string;
|
|
611
659
|
status: "inviteSent" | "active" | "inactive";
|
|
660
|
+
availability: {
|
|
661
|
+
isAvailable: boolean;
|
|
662
|
+
lastModified: number | null;
|
|
663
|
+
};
|
|
612
664
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
613
665
|
lastActive: number;
|
|
614
666
|
name: Record<"first" | "last", string>;
|
|
@@ -667,6 +719,10 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
|
|
|
667
719
|
createdAt: number;
|
|
668
720
|
uid: string;
|
|
669
721
|
status: "inviteSent" | "active" | "inactive";
|
|
722
|
+
availability: {
|
|
723
|
+
isAvailable: boolean;
|
|
724
|
+
lastModified: number | null;
|
|
725
|
+
};
|
|
670
726
|
roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
|
|
671
727
|
lastActive: number;
|
|
672
728
|
name: Record<"first" | "last", string>;
|
package/dist/main.js
CHANGED
|
@@ -96,6 +96,10 @@ var CompanyUser = z4.object({
|
|
|
96
96
|
...UserModel.shape,
|
|
97
97
|
uid: UuidV7,
|
|
98
98
|
status: z4.enum(["inviteSent", "active", "inactive"]),
|
|
99
|
+
availability: z4.object({
|
|
100
|
+
isAvailable: z4.boolean().default(true),
|
|
101
|
+
lastModified: Timestamp.nullable().default(null)
|
|
102
|
+
}),
|
|
99
103
|
roles: z4.array(companyUserRoles).transform((roles) => {
|
|
100
104
|
const newRoles = [];
|
|
101
105
|
for (const role of roles) {
|
|
@@ -110,6 +114,10 @@ var CompanyUser = z4.object({
|
|
|
110
114
|
}, "A user is not allowed to have conflicting roles."),
|
|
111
115
|
lastActive: Timestamp,
|
|
112
116
|
...TimeLog.shape
|
|
117
|
+
}).superRefine((data, ctx) => {
|
|
118
|
+
if (!data.availability.isAvailable && data.status !== "active") {
|
|
119
|
+
ctx.addIssue('Unavailable users MUST also have the "active" status.');
|
|
120
|
+
}
|
|
113
121
|
});
|
|
114
122
|
var CompanyIdentity = z4.object({
|
|
115
123
|
displayName: z4.string().min(3).max(20),
|