@bizmap/sdk 0.0.22 → 0.0.24
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 -2
- package/dist/main.js +8 -3
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare const CompanyOpState: z.ZodObject<{
|
|
|
53
53
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
54
54
|
uid: z.ZodReadonly<z.ZodString>;
|
|
55
55
|
availableBalance: z.ZodNumber;
|
|
56
|
+
totalUploads: z.ZodNumber;
|
|
56
57
|
preferences: z.ZodObject<{
|
|
57
58
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
58
59
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -72,7 +73,7 @@ declare const CompanyBillingModel: z.ZodObject<{
|
|
|
72
73
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
73
74
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
75
|
allowInvoiceDist: z.ZodBoolean;
|
|
75
|
-
|
|
76
|
+
useCreatedServices: z.ZodBoolean;
|
|
76
77
|
serviceSelector: z.ZodEnum<{
|
|
77
78
|
scheduler: "scheduler";
|
|
78
79
|
doctor: "doctor";
|
|
@@ -321,6 +322,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
321
322
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
322
323
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
323
324
|
availableBalance: z.ZodNumber;
|
|
325
|
+
totalUploads: z.ZodNumber;
|
|
324
326
|
preferences: z.ZodObject<{
|
|
325
327
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
326
328
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -338,7 +340,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
338
340
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
339
341
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
340
342
|
allowInvoiceDist: z.ZodBoolean;
|
|
341
|
-
|
|
343
|
+
useCreatedServices: z.ZodBoolean;
|
|
342
344
|
serviceSelector: z.ZodEnum<{
|
|
343
345
|
scheduler: "scheduler";
|
|
344
346
|
doctor: "doctor";
|
package/dist/main.js
CHANGED
|
@@ -83,6 +83,11 @@ var CompanyOpState = z4.object({
|
|
|
83
83
|
uid: CompanyIdentity.shape.uid,
|
|
84
84
|
// This can only be changed by the server/app admin
|
|
85
85
|
availableBalance: z4.number(),
|
|
86
|
+
/**
|
|
87
|
+
* The total amount of uploads made by an admin.
|
|
88
|
+
* @note - This should be refreshed daily.
|
|
89
|
+
*/
|
|
90
|
+
totalUploads: z4.number(),
|
|
86
91
|
// This can be changed by the company's admin
|
|
87
92
|
preferences: z4.object({
|
|
88
93
|
/** The amount of user provisions made for this company */
|
|
@@ -104,8 +109,8 @@ var CompanyBillingModel = z4.object({
|
|
|
104
109
|
preferences: z4.object({
|
|
105
110
|
/** Allows the serviceDecider to distribute invoices. */
|
|
106
111
|
allowInvoiceDist: z4.boolean(),
|
|
107
|
-
/** Forces service selectors to
|
|
108
|
-
|
|
112
|
+
/** Forces service selectors to use the list of service(s) that you've created. */
|
|
113
|
+
useCreatedServices: z4.boolean(),
|
|
109
114
|
/** The user that's allowed to record the client's services. */
|
|
110
115
|
serviceSelector: z4.enum(["scheduler", "doctor"]),
|
|
111
116
|
/** A record of the payments made must be attached before creating the
|
|
@@ -130,7 +135,7 @@ var CompanyBillingModel = z4.object({
|
|
|
130
135
|
...TimeLog.shape
|
|
131
136
|
}).superRefine((billing, ctx) => {
|
|
132
137
|
const totalServices = billing?.services?.length ?? 0;
|
|
133
|
-
if (billing?.preferences?.
|
|
138
|
+
if (billing?.preferences?.useCreatedServices && totalServices < 1) {
|
|
134
139
|
ctx.addIssue("At least (1) service must be added to the services list.");
|
|
135
140
|
}
|
|
136
141
|
});
|