Skip to content

Commit 7086f4a

Browse files
Fis modularization (#3751)
* copied orginal FIS sdk into packages-expp and made unit tests passed * migrated test app and fixed a test app bug to make it worked * made installations-exp depend on app-exp * Relocated public methods files into folder * Making installations mudularization step1, build success * Making installations mudularization step2, unit tests pass * update dependency version, merge master * Apply suggestions from code review Co-authored-by: Feiyang <[email protected]> * update dependencies' version * add getInstallation(app) * correct deleteInstallations funciton name * Place the call to registerVerion and registerInstallations at the same place * remove dead code * add api extractor config * rewrite the internal interface * fix build error * Seperate internal interface from public interface. * Change public methods to accept public interface * Fixes and api extractor integration for @firebase/installations-exp (#3733) * integrate api-extractor into installations-exp * add release tag to APIs * add _ prefix to the internal interface * update api report * add documentations to public apis * refine public documentations * refine public documentations Co-authored-by: Feiyang <[email protected]>
1 parent d41152a commit 7086f4a

File tree

8 files changed

+22
-7
lines changed

8 files changed

+22
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
import { FirebaseApp } from '@firebase/app-types-exp';
88
import { FirebaseInstallations } from '@firebase/installations-types-exp';
99

10-
// @public (undocumented)
10+
// @public
1111
export function deleteInstallations(installations: FirebaseInstallations): Promise<void>;
1212

13-
// @public (undocumented)
13+
// @public
1414
export function getId(installations: FirebaseInstallations): Promise<string>;
1515

16-
// @public (undocumented)
16+
// @public
1717
export function getInstallations(app: FirebaseApp): FirebaseInstallations;
1818

19-
// @public (undocumented)
19+
// @public
2020
export function getToken(installations: FirebaseInstallations, forceRefresh?: boolean): Promise<string>;
2121

22-
// @public (undocumented)
22+
// @public
2323
export type IdChangeCallbackFn = (installationId: string) => void;
2424

25-
// @public (undocumented)
25+
// @public
2626
export type IdChangeUnsubscribeFn = () => void;
2727

2828
// @public

packages-exp/installations-exp/src/api/delete-installations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2323
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2424

2525
/**
26+
* Deletes the Firebase Installation and all associated data.
27+
*
2628
* @public
2729
*/
2830
export async function deleteInstallations(

packages-exp/installations-exp/src/api/get-id.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2121
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2222

2323
/**
24+
* Creates a Firebase Installation if there isn't one for the app and
25+
* returns the Installation ID.
26+
*
2427
* @public
2528
*/
2629
export async function getId(

packages-exp/installations-exp/src/api/get-installations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import { FirebaseInstallations } from '@firebase/installations-types-exp';
2020
import { _getProvider } from '@firebase/app-exp';
2121

2222
/**
23+
* Returns an instance of FirebaseInstallations associated with the given FirebaseApp instance.
24+
*
2325
* @public
2426
*/
2527
export function getInstallations(app: FirebaseApp): FirebaseInstallations {

packages-exp/installations-exp/src/api/get-token.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2525

2626
/**
27+
* Returns an Installation auth token, identifying the current Firebase Installation.
28+
*
2729
* @public
2830
*/
2931
export async function getToken(

packages-exp/installations-exp/src/api/on-id-change.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2020
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2121

2222
/**
23+
* An user defined callback function that gets called when Installations ID changes.
24+
*
2325
* @public
2426
*/
2527
export type IdChangeCallbackFn = (installationId: string) => void;
2628
/**
29+
* Unsubscribe a callback function previously added via {@link #IdChangeCallbackFn}.
30+
*
2731
* @public
2832
*/
2933
export type IdChangeUnsubscribeFn = () => void;

packages-exp/installations-types-exp/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717

1818
/**
19+
* Public interface of the FirebaseInstallations SDK.
20+
*
1921
* @public
2022
*/
2123
export interface FirebaseInstallations {}

packages-exp/installations-types-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
"devDependencies": {
3131
"typescript": "4.0.2"
3232
}
33-
}
33+
}

0 commit comments

Comments
 (0)