• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * Indicates the profile file information of a bundle.
18 *
19 * @typedef AppProvisionInfo
20 * @syscap SystemCapability.BundleManager.BundleFramework.Core
21 * @systemapi
22 * @since 10
23 */
24export interface AppProvisionInfo {
25  /**
26   * Indicates the version code of the profile file.
27   *
28   * @type { number }
29   * @syscap SystemCapability.BundleManager.BundleFramework.Core
30   * @systemapi
31   * @since 10
32   */
33  readonly versionCode: number;
34
35  /**
36   * Indicates the version name of the profile file.
37   *
38   * @type { string }
39   * @syscap SystemCapability.BundleManager.BundleFramework.Core
40   * @systemapi
41   * @since 10
42   */
43  readonly versionName: string;
44
45  /**
46   * Indicates the uuid of the profile file.
47   *
48   * @type { string }
49   * @syscap SystemCapability.BundleManager.BundleFramework.Core
50   * @systemapi
51   * @since 10
52   */
53  readonly uuid: string;
54
55  /**
56   * Indicates the type of the profile file.
57   *
58   * @type { string }
59   * @syscap SystemCapability.BundleManager.BundleFramework.Core
60   * @systemapi
61   * @since 10
62   */
63  readonly type: string;
64
65  /**
66   * Indicates the app distribution type of the profile file.
67   *
68   * @type { string }
69   * @syscap SystemCapability.BundleManager.BundleFramework.Core
70   * @systemapi
71   * @since 10
72   */
73  readonly appDistributionType: string;
74
75  /**
76   * Indicates the validity of the profile file.
77   *
78   * @type { Validity }
79   * @syscap SystemCapability.BundleManager.BundleFramework.Core
80   * @systemapi
81   * @since 10
82   */
83  readonly validity: Validity;
84
85  /**
86   * Indicates the developer id of the profile file.
87   *
88   * @type { string }
89   * @syscap SystemCapability.BundleManager.BundleFramework.Core
90   * @systemapi
91   * @since 10
92   */
93  readonly developerId: string;
94
95  /**
96   * Indicates the distribution or development certificate of the profile file.
97   *
98   * @type { string }
99   * @syscap SystemCapability.BundleManager.BundleFramework.Core
100   * @systemapi
101   * @since 10
102   */
103  readonly certificate: string;
104
105  /**
106   * Indicates the apl of the profile file.
107   *
108   * @type { string }
109   * @syscap SystemCapability.BundleManager.BundleFramework.Core
110   * @systemapi
111   * @since 10
112   */
113  readonly apl: string;
114
115  /**
116   * Indicates the issuer of the profile file.
117   *
118   * @type { string }
119   * @syscap SystemCapability.BundleManager.BundleFramework.Core
120   * @systemapi
121   * @since 10
122   */
123  readonly issuer: string;
124}
125
126/**
127 * The validity of the profile file.
128 *
129 * @typedef Validity
130 * @syscap SystemCapability.BundleManager.BundleFramework.Core
131 * @systemapi
132 * @since 10
133 */
134export interface Validity {
135  /**
136   * Indicates the earliest validity of the profile file.
137   *
138   * @type { number }
139   * @syscap SystemCapability.BundleManager.BundleFramework.Core
140   * @systemapi
141   * @since 10
142   */
143  readonly notBefore: number;
144
145  /**
146   * Indicates the latest validity of the profile file.
147   *
148   * @type { number }
149   * @syscap SystemCapability.BundleManager.BundleFramework.Core
150   * @systemapi
151   * @since 10
152   */
153  readonly notAfter: number;
154}
155