firebase-functions 3.24.0 → 3.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ function stackToWire(stack) {
36
36
  if (val instanceof params_1.Expression) {
37
37
  obj[key] = val.toCEL();
38
38
  }
39
- else if (typeof val === 'object') {
39
+ else if (typeof val === 'object' && val !== null) {
40
40
  traverse(val);
41
41
  }
42
42
  }
@@ -24,6 +24,8 @@ export interface NewTesterDevicePayload {
24
24
  /**
25
25
  * The internal payload object for receiving in-app feedback from a tester.
26
26
  * Payload is wrapped inside a `FirebaseAlertData` object.
27
+ *
28
+ * @alpha
27
29
  */
28
30
  export interface InAppFeedbackPayload {
29
31
  ['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.AppDistroInAppFeedbackPayload';
@@ -162,6 +164,8 @@ export declare function onNewTesterIosDevicePublished(opts: AppDistributionOptio
162
164
  * Declares a function that can handle receiving new in-app feedback from a tester.
163
165
  * @param handler - Event handler which is run every time new feedback is received.
164
166
  * @returns A function that you can export and deploy.
167
+ *
168
+ * @alpha
165
169
  */
166
170
  export declare function onInAppFeedbackPublished(handler: (event: AppDistributionEvent<InAppFeedbackPayload>) => any | Promise<any>): CloudFunction<AppDistributionEvent<InAppFeedbackPayload>>;
167
171
  /**
@@ -169,6 +173,8 @@ export declare function onInAppFeedbackPublished(handler: (event: AppDistributio
169
173
  * @param appId - A specific application the handler will trigger on.
170
174
  * @param handler - Event handler which is run every time new feedback is received.
171
175
  * @returns A function that you can export and deploy.
176
+ *
177
+ * @alpha
172
178
  */
173
179
  export declare function onInAppFeedbackPublished(appId: string, handler: (event: AppDistributionEvent<InAppFeedbackPayload>) => any | Promise<any>): CloudFunction<AppDistributionEvent<InAppFeedbackPayload>>;
174
180
  /**
@@ -176,5 +182,7 @@ export declare function onInAppFeedbackPublished(appId: string, handler: (event:
176
182
  * @param opts - Options that can be set on the function.
177
183
  * @param handler - Event handler which is run every time new feedback is received.
178
184
  * @returns A function that you can export and deploy.
185
+ *
186
+ * @alpha
179
187
  */
180
188
  export declare function onInAppFeedbackPublished(opts: AppDistributionOptions, handler: (event: AppDistributionEvent<InAppFeedbackPayload>) => any | Promise<any>): CloudFunction<AppDistributionEvent<InAppFeedbackPayload>>;
@@ -52,6 +52,8 @@ exports.onNewTesterIosDevicePublished = onNewTesterIosDevicePublished;
52
52
  * @param appIdOrOptsOrHandler - A specific application, options, or an event-handling function.
53
53
  * @param handler - Event handler which is run every time new feedback is received.
54
54
  * @returns A function that you can export and deploy.
55
+ *
56
+ * @alpha
55
57
  */
56
58
  function onInAppFeedbackPublished(appIdOrOptsOrHandler, handler) {
57
59
  if (typeof appIdOrOptsOrHandler === 'function') {
@@ -10,16 +10,27 @@ import { FirebaseAlertData } from './alerts';
10
10
  * Payload is wrapped inside a {@link FirebaseAlertData} object.
11
11
  */
12
12
  export interface ThresholdAlertPayload {
13
+ /** Name of the trace or network request this alert is for (e.g. my_custom_trace, firebase.com/api/123) */
13
14
  eventName: string;
15
+ /** The resource type this alert is for (i.e. trace, network request, screen rendering, etc.) */
14
16
  eventType: string;
17
+ /** The metric type this alert is for (i.e. success rate, response time, duration, etc.) */
15
18
  metricType: string;
19
+ /** The number of events checked for this alert condition */
16
20
  numSamples: number;
21
+ /** The threshold value of the alert condition without units (e.g. "75", "2.1") */
17
22
  thresholdValue: number;
23
+ /** The unit for the alert threshold (e.g. "percent", "seconds") */
18
24
  thresholdUnit: string;
25
+ /** The percentile of the alert condition, can be 0 if percentile is not applicable to the alert condition and omitted; range: [1, 100] */
19
26
  conditionPercentile?: number;
27
+ /** The app version this alert was triggered for, can be omitted if the alert is for a network request (because the alert was checked against data from all versions of app) or a web app (where the app is versionless) */
20
28
  appVersion?: string;
29
+ /** The value that violated the alert condition (e.g. "76.5", "3") */
21
30
  violationValue: number;
31
+ /** The unit for the violation value (e.g. "percent", "seconds") */
22
32
  violationUnit: string;
33
+ /** The link to Fireconsole to investigate more into this alert */
23
34
  investigateUri: string;
24
35
  }
25
36
  /**
@@ -36,6 +47,7 @@ export interface PerformanceEvent<T> extends CloudEvent<FirebaseAlertData<T>> {
36
47
  * Configuration for app distribution functions.
37
48
  */
38
49
  export interface PerformanceOptions extends EventHandlerOptions {
50
+ /** Scope the function to trigger on a specific application. */
39
51
  appId?: string;
40
52
  }
41
53
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-functions",
3
- "version": "3.24.0",
3
+ "version": "3.24.1",
4
4
  "description": "Firebase SDK for Cloud Functions",
5
5
  "keywords": [
6
6
  "firebase",
@@ -175,7 +175,7 @@
175
175
  "docgen:v1": "npm run build && npm run docgen:v1:extract && npm run docgen:v1:gen",
176
176
  "docgen:v2:extract": "api-extractor run -c docgen/api-extractor.v2.json --local",
177
177
  "docgen:v2:toc": "ts-node docgen/toc.ts --input docgen/v2/markdown --output docgen/v2/markdown/toc --path /docs/functions/beta/reference",
178
- "docgen:v2:gen": "api-documenter-fire markdown -i docgen/v2 -o docgen/v2/markdown && npm run docgen:v2:toc",
178
+ "docgen:v2:gen": "api-documenter-fire markdown -i docgen/v2 -o docgen/v2/markdown --project functions && npm run docgen:v2:toc",
179
179
  "docgen:v2": "npm run build && npm run docgen:v2:extract && npm run docgen:v2:gen",
180
180
  "build:pack": "rm -rf lib && npm install && tsc -p tsconfig.release.json && npm pack",
181
181
  "build:release": "npm ci --production && npm install --no-save typescript firebase-admin && tsc -p tsconfig.release.json",