@bizmap/sdk 0.0.16 → 0.0.17

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
  });
@@ -146,10 +146,9 @@ var CompanyUser = z4.object({
146
146
  roles: z4.array(companyUserRoles).transform((roles) => {
147
147
  const newRoles = [];
148
148
  for (const role of roles) {
149
- if (!role || typeof role !== "string") continue;
150
- if (!newRoles.includes(role)) newRoles.push(role);
149
+ if (!!role && !newRoles.includes(role)) newRoles.push(role);
151
150
  }
152
- return newRoles;
151
+ return newRoles.sort();
153
152
  }).refine((roles) => {
154
153
  const compatibleRoles = getCompatibleRoles(roles[0]);
155
154
  return roles.every(
@@ -205,20 +204,18 @@ var _staffDetails = z4.object({
205
204
  partners.push(uid);
206
205
  }
207
206
  }
208
- return partners;
207
+ return partners.sort();
209
208
  })
210
209
  ),
211
210
  blackList: z4.array(CompanyUser.shape.uid).transform((list) => {
212
211
  const newList = [];
213
212
  for (const uid of list) {
214
213
  if (!uid || typeof uid !== "string") continue;
215
- if (!newList.some(
216
- (newUid) => newUid.toLowerCase() === uid.toLowerCase()
217
- )) {
214
+ if (!newList.some((newUid) => newUid.toLowerCase() === uid.toLowerCase())) {
218
215
  newList.push(uid);
219
216
  }
220
217
  }
221
- return newList;
218
+ return newList.sort();
222
219
  })
223
220
  // ...TimeLog.shape,
224
221
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",