From caeb820d0f4d8601e76803f6f2d91b23f371fb00 Mon Sep 17 00:00:00 2001 From: cwx1266844 Date: Wed, 13 Dec 2023 14:51:36 +0800 Subject: [PATCH] =?UTF-8?q?CloudSyncManager=E7=9A=84d.ts=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E9=80=82=E9=85=8DArkTS=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cwx1266844 --- api/@ohos.file.cloudSyncManager.d.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/api/@ohos.file.cloudSyncManager.d.ts b/api/@ohos.file.cloudSyncManager.d.ts index 166bae82b..5afa4ddcb 100644 --- a/api/@ohos.file.cloudSyncManager.d.ts +++ b/api/@ohos.file.cloudSyncManager.d.ts @@ -100,7 +100,7 @@ declare namespace cloudSyncManager { * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER * @param { string } accountId - Current account id. - * @param { object } switches - Indicates switches information of all applications. + * @param { Record } switches - Indicates switches information of all applications. * @returns { Promise } Return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -109,14 +109,14 @@ declare namespace cloudSyncManager { * @systemapi * @since 10 */ - function enableCloud(accountId: string, switches: { [bundleName: string]: boolean }): Promise; + function enableCloud(accountId: string, switches: Record): Promise; /** * Enable the cloud file synchronization function. * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER * @param { string } accountId - Current account id - * @param { object } switches - Indicates switches information of all applications. + * @param { Record } switches - Indicates switches information of all applications. * @param { AsyncCallback } [callback] - Callback function * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -125,11 +125,7 @@ declare namespace cloudSyncManager { * @systemapi * @since 10 */ - function enableCloud( - accountId: string, - switches: { [bundleName: string]: boolean }, - callback: AsyncCallback - ): void; + function enableCloud(accountId: string, switches: Record, callback: AsyncCallback): void; /** * Disable the cloud file synchronization function. @@ -197,7 +193,7 @@ declare namespace cloudSyncManager { * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER * @param { string } accountId - Current account id. - * @param { object } appActions - Indicates information about cloud file need to clear in which way. + * @param { Record } appActions - Indicates information about cloud file need to clear in which way. * @returns { Promise } Return Promise. * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -206,14 +202,14 @@ declare namespace cloudSyncManager { * @systemapi * @since 10 */ - function clean(accountId: string, appActions: { [bundleName: string]: Action }): Promise; + function clean(accountId: string, appActions: Record): Promise; /** * Clean up cloud-related file data based on specific action. * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER * @param { string } accountId - Current account id. - * @param { object } appActions - Indicates information about cloud file need to clear in which way. + * @param { Record } appActions - Indicates information about cloud file need to clear in which way. * @param { AsyncCallback } callback - Callback function * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -222,7 +218,7 @@ declare namespace cloudSyncManager { * @systemapi * @since 10 */ - function clean(accountId: string, appActions: { [bundleName: string]: Action }, callback: AsyncCallback): void; + function clean(accountId: string, appActions: Record, callback: AsyncCallback): void; /** * Notify the change of data in cloud.