• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file Helper functions to access image and video assets
18 * @kit MediaLibraryKit
19 */
20
21import type { AsyncCallback, Callback } from './@ohos.base';
22import type Context from './application/Context';
23import type image from './@ohos.multimedia.image';
24import type dataSharePredicates from './@ohos.data.dataSharePredicates';
25import type { CustomColors } from './@ohos.arkui.theme';
26
27/**
28 * Helper functions to access image and video assets
29 *
30 * @namespace photoAccessHelper
31 * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
32 * @since 10
33 */
34/**
35 * Helper functions to access image and video assets
36 *
37 * @namespace photoAccessHelper
38 * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
39 * @atomicservice
40 * @since 11
41 */
42/**
43 * Helper functions to access image and video assets
44 *
45 * @namespace photoAccessHelper
46 * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
47 * @crossplatform
48 * @atomicservice
49 * @since arkts {'1.1':'12','1.2':'20'}
50 * @arkts 1.1&1.2
51 */
52declare namespace photoAccessHelper {
53  /**
54   * Obtains a PhotoAccessHelper instance for accessing and modifying media files in the album.
55   *
56   * @param { Context } context - Context of the ability instance.
57   * @returns { PhotoAccessHelper } Instance of PhotoAccessHelper
58   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
59   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
60   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
61   * @StageModelOnly
62   * @since 10
63   */
64  /**
65   * Obtains a PhotoAccessHelper instance for accessing and modifying media files in the album.
66   *
67   * @param { Context } context - Context of the ability instance.
68   * @returns { PhotoAccessHelper } Instance of PhotoAccessHelper
69   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
70   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
71   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
72   * @StageModelOnly
73   * @atomicservice
74   * @since 11
75   */
76  /**
77   * Obtains a PhotoAccessHelper instance for accessing and modifying media files in the album.
78   *
79   * @param { Context } context - Context of the ability instance.
80   * @returns { PhotoAccessHelper } Instance of PhotoAccessHelper
81   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
82   * <br>2. Incorrect parameter types; 3. Parameter verification failed.
83   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
84   * @StageModelOnly
85   * @crossplatform
86   * @atomicservice
87   * @since arkts {'1.1':'12','1.2':'20'}
88   * @arkts 1.1&1.2
89   */
90  function getPhotoAccessHelper(context: Context): PhotoAccessHelper;
91
92  /**
93   * Returns an instance of PhotoAccessHelper
94   *
95   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
96   * @param { Context } context - Hap context information
97   * @param { number } userId - Target userId
98   * @returns { PhotoAccessHelper } Instance of PhotoAccessHelper
99   * @throws { BusinessError } 201 - Permission denied
100   * @throws { BusinessError } 202 - Called by non-system application
101   * @throws { BusinessError } 13900020 - Invalid argument
102   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
103   * @systemapi
104   * @StageModelOnly
105   * @since 19
106   */
107  function getPhotoAccessHelper(context: Context, userId: number): PhotoAccessHelper;
108
109  /**
110   * Enumerates the types of av file format.
111   *
112   * @enum { string } SupportedImageFormat
113   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
114   * @systemapi
115   * @since 20
116   * @arkts 1.1&1.2
117   */
118  enum SupportedImageFormat {
119    /**
120     * jpg format
121     *
122     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
123     * @systemapi
124     * @since 20
125     * @arkts 1.1&1.2
126     */
127    AVFILE_FORMAT_JPG = 'jpg',
128  }
129
130  /**
131   * Enumerates media file types.
132   *
133   * @enum { number } PhotoType
134   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
135   * @since 10
136   */
137  /**
138   * Enumerates media file types.
139   *
140   * @enum { number } PhotoType
141   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
142   * @atomicservice
143   * @since 11
144   */
145  /**
146   * Enumerates media file types.
147   *
148   * @enum { number } PhotoType
149   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
150   * @crossplatform
151   * @atomicservice
152   * @since arkts {'1.1':'12','1.2':'20'}
153   * @arkts 1.1&1.2
154   */
155  enum PhotoType {
156    /**
157     * Image asset
158     *
159     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
160     * @since 10
161     */
162    /**
163     * Image asset
164     *
165     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
166     * @atomicservice
167     * @since 11
168     */
169    /**
170     * Image asset
171     *
172     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
173     * @crossplatform
174     * @atomicservice
175     * @since arkts {'1.1':'12','1.2':'20'}
176     * @arkts 1.1&1.2
177     */
178    IMAGE = 1,
179    /**
180     * Video asset
181     *
182     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
183     * @since 10
184     */
185    /**
186     * Video asset
187     *
188     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
189     * @atomicservice
190     * @since 11
191     */
192    /**
193     * Video asset
194     *
195     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
196     * @crossplatform
197     * @atomicservice
198     * @since arkts {'1.1':'12','1.2':'20'}
199     * @arkts 1.1&1.2
200     */
201    VIDEO = 2
202  }
203
204  /**
205   * Enumerates the PhotoAsset types.
206   *
207   * @enum { number } PhotoSubtype
208   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
209   * @systemapi
210   * @since 10
211   */
212  /**
213   * Enumerates the PhotoAsset types.
214   *
215   * @enum { number } PhotoSubtype
216   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
217   * @atomicservice
218   * @since arkts {'1.1':'12','1.2':'20'}
219   * @arkts 1.1&1.2
220   */
221  enum PhotoSubtype {
222    /**
223     * Default Photo Type
224     *
225     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
226     * @systemapi
227     * @since 10
228     */
229    /**
230     * Default Photo Type
231     *
232     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
233     * @atomicservice
234     * @since arkts {'1.1':'12','1.2':'20'}
235     * @arkts 1.1&1.2
236     */
237    DEFAULT = 0,
238    /**
239     * Screenshot Photo Type
240     *
241     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
242     * @systemapi
243     * @since arkts {'1.1':'10','1.2':'20'}
244     * @arkts 1.1&1.2
245     */
246    SCREENSHOT = 1,
247    /**
248     * Moving Photo Type
249     *
250     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
251     * @atomicservice
252     * @since arkts {'1.1':'12','1.2':'20'}
253     * @arkts 1.1&1.2
254     */
255    MOVING_PHOTO = 3,
256    /**
257     * Burst Photo Type
258     *
259     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
260     * @atomicservice
261     * @since arkts {'1.1':'12','1.2':'20'}
262     * @arkts 1.1&1.2
263     */
264    BURST = 4,
265  }
266
267  /**
268   * Enumerates the formats for displaying media assets.
269   *
270   * @enum { number } DynamicRangeType
271   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
272   * @since arkts {'1.1':'12','1.2':'20'}
273   * @arkts 1.1&1.2
274   */
275  enum DynamicRangeType {
276    /**
277     * Standard dynamic range (SDR).
278     *
279     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
280     * @since arkts {'1.1':'12','1.2':'20'}
281     * @arkts 1.1&1.2
282     */
283    SDR = 0,
284    /**
285     * High dynamic range (HDR).
286     *
287     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
288     * @since arkts {'1.1':'12','1.2':'20'}
289     * @arkts 1.1&1.2
290     */
291    HDR = 1
292  }
293
294  /**
295   * Ability to access thumbnail
296   *
297   * @enum { number } ThumbnailVisibility
298   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
299   * @systemapi
300   * @since 14
301   */
302  enum ThumbnailVisibility {
303    /**
304     * Unable to access thumbnail
305     *
306     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
307     * @systemapi
308     * @since 14
309     */
310    INVISIBLE = 0,
311    /**
312     * able to access thumbnail
313     *
314     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
315     * @systemapi
316     * @since 14
317     */
318    VISIBLE = 1
319  }
320
321  /**
322   * Enumerates the file locations.
323   *
324   * @enum { number } Photo asset position, such as local device or cloud
325   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
326   * @systemapi
327   * @since 10
328   */
329  /**
330   * Enumerates the file locations.
331   *
332   * @enum { number } Photo asset position, such as local device or cloud
333   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
334   * @since arkts {'1.1':'16','1.2':'20'}
335   * @arkts 1.1&1.2
336   */
337  enum PositionType {
338    /**
339     * Asset exists only in local device
340     *
341     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
342     * @systemapi
343     * @since 10
344     */
345    /**
346     * Asset exists only in local device
347     *
348     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
349     * @since arkts {'1.1':'16','1.2':'20'}
350     * @arkts 1.1&1.2
351     */
352    LOCAL = 1,
353    /**
354     * Stored only on a local device.
355     *
356     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
357     * @systemapi
358     * @since 10
359     */
360    /**
361     * Stored only on the cloud.
362     *
363     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
364     * @since arkts {'1.1':'16','1.2':'20'}
365     * @arkts 1.1&1.2
366     */
367    CLOUD = 2,
368    /**
369     * Stored both on a local device and cloud.
370     *
371     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
372     * @since 16
373     */
374    LOCAL_AND_CLOUD = 3
375  }
376
377  /**
378   * Analysis type
379   *
380   * @enum { number } AnalysisType
381   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
382   * @systemapi
383   * @since arkts {'1.1':'11','1.2':'20'}
384   * @arkts 1.1&1.2
385   */
386  enum AnalysisType {
387    /**
388     * Analysis of aesthetics score
389     *
390     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
391     * @systemapi
392     * @since arkts {'1.1':'11','1.2':'20'}
393     * @arkts 1.1&1.2
394     */
395    ANALYSIS_AESTHETICS_SCORE = 0,
396    /**
397     * Analysis of label
398     *
399     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
400     * @systemapi
401     * @since arkts {'1.1':'11','1.2':'20'}
402     * @arkts 1.1&1.2
403     */
404    ANALYSIS_LABEL,
405    /**
406     * Analysis of ocr
407     *
408     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
409     * @systemapi
410     * @since arkts {'1.1':'11','1.2':'20'}
411     * @arkts 1.1&1.2
412     */
413    ANALYSIS_OCR,
414    /**
415     * Analysis of face
416     *
417     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
418     * @systemapi
419     * @since arkts {'1.1':'11','1.2':'20'}
420     * @arkts 1.1&1.2
421     */
422    ANALYSIS_FACE,
423    /**
424     * Analysis of object
425     *
426     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
427     * @systemapi
428     * @since arkts {'1.1':'11','1.2':'20'}
429     * @arkts 1.1&1.2
430     */
431    ANALYSIS_OBJECT,
432    /**
433     * Analysis of recommendation
434     *
435     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
436     * @systemapi
437     * @since arkts {'1.1':'11','1.2':'20'}
438     * @arkts 1.1&1.2
439     */
440    ANALYSIS_RECOMMENDATION,
441    /**
442     * Analysis of segmentation
443     *
444     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
445     * @systemapi
446     * @since arkts {'1.1':'11','1.2':'20'}
447     * @arkts 1.1&1.2
448     */
449    ANALYSIS_SEGMENTATION,
450    /**
451     * Analysis of composition
452     *
453     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
454     * @systemapi
455     * @since arkts {'1.1':'11','1.2':'20'}
456     * @arkts 1.1&1.2
457     */
458    ANALYSIS_COMPOSITION,
459    /**
460     * Analysis of saliency
461     *
462     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
463     * @systemapi
464     * @since arkts {'1.1':'11','1.2':'20'}
465     * @arkts 1.1&1.2
466     */
467    ANALYSIS_SALIENCY,
468    /**
469     * Analysis of photo detail address info
470     *
471     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
472     * @systemapi
473     * @since arkts {'1.1':'11','1.2':'20'}
474     * @arkts 1.1&1.2
475     */
476    ANALYSIS_DETAIL_ADDRESS,
477    /**
478     * Analysis of human face tag
479     *
480     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
481     * @systemapi
482     * @since arkts {'1.1':'12','1.2':'20'}
483     * @arkts 1.1&1.2
484     */
485    ANALYSIS_HUMAN_FACE_TAG,
486    /**
487     * Analysis of head position
488     *
489     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
490     * @systemapi
491     * @since arkts {'1.1':'12','1.2':'20'}
492     * @arkts 1.1&1.2
493     */
494    ANALYSIS_HEAD_POSITION,
495    /**
496     * Analysis of bone pose
497     *
498     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
499     * @systemapi
500     * @since arkts {'1.1':'12','1.2':'20'}
501     * @arkts 1.1&1.2
502     */
503    ANALYSIS_BONE_POSE,
504    /**
505     * Analysis of video label
506     *
507     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
508     * @systemapi
509     * @since arkts {'1.1':'12','1.2':'20'}
510     * @arkts 1.1&1.2
511     */
512    ANALYSIS_VIDEO_LABEL,
513    /**
514     * Analysis of highlight
515     *
516     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
517     * @systemapi
518     * @since arkts {'1.1':'12','1.2':'20'}
519     * @arkts 1.1&1.2
520     */
521    ANALYSIS_HIGHLIGHT,
522    /**
523     * Analysis of multi crop
524     *
525     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
526     * @systemapi
527     * @since arkts {'1.1':'12','1.2':'20'}
528     * @arkts 1.1&1.2
529     */
530    ANALYSIS_MULTI_CROP,
531    /**
532     * Analysis of search index
533     *
534     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
535     * @systemapi
536     * @since 18
537     */
538    ANALYSIS_SEARCH_INDEX = 16
539  }
540
541  /**
542   * Enumerates the types of recommended images.
543   *
544   * @enum { number } RecommendationType
545   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
546   * @atomicservice
547   * @since arkts {'1.1':'11','1.2':'20'}
548   * @arkts 1.1&1.2
549   */
550  enum RecommendationType {
551    /**
552     * QR_OR_BAR_CODE indicates that QR code or barcode photos can be recommended
553     *
554     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
555     * @atomicservice
556     * @since arkts {'1.1':'11','1.2':'20'}
557     * @arkts 1.1&1.2
558     */
559    QR_OR_BAR_CODE = 1,
560
561    /**
562     * QR_CODE indicates that QR code photos can be recommended
563     *
564     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
565     * @atomicservice
566     * @since arkts {'1.1':'11','1.2':'20'}
567     * @arkts 1.1&1.2
568     */
569    QR_CODE = 2,
570
571    /**
572     * BAR_CODE indicates that barcode photos can be recommended
573     *
574     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
575     * @atomicservice
576     * @since arkts {'1.1':'11','1.2':'20'}
577     * @arkts 1.1&1.2
578     */
579    BAR_CODE = 3,
580
581    /**
582     * ID_CARD indicates that QR code or barcode photos can be recommended
583     *
584     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
585     * @atomicservice
586     * @since arkts {'1.1':'11','1.2':'20'}
587     * @arkts 1.1&1.2
588     */
589    ID_CARD = 4,
590
591    /**
592     * PROFILE_PICTURE indicates that profile picture photos can be recommended
593     *
594     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
595     * @atomicservice
596     * @since arkts {'1.1':'11','1.2':'20'}
597     * @arkts 1.1&1.2
598     */
599    PROFILE_PICTURE = 5,
600
601    /**
602     * PASSPORT indicates that passport photos can be recommended
603     *
604     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
605     * @atomicservice
606     * @since arkts {'1.1':'12','1.2':'20'}
607     * @arkts 1.1&1.2
608     */
609    PASSPORT = 6,
610
611    /**
612     * BANK_CARD indicates that bank card photos can be recommended
613     *
614     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
615     * @atomicservice
616     * @since arkts {'1.1':'12','1.2':'20'}
617     * @arkts 1.1&1.2
618     */
619    BANK_CARD = 7,
620
621    /**
622     * DRIVER_LICENSE indicates that driver license photos can be recommended
623     *
624     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
625     * @atomicservice
626     * @since arkts {'1.1':'12','1.2':'20'}
627     * @arkts 1.1&1.2
628     */
629    DRIVER_LICENSE = 8,
630
631    /**
632     * DRIVING_LICENSE indicates that driving license photos can be recommended
633     *
634     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
635     * @atomicservice
636     * @since arkts {'1.1':'12','1.2':'20'}
637     * @arkts 1.1&1.2
638     */
639    DRIVING_LICENSE = 9,
640
641    /**
642     * FEATURED_SINGLE_PORTRAIT indicates that featured single portrait photos can be recommended
643     *
644     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
645     * @atomicservice
646     * @since arkts {'1.1':'12','1.2':'20'}
647     * @arkts 1.1&1.2
648     */
649    FEATURED_SINGLE_PORTRAIT = 10,
650
651    /**
652     * COLOR_STYLE_PHOTO indicates that color style photo can be recommended
653     *
654     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
655     * @systemapi
656     * @since 18
657     */
658    COLOR_STYLE_PHOTO = 12
659  }
660
661  /**
662   * Enumerates the asset delivery modes.
663   *
664   * @enum { number } DeliveryMode
665   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
666   * @since arkts {'1.1':'11','1.2':'20'}
667   * @arkts 1.1&1.2
668   */
669  enum DeliveryMode {
670    /**
671     * Fast mode.
672     *
673     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
674     * @since arkts {'1.1':'11','1.2':'20'}
675     * @arkts 1.1&1.2
676     */
677    FAST_MODE = 0,
678
679    /**
680     * High-quality mode.
681     *
682     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
683     * @since arkts {'1.1':'11','1.2':'20'}
684     * @arkts 1.1&1.2
685     */
686    HIGH_QUALITY_MODE = 1,
687
688    /**
689     * Balance mode.
690     *
691     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
692     * @since arkts {'1.1':'11','1.2':'20'}
693     * @arkts 1.1&1.2
694     */
695    BALANCE_MODE = 2
696  }
697
698  /**
699   * Enumerates the video transcoding mode.
700   *
701   * @enum { number } CompatibleMode
702   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
703   * @since arkts {'1.1':'15','1.2':'20'}
704   * @arkts 1.1&1.2
705   */
706  enum CompatibleMode {
707    /**
708     * Maintains the original video format.
709     *
710     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
711     * @since arkts {'1.1':'15','1.2':'20'}
712     * @arkts 1.1&1.2
713     */
714    ORIGINAL_FORMAT_MODE = 0,
715
716    /**
717     * Converts the HDR content to SDR format.
718     *
719     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
720     * @since arkts {'1.1':'15','1.2':'20'}
721     * @arkts 1.1&1.2
722     */
723    COMPATIBLE_FORMAT_MODE = 1
724  }
725
726  /**
727   * Data handler used to notify the progress of required media asset data
728   *
729   * @interface MediaAssetProgressHandler
730   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
731   * @since arkts {'1.1':'15','1.2':'20'}
732   * @arkts 1.1&1.2
733   */
734  interface MediaAssetProgressHandler {
735    /**
736     * Indicates the progress of required media asset data
737     *
738     * @param { number } progress - Progress in percentage. Value range: 0 to 100
739     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
740     * @since arkts {'1.1':'15','1.2':'20'}
741     * @arkts 1.1&1.2
742     */
743    onProgress(progress: number): void;
744  }
745
746  /**
747   * Enumerates the types of the file to read.
748   *
749   * @enum { number } SourceMode
750   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
751   * @systemapi
752   * @since arkts {'1.1':'11','1.2':'20'}
753   * @arkts 1.1&1.2
754   */
755  enum SourceMode {
756    /**
757     * Original file.
758     *
759     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
760     * @systemapi
761     * @since arkts {'1.1':'11','1.2':'20'}
762     * @arkts 1.1&1.2
763     */
764    ORIGINAL_MODE = 0,
765
766    /**
767     * Edited file.
768     *
769     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
770     * @systemapi
771     * @since arkts {'1.1':'11','1.2':'20'}
772     * @arkts 1.1&1.2
773     */
774    EDITED_MODE = 1
775  }
776
777  /**
778   * Enumeration type of permissions for accessing asset uri.
779   *
780   * @enum { number } PhotoPermissionType
781   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
782   * @systemapi
783   * @since arkts {'1.1':'12','1.2':'20'}
784   * @arkts 1.1&1.2
785   */
786  enum PhotoPermissionType {
787    /**
788     * Temporary read permission.
789     *
790     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
791     * @systemapi
792     * @since arkts {'1.1':'12','1.2':'20'}
793     * @arkts 1.1&1.2
794     */
795    TEMPORARY_READ_IMAGEVIDEO = 0,
796
797    /**
798     * Persistent read permission.
799     *
800     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
801     * @systemapi
802     * @since arkts {'1.1':'12','1.2':'20'}
803     * @arkts 1.1&1.2
804     */
805    PERSISTENT_READ_IMAGEVIDEO = 1
806  }
807
808  /**
809   * Enumerates the types of media resource information to be hidden from an application.
810   *
811   * @enum { number } HideSensitiveType
812   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
813   * @systemapi
814   * @since arkts {'1.1':'12','1.2':'20'}
815   * @arkts 1.1&1.2
816   */
817  enum HideSensitiveType {
818    /**
819     * Geographical location and shooting parameters.
820     *
821     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
822     * @systemapi
823     * @since arkts {'1.1':'12','1.2':'20'}
824     * @arkts 1.1&1.2
825     */
826    HIDE_LOCATION_AND_SHOOTING_PARAM = 0,
827
828    /**
829     * Geographical location information.
830     *
831     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
832     * @systemapi
833     * @since arkts {'1.1':'12','1.2':'20'}
834     * @arkts 1.1&1.2
835     */
836    HIDE_LOCATION_ONLY = 1,
837
838    /**
839     * Shooting parameters.
840     *
841     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
842     * @systemapi
843     * @since arkts {'1.1':'12','1.2':'20'}
844     * @arkts 1.1&1.2
845     */
846    HIDE_SHOOTING_PARAM_ONLY = 2,
847
848    /**
849     * Do not hide any information.
850     *
851     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
852     * @systemapi
853     * @since arkts {'1.1':'12','1.2':'20'}
854     * @arkts 1.1&1.2
855     */
856    NO_HIDE_SENSITIVE_TYPE = 3
857  }
858
859  /**
860   * Enumerates the authorization modes.
861   *
862   * @enum { number } AuthorizationMode
863   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
864   * @systemapi
865   * @since arkts {'1.1':'12','1.2':'20'}
866   * @arkts 1.1&1.2
867   */
868  enum AuthorizationMode {
869    /**
870     * Temporary authorization.
871     *
872     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
873     * @systemapi
874     * @since arkts {'1.1':'12','1.2':'20'}
875     * @arkts 1.1&1.2
876     */
877    SHORT_TIME_AUTHORIZATION = 0
878  }
879
880  /**
881   * Enumerates the watermark editable flags.
882   *
883   * @enum { number } WatermarkType
884   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
885   * @systemapi
886   * @since arkts {'1.1':'14','1.2':'20'}
887   * @arkts 1.1&1.2
888   */
889  enum WatermarkType {
890    /**
891     * Watermarks are not editable.
892     *
893     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
894     * @systemapi
895     * @since arkts {'1.1':'14','1.2':'20'}
896     * @arkts 1.1&1.2
897     */
898    DEFAULT = 0,
899
900    /**
901     * Brand and common watermarks are editable.
902     *
903     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
904     * @systemapi
905     * @since arkts {'1.1':'14','1.2':'20'}
906     * @arkts 1.1&1.2
907     */
908    BRAND_COMMON = 1,
909
910    /**
911     * Common watermarks are editable.
912     *
913     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
914     * @systemapi
915     * @since arkts {'1.1':'14','1.2':'20'}
916     * @arkts 1.1&1.2
917     */
918    COMMON = 2,
919
920    /**
921     * Brand watermarks are editable.
922     *
923     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
924     * @systemapi
925     * @since arkts {'1.1':'14','1.2':'20'}
926     * @arkts 1.1&1.2
927     */
928    BRAND = 3,
929  }
930
931  /**
932   * Enum: complete button text
933   *
934   * @enum { number } CompleteButtonText
935   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
936   * @atomicservice
937   * @since arkts {'1.1':'14','1.2':'20'}
938   * @arkts 1.1&1.2
939   */
940  enum CompleteButtonText {
941    /**
942     * Complete button text: done
943     *
944     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
945     * @atomicservice
946     * @since arkts {'1.1':'14','1.2':'20'}
947     * @arkts 1.1&1.2
948     */
949    TEXT_DONE = 0,
950    /**
951     * Complete button text: send
952     *
953     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
954     * @atomicservice
955     * @since arkts {'1.1':'14','1.2':'20'}
956     * @arkts 1.1&1.2
957     */
958    TEXT_SEND = 1,
959
960    /**
961     * Complete button text: add
962     *
963     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
964     * @atomicservice
965     * @since arkts {'1.1':'14','1.2':'20'}
966     * @arkts 1.1&1.2
967     */
968    TEXT_ADD = 2,
969  }
970
971  /**
972   * Options to request media asset
973   *
974   * @interface RequestOptions
975   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
976   * @since arkts {'1.1':'11','1.2':'20'}
977   * @arkts 1.1&1.2
978   */
979  interface RequestOptions {
980    /**
981     * Indicates the delivery mode
982     *
983     * @type { DeliveryMode }
984     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
985     * @since arkts {'1.1':'11','1.2':'20'}
986     * @arkts 1.1&1.2
987     */
988    deliveryMode: DeliveryMode;
989
990    /**
991     * Indicates the source mode
992     *
993     * @type { ?SourceMode }
994     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
995     * @systemapi
996     * @since arkts {'1.1':'11','1.2':'20'}
997     * @arkts 1.1&1.2
998     */
999    sourceMode?: SourceMode;
1000
1001    /**
1002     * Indicates the compatible mode
1003     *
1004     * @type { ?CompatibleMode }
1005     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1006     * @since arkts {'1.1':'15','1.2':'20'}
1007     * @arkts 1.1&1.2
1008     */
1009    compatibleMode?: CompatibleMode;
1010
1011    /**
1012     * data handler used to notify the progress of required media asset data
1013     *
1014     * @type { ?MediaAssetProgressHandler }
1015     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1016     * @since arkts {'1.1':'15','1.2':'20'}
1017     * @arkts 1.1&1.2
1018     */
1019    mediaAssetProgressHandler?: MediaAssetProgressHandler;
1020  }
1021
1022  /**
1023   * Media asset handler, which can be used to customize the media asset processing logic in onDataPrepared.
1024   *
1025   * @interface MediaAssetDataHandler
1026   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1027   * @since arkts {'1.1':'11','1.2':'20'}
1028   * @arkts 1.1&1.2
1029   */
1030  interface MediaAssetDataHandler<T> {
1031    /**
1032     * Indicates required media asset data is prepared
1033     *
1034     * @param { T } data - the returned data of media asset
1035     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1036     * @since 11
1037     */
1038    /**
1039     * Indicates required media asset data is prepared
1040     *
1041     * @param { T } data - the returned data of media asset
1042     * @param { Map<string, string> } [map] - additional information for the data
1043     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1044     * @since arkts {'1.1':'12','1.2':'20'}
1045     * @arkts 1.1&1.2
1046     */
1047    onDataPrepared(data: T, map?: Map<string, string>): void;
1048  }
1049
1050  /**
1051   * Data handler when quick request image is finished
1052   *
1053   * @typedef QuickImageDataHandler
1054   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1055   * @since arkts {'1.1':'13','1.2':'20'}
1056   * @arkts 1.1&1.2
1057   */
1058  interface QuickImageDataHandler<T> {
1059    /**
1060     * Indicates required media asset data quickly is prepared
1061     *
1062     * @param { T } data - the returned data of picture
1063     * @param { image.ImageSource } imageSource - the returned data of imageSource
1064     * @param { Map<string, string> } map - additional information for the data
1065     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1066     * @since arkts {'1.1':'13','1.2':'20'}
1067     * @arkts 1.1&1.2
1068     */
1069    onDataPrepared(data: T, imageSource: image.ImageSource, map: Map<string, string>): void;
1070  }
1071
1072  /**
1073   * Photo proxy object, which is used by the camera application to write image data.
1074   *
1075   * @interface PhotoProxy
1076   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1077   * @systemapi
1078   * @since arkts {'1.1':'11','1.2':'20'}
1079   * @arkts 1.1&1.2
1080   */
1081  interface PhotoProxy {}
1082
1083  /**
1084   * A media asset manager class, used for manipulating the read and write operations of media assets.
1085   *
1086   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1087   * @since 11
1088   */
1089  /**
1090   * A media asset manager class, used for manipulating the read and write operations of media assets.
1091   *
1092   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1093   * @atomicservice
1094   * @since 14
1095   */
1096  class MediaAssetManager {
1097    /**
1098     * Request image
1099     *
1100     * @permission ohos.permission.READ_IMAGEVIDEO
1101     * @param { Context } context - Context of the ability instance.
1102     * @param { PhotoAsset } asset - Image to request.
1103     * @param { RequestOptions } requestOptions - Options for requesting the image.
1104     * @param { MediaAssetDataHandler<image.ImageSource> } dataHandler - Media asset handler, which invokes a callback to return the image when the requested image is ready.
1105     * @returns { Promise<string> } Returns request id
1106     * @throws { BusinessError } 201 - Permission denied
1107     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1108     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1109     * @throws { BusinessError } 14000011 - System inner fail
1110     * @static
1111     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1112     * @since 11
1113     */
1114    static requestImage(
1115      context: Context,
1116      asset: PhotoAsset,
1117      requestOptions: RequestOptions,
1118      dataHandler: MediaAssetDataHandler<image.ImageSource>
1119    ): Promise<string>;
1120
1121    /**
1122     * Requests an image quickly.
1123     *
1124     * @permission ohos.permission.READ_IMAGEVIDEO
1125     * @param { Context } context - Context of the ability instance.
1126     * @param { PhotoAsset } asset - Image to request.
1127     * @param { RequestOptions } requestOptions - Options for requesting the image.
1128     * @param { QuickImageDataHandler<image.Picture> } dataHandler - Media asset handler, which invokes a callback to return the image when the requested image is ready.
1129     * @returns { Promise<string> } Returns request id
1130     * @throws { BusinessError } 201 - Permission denied
1131     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1132     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1133     * @throws { BusinessError } 14000011 - Internal system error
1134     * @static
1135     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1136     * @since 13
1137     */
1138    static quickRequestImage(
1139      context: Context,
1140      asset: PhotoAsset,
1141      requestOptions: RequestOptions,
1142      dataHandler: QuickImageDataHandler<image.Picture>
1143    ): Promise<string>;
1144
1145    /**
1146     * Requests image data.
1147     *
1148     * @permission ohos.permission.READ_IMAGEVIDEO
1149     * @param { Context } context - Context of the ability instance.
1150     * @param { PhotoAsset } asset - Image to request.
1151     * @param { RequestOptions } requestOptions - Options for requesting the image.
1152     * @param { MediaAssetDataHandler<ArrayBuffer> } dataHandler - Media asset handler, which invokes a callback to return the image when the requested image is ready.
1153     * @returns { Promise<string> } Returns request id
1154     * @throws { BusinessError } 201 - Permission denied
1155     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1156     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1157     * @throws { BusinessError } 14000011 - System inner fail
1158     * @static
1159     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1160     * @since 11
1161     */
1162    static requestImageData(
1163      context: Context,
1164      asset: PhotoAsset,
1165      requestOptions: RequestOptions,
1166      dataHandler: MediaAssetDataHandler<ArrayBuffer>
1167    ): Promise<string>;
1168
1169    /**
1170     * Requests a moving photo object, which can be used to request the asset data of the moving photo.
1171     *
1172     * @permission ohos.permission.READ_IMAGEVIDEO
1173     * @param { Context } context - Context of the ability instance.
1174     * @param { PhotoAsset } asset - Image to request.
1175     * @param { RequestOptions } requestOptions - Options for requesting the image.
1176     * @param { MediaAssetDataHandler<MovingPhoto> } dataHandler - Media asset handler, which invokes a callback to return the image when the requested image is ready.
1177     * @returns { Promise<string> } Returns request id
1178     * @throws { BusinessError } 201 - Permission denied
1179     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1180     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1181     * @throws { BusinessError } 14000011 - System inner fail
1182     * @static
1183     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1184     * @since 12
1185     */
1186    /**
1187     * Requests a moving photo object, which can be used to request the asset data of the moving photo.
1188     *
1189     * @permission ohos.permission.READ_IMAGEVIDEO
1190     * @param { Context } context - Context of the ability instance.
1191     * @param { PhotoAsset } asset - Image to request.
1192     * @param { RequestOptions } requestOptions - Options for requesting the image.
1193     * @param { MediaAssetDataHandler<MovingPhoto> } dataHandler - Media asset handler, which invokes a callback to return the image when the requested image is ready.
1194     * @returns { Promise<string> } Returns request id
1195     * @throws { BusinessError } 201 - Permission denied
1196     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1197     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1198     * @throws { BusinessError } 801 - Capability not supported.
1199     * @throws { BusinessError } 14000011 - System inner fail
1200     * @static
1201     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1202     * @since 18
1203     */
1204    static requestMovingPhoto(
1205      context: Context,
1206      asset: PhotoAsset,
1207      requestOptions: RequestOptions,
1208      dataHandler: MediaAssetDataHandler<MovingPhoto>
1209    ): Promise<string>;
1210
1211    /**
1212     * Cancels a request for the asset, the callback of which has not been triggered yet.
1213     *
1214     * @permission ohos.permission.READ_IMAGEVIDEO
1215     * @param { Context } context - Context of the ability instance.
1216     * @param { string } requestId - ID of the request to cancel. It is a valid request ID returned by requestImage.
1217     * @returns { Promise<void> } Returns void
1218     * @throws { BusinessError } 201 - Permission denied
1219     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1220     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1221     * @throws { BusinessError } 14000011 - System inner fail
1222     * @static
1223     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1224     * @since 12
1225     */
1226    static cancelRequest(context: Context, requestId: string): Promise<void>;
1227
1228    /**
1229     * Request video file
1230     *
1231     * @permission ohos.permission.READ_IMAGEVIDEO
1232     * @param { Context } context - Context of the ability instance.
1233     * @param { PhotoAsset } asset - Image to request.
1234     * @param { RequestOptions } requestOptions - Options for requesting the video asset.
1235     * @param { string } fileUri - the destination file uri to save the video data
1236     * @param { MediaAssetDataHandler<boolean> } dataHandler - Media asset handler. When the requested video is written to the specified directory, a callback is triggered.
1237     * @returns { Promise<string> } Returns request id
1238     * @throws { BusinessError } 201 - Permission denied
1239     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1240     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1241     * @throws { BusinessError } 14000011 - System inner fail
1242     * @static
1243     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1244     * @since 12
1245     */
1246    /**
1247     * Request video file
1248     *
1249     * @permission ohos.permission.READ_IMAGEVIDEO
1250     * @param { Context } context - Context of the ability instance.
1251     * @param { PhotoAsset } asset - Image to request.
1252     * @param { RequestOptions } requestOptions - Options for requesting the video asset.
1253     * @param { string } fileUri - the destination file uri to save the video data
1254     * @param { MediaAssetDataHandler<boolean> } dataHandler - Media asset handler. When the requested video is written to the specified directory, a callback is triggered.
1255     * @returns { Promise<string> } Returns request id
1256     * @throws { BusinessError } 201 - Permission denied
1257     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1258     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1259     * @throws { BusinessError } 801 - Capability not supported.
1260     * @throws { BusinessError } 14000011 - System inner fail
1261     * @static
1262     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1263     * @since 15
1264     */
1265    static requestVideoFile(
1266      context: Context,
1267      asset: PhotoAsset,
1268      requestOptions: RequestOptions,
1269      fileUri: string,
1270      dataHandler: MediaAssetDataHandler<boolean>
1271    ): Promise<string>;
1272
1273    /**
1274     * Load moving photo
1275     *
1276     * @param { Context } context - AbilityContext or UIExtensionContext instance.
1277     * @param { string } imageFileUri - image file uri of the moving photo to be loaded
1278     * @param { string } videoFileUri - video file uri of the moving photo to be loaded
1279     * @returns { Promise<MovingPhoto> } Returns moving photo
1280     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1281     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1282     * @throws { BusinessError } 14000011 - Internal system error
1283     * @static
1284     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1285     * @since 12
1286     */
1287    /**
1288     * Load moving photo
1289     *
1290     * @param { Context } context - AbilityContext or UIExtensionContext instance.
1291     * @param { string } imageFileUri - image file uri of the moving photo to be loaded
1292     * @param { string } videoFileUri - video file uri of the moving photo to be loaded
1293     * @returns { Promise<MovingPhoto> } Returns moving photo
1294     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1295     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1296     * @throws { BusinessError } 14000011 - Internal system error
1297     * @static
1298     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1299     * @atomicservice
1300     * @since 14
1301     */
1302    static loadMovingPhoto(
1303      context: Context,
1304      imageFileUri: string,
1305      videoFileUri: string
1306    ): Promise<MovingPhoto>;
1307  }
1308
1309  /**
1310   * Indicates the type of photo asset member.
1311   *
1312   * @typedef { number | string | boolean } MemberType
1313   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1314   * @since 10
1315   */
1316  /**
1317   * Indicates the type of photo asset member.
1318   *
1319   * @typedef { number | string | boolean } MemberType
1320   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1321   * @crossplatform
1322   * @since arkts {'1.1':'12','1.2':'20'}
1323   * @arkts 1.1&1.2
1324   */
1325  type MemberType = number | string | boolean;
1326
1327  /**
1328   * Provides APIs for encapsulating file asset attributes.
1329   *
1330   * @interface PhotoAsset
1331   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1332   * @since 10
1333   */
1334  /**
1335   * Provides APIs for encapsulating file asset attributes.
1336   *
1337   * @interface PhotoAsset
1338   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1339   * @atomicservice
1340   * @since 11
1341   */
1342  /**
1343   * Provides APIs for encapsulating file asset attributes.
1344   *
1345   * @interface PhotoAsset
1346   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1347   * @crossplatform
1348   * @atomicservice
1349   * @since arkts {'1.1':'12','1.2':'20'}
1350   * @arkts 1.1&1.2
1351   */
1352  interface PhotoAsset {
1353    /**
1354     * uri of the asset.
1355     *
1356     * @type { string }
1357     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1358     * @since 10
1359     */
1360    /**
1361     * uri of the asset.
1362     *
1363     * @type { string }
1364     * @readonly
1365     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1366     * @crossplatform
1367     * @atomicservice
1368     * @since arkts {'1.1':'12','1.2':'20'}
1369     * @arkts 1.1&1.2
1370     */
1371    readonly uri: string;
1372    /**
1373     * Photo type, image or video
1374     *
1375     * @type { PhotoType }
1376     * @readonly
1377     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1378     * @since 10
1379     */
1380    /**
1381     * Photo type, image or video
1382     *
1383     * @type { PhotoType }
1384     * @readonly
1385     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1386     * @crossplatform
1387     * @since 12
1388     */
1389    /**
1390     * Photo type, image or video
1391     *
1392     * @type { PhotoType }
1393     * @readonly
1394     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1395     * @crossplatform
1396     * @atomicservice
1397     * @since arkts {'1.1':'20','1.2':'20'}
1398     * @arkts 1.1&1.2
1399     */
1400    readonly photoType: PhotoType;
1401    /**
1402     * Display name (with a file name extension) of the asset.
1403     *
1404     * @type { string }
1405     * @readonly
1406     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1407     * @since 10
1408     */
1409    /**
1410     * Display name (with a file name extension) of the asset.
1411     *
1412     * @type { string }
1413     * @readonly
1414     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1415     * @crossplatform
1416     * @since 12
1417     */
1418    /**
1419     * Display name (with a file name extension) of the asset.
1420     *
1421     * @type { string }
1422     * @readonly
1423     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1424     * @crossplatform
1425     * @atomicservice
1426     * @since arkts {'1.1':'20','1.2':'20'}
1427     * @arkts 1.1&1.2
1428     */
1429    readonly displayName: string;
1430    /**
1431     * Obtains a PhotoAsset member parameter.
1432     *
1433     * @param { string } member - Photo asset member. for example : get(PhotoKeys.SIZE)
1434     * @returns { MemberType } Returns the value of the specified photo asset member
1435     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1436     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1437     * @throws { BusinessError } 13900020 - Invalid argument
1438     * @throws { BusinessError } 14000014 - The provided member must be a property name of PhotoKey.
1439     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1440     * @since 10
1441     */
1442    /**
1443     * Obtains a PhotoAsset member parameter.
1444     *
1445     * @param { string } member - Photo asset member. for example : get(PhotoKeys.SIZE)
1446     * @returns { MemberType } Returns the value of the specified photo asset member
1447     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1448     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1449     * @throws { BusinessError } 13900020 - Invalid argument
1450     * @throws { BusinessError } 14000014 - The provided member must be a property name of PhotoKey.
1451     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1452     * @crossplatform
1453     * @since 12
1454     */
1455    /**
1456     * Obtains a PhotoAsset member parameter.
1457     *
1458     * @param { string } member - Photo asset member. for example : get(PhotoKeys.SIZE)
1459     * @returns { MemberType } Returns the value of the specified photo asset member
1460     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1461     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1462     * @throws { BusinessError } 13900020 - Invalid argument
1463     * @throws { BusinessError } 14000014 - The provided member must be a property name of PhotoKey.
1464     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1465     * @crossplatform
1466     * @atomicservice
1467     * @since arkts {'1.1':'20','1.2':'20'}
1468     * @arkts 1.1&1.2
1469     */
1470    get(member: string): MemberType;
1471    /**
1472     * Sets a PhotoAsset member parameter.
1473     *
1474     * @param { string } member - Photo asset member
1475     * @param { string } value - The new value of the member.
1476     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1477     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1478     * @throws { BusinessError } 13900020 - Invalid argument
1479     * @throws { BusinessError } 14000014 - The provided member must be a property name of PhotoKey.
1480     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1481     * @since arkts {'1.1':'10','1.2':'20'}
1482     * @arkts 1.1&1.2
1483     * @example : set(PhotoKeys.TITLE, "newTitle"), call commitModify after set
1484     */
1485    set(member: string, value: string): void;
1486    /**
1487     * Commits the modification on the file metadata to the database. This API uses an asynchronous callback to return the result.
1488     *
1489     * @permission ohos.permission.WRITE_IMAGEVIDEO
1490     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1491     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1492     * <br>2. Incorrect parameter types.
1493     * @throws { BusinessError } 13900012 - Permission denied
1494     * @throws { BusinessError } 13900020 - Invalid argument
1495     * @throws { BusinessError } 14000001 - Invalid display name
1496     * @throws { BusinessError } 14000011 - System inner fail
1497     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1498     * @since 10
1499     */
1500    /**
1501     * Commits the modification on the file metadata to the database. This API uses an asynchronous callback to return the result.
1502     *
1503     * @permission ohos.permission.WRITE_IMAGEVIDEO
1504     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1505     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1506     * <br>2. Incorrect parameter types.
1507     * @throws { BusinessError } 201 - Permission denied
1508     * @throws { BusinessError } 13900020 - Invalid argument
1509     * @throws { BusinessError } 14000001 - Invalid display name
1510     * @throws { BusinessError } 14000011 - System inner fail
1511     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1512     * @atomicservice
1513     * @since arkts {'1.1':'11','1.2':'20'}
1514     * @arkts 1.1&1.2
1515     */
1516    commitModify(callback: AsyncCallback<void>): void;
1517    /**
1518     * Commits the modification on the file metadata to the database. This API uses a promise to return the result.
1519     *
1520     * @permission ohos.permission.WRITE_IMAGEVIDEO
1521     * @returns { Promise<void> } Returns void
1522     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1523     * <br>2. Incorrect parameter types.
1524     * @throws { BusinessError } 13900012 - Permission denied
1525     * @throws { BusinessError } 13900020 - Invalid argument
1526     * @throws { BusinessError } 14000001 - Invalid display name
1527     * @throws { BusinessError } 14000011 - System inner fail
1528     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1529     * @since 10
1530     */
1531    /**
1532     * Commits the modification on the file metadata to the database. This API uses a promise to return the result.
1533     *
1534     * @permission ohos.permission.WRITE_IMAGEVIDEO
1535     * @returns { Promise<void> } Returns void
1536     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1537     * <br>2. Incorrect parameter types.
1538     * @throws { BusinessError } 201 - Permission denied
1539     * @throws { BusinessError } 13900020 - Invalid argument
1540     * @throws { BusinessError } 14000001 - Invalid display name
1541     * @throws { BusinessError } 14000011 - System inner fail
1542     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1543     * @atomicservice
1544     * @since arkts {'1.1':'11','1.2':'20'}
1545     * @arkts 1.1&1.2
1546     */
1547    commitModify(): Promise<void>;
1548    /**
1549     * Open the asset
1550     *
1551     * @permission ohos.permission.READ_IMAGEVIDEO or ohos.permission.WRITE_IMAGEVIDEO
1552     * @param { string } mode - Mode for open, for example: rw, r, w.
1553     * @param { AsyncCallback<number> } callback - Callback return the fd of the asset.
1554     * @throws { BusinessError } 202 - Called by non-system application.
1555     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1556     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1557     * @throws { BusinessError } 13900012 - Permission denied
1558     * @throws { BusinessError } 13900020 - Invalid argument
1559     * @throws { BusinessError } 14000011 - System inner fail
1560     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1561     * @systemapi
1562     * @since 10
1563     * @deprecated since 11
1564     * @useinstead ohos.file.fs/fileIo#open
1565     */
1566    open(mode: string, callback: AsyncCallback<number>): void;
1567    /**
1568     * Open the asset
1569     *
1570     * @permission ohos.permission.READ_IMAGEVIDEO or ohos.permission.WRITE_IMAGEVIDEO
1571     * @param { string } mode - Mode for open, for example: rw, r, w.
1572     * @returns { Promise<number> } Returns the fd
1573     * @throws { BusinessError } 202 - Called by non-system application.
1574     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1575     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1576     * @throws { BusinessError } 13900012 - Permission denied
1577     * @throws { BusinessError } 13900020 - Invalid argument
1578     * @throws { BusinessError } 14000011 - System inner fail
1579     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1580     * @systemapi
1581     * @since 10
1582     * @deprecated since 11
1583     * @useinstead ohos.file.fs/fileIo#open
1584     */
1585    open(mode: string): Promise<number>;
1586    /**
1587     * Opens this file in read-only mode. This API uses an asynchronous callback to return the result.
1588     *
1589     * @permission ohos.permission.READ_IMAGEVIDEO
1590     * @param { AsyncCallback<number> } callback - Callback used to return the file descriptor (FD) of the file opened.
1591     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1592     * <br>2. Incorrect parameter types.
1593     * @throws { BusinessError } 201 - Permission denied
1594     * @throws { BusinessError } 13900020 - Invalid argument
1595     * @throws { BusinessError } 14000011 - System inner fail
1596     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1597     * @since 10
1598     * @deprecated since 11
1599     * @useinstead ohos.file.fs/fileIo#open
1600     */
1601    getReadOnlyFd(callback: AsyncCallback<number>): void;
1602    /**
1603     * Opens this file in read-only mode. This API uses a promise to return the result.
1604     *
1605     * @permission ohos.permission.READ_IMAGEVIDEO
1606     * @returns { Promise<number> } Returns the read only fd
1607     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1608     * <br>2. Incorrect parameter types.
1609     * @throws { BusinessError } 201 - Permission denied
1610     * @throws { BusinessError } 13900020 - Invalid argument
1611     * @throws { BusinessError } 14000011 - System inner fail
1612     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1613     * @since 10
1614     * @deprecated since 11
1615     * @useinstead ohos.file.fs/fileIo#open
1616     */
1617    getReadOnlyFd(): Promise<number>;
1618    /**
1619     * Closes a file. This API uses an asynchronous callback to return the result.
1620     *
1621     * @param { number } fd - FD of the file to close.
1622     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1623     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1624     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1625     * @throws { BusinessError } 13900020 - Invalid argument
1626     * @throws { BusinessError } 14000011 - System inner fail
1627     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1628     * @since 10
1629     * @deprecated since 11
1630     * @useinstead ohos.file.fs/fileIo#close
1631     */
1632    close(fd: number, callback: AsyncCallback<void>): void;
1633    /**
1634     * Closes a file. This API uses a promise to return the result.
1635     *
1636     * @param { number } fd - FD of the file to close.
1637     * @returns { Promise<void> } Returns void
1638     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1639     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1640     * @throws { BusinessError } 13900020 - Invalid argument
1641     * @throws { BusinessError } 14000011 - System inner fail
1642     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1643     * @since 10
1644     * @deprecated since 11
1645     * @useinstead ohos.file.fs/fileIo#close
1646     */
1647    close(fd: number): Promise<void>;
1648    /**
1649     * Obtains the thumbnail of this file. This API uses an asynchronous callback to return the result.
1650     *
1651     * @permission ohos.permission.READ_IMAGEVIDEO
1652     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the PixelMap of the thumbnail.
1653     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1654     * <br>2. Incorrect parameter types.
1655     * @throws { BusinessError } 13900012 - Permission denied
1656     * @throws { BusinessError } 13900020 - Invalid argument
1657     * @throws { BusinessError } 14000011 - System inner fail
1658     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1659     * @since 10
1660     */
1661    getThumbnail(callback: AsyncCallback<image.PixelMap>): void;
1662    /**
1663     * Obtains the file thumbnail of the given size. This API uses an asynchronous callback to return the result.
1664     *
1665     * @permission ohos.permission.READ_IMAGEVIDEO
1666     * @param { image.Size } size - Size of the thumbnail.
1667     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the PixelMap of the thumbnail.
1668     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1669     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1670     * @throws { BusinessError } 13900012 - Permission denied
1671     * @throws { BusinessError } 13900020 - Invalid argument
1672     * @throws { BusinessError } 14000011 - System inner fail
1673     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1674     * @since 10
1675     */
1676    getThumbnail(size: image.Size, callback: AsyncCallback<image.PixelMap>): void;
1677    /**
1678     * Obtains the file thumbnail of the given size. This API uses a promise to return the result.
1679     *
1680     * @permission ohos.permission.READ_IMAGEVIDEO
1681     * @param { image.Size } [size] - Size of the thumbnail.
1682     * @returns { Promise<image.PixelMap> } Returns the thumbnail's pixelMap.
1683     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1684     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1685     * @throws { BusinessError } 13900012 - Permission denied
1686     * @throws { BusinessError } 13900020 - Invalid argument
1687     * @throws { BusinessError } 14000011 - System inner fail
1688     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1689     * @since arkts {'1.1':'10','1.2':'20'}
1690     * @arkts 1.1&1.2
1691     */
1692    getThumbnail(size?: image.Size): Promise<image.PixelMap>;
1693    /**
1694     * Obtains the ArrayBuffer of a file thumbnail by specifying its type. This API uses a promise to return the result.
1695     *
1696     * @permission ohos.permission.READ_IMAGEVIDEO
1697     * @param { ThumbnailType } type - Type of the thumbnail.
1698     * @returns { Promise<ArrayBuffer> } Returns the thumbnail's ArrayBuffer.
1699     * @throws { BusinessError } 201 - Permission denied
1700     * @throws { BusinessError } 202 - Called by non-system application
1701     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1702     * <br>2. Incorrect parameter types.
1703     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
1704     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
1705     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1706     * @systemapi
1707     * @since 18
1708     */
1709    getThumbnailData(type: ThumbnailType): Promise<ArrayBuffer>;
1710    /**
1711     * Favorites or unfavorites this file. This API uses an asynchronous callback to return the result.
1712     *
1713     * @permission ohos.permission.WRITE_IMAGEVIDEO
1714     * @param { boolean } favoriteState - Operation to perform. The value true means to favorite the file asset, and false means the opposite.
1715     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1716     * @throws { BusinessError } 202 - Called by non-system application.
1717     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1718     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1719     * @throws { BusinessError } 201 - Permission denied
1720     * @throws { BusinessError } 13900020 - Invalid argument
1721     * @throws { BusinessError } 14000011 - System inner fail
1722     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1723     * @systemapi
1724     * @since 10
1725     * @deprecated since 11
1726     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setFavorite
1727     */
1728    setFavorite(favoriteState: boolean, callback: AsyncCallback<void>): void;
1729    /**
1730     * Favorites or unfavorites this file asset. This API uses a promise to return the result.
1731     *
1732     * @permission ohos.permission.WRITE_IMAGEVIDEO
1733     * @param { boolean } favoriteState - Operation to perform. The value true means to favorite the file asset, and false means the opposite.
1734     * @returns { Promise<void> } Returns void
1735     * @throws { BusinessError } 202 - Called by non-system application.
1736     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1737     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1738     * @throws { BusinessError } 201 - Permission denied
1739     * @throws { BusinessError } 13900020 - Invalid argument
1740     * @throws { BusinessError } 14000011 - System inner fail
1741     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1742     * @systemapi
1743     * @since 10
1744     * @deprecated since 11
1745     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setFavorite
1746     */
1747    setFavorite(favoriteState: boolean): Promise<void>;
1748    /**
1749     * Sets this file to hidden state. This API uses an asynchronous callback to return the result.
1750     *
1751     * @permission ohos.permission.WRITE_IMAGEVIDEO
1752     * @param { boolean } hiddenState - Whether to set a file to hidden state. The value true means to hide the file; the value false means the opposite.
1753     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1754     * @throws { BusinessError } 202 - Called by non-system application.
1755     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1756     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1757     * @throws { BusinessError } 201 - Permission denied
1758     * @throws { BusinessError } 13900020 - Invalid argument
1759     * @throws { BusinessError } 14000011 - System inner fail
1760     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1761     * @systemapi
1762     * @since 10
1763     * @deprecated since 11
1764     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setHidden
1765     */
1766    setHidden(hiddenState: boolean, callback: AsyncCallback<void>): void;
1767    /**
1768     * Sets this file asset to hidden state. This API uses a promise to return the result.
1769     *
1770     * @permission ohos.permission.WRITE_IMAGEVIDEO
1771     * @param { boolean } hiddenState - Whether to set a file to hidden state. The value true means to hide the file; the value false means the opposite.
1772     * @returns { Promise<void> } Returns void
1773     * @throws { BusinessError } 202 - Called by non-system application.
1774     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1775     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1776     * @throws { BusinessError } 201 - Permission denied
1777     * @throws { BusinessError } 13900020 - Invalid argument
1778     * @throws { BusinessError } 14000011 - System inner fail
1779     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1780     * @systemapi
1781     * @since 10
1782     * @deprecated since 11
1783     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setHidden
1784     */
1785    setHidden(hiddenState: boolean): Promise<void>;
1786    /**
1787     * Sets user comment information of an image or video. This API uses an asynchronous callback to return the result.
1788     *
1789     * @permission ohos.permission.WRITE_IMAGEVIDEO
1790     * @param { string } userComment - User comment information to set.
1791     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1792     * @throws { BusinessError } 202 - Called by non-system application.
1793     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1794     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1795     * @throws { BusinessError } 201 - Permission denied
1796     * @throws { BusinessError } 13900020 - Invalid argument
1797     * @throws { BusinessError } 14000011 - System inner fail
1798     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1799     * @systemapi
1800     * @since 10
1801     * @deprecated since 11
1802     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setUserComment
1803     */
1804    setUserComment(userComment: string, callback: AsyncCallback<void>): void;
1805    /**
1806     * Sets user comment information of an image or video. This API uses a promise to return the result.
1807     *
1808     * @permission ohos.permission.WRITE_IMAGEVIDEO
1809     * @param { string } userComment - User comment information to set.
1810     * @returns { Promise<void> } Returns void
1811     * @throws { BusinessError } 202 - Called by non-system application.
1812     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1813     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1814     * @throws { BusinessError } 201 - Permission denied
1815     * @throws { BusinessError } 13900020 - Invalid argument
1816     * @throws { BusinessError } 14000011 - System inner fail
1817     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1818     * @systemapi
1819     * @since 10
1820     * @deprecated since 11
1821     * @useinstead photoAccessHelper.MediaAssetChangeRequest#setUserComment
1822     */
1823    setUserComment(userComment: string): Promise<void>;
1824    /**
1825     * Obtains the exchangeable image file format (EXIF) data from a JPG image. This API uses an asynchronous callback to return the result.
1826     *
1827     * @permission ohos.permission.READ_IMAGEVIDEO
1828     * @param { AsyncCallback<string> } callback - Callback used to return the EXIF data, in JSON strings.
1829     * @throws { BusinessError } 202 - Called by non-system application.
1830     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1831     * <br>2. Incorrect parameter types.
1832     * @throws { BusinessError } 13900012 - Permission denied
1833     * @throws { BusinessError } 13900020 - Invalid argument
1834     * @throws { BusinessError } 14000011 - System inner fail
1835     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1836     * @systemapi
1837     * @since 10
1838     */
1839    getExif(callback: AsyncCallback<string>): void;
1840    /**
1841     * Obtains analysis data. This API uses a promise to return the result.
1842     *
1843     * @permission ohos.permission.READ_IMAGEVIDEO
1844     * @param { AnalysisType } analysisType - Smart analysis type.
1845     * @returns { Promise<string> } Returns analysis info into a json string
1846     * @throws { BusinessError } 201 - Permission denied
1847     * @throws { BusinessError } 202 - Called by non-system application
1848     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1849     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1850     * @throws { BusinessError } 14000011 - System inner fail
1851     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1852     * @systemapi
1853     * @since arkts {'1.1':'11','1.2':'20'}
1854     * @arkts 1.1&1.2
1855     */
1856    getAnalysisData(analysisType: AnalysisType): Promise<string>;
1857    /**
1858     * Obtains the exchangeable image file format (EXIF) data from a JPG image. This API uses a promise to return the result.
1859     *
1860     * @permission ohos.permission.READ_IMAGEVIDEO
1861     * @returns { Promise<string> } Returns exif info into a json string
1862     * @throws { BusinessError } 202 - Called by non-system application.
1863     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1864     * <br>2. Incorrect parameter types.
1865     * @throws { BusinessError } 13900012 - Permission denied
1866     * @throws { BusinessError } 13900020 - Invalid argument
1867     * @throws { BusinessError } 14000011 - System inner fail
1868     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1869     * @systemapi
1870     * @since 10
1871     */
1872    getExif(): Promise<string>;
1873    /**
1874     * Sets the pending state for this image or video asset. This API uses an asynchronous callback to return the result.
1875     *
1876     * @permission ohos.permission.WRITE_IMAGEVIDEO
1877     * @param { boolean } pendingState - Whether to set the file to pending state. The value true means to set the file to pending state, and the value false means to remove the pending state.
1878     * @param { AsyncCallback<void> } callback - Callback that returns no value.
1879     * @throws { BusinessError } 201 - Permission denied
1880     * @throws { BusinessError } 202 - Called by non-system application.
1881     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1882     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1883     * @throws { BusinessError } 14000011 - System inner fail
1884     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1885     * @systemapi
1886     * @since 11
1887     */
1888    setPending(pendingState: boolean, callback: AsyncCallback<void>): void;
1889    /**
1890     * Sets the pending state for this image or video asset. This API uses a promise to return the result.
1891     *
1892     * @permission ohos.permission.WRITE_IMAGEVIDEO
1893     * @param { boolean } pendingState - Whether to set the file to pending state. The value true means to set the file to pending state, and the value false means to remove the pending state.
1894     * @returns { Promise<void> } Returns void
1895     * @throws { BusinessError } 201 - Permission denied.
1896     * @throws { BusinessError } 202 - Called by non-system application.
1897     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1898     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1899     * @throws { BusinessError } 14000011 - System inner fail
1900     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1901     * @systemapi
1902     * @since 11
1903     */
1904    setPending(pendingState: boolean): Promise<void>;
1905    /**
1906     * Checks whether this image or video asset is edited. This API uses an asynchronous callback to return the result.
1907     *
1908     * @permission ohos.permission.READ_IMAGEVIDEO
1909     * @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value true means that the image or video asset is edited, and false means the opposite. The default value is false.
1910     * @throws { BusinessError } 201 - Permission denied.
1911     * @throws { BusinessError } 202 - Called by non-system application.
1912     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1913     * <br>2. Incorrect parameter types.
1914     * @throws { BusinessError } 14000011 - System inner fail
1915     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1916     * @systemapi
1917     * @since 11
1918     */
1919    isEdited(callback: AsyncCallback<boolean>): void;
1920    /**
1921     * Checks whether this image or video asset is edited. This API uses a promise to return the result.
1922     *
1923     * @permission ohos.permission.READ_IMAGEVIDEO
1924     * @returns { Promise<boolean> } Returns whether the asset has been edited.
1925     * @throws { BusinessError } 201 - Permission denied.
1926     * @throws { BusinessError } 202 - Called by non-system application.
1927     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1928     * <br>2. Incorrect parameter types.
1929     * @throws { BusinessError } 14000011 - System inner fail
1930     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1931     * @systemapi
1932     * @since 11
1933     */
1934    isEdited(): Promise<boolean>;
1935    /**
1936     * Obtains the edit data of this image or video asset. This API uses an asynchronous callback to return the result.
1937     *
1938     * @permission ohos.permission.READ_IMAGEVIDEO
1939     * @param { AsyncCallback<string> } callback - Callback used to return the edit data obtained.
1940     * @throws { BusinessError } 201 - Permission denied.
1941     * @throws { BusinessError } 202 - Called by non-system application.
1942     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1943     * <br>2. Incorrect parameter types.
1944     * @throws { BusinessError } 14000011 - System inner fail
1945     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1946     * @systemapi
1947     * @since 11
1948     */
1949    requestEditData(callback: AsyncCallback<string>): void;
1950    /**
1951     * Obtains the edit data of this image or video asset. This API uses a promise to return the result.
1952     *
1953     * @permission ohos.permission.READ_IMAGEVIDEO
1954     * @returns { Promise<string> } Returns asset edit data.
1955     * @throws { BusinessError } 201 - Permission denied.
1956     * @throws { BusinessError } 202 - Called by non-system application.
1957     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1958     * <br>2. Incorrect parameter types.
1959     * @throws { BusinessError } 14000011 - System inner fail
1960     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1961     * @systemapi
1962     * @since 11
1963     */
1964    requestEditData(): Promise<string>;
1965    /**
1966     * Obtains the edited data of this asset. This API uses a promise to return the result.
1967     *
1968     * @permission ohos.permission.READ_IMAGEVIDEO
1969     * @returns { Promise<MediaAssetEditData> } Returns media asset edit data
1970     * @throws { BusinessError } 201 - Permission denied
1971     * @throws { BusinessError } 202 - Called by non-system application
1972     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1973     * <br>2. Incorrect parameter types.
1974     * @throws { BusinessError } 14000011 - System inner fail
1975     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1976     * @systemapi
1977     * @since 11
1978     */
1979    getEditData(): Promise<MediaAssetEditData>;
1980    /**
1981     * Clone asset.
1982     *
1983     * @permission ohos.permission.WRITE_IMAGEVIDEO
1984     * @param { string } title - The title of asset.
1985     * @returns { Promise<PhotoAsset> } Returns asset
1986     * @throws { BusinessError } 201 - Permission denied
1987     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1988     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
1989     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
1990     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
1991     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
1992     * @since 14
1993     */
1994    clone(title: string): Promise<PhotoAsset>;
1995    /**
1996     * Copy a picture in the same album and convert it to a specified format.
1997     * The album here refers to the album created by user or application album.
1998     * The API supports media types include normal picture, moving(only picture part), and burst photo, but video is not include.
1999     * The API supports image format include heif and heic.
2000     *
2001     * @permission ohos.permission.WRITE_IMAGEVIDEO
2002     * @param { string } title - The new image title.
2003     * @param { SupportedImageFormat } imageFormat - The target image format.
2004     * @returns { Promise<PhotoAsset> } Returns the new PhotoAsset.
2005     * @throws { BusinessError } 201 - Permission denied
2006     * @throws { BusinessError } 202 - Called by non-system application.
2007     * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes:
2008     * 1. The original file does not exist locally in PhotoAsset;
2009     * 2. The original file format is not within the supported range;
2010     * 3. The original file is a temporary file or is being edited;
2011     * 4. The title is the same with an image in the same album;
2012     * 5. PhotoAsset is a photo in the trash or a hidden photo;
2013     * 6. The title does not meet the parameter specifications.
2014     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the
2015     * kogs. Possible causes:
2016     * 1. Database corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
2017     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2018     * @systemapi
2019     * @since 20
2020     * @arkts 1.1&1.2
2021     */
2022    convertImageFormat(title: string, imageFormat: SupportedImageFormat): Promise<PhotoAsset>;
2023    /**
2024     * Opens the source file to obtain the FD. This API uses an asynchronous callback to return the result.
2025     *
2026     * @permission ohos.permission.READ_IMAGEVIDEO
2027     * @param { AsyncCallback<number> } callback - Callback used to return the FD.
2028     * @throws { BusinessError } 201 - Permission denied.
2029     * @throws { BusinessError } 202 - Called by non-system application.
2030     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2031     * <br>2. Incorrect parameter types.
2032     * @throws { BusinessError } 14000011 - System inner fail
2033     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2034     * @systemapi
2035     * @since 11
2036     */
2037    requestSource(callback: AsyncCallback<number>): void;
2038    /**
2039     * Opens the source file to obtain the FD. This API uses a promise to return the result.
2040     *
2041     * @permission ohos.permission.READ_IMAGEVIDEO
2042     * @returns { Promise<number> }  Returns opened source asset fd.
2043     * @throws { BusinessError } 201 - Permission denied.
2044     * @throws { BusinessError } 202 - Called by non-system application.
2045     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2046     * <br>2. Incorrect parameter types.
2047     * @throws { BusinessError } 14000011 - System inner fail
2048     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2049     * @systemapi
2050     * @since 11
2051     */
2052    requestSource(): Promise<number>;
2053    /**
2054     * Commits the edited image or video asset. This API uses an asynchronous callback to return the result.
2055     *
2056     * @permission ohos.permission.WRITE_IMAGEVIDEO
2057     * @param { string } editData - New data to commit.
2058     * @param { string } uri - URI of the committed image or video in the application sandbox.
2059     * @param { AsyncCallback<void> } callback - Callback that returns no value.
2060     * @throws { BusinessError } 201 - Permission denied.
2061     * @throws { BusinessError } 202 - Called by non-system application.
2062     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2063     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
2064     * @throws { BusinessError } 14000011 - System inner fail
2065     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2066     * @systemapi
2067     * @since 11
2068     */
2069    commitEditedAsset(editData: string, uri: string, callback: AsyncCallback<void>): void;
2070    /**
2071     * Commits the edited image or video asset. This API uses a promise to return the result.
2072     *
2073     * @permission ohos.permission.WRITE_IMAGEVIDEO
2074     * @param { string } editData - New data to commit.
2075     * @param { string } uri - URI of the committed image or video in the application sandbox.
2076     * @returns { Promise<void> } Returns void.
2077     * @throws { BusinessError } 201 - Permission denied.
2078     * @throws { BusinessError } 202 - Called by non-system application.
2079     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2080     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
2081     * @throws { BusinessError } 14000011 - System inner fail
2082     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2083     * @systemapi
2084     * @since 11
2085     */
2086    commitEditedAsset(editData: string, uri: string): Promise<void>;
2087    /**
2088     * Reverts to the state of the file before being edited. This API uses an asynchronous callback to return the result.
2089     *
2090     * @permission ohos.permission.WRITE_IMAGEVIDEO
2091     * @param { AsyncCallback<void> } callback - Callback that returns no value.
2092     * @throws { BusinessError } 201 - Permission denied.
2093     * @throws { BusinessError } 202 - Called by non-system application.
2094     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2095     * <br>2. Incorrect parameter types.
2096     * @throws { BusinessError } 14000011 - System inner fail
2097     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2098     * @systemapi
2099     * @since 11
2100     */
2101    revertToOriginal(callback: AsyncCallback<void>): void;
2102    /**
2103     * Reverts to the state of the file before being edited. This API uses a promise to return the result.
2104     *
2105     * @permission ohos.permission.WRITE_IMAGEVIDEO
2106     * @returns { Promise<void> } Returns void.
2107     * @throws { BusinessError } 201 - Permission denied.
2108     * @throws { BusinessError } 202 - Called by non-system application.
2109     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2110     * <br>2. Incorrect parameter types.
2111     * @throws { BusinessError } 14000011 - System inner fail
2112     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2113     * @systemapi
2114     * @since 11
2115     */
2116    revertToOriginal(): Promise<void>;
2117    /**
2118     * Obtains the quick thumbnail and quality thumbnail of this asset. This API uses an asynchronous callback to return the result.
2119     *
2120     * @permission ohos.permission.READ_IMAGEVIDEO
2121     * @param { AsyncCallback<image.PixelMap> } callback - Callback invoked twice to return the quick and quality thumbnails obtained.
2122     * @returns { string } Returns request photo task id.
2123     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
2124     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
2125     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2126     * <br>2. Incorrect parameter types.
2127     * @throws { BusinessError } 14000011 - System inner fail
2128     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2129     * @systemapi
2130     * @since 11
2131     */
2132    requestPhoto(callback: AsyncCallback<image.PixelMap>): string;
2133    /**
2134     * Obtains the thumbnails of an asset based on the specified options. This API uses an asynchronous callback to return the result.
2135     *
2136     * @permission ohos.permission.READ_IMAGEVIDEO
2137     * @param { RequestPhotoOptions } options - Options for obtaining the asset thumbnail.
2138     * @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the thumbnails obtained. The callback may be invoked more than once, depending on options.
2139     * @returns { string } Returns request photo task id.
2140     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
2141     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
2142     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2143     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
2144     * @throws { BusinessError } 14000011 - System inner fail
2145     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2146     * @systemapi
2147     * @since 11
2148     */
2149    requestPhoto(options: RequestPhotoOptions, callback: AsyncCallback<image.PixelMap>): string;
2150    /**
2151     * Cancels a task for obtaining media thumbnails.
2152     *
2153     * @permission ohos.permission.READ_IMAGEVIDEO
2154     * @param { string } requestId - ID of the task to cancel.
2155     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
2156     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
2157     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2158     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
2159     * @throws { BusinessError } 14000011 - System inner fail
2160     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2161     * @systemapi
2162     * @since 11
2163     */
2164    cancelPhotoRequest(requestId: string): void;
2165    /**
2166     * Obtains the thumbnail of the specified type for the key frame. This API uses a promise to return the result.
2167     *
2168     * @permission ohos.permission.READ_IMAGEVIDEO
2169     * @param { number } beginFrameTimeMs - Time of the start frame, in ms. The value 0 indicates the cover frame.
2170     * @param { ThumbnailType } type - Type of the thumbnail.
2171     * @returns { Promise<image.PixelMap> } Returns the thumbnail's pixelMap.
2172     * @throws { BusinessError } 201 - Permission denied
2173     * @throws { BusinessError } 202 - Called by non-system application
2174     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2175     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
2176     * @throws { BusinessError } 14000011 - Internal system error
2177     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2178     * @systemapi
2179     * @since 18
2180     */
2181    getKeyFrameThumbnail(beginFrameTimeMs: number, type: ThumbnailType): Promise<image.PixelMap>;
2182  }
2183
2184  /**
2185   * Enumeration of photo asset members
2186   *
2187   * @enum { string } PhotoKeys
2188   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2189   * @since 10
2190   */
2191  /**
2192   * Enumeration of photo asset members
2193   *
2194   * @enum { string } PhotoKeys
2195   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2196   * @crossplatform
2197   * @since 12
2198   */
2199  /**
2200   * Enumeration of photo asset members
2201   *
2202   * @enum { string } PhotoKeys
2203   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2204   * @crossplatform
2205   * @atomicservice
2206   * @since arkts {'1.1':'20','1.2':'20'}
2207   * @arkts 1.1&1.2
2208   */
2209  enum PhotoKeys {
2210    /**
2211     * Asset uri, read only
2212     *
2213     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2214     * @since 10
2215     */
2216    /**
2217     * Asset uri, read only
2218     *
2219     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2220     * @crossplatform
2221     * @since 12
2222     */
2223    /**
2224     * Asset uri, read only
2225     *
2226     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2227     * @crossplatform
2228     * @atomicservice
2229     * @since 20
2230     * @arkts 1.1&1.2
2231     */
2232    URI = 'uri',
2233    /**
2234     * Photo type of the asset, read only
2235     *
2236     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2237     * @since 10
2238     */
2239    /**
2240     * Photo type of the asset, read only
2241     *
2242     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2243     * @crossplatform
2244     * @since 12
2245     */
2246    /**
2247     * Photo type of the asset, read only
2248     *
2249     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2250     * @crossplatform
2251     * @atomicservice
2252     * @since arkts {'1.1':'20','1.2':'20'}
2253     * @arkts 1.1&1.2
2254     */
2255    PHOTO_TYPE = 'media_type',
2256    /**
2257     * Asset name, read only
2258     *
2259     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2260     * @since 10
2261     */
2262    /**
2263     * Asset name, read only
2264     *
2265     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2266     * @crossplatform
2267     * @since 12
2268     */
2269    /**
2270     * Asset name, read only
2271     *
2272     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2273     * @crossplatform
2274     * @atomicservice
2275     * @since arkts {'1.1':'20','1.2':'20'}
2276     * @arkts 1.1&1.2
2277     */
2278    DISPLAY_NAME = 'display_name',
2279    /**
2280     * Size of the asset, read only
2281     *
2282     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2283     * @since 10
2284     */
2285    /**
2286     * Size of the asset, read only
2287     *
2288     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2289     * @crossplatform
2290     * @since 12
2291     */
2292    /**
2293     * Size of the asset, read only
2294     *
2295     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2296     * @crossplatform
2297     * @atomicservice
2298     * @since arkts {'1.1':'20','1.2':'20'}
2299     * @arkts 1.1&1.2
2300     */
2301    SIZE = 'size',
2302    /**
2303     * Creation date of the asset, read only
2304     *
2305     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2306     * @since 10
2307     */
2308    /**
2309     * Creation date of the asset, read only
2310     *
2311     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2312     * @crossplatform
2313     * @since 12
2314     */
2315    /**
2316     * Creation date of the asset, read only
2317     *
2318     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2319     * @crossplatform
2320     * @atomicservice
2321     * @since arkts {'1.1':'20','1.2':'20'}
2322     * @arkts 1.1&1.2
2323     */
2324    DATE_ADDED = 'date_added',
2325    /**
2326     * Modified date of the asset, read only
2327     *
2328     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2329     * @since 10
2330     */
2331    /**
2332     * Modified date of the asset, read only
2333     *
2334     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2335     * @crossplatform
2336     * @since 12
2337     */
2338    /**
2339     * Modified date of the asset, read only
2340     *
2341     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2342     * @crossplatform
2343     * @atomicservice
2344     * @since 20
2345     * @arkts 1.1&1.2
2346     */
2347    DATE_MODIFIED = 'date_modified',
2348    /**
2349     * Duration of video files, read only
2350     *
2351     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2352     * @since 10
2353     */
2354    /**
2355     * Duration of video files, read only
2356     *
2357     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2358     * @crossplatform
2359     * @since 12
2360     */
2361    /**
2362     * Duration of video files, read only
2363     *
2364     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2365     * @crossplatform
2366     * @atomicservice
2367     * @since arkts {'1.1':'20','1.2':'20'}
2368     * @arkts 1.1&1.2
2369     */
2370    DURATION = 'duration',
2371    /**
2372     * Width of the image asset, read only
2373     *
2374     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2375     * @since 10
2376     */
2377    /**
2378     * Width of the image asset, read only
2379     *
2380     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2381     * @crossplatform
2382     * @since 12
2383     */
2384    /**
2385     * Width of the image asset, read only
2386     *
2387     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2388     * @crossplatform
2389     * @atomicservice
2390     * @since arkts {'1.1':'20','1.2':'20'}
2391     * @arkts 1.1&1.2
2392     */
2393    WIDTH = 'width',
2394    /**
2395     * Height of the image asset, read only
2396     *
2397     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2398     * @since 10
2399     */
2400    /**
2401     * Height of the image asset, read only
2402     *
2403     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2404     * @crossplatform
2405     * @since 12
2406     */
2407    /**
2408     * Height of the image asset, read only
2409     *
2410     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2411     * @crossplatform
2412     * @atomicservice
2413     * @since arkts {'1.1':'20','1.2':'20'}
2414     * @arkts 1.1&1.2
2415     */
2416    HEIGHT = 'height',
2417    /**
2418     * Date taken of the asset, read only
2419     *
2420     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2421     * @since 10
2422     */
2423    /**
2424     * Date taken of the asset, read only
2425     *
2426     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2427     * @crossplatform
2428     * @since 12
2429     */
2430    /**
2431     * Date taken of the asset, read only
2432     *
2433     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2434     * @crossplatform
2435     * @atomicservice
2436     * @since arkts {'1.1':'20','1.2':'20'}
2437     * @arkts 1.1&1.2
2438
2439     */
2440    DATE_TAKEN = 'date_taken',
2441    /**
2442     * Orientation of the image asset, read only
2443     *
2444     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2445     * @since 10
2446     */
2447    /**
2448     * Orientation of the image asset, read only
2449     *
2450     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2451     * @crossplatform
2452     * @since 12
2453     */
2454    /**
2455     * Orientation of the image asset, read only
2456     *
2457     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2458     * @crossplatform
2459     * @atomicservice
2460     * @since arkts {'1.1':'20','1.2':'20'}
2461     * @arkts 1.1&1.2
2462     */
2463    ORIENTATION = 'orientation',
2464    /**
2465     * Favorite state of the asset, read only
2466     *
2467     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2468     * @since 10
2469     */
2470    /**
2471     * Favorite state of the asset, read only
2472     *
2473     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2474     * @crossplatform
2475     * @since 12
2476     */
2477    /**
2478     * Favorite state of the asset, read only
2479     *
2480     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2481     * @crossplatform
2482     * @atomicservice
2483     * @since arkts {'1.1':'20','1.2':'20'}
2484     * @arkts 1.1&1.2
2485     */
2486    FAVORITE = 'is_favorite',
2487    /**
2488     * Title of the asset
2489     *
2490     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2491     * @since 10
2492     */
2493    /**
2494     * Title of the asset
2495     *
2496     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2497     * @crossplatform
2498     * @since 12
2499     */
2500    /**
2501     * Title of the asset
2502     *
2503     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2504     * @crossplatform
2505     * @atomicservice
2506     * @since arkts {'1.1':'20','1.2':'20'}
2507     * @arkts 1.1&1.2
2508     */
2509    TITLE = 'title',
2510    /**
2511     * Asset position, read only
2512     *
2513     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2514     * @systemapi
2515     * @since 10
2516     */
2517    /**
2518     * Asset position, read only
2519     *
2520     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2521     * @since 16
2522     */
2523    /**
2524     * Asset position, read only
2525     *
2526     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2527     * @atomicservice
2528     * @since arkts {'1.1':'20','1.2':'20'}
2529     * @arkts 1.1&1.2
2530     */
2531    POSITION = 'position',
2532    /**
2533     * Trashed date of the asset, read only
2534     *
2535     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2536     * @systemapi
2537     * @since arkts {'1.1':'10','1.2':'20'}
2538     * @arkts 1.1&1.2
2539     */
2540    DATE_TRASHED = 'date_trashed',
2541    /**
2542     * Hidden state of the asset, read only
2543     *
2544     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2545     * @systemapi
2546     * @since arkts {'1.1':'10','1.2':'20'}
2547     * @arkts 1.1&1.2
2548     */
2549    HIDDEN = 'hidden',
2550    /**
2551     * User comment info
2552     *
2553     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2554     * @systemapi
2555     * @since arkts {'1.1':'10','1.2':'20'}
2556     * @arkts 1.1&1.2
2557     */
2558    USER_COMMENT = 'user_comment',
2559    /**
2560     * Camera shot key
2561     *
2562     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2563     * @systemapi
2564     * @since arkts {'1.1':'10','1.2':'20'}
2565     * @arkts 1.1&1.2
2566     */
2567    CAMERA_SHOT_KEY = 'camera_shot_key',
2568    /**
2569     * The year of the file created, read only
2570     *
2571     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2572     * @systemapi
2573     * @since arkts {'1.1':'11','1.2':'20'}
2574     * @arkts 1.1&1.2
2575     */
2576    DATE_YEAR = 'date_year',
2577    /**
2578     * The month of the file created, read only
2579     *
2580     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2581     * @systemapi
2582     * @since arkts {'1.1':'11','1.2':'20'}
2583     * @arkts 1.1&1.2
2584     */
2585    DATE_MONTH = 'date_month',
2586    /**
2587     * The day of the file created, read only
2588     *
2589     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2590     * @systemapi
2591     * @since arkts {'1.1':'11','1.2':'20'}
2592     * @arkts 1.1&1.2
2593     */
2594    DATE_DAY = 'date_day',
2595    /**
2596     * Pending state of the asset, true means asset is pending, read only
2597     *
2598     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2599     * @systemapi
2600     * @since arkts {'1.1':'11','1.2':'20'}
2601     * @arkts 1.1&1.2
2602     */
2603    PENDING = 'pending',
2604    /**
2605     * Creation time of the asset in milliseconds, read only
2606     *
2607     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2608     * @since 12
2609     */
2610    /**
2611     * Creation time of the asset in milliseconds, read only
2612     *
2613     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2614     * @atomicservice
2615     * @since arkts {'1.1':'20','1.2':'20'}
2616     * @arkts 1.1&1.2
2617     */
2618    DATE_ADDED_MS = 'date_added_ms',
2619    /**
2620     * Modified time of the asset in milliseconds, read only
2621     *
2622     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2623     * @since 12
2624     */
2625    /**
2626     * Modified time of the asset in milliseconds, read only
2627     *
2628     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2629     * @atomicservice
2630     * @since arkts {'1.1':'20','1.2':'20'}
2631     * @arkts 1.1&1.2
2632     */
2633    DATE_MODIFIED_MS = 'date_modified_ms',
2634    /**
2635     * Trashed time of the asset in milliseconds, read only
2636     *
2637     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2638     * @systemapi
2639     * @since arkts {'1.1':'12','1.2':'20'}
2640     * @arkts 1.1&1.2
2641     */
2642    DATE_TRASHED_MS = 'date_trashed_ms',
2643    /**
2644     * Photo subtype of the asset, read only
2645     *
2646     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2647     * @since 12
2648     */
2649    /**
2650     * Photo subtype of the asset, read only
2651     *
2652     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2653     * @atomicservice
2654     * @since arkts {'1.1':'20','1.2':'20'}
2655     * @arkts 1.1&1.2
2656     */
2657    PHOTO_SUBTYPE = 'subtype',
2658    /**
2659     * Effect mode of moving photo, read only
2660     *
2661     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2662     * @systemapi
2663     * @since arkts {'1.1':'12','1.2':'20'}
2664     * @arkts 1.1&1.2
2665     */
2666    MOVING_PHOTO_EFFECT_MODE = 'moving_photo_effect_mode',
2667    /**
2668     * Dynamic range type of the asset, read only
2669     *
2670     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2671     * @since 12
2672     */
2673    /**
2674     * Dynamic range type of the asset, read only
2675     *
2676     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2677     * @atomicservice
2678     * @since arkts {'1.1':'20','1.2':'20'}
2679     * @arkts 1.1&1.2
2680     */
2681    DYNAMIC_RANGE_TYPE = 'dynamic_range_type',
2682    /**
2683     * Cover position of the asset, read only
2684     *
2685     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2686     * @since 12
2687     */
2688    /**
2689     * Cover position of the asset, read only
2690     *
2691     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2692     * @atomicservice
2693     * @since arkts {'1.1':'20','1.2':'20'}
2694     * @arkts 1.1&1.2
2695     */
2696    COVER_POSITION = 'cover_position',
2697    /**
2698     * Unique uuid of the burst photos, read only
2699     *
2700     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2701     * @since 12
2702     */
2703    /**
2704     * Unique uuid of the burst photos, read only
2705     *
2706     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2707     * @atomicservice
2708     * @since arkts {'1.1':'20','1.2':'20'}
2709     * @arkts 1.1&1.2
2710     */
2711    BURST_KEY = 'burst_key',
2712    /**
2713     * Thumbnail of photo asset has been ready, read only
2714     *
2715     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2716     * @systemapi
2717     * @since arkts {'1.1':'13','1.2':'20'}
2718     * @arkts 1.1&1.2
2719     */
2720    THUMBNAIL_READY = 'thumbnail_ready',
2721    /**
2722     * Width and height information of lcd picture, read only
2723     *
2724     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2725     * @since 12
2726     */
2727    /**
2728     * Width and height information of lcd picture, read only
2729     *
2730     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2731     * @atomicservice
2732     * @since arkts {'1.1':'20','1.2':'20'}
2733     * @arkts 1.1&1.2
2734     */
2735    LCD_SIZE = 'lcd_size',
2736    /**
2737     * Width and height information of thumbnail picture, read only
2738     *
2739     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2740     * @since 12
2741     */
2742    /**
2743     * Width and height information of thumbnail picture, read only
2744     *
2745     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2746     * @atomicservice
2747     * @since arkts {'1.1':'20','1.2':'20'}
2748     * @arkts 1.1&1.2
2749     */
2750    THM_SIZE = 'thm_size',
2751    /**
2752     * Detail time of the asset, read only
2753     *
2754     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2755     * @since 13
2756     */
2757    /**
2758     * Detail time of the asset, read only
2759     *
2760     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2761     * @atomicservice
2762     * @since arkts {'1.1':'20','1.2':'20'}
2763     * @arkts 1.1&1.2
2764     */
2765    DETAIL_TIME = 'detail_time',
2766    /**
2767     * Date taken of the asset in milliseconds, read only
2768     *
2769     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2770     * @since 13
2771     */
2772    /**
2773     * Date taken of the asset in milliseconds, read only
2774     *
2775     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2776     * @atomicservice
2777     * @since arkts {'1.1':'20','1.2':'20'}
2778     * @arkts 1.1&1.2
2779     */
2780    DATE_TAKEN_MS = 'date_taken_ms',
2781    /**
2782     * Cloud enhancement status of the asset, read only
2783     *
2784     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2785     * @systemapi
2786     * @since arkts {'1.1':'13','1.2':'20'}
2787     * @arkts 1.1&1.2
2788     */
2789    CE_AVAILABLE = 'ce_available',
2790    /**
2791     * watermark type of the asset, read only
2792     *
2793     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2794     * @systemapi
2795     * @since 14
2796     */
2797    SUPPORTED_WATERMARK_TYPE = 'supported_watermark_type',
2798    /**
2799     * visibility of thumbnails
2800     *
2801     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2802     * @systemapi
2803     * @since 14
2804     */
2805    THUMBNAIL_VISIBLE = 'thumbnail_visible',
2806    /**
2807     * Whether the photo supports auto cloud enhancement task, read only
2808     *
2809     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2810     * @systemapi
2811     * @since 18
2812     */
2813    IS_CE_AUTO = 'is_auto',
2814    /**
2815     * Owner album id of the asset, read only
2816     *
2817     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2818     * @systemapi
2819     * @since 18
2820     */
2821    OWNER_ALBUM_ID = 'owner_album_id',
2822    /**
2823     * Recentshow state of the asset, read only
2824     *
2825     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2826     * @systemapi
2827     * @since 18
2828     */
2829    IS_RECENT_SHOW = 'is_recent_show',
2830    /**
2831     * Suffix of the asset, read only
2832     *
2833     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2834     * @since 18
2835     */
2836    MEDIA_SUFFIX = 'media_suffix',
2837    /**
2838     * total size of assets, read only
2839     *
2840     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2841     * @systemapi
2842     * @since 19
2843     */
2844    SUM_SIZE = 'sum(size)',
2845    /**
2846     * orientation in exif
2847     *
2848     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2849     * @systemapi
2850     * @since 20
2851     * @arkts 1.1&1.2
2852     */
2853    EXIF_ROTATE = 'exif_rotate'
2854  }
2855
2856  /**
2857   * Enumerates the key album attributes.
2858   *
2859   * @enum { string } AlbumKeys
2860   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2861   * @since 10
2862   */
2863  /**
2864   * Enumerates the key album attributes.
2865   *
2866   * @enum { string } AlbumKeys
2867   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2868   * @crossplatform
2869   * @since arkts {'1.1':'12','1.2':'20'}
2870   * @arkts 1.1&1.2
2871   */
2872  enum AlbumKeys {
2873    /**
2874     * URI of the album.
2875     *
2876     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2877     * @since 10
2878     */
2879    /**
2880     * URI of the album.
2881     *
2882     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2883     * @crossplatform
2884     * @since 12
2885     */
2886    /**
2887     * URI of the album.
2888     *
2889     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2890     * @atomicservice
2891     * @since arkts {'1.1':'20','1.2':'20'}
2892     * @arkts 1.1&1.2
2893     */
2894    URI = 'uri',
2895    /**
2896     * Name of the album.
2897     *
2898     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2899     * @since 10
2900     */
2901    /**
2902     * Name of the album.
2903     *
2904     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2905     * @crossplatform
2906     * @since arkts {'1.1':'12','1.2':'20'}
2907     * @arkts 1.1&1.2
2908     */
2909    ALBUM_NAME = 'album_name',
2910    /**
2911     * Virtual path of the album.
2912     *
2913     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2914     * @systemapi
2915     * @since 18
2916     */
2917    ALBUM_LPATH = 'lpath',
2918    /**
2919     * Bundle name of the album.
2920     *
2921     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2922     * @systemapi
2923     * @since 18
2924     */
2925    BUNDLE_NAME = 'bundle_name',
2926    /**
2927     * Timestamp when the album was modified, in milliseconds.
2928     *
2929     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2930     * @systemapi
2931     * @since arkts {'1.1':'18','1.2':'20'}
2932     * @arkts 1.1&1.2
2933     */
2934    DATE_MODIFIED = 'date_modified',
2935    /**
2936     * album cover uri source
2937     *
2938     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2939     * @systemapi
2940     * @since 20
2941     * @arkts 1.1&1.2
2942     */
2943    COVER_URI_SOURCE = 'cover_uri_source'
2944  }
2945
2946  /**
2947   * Enumerates the display modes of hidden files in the system.
2948   *
2949   * @enum { number } HiddenPhotosDisplayMode
2950   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2951   * @systemapi
2952   * @since arkts {'1.1':'11','1.2':'20'}
2953   * @arkts 1.1&1.2
2954   */
2955  enum HiddenPhotosDisplayMode {
2956    /**
2957     * Display all hidden files in the system.
2958     *
2959     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2960     * @systemapi
2961     * @since arkts {'1.1':'11','1.2':'20'}
2962     * @arkts 1.1&1.2
2963     */
2964    ASSETS_MODE,
2965    /**
2966     * Display hidden files by album (display all albums that contain hidden files in the system, excluding the preset hidden album and the albums in the trash).
2967     *
2968     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2969     * @systemapi
2970     * @since arkts {'1.1':'11','1.2':'20'}
2971     * @arkts 1.1&1.2
2972     */
2973    ALBUMS_MODE
2974  }
2975
2976  /**
2977   * Defines the options for fetching media files.
2978   *
2979   * @interface FetchOptions
2980   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2981   * @since 10
2982   */
2983  /**
2984   * Defines the options for fetching media files.
2985   *
2986   * @interface FetchOptions
2987   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2988   * @crossplatform
2989   * @since 12
2990   */
2991  /**
2992   * Defines the options for fetching media files.
2993   *
2994   * @interface FetchOptions
2995   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
2996   * @crossplatform
2997   * @atomicservice
2998   * @since arkts {'1.1':'20','1.2':'20'}
2999   * @arkts 1.1&1.2
3000   */
3001  interface FetchOptions {
3002    /**
3003     * Indicates the members to query.
3004     *
3005     * @type { Array<string> }
3006     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3007     * @since 10
3008     */
3009    /**
3010     * Indicates the members to query.
3011     *
3012     * @type { Array<string> }
3013     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3014     * @crossplatform
3015     * @since 12
3016     */
3017    /**
3018     * Indicates the members to query.
3019     *
3020     * @type { Array<string> }
3021     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3022     * @crossplatform
3023     * @atomicservice
3024     * @since arkts {'1.1':'20','1.2':'20'}
3025     * @arkts 1.1&1.2
3026     */
3027    fetchColumns: Array<string>;
3028    /**
3029     * Predicates that specify the fetch criteria.
3030     *
3031     * @type { dataSharePredicates.DataSharePredicates }
3032     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3033     * @since 10
3034     */
3035    /**
3036     * Predicates that specify the fetch criteria.
3037     *
3038     * @type { dataSharePredicates.DataSharePredicates }
3039     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3040     * @crossplatform
3041     * @since 12
3042     */
3043    /**
3044     * Predicates that specify the fetch criteria.
3045     *
3046     * @type { dataSharePredicates.DataSharePredicates }
3047     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3048     * @crossplatform
3049     * @atomicservice
3050     * @since arkts {'1.1':'20','1.2':'20'}
3051     * @arkts 1.1&1.2
3052     */
3053    predicates: dataSharePredicates.DataSharePredicates;
3054  }
3055
3056  /**
3057   * Options for creating an image or video asset.
3058   *
3059   * @interface PhotoCreateOptions
3060   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3061   * @systemapi
3062   * @since arkts {'1.1':'10','1.2':'20'}
3063   * @arkts 1.1&1.2
3064   */
3065  interface PhotoCreateOptions {
3066    /**
3067     * Specify subtype of the asset to create
3068     *
3069     * @type { ?PhotoSubtype }
3070     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3071     * @systemapi
3072     * @since arkts {'1.1':'10','1.2':'20'}
3073     * @arkts 1.1&1.2
3074     */
3075    subtype?: PhotoSubtype;
3076    /**
3077     * Camera shot key
3078     *
3079     * @type { ?string }
3080     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3081     * @systemapi
3082     * @since arkts {'1.1':'10','1.2':'20'}
3083     * @arkts 1.1&1.2
3084     */
3085    cameraShotKey?: string;
3086    /**
3087     * User id
3088     *
3089     * @type { ?number }
3090     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3091     * @systemapi
3092     * @since 19
3093     */
3094    userId?: number;
3095  }
3096
3097  /**
3098   * Config to create photo asset
3099   *
3100   * @interface PhotoCreationConfig
3101   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3102   * @atomicservice
3103   * @since arkts {'1.1':'12','1.2':'20'}
3104   * @arkts 1.1&1.2
3105   */
3106  interface PhotoCreationConfig {
3107    /**
3108     * Title of the asset
3109     *
3110     * @type { ?string }
3111     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3112     * @atomicservice
3113     * @since arkts {'1.1':'12','1.2':'20'}
3114     * @arkts 1.1&1.2
3115     */
3116    title?: string;
3117
3118    /**
3119     * Extension of the asset
3120     *
3121     * @type { string }
3122     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3123     * @atomicservice
3124     * @since arkts {'1.1':'12','1.2':'20'}
3125     * @arkts 1.1&1.2
3126     */
3127    fileNameExtension: string;
3128
3129    /**
3130     * Specify photo type of the asset to create, include image or video
3131     *
3132     * @type { PhotoType }
3133     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3134     * @atomicservice
3135     * @since arkts {'1.1':'12','1.2':'20'}
3136     * @arkts 1.1&1.2
3137     */
3138    photoType: PhotoType;
3139
3140    /**
3141     * Specify photo subtype of the asset to create, include default or moving_photo
3142     *
3143     * @type { ?PhotoSubtype }
3144     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3145     * @atomicservice
3146     * @since arkts {'1.1':'12','1.2':'20'}
3147     * @arkts 1.1&1.2
3148     */
3149    subtype?: PhotoSubtype;
3150  }
3151
3152  /**
3153   * Options for creating an image or video asset.
3154   *
3155   * @interface CreateOptions
3156   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3157   * @since 10
3158   */
3159  /**
3160   * Options for creating an image or video asset.
3161   *
3162   * @interface CreateOptions
3163   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3164   * @atomicservice
3165   * @since arkts {'1.1':'11','1.2':'20'}
3166   * @arkts 1.1&1.2
3167   */
3168  interface CreateOptions {
3169    /**
3170     * Title of the asset
3171     *
3172     * @type { ?string }
3173     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3174     * @since 10
3175     */
3176    /**
3177     * Title of the asset
3178     *
3179     * @type { ?string }
3180     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3181     * @atomicservice
3182     * @since arkts {'1.1':'11','1.2':'20'}
3183     * @arkts 1.1&1.2
3184     */
3185    title?: string;
3186    /**
3187     * Specify subtype of the asset to create
3188     *
3189     * @type { ?PhotoSubtype }
3190     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3191     * @atomicservice
3192     * @since arkts {'1.1':'12','1.2':'20'}
3193     * @arkts 1.1&1.2
3194     */
3195    subtype?: PhotoSubtype;
3196  }
3197
3198  /**
3199   * Defines the options for obtaining the thumbnail of an image or video.
3200   *
3201   * @interface RequestPhotoOptions
3202   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3203   * @systemapi
3204   * @since arkts {'1.1':'11','1.2':'20'}
3205   * @arkts 1.1&1.2
3206   */
3207  interface RequestPhotoOptions {
3208    /**
3209     * Size of the thumbnail to obtain.
3210     *
3211     * @type { ?image.Size }
3212     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3213     * @systemapi
3214     * @since arkts {'1.1':'11','1.2':'20'}
3215     * @arkts 1.1&1.2
3216     */
3217    size?: image.Size;
3218    /**
3219     * Operation to perform.
3220     *
3221     * @type { ?RequestPhotoType }
3222     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3223     * @systemapi
3224     * @since arkts {'1.1':'11','1.2':'20'}
3225     * @arkts 1.1&1.2
3226     */
3227    requestPhotoType?: RequestPhotoType;
3228  }
3229
3230  /**
3231   * Defines the application information provided to create assets on behalf of the application.
3232   *
3233   * @interface PhotoCreationSource
3234   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3235   * @systemapi
3236   * @since 18
3237   */
3238  interface PhotoCreationSource {
3239    /**
3240     * Bundle name of the target application
3241     *
3242     * @type { ?string }
3243     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3244     * @systemapi
3245     * @since 18
3246     */
3247    bundleName?: string;
3248    /**
3249     * Name of the target application
3250     *
3251     * @type { ?string }
3252     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3253     * @systemapi
3254     * @since 18
3255     */
3256    appName?: string;
3257    /**
3258     * ID of the target application
3259     *
3260     * @type { ?string }
3261     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3262     * @systemapi
3263     * @since 18
3264     */
3265    appId?: string;
3266    /**
3267     * Token ID of the target application
3268     *
3269     * @type { ?number }
3270     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3271     * @systemapi
3272     * @since 18
3273     */
3274    tokenId?: number;
3275  }
3276
3277  /**
3278   * Provides APIs to manage the file retrieval result.
3279   *
3280   * @interface FetchResult
3281   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3282   * @since 10
3283   */
3284  /**
3285   * Provides APIs to manage the file retrieval result.
3286   *
3287   * @interface FetchResult
3288   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3289   * @crossplatform
3290   * @since 12
3291   */
3292  /**
3293   * Provides APIs to manage the file retrieval result.
3294   *
3295   * @interface FetchResult
3296   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3297   * @crossplatform
3298   * @atomicservice
3299   * @since arkts {'1.1':'20','1.2':'20'}
3300   * @arkts 1.1&1.2
3301   */
3302  interface FetchResult<T> {
3303    /**
3304     * Obtains the total number of files in the result set.
3305     *
3306     * @returns { number } Total number of objects.
3307     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3308     * <br>2. Incorrect parameter types.
3309     * @throws { BusinessError } 13900020 - Invalid argument
3310     * @throws { BusinessError } 14000011 - System inner fail
3311     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3312     * @since 10
3313     */
3314    /**
3315     * Obtains the total number of files in the result set.
3316     *
3317     * @returns { number } Total number of objects.
3318     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3319     * <br>2. Incorrect parameter types.
3320     * @throws { BusinessError } 13900020 - Invalid argument
3321     * @throws { BusinessError } 14000011 - System inner fail
3322     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3323     * @crossplatform
3324     * @since 12
3325     */
3326    /**
3327     * Obtains the total number of objects in the fetch result.
3328     *
3329     * @returns { number } Total number of objects.
3330     * @throws { BusinessError } 13900020 - Invalid argument
3331     * @throws { BusinessError } 14000011 - System inner fail
3332     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3333     * @crossplatform
3334     * @atomicservice
3335     * @since arkts {'1.1':'20','1.2':'20'}
3336     * @arkts 1.1&1.2
3337     */
3338    getCount(): number;
3339    /**
3340     * Checks whether the cursor is in the last row of the result set.
3341     * You need to check whether the object is the last one before calling getNextObject.
3342     *
3343     * @returns { boolean } Whether the object is the last one in the fetch result.
3344     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3345     * <br>2. Incorrect parameter types.
3346     * @throws { BusinessError } 13900020 - Invalid argument
3347     * @throws { BusinessError } 14000011 - System inner fail
3348     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3349     * @since 10
3350     */
3351    /**
3352     * Checks whether the cursor is in the last row of the result set.
3353     * You need to check whether the object is the last one before calling getNextObject.
3354     *
3355     * @returns { boolean } Whether the object is the last one in the fetch result.
3356     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3357     * <br>2. Incorrect parameter types.
3358     * @throws { BusinessError } 13900020 - Invalid argument
3359     * @throws { BusinessError } 14000011 - System inner fail
3360     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3361     * @crossplatform
3362     * @since 12
3363     */
3364    /**
3365     * Checks whether the result set points to the last row.
3366     * You need to check whether the object is the last one before calling getNextObject.
3367     *
3368     * @returns { boolean } Whether the object is the last one in the fetch result.
3369     * @throws { BusinessError } 13900020 - Invalid argument
3370     * @throws { BusinessError } 14000011 - System inner fail
3371     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3372     * @crossplatform
3373     * @atomicservice
3374     * @since 20
3375     */
3376    isAfterLast(): boolean;
3377    /**
3378     * Obtains the first file asset in the result set. This API uses an asynchronous callback to return the result.
3379     *
3380     * @param { AsyncCallback<T> } callback - Callback used to return the first file asset obtained.
3381     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3382     * <br>2. Incorrect parameter types.
3383     * @throws { BusinessError } 13900020 - Invalid argument
3384     * @throws { BusinessError } 14000011 - System inner fail
3385     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3386     * @since 10
3387     */
3388    /**
3389     * Obtains the first file asset in the result set. This API uses an asynchronous callback to return the result.
3390     *
3391     * @param { AsyncCallback<T> } callback - Callback used to return the first file asset obtained.
3392     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3393     * <br>2. Incorrect parameter types.
3394     * @throws { BusinessError } 13900020 - Invalid argument
3395     * @throws { BusinessError } 14000011 - System inner fail
3396     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3397     * @crossplatform
3398     * @since 12
3399     */
3400    /**
3401     * Obtains the first object in the fetch result.
3402     *
3403     * @param { AsyncCallback<T> } callback - Callback used to return the first file asset obtained.
3404     * @throws { BusinessError } 13900020 - Invalid argument
3405     * @throws { BusinessError } 14000011 - System inner fail
3406     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3407     * @crossplatform
3408     * @atomicservice
3409     * @since arkts {'1.1':'20','1.2':'20'}
3410     * @arkts 1.1&1.2
3411     */
3412    getFirstObject(callback: AsyncCallback<T>): void;
3413    /**
3414     * Obtains the first file asset in the result set. This API uses a promise to return the result.
3415     *
3416     * @returns { Promise<T> } Returns the first object in the fetch result.
3417     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3418     * <br>2. Incorrect parameter types.
3419     * @throws { BusinessError } 13900020 - Invalid argument
3420     * @throws { BusinessError } 14000011 - System inner fail
3421     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3422     * @since 10
3423     */
3424    /**
3425     * Obtains the first file asset in the result set. This API uses a promise to return the result.
3426     *
3427     * @returns { Promise<T> } Returns the first object in the fetch result.
3428     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3429     * <br>2. Incorrect parameter types.
3430     * @throws { BusinessError } 13900020 - Invalid argument
3431     * @throws { BusinessError } 14000011 - System inner fail
3432     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3433     * @crossplatform
3434     * @since 12
3435     */
3436    /**
3437     * Obtains the first object in the fetch result.
3438     *
3439     * @returns { Promise<T> } Returns the first object in the fetch result.
3440     * @throws { BusinessError } 13900020 - Invalid argument
3441     * @throws { BusinessError } 14000011 - System inner fail
3442     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3443     * @crossplatform
3444     * @atomicservice
3445     * @since arkts {'1.1':'20','1.2':'20'}
3446     * @arkts 1.1&1.2
3447     */
3448    getFirstObject(): Promise<T>;
3449    /**
3450     * Obtains the next file asset in the result set. This API uses an asynchronous callback to return the result.
3451     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3452     *
3453     * @param { AsyncCallback<T> } callback - Callback used to return the next file asset obtained.
3454     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3455     * <br>2. Incorrect parameter types.
3456     * @throws { BusinessError } 13900020 - Invalid argument
3457     * @throws { BusinessError } 14000011 - System inner fail
3458     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3459     * @since 10
3460     */
3461    /**
3462     * Obtains the next file asset in the result set. This API uses an asynchronous callback to return the result.
3463     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3464     *
3465     * @param { AsyncCallback<T> } callback - Callback used to return the next file asset obtained.
3466     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3467     * <br>2. Incorrect parameter types.
3468     * @throws { BusinessError } 13900020 - Invalid argument
3469     * @throws { BusinessError } 14000011 - System inner fail
3470     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3471     * @crossplatform
3472     * @since 12
3473     */
3474    /**
3475     * Obtains the next object in the fetch result.
3476     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3477     * in the fetch result. This method only works when the current position is not the last row.
3478     *
3479     * @param { AsyncCallback<T> } callback - Callback used to return the next file asset obtained.
3480     * @throws { BusinessError } 13900020 - Invalid argument
3481     * @throws { BusinessError } 14000011 - System inner fail
3482     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3483     * @crossplatform
3484     * @atomicservice
3485     * @since arkts {'1.1':'20','1.2':'20'}
3486     * @arkts 1.1&1.2
3487     */
3488    getNextObject(callback: AsyncCallback<T>): void;
3489    /**
3490     * Obtains the next file asset in the result set. This API uses a promise to return the result.
3491     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3492     *
3493     * @returns { Promise<T> } Returns the next object
3494     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3495     * <br>2. Incorrect parameter types.
3496     * @throws { BusinessError } 13900020 - Invalid argument
3497     * @throws { BusinessError } 14000011 - System inner fail
3498     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3499     * @since 10
3500     */
3501    /**
3502     * Obtains the next file asset in the result set. This API uses a promise to return the result.
3503     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3504     *
3505     * @returns { Promise<T> } Returns the next object
3506     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3507     * <br>2. Incorrect parameter types.
3508     * @throws { BusinessError } 13900020 - Invalid argument
3509     * @throws { BusinessError } 14000011 - System inner fail
3510     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3511     * @crossplatform
3512     * @since 12
3513     */
3514    /**
3515     * Obtains the next object in the fetch result.
3516     * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set.
3517     * in the fetch result. This method only works when the current position is not the last row.
3518     *
3519     * @returns { Promise<T> } Returns the next object
3520     * @throws { BusinessError } 13900020 - Invalid argument
3521     * @throws { BusinessError } 14000011 - System inner fail
3522     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3523     * @crossplatform
3524     * @atomicservice
3525     * @since arkts {'1.1':'20','1.2':'20'}
3526     * @arkts 1.1&1.2
3527     */
3528    getNextObject(): Promise<T>;
3529    /**
3530     * Obtains the last file asset in the result set. This API uses an asynchronous callback to return the result.
3531     *
3532     * @param { AsyncCallback<T> } callback - Callback used to return the last file asset obtained.
3533     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3534     * <br>2. Incorrect parameter types.
3535     * @throws { BusinessError } 13900020 - Invalid argument
3536     * @throws { BusinessError } 14000011 - System inner fail
3537     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3538     * @since 10
3539     */
3540    /**
3541     * Obtains the last file asset in the result set. This API uses an asynchronous callback to return the result.
3542     *
3543     * @param { AsyncCallback<T> } callback - Callback used to return the last file asset obtained.
3544     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3545     * <br>2. Incorrect parameter types.
3546     * @throws { BusinessError } 13900020 - Invalid argument
3547     * @throws { BusinessError } 14000011 - System inner fail
3548     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3549     * @crossplatform
3550     * @since 12
3551     */
3552    /**
3553     * Obtains the last object asset in the fetch result.
3554     *
3555     * @param { AsyncCallback<T> } callback - Callback used to return the last file asset obtained.
3556     * @throws { BusinessError } 13900020 - Invalid argument
3557     * @throws { BusinessError } 14000011 - System inner fail
3558     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3559     * @crossplatform
3560     * @atomicservice
3561     * @since 20
3562     */
3563    getLastObject(callback: AsyncCallback<T>): void;
3564    /**
3565     * Obtains the last file asset in the result set. This API uses a promise to return the result.
3566     *
3567     * @returns { Promise<T> } Returns the last object
3568     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3569     * <br>2. Incorrect parameter types.
3570     * @throws { BusinessError } 13900020 - Invalid argument
3571     * @throws { BusinessError } 14000011 - System inner fail
3572     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3573     * @since 10
3574     */
3575    /**
3576     * Obtains the last file asset in the result set. This API uses a promise to return the result.
3577     *
3578     * @returns { Promise<T> } Returns the last object
3579     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3580     * <br>2. Incorrect parameter types.
3581     * @throws { BusinessError } 13900020 - Invalid argument
3582     * @throws { BusinessError } 14000011 - System inner fail
3583     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3584     * @crossplatform
3585     * @since 12
3586     */
3587    /**
3588     * Obtains the last object asset in the fetch result.
3589     *
3590     * @returns { Promise<T> } Returns the last object
3591     * @throws { BusinessError } 13900020 - Invalid argument
3592     * @throws { BusinessError } 14000011 - System inner fail
3593     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3594     * @crossplatform
3595     * @atomicservice
3596     * @since 20
3597     */
3598    getLastObject(): Promise<T>;
3599    /**
3600     * Obtains a file asset with the specified index in the result set. This API uses an asynchronous callback to return the result.
3601     *
3602     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3603     * @param { AsyncCallback<T> } callback - Callback used to return the file asset obtained.
3604     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3605     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
3606     * @throws { BusinessError } 13900020 - Invalid argument
3607     * @throws { BusinessError } 14000011 - System inner fail
3608     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3609     * @since 10
3610     */
3611    /**
3612     * Obtains a file asset with the specified index in the result set. This API uses an asynchronous callback to return the result.
3613     *
3614     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3615     * @param { AsyncCallback<T> } callback - Callback used to return the file asset obtained.
3616     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3617     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
3618     * @throws { BusinessError } 13900020 - Invalid argument
3619     * @throws { BusinessError } 14000011 - System inner fail
3620     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3621     * @crossplatform
3622     * @since 12
3623     */
3624    /**
3625     * Obtains the object with the specified index in the result set.
3626     *
3627     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3628     * @param { AsyncCallback<T> } callback - Callback used to return the file asset obtained.
3629     * @throws { BusinessError } 13900020 - Invalid argument
3630     * @throws { BusinessError } 14000011 - System inner fail
3631     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3632     * @crossplatform
3633     * @atomicservice
3634     * @since arkts {'1.1':'20','1.2':'20'}
3635     * @arkts 1.1&1.2
3636     */
3637    getObjectByPosition(index: number, callback: AsyncCallback<T>): void;
3638    /**
3639     * Obtains a file asset with the specified index in the result set. This API uses a promise to return the result.
3640     *
3641     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3642     * @returns { Promise<T> } Returns the object
3643     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3644     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
3645     * @throws { BusinessError } 13900020 - Invalid argument
3646     * @throws { BusinessError } 14000011 - System inner fail
3647     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3648     * @since 10
3649     */
3650    /**
3651     * Obtains a file asset with the specified index in the result set. This API uses a promise to return the result.
3652     *
3653     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3654     * @returns { Promise<T> } Returns the object
3655     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3656     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
3657     * @throws { BusinessError } 13900020 - Invalid argument
3658     * @throws { BusinessError } 14000011 - System inner fail
3659     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3660     * @crossplatform
3661     * @since 12
3662     */
3663    /**
3664     * Obtains the object with the specified index in the result set.
3665     *
3666     * @param { number } index - Index of the file asset to obtain. The value starts from 0.
3667     * @returns { Promise<T> } Returns the object
3668     * @throws { BusinessError } 13900020 - Invalid argument
3669     * @throws { BusinessError } 14000011 - System inner fail
3670     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3671     * @crossplatform
3672     * @atomicservice
3673     * @since arkts {'1.1':'20','1.2':'20'}
3674     * @arkts 1.1&1.2
3675     */
3676    getObjectByPosition(index: number): Promise<T>;
3677    /**
3678     * Obtains all the file assets in the result set. This API uses an asynchronous callback to return the result.
3679     *
3680     * @param { AsyncCallback<Array<T>> } callback - Callback used to return an array of all file assets in the result set.
3681     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3682     * <br>2. Incorrect parameter types.
3683     * @throws { BusinessError } 13900020 - Invalid argument
3684     * @throws { BusinessError } 14000011 - System inner fail
3685     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3686     * @since 10
3687     */
3688    /**
3689     * Obtains all the file assets in the result set. This API uses an asynchronous callback to return the result.
3690     *
3691     * @param { AsyncCallback<Array<T>> } callback - Callback used to return an array of all file assets in the result set.
3692     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3693     * <br>2. Incorrect parameter types.
3694     * @throws { BusinessError } 13900020 - Invalid argument
3695     * @throws { BusinessError } 14000011 - System inner fail
3696     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3697     * @crossplatform
3698     * @since 12
3699     */
3700    /**
3701     * Obtains all objects in the fetch result.
3702     *
3703     * @param { AsyncCallback<Array<T>> } callback - Callback used to return an array of all file assets in the result set.
3704     * @throws { BusinessError } 13900020 - Invalid argument
3705     * @throws { BusinessError } 14000011 - System inner fail
3706     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3707     * @crossplatform
3708     * @atomicservice
3709     * @since arkts {'1.1':'20','1.2':'20'}
3710     * @arkts 1.1&1.2
3711     */
3712    getAllObjects(callback: AsyncCallback<Array<T>>): void;
3713    /**
3714     * Obtains all the file assets in the result set. This API uses a promise to return the result.
3715     *
3716     * @returns { Promise<Array<T>> } Returns all the objects
3717     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3718     * <br>2. Incorrect parameter types.
3719     * @throws { BusinessError } 13900020 - Invalid argument
3720     * @throws { BusinessError } 14000011 - System inner fail
3721     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3722     * @since 10
3723     */
3724    /**
3725     * Obtains all the file assets in the result set. This API uses a promise to return the result.
3726     *
3727     * @returns { Promise<Array<T>> } Returns all the objects
3728     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3729     * <br>2. Incorrect parameter types.
3730     * @throws { BusinessError } 13900020 - Invalid argument
3731     * @throws { BusinessError } 14000011 - System inner fail
3732     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3733     * @crossplatform
3734     * @since 12
3735     */
3736    /**
3737     * Obtains all objects in the fetch result.
3738     *
3739     * @returns { Promise<Array<T>> } Returns all the objects
3740     * @throws { BusinessError } 13900020 - Invalid argument
3741     * @throws { BusinessError } 14000011 - System inner fail
3742     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3743     * @crossplatform
3744     * @atomicservice
3745     * @since arkts {'1.1':'20','1.2':'20'}
3746     * @arkts 1.1&1.2
3747     */
3748    getAllObjects(): Promise<Array<T>>;
3749    /**
3750     * Closes this FetchResult instance to invalidate it. After this instance is released, the APIs in this instance cannot be invoked.
3751     *
3752     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3753     * <br>2. Incorrect parameter types.
3754     * @throws { BusinessError } 13900020 - Invalid argument
3755     * @throws { BusinessError } 14000011 - System inner fail
3756     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3757     * @since 10
3758     */
3759    /**
3760     * Closes this FetchResult instance to invalidate it. After this instance is released, the APIs in this instance cannot be invoked.
3761     *
3762     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3763     * <br>2. Incorrect parameter types.
3764     * @throws { BusinessError } 13900020 - Invalid argument
3765     * @throws { BusinessError } 14000011 - System inner fail
3766     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3767     * @crossplatform
3768     * @since 12
3769     */
3770    /**
3771     * Release the fetch result.
3772     *
3773     * @throws { BusinessError } 13900020 - Invalid argument
3774     * @throws { BusinessError } 14000011 - System inner fail
3775     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3776     * @crossplatform
3777     * @atomicservice
3778     * @since arkts {'1.1':'20','1.2':'20'}
3779     * @arkts 1.1&1.2
3780     */
3781    close(): void;
3782  }
3783
3784  /**
3785   * Enumerates the album types.
3786   *
3787   * @enum { number } AlbumType
3788   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3789   * @since 10
3790   */
3791  /**
3792   * Enumerates the album types.
3793   *
3794   * @enum { number } AlbumType
3795   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3796   * @crossplatform
3797   * @since arkts {'1.1':'12','1.2':'20'}
3798   * @arkts 1.1&1.2
3799   */
3800  enum AlbumType {
3801    /**
3802     * User album.
3803     *
3804     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3805     * @since 10
3806     */
3807    /**
3808     * User album.
3809     *
3810     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3811     * @crossplatform
3812     * @since arkts {'1.1':'12','1.2':'20'}
3813     * @arkts 1.1&1.2
3814     */
3815    USER = 0,
3816    /**
3817     * System album.
3818     *
3819     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3820     * @since 10
3821     */
3822    /**
3823     * System album.
3824     *
3825     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3826     * @crossplatform
3827     * @since arkts {'1.1':'12','1.2':'20'}
3828     * @arkts 1.1&1.2
3829     */
3830    SYSTEM = 1024,
3831    /**
3832     * Album created by app.
3833     *
3834     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3835     * @systemapi
3836     * @since 18
3837     */
3838    SOURCE = 2048,
3839    /**
3840     * Album created by smart abilities.
3841     *
3842     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3843     * @systemapi
3844     * @since arkts {'1.1':'11','1.2':'20'}
3845     * @arkts 1.1&1.2
3846     */
3847    SMART = 4096
3848  }
3849
3850  /**
3851   * Enumerate the album subtypes.
3852   *
3853   * @enum { number } AlbumSubtype
3854   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3855   * @since 10
3856   */
3857  /**
3858   * Enumerate the album subtypes.
3859   *
3860   * @enum { number } AlbumSubtype
3861   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3862   * @crossplatform
3863   * @since arkts {'1.1':'12','1.2':'20'}
3864   * @arkts 1.1&1.2
3865   */
3866  enum AlbumSubtype {
3867    /**
3868     * Generic user-created albums.
3869     *
3870     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3871     * @since 10
3872     */
3873    /**
3874     * Generic user-created albums.
3875     *
3876     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3877     * @crossplatform
3878     * @since arkts {'1.1':'12','1.2':'20'}
3879     * @arkts 1.1&1.2
3880     */
3881    USER_GENERIC = 1,
3882    /**
3883     * Favorite album, which assets are marked as favorite.
3884     *
3885     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3886     * @since 10
3887     */
3888    /**
3889     * Favorite album, which assets are marked as favorite.
3890     *
3891     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3892     * @crossplatform
3893     * @since arkts {'1.1':'12','1.2':'20'}
3894     * @arkts 1.1&1.2
3895     */
3896    FAVORITE = 1025,
3897    /**
3898     * Video album, which contains all video assets.
3899     *
3900     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3901     * @since 10
3902     */
3903    /**
3904     * Video album, which contains all video assets.
3905     *
3906     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3907     * @crossplatform
3908     * @since arkts {'1.1':'12','1.2':'20'}
3909     * @arkts 1.1&1.2
3910     */
3911    VIDEO,
3912    /**
3913     * Hidden album, which assets are marked as hidden.
3914     *
3915     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3916     * @systemapi
3917     * @since arkts {'1.1':'10','1.2':'20'}
3918     * @arkts 1.1&1.2
3919     */
3920    HIDDEN,
3921    /**
3922     * Trash album, which assets are deleted.
3923     *
3924     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3925     * @systemapi
3926     * @since arkts {'1.1':'10','1.2':'20'}
3927     * @arkts 1.1&1.2
3928     */
3929    TRASH,
3930    /**
3931     * Screenshot album
3932     *
3933     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3934     * @systemapi
3935     * @since arkts {'1.1':'10','1.2':'20'}
3936     * @arkts 1.1&1.2
3937     */
3938    SCREENSHOT,
3939    /**
3940     * Camera album
3941     *
3942     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3943     * @systemapi
3944     * @since arkts {'1.1':'10','1.2':'20'}
3945     * @arkts 1.1&1.2
3946     */
3947    CAMERA,
3948    /**
3949     * Image album
3950     *
3951     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3952     * @systemapi
3953     * @since 11
3954     */
3955    /**
3956     * Image album
3957     *
3958     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3959     * @since arkts {'1.1':'12','1.2':'20'}
3960     * @arkts 1.1&1.2
3961     */
3962    IMAGE = 1031,
3963    /**
3964     * Cloud Enhancement album
3965     *
3966     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3967     * @systemapi
3968     * @since arkts {'1.1':'13','1.2':'20'}
3969     * @arkts 1.1&1.2
3970     */
3971    CLOUD_ENHANCEMENT = 1032,
3972    /**
3973     * Source album
3974     *
3975     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3976     * @systemapi
3977     * @since arkts {'1.1':'11','1.2':'20'}
3978     * @arkts 1.1&1.2
3979     */
3980    SOURCE_GENERIC = 2049,
3981    /**
3982     * Classify album
3983     *
3984     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3985     * @systemapi
3986     * @since arkts {'1.1':'11','1.2':'20'}
3987     * @arkts 1.1&1.2
3988     */
3989    CLASSIFY = 4097,
3990    /**
3991     * Location album
3992     *
3993     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
3994     * @systemapi
3995     * @since arkts {'1.1':'11','1.2':'20'}
3996     * @arkts 1.1&1.2
3997     */
3998    GEOGRAPHY_LOCATION = 4099,
3999    /**
4000     * City album
4001     *
4002     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4003     * @systemapi
4004     * @since arkts {'1.1':'11','1.2':'20'}
4005     * @arkts 1.1&1.2
4006     */
4007    GEOGRAPHY_CITY,
4008    /**
4009     * ShootingMode album
4010     *
4011     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4012     * @systemapi
4013     * @since arkts {'1.1':'11','1.2':'20'}
4014     * @arkts 1.1&1.2
4015     */
4016    SHOOTING_MODE,
4017    /**
4018     * Portrait album
4019     *
4020     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4021     * @systemapi
4022     * @since arkts {'1.1':'11','1.2':'20'}
4023     * @arkts 1.1&1.2
4024     */
4025    PORTRAIT,
4026    /**
4027     * Group photo album
4028     *
4029     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4030     * @systemapi
4031     * @since arkts {'1.1':'13','1.2':'20'}
4032     * @arkts 1.1&1.2
4033     */
4034    GROUP_PHOTO,
4035    /**
4036     * Highlight album
4037     *
4038     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4039     * @systemapi
4040     * @since arkts {'1.1':'12','1.2':'20'}
4041     * @arkts 1.1&1.2
4042     */
4043    HIGHLIGHT = 4104,
4044    /**
4045     * Highlight suggestions album
4046     *
4047     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4048     * @systemapi
4049     * @since arkts {'1.1':'12','1.2':'20'}
4050     * @arkts 1.1&1.2
4051     */
4052    HIGHLIGHT_SUGGESTIONS,
4053    /**
4054     * Any album
4055     *
4056     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4057     * @since 10
4058     */
4059    /**
4060     * Any album
4061     *
4062     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4063     * @crossplatform
4064     * @since arkts {'1.1':'12','1.2':'20'}
4065     * @arkts 1.1&1.2
4066     */
4067    ANY = 2147483647
4068  }
4069
4070  /**
4071   * Enumerates the types of the operation for obtaining image or video thumbnails.
4072   *
4073   * @enum { number } RequestPhotoType
4074   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4075   * @systemapi
4076   * @since arkts {'1.1':'11','1.2':'20'}
4077   * @arkts 1.1&1.2
4078   */
4079  enum RequestPhotoType {
4080    /**
4081     * Obtain both the quick thumbnail and the quality thumbnail.
4082     *
4083     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4084     * @systemapi
4085     * @since arkts {'1.1':'11','1.2':'20'}
4086     * @arkts 1.1&1.2
4087     */
4088    REQUEST_ALL_THUMBNAILS = 0,
4089    /**
4090     * Obtain only the quick thumbnail.
4091     *
4092     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4093     * @systemapi
4094     * @since arkts {'1.1':'11','1.2':'20'}
4095     * @arkts 1.1&1.2
4096     */
4097    REQUEST_FAST_THUMBNAIL,
4098    /**
4099     * Obtain only the quality thumbnail.
4100     *
4101     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4102     * @systemapi
4103     * @since arkts {'1.1':'11','1.2':'20'}
4104     * @arkts 1.1&1.2
4105     */
4106    REQUEST_QUALITY_THUMBNAIL
4107  }
4108
4109  /**
4110   * Enumerates source types of cover uri.
4111   *
4112   * @enum { number } CoverUriSource
4113   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4114   * @systemapi
4115   * @since 20
4116   * @arkts 1.1&1.2
4117   */
4118  enum CoverUriSource {
4119    /**
4120     * Default album cover.
4121     *
4122     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4123     * @systemapi
4124     * @since 20
4125     * @arkts 1.1&1.2
4126     */
4127    DEFAULT_COVER = 0,
4128
4129    /**
4130     * Manually set cover uri.
4131     *
4132     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4133     * @systemapi
4134     * @since 20
4135     * @arkts 1.1&1.2
4136     */
4137    MANUAL_COVER = 1
4138  }
4139
4140  /**
4141   * Defines the abstract interface of albums.
4142   *
4143   * @interface AbsAlbum
4144   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4145   * @since 10
4146   */
4147  /**
4148   * Defines the abstract interface of albums.
4149   *
4150   * @interface AbsAlbum
4151   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4152   * @crossplatform
4153   * @since arkts {'1.1':'12','1.2':'20'}
4154   * @arkts 1.1&1.2
4155   */
4156  interface AbsAlbum {
4157    /**
4158     * Album type
4159     *
4160     * @type { AlbumType }
4161     * @readonly
4162     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4163     * @since 10
4164     */
4165    /**
4166     * Album type
4167     *
4168     * @type { AlbumType }
4169     * @readonly
4170     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4171     * @crossplatform
4172     * @since arkts {'1.1':'12','1.2':'20'}
4173     * @arkts 1.1&1.2
4174     */
4175    readonly albumType: AlbumType;
4176    /**
4177     * Album subtype
4178     *
4179     * @type { AlbumSubtype }
4180     * @readonly
4181     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4182     * @since 10
4183     */
4184    /**
4185     * Album subtype
4186     *
4187     * @type { AlbumSubtype }
4188     * @readonly
4189     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4190     * @crossplatform
4191     * @since arkts {'1.1':'12','1.2':'20'}
4192     * @arkts 1.1&1.2
4193     */
4194    readonly albumSubtype: AlbumSubtype;
4195    /**
4196     * Album name.
4197     *
4198     * @type { string }
4199     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4200     * @since 10
4201     */
4202    /**
4203     * Album name.
4204     *
4205     * @type { string }
4206     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4207     * @crossplatform
4208     * @since arkts {'1.1':'12','1.2':'20'}
4209     * @arkts 1.1&1.2
4210     */
4211    albumName: string;
4212    /**
4213     * Album uri.
4214     *
4215     * @type { string }
4216     * @readonly
4217     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4218     * @since 10
4219     */
4220    /**
4221     * Album uri.
4222     *
4223     * @type { string }
4224     * @readonly
4225     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4226     * @crossplatform
4227     * @since arkts {'1.1':'12','1.2':'20'}
4228     * @arkts 1.1&1.2
4229     */
4230    readonly albumUri: string;
4231    /**
4232     * Number of assets in the album
4233     *
4234     * @type { number }
4235     * @readonly
4236     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4237     * @since 10
4238     */
4239    /**
4240     * Number of assets in the album
4241     *
4242     * @type { number }
4243     * @readonly
4244     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4245     * @crossplatform
4246     * @since arkts {'1.1':'12','1.2':'20'}
4247     * @arkts 1.1&1.2
4248     */
4249    readonly count: number;
4250    /**
4251     * Cover uri for the album
4252     *
4253     * @type { string }
4254     * @readonly
4255     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4256     * @since arkts {'1.1':'10','1.2':'20'}
4257     * @arkts 1.1&1.2
4258     */
4259    readonly coverUri: string;
4260    /**
4261     * Lpath for the album, one album has a virtual path
4262     *
4263     * @type { ?string }
4264     * @readonly
4265     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4266     * @systemapi
4267     * @since 18
4268     */
4269    readonly lpath?: string;
4270    /**
4271     * Album cover uri source
4272     *
4273     * @type { ?CoverUriSource }
4274     * @readonly
4275     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4276     * @systemapi
4277     * @since 20
4278     * @arkts 1.1&1.2
4279     */
4280    readonly coverUriSource?: CoverUriSource;
4281    /**
4282     * Obtains image and video assets. This API uses an asynchronous callback to return the result.
4283     *
4284     * @permission ohos.permission.READ_IMAGEVIDEO
4285     * @param { FetchOptions } options - Options for fetching the image and video assets.
4286     * @param { AsyncCallback<FetchResult<PhotoAsset>> } callback - Callback used to return the image and video assets obtained.
4287     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4288     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4289     * @throws { BusinessError } 13900012 - Permission denied
4290     * @throws { BusinessError } 13900020 - Invalid argument
4291     * @throws { BusinessError } 14000011 - System inner fail
4292     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4293     * @since 10
4294     */
4295    /**
4296     * Obtains image and video assets. This API uses an asynchronous callback to return the result.
4297     *
4298     * @permission ohos.permission.READ_IMAGEVIDEO
4299     * @param { FetchOptions } options - Options for fetching the image and video assets.
4300     * @param { AsyncCallback<FetchResult<PhotoAsset>> } callback - Callback used to return the image and video assets obtained.
4301     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4302     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4303     * @throws { BusinessError } 201 - Permission denied
4304     * @throws { BusinessError } 13900020 - Invalid argument
4305     * @throws { BusinessError } 14000011 - System inner fail
4306     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4307     * @crossplatform
4308     * @since 12
4309     */
4310    getAssets(options: FetchOptions, callback: AsyncCallback<FetchResult<PhotoAsset>>): void;
4311    /**
4312     * Fetch assets in an album.
4313     *
4314     * @permission ohos.permission.READ_IMAGEVIDEO
4315     * @param { FetchOptions } options - Fetch options.
4316     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result
4317     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4318     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4319     * @throws { BusinessError } 13900012 - Permission denied
4320     * @throws { BusinessError } 13900020 - Invalid argument
4321     * @throws { BusinessError } 14000011 - System inner fail
4322     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4323     * @since 10
4324     */
4325    /**
4326     * Fetch assets in an album.
4327     *
4328     * @permission ohos.permission.READ_IMAGEVIDEO
4329     * @param { FetchOptions } options - Fetch options.
4330     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result
4331     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4332     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4333     * @throws { BusinessError } 13900012 - Permission denied
4334     * @throws { BusinessError } 13900020 - Invalid argument
4335     * @throws { BusinessError } 14000011 - System inner fail
4336     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4337     * @crossplatform
4338     * @since 12
4339     */
4340    /**
4341     * Fetch assets in an album.
4342     *
4343     * @permission ohos.permission.READ_IMAGEVIDEO
4344     * @param { FetchOptions } options - Fetch options.
4345     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result
4346     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4347     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4348     * @throws { BusinessError } 201 - Permission denied
4349     * @throws { BusinessError } 13900020 - Invalid argument
4350     * @throws { BusinessError } 14000011 - System inner fail
4351     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4352     * @crossplatform
4353     * @atomicservice
4354     * @since arkts {'1.1':'20','1.2':'20'}
4355     * @arkts 1.1&1.2
4356     */
4357    getAssets(options: FetchOptions): Promise<FetchResult<PhotoAsset>>;
4358    /**
4359     * Fetch shared photo assets in an album.
4360     *
4361     * @permission ohos.permission.ACCESS_MEDIALIB_THUMB_DB
4362     * @param { FetchOptions } options - Fetch options.
4363     * @returns { Array<SharedPhotoAsset> } Returns the shared photo assets
4364     * @throws { BusinessError } 201 - Permission denied
4365     * @throws { BusinessError } 202 - Called by non-system application
4366     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4367     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4368     * @throws { BusinessError } 14000011 - Internal system error
4369     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4370     * @systemapi
4371     * @since 13
4372     */
4373    getSharedPhotoAssets(options: FetchOptions): Array<SharedPhotoAsset>;
4374  }
4375
4376  /**
4377   * Enumeration change types of data change.
4378   *
4379   * @enum { number } NotifyChangeType
4380   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4381   * @since 20
4382   */
4383  enum NotifyChangeType {
4384    /**
4385     * Data(assets or albums) have been newly created.
4386     *
4387     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4388     * @since 20
4389     */
4390    NOTIFY_CHANGE_ADD = 0,
4391    /**
4392     * Data(assets or albums) have been modified.
4393     *
4394     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4395     * @since 20
4396     */
4397    NOTIFY_CHANGE_UPDATE = 1,
4398    /**
4399     * Data(assets or albums) have been removed.
4400     *
4401     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4402     * @since 20
4403     */
4404    NOTIFY_CHANGE_REMOVE = 2,
4405  }
4406
4407  /**
4408   * Defines the album.
4409   *
4410   * @extends AbsAlbum
4411   * @interface Album
4412   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4413   * @since 10
4414   */
4415  /**
4416   * Defines the album.
4417   *
4418   * @extends AbsAlbum
4419   * @interface Album
4420   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4421   * @crossplatform
4422   * @since arkts {'1.1':'12','1.2':'20'}
4423   * @arkts 1.1&1.2
4424   */
4425  interface Album extends AbsAlbum {
4426    /**
4427     * Number of image assets in the album
4428     *
4429     * @type { ?number }
4430     * @readonly
4431     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4432     * @since 11
4433     */
4434    /**
4435     * Number of image assets in the album
4436     *
4437     * @type { ?number }
4438     * @readonly
4439     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4440     * @crossplatform
4441     * @since arkts {'1.1':'12','1.2':'20'}
4442     * @arkts 1.1&1.2
4443     */
4444    readonly imageCount?: number;
4445    /**
4446     * Number of video assets in the album
4447     *
4448     * @type { ?number }
4449     * @readonly
4450     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4451     * @since 11
4452     */
4453    /**
4454     * Number of video assets in the album
4455     *
4456     * @type { ?number }
4457     * @readonly
4458     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4459     * @crossplatform
4460     * @since arkts {'1.1':'12','1.2':'20'}
4461     * @arkts 1.1&1.2
4462     */
4463    readonly videoCount?: number;
4464    /**
4465     * Album dateAdded
4466     *
4467     * @type { ?number }
4468     * @readonly
4469     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4470     * @systemapi
4471     * @since 18
4472     */
4473    readonly dateAdded?: number;
4474    /**
4475     * Album dateModified
4476     *
4477     * @type { ?number }
4478     * @readonly
4479     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4480     * @systemapi
4481     * @since 18
4482     */
4483    readonly dateModified?: number;
4484    /**
4485     * Modify metadata for the album
4486     *
4487     * @permission ohos.permission.WRITE_IMAGEVIDEO
4488     * @param { AsyncCallback<void> } callback - Returns void
4489     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4490     * <br>2. Incorrect parameter types.
4491     * @throws { BusinessError } 201 - Permission denied
4492     * @throws { BusinessError } 13900020 - Invalid argument
4493     * @throws { BusinessError } 14000011 - System inner fail
4494     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4495     * @since arkts {'1.1':'10','1.2':'20'}
4496     * @arkts 1.1&1.2
4497     */
4498    commitModify(callback: AsyncCallback<void>): void;
4499    /**
4500     * Modify metadata for the album
4501     *
4502     * @permission ohos.permission.WRITE_IMAGEVIDEO
4503     * @returns { Promise<void> } Returns void
4504     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4505     * <br>2. Incorrect parameter types.
4506     * @throws { BusinessError } 201 - Permission denied
4507     * @throws { BusinessError } 13900020 - Invalid argument
4508     * @throws { BusinessError } 14000011 - System inner fail
4509     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4510     * @since arkts {'1.1':'10','1.2':'20'}
4511     * @arkts 1.1&1.2
4512     */
4513    commitModify(): Promise<void>;
4514    /**
4515     * Adds image and video assets to an album. Before the operation, ensure that the image and video assets to add and the album exist.
4516     * This API uses an asynchronous callback to return the result.
4517     *
4518     * @permission ohos.permission.WRITE_IMAGEVIDEO
4519     * @param { Array<PhotoAsset> } assets - Array of the image and video assets to add.
4520     * @param { AsyncCallback<void> } callback - Callback that returns no value.
4521     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4522     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4523     * @throws { BusinessError } 201 - Permission denied
4524     * @throws { BusinessError } 13900020 - Invalid argument
4525     * @throws { BusinessError } 14000011 - System inner fail
4526     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4527     * @since 10
4528     * @deprecated since 11
4529     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#addAssets
4530     */
4531    addAssets(assets: Array<PhotoAsset>, callback: AsyncCallback<void>): void;
4532    /**
4533     * Adds image and video assets to an album. Before the operation, ensure that the image and video assets to add and the album exist.
4534     * This API uses a promise to return the result.
4535     *
4536     * @permission ohos.permission.WRITE_IMAGEVIDEO
4537     * @param { Array<PhotoAsset> } assets - Array of the image and video assets to add.
4538     * @returns { Promise<void> } Returns void
4539     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4540     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4541     * @throws { BusinessError } 201 - Permission denied
4542     * @throws { BusinessError } 13900020 - Invalid argument
4543     * @throws { BusinessError } 14000011 - System inner fail
4544     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4545     * @since 10
4546     * @deprecated since 11
4547     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#addAssets
4548     */
4549    addAssets(assets: Array<PhotoAsset>): Promise<void>;
4550    /**
4551     * Removes image and video assets from an album. The album and file resources must exist.
4552     * This API uses an asynchronous callback to return the result.
4553     *
4554     * @permission ohos.permission.WRITE_IMAGEVIDEO
4555     * @param { Array<PhotoAsset> } assets - Array of the image and video assets to remove.
4556     * @param { AsyncCallback<void> } callback - Callback that returns no value.
4557     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4558     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4559     * @throws { BusinessError } 201 - Permission denied
4560     * @throws { BusinessError } 13900020 - Invalid argument
4561     * @throws { BusinessError } 14000011 - System inner fail
4562     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4563     * @since 10
4564     * @deprecated since 11
4565     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#removeAssets
4566     */
4567    removeAssets(assets: Array<PhotoAsset>, callback: AsyncCallback<void>): void;
4568    /**
4569     * Removes image and video assets from an album. The album and file resources must exist.
4570     * This API uses a promise to return the result.
4571     *
4572     * @permission ohos.permission.WRITE_IMAGEVIDEO
4573     * @param { Array<PhotoAsset> } assets - Array of the image and video assets to remove.
4574     * @returns { Promise<void> } Returns void
4575     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4576     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4577     * @throws { BusinessError } 201 - Permission denied
4578     * @throws { BusinessError } 13900020 - Invalid argument
4579     * @throws { BusinessError } 14000011 - System inner fail
4580     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4581     * @since 10
4582     * @deprecated since 11
4583     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#removeAssets
4584     */
4585    removeAssets(assets: Array<PhotoAsset>): Promise<void>;
4586    /**
4587     * Recovers image or video assets from the trash. Before the operation, ensure that the image or video assets exist in the trash.
4588     * This API uses an asynchronous callback to return the result.
4589     *
4590     * @permission ohos.permission.WRITE_IMAGEVIDEO
4591     * @param { Array<PhotoAsset> } assets - Array of the image or video assets to recover.
4592     * @param { AsyncCallback<void> } callback - Callback that returns no value.
4593     * @throws { BusinessError } 202 - Called by non-system application.
4594     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4595     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4596     * @throws { BusinessError } 13900012 - Permission denied
4597     * @throws { BusinessError } 13900020 - Invalid argument
4598     * @throws { BusinessError } 14000011 - System inner fail
4599     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4600     * @systemapi
4601     * @since 10
4602     * @deprecated since 11
4603     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#recoverAssets
4604     */
4605    recoverAssets(assets: Array<PhotoAsset>, callback: AsyncCallback<void>): void;
4606    /**
4607     * Recovers image or video assets from the trash. Before the operation, ensure that the image or video assets exist in the trash.
4608     * This API uses a promise to return the result.
4609     *
4610     * @permission ohos.permission.WRITE_IMAGEVIDEO
4611     * @param { Array<PhotoAsset> } assets - Array of the image or video assets to recover.
4612     * @returns { Promise<void> } Returns void
4613     * @throws { BusinessError } 202 - Called by non-system application.
4614     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4615     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4616     * @throws { BusinessError } 13900012 - Permission denied
4617     * @throws { BusinessError } 13900020 - Invalid argument
4618     * @throws { BusinessError } 14000011 - System inner fail
4619     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4620     * @systemapi
4621     * @since 10
4622     * @deprecated since 11
4623     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#recoverAssets
4624     */
4625    recoverAssets(assets: Array<PhotoAsset>): Promise<void>;
4626    /**
4627     * Deletes image or video assets from the trash. Before the operation, ensure that the image or video assets exist in the trash.
4628     * This API uses an asynchronous callback to return the result.
4629     *
4630     * @permission ohos.permission.WRITE_IMAGEVIDEO
4631     * @param { Array<PhotoAsset> } assets - Array of the image or video assets to delete.
4632     * @param { AsyncCallback<void> } callback - Callback that returns no value.
4633     * @throws { BusinessError } 202 - Called by non-system application.
4634     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4635     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4636     * @throws { BusinessError } 13900012 - Permission denied
4637     * @throws { BusinessError } 13900020 - Invalid argument
4638     * @throws { BusinessError } 14000011 - System inner fail
4639     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4640     * @systemapi
4641     * @since 10
4642     * @deprecated since 11
4643     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#deleteAssets
4644     */
4645    deleteAssets(assets: Array<PhotoAsset>, callback: AsyncCallback<void>): void;
4646    /**
4647     * Deletes image or video assets from the trash. Before the operation, ensure that the image or video assets exist in the trash.
4648     * This API uses a promise to return the result.
4649     *
4650     * @permission ohos.permission.WRITE_IMAGEVIDEO
4651     * @param { Array<PhotoAsset> } assets - Array of the image or video assets to delete.
4652     * @returns { Promise<void> } Returns void
4653     * @throws { BusinessError } 202 - Called by non-system application.
4654     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4655     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4656     * @throws { BusinessError } 13900012 - Permission denied
4657     * @throws { BusinessError } 13900020 - Invalid argument
4658     * @throws { BusinessError } 14000011 - System inner fail
4659     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4660     * @systemapi
4661     * @since 10
4662     * @deprecated since 11
4663     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#deleteAssets
4664     */
4665    deleteAssets(assets: Array<PhotoAsset>): Promise<void>;
4666    /**
4667     * Sets the album cover. This API uses an asynchronous callback to return the result.
4668     *
4669     * @permission ohos.permission.WRITE_IMAGEVIDEO
4670     * @param { string } uri - URI of the file to be set as the album cover.
4671     * @param { AsyncCallback<void> } callback - Callback that returns no value.
4672     * @throws { BusinessError } 202 - Called by non-system application.
4673     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4674     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4675     * @throws { BusinessError } 13900012 - Permission denied
4676     * @throws { BusinessError } 13900020 - Invalid argument
4677     * @throws { BusinessError } 14000011 - System inner fail
4678     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4679     * @systemapi
4680     * @since 10
4681     * @deprecated since 11
4682     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#setCoverUri
4683     */
4684    setCoverUri(uri: string, callback: AsyncCallback<void>): void;
4685    /**
4686     * Sets the album cover. This API uses a promise to return the result.
4687     *
4688     * @permission ohos.permission.WRITE_IMAGEVIDEO
4689     * @param { string } uri - URI of the file to be set as the album cover.
4690     * @returns { Promise<void> } Returns void
4691     * @throws { BusinessError } 202 - Called by non-system application.
4692     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4693     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4694     * @throws { BusinessError } 13900012 - Permission denied
4695     * @throws { BusinessError } 13900020 - Invalid argument
4696     * @throws { BusinessError } 14000011 - System inner fail
4697     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4698     * @systemapi
4699     * @since 10
4700     * @deprecated since 11
4701     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#setCoverUri
4702     */
4703    setCoverUri(uri: string): Promise<void>;
4704    /**
4705     * Obtains the face identifier on the cover of a portrait album or group photo album.
4706     *
4707     * @permission ohos.permission.READ_IMAGEVIDEO
4708     * @returns { Promise<string> } Returns tag_id if portrait album, Returns group_tag if group photo album,
4709     * <br>Returns empty if not found.
4710     * @throws { BusinessError } 201 - Permission denied
4711     * @throws { BusinessError } 202 - Called by non-system application
4712     * @throws { BusinessError } 14000011 - Internal system error
4713     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4714     * @systemapi
4715     * @since arkts {'1.1':'13','1.2':'20'}
4716     * @arkts 1.1&1.2
4717     */
4718    getFaceId(): Promise<string>;
4719  }
4720
4721  /**
4722   * Defines the album order.
4723   *
4724   * @interface AlbumOrder
4725   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4726   * @systemapi
4727   * @since 20
4728   */
4729  interface AlbumOrder {
4730    /**
4731     * The album id of album asset
4732     *
4733     * @type { number }
4734     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4735     * @systemapi
4736     * @since 20
4737     */
4738    albumId: number;
4739    /**
4740     * The album order of album asset
4741     *
4742     * @type { number }
4743     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4744     * @systemapi
4745     * @since 20
4746     */
4747    albumOrder: number;
4748    /**
4749     * The order section of album asset
4750     *
4751     * @type { number }
4752     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4753     * @systemapi
4754     * @since 20
4755     */
4756    orderSection: number;
4757    /**
4758     * The order type of album asset
4759     *
4760     * @type { number }
4761     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4762     * @systemapi
4763     * @since 20
4764     */
4765    orderType: number;
4766    /**
4767     * The order status of album asset
4768     *
4769     * @type { number }
4770     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4771     * @systemapi
4772     * @since 20
4773     */
4774    orderStatus: number;
4775  }
4776
4777  /**
4778   * Helper functions to access photos and albums.
4779   *
4780   * @interface PhotoAccessHelper
4781   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4782   * @since 10
4783   */
4784  /**
4785   * Helper functions to access photos and albums.
4786   *
4787   * @interface PhotoAccessHelper
4788   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4789   * @atomicservice
4790   * @since 11
4791   */
4792  /**
4793   * Helper functions to access photos and albums.
4794   *
4795   * @interface PhotoAccessHelper
4796   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4797   * @crossplatform
4798   * @atomicservice
4799   * @since arkts {'1.1':'12','1.2':'20'}
4800   * @arkts 1.1&1.2
4801   */
4802  interface PhotoAccessHelper {
4803    /**
4804     * Obtains image and video assets. This API uses an asynchronous callback to return the result.
4805     *
4806     * @permission ohos.permission.READ_IMAGEVIDEO
4807     * @param { FetchOptions } options - Options for fetching the image and video assets.
4808     * @param { AsyncCallback<FetchResult<PhotoAsset>> } callback - Callback used to return the image and video assets obtained.
4809     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4810     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4811     * @throws { BusinessError } 13900012 - Permission denied
4812     * @throws { BusinessError } 13900020 - Invalid argument
4813     * @throws { BusinessError } 14000011 - System inner fail
4814     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4815     * @since 10
4816     */
4817    /**
4818     * Obtains image and video assets. This API uses an asynchronous callback to return the result.
4819     *
4820     * @permission ohos.permission.READ_IMAGEVIDEO
4821     * @param { FetchOptions } options - Options for fetching the image and video assets.
4822     * @param { AsyncCallback<FetchResult<PhotoAsset>> } callback - Callback used to return the image and video assets obtained.
4823     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4824     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4825     * @throws { BusinessError } 201 - Permission denied
4826     * @throws { BusinessError } 13900020 - Invalid argument
4827     * @throws { BusinessError } 14000011 - System inner fail
4828     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4829     * @crossplatform
4830     * @since arkts {'1.1':'12','1.2':'20'}
4831     * @arkts 1.1&1.2
4832     */
4833    getAssets(options: FetchOptions, callback: AsyncCallback<FetchResult<PhotoAsset>>): void;
4834    /**
4835     * Obtains image and video assets. This API uses a promise to return the result.
4836     *
4837     * @permission ohos.permission.READ_IMAGEVIDEO
4838     * @param { FetchOptions } options - Options for fetching the image and video assets.
4839     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result.
4840     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4841     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4842     * @throws { BusinessError } 13900012 - Permission denied
4843     * @throws { BusinessError } 13900020 - Invalid argument
4844     * @throws { BusinessError } 14000011 - System inner fail
4845     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4846     * @since 10
4847     */
4848    /**
4849     * Obtains image and video assets. This API uses a promise to return the result.
4850     *
4851     * @permission ohos.permission.READ_IMAGEVIDEO
4852     * @param { FetchOptions } options - Options for fetching the image and video assets.
4853     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result.
4854     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4855     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4856     * @throws { BusinessError } 13900012 - Permission denied
4857     * @throws { BusinessError } 13900020 - Invalid argument
4858     * @throws { BusinessError } 14000011 - System inner fail
4859     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4860     * @crossplatform
4861     * @since 12
4862     */
4863    /**
4864     * Fetch photo assets
4865     *
4866     * @permission ohos.permission.READ_IMAGEVIDEO
4867     * @param { FetchOptions } options - Options for fetching the image and video assets.
4868     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result.
4869     * @throws { BusinessError } 201 - Permission denied
4870     * @throws { BusinessError } 13900020 - Invalid argument
4871     * @throws { BusinessError } 14000011 - System inner fail
4872     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4873     * @crossplatform
4874     * @atomicservice
4875     * @since 20
4876     * @arkts 1.1&1.2
4877     */
4878    getAssets(options: FetchOptions): Promise<FetchResult<PhotoAsset>>;
4879    /**
4880     * Obtains burst assets. This API uses a promise to return the result.
4881     *
4882     * @permission ohos.permission.READ_IMAGEVIDEO
4883     * @param { string } burstKey - UUID of a set of burst photos (BURST_KEY of PhotoKeys). The value is a string of 36 characters.
4884     * @param { FetchOptions } options - Options for fetching the burst photos.
4885     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result.
4886     * @throws { BusinessError } 201 - Permission denied
4887     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4888     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4889     * @throws { BusinessError } 14000011 - Internal system error
4890     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4891     * @since 12
4892     */
4893    /**
4894     * Fetch a group of burst assets
4895     *
4896     * @permission ohos.permission.READ_IMAGEVIDEO
4897     * @param { string } burstKey - UUID of a set of burst photos (BURST_KEY of PhotoKeys). The value is a string of 36 characters.
4898     * @param { FetchOptions } options - Options for fetching the burst photos.
4899     * @returns { Promise<FetchResult<PhotoAsset>> } Returns the fetch result.
4900     * @throws { BusinessError } 201 - Permission denied
4901     * @throws { BusinessError } 14000011 - Internal system error
4902     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4903     * @atomicservice
4904     * @since arkts {'1.1':'20','1.2':'20'}
4905     * @arkts 1.1&1.2
4906     */
4907    getBurstAssets(burstKey: string, options: FetchOptions): Promise<FetchResult<PhotoAsset>>;
4908    /**
4909     * Creates an image or video asset with the specified file name. This API uses an asynchronous callback to return the result.
4910     *
4911     * @permission ohos.permission.WRITE_IMAGEVIDEO
4912     * @param { string } displayName - File name of the image or video to create.
4913     * @param { AsyncCallback<PhotoAsset> } callback - File name of the image or video to create.
4914     * @throws { BusinessError } 202 - Called by non-system application.
4915     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4916     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4917     * @throws { BusinessError } 13900012 - Permission denied
4918     * @throws { BusinessError } 13900020 - Invalid argument
4919     * @throws { BusinessError } 14000001 - Invalid display name
4920     * @throws { BusinessError } 14000011 - System inner fail
4921     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4922     * @systemapi
4923     * @since arkts {'1.1':'10','1.2':'20'}
4924     * @arkts 1.1&1.2
4925     */
4926    createAsset(displayName: string, callback: AsyncCallback<PhotoAsset>): void;
4927    /**
4928     * Creates an image or video asset with the specified file name. This API uses a promise to return the result.
4929     *
4930     * @permission ohos.permission.WRITE_IMAGEVIDEO
4931     * @param { string } displayName - File name of the image or video to create.
4932     * @returns { Promise<PhotoAsset> } Returns the newly created asset
4933     * @throws { BusinessError } 202 - Called by non-system application.
4934     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4935     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4936     * @throws { BusinessError } 13900012 - Permission denied
4937     * @throws { BusinessError } 13900020 - Invalid argument
4938     * @throws { BusinessError } 14000001 - Invalid display name
4939     * @throws { BusinessError } 14000011 - System inner fail
4940     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4941     * @systemapi
4942     * @since arkts {'1.1':'10','1.2':'20'}
4943     * @arkts 1.1&1.2
4944     */
4945    createAsset(displayName: string): Promise<PhotoAsset>;
4946    /**
4947     * Creates an image or video asset with the specified file name and options. This API uses a promise to return the result.
4948     *
4949     * @permission ohos.permission.WRITE_IMAGEVIDEO
4950     * @param { string } displayName - File name of the image or video to create.
4951     * @param { PhotoCreateOptions } options - Options for creating an image or video asset.
4952     * @returns { Promise<PhotoAsset> } Returns the newly created asset
4953     * @throws { BusinessError } 202 - Called by non-system application.
4954     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4955     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4956     * @throws { BusinessError } 13900012 - Permission denied
4957     * @throws { BusinessError } 13900020 - Invalid argument
4958     * @throws { BusinessError } 14000001 - Invalid display name
4959     * @throws { BusinessError } 14000011 - System inner fail
4960     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4961     * @systemapi
4962     * @since arkts {'1.1':'10','1.2':'20'}
4963     * @arkts 1.1&1.2
4964     */
4965    createAsset(displayName: string, options: PhotoCreateOptions): Promise<PhotoAsset>;
4966    /**
4967     * Creates an image or video asset with the specified file name and options.
4968     * This API uses an asynchronous callback to return the result.
4969     *
4970     * @permission ohos.permission.WRITE_IMAGEVIDEO
4971     * @param { string } displayName - File name of the image or video to create.
4972     * @param { PhotoCreateOptions } options - Options for creating an image or video asset.
4973     * @param { AsyncCallback<PhotoAsset> } callback - Callback used to return the image or video created.
4974     * @throws { BusinessError } 202 - Called by non-system application.
4975     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4976     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4977     * @throws { BusinessError } 13900012 - Permission denied
4978     * @throws { BusinessError } 13900020 - Invalid argument
4979     * @throws { BusinessError } 14000001 - Invalid display name
4980     * @throws { BusinessError } 14000011 - System inner fail
4981     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
4982     * @systemapi
4983     * @since arkts {'1.1':'10','1.2':'20'}
4984     * @arkts 1.1&1.2
4985     */
4986    createAsset(displayName: string, options: PhotoCreateOptions, callback: AsyncCallback<PhotoAsset>): void;
4987    /**
4988     * Creates an image or video asset with the specified file type, file name extension, and options.
4989     * This API uses an asynchronous callback to return the result.
4990     *
4991     * @permission ohos.permission.WRITE_IMAGEVIDEO
4992     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
4993     * @param { string } extension - File name extension, for example, 'jpg'.
4994     * @param { CreateOptions } options - Options for creating the image or video asset, for example, {title: 'testPhoto'}.
4995     * @param { AsyncCallback<string> } callback - Callback used to return the URI of the created image or video asset.
4996     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4997     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
4998     * @throws { BusinessError } 13900012 - Permission denied
4999     * @throws { BusinessError } 13900020 - Invalid argument
5000     * @throws { BusinessError } 14000011 - System inner fail
5001     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5002     * @since 10
5003     */
5004    /**
5005     * Creates an image or video asset with the specified file type, file name extension, and options.
5006     * This API uses an asynchronous callback to return the result.
5007     *
5008     * @permission ohos.permission.WRITE_IMAGEVIDEO
5009     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
5010     * @param { string } extension - File name extension, for example, 'jpg'.
5011     * @param { CreateOptions } options - Options for creating the image or video asset, for example, {title: 'testPhoto'}.
5012     * @param { AsyncCallback<string> } callback - Callback used to return the URI of the created image or video asset.
5013     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5014     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5015     * @throws { BusinessError } 201 - Permission denied
5016     * @throws { BusinessError } 13900020 - Invalid argument
5017     * @throws { BusinessError } 14000011 - System inner fail
5018     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5019     * @atomicservice
5020     * @since arkts {'1.1':'11','1.2':'20'}
5021     * @arkts 1.1&1.2
5022     */
5023    createAsset(photoType: PhotoType, extension: string, options: CreateOptions, callback: AsyncCallback<string>): void;
5024    /**
5025     * Creates an image or video asset with the specified file type and file name extension.
5026     * This API uses an asynchronous callback to return the result.
5027     *
5028     * @permission ohos.permission.WRITE_IMAGEVIDEO
5029     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
5030     * @param { string } extension - File name extension, for example, 'jpg'.
5031     * @param { AsyncCallback<string> } callback - Callback used to return the URI of the created image or video asset.
5032     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5033     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5034     * @throws { BusinessError } 13900012 - Permission denied
5035     * @throws { BusinessError } 13900020 - Invalid argument
5036     * @throws { BusinessError } 14000011 - System inner fail
5037     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5038     * @since 10
5039     */
5040    /**
5041     * Creates an image or video asset with the specified file type and file name extension.
5042     * This API uses an asynchronous callback to return the result.
5043     *
5044     * @permission ohos.permission.WRITE_IMAGEVIDEO
5045     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
5046     * @param { string } extension - File name extension, for example, 'jpg'.
5047     * @param { AsyncCallback<string> } callback - Callback used to return the URI of the created image or video asset.
5048     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5049     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5050     * @throws { BusinessError } 201 - Permission denied
5051     * @throws { BusinessError } 13900020 - Invalid argument
5052     * @throws { BusinessError } 14000011 - System inner fail
5053     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5054     * @atomicservice
5055     * @since arkts {'1.1':'11','1.2':'20'}
5056     * @arkts 1.1&1.2
5057     */
5058    createAsset(photoType: PhotoType, extension: string, callback: AsyncCallback<string>): void;
5059    /**
5060     * Creates an image or video asset with the specified file type, file name extension, and options.
5061     * This API uses a promise to return the result.
5062     *
5063     * @permission ohos.permission.WRITE_IMAGEVIDEO
5064     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
5065     * @param { string } extension - File name extension, for example, 'jpg'.
5066     * @param { CreateOptions } [options] - Options for creating the image or video asset, for example, {title: 'testPhoto'}.
5067     * @returns { Promise<string> } Returns the uri of the newly created asset
5068     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5069     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5070     * @throws { BusinessError } 13900012 - Permission denied
5071     * @throws { BusinessError } 13900020 - Invalid argument
5072     * @throws { BusinessError } 14000011 - System inner fail
5073     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5074     * @since 10
5075     */
5076    /**
5077     * Creates an image or video asset with the specified file type, file name extension, and options.
5078     * This API uses a promise to return the result.
5079     *
5080     * @permission ohos.permission.WRITE_IMAGEVIDEO
5081     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
5082     * @param { string } extension - File name extension, for example, 'jpg'.
5083     * @param { CreateOptions } [options] - Options for creating the image or video asset, for example, {title: 'testPhoto'}.
5084     * @returns { Promise<string> } Returns the uri of the newly created asset
5085     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5086     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5087     * @throws { BusinessError } 201 - Permission denied
5088     * @throws { BusinessError } 13900020 - Invalid argument
5089     * @throws { BusinessError } 14000011 - System inner fail
5090     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5091     * @atomicservice
5092     * @since arkts {'1.1':'11','1.2':'20'}
5093     * @arkts 1.1&1.2
5094     */
5095    createAsset(photoType: PhotoType, extension: string, options?: CreateOptions): Promise<string>;
5096    /**
5097     * Creates an album. This API uses an asynchronous callback to return the result.
5098     *
5099     * @permission ohos.permission.WRITE_IMAGEVIDEO
5100     * @param { string } name - Name of the album to create.
5101     * @param { AsyncCallback<Album> } callback - Callback used to return the created album instance.
5102     * @throws { BusinessError } 202 - Called by non-system application.
5103     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5104     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5105     * @throws { BusinessError } 13900012 - Permission denied
5106     * @throws { BusinessError } 13900015 - The file name already exists.
5107     * @throws { BusinessError } 13900020 - Invalid argument
5108     * @throws { BusinessError } 14000011 - System inner fail
5109     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5110     * @systemapi
5111     * @since 10
5112     * @deprecated since 11
5113     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#createAlbumRequest
5114     */
5115    createAlbum(name: string, callback: AsyncCallback<Album>): void;
5116    /**
5117     * Creates an album. This API uses a promise to return the result.
5118     *
5119     * @permission ohos.permission.WRITE_IMAGEVIDEO
5120     * @param { string } name - Name of the album to create.
5121     * @returns { Promise<Album> } Returns the instance of newly created Album
5122     * @throws { BusinessError } 202 - Called by non-system application.
5123     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5124     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5125     * @throws { BusinessError } 13900012 - Permission denied
5126     * @throws { BusinessError } 13900015 - The file name already exists.
5127     * @throws { BusinessError } 13900020 - Invalid argument
5128     * @throws { BusinessError } 14000011 - System inner fail
5129     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5130     * @systemapi
5131     * @since 10
5132     * @deprecated since 11
5133     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#createAlbumRequest
5134     */
5135    createAlbum(name: string): Promise<Album>;
5136    /**
5137     * Deletes albums. This API uses an asynchronous callback to return the result.
5138     * Ensure that the albums to be deleted exist. Only user albums can be deleted.
5139     *
5140     * @permission ohos.permission.WRITE_IMAGEVIDEO
5141     * @param { Array<Album> } albums - Albums to delete.
5142     * @param { AsyncCallback<void> } callback - Callback that returns no value.
5143     * @throws { BusinessError } 202 - Called by non-system application.
5144     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5145     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5146     * @throws { BusinessError } 13900012 - Permission denied
5147     * @throws { BusinessError } 13900020 - Invalid argument
5148     * @throws { BusinessError } 14000011 - System inner fail
5149     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5150     * @systemapi
5151     * @since 10
5152     * @deprecated since 11
5153     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#deleteAlbums
5154     */
5155    deleteAlbums(albums: Array<Album>, callback: AsyncCallback<void>): void;
5156    /**
5157     * Deletes albums. This API uses a promise to return the result.
5158     * Ensure that the albums to be deleted exist. Only user albums can be deleted.
5159     *
5160     * @permission ohos.permission.WRITE_IMAGEVIDEO
5161     * @param { Array<Album> } albums - Albums to delete.
5162     * @returns { Promise<void> } Returns void
5163     * @throws { BusinessError } 202 - Called by non-system application.
5164     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5165     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5166     * @throws { BusinessError } 13900012 - Permission denied
5167     * @throws { BusinessError } 13900020 - Invalid argument
5168     * @throws { BusinessError } 14000011 - System inner fail
5169     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5170     * @systemapi
5171     * @since 10
5172     * @deprecated since 11
5173     * @useinstead photoAccessHelper.MediaAlbumChangeRequest#deleteAlbums
5174     */
5175    deleteAlbums(albums: Array<Album>): Promise<void>;
5176    /**
5177     * Obtains albums based on the specified options and album type. This API uses an asynchronous callback to return the result.
5178     * Before the operation, ensure that the albums to obtain exist.
5179     *
5180     * @permission ohos.permission.READ_IMAGEVIDEO
5181     * @param { AlbumType } type - Type of the album.
5182     * @param { AlbumSubtype } subtype - Subtype of the album.
5183     * @param { FetchOptions } options - Options for fetching the albums.
5184     * @param { AsyncCallback<FetchResult<Album>> } callback - Callback used to return the result.
5185     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5186     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5187     * @throws { BusinessError } 13900012 - Permission denied
5188     * @throws { BusinessError } 13900020 - Invalid argument
5189     * @throws { BusinessError } 14000011 - System inner fail
5190     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5191     * @since 10
5192     */
5193    /**
5194     * Obtains albums based on the specified options and album type. This API uses an asynchronous callback to return the result.
5195     * Before the operation, ensure that the albums to obtain exist.
5196     *
5197     * @permission ohos.permission.READ_IMAGEVIDEO
5198     * @param { AlbumType } type - Type of the album.
5199     * @param { AlbumSubtype } subtype - Subtype of the album.
5200     * @param { FetchOptions } options - Options for fetching the albums.
5201     * @param { AsyncCallback<FetchResult<Album>> } callback - Callback used to return the result.
5202     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5203     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5204     * @throws { BusinessError } 201 - Permission denied
5205     * @throws { BusinessError } 13900020 - Invalid argument
5206     * @throws { BusinessError } 14000011 - System inner fail
5207     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5208     * @crossplatform
5209     * @since arkts {'1.1':'12','1.2':'20'}
5210     * @arkts 1.1&1.2
5211     */
5212    getAlbums(
5213      type: AlbumType,
5214      subtype: AlbumSubtype,
5215      options: FetchOptions,
5216      callback: AsyncCallback<FetchResult<Album>>
5217    ): void;
5218    /**
5219     * Obtains albums by type. This API uses an asynchronous callback to return the result.
5220     * Before the operation, ensure that the albums to obtain exist.
5221     *
5222     * @permission ohos.permission.READ_IMAGEVIDEO
5223     * @param { AlbumType } type - Type of the album.
5224     * @param { AlbumSubtype } subtype - Subtype of the album.
5225     * @param { AsyncCallback<FetchResult<Album>> } callback - Callback used to return the result.
5226     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5227     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5228     * @throws { BusinessError } 13900012 - Permission denied
5229     * @throws { BusinessError } 13900020 - Invalid argument
5230     * @throws { BusinessError } 14000011 - System inner fail
5231     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5232     * @since 10
5233     */
5234    /**
5235     * Obtains albums by type. This API uses an asynchronous callback to return the result.
5236     * Before the operation, ensure that the albums to obtain exist.
5237     *
5238     * @permission ohos.permission.READ_IMAGEVIDEO
5239     * @param { AlbumType } type - Type of the album.
5240     * @param { AlbumSubtype } subtype - Subtype of the album.
5241     * @param { AsyncCallback<FetchResult<Album>> } callback - Callback used to return the result.
5242     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5243     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5244     * @throws { BusinessError } 201 - Permission denied
5245     * @throws { BusinessError } 13900020 - Invalid argument
5246     * @throws { BusinessError } 14000011 - System inner fail
5247     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5248     * @crossplatform
5249     * @since arkts {'1.1':'12','1.2':'20'}
5250     * @arkts 1.1&1.2
5251     */
5252    getAlbums(type: AlbumType, subtype: AlbumSubtype, callback: AsyncCallback<FetchResult<Album>>): void;
5253    /**
5254     * Obtains albums based on the specified options and album type. This API uses a promise to return the result.
5255     * Before the operation, ensure that the albums to obtain exist.
5256     *
5257     * @permission ohos.permission.READ_IMAGEVIDEO
5258     * @param { AlbumType } type - Type of the album.
5259     * @param { AlbumSubtype } subtype - Subtype of the album.
5260     * @param { FetchOptions } [options] - Options for fetching the albums.
5261     * @returns { Promise<FetchResult<Album>> } - Returns the fetch result
5262     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5263     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5264     * @throws { BusinessError } 13900012 - Permission denied
5265     * @throws { BusinessError } 13900020 - Invalid argument
5266     * @throws { BusinessError } 14000011 - System inner fail
5267     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5268     * @since 10
5269     */
5270    /**
5271     * Obtains albums based on the specified options and album type. This API uses a promise to return the result.
5272     * Before the operation, ensure that the albums to obtain exist.
5273     *
5274     * @permission ohos.permission.READ_IMAGEVIDEO
5275     * @param { AlbumType } type - Type of the album.
5276     * @param { AlbumSubtype } subtype - Album subtype.
5277     * @param { FetchOptions } [options] - Options for fetching the albums.
5278     * @returns { Promise<FetchResult<Album>> } - Returns the fetch result
5279     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5280     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5281     * @throws { BusinessError } 201 - Permission denied
5282     * @throws { BusinessError } 13900020 - Invalid argument
5283     * @throws { BusinessError } 14000011 - System inner fail
5284     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5285     * @crossplatform
5286     * @since arkts {'1.1':'12','1.2':'20'}
5287     * @arkts 1.1&1.2
5288     */
5289    getAlbums(type: AlbumType, subtype: AlbumSubtype, options?: FetchOptions): Promise<FetchResult<Album>>;
5290    /**
5291     * Obtains hidden albums based on the specified display mode and retrieval options.
5292     * This API uses an asynchronous callback to return the result.
5293     *
5294     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
5295     * @param { HiddenPhotosDisplayMode } mode - Display mode of albums containing hidden assets.
5296     * @param { FetchOptions } options - Options to fetch albums.
5297     * @param { AsyncCallback<FetchResult<Album>> } callback - Returns fetchResult of albums containing hidden assets.
5298     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5299     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5300     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5301     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5302     * @throws { BusinessError } 14000011 - System inner fail.
5303     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5304     * @systemapi
5305     * @since arkts {'1.1':'11','1.2':'20'}
5306     * @arkts 1.1&1.2
5307     */
5308    getHiddenAlbums(mode: HiddenPhotosDisplayMode, options: FetchOptions, callback: AsyncCallback<FetchResult<Album>>): void;
5309    /**
5310     * Obtains hidden albums based on the specified display mode. This API uses an asynchronous callback to return the result.
5311     *
5312     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
5313     * @param { HiddenPhotosDisplayMode } mode - Display mode of hidden albums.
5314     * @param { AsyncCallback<FetchResult<Album>> } callback - Callback used to return the result.
5315     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5316     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5317     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5318     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5319     * @throws { BusinessError } 14000011 - System inner fail.
5320     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5321     * @systemapi
5322     * @since arkts {'1.1':'11','1.2':'20'}
5323     * @arkts 1.1&1.2
5324     */
5325    getHiddenAlbums(mode: HiddenPhotosDisplayMode, callback: AsyncCallback<FetchResult<Album>>): void;
5326    /**
5327     * Obtains hidden albums based on the specified display mode and retrieval options. This API uses a promise to return the result.
5328     *
5329     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
5330     * @param { HiddenPhotosDisplayMode } mode - Display mode of hidden albums.
5331     * @param { FetchOptions } [options] - Options for retrieving the files.
5332     * @returns { Promise<FetchResult<Album>> } Returns fetchResult of albums containing hidden assets.
5333     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5334     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5335     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5336     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5337     * @throws { BusinessError } 14000011 - System inner fail.
5338     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5339     * @systemapi
5340     * @since arkts {'1.1':'11','1.2':'20'}
5341     * @arkts 1.1&1.2
5342     */
5343    getHiddenAlbums(mode: HiddenPhotosDisplayMode, options?: FetchOptions): Promise<FetchResult<Album>>;
5344    /**
5345     * Deletes media assets. This API uses an asynchronous callback to return the result. The deleted assets are moved to the trash.
5346     *
5347     * @permission ohos.permission.WRITE_IMAGEVIDEO
5348     * @param { Array<string> } uriList - URIs of the media files to delete.
5349     * @param { AsyncCallback<void> } callback - Callback that returns no value.
5350     * @throws { BusinessError } 202 - Called by non-system application.
5351     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5352     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5353     * @throws { BusinessError } 13900012 - Permission denied
5354     * @throws { BusinessError } 13900020 - Invalid argument
5355     * @throws { BusinessError } 14000002 - The uri format is incorrect or does not exist.
5356     * @throws { BusinessError } 14000011 - System inner fail
5357     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5358     * @systemapi
5359     * @since 10
5360     * @deprecated since 11
5361     * @useinstead photoAccessHelper.MediaAssetChangeRequest#deleteAssets
5362     */
5363    deleteAssets(uriList: Array<string>, callback: AsyncCallback<void>): void;
5364    /**
5365     * Deletes media assets. This API uses a promise to return the result. The deleted assets are moved to the trash.
5366     *
5367     * @permission ohos.permission.WRITE_IMAGEVIDEO
5368     * @param { Array<string> } uriList - URIs of the media files to delete.
5369     * @returns { Promise<void> } - Returns void
5370     * @throws { BusinessError } 202 - Called by non-system application.
5371     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5372     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5373     * @throws { BusinessError } 13900012 - Permission denied
5374     * @throws { BusinessError } 13900020 - Invalid argument
5375     * @throws { BusinessError } 14000002 - The uri format is incorrect or does not exist.
5376     * @throws { BusinessError } 14000011 - System inner fail
5377     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5378     * @systemapi
5379     * @since 10
5380     * @deprecated since 11
5381     * @useinstead photoAccessHelper.MediaAssetChangeRequest#deleteAssets
5382     */
5383    deleteAssets(uriList: Array<string>): Promise<void>;
5384    /**
5385     * Registers listening for the specified URI. This API uses a callback to return the result.
5386     *
5387     * @param { string } uri - URI of the photo asset, URI of the album, or DefaultChangeUri.
5388     * @param { boolean } forChildUris - Whether to perform fuzzy listening.
5389     * If uri is the URI of an album, the value true means to listen for the changes of the files in the album;
5390     * the value false means to listen for the changes of the album only.
5391     * If uri is the URI of a photoAsset, there is no difference between true and false for forChildUris.
5392     * If uri is DefaultChangeUri, forChildUris must be set to true. If forChildUris is false,
5393     * the URI cannot be found and no message can be received.
5394     * @param { Callback<ChangeData> } callback - Callback used to return the ChangeData.
5395     * Multiple callback listeners can be registered for a URI.
5396     * You can use unRegisterChange to unregister all listeners for the URI or a specified callback listener.
5397     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5398     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5399     * @throws { BusinessError } 13900012 - Permission denied
5400     * @throws { BusinessError } 13900020 - Invalid argument
5401     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5402     * @since arkts {'1.1':'10','1.2':'20'}
5403     * @arkts 1.1&1.2
5404     */
5405    registerChange(uri: string, forChildUris: boolean, callback: Callback<ChangeData>): void;
5406    /**
5407     * Get analysis progress of the asset.
5408     *
5409     * @permission ohos.permission.READ_IMAGEVIDEO
5410     * @param { AnalysisType } analysisType - Analysis type
5411     * @returns { Promise<string> } Returns analysis progress info into a json string
5412     * @throws { BusinessError } 201 - Permission denied
5413     * @throws { BusinessError } 202 - Called by non-system application
5414     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5415     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5416     * @throws { BusinessError } 14000011 - Internal system error
5417     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5418     * @systemapi
5419     * @since 12
5420     */
5421     getDataAnalysisProgress(analysisType: AnalysisType): Promise<string>;
5422    /**
5423     * Unregisters listening for the specified URI. Multiple callbacks can be registered for a URI for listening.
5424     * You can use this API to unregister the listening of the specified callbacks or all callbacks.
5425     *
5426     * @param { string } uri - URI of the photo asset, URI of the album, or DefaultChangeUri.
5427     * @param { Callback<ChangeData> } [callback] - The callback function to unregister.
5428     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5429     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5430     * @throws { BusinessError } 13900012 - Permission denied
5431     * @throws { BusinessError } 13900020 - Invalid argument
5432     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5433     * @since arkts {'1.1':'10','1.2':'20'}
5434     * @arkts 1.1&1.2
5435     */
5436    unRegisterChange(uri: string, callback?: Callback<ChangeData>): void;
5437    /**
5438     * Creates a dialog box for deleting media files. This API uses an asynchronous callback to return the result.
5439     * The deleted media files are moved to the trash.
5440     *
5441     * @permission ohos.permission.WRITE_IMAGEVIDEO
5442     * @param { Array<string> } uriList - URIs of the media files to delete. A maximum of 300 media files can be deleted.
5443     * @param { AsyncCallback<void> } callback - Callback that returns no value.
5444     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5445     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5446     * @throws { BusinessError } 13900012 - Permission denied
5447     * @throws { BusinessError } 13900020 - Invalid argument
5448     * @throws { BusinessError } 14000011 - System inner fail
5449     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5450     * @since 10
5451     * @deprecated since 11
5452     * @useinstead photoAccessHelper.MediaAssetChangeRequest#deleteAssets
5453     */
5454    createDeleteRequest(uriList: Array<string>, callback: AsyncCallback<void>): void;
5455    /**
5456     * Creates a dialog box for deleting media files. This API uses a promise to return the result.
5457     * The deleted media files are moved to the trash.
5458     *
5459     * @permission ohos.permission.WRITE_IMAGEVIDEO
5460     * @param { Array<string> } uriList - URIs of the media files to delete. A maximum of 300 media files can be deleted.
5461     * @returns { Promise<void> } - Returns void
5462     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5463     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5464     * @throws { BusinessError } 13900012 - Permission denied
5465     * @throws { BusinessError } 13900020 - Invalid argument
5466     * @throws { BusinessError } 14000011 - System inner fail
5467     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5468     * @since 10
5469     * @deprecated since 11
5470     * @useinstead photoAccessHelper.MediaAssetChangeRequest#deleteAssets
5471     */
5472    createDeleteRequest(uriList: Array<string>): Promise<void>;
5473    /**
5474     * Create a save dialog to save photos
5475     *
5476     * @param { Array<string> } srcFileUris - List of the file uris to be saved
5477     * @param { Array<PhotoCreationConfig> } photoCreationConfigs - List of the photo asset creation configs
5478     * @returns { Promise<Array<string>> } - Returns the media library file uri list to application which has been authorized
5479     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5480     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5481     * @throws { BusinessError } 14000011 - Internal system error
5482     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5483     * @atomicservice
5484     * @since 12
5485     */
5486    showAssetsCreationDialog(srcFileUris: Array<string>, photoCreationConfigs: Array<PhotoCreationConfig>): Promise<Array<string>>;
5487    /**
5488     * Create assets and grant save permission to the app which called the save dialog.
5489     *
5490     * @permission ohos.permission.WRITE_IMAGEVIDEO
5491     * @param { string } bundleName - BundleName of the application which called the save dialog
5492     * @param { string } appName - AppName of the application which called the save dialog
5493     * @param { number } tokenId - TokenId of the application which called the save dialog
5494     * @param { Array<PhotoCreationConfig> } photoCreationConfigs - List of the photo asset creation configs
5495     * @returns { Promise<Array<string>> } - Returns the media library file uri list to application which has been authorized
5496     * @throws { BusinessError } 201 - Permission denied
5497     * @throws { BusinessError } 202 - Called by non-system application
5498     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. The photoCreationConfigs is empty;
5499     * <br>2. Incorrect photoCreationConfigs format.
5500     * @throws { BusinessError } 14000011 - Internal system error
5501     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5502     * @systemapi
5503     * @since arkts {'1.1':'19','1.2':'20'}
5504     * @arkts 1.1&1.2
5505     */
5506    createAssetsForApp(bundleName: string, appName: string, tokenId: number, photoCreationConfigs: Array<PhotoCreationConfig>): Promise<Array<string>>;
5507    /**
5508     * Create asset and grant short term permission to the application.
5509     *
5510     * @permission ohos.permission.SHORT_TERM_WRITE_IMAGEVIDEO
5511     * @param { PhotoCreationConfig } photoCreationConfig - photo asset creation configs
5512     * @returns { Promise<string> } - Returns the media library file uri to application which has been authorized
5513     * @throws { BusinessError } 201 - Permission denied
5514     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5515     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5516     * @throws { BusinessError } 14000011 - Internal system error
5517     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5518     * @since 12
5519     */
5520    createAssetWithShortTermPermission(photoCreationConfig: PhotoCreationConfig): Promise<string>;
5521    /**
5522     * Creates assets with a temporary permission. This API uses a promise to return the result.
5523     *
5524     * @permission ohos.permission.WRITE_IMAGEVIDEO
5525     * @param { string } bundleName - Bundle name of the target application.
5526     * @param { string } appName - Name of the target application.
5527     * @param { string } appId - ID of the target application.
5528     * @param { number } tokenId - Unique identifier for the temporary authorization.
5529     * @param { AuthorizationMode } authorizationMode - Mode of authorization
5530     * @param { Array<PhotoCreationConfig> } photoCreationConfigs - Configuration for creating (saving) the media assets in the media library.
5531     * @returns { Promise<Array<string>> } - Returns the media library file uri list to application which has been authorized
5532     * @throws { BusinessError } 201 - Permission denied
5533     * @throws { BusinessError } 202 - Called by non-system application
5534     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5535     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5536     * @throws { BusinessError } 14000011 - Internal system error
5537     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5538     * @systemapi
5539     * @since arkts {'1.1':'12','1.2':'20'}
5540     * @arkts 1.1&1.2
5541     */
5542    createAssetsForAppWithMode(
5543      bundleName: string,
5544      appName: string,
5545      appId: string,
5546      tokenId: number,
5547      authorizationMode: AuthorizationMode,
5548      photoCreationConfigs: Array<PhotoCreationConfig>
5549    ): Promise<Array<string>>;
5550    /**
5551     * Grants the save permission for URIs. This API uses a promise to return the result.
5552     *
5553     * @param { Array<string> } srcFileUris - URIs of the images or videos to be granted with the permission.
5554     * @returns { Promise<Array<string>> } - Returns the authorized uri list
5555     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5556     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5557     * @throws { BusinessError } 14000011 - Internal system error
5558     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5559     * @atomicservice
5560     * @since 14
5561     */
5562    requestPhotoUrisReadPermission(srcFileUris: Array<string>): Promise<Array<string>>;
5563    /**
5564     * Obtains the index of an image or video in an album. This API uses an asynchronous callback to return the result.
5565     *
5566     * @permission ohos.permission.READ_IMAGEVIDEO
5567     * @param { string } photoUri - URI of the media asset whose index is to be obtained.
5568     * @param { string } albumUri - Album URI, which can be an empty string.
5569     * <br>If it is an empty string, all the media assets in the Gallery are obtained by default.
5570     * @param { FetchOptions } options - Fetch options. Only one search condition or sorting mode must be set in predicates.
5571     * <br> If no value is set or multiple search criteria or sorting modes are set, the API cannot be called successfully.
5572     * @param { AsyncCallback<number> } callback - Callback used to return the index obtained.
5573     * @throws { BusinessError } 202 - Called by non-system application.
5574     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5575     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5576     * @throws { BusinessError } 13900012 - Permission denied
5577     * @throws { BusinessError } 13900020 - Invalid argument
5578     * @throws { BusinessError } 14000011 - System inner fail
5579     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5580     * @systemapi
5581     * @since arkts {'1.1':'10','1.2':'20'}
5582     * @arkts 1.1&1.2
5583     */
5584    getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback<number>): void;
5585    /**
5586     * Obtains the index of an image or video in an album. This API uses a promise to return the result.
5587     *
5588     * @permission ohos.permission.READ_IMAGEVIDEO
5589     * @param { string } photoUri - URI of the media asset whose index is to be obtained.
5590     * @param { string } albumUri - Album URI, which can be an empty string. If it is an empty string, all the media assets in the Gallery are obtained by default.
5591     * @param { FetchOptions } options - Fetch options. Only one search condition or sorting mode must be set in predicates.
5592     * <br>If no value is set or multiple search criteria or sorting modes are set, the API cannot be called successfully.
5593     * @returns { Promise<number> } - Returns the index of the asset in the album
5594     * @throws { BusinessError } 202 - Called by non-system application.
5595     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5596     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5597     * @throws { BusinessError } 13900012 - Permission denied
5598     * @throws { BusinessError } 13900020 - Invalid argument
5599     * @throws { BusinessError } 14000011 - System inner fail
5600     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5601     * @systemapi
5602     * @since arkts {'1.1':'10','1.2':'20'}
5603     * @arkts 1.1&1.2
5604     */
5605    getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise<number>;
5606    /**
5607     * Releases this PhotoAccessHelper instance. This API uses an asynchronous callback to return the result.
5608     * Call this API when the APIs of the PhotoAccessHelper instance are no longer used.
5609     *
5610     * @param { AsyncCallback<void> } callback - Callback used to return the result.
5611     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5612     * <br>2. Incorrect parameter types.
5613     * @throws { BusinessError } 13900020 - Invalid argument
5614     * @throws { BusinessError } 14000011 - System inner fail
5615     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5616     * @since arkts {'1.1':'10','1.2':'20'}
5617     * @arkts 1.1&1.2
5618     */
5619    release(callback: AsyncCallback<void>): void;
5620    /**
5621     * Releases this PhotoAccessHelper instance. This API uses a promise to return the result.
5622     * Call this API when the APIs of the PhotoAccessHelper instance are no longer used.
5623     *
5624     * @returns { Promise<void> } Returns void
5625     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5626     * <br>2. Incorrect parameter types.
5627     * @throws { BusinessError } 13900020 - Invalid argument
5628     * @throws { BusinessError } 14000011 - System inner fail
5629     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5630     * @since arkts {'1.1':'10','1.2':'20'}
5631     * @arkts 1.1&1.2
5632     */
5633    release(): Promise<void>;
5634    /**
5635     * Saves form information
5636     *
5637     * @permission ohos.permission.WRITE_IMAGEVIDEO
5638     * @param { FormInfo } info - Information store with the form.
5639     * @param { AsyncCallback<void> } callback - No value returned.
5640     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5641     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5642     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5643     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5644     * @throws { BusinessError } 14000011 - System inner fail.
5645     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5646     * @systemapi
5647     * @since arkts {'1.1':'11','1.2':'20'}
5648     * @arkts 1.1&1.2
5649     */
5650    saveFormInfo(info: FormInfo, callback: AsyncCallback<void>): void;
5651    /**
5652     * Saves form information
5653     *
5654     * @permission ohos.permission.WRITE_IMAGEVIDEO
5655     * @param { FormInfo } info - Information store with the form.
5656     * @returns { Promise<void> } Return void.
5657     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5658     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5659     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5660     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5661     * @throws { BusinessError } 14000011 - System inner fail.
5662     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5663     * @systemapi
5664     * @since arkts {'1.1':'11','1.2':'20'}
5665     * @arkts 1.1&1.2
5666     */
5667    saveFormInfo(info: FormInfo): Promise<void>;
5668    /**
5669     * Saves gallery form information
5670     *
5671     * @permission ohos.permission.WRITE_IMAGEVIDEO
5672     * @param { GalleryFormInfo } info - Information store with the gallery form.
5673     * @returns { Promise<void> } Return void.
5674     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5675     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5676     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5677     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5678     * @throws { BusinessError } 14000011 - System inner fail.
5679     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5680     * @systemapi
5681     * @since 18
5682     */
5683    saveGalleryFormInfo(info: GalleryFormInfo): Promise<void>;
5684    /**
5685     * Removes form information
5686     *
5687     * @permission ohos.permission.WRITE_IMAGEVIDEO
5688     * @param { FormInfo } info - Information store with the form.
5689     * @param { AsyncCallback<void> } callback - No value returned.
5690     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5691     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5692     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5693     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5694     * @throws { BusinessError } 14000011 - System inner fail.
5695     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5696     * @systemapi
5697     * @since 11
5698     */
5699    removeFormInfo(info: FormInfo, callback: AsyncCallback<void>): void;
5700    /**
5701     * Removes form information
5702     *
5703     * @permission ohos.permission.WRITE_IMAGEVIDEO
5704     * @param { FormInfo } info - Information store with the form.
5705     * @returns { Promise<void> } Return void.
5706     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5707     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5708     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5709     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5710     * @throws { BusinessError } 14000011 - System inner fail.
5711     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5712     * @systemapi
5713     * @since 11
5714     */
5715    removeFormInfo(info: FormInfo): Promise<void>;
5716    /**
5717     * Removes gallery form information
5718     *
5719     * @permission ohos.permission.WRITE_IMAGEVIDEO
5720     * @param { GalleryFormInfo } info - Information store with the gallery form.
5721     * @returns { Promise<void> } Return void.
5722     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5723     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5724     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5725     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5726     * @throws { BusinessError } 14000011 - System inner fail.
5727     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5728     * @systemapi
5729     * @since 18
5730     */
5731    removeGalleryFormInfo(info: GalleryFormInfo): Promise<void>;
5732    /**
5733     * Updates gallery form information
5734     *
5735     * @permission ohos.permission.WRITE_IMAGEVIDEO
5736     * @param { GalleryFormInfo } info - Information store with the gallery form.
5737     * @returns { Promise<void> } Return void.
5738     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
5739     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
5740     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5741     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5742     * @throws { BusinessError } 14000011 - System inner fail.
5743     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5744     * @systemapi
5745     * @since 18
5746     */
5747    updateGalleryFormInfo(info: GalleryFormInfo): Promise<void>;
5748    /**
5749     * Applies media changes. This API uses a promise to return the result.
5750     *
5751     * @permission ohos.permission.WRITE_IMAGEVIDEO
5752     * @param { MediaChangeRequest } mediaChangeRequest - Request for asset changes or album changes.
5753     * @returns { Promise<void> } Returns void
5754     * @throws { BusinessError } 201 - Permission denied
5755     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5756     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5757     * @throws { BusinessError } 14000011 - System inner fail
5758     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5759     * @atomicservice
5760     * @since arkts {'1.1':'11','1.2':'20'}
5761     * @arkts 1.1&1.2
5762     */
5763    applyChanges(mediaChangeRequest: MediaChangeRequest): Promise<void>;
5764    /**
5765     * Get index construction progress.
5766     *
5767     * @permission ohos.permission.READ_IMAGEVIDEO
5768     * @returns { Promise<string> } Returns progress of the photo and video
5769     * @throws { BusinessError } 201 - Permission denied
5770     * @throws { BusinessError } 202 - Called by non-system application
5771     * @throws { BusinessError } 14000011 - Internal system error
5772     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5773     * @systemapi
5774     * @since arkts {'1.1':'12','1.2':'20'}
5775     * @arkts 1.1&1.2
5776     */
5777    getIndexConstructProgress(): Promise<string>;
5778    /**
5779     * Grants an application the permission to access multiple URIs. This API uses a promise to return the result.
5780     *
5781     * @permission ohos.permission.READ_IMAGEVIDEO
5782     * @param { number } tokenId - ID of the target application.
5783     * @param { Array<string> } uriList - A list of URIs, which cannot exceed 1000.
5784     * @param { PhotoPermissionType } photoPermissionType - Type of the permission to be granted. For details, see the enum.
5785     * @param { HideSensitiveType } hideSensitiveType - Type of the information to hide.
5786     * <br>This parameter is reserved. Currently, any enumerated value of HideSensitiveType can be passed in.
5787     * @returns { Promise<number> } Returns result of grant permission
5788     * @throws { BusinessError } 201 - Permission denied
5789     * @throws { BusinessError } 202 - Called by non-system application
5790     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format;
5791     * <br>2. The value of photoPermissionType or hideSensitiveType is out of range.
5792     * @throws { BusinessError } 14000011 - Internal system error
5793     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5794     * @systemapi
5795     * @since 19
5796     */
5797    grantPhotoUrisPermission(tokenId: number, uriList: Array<string>, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise<number>;
5798    /**
5799     * Grants an application the permission to access a URI. This API uses a promise to return the result.
5800     *
5801     * @permission ohos.permission.READ_IMAGEVIDEO
5802     * @param { number } tokenId - ID of the target application.
5803     * @param { string } uri - URI of the media asset.
5804     * @param { PhotoPermissionType } photoPermissionType - Type of the permission to be granted. For details, see the enum.
5805     * @param { HideSensitiveType } hideSensitiveType - Type of the information to hide.
5806     * <br>This parameter is reserved. Currently, any enumerated value of HideSensitiveType can be passed in.
5807     * @returns { Promise<number> } Returns result of grant permission
5808     * @throws { BusinessError } 201 - Permission denied
5809     * @throws { BusinessError } 202 - Called by non-system application
5810     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format;
5811     * <br>2. The value of photoPermissionType or hideSensitiveType is out of range.
5812     * @throws { BusinessError } 14000011 - Internal system error
5813     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5814     * @systemapi
5815     * @since arkts {'1.1':'19','1.2':'20'}
5816     * @arkts 1.1&1.2
5817     */
5818    grantPhotoUriPermission(tokenId: number, uri: string, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise<number>;
5819    /**
5820     * Cancels the permission for accessing an URI from an application. This API uses a promise to return the result.
5821     *
5822     * @permission ohos.permission.READ_IMAGEVIDEO
5823     * @param { number } tokenId - ID of the target application.
5824     * @param { string } uri - URI of the media asset.
5825     * @param { PhotoPermissionType } photoPermissionType - Permission type.
5826     * @returns { Promise<number> } Returns result of cancel permission
5827     * @throws { BusinessError } 201 - Permission denied
5828     * @throws { BusinessError } 202 - Called by non-system application
5829     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format;
5830     * <br>2. The value of photoPermissionType or hideSensitiveType is out of range.
5831     * @throws { BusinessError } 14000011 - Internal system error
5832     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5833     * @systemapi
5834     * @since 19
5835     */
5836    cancelPhotoUriPermission(tokenId: number, uri: string, photoPermissionType: PhotoPermissionType): Promise<number>;
5837    /**
5838     * Provides the capability of thumbnail generation according to specified rules.
5839     *
5840     * @permission ohos.permission.READ_IMAGEVIDEO
5841     * @param { dataSharePredicates.DataSharePredicates } predicate - Rule options for generating thumbnails.
5842     * @param { AsyncCallback<void> } callback - Returns void when the task is completed.
5843     * @returns { number } Create task id for generating thumbnails
5844     * @throws { BusinessError } 201 - Permission denied
5845     * @throws { BusinessError } 202 - Called by non-system application
5846     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5847     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5848     * @throws { BusinessError } 14000011 - Internal system error
5849     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5850     * @systemapi
5851     * @since 13
5852     */
5853    startThumbnailCreationTask(predicate: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<void>): number;
5854    /**
5855     * Provides the capability of stop generating thumbnails.
5856     *
5857     * @permission ohos.permission.READ_IMAGEVIDEO
5858     * @param { number } taskId - Stop generating thumbnail task id.
5859     * @throws { BusinessError } 201 - Permission denied
5860     * @throws { BusinessError } 202 - Called by non-system application
5861     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5862     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5863     * @throws { BusinessError } 14000011 - Internal system error
5864     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5865     * @systemapi
5866     * @since arkts {'1.1':'13','1.2':'20'}
5867     * @arkts 1.1&1.2
5868     */
5869    stopThumbnailCreationTask(taskId: number): void;
5870    /**
5871     * Fetch shared photo assets.
5872     *
5873     * @permission ohos.permission.ACCESS_MEDIALIB_THUMB_DB
5874     * @param { FetchOptions } options - Fetch options.
5875     * @returns { Array<SharedPhotoAsset> } Returns the shared photo assets
5876     * @throws { BusinessError } 201 - Permission denied
5877     * @throws { BusinessError } 202 - Called by non-system application
5878     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5879     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5880     * @throws { BusinessError } 14000011 - Internal system error
5881     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5882     * @systemapi
5883     * @since 13
5884     */
5885    getSharedPhotoAssets(options: FetchOptions): Array<SharedPhotoAsset>;
5886    /**
5887     * Obtains the list of image or video file name extensions supported by the media library.
5888     *
5889     * @param { PhotoType } photoType - Type of the file.
5890     * @returns { Promise<Array<string>> } - Return the list of image or video suffixes supported by the media library
5891     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5892     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5893     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
5894     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5895     * @since 18
5896     */
5897    getSupportedPhotoFormats(photoType: PhotoType): Promise<Array<string>>;
5898    /**
5899     * Starts asset analysis.
5900     *
5901     * @permission ohos.permission.WRITE_IMAGEVIDEO
5902     * @param { AnalysisType } type - Smart analysis type.
5903     * @param { Array<string> } assetUris - Array of asset URIs.
5904     * @returns { Promise<number> } Returns the task id of the service.
5905     * @throws { BusinessError } 201 - Permission denied
5906     * @throws { BusinessError } 202 - Called by non-system application
5907     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5908     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5909     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5910     * @systemapi
5911     * @since 18
5912     */
5913    startAssetAnalysis(type: AnalysisType, assetUris?: Array<string>): Promise<number>;
5914    /**
5915     * Obtains album information by album IDs. This API uses a promise to return the result.
5916     *
5917     * @permission ohos.permission.READ_IMAGEVIDEO
5918     * @param { Array<number> } albumIds - Array of album IDs.
5919     * @returns { Promise<Map<number, Album>> } - Return the map of albums
5920     * @throws { BusinessError } 201 - Permission denied
5921     * @throws { BusinessError } 202 - Called by non-system application
5922     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5923     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5924     * @throws { BusinessError } 14000011 - System inner fail
5925     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5926     * @systemapi
5927     * @since 18
5928     */
5929    getAlbumsByIds(albumIds: Array<number>): Promise<Map<number, Album>>;
5930    /**
5931     * Creates assets for the current application or other applications in the specified source or user album. This API uses a promise to return the result.
5932     *
5933     * @permission ohos.permission.WRITE_IMAGEVIDEO
5934     * @param { PhotoCreationSource } source - Application information provided to create assets on behalf of the application.
5935     * @param { string } albumUri - URI of the album.
5936     * @param { boolean } isAuthorized - Whether to authorize other applications. The value true means that the permission is authorized, and false means the opposite.
5937     * @param { Array<PhotoCreationConfig> } photoCreationConfigs - Configuration for creating (saving) the media assets in the media library.
5938     * @returns { Promise<Array<string>> } - Returns the media library file uri list to application which has been authorized
5939     * @throws { BusinessError } 201 - Permission denied
5940     * @throws { BusinessError } 202 - Called by non-system application
5941     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
5942     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
5943     * @throws { BusinessError } 14000011 - Internal system error
5944     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5945     * @systemapi
5946     * @since 18
5947     */
5948    createAssetsForAppWithAlbum(source: PhotoCreationSource, albumUri: string, isAuthorized: boolean, photoCreationConfigs: Array<PhotoCreationConfig>): Promise<Array<string>>;
5949
5950    /**
5951     * Register the callback of photo changes.
5952     *
5953     * @permission ohos.permission.READ_IMAGEVIDEO
5954     * @param { 'photoChange' } type - The value is fixed at 'photoChange', indicating the photo change event.
5955     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback invoked when the photo is changed.
5956     * @throws { BusinessError } 201 - Permission denied
5957     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
5958     * <br>Possible causes: 1. The type is not fixed at 'photoChange'; 2. The same callback is registered repeatedly.
5959     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
5960     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
5961     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5962     * @since 20
5963     */
5964    on(type: 'photoChange', callback: Callback<PhotoAssetChangeInfos>): void;
5965
5966    /**
5967     * Unregister the callback of photo changes.
5968     *
5969     * @permission ohos.permission.READ_IMAGEVIDEO
5970     * @param { 'photoChange' } type - The value is fixed at 'photoChange', indicating the photo change event.
5971     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback to be removed.
5972     * @throws { BusinessError } 201 - Permission denied
5973     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
5974     * <br>Possible causes: 1. The type is not fixed at 'photoChange'; 2. The same callback is unregistered repeatedly.
5975     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
5976     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
5977     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5978     * @since 20
5979     */
5980    off(type: 'photoChange', callback?: Callback<PhotoAssetChangeInfos>): void;
5981
5982    /**
5983     * Register the callback of hidden photo changes.
5984     *
5985     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
5986     * @param { 'hiddenPhotoChange' } type - The value is fixed at 'hiddenPhotoChange', indicating the hidden photo change event.
5987     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback invoked when the hidden photo is changed.
5988     * @throws { BusinessError } 201 - Permission denied
5989     * @throws { BusinessError } 202 - Called by non-system application
5990     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
5991     * <br>Possible causes: 1. The type is not fixed at 'hiddenPhotoChange'; 2. The same callback is registered repeatedly.
5992     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
5993     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
5994     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
5995     * @systemapi
5996     * @since 20
5997     */
5998    on(type: 'hiddenPhotoChange', callback: Callback<PhotoAssetChangeInfos>): void;
5999
6000    /**
6001     * Unregister the callback of hidden photo changes.
6002     *
6003     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
6004     * @param { 'hiddenPhotoChange' } type - The value is fixed at 'hiddenPhotoChange', indicating the hidden photo change event.
6005     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback to be removed.
6006     * @throws { BusinessError } 201 - Permission denied
6007     * @throws { BusinessError } 202 - Called by non-system application
6008     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6009     * <br>Possible causes: 1. The type is not fixed at 'hiddenPhotoChange'; 2. The same callback is unregistered repeatedly.
6010     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6011     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6012     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6013     * @systemapi
6014     * @since 20
6015     */
6016    off(type: 'hiddenPhotoChange', callback?: Callback<PhotoAssetChangeInfos>): void;
6017
6018    /**
6019     * Register the callback of trashed photo changes.
6020     *
6021     * @permission ohos.permission.READ_IMAGEVIDEO
6022     * @param { 'trashedPhotoChange' } type - The value is fixed at 'trashedPhotoChange', indicating the trashed photo change event.
6023     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback invoked when the trashed photo is changed.
6024     * @throws { BusinessError } 201 - Permission denied
6025     * @throws { BusinessError } 202 - Called by non-system application
6026     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6027     * <br>Possible causes: 1. The type is not fixed at 'trashedPhotoChange'; 2. The same callback is registered repeatedly.
6028     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6029     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6030     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6031     * @systemapi
6032     * @since 20
6033     */
6034    on(type: 'trashedPhotoChange', callback: Callback<PhotoAssetChangeInfos>): void;
6035
6036    /**
6037     * Unregister the callback of trashed photo changes.
6038     *
6039     * @permission ohos.permission.READ_IMAGEVIDEO
6040     * @param { 'trashedPhotoChange' } type - The value is fixed at 'trashedPhotoChange', indicating the trashed photo change event.
6041     * @param { Callback<PhotoAssetChangeInfos> } callback - Callback to be removed.
6042     * @throws { BusinessError } 201 - Permission denied
6043     * @throws { BusinessError } 202 - Called by non-system application
6044     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6045     * <br>Possible causes: 1. The type is not fixed at 'trashedPhotoChange'; 2. The same callback is unregistered repeatedly.
6046     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6047     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6048     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6049     * @systemapi
6050     * @since 20
6051     */
6052    off(type: 'trashedPhotoChange', callback?: Callback<PhotoAssetChangeInfos>): void;
6053
6054    /**
6055     * Register the callback of album changes.
6056     *
6057     * @permission ohos.permission.READ_IMAGEVIDEO
6058     * @param { 'photoAlbumChange' } type - The value is fixed at 'photoAlbumChange', indicating the album change event.
6059     * @param { Callback<AlbumChangeInfos> } callback - Callback invoked when the album is changed.
6060     * @throws { BusinessError } 201 - Permission denied
6061     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6062     * <br>Possible causes: 1. The type is not fixed at 'photoAlbumChange'; 2. The same callback is registered repeatedly.
6063     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6064     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6065     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6066     * @since 20
6067     */
6068    on(type: 'photoAlbumChange', callback: Callback<AlbumChangeInfos>): void;
6069
6070    /**
6071     * Unregister the callback of album changes.
6072     *
6073     * @permission ohos.permission.READ_IMAGEVIDEO
6074     * @param { 'photoAlbumChange' } type - The value is fixed at 'photoAlbumChange', indicating the album change event.
6075     * @param { Callback<AlbumChangeInfos> } callback - Callback to be removed.
6076     * @throws { BusinessError } 201 - Permission denied
6077     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6078     * <br>Possible causes: 1. The type is not fixed at 'photoAlbumChange'; 2. The same callback is unregistered repeatedly.
6079     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6080     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6081     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6082     * @since 20
6083     */
6084    off(type: 'photoAlbumChange', callback?: Callback<AlbumChangeInfos>): void;
6085
6086    /**
6087     * Register the callback of hidden album changes.
6088     *
6089     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
6090     * @param { 'hiddenAlbumChange' } type - The value is fixed at 'hiddenAlbumChange', indicating the hidden album change event.
6091     * @param { Callback<AlbumChangeInfos> } callback - Callback invoked when the hidden album is changed.
6092     * @throws { BusinessError } 201 - Permission denied
6093     * @throws { BusinessError } 202 - Called by non-system application
6094     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6095     * <br>Possible causes: 1. The type is not fixed at 'hiddenAlbumChange'; 2. The same callback is registered repeatedly.
6096     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6097     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6098     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6099     * @systemapi
6100     * @since 20
6101     */
6102    on(type: 'hiddenAlbumChange', callback: Callback<AlbumChangeInfos>): void;
6103
6104    /**
6105     * Unregister the callback of hidden album changes.
6106     *
6107     * @permission ohos.permission.READ_IMAGEVIDEO and ohos.permission.MANAGE_PRIVATE_PHOTOS
6108     * @param { 'hiddenAlbumChange' } type - The value is fixed at 'hiddenAlbumChange', indicating the hidden album change event.
6109     * @param { Callback<AlbumChangeInfos> } callback - Callback to be removed.
6110     * @throws { BusinessError } 201 - Permission denied
6111     * @throws { BusinessError } 202 - Called by non-system application
6112     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6113     * <br>Possible causes: 1. The type is not fixed at 'hiddenAlbumChange'; 2. The same callback is unregistered repeatedly.
6114     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6115     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6116     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6117     * @systemapi
6118     * @since 20
6119     */
6120    off(type: 'hiddenAlbumChange', callback?: Callback<AlbumChangeInfos>): void;
6121
6122    /**
6123     * Register the callback of trashed album changes.
6124     *
6125     * @permission ohos.permission.READ_IMAGEVIDEO
6126     * @param { 'trashedAlbumChange' } type - The value is fixed at 'trashedAlbumChange', indicating the trashed album change event.
6127     * @param { Callback<AlbumChangeInfos> } callback - Callback invoked when the trashed album is changed.
6128     * @throws { BusinessError } 201 - Permission denied
6129     * @throws { BusinessError } 202 - Called by non-system application
6130     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6131     * <br>Possible causes: 1. The type is not fixed at 'trashedAlbumChange'; 2. The same callback is registered repeatedly.
6132     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6133     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6134     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6135     * @systemapi
6136     * @since 20
6137     */
6138    on(type: 'trashedAlbumChange', callback: Callback<AlbumChangeInfos>): void;
6139
6140    /**
6141     * Unregister the callback of trashed album changes.
6142     *
6143     * @permission ohos.permission.READ_IMAGEVIDEO
6144     * @param { 'trashedAlbumChange' } type - The value is fixed at 'trashedAlbumChange', indicating the trashed album change event.
6145     * @param { Callback<AlbumChangeInfos> } callback - Callback to be removed.
6146     * @throws { BusinessError } 201 - Permission denied
6147     * @throws { BusinessError } 202 - Called by non-system application
6148     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6149     * <br>Possible causes: 1. The type is not fixed at 'trashedAlbumChange'; 2. The same callback is unregistered repeatedly.
6150     * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs.
6151     * <br>Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out.
6152     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6153     * @systemapi
6154     * @since 20
6155     */
6156    off(type: 'trashedAlbumChange', callback?: Callback<AlbumChangeInfos>): void;
6157
6158    /**
6159     * Get the PhotoPickerComponent default album name.
6160     *
6161     * @returns { Promise<string> } - Returns the default album name.
6162     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
6163     * <br>Possible causes: 1. The IPC request timed out. 2. system running error
6164     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6165     * @atomicservice
6166     * @since 20
6167     */
6168    getPhotoPickerComponentDefaultAlbumName(): Promise<string>;
6169
6170    /**
6171     * Obtains photo albums based on the specified options. This API uses a promise to return the result.
6172     * Before the operation, ensure that the albums to obtain exist.
6173     *
6174     * @permission ohos.permission.READ_IMAGEVIDEO
6175     * @param { FetchOptions } [options] - Options for fetching the albums.
6176     * @returns { Promise<FetchResult<Album>> } - Return the fetch result
6177     * @throws { BusinessError } 201 - Permission denied
6178     * @throws { BusinessError } 202 - Called by non-system application
6179     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
6180     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
6181     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6182     * @systemapi
6183     * @since 20
6184     */
6185    getPhotoAlbums(options?: FetchOptions): Promise<FetchResult<Album>>;
6186
6187    /**
6188     * Get Order of Photo Albums
6189     *
6190     * @permission ohos.permission.READ_IMAGEVIDEO
6191     * @param { number } orderStyle - Order style for albums.
6192     * @param { FetchOptions } [options] - Options for fetching the albums.
6193     * @returns { Promise<FetchResult<AlbumOrder>> } - Return FetchResult of AlbumOrder.
6194     * @throws { BusinessError } 201 - Permission denied
6195     * @throws { BusinessError } 202 - Called by non-system application
6196     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6197     * <br>Possible causes: 1. The input parameter is not within the valid range.
6198     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
6199     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
6200     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6201     * @systemapi
6202     * @since 20
6203     */
6204    getPhotoAlbumOrder(orderStyle: number, options?: FetchOptions): Promise<FetchResult<AlbumOrder>>;
6205
6206    /**
6207     * Set Order of Photo Albums
6208     *
6209     * @permission ohos.permission.WRITE_IMAGEVIDEO
6210     * @param { number } orderStyle - Order style for albums.
6211     * @param { Array<AlbumOrder> } albumOrders - Array AlbumOrder of the content.
6212     * @returns { Promise<void> } - Return void
6213     * @throws { BusinessError } 201 - Permission denied.
6214     * @throws { BusinessError } 202 - Called by non-system application.
6215     * @throws { BusinessError } 23800151 - The scenario parameter verification fails.
6216     * <br>Possible causes: 1. The input parameter is not within the valid range.
6217     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
6218     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
6219     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6220     * @systemapi
6221     * @since 20
6222     */
6223    setPhotoAlbumOrder(orderStyle: number, albumOrders: Array<AlbumOrder>): Promise<void>;
6224
6225    /**
6226     * Get recent photo or video info by options
6227     *
6228     * @param { RecentPhotoOptions } [options] - options for recent photo
6229     * @returns { Promise<RecentPhotoInfo> } - Returns the recent photo info
6230     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6231     * @atomicservice
6232     * @since 20
6233     */
6234    getRecentPhotoInfo(options?: RecentPhotoOptions): Promise<RecentPhotoInfo>;
6235  }
6236
6237  /**
6238   * RecentPhotoOptions Object
6239   *
6240   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6241   * @atomicservice
6242   * @since 20
6243   */
6244  export class RecentPhotoOptions {
6245    /**
6246     * Support set period time
6247     *
6248     * @type { ?number }
6249     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6250     * @atomicservice
6251     * @since 20
6252     */
6253    period?: number;
6254
6255    /**
6256     * The type of the file in the recent photo window.
6257     *
6258     * @type { ?photoAccessHelper.PhotoViewMIMETypes }
6259     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6260     * @atomicservice
6261     * @since 20
6262     */
6263    MIMEType?: photoAccessHelper.PhotoViewMIMETypes;
6264
6265    /**
6266     * PhotoSource
6267     *
6268     * @type { ?PhotoSource }
6269     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6270     * @atomicservice
6271     * @since 20
6272     */
6273    photoSource?: PhotoSource;
6274  }
6275
6276  /**
6277   * Recent photo info
6278   *
6279   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6280   * @atomicservice
6281   * @since 20
6282   */
6283  export class RecentPhotoInfo {
6284    /**
6285     * The dateTaken of photos or videos
6286     *
6287     * @type { ?number }
6288     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6289     * @atomicservice
6290     * @since 20
6291     */
6292    dateTaken?: number;
6293
6294    /**
6295     * The identifier of photos or videos
6296     *
6297     * @type { ?string }
6298     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6299     * @atomicservice
6300     * @since 20
6301     */
6302    identifier?: string;
6303  }
6304
6305  /**
6306   * Enumeration of PhotoSource type
6307   *
6308   * @enum { number } PhotoSource
6309   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6310   * @atomicservice
6311   * @since 20
6312   */
6313  export enum PhotoSource {
6314    /**
6315     * all resource
6316     *
6317     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6318     * @atomicservice
6319     * @since 20
6320     */
6321    ALL = 0,
6322
6323    /**
6324     * camera resource
6325     *
6326     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6327     * @atomicservice
6328     * @since 20
6329     */
6330    CAMERA = 1,
6331
6332    /**
6333     * screenshot resource
6334     *
6335     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6336     * @atomicservice
6337     * @since 20
6338     */
6339    SCREENSHOT = 2
6340  }
6341
6342  /**
6343   * Enumeration status of thumbnail change.
6344   *
6345   * @enum { number } ThumbnailChangeStatus
6346   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6347   * @systemapi
6348   * @since 20
6349   */
6350  enum ThumbnailChangeStatus {
6351    /**
6352     * Thumbnail not exists.
6353     *
6354     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6355     * @systemapi
6356     * @since 20
6357     */
6358    THUMBNAIL_NOT_EXISTS = 0,
6359
6360    /**
6361     * Thumbnail have been newly created.
6362     *
6363     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6364     * @systemapi
6365     * @since 20
6366     */
6367    THUMBNAIL_ADD = 1,
6368
6369    /**
6370     * Thumbnail have been modified.
6371     *
6372     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6373     * @systemapi
6374     * @since 20
6375     */
6376    THUMBNAIL_UPDATE = 2,
6377
6378    /**
6379     * Thumbnail no change.
6380     *
6381     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6382     * @systemapi
6383     * @since 20
6384     */
6385    THUMBNAIL_NOT_CHANGE = 3
6386  }
6387
6388  /**
6389   * Enumeration of strong association types of photos.
6390   *
6391   * @enum { number } StrongAssociationType
6392   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6393   * @systemapi
6394   * @since 20
6395   */
6396  enum StrongAssociationType {
6397    /**
6398     * Normal photo type.
6399     *
6400     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6401     * @systemapi
6402     * @since 20
6403     */
6404    NORMAL = 0,
6405    /**
6406     * Cloud enhancement photo type.
6407     *
6408     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6409     * @systemapi
6410     * @since 20
6411     */
6412    CLOUD_ENHANCEMENT = 1
6413  }
6414
6415  /**
6416   * Defines the photo asset change infos.
6417   *
6418   * @interface PhotoAssetChangeInfos
6419   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6420   * @since 20
6421   */
6422  interface PhotoAssetChangeInfos {
6423    /**
6424     * Notification type of photo asset.
6425     *
6426     * @type { NotifyChangeType }
6427     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6428     * @since 20
6429     */
6430    type: NotifyChangeType;
6431
6432    /**
6433     * The changed asset datas.
6434     *
6435     * @type { PhotoAssetChangeData[] | null }
6436     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6437     * @since 20
6438     */
6439    assetChangeDatas: PhotoAssetChangeData[] | null;
6440
6441    /**
6442     * Whether the application should recheck the photo asset infos that use to solve abnormal notification scenarios.
6443     *
6444     * @type { boolean }
6445     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6446     * @since 20
6447     */
6448    isForRecheck: boolean;
6449  }
6450
6451  /**
6452   * Defines the photo asset change data.
6453   *
6454   * @interface PhotoAssetChangeData
6455   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6456   * @since 20
6457   */
6458  interface PhotoAssetChangeData {
6459    /**
6460     * The photo asset info before change.
6461     *
6462     * @type { PhotoAssetChangeInfo | null }
6463     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6464     * @since 20
6465     */
6466    assetBeforeChange: PhotoAssetChangeInfo | null;
6467
6468    /**
6469     * The photo asset info after change.
6470     *
6471     * @type { PhotoAssetChangeInfo | null }
6472     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6473     * @since 20
6474     */
6475    assetAfterChange: PhotoAssetChangeInfo | null;
6476
6477    /**
6478     * Whether the photo asset content is changed.
6479     *
6480     * @type { boolean }
6481     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6482     * @since 20
6483     */
6484    isContentChanged: boolean;
6485
6486    /**
6487     * Whether the photo asset is deleted.
6488     *
6489     * @type { boolean }
6490     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6491     * @since 20
6492     */
6493    isDeleted: boolean;
6494
6495    /**
6496     * Thumbnail change status of The photo asset.
6497     *
6498     * @type { ThumbnailChangeStatus }
6499     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6500     * @systemapi
6501     * @since 20
6502     */
6503    thumbnailChangeStatus: ThumbnailChangeStatus;
6504
6505    /**
6506     * The version of the photo asset info used to determine the order of notification changes.
6507     *
6508     * @type { number }
6509     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6510     * @systemapi
6511     * @since 20
6512     */
6513    version: number;
6514  }
6515
6516  /**
6517   * Defines the photo asset info.
6518   *
6519   * @interface PhotoAssetChangeInfo
6520   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6521   * @since 20
6522   */
6523  interface PhotoAssetChangeInfo {
6524    /**
6525     * The uri of photo asset.
6526     *
6527     * @type { string }
6528     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6529     * @since 20
6530     */
6531    uri: string;
6532
6533    /**
6534     * The media type of photo asset.
6535     *
6536     * @type { PhotoType }
6537     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6538     * @since 20
6539     */
6540    mediaType: PhotoType;
6541
6542    /**
6543     * The album uri of photo asset.
6544     *
6545     * @type { string }
6546     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6547     * @since 20
6548     */
6549    albumUri: string;
6550
6551    /**
6552     * The file id of photo asset.
6553     *
6554     * @type { number }
6555     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6556     * @systemapi
6557     * @since 20
6558     */
6559    fileId: number;
6560
6561    /**
6562     * The date day of photo asset.
6563     *
6564     * @type { string }
6565     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6566     * @systemapi
6567     * @since 20
6568     */
6569    dateDay: string;
6570
6571    /**
6572     * The favorite state of photo asset.
6573     *
6574     * @type { boolean }
6575     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6576     * @systemapi
6577     * @since 20
6578     */
6579    isFavorite: boolean;
6580
6581    /**
6582     * The hidden state of photo asset.
6583     *
6584     * @type { boolean }
6585     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6586     * @systemapi
6587     * @since 20
6588     */
6589    isHidden: boolean;
6590
6591    /**
6592     * The strong association value of photo asset.
6593     *
6594     * @type { StrongAssociationType }
6595     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6596     * @systemapi
6597     * @since 20
6598     */
6599    strongAssociation: StrongAssociationType;
6600
6601    /**
6602     * The visibility of photo asset thumbnail.
6603     *
6604     * @type { ThumbnailVisibility }
6605     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6606     * @systemapi
6607     * @since 20
6608     */
6609    thumbnailVisible: ThumbnailVisibility;
6610
6611    /**
6612     * The trashed time of photo asset in milliseconds.
6613     *
6614     * @type { number }
6615     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6616     * @systemapi
6617     * @since 20
6618     */
6619    dateTrashedMs: number;
6620
6621    /**
6622     * The added time of photo asset in milliseconds.
6623     *
6624     * @type { number }
6625     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6626     * @systemapi
6627     * @since 20
6628     */
6629    dateAddedMs: number;
6630
6631    /**
6632     * The taken time of photo asset in milliseconds.
6633     *
6634     * @type { number }
6635     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6636     * @systemapi
6637     * @since 20
6638     */
6639    dateTakenMs: number;
6640  }
6641
6642  /**
6643   * Defines the album change infos.
6644   *
6645   * @interface AlbumChangeInfos
6646   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6647   * @since 20
6648   */
6649  interface AlbumChangeInfos {
6650    /**
6651     * Notification type of album.
6652     *
6653     * @type { NotifyChangeType }
6654     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6655     * @since 20
6656     */
6657    type: NotifyChangeType;
6658
6659    /**
6660     * The changed album datas.
6661     *
6662     * @type { AlbumChangeData[] | null }
6663     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6664     * @since 20
6665     */
6666    albumChangeDatas: AlbumChangeData[] | null;
6667
6668    /**
6669     * Whether the application should recheck the album infos that use to solve abnormal notification scenarios.
6670     *
6671     * @type { boolean }
6672     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6673     * @since 20
6674     */
6675    isForRecheck: boolean;
6676  }
6677
6678  /**
6679   * Defines the album change data.
6680   *
6681   * @interface AlbumChangeData
6682   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6683   * @since 20
6684   */
6685  interface AlbumChangeData {
6686    /**
6687     * The album info before change.
6688     *
6689     * @type { AlbumChangeInfo | null }
6690     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6691     * @since 20
6692     */
6693    albumBeforeChange: AlbumChangeInfo | null;
6694
6695    /**
6696     * The album info after change.
6697     *
6698     * @type { AlbumChangeInfo | null }
6699     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6700     * @since 20
6701     */
6702    albumAfterChange: AlbumChangeInfo | null;
6703
6704    /**
6705     * The version of the album info used to determine the order of notification changes.
6706     *
6707     * @type { number }
6708     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6709     * @systemapi
6710     * @since 20
6711     */
6712    version: number;
6713  }
6714
6715  /**
6716   * Defines the album info.
6717   *
6718   * @interface AlbumChangeInfo
6719   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6720   * @since 20
6721   */
6722  interface AlbumChangeInfo {
6723    /**
6724     * Type of the album.
6725     *
6726     * @type { AlbumType }
6727     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6728     * @since 20
6729     */
6730    albumType: AlbumType;
6731
6732    /**
6733     * Subtype of the album.
6734     *
6735     * @type { AlbumSubtype }
6736     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6737     * @since 20
6738     */
6739    albumSubtype: AlbumSubtype;
6740
6741    /**
6742     * Name of the album.
6743     *
6744     * @type { string }
6745     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6746     * @since 20
6747     */
6748    albumName: string;
6749
6750    /**
6751     * URI of the album.
6752     *
6753     * @type { string }
6754     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6755     * @since 20
6756     */
6757    albumUri: string;
6758
6759    /**
6760     * Number of images in the album.
6761     *
6762     * @type { number }
6763     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6764     * @since 20
6765     */
6766    imageCount: number;
6767
6768    /**
6769     * Number of videos in the album.
6770     *
6771     * @type { number }
6772     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6773     * @since 20
6774     */
6775    videoCount: number;
6776
6777    /**
6778     * Number of files in the album.
6779     *
6780     * @type { number }
6781     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6782     * @since 20
6783     */
6784    count: number;
6785
6786    /**
6787     * URI of the cover file of the album.
6788     *
6789     * @type { string }
6790     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6791     * @since 20
6792     */
6793    coverUri: string;
6794
6795    /**
6796     * Number of hidden files in the album.
6797     *
6798     * @type { number }
6799     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6800     * @systemapi
6801     * @since 20
6802     */
6803    hiddenCount: number;
6804
6805    /**
6806     * URI of the hidden cover file of the album.
6807     *
6808     * @type { string }
6809     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6810     * @systemapi
6811     * @since 20
6812     */
6813    hiddenCoverUri: string;
6814
6815    /**
6816     * Change state of the cover content.
6817     *
6818     * @type { boolean }
6819     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6820     * @systemapi
6821     * @since 20
6822     */
6823    isCoverChanged: boolean;
6824
6825    /**
6826     * Change state of the hidden cover content in the album.
6827     *
6828     * @type { boolean }
6829     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6830     * @systemapi
6831     * @since 20
6832     */
6833    isHiddenCoverChanged: boolean;
6834
6835    /**
6836     * Change info of the cover file of the album.
6837     *
6838     * @type { ?PhotoAssetChangeInfo }
6839     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6840     * @systemapi
6841     * @since 20
6842     */
6843    coverInfo?: PhotoAssetChangeInfo;
6844
6845    /**
6846     * Change info of the hidden cover file of the album.
6847     *
6848     * @type { ?PhotoAssetChangeInfo }
6849     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6850     * @systemapi
6851     * @since 20
6852     */
6853    hiddenCoverInfo?: PhotoAssetChangeInfo;
6854  }
6855
6856  /**
6857   * Gallery Form information.
6858   *
6859   * @interface GalleryFormInfo
6860   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6861   * @systemapi
6862   * @since 18
6863   */
6864  interface GalleryFormInfo {
6865    /**
6866     * Id of the form.
6867     *
6868     * @type { string }
6869     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6870     * @systemapi
6871     * @since 18
6872     */
6873    formId: string;
6874    /**
6875     * uriList of the photo or album.
6876     *
6877     * @type { ?Array<string> }
6878     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6879     * @systemapi
6880     * @since 18
6881     */
6882    assetUris?: Array<string>;
6883  }
6884
6885  /**
6886   * Defines the Gallery widget information.
6887   *
6888   * @interface FormInfo
6889   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6890   * @systemapi
6891   * @since arkts {'1.1':'11','1.2':'20'}
6892   * @arkts 1.1&1.2
6893   */
6894  interface FormInfo {
6895    /**
6896     * Widget ID, which is provided when a widget is created in Gallery.
6897     *
6898     * @type { string }
6899     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6900     * @systemapi
6901     * @since arkts {'1.1':'11','1.2':'20'}
6902     * @arkts 1.1&1.2
6903     */
6904    formId: string;
6905    /**
6906     * URI of the image bound to the widget. When a widget is created, uri can be empty or the URI of an image.
6907     * When a widget is removed, uri is not verified and can be empty.
6908     *
6909     * @type { string }
6910     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6911     * @systemapi
6912     * @since arkts {'1.1':'11','1.2':'20'}
6913     * @arkts 1.1&1.2
6914     */
6915    uri: string;
6916  }
6917
6918  /**
6919   * Enumeration types of data change.
6920   *
6921   * @enum { number } NotifyType
6922   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6923   * @since arkts {'1.1':'10','1.2':'20'}
6924   * @arkts 1.1&1.2
6925   */
6926  enum NotifyType {
6927    /**
6928     * Data(assets or albums) have been newly created
6929     *
6930     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6931     * @since arkts {'1.1':'10','1.2':'20'}
6932     * @arkts 1.1&1.2
6933     */
6934    NOTIFY_ADD,
6935    /**
6936     * Data(assets or albums) have been modified
6937     *
6938     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6939     * @since arkts {'1.1':'10','1.2':'20'}
6940     * @arkts 1.1&1.2
6941     */
6942    NOTIFY_UPDATE,
6943    /**
6944     * Data(assets or albums) have been removed
6945     *
6946     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6947     * @since arkts {'1.1':'10','1.2':'20'}
6948     * @arkts 1.1&1.2
6949     */
6950    NOTIFY_REMOVE,
6951    /**
6952     * Assets have been added to an album.
6953     *
6954     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6955     * @since arkts {'1.1':'10','1.2':'20'}
6956     * @arkts 1.1&1.2
6957     */
6958    NOTIFY_ALBUM_ADD_ASSET,
6959    /**
6960     * Assets have been removed from an album.
6961     *
6962     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6963     * @since arkts {'1.1':'10','1.2':'20'}
6964     * @arkts 1.1&1.2
6965     */
6966    NOTIFY_ALBUM_REMOVE_ASSET
6967  }
6968
6969  /**
6970   * Enumeration uris for registerChange.
6971   *
6972   * @enum { string } DefaultChangeUri
6973   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6974   * @since arkts {'1.1':'10','1.2':'20'}
6975   * @arkts 1.1&1.2
6976   */
6977  enum DefaultChangeUri {
6978    /**
6979     * Uri for default PhotoAsset, use with forDescendant{true}, will receive all PhotoAsset's change notifications
6980     *
6981     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6982     * @since arkts {'1.1':'10','1.2':'20'}
6983     * @arkts 1.1&1.2
6984     */
6985    DEFAULT_PHOTO_URI = 'file://media/Photo',
6986    /**
6987     * Uri for default Album, use with forDescendant{true}, will receive all Album's change notifications
6988     *
6989     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6990     * @since arkts {'1.1':'10','1.2':'20'}
6991     * @arkts 1.1&1.2
6992     */
6993    DEFAULT_ALBUM_URI = 'file://media/PhotoAlbum',
6994    /**
6995     * Uri for albums in hidden album view.
6996     *
6997     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
6998     * @systemapi
6999     * @since arkts {'1.1':'11','1.2':'20'}
7000     * @arkts 1.1&1.2
7001     */
7002    DEFAULT_HIDDEN_ALBUM_URI = 'file://media/HiddenAlbum'
7003  }
7004
7005  /**
7006   * Defines the change data
7007   *
7008   * @interface ChangeData
7009   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7010   * @since arkts {'1.1':'10','1.2':'20'}
7011   * @arkts 1.1&1.2
7012   */
7013  interface ChangeData {
7014    /**
7015     * The NotifyType of ChangeData
7016     *
7017     * @type { NotifyType }
7018     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7019     * @since arkts {'1.1':'10','1.2':'20'}
7020     * @arkts 1.1&1.2
7021     */
7022    type: NotifyType;
7023    /**
7024     * The changed uris
7025     *
7026     * @type { Array<string> }
7027     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7028     * @since arkts {'1.1':'10','1.2':'20'}
7029     * @arkts 1.1&1.2
7030     */
7031    uris: Array<string>;
7032    /**
7033     * Change details of the asset uris to an album.
7034     *
7035     * @type { Array<string> }
7036     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7037     * @since arkts {'1.1':'10','1.2':'20'}
7038     * @arkts 1.1&1.2
7039     */
7040    extraUris: Array<string>;
7041    /**
7042     * sharedPhotoAssets of the same type
7043     *
7044     * @type { Array<SharedPhotoAsset> }
7045     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7046     * @systemapi
7047     * @since 14
7048     */
7049    sharedPhotoAssets: Array<SharedPhotoAsset>;
7050    /**
7051     * sharedAlbumAssets of the same type
7052     *
7053     * @type { Array<SharedAlbumAsset> }
7054     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7055     * @systemapi
7056     * @since 14
7057     */
7058    sharedAlbumAssets: Array<SharedAlbumAsset>;
7059    /**
7060     * sharedExtraPhotoAssets of the same type
7061     *
7062     * @type { Array<SharedPhotoAsset> }
7063     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7064     * @systemapi
7065     * @since 14
7066     */
7067    sharedExtraPhotoAssets: Array<SharedPhotoAsset>;
7068  }
7069
7070  /**
7071   * PhotoViewMIMETypes represents the type of media resource that photo picker selects.
7072   *
7073   * @enum { string } PhotoViewMIMETypes
7074   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7075   * @since 10
7076   */
7077  /**
7078   * PhotoViewMIMETypes represents the type of media resource that photo picker selects.
7079   *
7080   * @enum { string } PhotoViewMIMETypes
7081   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7082   * @atomicservice
7083   * @since 11
7084   */
7085  /**
7086   * PhotoViewMIMETypes represents the type of media resource that photo picker selects.
7087   *
7088   * @enum { string } PhotoViewMIMETypes
7089   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7090   * @crossplatform
7091   * @atomicservice
7092   * @since arkts {'1.1':'12','1.2':'20'}
7093   * @arkts 1.1&1.2
7094   */
7095  export enum PhotoViewMIMETypes {
7096    /**
7097     * IMAGE_TYPE indicates that the selected media resources are images.
7098     *
7099     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7100     * @since 10
7101     */
7102    /**
7103     * IMAGE_TYPE indicates that the selected media resources are images.
7104     *
7105     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7106     * @atomicservice
7107     * @since 11
7108     */
7109    /**
7110     * IMAGE_TYPE indicates that the selected media resources are images.
7111     *
7112     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7113     * @crossplatform
7114     * @atomicservice
7115     * @since arkts {'1.1':'12','1.2':'20'}
7116     * @arkts 1.1&1.2
7117     */
7118    IMAGE_TYPE = 'image/*',
7119    /**
7120     * VIDEO_TYPE indicates that the selected media resources are videos.
7121     *
7122     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7123     * @since 10
7124     */
7125    /**
7126     * VIDEO_TYPE indicates that the selected media resources are videos.
7127     *
7128     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7129     * @atomicservice
7130     * @since 11
7131     */
7132    /**
7133     * VIDEO_TYPE indicates that the selected media resources are videos.
7134     *
7135     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7136     * @crossplatform
7137     * @atomicservice
7138     * @since arkts {'1.1':'12','1.2':'20'}
7139     * @arkts 1.1&1.2
7140     */
7141    VIDEO_TYPE = 'video/*',
7142    /**
7143     * IMAGE_VIDEO_TYPE indicates that the selected media resources are images and videos.
7144     *
7145     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7146     * @since 10
7147     */
7148    /**
7149     * IMAGE_VIDEO_TYPE indicates that the selected media resources are images and videos.
7150     *
7151     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7152     * @atomicservice
7153     * @since 11
7154     */
7155    /**
7156     * IMAGE_VIDEO_TYPE indicates that the selected media resources are images and videos.
7157     *
7158     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7159     * @crossplatform
7160     * @atomicservice
7161     * @since arkts {'1.1':'12','1.2':'20'}
7162     * @arkts 1.1&1.2
7163     */
7164    IMAGE_VIDEO_TYPE = '*/*',
7165
7166    /**
7167     * MOVING_PHOTO_IMAGE_TYPE indicates that the selected media resources are moving photos.
7168     *
7169     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7170     * @atomicservice
7171     * @since arkts {'1.1':'12','1.2':'20'}
7172     * @arkts 1.1&1.2
7173     */
7174    MOVING_PHOTO_IMAGE_TYPE = 'image/movingPhoto'
7175  }
7176
7177  /**
7178   * Enumeration type of filter operator.
7179   *
7180   * @enum { number } FilterOperator
7181   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7182   * @atomicservice
7183   * @since 19
7184   */
7185  export enum FilterOperator {
7186    /**
7187     * Filter operator: equal to
7188     *
7189     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7190     * @atomicservice
7191     * @since 19
7192     */
7193    EQUAL_TO = 0,
7194    /**
7195     * Filter operator: not equal to
7196     *
7197     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7198     * @atomicservice
7199     * @since 19
7200     */
7201    NOT_EQUAL_TO = 1,
7202    /**
7203     * Filter operator: more than
7204     *
7205     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7206     * @atomicservice
7207     * @since 19
7208     */
7209    MORE_THAN = 2,
7210    /**
7211     * Filter operator: less than
7212     *
7213     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7214     * @atomicservice
7215     * @since 19
7216     */
7217    LESS_THAN = 3,
7218    /**
7219     * Filter operator: more than or equal to
7220     *
7221     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7222     * @atomicservice
7223     * @since 19
7224     */
7225    MORE_THAN_OR_EQUAL_TO = 4,
7226    /**
7227     * Filter operator: less than or equal to
7228     *
7229     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7230     * @atomicservice
7231     * @since 19
7232     */
7233    LESS_THAN_OR_EQUAL_TO = 5,
7234    /**
7235     * Filter operator: between
7236     *
7237     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7238     * @atomicservice
7239     * @since 19
7240     */
7241    BETWEEN = 6,
7242  }
7243
7244    /**
7245     * Enumeration type of single selection mode
7246     *
7247     * @enum { number } SingleSelectionMode
7248     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7249     * @atomicservice
7250     * @since 18
7251     */
7252  export enum SingleSelectionMode {
7253    /**
7254     * browser mode
7255     *
7256     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7257     * @atomicservice
7258     * @since 18
7259     */
7260    BROWSER_MODE = 0,
7261    /**
7262     * select directly mode
7263     *
7264     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7265     * @atomicservice
7266     * @since 18
7267     */
7268    SELECT_MODE = 1,
7269    /**
7270     * browser and select mode
7271     *
7272     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7273     * @atomicservice
7274     * @since 18
7275     */
7276    BROWSER_AND_SELECT_MODE = 2
7277  }
7278
7279  /**
7280   * Class BaseSelectOptions, which is extracted from class PhotoSelectOptions
7281   *
7282   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7283   * @crossplatform
7284   * @atomicservice
7285   * @since arkts {'1.1':'12','1.2':'20'}
7286   * @arkts 1.1&1.2
7287   */
7288  class BaseSelectOptions {
7289    /**
7290     * The Type of the file in the picker window.
7291     *
7292     * @type { ?PhotoViewMIMETypes }
7293     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7294     * @since 10
7295     */
7296    /**
7297     * The Type of the file in the picker window.
7298     *
7299     * @type { ?PhotoViewMIMETypes }
7300     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7301     * @atomicservice
7302     * @since 11
7303     */
7304    /**
7305     * The Type of the file in the picker window.
7306     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7307     *
7308     * @type { ?PhotoViewMIMETypes }
7309     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7310     * @crossplatform
7311     * @atomicservice
7312     * @since 12
7313     */
7314    MIMEType?: PhotoViewMIMETypes;
7315
7316    /**
7317     * Maximum number of images for a single selection.
7318     *
7319     * @type { ?number }
7320     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7321     * @since 10
7322     */
7323    /**
7324     * Maximum number of images for a single selection.
7325     *
7326     * @type { ?number }
7327     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7328     * @atomicservice
7329     * @since 11
7330     */
7331    /**
7332     * Maximum number of images for a single selection.
7333     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7334     *
7335     * @type { ?number }
7336     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7337     * @atomicservice
7338     * @since 12
7339     */
7340    maxSelectNumber?: number;
7341
7342    /**
7343     * Support search.
7344     *
7345     * @type { ?boolean }
7346     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7347     * @atomicservice
7348     * @since 11
7349     */
7350    /**
7351     * Support search.
7352     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7353     *
7354     * @type { ?boolean }
7355     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7356     * @atomicservice
7357     * @since 12
7358     */
7359    isSearchSupported?: boolean;
7360
7361    /**
7362     * Support taking photos.
7363     *
7364     * @type { ?boolean }
7365     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7366     * @atomicservice
7367     * @since 11
7368     */
7369    /**
7370     * Support taking photos.
7371     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7372     *
7373     * @type { ?boolean }
7374     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7375     * @atomicservice
7376     * @since 12
7377     */
7378    isPhotoTakingSupported?: boolean;
7379
7380    /**
7381    * The recommendation options when use recommendation photo function.
7382    *
7383    * @type { ?RecommendationOptions }
7384    * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7385    * @atomicservice
7386    * @since 11
7387    */
7388    /**
7389     * The recommendation options when use recommendation photo function.
7390     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7391     *
7392     * @type { ?RecommendationOptions }
7393     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7394     * @atomicservice
7395     * @since 12
7396     */
7397    recommendationOptions?: RecommendationOptions;
7398
7399    /**
7400     * The uri for the preselected files.
7401     *
7402     * @type { ?Array<string> }
7403     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7404     * @atomicservice
7405     * @since 11
7406     */
7407    /**
7408     * The uri for the preselected files.
7409     * Move from class PhotoSelectOptions to it's base class BaseSelectOptions
7410     *
7411     * @type { ?Array<string> }
7412     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7413     * @atomicservice
7414     * @since 12
7415     */
7416    preselectedUris?: Array<string>;
7417
7418    /**
7419     * Support preview in single selection mode or not
7420     *
7421     * @type { ?boolean }
7422     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7423     * @atomicservice
7424     * @since 12
7425     */
7426    isPreviewForSingleSelectionSupported?: boolean;
7427
7428    /**
7429     * The mode of single selection
7430     *
7431     * @type { ?SingleSelectionMode }
7432     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7433     * @atomicservice
7434     * @since 18
7435     */
7436    singleSelectionMode?: SingleSelectionMode;
7437
7438    /**
7439     * Media file filtering configuration.
7440     *
7441     * @type { ?MimeTypeFilter }
7442     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7443     * @atomicservice
7444     * @since 19
7445     */
7446    mimeTypeFilter?: MimeTypeFilter;
7447
7448    /**
7449     * Media file size filtering configuration.
7450     *
7451     * @type { ?FileSizeFilter }
7452     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7453     * @atomicservice
7454     * @since 19
7455     */
7456    fileSizeFilter?: FileSizeFilter;
7457
7458    /**
7459     * Media file video duration filtering configuration.
7460     *
7461     * @type { ?VideoDurationFilter }
7462     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7463     * @atomicservice
7464     * @since 19
7465     */
7466    videoDurationFilter?: VideoDurationFilter;
7467
7468    /**
7469     * Configures filter conditions as a string array, supporting multiple combined
7470     * conditions to specify supported file types. When this parameter is set, the
7471     * original file type configuration parameters `MIMEType` and `mimeTypeFilter` become invalid.
7472     *
7473     * @type { ?Array<string> }
7474     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7475     * @atomicservice
7476     * @since 20
7477     */
7478    combinedMediaTypeFilter?: Array<string>;
7479
7480    /**
7481     * Media file type and size combined filtering configuration. The array supports a maximum length of 3.
7482     * Setting this parameter will cause the `fileSizeFilter` and `MIMEType` parameters to be ignored.
7483     *
7484     * @type { ?Array<PhotoViewMimeTypeFileSizeFilter> }
7485     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7486     * @atomicservice
7487     * @since 20
7488     */
7489    photoViewMimeTypeFileSizeFilters?: Array<PhotoViewMimeTypeFileSizeFilter>;
7490  }
7491
7492  /**
7493   * Media file filtering configuration.
7494   *
7495   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7496   * @atomicservice
7497   * @since 19
7498   */
7499  class MimeTypeFilter {
7500    /**
7501     * Indicates the media file type to be filtered.
7502     *
7503     * @type { Array<string> }
7504     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7505     * @atomicservice
7506     * @since 19
7507     */
7508    mimeTypeArray: Array<string>;
7509  }
7510
7511  /**
7512   * Media file size filtering configuration.
7513   *
7514   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7515   * @atomicservice
7516   * @since 19
7517   */
7518    class FileSizeFilter {
7519      /**
7520       * Specifing filter operator.
7521       *
7522       * @type { FilterOperator }
7523       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7524       * @atomicservice
7525       * @since 19
7526       */
7527      filterOperator: FilterOperator;
7528
7529      /**
7530       * Specifing the size of files to be filtered.
7531       *
7532       * @type { number }
7533       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7534       * @atomicservice
7535       * @since 19
7536       */
7537      fileSize: number;
7538
7539      /**
7540       * Specifing the upper limit of file size to be filtered.
7541       *
7542       * @type { ?number }
7543       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7544       * @atomicservice
7545       * @since 19
7546       */
7547      extraFileSize?: number;
7548    }
7549
7550  /**
7551   * Media file video duration filtering configuration.
7552   *
7553   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7554   * @atomicservice
7555   * @since 19
7556   */
7557  class VideoDurationFilter {
7558      /**
7559       * Specifing filter operator.
7560       *
7561       * @type { FilterOperator }
7562       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7563       * @atomicservice
7564       * @since 19
7565       */
7566      filterOperator: FilterOperator;
7567
7568      /**
7569       * Specifing the video duration of files to be filtered.
7570       *
7571       * @type { number }
7572       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7573       * @atomicservice
7574       * @since 19
7575       */
7576      videoDuration: number;
7577
7578      /**
7579       * Specifing the upper limit of video duration to be filtered.
7580       *
7581       * @type { ?number }
7582       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7583       * @atomicservice
7584       * @since 19
7585       */
7586      extraVideoDuration?: number;
7587  }
7588
7589  /**
7590   * Media file video duration filtering configuration.
7591   *
7592   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7593   * @atomicservice
7594   * @since 20
7595   */
7596    class PhotoViewMimeTypeFileSizeFilter {
7597      /**
7598       * Specifing filter Type.
7599       *
7600       * @type { PhotoViewMIMETypes }
7601       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7602       * @atomicservice
7603       * @since 20
7604       */
7605      photoViewMimeType: PhotoViewMIMETypes;
7606
7607      /**
7608       * Specifing file size filtering configuration.
7609       *
7610       * @type { FileSizeFilter }
7611       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7612       * @atomicservice
7613       * @since 20
7614       */
7615      sizeFilter: FileSizeFilter;
7616    }
7617
7618  /**
7619   * PhotoSelectOptions Object
7620   *
7621   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7622   * @since 10
7623   */
7624  /**
7625   * PhotoSelectOptions Object
7626   *
7627   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7628   * @atomicservice
7629   * @since 11
7630   */
7631  /**
7632   * PhotoSelectOptions extends base class BaseSelectOptions
7633   *
7634   * @extends BaseSelectOptions
7635   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7636   * @crossplatform
7637   * @atomicservice
7638   * @since arkts {'1.1':'12','1.2':'20'}
7639   * @arkts 1.1&1.2
7640   */
7641  class PhotoSelectOptions extends BaseSelectOptions {
7642    /**
7643     * Support editing photos.
7644     *
7645     * @type { ?boolean }
7646     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7647     * @atomicservice
7648     * @since 11
7649     */
7650    isEditSupported?: boolean;
7651
7652    /**
7653     * Support select original photo or not
7654     *
7655     * @type { ?boolean }
7656     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7657     * @atomicservice
7658     * @since 12
7659     */
7660    isOriginalSupported?: boolean;
7661
7662    /**
7663     * SubWindow name
7664     *
7665     * @type { ?string }
7666     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7667     * @atomicservice
7668     * @since 12
7669     */
7670    subWindowName?: string;
7671
7672    /**
7673     * Theme color
7674     *
7675     * @type { ?CustomColors }
7676     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7677     * @systemapi
7678     * @since 12
7679     */
7680    themeColor?: CustomColors;
7681
7682    /**
7683     * Complete button text
7684     *
7685     * @type { ?CompleteButtonText }
7686     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7687     * @atomicservice
7688     * @since 14
7689     */
7690    completeButtonText?: CompleteButtonText;
7691
7692    /**
7693     * user id
7694     *
7695     * @type { ?number }
7696     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7697     * @systemapi
7698     * @since 18
7699     */
7700    userId?: number;
7701  }
7702
7703  /**
7704   * Defines the image recommendation options.
7705   * The image recommendation feature depends on the image data analysis capability, which varies with devices.
7706   *
7707   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7708   * @atomicservice
7709   * @since arkts {'1.1':'11','1.2':'20'}
7710   * @arkts 1.1&1.2
7711   */
7712  class RecommendationOptions {
7713    /**
7714     * Type of the recommended image.
7715     *
7716     * @type { ?RecommendationType }
7717     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7718     * @atomicservice
7719     * @since 11
7720     */
7721    recommendationType?: RecommendationType;
7722
7723    /**
7724     * Text based on which images are recommended.
7725     * If both recommendationType and textContextInfo are set, textContextInfo takes precedence over recommendationType.
7726     *
7727     * @type { ?TextContextInfo }
7728     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7729     * @atomicservice
7730     * @since 12
7731     */
7732    textContextInfo?: TextContextInfo;
7733  }
7734
7735  /**
7736   * Represents the text information about the recommended images.
7737   *
7738   * @interface TextContextInfo
7739   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7740   * @atomicservice
7741   * @since arkts {'1.1':'12','1.2':'20'}
7742   * @arkts 1.1&1.2
7743   */
7744  interface TextContextInfo {
7745    /**
7746     * Text based on which images are recommended.
7747     * The text cannot exceed 250 characters. The default value is an empty string.
7748     *
7749     * @type { ?string }
7750     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7751     * @atomicservice
7752     * @since arkts {'1.1':'12','1.2':'20'}
7753     * @arkts 1.1&1.2
7754     */
7755    text?: string;
7756  }
7757
7758  /**
7759   * Defines information about the images or videos selected.
7760   *
7761   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7762   * @since 10
7763   */
7764  /**
7765   * Defines information about the images or videos selected.
7766   *
7767   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7768   * @atomicservice
7769   * @since 11
7770   */
7771  /**
7772   * Defines information about the images or videos selected.
7773   *
7774   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7775   * @crossplatform
7776   * @atomicservice
7777   * @since arkts {'1.1':'12','1.2':'20'}
7778   * @arkts 1.1&1.2
7779   */
7780  class PhotoSelectResult {
7781    /**
7782     * URIs of the images or videos selected. The URI array can be used only by calling photoAccessHelper.getAssets with temporary authorization.
7783     * For details about how to use the media file URI, see Using a Media File URI.
7784     *
7785     * @type { Array<string> }
7786     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7787     * @since 10
7788     */
7789    /**
7790     * URIs of the images or videos selected. The URI array can be used only by calling photoAccessHelper.getAssets with temporary authorization.
7791     * For details about how to use the media file URI, see Using a Media File URI.
7792     *
7793     * @type { Array<string> }
7794     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7795     * @atomicservice
7796     * @since 11
7797     */
7798    /**
7799     * URIs of the images or videos selected. The URI array can be used only by calling photoAccessHelper.getAssets with temporary authorization.
7800     * For details about how to use the media file URI, see Using a Media File URI.
7801     *
7802     * @type { Array<string> }
7803     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7804     * @crossplatform
7805     * @atomicservice
7806     * @since 12
7807     */
7808    photoUris: Array<string>;
7809
7810    /**
7811     * Whether the selected media asset is the original image.
7812     * The value true means that the selected media asset is the original image, and false means the opposite.
7813     * The default value is false.
7814     *
7815     * @type { boolean }
7816     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7817     * @since 10
7818     */
7819    /**
7820     * Whether the selected media asset is the original image.
7821     * The value true means that the selected media asset is the original image, and false means the opposite.
7822     * The default value is false.
7823     *
7824     * @type { boolean }
7825     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7826     * @atomicservice
7827     * @since 11
7828     */
7829    /**
7830     * Whether the selected media asset is the original image.
7831     * The value true means that the selected media asset is the original image, and false means the opposite.
7832     * The default value is false.
7833     *
7834     * @type { boolean }
7835     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7836     * @crossplatform
7837     * @atomicservice
7838     * @since 12
7839     */
7840    isOriginalPhoto: boolean;
7841  }
7842
7843  /**
7844   * Provides APIs for the user to select images and videos.
7845   * Before using the APIs of PhotoViewPicker, you need to create a PhotoViewPicker instance.
7846   *
7847   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7848   * @since 10
7849   */
7850  /**
7851   * Provides APIs for the user to select images and videos.
7852   * Before using the APIs of PhotoViewPicker, you need to create a PhotoViewPicker instance.
7853   *
7854   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7855   * @atomicservice
7856   * @since 11
7857   */
7858  /**
7859   * Provides APIs for the user to select images and videos.
7860   * Before using the APIs of PhotoViewPicker, you need to create a PhotoViewPicker instance.
7861   *
7862   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7863   * @crossplatform
7864   * @atomicservice
7865   * @since arkts {'1.1':'12','1.2':'20'}
7866   * @arkts 1.1&1.2
7867   */
7868  class PhotoViewPicker {
7869    /**
7870     * Pull up the photo picker based on the selection mode.
7871     *
7872     * @param { PhotoSelectOptions } [option] - represents the options provided in select mode.
7873     * @returns { Promise<PhotoSelectResult> } Returns the uris for the selected files.
7874     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7875     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7876     * @throws { BusinessError } 13900042 - Unknown error
7877     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7878     * @since 10
7879     */
7880    /**
7881     * Pull up the photo picker based on the selection mode.
7882     *
7883     * @param { PhotoSelectOptions } [option] - represents the options provided in select mode.
7884     * @returns { Promise<PhotoSelectResult> } Returns the uris for the selected files.
7885     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7886     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7887     * @throws { BusinessError } 13900042 - Unknown error
7888     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7889     * @atomicservice
7890     * @since 11
7891     */
7892    /**
7893     * Pull up the photo picker based on the selection mode.
7894     *
7895     * @param { PhotoSelectOptions } [option] - represents the options provided in select mode.
7896     * @returns { Promise<PhotoSelectResult> } Returns the uris for the selected files.
7897     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7898     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7899     * @throws { BusinessError } 13900042 - Unknown error
7900     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7901     * @crossplatform
7902     * @atomicservice
7903     * @since 12
7904     */
7905    select(option?: PhotoSelectOptions): Promise<PhotoSelectResult>;
7906
7907    /**
7908     * Pull up the photo picker based on the selection mode.
7909     *
7910     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
7911     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7912     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7913     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7914     * @throws { BusinessError } 13900042 - Unknown error
7915     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7916     * @since 10
7917     */
7918    /**
7919     * Pull up the photo picker based on the selection mode.
7920     *
7921     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
7922     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7923     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7924     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7925     * @throws { BusinessError } 13900042 - Unknown error
7926     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7927     * @atomicservice
7928     * @since 11
7929     */
7930    /**
7931     * Pull up the photo picker based on the selection mode.
7932     *
7933     * @param { PhotoSelectOptions } option - represents the options provided in select mode.
7934     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7935     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7936     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7937     * @throws { BusinessError } 13900042 - Unknown error
7938     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7939     * @crossplatform
7940     * @atomicservice
7941     * @since 12
7942     */
7943    select(option: PhotoSelectOptions, callback: AsyncCallback<PhotoSelectResult>): void;
7944
7945    /**
7946     * Pull up the photo picker based on the selection mode.
7947     *
7948     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7949     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7950     * <br>2. Incorrect parameter types.
7951     * @throws { BusinessError } 13900042 - Unknown error
7952     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7953     * @since 10
7954     */
7955    /**
7956     * Pull up the photo picker based on the selection mode.
7957     *
7958     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7959     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7960     * <br>2. Incorrect parameter types.
7961     * @throws { BusinessError } 13900042 - Unknown error
7962     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7963     * @atomicservice
7964     * @since 11
7965     */
7966    /**
7967     * Pull up the photo picker based on the selection mode.
7968     *
7969     * @param { AsyncCallback<PhotoSelectResult> } callback - Returns the PhotoSelectResult by photo picker
7970     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7971     * <br>2. Incorrect parameter types.
7972     * @throws { BusinessError } 13900042 - Unknown error
7973     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7974     * @crossplatform
7975     * @atomicservice
7976     * @since 12
7977     */
7978    select(callback: AsyncCallback<PhotoSelectResult>): void;
7979  }
7980
7981  /**
7982   * Represents the edited media asset data.
7983   *
7984   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
7985   * @systemapi
7986   * @since arkts {'1.1':'11','1.2':'20'}
7987   * @arkts 1.1&1.2
7988   */
7989  class MediaAssetEditData {
7990    /**
7991     * Constructor.
7992     *
7993     * @param { string } compatibleFormat - Format of the edited data.
7994     * @param { string } formatVersion - Version of the data format.
7995     * @throws { BusinessError } 202 - Called by non-system application
7996     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7997     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
7998     * @throws { BusinessError } 14000011 - System inner fail
7999     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8000     * @systemapi
8001     * @since 11
8002     */
8003    constructor(compatibleFormat: string, formatVersion: string);
8004
8005    /**
8006     * Compatible format
8007     *
8008     * @type { string }
8009     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8010     * @systemapi
8011     * @since arkts {'1.1':'11','1.2':'20'}
8012     * @arkts 1.1&1.2
8013     */
8014    compatibleFormat: string;
8015
8016    /**
8017     * Format version
8018     *
8019     * @type { string }
8020     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8021     * @systemapi
8022     * @since arkts {'1.1':'11','1.2':'20'}
8023     * @arkts 1.1&1.2
8024     */
8025    formatVersion: string;
8026
8027    /**
8028     * Edit data
8029     *
8030     * @type { string }
8031     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8032     * @systemapi
8033     * @since arkts {'1.1':'11','1.2':'20'}
8034     * @arkts 1.1&1.2
8035     */
8036    data: string;
8037  }
8038
8039  /**
8040   * Enumerates the types of the resources to write.
8041   *
8042   * @enum { number } ResourceType
8043   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8044   * @atomicservice
8045   * @since arkts {'1.1':'11','1.2':'20'}
8046   * @arkts 1.1&1.2
8047   */
8048  enum ResourceType {
8049    /**
8050     * Image resource
8051     *
8052     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8053     * @atomicservice
8054     * @since arkts {'1.1':'11','1.2':'20'}
8055     * @arkts 1.1&1.2
8056     */
8057    IMAGE_RESOURCE = 1,
8058
8059    /**
8060     * Video resource
8061     *
8062     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8063     * @atomicservice
8064     * @since arkts {'1.1':'11','1.2':'20'}
8065     * @arkts 1.1&1.2
8066     */
8067    VIDEO_RESOURCE = 2,
8068
8069    /**
8070     * Photo proxy
8071     *
8072     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8073     * @systemapi
8074     * @since arkts {'1.1':'11','1.2':'20'}
8075     * @arkts 1.1&1.2
8076     */
8077    PHOTO_PROXY = 3,
8078
8079    /**
8080     * Private moving photo resource
8081     *
8082     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8083     * @systemapi
8084     * @since arkts {'1.1':'13','1.2':'20'}
8085     * @arkts 1.1&1.2
8086     */
8087    PRIVATE_MOVING_PHOTO_RESOURCE = 4,
8088
8089    /**
8090     * Private moving photo metadata
8091     *
8092     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8093     * @systemapi
8094     * @since 18
8095     */
8096    PRIVATE_MOVING_PHOTO_METADATA = 5
8097  }
8098
8099  /**
8100   * Enumerates the types of image files to save.
8101   *
8102   * @enum { number } ImageFileType
8103   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8104   * @since arkts {'1.1':'13','1.2':'20'}
8105   * @arkts 1.1&1.2
8106   */
8107  enum ImageFileType {
8108    /**
8109     * JPEG
8110     *
8111     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8112     * @since arkts {'1.1':'13','1.2':'20'}
8113     * @arkts 1.1&1.2
8114     */
8115    JPEG = 1,
8116
8117    /**
8118     * HEIF
8119     *
8120     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8121     * @since arkts {'1.1':'13','1.2':'20'}
8122     * @arkts 1.1&1.2
8123     */
8124    HEIF = 2
8125  }
8126
8127  /**
8128   * Enumeration of moving photo effect mode.
8129   *
8130   * @enum { number } MovingPhotoEffectMode
8131   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8132   * @systemapi
8133   * @since arkts {'1.1':'12','1.2':'20'}
8134   * @arkts 1.1&1.2
8135   */
8136  enum MovingPhotoEffectMode {
8137    /**
8138     * Default
8139     *
8140     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8141     * @systemapi
8142     * @since arkts {'1.1':'12','1.2':'20'}
8143     * @arkts 1.1&1.2
8144     */
8145    DEFAULT = 0,
8146
8147    /**
8148     * Bounce play
8149     *
8150     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8151     * @systemapi
8152     * @since arkts {'1.1':'12','1.2':'20'}
8153     * @arkts 1.1&1.2
8154     */
8155    BOUNCE_PLAY = 1,
8156
8157    /**
8158     * Loop play
8159     *
8160     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8161     * @systemapi
8162     * @since arkts {'1.1':'12','1.2':'20'}
8163     * @arkts 1.1&1.2
8164     */
8165    LOOP_PLAY = 2,
8166
8167    /**
8168     * Long exposure
8169     *
8170     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8171     * @systemapi
8172     * @since arkts {'1.1':'12','1.2':'20'}
8173     * @arkts 1.1&1.2
8174     */
8175    LONG_EXPOSURE = 3,
8176
8177    /**
8178     * Multi exposure
8179     *
8180     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8181     * @systemapi
8182     * @since arkts {'1.1':'12','1.2':'20'}
8183     * @arkts 1.1&1.2
8184     */
8185    MULTI_EXPOSURE = 4,
8186
8187    /**
8188     * Cinema graph
8189     *
8190     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8191     * @systemapi
8192     * @since arkts {'1.1':'13','1.2':'20'}
8193     * @arkts 1.1&1.2
8194     */
8195    CINEMA_GRAPH = 5,
8196
8197    /**
8198     * Image only
8199     *
8200     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8201     * @systemapi
8202     * @since arkts {'1.1':'13','1.2':'20'}
8203     * @arkts 1.1&1.2
8204     */
8205    IMAGE_ONLY = 10
8206  }
8207
8208  /**
8209   * Enumerates the types of segmented video enhancement.
8210   *
8211   * @enum { number } VideoEnhancementType
8212   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8213   * @systemapi
8214   * @since arkts {'1.1':'13','1.2':'20'}
8215   * @arkts 1.1&1.2
8216  */
8217  enum VideoEnhancementType {
8218    /**
8219     * Apply enhancement on the device.
8220     *
8221     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8222     * @systemapi
8223     * @since arkts {'1.1':'13','1.2':'20'}
8224     * @arkts 1.1&1.2
8225     */
8226    QUALITY_ENHANCEMENT_LOCAL = 0,
8227
8228    /**
8229     * Apply enhancement on the cloud.
8230     *
8231     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8232     * @systemapi
8233     * @since arkts {'1.1':'13','1.2':'20'}
8234     * @arkts 1.1&1.2
8235     */
8236    QUALITY_ENHANCEMENT_CLOUD = 1,
8237
8238    /**
8239     * Apply enhancement on both the device and cloud.
8240     *
8241     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8242     * @systemapi
8243     * @since arkts {'1.1':'13','1.2':'20'}
8244     * @arkts 1.1&1.2
8245     */
8246    QUALITY_ENHANCEMENT_LOCAL_AND_CLOUD = 2
8247  }
8248
8249  /**
8250   * Defines the interface of media change request.
8251   *
8252   * @interface MediaChangeRequest
8253   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8254   * @atomicservice
8255   * @since arkts {'1.1':'11','1.2':'20'}
8256   * @arkts 1.1&1.2
8257   */
8258  interface MediaChangeRequest {}
8259
8260  /**
8261   * Defines the class of media asset change request.
8262   *
8263   * @implements MediaChangeRequest
8264   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8265   * @atomicservice
8266   * @since arkts {'1.1':'11','1.2':'20'}
8267   * @arkts 1.1&1.2
8268   */
8269  class MediaAssetChangeRequest implements MediaChangeRequest {
8270    /**
8271     * Constructor used to initialize an asset change request.
8272     *
8273     * @param { PhotoAsset } asset - Assets to change.
8274     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8275     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8276     * @throws { BusinessError } 14000011 - System inner fail
8277     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8278     * @since 11
8279     */
8280    /**
8281     * Constructor used to initialize an asset change request.
8282     *
8283     * @param { PhotoAsset } asset - Assets to change.
8284     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8285     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8286     * @throws { BusinessError } 14000011 - System inner fail
8287     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8288     * @atomicservice
8289     * @since arkts {'1.1':'12','1.2':'20'}
8290     * @arkts 1.1&1.2
8291     */
8292    constructor(asset: PhotoAsset);
8293
8294    /**
8295     * Creates an image asset change request.
8296     *
8297     * @param { Context } context - Context of the ability instance.
8298     * @param { string } fileUri - Data source of the image asset, which is specified by a URI in the application sandbox directory.
8299     * @returns { MediaAssetChangeRequest } - Returns a MediaAssetChangeRequest instance
8300     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8301     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8302     * @throws { BusinessError } 13900002 - The file corresponding to the URI is not in the app sandbox.
8303     * @throws { BusinessError } 14000011 - System inner fail
8304     * @static
8305     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8306     * @since 11
8307     */
8308    /**
8309     * Creates an image asset change request.
8310     *
8311     * @param { Context } context - Context of the ability instance.
8312     * @param { string } fileUri - Data source of the image asset, which is specified by a URI in the application sandbox directory.
8313     * @returns { MediaAssetChangeRequest } - Returns a MediaAssetChangeRequest instance
8314     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8315     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8316     * @throws { BusinessError } 13900002 - The file corresponding to the URI is not in the app sandbox.
8317     * @throws { BusinessError } 14000011 - System inner fail
8318     * @static
8319     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8320     * @atomicservice
8321     * @since arkts {'1.1':'12','1.2':'20'}
8322     * @arkts 1.1&1.2
8323     */
8324    static createImageAssetRequest(context: Context, fileUri: string): MediaAssetChangeRequest;
8325
8326    /**
8327     * Creates a video asset change request.
8328     *
8329     * @param { Context } context - Context of the ability instance.
8330     * @param { string } fileUri - Data source of the video asset, which is specified by a URI in the application sandbox directory.
8331     * @returns { MediaAssetChangeRequest } - Returns a MediaAssetChangeRequest instance
8332     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8333     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8334     * @throws { BusinessError } 13900002 - The file corresponding to the URI is not in the app sandbox.
8335     * @throws { BusinessError } 14000011 - System inner fail
8336     * @static
8337     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8338     * @since arkts {'1.1':'11','1.2':'20'}
8339     * @arkts 1.1&1.2
8340     */
8341    static createVideoAssetRequest(context: Context, fileUri: string): MediaAssetChangeRequest;
8342
8343    /**
8344     * Creates an asset change request with the specified file name.
8345     *
8346     * @param { Context } context - Context of the ability instance.
8347     * @param { string } displayName - File name of the image or video to create.
8348     * @param { PhotoCreateOptions } [options] - Options for creating an image or video asset.
8349     * @returns { MediaAssetChangeRequest } - Returns a MediaAssetChangeRequest instance
8350     * @throws { BusinessError } 202 - Called by non-system application
8351     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8352     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8353     * @throws { BusinessError } 14000001 - Invalid display name
8354     * @throws { BusinessError } 14000011 - System inner fail
8355     * @static
8356     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8357     * @systemapi
8358     * @since arkts {'1.1':'11','1.2':'20'}
8359     * @arkts 1.1&1.2
8360     */
8361    static createAssetRequest(context: Context, displayName: string, options?: PhotoCreateOptions): MediaAssetChangeRequest;
8362
8363    /**
8364     * Create an asset change request based on the file type and filename extension.
8365     *
8366     * @param { Context } context - Context of the ability instance.
8367     * @param { PhotoType } photoType - Type of the file to create, which can be IMAGE or VIDEO.
8368     * @param { string } extension - File name extension, for example, 'jpg'.
8369     * @param { CreateOptions } [options] - Options for creating the image or video asset, for example, {title: 'testPhoto'}.
8370     * @returns { MediaAssetChangeRequest } - Returns a MediaAssetChangeRequest instance
8371     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8372     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8373     * @throws { BusinessError } 14000011 - System inner fail
8374     * @static
8375     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8376     * @atomicservice
8377     * @since arkts {'1.1':'11','1.2':'20'}
8378     * @arkts 1.1&1.2
8379     */
8380    static createAssetRequest(context: Context, photoType: PhotoType, extension: string, options?: CreateOptions): MediaAssetChangeRequest;
8381
8382    /**
8383     * Deletes media assets. This API uses a promise to return the result. The deleted assets are moved to the trash.
8384     *
8385     * @permission ohos.permission.WRITE_IMAGEVIDEO
8386     * @param { Context } context - Context of the ability instance.
8387     * @param { Array<PhotoAsset> } assets - Array of assets to delete.
8388     * @returns { Promise<void> } - Returns void
8389     * @throws { BusinessError } 201 - Permission denied
8390     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8391     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8392     * @throws { BusinessError } 14000011 - System inner fail
8393     * @static
8394     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8395     * @since arkts {'1.1':'11','1.2':'20'}
8396     * @arkts 1.1&1.2
8397     */
8398    static deleteAssets(context: Context, assets: Array<PhotoAsset>): Promise<void>;
8399
8400    /**
8401     * Deletes media assets. This API uses a promise to return the result. The deleted assets are moved to the trash.
8402     *
8403     * @permission ohos.permission.WRITE_IMAGEVIDEO
8404     * @param { Context } context - Context of the ability instance.
8405     * @param { Array<string> } uriList - URIs of the media files to delete.
8406     * @returns { Promise<void> } - Returns void
8407     * @throws { BusinessError } 201 - Permission denied
8408     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8409     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8410     * @throws { BusinessError } 14000002 - The uri format is incorrect or does not exist.
8411     * @throws { BusinessError } 14000011 - System inner fail
8412     * @static
8413     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8414     * @since arkts {'1.1':'11','1.2':'20'}
8415     * @arkts 1.1&1.2
8416     */
8417    static deleteAssets(context: Context, uriList: Array<string>): Promise<void>;
8418
8419    /**
8420     * Get the asset.
8421     *
8422     * @returns { PhotoAsset } - Returns the asset
8423     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8424     * <br>2. Incorrect parameter types.
8425     * @throws { BusinessError } 14000011 - System inner fail
8426     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8427     * @since 11
8428     */
8429    /**
8430     * Obtains the asset in this asset change request.
8431     *
8432     * @returns { PhotoAsset } - Returns the asset
8433     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8434     * <br>2. Incorrect parameter types.
8435     * @throws { BusinessError } 14000011 - System inner fail
8436     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8437     * @atomicservice
8438     * @since arkts {'1.1':'12','1.2':'20'}
8439     * @arkts 1.1&1.2
8440     */
8441    getAsset(): PhotoAsset;
8442
8443    /**
8444     * Set favorite state of the asset.
8445     *
8446     * @param { boolean } favoriteState - true: Put the asset into favorite album; false: Remove the asset from favorite album.
8447     * @throws { BusinessError } 202 - Called by non-system application
8448     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8449     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8450     * @throws { BusinessError } 14000011 - System inner fail
8451     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8452     * @systemapi
8453     * @since arkts {'1.1':'11','1.2':'20'}
8454     * @arkts 1.1&1.2
8455     */
8456    setFavorite(favoriteState: boolean): void;
8457
8458    /**
8459     * Set hidden state of the asset.
8460     *
8461     * @param { boolean } hiddenState - true: Put the asset into hidden album; false: Recover the asset from hidden album.
8462     * @throws { BusinessError } 202 - Called by non-system application
8463     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8464     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8465     * @throws { BusinessError } 14000011 - System inner fail
8466     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8467     * @systemapi
8468     * @since arkts {'1.1':'11','1.2':'20'}
8469     * @arkts 1.1&1.2
8470     */
8471    setHidden(hiddenState: boolean): void;
8472
8473    /**
8474     * Set user comment of the asset.
8475     *
8476     * @param { string } userComment - user comment info
8477     * @throws { BusinessError } 202 - Called by non-system application
8478     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8479     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8480     * @throws { BusinessError } 14000011 - System inner fail
8481     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8482     * @systemapi
8483     * @since arkts {'1.1':'11','1.2':'20'}
8484     * @arkts 1.1&1.2
8485     */
8486    setUserComment(userComment: string): void;
8487
8488    /**
8489     * Sets location information.
8490     *
8491     * @param { number } longitude - Longitude.
8492     * @param { number } latitude - Latitude.
8493     * @throws { BusinessError } 202 - Called by non-system application
8494     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8495     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8496     * @throws { BusinessError } 14000011 - System inner fail
8497     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8498     * @systemapi
8499     * @since arkts {'1.1':'11','1.2':'20'}
8500     * @arkts 1.1&1.2
8501     */
8502    setLocation(longitude: number, latitude: number): void;
8503
8504    /**
8505     * Sets the media asset title.
8506     *
8507     * @param { string } title - Title to set.
8508     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8509     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8510     * @throws { BusinessError } 14000011 - System inner fail
8511     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8512     * @since 11
8513     */
8514    /**
8515     * Sets the media asset title.
8516     *
8517     * @param { string } title - Title to set.
8518     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8519     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8520     * @throws { BusinessError } 14000011 - System inner fail
8521     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8522     * @atomicservice
8523     * @since arkts {'1.1':'12','1.2':'20'}
8524     * @arkts 1.1&1.2
8525     */
8526    setTitle(title: string): void;
8527
8528    /**
8529     * Saves the edited data of an asset.
8530     *
8531     * @param { MediaAssetEditData } editData - Edited data to save.
8532     * @throws { BusinessError } 202 - Called by non-system application
8533     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8534     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8535     * @throws { BusinessError } 14000011 - System inner fail
8536     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8537     * @systemapi
8538     * @since arkts {'1.1':'11','1.2':'20'}
8539     * @arkts 1.1&1.2
8540     */
8541    setEditData(editData: MediaAssetEditData): void;
8542
8543    /**
8544     * Obtains the handler used for writing a file to cache.
8545     *
8546     * @permission ohos.permission.WRITE_IMAGEVIDEO
8547     * @returns { Promise<number> } Returns the write cache handler
8548     * @throws { BusinessError } 201 - Permission denied
8549     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8550     * <br>2. Incorrect parameter types.
8551     * @throws { BusinessError } 14000011 - System inner fail
8552     * @throws { BusinessError } 14000016 - Operation Not Support
8553     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8554     * @since arkts {'1.1':'11','1.2':'20'}
8555     * @arkts 1.1&1.2
8556     */
8557    getWriteCacheHandler(): Promise<number>;
8558
8559    /**
8560     * Adds a resource using fileUri.
8561     *
8562     * @param { ResourceType } type - Type of the resource to add.
8563     * @param { string } fileUri - Data source of the resource to be added, which is specified by a URI in the application sandbox directory.
8564     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8565     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8566     * @throws { BusinessError } 13900002 - The file corresponding to the URI is not in the app sandbox.
8567     * @throws { BusinessError } 14000011 - System inner fail
8568     * @throws { BusinessError } 14000016 - Operation Not Support
8569     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8570     * @atomicservice
8571     * @since arkts {'1.1':'11','1.2':'20'}
8572     * @arkts 1.1&1.2
8573     */
8574    addResource(type: ResourceType, fileUri: string): void;
8575
8576    /**
8577     * Adds a resource using ArrayBuffer data.
8578     *
8579     * @param { ResourceType } type - Type of the resource to add.
8580     * @param { ArrayBuffer } data - Data of the resource to add.
8581     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8582     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8583     * @throws { BusinessError } 14000011 - System inner fail
8584     * @throws { BusinessError } 14000016 - Operation Not Support
8585     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8586     * @atomicservice
8587     * @since arkts {'1.1':'11','1.2':'20'}
8588     * @arkts 1.1&1.2
8589     */
8590    addResource(type: ResourceType, data: ArrayBuffer): void;
8591
8592    /**
8593     * Adds resources using PhotoProxy data.
8594     *
8595     * @param { ResourceType } type - Type of the resource to add.
8596     * @param { PhotoProxy } proxy - PhotoProxy data of the resource to add.
8597     * @throws { BusinessError } 202 - Called by non-system application
8598     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8599     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8600     * @throws { BusinessError } 14000011 - System inner fail
8601     * @throws { BusinessError } 14000016 - Operation Not Support
8602     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8603     * @systemapi
8604     * @since arkts {'1.1':'11','1.2':'20'}
8605     * @arkts 1.1&1.2
8606     */
8607    addResource(type: ResourceType, proxy: PhotoProxy): void;
8608
8609    /**
8610     * Sets the Key for the Ultra Snapshot feature, which allows the camera to take photos or record videos with the screen off.
8611     *
8612     * @param { string } cameraShotKey - Key for the Ultra Snapshot feature.
8613     * <br>This parameter is available only for the system camera, and the key value is defined by the system camera.
8614     * @throws { BusinessError } 202 - Called by non-system application
8615     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8616     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8617     * @throws { BusinessError } 14000011 - System inner fail
8618     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8619     * @systemapi
8620     * @since arkts {'1.1':'12','1.2':'20'}
8621     * @arkts 1.1&1.2
8622     */
8623    setCameraShotKey(cameraShotKey: string): void;
8624
8625    /**
8626     * Saves the photo taken by the camera.
8627     *
8628     * @throws { BusinessError } 14000011 - System inner fail
8629     * @throws { BusinessError } 14000016 - Operation Not Support
8630     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8631     * @since arkts {'1.1':'12','1.2':'20'}
8632     * @arkts 1.1&1.2
8633     */
8634    saveCameraPhoto(): void;
8635
8636    /**
8637     * Saves the photo taken by the camera.
8638     *
8639     * @param { ImageFileType } imageFileType - File type of the photo to save.
8640     * @throws { BusinessError } 14000011 - System inner fail
8641     * @throws { BusinessError } 14000016 - Operation Not Support
8642     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8643     * @since arkts {'1.1':'13','1.2':'20'}
8644     * @arkts 1.1&1.2
8645     */
8646    saveCameraPhoto(imageFileType: ImageFileType): void;
8647
8648    /**
8649     * Discards the photo taken by the camera.
8650     *
8651     * @throws { BusinessError } 14000011 - Internal system error
8652     * @throws { BusinessError } 14000016 - Operation Not Support
8653     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8654     * @since arkts {'1.1':'12','1.2':'20'}
8655     * @arkts 1.1&1.2
8656     */
8657    discardCameraPhoto(): void;
8658
8659    /**
8660     * Sets the effect of this moving photo.
8661     *
8662     * @param { MovingPhotoEffectMode } mode - Effect to set.
8663     * @throws { BusinessError } 202 - Called by non-system application
8664     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8665     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8666     * @throws { BusinessError } 14000011 - System inner fail
8667     * @throws { BusinessError } 14000016 - Operation Not Support
8668     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8669     * @systemapi
8670     * @since arkts {'1.1':'12','1.2':'20'}
8671     * @arkts 1.1&1.2
8672     */
8673    setEffectMode(mode: MovingPhotoEffectMode): void;
8674
8675    /**
8676     * Sets the orientation of this image.
8677     *
8678     * @param { number } orientation - Rotation angle of the image to set. The value can only be 0, 90, 180, or 270.
8679     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8680     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8681     * @throws { BusinessError } 14000011 - Internal system error
8682     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8683     * @since 15
8684     */
8685    setOrientation(orientation: number): void;
8686
8687    /**
8688     * Set video enhancement attribute
8689     *
8690     * @param { VideoEnhancementType } videoEnhancementType - The type of video enhancement
8691     * @param { string } photoId - The photo id of video
8692     * @throws { BusinessError } 202 - Called by non-system application
8693     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8694     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8695     * @throws { BusinessError } 14000011 - Internal system error
8696     * @throws { BusinessError } 14000016 - Operation Not Support
8697     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8698     * @systemapi
8699     * @since arkts {'1.1':'13','1.2':'20'}
8700     * @arkts 1.1&1.2
8701    */
8702    setVideoEnhancementAttr(videoEnhancementType: VideoEnhancementType, photoId: string): void;
8703
8704    /**
8705     * Sets the watermark type supported by photos.
8706     *
8707     * @param { WatermarkType } watermarkType - Watermark type to set.
8708     * @throws { BusinessError } 202 - Called by non-system application
8709     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8710     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8711     * @throws { BusinessError } 14000011 - Internal system error
8712     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8713     * @systemapi
8714     * @since arkts {'1.1':'14','1.2':'20'}
8715     * @arkts 1.1&1.2
8716     */
8717    setSupportedWatermarkType(watermarkType: WatermarkType): void;
8718
8719    /**
8720     * Permanently deletes photos or videos in batches. This API uses a promise to return the result.
8721     *
8722     * @permission ohos.permission.WRITE_IMAGEVIDEO
8723     * @param { Context } context - Context of the ability instance.
8724     * @param { Array<PhotoAsset> } assets - Array of images or videos to be permanently deleted.
8725     * @returns { Promise<void> } - Returns void
8726     * @throws { BusinessError } 201 - Permission denied
8727     * @throws { BusinessError } 202 - Called by non-system application
8728     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8729     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8730     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
8731     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
8732     * @static
8733     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8734     * @systemapi
8735     * @since 18
8736     */
8737    static deleteLocalAssetsPermanently(context: Context, assets: Array<PhotoAsset>): Promise<void>;
8738
8739    /**
8740     * Delete local assets permanently from the album.
8741     *
8742     * @permission ohos.permission.WRITE_IMAGEVIDEO
8743     * @param { Context } context - Hap context information
8744     * @param { Array<string> } assetUris - Uris of the assets to be deleted permanently
8745     * @returns { Promise<void> } - Returns void
8746     * @throws { BusinessError } 201 - Permission denied
8747     * @throws { BusinessError } 202 - Called by non-system application
8748     * @throws { BusinessError } 13900020 - Invalid argument
8749     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
8750     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
8751     * @static
8752     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8753     * @systemapi
8754     * @since 19
8755     */
8756    static deleteLocalAssetsPermanentlyWithUri(context: Context, assetUris: Array<string>): Promise<void>;
8757  }
8758
8759  /**
8760   * Defines the class of media assets change request.
8761   *
8762   * @implements MediaChangeRequest
8763   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8764   * @systemapi
8765   * @since arkts {'1.1':'11','1.2':'20'}
8766   * @arkts 1.1&1.2
8767   */
8768  class MediaAssetsChangeRequest implements MediaChangeRequest {
8769    /**
8770     * Constructor.
8771     *
8772     * @param { Array<PhotoAsset> } assets - Assets to change.
8773     * @throws { BusinessError } 202 - Called by non-system application
8774     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8775     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8776     * @throws { BusinessError } 14000011 - System inner fail
8777     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8778     * @systemapi
8779     * @since arkts {'1.1':'11','1.2':'20'}
8780     * @arkts 1.1&1.2
8781     */
8782    constructor(assets: Array<PhotoAsset>);
8783
8784    /**
8785     * Set favorite state of the assets.
8786     *
8787     * @param { boolean } favoriteState - true: Put the assets into favorite album; false: Remove the assets from favorite album.
8788     * @throws { BusinessError } 202 - Called by non-system application
8789     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8790     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8791     * @throws { BusinessError } 14000011 - System inner fail
8792     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8793     * @systemapi
8794     * @since arkts {'1.1':'11','1.2':'20'}
8795     * @arkts 1.1&1.2
8796     */
8797    setFavorite(favoriteState: boolean): void;
8798
8799    /**
8800     * Set hidden state of the assets.
8801     *
8802     * @param { boolean } hiddenState - true: Put the assets into hidden album; false: Recover the assets from hidden album.
8803     * @throws { BusinessError } 202 - Called by non-system application
8804     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8805     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8806     * @throws { BusinessError } 14000011 - System inner fail
8807     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8808     * @systemapi
8809     * @since arkts {'1.1':'11','1.2':'20'}
8810     * @arkts 1.1&1.2
8811     */
8812    setHidden(hiddenState: boolean): void;
8813
8814    /**
8815     * Set user comment of the assets.
8816     *
8817     * @param { string } userComment - user comment info
8818     * @throws { BusinessError } 202 - Called by non-system application
8819     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8820     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8821     * @throws { BusinessError } 14000011 - System inner fail
8822     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8823     * @systemapi
8824     * @since arkts {'1.1':'11','1.2':'20'}
8825     * @arkts 1.1&1.2
8826     */
8827    setUserComment(userComment: string): void;
8828
8829    /**
8830     * Sets whether this asset is displayed in the Recent list.
8831     *
8832     * @param { boolean } isRencentShow - Whether this asset is displayed in the Recent list.
8833     * <br>The value true means this asset is displayed in the Recent list, and false means the opposite.
8834     * @throws { BusinessError } 202 - Called by non-system application
8835     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8836     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8837     * @throws { BusinessError } 14000011 - System inner fail
8838     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8839     * @systemapi
8840     * @since 18
8841     */
8842    setIsRecentShow(isRencentShow: boolean): void;
8843  }
8844
8845  /**
8846   * Defines the class of media album change request.
8847   *
8848   * @implements MediaChangeRequest
8849   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8850   * @since arkts {'1.1':'11','1.2':'20'}
8851   * @arkts 1.1&1.2
8852   */
8853  class MediaAlbumChangeRequest implements MediaChangeRequest {
8854    /**
8855     * The constructor to create a MediaAlbumChangeRequest instance.
8856     *
8857     * @param { Album } album - Specify which album to change
8858     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8859     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8860     * @throws { BusinessError } 14000011 - System inner fail
8861     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8862     * @since arkts {'1.1':'11','1.2':'20'}
8863     * @arkts 1.1&1.2
8864     */
8865    constructor(album: Album);
8866
8867    /**
8868     * Creates a MediaAlbumChangeRequest instance.
8869     *
8870     * @param { Context } context - Context of the ability instance.
8871     * @param { string } name - Name of the album.
8872     * @returns { MediaAlbumChangeRequest } - Returns a MediaAlbumChangeRequest instance
8873     * @throws { BusinessError } 202 - Called by non-system application
8874     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8875     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8876     * @throws { BusinessError } 14000011 - System inner fail
8877     * @static
8878     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8879     * @systemapi
8880     * @since arkts {'1.1':'11','1.2':'20'}
8881     * @arkts 1.1&1.2
8882     */
8883    static createAlbumRequest(context: Context, name: string): MediaAlbumChangeRequest;
8884
8885    /**
8886     * Deletes albums. This API uses a promise to return the result.
8887     *
8888     * @permission ohos.permission.WRITE_IMAGEVIDEO
8889     * @param { Context } context - Context of the ability instance.
8890     * @param { Array<Album> } albums - Albums to delete.
8891     * @returns { Promise<void> } - Returns void
8892     * @throws { BusinessError } 201 - Permission denied
8893     * @throws { BusinessError } 202 - Called by non-system application
8894     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8895     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8896     * @throws { BusinessError } 14000011 - System inner fail
8897     * @static
8898     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8899     * @systemapi
8900     * @since arkts {'1.1':'11','1.2':'20'}
8901     * @arkts 1.1&1.2
8902     */
8903    static deleteAlbums(context: Context, albums: Array<Album>): Promise<void>;
8904
8905    /**
8906     * Delete albums With Uri.
8907     *
8908     * @permission ohos.permission.WRITE_IMAGEVIDEO
8909     * @param { Context } context - Hap context information
8910     * @param { Array<string> } albumUris - Uris of albums to delete
8911     * @returns { Promise<void> } - Returns void
8912     * @throws { BusinessError } 201 - Permission denied
8913     * @throws { BusinessError } 202 - Called by non-system application
8914     * @throws { BusinessError } 13900020 - Invalid argument
8915     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
8916     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out;
8917     * @static
8918     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8919     * @systemapi
8920     * @since 19
8921     */
8922    static deleteAlbumsWithUri(context: Context, albumUris: Array<string>): Promise<void>;
8923
8924    /**
8925     * Obtains the album in the current album change request.
8926     *
8927     * @returns { Album } - Returns the album
8928     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8929     * <br>2. Incorrect parameter types.
8930     * @throws { BusinessError } 14000011 - System inner fail
8931     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8932     * @since arkts {'1.1':'11','1.2':'20'}
8933     * @arkts 1.1&1.2
8934     */
8935    getAlbum(): Album;
8936
8937    /**
8938     * Sets the album cover.
8939     *
8940     * @param { string } coverUri - URI of the file to be set as the album cover.
8941     * @throws { BusinessError } 202 - Called by non-system application
8942     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8943     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8944     * @throws { BusinessError } 14000011 - System inner fail
8945     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8946     * @systemapi
8947     * @since arkts {'1.1':'11','1.2':'20'}
8948     * @arkts 1.1&1.2
8949     */
8950    setCoverUri(coverUri: string): void;
8951
8952    /**
8953     * Sets the album name.
8954     *
8955     * @param { string } name - Album name to set.
8956     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8957     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8958     * @throws { BusinessError } 14000011 - System inner fail
8959     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8960     * @since arkts {'1.1':'11','1.2':'20'}
8961     * @arkts 1.1&1.2
8962     */
8963    setAlbumName(name: string): void;
8964
8965    /**
8966     * Add assets to the album.
8967     *
8968     * @param { Array<PhotoAsset> } assets - Array of assets to add.
8969     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8970     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8971     * @throws { BusinessError } 14000011 - System inner fail
8972     * @throws { BusinessError } 14000016 - Operation Not Support
8973     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8974     * @since arkts {'1.1':'11','1.2':'20'}
8975     * @arkts 1.1&1.2
8976     */
8977    addAssets(assets: Array<PhotoAsset>): void;
8978
8979    /**
8980     * Removes assets from the album.
8981     *
8982     * @param { Array<PhotoAsset> } assets - Array of assets to remove.
8983     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
8984     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
8985     * @throws { BusinessError } 14000011 - System inner fail
8986     * @throws { BusinessError } 14000016 - Operation Not Support
8987     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
8988     * @since arkts {'1.1':'11','1.2':'20'}
8989     * @arkts 1.1&1.2
8990     */
8991    removeAssets(assets: Array<PhotoAsset>): void;
8992
8993    /**
8994     * Moves assets to another album.
8995     *
8996     * @param { Array<PhotoAsset> } assets - Assets to move.
8997     * @param { Album } targetAlbum - Album to which the assets are to be moved.
8998     * @throws { BusinessError } 202 - Called by non-system application
8999     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9000     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9001     * @throws { BusinessError } 14000011 - System inner fail
9002     * @throws { BusinessError } 14000016 - Operation Not Support
9003     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9004     * @systemapi
9005     * @since arkts {'1.1':'11','1.2':'20'}
9006     * @arkts 1.1&1.2
9007     */
9008    moveAssets(assets: Array<PhotoAsset>, targetAlbum: Album): void;
9009
9010    /**
9011     * Move assets to the target album.
9012     *
9013     * @param { Array<string> } assetUris - Uris of assets to move
9014     * @param { Album } targetAlbum - target album
9015     * @throws { BusinessError } 202 - Called by non-system application
9016     * @throws { BusinessError } 13900020 - Invalid argument
9017     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
9018     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9019     * @throws { BusinessError } 14000016 - Operation Not Support
9020     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9021     * @systemapi
9022     * @since 19
9023     */
9024    moveAssetsWithUri(assetUris: Array<string>, targetAlbum: Album): void;
9025
9026    /**
9027     * Recovers assets from the trash.
9028     *
9029     * @param { Array<PhotoAsset> } assets - Assets to recover.
9030     * @throws { BusinessError } 202 - Called by non-system application
9031     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9032     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9033     * @throws { BusinessError } 14000011 - System inner fail
9034     * @throws { BusinessError } 14000016 - Operation Not Support
9035     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9036     * @systemapi
9037     * @since arkts {'1.1':'11','1.2':'20'}
9038     * @arkts 1.1&1.2
9039     */
9040    recoverAssets(assets: Array<PhotoAsset>): void;
9041
9042    /**
9043     * Recover assets from the trash album.
9044     *
9045     * @param { Array<string> } assetUris - Uris of assets to recover
9046     * @throws { BusinessError } 202 - Called by non-system application
9047     * @throws { BusinessError } 13900020 - Invalid argument
9048     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
9049     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9050     * @throws { BusinessError } 14000016 - Operation Not Support
9051     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9052     * @systemapi
9053     * @since 19
9054     */
9055    recoverAssetsWithUri(assetUris: Array<string>): void;
9056
9057    /**
9058     * Permanently deletes assets from the trash.
9059     *
9060     * @param { Array<PhotoAsset> } assets - Assets to be permanently deleted.
9061     * @throws { BusinessError } 202 - Called by non-system application
9062     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9063     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9064     * @throws { BusinessError } 14000011 - System inner fail
9065     * @throws { BusinessError } 14000016 - Operation Not Support
9066     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9067     * @systemapi
9068     * @since arkts {'1.1':'11','1.2':'20'}
9069     * @arkts 1.1&1.2
9070     */
9071    deleteAssets(assets: Array<PhotoAsset>): void;
9072
9073    /**
9074     * Delete assets permanently from the trash album.
9075     *
9076     * @param { Array<string> } assetUris - Uris of assets to be deleted permanently
9077     * @throws { BusinessError } 202 - Called by non-system application
9078     * @throws { BusinessError } 13900020 - Invalid argument
9079     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
9080     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9081     * @throws { BusinessError } 14000016 - Operation Not Support
9082     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9083     * @systemapi
9084     * @since 19
9085     */
9086    deleteAssetsWithUri(assetUris: Array<string>): void;
9087
9088    /**
9089     * Set portrait album to me
9090     *
9091     * @throws { BusinessError } 202 - Called by non-system application
9092     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9093     * <br>2. Incorrect parameter types.
9094     * @throws { BusinessError } 14000011 - System inner fail
9095     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9096     * @systemapi
9097     * @since arkts {'1.1':'11','1.2':'20'}
9098     * @arkts 1.1&1.2
9099     */
9100    setIsMe(): void;
9101
9102    /**
9103     * Set display level of the portrait album
9104     *
9105     * @param { number } displayLevel - The level of display interface for portrait albums, such as homepage and more pages
9106     * @throws { BusinessError } 202 - Called by non-system application
9107     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9108     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9109     * @throws { BusinessError } 14000011 - System inner fail
9110     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9111     * @systemapi
9112     * @since arkts {'1.1':'11','1.2':'20'}
9113     * @arkts 1.1&1.2
9114     */
9115    setDisplayLevel(displayLevel: number): void;
9116
9117    /**
9118     * Remove assets from the smart album
9119     *
9120     * @param { Array<PhotoAsset> } assets - Assets to remove.
9121     * @throws { BusinessError } 202 - Called by non-system application
9122     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9123     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9124     * @throws { BusinessError } 14000011 - System inner fail
9125     * @throws { BusinessError } 14000016 - Operation Not Support
9126     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9127     * @systemapi
9128     * @since arkts {'1.1':'11','1.2':'20'}
9129     * @arkts 1.1&1.2
9130     */
9131    dismissAssets(assets: Array<PhotoAsset>): void;
9132
9133    /**
9134     * Merge two portrait albums
9135     *
9136     * @param { Album } target - Album generated after the merge. The album must be renamed.
9137     * @throws { BusinessError } 202 - Called by non-system application
9138     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9139     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9140     * @throws { BusinessError } 14000011 - System inner fail
9141     * @throws { BusinessError } 14000016 - Operation Not Support
9142     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9143     * @systemapi
9144     * @since arkts {'1.1':'11','1.2':'20'}
9145     * @arkts 1.1&1.2
9146     */
9147    mergeAlbum(target: Album): void;
9148
9149    /**
9150     * Places this album before an album.
9151     *
9152     * @param { Album } album - Target album. To place this album to the end, set album to null.
9153     * @throws { BusinessError } 202 - Called by non-system application
9154     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9155     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9156     * @throws { BusinessError } 14000011 - System inner fail
9157     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9158     * @systemapi
9159     * @since arkts {'1.1':'11','1.2':'20'}
9160     * @arkts 1.1&1.2
9161     */
9162    placeBefore(album: Album): void;
9163
9164    /**
9165     * Removes this group photo album.
9166     *
9167     * @throws { BusinessError } 202 - Called by non-system application
9168     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9169     * <br>2. Incorrect parameter types.
9170     * @throws { BusinessError } 14000011 - System inner fail
9171     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9172     * @systemapi
9173     * @since arkts {'1.1':'13','1.2':'20'}
9174     * @arkts 1.1&1.2
9175     */
9176    dismiss(): void;
9177
9178    /**
9179     * reset the album cover.
9180     *
9181     * @throws { BusinessError } 202 - Called by non-system application
9182     * @throws { BusinessError } 23800301 - Internal system error.It is recommended to retry and check the logs.
9183     * <br>Possible causes:1. Database corrupted.2. The file system is abnormal.3. The IPC request timed out.
9184     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9185     * @systemapi
9186     * @since 20
9187     * @arkts 1.1&1.2
9188     */
9189    resetCoverUri(): void;
9190  }
9191
9192  /**
9193   * Defines the shared photo asset
9194   *
9195   * @interface SharedPhotoAsset
9196   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9197   * @systemapi
9198   * @since arkts {'1.1':'13','1.2':'20'}
9199   * @arkts 1.1&1.2
9200   */
9201  interface SharedPhotoAsset {
9202    /**
9203     * File id of photo asset
9204     *
9205     * @type { number }
9206     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9207     * @systemapi
9208     * @since arkts {'1.1':'13','1.2':'20'}
9209     * @arkts 1.1&1.2
9210     */
9211    fileId: number;
9212    /**
9213     * URI of photo asset
9214     *
9215     * @type { string }
9216     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9217     * @systemapi
9218     * @since arkts {'1.1':'13','1.2':'20'}
9219     * @arkts 1.1&1.2
9220     */
9221    uri: string;
9222    /**
9223     * Path data of photo asset
9224     *
9225     * @type { string }
9226     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9227     * @systemapi
9228     * @since arkts {'1.1':'13','1.2':'20'}
9229     * @arkts 1.1&1.2
9230     */
9231    data: string;
9232    /**
9233     * Media type of photo asset
9234     *
9235     * @type { PhotoType }
9236     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9237     * @systemapi
9238     * @since arkts {'1.1':'13','1.2':'20'}
9239     * @arkts 1.1&1.2
9240     */
9241    mediaType: PhotoType;
9242    /**
9243     * Display name of photo asset
9244     *
9245     * @type { string }
9246     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9247     * @systemapi
9248     * @since arkts {'1.1':'13','1.2':'20'}
9249     * @arkts 1.1&1.2
9250     */
9251    displayName: string;
9252    /**
9253     * Size of photo asset
9254     *
9255     * @type { number }
9256     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9257     * @systemapi
9258     * @since arkts {'1.1':'13','1.2':'20'}
9259     * @arkts 1.1&1.2
9260     */
9261    size: number;
9262    /**
9263     * Added date of photo asset
9264     *
9265     * @type { number }
9266     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9267     * @systemapi
9268     * @since arkts {'1.1':'13','1.2':'20'}
9269     * @arkts 1.1&1.2
9270     */
9271    dateAdded: number;
9272    /**
9273     * Modify date of photo asset
9274     *
9275     * @type { number }
9276     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9277     * @systemapi
9278     * @since arkts {'1.1':'13','1.2':'20'}
9279     * @arkts 1.1&1.2
9280     */
9281    dateModified: number;
9282    /**
9283     * Duration of video photo asset
9284     *
9285     * @type { number }
9286     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9287     * @systemapi
9288     * @since arkts {'1.1':'13','1.2':'20'}
9289     * @arkts 1.1&1.2
9290     */
9291    duration: number;
9292    /**
9293     * Width of photo asset
9294     *
9295     * @type { number }
9296     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9297     * @systemapi
9298     * @since arkts {'1.1':'13','1.2':'20'}
9299     * @arkts 1.1&1.2
9300     */
9301    width: number;
9302    /**
9303     * Height of photo asset
9304     *
9305     * @type { number }
9306     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9307     * @systemapi
9308     * @since arkts {'1.1':'13','1.2':'20'}
9309     * @arkts 1.1&1.2
9310     */
9311    height: number;
9312    /**
9313     * DateTaken of photo asset
9314     *
9315     * @type { number }
9316     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9317     * @systemapi
9318     * @since arkts {'1.1':'13','1.2':'20'}
9319     * @arkts 1.1&1.2
9320     */
9321    dateTaken: number;
9322    /**
9323     * Orientation of photo asset
9324     *
9325     * @type { number }
9326     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9327     * @systemapi
9328     * @since arkts {'1.1':'13','1.2':'20'}
9329     * @arkts 1.1&1.2
9330     */
9331    orientation: number;
9332    /**
9333     * Favorite state of photo asset
9334     *
9335     * @type { boolean }
9336     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9337     * @systemapi
9338     * @since arkts {'1.1':'13','1.2':'20'}
9339     * @arkts 1.1&1.2
9340     */
9341    isFavorite: boolean;
9342    /**
9343     * Title of photo asset
9344     *
9345     * @type { string }
9346     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9347     * @systemapi
9348     * @since arkts {'1.1':'13','1.2':'20'}
9349     * @arkts 1.1&1.2
9350     */
9351    title: string;
9352    /**
9353     * Position of photo asset
9354     *
9355     * @type { PositionType }
9356     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9357     * @systemapi
9358     * @since arkts {'1.1':'13','1.2':'20'}
9359     * @arkts 1.1&1.2
9360     */
9361    position: PositionType;
9362    /**
9363     * Trashed date of photo asset
9364     *
9365     * @type { number }
9366     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9367     * @systemapi
9368     * @since arkts {'1.1':'13','1.2':'20'}
9369     * @arkts 1.1&1.2
9370     */
9371    dateTrashed: number;
9372    /**
9373     * Hidden state of photo asset
9374     *
9375     * @type { boolean }
9376     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9377     * @systemapi
9378     * @since arkts {'1.1':'13','1.2':'20'}
9379     * @arkts 1.1&1.2
9380     */
9381    hidden: boolean;
9382    /**
9383     * User comment info of photo asset
9384     *
9385     * @type { string }
9386     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9387     * @systemapi
9388     * @since arkts {'1.1':'13','1.2':'20'}
9389     * @arkts 1.1&1.2
9390     */
9391    userComment: string;
9392    /**
9393     * Camera shot key of photo asset
9394     *
9395     * @type { string }
9396     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9397     * @systemapi
9398     * @since arkts {'1.1':'13','1.2':'20'}
9399     * @arkts 1.1&1.2
9400     */
9401    cameraShotKey: string;
9402    /**
9403     * The year of the file created
9404     *
9405     * @type { string }
9406     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9407     * @systemapi
9408     * @since arkts {'1.1':'13','1.2':'20'}
9409     * @arkts 1.1&1.2
9410     */
9411    dateYear: string;
9412    /**
9413     * The month of the file created
9414     *
9415     * @type { string }
9416     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9417     * @systemapi
9418     * @since arkts {'1.1':'13','1.2':'20'}
9419     * @arkts 1.1&1.2
9420     */
9421    dateMonth: string;
9422    /**
9423     * The day of the file created
9424     *
9425     * @type { string }
9426     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9427     * @systemapi
9428     * @since arkts {'1.1':'13','1.2':'20'}
9429     * @arkts 1.1&1.2
9430     */
9431    dateDay: string;
9432    /**
9433     * Pending state of the asset, true means asset is pending
9434     *
9435     * @type { boolean }
9436     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9437     * @systemapi
9438     * @since arkts {'1.1':'13','1.2':'20'}
9439     * @arkts 1.1&1.2
9440     */
9441    pending: boolean;
9442    /**
9443     * Added date of photo asset in milliseconds
9444     *
9445     * @type { number }
9446     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9447     * @systemapi
9448     * @since arkts {'1.1':'13','1.2':'20'}
9449     * @arkts 1.1&1.2
9450     */
9451    dateAddedMs: number;
9452    /**
9453     * Modified time of the asset in milliseconds
9454     *
9455     * @type { number }
9456     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9457     * @systemapi
9458     * @since arkts {'1.1':'13','1.2':'20'}
9459     * @arkts 1.1&1.2
9460     */
9461    dateModifiedMs: number;
9462    /**
9463     * Trashed time of the asset in milliseconds
9464     *
9465     * @type { number }
9466     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9467     * @systemapi
9468     * @since arkts {'1.1':'13','1.2':'20'}
9469     * @arkts 1.1&1.2
9470     */
9471    dateTrashedMs: number;
9472    /**
9473     * Subtype of photo asset
9474     *
9475     * @type { PhotoSubtype }
9476     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9477     * @systemapi
9478     * @since arkts {'1.1':'13','1.2':'20'}
9479     * @arkts 1.1&1.2
9480     */
9481    subtype: PhotoSubtype;
9482    /**
9483     * Effect mode of moving photo
9484     *
9485     * @type { MovingPhotoEffectMode }
9486     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9487     * @systemapi
9488     * @since arkts {'1.1':'13','1.2':'20'}
9489     * @arkts 1.1&1.2
9490     */
9491    movingPhotoEffectMode: MovingPhotoEffectMode;
9492    /**
9493     * Dynamic range type of the asset
9494     *
9495     * @type { DynamicRangeType }
9496     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9497     * @systemapi
9498     * @since arkts {'1.1':'13','1.2':'20'}
9499     * @arkts 1.1&1.2
9500     */
9501    dynamicRangeType: DynamicRangeType;
9502    /**
9503     * Ready state of thumbnail
9504     *
9505     * @type { boolean }
9506     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9507     * @systemapi
9508     * @since arkts {'1.1':'13','1.2':'20'}
9509     * @arkts 1.1&1.2
9510     */
9511    thumbnailReady: boolean;
9512    /**
9513     * Width and height information of lcd picture
9514     *
9515     * @type { string }
9516     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9517     * @systemapi
9518     * @since arkts {'1.1':'13','1.2':'20'}
9519     * @arkts 1.1&1.2
9520     */
9521    lcdSize: string;
9522    /**
9523     * Width and height information of thumbnail picture
9524     *
9525     * @type { string }
9526     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9527     * @systemapi
9528     * @since arkts {'1.1':'13','1.2':'20'}
9529     * @arkts 1.1&1.2
9530     */
9531    thmSize: string;
9532    /**
9533     * modified time of thumbnail status
9534     *
9535     * @type { ?number }
9536     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9537     * @systemapi
9538     * @since 14
9539     */
9540    thumbnailModifiedMs?: number;
9541    /**
9542     * visibility of thumbnails
9543     *
9544     * @type { ThumbnailVisibility }
9545     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9546     * @systemapi
9547     * @since 14
9548     */
9549    thumbnailVisible: ThumbnailVisibility;
9550  }
9551
9552  /**
9553   * Defines the shared album asset
9554   *
9555   * @interface SharedAlbumAsset
9556   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9557   * @systemapi
9558   * @since 14
9559   */
9560    interface SharedAlbumAsset {
9561      /**
9562       * album id of album asset
9563       *
9564       * @type { number }
9565       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9566       * @systemapi
9567       * @since 14
9568       */
9569      albumId: number;
9570      /**
9571       * type of album asset
9572       *
9573       * @type { AlbumType }
9574       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9575       * @systemapi
9576       * @since 14
9577       */
9578      albumType: AlbumType;
9579      /**
9580       * subtype of album asset
9581       *
9582       * @type { AlbumSubtype }
9583       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9584       * @systemapi
9585       * @since 14
9586       */
9587      albumSubType: AlbumSubtype;
9588      /**
9589       * album name
9590       *
9591       * @type { string }
9592       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9593       * @systemapi
9594       * @since 14
9595       */
9596      albumName: string;
9597      /**
9598       * uri of album cover
9599       *
9600       * @type { string }
9601       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9602       * @systemapi
9603       * @since 14
9604       */
9605      coverUri: string;
9606      /**
9607       * number of assets in this album
9608       *
9609       * @type { number }
9610       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9611       * @systemapi
9612       * @since 14
9613       */
9614      count: number;
9615      /**
9616       * number of photo assets in this album
9617       *
9618       * @type { number }
9619       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9620       * @systemapi
9621       * @since 14
9622       */
9623      imageCount: number;
9624      /**
9625       * number of video assets in this album
9626       *
9627       * @type { number }
9628       * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9629       * @systemapi
9630       * @since 14
9631       */
9632      videoCount: number;
9633    }
9634
9635  /**
9636   * Provides APIs for managing a moving photo instance.
9637   *
9638   * @interface MovingPhoto
9639   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9640   * @atomicservice
9641   * @since arkts {'1.1':'12','1.2':'20'}
9642   * @arkts 1.1&1.2
9643   */
9644  interface MovingPhoto {
9645    /**
9646     * Requests the image data and video data of this moving photo and writes them to the specified URIs, respectively.
9647     *
9648     * @permission ohos.permission.READ_IMAGEVIDEO
9649     * @param { string } imageFileUri - URI to which the image data of the moving photo is to be written.
9650     * @param { string } videoFileUri - URI to which the video data of the moving photo is to be written.
9651     * @returns { Promise<void> } Returns void
9652     * @throws { BusinessError } 201 - Permission denied
9653     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9654     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9655     * @throws { BusinessError } 14000011 - System inner fail
9656     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9657     * @atomicservice
9658     * @since arkts {'1.1':'12','1.2':'20'}
9659     * @arkts 1.1&1.2
9660     */
9661    requestContent(imageFileUri: string, videoFileUri: string): Promise<void>;
9662
9663    /**
9664     * Requests the moving photo content of the specified resource type and writes it to the specified URI.
9665     *
9666     * @permission ohos.permission.READ_IMAGEVIDEO
9667     * @param { ResourceType } resourceType - Resource type of the moving photo content to request.
9668     * @param { string } fileUri - URI to which the moving photo content is to be written.
9669     * @returns { Promise<void> } Returns void
9670     * @throws { BusinessError } 201 - Permission denied
9671     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9672     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9673     * @throws { BusinessError } 14000011 - System inner fail
9674     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9675     * @atomicservice
9676     * @since arkts {'1.1':'12','1.2':'20'}
9677     * @arkts 1.1&1.2
9678     */
9679    requestContent(resourceType: ResourceType, fileUri: string): Promise<void>;
9680
9681    /**
9682     * Requests the moving photo content of the specified resource type and returns it in ArrayBuffer format.
9683     *
9684     * @permission ohos.permission.READ_IMAGEVIDEO
9685     * @param { ResourceType } resourceType - Resource type of the moving photo content to request.
9686     * @returns { Promise<ArrayBuffer> } Returns array buffer of the content
9687     * @throws { BusinessError } 201 - Permission denied
9688     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9689     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9690     * @throws { BusinessError } 14000011 - System inner fail
9691     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9692     * @atomicservice
9693     * @since arkts {'1.1':'12','1.2':'20'}
9694     * @arkts 1.1&1.2
9695     */
9696    requestContent(resourceType: ResourceType): Promise<ArrayBuffer>;
9697
9698    /**
9699     * Obtains the URI of this moving photo.
9700     *
9701     * @returns { string } Returns uri of the moving photo
9702     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9703     * <br>2. Incorrect parameter types.
9704     * @throws { BusinessError } 14000011 - System inner fail
9705     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9706     * @atomicservice
9707     * @since arkts {'1.1':'12','1.2':'20'}
9708     * @arkts 1.1&1.2
9709     */
9710    getUri(): string;
9711
9712    /**
9713     * Check if the video of the moving photo is ready.
9714     *
9715     * @permission ohos.permission.READ_IMAGEVIDEO
9716     * @returns { Promise<boolean> } Returns whether the video is ready
9717     * @throws { BusinessError } 201 - Permission denied
9718     * @throws { BusinessError } 202 - Called by non-system application
9719     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
9720     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9721     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9722     * @systemapi
9723     * @since 20
9724     * @arkts 1.1&1.2
9725     */
9726    isVideoReady(): Promise<boolean>;
9727  }
9728
9729  /**
9730   * Enumerates the types of the highlights album information.
9731   *
9732   * @enum { number } HighlightAlbumInfoType
9733   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9734   * @systemapi
9735   * @since arkts {'1.1':'12','1.2':'20'}
9736   * @arkts 1.1&1.2
9737   */
9738  enum HighlightAlbumInfoType {
9739    /**
9740     * Cover information.
9741     *
9742     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9743     * @systemapi
9744     * @since arkts {'1.1':'12','1.2':'20'}
9745     * @arkts 1.1&1.2
9746     */
9747    COVER_INFO = 0,
9748    /**
9749     * Music information.
9750     *
9751     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9752     * @systemapi
9753     * @since arkts {'1.1':'12','1.2':'20'}
9754     * @arkts 1.1&1.2
9755     */
9756    PLAY_INFO
9757  }
9758
9759  /**
9760   * Enumerates the user behavior types of the highlights album.
9761   *
9762   * @enum { number } HighlightUserActionType
9763   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9764   * @systemapi
9765   * @since arkts {'1.1':'12','1.2':'20'}
9766   * @arkts 1.1&1.2
9767   */
9768  enum HighlightUserActionType {
9769    /**
9770     * Number of inserted pictures.
9771     *
9772     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9773     * @systemapi
9774     * @since arkts {'1.1':'12','1.2':'20'}
9775     * @arkts 1.1&1.2
9776     */
9777    INSERTED_PIC_COUNT = 0,
9778    /**
9779     * Number of removed pictures.
9780     *
9781     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9782     * @systemapi
9783     * @since arkts {'1.1':'12','1.2':'20'}
9784     * @arkts 1.1&1.2
9785     */
9786    REMOVED_PIC_COUNT,
9787    /**
9788     * Number of times that a full-length image in a highlights album is shared.
9789     *
9790     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9791     * @systemapi
9792     * @since arkts {'1.1':'12','1.2':'20'}
9793     * @arkts 1.1&1.2
9794     */
9795    SHARED_SCREENSHOT_COUNT,
9796    /**
9797     * Number of times that a highlights cover is shared.
9798     *
9799     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9800     * @systemapi
9801     * @since arkts {'1.1':'12','1.2':'20'}
9802     * @arkts 1.1&1.2
9803     */
9804    SHARED_COVER_COUNT,
9805    /**
9806     * Number of times that a highlights album is renamed.
9807     *
9808     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9809     * @systemapi
9810     * @since arkts {'1.1':'12','1.2':'20'}
9811     * @arkts 1.1&1.2
9812     */
9813    RENAMED_COUNT,
9814    /**
9815     * Number of times that a cover is changed.
9816     *
9817     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9818     * @systemapi
9819     * @since arkts {'1.1':'12','1.2':'20'}
9820     * @arkts 1.1&1.2
9821     */
9822    CHANGED_COVER_COUNT,
9823    /**
9824     * Number of times that the pictures in a highlights album are played.
9825     *
9826     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9827     * @systemapi
9828     * @since arkts {'1.1':'12','1.2':'20'}
9829     * @arkts 1.1&1.2
9830     */
9831    RENDER_VIEWED_TIMES = 100,
9832    /**
9833     * Time used to play the pictures in a highlights album.
9834     *
9835     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9836     * @systemapi
9837     * @since arkts {'1.1':'12','1.2':'20'}
9838     * @arkts 1.1&1.2
9839     */
9840    RENDER_VIEWED_DURATION,
9841    /**
9842     * Number of times that a highlights album is viewed.
9843     *
9844     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9845     * @systemapi
9846     * @since arkts {'1.1':'12','1.2':'20'}
9847     * @arkts 1.1&1.2
9848     */
9849    ART_LAYOUT_VIEWED_TIMES,
9850    /**
9851     * Time used to view a highlights album.
9852     *
9853     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9854     * @systemapi
9855     * @since arkts {'1.1':'12','1.2':'20'}
9856     * @arkts 1.1&1.2
9857     */
9858    ART_LAYOUT_VIEWED_DURATION
9859  }
9860
9861  /**
9862   * Enumerates thumbnail types.
9863   *
9864   * @enum { number } ThumbnailType
9865   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9866   * @systemapi
9867   * @since arkts {'1.1':'13','1.2':'20'}
9868   * @arkts 1.1&1.2
9869   */
9870  enum ThumbnailType {
9871    /**
9872     * LCD thumbnail
9873     *
9874     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9875     * @systemapi
9876     * @since arkts {'1.1':'13','1.2':'20'}
9877     * @arkts 1.1&1.2
9878     */
9879    LCD = 1,
9880    /**
9881     * THM thumbnail
9882     *
9883     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9884     * @systemapi
9885     * @since arkts {'1.1':'13','1.2':'20'}
9886     * @arkts 1.1&1.2
9887     */
9888    THM = 2
9889  }
9890
9891  /**
9892   * Defines the class of media analysis album change request.
9893   *
9894   * @extends MediaAlbumChangeRequest
9895   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9896   * @systemapi
9897   * @since 18
9898   */
9899   class MediaAnalysisAlbumChangeRequest extends MediaAlbumChangeRequest {
9900    /**
9901     * The constructor to create a MediaAnalysisAlbumChangeRequest instance.
9902     *
9903     * @param { Album } album - Album
9904     * @throws { BusinessError } 202 - Called by non-system application
9905     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9906     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9907     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9908     * @systemapi
9909     * @since 18
9910     */
9911    constructor(album: Album);
9912
9913    /**
9914     * Set order positions of assets in the album
9915     *
9916     * @permission ohos.permission.WRITE_IMAGEVIDEO
9917     * @param { Array<PhotoAsset> } assets - Assets in the album for which the sequence needs to be set.
9918     * @param { Array<number> } position - Sequence of assets in the album.
9919     * @throws { BusinessError } 201 - Permission denied
9920     * @throws { BusinessError } 202 - Called by non-system application
9921     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9922     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9923     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
9924     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9925     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9926     * @systemapi
9927     * @since 18
9928     */
9929    setOrderPosition(assets: Array<PhotoAsset>, position: Array<number>): void;
9930  }
9931
9932  /**
9933   * Analysis album to create.
9934   *
9935   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9936   * @systemapi
9937   * @since 18
9938   */
9939  class AnalysisAlbum {
9940    /**
9941     * The constructor to create an analysisAlbum instance.
9942     *
9943     * @param { Album } album - Album
9944     * @throws { BusinessError } 202 - Called by non-system application
9945     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9946     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9947     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9948     * @systemapi
9949     * @since 18
9950     */
9951    constructor(album: Album);
9952    /**
9953     * Obtains the sequence of assets in the Analysis album.
9954     *
9955     * @permission ohos.permission.READ_IMAGEVIDEO
9956     * @param { Array<PhotoAsset> } assets - Assets in the album whose sequence needs to be obtained.
9957     * @returns { Promise<Array<number>> } Returns the order of positions of assets
9958     * @throws { BusinessError } 201 - Permission denied
9959     * @throws { BusinessError } 202 - Called by non-system application
9960     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9961     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9962     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
9963     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
9964     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9965     * @systemapi
9966     * @since 18
9967     */
9968    getOrderPosition(assets: Array<PhotoAsset>): Promise<Array<number>>;
9969  }
9970
9971  /**
9972   * Provides APIs for managing the Highlights album, which is an automatically generated collection of memorable photos or videos.
9973   *
9974   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9975   * @systemapi
9976   * @since arkts {'1.1':'12','1.2':'20'}
9977   * @arkts 1.1&1.2
9978   */
9979  class HighlightAlbum {
9980    /**
9981     * The constructor to create a highlight instance.
9982     *
9983     * @param { Album } album - Analysis album
9984     * @throws { BusinessError } 202 - Called by non-system application
9985     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
9986     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
9987     * @throws { BusinessError } 14000011 - Internal system error
9988     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
9989     * @systemapi
9990     * @since 12
9991     */
9992    constructor(album: Album);
9993
9994    /**
9995     * Obtains specific information about the Highlights album.
9996     *
9997     * @permission ohos.permission.READ_IMAGEVIDEO
9998     * @param { HighlightAlbumInfoType } type - Type of the album information to obtain.
9999     * @returns { Promise<string> } Returns highlight album info into a json string
10000     * @throws { BusinessError } 201 - Permission denied
10001     * @throws { BusinessError } 202 - Called by non-system application
10002     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10003     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10004     * @throws { BusinessError } 14000011 - Internal system error
10005     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10006     * @systemapi
10007     * @since 12
10008     */
10009    getHighlightAlbumInfo(type: HighlightAlbumInfoType): Promise<string>;
10010
10011    /**
10012     * Obtains the ArrayBuffer for caching the specified asset.
10013     *
10014     * @permission ohos.permission.READ_IMAGEVIDEO
10015     * @param { string } resourceUri - URI of the asset to cache.
10016     * @returns { Promise<ArrayBuffer> } Returns array buffer of the content
10017     * @throws { BusinessError } 201 - Permission denied
10018     * @throws { BusinessError } 202 - Called by non-system application
10019     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10020     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10021     * @throws { BusinessError } 14000011 - Internal system error
10022     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10023     * @systemapi
10024     * @since 12
10025     */
10026    getHighlightResource(resourceUri: string): Promise<ArrayBuffer>;
10027
10028    /**
10029     * Sets the user behavior data for the Highlights album.
10030     *
10031     * @permission ohos.permission.WRITE_IMAGEVIDEO
10032     * @param { HighlightUserActionType } type - Type of the user behavior data to set.
10033     * @param { number } actionData - Behavior data.
10034     * @returns { Promise<void> } Returns void
10035     * @throws { BusinessError } 201 - Permission denied
10036     * @throws { BusinessError } 202 - Called by non-system application
10037     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10038     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10039     * @throws { BusinessError } 14000011 - Internal system error
10040     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10041     * @systemapi
10042     * @since 12
10043     */
10044    setHighlightUserActionData(type: HighlightUserActionType, actionData: number): Promise<void>;
10045
10046    /**
10047     * Set highlight sub title
10048     *
10049     * @permission ohos.permission.WRITE_IMAGEVIDEO
10050     * @param { string } subTitle - Highlight sub title
10051     * @returns { Promise<void> } Returns void
10052     * @throws { BusinessError } 201 - Permission denied
10053     * @throws { BusinessError } 202 - Called by non-system application
10054     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10055     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10056     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10057     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10058     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10059     * @systemapi
10060     * @since 18
10061     */
10062    setSubTitle(subTitle: string): Promise<void>;
10063
10064    /**
10065     * Deletes highlight albums.
10066     *
10067     * @permission ohos.permission.WRITE_IMAGEVIDEO
10068     * @param { Context } context - Context of the ability instance.
10069     * @param { Array<Album> } albums - Array of highlight albums to delete.
10070     * @returns { Promise<number> } Returns result of delete highlight album
10071     * @throws { BusinessError } 201 - Permission denied
10072     * @throws { BusinessError } 202 - Called by non-system application
10073     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10074     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10075     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10076     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10077     * @static
10078     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10079     * @systemapi
10080     * @since 18
10081     */
10082    static deleteHighlightAlbums(context: Context, albums: Array<Album>): Promise<number>;
10083  }
10084
10085  /**
10086   * Enumerates the cloud enhancement task states, which are returned by CloudEnhancementTaskState.
10087   *
10088   * @enum { number } CloudEnhancementTaskStage
10089   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10090   * @systemapi
10091   * @since arkts {'1.1':'13','1.2':'20'}
10092   * @arkts 1.1&1.2
10093   */
10094  enum CloudEnhancementTaskStage {
10095    /**
10096     * The cloud enhancement task is abnormal.
10097     *
10098     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10099     * @systemapi
10100     * @since arkts {'1.1':'13','1.2':'20'}
10101     * @arkts 1.1&1.2
10102     */
10103    TASK_STAGE_EXCEPTION = -1,
10104    /**
10105     * The cloud enhancement task is being prepared.
10106     *
10107     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10108     * @systemapi
10109     * @since arkts {'1.1':'13','1.2':'20'}
10110     * @arkts 1.1&1.2
10111     */
10112    TASK_STAGE_PREPARING,
10113    /**
10114     * The cloud enhancement task is uploading data.
10115     *
10116     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10117     * @systemapi
10118     * @since arkts {'1.1':'13','1.2':'20'}
10119     * @arkts 1.1&1.2
10120     */
10121    TASK_STAGE_UPLOADING,
10122    /**
10123     * The cloud enhancement task is being executed.
10124     *
10125     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10126     * @systemapi
10127     * @since arkts {'1.1':'13','1.2':'20'}
10128     * @arkts 1.1&1.2
10129     */
10130    TASK_STAGE_EXECUTING,
10131    /**
10132     * The cloud enhancement task is downloading data.
10133     *
10134     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10135     * @systemapi
10136     * @since arkts {'1.1':'13','1.2':'20'}
10137     * @arkts 1.1&1.2
10138     */
10139    TASK_STAGE_DOWNLOADING,
10140    /**
10141     * The cloud enhancement task failed.
10142     *
10143     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10144     * @systemapi
10145     * @since arkts {'1.1':'13','1.2':'20'}
10146     * @arkts 1.1&1.2
10147     */
10148    TASK_STAGE_FAILED,
10149    /**
10150     * The cloud enhancement task is complete.
10151     *
10152     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10153     * @systemapi
10154     * @since arkts {'1.1':'13','1.2':'20'}
10155     * @arkts 1.1&1.2
10156     */
10157    TASK_STAGE_COMPLETED
10158  }
10159
10160  /**
10161   * Represents the cloud enhancement task information,
10162   * which includes the cloud enhancement task state and other information related to certain states.
10163   *
10164   * @interface CloudEnhancementTaskState
10165   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10166   * @systemapi
10167   * @since arkts {'1.1':'13','1.2':'20'}
10168   * @arkts 1.1&1.2
10169   */
10170  interface CloudEnhancementTaskState {
10171    /**
10172     * Indicates the cloud enhancement task stage.
10173     *
10174     * @type { CloudEnhancementTaskStage }
10175     * @readonly
10176     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10177     * @systemapi
10178     * @since arkts {'1.1':'13','1.2':'20'}
10179     * @arkts 1.1&1.2
10180     */
10181    readonly taskStage: CloudEnhancementTaskStage;
10182    /**
10183     * Indicates the transferred file size.
10184     *
10185     * @type { ?number }
10186     * @readonly
10187     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10188     * @systemapi
10189     * @since arkts {'1.1':'13','1.2':'20'}
10190     * @arkts 1.1&1.2
10191     */
10192    readonly transferredFileSize?: number;
10193    /**
10194     * Indicates the total file size.
10195     *
10196     * @type { ?number }
10197     * @readonly
10198     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10199     * @systemapi
10200     * @since arkts {'1.1':'13','1.2':'20'}
10201     * @arkts 1.1&1.2
10202     */
10203    readonly totalFileSize?: number;
10204    /**
10205     * Indicates the expected duration of cloud enhancement queue time.
10206     *
10207     * @type { ?number }
10208     * @readonly
10209     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10210     * @systemapi
10211     * @since arkts {'1.1':'13','1.2':'20'}
10212     * @arkts 1.1&1.2
10213     */
10214    readonly expectedDuration?: number;
10215    /**
10216     * Status code when failed in cloud enhancement.
10217     *
10218     * @type { ?number }
10219     * @readonly
10220     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10221     * @systemapi
10222     * @since arkts {'1.1':'13','1.2':'20'}
10223     * @arkts 1.1&1.2
10224     */
10225    readonly statusCode?: number;
10226  }
10227
10228  /**
10229   * Provides APIs for cloud enhancement management,
10230   * including managing the tasks of generating AI-powered cloud enhancement photos
10231   * and obtaining the association between the original photos and AI cloud enhancement photos.
10232   *
10233   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10234   * @systemapi
10235   * @since arkts {'1.1':'13','1.2':'20'}
10236   * @arkts 1.1&1.2
10237   */
10238  class CloudEnhancement {
10239    /**
10240     * Obtains a cloud enhancement instance.
10241     *
10242     * @param { Context } context - Context of the ability instance.
10243     * @returns { CloudEnhancement } Returns cloud enhancement instance
10244     * @throws { BusinessError } 202 - Called by non-system application
10245     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10246     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10247     * @throws { BusinessError } 14000011 - Internal system error
10248     * @static
10249     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10250     * @systemapi
10251     * @since arkts {'1.1':'13','1.2':'20'}
10252     * @arkts 1.1&1.2
10253     */
10254    static getCloudEnhancementInstance(context: Context): CloudEnhancement;
10255
10256    /**
10257     * Submits cloud enhancement tasks.
10258     *
10259     * @permission ohos.permission.WRITE_IMAGEVIDEO
10260     * @param { Array<PhotoAsset> } photoAssets - PhotoAsset to enhance.
10261     * @param { boolean } hasCloudWatermark - Whether to add a cloud enhancement watermark to the enhanced images.
10262     * @returns { Promise<void> } Returns void
10263     * @throws { BusinessError } 201 - Permission denied
10264     * @throws { BusinessError } 202 - Called by non-system application
10265     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10266     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10267     * @throws { BusinessError } 14000011 - Internal system error
10268     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10269     * @systemapi
10270     * @since 13
10271     */
10272    submitCloudEnhancementTasks(photoAssets: Array<PhotoAsset>, hasCloudWatermark: boolean): Promise<void>;
10273
10274    /**
10275     * Submits cloud enhancement tasks.
10276     *
10277     * @permission ohos.permission.WRITE_IMAGEVIDEO
10278     * @param { Array<PhotoAsset> } photoAssets - PhotoAsset to enhance.
10279     * @param { boolean } hasCloudWatermark - Whether to add a cloud watermark to the enhanced image.
10280     * The value true means to add the watermark, and false means the opposite.
10281     * @param { number } [triggerMode] - Trigger mode of the cloud enhancement task.
10282     * 0: manually triggered. 1: automatically triggered. The default value is 0.
10283     * @returns { Promise<void> } Returns void
10284     * @throws { BusinessError } 201 - Permission denied
10285     * @throws { BusinessError } 202 - Called by non-system application
10286     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10287     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10288     * @throws { BusinessError } 14000011 - Internal system error
10289     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10290     * @systemapi
10291     * @since 18
10292     */
10293    submitCloudEnhancementTasks(
10294      photoAssets: Array<PhotoAsset>,
10295      hasCloudWatermark: boolean,
10296      triggerMode?: number
10297    ): Promise<void>;
10298
10299    /**
10300     * Prioritizes a cloud enhancement task.
10301     *
10302     * @permission ohos.permission.WRITE_IMAGEVIDEO
10303     * @param { PhotoAsset } photoAsset - PhotoAsset whose cloud enhancement priority needs to be escalated.
10304     * @returns { Promise<void> } Returns void
10305     * @throws { BusinessError } 201 - Permission denied
10306     * @throws { BusinessError } 202 - Called by non-system application
10307     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10308     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10309     * @throws { BusinessError } 14000011 - Internal system error
10310     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10311     * @systemapi
10312     * @since 13
10313     */
10314    prioritizeCloudEnhancementTask(photoAsset: PhotoAsset): Promise<void>;
10315
10316    /**
10317     * Cancels cloud enhancement tasks.
10318     *
10319     * @permission ohos.permission.WRITE_IMAGEVIDEO
10320     * @param { Array<PhotoAsset> } photoAssets - Array of PhotoAssets whose cloud enhancement tasks are to be canceled.
10321     * @returns { Promise<void> } Returns void
10322     * @throws { BusinessError } 201 - Permission denied
10323     * @throws { BusinessError } 202 - Called by non-system application
10324     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10325     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10326     * @throws { BusinessError } 14000011 - Internal system error
10327     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10328     * @systemapi
10329     * @since 13
10330     */
10331    cancelCloudEnhancementTasks(photoAssets: Array<PhotoAsset>): Promise<void>;
10332
10333    /**
10334     * Cancels all cloud enhancement tasks.
10335     *
10336     * @permission ohos.permission.WRITE_IMAGEVIDEO
10337     * @returns { Promise<void> } Returns void
10338     * @throws { BusinessError } 201 - Permission denied
10339     * @throws { BusinessError } 202 - Called by non-system application
10340     * @throws { BusinessError } 14000011 - Internal system error
10341     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10342     * @systemapi
10343     * @since 13
10344     */
10345    cancelAllCloudEnhancementTasks(): Promise<void>;
10346
10347    /**
10348     * Queries information about a cloud enhancement task.
10349     *
10350     * @permission ohos.permission.READ_IMAGEVIDEO
10351     * @param { PhotoAsset } photoAsset - PhotoAsset whose cloud enhancement task information is to be queried.
10352     * @returns { Promise<CloudEnhancementTaskState> } Returns cloud enhancement task state
10353     * @throws { BusinessError } 201 - Permission denied
10354     * @throws { BusinessError } 202 - Called by non-system application
10355     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10356     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10357     * @throws { BusinessError } 14000011 - Internal system error
10358     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10359     * @systemapi
10360     * @since 13
10361     */
10362    queryCloudEnhancementTaskState(photoAsset: PhotoAsset): Promise<CloudEnhancementTaskState>;
10363
10364    /**
10365     * Synchronizes the cloud enhancement task status.
10366     *
10367     * @permission ohos.permission.READ_IMAGEVIDEO
10368     * @returns { Promise<void> } Returns void
10369     * @throws { BusinessError } 201 - Permission denied
10370     * @throws { BusinessError } 202 - Called by non-system application
10371     * @throws { BusinessError } 14000011 - Internal system error
10372     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10373     * @systemapi
10374     * @since 13
10375     */
10376    syncCloudEnhancementTaskStatus(): Promise<void>;
10377
10378    /**
10379     * Obtains the photo after cloud enhancement.
10380     *
10381     * @permission ohos.permission.READ_IMAGEVIDEO
10382     * @param { PhotoAsset } asset - PhotoAsset whose cloud enhancement photo is to be obtained.
10383     * @returns { Promise<PhotoAsset> } Returns cloud-enhanced asset
10384     * @throws { BusinessError } 201 - Permission denied
10385     * @throws { BusinessError } 202 - Called by non-system application
10386     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10387     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10388     * @throws { BusinessError } 14000011 - Internal system error
10389     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10390     * @systemapi
10391     * @since 13
10392     */
10393    getCloudEnhancementPair(asset: PhotoAsset): Promise<PhotoAsset>;
10394  }
10395
10396  /**
10397   * Enumerates the cloud enhancement states.
10398   *
10399   * @enum { number } CloudEnhancementState
10400   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10401   * @systemapi
10402   * @since arkts {'1.1':'13','1.2':'20'}
10403   * @arkts 1.1&1.2
10404   */
10405  enum CloudEnhancementState {
10406    /**
10407     * Cloud enhancement is unavailable.
10408     *
10409     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10410     * @systemapi
10411     * @since arkts {'1.1':'13','1.2':'20'}
10412     * @arkts 1.1&1.2
10413     */
10414    UNAVAILABLE = 0,
10415    /**
10416     * Cloud enhancement is available.
10417     *
10418     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10419     * @systemapi
10420     * @since arkts {'1.1':'13','1.2':'20'}
10421     * @arkts 1.1&1.2
10422     */
10423    AVAILABLE,
10424    /**
10425     * Cloud enhancement is being executed.
10426     *
10427     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10428     * @systemapi
10429     * @since arkts {'1.1':'13','1.2':'20'}
10430     * @arkts 1.1&1.2
10431     */
10432    EXECUTING,
10433    /**
10434     * Cloud enhancement has been completed.
10435     *
10436     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10437     * @systemapi
10438     * @since arkts {'1.1':'13','1.2':'20'}
10439     * @arkts 1.1&1.2
10440     */
10441    COMPLETED
10442  }
10443
10444  /**
10445   * Enumerates the statuses of tasks used for downloading cloud media assets.
10446   *
10447   * @enum { number } CloudMediaAssetTaskStatus
10448   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10449   * @systemapi
10450   * @since 14
10451   */
10452  enum CloudMediaAssetTaskStatus {
10453    /**
10454     * The task is in progress.
10455     *
10456     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10457     * @systemapi
10458     * @since 14
10459     */
10460    DOWNLOADING = 0,
10461    /**
10462     * The task is paused.
10463     *
10464     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10465     * @systemapi
10466     * @since 14
10467     */
10468    PAUSED = 1,
10469    /**
10470     * There is no download task.
10471     *
10472     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10473     * @systemapi
10474     * @since 14
10475     */
10476    IDLE = 2
10477  }
10478
10479  /**
10480   * Enumerates the reasons why a cloud media asset download task is paused.
10481   *
10482   * @enum { number } CloudMediaTaskPauseCause
10483   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10484   * @systemapi
10485   * @since 14
10486   */
10487  enum CloudMediaTaskPauseCause {
10488    /**
10489     * The device temperature is excessively high.
10490     *
10491     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10492     * @systemapi
10493     * @since 14
10494     */
10495    NO_PAUSE = 0,
10496    /**
10497     * The device temperature is excessively high.
10498     *
10499     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10500     * @systemapi
10501     * @since 14
10502     */
10503    TEMPERATURE_LIMIT = 1,
10504    /**
10505     * Network traffic is restricted, and Wi-Fi is not available.
10506     *
10507     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10508     * @systemapi
10509     * @since 14
10510     */
10511    ROM_LIMIT = 2,
10512    /**
10513     * Network traffic is restricted, and Wi-Fi is not available.
10514     *
10515     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10516     * @systemapi
10517     * @since 14
10518     */
10519    NETWORK_FLOW_LIMIT = 3,
10520    /**
10521     * Power usage is restricted.
10522     *
10523     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10524     * @systemapi
10525     * @since 14
10526     */
10527    WIFI_UNAVAILABLE = 4,
10528    /**
10529     * Power usage is restricted.
10530     *
10531     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10532     * @systemapi
10533     * @since 14
10534     */
10535    POWER_LIMIT = 5,
10536    /**
10537     * The device is not in charging screen-off mode.
10538     *
10539     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10540     * @systemapi
10541     * @since 14
10542     */
10543    BACKGROUND_TASK_UNAVAILABLE = 6,
10544    /**
10545     * The user is making requests too frequently.
10546     *
10547     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10548     * @systemapi
10549     * @since 14
10550     */
10551    FREQUENT_USER_REQUESTS = 7,
10552    /**
10553     * There is an error with the cloud service.
10554     *
10555     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10556     * @systemapi
10557     * @since 14
10558     */
10559    CLOUD_ERROR = 8,
10560    /**
10561     * The download has been paused by the user.
10562     *
10563     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10564     * @systemapi
10565     * @since 14
10566     */
10567    USER_PAUSED = 9
10568  }
10569
10570  /**
10571   * Describes the details of a cloud media asset download task.
10572   * It is the return value of the API used by applications to obtain the cloud asset download task status.
10573   *
10574   * @interface CloudMediaAssetStatus
10575   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10576   * @systemapi
10577   * @since 14
10578   */
10579  interface CloudMediaAssetStatus {
10580    /**
10581     * Status of the download task.
10582     *
10583     * @type { CloudMediaAssetTaskStatus }
10584     * @readonly
10585     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10586     * @systemapi
10587     * @since 14
10588     */
10589    readonly taskStatus: CloudMediaAssetTaskStatus;
10590    /**
10591     * Total number of and size (measured in bytes) of the assets that have been downloaded,
10592     * and the total number and size (also measured in bytes) of the assets remaining to be downloaded.
10593     *
10594     * @type { string }
10595     * @readonly
10596     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10597     * @systemapi
10598     * @since 14
10599     */
10600    readonly taskInfo: string;
10601    /**
10602     * Reason why the download task is suspended.
10603     *
10604     * @type { CloudMediaTaskPauseCause }
10605     * @readonly
10606     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10607     * @systemapi
10608     * @since 14
10609     */
10610    readonly errorCode: CloudMediaTaskPauseCause;
10611  }
10612
10613  /**
10614   * Enumerates the types of download tasks.
10615   *
10616   * @enum { number } CloudMediaDownloadType
10617   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10618   * @systemapi
10619   * @since 14
10620   */
10621  enum CloudMediaDownloadType {
10622    /**
10623     * High-priority download, without the need for the device to switch to screen-off charging mode.
10624     *
10625     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10626     * @systemapi
10627     * @since 14
10628     */
10629    DOWNLOAD_FORCE = 0,
10630    /**
10631     * Low-priority download, demanding that device be in screen-off charging mode.
10632     *
10633     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10634     * @systemapi
10635     * @since 14
10636     */
10637    DOWNLOAD_GENTLE = 1
10638  }
10639
10640  /**
10641   * Enumerates the modes used for deleting cloud media assets.
10642   *
10643   * @enum { number } CloudMediaRetainType
10644   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10645   * @systemapi
10646   * @since 14
10647   */
10648  enum CloudMediaRetainType {
10649    /**
10650     * Deletes the local metadata and thumbnail of the original files from the cloud.
10651     *
10652     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10653     * @systemapi
10654     * @since 14
10655     */
10656    RETAIN_FORCE = 0
10657  }
10658
10659  /**
10660   * A class used for cloud media asset management. It is used to manage download tasks for media assets stored
10661   * in the cloud and delete local data and files pertaining to these cloud-based assets.
10662   *
10663   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10664   * @systemapi
10665   * @since 14
10666   */
10667  class CloudMediaAssetManager {
10668    /**
10669     * Obtains a CloudMediaAssetManager instance.
10670     *
10671     * @param { Context } context - Obtains a CloudMediaAssetManager instance.
10672     * @returns { CloudMediaAssetManager } Returns cloud media asset manager instance
10673     * @throws { BusinessError } 202 - Called by non-system application
10674     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10675     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10676     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10677     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10678     * @static
10679     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10680     * @systemapi
10681     * @since 14
10682     */
10683    static getCloudMediaAssetManagerInstance(context: Context): CloudMediaAssetManager;
10684
10685    /**
10686     * Starts or resumes a task to download cloud media assets.
10687     *
10688     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
10689     * @param { CloudMediaDownloadType } downloadType - Type of the download task.
10690     * @returns { Promise<void> } Returns void
10691     * @throws { BusinessError } 201 - Permission denied
10692     * @throws { BusinessError } 202 - Called by non-system application
10693     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10694     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10695     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10696     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10697     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10698     * @systemapi
10699     * @since 14
10700     */
10701    startDownloadCloudMedia(downloadType: CloudMediaDownloadType): Promise<void>;
10702
10703    /**
10704     * Suspends a task that downloads cloud media assets.
10705     *
10706     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
10707     * @returns { Promise<void> } Returns void
10708     * @throws { BusinessError } 201 - Permission denied
10709     * @throws { BusinessError } 202 - Called by non-system application
10710     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10711     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10712     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10713     * @systemapi
10714     * @since 14
10715     */
10716    pauseDownloadCloudMedia(): Promise<void>;
10717
10718    /**
10719     * Cancels a task that downloads cloud media assets.
10720     *
10721     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
10722     * @returns { Promise<void> } Returns void
10723     * @throws { BusinessError } 201 - Permission denied
10724     * @throws { BusinessError } 202 - Called by non-system application
10725     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10726     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10727     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10728     * @systemapi
10729     * @since 14
10730     */
10731    cancelDownloadCloudMedia(): Promise<void>;
10732
10733    /**
10734     * Deletes local metadata and files of cloud media assets.
10735     *
10736     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
10737     * @param { CloudMediaRetainType } retainType - Mode for deleting cloud media assets.
10738     * @returns { Promise<void> } Returns void
10739     * @throws { BusinessError } 201 - Permission denied
10740     * @throws { BusinessError } 202 - Called by non-system application
10741     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
10742     * <br>2. Incorrect parameter types; 3. Parameter verification failed.
10743     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10744     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10745     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10746     * @systemapi
10747     * @since 14
10748     */
10749    retainCloudMediaAsset(retainType: CloudMediaRetainType): Promise<void>;
10750
10751    /**
10752     * Obtains the status of a task that downloads cloud media assets.
10753     *
10754     * @permission ohos.permission.READ_IMAGEVIDEO
10755     * @returns { Promise<CloudMediaAssetStatus> } Returns cloud media asset status
10756     * @throws { BusinessError } 201 - Permission denied
10757     * @throws { BusinessError } 202 - Called by non-system application
10758     * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs.
10759     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10760     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10761     * @systemapi
10762     * @since 14
10763     */
10764    getCloudMediaAssetStatus(): Promise<CloudMediaAssetStatus>;
10765  }
10766
10767  /**
10768   * Custom record of media asset.
10769   *
10770   * @interface PhotoAssetCustomRecord
10771   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10772   * @systemapi
10773   * @since 20
10774   */
10775  interface PhotoAssetCustomRecord {
10776    /**
10777     * Indicates the media asset file Id.
10778     * It must be must be greater than 0.
10779     *
10780     * @type { number }
10781     * @readonly
10782     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10783     * @systemapi
10784     * @since 20
10785     */
10786    readonly fileId: number;
10787    /**
10788     * Indicates the media asset share count.
10789     * It must be must be greater than 0.
10790     *
10791     * @type { number }
10792     * @readonly
10793     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10794     * @systemapi
10795     * @since 20
10796     */
10797    readonly shareCount: number;
10798    /**
10799     * Indicates the media asset lcd jump count.
10800     * It must be must be greater than 0.
10801     *
10802     * @type { number }
10803     * @readonly
10804     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10805     * @systemapi
10806     * @since 20
10807     */
10808    readonly lcdJumpCount: number;
10809  }
10810
10811  /**
10812   * Defines the class of media asset custom record manager.
10813   *
10814   * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10815   * @systemapi
10816   * @since 20
10817   */
10818  class PhotoAssetCustomRecordManager {
10819    /**
10820     * Get media asset custom record manager instance.
10821     *
10822     * @param { Context } context - Context of the ability instance.
10823     * @returns { PhotoAssetCustomRecordManager } Returns media asset custom record manager instance
10824     * @throws { BusinessError } 202 - Called by non-system application
10825     * @throws { BusinessError } 23800107 - Context is invalid
10826     * @static
10827     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10828     * @systemapi
10829     * @since 20
10830     */
10831    static getCustomRecordManagerInstance(context: Context): PhotoAssetCustomRecordManager;
10832    /**
10833     * A maximum of 200 custom records can be created at once.
10834     *
10835     * @param { Array<PhotoAssetCustomRecord> } customRecords - Custom records
10836     * @returns { Promise<void> } Returns void
10837     * @throws { BusinessError } 202 - Called by non-system application
10838     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification. Possible causes:
10839     * <br>1. The value range of mandatory parameters in photoAssetCustomRecord does not meet the requirements.
10840     * <br>2. The transferred record already exists. 3. The number of transferred records exceeds 200.
10841     * PhotoAssetCustomRecord param out of line; 2. PhotoAssetCustomRecord already exists ; 3. array length is over 200.
10842     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10843     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10844     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10845     * @systemapi
10846     * @since 20
10847     */
10848    createCustomRecords(customRecords: Array<PhotoAssetCustomRecord>): Promise<void>;
10849    /**
10850     * Get custom records.
10851     *
10852     * @param { FetchOptions } optionCheck - Options to fetch custom records.
10853     * @returns { Promise<FetchResult<PhotoAssetCustomRecord>> } Returns fetchResult of PhotoAssetCustomRecord
10854     * @throws { BusinessError } 202 - Called by non-system application
10855     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification. Possible causes:
10856     * 1. The fileter criteria or fetchColumns that are not supported by options are transferred.
10857     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10858     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10859     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10860     * @systemapi
10861     * @since 20
10862     */
10863    getCustomRecords(optionCheck: FetchOptions): Promise<FetchResult<PhotoAssetCustomRecord>>;
10864    /**
10865     * Set custom records.
10866     * A maximum of 200 custom records can be set at once.
10867     *
10868     * @param { Array<PhotoAssetCustomRecord> } customRecords - Custom records.
10869     * @returns { Promise<Array<number>> } Returns list of fileId in photoAssetCustomRecord which set failed
10870     * @throws { BusinessError } 202 - Called by non-system application
10871     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification.Possible causes:
10872     * <br>1. The value range of mandatory parameters in photoAssetCustomRecord does not meet the requirements.
10873     * <br>2. The number of transferred records exceeds 200.
10874     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10875     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10876     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10877     * @systemapi
10878     * @since 20
10879     */
10880    setCustomRecords(customRecords: Array<PhotoAssetCustomRecord>): Promise<Array<number>>;
10881    /**
10882     * Remove custom records.
10883     *
10884     * @param { FetchOptions } optionCheck - Options to remove custom records.
10885     * @returns { Promise<void> } Returns void
10886     * @throws { BusinessError } 202 - Called by non-system application
10887     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification. Possible causes:
10888     * <br>1. The fileter criteria or fetchColumns that are not supported by options are transferred.
10889     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10890     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10891     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10892     * @systemapi
10893     * @since 20
10894     */
10895    removeCustomRecords(optionCheck: FetchOptions): Promise<void>;
10896    /**
10897     * Add share count which fileId is in ids.
10898     * A maximum of 500 ids can be set at once.
10899     *
10900     * @param { Array<number> } ids - ids which need to add share count.
10901     * @returns {Promise<Array<number>> } Returns list of fileId which add failed
10902     * @throws { BusinessError } 202 - Called by non-system application
10903     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification. Possible causes:
10904     * <br>1. The ids list is empty; 2. The number of ids lists exceeds 500.
10905     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10906     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10907     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10908     * @systemapi
10909     * @since 20
10910     */
10911    addShareCount(ids: Array<number>): Promise<Array<number>>;
10912    /**
10913     * Add lcd jump count which fileId is in ids.
10914     * A maximum of 500 ids can be set at once.
10915     *
10916     * @param { Array<number> } ids - ids which need to add lcd jump count.
10917     * @returns {Promise<Array<number>> } Returns list of fileId which add failed
10918     * @throws { BusinessError } 202 - Called by non-system application
10919     * @throws { BusinessError } 23800151 - Scenario parameters fail to pass the verification. Possible causes:
10920     * <br>1. The ids list is empty; 2. The number of ids lists exceeds 500.
10921     * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs.
10922     * <br>Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out.
10923     * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
10924     * @systemapi
10925     * @since 20
10926     */
10927    addLcdJumpCount(ids: Array<number>): Promise<Array<number>>;
10928  }
10929}
10930
10931export default photoAccessHelper;
10932