@bizmap/sdk 0.0.16 → 0.0.18

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 CHANGED
@@ -30,7 +30,7 @@ declare const CompanyIdentity: z.ZodObject<{
30
30
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
31
31
  uid: z.ZodReadonly<z.ZodString>;
32
32
  displayName: z.ZodString;
33
- logo: z.ZodOptional<z.ZodString>;
33
+ logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
34
  contact: z.ZodObject<{
35
35
  email: z.ZodEmail;
36
36
  phoneNumber: z.ZodOptional<z.ZodString>;
@@ -43,8 +43,8 @@ declare const CompanyIdentity: z.ZodObject<{
43
43
  }>, z.ZodString>;
44
44
  legal: z.ZodObject<{
45
45
  regNo: z.ZodReadonly<z.ZodString>;
46
- trn: z.ZodOptional<z.ZodString>;
47
- gctRegNo: z.ZodOptional<z.ZodString>;
46
+ trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
48
  }, z.core.$strip>;
49
49
  }, z.core.$strip>;
50
50
  type CompanyIdentity = z.infer<typeof CompanyIdentity>;
@@ -305,15 +305,15 @@ declare const CompanyDetails: z.ZodObject<{
305
305
  country: "country";
306
306
  }>, z.ZodString>;
307
307
  displayName: z.ZodString;
308
- logo: z.ZodOptional<z.ZodString>;
308
+ logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
309
309
  contact: z.ZodObject<{
310
310
  email: z.ZodEmail;
311
311
  phoneNumber: z.ZodOptional<z.ZodString>;
312
312
  }, z.core.$strip>;
313
313
  legal: z.ZodObject<{
314
314
  regNo: z.ZodReadonly<z.ZodString>;
315
- trn: z.ZodOptional<z.ZodString>;
316
- gctRegNo: z.ZodOptional<z.ZodString>;
315
+ trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
317
  }, z.core.$strip>;
318
318
  }, z.core.$strip>;
319
319
  opState: z.ZodObject<{
package/dist/main.js CHANGED
@@ -64,7 +64,7 @@ var CompanyIdentity = z4.object({
64
64
  uid: z4.string().readonly(),
65
65
  // The company's uid
66
66
  displayName: z4.string(),
67
- logo: z4.string().optional(),
67
+ logo: z4.string().nullish(),
68
68
  contact: z4.object({
69
69
  email: z4.email(),
70
70
  phoneNumber: PhoneNumber.optional()
@@ -73,8 +73,8 @@ var CompanyIdentity = z4.object({
73
73
  legal: z4.object({
74
74
  regNo: z4.string().readonly(),
75
75
  // The company's registration number
76
- trn: z4.string().optional(),
77
- gctRegNo: z4.string().optional()
76
+ trn: z4.string().nullish(),
77
+ gctRegNo: z4.string().nullish()
78
78
  }),
79
79
  ...TimeLog.shape
80
80
  });
@@ -86,7 +86,10 @@ var CompanyOpState = z4.object({
86
86
  // This can be changed by the company's admin
87
87
  preferences: z4.object({
88
88
  /** The amount of user provisions made for this company */
89
- 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" }),
89
+ userProvisions: z4.number().max(150, { error: "The total user provisions can't exceed 150" }).refine(
90
+ (p) => !(p > 1 && p < 10),
91
+ "The total user provisions must either be 1 or at least 10."
92
+ ),
90
93
  /**
91
94
  * @property RR (Round Robin): Even distribution.
92
95
  * @property LOR (Least Outstanding Requests): Distribute based on availability.
@@ -146,10 +149,9 @@ var CompanyUser = z4.object({
146
149
  roles: z4.array(companyUserRoles).transform((roles) => {
147
150
  const newRoles = [];
148
151
  for (const role of roles) {
149
- if (!role || typeof role !== "string") continue;
150
- if (!newRoles.includes(role)) newRoles.push(role);
152
+ if (!!role && !newRoles.includes(role)) newRoles.push(role);
151
153
  }
152
- return newRoles;
154
+ return newRoles.sort();
153
155
  }).refine((roles) => {
154
156
  const compatibleRoles = getCompatibleRoles(roles[0]);
155
157
  return roles.every(
@@ -205,20 +207,18 @@ var _staffDetails = z4.object({
205
207
  partners.push(uid);
206
208
  }
207
209
  }
208
- return partners;
210
+ return partners.sort();
209
211
  })
210
212
  ),
211
213
  blackList: z4.array(CompanyUser.shape.uid).transform((list) => {
212
214
  const newList = [];
213
215
  for (const uid of list) {
214
216
  if (!uid || typeof uid !== "string") continue;
215
- if (!newList.some(
216
- (newUid) => newUid.toLowerCase() === uid.toLowerCase()
217
- )) {
217
+ if (!newList.some((newUid) => newUid.toLowerCase() === uid.toLowerCase())) {
218
218
  newList.push(uid);
219
219
  }
220
220
  }
221
- return newList;
221
+ return newList.sort();
222
222
  })
223
223
  // ...TimeLog.shape,
224
224
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",