@bizmap/sdk 0.0.68 → 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.
Files changed (3) hide show
  1. package/dist/main.d.ts +146 -108
  2. package/dist/main.js +33 -16
  3. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -71,7 +71,7 @@ declare const serviceProviders: z.ZodEnum<{
71
71
  }>;
72
72
 
73
73
  declare const CompanyDetails: z.ZodObject<{
74
- _id: z.ZodUUID;
74
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
75
75
  identity: z.ZodObject<{
76
76
  type: z.ZodReadonly<z.ZodEnum<{
77
77
  MEDICAL: "MEDICAL";
@@ -83,11 +83,12 @@ declare const CompanyDetails: z.ZodObject<{
83
83
  parish: z.ZodString;
84
84
  country: z.ZodString;
85
85
  }, z.core.$strip>;
86
- displayName: z.ZodString;
86
+ alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
87
87
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
88
  contact: z.ZodObject<{
89
89
  email: z.ZodEmail;
90
90
  phoneNumber: z.ZodOptional<z.ZodString>;
91
+ emailVerified: z.ZodBoolean;
91
92
  }, z.core.$strip>;
92
93
  tier: z.ZodObject<{
93
94
  current: z.ZodEnum<{
@@ -98,11 +99,12 @@ declare const CompanyDetails: z.ZodObject<{
98
99
  }>;
99
100
  lastModified: z.ZodNullable<z.ZodInt>;
100
101
  }, z.core.$strip>;
101
- legal: z.ZodObject<{
102
+ isVerified: z.ZodBoolean;
103
+ legal: z.ZodOptional<z.ZodObject<{
102
104
  regNo: z.ZodReadonly<z.ZodString>;
103
105
  trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
106
  gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
- }, z.core.$strip>;
107
+ }, z.core.$strip>>;
106
108
  }, z.core.$strip>;
107
109
  notifications: z.ZodArray<z.ZodObject<{
108
110
  _id: z.ZodString;
@@ -245,17 +247,23 @@ declare const CompanyDetails: z.ZodObject<{
245
247
  cshr: "cshr";
246
248
  admin: "admin";
247
249
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
248
- isAvailable: z.ZodBoolean;
249
- isBusy: z.ZodBoolean;
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>;
250
258
  status: z.ZodEnum<{
251
259
  inviteSent: "inviteSent";
252
260
  active: "active";
253
261
  inactive: "inactive";
254
262
  }>;
263
+ inviteSent: z.ZodNullable<z.ZodInt>;
255
264
  appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
256
265
  lastActive: z.ZodNullable<z.ZodInt>;
257
- isAvailableLastModified: z.ZodNullable<z.ZodInt>;
258
- isBusyLastModified: z.ZodNullable<z.ZodInt>;
266
+ inviteAccepted: z.ZodNullable<z.ZodInt>;
259
267
  }, z.core.$strip>>;
260
268
  partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
261
269
  addedAt: z.ZodInt;
@@ -275,15 +283,11 @@ declare const CompanyDetails: z.ZodObject<{
275
283
  addedAt: z.ZodInt;
276
284
  }, z.core.$strip>>;
277
285
  }, z.core.$strip>>;
278
- timeline: z.ZodRecord<z.ZodUUID, z.ZodObject<{
279
- inviteSent: z.ZodNullable<z.ZodInt>;
280
- inviteAccepted: z.ZodNullable<z.ZodInt>;
281
- }, z.core.$strip>>;
282
286
  }, z.core.$strip>;
283
287
  }, z.core.$strip>;
284
288
  type CompanyDetails = z.infer<typeof CompanyDetails>;
285
289
  declare const MutableCompanyDetails: z.ZodObject<{
286
- _id: z.ZodUUID;
290
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
287
291
  identity: z.ZodOptional<z.ZodObject<{
288
292
  address: z.ZodOptional<z.ZodObject<{
289
293
  streetAddress: z.ZodString;
@@ -291,19 +295,21 @@ declare const MutableCompanyDetails: z.ZodObject<{
291
295
  parish: z.ZodString;
292
296
  country: z.ZodString;
293
297
  }, z.core.$strip>>;
298
+ alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
294
299
  logo: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
295
300
  contact: z.ZodOptional<z.ZodObject<{
296
301
  email: z.ZodEmail;
297
302
  phoneNumber: z.ZodOptional<z.ZodString>;
303
+ emailVerified: z.ZodBoolean;
298
304
  }, z.core.$strip>>;
299
- legal: z.ZodOptional<z.ZodObject<{
305
+ legal: z.ZodOptional<z.ZodOptional<z.ZodObject<{
300
306
  regNo: z.ZodReadonly<z.ZodString>;
301
307
  trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
308
  gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
- }, z.core.$strip>>;
309
+ }, z.core.$strip>>>;
304
310
  }, z.core.$strip>>;
305
311
  preferences: z.ZodOptional<z.ZodObject<{
306
- _id: z.ZodOptional<z.ZodUUID>;
312
+ _id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
307
313
  serviceSelector: z.ZodOptional<z.ZodEnum<{
308
314
  scheduler: "scheduler";
309
315
  doctor: "doctor";
@@ -315,7 +321,7 @@ declare const MutableCompanyDetails: z.ZodObject<{
315
321
  }>>>;
316
322
  }, z.core.$strip>>;
317
323
  billing: z.ZodOptional<z.ZodObject<{
318
- _id: z.ZodOptional<z.ZodUUID>;
324
+ _id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
319
325
  additionalFees: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
320
326
  createdAt: z.ZodReadonly<z.ZodInt>;
321
327
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -408,7 +414,7 @@ declare const MutableCompanyDetails: z.ZodObject<{
408
414
  type MutableCompanyDetails = z.infer<typeof MutableCompanyDetails>;
409
415
 
410
416
  declare const CompanyBilling: z.ZodObject<{
411
- _id: z.ZodUUID;
417
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
412
418
  additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
413
419
  createdAt: z.ZodReadonly<z.ZodInt>;
414
420
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -480,7 +486,7 @@ declare const CompanyBilling: z.ZodObject<{
480
486
  }, z.core.$strip>;
481
487
  type CompanyBilling = z.infer<typeof CompanyBilling>;
482
488
  declare const MutableCompanyBilling: z.ZodObject<{
483
- _id: z.ZodUUID;
489
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
484
490
  additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
485
491
  createdAt: z.ZodReadonly<z.ZodInt>;
486
492
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -552,8 +558,8 @@ declare const MutableCompanyBilling: z.ZodObject<{
552
558
  type MutableCompanyBilling = z.infer<typeof MutableCompanyBilling>;
553
559
 
554
560
  declare const CompanyIdentity: z.ZodObject<{
555
- _id: z.ZodUUID;
556
- displayName: z.ZodString;
561
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
562
+ alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
557
563
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
558
564
  type: z.ZodReadonly<z.ZodEnum<{
559
565
  MEDICAL: "MEDICAL";
@@ -567,6 +573,7 @@ declare const CompanyIdentity: z.ZodObject<{
567
573
  contact: z.ZodObject<{
568
574
  email: z.ZodEmail;
569
575
  phoneNumber: z.ZodOptional<z.ZodString>;
576
+ emailVerified: z.ZodBoolean;
570
577
  }, z.core.$strip>;
571
578
  tier: z.ZodObject<{
572
579
  current: z.ZodEnum<{
@@ -577,11 +584,12 @@ declare const CompanyIdentity: z.ZodObject<{
577
584
  }>;
578
585
  lastModified: z.ZodNullable<z.ZodInt>;
579
586
  }, z.core.$strip>;
580
- legal: z.ZodObject<{
587
+ isVerified: z.ZodBoolean;
588
+ legal: z.ZodOptional<z.ZodObject<{
581
589
  regNo: z.ZodReadonly<z.ZodString>;
582
590
  trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
583
591
  gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
584
- }, z.core.$strip>;
592
+ }, z.core.$strip>>;
585
593
  lastModified: z.ZodNullable<z.ZodInt>;
586
594
  }, z.core.$strip>;
587
595
  type CompanyIdentity = z.infer<typeof CompanyIdentity>;
@@ -592,16 +600,18 @@ declare const MutableCompanyIdentity: z.ZodObject<{
592
600
  parish: z.ZodString;
593
601
  country: z.ZodString;
594
602
  }, z.core.$strip>;
603
+ alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
595
604
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
596
605
  contact: z.ZodObject<{
597
606
  email: z.ZodEmail;
598
607
  phoneNumber: z.ZodOptional<z.ZodString>;
608
+ emailVerified: z.ZodBoolean;
599
609
  }, z.core.$strip>;
600
- legal: z.ZodObject<{
610
+ legal: z.ZodOptional<z.ZodObject<{
601
611
  regNo: z.ZodReadonly<z.ZodString>;
602
612
  trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
613
  gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
604
- }, z.core.$strip>;
614
+ }, z.core.$strip>>;
605
615
  }, z.core.$strip>;
606
616
  type MutableCompanyIdentity = z.infer<typeof MutableCompanyIdentity>;
607
617
 
@@ -621,7 +631,7 @@ declare const CompanyNotifications: z.ZodArray<z.ZodObject<{
621
631
  type CompanyNotifications = z.infer<typeof CompanyNotifications>;
622
632
 
623
633
  declare const CompanyPreferences: z.ZodObject<{
624
- _id: z.ZodUUID;
634
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
625
635
  serviceSelector: z.ZodEnum<{
626
636
  scheduler: "scheduler";
627
637
  doctor: "doctor";
@@ -635,7 +645,7 @@ declare const CompanyPreferences: z.ZodObject<{
635
645
  }, z.core.$strip>;
636
646
  type CompanyPreferences = z.infer<typeof CompanyPreferences>;
637
647
  declare const MutableCompanyPreferences: z.ZodObject<{
638
- _id: z.ZodUUID;
648
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
639
649
  serviceSelector: z.ZodEnum<{
640
650
  scheduler: "scheduler";
641
651
  doctor: "doctor";
@@ -662,19 +672,25 @@ declare const CompanyStaff: z.ZodObject<{
662
672
  cshr: "cshr";
663
673
  admin: "admin";
664
674
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
665
- isAvailable: z.ZodBoolean;
666
- isBusy: z.ZodBoolean;
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>;
667
683
  status: z.ZodEnum<{
668
684
  inviteSent: "inviteSent";
669
685
  active: "active";
670
686
  inactive: "inactive";
671
687
  }>;
688
+ inviteSent: z.ZodNullable<z.ZodInt>;
672
689
  appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
673
690
  lastActive: z.ZodNullable<z.ZodInt>;
674
- isAvailableLastModified: z.ZodNullable<z.ZodInt>;
675
- isBusyLastModified: z.ZodNullable<z.ZodInt>;
691
+ inviteAccepted: z.ZodNullable<z.ZodInt>;
676
692
  }, z.core.$strip>>;
677
- _id: z.ZodUUID;
693
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
678
694
  partnerMap: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
679
695
  addedAt: z.ZodInt;
680
696
  }, z.core.$strip>>>;
@@ -693,17 +709,13 @@ declare const CompanyStaff: z.ZodObject<{
693
709
  addedAt: z.ZodInt;
694
710
  }, z.core.$strip>>;
695
711
  }, z.core.$strip>>;
696
- timeline: z.ZodRecord<z.ZodUUID, z.ZodObject<{
697
- inviteSent: z.ZodNullable<z.ZodInt>;
698
- inviteAccepted: z.ZodNullable<z.ZodInt>;
699
- }, z.core.$strip>>;
700
712
  lastModified: z.ZodNullable<z.ZodInt>;
701
713
  }, z.core.$strip>;
702
714
  type CompanyStaff = z.infer<typeof CompanyStaff>;
703
715
 
704
716
  /** Can only be modifiede by the server */
705
717
  declare const CompanyState: z.ZodObject<{
706
- _id: z.ZodUUID;
718
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
707
719
  credits: z.ZodObject<{
708
720
  current: z.ZodNumber;
709
721
  lastModified: z.ZodNullable<z.ZodInt>;
@@ -733,8 +745,14 @@ declare const MiniCompanyUser: z.ZodObject<{
733
745
  cshr: "cshr";
734
746
  admin: "admin";
735
747
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
736
- isAvailable: z.ZodBoolean;
737
- isBusy: z.ZodBoolean;
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>;
738
756
  status: z.ZodEnum<{
739
757
  inviteSent: "inviteSent";
740
758
  active: "active";
@@ -742,8 +760,8 @@ declare const MiniCompanyUser: z.ZodObject<{
742
760
  }>;
743
761
  appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
744
762
  lastActive: z.ZodNullable<z.ZodInt>;
745
- isAvailableLastModified: z.ZodNullable<z.ZodInt>;
746
- isBusyLastModified: z.ZodNullable<z.ZodInt>;
763
+ inviteSent: z.ZodNullable<z.ZodInt>;
764
+ inviteAccepted: z.ZodNullable<z.ZodInt>;
747
765
  }, z.core.$strip>;
748
766
  type MiniCompanyUser = z.infer<typeof MiniCompanyUser>;
749
767
  declare const CompanyUser: z.ZodObject<{
@@ -759,17 +777,23 @@ declare const CompanyUser: z.ZodObject<{
759
777
  cshr: "cshr";
760
778
  admin: "admin";
761
779
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
762
- isAvailable: z.ZodBoolean;
763
- isBusy: z.ZodBoolean;
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>;
764
788
  status: z.ZodEnum<{
765
789
  inviteSent: "inviteSent";
766
790
  active: "active";
767
791
  inactive: "inactive";
768
792
  }>;
793
+ inviteSent: z.ZodNullable<z.ZodInt>;
769
794
  appointments: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
770
795
  lastActive: z.ZodNullable<z.ZodInt>;
771
- isAvailableLastModified: z.ZodNullable<z.ZodInt>;
772
- isBusyLastModified: z.ZodNullable<z.ZodInt>;
796
+ inviteAccepted: z.ZodNullable<z.ZodInt>;
773
797
  }, z.core.$strip>;
774
798
  type CompanyUser = z.infer<typeof CompanyUser>;
775
799
 
@@ -995,7 +1019,7 @@ declare const MiniAppointmentDetails: z.ZodObject<{
995
1019
  createdAt: z.ZodReadonly<z.ZodInt>;
996
1020
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
997
1021
  _id: z.ZodUUID;
998
- src: z.ZodUUID;
1022
+ src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
999
1023
  tkt: z.ZodReadonly<z.ZodInt>;
1000
1024
  reason: z.ZodOptional<z.ZodObject<{
1001
1025
  createdAt: z.ZodReadonly<z.ZodInt>;
@@ -1228,25 +1252,7 @@ declare const AppointmentDetails: z.ZodObject<{
1228
1252
  content: z.ZodString;
1229
1253
  }, z.core.$strip>>>;
1230
1254
  }, z.core.$strip>>>;
1231
- src: z.ZodUUID;
1232
- timeline: z.ZodObject<{
1233
- scheduler: z.ZodObject<{
1234
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1235
- userUid: z.ZodNonOptional<z.ZodUUID>;
1236
- }, z.core.$strip>;
1237
- physAsst: z.ZodUnion<[z.ZodObject<{
1238
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1239
- userUid: z.ZodNonOptional<z.ZodUUID>;
1240
- }, z.core.$strip>, z.ZodLiteral<"none">]>;
1241
- doctor: z.ZodObject<{
1242
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1243
- userUid: z.ZodNonOptional<z.ZodUUID>;
1244
- }, z.core.$strip>;
1245
- cashier: z.ZodNullable<z.ZodObject<{
1246
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1247
- userUid: z.ZodNonOptional<z.ZodUUID>;
1248
- }, z.core.$strip>>;
1249
- }, z.core.$strip>;
1255
+ src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1250
1256
  tkt: z.ZodReadonly<z.ZodInt>;
1251
1257
  reason: z.ZodOptional<z.ZodObject<{
1252
1258
  createdAt: z.ZodReadonly<z.ZodInt>;
@@ -1288,6 +1294,24 @@ declare const AppointmentDetails: z.ZodObject<{
1288
1294
  }>;
1289
1295
  amount: z.ZodNumber;
1290
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>;
1291
1315
  client: z.ZodObject<{
1292
1316
  createdAt: z.ZodReadonly<z.ZodInt>;
1293
1317
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -1394,25 +1418,7 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1394
1418
  content: z.ZodString;
1395
1419
  }, z.core.$strip>>>;
1396
1420
  }, z.core.$strip>>>;
1397
- src: z.ZodUUID;
1398
- timeline: z.ZodObject<{
1399
- scheduler: z.ZodObject<{
1400
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1401
- userUid: z.ZodNonOptional<z.ZodUUID>;
1402
- }, z.core.$strip>;
1403
- physAsst: z.ZodUnion<[z.ZodObject<{
1404
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1405
- userUid: z.ZodNonOptional<z.ZodUUID>;
1406
- }, z.core.$strip>, z.ZodLiteral<"none">]>;
1407
- doctor: z.ZodObject<{
1408
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1409
- userUid: z.ZodNonOptional<z.ZodUUID>;
1410
- }, z.core.$strip>;
1411
- cashier: z.ZodNullable<z.ZodObject<{
1412
- postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1413
- userUid: z.ZodNonOptional<z.ZodUUID>;
1414
- }, z.core.$strip>>;
1415
- }, z.core.$strip>;
1421
+ src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1416
1422
  tkt: z.ZodReadonly<z.ZodInt>;
1417
1423
  reason: z.ZodOptional<z.ZodObject<{
1418
1424
  createdAt: z.ZodReadonly<z.ZodInt>;
@@ -1454,6 +1460,24 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1454
1460
  }>;
1455
1461
  amount: z.ZodNumber;
1456
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>;
1457
1481
  client: z.ZodObject<{
1458
1482
  createdAt: z.ZodReadonly<z.ZodInt>;
1459
1483
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -1568,13 +1592,19 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1568
1592
  email: string;
1569
1593
  name: string;
1570
1594
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
1571
- isAvailable: boolean;
1572
- isBusy: boolean;
1595
+ isAvailable: {
1596
+ value: boolean;
1597
+ lastModified: number | null;
1598
+ };
1599
+ isBusy: {
1600
+ value: boolean;
1601
+ lastModified: number | null;
1602
+ };
1573
1603
  status: "inviteSent" | "active" | "inactive";
1604
+ inviteSent: number | null;
1574
1605
  appointments: Record<"ongoing" | "completed", number>;
1575
1606
  lastActive: number | null;
1576
- isAvailableLastModified: number | null;
1577
- isBusyLastModified: number | null;
1607
+ inviteAccepted: number | null;
1578
1608
  phoneNumber?: string | undefined;
1579
1609
  photoUrl?: string | null | undefined;
1580
1610
  }>;
@@ -1591,10 +1621,6 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1591
1621
  addedAt: number;
1592
1622
  } | undefined;
1593
1623
  }>;
1594
- timeline: Record<string, {
1595
- inviteSent: number | null;
1596
- inviteAccepted: number | null;
1597
- }>;
1598
1624
  lastModified: number | null;
1599
1625
  };
1600
1626
  };
@@ -1635,6 +1661,14 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1635
1661
  description?: string | undefined;
1636
1662
  }[] | null;
1637
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
+ }[];
1638
1672
  timeline: {
1639
1673
  scheduler: {
1640
1674
  userUid: string;
@@ -1653,14 +1687,6 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1653
1687
  postedAt?: number | null | undefined;
1654
1688
  } | null;
1655
1689
  };
1656
- tkt: number;
1657
- charges: {
1658
- createdAt: number;
1659
- currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
1660
- item: string;
1661
- cost: number;
1662
- lastModified?: number | null | undefined;
1663
- }[];
1664
1690
  client: {
1665
1691
  createdAt: number;
1666
1692
  _id: string;
@@ -1753,25 +1779,37 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
1753
1779
  email: string;
1754
1780
  name: string;
1755
1781
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
1756
- isAvailable: boolean;
1757
- isBusy: boolean;
1782
+ isAvailable: {
1783
+ value: boolean;
1784
+ lastModified: number | null;
1785
+ };
1786
+ isBusy: {
1787
+ value: boolean;
1788
+ lastModified: number | null;
1789
+ };
1758
1790
  status: "inviteSent" | "active" | "inactive";
1791
+ inviteSent: number | null;
1759
1792
  appointments: Record<"ongoing" | "completed", number>;
1760
1793
  lastActive: number | null;
1761
- isAvailableLastModified: number | null;
1762
- isBusyLastModified: number | null;
1794
+ inviteAccepted: number | null;
1763
1795
  phoneNumber?: string | undefined;
1764
1796
  photoUrl?: string | null | undefined;
1765
1797
  } | {
1766
1798
  _id: string;
1767
1799
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
1768
- isAvailable: boolean;
1769
- isBusy: boolean;
1800
+ isAvailable: {
1801
+ value: boolean;
1802
+ lastModified: number | null;
1803
+ };
1804
+ isBusy: {
1805
+ value: boolean;
1806
+ lastModified: number | null;
1807
+ };
1770
1808
  status: "inviteSent" | "active" | "inactive";
1771
1809
  appointments: Record<"ongoing" | "completed", number>;
1772
1810
  lastActive: number | null;
1773
- isAvailableLastModified: number | null;
1774
- isBusyLastModified: number | null;
1811
+ inviteSent: number | null;
1812
+ inviteAccepted: number | null;
1775
1813
  })[] | null;
1776
1814
  /**
1777
1815
  * @param {CompanyUserRole} role
package/dist/main.js CHANGED
@@ -108,7 +108,13 @@ import * as z8 from "zod";
108
108
  // src/schemas/company/components/State.ts
109
109
  import * as z7 from "zod";
110
110
  var CompanyState = z7.object({
111
- _id: z7.uuidv4(),
111
+ _id: z7.string().toLowerCase().trim().min(3).max(63).regex(/[a-z1-9\-]/).transform((data) => data.replace(/-+/g, "-").replace(/\s+/g, "")).superRefine((data, ctx) => {
112
+ if (!/[a-z]/.test(data[0]) || !/[a-z]/.test(data[data.length - 1])) {
113
+ ctx.addIssue(
114
+ "The first and last character of a company's name must be a letter."
115
+ );
116
+ }
117
+ }),
112
118
  credits: z7.object({
113
119
  current: z7.number(),
114
120
  lastModified: Timestamp.nullable()
@@ -180,32 +186,44 @@ import * as z9 from "zod";
180
186
  import { Address, PhoneNumber } from "@wavy/util";
181
187
  var CompanyIdentity = z9.object({
182
188
  _id: CompanyState.shape._id,
183
- displayName: z9.string().min(3).max(25),
189
+ alias: z9.string().trim().min(3).max(63).regex(/[a-z1-9 ]/gi).transform(
190
+ (data) => data.replace(/[^a-z1-9 ]/gi, "").replace(/\s+/g, " ")
191
+ ),
184
192
  logo: z9.string().max(150).nullish(),
185
193
  type: companyTypes.readonly(),
186
194
  address: Address,
187
195
  contact: z9.object({
188
196
  email: z9.email().max(25),
189
- phoneNumber: PhoneNumber.optional()
197
+ phoneNumber: PhoneNumber.optional(),
198
+ emailVerified: z9.boolean()
190
199
  }),
191
200
  // Can only be changed by the server
192
201
  tier: z9.object({
193
202
  current: tiers,
194
203
  lastModified: Timestamp.nullable()
195
204
  }),
205
+ isVerified: z9.boolean(),
196
206
  legal: z9.object({
197
207
  regNo: z9.string().max(20).readonly(),
198
208
  // The company's registration number
199
209
  trn: z9.string().regex(/[0-9]{3}-[0-9]{3}-[0-9]{3}/).nullish(),
200
210
  gctRegNo: z9.string().max(15).nullish()
201
- }),
211
+ }).optional(),
202
212
  lastModified: Timestamp.nullable()
213
+ }).superRefine((data, ctx) => {
214
+ const hasLegalInfo = "legal" in data;
215
+ if (data.isVerified && !hasLegalInfo) {
216
+ ctx.addIssue("Verified companies must have the legal field defined.");
217
+ } else if (!data.isVerified && hasLegalInfo) {
218
+ ctx.addIssue("Unverified companies can't have the legal field defined.");
219
+ }
203
220
  });
204
221
  var MutableCompanyIdentity = CompanyIdentity.pick({
205
222
  address: true,
206
223
  contact: true,
207
224
  logo: true,
208
- legal: true
225
+ legal: true,
226
+ alias: true
209
227
  });
210
228
 
211
229
  // src/schemas/company/components/Notifications.ts
@@ -424,13 +442,19 @@ var MiniCompanyUser2 = z14.object({
424
442
  (role, i) => i === 0 || getCompatibleRoles(roles[0]).includes(role)
425
443
  );
426
444
  }, "A user is not allowed to have conflicting roles."),
427
- isAvailable: z14.boolean(),
428
- isBusy: z14.boolean(),
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
+ }),
429
453
  status: z14.enum(["inviteSent", "active", "inactive"]),
430
454
  appointments: z14.record(z14.literal(["ongoing", "completed"]), z14.int().min(0)),
431
455
  lastActive: Timestamp.nullable(),
432
- isAvailableLastModified: Timestamp.nullable(),
433
- isBusyLastModified: Timestamp.nullable()
456
+ inviteSent: Timestamp.nullable(),
457
+ inviteAccepted: Timestamp.nullable()
434
458
  }).superRefine((data, ctx) => {
435
459
  if (!data.isAvailable && data.status !== "active") {
436
460
  ctx.addIssue('Unavailable users MUST also have the "active" status.');
@@ -477,13 +501,6 @@ var MiniRawCompanyStaff = z15.object({
477
501
  })
478
502
  }).partial()
479
503
  ),
480
- timeline: z15.record(
481
- CompanyUser.shape._id,
482
- z15.object({
483
- inviteSent: Timestamp.nullable(),
484
- inviteAccepted: Timestamp.nullable()
485
- })
486
- ),
487
504
  lastModified: Timestamp.nullable()
488
505
  });
489
506
  var RawCompanyStaff = z15.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",