@bizmap/sdk 0.0.90 → 0.0.91

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.
Files changed (2) hide show
  1. package/dist/main.js +7 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -726,11 +726,17 @@ var ClientIdentity = UserDetails.pick({
726
726
  // Hash this value
727
727
  value: z20.string().max(20)
728
728
  }).superRefine((data, ctx) => {
729
+ const invalidCharIdx = data.value.search(/[^a-z0-9]/i);
729
730
  if (data.class === "trn") {
730
731
  const parsedData = Trn.safeParse(data.value);
731
732
  if (!parsedData.success) {
732
- ctx.addIssue(parsedData.error.message);
733
+ ctx.addIssue(
734
+ parsedData.error?.issues?.[0]?.message || parsedData.error.message
735
+ );
733
736
  }
737
+ } else if (invalidCharIdx >= 0) {
738
+ const char = data.value[invalidCharIdx] === '"' ? `(${data.value[invalidCharIdx]})` : `"${data.value[invalidCharIdx]}"`;
739
+ ctx.addIssue(`${char} is not an allowed character.`);
734
740
  }
735
741
  }).optional(),
736
742
  // Don't hash the attributes, they can be used to help accurately identify a client by whoever is searching for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.90",
3
+ "version": "0.0.91",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",