UNPKG

@unito/integration-sdk

Version:

Integration SDK

17 lines (16 loc) 773 B
import { Request, Response, NextFunction } from 'express'; import { OperationDeadline } from '../resources/operationDeadline.js'; declare global { namespace Express { interface Locals { /** * An AbortSignal instantiated with the X-Unito-Operation-Deadline header. This header contains the timestamp * after which Unito will consider the operation to be timed out. You can use this signal to abort any * operation that would exceed this time frame. It also carries `operationDeadline` (epoch ms). */ deadline: OperationDeadline; } } } declare function extractOperationDeadline(req: Request, res: Response, next: NextFunction): void; export default extractOperationDeadline;