mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
!10211 feat:新增查询上一次端云同步信息接口
Merge pull request !10211 from wTong888/master
This commit is contained in:
commit
3b9735669c
62
api/@ohos.data.cloudData.d.ts
vendored
62
api/@ohos.data.cloudData.d.ts
vendored
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user