@checkstack/backend-api 0.3.3 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @checkstack/backend-api
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 83557c7: ## Multi-Type Editor Schema Support
8
+
9
+ - Added `editorTypes` support to zod-config for multi-type editor fields
10
+ - Extended schema-utils to handle editor type annotations
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [83557c7]
15
+ - @checkstack/common@0.4.0
16
+ - @checkstack/queue-api@0.1.2
17
+ - @checkstack/signal-common@0.1.2
18
+
3
19
  ## 0.3.3
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/backend-api",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
@@ -64,6 +64,9 @@ function addSchemaMetadata(
64
64
  if (meta["x-secret"]) jsonField["x-secret"] = true;
65
65
  if (meta["x-color"]) jsonField["x-color"] = true;
66
66
  if (meta["x-hidden"]) jsonField["x-hidden"] = true;
67
+ if (meta["x-editor-types"]) {
68
+ jsonField["x-editor-types"] = meta["x-editor-types"];
69
+ }
67
70
  if (meta["x-options-resolver"]) {
68
71
  jsonField["x-options-resolver"] = meta["x-options-resolver"];
69
72
  if (meta["x-depends-on"])
package/src/zod-config.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { z } from "zod";
2
2
 
3
- // ============================================================================
4
- // CONFIG REGISTRY - Typed metadata for configuration schemas
5
- // ============================================================================
3
+ import type { EditorType } from "@checkstack/common";
4
+
5
+ // Re-export for local consumers
6
+ export type { EditorType } from "@checkstack/common";
6
7
 
7
8
  /**
8
9
  * Metadata type for configuration schemas.
@@ -21,6 +22,15 @@ export interface ConfigMeta {
21
22
  "x-depends-on"?: string[];
22
23
  /** If true, renders a searchable/filterable dropdown */
23
24
  "x-searchable"?: boolean;
25
+ /**
26
+ * Available editor types for this field. Renders a dropdown to select editor mode.
27
+ * When templateProperties are provided to DynamicForm, autocomplete works in all types.
28
+ * - "none": Field is disabled/empty
29
+ * - "raw": Multi-line textarea
30
+ * - "json": CodeEditor with JSON syntax highlighting
31
+ * - "formdata": Key/value pair editor (URL-encoded)
32
+ */
33
+ "x-editor-types"?: EditorType[];
24
34
  }
25
35
 
26
36
  /**
@@ -90,7 +100,7 @@ export function isHiddenSchema(schema: z.ZodTypeAny): boolean {
90
100
  * Get options resolver metadata for a schema.
91
101
  */
92
102
  export function getOptionsResolverMetadata(
93
- schema: z.ZodTypeAny
103
+ schema: z.ZodTypeAny,
94
104
  ):
95
105
  | { resolver: string; dependsOn?: string[]; searchable?: boolean }
96
106
  | undefined {