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