@checkstack/backend-api 0.3.2 → 0.3.3

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,24 @@
1
1
  # @checkstack/backend-api
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d94121b: Add group-to-role mapping for SAML and LDAP authentication
8
+
9
+ **Features:**
10
+
11
+ - SAML and LDAP users can now be automatically assigned Checkstack roles based on their directory group memberships
12
+ - Configure group mappings in the authentication strategy settings with dynamic role dropdowns
13
+ - Managed role sync: roles configured in mappings are fully synchronized (added when user gains group, removed when user leaves group)
14
+ - Unmanaged roles (manually assigned, not in any mapping) are preserved during sync
15
+ - Optional default role for all users from a directory
16
+
17
+ **Bug Fix:**
18
+
19
+ - Fixed `x-options-resolver` not working for fields inside arrays with `.default([])` in DynamicForm schemas
20
+ - @checkstack/queue-api@0.1.1
21
+
3
22
  ## 0.3.2
4
23
 
5
24
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/backend-api",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ import { getConfigMeta } from "./zod-config";
9
9
  */
10
10
  function addSchemaMetadata(
11
11
  zodSchema: z.ZodTypeAny,
12
- jsonSchema: Record<string, unknown>
12
+ jsonSchema: Record<string, unknown>,
13
13
  ): void {
14
14
  // Handle arrays - recurse into items
15
15
  if (zodSchema instanceof z.ZodArray) {
@@ -28,6 +28,20 @@ function addSchemaMetadata(
28
28
  return;
29
29
  }
30
30
 
31
+ // Handle default - unwrap and recurse
32
+ if (zodSchema instanceof z.ZodDefault) {
33
+ const innerSchema = zodSchema.def.innerType as z.ZodTypeAny;
34
+ addSchemaMetadata(innerSchema, jsonSchema);
35
+ return;
36
+ }
37
+
38
+ // Handle nullable - unwrap and recurse
39
+ if (zodSchema instanceof z.ZodNullable) {
40
+ const innerSchema = zodSchema.unwrap() as z.ZodTypeAny;
41
+ addSchemaMetadata(innerSchema, jsonSchema);
42
+ return;
43
+ }
44
+
31
45
  // Type guard to check if this is an object schema
32
46
  if (!("shape" in zodSchema)) return;
33
47