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 formBindingData from './@ohos.app.form.formBindingData'; 2361847f8eSopenharmony_ciimport formInfo from './@ohos.app.form.formInfo'; 2461847f8eSopenharmony_ciimport Want from './@ohos.app.ability.Want'; 2561847f8eSopenharmony_ci 2661847f8eSopenharmony_ci/** 2761847f8eSopenharmony_ci * Interface of formProvider. 2861847f8eSopenharmony_ci * 2961847f8eSopenharmony_ci * @namespace formProvider 3061847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 3161847f8eSopenharmony_ci * @since 9 3261847f8eSopenharmony_ci */ 3361847f8eSopenharmony_ci/** 3461847f8eSopenharmony_ci * Interface of formProvider. 3561847f8eSopenharmony_ci * 3661847f8eSopenharmony_ci * @namespace formProvider 3761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 3861847f8eSopenharmony_ci * @atomicservice 3961847f8eSopenharmony_ci * @since 11 4061847f8eSopenharmony_ci */ 4161847f8eSopenharmony_cideclare namespace formProvider { 4261847f8eSopenharmony_ci /** 4361847f8eSopenharmony_ci * Set next update time for a specified form. 4461847f8eSopenharmony_ci * 4561847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 4661847f8eSopenharmony_ci * @param { number } minute - Indicates duration minute before next update. 4761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime. 4861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 4961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 5061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 5161847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 5261847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 5361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 5461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 5561847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds upper bound. 5661847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form can not be operated by the current application. 5761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 5861847f8eSopenharmony_ci * @since 9 5961847f8eSopenharmony_ci */ 6061847f8eSopenharmony_ci /** 6161847f8eSopenharmony_ci * Set next update time for a specified form. 6261847f8eSopenharmony_ci * 6361847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 6461847f8eSopenharmony_ci * @param { number } minute - Indicates duration minute before next update. 6561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime. 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 } 16500100 - Failed to obtain the configuration information. 7161847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 7261847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 7361847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. 7461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 7561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 7661847f8eSopenharmony_ci * @atomicservice 7761847f8eSopenharmony_ci * @since 11 7861847f8eSopenharmony_ci */ 7961847f8eSopenharmony_ci function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void; 8061847f8eSopenharmony_ci 8161847f8eSopenharmony_ci /** 8261847f8eSopenharmony_ci * Set next update time for a specified form. 8361847f8eSopenharmony_ci * 8461847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 8561847f8eSopenharmony_ci * @param { number } minute - Indicates duration minute before next update. 8661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 8761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 8861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 8961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 9061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 9161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 9261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 9361847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 9461847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds upper bound. 9561847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form can not be operated by the current application. 9661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 9761847f8eSopenharmony_ci * @since 9 9861847f8eSopenharmony_ci */ 9961847f8eSopenharmony_ci /** 10061847f8eSopenharmony_ci * Set next update time for a specified form. 10161847f8eSopenharmony_ci * 10261847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 10361847f8eSopenharmony_ci * @param { number } minute - Indicates duration minute before next update. 10461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 10561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 10661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 10761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 10861847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 10961847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 11061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 11161847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 11261847f8eSopenharmony_ci * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. 11361847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 11461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 11561847f8eSopenharmony_ci * @atomicservice 11661847f8eSopenharmony_ci * @since 11 11761847f8eSopenharmony_ci */ 11861847f8eSopenharmony_ci function setFormNextRefreshTime(formId: string, minute: number): Promise<void>; 11961847f8eSopenharmony_ci 12061847f8eSopenharmony_ci /** 12161847f8eSopenharmony_ci * Update a specified form. 12261847f8eSopenharmony_ci * Client to communication with FormManagerService. 12361847f8eSopenharmony_ci * 12461847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 12561847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data. 12661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of updateForm. 12761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 12861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 12961847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 13061847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 13161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 13261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 13361847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 13461847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form can not be operated by the current application. 13561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 13661847f8eSopenharmony_ci * @since 9 13761847f8eSopenharmony_ci */ 13861847f8eSopenharmony_ci /** 13961847f8eSopenharmony_ci * Update a specified form. 14061847f8eSopenharmony_ci * Client to communication with FormManagerService. 14161847f8eSopenharmony_ci * 14261847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 14361847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data. 14461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of updateForm. 14561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 14661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 14761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 14861847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - Service connection error. 14961847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 15061847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 15161847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 15261847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 15361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 15461847f8eSopenharmony_ci * @atomicservice 15561847f8eSopenharmony_ci * @since 11 15661847f8eSopenharmony_ci */ 15761847f8eSopenharmony_ci function updateForm( 15861847f8eSopenharmony_ci formId: string, 15961847f8eSopenharmony_ci formBindingData: formBindingData.FormBindingData, 16061847f8eSopenharmony_ci callback: AsyncCallback<void> 16161847f8eSopenharmony_ci ): void; 16261847f8eSopenharmony_ci 16361847f8eSopenharmony_ci /** 16461847f8eSopenharmony_ci * Update a specified form. 16561847f8eSopenharmony_ci * Client to communication with FormManagerService. 16661847f8eSopenharmony_ci * 16761847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 16861847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data. 16961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 17061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 17161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 17261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 17361847f8eSopenharmony_ci * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. 17461847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 17561847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 17661847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 17761847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form can not be operated by the current application. 17861847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 17961847f8eSopenharmony_ci * @since 9 18061847f8eSopenharmony_ci */ 18161847f8eSopenharmony_ci /** 18261847f8eSopenharmony_ci * Update a specified form. 18361847f8eSopenharmony_ci * Client to communication with FormManagerService. 18461847f8eSopenharmony_ci * 18561847f8eSopenharmony_ci * @param { string } formId - Indicates the form ID. 18661847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data. 18761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 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 } 16500100 - Failed to obtain the configuration information. 19361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 19461847f8eSopenharmony_ci * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. 19561847f8eSopenharmony_ci * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. 19661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 19761847f8eSopenharmony_ci * @atomicservice 19861847f8eSopenharmony_ci * @since 11 19961847f8eSopenharmony_ci */ 20061847f8eSopenharmony_ci function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>; 20161847f8eSopenharmony_ci 20261847f8eSopenharmony_ci /** 20361847f8eSopenharmony_ci * Get info of all forms belonging to current bundle. 20461847f8eSopenharmony_ci * Client to communication with FormManagerService. 20561847f8eSopenharmony_ci * 20661847f8eSopenharmony_ci * @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet. 20761847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo. 20861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 20961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 21061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 21161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 21261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 21361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 21461847f8eSopenharmony_ci * @since 9 21561847f8eSopenharmony_ci */ 21661847f8eSopenharmony_ci /** 21761847f8eSopenharmony_ci * Get info of all forms belonging to current bundle. 21861847f8eSopenharmony_ci * Client to communication with FormManagerService. 21961847f8eSopenharmony_ci * 22061847f8eSopenharmony_ci * @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet. 22161847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo. 22261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 22361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 22461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 22561847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 22661847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 22761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 22861847f8eSopenharmony_ci * @atomicservice 22961847f8eSopenharmony_ci * @since 11 23061847f8eSopenharmony_ci */ 23161847f8eSopenharmony_ci function getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback<Array<formInfo.FormInfo>>): void; 23261847f8eSopenharmony_ci 23361847f8eSopenharmony_ci /** 23461847f8eSopenharmony_ci * Get infos of all forms belonging to current bundle. 23561847f8eSopenharmony_ci * Client to communication with FormManagerService. 23661847f8eSopenharmony_ci * 23761847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo. 23861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 23961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 24061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 24161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 24261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 24361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 24461847f8eSopenharmony_ci * @since 9 24561847f8eSopenharmony_ci */ 24661847f8eSopenharmony_ci /** 24761847f8eSopenharmony_ci * Get infos of all forms belonging to current bundle. 24861847f8eSopenharmony_ci * Client to communication with FormManagerService. 24961847f8eSopenharmony_ci * 25061847f8eSopenharmony_ci * @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo. 25161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 25261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 25361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 25461847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 25561847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 25661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 25761847f8eSopenharmony_ci * @atomicservice 25861847f8eSopenharmony_ci * @since 11 25961847f8eSopenharmony_ci */ 26061847f8eSopenharmony_ci function getFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void; 26161847f8eSopenharmony_ci 26261847f8eSopenharmony_ci /** 26361847f8eSopenharmony_ci * Get infos of all forms belonging to current bundle. 26461847f8eSopenharmony_ci * Client to communication with FormManagerService. 26561847f8eSopenharmony_ci * 26661847f8eSopenharmony_ci * @param { formInfo.FormInfoFilter } [filter] - Indicates the requirements the forms that the formInfos belong to have to meet. 26761847f8eSopenharmony_ci * @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo. 26861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 26961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 27061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - An IPC connection error happened. 27161847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 27261847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 27361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 27461847f8eSopenharmony_ci * @since 9 27561847f8eSopenharmony_ci */ 27661847f8eSopenharmony_ci /** 27761847f8eSopenharmony_ci * Get infos of all forms belonging to current bundle. 27861847f8eSopenharmony_ci * Client to communication with FormManagerService. 27961847f8eSopenharmony_ci * 28061847f8eSopenharmony_ci * @param { formInfo.FormInfoFilter } [filter] - Indicates the requirements the forms that the formInfos belong to have to meet. 28161847f8eSopenharmony_ci * @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo. 28261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 28361847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 28461847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 28561847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 28661847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 28761847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 28861847f8eSopenharmony_ci * @atomicservice 28961847f8eSopenharmony_ci * @since 11 29061847f8eSopenharmony_ci */ 29161847f8eSopenharmony_ci function getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.FormInfo>>; 29261847f8eSopenharmony_ci 29361847f8eSopenharmony_ci /** 29461847f8eSopenharmony_ci * Request to publish a form to the form host. 29561847f8eSopenharmony_ci * 29661847f8eSopenharmony_ci * @param { Want } want - The want of the form to publish. 29761847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } formBindingData - Indicates the form data. 29861847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - The callback is used to return the form id. 29961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 30061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 30161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 30261847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 30361847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 30461847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 30561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 30661847f8eSopenharmony_ci * @systemapi 30761847f8eSopenharmony_ci * @since 9 30861847f8eSopenharmony_ci */ 30961847f8eSopenharmony_ci function requestPublishForm( 31061847f8eSopenharmony_ci want: Want, 31161847f8eSopenharmony_ci formBindingData: formBindingData.FormBindingData, 31261847f8eSopenharmony_ci callback: AsyncCallback<string> 31361847f8eSopenharmony_ci ): void; 31461847f8eSopenharmony_ci 31561847f8eSopenharmony_ci /** 31661847f8eSopenharmony_ci * Request to publish a form to the form host. 31761847f8eSopenharmony_ci * 31861847f8eSopenharmony_ci * @param { Want } want - The want of the form to publish. 31961847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - The callback is used to return the form id. 32061847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 32161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 32261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 32361847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 32461847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 32561847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 32661847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 32761847f8eSopenharmony_ci * @systemapi 32861847f8eSopenharmony_ci * @since 9 32961847f8eSopenharmony_ci */ 33061847f8eSopenharmony_ci function requestPublishForm(want: Want, callback: AsyncCallback<string>): void; 33161847f8eSopenharmony_ci 33261847f8eSopenharmony_ci /** 33361847f8eSopenharmony_ci * Request to publish a form to the form host. 33461847f8eSopenharmony_ci * 33561847f8eSopenharmony_ci * @param { Want } want - The want of the form to publish. 33661847f8eSopenharmony_ci * @param { formBindingData.FormBindingData } [formBindingData] - Indicates the form data. 33761847f8eSopenharmony_ci * @returns { Promise<string> } Returns the form id. 33861847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 33961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 34061847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 34161847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 34261847f8eSopenharmony_ci * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. 34361847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 34461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 34561847f8eSopenharmony_ci * @systemapi 34661847f8eSopenharmony_ci * @since 9 34761847f8eSopenharmony_ci */ 34861847f8eSopenharmony_ci function requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData): Promise<string>; 34961847f8eSopenharmony_ci 35061847f8eSopenharmony_ci /** 35161847f8eSopenharmony_ci * Check if the request of publishing a form is supported by the host 35261847f8eSopenharmony_ci * 35361847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return true if the request is supported. 35461847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 35561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 35661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. 35761847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC connection error. 35861847f8eSopenharmony_ci * @throws { BusinessError } 16501000 - An internal functional error occurred. 35961847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form 36061847f8eSopenharmony_ci * @systemapi 36161847f8eSopenharmony_ci * @since 9 36261847f8eSopenharmony_ci */ 36361847f8eSopenharmony_ci function isRequestPublishFormSupported(callback: AsyncCallback<boolean>): void; 36461847f8eSopenharmony_ci 36561847f8eSopenharmony_ci /** 36661847f8eSopenharmony_ci * Check if the request of publishing a form is supported by the host 36761847f8eSopenharmony_ci * 36861847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns true if the request is supported. 36961847f8eSopenharmony_ci * @throws { BusinessError } 202 - The application is not a system application. 37061847f8eSopenharmony_ci * @throws { BusinessError } 16500050 - IPC 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 isRequestPublishFormSupported(): Promise<boolean>; 37761847f8eSopenharmony_ci} 37861847f8eSopenharmony_ciexport default formProvider; 379