@bizmap/sdk 0.0.8 → 0.0.9
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 +1 -1
- package/dist/main.js +58 -55
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -232,7 +232,7 @@ declare const StaffDetails: z.ZodObject<{
|
|
|
232
232
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
233
233
|
uid: z.ZodString;
|
|
234
234
|
}, z.core.$strip>>;
|
|
235
|
-
partnerMap: z.ZodRecord<z.
|
|
235
|
+
partnerMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
236
236
|
}, z.core.$strip>;
|
|
237
237
|
type StaffDetails = z.infer<typeof StaffDetails>;
|
|
238
238
|
|
package/dist/main.js
CHANGED
|
@@ -38,38 +38,56 @@ import {
|
|
|
38
38
|
PhoneNumber,
|
|
39
39
|
UserModel
|
|
40
40
|
} from "@wavy/util";
|
|
41
|
+
import * as z4 from "zod";
|
|
42
|
+
|
|
43
|
+
// src/enums/CompanyEnums.ts
|
|
41
44
|
import * as z3 from "zod";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
var companyUserRoles = z3.enum([
|
|
46
|
+
"doc",
|
|
47
|
+
"physAsst",
|
|
48
|
+
"rcpst",
|
|
49
|
+
"cshr",
|
|
50
|
+
"fdc",
|
|
51
|
+
"admin"
|
|
52
|
+
]);
|
|
53
|
+
var companyPartnerRoles = companyUserRoles.extract([
|
|
54
|
+
"doc",
|
|
55
|
+
"physAsst"
|
|
56
|
+
]);
|
|
57
|
+
var employeeRoles = companyUserRoles.exclude(["admin"]);
|
|
58
|
+
var appointmentDistAlgs = z3.enum(["RR", "LOR"]);
|
|
59
|
+
|
|
60
|
+
// src/schemas/Company.ts
|
|
61
|
+
var CompanyIdentity = z4.object({
|
|
62
|
+
uid: z4.string().readonly(),
|
|
45
63
|
// The company's uid
|
|
46
64
|
// Organizational
|
|
47
|
-
displayName:
|
|
48
|
-
logo:
|
|
49
|
-
slogan:
|
|
50
|
-
regNo:
|
|
65
|
+
displayName: z4.string(),
|
|
66
|
+
logo: z4.string().optional(),
|
|
67
|
+
slogan: z4.string(),
|
|
68
|
+
regNo: z4.string().readonly(),
|
|
51
69
|
// The company's registration number
|
|
52
70
|
// Social
|
|
53
|
-
email:
|
|
71
|
+
email: z4.email(),
|
|
54
72
|
address: Address,
|
|
55
73
|
phoneNumber: PhoneNumber.optional(),
|
|
56
74
|
// Legal
|
|
57
|
-
trn:
|
|
58
|
-
gctRegNo:
|
|
75
|
+
trn: z4.string().optional(),
|
|
76
|
+
gctRegNo: z4.string().optional(),
|
|
59
77
|
...TimeLog.shape
|
|
60
78
|
});
|
|
61
|
-
var CompanyOpState =
|
|
79
|
+
var CompanyOpState = z4.object({
|
|
62
80
|
// The company's uid
|
|
63
81
|
uid: CompanyIdentity.shape.uid,
|
|
64
|
-
availableBalance:
|
|
65
|
-
isOffline:
|
|
82
|
+
availableBalance: z4.number(),
|
|
83
|
+
isOffline: z4.boolean(),
|
|
66
84
|
...TimeLog.shape
|
|
67
85
|
});
|
|
68
|
-
var CompanyPreferences =
|
|
86
|
+
var CompanyPreferences = z4.object({
|
|
69
87
|
// The company's uid
|
|
70
88
|
uid: CompanyIdentity.shape.uid,
|
|
71
89
|
/** The amount of user provisions made for this company */
|
|
72
|
-
userProvisions:
|
|
90
|
+
userProvisions: z4.number(),
|
|
73
91
|
/**
|
|
74
92
|
* @property RR (Round Robin): Even distribution.
|
|
75
93
|
* @property LOR (Least Outstanding Requests): Distribute based on availability.
|
|
@@ -79,69 +97,54 @@ var CompanyPreferences = z3.object({
|
|
|
79
97
|
// [1] when the working directory on the server should reset
|
|
80
98
|
// [2] the time that company session requests are cut-off
|
|
81
99
|
// (the cutoff time affects non-admins)
|
|
82
|
-
workingHours:
|
|
100
|
+
workingHours: z4.object({
|
|
83
101
|
start: Time,
|
|
84
102
|
end: Time
|
|
85
103
|
}),
|
|
86
104
|
...TimeLog.shape
|
|
87
105
|
});
|
|
88
|
-
var CompanyBillingModel =
|
|
106
|
+
var CompanyBillingModel = z4.object({
|
|
89
107
|
uid: CompanyIdentity.shape.uid,
|
|
90
108
|
/** The user that provides the bill to the client */
|
|
91
109
|
biller: companyUserRoles.extract(["doc", "fdc"]),
|
|
92
110
|
primaryCurrency: currencies,
|
|
93
|
-
additionalFees:
|
|
94
|
-
discounts:
|
|
95
|
-
services:
|
|
96
|
-
acceptedCurrencies:
|
|
111
|
+
additionalFees: z4.array(PriceAdjustment).optional(),
|
|
112
|
+
discounts: z4.array(PriceAdjustment).optional(),
|
|
113
|
+
services: z4.array(PriceTag).optional(),
|
|
114
|
+
acceptedCurrencies: z4.array(currencies),
|
|
97
115
|
...TimeLog.shape
|
|
98
116
|
});
|
|
99
|
-
var RegisterCompanyForm =
|
|
100
|
-
regNo:
|
|
101
|
-
userProvisions:
|
|
102
|
-
slogan:
|
|
103
|
-
email:
|
|
117
|
+
var RegisterCompanyForm = z4.object({
|
|
118
|
+
regNo: z4.string(),
|
|
119
|
+
userProvisions: z4.number(),
|
|
120
|
+
slogan: z4.string(),
|
|
121
|
+
email: z4.email(),
|
|
104
122
|
phoneNumber: PhoneNumber,
|
|
105
123
|
workingHours: CompanyPreferences.shape.workingHours,
|
|
106
124
|
logo: FileDetails,
|
|
107
125
|
receipt: FileDetails,
|
|
108
|
-
_claims:
|
|
126
|
+
_claims: z4.string()
|
|
109
127
|
});
|
|
110
|
-
var CompanyRegistrationClaims =
|
|
128
|
+
var CompanyRegistrationClaims = z4.object({
|
|
111
129
|
sender: UserModel,
|
|
112
130
|
pricingRate: PricingRate.shape.companyRegistration,
|
|
113
131
|
...TimeLog.shape
|
|
114
132
|
});
|
|
115
|
-
var CompanyUser =
|
|
133
|
+
var CompanyUser = z4.object({
|
|
116
134
|
...UserModel.shape,
|
|
117
|
-
lastActive:
|
|
118
|
-
status:
|
|
119
|
-
roles:
|
|
135
|
+
lastActive: z4.number(),
|
|
136
|
+
status: z4.enum(["inviteSent", "active", "inactive"]),
|
|
137
|
+
roles: z4.array(companyUserRoles),
|
|
120
138
|
...TimeLog.shape
|
|
121
139
|
});
|
|
122
|
-
var StaffDetails =
|
|
140
|
+
var StaffDetails = z4.object({
|
|
123
141
|
uid: CompanyIdentity.shape.uid,
|
|
124
|
-
members:
|
|
125
|
-
/**
|
|
126
|
-
|
|
142
|
+
members: z4.array(CompanyUser),
|
|
143
|
+
/**
|
|
144
|
+
* @relationship one -> many
|
|
145
|
+
*@description A map of doctor `uids` to their assistants `uids` */
|
|
146
|
+
partnerMap: z4.record(CompanyUser.shape.uid, z4.array(CompanyUser.shape.uid))
|
|
127
147
|
});
|
|
128
|
-
|
|
129
|
-
// src/enums/CompanyEnums.ts
|
|
130
|
-
import * as z4 from "zod";
|
|
131
|
-
var companyUserRoles2 = z4.enum([
|
|
132
|
-
"doc",
|
|
133
|
-
"physAsst",
|
|
134
|
-
"rcpst",
|
|
135
|
-
"cshr",
|
|
136
|
-
"fdc",
|
|
137
|
-
"admin"
|
|
138
|
-
]);
|
|
139
|
-
var companyPartnerRoles = companyUserRoles2.extract([
|
|
140
|
-
"doc",
|
|
141
|
-
"physAsst"
|
|
142
|
-
]);
|
|
143
|
-
var employeeRoles = companyUserRoles2.exclude(["admin"]);
|
|
144
|
-
var appointmentDistAlgs2 = z4.enum(["RR", "LOR"]);
|
|
145
148
|
export {
|
|
146
149
|
CompanyBillingModel,
|
|
147
150
|
CompanyIdentity,
|
|
@@ -156,8 +159,8 @@ export {
|
|
|
156
159
|
StaffDetails,
|
|
157
160
|
Time,
|
|
158
161
|
TimeLog,
|
|
159
|
-
|
|
162
|
+
appointmentDistAlgs,
|
|
160
163
|
companyPartnerRoles,
|
|
161
|
-
|
|
164
|
+
companyUserRoles,
|
|
162
165
|
employeeRoles
|
|
163
166
|
};
|