@prismatic-io/spectral 10.3.3 → 10.3.5

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.
@@ -65,6 +65,7 @@ exports.INPUT_TYPE_MAP = {
65
65
  dynamicFieldSelection: "string",
66
66
  date: "string",
67
67
  timestamp: "string",
68
+ flow: "string",
68
69
  };
69
70
  const getInputValueType = (input) => {
70
71
  const inputType = exports.INPUT_TYPE_MAP[input.type];
@@ -44,9 +44,13 @@ function formatExecutionFrameHeaders(frame, source) {
44
44
  }
45
45
  const createInvokeFlow = (context, options = {}) => {
46
46
  return (flowName, data, config, source) => __awaiter(void 0, void 0, void 0, function* () {
47
- var _a;
47
+ var _a, _b;
48
48
  const sourceToUse = options.isCNI ? source : undefined;
49
- return yield axios_1.default.post(context.webhookUrls[flowName], data, Object.assign(Object.assign({}, config), { headers: Object.assign(Object.assign({}, ((_a = config === null || config === void 0 ? void 0 : config.headers) !== null && _a !== void 0 ? _a : {})), { "prismatic-invoked-by": formatExecutionFrameHeaders(context.executionFrame, sourceToUse), "prismatic-invoke-type": "Cross Flow" }) }));
49
+ return yield axios_1.default.post(context.webhookUrls[flowName], data, Object.assign(Object.assign({}, config), { headers: Object.assign(Object.assign(Object.assign({}, ((_a = config === null || config === void 0 ? void 0 : config.headers) !== null && _a !== void 0 ? _a : {})), (((_b = context.webhookApiKeys[flowName]) === null || _b === void 0 ? void 0 : _b.length) > 0
50
+ ? {
51
+ "Api-Key": context.webhookApiKeys[flowName][0],
52
+ }
53
+ : {})), { "prismatic-invoked-by": formatExecutionFrameHeaders(context.executionFrame, sourceToUse), "prismatic-invoke-type": "Cross Flow", "prismatic-executionid": context.executionId }) }));
50
54
  });
51
55
  };
52
56
  exports.createInvokeFlow = createInvokeFlow;
@@ -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 | DateInputField | DateTimeInputField;
74
+ export type InputFieldDefinition = StringInputField | DataInputField | TextInputField | PasswordInputField | BooleanInputField | CodeInputField | ConditionalInputField | ConnectionInputField | ObjectSelectionInputField | ObjectFieldMapInputField | JSONFormInputField | DynamicObjectSelectionInputField | DynamicFieldSelectionInputField | DateInputField | DateTimeInputField | FlowInputField;
75
75
  export type InputCleanFunction<TValue, TResult = TValue> = (value: TValue) => TResult;
76
76
  interface BaseInputField {
77
77
  /** Interface label of the InputField. */
@@ -17,4 +17,5 @@ exports.InputFieldDefaultMap = {
17
17
  dynamicFieldSelection: "",
18
18
  date: "",
19
19
  timestamp: "",
20
+ flow: "",
20
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.3.3",
3
+ "version": "10.3.5",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",