@prismatic-io/spectral 8.1.1 → 8.1.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.
@@ -190,6 +190,7 @@ interface ServerPerformDataStructureReturn {
190
190
  data: boolean | number | string | Record<string, unknown> | unknown[] | unknown;
191
191
  contentType?: string;
192
192
  statusCode?: number;
193
+ headers?: Record<string, string>;
193
194
  instanceState?: Record<string, unknown>;
194
195
  crossFlowState?: Record<string, unknown>;
195
196
  executionState?: Record<string, unknown>;
@@ -201,6 +202,7 @@ interface ServerPerformDataReturn {
201
202
  data: Buffer | string | unknown;
202
203
  contentType: string;
203
204
  statusCode?: number;
205
+ headers?: Record<string, string>;
204
206
  instanceState?: Record<string, unknown>;
205
207
  crossFlowState?: Record<string, unknown>;
206
208
  executionState?: Record<string, unknown>;
@@ -2,7 +2,7 @@ import { Inputs, ConfigVarResultCollection, ActionPerformReturn, ActionInputPara
2
2
  /** Definition of the function to perform when an Action is invoked. */
3
3
  export declare type ActionPerformFunction<TInputs extends Inputs, TConfigVars extends ConfigVarResultCollection, TAllowsBranching extends boolean | undefined, TReturn extends ActionPerformReturn<TAllowsBranching, unknown>> = (context: ActionContext<TConfigVars>, params: ActionInputParameters<TInputs>) => Promise<TReturn>;
4
4
  /** Context provided to perform method containing helpers and contextual data */
5
- export declare type ActionContext<TConfigVars extends ConfigVarResultCollection> = {
5
+ export declare type ActionContext<TConfigVars extends ConfigVarResultCollection = ConfigVarResultCollection> = {
6
6
  /** Logger for permanent logging; console calls are also captured */
7
7
  logger: ActionLogger;
8
8
  /** A a flow-specific key/value store that may be used to store small amounts of data that is persisted between Instance executions */
@@ -6,6 +6,8 @@ export interface ActionPerformDataReturn<ReturnData> {
6
6
  contentType?: string;
7
7
  /** The HTTP Status code that will be used if this terminates a synchronous invocation */
8
8
  statusCode?: number;
9
+ /** The HTTP headers that will be sent back if this terminates a synchronous invocation */
10
+ headers?: Record<string, string>;
9
11
  /** An optional object, the keys and values of which will be persisted in the flow-specific instanceState and available for subsequent actions and executions */
10
12
  instanceState?: Record<string, unknown>;
11
13
  /** An optional object, the keys and values of which will be persisted in the crossFlowState and available in any flow for subsequent actions and executions */
@@ -1,5 +1,5 @@
1
1
  import { Inputs, DataSourceResult, DataSourceType, ActionInputParameters, ConfigVarResultCollection, ActionContext } from ".";
2
2
  /** Context provided to perform method containing helpers and contextual data */
3
- export declare type DataSourceContext<TConfigVars extends ConfigVarResultCollection> = Pick<ActionContext<TConfigVars>, "logger" | "customer" | "instance" | "user" | "configVars">;
3
+ export declare type DataSourceContext<TConfigVars extends ConfigVarResultCollection = ConfigVarResultCollection> = Pick<ActionContext<TConfigVars>, "logger" | "customer" | "instance" | "user" | "configVars">;
4
4
  /** Definition of the function to perform when a Data Source is invoked. */
5
5
  export declare type DataSourcePerformFunction<TInputs extends Inputs, TConfigVars extends ConfigVarResultCollection, TDataSourceType extends DataSourceType> = (context: DataSourceContext<TConfigVars>, params: ActionInputParameters<TInputs>) => Promise<DataSourceResult<TDataSourceType>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "8.1.1",
3
+ "version": "8.1.3",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"