1/* 2 * Copyright (c) 2022 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 * @file 18 * @kit AbilityKit 19 */ 20 21/** 22 * The bundle pack info class. 23 * 24 * @typedef BundlePackInfo 25 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 26 * @systemapi 27 * @since arkts {'1.1':'9', '1.2':'20'} 28 * @arkts 1.1&1.2 29 */ 30export interface BundlePackInfo { 31 /** 32 * This contains package information in pack.info 33 * 34 * @type { Array<PackageConfig> } 35 * @readonly 36 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 37 * @systemapi 38 * @since arkts {'1.1':'9', '1.2':'20'} 39 * @arkts 1.1&1.2 40 */ 41 readonly packages: Array<PackageConfig>; 42 43 /** 44 * This contains bundle summary information in pack.info 45 * 46 * @type { PackageSummary } 47 * @readonly 48 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 49 * @systemapi 50 * @since arkts {'1.1':'9', '1.2':'20'} 51 * @arkts 1.1&1.2 52 */ 53 readonly summary: PackageSummary; 54} 55 56/** 57 * PackageConfig: the package info class. 58 * 59 * @typedef PackageConfig 60 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 61 * @systemapi 62 * @since arkts {'1.1':'9', '1.2':'20'} 63 * @arkts 1.1&1.2 64 */ 65export interface PackageConfig { 66 /** 67 * Indicates the device types of this package 68 * 69 * @type { Array<string> } 70 * @readonly 71 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 72 * @systemapi 73 * @since arkts {'1.1':'9', '1.2':'20'} 74 * @arkts 1.1&1.2 75 */ 76 readonly deviceTypes: Array<string>; 77 78 /** 79 * Indicates the name of this package 80 * 81 * @type { string } 82 * @readonly 83 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 84 * @systemapi 85 * @since arkts {'1.1':'9', '1.2':'20'} 86 * @arkts 1.1&1.2 87 */ 88 readonly name: string; 89 90 /** 91 * Indicates the module type of this package 92 * 93 * @type { string } 94 * @readonly 95 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 96 * @systemapi 97 * @since arkts {'1.1':'9', '1.2':'20'} 98 * @arkts 1.1&1.2 99 */ 100 readonly moduleType: string; 101 102 /** 103 * Indicates whether this package is delivery and install 104 * 105 * @type { boolean } 106 * @readonly 107 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 108 * @systemapi 109 * @since arkts {'1.1':'9', '1.2':'20'} 110 * @arkts 1.1&1.2 111 */ 112 readonly deliveryWithInstall: boolean; 113} 114 115/** 116 * PackageSummary: the package summary class. 117 * 118 * @typedef PackageSummary 119 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 120 * @systemapi 121 * @since arkts {'1.1':'9', '1.2':'20'} 122 * @arkts 1.1&1.2 123 */ 124export interface PackageSummary { 125 /** 126 * Indicates the bundle config info of this package 127 * 128 * @type { BundleConfigInfo } 129 * @readonly 130 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 131 * @systemapi 132 * @since arkts {'1.1':'9', '1.2':'20'} 133 * @arkts 1.1&1.2 134 */ 135 readonly app: BundleConfigInfo; 136 137 /** 138 * Indicates the modules config info of this package 139 * 140 * @type { Array<ModuleConfigInfo> } 141 * @readonly 142 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 143 * @systemapi 144 * @since arkts {'1.1':'9', '1.2':'20'} 145 * @arkts 1.1&1.2 146 */ 147 readonly modules: Array<ModuleConfigInfo>; 148} 149 150/** 151 * BundleConfigInfo: the bundle summary class. 152 * 153 * @typedef BundleConfigInfo 154 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 155 * @systemapi 156 * @since arkts {'1.1':'9', '1.2':'20'} 157 * @arkts 1.1&1.2 158 */ 159export interface BundleConfigInfo { 160 /** 161 * Indicates the name of this bundle 162 * 163 * @type { string } 164 * @readonly 165 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 166 * @systemapi 167 * @since arkts {'1.1':'9', '1.2':'20'} 168 * @arkts 1.1&1.2 169 */ 170 readonly bundleName: string; 171 172 /** 173 * Indicates the bundle version 174 * 175 * @type { Version } 176 * @readonly 177 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 178 * @systemapi 179 * @since arkts {'1.1':'9', '1.2':'20'} 180 * @arkts 1.1&1.2 181 */ 182 readonly version: Version; 183} 184 185/** 186 * ExtensionAbility: the extension ability forms class. 187 * 188 * @typedef ExtensionAbility 189 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 190 * @systemapi 191 * @since arkts {'1.1':'9', '1.2':'20'} 192 * @arkts 1.1&1.2 193 */ 194export interface ExtensionAbility { 195 /** 196 * Indicates the name of this extension ability 197 * 198 * @type { string } 199 * @readonly 200 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 201 * @systemapi 202 * @since arkts {'1.1':'9', '1.2':'20'} 203 * @arkts 1.1&1.2 204 */ 205 readonly name: string; 206 207 /** 208 * Indicates the ability forms info 209 * 210 * @type { Array<AbilityFormInfo> } 211 * @readonly 212 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 213 * @systemapi 214 * @since arkts {'1.1':'9', '1.2':'20'} 215 * @arkts 1.1&1.2 216 */ 217 readonly forms: Array<AbilityFormInfo>; 218} 219 220/** 221 * ModuleConfigInfo: the module summary of a bundle. 222 * 223 * @typedef ModuleConfigInfo 224 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 225 * @systemapi 226 * @since arkts {'1.1':'9', '1.2':'20'} 227 * @arkts 1.1&1.2 228 */ 229export interface ModuleConfigInfo { 230 /** 231 * Indicates the name of main ability 232 * 233 * @type { string } 234 * @readonly 235 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 236 * @systemapi 237 * @since arkts {'1.1':'9', '1.2':'20'} 238 * @arkts 1.1&1.2 239 */ 240 readonly mainAbility: string; 241 242 /** 243 * Indicates the api version 244 * 245 * @type { ApiVersion } 246 * @readonly 247 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 248 * @systemapi 249 * @since arkts {'1.1':'9', '1.2':'20'} 250 * @arkts 1.1&1.2 251 */ 252 readonly apiVersion: ApiVersion; 253 254 /** 255 * Indicates the devices type 256 * 257 * @type { Array<string> } 258 * @readonly 259 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 260 * @systemapi 261 * @since arkts {'1.1':'9', '1.2':'20'} 262 * @arkts 1.1&1.2 263 */ 264 readonly deviceTypes: Array<string>; 265 266 /** 267 * Indicates the module distro info 268 * 269 * @type { ModuleDistroInfo } 270 * @readonly 271 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 272 * @systemapi 273 * @since arkts {'1.1':'9', '1.2':'20'} 274 * @arkts 1.1&1.2 275 */ 276 readonly distro: ModuleDistroInfo; 277 278 /** 279 * Indicates the abilities info of this module 280 * 281 * @type { Array<ModuleAbilityInfo> } 282 * @readonly 283 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 284 * @systemapi 285 * @since arkts {'1.1':'9', '1.2':'20'} 286 * @arkts 1.1&1.2 287 */ 288 readonly abilities: Array<ModuleAbilityInfo>; 289 290 /** 291 * Indicates extension abilities info of this module 292 * 293 * @type { Array<ExtensionAbility> } 294 * @readonly 295 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 296 * @systemapi 297 * @since arkts {'1.1':'9', '1.2':'20'} 298 * @arkts 1.1&1.2 299 */ 300 readonly extensionAbilities: Array<ExtensionAbility>; 301} 302 303/** 304 * ModuleDistroInfo: the bundle info summary class. 305 * 306 * @typedef ModuleDistroInfo 307 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 308 * @systemapi 309 * @since arkts {'1.1':'9', '1.2':'20'} 310 * @arkts 1.1&1.2 311 */ 312export interface ModuleDistroInfo { 313 /** 314 * Indicates whether this package is delivered with install 315 * 316 * @type { boolean } 317 * @readonly 318 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 319 * @systemapi 320 * @since arkts {'1.1':'9', '1.2':'20'} 321 * @arkts 1.1&1.2 322 */ 323 readonly deliveryWithInstall: boolean; 324 325 /** 326 * Indicates whether this package is free install 327 * 328 * @type { boolean } 329 * @readonly 330 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 331 * @systemapi 332 * @since arkts {'1.1':'9', '1.2':'20'} 333 * @arkts 1.1&1.2 334 */ 335 readonly installationFree: boolean; 336 337 /** 338 * Indicates the module name 339 * 340 * @type { string } 341 * @readonly 342 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 343 * @systemapi 344 * @since arkts {'1.1':'9', '1.2':'20'} 345 * @arkts 1.1&1.2 346 */ 347 readonly moduleName: string; 348 349 /** 350 * Indicates the module type 351 * 352 * @type { string } 353 * @readonly 354 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 355 * @systemapi 356 * @since arkts {'1.1':'9', '1.2':'20'} 357 * @arkts 1.1&1.2 358 */ 359 readonly moduleType: string; 360} 361 362/** 363 * ModuleAbilityInfo: the ability info of a module. 364 * 365 * @typedef ModuleAbilityInfo 366 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 367 * @systemapi 368 * @since arkts {'1.1':'9', '1.2':'20'} 369 * @arkts 1.1&1.2 370 */ 371export interface ModuleAbilityInfo { 372 /** 373 * Indicates the name of this module ability 374 * 375 * @type { string } 376 * @readonly 377 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 378 * @systemapi 379 * @since arkts {'1.1':'9', '1.2':'20'} 380 * @arkts 1.1&1.2 381 */ 382 readonly name: string; 383 384 /** 385 * Indicates the label of this module ability 386 * 387 * @type { string } 388 * @readonly 389 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 390 * @systemapi 391 * @since arkts {'1.1':'9', '1.2':'20'} 392 * @arkts 1.1&1.2 393 */ 394 readonly label: string; 395 396 /** 397 * Indicates whether this ability can be called by other abilities 398 * 399 * @type { boolean } 400 * @readonly 401 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 402 * @systemapi 403 * @since arkts {'1.1':'9', '1.2':'20'} 404 * @arkts 1.1&1.2 405 */ 406 readonly exported: boolean; 407 408 /** 409 * Indicates the ability forms info 410 * 411 * @type { Array<AbilityFormInfo> } 412 * @readonly 413 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 414 * @systemapi 415 * @since arkts {'1.1':'9', '1.2':'20'} 416 * @arkts 1.1&1.2 417 */ 418 readonly forms: Array<AbilityFormInfo>; 419} 420 421/** 422 * AbilityFormInfo: the form info of an ability. 423 * 424 * @typedef AbilityFormInfo 425 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 426 * @systemapi 427 * @since arkts {'1.1':'9', '1.2':'20'} 428 * @arkts 1.1&1.2 429 */ 430export interface AbilityFormInfo { 431 /** 432 * Indicates the name of this ability 433 * 434 * @type { string } 435 * @readonly 436 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 437 * @systemapi 438 * @since arkts {'1.1':'9', '1.2':'20'} 439 * @arkts 1.1&1.2 440 */ 441 readonly name: string; 442 443 /** 444 * Indicates the type of this ability 445 * 446 * @type { string } 447 * @readonly 448 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 449 * @systemapi 450 * @since arkts {'1.1':'9', '1.2':'20'} 451 * @arkts 1.1&1.2 452 */ 453 readonly type: string; 454 455 /** 456 * Indicates whether this form is enabled update 457 * 458 * @type { boolean } 459 * @readonly 460 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 461 * @systemapi 462 * @since arkts {'1.1':'9', '1.2':'20'} 463 * @arkts 1.1&1.2 464 */ 465 readonly updateEnabled: boolean; 466 467 /** 468 * Indicates the scheduled update time 469 * 470 * @type { string } 471 * @readonly 472 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 473 * @systemapi 474 * @since arkts {'1.1':'9', '1.2':'20'} 475 * @arkts 1.1&1.2 476 */ 477 readonly scheduledUpdateTime: string; 478 479 /** 480 * Indicates the update duration 481 * 482 * @type { number } 483 * @readonly 484 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 485 * @systemapi 486 * @since arkts {'1.1':'9', '1.2':'20'} 487 * @arkts 1.1&1.2 488 */ 489 readonly updateDuration: number; 490 491 /** 492 * Indicates the ability support dimensions 493 * 494 * @type { Array<string> } 495 * @readonly 496 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 497 * @systemapi 498 * @since arkts {'1.1':'9', '1.2':'20'} 499 * @arkts 1.1&1.2 500 */ 501 readonly supportDimensions: Array<string>; 502 503 /** 504 * Indicates the ability default dimension 505 * 506 * @type { string } 507 * @readonly 508 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 509 * @systemapi 510 * @since arkts {'1.1':'9', '1.2':'20'} 511 * @arkts 1.1&1.2 512 */ 513 readonly defaultDimension: string; 514} 515 516/** 517 * Version: the bundle version class. 518 * 519 * @typedef Version 520 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 521 * @systemapi 522 * @since arkts {'1.1':'9', '1.2':'20'} 523 * @arkts 1.1&1.2 524 */ 525export interface Version { 526 /** 527 * Indicates the min compatible code of this version 528 * 529 * @type { number } 530 * @readonly 531 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 532 * @systemapi 533 * @since arkts {'1.1':'9', '1.2':'20'} 534 * @arkts 1.1&1.2 535 */ 536 readonly minCompatibleVersionCode: number; 537 538 /** 539 * Indicates the name of this version 540 * 541 * @type { string } 542 * @readonly 543 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 544 * @systemapi 545 * @since arkts {'1.1':'9', '1.2':'20'} 546 * @arkts 1.1&1.2 547 */ 548 readonly name: string; 549 550 /** 551 * Indicates the code of this version 552 * 553 * @type { number } 554 * @readonly 555 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 556 * @systemapi 557 * @since arkts {'1.1':'9', '1.2':'20'} 558 * @arkts 1.1&1.2 559 */ 560 readonly code: number; 561} 562 563/** 564 * ApiVersion: the bundle Api version class. 565 * 566 * @typedef ApiVersion 567 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 568 * @systemapi 569 * @since arkts {'1.1':'9', '1.2':'20'} 570 * @arkts 1.1&1.2 571 */ 572export interface ApiVersion { 573 /** 574 * Indicates the release type of the api 575 * 576 * @type { string } 577 * @readonly 578 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 579 * @systemapi 580 * @since arkts {'1.1':'9', '1.2':'20'} 581 * @arkts 1.1&1.2 582 */ 583 readonly releaseType: string; 584 585 /** 586 * Indicates the compatible version code of the api 587 * 588 * @type { number } 589 * @readonly 590 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 591 * @systemapi 592 * @since arkts {'1.1':'9', '1.2':'20'} 593 * @arkts 1.1&1.2 594 */ 595 readonly compatible: number; 596 597 /** 598 * Indicates the target version code of the api 599 * 600 * @type { number } 601 * @readonly 602 * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall 603 * @systemapi 604 * @since arkts {'1.1':'9', '1.2':'20'} 605 * @arkts 1.1&1.2 606 */ 607 readonly target: number; 608} 609