1/* 2 * Copyright (c) 2024 - 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 16/** 17 * Record the module in the module.json5. 18 */ 19export interface moduleJson5Module { 20 name: string; 21 type: string; 22 description: string; 23 mainElement: string; 24 deviceTypes: string[]; 25 deliveryWithInstall: boolean; 26 installationFree: boolean; 27 abilities: moduleAbility[]; 28 extensionAbilities: extensionAbility[]; 29} 30 31/** 32 * Record the ability in the module. 33 */ 34export interface moduleAbility { 35 name: string; 36 srcEntry: string; 37 description: string; 38 icon: string; 39 label: string; 40 startWindowIcon: string; 41 startWindowBackground: string; 42 exported: boolean; 43 skills: abilitySkill[]; 44} 45 46/** 47 * Record the skill in the ability. 48 */ 49interface abilitySkill { 50 entities: string[]; 51 actions: string[]; 52} 53 54/** 55 * Record the extensionAbility in the module. 56 */ 57export interface extensionAbility { 58 name: string; 59 srcEntry: string; 60 description: string; 61 icon: string; 62 label: string; 63 type: string; 64 metadata: extensionAbilityMetadata[]; 65} 66 67/** 68 * Record the metadata in the extensionAbility. 69 */ 70interface extensionAbilityMetadata { 71 name: string; 72 resource: string; 73} 74 75/** 76 * Record the app in the app.json5. 77 */ 78export interface appJson5App { 79 bundleName: string; 80 vendor: string; 81 versionCode: number; 82 versionName: string; 83 devicetypes: string[]; 84 icon: string; 85 label: string; 86}