@bizmap/sdk 0.0.12 → 0.0.14
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 +11 -9
- package/dist/main.js +14 -21
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -53,11 +53,15 @@ declare const CompanyOpState: z.ZodObject<{
|
|
|
53
53
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
54
54
|
uid: z.ZodReadonly<z.ZodString>;
|
|
55
55
|
availableBalance: z.ZodNumber;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
preferences: z.ZodObject<{
|
|
57
|
+
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
58
|
+
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
59
|
+
userProvisions: z.ZodNumber;
|
|
60
|
+
apptDistAlg: z.ZodEnum<{
|
|
61
|
+
RR: "RR";
|
|
62
|
+
LOR: "LOR";
|
|
63
|
+
}>;
|
|
64
|
+
}, z.core.$strip>;
|
|
61
65
|
}, z.core.$strip>;
|
|
62
66
|
type CompanyOpState = z.infer<typeof CompanyOpState>;
|
|
63
67
|
declare const CompanyBillingModel: z.ZodObject<{
|
|
@@ -65,16 +69,14 @@ declare const CompanyBillingModel: z.ZodObject<{
|
|
|
65
69
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
66
70
|
uid: z.ZodReadonly<z.ZodString>;
|
|
67
71
|
preferences: z.ZodObject<{
|
|
72
|
+
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
73
|
+
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
68
74
|
allowInvoiceDist: z.ZodBoolean;
|
|
69
75
|
serviceDecider: z.ZodEnum<{
|
|
70
76
|
scheduler: "scheduler";
|
|
71
77
|
doctor: "doctor";
|
|
72
78
|
}>;
|
|
73
79
|
enforcePaidAppts: z.ZodBoolean;
|
|
74
|
-
paymentCollector: z.ZodNullable<z.ZodEnum<{
|
|
75
|
-
doc: "doc";
|
|
76
|
-
cshr: "cshr";
|
|
77
|
-
}>>;
|
|
78
80
|
primaryCurrency: z.ZodEnum<{
|
|
79
81
|
JMD: "JMD";
|
|
80
82
|
}>;
|
package/dist/main.js
CHANGED
|
@@ -79,14 +79,19 @@ var CompanyIdentity = z4.object({
|
|
|
79
79
|
var CompanyOpState = z4.object({
|
|
80
80
|
// The company's uid
|
|
81
81
|
uid: CompanyIdentity.shape.uid,
|
|
82
|
+
// This can only be changed by the server/app admin
|
|
82
83
|
availableBalance: z4.number(),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
// This can be changed by the company's admin
|
|
85
|
+
preferences: z4.object({
|
|
86
|
+
/** The amount of user provisions made for this company */
|
|
87
|
+
userProvisions: z4.number().min(10, { error: "The total user provisions must atleast be 10." }).max(150, { error: "The total user provisions can't exceed 150" }),
|
|
88
|
+
/**
|
|
89
|
+
* @property RR (Round Robin): Even distribution.
|
|
90
|
+
* @property LOR (Least Outstanding Requests): Distribute based on availability.
|
|
91
|
+
*/
|
|
92
|
+
apptDistAlg: appointmentDistAlgs,
|
|
93
|
+
...TimeLog.shape
|
|
94
|
+
}),
|
|
90
95
|
...TimeLog.shape
|
|
91
96
|
});
|
|
92
97
|
var CompanyBillingModel = z4.object({
|
|
@@ -103,27 +108,15 @@ var CompanyBillingModel = z4.object({
|
|
|
103
108
|
* - removes the `cshr` role from the company's allowed user roles
|
|
104
109
|
* */
|
|
105
110
|
enforcePaidAppts: z4.boolean(),
|
|
106
|
-
/**
|
|
107
|
-
* Determines who collects & records payments made by clients.
|
|
108
|
-
* @default "cshr"
|
|
109
|
-
* @note
|
|
110
|
-
* - if `collector === "doc"`, the `cshr` role will be removed from the company's allowed user roles.
|
|
111
|
-
* - if `enforcePaidAppts === true`, this should be null.
|
|
112
|
-
*/
|
|
113
|
-
paymentCollector: companyUserRoles.extract(["doc", "cshr"]).nullable(),
|
|
114
111
|
primaryCurrency: currencies,
|
|
115
|
-
acceptedCurrencies: z4.array(currencies)
|
|
112
|
+
acceptedCurrencies: z4.array(currencies),
|
|
113
|
+
...TimeLog.shape
|
|
116
114
|
}).superRefine((data, ctx) => {
|
|
117
115
|
if (data.enforcePaidAppts && data.serviceDecider !== "scheduler") {
|
|
118
116
|
ctx.addIssue(
|
|
119
117
|
"serviceDecider must be scheduler when enforcePaidAppts is true."
|
|
120
118
|
);
|
|
121
119
|
}
|
|
122
|
-
if (data.enforcePaidAppts && data.paymentCollector !== null) {
|
|
123
|
-
ctx.addIssue(
|
|
124
|
-
"paymentCollector must be null when enforcePaidAppts is true."
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
120
|
}),
|
|
128
121
|
additionalFees: z4.array(PriceAdjustment).optional(),
|
|
129
122
|
discounts: z4.array(PriceAdjustment).optional(),
|