diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 2592c0a65586381e5d7762548122570525ee5879..e27414499ed418944067aa42c249d9ae54f90e61 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -127,6 +127,81 @@ declare namespace photoAccessHelper { AVFILE_FORMAT_JPG = 'jpg', } + /** + * Context information of the exit status of PhotoPicker, + * which can be used for on-site recovery of PhotoPicker next time. + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + class ContextRecoveryInfo { + /** + * The album URI from which the user exited during the last selection. + * The default value is empty string. + * + * @type { string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + albumUri: string; + + /** + * Timestamp of the first fully visible photo in the last selection interface. + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + time: number; + + /** + * Filename of the first fully visible photo in the last selection interface. + * The default value is empty string. + * + * @type { string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + displayName: string; + + /** + * Enum value of the recommendation content set by the user during the last selection (see `RecommendationType`). + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + recommendationType: number; + + /** + * Enum value of the recommendation content selected by the user during the last selection (see `RecommendationType`). + * The default value is 0. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + selectedRecommendationType: number; + + /** + * Context data version number for validating compatibility of context recovery. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + version: number; + } + /** * Enumerates media file types. * @@ -7866,6 +7941,16 @@ declare namespace photoAccessHelper { * @since 18 */ userId?: number; + + /** + * Context recovery information for restoring the last selection session. + * + * @type { ?ContextRecoveryInfo } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + contextRecoveryInfo?: ContextRecoveryInfo; } /** @@ -8006,6 +8091,16 @@ declare namespace photoAccessHelper { * @since 12 */ isOriginalPhoto: boolean; + + /** + * Contextual information about the PhotoPicker's exit state. + * + * @type { ContextRecoveryInfo } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + contextRecoveryInfo: ContextRecoveryInfo; } /**