@bizmap/sdk 0.0.40 → 0.0.41

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 CHANGED
@@ -45,6 +45,7 @@ declare const CompanyUser: z.ZodObject<{
45
45
  cshr: "cshr";
46
46
  admin: "admin";
47
47
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
48
+ isBusy: z.ZodBoolean;
48
49
  appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
49
50
  lastActive: z.ZodInt;
50
51
  name: z.ZodRecord<z.ZodEnum<{
@@ -211,6 +212,7 @@ declare const CompanyDetails: z.ZodObject<{
211
212
  cshr: "cshr";
212
213
  admin: "admin";
213
214
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
215
+ isBusy: z.ZodBoolean;
214
216
  appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
215
217
  lastActive: z.ZodInt;
216
218
  name: z.ZodRecord<z.ZodEnum<{
@@ -250,6 +252,7 @@ declare const CompanyDetails: z.ZodObject<{
250
252
  lastModified: number | null;
251
253
  };
252
254
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
255
+ isBusy: boolean;
253
256
  appointmentCounter: Record<"ongoing" | "completed", number>;
254
257
  lastActive: number;
255
258
  name: Record<"first" | "last", string>;
@@ -281,6 +284,7 @@ declare const CompanyDetails: z.ZodObject<{
281
284
  lastModified: number | null;
282
285
  };
283
286
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
287
+ isBusy: boolean;
284
288
  appointmentCounter: Record<"ongoing" | "completed", number>;
285
289
  lastActive: number;
286
290
  name: Record<"first" | "last", string>;
@@ -323,6 +327,7 @@ declare const CompanyDetails: z.ZodObject<{
323
327
  cshr: "cshr";
324
328
  admin: "admin";
325
329
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
330
+ isBusy: z.ZodBoolean;
326
331
  appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
327
332
  lastActive: z.ZodInt;
328
333
  name: z.ZodRecord<z.ZodEnum<{
@@ -362,6 +367,7 @@ declare const CompanyDetails: z.ZodObject<{
362
367
  lastModified: number | null;
363
368
  };
364
369
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
370
+ isBusy: boolean;
365
371
  appointmentCounter: Record<"ongoing" | "completed", number>;
366
372
  lastActive: number;
367
373
  name: Record<"first" | "last", string>;
@@ -393,6 +399,7 @@ declare const CompanyDetails: z.ZodObject<{
393
399
  lastModified: number | null;
394
400
  };
395
401
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
402
+ isBusy: boolean;
396
403
  appointmentCounter: Record<"ongoing" | "completed", number>;
397
404
  lastActive: number;
398
405
  name: Record<"first" | "last", string>;
@@ -573,6 +580,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
573
580
  cshr: "cshr";
574
581
  admin: "admin";
575
582
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
583
+ isBusy: z.ZodBoolean;
576
584
  appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
577
585
  lastActive: z.ZodInt;
578
586
  name: z.ZodRecord<z.ZodEnum<{
@@ -612,6 +620,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
612
620
  lastModified: number | null;
613
621
  };
614
622
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
623
+ isBusy: boolean;
615
624
  appointmentCounter: Record<"ongoing" | "completed", number>;
616
625
  lastActive: number;
617
626
  name: Record<"first" | "last", string>;
@@ -643,6 +652,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
643
652
  lastModified: number | null;
644
653
  };
645
654
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
655
+ isBusy: boolean;
646
656
  appointmentCounter: Record<"ongoing" | "completed", number>;
647
657
  lastActive: number;
648
658
  name: Record<"first" | "last", string>;
@@ -685,6 +695,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
685
695
  cshr: "cshr";
686
696
  admin: "admin";
687
697
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
698
+ isBusy: z.ZodBoolean;
688
699
  appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
689
700
  lastActive: z.ZodInt;
690
701
  name: z.ZodRecord<z.ZodEnum<{
@@ -724,6 +735,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
724
735
  lastModified: number | null;
725
736
  };
726
737
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
738
+ isBusy: boolean;
727
739
  appointmentCounter: Record<"ongoing" | "completed", number>;
728
740
  lastActive: number;
729
741
  name: Record<"first" | "last", string>;
@@ -755,6 +767,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
755
767
  lastModified: number | null;
756
768
  };
757
769
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
770
+ isBusy: boolean;
758
771
  appointmentCounter: Record<"ongoing" | "completed", number>;
759
772
  lastActive: number;
760
773
  name: Record<"first" | "last", string>;
@@ -838,6 +851,7 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
838
851
  lastModified: number | null;
839
852
  };
840
853
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
854
+ isBusy: boolean;
841
855
  appointmentCounter: Record<"ongoing" | "completed", number>;
842
856
  lastActive: number;
843
857
  name: Record<"first" | "last", string>;
package/dist/main.js CHANGED
@@ -100,6 +100,7 @@ var CompanyUser = z4.object({
100
100
  (role, i) => i === 0 || getCompatibleRoles(roles[0]).includes(role)
101
101
  );
102
102
  }, "A user is not allowed to have conflicting roles."),
103
+ isBusy: z4.boolean(),
103
104
  /** This should reset at the end of every cycle. */
104
105
  appointmentCounter: z4.record(
105
106
  z4.literal(["ongoing", "completed"]),
@@ -284,6 +285,11 @@ var Staff = z4.object({
284
285
  `All users that have the "doc" role must be the leader of a partner group. (${user.uid})`
285
286
  );
286
287
  }
288
+ if (!user.isBusy && user.uid in details.updateQueue) {
289
+ ctx.addIssue(
290
+ `Having users that aren't busy in the update queue is prohibited.`
291
+ );
292
+ }
287
293
  }
288
294
  });
289
295
  var Receipts = z4.array(PriceTag.omit({ uid: true, lastModified: true }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",