161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit FormKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base'; 2261847f8eSopenharmony_ciimport { Callback } from './@ohos.base'; 2361847f8eSopenharmony_ciimport Want from './@ohos.app.ability.Want'; 2461847f8eSopenharmony_ciimport formInfo from './@ohos.app.form.formInfo'; 2561847f8eSopenharmony_ci 2661847f8eSopenharmony_ci/** 2761847f8eSopenharmony_ci * Interface of formHost. 2861847f8eSopenharmony_ci * 2961847f8eSopenharmony_ci * @namespace formHost 3061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 3161847f8eSopenharmony_ci * @systemapi 3261847f8eSopenharmony_ci * @since 9 3361847f8eSopenharmony_ci */ 3461847f8eSopenharmony_cideclare namespace formHost { 3561847f8eSopenharmony_ci /** 3661847f8eSopenharmony_ci * Add a form. 3761847f8eSopenharmony_ci * <p>You can use this method to create a theme form.</p> 3861847f8eSopenharmony_ci * 3961847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 4061847f8eSopenharmony_ci * @param { Want } want - Indicates want of the form. 4161847f8eSopenharmony_ci * @returns { Promise<formInfo.RunningFormInfo> } Return the form info. 4261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 4361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 4461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 4561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 4661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 4761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 4861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 4961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 5061847f8eSopenharmony_ci * @systemapi 5161847f8eSopenharmony_ci * @stagemodelonly 5261847f8eSopenharmony_ci * @since 12 5361847f8eSopenharmony_ci */ 5461847f8eSopenharmony_ci function addForm(want: Want): Promise<formInfo.RunningFormInfo>; 5561847f8eSopenharmony_ci 5661847f8eSopenharmony_ci /** 5761847f8eSopenharmony_ci * Deletes an obtained form by its ID. 5861847f8eSopenharmony_ci * <p>After this method is called, the form won't be available for use by the application and the Form Manager 5961847f8eSopenharmony_ci * Service no longer keeps the cache information about the form.</p> 6061847f8eSopenharmony_ci * 6161847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 6261847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 6361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of deleteForm. 6461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 6561847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 6661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 6761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 6861847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 6961847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 7061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 7161847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 7261847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 7361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 7461847f8eSopenharmony_ci * @systemapi 7561847f8eSopenharmony_ci * @since 9 7661847f8eSopenharmony_ci */ 7761847f8eSopenharmony_ci function deleteForm(formId: string, callback: AsyncCallback<void>): void; 7861847f8eSopenharmony_ci 7961847f8eSopenharmony_ci /** 8061847f8eSopenharmony_ci * Deletes an obtained form by its ID. 8161847f8eSopenharmony_ci * <p>After this method is called, the form won't be available for use by the application and the Form Manager 8261847f8eSopenharmony_ci * Service no longer keeps the cache information about the form.</p> 8361847f8eSopenharmony_ci * 8461847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 8561847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 8661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 8761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 8861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 8961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 9061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 9161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 9261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 9361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 9461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 9561847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 9661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 9761847f8eSopenharmony_ci * @systemapi 9861847f8eSopenharmony_ci * @since 9 9961847f8eSopenharmony_ci */ 10061847f8eSopenharmony_ci function deleteForm(formId: string): Promise<void>; 10161847f8eSopenharmony_ci 10261847f8eSopenharmony_ci /** 10361847f8eSopenharmony_ci * Releases an obtained form by its ID. 10461847f8eSopenharmony_ci * <p>After this method is called, the form won't be available for use by the application, but the Form Manager 10561847f8eSopenharmony_ci * Service still keeps the cache information about the form, so that the application can quickly obtain it based on 10661847f8eSopenharmony_ci * the {@code formId}.</p> 10761847f8eSopenharmony_ci * 10861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 10961847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID 11061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of releaseForm. 11161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 11261847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 11361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 11461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 11561847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 11661847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 11761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 11861847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 11961847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 12061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 12161847f8eSopenharmony_ci * @systemapi 12261847f8eSopenharmony_ci * @since 9 12361847f8eSopenharmony_ci */ 12461847f8eSopenharmony_ci function releaseForm(formId: string, callback: AsyncCallback<void>): void; 12561847f8eSopenharmony_ci 12661847f8eSopenharmony_ci /** 12761847f8eSopenharmony_ci * Releases an obtained form by its ID. 12861847f8eSopenharmony_ci * <p>After this method is called, the form won't be available for use by the application, but the Form Manager 12961847f8eSopenharmony_ci * Service still keeps the cache information about the form, so that the application can quickly obtain it based on 13061847f8eSopenharmony_ci * the {@code formId}.</p> 13161847f8eSopenharmony_ci * 13261847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 13361847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID 13461847f8eSopenharmony_ci * @param { boolean } isReleaseCache - Indicates whether release cache or not. 13561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of releaseForm. 13661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 13761847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 13861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 13961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 14061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 14161847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 14261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 14361847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 14461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 14561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 14661847f8eSopenharmony_ci * @systemapi 14761847f8eSopenharmony_ci * @since 9 14861847f8eSopenharmony_ci */ 14961847f8eSopenharmony_ci function releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<void>): void; 15061847f8eSopenharmony_ci 15161847f8eSopenharmony_ci /** 15261847f8eSopenharmony_ci * Releases an obtained form by its ID. 15361847f8eSopenharmony_ci * <p>After this method is called, the form won't be available for use by the application, but the Form Manager 15461847f8eSopenharmony_ci * Service still keeps the cache information about the form, so that the application can quickly obtain it based on 15561847f8eSopenharmony_ci * the {@code formId}.</p> 15661847f8eSopenharmony_ci * 15761847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 15861847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID 15961847f8eSopenharmony_ci * @param { boolean } [isReleaseCache] - Indicates whether release cache or not. 16061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 16161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 16261847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 16361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 16461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 16561847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 16661847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 16761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 16861847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 16961847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 17061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 17161847f8eSopenharmony_ci * @systemapi 17261847f8eSopenharmony_ci * @since 9 17361847f8eSopenharmony_ci */ 17461847f8eSopenharmony_ci function releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>; 17561847f8eSopenharmony_ci 17661847f8eSopenharmony_ci /** 17761847f8eSopenharmony_ci * Requests for form update. 17861847f8eSopenharmony_ci * <p>This method must be called when the application has detected that a system setting item (such as the language, 17961847f8eSopenharmony_ci * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form 18061847f8eSopenharmony_ci * provider automatically updates the form data (if there is any update) through the form framework, with the update 18161847f8eSopenharmony_ci * process being unperceivable by the application.</p> 18261847f8eSopenharmony_ci * 18361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 18461847f8eSopenharmony_ci * @param { string } formId - Indicates the ID of the form to update. 18561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestForm. 18661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 18761847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 18861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 18961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 19061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 19161847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 19261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 19361847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 19461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 19561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 19661847f8eSopenharmony_ci * @systemapi 19761847f8eSopenharmony_ci * @since 9 19861847f8eSopenharmony_ci */ 19961847f8eSopenharmony_ci function requestForm(formId: string, callback: AsyncCallback<void>): void; 20061847f8eSopenharmony_ci 20161847f8eSopenharmony_ci /** 20261847f8eSopenharmony_ci * Requests for form update. 20361847f8eSopenharmony_ci * <p>This method must be called when the application has detected that a system setting item (such as the language, 20461847f8eSopenharmony_ci * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form 20561847f8eSopenharmony_ci * provider automatically updates the form data (if there is any update) through the form framework, with the update 20661847f8eSopenharmony_ci * process being unperceivable by the application.</p> 20761847f8eSopenharmony_ci * 20861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 20961847f8eSopenharmony_ci * @param { string } formId - Indicates the ID of the form to update. 21061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 21161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 21261847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 21361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 21461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 21561847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 21661847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 21761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 21861847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 21961847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 22061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 22161847f8eSopenharmony_ci * @systemapi 22261847f8eSopenharmony_ci * @since 9 22361847f8eSopenharmony_ci */ 22461847f8eSopenharmony_ci function requestForm(formId: string): Promise<void>; 22561847f8eSopenharmony_ci 22661847f8eSopenharmony_ci /** 22761847f8eSopenharmony_ci * Requests for form update. 22861847f8eSopenharmony_ci * <p>This method must be called when the application has detected that a system setting item (such as the language, 22961847f8eSopenharmony_ci * resolution, or screen orientation) being listened for has changed. Upon receiving the update request, the form 23061847f8eSopenharmony_ci * provider automatically updates the form data (if there is any update) through the form framework, with the update 23161847f8eSopenharmony_ci * process being unperceivable by the application.</p> 23261847f8eSopenharmony_ci * 23361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 23461847f8eSopenharmony_ci * @param { string } formId - Indicates the ID of the form to update. 23561847f8eSopenharmony_ci * @param { Record<string, Object> } [wantParams] - Indicates want params of the form to update. 23661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 23761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 23861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 23961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 24061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 24161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 24261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 24361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 24461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 24561847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 24661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 24761847f8eSopenharmony_ci * @systemapi 24861847f8eSopenharmony_ci * @since 12 24961847f8eSopenharmony_ci */ 25061847f8eSopenharmony_ci function requestFormWithParams(formId: string, wantParams?: Record<string, Object>): Promise<void>; 25161847f8eSopenharmony_ci 25261847f8eSopenharmony_ci /** 25361847f8eSopenharmony_ci * Converts a specified temporary form that has been obtained by the application into a normal form. 25461847f8eSopenharmony_ci * 25561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 25661847f8eSopenharmony_ci * @param { string } formId - Indicates the ID of the temporary form to convert. 25761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of castToNormalForm. 25861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 25961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 26061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 26161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 26261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 26361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 26461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 26561847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. 26661847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 26761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 26861847f8eSopenharmony_ci * @systemapi 26961847f8eSopenharmony_ci * @since 9 27061847f8eSopenharmony_ci */ 27161847f8eSopenharmony_ci function castToNormalForm(formId: string, callback: AsyncCallback<void>): void; 27261847f8eSopenharmony_ci 27361847f8eSopenharmony_ci /** 27461847f8eSopenharmony_ci * Converts a specified temporary form that has been obtained by the application into a normal form. 27561847f8eSopenharmony_ci * 27661847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 27761847f8eSopenharmony_ci * @param { string } formId - Indicates the ID of the temporary form to convert. 27861847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 27961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 28061847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 28161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 28261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 28361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 28461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 28561847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 28661847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. 28761847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 28861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 28961847f8eSopenharmony_ci * @systemapi 29061847f8eSopenharmony_ci * @since 9 29161847f8eSopenharmony_ci */ 29261847f8eSopenharmony_ci function castToNormalForm(formId: string): Promise<void>; 29361847f8eSopenharmony_ci 29461847f8eSopenharmony_ci /** 29561847f8eSopenharmony_ci * Sends a notification to the form framework to make the specified forms visible. 29661847f8eSopenharmony_ci * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of 29761847f8eSopenharmony_ci * the form visibility change event.</p> 29861847f8eSopenharmony_ci * 29961847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 30061847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible. 30161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of notifyVisibleForms. 30261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 30361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 30461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 30561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 30661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 30761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 30861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 30961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 31061847f8eSopenharmony_ci * @systemapi 31161847f8eSopenharmony_ci * @since 9 31261847f8eSopenharmony_ci */ 31361847f8eSopenharmony_ci function notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void; 31461847f8eSopenharmony_ci 31561847f8eSopenharmony_ci /** 31661847f8eSopenharmony_ci * Sends a notification to the form framework to make the specified forms visible. 31761847f8eSopenharmony_ci * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of 31861847f8eSopenharmony_ci * the form visibility change event.</p> 31961847f8eSopenharmony_ci * 32061847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 32161847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible. 32261847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 32361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 32461847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 32561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 32661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 32761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 32861847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 32961847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 33061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 33161847f8eSopenharmony_ci * @systemapi 33261847f8eSopenharmony_ci * @since 9 33361847f8eSopenharmony_ci */ 33461847f8eSopenharmony_ci function notifyVisibleForms(formIds: Array<string>): Promise<void>; 33561847f8eSopenharmony_ci 33661847f8eSopenharmony_ci /** 33761847f8eSopenharmony_ci * Sends a notification to the form framework to make the specified forms invisible. 33861847f8eSopenharmony_ci * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of 33961847f8eSopenharmony_ci * the form visibility change event.</p> 34061847f8eSopenharmony_ci * 34161847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 34261847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 34361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of notifyInvisibleForms. 34461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 34561847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 34661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 34761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 34861847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 34961847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 35061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 35161847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 35261847f8eSopenharmony_ci * @systemapi 35361847f8eSopenharmony_ci * @since 9 35461847f8eSopenharmony_ci */ 35561847f8eSopenharmony_ci function notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void; 35661847f8eSopenharmony_ci 35761847f8eSopenharmony_ci /** 35861847f8eSopenharmony_ci * Sends a notification to the form framework to make the specified forms invisible. 35961847f8eSopenharmony_ci * <p>After this method is successfully called, onVisibilityChange will be called to notify the form provider of 36061847f8eSopenharmony_ci * the form visibility change event.</p> 36161847f8eSopenharmony_ci * 36261847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 36361847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 36461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 36561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 36661847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 36761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 36861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 36961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 37061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 37161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 37261847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 37361847f8eSopenharmony_ci * @systemapi 37461847f8eSopenharmony_ci * @since 9 37561847f8eSopenharmony_ci */ 37661847f8eSopenharmony_ci function notifyInvisibleForms(formIds: Array<string>): Promise<void>; 37761847f8eSopenharmony_ci 37861847f8eSopenharmony_ci /** 37961847f8eSopenharmony_ci * Notify the form framework to make the specified forms updatable. 38061847f8eSopenharmony_ci * <p>You can use this method to set form refresh state to true, the form can receive new 38161847f8eSopenharmony_ci * update from service.</p> 38261847f8eSopenharmony_ci * 38361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 38461847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 38561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of enableFormsUpdate. 38661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 38761847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 38861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 38961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 39061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 39161847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 39261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 39361847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 39461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 39561847f8eSopenharmony_ci * @systemapi 39661847f8eSopenharmony_ci * @since 9 39761847f8eSopenharmony_ci */ 39861847f8eSopenharmony_ci function enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void; 39961847f8eSopenharmony_ci 40061847f8eSopenharmony_ci /** 40161847f8eSopenharmony_ci * Notify the form framework to make the specified forms updatable. 40261847f8eSopenharmony_ci * <p>You can use this method to set form refresh state to true, the form can receive new 40361847f8eSopenharmony_ci * update from service.</p> 40461847f8eSopenharmony_ci * 40561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 40661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 40761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 40861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 40961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 41061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 41161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 41261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 41361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 41461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 41561847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 41661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 41761847f8eSopenharmony_ci * @systemapi 41861847f8eSopenharmony_ci * @since 9 41961847f8eSopenharmony_ci */ 42061847f8eSopenharmony_ci function enableFormsUpdate(formIds: Array<string>): Promise<void>; 42161847f8eSopenharmony_ci 42261847f8eSopenharmony_ci /** 42361847f8eSopenharmony_ci * Notify the form framework to make the specified forms non-updatable. 42461847f8eSopenharmony_ci * <p>You can use this method to set form refresh state to false, the form do not receive 42561847f8eSopenharmony_ci * new update from service.</p> 42661847f8eSopenharmony_ci * 42761847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 42861847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 42961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of disableFormsUpdate. 43061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 43161847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 43261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 43361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 43461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 43561847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 43661847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 43761847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 43861847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 43961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 44061847f8eSopenharmony_ci * @systemapi 44161847f8eSopenharmony_ci * @since 9 44261847f8eSopenharmony_ci */ 44361847f8eSopenharmony_ci function disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void; 44461847f8eSopenharmony_ci 44561847f8eSopenharmony_ci /** 44661847f8eSopenharmony_ci * Notify the form framework to make the specified forms non updatable. 44761847f8eSopenharmony_ci * <p>You can use this method to set form refresh state to false, the form do not receive 44861847f8eSopenharmony_ci * new update from service.</p> 44961847f8eSopenharmony_ci * 45061847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 45161847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible. 45261847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 45361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 45461847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 45561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 45661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 45761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 45861847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 45961847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 46061847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 46161847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 46261847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 46361847f8eSopenharmony_ci * @systemapi 46461847f8eSopenharmony_ci * @since 9 46561847f8eSopenharmony_ci */ 46661847f8eSopenharmony_ci function disableFormsUpdate(formIds: Array<string>): Promise<void>; 46761847f8eSopenharmony_ci 46861847f8eSopenharmony_ci /** 46961847f8eSopenharmony_ci * Checks whether the system is ready. 47061847f8eSopenharmony_ci * <p>You can use this method to obtain the system is ready.</p> 47161847f8eSopenharmony_ci * 47261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of isSystemReady. 47361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 47461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 47561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 47661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 47761847f8eSopenharmony_ci * @systemapi 47861847f8eSopenharmony_ci * @since 9 47961847f8eSopenharmony_ci */ 48061847f8eSopenharmony_ci function isSystemReady(callback: AsyncCallback<void>): void; 48161847f8eSopenharmony_ci 48261847f8eSopenharmony_ci /** 48361847f8eSopenharmony_ci * Checks whether the system is ready. 48461847f8eSopenharmony_ci * <p>You can use this method to obtain the system is ready.</p> 48561847f8eSopenharmony_ci * 48661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 48761847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 48861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 48961847f8eSopenharmony_ci * @systemapi 49061847f8eSopenharmony_ci * @since 9 49161847f8eSopenharmony_ci */ 49261847f8eSopenharmony_ci function isSystemReady(): Promise<void>; 49361847f8eSopenharmony_ci 49461847f8eSopenharmony_ci /** 49561847f8eSopenharmony_ci * Obtains the FormInfo objects provided by all applications on the device. 49661847f8eSopenharmony_ci * 49761847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 49861847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo. 49961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 50061847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 50161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 50261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 50361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 50461847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 50561847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 50661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 50761847f8eSopenharmony_ci * @systemapi 50861847f8eSopenharmony_ci * @since 9 50961847f8eSopenharmony_ci */ 51061847f8eSopenharmony_ci function getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void; 51161847f8eSopenharmony_ci 51261847f8eSopenharmony_ci /** 51361847f8eSopenharmony_ci * Obtains the FormInfo objects provided by all applications on the device. 51461847f8eSopenharmony_ci * 51561847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 51661847f8eSopenharmony_ci * @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo. 51761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 51861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 51961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 52061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 52161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 52261847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 52361847f8eSopenharmony_ci * @systemapi 52461847f8eSopenharmony_ci * @since 9 52561847f8eSopenharmony_ci */ 52661847f8eSopenharmony_ci function getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>; 52761847f8eSopenharmony_ci 52861847f8eSopenharmony_ci /** 52961847f8eSopenharmony_ci * Obtains the FormInfo objects provided by a specified application on the device. 53061847f8eSopenharmony_ci * 53161847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 53261847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application. 53361847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo. 53461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 53561847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 53661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 53761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 53861847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 53961847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 54061847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 54161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 54261847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 54361847f8eSopenharmony_ci * @systemapi 54461847f8eSopenharmony_ci * @since 9 54561847f8eSopenharmony_ci */ 54661847f8eSopenharmony_ci function getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void; 54761847f8eSopenharmony_ci 54861847f8eSopenharmony_ci /** 54961847f8eSopenharmony_ci * Obtains the FormInfo objects provided by a specified application on the device. 55061847f8eSopenharmony_ci * 55161847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 55261847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application. 55361847f8eSopenharmony_ci * @param { string } moduleName - Indicates the module name of the application. 55461847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo. 55561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 55661847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 55761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 55861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 55961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 56061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 56161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 56261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 56361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 56461847f8eSopenharmony_ci * @systemapi 56561847f8eSopenharmony_ci * @since 9 56661847f8eSopenharmony_ci */ 56761847f8eSopenharmony_ci function getFormsInfo( 56861847f8eSopenharmony_ci bundleName: string, 56961847f8eSopenharmony_ci moduleName: string, 57061847f8eSopenharmony_ci callback: AsyncCallback<Array<formInfo.FormInfo>> 57161847f8eSopenharmony_ci ): void; 57261847f8eSopenharmony_ci 57361847f8eSopenharmony_ci /** 57461847f8eSopenharmony_ci * Obtains the FormInfo objects provided by a specified application on the device. 57561847f8eSopenharmony_ci * 57661847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 57761847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the application. 57861847f8eSopenharmony_ci * @param { string } [moduleName] - Indicates the module name of the application. 57961847f8eSopenharmony_ci * @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo. 58061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 58161847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 58261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 58361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 58461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 58561847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 58661847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 58761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 58861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 58961847f8eSopenharmony_ci * @systemapi 59061847f8eSopenharmony_ci * @since 9 59161847f8eSopenharmony_ci */ 59261847f8eSopenharmony_ci function getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>; 59361847f8eSopenharmony_ci 59461847f8eSopenharmony_ci /** 59561847f8eSopenharmony_ci * Obtains the FormInfo objects provided by all application with filter on the device. 59661847f8eSopenharmony_ci * 59761847f8eSopenharmony_ci * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 59861847f8eSopenharmony_ci * @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet. 59961847f8eSopenharmony_ci * @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo. 60061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 60161847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 60261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 60361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 60461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 60561847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 60661847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 60761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 60861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 60961847f8eSopenharmony_ci * @systemapi 61061847f8eSopenharmony_ci * @since 12 61161847f8eSopenharmony_ci */ 61261847f8eSopenharmony_ci function getFormsInfo(filter: formInfo.FormInfoFilter): Promise<Array<formInfo.FormInfo>>; 61361847f8eSopenharmony_ci 61461847f8eSopenharmony_ci /** 61561847f8eSopenharmony_ci * Deletes invalid forms of the application in the Form Manager Service based on the list of. 61661847f8eSopenharmony_ci * <p>You can use this method to delete invalid forms of the application.</p> 61761847f8eSopenharmony_ci * 61861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 61961847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 62061847f8eSopenharmony_ci * @param { AsyncCallback<number> } callback - The callback is used to return the number of invalid forms deleted 62161847f8eSopenharmony_ci * by the Form Manager Service. 62261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 62361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 62461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 62561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 62661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 62761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 62861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 62961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 63061847f8eSopenharmony_ci * @systemapi 63161847f8eSopenharmony_ci * @since 9 63261847f8eSopenharmony_ci */ 63361847f8eSopenharmony_ci function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<number>): void; 63461847f8eSopenharmony_ci 63561847f8eSopenharmony_ci /** 63661847f8eSopenharmony_ci * Deletes invalid forms of the application in the Form Manager Service based on the list of. 63761847f8eSopenharmony_ci * <p>You can use this method to delete invalid forms of the application.</p> 63861847f8eSopenharmony_ci * 63961847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 64061847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 64161847f8eSopenharmony_ci * @returns { Promise<number> } Returns the number of invalid forms deleted by the Form Manager Service. 64261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 64361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 64461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 64561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 64661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 64761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 64861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 64961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 65061847f8eSopenharmony_ci * @systemapi 65161847f8eSopenharmony_ci * @since 9 65261847f8eSopenharmony_ci */ 65361847f8eSopenharmony_ci function deleteInvalidForms(formIds: Array<string>): Promise<number>; 65461847f8eSopenharmony_ci 65561847f8eSopenharmony_ci /** 65661847f8eSopenharmony_ci * Obtains the Form state. 65761847f8eSopenharmony_ci * <p>You can use this method to obtains the form state.</p> 65861847f8eSopenharmony_ci * 65961847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 66061847f8eSopenharmony_ci * @param { Want } want - Indicates want of the form. 66161847f8eSopenharmony_ci * @param { AsyncCallback<formInfo.FormStateInfo> } callback - The callback is used to return the form state. 66261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 66361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 66461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 66561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 66661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 66761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 66861847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 66961847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 67061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 67161847f8eSopenharmony_ci * @systemapi 67261847f8eSopenharmony_ci * @since 9 67361847f8eSopenharmony_ci */ 67461847f8eSopenharmony_ci function acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void; 67561847f8eSopenharmony_ci 67661847f8eSopenharmony_ci /** 67761847f8eSopenharmony_ci * Obtains the Form state. 67861847f8eSopenharmony_ci * <p>You can use this method to obtains the form state.</p> 67961847f8eSopenharmony_ci * 68061847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 68161847f8eSopenharmony_ci * @param { Want } want - Indicates want of the form. 68261847f8eSopenharmony_ci * @returns { Promise<formInfo.FormStateInfo> } Returns the form state. 68361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 68461847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 68561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 68661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 68761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 68861847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 68961847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 69061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 69161847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 69261847f8eSopenharmony_ci * @systemapi 69361847f8eSopenharmony_ci * @since 9 69461847f8eSopenharmony_ci */ 69561847f8eSopenharmony_ci function acquireFormState(want: Want): Promise<formInfo.FormStateInfo>; 69661847f8eSopenharmony_ci 69761847f8eSopenharmony_ci /** 69861847f8eSopenharmony_ci * Listens to the event of uninstall form. 69961847f8eSopenharmony_ci * <p>You can use this method to listen to the event of uninstall form.</p> 70061847f8eSopenharmony_ci * 70161847f8eSopenharmony_ci * @param { 'formUninstall' } type - Indicates event type. 70261847f8eSopenharmony_ci * @param { Callback<string> } callback - The callback of formUninstall. 70361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 70461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 70561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 70661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 70761847f8eSopenharmony_ci * @systemapi 70861847f8eSopenharmony_ci * @since 9 70961847f8eSopenharmony_ci */ 71061847f8eSopenharmony_ci function on(type: 'formUninstall', callback: Callback<string>): void; 71161847f8eSopenharmony_ci 71261847f8eSopenharmony_ci /** 71361847f8eSopenharmony_ci * Cancels listening to the event of uninstall form. 71461847f8eSopenharmony_ci * <p>You can use this method to cancel listening to the event of uninstall form.</p> 71561847f8eSopenharmony_ci * 71661847f8eSopenharmony_ci * @param { 'formUninstall' } type - Indicates event type. 71761847f8eSopenharmony_ci * @param { Callback<string> } [callback] - The callback of formUninstall. 71861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 71961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 72061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 72161847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 72261847f8eSopenharmony_ci * @systemapi 72361847f8eSopenharmony_ci * @since 9 72461847f8eSopenharmony_ci */ 72561847f8eSopenharmony_ci function off(type: 'formUninstall', callback?: Callback<string>): void; 72661847f8eSopenharmony_ci 72761847f8eSopenharmony_ci /** 72861847f8eSopenharmony_ci * Notify form is Visible 72961847f8eSopenharmony_ci * <p>You can use this method to notify form visible state.</p> 73061847f8eSopenharmony_ci * 73161847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 73261847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 73361847f8eSopenharmony_ci * @param { boolean } isVisible - Indicates whether visible. 73461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of notifyFormsVisible. 73561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 73661847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 73761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 73861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 73961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 74061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 74161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 74261847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 74361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 74461847f8eSopenharmony_ci * @systemapi 74561847f8eSopenharmony_ci * @since 9 74661847f8eSopenharmony_ci */ 74761847f8eSopenharmony_ci function notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: AsyncCallback<void>): void; 74861847f8eSopenharmony_ci 74961847f8eSopenharmony_ci /** 75061847f8eSopenharmony_ci * Notify form is Visible 75161847f8eSopenharmony_ci * <p>You can use this method to notify form visible state.</p> 75261847f8eSopenharmony_ci * 75361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 75461847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 75561847f8eSopenharmony_ci * @param { boolean } isVisible - Indicates whether visible. 75661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 75761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 75861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 75961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 76061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 76161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 76261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 76361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 76461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 76561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 76661847f8eSopenharmony_ci * @systemapi 76761847f8eSopenharmony_ci * @since 9 76861847f8eSopenharmony_ci */ 76961847f8eSopenharmony_ci function notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<void>; 77061847f8eSopenharmony_ci 77161847f8eSopenharmony_ci /** 77261847f8eSopenharmony_ci * Notify form enable update state. 77361847f8eSopenharmony_ci * <p>You can use this method to notify form enable update state.</p> 77461847f8eSopenharmony_ci * 77561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 77661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 77761847f8eSopenharmony_ci * @param { boolean } isEnableUpdate - Indicates whether enable update. 77861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of notifyFormsEnableUpdate. 77961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 78061847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 78161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 78261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 78361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 78461847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 78561847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 78661847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 78761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 78861847f8eSopenharmony_ci * @systemapi 78961847f8eSopenharmony_ci * @since 9 79061847f8eSopenharmony_ci */ 79161847f8eSopenharmony_ci function notifyFormsEnableUpdate( 79261847f8eSopenharmony_ci formIds: Array<string>, 79361847f8eSopenharmony_ci isEnableUpdate: boolean, 79461847f8eSopenharmony_ci callback: AsyncCallback<void> 79561847f8eSopenharmony_ci ): void; 79661847f8eSopenharmony_ci 79761847f8eSopenharmony_ci /** 79861847f8eSopenharmony_ci * Notify form enable update state. 79961847f8eSopenharmony_ci * <p>You can use this method to notify form enable update state.</p> 80061847f8eSopenharmony_ci * 80161847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 80261847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 80361847f8eSopenharmony_ci * @param { boolean } isEnableUpdate - Indicates whether enable update. 80461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 80561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 80661847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 80761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 80861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 80961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 81061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 81161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 81261847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 81361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 81461847f8eSopenharmony_ci * @systemapi 81561847f8eSopenharmony_ci * @since 9 81661847f8eSopenharmony_ci */ 81761847f8eSopenharmony_ci function notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean): Promise<void>; 81861847f8eSopenharmony_ci 81961847f8eSopenharmony_ci /** 82061847f8eSopenharmony_ci * Share form by formId and deviceId. 82161847f8eSopenharmony_ci * 82261847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM and ohos.permission.DISTRIBUTED_DATASYNC 82361847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 82461847f8eSopenharmony_ci * @param { string } deviceId - Indicates the remote device ID. 82561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of shareForm. 82661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 82761847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 82861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 82961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 83061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 83161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 83261847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 83361847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 83461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 83561847f8eSopenharmony_ci * @systemapi 83661847f8eSopenharmony_ci * @since 9 83761847f8eSopenharmony_ci */ 83861847f8eSopenharmony_ci function shareForm(formId: string, deviceId: string, callback: AsyncCallback<void>): void; 83961847f8eSopenharmony_ci 84061847f8eSopenharmony_ci /** 84161847f8eSopenharmony_ci * Share form by formId and deviceId. 84261847f8eSopenharmony_ci * 84361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM and ohos.permission.DISTRIBUTED_DATASYNC 84461847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 84561847f8eSopenharmony_ci * @param { string } deviceId - Indicates the remote device ID. 84661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 84761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 84861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 84961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 85061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 85161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 85261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 85361847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 85461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 85561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 85661847f8eSopenharmony_ci * @systemapi 85761847f8eSopenharmony_ci * @since 9 85861847f8eSopenharmony_ci */ 85961847f8eSopenharmony_ci function shareForm(formId: string, deviceId: string): Promise<void>; 86061847f8eSopenharmony_ci 86161847f8eSopenharmony_ci /** 86261847f8eSopenharmony_ci * Notify form that privacy whether to be protected. 86361847f8eSopenharmony_ci * 86461847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 86561847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 86661847f8eSopenharmony_ci * @param { boolean } isProtected - Indicates whether to be protected. 86761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of notifyFormsPrivacyProtected. 86861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 86961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 87061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 87161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 87261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 87361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 87461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 87561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 87661847f8eSopenharmony_ci * @systemapi 87761847f8eSopenharmony_ci * @since 9 87861847f8eSopenharmony_ci */ 87961847f8eSopenharmony_ci function notifyFormsPrivacyProtected( 88061847f8eSopenharmony_ci formIds: Array<string>, 88161847f8eSopenharmony_ci isProtected: boolean, 88261847f8eSopenharmony_ci callback: AsyncCallback<void> 88361847f8eSopenharmony_ci ): void; 88461847f8eSopenharmony_ci 88561847f8eSopenharmony_ci /** 88661847f8eSopenharmony_ci * Notify form that privacy whether to be protected. 88761847f8eSopenharmony_ci * 88861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 88961847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the specified form id. 89061847f8eSopenharmony_ci * @param { boolean } isProtected - Indicates whether to be protected. 89161847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 89261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 89361847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 89461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 89561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 89661847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 89761847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 89861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 89961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 90061847f8eSopenharmony_ci * @systemapi 90161847f8eSopenharmony_ci * @since 9 90261847f8eSopenharmony_ci */ 90361847f8eSopenharmony_ci function notifyFormsPrivacyProtected(formIds: Array<string>, isProtected: boolean): Promise<void>; 90461847f8eSopenharmony_ci 90561847f8eSopenharmony_ci /** 90661847f8eSopenharmony_ci * Acquire form data by formId. 90761847f8eSopenharmony_ci * 90861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 90961847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 91061847f8eSopenharmony_ci * @param { AsyncCallback<{ [key: string]: Object }> } callback - The callback of acquireFormData. 91161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 91261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 91361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 91461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 91561847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 91661847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 91761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 91861847f8eSopenharmony_ci * invalid input parameter during form operation 91961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 92061847f8eSopenharmony_ci * @systemapi 92161847f8eSopenharmony_ci * @StageModelOnly 92261847f8eSopenharmony_ci * @since 10 92361847f8eSopenharmony_ci */ 92461847f8eSopenharmony_ci /** 92561847f8eSopenharmony_ci * Acquire form data by formId. 92661847f8eSopenharmony_ci * 92761847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 92861847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 92961847f8eSopenharmony_ci * @param { AsyncCallback<Record<string, Object>> } callback - The callback of acquireFormData. 93061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 93161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 93261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 93361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 93461847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 93561847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 93661847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 93761847f8eSopenharmony_ci * invalid input parameter during form operation 93861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 93961847f8eSopenharmony_ci * @systemapi 94061847f8eSopenharmony_ci * @StageModelOnly 94161847f8eSopenharmony_ci * @since 11 94261847f8eSopenharmony_ci */ 94361847f8eSopenharmony_ci function acquireFormData(formId: string, callback: AsyncCallback<Record<string, Object>>): void; 94461847f8eSopenharmony_ci 94561847f8eSopenharmony_ci /** 94661847f8eSopenharmony_ci * Acquire form data by formId. 94761847f8eSopenharmony_ci * 94861847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 94961847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 95061847f8eSopenharmony_ci * @returns { Promise<{ [key: string]: Object }> } The promise returned by the function. 95161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 95261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 95361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 95461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 95561847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 95661847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 95761847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 95861847f8eSopenharmony_ci * invalid input parameter during form operation 95961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 96061847f8eSopenharmony_ci * @systemapi 96161847f8eSopenharmony_ci * @StageModelOnly 96261847f8eSopenharmony_ci * @since 10 96361847f8eSopenharmony_ci */ 96461847f8eSopenharmony_ci /** 96561847f8eSopenharmony_ci * Acquire form data by formId. 96661847f8eSopenharmony_ci * 96761847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 96861847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 96961847f8eSopenharmony_ci * @returns { Promise<Record<string, Object>> } The promise returned by the function. 97061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 97161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 97261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 97361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 97461847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 97561847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 97661847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 97761847f8eSopenharmony_ci * invalid input parameter during form operation 97861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 97961847f8eSopenharmony_ci * @systemapi 98061847f8eSopenharmony_ci * @StageModelOnly 98161847f8eSopenharmony_ci * @since 11 98261847f8eSopenharmony_ci */ 98361847f8eSopenharmony_ci function acquireFormData(formId: string): Promise<Record<string, Object>>; 98461847f8eSopenharmony_ci 98561847f8eSopenharmony_ci /** 98661847f8eSopenharmony_ci * Notify the form framework to set a router proxy for the specified cards. 98761847f8eSopenharmony_ci * <p>Once a card sets up a router proxy, the form framework will no longer invoke its onRouter callback, 98861847f8eSopenharmony_ci * and FMS will not trigger the actual jump.</p> 98961847f8eSopenharmony_ci * 99061847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 99161847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms that requires setting up a router proxy. 99261847f8eSopenharmony_ci * @param { Callback<Want> } proxy - Indicates the router proxy to be set up. 99361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setRouterProxy. 99461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 99561847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 99661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 99761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 99861847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 99961847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 100061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 100161847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 100261847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 100361847f8eSopenharmony_ci * @systemapi 100461847f8eSopenharmony_ci * @since 11 100561847f8eSopenharmony_ci */ 100661847f8eSopenharmony_ci function setRouterProxy(formIds: Array<string>, proxy: Callback<Want>, callback: AsyncCallback<void>): void; 100761847f8eSopenharmony_ci 100861847f8eSopenharmony_ci /** 100961847f8eSopenharmony_ci * Notify the form framework to set a router proxy for the specified cards. 101061847f8eSopenharmony_ci * <p>Once a card sets up a router proxy, the form framework will no longer invoke its onRouter callback, 101161847f8eSopenharmony_ci * and FMS will not trigger the actual jump.</p> 101261847f8eSopenharmony_ci * 101361847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 101461847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms that requires setting up a router proxy. 101561847f8eSopenharmony_ci * @param { Callback<Want> } proxy - Indicates the router proxy to be set up. 101661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 101761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 101861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 101961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 102061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 102161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 102261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 102361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 102461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 102561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 102661847f8eSopenharmony_ci * @systemapi 102761847f8eSopenharmony_ci * @since 11 102861847f8eSopenharmony_ci */ 102961847f8eSopenharmony_ci function setRouterProxy(formIds: Array<string>, proxy: Callback<Want>): Promise<void>; 103061847f8eSopenharmony_ci 103161847f8eSopenharmony_ci /** 103261847f8eSopenharmony_ci * Notify the form framework to clear the router proxy set for the specified cards. 103361847f8eSopenharmony_ci * 103461847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 103561847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms that requires clearing of router proxy. 103661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of clearRouterProxy. 103761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 103861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 103961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 104061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 104161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 104261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 104361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 104461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 104561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 104661847f8eSopenharmony_ci * @systemapi 104761847f8eSopenharmony_ci * @since 11 104861847f8eSopenharmony_ci */ 104961847f8eSopenharmony_ci function clearRouterProxy(formIds: Array<string>, callback: AsyncCallback<void>): void; 105061847f8eSopenharmony_ci 105161847f8eSopenharmony_ci /** 105261847f8eSopenharmony_ci * Notify the form framework to clear the router proxy set for the specified cards. 105361847f8eSopenharmony_ci * 105461847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 105561847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms that requires clearing of router proxy. 105661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 105761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 105861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 105961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 106061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 106161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 106261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 106361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 106461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 106561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 106661847f8eSopenharmony_ci * @systemapi 106761847f8eSopenharmony_ci * @since 11 106861847f8eSopenharmony_ci */ 106961847f8eSopenharmony_ci function clearRouterProxy(formIds: Array<string>): Promise<void>; 107061847f8eSopenharmony_ci 107161847f8eSopenharmony_ci /** 107261847f8eSopenharmony_ci * Set result of publish form. 107361847f8eSopenharmony_ci * 107461847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 107561847f8eSopenharmony_ci * @param { string } formId - Indicates the form id. 107661847f8eSopenharmony_ci * @param { formInfo.PublishFormResult } result - The result of publish form. 107761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 107861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 107961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 108061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 108161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 108261847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 108361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 108461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 108561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 108661847f8eSopenharmony_ci * @systemapi 108761847f8eSopenharmony_ci * @stagemodelonly 108861847f8eSopenharmony_ci * @since 12 108961847f8eSopenharmony_ci */ 109061847f8eSopenharmony_ci function setPublishFormResult(formId: string, result: formInfo.PublishFormResult): void; 109161847f8eSopenharmony_ci 109261847f8eSopenharmony_ci /** 109361847f8eSopenharmony_ci * Set permanent dynamic ArkTS forms recyclable, they will be recycled when memory is low. 109461847f8eSopenharmony_ci * 109561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 109661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the form id list of permanent dynamic ArkTS forms. 109761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 109861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 109961847f8eSopenharmony_ci * @throws { BusinessError } 202 - caller is not system app. 110061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 110161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 110261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 110361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 110461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 110561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 110661847f8eSopenharmony_ci * @systemapi 110761847f8eSopenharmony_ci * @stagemodelonly 110861847f8eSopenharmony_ci * @since 11 110961847f8eSopenharmony_ci */ 111061847f8eSopenharmony_ci function setFormsRecyclable(formIds: Array<string>): Promise<void>; 111161847f8eSopenharmony_ci 111261847f8eSopenharmony_ci /** 111361847f8eSopenharmony_ci * Set permanent dynamic ArkTS forms recyclable, they will be recycled when memory is low. 111461847f8eSopenharmony_ci * 111561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 111661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the form id list of permanent dynamic ArkTS forms. 111761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setFormsRecyclable. 111861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 111961847f8eSopenharmony_ci * @throws { BusinessError } 202 - caller is not system app. 112061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 112161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 112261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 112361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 112461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 112561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 112661847f8eSopenharmony_ci * @systemapi 112761847f8eSopenharmony_ci * @stagemodelonly 112861847f8eSopenharmony_ci * @since 11 112961847f8eSopenharmony_ci */ 113061847f8eSopenharmony_ci function setFormsRecyclable(formIds: Array<string>, callback: AsyncCallback<void>): void; 113161847f8eSopenharmony_ci 113261847f8eSopenharmony_ci /** 113361847f8eSopenharmony_ci * Recycle permanent dynamic ArkTS forms. 113461847f8eSopenharmony_ci * 113561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 113661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the IDs of the forms to be recycled. 113761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 113861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 113961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 114061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 114161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 114261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 114361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 114461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 114561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 114661847f8eSopenharmony_ci * @systemapi 114761847f8eSopenharmony_ci * @stagemodelonly 114861847f8eSopenharmony_ci * @since 12 114961847f8eSopenharmony_ci */ 115061847f8eSopenharmony_ci function recycleForms(formIds: Array<string>): Promise<void>; 115161847f8eSopenharmony_ci 115261847f8eSopenharmony_ci /** 115361847f8eSopenharmony_ci * Recover recycled permanent dynamic ArkTS forms. 115461847f8eSopenharmony_ci * 115561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 115661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the form id list of recycled permanent dynamic ArkTS forms. 115761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 115861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 115961847f8eSopenharmony_ci * @throws { BusinessError } 202 - caller is not system app. 116061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 116161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 116261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 116361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 116461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 116561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 116661847f8eSopenharmony_ci * @systemapi 116761847f8eSopenharmony_ci * @stagemodelonly 116861847f8eSopenharmony_ci * @since 11 116961847f8eSopenharmony_ci */ 117061847f8eSopenharmony_ci function recoverForms(formIds: Array<string>): Promise<void>; 117161847f8eSopenharmony_ci 117261847f8eSopenharmony_ci /** 117361847f8eSopenharmony_ci * Recover recycled permanent dynamic ArkTS forms. 117461847f8eSopenharmony_ci * 117561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 117661847f8eSopenharmony_ci * @param { Array<string> } formIds - Indicates the form id list of recycled permanent dynamic ArkTS forms. 117761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of recoverForms. 117861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 117961847f8eSopenharmony_ci * @throws { BusinessError } 202 - caller is not system app. 118061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 118161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 118261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 118361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 118461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 118561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 118661847f8eSopenharmony_ci * @systemapi 118761847f8eSopenharmony_ci * @stagemodelonly 118861847f8eSopenharmony_ci * @since 11 118961847f8eSopenharmony_ci */ 119061847f8eSopenharmony_ci function recoverForms(formIds: Array<string>, callback: AsyncCallback<void>): void; 119161847f8eSopenharmony_ci 119261847f8eSopenharmony_ci /** 119361847f8eSopenharmony_ci * Update location of the form. 119461847f8eSopenharmony_ci * 119561847f8eSopenharmony_ci * @permission ohos.permission.REQUIRE_FORM 119661847f8eSopenharmony_ci * @param { string } formId - Indicates the form id. 119761847f8eSopenharmony_ci * @param { formInfo.FormLocation } location - The location of the form. 119861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permissions denied. 119961847f8eSopenharmony_ci * @throws { BusinessError } 202 - caller is not system app. 120061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 120161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 120261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 120361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 120461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 120561847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 120661847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 120761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 120861847f8eSopenharmony_ci * @systemapi 120961847f8eSopenharmony_ci * @stagemodelonly 121061847f8eSopenharmony_ci * @since 12 121161847f8eSopenharmony_ci */ 121261847f8eSopenharmony_ci function updateFormLocation(formId: string, location: formInfo.FormLocation): void; 121361847f8eSopenharmony_ci} 121461847f8eSopenharmony_ciexport default formHost; 1215