@bizmap/sdk 0.0.20 → 0.0.22
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 +10 -10
- package/dist/main.js +5 -5
- package/package.json +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ declare const CompanyBillingModel: z.ZodObject<{
|
|
|
72
72
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
73
73
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
74
|
allowInvoiceDist: z.ZodBoolean;
|
|
75
|
-
|
|
75
|
+
strictServiceSelection: z.ZodBoolean;
|
|
76
76
|
serviceSelector: z.ZodEnum<{
|
|
77
77
|
scheduler: "scheduler";
|
|
78
78
|
doctor: "doctor";
|
|
@@ -162,7 +162,7 @@ declare const CompanyRegistrationClaims: z.ZodObject<{
|
|
|
162
162
|
first: "first";
|
|
163
163
|
last: "last";
|
|
164
164
|
}>, z.ZodString>;
|
|
165
|
-
photoUrl: z.ZodOptional<z.ZodString
|
|
165
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
166
|
email: z.ZodEmail;
|
|
167
167
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
168
168
|
uid: z.ZodString;
|
|
@@ -194,7 +194,7 @@ declare const CompanyUser: z.ZodObject<{
|
|
|
194
194
|
first: "first";
|
|
195
195
|
last: "last";
|
|
196
196
|
}>, z.ZodString>;
|
|
197
|
-
photoUrl: z.ZodOptional<z.ZodString
|
|
197
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
198
|
email: z.ZodEmail;
|
|
199
199
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
200
200
|
uid: z.ZodString;
|
|
@@ -222,7 +222,7 @@ declare const _staffDetails: z.ZodObject<{
|
|
|
222
222
|
first: "first";
|
|
223
223
|
last: "last";
|
|
224
224
|
}>, z.ZodString>;
|
|
225
|
-
photoUrl: z.ZodOptional<z.ZodString
|
|
225
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
226
|
email: z.ZodEmail;
|
|
227
227
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
228
228
|
uid: z.ZodString;
|
|
@@ -253,7 +253,7 @@ declare const StaffDetails: z.ZodPipe<z.ZodObject<{
|
|
|
253
253
|
first: "first";
|
|
254
254
|
last: "last";
|
|
255
255
|
}>, z.ZodString>;
|
|
256
|
-
photoUrl: z.ZodOptional<z.ZodString
|
|
256
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
257
|
email: z.ZodEmail;
|
|
258
258
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
259
259
|
uid: z.ZodString;
|
|
@@ -271,7 +271,7 @@ declare const StaffDetails: z.ZodPipe<z.ZodObject<{
|
|
|
271
271
|
email: string;
|
|
272
272
|
uid: string;
|
|
273
273
|
lastModified?: number | null | undefined;
|
|
274
|
-
photoUrl?: string | undefined;
|
|
274
|
+
photoUrl?: string | null | undefined;
|
|
275
275
|
phoneNumber?: string | undefined;
|
|
276
276
|
}[];
|
|
277
277
|
partnerMap: Record<string, string[]>;
|
|
@@ -287,7 +287,7 @@ declare const StaffDetails: z.ZodPipe<z.ZodObject<{
|
|
|
287
287
|
email: string;
|
|
288
288
|
uid: string;
|
|
289
289
|
lastModified?: number | null | undefined;
|
|
290
|
-
photoUrl?: string | undefined;
|
|
290
|
+
photoUrl?: string | null | undefined;
|
|
291
291
|
phoneNumber?: string | undefined;
|
|
292
292
|
}[];
|
|
293
293
|
partnerMap: Record<string, string[]>;
|
|
@@ -338,7 +338,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
338
338
|
createdAt: z.ZodReadonly<z.ZodNumber>;
|
|
339
339
|
lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
340
340
|
allowInvoiceDist: z.ZodBoolean;
|
|
341
|
-
|
|
341
|
+
strictServiceSelection: z.ZodBoolean;
|
|
342
342
|
serviceSelector: z.ZodEnum<{
|
|
343
343
|
scheduler: "scheduler";
|
|
344
344
|
doctor: "doctor";
|
|
@@ -393,7 +393,7 @@ declare const CompanyDetails: z.ZodObject<{
|
|
|
393
393
|
first: "first";
|
|
394
394
|
last: "last";
|
|
395
395
|
}>, z.ZodString>;
|
|
396
|
-
photoUrl: z.ZodOptional<z.ZodString
|
|
396
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
397
397
|
email: z.ZodEmail;
|
|
398
398
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
399
399
|
uid: z.ZodString;
|
|
@@ -447,7 +447,7 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
|
|
|
447
447
|
email: string;
|
|
448
448
|
uid: string;
|
|
449
449
|
lastModified?: number | null | undefined;
|
|
450
|
-
photoUrl?: string | undefined;
|
|
450
|
+
photoUrl?: string | null | undefined;
|
|
451
451
|
phoneNumber?: string | undefined;
|
|
452
452
|
}[] | null;
|
|
453
453
|
/**@returns the roles that are compatible with the selected role. */
|
package/dist/main.js
CHANGED
|
@@ -28,8 +28,8 @@ var PriceAdjustment = z2.object({
|
|
|
28
28
|
var PriceTag = z2.object({
|
|
29
29
|
uid: z2.string(),
|
|
30
30
|
/**The name of the item that's being priced */
|
|
31
|
-
item: z2.string(),
|
|
32
|
-
cost: z2.number(),
|
|
31
|
+
item: z2.string().trim().min(3, "The price item must be atleast (3) characters long.").max(50, "The price item can't be more than (50) characters long."),
|
|
32
|
+
cost: z2.number().min(1, "The minimum allowed cost is $1.00"),
|
|
33
33
|
...TimeLog.shape
|
|
34
34
|
});
|
|
35
35
|
|
|
@@ -104,8 +104,8 @@ var CompanyBillingModel = z4.object({
|
|
|
104
104
|
preferences: z4.object({
|
|
105
105
|
/** Allows the serviceDecider to distribute invoices. */
|
|
106
106
|
allowInvoiceDist: z4.boolean(),
|
|
107
|
-
/** Forces service selectors to select service(s) from the list of services
|
|
108
|
-
|
|
107
|
+
/** Forces service selectors to select service(s) from the created list of services. */
|
|
108
|
+
strictServiceSelection: z4.boolean(),
|
|
109
109
|
/** The user that's allowed to record the client's services. */
|
|
110
110
|
serviceSelector: z4.enum(["scheduler", "doctor"]),
|
|
111
111
|
/** A record of the payments made must be attached before creating the
|
|
@@ -130,7 +130,7 @@ var CompanyBillingModel = z4.object({
|
|
|
130
130
|
...TimeLog.shape
|
|
131
131
|
}).superRefine((billing, ctx) => {
|
|
132
132
|
const totalServices = billing?.services?.length ?? 0;
|
|
133
|
-
if (billing?.preferences?.
|
|
133
|
+
if (billing?.preferences?.strictServiceSelection && totalServices < 1) {
|
|
134
134
|
ctx.addIssue("At least (1) service must be added to the services list.");
|
|
135
135
|
}
|
|
136
136
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bizmap/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"main": "./dist/main.js",
|
|
5
5
|
"types": "./dist/main.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"description": "",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@wavy/util": "^0.0.
|
|
23
|
+
"@wavy/util": "^0.0.9",
|
|
24
24
|
"tsup": "^8.5.0",
|
|
25
25
|
"typescript": "^5.9.2",
|
|
26
26
|
"zod": "^4.2.1"
|