1/* 2 * Copyright (c) 2025 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 16import { ApplicationInfo } from 'bundleManager.ApplicationInfo'; 17import { HapModuleInfo, RouterItem } from 'bundleManager.HapModuleInfo'; 18import bundleManager from '@ohos.bundle.bundleManager'; 19 20export interface BundleInfo { 21 readonly name: string; 22 readonly vendor: string; 23 readonly versionCode: number; 24 readonly versionName: string; 25 readonly minCompatibleVersionCode: number; 26 readonly targetVersion: number; 27 readonly appInfo: ApplicationInfo; 28 readonly hapModulesInfo: Array<HapModuleInfo>; 29 readonly reqPermissionDetails: Array<ReqPermissionDetail>; 30 readonly permissionGrantStates: Array<bundleManager.PermissionGrantState>; 31 readonly signatureInfo: SignatureInfo; 32 readonly installTime: number; 33 readonly updateTime: number; 34 readonly routerMap: Array<RouterItem>; 35 readonly appIndex: number; 36 readonly firstInstallTime?: number; 37} 38 39export interface ReqPermissionDetail { 40 name: string; 41 moduleName: string; 42 reason: string; 43 reasonId: number; 44 usedScene: UsedScene; 45} 46 47export interface UsedScene { 48 abilities: Array<string>; 49 when: string; 50} 51 52export interface SignatureInfo { 53 readonly appId: string; 54 readonly fingerprint: string; 55 readonly appIdentifier: string; 56 readonly certificate?: string; 57} 58 59export interface AppCloneIdentity { 60 readonly bundleName: string; 61 readonly appIndex: number; 62}