@bizmap/sdk 0.0.76 → 0.0.77
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.js +5 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -111,14 +111,13 @@ var Receipts = z6.array(
|
|
|
111
111
|
|
|
112
112
|
// src/schemas/company/components/State.ts
|
|
113
113
|
import * as z7 from "zod";
|
|
114
|
+
import { upperFirst } from "@wavy/fn";
|
|
114
115
|
var CompanyState = z7.object({
|
|
115
116
|
_id: z7.string().toLowerCase().trim().min(3).max(63).transform((data) => data.replace(/-+/g, "-").replace(/\s+/g, "")).superRefine((data, ctx) => {
|
|
116
|
-
const getTemplate = (subject) =>
|
|
117
|
+
const getTemplate = (subject) => `${upperFirst(subject)} character must be a letter.`;
|
|
117
118
|
const invalidCharIdx = data.search(/[^a-z1-9\-]/);
|
|
118
119
|
if (invalidCharIdx >= 0) {
|
|
119
|
-
ctx.addIssue(
|
|
120
|
-
`Invalid format: expected character to either be a "-" or a character between a-z or 1-9, but received " ${data[invalidCharIdx]} ".`
|
|
121
|
-
);
|
|
120
|
+
ctx.addIssue(`(${data[invalidCharIdx]}) is not an allowed character.`);
|
|
122
121
|
}
|
|
123
122
|
if (!/[a-z]/.test(data[0])) {
|
|
124
123
|
ctx.addIssue(getTemplate("first"));
|
|
@@ -388,7 +387,7 @@ import * as z15 from "zod";
|
|
|
388
387
|
import * as z14 from "zod";
|
|
389
388
|
|
|
390
389
|
// src/functions/helper-functions.ts
|
|
391
|
-
import { upperFirst } from "@wavy/fn";
|
|
390
|
+
import { upperFirst as upperFirst2 } from "@wavy/fn";
|
|
392
391
|
var findConflictingPartners = (...partners) => {
|
|
393
392
|
let hasSingleDoctor = false;
|
|
394
393
|
const conflicts = [];
|
|
@@ -419,7 +418,7 @@ var getCompatibleRoles = (role) => {
|
|
|
419
418
|
return companyUserRoles.exclude([role]).options;
|
|
420
419
|
};
|
|
421
420
|
var normalizeCompanyId = (id) => {
|
|
422
|
-
return id.split("-").map((value) =>
|
|
421
|
+
return id.split("-").map((value) => upperFirst2(value.toLowerCase())).join(" ");
|
|
423
422
|
};
|
|
424
423
|
|
|
425
424
|
// src/schemas/profiles/User.ts
|