@deliverart/sdk-js-company 0.0.4 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @deliverart/sdk-js-company
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 83e0325: Expose company path types
8
+
3
9
  ## 0.0.4
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-company",
3
3
  "description": "Deliverart JavaScript SDK for User Management",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/types.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod'
2
+
3
+ export const companyPathSchema = z
4
+ .string()
5
+ .refine(val => /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
6
+ message: 'Invalid integration path format',
7
+ })
8
+ export type PointOfSalePath = z.infer<typeof companyPathSchema>
9
+
10
+ export const companyNullablePathSchema = z
11
+ .string()
12
+ .nullable()
13
+ .refine(
14
+ val => {
15
+ if (!val) return true
16
+ return /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val)
17
+ },
18
+ {
19
+ message: 'Invalid integration path format',
20
+ },
21
+ )
22
+ export type PointOfSaleNullablePath = z.infer<typeof companyNullablePathSchema>