1 | /*! firebase-admin v10.0.0 */
|
2 | /*!
|
3 | * Copyright 2020 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 | /**
|
18 | * Firebase Instance ID service.
|
19 | *
|
20 | * @packageDocumentation
|
21 | */
|
22 | import { App } from '../app/index';
|
23 | import { InstanceId } from './instance-id';
|
24 | export { InstanceId };
|
25 | /**
|
26 | * Gets the {@link InstanceId} service for the default app or a given app.
|
27 | *
|
28 | * This API is deprecated. Developers are advised to use the
|
29 | * {@link firebase-admin.installations#getInstallations}
|
30 | * API to delete their instance IDs and Firebase installation IDs.
|
31 | *
|
32 | * `getInstanceId()` can be called with no arguments to access the default
|
33 | * app's `InstanceId` service or as `getInstanceId(app)` to access the
|
34 | * `InstanceId` service associated with a specific app.
|
35 | *
|
36 | * @example
|
37 | * ```javascript
|
38 | * // Get the Instance ID service for the default app
|
39 | * const defaultInstanceId = getInstanceId();
|
40 | * ```
|
41 | *
|
42 | * @example
|
43 | * ```javascript
|
44 | * // Get the Instance ID service for a given app
|
45 | * const otherInstanceId = getInstanceId(otherApp);
|
46 | *```
|
47 | *
|
48 | * This API is deprecated. Developers are advised to use the `admin.installations()`
|
49 | * API to delete their instance IDs and Firebase installation IDs.
|
50 | *
|
51 | * @param app - Optional app whose `InstanceId` service to
|
52 | * return. If not provided, the default `InstanceId` service will be
|
53 | * returned.
|
54 | *
|
55 | * @returns The default `InstanceId` service if
|
56 | * no app is provided or the `InstanceId` service associated with the
|
57 | * provided app.
|
58 | *
|
59 | * @deprecated Use {@link firebase-admin.installations#getInstallations} instead.
|
60 | */
|
61 | export declare function getInstanceId(app?: App): InstanceId;
|