• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# BundlePackInfo (System API)
2
3The **BundlePackInfo** module provides information in the **pack.info** file. The information can be obtained using [freeInstall.getBundlePackInfo](js-apis-freeInstall-sys.md#getbundlepackinfo).
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8>
9> The APIs provided by this module are system APIs.
10
11## BundlePackInfo
12
13**System API**: This is a system API.
14
15**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
16
17| Name    | Type                                   | Read-Only| Optional| Description                     |
18| -------- | --------------------------------------- | ---- | ---- | ------------------------- |
19| packages | Array\<[PackageConfig](#packageconfig)> | Yes  | No  | Package configuration information in the **pack.info** file.      |
20| summary  | [PackageSummary](#packagesummary)       | Yes  | No  | Package summary information in the **pack.info** file.|
21
22## PackageConfig
23
24**System API**: This is a system API.
25
26**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
27
28| Name               | Type          | Read-Only| Optional| Description                                                        |
29| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ |
30| deviceTypes          | Array\<string> | Yes  | No  | Device types supported by the bundle.                                      |
31| name                | string         | Yes  | No  | Bundle name.                                                  |
32| moduleType          | string         | Yes  | No  | Module type of the bundle.                                            |
33| deliveryWithInstall | boolean        | Yes  | No  | Whether the installation should occur during user-initiated installation. The value **true** means that the installation should occur during user-initiated installation, and **false** means the opposite.|
34
35## PackageSummary
36
37**System API**: This is a system API.
38
39**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
40
41| Name   | Type                                         | Read-Only| Optional| Description                |
42| ------- | --------------------------------------------- | ---- | ---- | -------------------- |
43| app     | [BundleConfigInfo](#bundleconfiginfo)         | Yes  | No  | Bundle configuration information.      |
44| modules | Array\<[ModuleConfigInfo](#moduleconfiginfo)> | Yes  | No  | Module configuration information of the bundle.|
45
46## BundleConfigInfo
47
48**System API**: This is a system API.
49
50**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
51
52| Name      | Type               | Read-Only| Optional| Description                                  |
53| ---------- | ------------------- | ---- | ---- | -------------------------------------- |
54| bundleName | string              | Yes  | No  | Bundle name. It uniquely identifies an application.|
55| version    | [Version](#version) | Yes  | No  | Bundle version.                            |
56
57## ModuleConfigInfo
58
59**System API**: This is a system API.
60
61**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
62
63| Name              | Type                                             | Read-Only| Optional| Description                              |
64| ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- |
65| mainAbility | string | Yes| No| Name of the main ability.|
66| apiVersion         | [ApiVersion](#apiversion)                         | Yes  | No  | API version of the module.                 |
67| deviceTypes         | Array\<string>                                    | Yes  | No  | Device types supported by the module.                |
68| distro             | [ModuleDistroInfo](#moduledistroinfo)             | Yes  | No  | Distribution information of the module.                |
69| abilities          | Array\<[ModuleAbilityInfo](#moduleabilityinfo)>   | Yes  | No  | Ability information of the module.              |
70| extensionAbilities | Array\<[ExtensionAbility](#extensionability)> | Yes  | No  | ExtensionAbility information of the module.|
71
72## ModuleDistroInfo
73
74**System API**: This is a system API.
75
76**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
77
78| Name               | Type   | Read-Only| Optional| Description                                                        |
79| ------------------- | ------- | ---- | ---- | ------------------------------------------------------------ |
80| deliveryWithInstall | boolean | Yes  | No  | Whether the installation should occur during user-initiated installation. The value **true** means that the installation should occur during user-initiated installation, and **false** means the opposite.|
81| installationFree    | boolean | Yes  | No  | Whether the HAP file supports the installation-free feature. The value **true** means that the HAP file supports the installation-free feature and meets installation-free constraints, and **false** means the opposite.|
82| moduleName          | string  | Yes  | No  | Module name.                                                |
83| moduleType          | string  | Yes  | No  | Module type.                                                |
84
85## ModuleAbilityInfo
86
87**System API**: This is a system API.
88
89**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
90
91| Name   | Type                                       | Read-Only| Optional| Description                                                        |
92| ------- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
93| name    | string                                      | Yes  | No  | Name of the ability. The name must be unique in the bundle.           |
94| label   | string                                      | Yes  | No  | Name of the ability displayed to users. The value is a resource index to names in multiple languages.|
95| exported | boolean                                     | Yes  | No  | Whether the ability can be invoked by other applications. The value **true** means that it can be invoked by other applications, and the value **false** means the opposite.|
96| forms   | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes  | No  | Widget information.                                                  |
97
98## ExtensionAbility
99
100**System API**: This is a system API.
101
102**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
103
104| Name | Type                                       | Read-Only| Optional| Description                                                        |
105| ----- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
106| name | string | Yes| No| Name of the ExtensionAbility.|
107| forms | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes  | No  | Widget information.|
108
109## AbilityFormInfo
110
111**System API**: This is a system API.
112
113**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
114
115| Name               | Type          | Read-Only| Optional| Description                                                        |
116| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ |
117| name                | string         | Yes  | No  | Widget name.                                           |
118| type                | string         | Yes  | No  | Widget type.                                           |
119| updateEnabled       | boolean        | Yes  | No  | Whether the widget supports periodic update. The value **true** means that the widget supports periodic update, and **false** means the opposite.|
120| scheduledUpdateTime | string         | Yes  | No  | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute.        |
121| updateDuration      | number         | Yes  | No  | Interval to update the widget. The unit is 30 minutes. The value is a multiple of 30. A widget can be updated at a specified interval (**updateDuration**) or at the scheduled time (**scheduledUpdateTime**). If both are configured, **updateDuration** takes precedence.|
122| supportDimensions   | Array\<string> | Yes  | No  | Dimensions of the widget. The value can be **1\*2**, **2\*2**, **2\*4**, **4\*4**, or a combination of these options. At least one option must be specified when defining the widget.|
123| defaultDimension    | string         | Yes  | No  | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.|
124
125## ApiVersion
126
127**System API**: This is a system API.
128
129**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
130
131| Name       | Type  | Read-Only| Optional| Description                |
132| ----------- | ------ | ---- | ---- | -------------------- |
133| releaseType | string | Yes  | No  | Name of the API version.        |
134| compatible  | number | Yes  | No  | Minimum API version.|
135| target      | number | Yes  | No  | Target API version.        |
136
137## Version
138
139**System API**: This is a system API.
140
141**System capability**: SystemCapability.BundleManager.BundleFramework.FreeInstall
142
143| Name                    | Type  | Read-Only| Optional| Description                                                        |
144| ------------------------ | ------ | ---- | ---- | ------------------------------------------------------------ |
145| minCompatibleVersionCode | number | Yes  | No  | Minimum compatible version of the bundle. It is used to check whether the bundle is compatible with a version on other devices in the cross-device scenario. The value is a 32-bit non-negative integer.|
146| name                     | string | Yes  | No  | Version number of the bundle visible to users.                      |
147| code                     | number | Yes  | No  | Version number of the bundle used only for bundle management. The value is a 32-bit non-negative integer. It is used only to determine whether a version is later than another version. A larger value indicates a later version.|
148