@bizmap/sdk 0.0.7 → 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 +32 -51
- package/dist/main.js +24 -26
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -48,19 +48,15 @@ type CompanyIdentity = z.infer<typeof CompanyIdentity>;
|
|
|
48
48
|
declare const CompanyOpState: z.ZodObject<{
|
|
49
49
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
50
50
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
51
|
-
uid: z.ZodString
|
|
51
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
52
52
|
availableBalance: z.ZodNumber;
|
|
53
53
|
isOffline: z.ZodBoolean;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
type CompanyOpState = z.infer<typeof CompanyOpState>;
|
|
56
|
-
declare const appointmentDistAlgs: z.ZodEnum<{
|
|
57
|
-
RR: "RR";
|
|
58
|
-
LOR: "LOR";
|
|
59
|
-
}>;
|
|
60
56
|
declare const CompanyPreferences: z.ZodObject<{
|
|
61
57
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
62
58
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
63
|
-
uid: z.ZodString
|
|
59
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
64
60
|
userProvisions: z.ZodNumber;
|
|
65
61
|
apptDistAlg: z.ZodEnum<{
|
|
66
62
|
RR: "RR";
|
|
@@ -75,7 +71,7 @@ type CompanyPreferences = z.infer<typeof CompanyPreferences>;
|
|
|
75
71
|
declare const CompanyBillingModel: z.ZodObject<{
|
|
76
72
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
77
73
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
78
|
-
uid: z.ZodString
|
|
74
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
79
75
|
biller: z.ZodEnum<{
|
|
80
76
|
doc: "doc";
|
|
81
77
|
fdc: "fdc";
|
|
@@ -180,37 +176,6 @@ declare const CompanyRegistrationClaims: z.ZodObject<{
|
|
|
180
176
|
}, z.core.$strip>;
|
|
181
177
|
}, z.core.$strip>;
|
|
182
178
|
type CompanyRegistrationClaims = z.infer<typeof CompanyRegistrationClaims>;
|
|
183
|
-
|
|
184
|
-
declare const UserCompaniesDTO: z.ZodObject<{
|
|
185
|
-
companies: z.ZodArray<z.ZodObject<{
|
|
186
|
-
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
187
|
-
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
188
|
-
uid: z.ZodReadonly<z.ZodString>;
|
|
189
|
-
displayName: z.ZodString;
|
|
190
|
-
logo: z.ZodOptional<z.ZodString>;
|
|
191
|
-
slogan: z.ZodString;
|
|
192
|
-
regNo: z.ZodReadonly<z.ZodString>;
|
|
193
|
-
email: z.ZodEmail;
|
|
194
|
-
address: z.ZodRecord<z.ZodEnum<{
|
|
195
|
-
streetAddress: "streetAddress";
|
|
196
|
-
city: "city";
|
|
197
|
-
parish: "parish";
|
|
198
|
-
country: "country";
|
|
199
|
-
}>, z.ZodString>;
|
|
200
|
-
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
201
|
-
trn: z.ZodOptional<z.ZodString>;
|
|
202
|
-
gctRegNo: z.ZodOptional<z.ZodString>;
|
|
203
|
-
}, z.core.$strip>>;
|
|
204
|
-
}, z.core.$strip>;
|
|
205
|
-
type UserCompaniesDTO = z.infer<typeof UserCompaniesDTO>;
|
|
206
|
-
declare const companyUserRoles: z.ZodEnum<{
|
|
207
|
-
doc: "doc";
|
|
208
|
-
physAsst: "physAsst";
|
|
209
|
-
rcpst: "rcpst";
|
|
210
|
-
cshr: "cshr";
|
|
211
|
-
fdc: "fdc";
|
|
212
|
-
admin: "admin";
|
|
213
|
-
}>;
|
|
214
179
|
declare const CompanyUser: z.ZodObject<{
|
|
215
180
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
216
181
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
@@ -238,9 +203,10 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
238
203
|
uid: z.ZodString;
|
|
239
204
|
}, z.core.$strip>;
|
|
240
205
|
type CompanyUser = z.infer<typeof CompanyUser>;
|
|
241
|
-
|
|
242
|
-
declare const
|
|
243
|
-
|
|
206
|
+
/** The unpacked Staff Details */
|
|
207
|
+
declare const StaffDetails: z.ZodObject<{
|
|
208
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
209
|
+
members: z.ZodArray<z.ZodObject<{
|
|
244
210
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
245
211
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
246
212
|
lastActive: z.ZodNumber;
|
|
@@ -266,9 +232,26 @@ declare const CompanyUsersOverviewDTO: z.ZodObject<{
|
|
|
266
232
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
267
233
|
uid: z.ZodString;
|
|
268
234
|
}, z.core.$strip>>;
|
|
269
|
-
partnerMap: z.ZodRecord<z.
|
|
235
|
+
partnerMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
270
236
|
}, z.core.$strip>;
|
|
271
|
-
type
|
|
237
|
+
type StaffDetails = z.infer<typeof StaffDetails>;
|
|
238
|
+
|
|
239
|
+
declare const TimeLog: z.ZodObject<{
|
|
240
|
+
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
241
|
+
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
type TimeLog = z.infer<typeof TimeLog>;
|
|
244
|
+
declare const Time: z.ZodString;
|
|
245
|
+
|
|
246
|
+
declare const companyUserRoles: z.ZodEnum<{
|
|
247
|
+
doc: "doc";
|
|
248
|
+
physAsst: "physAsst";
|
|
249
|
+
rcpst: "rcpst";
|
|
250
|
+
cshr: "cshr";
|
|
251
|
+
fdc: "fdc";
|
|
252
|
+
admin: "admin";
|
|
253
|
+
}>;
|
|
254
|
+
type CompanyUserRole = z.infer<typeof companyUserRoles>;
|
|
272
255
|
declare const companyPartnerRoles: z.ZodEnum<{
|
|
273
256
|
doc: "doc";
|
|
274
257
|
physAsst: "physAsst";
|
|
@@ -282,12 +265,10 @@ declare const employeeRoles: z.ZodEnum<{
|
|
|
282
265
|
fdc: "fdc";
|
|
283
266
|
}>;
|
|
284
267
|
type EmployeeRole = z.infer<typeof employeeRoles>;
|
|
268
|
+
declare const appointmentDistAlgs: z.ZodEnum<{
|
|
269
|
+
RR: "RR";
|
|
270
|
+
LOR: "LOR";
|
|
271
|
+
}>;
|
|
272
|
+
type AppointmentDistAlg = z.infer<typeof appointmentDistAlgs>;
|
|
285
273
|
|
|
286
|
-
|
|
287
|
-
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
288
|
-
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
289
|
-
}, z.core.$strip>;
|
|
290
|
-
type TimeLog = z.infer<typeof TimeLog>;
|
|
291
|
-
declare const Time: z.ZodString;
|
|
292
|
-
|
|
293
|
-
export { CompanyBillingModel, CompanyIdentity, CompanyOpState, type CompanyPartnerRole, CompanyPreferences, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, CompanyUsersOverviewDTO, type EmployeeRole, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, Time, TimeLog, UserCompaniesDTO, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles };
|
|
274
|
+
export { type AppointmentDistAlg, CompanyBillingModel, CompanyIdentity, CompanyOpState, type CompanyPartnerRole, CompanyPreferences, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, type EmployeeRole, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, StaffDetails, Time, TimeLog, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles };
|
package/dist/main.js
CHANGED
|
@@ -36,16 +36,12 @@ import {
|
|
|
36
36
|
currencies,
|
|
37
37
|
FileDetails,
|
|
38
38
|
PhoneNumber,
|
|
39
|
-
UserModel
|
|
39
|
+
UserModel
|
|
40
40
|
} from "@wavy/util";
|
|
41
41
|
import * as z4 from "zod";
|
|
42
42
|
|
|
43
|
-
// src/
|
|
43
|
+
// src/enums/CompanyEnums.ts
|
|
44
44
|
import * as z3 from "zod";
|
|
45
|
-
import { UserModel } from "@wavy/util";
|
|
46
|
-
var UserCompaniesDTO = z3.object({
|
|
47
|
-
companies: z3.array(CompanyIdentity)
|
|
48
|
-
});
|
|
49
45
|
var companyUserRoles = z3.enum([
|
|
50
46
|
"doc",
|
|
51
47
|
"physAsst",
|
|
@@ -54,23 +50,12 @@ var companyUserRoles = z3.enum([
|
|
|
54
50
|
"fdc",
|
|
55
51
|
"admin"
|
|
56
52
|
]);
|
|
57
|
-
var CompanyUser = z3.object({
|
|
58
|
-
...UserModel.shape,
|
|
59
|
-
lastActive: z3.number(),
|
|
60
|
-
status: z3.enum(["inviteSent", "active", "inactive"]),
|
|
61
|
-
roles: z3.array(companyUserRoles),
|
|
62
|
-
...TimeLog.shape
|
|
63
|
-
});
|
|
64
|
-
var CompanyUsersOverviewDTO = z3.object({
|
|
65
|
-
users: z3.array(CompanyUser),
|
|
66
|
-
/**doc (one) -> physAsst (many) */
|
|
67
|
-
partnerMap: z3.record(z3.email(), z3.array(z3.email()))
|
|
68
|
-
});
|
|
69
53
|
var companyPartnerRoles = companyUserRoles.extract([
|
|
70
54
|
"doc",
|
|
71
55
|
"physAsst"
|
|
72
56
|
]);
|
|
73
57
|
var employeeRoles = companyUserRoles.exclude(["admin"]);
|
|
58
|
+
var appointmentDistAlgs = z3.enum(["RR", "LOR"]);
|
|
74
59
|
|
|
75
60
|
// src/schemas/Company.ts
|
|
76
61
|
var CompanyIdentity = z4.object({
|
|
@@ -93,15 +78,14 @@ var CompanyIdentity = z4.object({
|
|
|
93
78
|
});
|
|
94
79
|
var CompanyOpState = z4.object({
|
|
95
80
|
// The company's uid
|
|
96
|
-
uid:
|
|
81
|
+
uid: CompanyIdentity.shape.uid,
|
|
97
82
|
availableBalance: z4.number(),
|
|
98
83
|
isOffline: z4.boolean(),
|
|
99
84
|
...TimeLog.shape
|
|
100
85
|
});
|
|
101
|
-
var appointmentDistAlgs = z4.enum(["RR", "LOR"]);
|
|
102
86
|
var CompanyPreferences = z4.object({
|
|
103
87
|
// The company's uid
|
|
104
|
-
uid:
|
|
88
|
+
uid: CompanyIdentity.shape.uid,
|
|
105
89
|
/** The amount of user provisions made for this company */
|
|
106
90
|
userProvisions: z4.number(),
|
|
107
91
|
/**
|
|
@@ -120,7 +104,7 @@ var CompanyPreferences = z4.object({
|
|
|
120
104
|
...TimeLog.shape
|
|
121
105
|
});
|
|
122
106
|
var CompanyBillingModel = z4.object({
|
|
123
|
-
uid:
|
|
107
|
+
uid: CompanyIdentity.shape.uid,
|
|
124
108
|
/** The user that provides the bill to the client */
|
|
125
109
|
biller: companyUserRoles.extract(["doc", "fdc"]),
|
|
126
110
|
primaryCurrency: currencies,
|
|
@@ -135,17 +119,32 @@ var RegisterCompanyForm = z4.object({
|
|
|
135
119
|
userProvisions: z4.number(),
|
|
136
120
|
slogan: z4.string(),
|
|
137
121
|
email: z4.email(),
|
|
138
|
-
phoneNumber:
|
|
122
|
+
phoneNumber: PhoneNumber,
|
|
139
123
|
workingHours: CompanyPreferences.shape.workingHours,
|
|
140
124
|
logo: FileDetails,
|
|
141
125
|
receipt: FileDetails,
|
|
142
126
|
_claims: z4.string()
|
|
143
127
|
});
|
|
144
128
|
var CompanyRegistrationClaims = z4.object({
|
|
145
|
-
sender:
|
|
129
|
+
sender: UserModel,
|
|
146
130
|
pricingRate: PricingRate.shape.companyRegistration,
|
|
147
131
|
...TimeLog.shape
|
|
148
132
|
});
|
|
133
|
+
var CompanyUser = z4.object({
|
|
134
|
+
...UserModel.shape,
|
|
135
|
+
lastActive: z4.number(),
|
|
136
|
+
status: z4.enum(["inviteSent", "active", "inactive"]),
|
|
137
|
+
roles: z4.array(companyUserRoles),
|
|
138
|
+
...TimeLog.shape
|
|
139
|
+
});
|
|
140
|
+
var StaffDetails = z4.object({
|
|
141
|
+
uid: CompanyIdentity.shape.uid,
|
|
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))
|
|
147
|
+
});
|
|
149
148
|
export {
|
|
150
149
|
CompanyBillingModel,
|
|
151
150
|
CompanyIdentity,
|
|
@@ -153,14 +152,13 @@ export {
|
|
|
153
152
|
CompanyPreferences,
|
|
154
153
|
CompanyRegistrationClaims,
|
|
155
154
|
CompanyUser,
|
|
156
|
-
CompanyUsersOverviewDTO,
|
|
157
155
|
PriceAdjustment,
|
|
158
156
|
PriceTag,
|
|
159
157
|
PricingRate,
|
|
160
158
|
RegisterCompanyForm,
|
|
159
|
+
StaffDetails,
|
|
161
160
|
Time,
|
|
162
161
|
TimeLog,
|
|
163
|
-
UserCompaniesDTO,
|
|
164
162
|
appointmentDistAlgs,
|
|
165
163
|
companyPartnerRoles,
|
|
166
164
|
companyUserRoles,
|