• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-2024 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
18 * @kit ArkData
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import image from "./@ohos.multimedia.image";
23import Want from "./@ohos.app.ability.Want";
24
25/**
26 * Provide methods for sharing data between different applications across unified data channels.
27 *
28 * @namespace unifiedDataChannel
29 * @syscap SystemCapability.DistributedDataManager.UDMF.Core
30 * @since 10
31 */
32/**
33 * Provide methods for sharing data between different applications across unified data channels.
34 *
35 * @namespace unifiedDataChannel
36 * @syscap SystemCapability.DistributedDataManager.UDMF.Core
37 * @atomicservice
38 * @since 11
39 */
40/**
41 * Provide methods for sharing data between different applications across unified data channels.
42 *
43 * @namespace unifiedDataChannel
44 * @syscap SystemCapability.DistributedDataManager.UDMF.Core
45 * @crossplatform
46 * @atomicservice
47 * @since 14
48 */
49declare namespace unifiedDataChannel {
50  /**
51   * Types of scope that UnifiedData can be used.
52   * @enum { number }
53   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
54   * @atomicservice
55   * @since 12
56   */
57  enum ShareOptions {
58    /**
59     * IN_APP indicates that only use in the same app is allowed.
60     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
61     * @atomicservice
62     * @since 12
63     */
64    IN_APP,
65    /**
66     * CROSS_APP indicates that use in any app in this device is allowed.
67     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
68     * @atomicservice
69     * @since 12
70     */
71    CROSS_APP
72  }
73
74  /**
75   * Indicated delay get UnifiedData
76   *
77   * @typedef {function} GetDelayData
78   * @param { string } type - the type of UnifiedData required.
79   * @returns { UnifiedData } Return the UnifiedData required.
80   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
81   * @atomicservice
82   * @since 12
83   */
84  type GetDelayData = (type: string) => UnifiedData;
85
86  /**
87   * Indicates type of value.
88   * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined}
89   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
90   * @atomicservice
91   * @since 12
92   */
93  /**
94   * Indicates type of value.
95   * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined}
96   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
97   * @crossplatform
98   * @atomicservice
99   * @since 14
100   */
101  type ValueType = number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined;
102
103  /**
104   * Describe the unified data properties.
105   *
106   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
107   * @atomicservice
108   * @since 12
109   */
110  class UnifiedDataProperties {
111    /**
112     * extra property data. key-value pairs.
113     * @type { ?Record<string, object> }
114     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
115     * @atomicservice
116     * @since 12
117     */
118    extras?: Record<string, object>;
119
120    /**
121     * the user-defined tag of a UnifiedData object.
122     * @type { ?string }
123     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
124     * @atomicservice
125     * @since 12
126     */
127    tag?: string;
128    /**
129     * a timestamp, which indicates when data is written.
130     * @type { ?Date }
131     * @readonly
132     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
133     * @atomicservice
134     * @since 12
135     */
136    readonly timestamp?: Date;
137    /**
138     * Indicates the scope of clipboard data which can be used.
139     * If it is not set or is incorrectly set, The default value is CrossDevice.
140     * @type { ?ShareOptions }
141     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
142     * @atomicservice
143     * @since 12
144     */
145    shareOptions?: ShareOptions;
146
147    /**
148     * Indicated delay get UnifiedData.
149     * @type { ?GetDelayData }
150     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
151     * @atomicservice
152     * @since 12
153     */
154    getDelayData?: GetDelayData;
155  }
156
157  /**
158   * Describe the unified data.
159   *
160   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
161   * @since 10
162   */
163  /**
164   * Describe the unified data.
165   *
166   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
167   * @atomicservice
168   * @since 11
169   */
170  /**
171   * Describe the unified data.
172   *
173   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
174   * @crossplatform
175   * @atomicservice
176   * @since 14
177   */
178  class UnifiedData {
179    /**
180     * Create unified data with a record
181     *
182     * @param { UnifiedRecord } record - Record will add into unified data.
183     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
184     * <br>2.Incorrect parameters types.
185     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
186     * @since 10
187     */
188    /**
189     * Create unified data with a record
190     *
191     * @param { UnifiedRecord } record - Record will add into unified data.
192     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
193     * <br>2.Incorrect parameters types.
194     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
195     * @atomicservice
196     * @since 11
197     */
198     /**
199     * Create unified data with a record
200     *
201     * @param { UnifiedRecord } record - Record will add into unified data.
202     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
203     * <br>2.Incorrect parameters types.
204     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
205     * @crossplatform
206     * @atomicservice
207     * @since 14
208     */
209    constructor(record: UnifiedRecord);
210    /**
211     * Create a empty unified data.
212     *
213     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
214     * @atomicservice
215     * @since 12
216     */
217    /**
218     * Create a empty unified data.
219     *
220     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
221     * @crossplatform
222     * @atomicservice
223     * @since 14
224     */
225    constructor();
226    /**
227     * Add a record into unified data
228     *
229     * @param { UnifiedRecord } record - Record will add into unified data.
230     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
231     * <br>2.Incorrect parameters types.
232     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
233     * @since 10
234     */
235    /**
236     * Add a record into unified data
237     *
238     * @param { UnifiedRecord } record - Record will add into unified data.
239     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
240     * <br>2.Incorrect parameters types.
241     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
242     * @atomicservice
243     * @since 11
244     */
245    /**
246     * Add a record into unified data
247     *
248     * @param { UnifiedRecord } record - Record will add into unified data.
249     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
250     * <br>2.Incorrect parameters types.
251     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
252     * @crossplatform
253     * @atomicservice
254     * @since 14
255     */
256    addRecord(record: UnifiedRecord): void;
257    /**
258     * Get all records of unified data
259     *
260     * @returns { Array<UnifiedRecord> } Return the records of unified data
261     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
262     * @since 10
263     */
264    /**
265     * Get all records of unified data
266     *
267     * @returns { Array<UnifiedRecord> } Return the records of unified data
268     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
269     * @atomicservice
270     * @since 11
271     */
272     /**
273     * Get all records of unified data
274     *
275     * @returns { Array<UnifiedRecord> } Return the records of unified data
276     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
277     * @crossplatform
278     * @atomicservice
279     * @since 14
280     */
281    getRecords(): Array<UnifiedRecord>;
282
283    /**
284     * Checks whether there is a specified type of data in DataProperties.
285     * @param { string } type - indicates to query data type.
286     * @returns { boolean } if having mimeType in UnifiedData returns true, else returns false.
287     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
288     * <br>2.Incorrect parameters types.
289     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
290     * @atomicservice
291     * @since 12
292     */
293    /**
294     * Checks whether there is a specified type of data in DataProperties.
295     * @param { string } type - indicates to query data type.
296     * @returns { boolean } if having mimeType in UnifiedData returns true, else returns false.
297     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
298     * <br>2.Incorrect parameters types.
299     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
300     * @crossplatform
301     * @atomicservice
302     * @since 14
303     */
304    hasType(type: string): boolean;
305
306    /**
307     * UTD types of all content in the UnifiedData.
308     * @returns { Array<string> } type of array
309     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
310     * @atomicservice
311     * @since 12
312     */
313    /**
314     * UTD types of all content in the UnifiedData.
315     * @returns { Array<string> } type of array
316     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
317     * @crossplatform
318     * @atomicservice
319     * @since 14
320     */
321    getTypes(): Array<string>;
322
323    /**
324     * UnifiedData properties.
325     * @type { UnifiedDataProperties }
326     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
327     * @atomicservice
328     * @since 12
329     */
330    properties: UnifiedDataProperties;
331  }
332
333  /**
334   * The data abstract supported by unified data
335   *
336   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
337   * @since 10
338   */
339  /**
340   * The data abstract supported by unified data
341   *
342   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
343   * @atomicservice
344   * @since 11
345   */
346  class Summary {
347    /**
348     * A map for each type and data size, key is data type, value is the corresponding data size
349     *
350     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
351     * @since 10
352     */
353    /**
354     * A map for each type and data size, key is data type, value is the corresponding data size
355     *
356     * @type { Record<string, number> }
357     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
358     * @atomicservice
359     * @since 11
360     */
361    summary: Record<string, number>;
362    /**
363     * Total data size of data in Bytes
364     *
365     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
366     * @since 10
367     */
368    /**
369     * Total data size of data in Bytes
370     *
371     * @type { number }
372     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
373     * @atomicservice
374     * @since 11
375     */
376    totalSize: number;
377  }
378
379  /**
380   * Describe the unified record
381   *
382   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
383   * @since 10
384   */
385  /**
386   * Describe the unified record
387   *
388   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
389   * @atomicservice
390   * @since 11
391   */
392  /**
393   * Describe the unified record
394   *
395   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
396   * @crossplatform
397   * @atomicservice
398   * @since 14
399   */
400  class UnifiedRecord {
401    /**
402     * Get type of unified record
403     *
404     * @returns { string } Return the type of unified data
405     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
406     * @since 10
407     */
408    /**
409     * Get type of unified record
410     *
411     * @returns { string } Return the type of unified data
412     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
413     * @atomicservice
414     * @since 11
415     */
416    /**
417     * Get type of unified record
418     *
419     * @returns { string } Return the type of unified data
420     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
421     * @crossplatform
422     * @atomicservice
423     * @since 14
424     */
425    getType(): string;
426
427    /**
428     * Create unified record.
429     *
430     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
431     * @atomicservice
432     * @since 12
433     */
434    /**
435     * Create unified record.
436     *
437     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
438     * @crossplatform
439     * @atomicservice
440     * @since 14
441     */
442    constructor();
443
444    /**
445     * Create unified record by type and value.
446     *
447     * @param { string } type - indicates to data type of unified record. It can not be empty. When type of value is object, parameter type must be pixel-map or want UTD type.
448     * @param { ValueType } value - indicates to value of unified record.
449     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
450     * <br>2.Incorrect parameters types;
451     * <br>3.Parameter verification failed.
452     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
453     * @atomicservice
454     * @since 12
455     */
456    /**
457     * Create unified record by type and value.
458     *
459     * @param { string } type - indicates to data type of unified record. It can not be empty. When type of value is object, parameter type must be pixel-map or want UTD type.
460     * @param { ValueType } value - indicates to value of unified record.
461     * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
462     * <br>2.Incorrect parameters types;
463     * <br>3.Parameter verification failed.
464     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
465     * @crossplatform
466     * @atomicservice
467     * @since 14
468     */
469    constructor(type: string, value: ValueType);
470
471    /**
472     * Get the value of unified record.
473     *
474     * @returns { ValueType } Return the value of unified record.
475     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
476     * @atomicservice
477     * @since 12
478     */
479    /**
480     * Get the value of unified record.
481     *
482     * @returns { ValueType } Return the value of unified record.
483     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
484     * @crossplatform
485     * @atomicservice
486     * @since 14
487     */
488    getValue(): ValueType;
489  }
490
491  /**
492   * Describe the unified text data
493   *
494   * @extends UnifiedRecord
495   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
496   * @since 10
497   */
498  /**
499   * Describe the unified text data
500   *
501   * @extends UnifiedRecord
502   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
503   * @atomicservice
504   * @since 11
505   */
506  /**
507   * Describe the unified text data
508   *
509   * @extends UnifiedRecord
510   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
511   * @crossplatform
512   * @atomicservice
513   * @since 14
514   */
515  class Text extends UnifiedRecord {
516    /**
517     * Indicates the details of unified text
518     *
519     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
520     * @since 10
521     */
522    /**
523     * Indicates the details of unified text
524     *
525     * @type { ?Record<string, string> }
526     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
527     * @atomicservice
528     * @since 11
529     */
530    /**
531     * Indicates the details of unified text
532     *
533     * @type { ?Record<string, string> }
534     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
535     * @crossplatform
536     * @atomicservice
537     * @since 14
538     */
539    details?: Record<string, string>;
540  }
541
542  /**
543   * Describe the unified plain text data
544   *
545   * @extends Text
546   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
547   * @since 10
548   */
549  /**
550   * Describe the unified plain text data
551   *
552   * @extends Text
553   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
554   * @atomicservice
555   * @since 11
556   */
557  /**
558   * Describe the unified plain text data
559   *
560   * @extends Text
561   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
562   * @crossplatform
563   * @atomicservice
564   * @since 14
565   */
566  class PlainText extends Text {
567    /**
568     * Indicates the content of text
569     *
570     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
571     * @since 10
572     */
573    /**
574     * Indicates the content of text
575     *
576     * @type { string }
577     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
578     * @atomicservice
579     * @since 11
580     */
581    /**
582     * Indicates the content of text
583     *
584     * @type { string }
585     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
586     * @crossplatform
587     * @atomicservice
588     * @since 14
589     */
590    textContent: string;
591    /**
592     * Indicates the abstract of text
593     *
594     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
595     * @since 10
596     */
597    /**
598     * Indicates the abstract of text
599     *
600     * @type { ?string }
601     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
602     * @atomicservice
603     * @since 11
604     */
605    /**
606     * Indicates the abstract of text
607     *
608     * @type { ?string }
609     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
610     * @crossplatform
611     * @atomicservice
612     * @since 14
613     */
614    abstract?: string;
615  }
616
617  /**
618   * Describe the unified link data
619   *
620   * @extends Text
621   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
622   * @since 10
623   */
624  /**
625   * Describe the unified link data
626   *
627   * @extends Text
628   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
629   * @atomicservice
630   * @since 11
631   */
632  /**
633   * Describe the unified link data
634   *
635   * @extends Text
636   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
637   * @crossplatform
638   * @atomicservice
639   * @since 14
640   */
641  class Hyperlink extends Text {
642    /**
643     * Indicates the url of a link
644     *
645     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
646     * @since 10
647     */
648    /**
649     * Indicates the url of a link
650     *
651     * @type { string }
652     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
653     * @atomicservice
654     * @since 11
655     */
656    /**
657     * Indicates the url of a link
658     *
659     * @type { string }
660     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
661     * @crossplatform
662     * @atomicservice
663     * @since 14
664     */
665    url: string;
666    /**
667     * Indicates the description of a link
668     *
669     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
670     * @since 10
671     */
672    /**
673     * Indicates the description of a link
674     *
675     * @type { ?string }
676     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
677     * @atomicservice
678     * @since 11
679     */
680    /**
681     * Indicates the description of a link
682     *
683     * @type { ?string }
684     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
685     * @crossplatform
686     * @atomicservice
687     * @since 14
688     */
689    description?: string;
690  }
691
692  /**
693   * Describe the unified html data
694   *
695   * @extends Text
696   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
697   * @since 10
698   */
699  /**
700   * Describe the unified html data
701   *
702   * @extends Text
703   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
704   * @atomicservice
705   * @since 11
706   */
707  /**
708   * Describe the unified html data
709   *
710   * @extends Text
711   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
712   * @crossplatform
713   * @atomicservice
714   * @since 14
715   */
716  class HTML extends Text {
717    /**
718     * Indicates the content of html, with html tags
719     *
720     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
721     * @since 10
722     */
723    /**
724     * Indicates the content of html, with html tags
725     *
726     * @type { string }
727     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
728     * @atomicservice
729     * @since 11
730     */
731    /**
732     * Indicates the content of html, with html tags
733     *
734     * @type { string }
735     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
736     * @crossplatform
737     * @atomicservice
738     * @since 14
739     */
740    htmlContent: string;
741    /**
742     * Indicates the plain content of html
743     *
744     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
745     * @since 10
746     */
747    /**
748     * Indicates the plain content of html
749     *
750     * @type { ?string }
751     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
752     * @atomicservice
753     * @since 11
754     */
755    /**
756     * Indicates the plain content of html
757     *
758     * @type { ?string }
759     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
760     * @crossplatform
761     * @atomicservice
762     * @since 14
763     */
764    plainContent?: string;
765  }
766
767  /**
768   * Describe the unified file data
769   *
770   * @extends UnifiedRecord
771   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
772   * @since 10
773   */
774  /**
775   * Describe the unified file data
776   *
777   * @extends UnifiedRecord
778   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
779   * @atomicservice
780   * @since 11
781   */
782  /**
783   * Describe the unified file data
784   *
785   * @extends UnifiedRecord
786   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
787   * @crossplatform
788   * @atomicservice
789   * @since 14
790   */
791  class File extends UnifiedRecord {
792    /**
793     * Indicates the details of unified File
794     *
795     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
796     * @since 10
797     */
798    /**
799     * Indicates the details of unified File
800     *
801     * @type { ?Record<string, string> }
802     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
803     * @atomicservice
804     * @since 11
805     */
806    /**
807     * Indicates the details of unified File
808     *
809     * @type { ?Record<string, string> }
810     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
811     * @crossplatform
812     * @atomicservice
813     * @since 14
814     */
815    details?: Record<string, string>;
816    /**
817     * Indicates the uri of file
818     *
819     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
820     * @since 10
821     */
822    /**
823     * Indicates the uri of file
824     *
825     * @type { string }
826     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
827     * @atomicservice
828     * @since 11
829     */
830    /**
831     * Indicates the uri of file
832     *
833     * @type { string }
834     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
835     * @crossplatform
836     * @atomicservice
837     * @since 14
838     */
839    uri: string;
840  }
841
842  /**
843   * Describe the unified image data
844   *
845   * @extends File
846   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
847   * @since 10
848   */
849  /**
850   * Describe the unified image data
851   *
852   * @extends File
853   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
854   * @atomicservice
855   * @since 11
856   */
857  /**
858   * Describe the unified image data
859   *
860   * @extends File
861   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
862   * @crossplatform
863   * @atomicservice
864   * @since 14
865   */
866  class Image extends File {
867    /**
868     * Indicates the uri of image
869     *
870     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
871     * @since 10
872     */
873    /**
874     * Indicates the uri of image
875     *
876     * @type { string }
877     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
878     * @atomicservice
879     * @since 11
880     */
881    /**
882     * Indicates the uri of image
883     *
884     * @type { string }
885     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
886     * @crossplatform
887     * @atomicservice
888     * @since 14
889     */
890    imageUri: string;
891  }
892
893  /**
894   * Describe the unified video data
895   *
896   * @extends File
897   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
898   * @since 10
899   */
900  /**
901   * Describe the unified video data
902   *
903   * @extends File
904   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
905   * @atomicservice
906   * @since 11
907   */
908  /**
909   * Describe the unified video data
910   *
911   * @extends File
912   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
913   * @crossplatform
914   * @atomicservice
915   * @since 14
916   */
917  class Video extends File {
918    /**
919     * Indicates the uri of video
920     *
921     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
922     * @since 10
923     */
924    /**
925     * Indicates the uri of video
926     *
927     * @type { string }
928     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
929     * @atomicservice
930     * @since 11
931     */
932    /**
933     * Indicates the uri of video
934     *
935     * @type { string }
936     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
937     * @crossplatform
938     * @atomicservice
939     * @since 14
940     */
941    videoUri: string;
942  }
943
944  /**
945   * Describe the unified audio data
946   *
947   * @extends File
948   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
949   * @since 10
950   */
951  /**
952   * Describe the unified audio data
953   *
954   * @extends File
955   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
956   * @atomicservice
957   * @since 11
958   */
959  /**
960   * Describe the unified audio data
961   *
962   * @extends File
963   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
964   * @crossplatform
965   * @atomicservice
966   * @since 14
967   */
968  class Audio extends File {
969    /**
970     * Indicates the uri of audio
971     *
972     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
973     * @since 10
974     */
975    /**
976     * Indicates the uri of audio
977     *
978     * @type { string }
979     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
980     * @atomicservice
981     * @since 11
982     */
983    /**
984     * Indicates the uri of audio
985     *
986     * @type { string }
987     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
988     * @crossplatform
989     * @atomicservice
990     * @since 14
991     */
992    audioUri: string;
993  }
994
995  /**
996   * Describe the unified folder data
997   *
998   * @extends File
999   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1000   * @since 10
1001   */
1002  /**
1003   * Describe the unified folder data
1004   *
1005   * @extends File
1006   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1007   * @atomicservice
1008   * @since 11
1009   */
1010  /**
1011   * Describe the unified folder data
1012   *
1013   * @extends File
1014   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1015   * @crossplatform
1016   * @atomicservice
1017   * @since 14
1018   */
1019  class Folder extends File {
1020    /**
1021     * Indicates the uri of folder
1022     *
1023     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1024     * @since 10
1025     */
1026    /**
1027     * Indicates the uri of folder
1028     *
1029     * @type { string }
1030     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1031     * @atomicservice
1032     * @since 11
1033     */
1034    /**
1035     * Indicates the uri of folder
1036     *
1037     * @type { string }
1038     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1039     * @crossplatform
1040     * @atomicservice
1041     * @since 14
1042     */
1043    folderUri: string;
1044  }
1045
1046  /**
1047   * Describe system defined type data(this kind of data is provided and bound to OpenHarmony,
1048   * also can be parsed by system provided API)
1049   *
1050   * @extends UnifiedRecord
1051   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1052   * @since 10
1053   */
1054  /**
1055   * Describe system defined type data(this kind of data is provided and bound to OpenHarmony,
1056   * also can be parsed by system provided API)
1057   *
1058   * @extends UnifiedRecord
1059   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1060   * @atomicservice
1061   * @since 11
1062   */
1063  class SystemDefinedRecord extends UnifiedRecord {
1064    /**
1065     * Indicates the details of system defined data
1066     *
1067     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1068     * @since 10
1069     */
1070    /**
1071     * Indicates the details of system defined data
1072     *
1073     * @type { ?Record<string, number | string | Uint8Array> }
1074     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1075     * @atomicservice
1076     * @since 11
1077     */
1078    details?: Record<string, number | string | Uint8Array>;
1079  }
1080
1081  /**
1082   * Describe system defined form data(this kind of data is provided and bound to OpenHarmony,
1083   * also can be parsed by system provided API)
1084   *
1085   * @extends SystemDefinedRecord
1086   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1087   * @since 10
1088   */
1089  /**
1090   * Describe system defined form data(this kind of data is provided and bound to OpenHarmony,
1091   * also can be parsed by system provided API)
1092   *
1093   * @extends SystemDefinedRecord
1094   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1095   * @atomicservice
1096   * @since 11
1097   */
1098  class SystemDefinedForm extends SystemDefinedRecord {
1099    /**
1100     * Indicates the id of form
1101     *
1102     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1103     * @since 10
1104     */
1105    /**
1106     * Indicates the id of form
1107     *
1108     * @type { number }
1109     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1110     * @atomicservice
1111     * @since 11
1112     */
1113    formId: number;
1114    /**
1115     * Indicates the name of form
1116     *
1117     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1118     * @since 10
1119     */
1120    /**
1121     * Indicates the name of form
1122     *
1123     * @type { string }
1124     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1125     * @atomicservice
1126     * @since 11
1127     */
1128    formName: string;
1129    /**
1130     * Indicates the bundle name of form
1131     *
1132     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1133     * @since 10
1134     */
1135    /**
1136     * Indicates the bundle name of form
1137     *
1138     * @type { string }
1139     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1140     * @atomicservice
1141     * @since 11
1142     */
1143    bundleName: string;
1144    /**
1145     * Indicates the ability name of form
1146     *
1147     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1148     * @since 10
1149     */
1150    /**
1151     * Indicates the ability name of form
1152     *
1153     * @type { string }
1154     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1155     * @atomicservice
1156     * @since 11
1157     */
1158    abilityName: string;
1159    /**
1160     * Indicates the module of form
1161     *
1162     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1163     * @since 10
1164     */
1165    /**
1166     * Indicates the module of form
1167     *
1168     * @type { string }
1169     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1170     * @atomicservice
1171     * @since 11
1172     */
1173    module: string;
1174  }
1175
1176  /**
1177   * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony,
1178   * also can be parsed by system provided API)
1179   *
1180   * @extends SystemDefinedRecord
1181   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1182   * @since 10
1183   */
1184  /**
1185   * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony,
1186   * also can be parsed by system provided API)
1187   *
1188   * @extends SystemDefinedRecord
1189   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1190   * @atomicservice
1191   * @since 11
1192   */
1193  class SystemDefinedAppItem extends SystemDefinedRecord {
1194    /**
1195     * Indicates the app id
1196     *
1197     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1198     * @since 10
1199     */
1200    /**
1201     * Indicates the app id
1202     *
1203     * @type { string }
1204     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1205     * @atomicservice
1206     * @since 11
1207     */
1208    appId: string;
1209    /**
1210     * Indicates the app name
1211     *
1212     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1213     * @since 10
1214     */
1215    /**
1216     * Indicates the app name
1217     *
1218     * @type { string }
1219     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1220     * @atomicservice
1221     * @since 11
1222     */
1223    appName: string;
1224    /**
1225     * Indicates the id of app icon
1226     *
1227     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1228     * @since 10
1229     */
1230    /**
1231     * Indicates the id of app icon
1232     *
1233     * @type { string }
1234     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1235     * @atomicservice
1236     * @since 11
1237     */
1238    appIconId: string;
1239    /**
1240     * Indicates the id of app label
1241     *
1242     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1243     * @since 10
1244     */
1245    /**
1246     * Indicates the id of app label
1247     *
1248     * @type { string }
1249     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1250     * @atomicservice
1251     * @since 11
1252     */
1253    appLabelId: string;
1254    /**
1255     * Indicates the bundle name of app
1256     *
1257     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1258     * @since 10
1259     */
1260    /**
1261     * Indicates the bundle name of app
1262     *
1263     * @type { string }
1264     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1265     * @atomicservice
1266     * @since 11
1267     */
1268    bundleName: string;
1269    /**
1270     * Indicates the ability name of app
1271     *
1272     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1273     * @since 10
1274     */
1275    /**
1276     * Indicates the ability name of app
1277     *
1278     * @type { string }
1279     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1280     * @atomicservice
1281     * @since 11
1282     */
1283    abilityName: string;
1284  }
1285
1286  /**
1287   * Describe system defined pixel map data(this kind of data is provided and bound to OpenHarmony,
1288   * also can be parsed by system provided API)
1289   *
1290   * @extends SystemDefinedRecord
1291   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1292   * @since 10
1293   */
1294  /**
1295   * Describe system defined pixel map data(this kind of data is provided and bound to OpenHarmony,
1296   * also can be parsed by system provided API)
1297   *
1298   * @extends SystemDefinedRecord
1299   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1300   * @atomicservice
1301   * @since 11
1302   */
1303  class SystemDefinedPixelMap extends SystemDefinedRecord {
1304    /**
1305     * Indicates the raw data of pixel map
1306     *
1307     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1308     * @since 10
1309     */
1310    /**
1311     * Indicates the raw data of pixel map
1312     *
1313     * @type { Uint8Array }
1314     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1315     * @atomicservice
1316     * @since 11
1317     */
1318    rawData: Uint8Array;
1319  }
1320
1321  /**
1322   * Describe application defined data(this kind of data is provided and bound to OpenHarmony,
1323   * also can be parsed by system provided API)
1324   *
1325   * @extends UnifiedRecord
1326   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1327   * @since 10
1328   */
1329  /**
1330   * Describe application defined data(this kind of data is provided and bound to OpenHarmony,
1331   * also can be parsed by system provided API)
1332   *
1333   * @extends UnifiedRecord
1334   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1335   * @atomicservice
1336   * @since 11
1337   */
1338  class ApplicationDefinedRecord extends UnifiedRecord {
1339    /**
1340     * Indicates the type of data, should always be started with 'ApplicationDefined.', will
1341     * return error otherwise
1342     *
1343     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1344     * @since 10
1345     */
1346    /**
1347     * Indicates the type of data, should always be started with 'ApplicationDefined.', will
1348     * return error otherwise
1349     *
1350     * @type { string }
1351     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1352     * @atomicservice
1353     * @since 11
1354     */
1355    applicationDefinedType: string;
1356    /**
1357     * Indicates the raw data of application defined data
1358     *
1359     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1360     * @since 10
1361     */
1362    /**
1363     * Indicates the raw data of application defined data
1364     *
1365     * @type { Uint8Array }
1366     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1367     * @atomicservice
1368     * @since 11
1369     */
1370    rawData: Uint8Array;
1371  }
1372
1373  /**
1374   * Describe the sharing channel that UDMF support
1375   *
1376   * @enum { string }
1377   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1378   * @since 10
1379   */
1380  /**
1381   * Describe the sharing channel that UDMF support
1382   *
1383   * @enum { string }
1384   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1385   * @atomicservice
1386   * @since 11
1387   */
1388  enum Intention {
1389    /**
1390     * Indicates the intention of data hub
1391     *
1392     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1393     * @since 10
1394     */
1395    /**
1396     * Indicates the intention of data hub
1397     *
1398     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1399     * @atomicservice
1400     * @since 11
1401     */
1402    DATA_HUB = 'DataHub',
1403
1404    /**
1405     * Indicates the intention of drag
1406     *
1407     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1408     * @systemapi
1409     * @StageModelOnly
1410     * @since 12
1411     */
1412    /**
1413     * Indicates the intention of drag
1414     *
1415     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1416     * @stagemodelonly
1417     * @since 14
1418     */
1419     DRAG = 'Drag'
1420  }
1421
1422  /**
1423   * Describe the optional arguments of data operation
1424   *
1425   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1426   * @since 10
1427   */
1428  /**
1429   * Describe the optional arguments of data operation
1430   *
1431   * @typedef { object }
1432   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1433   * @atomicservice
1434   * @since 11
1435   */
1436  type Options = {
1437    /**
1438     * Indicates the target Intention
1439     *
1440     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1441     * @since 10
1442     */
1443    /**
1444     * Indicates the target Intention
1445     *
1446     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1447     * @atomicservice
1448     * @since 11
1449     */
1450    intention?: Intention;
1451
1452    /**
1453     * Indicates the unique identifier of target UnifiedData
1454     *
1455     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1456     * @since 10
1457     */
1458    /**
1459     * Indicates the unique identifier of target UnifiedData
1460     *
1461     * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1462     * @atomicservice
1463     * @since 11
1464     */
1465    key?: string;
1466  };
1467
1468  /**
1469   * Insert data into unified data channel by Intention
1470   *
1471   * @param { Options } options - fill the intention field to indicate the target {@link Intention}.
1472   * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention.
1473   * @param { AsyncCallback<string> } callback - {string}: the unique identifier.
1474   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1475   * <br>2.Incorrect parameters types.
1476   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1477   * @since 10
1478   */
1479  /**
1480   * Insert data into unified data channel by Intention
1481   *
1482   * @param { Options } options - fill the intention field to indicate the target {@link Intention}.
1483   * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention.
1484   * @param { AsyncCallback<string> } callback - {string}: the unique identifier.
1485   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1486   * <br>2.Incorrect parameters types.
1487   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1488   * @atomicservice
1489   * @since 11
1490   */
1491  function insertData(options: Options, data: UnifiedData, callback: AsyncCallback<string>): void;
1492
1493  /**
1494   * Insert data into unified data channel by Intention
1495   *
1496   * @param { Options } options - fill the intention field to indicate the target {@link Intention}.
1497   * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention.
1498   * @returns { Promise<string> } {string}: the unique identifier.
1499   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1500   * <br>2.Incorrect parameters types.
1501   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1502   * @since 10
1503   */
1504  /**
1505   * Insert data into unified data channel by Intention
1506   *
1507   * @param { Options } options - fill the intention field to indicate the target {@link Intention}.
1508   * @param { UnifiedData } data - {@link UnifiedData} data object to insert into target intention.
1509   * @returns { Promise<string> } {string}: the unique identifier.
1510   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1511   * <br>2.Incorrect parameters types.
1512   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1513   * @atomicservice
1514   * @since 11
1515   */
1516  function insertData(options: Options, data: UnifiedData): Promise<string>;
1517
1518  /**
1519   * Update data to unified data channel by Unique Identifier
1520   *
1521   * @param { Options } options - fill the unique identifier field to indicate the target {@link UnifiedData}.
1522   * @param { UnifiedData } data - {@link UnifiedData} data object to update the target data.
1523   * @param { AsyncCallback<void> } callback - the callback of updateData.
1524   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1525   * <br>2.Incorrect parameters types.
1526   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1527   * @since 10
1528   */
1529  /**
1530   * Update data to unified data channel by Unique Identifier
1531   *
1532   * @param { Options } options - fill the unique identifier field to indicate the target {@link UnifiedData}.
1533   * @param { UnifiedData } data - {@link UnifiedData} data object to update the target data.
1534   * @param { AsyncCallback<void> } callback - the callback of updateData.
1535   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1536   * <br>2.Incorrect parameters types.
1537   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1538   * @atomicservice
1539   * @since 11
1540   */
1541  function updateData(options: Options, data: UnifiedData, callback: AsyncCallback<void>): void;
1542
1543  /**
1544   * Update data to unified data channel by Unique Identifier
1545   *
1546   * @param { Options } options - fill the unique identifier field to indicate the target {@link UnifiedData}.
1547   * @param { UnifiedData } data - {@link UnifiedData} data object to update the target data.
1548   * @returns { Promise<void> } the promise returned by the function.
1549   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1550   * <br>2.Incorrect parameters types.
1551   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1552   * @since 10
1553   */
1554  /**
1555   * Update data to unified data channel by Unique Identifier
1556   *
1557   * @param { Options } options - fill the unique identifier field to indicate the target {@link UnifiedData}.
1558   * @param { UnifiedData } data - {@link UnifiedData} data object to update the target data.
1559   * @returns { Promise<void> } the promise returned by the function.
1560   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1561   * <br>2.Incorrect parameters types.
1562   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1563   * @atomicservice
1564   * @since 11
1565   */
1566  function updateData(options: Options, data: UnifiedData): Promise<void>;
1567
1568  /**
1569   * Query data of unified data channel by Intention or Unique Identifier
1570   *
1571   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1572   * @param { AsyncCallback<Array<UnifiedData>> } callback - {Array<UnifiedData>}: the target {@link UnifiedData} object array.
1573   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1574   * <br>2.Incorrect parameters types.
1575   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1576   * @since 10
1577   */
1578  /**
1579   * Query data of unified data channel by Intention or Unique Identifier
1580   *
1581   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1582   * @param { AsyncCallback<Array<UnifiedData>> } callback - {Array<UnifiedData>}: the target {@link UnifiedData} object array.
1583   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1584   * <br>2.Incorrect parameters types.
1585   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1586   * @atomicservice
1587   * @since 11
1588   */
1589  function queryData(options: Options, callback: AsyncCallback<Array<UnifiedData>>): void;
1590
1591  /**
1592   * Query data of unified data channel by Intention or Unique Identifier
1593   *
1594   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1595   * @returns { Promise<Array<UnifiedData>> } {Array<UnifiedData>}: the target {@link UnifiedData} object array.
1596   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1597   * <br>2.Incorrect parameters types.
1598   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1599   * @since 10
1600   */
1601  /**
1602   * Query data of unified data channel by Intention or Unique Identifier
1603   *
1604   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1605   * @returns { Promise<Array<UnifiedData>> } {Array<UnifiedData>}: the target {@link UnifiedData} object array.
1606   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1607   * <br>2.Incorrect parameters types.
1608   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1609   * @atomicservice
1610   * @since 11
1611   */
1612  function queryData(options: Options): Promise<Array<UnifiedData>>;
1613
1614  /**
1615   * Delete data of unified data channel by Intention or Unique Identifier
1616   *
1617   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1618   * @param { AsyncCallback<Array<UnifiedData>> } callback - {Array<UnifiedData>}: the deleted {@link UnifiedData} object array.
1619   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1620   * <br>2.Incorrect parameters types.
1621   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1622   * @since 10
1623   */
1624  /**
1625   * Delete data of unified data channel by Intention or Unique Identifier
1626   *
1627   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1628   * @param { AsyncCallback<Array<UnifiedData>> } callback - {Array<UnifiedData>}: the deleted {@link UnifiedData} object array.
1629   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1630   * <br>2.Incorrect parameters types.
1631   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1632   * @atomicservice
1633   * @since 11
1634   */
1635  function deleteData(options: Options, callback: AsyncCallback<Array<UnifiedData>>): void;
1636
1637  /**
1638   * Delete data of unified data channel by Intention or Unique Identifier
1639   *
1640   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1641   * @returns { Promise<Array<UnifiedData>> } {Array<UnifiedData>}: the deleted {@link UnifiedData} object array.
1642   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1643   * <br>2.Incorrect parameters types.
1644   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1645   * @since 10
1646   */
1647  /**
1648   * Delete data of unified data channel by Intention or Unique Identifier
1649   *
1650   * @param { Options } options - fill the intention or unique identifier field to indicate the target {@link Intention} or {@link UnifiedData}.
1651   * @returns { Promise<Array<UnifiedData>> } {Array<UnifiedData>}: the deleted {@link UnifiedData} object array.
1652   * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified;
1653   * <br>2.Incorrect parameters types.
1654   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1655   * @atomicservice
1656   * @since 11
1657   */
1658  function deleteData(options: Options): Promise<Array<UnifiedData>>;
1659
1660  /**
1661   * Set app sharing options.
1662   *
1663   * @param { Intention } intention - Describe the sharing channel that UDMF support.
1664   * @param { ShareOptions } shareOptions - Types of scope that UnifiedData can be used.
1665   * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
1666   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1667   *                                                                   2. Incorrect parameter types.
1668   * @throws { BusinessError } 20400001 - Settings already exist.
1669   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1670   * @systemapi
1671   * @StageModelOnly
1672   * @since 12
1673   */
1674  /**
1675   * Set app sharing options.
1676   *
1677   * @permission ohos.permission.MANAGE_UDMF_APP_SHARE_OPTION
1678   * @param { Intention } intention - Describe the sharing channel that UDMF support. Currently only supports DRAG intention.
1679   * @param { ShareOptions } shareOptions - Types of scope that UnifiedData can be used.
1680   * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.MANAGE_UDMF_APP_SHARE_OPTION".
1681   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1682   *                                                                   2. Incorrect parameter types;
1683   *                                                                   3. Parameter verification failed.
1684   * @throws { BusinessError } 20400001 - Settings already exist.
1685   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1686   * @stagemodelonly
1687   * @since 14
1688   */
1689   function setAppShareOptions(intention: Intention, shareOptions: ShareOptions): void;
1690
1691   /**
1692    * Remove app sharing options.
1693    *
1694    * @param { Intention } intention - Describe the sharing channel that UDMF support.
1695    * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
1696    * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1697    *                                                                   2. Incorrect parameter types.
1698    * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1699    * @systemapi
1700    * @StageModelOnly
1701    * @since 12
1702    */
1703  /**
1704   * Remove app sharing options.
1705   *
1706   * @permission ohos.permission.MANAGE_UDMF_APP_SHARE_OPTION
1707   * @param { Intention } intention - Describe the sharing channel that UDMF support. Currently only supports DRAG intention.
1708   * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.MANAGE_UDMF_APP_SHARE_OPTION".
1709   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1710   *                                                                   2. Incorrect parameter types;
1711   *                                                                   3. Parameter verification failed.
1712   * @syscap SystemCapability.DistributedDataManager.UDMF.Core
1713   * @stagemodelonly
1714   * @since 14
1715   */
1716   function removeAppShareOptions(intention: Intention): void;
1717}
1718
1719export default unifiedDataChannel;
1720