Skip to content

Commit

Permalink
Declare project and app metadata types (#1470)
Browse files Browse the repository at this point in the history
* Declare project and app metadata types

* Split metadata.ts into apps.ts and projects.ts
  • Loading branch information
TrCaM committed Jul 10, 2019
1 parent aa123de commit d338640
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/management/apps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export interface AppMetadata {
name: string /* The fully qualified resource name of the Firebase App */;
projectId: string;
appId: string;
platform: AppPlatform;
displayName?: string;
}

export interface IosAppMetadata extends AppMetadata {
bundleId: string;
appStoreId?: string;
platform: AppPlatform.IOS;
}

export interface AndroidAppMetadata extends AppMetadata {
packageName: string;
platform: AppPlatform.ANDROID;
}

export interface WebAppMetadata extends AppMetadata {
displayName: string;
appUrls?: string[];
platform: AppPlatform.WEB;
}

export enum AppPlatform {
PLATFORM_UNSPECIFIED = "PLATFORM_UNSPECIFIED",
IOS = "IOS",
ANDROID = "ANDROID",
WEB = "WEB",
ANY = "ANY",
}

// TODO(caot): Add API methods related to app management into this file
16 changes: 16 additions & 0 deletions src/management/projects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export interface FirebaseProjectMetadata {
name: string /* The fully qualified resource name of the Firebase project */;
projectId: string;
projectNumber: string;
displayName: string;
resources: DefaultProjectResources;
}

export interface DefaultProjectResources {
hostingSite: string;
realtimeDatabaseInstance: string;
storageBucket: string;
locationId: string;
}

// TODO(caot): Add API methods related to project management into this file

0 comments on commit d338640

Please sign in to comment.