1/* 2 * Copyright (c) 2022-2023 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 21import { DataAbilityHelper as _DataAbilityHelper } from './ability/dataAbilityHelper'; 22import { PacMap as _PacMap } from './ability/dataAbilityHelper'; 23import { DataAbilityOperation as _DataAbilityOperation } from './ability/dataAbilityOperation'; 24import { DataAbilityResult as _DataAbilityResult } from './ability/dataAbilityResult'; 25import { AbilityResult as _AbilityResult } from './ability/abilityResult'; 26import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; 27import { StartAbilityParameter as _StartAbilityParameter } from './ability/startAbilityParameter'; 28 29/** 30 * The class of an ability. 31 * 32 * @namespace ability 33 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 34 * @FAModelOnly 35 * @since 9 36 */ 37/** 38 * The class of an ability. 39 * 40 * @namespace ability 41 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 42 * @since 11 43 */ 44declare namespace ability { 45 /** 46 * DataAbilityHelper 47 * 48 * @typedef { _DataAbilityHelper } 49 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 50 * @FAModelOnly 51 * @since 9 52 */ 53 export type DataAbilityHelper = _DataAbilityHelper; 54 55 /** 56 * Defines a PacMap object for storing a series of values. 57 * 58 * @typedef { _PacMap } 59 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 60 * @FAModelOnly 61 * @since 9 62 */ 63 /** 64 * Defines a PacMap object for storing a series of values. 65 * 66 * @typedef { _PacMap } 67 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 68 * @since 11 69 */ 70 export type PacMap = _PacMap; 71 72 /** 73 * DataAbilityOperation secondary module.Define the DataAbility data operation method, 74 * which can be used as an input parameter for [executeBatch] to manipulate database information. 75 * 76 * @typedef { _DataAbilityOperation } 77 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 78 * @FAModelOnly 79 * @since 9 80 */ 81 export type DataAbilityOperation = _DataAbilityOperation; 82 83 /** 84 * DataAbilityResult secondary module.Define the DataAbility data operation result. 85 * When operating the database through [executeBatch], the operation result is returned 86 * using the DataAbility Result object. 87 * 88 * @typedef { _DataAbilityResult } 89 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 90 * @FAModelOnly 91 * @since 9 92 */ 93 export type DataAbilityResult = _DataAbilityResult; 94 95 /** 96 * AbilityResult secondary module.The result code and data returned after the ability is pulled 97 * up and exited can be defined. The ability result object returned after the ability is pulled 98 * up and exited can be obtained through [startAbilityForResult], and the ability object pulled up 99 * by startAbilityForResult can be returned through [terminateSelfWithResult]. 100 * 101 * @typedef { _AbilityResult } 102 * @syscap SystemCapability.Ability.AbilityBase 103 * @FAModelOnly 104 * @since 9 105 */ 106 export type AbilityResult = _AbilityResult; 107 108 /** 109 * ConnectOptions secondary module.As an input parameter when connecting to a specified backend service, 110 * used to receive state changes during the connection process 111 * 112 * @typedef { _ConnectOptions } 113 * @syscap SystemCapability.Ability.AbilityRuntime.Core 114 * @FAModelOnly 115 * @since 9 116 */ 117 export type ConnectOptions = _ConnectOptions; 118 119 /** 120 * StartAbilityParameter secondary module.Define the Start Ability parameter, which can be used as 121 * an input parameter to call [startAbility] to start the specified Ability. 122 * 123 * @typedef { _StartAbilityParameter } 124 * @syscap SystemCapability.Ability.AbilityRuntime.FAModel 125 * @FAModelOnly 126 * @since 9 127 */ 128 export type StartAbilityParameter = _StartAbilityParameter; 129} 130 131export default ability; 132