Do not edit this file. It is a report generated by API Extractor.
/// <reference types="node" />
import * as express from 'express';
// @public
export const cloudevent: (functionName: string, handler: CloudEventFunction) => void;
// @public
export interface CloudEventFunction {
// (undocumented)
(cloudevent: CloudEventsContext): any;
}
// @public
export interface CloudEventFunctionWithCallback {
// (undocumented)
(cloudevent: CloudEventsContext, callback: Function): any;
}
// @public
export interface CloudEventsContext {
data?: Record<string, unknown | string | number | boolean> | string | number | boolean | null | unknown;
datacontenttype?: string;
dataschema?: string;
id?: string;
source?: string;
specversion?: string;
subject?: string;
time?: string;
traceparent?: string;
type?: string;
}
// @public
export interface CloudFunctionsContext {
eventId?: string;
eventType?: string;
resource?: string | {
[key: string]: string;
};
timestamp?: string;
}
// @public
export type Context = CloudFunctionsContext | CloudEventsContext;
// @public
export interface Data {
// (undocumented)
data: object;
}
// @public
export interface EventFunction {
// (undocumented)
(data: {}, context: Context): any;
}
// @public
export interface EventFunctionWithCallback {
// (undocumented)
(data: {}, context: Context, callback: Function): any;
}
// @public
export type HandlerFunction = HttpFunction | EventFunction | EventFunctionWithCallback | CloudEventFunction | CloudEventFunctionWithCallback;
// @public
export const http: (functionName: string, handler: HttpFunction) => void;
// @public
export interface HttpFunction {
// (undocumented)
(req: Request_2, res: Response_2): any;
}
// @public
export type LegacyCloudFunctionsContext = CloudFunctionsContext | Data;
// @public
export interface LegacyEvent {
// (undocumented)
context: CloudFunctionsContext;
// (undocumented)
data: {
[key: string]: any;
};
}
// @public (undocumented)
interface Request_2 extends express.Request {
rawBody?: Buffer;
}
export { Request_2 as Request }
// @public (undocumented)
type Response_2 = express.Response;
export { Response_2 as Response }
// (No @packageDocumentation comment for this package)