@mathrunet/masamune
Version:
Manages packages for the server portion (NodeJS) of the Masamune framework.
40 lines (39 loc) • 1.34 kB
TypeScript
import * as functions from "firebase-functions/v2";
import { FunctionsBase, HttpFunctionsOptions } from "./functions_base";
import * as express from "express";
export { Request } from "firebase-functions/v2/https";
export { Response } from "express";
/**
* Base class for defining Function data for HTTP request execution.
*
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
*/
export declare abstract class RequestProcessFunctionBase extends FunctionsBase {
/**
* Base class for defining Function data for HTTP request execution.
*
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
*/
constructor(options?: HttpFunctionsOptions);
/**
* Specify the actual contents of the process.
*
* 実際の処理の中身を指定します。
*
* @param request
* Request passed to Functions.
*
* Functionsに渡されたRequest。
*
* @param response
* Response passed to Functions.
*
* Functionsに渡されたResponse。
*/
abstract process(request: functions.https.Request, response: express.Response<any>): Promise<void>;
abstract id: string;
data: {
[key: string]: any;
};
build(regions: string[]): Function;
}