1 | /*! firebase-admin v10.0.0 */
|
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 { AppMetadata, AppPlatform } from './app-metadata';
|
18 | /**
|
19 | * Metadata about a Firebase Android App.
|
20 | */
|
21 | export interface AndroidAppMetadata extends AppMetadata {
|
22 | platform: AppPlatform.ANDROID;
|
23 | /**
|
24 | * The canonical package name of the Android App, as would appear in the Google Play Developer
|
25 | * Console.
|
26 | *
|
27 | * @example
|
28 | * ```javascript
|
29 | * var packageName = androidAppMetadata.packageName;
|
30 | * ```
|
31 | */
|
32 | packageName: string;
|
33 | }
|
34 | /**
|
35 | * A reference to a Firebase Android app.
|
36 | *
|
37 | * Do not call this constructor directly. Instead, use {@link ProjectManagement.androidApp}.
|
38 | */
|
39 | export declare class AndroidApp {
|
40 | readonly appId: string;
|
41 | private readonly requestHandler;
|
42 | private readonly resourceName;
|
43 | /**
|
44 | * Retrieves metadata about this Android app.
|
45 | *
|
46 | * @returns A promise that resolves to the retrieved metadata about this Android app.
|
47 | */
|
48 | getMetadata(): Promise<AndroidAppMetadata>;
|
49 | /**
|
50 | * Sets the optional user-assigned display name of the app.
|
51 | *
|
52 | * @param newDisplayName - The new display name to set.
|
53 | *
|
54 | * @returns A promise that resolves when the display name has been set.
|
55 | */
|
56 | setDisplayName(newDisplayName: string): Promise<void>;
|
57 | /**
|
58 | * Gets the list of SHA certificates associated with this Android app in Firebase.
|
59 | *
|
60 | * @returns The list of SHA-1 and SHA-256 certificates associated with this Android app in
|
61 | * Firebase.
|
62 | */
|
63 | getShaCertificates(): Promise<ShaCertificate[]>;
|
64 | /**
|
65 | * Adds the given SHA certificate to this Android app.
|
66 | *
|
67 | * @param certificateToAdd - The SHA certificate to add.
|
68 | *
|
69 | * @returns A promise that resolves when the given certificate
|
70 | * has been added to the Android app.
|
71 | */
|
72 | addShaCertificate(certificateToAdd: ShaCertificate): Promise<void>;
|
73 | /**
|
74 | * Deletes the specified SHA certificate from this Android app.
|
75 | *
|
76 | * @param certificateToDelete - The SHA certificate to delete.
|
77 | *
|
78 | * @returns A promise that resolves when the specified
|
79 | * certificate has been removed from the Android app.
|
80 | */
|
81 | deleteShaCertificate(certificateToDelete: ShaCertificate): Promise<void>;
|
82 | /**
|
83 | * Gets the configuration artifact associated with this app.
|
84 | *
|
85 | * @returns A promise that resolves to the Android app's
|
86 | * Firebase config file, in UTF-8 string format. This string is typically
|
87 | * intended to be written to a JSON file that gets shipped with your Android
|
88 | * app.
|
89 | */
|
90 | getConfig(): Promise<string>;
|
91 | }
|
92 | /**
|
93 | * A SHA-1 or SHA-256 certificate.
|
94 | *
|
95 | * Do not call this constructor directly. Instead, use
|
96 | * [`projectManagement.shaCertificate()`](projectManagement.ProjectManagement#shaCertificate).
|
97 | */
|
98 | export declare class ShaCertificate {
|
99 | readonly shaHash: string;
|
100 | readonly resourceName?: string | undefined;
|
101 | /**
|
102 | * The SHA certificate type.
|
103 | *
|
104 | * @example
|
105 | * ```javascript
|
106 | * var certType = shaCertificate.certType;
|
107 | * ```
|
108 | */
|
109 | readonly certType: ('sha1' | 'sha256');
|
110 | }
|