@prismatic-io/spectral 10.2.3 → 10.3.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.
@@ -63,6 +63,8 @@ exports.INPUT_TYPE_MAP = {
63
63
  },
64
64
  dynamicObjectSelection: "string",
65
65
  dynamicFieldSelection: "string",
66
+ date: "string",
67
+ timestamp: "string",
66
68
  };
67
69
  const getInputValueType = (input) => {
68
70
  const inputType = exports.INPUT_TYPE_MAP[input.type];
@@ -71,7 +71,7 @@ export type ConnectionInput = (StringInputField | DataInputField | TextInputFiel
71
71
  export type OnPremConnectionInput = {
72
72
  onPremControlled: true;
73
73
  } & ConnectionInput;
74
- export type InputFieldDefinition = StringInputField | DataInputField | TextInputField | PasswordInputField | BooleanInputField | CodeInputField | ConditionalInputField | ConnectionInputField | ObjectSelectionInputField | ObjectFieldMapInputField | JSONFormInputField | DynamicObjectSelectionInputField | DynamicFieldSelectionInputField;
74
+ export type InputFieldDefinition = StringInputField | DataInputField | TextInputField | PasswordInputField | BooleanInputField | CodeInputField | ConditionalInputField | ConnectionInputField | ObjectSelectionInputField | ObjectFieldMapInputField | JSONFormInputField | DynamicObjectSelectionInputField | DynamicFieldSelectionInputField | DateInputField | DateTimeInputField;
75
75
  export type InputCleanFunction<TValue, TResult = TValue> = (value: TValue) => TResult;
76
76
  interface BaseInputField {
77
77
  /** Interface label of the InputField. */
@@ -247,6 +247,22 @@ export interface DynamicFieldSelectionInputField extends BaseInputField {
247
247
  /** Clean function */
248
248
  clean?: InputCleanFunction<this["default"]>;
249
249
  }
250
+ export type DateInputField = BaseInputField & {
251
+ /** Data type the InputField will collect. */
252
+ type: "date";
253
+ /** Dictates possible choices for the input. */
254
+ model?: InputFieldChoice[];
255
+ /** Clean function */
256
+ clean?: InputCleanFunction<unknown>;
257
+ } & CollectionOptions<string>;
258
+ export type DateTimeInputField = BaseInputField & {
259
+ /** Data type the InputField will collect. */
260
+ type: "timestamp";
261
+ /** Dictates possible choices for the input. */
262
+ model?: InputFieldChoice[];
263
+ /** Clean function */
264
+ clean?: InputCleanFunction<unknown>;
265
+ } & CollectionOptions<string>;
250
266
  /** Defines a single Choice option for a InputField. */
251
267
  export interface InputFieldChoice {
252
268
  /** Label to display for this Choice. */
@@ -258,4 +274,10 @@ export interface InputFieldChoice {
258
274
  export type InputFieldCollection = "valuelist" | "keyvaluelist";
259
275
  /** Config variable result collection */
260
276
  export type ConfigVarResultCollection = Record<string, string | Schedule | Connection | unknown | ObjectSelection | ObjectFieldMap>;
277
+ export type FlowInputField = BaseInputField & {
278
+ /** Data type the InputField will collect. */
279
+ type: "flow";
280
+ /** Clean function */
281
+ clean?: InputCleanFunction<unknown>;
282
+ } & CollectionOptions<string>;
261
283
  export {};
@@ -15,4 +15,6 @@ exports.InputFieldDefaultMap = {
15
15
  jsonForm: undefined,
16
16
  dynamicObjectSelection: "",
17
17
  dynamicFieldSelection: "",
18
+ date: "",
19
+ timestamp: "",
18
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.2.3",
3
+ "version": "10.3.0",
4
4
  "description": "Utility library for building Prismatic components and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",