project-management.d.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*! firebase-admin v12.1.1 */
  2. /*!
  3. * Copyright 2018 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import { App } from '../app';
  18. import { AndroidApp, ShaCertificate } from './android-app';
  19. import { IosApp } from './ios-app';
  20. import { AppMetadata } from './app-metadata';
  21. /**
  22. * The Firebase ProjectManagement service interface.
  23. */
  24. export declare class ProjectManagement {
  25. readonly app: App;
  26. private readonly requestHandler;
  27. private projectId;
  28. /**
  29. * Lists up to 100 Firebase Android apps associated with this Firebase project.
  30. *
  31. * @returns The list of Android apps.
  32. */
  33. listAndroidApps(): Promise<AndroidApp[]>;
  34. /**
  35. * Lists up to 100 Firebase iOS apps associated with this Firebase project.
  36. *
  37. * @returns The list of iOS apps.
  38. */
  39. listIosApps(): Promise<IosApp[]>;
  40. /**
  41. * Creates an `AndroidApp` object, referencing the specified Android app within
  42. * this Firebase project.
  43. *
  44. * This method does not perform an RPC.
  45. *
  46. * @param appId - The `appId` of the Android app to reference.
  47. *
  48. * @returns An `AndroidApp` object that references the specified Firebase Android app.
  49. */
  50. androidApp(appId: string): AndroidApp;
  51. /**
  52. * Creates an `iOSApp` object, referencing the specified iOS app within
  53. * this Firebase project.
  54. *
  55. * This method does not perform an RPC.
  56. *
  57. * @param appId - The `appId` of the iOS app to reference.
  58. *
  59. * @returns An `iOSApp` object that references the specified Firebase iOS app.
  60. */
  61. iosApp(appId: string): IosApp;
  62. /**
  63. * Creates a `ShaCertificate` object.
  64. *
  65. * This method does not perform an RPC.
  66. *
  67. * @param shaHash - The SHA-1 or SHA-256 hash for this certificate.
  68. *
  69. * @returns A `ShaCertificate` object contains the specified SHA hash.
  70. */
  71. shaCertificate(shaHash: string): ShaCertificate;
  72. /**
  73. * Creates a new Firebase Android app associated with this Firebase project.
  74. *
  75. * @param packageName - The canonical package name of the Android App,
  76. * as would appear in the Google Play Developer Console.
  77. * @param displayName - An optional user-assigned display name for this
  78. * new app.
  79. *
  80. * @returns A promise that resolves to the newly created Android app.
  81. */
  82. createAndroidApp(packageName: string, displayName?: string): Promise<AndroidApp>;
  83. /**
  84. * Creates a new Firebase iOS app associated with this Firebase project.
  85. *
  86. * @param bundleId - The iOS app bundle ID to use for this new app.
  87. * @param displayName - An optional user-assigned display name for this
  88. * new app.
  89. *
  90. * @returns A promise that resolves to the newly created iOS app.
  91. */
  92. createIosApp(bundleId: string, displayName?: string): Promise<IosApp>;
  93. /**
  94. * Lists up to 100 Firebase apps associated with this Firebase project.
  95. *
  96. * @returns A promise that resolves to the metadata list of the apps.
  97. */
  98. listAppMetadata(): Promise<AppMetadata[]>;
  99. /**
  100. * Update the display name of this Firebase project.
  101. *
  102. * @param newDisplayName - The new display name to be updated.
  103. *
  104. * @returns A promise that resolves when the project display name has been updated.
  105. */
  106. setDisplayName(newDisplayName: string): Promise<void>;
  107. private transformResponseToAppMetadata;
  108. private getResourceName;
  109. private getProjectId;
  110. /**
  111. * Lists up to 100 Firebase apps for a specified platform, associated with this Firebase project.
  112. */
  113. private listPlatformApps;
  114. private assertListAppsResponseData;
  115. }