@prismatic-io/spectral 7.0.4-pre → 7.0.7-pre

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.
@@ -14,4 +14,6 @@ export interface DataSourceDefinition<TInputs extends Inputs, TDataSourceResult
14
14
  inputs: TInputs;
15
15
  /** An example of the payload outputted by this Data Source. */
16
16
  examplePayload?: Awaited<ReturnType<this["perform"]>>;
17
+ /** Specifies the name of a Data Source in this Component which can provide additional details about the content for this Data Source, such as example values when selecting particular API object fields. */
18
+ detailDataSource?: string;
17
19
  }
@@ -1,14 +1,16 @@
1
1
  /// <reference types="node" />
2
- import { ObjectSelection, ObjectFieldMap, InputFieldDefaultMap, JSONForm } from "./Inputs";
2
+ import { ObjectSelection, ObjectFieldMap, JSONForm } from "./Inputs";
3
3
  /** The type of field that is appropriate for rendering the data that is the result of the data source perform function. */
4
- export declare type DataSourceResultFieldType = keyof typeof InputFieldDefaultMap;
4
+ export declare type DataSourceResultFieldType = "string" | "date" | "timestamp" | "picklist" | "schedule" | "code" | "credential" | "boolean" | "number" | "connection" | "objectSelection" | "objectFieldMap" | "jsonForm";
5
5
  /** The actual data type of the data that is the result of the data source perform function. */
6
6
  export declare type DataSourceResultType = ObjectSelection | ObjectFieldMap | JSONForm | Buffer | boolean | number | string | Record<string, unknown> | unknown[] | unknown;
7
7
  /** Represents the result of a Data Source action. */
8
8
  export declare type DataSourceResult<TDataSourceResultType> = {
9
9
  /** The resulting data that is returned from the data source. */
10
10
  result: TDataSourceResultType;
11
- /** Additional data that may be useful for out-of-band processing at a later time. */
11
+ /** Additional data that may be useful for out-of-band processing at a later time.
12
+ * NOTE: This is only available when the Data Source is called as part of fetching
13
+ * contents for a Configuration Wizard Page. */
12
14
  supplementalData?: {
13
15
  data: unknown;
14
16
  contentType: string;
@@ -2,6 +2,7 @@ import { ConditionalExpression } from "./conditional-logic";
2
2
  export declare type ObjectSelection = {
3
3
  key: string;
4
4
  label?: string;
5
+ selected?: boolean;
5
6
  fields: {
6
7
  key: string;
7
8
  label?: string;
@@ -16,6 +17,10 @@ export declare type ObjectFieldMap = {
16
17
  fieldKey: string;
17
18
  fieldLabel?: string;
18
19
  };
20
+ defaultValue?: {
21
+ objectKey: string;
22
+ fieldKey: string;
23
+ };
19
24
  }[];
20
25
  export declare type JSONForm = {
21
26
  schema: Record<string, unknown>;
@@ -158,7 +163,7 @@ export interface Connection {
158
163
  /** Defines attributes of an ObjectSelectionInputField. */
159
164
  export interface ObjectSelectionInputField extends BaseInputField {
160
165
  /** Data type the InputField will collect. */
161
- type: "objectselection";
166
+ type: "objectSelection";
162
167
  /** Collection type of the InputField */
163
168
  collection?: InputFieldCollection;
164
169
  /** Default value for this field. */
@@ -169,7 +174,7 @@ export interface ObjectSelectionInputField extends BaseInputField {
169
174
  /** Defines attributes of an ObjectFieldMapInputField. */
170
175
  export interface ObjectFieldMapInputField extends BaseInputField {
171
176
  /** Data type the InputField will collect. */
172
- type: "objectfieldmap";
177
+ type: "objectFieldMap";
173
178
  /** Collection type of the InputField */
174
179
  collection?: InputFieldCollection;
175
180
  /** Default value for this field. */
@@ -177,10 +182,10 @@ export interface ObjectFieldMapInputField extends BaseInputField {
177
182
  /** Clean function */
178
183
  clean?: InputCleanFunction<NonNullable<this["default"]>>;
179
184
  }
180
- /** Defines attributes of a JSONFOrmInputField. */
185
+ /** Defines attributes of a JSONFormInputField. */
181
186
  export interface JSONFormInputField extends BaseInputField {
182
187
  /** Data type the InputField will collect. */
183
- type: "jsonform";
188
+ type: "jsonForm";
184
189
  /** Collection type of the InputField */
185
190
  collection?: InputFieldCollection;
186
191
  /** Default value for this field. */
@@ -10,7 +10,7 @@ exports.InputFieldDefaultMap = {
10
10
  code: "",
11
11
  conditional: undefined,
12
12
  connection: undefined,
13
- objectselection: undefined,
14
- objectfieldmap: undefined,
15
- jsonform: undefined,
13
+ objectSelection: undefined,
14
+ objectFieldMap: undefined,
15
+ jsonForm: undefined,
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "7.0.4-pre",
3
+ "version": "7.0.7-pre",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"