/* * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * The bundle pack info class. * * @typedef BundlePackInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface BundlePackInfo { /** * This contains package information in pack.info * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly packages: Array; /** * This contains bundle summary information in pack.info * * @type { PackageSummary } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly summary: PackageSummary; } /** * PackageConfig: the package info class. * * @typedef PackageConfig * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface PackageConfig { /** * Indicates the device types of this package * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly deviceTypes: Array; /** * Indicates the name of this package * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly name: string; /** * Indicates the module type of this package * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly moduleType: string; /** * Indicates whether this package is delivery and install * * @type { boolean } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly deliveryWithInstall: boolean; } /** * PackageSummary: the package summary class. * * @typedef PackageSummary * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface PackageSummary { /** * Indicates the bundle config info of this package * * @type { BundleConfigInfo } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly app: BundleConfigInfo; /** * Indicates the modules config info of this package * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly modules: Array; } /** * BundleConfigInfo: the bundle summary class. * * @typedef BundleConfigInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface BundleConfigInfo { /** * Indicates the name of this bundle * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly bundleName: string; /** * Indicates the bundle version * * @type { Version } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly version: Version; } /** * ExtensionAbility: the extension ability forms class. * * @typedef ExtensionAbility * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface ExtensionAbility { /** * Indicates the name of this extension ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly name: string; /** * Indicates the ability forms info * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly forms: Array; } /** * ModuleConfigInfo: the module summary of a bundle. * * @typedef ModuleConfigInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface ModuleConfigInfo { /** * Indicates the name of main ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly mainAbility: string; /** * Indicates the api version * * @type { ApiVersion } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly apiVersion: ApiVersion; /** * Indicates the devices type * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly deviceTypes: Array; /** * Indicates the module distro info * * @type { ModuleDistroInfo } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly distro: ModuleDistroInfo; /** * Indicates the abilities info of this module * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly abilities: Array; /** * Indicates extension abilities info of this module * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly extensionAbilities: Array; } /** * ModuleDistroInfo: the bundle info summary class. * * @typedef ModuleDistroInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface ModuleDistroInfo { /** * Indicates whether this package is delivered with install * * @type { boolean } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly deliveryWithInstall: boolean; /** * Indicates whether this package is free install * * @type { boolean } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly installationFree: boolean; /** * Indicates the module name * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly moduleName: string; /** * Indicates the module type * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly moduleType: string; } /** * ModuleAbilityInfo: the ability info of a module. * * @typedef ModuleAbilityInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface ModuleAbilityInfo { /** * Indicates the name of this module ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly name: string; /** * Indicates the label of this module ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly label: string; /** * Indicates whether this ability can be called by other abilities * * @type { boolean } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly exported: boolean; /** * Indicates the ability forms info * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly forms: Array; } /** * AbilityFormInfo: the form info of an ability. * * @typedef AbilityFormInfo * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface AbilityFormInfo { /** * Indicates the name of this ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly name: string; /** * Indicates the type of this ability * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly type: string; /** * Indicates whether this form is enabled update * * @type { boolean } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly updateEnabled: boolean; /** * Indicates the scheduled update time * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly scheduledUpdateTime: string; /** * Indicates the update duration * * @type { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly updateDuration: number; /** * Indicates the ability support dimensions * * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly supportDimensions: Array; /** * Indicates the ability default dimension * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly defaultDimension: string; } /** * Version: the bundle version class. * * @typedef Version * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface Version { /** * Indicates the min compatible code of this version * * @type { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly minCompatibleVersionCode: number; /** * Indicates the name of this version * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly name: string; /** * Indicates the code of this version * * @type { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly code: number; } /** * ApiVersion: the bundle Api version class. * * @typedef ApiVersion * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ export interface ApiVersion { /** * Indicates the release type of the api * * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly releaseType: string; /** * Indicates the compatible version code of the api * * @type { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly compatible: number; /** * Indicates the target version code of the api * * @type { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi * @since 9 */ readonly target: number; }