Skip to content

Commit 898bf58

Browse files
authored
Storage-exp: fix doc comments and remove namespace imports. (#4185)
1 parent 6ac66ba commit 898bf58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1568
-563
lines changed

common/api-review/auth-types-exp.api.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ export interface ActionCodeInfo {
1818
multiFactorInfo?: MultiFactorInfo | null;
1919
previousEmail?: string | null;
2020
};
21-
operation: Operation;
21+
operation: ActionCodeOperation;
22+
}
23+
24+
// @public
25+
export const enum ActionCodeOperation {
26+
EMAIL_SIGNIN = 'EMAIL_SIGNIN',
27+
PASSWORD_RESET = 'PASSWORD_RESET',
28+
RECOVER_EMAIL = 'RECOVER_EMAIL',
29+
REVERT_SECOND_FACTOR_ADDITION = 'REVERT_SECOND_FACTOR_ADDITION',
30+
VERIFY_AND_CHANGE_EMAIL = 'VERIFY_AND_CHANGE_EMAIL',
31+
VERIFY_EMAIL = 'VERIFY_EMAIL'
2232
}
2333

2434
// @public
@@ -42,16 +52,16 @@ export abstract class ActionCodeURL {
4252
readonly code: string;
4353
readonly continueUrl: string | null;
4454
readonly languageCode: string | null;
45-
readonly operation: Operation;
55+
readonly operation: ActionCodeOperation;
4656
static parseLink(link: string): ActionCodeURL | null;
4757
readonly tenantId: string | null;
4858
}
4959

5060
// @public
5161
export interface AdditionalUserInfo {
5262
readonly isNewUser: boolean;
53-
readonly profile: UserProfile | null;
54-
readonly providerId: ProviderId | null;
63+
readonly profile: Record<string, unknown> | null;
64+
readonly providerId: string | null;
5565
readonly username?: string | null;
5666
}
5767

@@ -77,13 +87,13 @@ export interface Auth {
7787
error?: ErrorFn,
7888
completed?: CompleteFn
7989
): Unsubscribe;
80-
setPersistence(persistence: Persistence): void;
90+
setPersistence(persistence: Persistence): Promise<void>;
8191
readonly settings: AuthSettings;
8292
signOut(): Promise<void>;
8393
tenantId: string | null;
8494
updateCurrentUser(user: User | null): Promise<void>;
8595
useDeviceLanguage(): void;
86-
useEmulator(url: string): void;
96+
useEmulator(url: string, options?: { disableWarnings: boolean }): void;
8797
}
8898

8999
// @public
@@ -148,6 +158,11 @@ export abstract class EmailAuthProvider implements AuthProvider {
148158
readonly providerId: ProviderId;
149159
}
150160

