https.CallableFunction interface
Stay organized with collections
Save and categorize content based on your preferences.
Creates a callable method for clients to call using a Firebase SDK.
Signature:
export interface CallableFunction<T, Return, Stream = unknown> extends HttpsFunction
Extends: HttpsFunction
Methods
https.CallableFunction.run()
Executes the handler function with the provided data as input. Used for unit testing.
Signature:
run(request: CallableRequest<T>): Return;
Parameters
Returns:
Return
The output of the handler function.
https.CallableFunction.stream()
Signature:
stream(request: CallableRequest<T>, response: CallableResponse<Stream>): {
stream: AsyncIterable<Stream>;
output: Return;
};
Parameters
Returns:
{ stream: AsyncIterable<Stream>; output: Return; }
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-14 UTC.
[null,null,["Last updated 2025-02-14 UTC."],[],[],null,["# https.CallableFunction interface\n\nCreates a callable method for clients to call using a Firebase SDK.\n\n**Signature:** \n\n export interface CallableFunction\u003cT, Return, Stream = unknown\u003e extends HttpsFunction \n\n**Extends:** [HttpsFunction](./firebase-functions.https.md#httpshttpsfunction)\n\nMethods\n-------\n\n| Method | Description |\n|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [run(request)](./firebase-functions.https.callablefunction.md#httpscallablefunctionrun) | Executes the handler function with the provided data as input. Used for unit testing. |\n| [stream(request, response)](./firebase-functions.https.callablefunction.md#httpscallablefunctionstream) | |\n\nhttps.CallableFunction.run()\n----------------------------\n\nExecutes the handler function with the provided data as input. Used for unit testing.\n\n**Signature:** \n\n run(request: CallableRequest\u003cT\u003e): Return;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|------------------------------------------------------------------------------------------------------|-------------|\n| request | [CallableRequest](./firebase-functions.https.callablerequest.md#httpscallablerequest_interface)\\\u003cT\\\u003e | |\n\n**Returns:**\n\nReturn\n\nThe output of the handler function.\n\nhttps.CallableFunction.stream()\n-------------------------------\n\n**Signature:** \n\n stream(request: CallableRequest\u003cT\u003e, response: CallableResponse\u003cStream\u003e): {\n stream: AsyncIterable\u003cStream\u003e;\n output: Return;\n };\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------------------------------------|-------------|\n| request | [CallableRequest](./firebase-functions.https.callablerequest.md#httpscallablerequest_interface)\\\u003cT\\\u003e | |\n| response | [CallableResponse](./firebase-functions.https.callableresponse.md#httpscallableresponse_interface)\\\u003cStream\\\u003e | |\n\n**Returns:**\n\n{ stream: AsyncIterable\\\u003cStream\\\u003e; output: Return; }"]]