Skip to content

Commit ede2e84

Browse files
committed
Merge branch 'master' into fei-rm-auth-exp-types
2 parents a86b120 + 08e2aa3 commit ede2e84

File tree

115 files changed

+1869
-1930
lines changed

Some content is hidden

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

115 files changed

+1869
-1930
lines changed

.changeset/config.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"@firebase/auth-compat",
2020
"@firebase/functions-compat",
2121
"@firebase/functions-exp",
22-
"@firebase/functions-types-exp",
2322
"@firebase/installations-exp",
2423
"@firebase/installations-types-exp",
2524
"@firebase/installations-compat",
@@ -28,7 +27,6 @@
2827
"@firebase/performance-exp",
2928
"@firebase/performance-types-exp",
3029
"@firebase/remote-config-exp",
31-
"@firebase/remote-config-types-exp",
3230
"@firebase/remote-config-compat",
3331
"firebase-exp",
3432
"@firebase/app-compat",

.changeset/itchy-grapes-drum.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/serious-fireants-hunt.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,47 @@
55
```ts
66

77
import { FirebaseApp } from '@firebase/app-exp';
8-
import { Functions } from '@firebase/functions-types-exp';
9-
import { FunctionsError } from '@firebase/functions-types-exp';
10-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
11-
import { HttpsCallable } from '@firebase/functions-types-exp';
12-
import { HttpsCallableOptions } from '@firebase/functions-types-exp';
13-
import { HttpsCallableResult } from '@firebase/functions-types-exp';
8+
import { FirebaseError } from '@firebase/util';
149

15-
export { Functions }
10+
// @public
11+
export interface Functions {
12+
app: FirebaseApp;
13+
customDomain: string | null;
14+
region: string;
15+
}
1616

17-
export { FunctionsError }
17+
// @public
18+
export interface FunctionsError extends FirebaseError {
19+
readonly code: FunctionsErrorCode;
20+
readonly details?: unknown;
21+
}
1822

19-
export { FunctionsErrorCode }
23+
// @public
24+
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';
2025

2126
// @public
2227
export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): Functions;
2328

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

2635
// @public
27-
export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
36+
export function httpsCallable<RequestData = unknown, ResponseData = unknown>(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable<RequestData, ResponseData>;
2837

29-
export { HttpsCallableOptions }
38+
// @public
39+
export interface HttpsCallableOptions {
40+
// (undocumented)
41+
timeout?: number;
42+
}
3043

31-
export { HttpsCallableResult }
44+
// @public
45+
export interface HttpsCallableResult<ResponseData = unknown> {
46+
// (undocumented)
47+
readonly data: ResponseData;
48+
}
3249

3350
// @public
3451
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;

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

Lines changed: 0 additions & 67 deletions
This file was deleted.

common/api-review/remote-config-exp.api.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
```ts
66

77
import { FirebaseApp } from '@firebase/app-exp';
8-
import { RemoteConfig } from '@firebase/remote-config-types-exp';
9-
import { LogLevel as RemoteConfigLogLevel } from '@firebase/remote-config-types-exp';
10-
import { Value as ValueType } from '@firebase/remote-config-types-exp';
118

129
// @public
1310
export function activate(remoteConfig: RemoteConfig): Promise<boolean>;
@@ -22,7 +19,10 @@ export function fetchAndActivate(remoteConfig: RemoteConfig): Promise<boolean>;
2219
export function fetchConfig(remoteConfig: RemoteConfig): Promise<void>;
2320

2421
// @public
25-
export function getAll(remoteConfig: RemoteConfig): Record<string, ValueType>;
22+
export type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle';
23+
24+
// @public
25+
export function getAll(remoteConfig: RemoteConfig): Record<string, Value>;
2626

2727
// @public
2828
export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean;
@@ -37,16 +37,40 @@ export function getRemoteConfig(app: FirebaseApp): RemoteConfig;
3737
export function getString(remoteConfig: RemoteConfig, key: string): string;
3838

3939
// @public
40-
export function getValue(remoteConfig: RemoteConfig, key: string): ValueType;
40+
export function getValue(remoteConfig: RemoteConfig, key: string): Value;
4141

42-
export { RemoteConfig }
42+
// @public
43+
export type LogLevel = 'debug' | 'error' | 'silent';
4344

44-
export { RemoteConfigLogLevel }
45+
// @public
46+
export interface RemoteConfig {
47+
defaultConfig: {
48+
[key: string]: string | number | boolean;
49+
};
50+
fetchTimeMillis: number;
51+
lastFetchStatus: FetchStatus;
52+
settings: Settings;
53+
}
4554

4655
// @public
47-
export function setLogLevel(remoteConfig: RemoteConfig, logLevel: RemoteConfigLogLevel): void;
56+
export function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel): void;
4857

49-
export { ValueType }
58+
// @public
59+
export interface Settings {
60+
fetchTimeoutMillis: number;
61+
minimumFetchIntervalMillis: number;
62+
}
63+
64+
// @public
65+
export interface Value {
66+
asBoolean(): boolean;
67+
asNumber(): number;
68+
asString(): string;
69+
getSource(): ValueSource;
70+
}
71+
72+
// @public
73+
export type ValueSource = 'static' | 'default' | 'remote';
5074

5175

5276
// (No @packageDocumentation comment for this package)

common/api-review/remote-config-types-exp.api.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)