@@ -42,7 +42,7 @@ import * as logger from "../logger";
4242export { RESET_VALUE } from "../common/options" ;
4343
4444/**
45- * List of all regions supported by Cloud Functions v2
45+ * List of all regions supported by Cloud Functions (2nd gen).
4646 */
4747export type SupportedRegion =
4848 | "asia-east1"
@@ -98,18 +98,18 @@ const MemoryOptionToMB: Record<MemoryOption, number> = {
9898} ;
9999
100100/**
101- * List of available options for VpcConnectorEgressSettings.
101+ * List of available options for ` VpcConnectorEgressSettings` .
102102 */
103103export type VpcEgressSetting = "PRIVATE_RANGES_ONLY" | "ALL_TRAFFIC" ;
104104
105105/**
106- * List of available options for IngressSettings.
106+ * List of available options for ` IngressSettings` .
107107 */
108108export type IngressSetting = "ALLOW_ALL" | "ALLOW_INTERNAL_ONLY" | "ALLOW_INTERNAL_AND_GCLB" ;
109109
110110/**
111- * GlobalOptions are options that can be set across an entire project.
112- * These options are common to HTTPS and Event handling functions.
111+ * ` GlobalOptions` are options that can be set across an entire project.
112+ * These options are common to HTTPS and event handling functions.
113113 */
114114export interface GlobalOptions {
115115 /**
@@ -132,33 +132,33 @@ export interface GlobalOptions {
132132 * HTTPS functions can specify a higher timeout.
133133 *
134134 * @remarks
135- * The minimum timeout for a gen 2 function is 1s. The maximum timeout for a
135+ * The minimum timeout for a 2nd gen function is 1s. The maximum timeout for a
136136 * function depends on the type of function: Event handling functions have a
137137 * maximum timeout of 540s (9 minutes). HTTPS and callable functions have a
138138 * maximum timeout of 36,00s (1 hour). Task queue functions have a maximum
139- * timeout of 1,800s (30 minutes)
139+ * timeout of 1,800s (30 minutes).
140140 */
141141 timeoutSeconds ?: number | Expression < number > | ResetValue ;
142142
143143 /**
144- * Min number of actual instances to be running at a given time.
144+ * Minimum number of actual instances to be running at a given time.
145145 *
146146 * @remarks
147- * Instances will be billed for memory allocation and 10% of CPU allocation
147+ * Instances are billed for memory allocation and 10% of CPU allocation
148148 * while idle.
149149 */
150150 minInstances ?: number | Expression < number > | ResetValue ;
151151
152152 /**
153- * Max number of instances to be running in parallel.
153+ * Max number of instances that can be running in parallel.
154154 */
155155 maxInstances ?: number | Expression < number > | ResetValue ;
156156
157157 /**
158158 * Number of requests a function can serve at once.
159159 *
160160 * @remarks
161- * Can only be applied to functions running on Cloud Functions v2 .
161+ * Can be applied only to functions running on Cloud Functions (2nd gen)) .
162162 * A value of null restores the default concurrency (80 when CPU >= 1, 1 otherwise).
163163 * Concurrency cannot be set to any value other than 1 if `cpu` is less than 1.
164164 * The maximum value for concurrency is 1,000.
@@ -171,14 +171,14 @@ export interface GlobalOptions {
171171 * @remarks
172172 * Defaults to 1 for functions with <= 2GB RAM and increases for larger memory sizes.
173173 * This is different from the defaults when using the gcloud utility and is different from
174- * the fixed amount assigned in Google Cloud Functions generation 1 .
175- * To revert to the CPU amounts used in gcloud or in Cloud Functions generation 1 , set this
174+ * the fixed amount assigned in Cloud Functions (1st gen) .
175+ * To revert to the CPU amounts used in gcloud or in Cloud Functions (1st gen) , set this
176176 * to the value "gcf_gen1"
177177 */
178178 cpu ?: number | "gcf_gen1" ;
179179
180180 /**
181- * Connect cloud function to specified VPC connector.
181+ * Connect a function to a specified VPC connector.
182182 */
183183 vpcConnector ?: string | Expression < string > | ResetValue ;
184184
@@ -198,7 +198,7 @@ export interface GlobalOptions {
198198 ingressSettings ?: IngressSetting | ResetValue ;
199199
200200 /**
201- * Invoker to set access control on https functions.
201+ * Invoker to set access control on HTTPS functions.
202202 */
203203 invoker ?: "public" | "private" | string | string [ ] ;
204204
@@ -213,21 +213,21 @@ export interface GlobalOptions {
213213 secrets ?: ( string | SecretParam ) [ ] ;
214214
215215 /**
216- * Determines whether Firebase AppCheck is enforced. Defaults to false.
216+ * Determines whether Firebase App Check is enforced. Defaults to false.
217217 *
218218 * @remarks
219219 * When true, requests with invalid tokens autorespond with a 401
220220 * (Unauthorized) error.
221- * When false, requests with invalid tokens set event.app to undefined.
221+ * When false, requests with invalid tokens set ` event.app` to ` undefined` .
222222 */
223223 enforceAppCheck ?: boolean ;
224224
225225 /**
226226 * Controls whether function configuration modified outside of function source is preserved. Defaults to false.
227227 *
228228 * @remarks
229- * When setting configuration available in the underlying platform that is not yet available in the Firebase Functions
230- * SDK , we highly recommend setting `preserveExternalChanges` to `true`. Otherwise, when the Firebase Functions SDK releases
229+ * When setting configuration available in an underlying platform that is not yet available in the Firebase SDK
230+ * for Cloud Functions , we recommend setting `preserveExternalChanges` to `true`. Otherwise, when Google releases
231231 * a new version of the SDK with support for the missing configuration, your function's manually configured setting
232232 * may inadvertently be wiped out.
233233 */
@@ -237,7 +237,7 @@ export interface GlobalOptions {
237237let globalOptions : GlobalOptions | undefined ;
238238
239239/**
240- * Sets default options for all functions written using the v2 SDK.
240+ * Sets default options for all functions written using the 2nd gen SDK.
241241 * @param options Options to set as default
242242 */
243243export function setGlobalOptions ( options : GlobalOptions ) {
@@ -257,12 +257,16 @@ export function getGlobalOptions(): GlobalOptions {
257257}
258258
259259/**
260- * Additional fields that can be set on any event-handling Cloud Function .
260+ * Additional fields that can be set on any event-handling function .
261261 */
262262export interface EventHandlerOptions extends Omit < GlobalOptions , "enforceAppCheck" > {
263+ /** Type of the event. Valid values are TODO */
263264 eventType ?: string ;
264265
266+ /** TODO */
265267 eventFilters ?: Record < string , string | Expression < string > > ;
268+
269+ /** TODO */
266270 eventFilterPathPatterns ?: Record < string , string | Expression < string > > ;
267271
268272 /** Whether failed executions should be delivered again. */
0 commit comments