Bugfix: Fix issue of error code

Signed-off-by: xuzhihao <xuzhihao16@huawei.com>
This commit is contained in:
xuzhihao 2023-04-07 14:12:46 +08:00
parent 4e28cba0e0
commit a4668e5b11
6 changed files with 421 additions and 43 deletions

View File

@ -33,7 +33,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form ID.
* @param { AsyncCallback<void> } callback - The callback of deleteForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -47,7 +54,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form ID.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -62,7 +76,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form ID
* @param { AsyncCallback<void> } callback - The callback of releaseForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -78,7 +99,14 @@ declare namespace formHost {
* @param { string } formId - Indicates the form ID
* @param { boolean } isReleaseCache - Indicates whether release cache or not.
* @param { AsyncCallback<void> } callback - The callback of releaseForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -94,7 +122,14 @@ declare namespace formHost {
* @param { string } formId - Indicates the form ID
* @param { boolean } isReleaseCache - Indicates whether release cache or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -110,7 +145,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the ID of the form to update.
* @param { AsyncCallback<void> } callback - The callback of requestForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -126,7 +168,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the ID of the form to update.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -138,7 +187,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the ID of the temporary form to convert.
* @param { AsyncCallback<void> } callback - The callback of castToNormalForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -150,7 +206,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the ID of the temporary form to convert.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -164,7 +227,12 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
* @param { AsyncCallback<void> } callback - The callback of notifyVisibleForms.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -178,7 +246,12 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made visible.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -192,7 +265,12 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @param { AsyncCallback<void> } callback - The callback of notifyInvisibleForms.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -206,7 +284,12 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -220,7 +303,13 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @param { AsyncCallback<void> } callback - The callback of enableFormsUpdate.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -234,7 +323,13 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -248,7 +343,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @param { AsyncCallback<void> } callback - The callback of disableFormsUpdate.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -262,7 +364,14 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be made invisible.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -273,6 +382,7 @@ declare namespace formHost {
* Checks whether the system is ready.
* <p>You can use this method to obtain the system is ready.</p>
* @param { AsyncCallback<void> } callback - The callback of isSystemReady.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form
* @systemapi
@ -284,7 +394,7 @@ declare namespace formHost {
* Checks whether the system is ready.
* <p>You can use this method to obtain the system is ready.</p>
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 202 - The application is not a system application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -295,7 +405,12 @@ declare namespace formHost {
* Obtains the FormInfo objects provided by all applications on the device.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -306,7 +421,11 @@ declare namespace formHost {
* Obtains the FormInfo objects provided by all applications on the device.
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -318,7 +437,13 @@ declare namespace formHost {
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { string } bundleName - Indicates the bundle name of the application.
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -331,7 +456,13 @@ declare namespace formHost {
* @param { string } bundleName - Indicates the bundle name of the application.
* @param { string } moduleName - Indicates the module name of the application.
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the FormInfo.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -344,7 +475,13 @@ declare namespace formHost {
* @param { string } bundleName - Indicates the bundle name of the application.
* @param { string } moduleName - Indicates the module name of the application.
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the FormInfo.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -358,7 +495,12 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { AsyncCallback<number> } callback - The callback is used to return the number of invalid forms deleted
* by the Form Manager Service.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -371,7 +513,12 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the specified form id.
* @returns { Promise<number> } Returns the number of invalid forms deleted by the Form Manager Service.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -384,7 +531,13 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { Want } want - Indicates want of the form.
* @param { AsyncCallback<formInfo.FormStateInfo> } callback - The callback is used to return the form state.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -397,7 +550,13 @@ declare namespace formHost {
* @permission ohos.permission.REQUIRE_FORM and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { Want } want - Indicates want of the form.
* @returns { Promise<formInfo.FormStateInfo> } Returns the form state.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -409,6 +568,7 @@ declare namespace formHost {
* <p>You can use this method to listen to the event of uninstall form.</p>
* @param { string } type - Indicates event type.
* @param { Callback<string> } callback - The callback of formUninstall.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form
* @systemapi
@ -421,6 +581,7 @@ declare namespace formHost {
* <p>You can use this method to cancel listening to the event of uninstall form.</p>
* @param { string } type - Indicates event type.
* @param { Callback<string> } callback - The callback of formUninstall.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form
* @systemapi
@ -435,7 +596,13 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isVisible - Indicates whether visible.
* @param { AsyncCallback<void> } callback - The callback of notifyFormsVisible.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -449,7 +616,13 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isVisible - Indicates whether visible.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -463,7 +636,13 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isEnableUpdate - Indicates whether enable update.
* @param { AsyncCallback<void> } callback - The callback of notifyFormsEnableUpdate.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -477,7 +656,13 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isEnableUpdate - Indicates whether enable update.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -490,7 +675,13 @@ declare namespace formHost {
* @param { string } formId - Indicates the form ID.
* @param { string } deviceId - Indicates the remote device ID.
* @param { AsyncCallback<void> } callback - The callback of shareForm.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -503,7 +694,13 @@ declare namespace formHost {
* @param { string } formId - Indicates the form ID.
* @param { string } deviceId - Indicates the remote device ID.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -516,7 +713,12 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isProtected - Indicates whether to be protected.
* @param { AsyncCallback<void> } callback - The callback of notifyFormsPrivacyProtected.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -529,11 +731,42 @@ declare namespace formHost {
* @param { Array<string> } formIds - Indicates the specified form id.
* @param { boolean } isProtected - Indicates whether to be protected.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
*/
function notifyFormsPrivacyProtected(formIds: Array<string>, isProtected: boolean): Promise<void>;
/**
* Acquire form data by formId.
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form ID.
* @param { AsyncCallback<{[key: string]: Object}> } callback - The callback of acquireFormData.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 10
*/
function acquireFormData(formId: string, callback: AsyncCallback<{[key: string]: Object}>): void;
/**
* Acquire form data by formId.
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form ID.
* @returns { Promise<{[key: string]: Object}> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 10
*/
function acquireFormData(formId: string): Promise<{[key: string]: Object}>;
}
export default formHost;

View File

@ -31,6 +31,13 @@ declare namespace formProvider {
* @param { number } minute - Indicates duration minute before next update.
* @param { AsyncCallback<void> } callback - The callback of setFormNextRefreshTime.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -42,6 +49,13 @@ declare namespace formProvider {
* @param { number } minute - Indicates duration minute before next update.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds upper bound.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -54,6 +68,12 @@ declare namespace formProvider {
* @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
* @param { AsyncCallback<void> } callback - The callback of updateForm.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -66,6 +86,12 @@ declare namespace formProvider {
* @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form can not be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -77,6 +103,9 @@ declare namespace formProvider {
* @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -87,6 +116,9 @@ declare namespace formProvider {
* Client to communication with FormManagerService.
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - The callback is used to return the formInfo.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -98,6 +130,9 @@ declare namespace formProvider {
* @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -108,7 +143,11 @@ declare namespace formProvider {
* @param { Want } want - The want of the form to publish.
* @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
* @param { AsyncCallback<string> } callback - The callback is used to return the form id.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -119,7 +158,11 @@ declare namespace formProvider {
* Request to publish a form to the form host.
* @param { Want } want - The want of the form to publish.
* @param { AsyncCallback<string> } callback - The callback is used to return the form id.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -131,7 +174,11 @@ declare namespace formProvider {
* @param { Want } want - The want of the form to publish.
* @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
* @returns { Promise<string> } Returns the form id.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -141,7 +188,10 @@ declare namespace formProvider {
/**
* Check if the request of publishing a form is supported by the host
* @param { AsyncCallback<boolean> } callback - The callback is used to return true if the request is supported.
* @throws { BusinessError } 202 - If the application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9
@ -151,7 +201,9 @@ declare namespace formProvider {
/**
* Check if the request of publishing a form is supported by the host
* @returns { Promise<boolean> } Returns true if the request is supported.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 202 - If the application is not a system application.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 9

View File

@ -116,6 +116,8 @@ declare namespace commonEventManager {
* @param { AsyncCallback<CommonEventData> } callback - The callback is used to return the CommonEventData object.
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 801 - capability not supported
* @throws { BusinessError } 1500007 - error sending message to Common Event Service
* @throws { BusinessError } 1500008 - Common Event Service does not complete initialization
* @syscap SystemCapability.Notification.CommonEvent
* @since 9
*/
@ -127,6 +129,8 @@ declare namespace commonEventManager {
* @param { AsyncCallback<void> } callback - The callback of unsubscribe.
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 801 - capability not supported
* @throws { BusinessError } 1500007 - error sending message to Common Event Service
* @throws { BusinessError } 1500008 - Common Event Service does not complete initialization
* @syscap SystemCapability.Notification.CommonEvent
* @since 9
*/
@ -137,6 +141,7 @@ declare namespace commonEventManager {
* @permission ohos.permission.COMMONEVENT_STICKY
* @param { string } event - name of the common event.
* @param { AsyncCallback<void> } callback - The callback of removeStickyCommonEvent.
* @throws { BusinessError } 201 - The application dose not have permission to call the interface
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 1500004 - not system service
@ -152,6 +157,7 @@ declare namespace commonEventManager {
* Remove sticky common event.
* @permission ohos.permission.COMMONEVENT_STICKY
* @param { string } event - name of the common event.
* @throws { BusinessError } 201 - The application dose not have permission to call the interface
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 1500004 - not system service

View File

@ -50,14 +50,14 @@ declare namespace notificationManager {
* this method will update the notification.
* @param { NotificationRequest } request - notification request
* @param { AsyncCallback<void> } callback - The callback of publish.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -69,14 +69,14 @@ declare namespace notificationManager {
* this method will update the notification.
* @param { NotificationRequest } request - notification request
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -89,14 +89,16 @@ declare namespace notificationManager {
* @param { number } userId - of subscriber receiving the notification.
* @param { AsyncCallback<void> } callback - The callback of publish.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -110,14 +112,16 @@ declare namespace notificationManager {
* @param { number } userId - of subscriber receiving the notification.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -132,14 +136,16 @@ declare namespace notificationManager {
* @param { number } userId - userid of the representative
* @param { AsyncCallback<void> } callback - The callback of publishAsBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -154,14 +160,16 @@ declare namespace notificationManager {
* @param { number } userId - userid of the representative
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -172,14 +180,11 @@ declare namespace notificationManager {
* Cancel a notification with the specified ID.
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { AsyncCallback<void> } callback - The callback of cancel.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Failed to connect service.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600007 - The notification is not exist.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -190,10 +195,10 @@ declare namespace notificationManager {
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { string }label - Label of the notification to cancel.
* @param { AsyncCallback<void> } callback - The callback of cancel.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600007 - The notification is not exist.
* @syscap SystemCapability.Notification.Notification
* @since 9
@ -205,7 +210,6 @@ declare namespace notificationManager {
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { string }label - Label of the notification to cancel.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -224,6 +228,7 @@ declare namespace notificationManager {
* @param { number } userId - userid of the representative.
* @param { AsyncCallback<void> } callback - The callback of cancelAsBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -244,6 +249,7 @@ declare namespace notificationManager {
* @param { number } userId - userid of the representative.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -259,7 +265,6 @@ declare namespace notificationManager {
/**
* Cancel all notifications of the current application.
* @param { AsyncCallback<void> } callback - The callback of cancelAll.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -272,7 +277,6 @@ declare namespace notificationManager {
/**
* Cancel all notifications of the current application.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -288,10 +292,12 @@ declare namespace notificationManager {
* @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}.
* @param { AsyncCallback<void> } callback - The callback of addSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -304,10 +310,12 @@ declare namespace notificationManager {
* @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -318,11 +326,11 @@ declare namespace notificationManager {
* Adds a slot type.
* @param { SlotType } type - Slot type to add.
* @param { AsyncCallback<void> } callback - The callback of addSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -332,11 +340,11 @@ declare namespace notificationManager {
* Adds a slot type.
* @param { SlotType } type - Slot type to add.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -348,10 +356,12 @@ declare namespace notificationManager {
* @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}.
* @param { AsyncCallback<void> } callback - The callback of addSlots.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -364,10 +374,12 @@ declare namespace notificationManager {
* @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -378,7 +390,6 @@ declare namespace notificationManager {
* Obtains a notification slot of the specified slot type.
* @param { SlotType } slotType - Type of the notification slot to obtain.
* @param { AsyncCallback<NotificationSlot> } callback - The callback is used to return the NotificationSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -392,7 +403,6 @@ declare namespace notificationManager {
* Obtains a notification slot of the specified slot type.
* @param { SlotType } slotType - Type of the notification slot to obtain.
* @returns { Promise<NotificationSlot> } Returns the NotificationSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -405,7 +415,6 @@ declare namespace notificationManager {
/**
* Obtains all NotificationSlot objects created by the current application.
* @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback is used to return all notification slots of this application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -418,7 +427,6 @@ declare namespace notificationManager {
/**
* Obtains all NotificationSlot objects created by the current application.
* @returns { Promise<Array<NotificationSlot>> } Returns all notification slots of this application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -432,7 +440,6 @@ declare namespace notificationManager {
* Removes a NotificationSlot of the specified SlotType created by the current application.
* @param { SlotType } slotType - Type of the NotificationSlot to remove.
* @param { AsyncCallback<void> } callback - The callback of removeSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -446,7 +453,6 @@ declare namespace notificationManager {
* Removes a NotificationSlot of the specified SlotType created by the current application.
* @param { SlotType } slotType - Type of the NotificationSlot to remove.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -459,7 +465,6 @@ declare namespace notificationManager {
/**
* Removes all NotificationSlot objects created by the current application.
* @param { AsyncCallback<void> } callback - The callback of removeAllSlots.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -472,7 +477,6 @@ declare namespace notificationManager {
/**
* Removes all NotificationSlot objects created by the current application.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -489,6 +493,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setNotificationEnable.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -507,6 +512,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -524,6 +530,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -541,6 +548,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<boolean> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -557,6 +565,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -572,6 +581,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @returns { Promise<boolean> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -588,6 +598,7 @@ declare namespace notificationManager {
* @param { number } userId - The userid of the representative.
* @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -605,11 +616,11 @@ declare namespace notificationManager {
* @param { number } userId - The userid of the representative.
* @returns { Promise<boolean> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
@ -624,6 +635,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of displayBadge.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -642,6 +654,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -659,6 +672,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<boolean> } callback - The callback of isBadgeDisplayed.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -676,6 +690,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<boolean> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -694,6 +709,7 @@ declare namespace notificationManager {
* @param { NotificationSlot } slot - Indicates the notification slot.
* @param { AsyncCallback<void> } callback - The callback of setSlotByBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -712,6 +728,7 @@ declare namespace notificationManager {
* @param { NotificationSlot } slot - Indicates the notification slot.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -729,6 +746,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback of getSlotsByBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -746,6 +764,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<Array<NotificationSlot>> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -763,6 +782,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<number> } callback - The callback of getSlotNumByBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -780,6 +800,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<number> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -797,6 +818,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getAllActiveNotifications.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -813,6 +835,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @returns { Promise<Array<NotificationRequest>> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -826,7 +849,6 @@ declare namespace notificationManager {
/**
* Obtains the number of all active notifications.
* @param { AsyncCallback<number> } callback - The callback of getActiveNotificationCount.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -839,7 +861,6 @@ declare namespace notificationManager {
/**
* Obtains the number of all active notifications.
* @returns { Promise<number> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -852,7 +873,6 @@ declare namespace notificationManager {
/**
* Obtains an array of active notifications.
* @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getActiveNotifications.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -865,7 +885,6 @@ declare namespace notificationManager {
/**
* Obtains an array of active notifications.
* @returns { Promise<Array<NotificationRequest>> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -879,7 +898,6 @@ declare namespace notificationManager {
* Cancel the notification of a specified group for this application.
* @param { string } groupName - The name of the group.
* @param { AsyncCallback<void> } callback - The callback of cancelGroup.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -893,7 +911,6 @@ declare namespace notificationManager {
* Cancel the notification of a specified group for this application.
* @param { string } groupName - The name of the group.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -910,6 +927,7 @@ declare namespace notificationManager {
* @param { string } groupName - The name of the group.
* @param { AsyncCallback<void> } callback - The callback of removeGroupByBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -928,6 +946,7 @@ declare namespace notificationManager {
* @param { string } groupName - The name of the group.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -945,10 +964,12 @@ declare namespace notificationManager {
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -961,10 +982,12 @@ declare namespace notificationManager {
* @param { DoNotDisturbDate } date - The Do Not Disturb date.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -978,11 +1001,13 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -996,11 +1021,13 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1012,10 +1039,12 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1027,10 +1056,12 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1043,11 +1074,13 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1060,11 +1093,13 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1076,6 +1111,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether Do Not Disturb mode is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1091,6 +1127,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @returns { Promise<boolean> } Returns whether Do Not Disturb mode is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1105,7 +1142,6 @@ declare namespace notificationManager {
* Obtains whether the template is supported by the system.
* @param templateName Name of template to be Obtained.
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether the template is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1119,7 +1155,6 @@ declare namespace notificationManager {
* Obtains whether the template is supported by the system.
* @param templateName Name of template to be Obtained.
* @returns { Promise<boolean> } Returns whether the template is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1132,7 +1167,6 @@ declare namespace notificationManager {
/**
* Request permission to send notification.
* @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1145,7 +1179,6 @@ declare namespace notificationManager {
/**
* Request permission to send notification.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1161,6 +1194,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setDistributedEnable.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1178,6 +1212,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1192,7 +1227,6 @@ declare namespace notificationManager {
/**
* Obtains whether the device supports distributed notification.
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1206,7 +1240,6 @@ declare namespace notificationManager {
/**
* Obtains whether the device supports distributed notification.
* @returns { Promise<boolean> } Returns whether the distributed notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1224,6 +1257,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setDistributedEnableByBundle.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1243,6 +1277,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1261,6 +1296,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1279,6 +1315,7 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<boolean> } Returns whether the distributed notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1296,6 +1333,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<DeviceRemindType> } callback - The callback is used to return the RemindType.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1311,6 +1349,7 @@ declare namespace notificationManager {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @returns { Promise<DeviceRemindType> } Returns the RemindType.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1329,6 +1368,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1348,6 +1388,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1366,6 +1407,7 @@ declare namespace notificationManager {
* @param { SlotType } type - Type of the notification slot.
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether the application slot is enabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1384,6 +1426,7 @@ declare namespace notificationManager {
* @param { SlotType } type - Type of the notification slot.
* @returns { Promise<boolean> } Returns whether the application slot is enabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1402,6 +1445,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setSyncNotificationEnabledWithoutApp.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1420,6 +1464,7 @@ declare namespace notificationManager {
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1437,6 +1482,7 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @param { AsyncCallback<boolean> } callback - The callback is used to return whether to sync notifications to devices.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1454,6 +1500,7 @@ declare namespace notificationManager {
* @param { number } userId - The userId.
* @returns { Promise<boolean> } Returns whether to sync notifications to devices.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -1473,6 +1520,7 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 10
*/
@ -1486,6 +1534,7 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 10
*/

View File

@ -65,10 +65,12 @@ declare namespace notificationSubscribe {
* @param { NotificationSubscriber } subscriber - The notification subscriber.
* @param { AsyncCallback<void> } callback - The callback of subscribe.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -83,10 +85,12 @@ declare namespace notificationSubscribe {
* @param { AsyncCallback<void> } callback - The callback of subscribe.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -100,10 +104,12 @@ declare namespace notificationSubscribe {
* @param { NotificationSubscribeInfo } info - The notification subscribe info.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -116,6 +122,7 @@ declare namespace notificationSubscribe {
* @param { NotificationSubscriber } subscriber - The notification subscriber.
* @param { AsyncCallback<void> } callback - The callback of unsubscribe.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -132,6 +139,7 @@ declare namespace notificationSubscribe {
* @param { NotificationSubscriber } subscriber - The notification subscriber.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -150,6 +158,7 @@ declare namespace notificationSubscribe {
* @param { RemoveReason } reason - The remove reason.
* @param { AsyncCallback<void> } callback - The callback of remove.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -170,6 +179,7 @@ declare namespace notificationSubscribe {
* @param { RemoveReason } reason - The remove reason.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -189,6 +199,7 @@ declare namespace notificationSubscribe {
* @param { RemoveReason } reason - The remove reason.
* @param { AsyncCallback<void> } callback - The callback of remove.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -207,6 +218,7 @@ declare namespace notificationSubscribe {
* @param { RemoveReason } reason - The remove reason.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -224,6 +236,7 @@ declare namespace notificationSubscribe {
* @param { BundleOption } bundle - The bundle option.
* @param { AsyncCallback<void> } callback - The callback of removeAll.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -240,6 +253,7 @@ declare namespace notificationSubscribe {
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { AsyncCallback<void> } callback - The callback of removeAll.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -256,6 +270,7 @@ declare namespace notificationSubscribe {
* @param { number } userId - The userId.
* @param { AsyncCallback<void> } callback - The callback of removeAll.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -273,6 +288,7 @@ declare namespace notificationSubscribe {
* @param { number } userId - The userId.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
@ -290,6 +306,7 @@ declare namespace notificationSubscribe {
* @param { BundleOption } bundle - The bundle option.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.

View File

@ -30,12 +30,33 @@ export default class FormExtensionContext extends ExtensionContext {
* Start an ability within the same bundle.
* @param { Want } want - includes ability name, parameters and relative info sending to an ability.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16500101 - The application is not a system application.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @StageModelOnly
* @since 9
*/
startAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Start an ability within the same bundle.
* @param { Want } want - includes ability name, parameters and relative info sending to an ability.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16500101 - The application is not a system application.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @StageModelOnly
* @since 9
*/
startAbility(want: Want): Promise<void>;
}