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 | /**
|
18 | * This is the interface that defines the required continue/state URL with
|
19 | * optional Android and iOS bundle identifiers.
|
20 | */
|
21 | export interface ActionCodeSettings {
|
22 | /**
|
23 | * Defines the link continue/state URL, which has different meanings in
|
24 | * different contexts:
|
25 | * <ul>
|
26 | * <li>When the link is handled in the web action widgets, this is the deep
|
27 | * link in the `continueUrl` query parameter.</li>
|
28 | * <li>When the link is handled in the app directly, this is the `continueUrl`
|
29 | * query parameter in the deep link of the Dynamic Link.</li>
|
30 | * </ul>
|
31 | */
|
32 | url: string;
|
33 | /**
|
34 | * Whether to open the link via a mobile app or a browser.
|
35 | * The default is false. When set to true, the action code link is sent
|
36 | * as a Universal Link or Android App Link and is opened by the app if
|
37 | * installed. In the false case, the code is sent to the web widget first
|
38 | * and then redirects to the app if installed.
|
39 | */
|
40 | handleCodeInApp?: boolean;
|
41 | /**
|
42 | * Defines the iOS bundle ID. This will try to open the link in an iOS app if it
|
43 | * is installed.
|
44 | */
|
45 | iOS?: {
|
46 | /**
|
47 | * Defines the required iOS bundle ID of the app where the link should be
|
48 | * handled if the application is already installed on the device.
|
49 | */
|
50 | bundleId: string;
|
51 | };
|
52 | /**
|
53 | * Defines the Android package name. This will try to open the link in an
|
54 | * android app if it is installed. If `installApp` is passed, it specifies
|
55 | * whether to install the Android app if the device supports it and the app is
|
56 | * not already installed. If this field is provided without a `packageName`, an
|
57 | * error is thrown explaining that the `packageName` must be provided in
|
58 | * conjunction with this field. If `minimumVersion` is specified, and an older
|
59 | * version of the app is installed, the user is taken to the Play Store to
|
60 | * upgrade the app.
|
61 | */
|
62 | android?: {
|
63 | /**
|
64 | * Defines the required Android package name of the app where the link should be
|
65 | * handled if the Android app is installed.
|
66 | */
|
67 | packageName: string;
|
68 | /**
|
69 | * Whether to install the Android app if the device supports it and the app is
|
70 | * not already installed.
|
71 | */
|
72 | installApp?: boolean;
|
73 | /**
|
74 | * The Android minimum version if available. If the installed app is an older
|
75 | * version, the user is taken to the GOogle Play Store to upgrade the app.
|
76 | */
|
77 | minimumVersion?: string;
|
78 | };
|
79 | /**
|
80 | * Defines the dynamic link domain to use for the current link if it is to be
|
81 | * opened using Firebase Dynamic Links, as multiple dynamic link domains can be
|
82 | * configured per project. This field provides the ability to explicitly choose
|
83 | * configured per project. This fields provides the ability explicitly choose
|
84 | * one. If none is provided, the oldest domain is used by default.
|
85 | */
|
86 | dynamicLinkDomain?: string;
|
87 | }
|