@diagonal-hq/cli 0.42.5 → 0.42.7

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.
@@ -1,7 +1,7 @@
1
1
  import type { ResourceKeyWith } from '../data';
2
2
  import type { ContentDocument } from '../input';
3
3
  import type { DeepReadonly, Liquid, StaticLiquid } from '../liquid';
4
- export declare const SDK_VERSION = 82;
4
+ export declare const SDK_VERSION = 83;
5
5
  export interface WorkspaceSystemFields {
6
6
  "ai_custom_system_prompt": string | null;
7
7
  "brand_kit": {
@@ -7,7 +7,7 @@ export type { Liquid, declaredInput } from './liquid';
7
7
  export { data } from './data';
8
8
  export { mail, notification, sms } from './notifications';
9
9
  export { workspace } from './workspace-values';
10
- export { InputField, InputSchema, v, type ContentDocument, type ContentNode, type ContentOptions, type FileVisibility, type Infer, type InferInput, type InputFieldKind, type InputFieldSpec, type InputShape, type Money, type RecordScope } from './input';
10
+ export { InputField, InputSchema, v, type ContentDocument, type ContentNode, type ContentOptions, type FileVisibility, type Infer, type InferInput, type InputFieldKind, type InputFieldSpec, type InputShape, type Money, type RecordScope, type RequestLocation, type RequestSource } from './input';
11
11
  export { defineWorkflow, parseWorkflowInput, redirect, respond, validateWorkflowInput, type Identity, type InputErrors, type InputValidator, type RequestContext, type ScriptExecution, type WorkflowContext, type WorkflowDefinition, type WorkflowExecution } from './workflow';
12
12
  export * from './generated/capabilities';
13
13
  /** The embedding host selects its execution context through its supplied declarations. */
@@ -29,6 +29,19 @@ export interface InputFieldSpec {
29
29
  readonly visibility?: FileVisibility;
30
30
  /** `content`: the formatting the document may use. */
31
31
  readonly content?: ContentOptions;
32
+ /** A top-level field of a Request workflow: the part of the request that holds the value. */
33
+ readonly from?: RequestSource;
34
+ }
35
+ /**
36
+ * The part of the request that a field of a Request workflow reads. `body` is the default: the
37
+ * request input under the field key, with the query string values added. `header` reads the header
38
+ * `key`, or the field key, in any letter case. `path` reads the route parameter of the field key.
39
+ */
40
+ export type RequestLocation = 'body' | 'header' | 'path';
41
+ export interface RequestSource {
42
+ readonly location: RequestLocation;
43
+ /** `header`: the header name, when it is not the field key. */
44
+ readonly key?: string;
32
45
  }
33
46
  /**
34
47
  * A money value as the platform stores it. It is a type alias, not an interface, so that it is
@@ -93,6 +106,13 @@ export declare class InputField<T, O extends boolean = false> {
93
106
  rule(rule: string): InputField<T, O>;
94
107
  label(label: string): InputField<T, O>;
95
108
  description(description: string): InputField<T, O>;
109
+ /**
110
+ * The part of the request that holds the value, on a top-level field of a Request workflow:
111
+ * `from('header', 'X-Signature')` or `from('path')`. A path field has the name of its route
112
+ * parameter.
113
+ */
114
+ from(location: 'header', key?: string): InputField<T, O>;
115
+ from(location: 'body' | 'path'): InputField<T, O>;
96
116
  }
97
117
  export type InputShape = Record<string, InputField<unknown, boolean>>;
98
118
  type Simplify<T> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.42.5",
3
+ "version": "0.42.7",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -51,8 +51,8 @@
51
51
  "bun": "1.4.4"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-h1dd92aff7825",
55
- "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-h1dd92aff7825",
56
- "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-h1dd92aff7825"
54
+ "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-h407f7bfa6c17",
55
+ "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-h407f7bfa6c17",
56
+ "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-h407f7bfa6c17"
57
57
  }
58
58
  }