Skip to content

Commit 732997b

Browse files
Merge branch 'master' into database-exp-master
2 parents 8c7d848 + 15391ae commit 732997b

File tree

6 files changed

+51
-18
lines changed

6 files changed

+51
-18
lines changed

common/api-review/analytics-exp.api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { FirebaseApp } from '@firebase/app-exp';
88

9-
// @public (undocumented)
9+
// @public
1010
export interface Analytics {
1111
app: FirebaseApp;
1212
}
@@ -28,7 +28,7 @@ export interface ControlParams {
2828
send_to?: string | string[];
2929
}
3030

31-
// @public (undocumented)
31+
// @public
3232
export type Currency = string | number;
3333

3434
// @public
@@ -108,12 +108,12 @@ export interface EventParams {
108108
}
109109

110110
// @public
111-
export function getAnalytics(app: FirebaseApp): Analytics;
111+
export function getAnalytics(app?: FirebaseApp): Analytics;
112112

113113
// @public
114114
export function isSupported(): Promise<boolean>;
115115

116-
// @public (undocumented)
116+
// @public
117117
export interface Item {
118118
// (undocumented)
119119
affiliation?: string;
@@ -351,7 +351,7 @@ export function logEvent<T extends string>(analyticsInstance: Analytics, eventNa
351351
[key: string]: any;
352352
}, options?: AnalyticsCallOptions): void;
353353

