mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-30 10:53:31 +00:00
modify setappaccess code
Signed-off-by: xuqian <xuqian65@huawei.com>
This commit is contained in:
parent
86707e0fdb
commit
c7667e086b
34
api/@ohos.account.appAccount.d.ts
vendored
34
api/@ohos.account.appAccount.d.ts
vendored
@ -344,6 +344,23 @@ declare namespace appAccount {
|
||||
* @syscap SystemCapability.Account.AppAccount
|
||||
* @since 9
|
||||
*/
|
||||
/**
|
||||
* Sets a third-party application with the specified bundle name to access the given application
|
||||
* account for data query and listening.
|
||||
*
|
||||
* @param { string } name - Indicates the name of the application account.
|
||||
* @param { string } bundleName - Indicates the bundle name of the third-party application.
|
||||
* @param { boolean } isAccessible - Indicates the accessibility flag, true for accessible, false for inaccessible.
|
||||
* @param { AsyncCallback<void> } callback - Asynchronous callback interface.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameter types.
|
||||
* @throws { BusinessError } 12300001 - System service exception.
|
||||
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
|
||||
* @throws { BusinessError } 12300003 - Account not found.
|
||||
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
|
||||
* @syscap SystemCapability.Account.AppAccount
|
||||
* @since 14
|
||||
*/
|
||||
setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
@ -363,6 +380,23 @@ declare namespace appAccount {
|
||||
* @syscap SystemCapability.Account.AppAccount
|
||||
* @since 9
|
||||
*/
|
||||
/**
|
||||
* Sets a third-party application with the specified bundle name to access the given application
|
||||
* account for data query and listening.
|
||||
*
|
||||
* @param { string } name - Indicates the name of the application account.
|
||||
* @param { string } bundleName - Indicates the bundle name of the third-party application.
|
||||
* @param { boolean } isAccessible - Indicates the accessibility flag, true for accessible, false for inaccessible.
|
||||
* @returns { Promise<void> } The promise returned by the function.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameter types.
|
||||
* @throws { BusinessError } 12300001 - System service exception.
|
||||
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
|
||||
* @throws { BusinessError } 12300003 - Account not found.
|
||||
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
|
||||
* @syscap SystemCapability.Account.AppAccount
|
||||
* @since 14
|
||||
*/
|
||||
setAppAccess(name: string, bundleName: string, isAccessible: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user