@bizmap/sdk 0.0.51 → 0.0.52
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 +40 -1
- package/dist/main.js +12 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
92
92
|
isBusy: z.ZodBoolean;
|
|
93
93
|
appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
94
94
|
lastActive: z.ZodInt;
|
|
95
|
+
inviteSent: z.ZodInt;
|
|
96
|
+
inviteAccepted: z.ZodInt;
|
|
95
97
|
name: z.ZodRecord<z.ZodEnum<{
|
|
96
98
|
first: "first";
|
|
97
99
|
last: "last";
|
|
@@ -101,6 +103,17 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
101
103
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
102
104
|
}, z.core.$strip>;
|
|
103
105
|
type CompanyUser = z.infer<typeof CompanyUser>;
|
|
106
|
+
/** (email) -> user config */
|
|
107
|
+
declare const CompanyInviteList: z.ZodRecord<z.ZodEmail, z.ZodObject<{
|
|
108
|
+
createdAt: z.ZodInt;
|
|
109
|
+
roles: z.ZodArray<z.ZodEnum<{
|
|
110
|
+
doc: "doc";
|
|
111
|
+
physAsst: "physAsst";
|
|
112
|
+
rcpst: "rcpst";
|
|
113
|
+
cshr: "cshr";
|
|
114
|
+
}>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
type CompanyInviteList = z.infer<typeof CompanyInviteList>;
|
|
104
117
|
declare const CompanyDetails: z.ZodObject<{
|
|
105
118
|
uid: z.ZodReadonly<z.ZodString>;
|
|
106
119
|
identity: z.ZodObject<{
|
|
@@ -279,6 +292,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
279
292
|
isBusy: z.ZodBoolean;
|
|
280
293
|
appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
281
294
|
lastActive: z.ZodInt;
|
|
295
|
+
inviteSent: z.ZodInt;
|
|
296
|
+
inviteAccepted: z.ZodInt;
|
|
282
297
|
name: z.ZodRecord<z.ZodEnum<{
|
|
283
298
|
first: "first";
|
|
284
299
|
last: "last";
|
|
@@ -319,6 +334,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
319
334
|
isBusy: boolean;
|
|
320
335
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
321
336
|
lastActive: number;
|
|
337
|
+
inviteSent: number;
|
|
338
|
+
inviteAccepted: number;
|
|
322
339
|
name: Record<"first" | "last", string>;
|
|
323
340
|
email: string;
|
|
324
341
|
lastModified?: number | null | undefined;
|
|
@@ -351,6 +368,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
351
368
|
isBusy: boolean;
|
|
352
369
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
353
370
|
lastActive: number;
|
|
371
|
+
inviteSent: number;
|
|
372
|
+
inviteAccepted: number;
|
|
354
373
|
name: Record<"first" | "last", string>;
|
|
355
374
|
email: string;
|
|
356
375
|
lastModified?: number | null | undefined;
|
|
@@ -394,6 +413,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
394
413
|
isBusy: z.ZodBoolean;
|
|
395
414
|
appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
396
415
|
lastActive: z.ZodInt;
|
|
416
|
+
inviteSent: z.ZodInt;
|
|
417
|
+
inviteAccepted: z.ZodInt;
|
|
397
418
|
name: z.ZodRecord<z.ZodEnum<{
|
|
398
419
|
first: "first";
|
|
399
420
|
last: "last";
|
|
@@ -434,6 +455,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
434
455
|
isBusy: boolean;
|
|
435
456
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
436
457
|
lastActive: number;
|
|
458
|
+
inviteSent: number;
|
|
459
|
+
inviteAccepted: number;
|
|
437
460
|
name: Record<"first" | "last", string>;
|
|
438
461
|
email: string;
|
|
439
462
|
lastModified?: number | null | undefined;
|
|
@@ -466,6 +489,8 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
466
489
|
isBusy: boolean;
|
|
467
490
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
468
491
|
lastActive: number;
|
|
492
|
+
inviteSent: number;
|
|
493
|
+
inviteAccepted: number;
|
|
469
494
|
name: Record<"first" | "last", string>;
|
|
470
495
|
email: string;
|
|
471
496
|
lastModified?: number | null | undefined;
|
|
@@ -667,6 +692,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
667
692
|
isBusy: z.ZodBoolean;
|
|
668
693
|
appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
669
694
|
lastActive: z.ZodInt;
|
|
695
|
+
inviteSent: z.ZodInt;
|
|
696
|
+
inviteAccepted: z.ZodInt;
|
|
670
697
|
name: z.ZodRecord<z.ZodEnum<{
|
|
671
698
|
first: "first";
|
|
672
699
|
last: "last";
|
|
@@ -707,6 +734,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
707
734
|
isBusy: boolean;
|
|
708
735
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
709
736
|
lastActive: number;
|
|
737
|
+
inviteSent: number;
|
|
738
|
+
inviteAccepted: number;
|
|
710
739
|
name: Record<"first" | "last", string>;
|
|
711
740
|
email: string;
|
|
712
741
|
lastModified?: number | null | undefined;
|
|
@@ -739,6 +768,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
739
768
|
isBusy: boolean;
|
|
740
769
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
741
770
|
lastActive: number;
|
|
771
|
+
inviteSent: number;
|
|
772
|
+
inviteAccepted: number;
|
|
742
773
|
name: Record<"first" | "last", string>;
|
|
743
774
|
email: string;
|
|
744
775
|
lastModified?: number | null | undefined;
|
|
@@ -782,6 +813,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
782
813
|
isBusy: z.ZodBoolean;
|
|
783
814
|
appointmentCounter: z.ZodRecord<z.ZodLiteral<"ongoing" | "completed">, z.ZodInt>;
|
|
784
815
|
lastActive: z.ZodInt;
|
|
816
|
+
inviteSent: z.ZodInt;
|
|
817
|
+
inviteAccepted: z.ZodInt;
|
|
785
818
|
name: z.ZodRecord<z.ZodEnum<{
|
|
786
819
|
first: "first";
|
|
787
820
|
last: "last";
|
|
@@ -822,6 +855,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
822
855
|
isBusy: boolean;
|
|
823
856
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
824
857
|
lastActive: number;
|
|
858
|
+
inviteSent: number;
|
|
859
|
+
inviteAccepted: number;
|
|
825
860
|
name: Record<"first" | "last", string>;
|
|
826
861
|
email: string;
|
|
827
862
|
lastModified?: number | null | undefined;
|
|
@@ -854,6 +889,8 @@ declare const PartialCompanyDetails: z.ZodObject<{
|
|
|
854
889
|
isBusy: boolean;
|
|
855
890
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
856
891
|
lastActive: number;
|
|
892
|
+
inviteSent: number;
|
|
893
|
+
inviteAccepted: number;
|
|
857
894
|
name: Record<"first" | "last", string>;
|
|
858
895
|
email: string;
|
|
859
896
|
lastModified?: number | null | undefined;
|
|
@@ -931,6 +968,8 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
|
|
|
931
968
|
isBusy: boolean;
|
|
932
969
|
appointmentCounter: Record<"ongoing" | "completed", number>;
|
|
933
970
|
lastActive: number;
|
|
971
|
+
inviteSent: number;
|
|
972
|
+
inviteAccepted: number;
|
|
934
973
|
name: Record<"first" | "last", string>;
|
|
935
974
|
email: string;
|
|
936
975
|
lastModified?: number | null | undefined;
|
|
@@ -940,4 +979,4 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
|
|
|
940
979
|
/**@returns the roles that are compatible with the selected role. */
|
|
941
980
|
declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
|
|
942
981
|
|
|
943
|
-
export { type AppointmentDistAlg, CompanyDetails, type CompanyPartnerRole, type CompanyServiceSelector, CompanyUser, type CompanyUserRole, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, Jwt, Notification, PartialCompanyDetails, PriceAdjustment, PriceTag, PricingRate, StandardTime, type Tier, TierList, TimeLog, Timestamp, UuidV4, UuidV7, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles, healthcareProviderRoles, tiers };
|
|
982
|
+
export { type AppointmentDistAlg, CompanyDetails, CompanyInviteList, type CompanyPartnerRole, type CompanyServiceSelector, CompanyUser, type CompanyUserRole, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, Jwt, Notification, PartialCompanyDetails, PriceAdjustment, PriceTag, PricingRate, StandardTime, type Tier, TierList, TimeLog, Timestamp, UuidV4, UuidV7, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles, healthcareProviderRoles, tiers };
|
package/dist/main.js
CHANGED
|
@@ -201,6 +201,8 @@ var CompanyUser = z6.object({
|
|
|
201
201
|
z6.int().min(0)
|
|
202
202
|
),
|
|
203
203
|
lastActive: Timestamp,
|
|
204
|
+
inviteSent: Timestamp,
|
|
205
|
+
inviteAccepted: Timestamp,
|
|
204
206
|
...TimeLog.shape
|
|
205
207
|
}).superRefine((data, ctx) => {
|
|
206
208
|
if (!data.availability.isAvailable && data.status !== "active") {
|
|
@@ -212,6 +214,10 @@ var CompanyUser = z6.object({
|
|
|
212
214
|
);
|
|
213
215
|
}
|
|
214
216
|
});
|
|
217
|
+
var CompanyInviteList = z6.record(
|
|
218
|
+
CompanyUser.shape.email,
|
|
219
|
+
z6.object({ createdAt: Timestamp, roles: z6.array(employeeRoles) })
|
|
220
|
+
);
|
|
215
221
|
var CompanyIdentity = z6.object({
|
|
216
222
|
displayName: z6.string().min(3).max(25),
|
|
217
223
|
logo: z6.string().max(2500).nullish(),
|
|
@@ -367,12 +373,16 @@ var Staff = z6.object({
|
|
|
367
373
|
}
|
|
368
374
|
}
|
|
369
375
|
});
|
|
376
|
+
var CompanyNotifications = z6.array(Notification).refine(
|
|
377
|
+
(data) => data.every((notif) => notif.code !== "COMPANY_INVITE"),
|
|
378
|
+
"A company can't receive a company invite."
|
|
379
|
+
);
|
|
370
380
|
var Receipts = z6.array(PriceTag.omit({ uid: true, lastModified: true }));
|
|
371
381
|
var createCompanyDetails = (options) => {
|
|
372
382
|
return z6.object({
|
|
373
383
|
uid: UuidV7,
|
|
374
384
|
identity: CompanyIdentity,
|
|
375
|
-
notifications: options.partial ?
|
|
385
|
+
notifications: options.partial ? CompanyNotifications.nullish() : CompanyNotifications,
|
|
376
386
|
receipts: options.partial ? Receipts.nullish() : Receipts,
|
|
377
387
|
state: options.partial ? CompanyState.nullish() : CompanyState,
|
|
378
388
|
preferences: options.partial ? CompanyPreferences.nullish() : CompanyPreferences,
|
|
@@ -385,6 +395,7 @@ var CompanyDetails = createCompanyDetails({ partial: false });
|
|
|
385
395
|
var PartialCompanyDetails = createCompanyDetails({ partial: true });
|
|
386
396
|
export {
|
|
387
397
|
CompanyDetails,
|
|
398
|
+
CompanyInviteList,
|
|
388
399
|
CompanyUser,
|
|
389
400
|
InviteResponse,
|
|
390
401
|
InvoiceNo,
|