354-
// @public @deprecated (undocumented)
354+
// @public @deprecated
355355
export interface Promotion {
356356
// (undocumented)
357357
creative_name?: string;

common/api-review/functions-exp.api.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,21 @@ export interface FunctionsError extends FirebaseError {
2424
export type FunctionsErrorCode = 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated';
2525

2626
// @public
27-
export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): Functions;
27+
export function getFunctions(app?: FirebaseApp, regionOrCustomDomain?: string): Functions;
2828

2929
// @public
30-
export interface HttpsCallable<RequestData = unknown, ResponseData = unknown> {
31-
// (undocumented)
32-
(data?: RequestData | null): Promise<HttpsCallableResult<ResponseData>>;
33-
}
30+
export type HttpsCallable<RequestData = unknown, ResponseData = unknown> = (data?: RequestData | null) => Promise<HttpsCallableResult<ResponseData>>;
3431

3532
// @public
3633
export function httpsCallable<RequestData = unknown, ResponseData = unknown>(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable<RequestData, ResponseData>;
3734

3835
// @public
3936
export interface HttpsCallableOptions {
40-
// (undocumented)
4137
timeout?: number;
4238
}
4339

4440
// @public
4541
export interface HttpsCallableResult<ResponseData = unknown> {
46-
// (undocumented)
4742
readonly data: ResponseData;
4843
}
4944

packages-exp/analytics-exp/src/public-types.ts

+24-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { FirebaseApp } from '@firebase/app-exp';
2020
/**
2121
* Additional options that can be passed to Firebase Analytics method
2222
* calls such as `logEvent`, `setCurrentScreen`, etc.
23+
* @public
2324
*/
2425
export interface AnalyticsCallOptions {
2526
/**
@@ -29,6 +30,11 @@ export interface AnalyticsCallOptions {
2930
global: boolean;
3031
}
3132

33+
/**
34+
* The Firebase Analytics service interface.
35+
*
36+
* @public
37+
*/
3238
export interface Analytics {
3339
/**
3440
* The FirebaseApp this Functions instance is associated with.
@@ -39,6 +45,7 @@ export interface Analytics {
3945
/**
4046
* Specifies custom options for your Firebase Analytics instance.
4147
* You must set these before initializing `firebase.analytics()`.
48+
* @public
4249
*/
4350
export interface SettingsOptions {
4451
/** Sets custom name for `gtag` function. */
@@ -49,13 +56,15 @@ export interface SettingsOptions {
4956

5057
/**
5158
* Any custom params the user may pass to gtag.js.
59+
* @public
5260
*/
5361
export interface CustomParams {
5462
[key: string]: unknown;
5563
}
5664
/**
5765
* Type for standard gtag.js event names. `logEvent` also accepts any
5866
* custom string and interprets it as a custom event name.
67+
* @public
5968
*/
6069
export type EventNameString =
6170
| 'add_payment_info'
@@ -86,9 +95,17 @@ export type EventNameString =
8695
| 'view_promotion'
8796
| 'view_search_results';
8897

98+
/**
99+
* Currency field used by some Analytics events.
100+
* @public
101+
*/
89102
export type Currency = string | number;
90103

91104
/* eslint-disable camelcase */
105+
/**
106+
* Item field used by some Analytics events.
107+
* @public
108+
*/
92109
export interface Item {
93110
item_id?: string;
94111
item_name?: string;
@@ -122,7 +139,11 @@ export interface Item {
122139
name?: string;
123140
}
124141

125-
/** @deprecated Use Item instead. */
142+
/**
143+
* Field previously used by some Analytics events.
144+
* @deprecated Use Item instead.
145+
* @public
146+
*/
126147
export interface Promotion {
127148
creative_name?: string;
128149
creative_slot?: string;
@@ -135,6 +156,7 @@ export interface Promotion {
135156
* For more information, see
136157
* {@link https://developers.google.com/gtagjs/reference/parameter
137158
* | the gtag.js documentation on parameters}.
159+
* @public
138160
*/
139161
export interface ControlParams {
140162
groups?: string | string[];
@@ -148,6 +170,7 @@ export interface ControlParams {
148170
* For more information, see
149171
* {@link https://developers.google.com/gtagjs/reference/parameter
150172
* | the gtag.js documentation on parameters}.
173+
* @public
151174
*/
152175
export interface EventParams {
153176
checkout_option?: string;

packages-exp/firebase-exp/compat/index.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -7646,6 +7646,13 @@ declare namespace firebase.storage {
76467646
* @see {@link firebase.storage.Storage.maxUploadRetryTime}
76477647
*/
76487648
setMaxUploadRetryTime(time: number): any;
7649+
/**
7650+
* Modify this `Storage` instance to communicate with the Cloud Storage emulator.
7651+
*
7652+
* @param host - The emulator host (ex: localhost)
7653+
* @param port - The emulator port (ex: 5001)
7654+
*/
7655+
useEmulator(host: string, port: number): void;
76497656
}
76507657

76517658
/**

packages-exp/functions-exp/src/public-types.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,32 @@ import { FirebaseError } from '@firebase/util';
2222
* @public
2323
*/
2424
export interface HttpsCallableResult<ResponseData = unknown> {
25+
/**
26+
* Data returned from callable function.
27+
*/
2528
readonly data: ResponseData;
2629
}
2730

2831
/**
2932
* An HttpsCallable is a reference to a "callable" http trigger in
3033
* Google Cloud Functions.
34+
* @param data - Data to be passed to callable function.
3135
* @public
3236
*/
33-
export interface HttpsCallable<RequestData = unknown, ResponseData = unknown> {
34-
(data?: RequestData | null): Promise<HttpsCallableResult<ResponseData>>;
35-
}
37+
export type HttpsCallable<RequestData = unknown, ResponseData = unknown> = (
38+
data?: RequestData | null
39+
) => Promise<HttpsCallableResult<ResponseData>>;
3640

3741
/**
3842
* HttpsCallableOptions specify metadata about how calls should be executed.
3943
* @public
4044
*/
4145
export interface HttpsCallableOptions {
42-
timeout?: number; // in millis
46+
/**
47+
* Time in milliseconds after which to cancel if there is no response.
48+
* Default is 70000.
49+
*/
50+
timeout?: number;
4351
}
4452

4553
/**

packages/firebase/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7618,7 +7618,7 @@ declare namespace firebase.storage {
76187618
* @param host - The emulator host (ex: localhost)
76197619
* @param port - The emulator port (ex: 5001)
76207620
*/
7621-
useEmulator(host: string, port: string): void;
7621+
useEmulator(host: string, port: number): void;
76227622
}
76237623

76247624
/**

0 commit comments

Comments
 (0)