@bizmap/sdk 0.0.75 → 0.0.76
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 -0
- package/dist/main.js +22 -5
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1044,6 +1044,8 @@ declare const UserDetails: z.ZodObject<{
|
|
|
1044
1044
|
}, z.core.$strip>;
|
|
1045
1045
|
createdAt: z.ZodInt;
|
|
1046
1046
|
}, z.core.$strip>>;
|
|
1047
|
+
companyUids: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
1048
|
+
resumeToken: z.ZodOptional<z.ZodUUID>;
|
|
1047
1049
|
}, z.core.$strip>;
|
|
1048
1050
|
type UserDetails = z.infer<typeof UserDetails>;
|
|
1049
1051
|
|
|
@@ -1055,6 +1057,8 @@ declare const ClientIdentity: z.ZodObject<{
|
|
|
1055
1057
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1056
1058
|
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1057
1059
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1060
|
+
companyUids: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
1061
|
+
resumeToken: z.ZodOptional<z.ZodUUID>;
|
|
1058
1062
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1059
1063
|
dob: z.ZodOptional<z.ZodInt>;
|
|
1060
1064
|
address: z.ZodOptional<z.ZodObject<{
|
|
@@ -1372,6 +1376,8 @@ declare const AppointmentDetails: z.ZodObject<{
|
|
|
1372
1376
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1373
1377
|
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1374
1378
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1379
|
+
companyUids: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
1380
|
+
resumeToken: z.ZodOptional<z.ZodUUID>;
|
|
1375
1381
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1376
1382
|
dob: z.ZodOptional<z.ZodInt>;
|
|
1377
1383
|
address: z.ZodOptional<z.ZodObject<{
|
|
@@ -1539,6 +1545,8 @@ declare const MutableAppointmentDetails: z.ZodObject<{
|
|
|
1539
1545
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
1540
1546
|
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1541
1547
|
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1548
|
+
companyUids: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
1549
|
+
resumeToken: z.ZodOptional<z.ZodUUID>;
|
|
1542
1550
|
email: z.ZodOptional<z.ZodEmail>;
|
|
1543
1551
|
dob: z.ZodOptional<z.ZodInt>;
|
|
1544
1552
|
address: z.ZodOptional<z.ZodObject<{
|
|
@@ -1741,6 +1749,8 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
|
|
|
1741
1749
|
lastModified?: number | null | undefined;
|
|
1742
1750
|
phoneNumber?: string | undefined;
|
|
1743
1751
|
photoUrl?: string | null | undefined;
|
|
1752
|
+
companyUids?: string[] | undefined;
|
|
1753
|
+
resumeToken?: string | undefined;
|
|
1744
1754
|
email?: string | undefined;
|
|
1745
1755
|
dob?: number | undefined;
|
|
1746
1756
|
address?: {
|
package/dist/main.js
CHANGED
|
@@ -112,12 +112,20 @@ var Receipts = z6.array(
|
|
|
112
112
|
// src/schemas/company/components/State.ts
|
|
113
113
|
import * as z7 from "zod";
|
|
114
114
|
var CompanyState = z7.object({
|
|
115
|
-
_id: z7.string().toLowerCase().trim().min(3).max(63).
|
|
116
|
-
|
|
115
|
+
_id: z7.string().toLowerCase().trim().min(3).max(63).transform((data) => data.replace(/-+/g, "-").replace(/\s+/g, "")).superRefine((data, ctx) => {
|
|
116
|
+
const getTemplate = (subject) => `Invalid format: expected ${subject} character to be a letter.`;
|
|
117
|
+
const invalidCharIdx = data.search(/[^a-z1-9\-]/);
|
|
118
|
+
if (invalidCharIdx >= 0) {
|
|
117
119
|
ctx.addIssue(
|
|
118
|
-
|
|
120
|
+
`Invalid format: expected character to either be a "-" or a character between a-z or 1-9, but received " ${data[invalidCharIdx]} ".`
|
|
119
121
|
);
|
|
120
122
|
}
|
|
123
|
+
if (!/[a-z]/.test(data[0])) {
|
|
124
|
+
ctx.addIssue(getTemplate("first"));
|
|
125
|
+
}
|
|
126
|
+
if (!/[a-z]/.test(data[data.length - 1])) {
|
|
127
|
+
ctx.addIssue(getTemplate("last"));
|
|
128
|
+
}
|
|
121
129
|
}),
|
|
122
130
|
credits: z7.object({
|
|
123
131
|
current: z7.number(),
|
|
@@ -188,9 +196,16 @@ import * as z9 from "zod";
|
|
|
188
196
|
import { Address, PhoneNumber } from "@wavy/util";
|
|
189
197
|
var CompanyIdentity = z9.object({
|
|
190
198
|
_id: CompanyState.shape._id,
|
|
191
|
-
alias: z9.string().trim().min(3).max(63).
|
|
199
|
+
alias: z9.string().trim().min(3).max(63).transform(
|
|
192
200
|
(data) => data.replace(/[^a-z1-9 ]/gi, "").replace(/\s+/g, " ")
|
|
193
|
-
),
|
|
201
|
+
).superRefine((data, ctx) => {
|
|
202
|
+
const invalidCharIdx = data.search(/[^a-z1-9 ]/i);
|
|
203
|
+
if (invalidCharIdx >= 0) {
|
|
204
|
+
ctx.addIssue(
|
|
205
|
+
`Invalid format: expected a character between a-z or 1-9, but received " ${data[invalidCharIdx]} ".`
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
}),
|
|
194
209
|
address: Address.optional(),
|
|
195
210
|
logo: z9.string().nullish(),
|
|
196
211
|
type: companyTypes.readonly(),
|
|
@@ -431,6 +446,8 @@ var UserDetails = z13.object({
|
|
|
431
446
|
publicKey: z13.string().nullable(),
|
|
432
447
|
notifications: z13.array(Notification),
|
|
433
448
|
version: Version,
|
|
449
|
+
companyUids: z13.array(CompanyState.shape._id).min(1).optional(),
|
|
450
|
+
resumeToken: z13.uuidv4().optional(),
|
|
434
451
|
...TimeLog.shape
|
|
435
452
|
}).omit({ uid: true });
|
|
436
453
|
|