diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 1ad094694a3eaba5f3bc54147584c02da4b06cff..f114ba51a95de44cc302c8b59ba7ea1ad3073844 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; /**