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