161+
// @public
162+
export const enum FactorId {
163+
PHONE = 'phone'
164+
}
165+
151166
// @public
152167
export interface IdTokenResult {
153168
authTime: string;
@@ -161,28 +176,27 @@ export interface IdTokenResult {
161176

162177
// @public
163178
export interface MultiFactorAssertion {
164-
readonly factorId: string;
179+
readonly factorId: FactorId;
165180
}
166181

167182
// @public
168183
export interface MultiFactorError extends AuthError {
169-
readonly credential: AuthCredential;
170184
readonly operationType: OperationType;
171185
}
172186

173187
// @public
174188
export interface MultiFactorInfo {
175189
readonly displayName?: string | null;
176190
readonly enrollmentTime: string;
177-
readonly factorId: ProviderId;
191+
readonly factorId: FactorId;
178192
readonly uid: string;
179193
}
180194

181195
// @public
182196
export abstract class MultiFactorResolver {
183-
hints: MultiFactorInfo[];
197+
readonly hints: MultiFactorInfo[];
184198
resolveSignIn(assertion: MultiFactorAssertion): Promise<UserCredential>;
185-
session: MultiFactorSession;
199+
readonly session: MultiFactorSession;
186200
}
187201

188202
// @public
@@ -213,16 +227,6 @@ export abstract class OAuthCredential extends AuthCredential {
213227
readonly secret?: string;
214228
}
215229

216-
// @public
217-
export const enum Operation {
218-
EMAIL_SIGNIN = 'EMAIL_SIGNIN',
219-
PASSWORD_RESET = 'PASSWORD_RESET',
220-
RECOVER_EMAIL = 'RECOVER_EMAIL',
221-
REVERT_SECOND_FACTOR_ADDITION = 'REVERT_SECOND_FACTOR_ADDITION',
222-
VERIFY_AND_CHANGE_EMAIL = 'VERIFY_AND_CHANGE_EMAIL',
223-
VERIFY_EMAIL = 'VERIFY_EMAIL'
224-
}
225-
226230
// @public
227231
export const enum OperationType {
228232
LINK = 'link',
@@ -390,7 +394,7 @@ export interface User extends UserInfo {
390394
// @public
391395
export interface UserCredential {
392396
operationType: OperationType;
393-
providerId: ProviderId | null;
397+
providerId: string | null;
394398
user: User;
395399
}
396400

common/api-review/firestore.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { FirebaseApp } from '@firebase/app-types-exp';
88
import { LogLevelString as LogLevel } from '@firebase/logger';
99

10-
// @public (undocumented)
10+
// @public
1111
export function addDoc<T>(reference: CollectionReference<T>, data: T): Promise<DocumentReference<T>>;
1212

1313
// @public

common/api-review/firestore.lite.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { FirebaseApp } from '@firebase/app-types-exp';
88
import { LogLevelString as LogLevel } from '@firebase/logger';
99

10-
// @public (undocumented)
10+
// @public
1111
export function addDoc<T>(reference: CollectionReference<T>, data: T): Promise<DocumentReference<T>>;
1212

1313
// @public
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
## API Report File for "@firebase/storage-types"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { CompleteFn } from '@firebase/util';
8+
import { FirebaseApp } from '@firebase/app-types-exp';
9+
import { FirebaseError } from '@firebase/util';
10+
import { NextFn } from '@firebase/util';
11+
import { Unsubscribe } from '@firebase/util';
12+
13+
// @public
14+
export interface FirebaseStorageError extends FirebaseError {
15+
serverResponse: string | null;
16+
}
17+
18+
// @public
19+
export interface ListOptions {
20+
maxResults?: number | null;
21+
pageToken?: string | null;
22+
}
23+
24+
// @public
25+
export interface ListResult {
26+
items: StorageReference[];
27+
nextPageToken?: string;
28+
prefixes: StorageReference[];
29+
}
30+
31+
// @public
32+
export interface Metadata {
33+
// (undocumented)
34+
[prop: string]: unknown;
35+
36+
bucket: string;
37+
38+
cacheControl: string | undefined;
39+
40+
contentDisposition: string | undefined;
41+
42+
contentEncoding: string | undefined;
43+
44+
contentLanguage: string | undefined;
45+
46+
contentType: string | undefined;
47+
48+
customMetadata:
49+
| {
50+
[key: string]: string;
51+
}
52+
| undefined;
53+
54+
downloadTokens: string[] | undefined;
55+
56+
fullPath: string;
57+
58+
generation: string;
59+
60+
md5Hash: string | undefined;
61+
62+
metageneration: string;
63+
64+
name: string;
65+
66+
ref: StorageReference | undefined;
67+
68+
size: number;
69+
70+
timeCreated: string;
71+
72+
updated: string;
73+
}
74+
75+
// @public
76+
export interface StorageObserver<T> {
77+
// (undocumented)
78+
complete?: CompleteFn | null;
79+
// (undocumented)
80+
error?: (error: FirebaseStorageError) => void | null;
81+
// (undocumented)
82+
next?: NextFn<T> | null;
83+
}
84+
85+
// @public
86+
export interface StorageReference {
87+
bucket: string;
88+
fullPath: string;
89+
name: string;
90+
parent: StorageReference | null;
91+
root: StorageReference;
92+
storage: StorageService;
93+
toString(): string;
94+
}
95+
96+
// @public
97+
export interface StorageService {
98+
readonly app: FirebaseApp;
99+
maxOperationRetryTime: number;
100+
maxUploadRetryTime: number;
101+
}
102+
103+
// @public
104+
export type TaskEvent = 'state_changed';
105+
106+
// @public
107+
export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error';
108+
109+
// @public
110+
export interface UploadResult {
111+
readonly metadata: Metadata;
112+
113+
readonly ref: StorageReference;
114+
}
115+
116+
// @public
117+
export interface UploadTask {
118+
cancel(): boolean;
119+
catch(onRejected: (error: FirebaseStorageError) => any): Promise<any>;
120+
on(
121+
event: TaskEvent,
122+
nextOrObserver?:
123+
| StorageObserver<UploadTaskSnapshot>
124+
| null
125+
| ((snapshot: UploadTaskSnapshot) => any),
126+
error?: ((a: FirebaseStorageError) => any) | null,
127+
complete?: Unsubscribe | null
128+
): Function;
129+
pause(): boolean;
130+
resume(): boolean;
131+
snapshot: UploadTaskSnapshot;
132+
then(
133+
onFulfilled?: ((snapshot: UploadTaskSnapshot) => any) | null,
134+
onRejected?: ((error: FirebaseStorageError) => any) | null
135+
): Promise<any>;
136+
}
137+
138+
// @public
139+
export interface UploadTaskSnapshot {
140+
bytesTransferred: number;
141+
142+
metadata: Metadata;
143+
144+
ref: StorageReference;
145+
146+
state: TaskState;
147+
148+
task: UploadTask;
149+
150+
totalBytes: number;
151+
}
152+
153+
154+
// (No @packageDocumentation comment for this package)
155+
156+
```

0 commit comments

Comments
 (0)