From bf81220d528c7376f79dc22610eda16932136676 Mon Sep 17 00:00:00 2001 From: yujann Date: Tue, 27 May 2025 15:44:25 +0800 Subject: [PATCH] change getOsAccountDistributedInfoByLocalId permission - sdk Change-Id: I8a30019666c7796ad8cf3f2fb62d9d94550ad734 Signed-off-by: yujann --- api/@ohos.account.distributedAccount.d.ts | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 1ad094694a..f114ba51a9 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -111,6 +111,21 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ + /** + * Gets the distributed information of the specified OS account. + * + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or (ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and + * ohos.permission.GET_DISTRIBUTED_ACCOUNTS) + * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { AsyncCallback } callback - Asynchronous callback interface. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - System service exception. + * @throws { BusinessError } 12300003 - Account not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + */ getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback): void; /** @@ -129,6 +144,21 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ + /** + * Gets the distributed information of the specified OS account. + * + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or (ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and + * ohos.permission.GET_DISTRIBUTED_ACCOUNTS) + * @param { number } localId - Indicates the local ID of the specified OS account. + * @returns { Promise } The distributed information of the specified OS account. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - System service exception. + * @throws { BusinessError } 12300003 - Account not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + */ getOsAccountDistributedInfoByLocalId(localId: number): Promise; /** -- Gitee