diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index b481c7780ca62b30d36ca4d3704388915b6cff73..0d5317ac332944e9f26355b9f48d9aa664cb7fbf 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -2164,7 +2164,15 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Asset uri, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ URI = 'uri', @@ -2271,7 +2279,15 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Modified date of the asset, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ DATE_MODIFIED = 'date_modified', @@ -2806,8 +2822,8 @@ declare namespace photoAccessHelper { */ /** * URI of the album. - * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 @@ -2851,14 +2867,6 @@ declare namespace photoAccessHelper { * @systemapi * @since 18 */ - /** - * Timestamp when the album was modified, in milliseconds. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @atomicservice - * @since 20 - */ DATE_MODIFIED = 'date_modified', } @@ -3246,8 +3254,6 @@ declare namespace photoAccessHelper { * Obtains the total number of files in the result set. * * @returns { number } Total number of objects. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3287,8 +3293,6 @@ declare namespace photoAccessHelper { * You need to check whether the object is the last one before calling getNextObject. * * @returns { boolean } Whether the object is the last one in the fetch result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3324,8 +3328,6 @@ declare namespace photoAccessHelper { * Obtains the first file asset in the result set. This API uses an asynchronous callback to return the result. * * @param { AsyncCallback } callback - Callback used to return the first file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3362,8 +3364,6 @@ declare namespace photoAccessHelper { * Obtains the first file asset in the result set. This API uses a promise to return the result. * * @returns { Promise } Returns the first object in the fetch result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3403,8 +3403,6 @@ declare namespace photoAccessHelper { * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set. * * @param { AsyncCallback } callback - Callback used to return the next file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3444,8 +3442,6 @@ declare namespace photoAccessHelper { * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set. * * @returns { Promise } Returns the next object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3482,8 +3478,6 @@ declare namespace photoAccessHelper { * Obtains the last file asset in the result set. This API uses an asynchronous callback to return the result. * * @param { AsyncCallback } callback - Callback used to return the last file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3519,8 +3513,6 @@ declare namespace photoAccessHelper { * Obtains the last file asset in the result set. This API uses a promise to return the result. * * @returns { Promise } Returns the last object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3559,8 +3551,6 @@ declare namespace photoAccessHelper { * * @param { number } index - Index of the file asset to obtain. The value starts from 0. * @param { AsyncCallback } callback - Callback used to return the file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3600,8 +3590,6 @@ declare namespace photoAccessHelper { * * @param { number } index - Index of the file asset to obtain. The value starts from 0. * @returns { Promise } Returns the object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3638,8 +3626,6 @@ declare namespace photoAccessHelper { * Obtains all the file assets in the result set. This API uses an asynchronous callback to return the result. * * @param { AsyncCallback> } callback - Callback used to return an array of all file assets in the result set. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3676,8 +3662,6 @@ declare namespace photoAccessHelper { * Obtains all the file assets in the result set. This API uses a promise to return the result. * * @returns { Promise> } Returns all the objects - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3711,8 +3695,6 @@ declare namespace photoAccessHelper { /** * Closes this FetchResult instance to invalidate it. After this instance is released, the APIs in this instance cannot be invoked. * - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -4251,8 +4233,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ getAssets(options: FetchOptions): Promise>; @@ -4672,7 +4654,21 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Obtains image and video assets. This API uses a promise to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { FetchOptions } options - Options for fetching the image and video assets. + * @returns { Promise> } Returns the fetch result. + * @throws { BusinessError } 201 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ getAssets(options: FetchOptions): Promise>; @@ -4698,8 +4694,6 @@ declare namespace photoAccessHelper { * @param { FetchOptions } options - Options for fetching the burst photos. * @returns { Promise> } Returns the fetch result. * @throws { BusinessError } 201 - Permission denied - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice