@sentry/google-cloud-serverless
Version:
Official Sentry SDK for Google Cloud Functions
38 lines • 1.09 kB
TypeScript
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;
type?: string;
specversion?: string;
source?: string;
id?: 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