Skip to content

Commit b011ea6

Browse files
author
Brian Chen
committed
Merge branch 'master' into bc/proto-oc
2 parents c62295e + 483567a commit b011ea6

37 files changed

+652
-846
lines changed

.changeset/config.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"firebase-messaging-integration-test",
1616
"@firebase/app-exp",
1717
"@firebase/analytics-exp",
18-
"@firebase/analytics-types-exp",
1918
"@firebase/auth-exp",
2019
"@firebase/auth-compat",
2120
"@firebase/auth-types-exp",

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

+165-16
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,170 @@
44
55
```ts
66

7-
import { Analytics } from '@firebase/analytics-types-exp';
8-
import { AnalyticsCallOptions } from '@firebase/analytics-types-exp';
9-
import { ControlParams } from '@firebase/analytics-types-exp';
10-
import { CustomParams } from '@firebase/analytics-types-exp';
11-
import { EventNameString } from '@firebase/analytics-types-exp';
12-
import { EventParams } from '@firebase/analytics-types-exp';
137
import { FirebaseApp } from '@firebase/app-exp';
14-
import { Item } from '@firebase/analytics-types-exp';
15-
import { Promotion } from '@firebase/analytics-types-exp';
16-
import { SettingsOptions } from '@firebase/analytics-types-exp';
178

18-
export { Analytics }
9+
// @public (undocumented)
10+
export interface Analytics {
11+
app: FirebaseApp;
12+
}
1913

20-
export { ControlParams }
14+
// @public
15+
export interface AnalyticsCallOptions {
16+
global: boolean;
17+
}
18+
19+
// @public
20+
export interface ControlParams {
21+
// (undocumented)
22+
event_callback?: () => void;
23+
// (undocumented)
24+
event_timeout?: number;
25+
// (undocumented)
26+
groups?: string | string[];
27+
// (undocumented)
28+
send_to?: string | string[];
29+
}
30+
31+
// @public (undocumented)
32+
export type Currency = string | number;
2133

2234
// @public
2335
export type CustomEventName<T> = T extends EventNameString ? never : T;
2436

25-
export { CustomParams }
37+
// @public
38+
export interface CustomParams {
39+
// (undocumented)
40+
[key: string]: any;
41+
}
42+
43+
// @public
44+
export type EventNameString = 'add_payment_info' | 'add_shipping_info' | 'add_to_cart' | 'add_to_wishlist' | 'begin_checkout' | 'checkout_progress' | 'exception' | 'generate_lead' | 'login' | 'page_view' | 'purchase' | 'refund' | 'remove_from_cart' | 'screen_view' | 'search' | 'select_content' | 'select_item' | 'select_promotion' | 'set_checkout_option' | 'share' | 'sign_up' | 'timing_complete' | 'view_cart' | 'view_item' | 'view_item_list' | 'view_promotion' | 'view_search_results';
2645

27-
export { EventParams }
46+
// @public
47+
export interface EventParams {
48+
// (undocumented)
49+
affiliation?: string;
50+
// (undocumented)
51+
checkout_option?: string;
52+
// (undocumented)
53+
checkout_step?: number;
54+
// (undocumented)
55+
content_id?: string;
56+
// (undocumented)
57+
content_type?: string;
58+
// (undocumented)
59+
coupon?: string;
60+
// (undocumented)
61+
currency?: string;
62+
// (undocumented)
63+
description?: string;
64+
// (undocumented)
65+
event_category?: string;
66+
// (undocumented)
67+
event_label?: string;
68+
// (undocumented)
69+
fatal?: boolean;
70+
// (undocumented)
71+
item_list_id?: string;
72+
// (undocumented)
73+
item_list_name?: string;
74+
// (undocumented)
75+
items?: Item[];
76+
// (undocumented)
77+
method?: string;
78+
// (undocumented)
79+
number?: string;
80+
// (undocumented)
81+
page_location?: string;
82+
// (undocumented)
83+
page_path?: string;
84+
// (undocumented)
85+
page_title?: string;
86+
// (undocumented)
87+
payment_type?: string;
88+
// (undocumented)
89+
promotion_id?: string;
90+
// (undocumented)
91+
promotion_name?: string;
92+
// (undocumented)
93+
promotions?: Promotion[];
94+
// (undocumented)
95+
screen_name?: string;
96+
// (undocumented)
97+
search_term?: string;
98+
// (undocumented)
99+
shipping?: Currency;
100+
// (undocumented)
101+
shipping_tier?: string;
102+
// (undocumented)
103+
tax?: Currency;
104+
// (undocumented)
105+
transaction_id?: string;
106+
// (undocumented)
107+
value?: number;
108+
}
28109

29110
// @public
30111
export function getAnalytics(app: FirebaseApp): Analytics;
31112

32113
// @public
33114
export function isSupported(): Promise<boolean>;
34115

35-
export { Item }
116+
// @public (undocumented)
117+
export interface Item {
118+
// (undocumented)
119+
affiliation?: string;
120+
// @deprecated (undocumented)
121+
brand?: string;
122+
// @deprecated (undocumented)
123+
category?: string;
124+
// (undocumented)
125+
coupon?: string;
126+
// (undocumented)
127+
creative_name?: string;
128+
// (undocumented)
129+
creative_slot?: string;
130+
// (undocumented)
131+
discount?: Currency;
132+
// @deprecated (undocumented)
133+
id?: string;
134+
// (undocumented)
135+
index?: number;
136+
// (undocumented)
137+
item_brand?: string;
138+
// (undocumented)
139+
item_category?: string;
140+
// (undocumented)
141+
item_category2?: string;
142+
// (undocumented)
143+
item_category3?: string;
144+
// (undocumented)
145+
item_category4?: string;
146+
// (undocumented)
147+
item_category5?: string;
148+
// (undocumented)
149+
item_id?: string;
150+
// (undocumented)
151+
item_list_id?: string;
152+
// (undocumented)
153+
item_list_name?: string;
154+
// (undocumented)
155+
item_name?: string;
156+
// (undocumented)
157+
item_variant?: string;
158+
// (undocumented)
159+
location_id?: string;
160+
// @deprecated (undocumented)
161+
name?: string;
162+
// (undocumented)
163+
price?: Currency;
164+
// (undocumented)
165+
promotion_id?: string;
166+
// (undocumented)
167+
promotion_name?: string;
168+
// (undocumented)
169+
quantity?: number;
170+
}
36171

37172
// @public
38173
export function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: {
@@ -216,7 +351,17 @@ export function logEvent<T extends string>(analyticsInstance: Analytics, eventNa
216351
[key: string]: any;
217352
}, options?: AnalyticsCallOptions): void;
218353

219-
export { Promotion }
354+
// @public @deprecated (undocumented)
355+
export interface Promotion {
356+
// (undocumented)
357+
creative_name?: string;
358+
// (undocumented)
359+
creative_slot?: string;
360+
// (undocumented)
361+
id?: string;
362+
// (undocumented)
363+
name?: string;
364+
}
220365

221366
// @public
222367
export function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void;
@@ -227,7 +372,11 @@ export function setCurrentScreen(analyticsInstance: Analytics, screenName: strin
227372
// @public
228373
export function settings(options: SettingsOptions): void;
229374

230-
export { SettingsOptions }
375+
// @public
376+
export interface SettingsOptions {
377+
dataLayerName?: string;
378+
gtagName?: string;
379+
}
231380

232381
// @public
233382
export function setUserId(analyticsInstance: Analytics, id: string, options?: AnalyticsCallOptions): void;

0 commit comments

Comments
 (0)