Skip to content

Commit 6e0b16f

Browse files
committed
Add apis
1 parent b809c8d commit 6e0b16f

File tree

4 files changed

+61
-71
lines changed

4 files changed

+61
-71
lines changed

packages-exp/remote-config-exp/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"name": "@firebase/remote-config",
3-
"version": "0.1.28",
2+
"name": "@firebase/remote-config-exp",
3+
"version": "0.0.800",
44
"description": "The Remote Config package of the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
6+
"private": true,
67
"main": "dist/index.cjs.js",
78
"browser": "dist/index.esm.js",
89
"module": "dist/index.esm.js",
@@ -22,20 +23,20 @@
2223
"prepare": "yarn build"
2324
},
2425
"peerDependencies": {
25-
"@firebase/app": "0.x",
26-
"@firebase/app-types": "0.x"
26+
"@firebase/app-exp": "0.x",
27+
"@firebase/app-types-exp": "0.x"
2728
},
2829
"dependencies": {
29-
"@firebase/installations": "0.4.17",
30+
"@firebase/installations-exp": "0.0.800",
3031
"@firebase/logger": "0.2.6",
31-
"@firebase/remote-config-types": "0.1.9",
32+
"@firebase/remote-config-types-exp": "0.0.800",
3233
"@firebase/util": "0.3.2",
3334
"@firebase/component": "0.1.19",
3435
"tslib": "^1.11.1"
3536
},
3637
"license": "Apache-2.0",
3738
"devDependencies": {
38-
"@firebase/app": "0.6.11",
39+
"@firebase/app-exp": "0.0.800",
3940
"rollup": "2.29.0",
4041
"rollup-plugin-typescript2": "0.27.3",
4142
"typescript": "4.0.2"

packages-exp/remote-config-exp/src/api.ts

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,53 @@
1515
* limitations under the License.
1616
*/
1717

18-
export {};
18+
import { FirebaseApp } from '@firebase/app-types-exp';
19+
import {
20+
LogLevel,
21+
RemoteConfig,
22+
Value
23+
} from '@firebase/remote-config-types-exp';
24+
25+
export function getRemoteConfig(app: FirebaseApp): RemoteConfig {
26+
throw Error('not implemented!');
27+
}
28+
29+
export function activate(remoteConfig: RemoteConfig): Promise<boolean> {
30+
throw Error('not implemented!');
31+
}
32+
33+
export function ensureInitialized(remoteConfig: RemoteConfig): Promise<void> {
34+
throw Error('not implemented!');
35+
}
36+
37+
export function fetchConfig(remoteConfig: RemoteConfig): Promise<void> {
38+
throw Error('not implemented!');
39+
}
40+
41+
export function fetchAndActivate(remoteConfig: RemoteConfig): Promise<boolean> {
42+
throw Error('not implemented!');
43+
}
44+
45+
export function getAll(remoteConfig: RemoteConfig): Record<string, Value> {
46+
throw Error('not implemented!');
47+
}
48+
49+
export function getBoolean(remoteConfig: RemoteConfig, key: string): boolean {
50+
throw Error('not implemented!');
51+
}
52+
53+
export function getNumber(remoteConfig: RemoteConfig, key: string): number {
54+
throw Error('not implemented!');
55+
}
56+
57+
export function getString(remoteConfig: RemoteConfig, key: string): string {
58+
throw Error('not implemented!');
59+
}
60+
61+
export function getValue(remoteConfig: RemoteConfig, key: string): Value {
62+
throw Error('not implemented!');
63+
}
64+
65+
export function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel) {
66+
throw Error('not implemented!');
67+
}

packages-exp/remote-config-types-exp/index.d.ts

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -37,66 +37,6 @@ export interface RemoteConfig {
3737
* The status of the last fetch <i>attempt</i>.
3838
*/
3939
lastFetchStatus: FetchStatus;
40-
41-
/**
42-
* Makes the last fetched config available to the getters.
43-
* Returns a promise which resolves to true if the current call activated the fetched configs.
44-
* If the fetched configs were already activated, the promise will resolve to false.
45-
*/
46-
activate(): Promise<boolean>;
47-
48-
/**
49-
* Ensures the last activated config are available to the getters.
50-
*/
51-
ensureInitialized(): Promise<void>;
52-
53-
/**
54-
* Fetches and caches configuration from the Remote Config service.
55-
*/
56-
fetch(): Promise<void>;
57-
58-
/**
59-
* Performs fetch and activate operations, as a convenience.
60-
* Returns a promise which resolves to true if the current call activated the fetched configs.
61-
* If the fetched configs were already activated, the promise will resolve to false.
62-
*/
63-
fetchAndActivate(): Promise<boolean>;
64-
65-
/**
66-
* Gets all config.
67-
*/
68-
getAll(): { [key: string]: Value };
69-
70-
/**
71-
* Gets the value for the given key as a boolean.
72-
*
73-
* Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.
74-
*/
75-
getBoolean(key: string): boolean;
76-
77-
/**
78-
* Gets the value for the given key as a number.
79-
*
80-
* Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.
81-
*/
82-
getNumber(key: string): number;
83-
84-
/**
85-
* Gets the value for the given key as a String.
86-
*
87-
* Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.
88-
*/
89-
getString(key: string): string;
90-
91-
/**
92-
* Gets the {@link Value} for the given key.
93-
*/
94-
getValue(key: string): Value;
95-
96-
/**
97-
* Defines the log level to use.
98-
*/
99-
setLogLevel(logLevel: LogLevel): void;
10040
}
10141

10242
/**
@@ -175,6 +115,6 @@ export type LogLevel = 'debug' | 'error' | 'silent';
175115

176116
declare module '@firebase/component' {
177117
interface NameServiceMapping {
178-
'remoteConfig': RemoteConfig;
118+
'remote-config-exp': RemoteConfig;
179119
}
180120
}

packages-exp/remote-config-types-exp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@firebase/remote-config-types",
3-
"version": "0.1.9",
2+
"name": "@firebase/remote-config-types-exp",
3+
"version": "0.0.800",
44
"description": "@firebase/remote-config Types",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)