feat(events-backend,events-node): improve parser interface
Signed-off-by: Rogerio Angeliski <angeliski@hotmail.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@types/express": "^4.17.6",
|
||||
"content-type": "^1.0.5",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"express": "^4.17.1",
|
||||
"uri-template": "^2.0.0"
|
||||
|
||||
@@ -9,6 +9,7 @@ import { AuthService } from '@backstage/backend-plugin-api';
|
||||
import { DiscoveryService } from '@backstage/backend-plugin-api';
|
||||
import { LifecycleService } from '@backstage/backend-plugin-api';
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { ParsedMediaType } from 'content-type';
|
||||
import { Request as Request_2 } from 'express';
|
||||
import { RootConfigService } from '@backstage/backend-plugin-api';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
@@ -122,6 +123,7 @@ export type HttpBodyParsed = {
|
||||
// @public (undocumented)
|
||||
export type HttpBodyParser = (
|
||||
request: Request_2,
|
||||
parsedMediaType: ParsedMediaType,
|
||||
topic: string,
|
||||
) => Promise<HttpBodyParsed>;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Request } from 'express';
|
||||
import { ParsedMediaType } from 'content-type';
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -29,5 +30,6 @@ export type HttpBodyParsed = {
|
||||
*/
|
||||
export type HttpBodyParser = (
|
||||
request: Request,
|
||||
parsedMediaType: ParsedMediaType,
|
||||
topic: string,
|
||||
) => Promise<HttpBodyParsed>;
|
||||
|
||||
Reference in New Issue
Block a user