!10211 feat:新增查询上一次端云同步信息接口

Merge pull request !10211 from wTong888/master
This commit is contained in:
openharmony_ci 2024-04-25 05:49:47 +00:00 committed by Gitee
commit 3b9735669c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -158,6 +158,46 @@ declare namespace cloudData {
normal: number;
}
/**
* Sync information.
*
* @interface SyncInfo
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 12
*/
interface SyncInfo {
/**
* Sync start time.
*
* @type { Date }
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 12
*/
startTime: Date;
/**
* Sync finish time.
*
* @type { Date }
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 12
*/
finishTime: Date;
/**
* Sync progress.
*
* @type { relationalStore.ProgressCode }
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 12
*/
code: relationalStore.ProgressCode;
}
/**
* Provides methods to set CloudSync config.
*
@ -446,6 +486,28 @@ declare namespace cloudData {
storeId?: string
): Promise<Record<string, Array<StatisticInfo>>>;
/**
* Queries last sync information.
*
* @permission ohos.permission.CLOUDDATA_CONFIG
* @param { string } accountId - Indicates the account ID. The account ID is required by hashing cloud account.
* @param { string } bundleName - Indicates the name of application.
* @param { string } [storeId] - Indicates the store ID.
* @returns { Promise<Record<string, SyncInfo>> } Promise used to return the result.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission denied. The application is not a system application.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 12
*/
static queryLastSyncInfo(
accountId: string,
bundleName: string,
storeId?: string
): Promise<Record<string, SyncInfo>>;
/**
* deletes cloud information from local data.
*