UNPKG

@sentry/google-cloud-serverless

Version:
38 lines • 1.08 kB
import type { Request, Response } from 'express'; export interface HttpFunction { (req: Request, res: Response): any; } export interface EventFunction { (data: Record<string, any>, context: Context): any; } export interface EventFunctionWithCallback { (data: Record<string, any>, context: Context, callback: Function): any; } export interface CloudEventFunction { (cloudevent: CloudEventsContext): any; } export interface CloudEventFunctionWithCallback { (cloudevent: CloudEventsContext, callback: Function): any; } export interface CloudFunctionsContext { eventId?: string; timestamp?: string; eventType?: string; resource?: string; } export interface CloudEventsContext { [key: string]: any; id: string; specversion: string; type: string; source: string; time?: string; schemaurl?: string; contenttype?: string; } export type Context = CloudFunctionsContext | CloudEventsContext; export interface WrapperOptions { flushTimeout: number; } export type { Request, Response }; //# sourceMappingURL=general.d.ts.map