@clipboard-health/contract-core 1.8.0 → 2.0.0

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/README.md +6 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -141,8 +141,8 @@ console.log(undefinedStatus);
141
141
  // Ideal for user types, authentication, and critical business logic.
142
142
 
143
143
  /* -- required strict -- */
144
- const requiredUserTypeSchema = requiredEnum(["admin", "worker", "facility"]);
145
- // type RequiredUserType = "admin" | "worker" | "facility"
144
+ const requiredUserTypeSchema = requiredEnum(["admin", "worker", "workplace"]);
145
+ // type RequiredUserType = "admin" | "worker" | "workplace"
146
146
  type RequiredUserType = z.infer<typeof requiredUserTypeSchema>;
147
147
 
148
148
  const adminUser: RequiredUserType = requiredUserTypeSchema.parse("admin");
@@ -153,7 +153,7 @@ try {
153
153
  requiredUserTypeSchema.parse("invalid");
154
154
  } catch (error) {
155
155
  logError(error);
156
- // => Invalid enum value. Expected 'admin' | 'worker' | 'facility', received 'invalid'
156
+ // => Invalid enum value. Expected 'admin' | 'worker' | 'workplace', received 'invalid'
157
157
  }
158
158
 
159
159
  try {
@@ -165,8 +165,8 @@ try {
165
165
  }
166
166
 
167
167
  /* -- optional strict -- */
168
- const optionalUserTypeSchema = optionalEnum(["admin", "worker", "facility"]);
169
- // type OptionalUserType = "admin" | "worker" | "facility" | undefined
168
+ const optionalUserTypeSchema = optionalEnum(["admin", "worker", "workplace"]);
169
+ // type OptionalUserType = "admin" | "worker" | "workplace" | undefined
170
170
  type OptionalUserType = z.infer<typeof optionalUserTypeSchema>;
171
171
 
172
172
  const workerUser: OptionalUserType = optionalUserTypeSchema.parse("worker");
@@ -182,7 +182,7 @@ try {
182
182
  optionalUserTypeSchema.parse("invalid");
183
183
  } catch (error) {
184
184
  logError(error);
185
- // => Invalid enum value. Expected 'admin' | 'worker' | 'facility', received 'invalid'
185
+ // => Invalid enum value. Expected 'admin' | 'worker' | 'workplace', received 'invalid'
186
186
  }
187
187
  ```
188
188
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@clipboard-health/contract-core",
3
3
  "description": "Shared Zod schemas for Clipboard's contracts.",
4
- "version": "1.8.0",
4
+ "version": "2.0.0",
5
5
  "bugs": "https://github.com/ClipboardHealth/core-utils/issues",
6
6
  "dependencies": {
7
7
  "tslib": "2.8.1"
8
8
  },
9
9
  "devDependencies": {
10
- "@clipboard-health/testing-core": "1.8.0",
10
+ "@clipboard-health/testing-core": "2.0.0",
11
11
  "zod": "3.25.76"
12
12
  },
13
13
  "keywords": [