@bizmap/sdk 0.0.91 → 0.0.93

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 +134 -220
  2. package/dist/main.js +88 -25
  3. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -6,6 +6,7 @@ declare const companyUserRoles: z.ZodEnum<{
6
6
  physAsst: "physAsst";
7
7
  rcpst: "rcpst";
8
8
  cshr: "cshr";
9
+ "a/r": "a/r";
9
10
  founder: "founder";
10
11
  }>;
11
12
  type CompanyUserRole = z.infer<typeof companyUserRoles>;
@@ -19,6 +20,7 @@ declare const employeeRoles: z.ZodEnum<{
19
20
  physAsst: "physAsst";
20
21
  rcpst: "rcpst";
21
22
  cshr: "cshr";
23
+ "a/r": "a/r";
22
24
  }>;
23
25
  type EmployeeRole = z.infer<typeof employeeRoles>;
24
26
  declare const adminRoles: z.ZodEnum<{
@@ -39,10 +41,10 @@ declare const companyServiceSelectors: z.ZodEnum<{
39
41
  doctor: "doctor";
40
42
  }>;
41
43
  type CompanyServiceSelector = z.infer<typeof companyServiceSelectors>;
42
- declare const companyTypes: z.ZodEnum<{
43
- MEDICAL: "MEDICAL";
44
+ declare const industries: z.ZodEnum<{
45
+ healthcare: "healthcare";
44
46
  }>;
45
- type CompanyType = z.infer<typeof companyTypes>;
47
+ type Industry = z.infer<typeof industries>;
46
48
  declare const companyUserStatus: z.ZodEnum<{
47
49
  inviteSent: "inviteSent";
48
50
  active: "active";
@@ -74,6 +76,10 @@ declare const nidClasses: z.ZodEnum<{
74
76
  nin: "nin";
75
77
  }>;
76
78
  type NidClass = z.infer<typeof nidClasses>;
79
+ declare const acceptedCurrencies: z.ZodEnum<{
80
+ JMD: "JMD";
81
+ }>;
82
+ type AcceptedCurrency = z.infer<typeof acceptedCurrencies>;
77
83
 
78
84
  declare const vitalKeys: z.ZodEnum<{
79
85
  heartRate: "heartRate";
@@ -87,15 +93,12 @@ declare const serviceProviders: z.ZodEnum<{
87
93
  physAsst: "physAsst";
88
94
  scheduler: "scheduler";
89
95
  doctor: "doctor";
90
- cashier: "cashier";
96
+ debtCollector: "debtCollector";
91
97
  }>;
92
98
 
93
99
  declare const CompanyDetails: z.ZodObject<{
94
100
  _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
95
101
  identity: z.ZodObject<{
96
- type: z.ZodReadonly<z.ZodEnum<{
97
- MEDICAL: "MEDICAL";
98
- }>>;
99
102
  lastModified: z.ZodNullable<z.ZodInt>;
100
103
  version: z.ZodInt;
101
104
  alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
@@ -106,6 +109,9 @@ declare const CompanyDetails: z.ZodObject<{
106
109
  country: z.ZodString;
107
110
  }, z.core.$strip>>;
108
111
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ industry: z.ZodReadonly<z.ZodEnum<{
113
+ healthcare: "healthcare";
114
+ }>>;
109
115
  contact: z.ZodObject<{
110
116
  email: z.ZodEmail;
111
117
  phoneNumber: z.ZodOptional<z.ZodString>;
@@ -144,10 +150,6 @@ declare const CompanyDetails: z.ZodObject<{
144
150
  createdAt: z.ZodReadonly<z.ZodInt>;
145
151
  currency: z.ZodEnum<{
146
152
  JMD: "JMD";
147
- USD: "USD";
148
- EUR: "EUR";
149
- GBP: "GBP";
150
- CAD: "CAD";
151
153
  }>;
152
154
  item: z.ZodString;
153
155
  cost: z.ZodNumber;
@@ -192,15 +194,11 @@ declare const CompanyDetails: z.ZodObject<{
192
194
  additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
193
195
  createdAt: z.ZodReadonly<z.ZodInt>;
194
196
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
195
- description: z.ZodOptional<z.ZodString>;
197
+ description: z.ZodString;
196
198
  fixedAmount: z.ZodObject<{
197
199
  value: z.ZodNumber;
198
200
  currency: z.ZodEnum<{
199
201
  JMD: "JMD";
200
- USD: "USD";
201
- EUR: "EUR";
202
- GBP: "GBP";
203
- CAD: "CAD";
204
202
  }>;
205
203
  }, z.core.$strip>;
206
204
  percentage: z.ZodNumber;
@@ -209,15 +207,11 @@ declare const CompanyDetails: z.ZodObject<{
209
207
  discounts: z.ZodRecord<z.ZodUUID, z.ZodObject<{
210
208
  createdAt: z.ZodReadonly<z.ZodInt>;
211
209
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
212
- description: z.ZodOptional<z.ZodString>;
210
+ description: z.ZodString;
213
211
  fixedAmount: z.ZodObject<{
214
212
  value: z.ZodNumber;
215
213
  currency: z.ZodEnum<{
216
214
  JMD: "JMD";
217
- USD: "USD";
218
- EUR: "EUR";
219
- GBP: "GBP";
220
- CAD: "CAD";
221
215
  }>;
222
216
  }, z.core.$strip>;
223
217
  percentage: z.ZodNumber;
@@ -226,15 +220,11 @@ declare const CompanyDetails: z.ZodObject<{
226
220
  prepayments: z.ZodRecord<z.ZodUUID, z.ZodObject<{
227
221
  createdAt: z.ZodReadonly<z.ZodInt>;
228
222
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
229
- description: z.ZodOptional<z.ZodString>;
223
+ description: z.ZodString;
230
224
  fixedAmount: z.ZodObject<{
231
225
  value: z.ZodNumber;
232
226
  currency: z.ZodEnum<{
233
227
  JMD: "JMD";
234
- USD: "USD";
235
- EUR: "EUR";
236
- GBP: "GBP";
237
- CAD: "CAD";
238
228
  }>;
239
229
  }, z.core.$strip>;
240
230
  percentage: z.ZodNumber;
@@ -247,10 +237,6 @@ declare const CompanyDetails: z.ZodObject<{
247
237
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
248
238
  currency: z.ZodEnum<{
249
239
  JMD: "JMD";
250
- USD: "USD";
251
- EUR: "EUR";
252
- GBP: "GBP";
253
- CAD: "CAD";
254
240
  }>;
255
241
  item: z.ZodString;
256
242
  cost: z.ZodNumber;
@@ -280,8 +266,9 @@ declare const CompanyDetails: z.ZodObject<{
280
266
  physAsst: "physAsst";
281
267
  rcpst: "rcpst";
282
268
  cshr: "cshr";
269
+ "a/r": "a/r";
283
270
  founder: "founder";
284
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
271
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
285
272
  lastActive: z.ZodNullable<z.ZodInt>;
286
273
  inviteAccepted: z.ZodNullable<z.ZodInt>;
287
274
  }, z.core.$strip>>;
@@ -298,8 +285,9 @@ declare const CompanyDetails: z.ZodObject<{
298
285
  physAsst: "physAsst";
299
286
  rcpst: "rcpst";
300
287
  cshr: "cshr";
288
+ "a/r": "a/r";
301
289
  founder: "founder";
302
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
290
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
303
291
  addedAt: z.ZodInt;
304
292
  }, z.core.$strip>>;
305
293
  }, z.core.$strip>>;
@@ -347,15 +335,11 @@ declare const MutableCompanyDetails: z.ZodObject<{
347
335
  additionalFees: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
348
336
  createdAt: z.ZodReadonly<z.ZodInt>;
349
337
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
350
- description: z.ZodOptional<z.ZodString>;
338
+ description: z.ZodString;
351
339
  fixedAmount: z.ZodObject<{
352
340
  value: z.ZodNumber;
353
341
  currency: z.ZodEnum<{
354
342
  JMD: "JMD";
355
- USD: "USD";
356
- EUR: "EUR";
357
- GBP: "GBP";
358
- CAD: "CAD";
359
343
  }>;
360
344
  }, z.core.$strip>;
361
345
  percentage: z.ZodNumber;
@@ -364,15 +348,11 @@ declare const MutableCompanyDetails: z.ZodObject<{
364
348
  discounts: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
365
349
  createdAt: z.ZodReadonly<z.ZodInt>;
366
350
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
367
- description: z.ZodOptional<z.ZodString>;
351
+ description: z.ZodString;
368
352
  fixedAmount: z.ZodObject<{
369
353
  value: z.ZodNumber;
370
354
  currency: z.ZodEnum<{
371
355
  JMD: "JMD";
372
- USD: "USD";
373
- EUR: "EUR";
374
- GBP: "GBP";
375
- CAD: "CAD";
376
356
  }>;
377
357
  }, z.core.$strip>;
378
358
  percentage: z.ZodNumber;
@@ -381,15 +361,11 @@ declare const MutableCompanyDetails: z.ZodObject<{
381
361
  prepayments: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
382
362
  createdAt: z.ZodReadonly<z.ZodInt>;
383
363
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
384
- description: z.ZodOptional<z.ZodString>;
364
+ description: z.ZodString;
385
365
  fixedAmount: z.ZodObject<{
386
366
  value: z.ZodNumber;
387
367
  currency: z.ZodEnum<{
388
368
  JMD: "JMD";
389
- USD: "USD";
390
- EUR: "EUR";
391
- GBP: "GBP";
392
- CAD: "CAD";
393
369
  }>;
394
370
  }, z.core.$strip>;
395
371
  percentage: z.ZodNumber;
@@ -402,10 +378,6 @@ declare const MutableCompanyDetails: z.ZodObject<{
402
378
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
403
379
  currency: z.ZodEnum<{
404
380
  JMD: "JMD";
405
- USD: "USD";
406
- EUR: "EUR";
407
- GBP: "GBP";
408
- CAD: "CAD";
409
381
  }>;
410
382
  item: z.ZodString;
411
383
  cost: z.ZodNumber;
@@ -426,8 +398,9 @@ declare const MutableCompanyDetails: z.ZodObject<{
426
398
  physAsst: "physAsst";
427
399
  rcpst: "rcpst";
428
400
  cshr: "cshr";
401
+ "a/r": "a/r";
429
402
  founder: "founder";
430
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
403
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
431
404
  addedAt: z.ZodInt;
432
405
  }, z.core.$strip>>;
433
406
  }, z.core.$strip>>>;
@@ -440,15 +413,11 @@ declare const CompanyBilling: z.ZodObject<{
440
413
  additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
441
414
  createdAt: z.ZodReadonly<z.ZodInt>;
442
415
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
443
- description: z.ZodOptional<z.ZodString>;
416
+ description: z.ZodString;
444
417
  fixedAmount: z.ZodObject<{
445
418
  value: z.ZodNumber;
446
419
  currency: z.ZodEnum<{
447
420
  JMD: "JMD";
448
- USD: "USD";
449
- EUR: "EUR";
450
- GBP: "GBP";
451
- CAD: "CAD";
452
421
  }>;
453
422
  }, z.core.$strip>;
454
423
  percentage: z.ZodNumber;
@@ -457,15 +426,11 @@ declare const CompanyBilling: z.ZodObject<{
457
426
  discounts: z.ZodRecord<z.ZodUUID, z.ZodObject<{
458
427
  createdAt: z.ZodReadonly<z.ZodInt>;
459
428
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
460
- description: z.ZodOptional<z.ZodString>;
429
+ description: z.ZodString;
461
430
  fixedAmount: z.ZodObject<{
462
431
  value: z.ZodNumber;
463
432
  currency: z.ZodEnum<{
464
433
  JMD: "JMD";
465
- USD: "USD";
466
- EUR: "EUR";
467
- GBP: "GBP";
468
- CAD: "CAD";
469
434
  }>;
470
435
  }, z.core.$strip>;
471
436
  percentage: z.ZodNumber;
@@ -474,15 +439,11 @@ declare const CompanyBilling: z.ZodObject<{
474
439
  prepayments: z.ZodRecord<z.ZodUUID, z.ZodObject<{
475
440
  createdAt: z.ZodReadonly<z.ZodInt>;
476
441
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
477
- description: z.ZodOptional<z.ZodString>;
442
+ description: z.ZodString;
478
443
  fixedAmount: z.ZodObject<{
479
444
  value: z.ZodNumber;
480
445
  currency: z.ZodEnum<{
481
446
  JMD: "JMD";
482
- USD: "USD";
483
- EUR: "EUR";
484
- GBP: "GBP";
485
- CAD: "CAD";
486
447
  }>;
487
448
  }, z.core.$strip>;
488
449
  percentage: z.ZodNumber;
@@ -495,10 +456,6 @@ declare const CompanyBilling: z.ZodObject<{
495
456
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
496
457
  currency: z.ZodEnum<{
497
458
  JMD: "JMD";
498
- USD: "USD";
499
- EUR: "EUR";
500
- GBP: "GBP";
501
- CAD: "CAD";
502
459
  }>;
503
460
  item: z.ZodString;
504
461
  cost: z.ZodNumber;
@@ -514,15 +471,11 @@ declare const MutableCompanyBilling: z.ZodObject<{
514
471
  additionalFees: z.ZodRecord<z.ZodUUID, z.ZodObject<{
515
472
  createdAt: z.ZodReadonly<z.ZodInt>;
516
473
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
517
- description: z.ZodOptional<z.ZodString>;
474
+ description: z.ZodString;
518
475
  fixedAmount: z.ZodObject<{
519
476
  value: z.ZodNumber;
520
477
  currency: z.ZodEnum<{
521
478
  JMD: "JMD";
522
- USD: "USD";
523
- EUR: "EUR";
524
- GBP: "GBP";
525
- CAD: "CAD";
526
479
  }>;
527
480
  }, z.core.$strip>;
528
481
  percentage: z.ZodNumber;
@@ -531,15 +484,11 @@ declare const MutableCompanyBilling: z.ZodObject<{
531
484
  discounts: z.ZodRecord<z.ZodUUID, z.ZodObject<{
532
485
  createdAt: z.ZodReadonly<z.ZodInt>;
533
486
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
534
- description: z.ZodOptional<z.ZodString>;
487
+ description: z.ZodString;
535
488
  fixedAmount: z.ZodObject<{
536
489
  value: z.ZodNumber;
537
490
  currency: z.ZodEnum<{
538
491
  JMD: "JMD";
539
- USD: "USD";
540
- EUR: "EUR";
541
- GBP: "GBP";
542
- CAD: "CAD";
543
492
  }>;
544
493
  }, z.core.$strip>;
545
494
  percentage: z.ZodNumber;
@@ -548,15 +497,11 @@ declare const MutableCompanyBilling: z.ZodObject<{
548
497
  prepayments: z.ZodRecord<z.ZodUUID, z.ZodObject<{
549
498
  createdAt: z.ZodReadonly<z.ZodInt>;
550
499
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
551
- description: z.ZodOptional<z.ZodString>;
500
+ description: z.ZodString;
552
501
  fixedAmount: z.ZodObject<{
553
502
  value: z.ZodNumber;
554
503
  currency: z.ZodEnum<{
555
504
  JMD: "JMD";
556
- USD: "USD";
557
- EUR: "EUR";
558
- GBP: "GBP";
559
- CAD: "CAD";
560
505
  }>;
561
506
  }, z.core.$strip>;
562
507
  percentage: z.ZodNumber;
@@ -569,10 +514,6 @@ declare const MutableCompanyBilling: z.ZodObject<{
569
514
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
570
515
  currency: z.ZodEnum<{
571
516
  JMD: "JMD";
572
- USD: "USD";
573
- EUR: "EUR";
574
- GBP: "GBP";
575
- CAD: "CAD";
576
517
  }>;
577
518
  item: z.ZodString;
578
519
  cost: z.ZodNumber;
@@ -591,8 +532,8 @@ declare const CompanyIdentity: z.ZodObject<{
591
532
  country: z.ZodString;
592
533
  }, z.core.$strip>>;
593
534
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
594
- type: z.ZodReadonly<z.ZodEnum<{
595
- MEDICAL: "MEDICAL";
535
+ industry: z.ZodReadonly<z.ZodEnum<{
536
+ healthcare: "healthcare";
596
537
  }>>;
597
538
  contact: z.ZodObject<{
598
539
  email: z.ZodEmail;
@@ -706,8 +647,9 @@ declare const CompanyStaff: z.ZodObject<{
706
647
  physAsst: "physAsst";
707
648
  rcpst: "rcpst";
708
649
  cshr: "cshr";
650
+ "a/r": "a/r";
709
651
  founder: "founder";
710
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
652
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
711
653
  lastActive: z.ZodNullable<z.ZodInt>;
712
654
  inviteAccepted: z.ZodNullable<z.ZodInt>;
713
655
  }, z.core.$strip>>;
@@ -725,8 +667,9 @@ declare const CompanyStaff: z.ZodObject<{
725
667
  physAsst: "physAsst";
726
668
  rcpst: "rcpst";
727
669
  cshr: "cshr";
670
+ "a/r": "a/r";
728
671
  founder: "founder";
729
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
672
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
730
673
  addedAt: z.ZodInt;
731
674
  }, z.core.$strip>>;
732
675
  }, z.core.$strip>>;
@@ -783,8 +726,9 @@ declare const CompanyUserSession: z.ZodObject<{
783
726
  physAsst: "physAsst";
784
727
  rcpst: "rcpst";
785
728
  cshr: "cshr";
729
+ "a/r": "a/r";
786
730
  founder: "founder";
787
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
731
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
788
732
  ttl: z.ZodNumber;
789
733
  lastModified: z.ZodNullable<z.ZodInt>;
790
734
  expiresAfter: z.ZodDate;
@@ -805,8 +749,9 @@ declare const MiniCompanyUser: z.ZodObject<{
805
749
  physAsst: "physAsst";
806
750
  rcpst: "rcpst";
807
751
  cshr: "cshr";
752
+ "a/r": "a/r";
808
753
  founder: "founder";
809
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
754
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
810
755
  _id: z.ZodUUID;
811
756
  }, z.core.$strip>;
812
757
  type MiniCompanyUser = z.infer<typeof MiniCompanyUser>;
@@ -833,8 +778,9 @@ declare const CompanyUser: z.ZodObject<{
833
778
  physAsst: "physAsst";
834
779
  rcpst: "rcpst";
835
780
  cshr: "cshr";
781
+ "a/r": "a/r";
836
782
  founder: "founder";
837
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
783
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
838
784
  }, z.core.$strip>;
839
785
  type CompanyUser = z.infer<typeof CompanyUser>;
840
786
 
@@ -845,14 +791,15 @@ declare const CompanyInviteList: z.ZodRecord<z.ZodEmail, z.ZodObject<{
845
791
  physAsst: "physAsst";
846
792
  rcpst: "rcpst";
847
793
  cshr: "cshr";
794
+ "a/r": "a/r";
848
795
  founder: "founder";
849
- }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[]>>;
796
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[]>>;
850
797
  }, z.core.$strip>>;
851
798
  type CompanyInviteList = z.infer<typeof CompanyInviteList>;
852
799
 
853
800
  declare const CreateCompanyForm: z.ZodPipe<z.ZodObject<{
854
- type: z.ZodReadonly<z.ZodEnum<{
855
- MEDICAL: "MEDICAL";
801
+ industry: z.ZodReadonly<z.ZodEnum<{
802
+ healthcare: "healthcare";
856
803
  }>>;
857
804
  address: z.ZodOptional<z.ZodObject<{
858
805
  streetAddress: z.ZodString;
@@ -866,7 +813,7 @@ declare const CreateCompanyForm: z.ZodPipe<z.ZodObject<{
866
813
  alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
867
814
  picture: z.ZodOptional<z.ZodNullable<z.ZodString>>;
868
815
  }, z.core.$strip>, z.ZodTransform<{
869
- type: "MEDICAL";
816
+ industry: "healthcare";
870
817
  email: string;
871
818
  domain: string;
872
819
  address?: {
@@ -879,7 +826,7 @@ declare const CreateCompanyForm: z.ZodPipe<z.ZodObject<{
879
826
  alias?: string | undefined;
880
827
  picture?: string | null | undefined;
881
828
  }, {
882
- type: "MEDICAL";
829
+ industry: "healthcare";
883
830
  email: string;
884
831
  domain: string;
885
832
  address?: {
@@ -926,15 +873,26 @@ declare const CreditCurrency: z.ZodObject<{
926
873
  value: z.ZodNumber;
927
874
  currency: z.ZodEnum<{
928
875
  JMD: "JMD";
929
- USD: "USD";
930
- EUR: "EUR";
931
- GBP: "GBP";
932
- CAD: "CAD";
933
876
  }>;
934
877
  }, z.core.$strip>;
935
878
  value: z.ZodInt;
936
879
  }, z.core.$strip>;
937
880
  type CreditCurrency = z.infer<typeof CreditCurrency>;
881
+ declare const PaymentDetails: z.ZodObject<{
882
+ createdAt: z.ZodReadonly<z.ZodInt>;
883
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
884
+ uid: z.ZodUUID;
885
+ method: z.ZodEnum<{
886
+ cash: "cash";
887
+ card: "card";
888
+ insurance: "insurance";
889
+ }>;
890
+ currency: z.ZodEnum<{
891
+ JMD: "JMD";
892
+ }>;
893
+ amount: z.ZodNumber;
894
+ }, z.core.$strip>;
895
+ type PaymentDetails = z.infer<typeof PaymentDetails>;
938
896
 
939
897
  declare const Vitals: z.ZodRecord<z.ZodEnum<{
940
898
  heartRate: "heartRate";
@@ -1014,15 +972,11 @@ declare const Version: z.ZodInt;
1014
972
  declare const PriceAdjustment: z.ZodObject<{
1015
973
  createdAt: z.ZodReadonly<z.ZodInt>;
1016
974
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1017
- description: z.ZodOptional<z.ZodString>;
975
+ description: z.ZodString;
1018
976
  fixedAmount: z.ZodObject<{
1019
977
  value: z.ZodNumber;
1020
978
  currency: z.ZodEnum<{
1021
979
  JMD: "JMD";
1022
- USD: "USD";
1023
- EUR: "EUR";
1024
- GBP: "GBP";
1025
- CAD: "CAD";
1026
980
  }>;
1027
981
  }, z.core.$strip>;
1028
982
  percentage: z.ZodNumber;
@@ -1037,10 +991,6 @@ declare const PriceTag: z.ZodObject<{
1037
991
  cost: z.ZodNumber;
1038
992
  currency: z.ZodEnum<{
1039
993
  JMD: "JMD";
1040
- USD: "USD";
1041
- EUR: "EUR";
1042
- GBP: "GBP";
1043
- CAD: "CAD";
1044
994
  }>;
1045
995
  }, z.core.$strip>;
1046
996
  type PriceTag = z.infer<typeof PriceTag>;
@@ -1048,10 +998,6 @@ declare const Receipts: z.ZodArray<z.ZodObject<{
1048
998
  createdAt: z.ZodReadonly<z.ZodInt>;
1049
999
  currency: z.ZodEnum<{
1050
1000
  JMD: "JMD";
1051
- USD: "USD";
1052
- EUR: "EUR";
1053
- GBP: "GBP";
1054
- CAD: "CAD";
1055
1001
  }>;
1056
1002
  item: z.ZodString;
1057
1003
  cost: z.ZodNumber;
@@ -1136,13 +1082,6 @@ declare const ClientForm: z.ZodObject<{
1136
1082
  male: "male";
1137
1083
  female: "female";
1138
1084
  }>>;
1139
- attributes: z.ZodNonOptional<z.ZodObject<{
1140
- mothersMaidenName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1141
- fathersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1142
- mothersMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1143
- oldestSiblingMiddleName: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1144
- firstSchoolName: z.ZodOptional<z.ZodString>;
1145
- }, z.core.$strip>>;
1146
1085
  }, z.core.$strip>;
1147
1086
  type ClientForm = z.infer<typeof ClientForm>;
1148
1087
 
@@ -1161,28 +1100,21 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1161
1100
  charges: z.ZodArray<z.ZodObject<{
1162
1101
  createdAt: z.ZodReadonly<z.ZodInt>;
1163
1102
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1103
+ uid: z.ZodUUID;
1104
+ item: z.ZodString;
1105
+ cost: z.ZodNumber;
1164
1106
  currency: z.ZodEnum<{
1165
1107
  JMD: "JMD";
1166
- USD: "USD";
1167
- EUR: "EUR";
1168
- GBP: "GBP";
1169
- CAD: "CAD";
1170
1108
  }>;
1171
- item: z.ZodString;
1172
- cost: z.ZodNumber;
1173
1109
  }, z.core.$strip>>;
1174
1110
  additionalFees: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1175
1111
  createdAt: z.ZodReadonly<z.ZodInt>;
1176
1112
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1177
- description: z.ZodOptional<z.ZodString>;
1113
+ description: z.ZodString;
1178
1114
  fixedAmount: z.ZodObject<{
1179
1115
  value: z.ZodNumber;
1180
1116
  currency: z.ZodEnum<{
1181
1117
  JMD: "JMD";
1182
- USD: "USD";
1183
- EUR: "EUR";
1184
- GBP: "GBP";
1185
- CAD: "CAD";
1186
1118
  }>;
1187
1119
  }, z.core.$strip>;
1188
1120
  percentage: z.ZodNumber;
@@ -1191,15 +1123,11 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1191
1123
  discounts: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1192
1124
  createdAt: z.ZodReadonly<z.ZodInt>;
1193
1125
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1194
- description: z.ZodOptional<z.ZodString>;
1126
+ description: z.ZodString;
1195
1127
  fixedAmount: z.ZodObject<{
1196
1128
  value: z.ZodNumber;
1197
1129
  currency: z.ZodEnum<{
1198
1130
  JMD: "JMD";
1199
- USD: "USD";
1200
- EUR: "EUR";
1201
- GBP: "GBP";
1202
- CAD: "CAD";
1203
1131
  }>;
1204
1132
  }, z.core.$strip>;
1205
1133
  percentage: z.ZodNumber;
@@ -1208,15 +1136,11 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1208
1136
  prepayments: z.ZodNullable<z.ZodArray<z.ZodObject<{
1209
1137
  createdAt: z.ZodReadonly<z.ZodInt>;
1210
1138
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1211
- description: z.ZodOptional<z.ZodString>;
1139
+ description: z.ZodString;
1212
1140
  fixedAmount: z.ZodObject<{
1213
1141
  value: z.ZodNumber;
1214
1142
  currency: z.ZodEnum<{
1215
1143
  JMD: "JMD";
1216
- USD: "USD";
1217
- EUR: "EUR";
1218
- GBP: "GBP";
1219
- CAD: "CAD";
1220
1144
  }>;
1221
1145
  }, z.core.$strip>;
1222
1146
  percentage: z.ZodNumber;
@@ -1269,11 +1193,15 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1269
1193
  payments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1270
1194
  createdAt: z.ZodReadonly<z.ZodInt>;
1271
1195
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1196
+ uid: z.ZodUUID;
1272
1197
  method: z.ZodEnum<{
1273
1198
  cash: "cash";
1274
1199
  card: "card";
1275
1200
  insurance: "insurance";
1276
1201
  }>;
1202
+ currency: z.ZodEnum<{
1203
+ JMD: "JMD";
1204
+ }>;
1277
1205
  amount: z.ZodNumber;
1278
1206
  }, z.core.$strip>>>>;
1279
1207
  lockedBy: z.ZodOptional<z.ZodUUID>;
@@ -1290,10 +1218,11 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1290
1218
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1291
1219
  userUid: z.ZodNonOptional<z.ZodUUID>;
1292
1220
  }, z.core.$strip>;
1293
- cashier: z.ZodNullable<z.ZodObject<{
1221
+ debtCollector: z.ZodNullable<z.ZodArray<z.ZodObject<{
1222
+ collectedPayments: z.ZodRecord<z.ZodUUID, z.ZodInt>;
1294
1223
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1295
1224
  userUid: z.ZodNonOptional<z.ZodUUID>;
1296
- }, z.core.$strip>>;
1225
+ }, z.core.$strip>>>;
1297
1226
  }, z.core.$strip>;
1298
1227
  }, z.core.$strip>;
1299
1228
  type MiniAppointmentDetails = z.infer<typeof MiniAppointmentDetails>;
@@ -1304,15 +1233,11 @@ declare const AppointmentDetails: z.ZodObject<{
1304
1233
  additionalFees: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1305
1234
  createdAt: z.ZodReadonly<z.ZodInt>;
1306
1235
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1307
- description: z.ZodOptional<z.ZodString>;
1236
+ description: z.ZodString;
1308
1237
  fixedAmount: z.ZodObject<{
1309
1238
  value: z.ZodNumber;
1310
1239
  currency: z.ZodEnum<{
1311
1240
  JMD: "JMD";
1312
- USD: "USD";
1313
- EUR: "EUR";
1314
- GBP: "GBP";
1315
- CAD: "CAD";
1316
1241
  }>;
1317
1242
  }, z.core.$strip>;
1318
1243
  percentage: z.ZodNumber;
@@ -1321,15 +1246,11 @@ declare const AppointmentDetails: z.ZodObject<{
1321
1246
  discounts: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1322
1247
  createdAt: z.ZodReadonly<z.ZodInt>;
1323
1248
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1324
- description: z.ZodOptional<z.ZodString>;
1249
+ description: z.ZodString;
1325
1250
  fixedAmount: z.ZodObject<{
1326
1251
  value: z.ZodNumber;
1327
1252
  currency: z.ZodEnum<{
1328
1253
  JMD: "JMD";
1329
- USD: "USD";
1330
- EUR: "EUR";
1331
- GBP: "GBP";
1332
- CAD: "CAD";
1333
1254
  }>;
1334
1255
  }, z.core.$strip>;
1335
1256
  percentage: z.ZodNumber;
@@ -1338,15 +1259,11 @@ declare const AppointmentDetails: z.ZodObject<{
1338
1259
  prepayments: z.ZodNullable<z.ZodArray<z.ZodObject<{
1339
1260
  createdAt: z.ZodReadonly<z.ZodInt>;
1340
1261
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1341
- description: z.ZodOptional<z.ZodString>;
1262
+ description: z.ZodString;
1342
1263
  fixedAmount: z.ZodObject<{
1343
1264
  value: z.ZodNumber;
1344
1265
  currency: z.ZodEnum<{
1345
1266
  JMD: "JMD";
1346
- USD: "USD";
1347
- EUR: "EUR";
1348
- GBP: "GBP";
1349
- CAD: "CAD";
1350
1267
  }>;
1351
1268
  }, z.core.$strip>;
1352
1269
  percentage: z.ZodNumber;
@@ -1395,15 +1312,12 @@ declare const AppointmentDetails: z.ZodObject<{
1395
1312
  charges: z.ZodArray<z.ZodObject<{
1396
1313
  createdAt: z.ZodReadonly<z.ZodInt>;
1397
1314
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1315
+ uid: z.ZodUUID;
1316
+ item: z.ZodString;
1317
+ cost: z.ZodNumber;
1398
1318
  currency: z.ZodEnum<{
1399
1319
  JMD: "JMD";
1400
- USD: "USD";
1401
- EUR: "EUR";
1402
- GBP: "GBP";
1403
- CAD: "CAD";
1404
1320
  }>;
1405
- item: z.ZodString;
1406
- cost: z.ZodNumber;
1407
1321
  }, z.core.$strip>>;
1408
1322
  cancelled: z.ZodOptional<z.ZodObject<{
1409
1323
  doneAt: z.ZodInt;
@@ -1419,11 +1333,15 @@ declare const AppointmentDetails: z.ZodObject<{
1419
1333
  payments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1420
1334
  createdAt: z.ZodReadonly<z.ZodInt>;
1421
1335
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1336
+ uid: z.ZodUUID;
1422
1337
  method: z.ZodEnum<{
1423
1338
  cash: "cash";
1424
1339
  card: "card";
1425
1340
  insurance: "insurance";
1426
1341
  }>;
1342
+ currency: z.ZodEnum<{
1343
+ JMD: "JMD";
1344
+ }>;
1427
1345
  amount: z.ZodNumber;
1428
1346
  }, z.core.$strip>>>>;
1429
1347
  lockedBy: z.ZodOptional<z.ZodUUID>;
@@ -1440,10 +1358,11 @@ declare const AppointmentDetails: z.ZodObject<{
1440
1358
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1441
1359
  userUid: z.ZodNonOptional<z.ZodUUID>;
1442
1360
  }, z.core.$strip>;
1443
- cashier: z.ZodNullable<z.ZodObject<{
1361
+ debtCollector: z.ZodNullable<z.ZodArray<z.ZodObject<{
1362
+ collectedPayments: z.ZodRecord<z.ZodUUID, z.ZodInt>;
1444
1363
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1445
1364
  userUid: z.ZodNonOptional<z.ZodUUID>;
1446
- }, z.core.$strip>>;
1365
+ }, z.core.$strip>>>;
1447
1366
  }, z.core.$strip>;
1448
1367
  client: z.ZodObject<{
1449
1368
  createdAt: z.ZodReadonly<z.ZodInt>;
@@ -1495,15 +1414,11 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1495
1414
  additionalFees: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1496
1415
  createdAt: z.ZodReadonly<z.ZodInt>;
1497
1416
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1498
- description: z.ZodOptional<z.ZodString>;
1417
+ description: z.ZodString;
1499
1418
  fixedAmount: z.ZodObject<{
1500
1419
  value: z.ZodNumber;
1501
1420
  currency: z.ZodEnum<{
1502
1421
  JMD: "JMD";
1503
- USD: "USD";
1504
- EUR: "EUR";
1505
- GBP: "GBP";
1506
- CAD: "CAD";
1507
1422
  }>;
1508
1423
  }, z.core.$strip>;
1509
1424
  percentage: z.ZodNumber;
@@ -1512,15 +1427,11 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1512
1427
  discounts: z.ZodReadonly<z.ZodNullable<z.ZodArray<z.ZodObject<{
1513
1428
  createdAt: z.ZodReadonly<z.ZodInt>;
1514
1429
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1515
- description: z.ZodOptional<z.ZodString>;
1430
+ description: z.ZodString;
1516
1431
  fixedAmount: z.ZodObject<{
1517
1432
  value: z.ZodNumber;
1518
1433
  currency: z.ZodEnum<{
1519
1434
  JMD: "JMD";
1520
- USD: "USD";
1521
- EUR: "EUR";
1522
- GBP: "GBP";
1523
- CAD: "CAD";
1524
1435
  }>;
1525
1436
  }, z.core.$strip>;
1526
1437
  percentage: z.ZodNumber;
@@ -1529,15 +1440,11 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1529
1440
  prepayments: z.ZodNullable<z.ZodArray<z.ZodObject<{
1530
1441
  createdAt: z.ZodReadonly<z.ZodInt>;
1531
1442
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1532
- description: z.ZodOptional<z.ZodString>;
1443
+ description: z.ZodString;
1533
1444
  fixedAmount: z.ZodObject<{
1534
1445
  value: z.ZodNumber;
1535
1446
  currency: z.ZodEnum<{
1536
1447
  JMD: "JMD";
1537
- USD: "USD";
1538
- EUR: "EUR";
1539
- GBP: "GBP";
1540
- CAD: "CAD";
1541
1448
  }>;
1542
1449
  }, z.core.$strip>;
1543
1450
  percentage: z.ZodNumber;
@@ -1586,15 +1493,12 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1586
1493
  charges: z.ZodArray<z.ZodObject<{
1587
1494
  createdAt: z.ZodReadonly<z.ZodInt>;
1588
1495
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1496
+ uid: z.ZodUUID;
1497
+ item: z.ZodString;
1498
+ cost: z.ZodNumber;
1589
1499
  currency: z.ZodEnum<{
1590
1500
  JMD: "JMD";
1591
- USD: "USD";
1592
- EUR: "EUR";
1593
- GBP: "GBP";
1594
- CAD: "CAD";
1595
1501
  }>;
1596
- item: z.ZodString;
1597
- cost: z.ZodNumber;
1598
1502
  }, z.core.$strip>>;
1599
1503
  cancelled: z.ZodOptional<z.ZodObject<{
1600
1504
  doneAt: z.ZodInt;
@@ -1610,11 +1514,15 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1610
1514
  payments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1611
1515
  createdAt: z.ZodReadonly<z.ZodInt>;
1612
1516
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1517
+ uid: z.ZodUUID;
1613
1518
  method: z.ZodEnum<{
1614
1519
  cash: "cash";
1615
1520
  card: "card";
1616
1521
  insurance: "insurance";
1617
1522
  }>;
1523
+ currency: z.ZodEnum<{
1524
+ JMD: "JMD";
1525
+ }>;
1618
1526
  amount: z.ZodNumber;
1619
1527
  }, z.core.$strip>>>>;
1620
1528
  lockedBy: z.ZodOptional<z.ZodUUID>;
@@ -1631,10 +1539,11 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1631
1539
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1632
1540
  userUid: z.ZodNonOptional<z.ZodUUID>;
1633
1541
  }, z.core.$strip>;
1634
- cashier: z.ZodNullable<z.ZodObject<{
1542
+ debtCollector: z.ZodNullable<z.ZodArray<z.ZodObject<{
1543
+ collectedPayments: z.ZodRecord<z.ZodUUID, z.ZodInt>;
1635
1544
  postedAt: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1636
1545
  userUid: z.ZodNonOptional<z.ZodUUID>;
1637
- }, z.core.$strip>>;
1546
+ }, z.core.$strip>>>;
1638
1547
  }, z.core.$strip>;
1639
1548
  client: z.ZodObject<{
1640
1549
  createdAt: z.ZodReadonly<z.ZodInt>;
@@ -1688,28 +1597,21 @@ declare const ScheduleAppointmentForm: z.ZodObject<{
1688
1597
  charges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1689
1598
  createdAt: z.ZodReadonly<z.ZodInt>;
1690
1599
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1600
+ uid: z.ZodUUID;
1601
+ item: z.ZodString;
1602
+ cost: z.ZodNumber;
1691
1603
  currency: z.ZodEnum<{
1692
1604
  JMD: "JMD";
1693
- USD: "USD";
1694
- EUR: "EUR";
1695
- GBP: "GBP";
1696
- CAD: "CAD";
1697
1605
  }>;
1698
- item: z.ZodString;
1699
- cost: z.ZodNumber;
1700
1606
  }, z.core.$strip>>>;
1701
1607
  prepayments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1702
1608
  createdAt: z.ZodReadonly<z.ZodInt>;
1703
1609
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1704
- description: z.ZodOptional<z.ZodString>;
1610
+ description: z.ZodString;
1705
1611
  fixedAmount: z.ZodObject<{
1706
1612
  value: z.ZodNumber;
1707
1613
  currency: z.ZodEnum<{
1708
1614
  JMD: "JMD";
1709
- USD: "USD";
1710
- EUR: "EUR";
1711
- GBP: "GBP";
1712
- CAD: "CAD";
1713
1615
  }>;
1714
1616
  }, z.core.$strip>;
1715
1617
  percentage: z.ZodNumber;
@@ -1718,11 +1620,15 @@ declare const ScheduleAppointmentForm: z.ZodObject<{
1718
1620
  payments: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1719
1621
  createdAt: z.ZodReadonly<z.ZodInt>;
1720
1622
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1623
+ uid: z.ZodUUID;
1721
1624
  method: z.ZodEnum<{
1722
1625
  cash: "cash";
1723
1626
  card: "card";
1724
1627
  insurance: "insurance";
1725
1628
  }>;
1629
+ currency: z.ZodEnum<{
1630
+ JMD: "JMD";
1631
+ }>;
1726
1632
  amount: z.ZodNumber;
1727
1633
  }, z.core.$strip>>>>>;
1728
1634
  }, z.core.$strip>;
@@ -1781,7 +1687,7 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1781
1687
  lastModified: number | null;
1782
1688
  };
1783
1689
  appointments: Record<"ongoing" | "completed", number>;
1784
- roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
1690
+ roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
1785
1691
  lastActive: number | null;
1786
1692
  inviteAccepted: number | null;
1787
1693
  inviteSent?: number | null | undefined;
@@ -1795,7 +1701,7 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1795
1701
  addedAt: number;
1796
1702
  } | undefined;
1797
1703
  $CHANGE_ROLES?: {
1798
- newRoles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
1704
+ newRoles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
1799
1705
  addedAt: number;
1800
1706
  } | undefined;
1801
1707
  }>;
@@ -1808,44 +1714,45 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1808
1714
  _id: string;
1809
1715
  additionalFees: readonly {
1810
1716
  createdAt: number;
1717
+ description: string;
1811
1718
  fixedAmount: {
1812
1719
  value: number;
1813
- currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
1720
+ currency: "JMD";
1814
1721
  };
1815
1722
  percentage: number;
1816
1723
  isOptional: boolean;
1817
1724
  lastModified?: number | null | undefined;
1818
- description?: string | undefined;
1819
1725
  }[] | null;
1820
1726
  discounts: readonly {
1821
1727
  createdAt: number;
1728
+ description: string;
1822
1729
  fixedAmount: {
1823
1730
  value: number;
1824
- currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
1731
+ currency: "JMD";
1825
1732
  };
1826
1733
  percentage: number;
1827
1734
  isOptional: boolean;
1828
1735
  lastModified?: number | null | undefined;
1829
- description?: string | undefined;
1830
1736
  }[] | null;
1831
1737
  prepayments: {
1832
1738
  createdAt: number;
1739
+ description: string;
1833
1740
  fixedAmount: {
1834
1741
  value: number;
1835
- currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
1742
+ currency: "JMD";
1836
1743
  };
1837
1744
  percentage: number;
1838
1745
  isOptional: boolean;
1839
1746
  lastModified?: number | null | undefined;
1840
- description?: string | undefined;
1841
1747
  }[] | null;
1842
1748
  src: string;
1843
1749
  tkt: number;
1844
1750
  charges: {
1845
1751
  createdAt: number;
1846
- currency: "JMD" | "USD" | "EUR" | "GBP" | "CAD";
1752
+ uid: string;
1847
1753
  item: string;
1848
1754
  cost: number;
1755
+ currency: "JMD";
1849
1756
  lastModified?: number | null | undefined;
1850
1757
  }[];
1851
1758
  timeline: {
@@ -1861,10 +1768,11 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1861
1768
  userUid: string;
1862
1769
  postedAt?: number | null | undefined;
1863
1770
  };
1864
- cashier: {
1771
+ debtCollector: {
1772
+ collectedPayments: Record<string, number>;
1865
1773
  userUid: string;
1866
1774
  postedAt?: number | null | undefined;
1867
- } | null;
1775
+ }[] | null;
1868
1776
  };
1869
1777
  client: {
1870
1778
  createdAt: number;
@@ -1944,7 +1852,9 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1944
1852
  } | undefined;
1945
1853
  payments?: {
1946
1854
  createdAt: number;
1855
+ uid: string;
1947
1856
  method: "cash" | "card" | "insurance";
1857
+ currency: "JMD";
1948
1858
  amount: number;
1949
1859
  lastModified?: number | null | undefined;
1950
1860
  }[] | null | undefined;
@@ -1952,6 +1862,9 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1952
1862
  };
1953
1863
  }>;
1954
1864
 
1865
+ /** @disclaimer This doesn't handle currency conversion */
1866
+ declare function calcAppointmentFee(appointment: Pick<AppointmentDetails, "charges" | "discounts" | "additionalFees" | "prepayments">): number;
1867
+
1955
1868
  /**
1956
1869
  * @param {CompanyUserRole} role The role used to filter the staff members
1957
1870
  * @param {CompanyStaff} staff The staff object to query
@@ -1984,7 +1897,7 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
1984
1897
  lastModified: number | null;
1985
1898
  };
1986
1899
  appointments: Record<"ongoing" | "completed", number>;
1987
- roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
1900
+ roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
1988
1901
  inviteSent?: number | null | undefined;
1989
1902
  } | {
1990
1903
  lastActive: number | null;
@@ -1995,7 +1908,7 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
1995
1908
  lastModified: number | null;
1996
1909
  };
1997
1910
  appointments: Record<"ongoing" | "completed", number>;
1998
- roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "founder")[];
1911
+ roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "founder")[];
1999
1912
  _id: string;
2000
1913
  inviteSent?: number | null | undefined;
2001
1914
  })[] | null;
@@ -2006,10 +1919,11 @@ declare const findConflictingPartners: (...partners: (CompanyUser | MiniCompanyU
2006
1919
  declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
2007
1920
  declare const normalizeCompanyId: (id: string) => string;
2008
1921
  declare const normalizeNidClass: (value: NidClass) => string;
1922
+ declare const parseClientName: ({ firstName, middleName, lastName, }: Pick<ClientIdentity, "firstName" | "middleName" | "lastName">) => string;
2009
1923
 
2010
1924
  declare function createNotifId(options?: {
2011
1925
  from: string;
2012
1926
  to: string;
2013
1927
  }): string;
2014
1928
 
2015
- export { AppointmentDetails, type AppointmentDistAlg, ClientForm, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, type CompanyType, CompanyUser, type CompanyUserRole, CompanyUserSession, type CompanyUserStatus, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, type NidClass, Notification, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Version, Vitals, adminRoles, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyTypes, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, genders, getCompatibleRoles, healthcareProviderRoles, nidClasses, normalizeCompanyId, normalizeNidClass, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
1929
+ export { type AcceptedCurrency, AppointmentDetails, type AppointmentDistAlg, ClientForm, ClientIdentity, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyInviteList, CompanyNotifications, type CompanyPartnerRole, CompanyPreferences, type CompanyServiceSelector, CompanyStaff, CompanyState, CompanyUser, type CompanyUserRole, CompanyUserSession, type CompanyUserStatus, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, type Industry, InviteResponse, InvoiceNo, MedicalDetails, Medicine, MiniAppointmentDetails, MiniCompanyUser, MutableAppointmentDetails, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, type NidClass, Notification, PaymentDetails, type PaymentMethod, PriceAdjustment, PriceTag, Reason, Receipts, ScheduleAppointmentForm, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Version, Vitals, acceptedCurrencies, adminRoles, appointmentDistAlgs, calcAppointmentFee, companyPartnerRoles, companyServiceSelectors, companyUserRoles, companyUserStatus, createNotifId, employeeRoles, findAvailableStaff, findConflictingPartners, findNextAvailableStaff, genders, getCompatibleRoles, healthcareProviderRoles, industries, nidClasses, normalizeCompanyId, normalizeNidClass, parseClientName, paymentMethods, scheduleAppointment, serviceProviders, tiers, vitalKeys };
package/dist/main.js CHANGED
@@ -5,6 +5,7 @@ var companyUserRoles = z.enum([
5
5
  "physAsst",
6
6
  "rcpst",
7
7
  "cshr",
8
+ "a/r",
8
9
  "founder"
9
10
  // "admin",
10
11
  ]);
@@ -20,15 +21,20 @@ var healthcareProviderRoles = companyUserRoles.extract([
20
21
  ]);
21
22
  var appointmentDistAlgs = z.enum(["RR", "LOR"]);
22
23
  var companyServiceSelectors = z.enum(["scheduler", "doctor"]);
23
- var companyTypes = z.enum(["MEDICAL"]);
24
+ var industries = z.enum([
25
+ "healthcare"
26
+ // "Pharmaceutical",
27
+ ]);
24
28
  var companyUserStatus = z.enum(["inviteSent", "active", "inactive"]);
25
29
 
26
30
  // src/enums/Global.ts
31
+ import { currencies } from "@wavy/util";
27
32
  import * as z2 from "zod";
28
33
  var tiers = z2.enum(["basic", "pro", "premium", "gold"]);
29
34
  var paymentMethods = z2.enum(["cash", "card", "insurance"]);
30
35
  var genders = z2.enum(["male", "female"]);
31
36
  var nidClasses = z2.enum(["passportNo", "trn", "nin"]);
37
+ var acceptedCurrencies = currencies.extract(["JMD"]);
32
38
 
33
39
  // src/enums/Medical.ts
34
40
  import * as z3 from "zod";
@@ -46,7 +52,7 @@ var serviceProviders = z4.enum([
46
52
  "scheduler",
47
53
  "doctor",
48
54
  "physAsst",
49
- "cashier"
55
+ "debtCollector"
50
56
  ]);
51
57
 
52
58
  // src/schemas/company/CompanyDetails.ts
@@ -56,7 +62,6 @@ import * as z16 from "zod";
56
62
  import * as z8 from "zod";
57
63
 
58
64
  // src/schemas/utils/billing.ts
59
- import { currencies } from "@wavy/util";
60
65
  import * as z6 from "zod";
61
66
 
62
67
  // src/schemas/utils/core.ts
@@ -97,10 +102,15 @@ var Version = z5.int().min(1);
97
102
 
98
103
  // src/schemas/utils/billing.ts
99
104
  var PriceAdjustment = z6.object({
100
- description: z6.string().trim().min(3, "A description must have atleast (3) characters.").max(25, "A description can't have more that (25) characters.").optional(),
105
+ description: z6.string().trim().min(3, "A description must have atleast (3) characters.").max(25, "A description can't have more that (25) characters.").superRefine((data, ctx) => {
106
+ const invalidCharIdx = data.search(/[^a-zA-Z0-9-\.:\(\)]/);
107
+ if (invalidCharIdx > -1) {
108
+ ctx.addIssue("");
109
+ }
110
+ }),
101
111
  fixedAmount: z6.object({
102
112
  value: z6.number().min(0).max(1e6, "The max fixed amount is $1,000,000.00"),
103
- currency: currencies
113
+ currency: acceptedCurrencies
104
114
  }),
105
115
  percentage: z6.number().min(0).max(1e3, "The max percentage is 1,000%"),
106
116
  isOptional: z6.boolean(),
@@ -111,7 +121,7 @@ var PriceTag = z6.object({
111
121
  /**The name of the item that's being priced */
112
122
  item: z6.string().trim().min(3, "The price item must be atleast (3) characters long.").max(50, "The price item can't be more than (50) characters long."),
113
123
  cost: z6.number().min(1, "The minimum allowed cost is $1.00").max(1e9, "The max allowed cost is $1,000,000,000.00."),
114
- currency: currencies,
124
+ currency: acceptedCurrencies,
115
125
  ...TimeLog.shape
116
126
  });
117
127
  var Receipts = z6.array(
@@ -219,7 +229,7 @@ var CompanyIdentity = z9.object({
219
229
  }),
220
230
  address: Address.optional(),
221
231
  logo: z9.string().nullish(),
222
- type: companyTypes.readonly(),
232
+ industry: industries.readonly(),
223
233
  contact: z9.object({
224
234
  email: z9.email().max(25),
225
235
  phoneNumber: PhoneNumber.optional(),
@@ -259,7 +269,6 @@ var MutableCompanyIdentity = CompanyIdentity.pick({
259
269
  import * as z11 from "zod";
260
270
 
261
271
  // src/schemas/Global.ts
262
- import { currencies as currencies2 } from "@wavy/util";
263
272
  import * as z10 from "zod";
264
273
 
265
274
  // src/constants.ts
@@ -354,10 +363,20 @@ var Notification = z10.object({
354
363
  });
355
364
  var CreditCurrency = z10.object({
356
365
  uid: z10.uuidv4(),
357
- cost: z10.object({ value: z10.number().min(0), currency: currencies2 }),
366
+ cost: z10.object({ value: z10.number().min(0), currency: acceptedCurrencies }),
358
367
  value: z10.int().min(0),
359
368
  ...TimeLog.shape
360
369
  });
370
+ var PaymentDetails = z10.object({
371
+ // Used to track the payments recorded by each paymentCollector
372
+ uid: z10.uuidv4(),
373
+ method: paymentMethods,
374
+ currency: acceptedCurrencies,
375
+ amount: z10.number().min(1),
376
+ // Rate chart id (used to identify the rate chart used to convert the amount )
377
+ // rcid: z.uuidv4(),
378
+ ...TimeLog.shape
379
+ });
361
380
 
362
381
  // src/schemas/company/components/Notifications.ts
363
382
  var CompanyNotifications = z11.array(Notification).refine(
@@ -439,6 +458,11 @@ var normalizeNidClass = (value) => {
439
458
  if (value === "trn") return "Tax Registration No.";
440
459
  return camelCaseToLetter(value.replace("No", "No."));
441
460
  };
461
+ var parseClientName = ({
462
+ firstName,
463
+ middleName,
464
+ lastName
465
+ }) => [firstName, middleName[0] + ".", lastName].join(" ");
442
466
 
443
467
  // src/schemas/profiles/User.ts
444
468
  import { UserModel } from "@wavy/util";
@@ -649,7 +673,7 @@ var CreateCompanyForm = z18.object({
649
673
  alias: CompanyIdentity.shape.alias.optional(),
650
674
  picture: CompanyIdentity.shape.logo,
651
675
  ...CompanyIdentity.shape.contact.pick({ email: true, phoneNumber: true }).shape,
652
- type: CompanyIdentity.shape.type,
676
+ industry: CompanyIdentity.shape.industry,
653
677
  address: CompanyIdentity.shape.address
654
678
  }).transform((data) => {
655
679
  if (!("alias" in data)) {
@@ -724,7 +748,7 @@ var ClientIdentity = UserDetails.pick({
724
748
  nid: z20.object({
725
749
  class: nidClasses,
726
750
  // Hash this value
727
- value: z20.string().max(20)
751
+ value: z20.string().min(5).max(20)
728
752
  }).superRefine((data, ctx) => {
729
753
  const invalidCharIdx = data.value.search(/[^a-z0-9]/i);
730
754
  if (data.class === "trn") {
@@ -761,12 +785,34 @@ var ClientForm = ClientIdentity.pick({
761
785
  middleName: true,
762
786
  lastName: true,
763
787
  dob: true,
764
- sex: true,
765
- attributes: true
788
+ sex: true
789
+ // attributes: true,
766
790
  }).required();
767
791
 
768
792
  // src/schemas/appointment/Appointment.ts
769
793
  import * as z21 from "zod";
794
+ import { sumOf as sumOf2 } from "@wavy/fn";
795
+
796
+ // src/functions/calcAppointmentFee.ts
797
+ import { sumOf } from "@wavy/fn";
798
+ function calcAppointmentFee(appointment) {
799
+ const subtotal = sumOf(appointment.charges?.map((c) => c.cost));
800
+ const discount = calcAdjustment(appointment.discounts, subtotal);
801
+ const additionalFees = calcAdjustment(appointment.additionalFees, subtotal);
802
+ const prepayments = calcAdjustment(appointment.prepayments, subtotal);
803
+ console.log({ subtotal, discount, additionalFees, prepayments });
804
+ return subtotal + additionalFees - (discount + prepayments);
805
+ }
806
+ var calcAdjustment = (adjustments, subtotal) => {
807
+ if (!adjustments || adjustments.length < 1) return 0;
808
+ return sumOf(
809
+ adjustments?.map(
810
+ (d) => (d.fixedAmount?.value || 0) + (d.percentage ? d.percentage * 0.01 * subtotal : 0)
811
+ )
812
+ );
813
+ };
814
+
815
+ // src/schemas/appointment/Appointment.ts
770
816
  var TimelineActivity = z21.object({
771
817
  postedAt: Timestamp.nullish(),
772
818
  userUid: CompanyUser.shape._id.nonoptional()
@@ -791,7 +837,7 @@ var MiniAppointmentDetails = z21.object({
791
837
  */
792
838
  invoiceNo: InvoiceNo.optional(),
793
839
  /** The services that the client has done/will do. */
794
- charges: z21.array(PriceTag.omit({ uid: true })).max(4),
840
+ charges: z21.array(PriceTag).max(20),
795
841
  /**Required to calculate the accurate grandTotal of the charges */
796
842
  additionalFees: z21.array(PriceAdjustment).nullable().readonly(),
797
843
  /**Required to calculate the accurate grandTotal of the charges */
@@ -816,22 +862,34 @@ var MiniAppointmentDetails = z21.object({
816
862
  }).optional(),
817
863
  /** Add this after consulting with company owners about payment expectations */
818
864
  // paymentDueDate: Timestamp.nullish(),
819
- payments: z21.array(
820
- z21.object({
821
- method: paymentMethods,
822
- amount: z21.number().positive(),
823
- ...TimeLog.shape
824
- })
825
- ).max(100).nullish(),
865
+ payments: z21.array(PaymentDetails).max(100).nullish(),
826
866
  // The user that is currently modifying the appointment
827
867
  lockedBy: UserDetails.shape._id.optional(),
828
868
  timeline: z21.object({
829
869
  scheduler: TimelineActivity,
830
870
  physAsst: TimelineActivity.or(z21.literal("none")),
831
871
  doctor: TimelineActivity,
832
- cashier: TimelineActivity.nullable()
872
+ // Array used to accurately record payments made by the "a/r" and the "cshr"
873
+ debtCollector: z21.array(
874
+ z21.object({
875
+ ...TimelineActivity.shape,
876
+ // Payment uid -> collection time
877
+ collectedPayments: z21.record(z21.uuidv4(), Timestamp)
878
+ })
879
+ ).min(1).nullable()
833
880
  }),
834
881
  ...TimeLog.shape
882
+ }).superRefine((data, ctx) => {
883
+ if (data.payments && data.charges && sumOf2(data.payments.map((p) => p.amount)) >= calcAppointmentFee(data)) {
884
+ const untrackedPayment = data.payments.find(
885
+ (p) => !data.timeline.debtCollector?.some(
886
+ (d) => p.uid in d.collectedPayments
887
+ )
888
+ );
889
+ if (untrackedPayment) {
890
+ ctx.addIssue(`Untracked payment found (${untrackedPayment.uid})`);
891
+ }
892
+ }
835
893
  });
836
894
  var AppointmentDetails = MiniAppointmentDetails.omit({
837
895
  clientUid: true
@@ -1009,8 +1067,9 @@ async function scheduleAppointment(request) {
1009
1067
  scheduler: { userUid: request.sender._id, postedAt: today },
1010
1068
  doctor: { userUid: selectedDoctor },
1011
1069
  physAsst: selectedPhysAsst ? { userUid: selectedPhysAsst } : "none",
1012
- get cashier() {
1013
- if (request.preferences.enforcePaidAppointments) return this.scheduler;
1070
+ get debtCollector() {
1071
+ if (request.preferences.enforcePaidAppointments)
1072
+ return [{ ...this.scheduler, collectedPayments: {} }];
1014
1073
  return null;
1015
1074
  }
1016
1075
  },
@@ -1070,6 +1129,7 @@ export {
1070
1129
  MutableCompanyIdentity,
1071
1130
  MutableCompanyPreferences,
1072
1131
  Notification,
1132
+ PaymentDetails,
1073
1133
  PriceAdjustment,
1074
1134
  PriceTag,
1075
1135
  Reason,
@@ -1084,11 +1144,12 @@ export {
1084
1144
  UserDetails,
1085
1145
  Version,
1086
1146
  Vitals,
1147
+ acceptedCurrencies,
1087
1148
  adminRoles,
1088
1149
  appointmentDistAlgs,
1150
+ calcAppointmentFee,
1089
1151
  companyPartnerRoles,
1090
1152
  companyServiceSelectors,
1091
- companyTypes,
1092
1153
  companyUserRoles,
1093
1154
  companyUserStatus,
1094
1155
  createNotifId,
@@ -1099,9 +1160,11 @@ export {
1099
1160
  genders,
1100
1161
  getCompatibleRoles,
1101
1162
  healthcareProviderRoles,
1163
+ industries,
1102
1164
  nidClasses,
1103
1165
  normalizeCompanyId,
1104
1166
  normalizeNidClass,
1167
+ parseClientName,
1105
1168
  paymentMethods,
1106
1169
  scheduleAppointment,
1107
1170
  serviceProviders,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",