@bizmap/sdk 0.0.5 → 0.0.7
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 +21 -17
- package/dist/main.js +27 -18
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -25,13 +25,14 @@ declare const PriceTag: z.ZodObject<{
|
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
type PriceTag = z.infer<typeof PriceTag>;
|
|
27
27
|
|
|
28
|
-
declare const
|
|
28
|
+
declare const CompanyIdentity: z.ZodObject<{
|
|
29
29
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
30
30
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
31
|
-
uid: z.ZodString
|
|
31
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
32
32
|
displayName: z.ZodString;
|
|
33
|
-
logo: z.ZodOptional<z.
|
|
33
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
34
34
|
slogan: z.ZodString;
|
|
35
|
+
regNo: z.ZodReadonly<z.ZodString>;
|
|
35
36
|
email: z.ZodEmail;
|
|
36
37
|
address: z.ZodRecord<z.ZodEnum<{
|
|
37
38
|
streetAddress: "streetAddress";
|
|
@@ -40,18 +41,16 @@ declare const CompanyInfo: z.ZodObject<{
|
|
|
40
41
|
country: "country";
|
|
41
42
|
}>, z.ZodString>;
|
|
42
43
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
44
|
+
trn: z.ZodOptional<z.ZodString>;
|
|
45
|
+
gctRegNo: z.ZodOptional<z.ZodString>;
|
|
43
46
|
}, z.core.$strip>;
|
|
44
|
-
type
|
|
47
|
+
type CompanyIdentity = z.infer<typeof CompanyIdentity>;
|
|
45
48
|
declare const CompanyOpState: z.ZodObject<{
|
|
46
49
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
47
50
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
48
51
|
uid: z.ZodString;
|
|
49
52
|
availableBalance: z.ZodNumber;
|
|
50
53
|
isOffline: z.ZodBoolean;
|
|
51
|
-
workingHours: z.ZodObject<{
|
|
52
|
-
start: z.ZodString;
|
|
53
|
-
end: z.ZodString;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
54
|
}, z.core.$strip>;
|
|
56
55
|
type CompanyOpState = z.infer<typeof CompanyOpState>;
|
|
57
56
|
declare const appointmentDistAlgs: z.ZodEnum<{
|
|
@@ -67,17 +66,19 @@ declare const CompanyPreferences: z.ZodObject<{
|
|
|
67
66
|
RR: "RR";
|
|
68
67
|
LOR: "LOR";
|
|
69
68
|
}>;
|
|
69
|
+
workingHours: z.ZodObject<{
|
|
70
|
+
start: z.ZodString;
|
|
71
|
+
end: z.ZodString;
|
|
72
|
+
}, z.core.$strip>;
|
|
70
73
|
}, z.core.$strip>;
|
|
71
74
|
type CompanyPreferences = z.infer<typeof CompanyPreferences>;
|
|
72
75
|
declare const CompanyBillingModel: z.ZodObject<{
|
|
73
76
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
74
77
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
75
78
|
uid: z.ZodString;
|
|
76
|
-
|
|
77
|
-
gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
-
billingProvider: z.ZodEnum<{
|
|
79
|
+
biller: z.ZodEnum<{
|
|
79
80
|
doc: "doc";
|
|
80
|
-
|
|
81
|
+
fdc: "fdc";
|
|
81
82
|
}>;
|
|
82
83
|
primaryCurrency: z.ZodEnum<{
|
|
83
84
|
JMD: "JMD";
|
|
@@ -96,13 +97,13 @@ declare const CompanyBillingModel: z.ZodObject<{
|
|
|
96
97
|
fixedAmount: z.ZodNumber;
|
|
97
98
|
percentage: z.ZodNumber;
|
|
98
99
|
}, z.core.$strip>>>;
|
|
99
|
-
services: z.ZodArray<z.ZodObject<{
|
|
100
|
+
services: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
101
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
101
102
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
102
103
|
uid: z.ZodString;
|
|
103
104
|
name: z.ZodString;
|
|
104
105
|
cost: z.ZodNumber;
|
|
105
|
-
}, z.core.$strip
|
|
106
|
+
}, z.core.$strip>>>;
|
|
106
107
|
acceptedCurrencies: z.ZodArray<z.ZodEnum<{
|
|
107
108
|
JMD: "JMD";
|
|
108
109
|
}>>;
|
|
@@ -184,10 +185,11 @@ declare const UserCompaniesDTO: z.ZodObject<{
|
|
|
184
185
|
companies: z.ZodArray<z.ZodObject<{
|
|
185
186
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
186
187
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
187
|
-
uid: z.ZodString
|
|
188
|
+
uid: z.ZodReadonly<z.ZodString>;
|
|
188
189
|
displayName: z.ZodString;
|
|
189
|
-
logo: z.ZodOptional<z.
|
|
190
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
190
191
|
slogan: z.ZodString;
|
|
192
|
+
regNo: z.ZodReadonly<z.ZodString>;
|
|
191
193
|
email: z.ZodEmail;
|
|
192
194
|
address: z.ZodRecord<z.ZodEnum<{
|
|
193
195
|
streetAddress: "streetAddress";
|
|
@@ -196,6 +198,8 @@ declare const UserCompaniesDTO: z.ZodObject<{
|
|
|
196
198
|
country: "country";
|
|
197
199
|
}>, z.ZodString>;
|
|
198
200
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
201
|
+
trn: z.ZodOptional<z.ZodString>;
|
|
202
|
+
gctRegNo: z.ZodOptional<z.ZodString>;
|
|
199
203
|
}, z.core.$strip>>;
|
|
200
204
|
}, z.core.$strip>;
|
|
201
205
|
type UserCompaniesDTO = z.infer<typeof UserCompaniesDTO>;
|
|
@@ -286,4 +290,4 @@ declare const TimeLog: z.ZodObject<{
|
|
|
286
290
|
type TimeLog = z.infer<typeof TimeLog>;
|
|
287
291
|
declare const Time: z.ZodString;
|
|
288
292
|
|
|
289
|
-
export { CompanyBillingModel,
|
|
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 };
|
package/dist/main.js
CHANGED
|
@@ -44,7 +44,7 @@ import * as z4 from "zod";
|
|
|
44
44
|
import * as z3 from "zod";
|
|
45
45
|
import { UserModel } from "@wavy/util";
|
|
46
46
|
var UserCompaniesDTO = z3.object({
|
|
47
|
-
companies: z3.array(
|
|
47
|
+
companies: z3.array(CompanyIdentity)
|
|
48
48
|
});
|
|
49
49
|
var companyUserRoles = z3.enum([
|
|
50
50
|
"doc",
|
|
@@ -73,32 +73,34 @@ var companyPartnerRoles = companyUserRoles.extract([
|
|
|
73
73
|
var employeeRoles = companyUserRoles.exclude(["admin"]);
|
|
74
74
|
|
|
75
75
|
// src/schemas/Company.ts
|
|
76
|
-
var
|
|
77
|
-
uid: z4.string(),
|
|
76
|
+
var CompanyIdentity = z4.object({
|
|
77
|
+
uid: z4.string().readonly(),
|
|
78
|
+
// The company's uid
|
|
79
|
+
// Organizational
|
|
78
80
|
displayName: z4.string(),
|
|
79
|
-
logo: z4.string().
|
|
81
|
+
logo: z4.string().optional(),
|
|
80
82
|
slogan: z4.string(),
|
|
83
|
+
regNo: z4.string().readonly(),
|
|
84
|
+
// The company's registration number
|
|
85
|
+
// Social
|
|
81
86
|
email: z4.email(),
|
|
82
87
|
address: Address,
|
|
83
88
|
phoneNumber: PhoneNumber.optional(),
|
|
89
|
+
// Legal
|
|
90
|
+
trn: z4.string().optional(),
|
|
91
|
+
gctRegNo: z4.string().optional(),
|
|
84
92
|
...TimeLog.shape
|
|
85
93
|
});
|
|
86
94
|
var CompanyOpState = z4.object({
|
|
95
|
+
// The company's uid
|
|
87
96
|
uid: z4.string(),
|
|
88
97
|
availableBalance: z4.number(),
|
|
89
98
|
isOffline: z4.boolean(),
|
|
90
|
-
// Required to determine:
|
|
91
|
-
// [1] when the working directory on the server should reset
|
|
92
|
-
// [2] the time that company session requests are cut-off
|
|
93
|
-
// (the cutoff time affects non-admins)
|
|
94
|
-
workingHours: z4.object({
|
|
95
|
-
start: Time,
|
|
96
|
-
end: Time
|
|
97
|
-
}),
|
|
98
99
|
...TimeLog.shape
|
|
99
100
|
});
|
|
100
101
|
var appointmentDistAlgs = z4.enum(["RR", "LOR"]);
|
|
101
102
|
var CompanyPreferences = z4.object({
|
|
103
|
+
// The company's uid
|
|
102
104
|
uid: z4.string(),
|
|
103
105
|
/** The amount of user provisions made for this company */
|
|
104
106
|
userProvisions: z4.number(),
|
|
@@ -107,17 +109,24 @@ var CompanyPreferences = z4.object({
|
|
|
107
109
|
* @property LOR (Least Outstanding Requests): Distribute based on availability.
|
|
108
110
|
*/
|
|
109
111
|
apptDistAlg: appointmentDistAlgs,
|
|
112
|
+
// Required to determine:
|
|
113
|
+
// [1] when the working directory on the server should reset
|
|
114
|
+
// [2] the time that company session requests are cut-off
|
|
115
|
+
// (the cutoff time affects non-admins)
|
|
116
|
+
workingHours: z4.object({
|
|
117
|
+
start: Time,
|
|
118
|
+
end: Time
|
|
119
|
+
}),
|
|
110
120
|
...TimeLog.shape
|
|
111
121
|
});
|
|
112
122
|
var CompanyBillingModel = z4.object({
|
|
113
123
|
uid: z4.string(),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
billingProvider: companyUserRoles.extract(["doc", "physAsst"]),
|
|
124
|
+
/** The user that provides the bill to the client */
|
|
125
|
+
biller: companyUserRoles.extract(["doc", "fdc"]),
|
|
117
126
|
primaryCurrency: currencies,
|
|
118
127
|
additionalFees: z4.array(PriceAdjustment).optional(),
|
|
119
128
|
discounts: z4.array(PriceAdjustment).optional(),
|
|
120
|
-
services: z4.array(PriceTag),
|
|
129
|
+
services: z4.array(PriceTag).optional(),
|
|
121
130
|
acceptedCurrencies: z4.array(currencies),
|
|
122
131
|
...TimeLog.shape
|
|
123
132
|
});
|
|
@@ -127,7 +136,7 @@ var RegisterCompanyForm = z4.object({
|
|
|
127
136
|
slogan: z4.string(),
|
|
128
137
|
email: z4.email(),
|
|
129
138
|
phoneNumber: z4.string(),
|
|
130
|
-
workingHours:
|
|
139
|
+
workingHours: CompanyPreferences.shape.workingHours,
|
|
131
140
|
logo: FileDetails,
|
|
132
141
|
receipt: FileDetails,
|
|
133
142
|
_claims: z4.string()
|
|
@@ -139,7 +148,7 @@ var CompanyRegistrationClaims = z4.object({
|
|
|
139
148
|
});
|
|
140
149
|
export {
|
|
141
150
|
CompanyBillingModel,
|
|
142
|
-
|
|
151
|
+
CompanyIdentity,
|
|
143
152
|
CompanyOpState,
|
|
144
153
|
CompanyPreferences,
|
|
145
154
|
CompanyRegistrationClaims,
|