1/* 2 * Copyright (c) 2024 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 ExtensionContext from './ExtensionContext'; 22import type CustomData from './CustomData'; 23 24/** 25 * The context of auto fill extension. It allows access to AutoFillExtension-specific resources. 26 * 27 * @extends ExtensionContext 28 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 29 * @systemapi 30 * @stagemodelonly 31 * @since 11 32 */ 33export default class AutoFillExtensionContext extends ExtensionContext { 34 /** 35 * Reload autoFillExtension in modal window. 36 * 37 * @param { CustomData } customData - User defined data. When the modal window of AutoFillExtension 38 * needs to be raised again, pass this parameter to the application framework. 39 * @returns { Promise<void> } The promise returned by the function. 40 * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. 41 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 42 * @throws { BusinessError } 16000011 - The context does not exist. 43 * @throws { BusinessError } 16000050 - Internal error. 44 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore 45 * @systemapi 46 * @stagemodelonly 47 * @since 13 48 */ 49 reloadInModal(customData: CustomData): Promise<void>; 50}