From f9d097ddde1e565e5388f4fdca441bfb9c11dbee Mon Sep 17 00:00:00 2001 From: pattra Date: Wed, 11 Dec 2024 16:49:31 -0500 Subject: [PATCH] Additional cross-flow invoke headers (#296) --- packages/spectral/package.json | 2 +- packages/spectral/src/serverTypes/perform.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/spectral/package.json b/packages/spectral/package.json index b18a91e..52ba0c0 100644 --- a/packages/spectral/package.json +++ b/packages/spectral/package.json @@ -1,6 +1,6 @@ { "name": "@prismatic-io/spectral", - "version": "10.3.4", + "version": "10.3.5", "description": "Utility library for building Prismatic connectors and code-native integrations", "keywords": ["prismatic"], "main": "dist/index.js", diff --git a/packages/spectral/src/serverTypes/perform.ts b/packages/spectral/src/serverTypes/perform.ts index 8290791..2ef9036 100644 --- a/packages/spectral/src/serverTypes/perform.ts +++ b/packages/spectral/src/serverTypes/perform.ts @@ -64,8 +64,14 @@ export const createInvokeFlow = >( ...config, headers: { ...(config?.headers ?? {}), + ...(context.webhookApiKeys[flowName]?.length > 0 + ? { + "Api-Key": context.webhookApiKeys[flowName][0], + } + : {}), "prismatic-invoked-by": formatExecutionFrameHeaders(context.executionFrame, sourceToUse), "prismatic-invoke-type": "Cross Flow", + "prismatic-executionid": context.executionId, }, }); };