events-node: update EventParams type
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-events-node': patch
|
||||
---
|
||||
|
||||
The `EventParams` payload must now be a `JsonValue`, and the `metadata` type has been tweaked.
|
||||
@@ -51,7 +51,8 @@
|
||||
"test": "backstage-cli package test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-plugin-api": "workspace:^"
|
||||
"@backstage/backend-plugin-api": "workspace:^",
|
||||
"@backstage/types": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.25.0",
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { JsonValue } from '@backstage/types';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface EventParams<TPayload = unknown> {
|
||||
export interface EventParams<TPayload extends JsonValue = JsonValue> {
|
||||
/**
|
||||
* Topic for which this event should be published.
|
||||
*/
|
||||
@@ -29,5 +31,5 @@ export interface EventParams<TPayload = unknown> {
|
||||
/**
|
||||
* Metadata (e.g., HTTP headers and similar for events received from external).
|
||||
*/
|
||||
metadata?: Record<string, string | string[] | undefined>;
|
||||
metadata?: { [name in string]?: string | string[] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user