From 276184b5c9786811dc4159fd7ce659f440bdf149 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Sat, 11 Nov 2023 21:02:06 -0800 Subject: [PATCH] Type response body of messages --- packages/http-server/src/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/http-server/src/types.ts b/packages/http-server/src/types.ts index 5b916d97..75ab35c2 100644 --- a/packages/http-server/src/types.ts +++ b/packages/http-server/src/types.ts @@ -1,5 +1,6 @@ import type { Request, Response } from 'express' import type { Close, MessageKindClass, MessageKindClasses, Offering, Order, OrderStatus, Quote, Rfq } from '@tbdex/protocol' +import type { ErrorDetail } from '@tbdex/http-client' /** * Union type for get requests @@ -89,7 +90,7 @@ export type RequestContext = { * Type alias for the request handler * @beta */ -export type RequestHandler = (request: Request, response: Response) => any +export type RequestHandler = (request: Request, response: Response<{ errors?: ErrorDetail[], data?: any }>) => any /** * PFI Offerings API