• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 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 AssetStoreKit
19 */
20
21/**
22 * This module provides the capabilities for life cycle management of sensitive user data (Asset) such as passwords
23 * and tokens, including adding, removing, updating, and querying.
24 *
25 * @namespace asset
26 * @syscap SystemCapability.Security.Asset
27 * @since 11
28 */
29/**
30 * This module provides the capabilities for life cycle management of sensitive user data (Asset) such as passwords
31 * and tokens, including adding, removing, updating, and querying.
32 *
33 * @namespace asset
34 * @syscap SystemCapability.Security.Asset
35 * @atomicservice
36 * @since 14
37 */
38declare namespace asset {
39  /**
40   * Add an Asset.
41   * Permission ohos.permission.STORE_PERSISTENT_DATA is required when the Asset needs to be stored persistently
42   *     by setting {@link Tag.IS_PERSISTENT} tag.
43   *
44   * @param { AssetMap } attributes - a map object containing attributes of the Asset to be added.
45   * @returns { Promise<void> } the promise object returned by the function.
46   * @throws { BusinessError } 201 - The caller doesn't have the permission.
47   * @throws { BusinessError } 401 - Parameter error. Possible causes:
48   *     1. Mandatory parameters are left unspecified.
49   *     2. Incorrect parameter types.
50   *     3. Parameter verification failed.
51   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
52   * @throws { BusinessError } 24000003 - The asset already exists.
53   * @throws { BusinessError } 24000005 - The screen lock status does not match.
54   * @throws { BusinessError } 24000006 - Insufficient memory.
55   * @throws { BusinessError } 24000007 - The asset is corrupted.
56   * @throws { BusinessError } 24000008 - The database operation failed.
57   * @throws { BusinessError } 24000009 - The cryptography operation failed.
58   * @throws { BusinessError } 24000010 - IPC failed.
59   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
60   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
61   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
62   * @throws { BusinessError } 24000014 - The file operation failed.
63   * @throws { BusinessError } 24000015 - Getting the system time failed.
64   * @syscap SystemCapability.Security.Asset
65   * @since 11
66   */
67  /**
68   * Add an Asset.
69   *
70   * @param { AssetMap } attributes - a map object containing attributes of the Asset to be added.
71   * @returns { Promise<void> } the promise object returned by the function.
72   * @throws { BusinessError } 401 - Parameter error. Possible causes:
73   *     1. Mandatory parameters are left unspecified.
74   *     2. Incorrect parameter types.
75   *     3. Parameter verification failed.
76   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
77   * @throws { BusinessError } 24000003 - The asset already exists.
78   * @throws { BusinessError } 24000005 - The screen lock status does not match.
79   * @throws { BusinessError } 24000006 - Insufficient memory.
80   * @throws { BusinessError } 24000007 - The asset is corrupted.
81   * @throws { BusinessError } 24000008 - The database operation failed.
82   * @throws { BusinessError } 24000009 - The cryptography operation failed.
83   * @throws { BusinessError } 24000010 - IPC failed.
84   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
85   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
86   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
87   * @throws { BusinessError } 24000014 - The file operation failed.
88   * @throws { BusinessError } 24000015 - Getting the system time failed.
89   * @syscap SystemCapability.Security.Asset
90   * @atomicservice
91   * @since 14
92   */
93  function add(attributes: AssetMap): Promise<void>;
94
95  /**
96   * Add an Asset to a specific user space.
97   * Permission ohos.permission.STORE_PERSISTENT_DATA is required when the Asset needs to be stored persistently
98   *     by setting {@link Tag.IS_PERSISTENT} tag.
99   *
100   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
101   * @param { number } userId - the user identifier to add an Asset. The user identifier cannot be lower than 100.
102   * @param { AssetMap } attributes - a map object containing attributes of the Asset to be added.
103   * @returns { Promise<void> } the promise object returned by the function.
104   * @throws { BusinessError } 201 - The caller doesn't have the permission.
105   * @throws { BusinessError } 202 - Non-system applications use system APIs.
106   * @throws { BusinessError } 401 - Parameter error. Possible causes:
107   *     1. Mandatory parameters are left unspecified.
108   *     2. Incorrect parameter types.
109   *     3. Parameter verification failed.
110   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
111   * @throws { BusinessError } 24000003 - The asset already exists.
112   * @throws { BusinessError } 24000005 - The screen lock status does not match.
113   * @throws { BusinessError } 24000006 - Insufficient memory.
114   * @throws { BusinessError } 24000007 - The asset is corrupted.
115   * @throws { BusinessError } 24000008 - The database operation failed.
116   * @throws { BusinessError } 24000009 - The cryptography operation failed.
117   * @throws { BusinessError } 24000010 - IPC failed.
118   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
119   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
120   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
121   * @throws { BusinessError } 24000014 - The file operation failed.
122   * @throws { BusinessError } 24000015 - Getting the system time failed.
123   * @syscap SystemCapability.Security.Asset
124   * @systemapi
125   * @since 12
126   */
127  function addAsUser(userId: number, attributes: AssetMap): Promise<void>;
128
129  /**
130   * Add an Asset.
131   * Permission ohos.permission.STORE_PERSISTENT_DATA is required when the Asset needs to be stored persistently
132   *     by setting {@link Tag.IS_PERSISTENT} tag.
133   *
134   * @param { AssetMap } attributes - a map object containing attributes of the Asset to be added.
135   * @throws { BusinessError } 201 - The caller doesn't have the permission.
136   * @throws { BusinessError } 401 - Parameter error. Possible causes:
137   *     1. Mandatory parameters are left unspecified.
138   *     2. Incorrect parameter types.
139   *     3. Parameter verification failed.
140   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
141   * @throws { BusinessError } 24000003 - The asset already exists.
142   * @throws { BusinessError } 24000005 - The screen lock status does not match.
143   * @throws { BusinessError } 24000006 - Insufficient memory.
144   * @throws { BusinessError } 24000007 - The asset is corrupted.
145   * @throws { BusinessError } 24000008 - The database operation failed.
146   * @throws { BusinessError } 24000009 - The cryptography operation failed.
147   * @throws { BusinessError } 24000010 - IPC failed.
148   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
149   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
150   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
151   * @throws { BusinessError } 24000014 - The file operation failed.
152   * @throws { BusinessError } 24000015 - Getting the system time failed.
153   * @syscap SystemCapability.Security.Asset
154   * @since 12
155   */
156  /**
157   * Add an Asset.
158   *
159   * @param { AssetMap } attributes - a map object containing attributes of the Asset to be added.
160   * @throws { BusinessError } 401 - Parameter error. Possible causes:
161   *     1. Mandatory parameters are left unspecified.
162   *     2. Incorrect parameter types.
163   *     3. Parameter verification failed.
164   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
165   * @throws { BusinessError } 24000003 - The asset already exists.
166   * @throws { BusinessError } 24000005 - The screen lock status does not match.
167   * @throws { BusinessError } 24000006 - Insufficient memory.
168   * @throws { BusinessError } 24000007 - The asset is corrupted.
169   * @throws { BusinessError } 24000008 - The database operation failed.
170   * @throws { BusinessError } 24000009 - The cryptography operation failed.
171   * @throws { BusinessError } 24000010 - IPC failed.
172   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
173   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
174   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
175   * @throws { BusinessError } 24000014 - The file operation failed.
176   * @throws { BusinessError } 24000015 - Getting the system time failed.
177   * @syscap SystemCapability.Security.Asset
178   * @atomicservice
179   * @since 14
180   */
181  function addSync(attributes: AssetMap): void;
182
183  /**
184   * Remove one or more Assets that match a search query.
185   *
186   * @param { AssetMap } query - a map object containing attributes of the Asset to be removed.
187   * @returns { Promise<void> } the promise object returned by the function.
188   * @throws { BusinessError } 401 - Parameter error. Possible causes:
189   *     1. Incorrect parameter types.
190   *     2. Parameter verification failed.
191   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
192   * @throws { BusinessError } 24000002 - The asset is not found.
193   * @throws { BusinessError } 24000006 - Insufficient memory.
194   * @throws { BusinessError } 24000007 - The asset is corrupted.
195   * @throws { BusinessError } 24000008 - The database operation failed.
196   * @throws { BusinessError } 24000010 - IPC failed.
197   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
198   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
199   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
200   * @throws { BusinessError } 24000015 - Getting the system time failed.
201   * @syscap SystemCapability.Security.Asset
202   * @since 11
203   */
204  /**
205   * Remove one or more Assets that match a search query.
206   *
207   * @param { AssetMap } query - a map object containing attributes of the Asset to be removed.
208   * @returns { Promise<void> } the promise object returned by the function.
209   * @throws { BusinessError } 401 - Parameter error. Possible causes:
210   *     1. Incorrect parameter types.
211   *     2. Parameter verification failed.
212   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
213   * @throws { BusinessError } 24000002 - The asset is not found.
214   * @throws { BusinessError } 24000006 - Insufficient memory.
215   * @throws { BusinessError } 24000007 - The asset is corrupted.
216   * @throws { BusinessError } 24000008 - The database operation failed.
217   * @throws { BusinessError } 24000010 - IPC failed.
218   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
219   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
220   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
221   * @throws { BusinessError } 24000015 - Getting the system time failed.
222   * @syscap SystemCapability.Security.Asset
223   * @atomicservice
224   * @since 14
225   */
226  function remove(query: AssetMap): Promise<void>;
227
228  /**
229   * Remove one or more Assets that match a search query from a specific user space.
230   *
231   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
232   * @param { number } userId - the user identifier to remove one or more Assets. The user identifier cannot be lower
233   *     than 100.
234   * @param { AssetMap } query - a map object containing attributes of the Asset to be removed.
235   * @returns { Promise<void> } the promise object returned by the function.
236   * @throws { BusinessError } 201 - The caller doesn't have the permission.
237   * @throws { BusinessError } 202 - Non-system applications use system APIs.
238   * @throws { BusinessError } 401 - Parameter error. Possible causes:
239   *     1. Incorrect parameter types.
240   *     2. Parameter verification failed.
241   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
242   * @throws { BusinessError } 24000002 - The asset is not found.
243   * @throws { BusinessError } 24000006 - Insufficient memory.
244   * @throws { BusinessError } 24000007 - The asset is corrupted.
245   * @throws { BusinessError } 24000008 - The database operation failed.
246   * @throws { BusinessError } 24000010 - IPC failed.
247   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
248   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
249   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
250   * @throws { BusinessError } 24000015 - Getting the system time failed.
251   * @syscap SystemCapability.Security.Asset
252   * @systemapi
253   * @since 12
254   */
255  function removeAsUser(userId: number, query: AssetMap): Promise<void>;
256
257  /**
258   * Remove one or more Assets that match a search query.
259   *
260   * @param { AssetMap } query - a map object containing attributes of the Asset to be removed.
261   * @throws { BusinessError } 401 - Parameter error. Possible causes:
262   *     1. Incorrect parameter types.
263   *     2. Parameter verification failed.
264   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
265   * @throws { BusinessError } 24000002 - The asset is not found.
266   * @throws { BusinessError } 24000006 - Insufficient memory.
267   * @throws { BusinessError } 24000007 - The asset is corrupted.
268   * @throws { BusinessError } 24000008 - The database operation failed.
269   * @throws { BusinessError } 24000010 - IPC failed.
270   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
271   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
272   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
273   * @throws { BusinessError } 24000015 - Getting the system time failed.
274   * @syscap SystemCapability.Security.Asset
275   * @since 12
276   */
277  /**
278   * Remove one or more Assets that match a search query.
279   *
280   * @param { AssetMap } query - a map object containing attributes of the Asset to be removed.
281   * @throws { BusinessError } 401 - Parameter error. Possible causes:
282   *     1. Incorrect parameter types.
283   *     2. Parameter verification failed.
284   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
285   * @throws { BusinessError } 24000002 - The asset is not found.
286   * @throws { BusinessError } 24000006 - Insufficient memory.
287   * @throws { BusinessError } 24000007 - The asset is corrupted.
288   * @throws { BusinessError } 24000008 - The database operation failed.
289   * @throws { BusinessError } 24000010 - IPC failed.
290   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
291   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
292   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
293   * @throws { BusinessError } 24000015 - Getting the system time failed.
294   * @syscap SystemCapability.Security.Asset
295   * @atomicservice
296   * @since 14
297   */
298  function removeSync(query: AssetMap): void;
299
300  /**
301   * Update an Asset that matches a search query.
302   *
303   * @param { AssetMap } query - a map object containing attributes of the Asset to be updated.
304   * @param { AssetMap } attributesToUpdate - a map object containing attributes with new values.
305   * @returns { Promise<void> } the promise object returned by the function.
306   * @throws { BusinessError } 401 - Parameter error. Possible causes:
307   *     1. Mandatory parameters are left unspecified.
308   *     2. Incorrect parameter types.
309   *     3. Parameter verification failed.
310   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
311   * @throws { BusinessError } 24000002 - The asset is not found.
312   * @throws { BusinessError } 24000005 - The screen lock status does not match.
313   * @throws { BusinessError } 24000006 - Insufficient memory.
314   * @throws { BusinessError } 24000007 - The asset is corrupted.
315   * @throws { BusinessError } 24000008 - The database operation failed.
316   * @throws { BusinessError } 24000009 - The cryptography operation failed.
317   * @throws { BusinessError } 24000010 - IPC failed.
318   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
319   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
320   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
321   * @throws { BusinessError } 24000015 - Getting the system time failed.
322   * @syscap SystemCapability.Security.Asset
323   * @since 11
324   */
325  /**
326   * Update an Asset that matches a search query.
327   *
328   * @param { AssetMap } query - a map object containing attributes of the Asset to be updated.
329   * @param { AssetMap } attributesToUpdate - a map object containing attributes with new values.
330   * @returns { Promise<void> } the promise object returned by the function.
331   * @throws { BusinessError } 401 - Parameter error. Possible causes:
332   *     1. Mandatory parameters are left unspecified.
333   *     2. Incorrect parameter types.
334   *     3. Parameter verification failed.
335   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
336   * @throws { BusinessError } 24000002 - The asset is not found.
337   * @throws { BusinessError } 24000005 - The screen lock status does not match.
338   * @throws { BusinessError } 24000006 - Insufficient memory.
339   * @throws { BusinessError } 24000007 - The asset is corrupted.
340   * @throws { BusinessError } 24000008 - The database operation failed.
341   * @throws { BusinessError } 24000009 - The cryptography operation failed.
342   * @throws { BusinessError } 24000010 - IPC failed.
343   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
344   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
345   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
346   * @throws { BusinessError } 24000015 - Getting the system time failed.
347   * @syscap SystemCapability.Security.Asset
348   * @atomicservice
349   * @since 14
350   */
351  function update(query: AssetMap, attributesToUpdate: AssetMap): Promise<void>;
352
353  /**
354   * Update an Asset that matches a search query in a specific user space.
355   *
356   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
357   * @param { number } userId - the user identifier to update an Asset. The user identifier cannot be lower than 100.
358   * @param { AssetMap } query - a map object containing attributes of the Asset to be updated.
359   * @param { AssetMap } attributesToUpdate - a map object containing attributes with new values.
360   * @returns { Promise<void> } the promise object returned by the function.
361   * @throws { BusinessError } 201 - The caller doesn't have the permission.
362   * @throws { BusinessError } 202 - Non-system applications use system APIs.
363   * @throws { BusinessError } 401 - Parameter error. Possible causes:
364   *     1. Mandatory parameters are left unspecified.
365   *     2. Incorrect parameter types.
366   *     3. Parameter verification failed.
367   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
368   * @throws { BusinessError } 24000002 - The asset is not found.
369   * @throws { BusinessError } 24000005 - The screen lock status does not match.
370   * @throws { BusinessError } 24000006 - Insufficient memory.
371   * @throws { BusinessError } 24000007 - The asset is corrupted.
372   * @throws { BusinessError } 24000008 - The database operation failed.
373   * @throws { BusinessError } 24000009 - The cryptography operation failed.
374   * @throws { BusinessError } 24000010 - IPC failed.
375   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
376   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
377   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
378   * @throws { BusinessError } 24000015 - Getting the system time failed.
379   * @syscap SystemCapability.Security.Asset
380   * @systemapi
381   * @since 12
382   */
383  function updateAsUser(userId: number, query: AssetMap, attributesToUpdate: AssetMap): Promise<void>;
384
385  /**
386   * Update an Asset that matches a search query.
387   *
388   * @param { AssetMap } query - a map object containing attributes of the Asset to be updated.
389   * @param { AssetMap } attributesToUpdate - a map object containing attributes with new values.
390   * @throws { BusinessError } 401 - Parameter error. Possible causes:
391   *     1. Mandatory parameters are left unspecified.
392   *     2. Incorrect parameter types.
393   *     3. Parameter verification failed.
394   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
395   * @throws { BusinessError } 24000002 - The asset is not found.
396   * @throws { BusinessError } 24000005 - The screen lock status does not match.
397   * @throws { BusinessError } 24000006 - Insufficient memory.
398   * @throws { BusinessError } 24000007 - The asset is corrupted.
399   * @throws { BusinessError } 24000008 - The database operation failed.
400   * @throws { BusinessError } 24000009 - The cryptography operation failed.
401   * @throws { BusinessError } 24000010 - IPC failed.
402   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
403   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
404   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
405   * @throws { BusinessError } 24000015 - Getting the system time failed.
406   * @syscap SystemCapability.Security.Asset
407   * @since 12
408   */
409  /**
410   * Update an Asset that matches a search query.
411   *
412   * @param { AssetMap } query - a map object containing attributes of the Asset to be updated.
413   * @param { AssetMap } attributesToUpdate - a map object containing attributes with new values.
414   * @throws { BusinessError } 401 - Parameter error. Possible causes:
415   *     1. Mandatory parameters are left unspecified.
416   *     2. Incorrect parameter types.
417   *     3. Parameter verification failed.
418   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
419   * @throws { BusinessError } 24000002 - The asset is not found.
420   * @throws { BusinessError } 24000005 - The screen lock status does not match.
421   * @throws { BusinessError } 24000006 - Insufficient memory.
422   * @throws { BusinessError } 24000007 - The asset is corrupted.
423   * @throws { BusinessError } 24000008 - The database operation failed.
424   * @throws { BusinessError } 24000009 - The cryptography operation failed.
425   * @throws { BusinessError } 24000010 - IPC failed.
426   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
427   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
428   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
429   * @throws { BusinessError } 24000015 - Getting the system time failed.
430   * @syscap SystemCapability.Security.Asset
431   * @atomicservice
432   * @since 14
433   */
434  function updateSync(query: AssetMap, attributesToUpdate: AssetMap): void;
435
436  /**
437   * Preprocessing (e.g. get challenge) for querying one or more Assets that require user authentication.
438   *
439   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
440   * @returns { Promise<Uint8Array> } the promise object returned by the function.
441   * @throws { BusinessError } 401 - Parameter error. Possible causes:
442   *     1. Incorrect parameter types.
443   *     2. Parameter verification failed.
444   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
445   * @throws { BusinessError } 24000002 - The asset is not found.
446   * @throws { BusinessError } 24000005 - The screen lock status does not match.
447   * @throws { BusinessError } 24000006 - Insufficient memory.
448   * @throws { BusinessError } 24000007 - The asset is corrupted.
449   * @throws { BusinessError } 24000008 - The database operation failed.
450   * @throws { BusinessError } 24000009 - The cryptography operation failed.
451   * @throws { BusinessError } 24000010 - IPC failed.
452   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
453   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
454   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
455   * @throws { BusinessError } 24000016 - The cache exceeds the limit.
456   * @throws { BusinessError } 24000017 - The capability is not supported.
457   * @syscap SystemCapability.Security.Asset
458   * @since 11
459   */
460  /**
461   * Preprocessing (e.g. get challenge) for querying one or more Assets that require user authentication.
462   *
463   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
464   * @returns { Promise<Uint8Array> } the promise object returned by the function.
465   * @throws { BusinessError } 401 - Parameter error. Possible causes:
466   *     1. Incorrect parameter types.
467   *     2. Parameter verification failed.
468   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
469   * @throws { BusinessError } 24000002 - The asset is not found.
470   * @throws { BusinessError } 24000005 - The screen lock status does not match.
471   * @throws { BusinessError } 24000006 - Insufficient memory.
472   * @throws { BusinessError } 24000007 - The asset is corrupted.
473   * @throws { BusinessError } 24000008 - The database operation failed.
474   * @throws { BusinessError } 24000009 - The cryptography operation failed.
475   * @throws { BusinessError } 24000010 - IPC failed.
476   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
477   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
478   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
479   * @throws { BusinessError } 24000016 - The cache exceeds the limit.
480   * @throws { BusinessError } 24000017 - The capability is not supported.
481   * @syscap SystemCapability.Security.Asset
482   * @atomicservice
483   * @since 14
484   */
485  function preQuery(query: AssetMap): Promise<Uint8Array>;
486
487  /**
488   * Preprocessing (e.g. get challenge) for querying one or more Assets
489   * that require user authentication in a specific user space.
490   *
491   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
492   * @param { number } userId - the user identifier to pre-query one or more Assets. The user identifier cannot be
493   *     lower than 100.
494   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
495   * @returns { Promise<Uint8Array> } the promise object returned by the function.
496   * @throws { BusinessError } 201 - The caller doesn't have the permission.
497   * @throws { BusinessError } 202 - Non-system applications use system APIs.
498   * @throws { BusinessError } 401 - Parameter error. Possible causes:
499   *     1. Incorrect parameter types.
500   *     2. Parameter verification failed.
501   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
502   * @throws { BusinessError } 24000002 - The asset is not found.
503   * @throws { BusinessError } 24000005 - The screen lock status does not match.
504   * @throws { BusinessError } 24000006 - Insufficient memory.
505   * @throws { BusinessError } 24000007 - The asset is corrupted.
506   * @throws { BusinessError } 24000008 - The database operation failed.
507   * @throws { BusinessError } 24000009 - The cryptography operation failed.
508   * @throws { BusinessError } 24000010 - IPC failed.
509   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
510   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
511   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
512   * @throws { BusinessError } 24000016 - The cache exceeds the limit.
513   * @throws { BusinessError } 24000017 - The capability is not supported.
514   * @syscap SystemCapability.Security.Asset
515   * @systemapi
516   * @since 12
517   */
518  function preQueryAsUser(userId: number, query: AssetMap): Promise<Uint8Array>;
519
520  /**
521   * Preprocessing (e.g. get challenge) for querying one or more Assets that require user authentication.
522   *
523   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
524   * @returns { Uint8Array } the challenge value to be used when {@link querySync} is called.
525   * @throws { BusinessError } 401 - Parameter error. Possible causes:
526   *     1. Incorrect parameter types.
527   *     2. Parameter verification failed.
528   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
529   * @throws { BusinessError } 24000002 - The asset is not found.
530   * @throws { BusinessError } 24000005 - The screen lock status does not match.
531   * @throws { BusinessError } 24000006 - Insufficient memory.
532   * @throws { BusinessError } 24000007 - The asset is corrupted.
533   * @throws { BusinessError } 24000008 - The database operation failed.
534   * @throws { BusinessError } 24000009 - The cryptography operation failed.
535   * @throws { BusinessError } 24000010 - IPC failed.
536   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
537   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
538   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
539   * @throws { BusinessError } 24000016 - The cache exceeds the limit.
540   * @throws { BusinessError } 24000017 - The capability is not supported.
541   * @syscap SystemCapability.Security.Asset
542   * @since 12
543   */
544  /**
545   * Preprocessing (e.g. get challenge) for querying one or more Assets that require user authentication.
546   *
547   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
548   * @returns { Uint8Array } the challenge value to be used when {@link querySync} is called.
549   * @throws { BusinessError } 401 - Parameter error. Possible causes:
550   *     1. Incorrect parameter types.
551   *     2. Parameter verification failed.
552   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
553   * @throws { BusinessError } 24000002 - The asset is not found.
554   * @throws { BusinessError } 24000005 - The screen lock status does not match.
555   * @throws { BusinessError } 24000006 - Insufficient memory.
556   * @throws { BusinessError } 24000007 - The asset is corrupted.
557   * @throws { BusinessError } 24000008 - The database operation failed.
558   * @throws { BusinessError } 24000009 - The cryptography operation failed.
559   * @throws { BusinessError } 24000010 - IPC failed.
560   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
561   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
562   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
563   * @throws { BusinessError } 24000016 - The cache exceeds the limit.
564   * @throws { BusinessError } 24000017 - The capability is not supported.
565   * @syscap SystemCapability.Security.Asset
566   * @atomicservice
567   * @since 14
568   */
569  function preQuerySync(query: AssetMap): Uint8Array;
570
571  /**
572   * Query one or more Assets that match a search query.
573   *
574   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
575   * @returns { Promise<Array<AssetMap>> } the promise object returned by the function.
576   * @throws { BusinessError } 401 - Parameter error. Possible causes:
577   *     1. Incorrect parameter types.
578   *     2. Parameter verification failed.
579   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
580   * @throws { BusinessError } 24000002 - The asset is not found.
581   * @throws { BusinessError } 24000004 - Access denied.
582   * @throws { BusinessError } 24000005 - The screen lock status does not match.
583   * @throws { BusinessError } 24000006 - Insufficient memory.
584   * @throws { BusinessError } 24000007 - The asset is corrupted.
585   * @throws { BusinessError } 24000008 - The database operation failed.
586   * @throws { BusinessError } 24000009 - The cryptography operation failed.
587   * @throws { BusinessError } 24000010 - IPC failed.
588   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
589   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
590   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
591   * @throws { BusinessError } 24000017 - The capability is not supported.
592   * @syscap SystemCapability.Security.Asset
593   * @since 11
594   */
595  /**
596   * Query one or more Assets that match a search query.
597   *
598   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
599   * @returns { Promise<Array<AssetMap>> } the promise object returned by the function.
600   * @throws { BusinessError } 401 - Parameter error. Possible causes:
601   *     1. Incorrect parameter types.
602   *     2. Parameter verification failed.
603   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
604   * @throws { BusinessError } 24000002 - The asset is not found.
605   * @throws { BusinessError } 24000004 - Access denied.
606   * @throws { BusinessError } 24000005 - The screen lock status does not match.
607   * @throws { BusinessError } 24000006 - Insufficient memory.
608   * @throws { BusinessError } 24000007 - The asset is corrupted.
609   * @throws { BusinessError } 24000008 - The database operation failed.
610   * @throws { BusinessError } 24000009 - The cryptography operation failed.
611   * @throws { BusinessError } 24000010 - IPC failed.
612   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
613   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
614   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
615   * @throws { BusinessError } 24000017 - The capability is not supported.
616   * @syscap SystemCapability.Security.Asset
617   * @atomicservice
618   * @since 14
619   */
620  function query(query: AssetMap): Promise<Array<AssetMap>>;
621
622  /**
623   * Query one or more Assets that match a search query in a specific user space.
624   *
625   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
626   * @param { number } userId - the user identifier to query one or more Assets. The user identifier cannot be lower
627   *     than 100.
628   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
629   * @returns { Promise<Array<AssetMap>> } the promise object returned by the function.
630   * @throws { BusinessError } 201 - The caller doesn't have the permission.
631   * @throws { BusinessError } 202 - Non-system applications use system APIs.
632   * @throws { BusinessError } 401 - Parameter error. Possible causes:
633   *     1. Incorrect parameter types.
634   *     2. Parameter verification failed.
635   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
636   * @throws { BusinessError } 24000002 - The asset is not found.
637   * @throws { BusinessError } 24000004 - Access denied.
638   * @throws { BusinessError } 24000005 - The screen lock status does not match.
639   * @throws { BusinessError } 24000006 - Insufficient memory.
640   * @throws { BusinessError } 24000007 - The asset is corrupted.
641   * @throws { BusinessError } 24000008 - The database operation failed.
642   * @throws { BusinessError } 24000009 - The cryptography operation failed.
643   * @throws { BusinessError } 24000010 - IPC failed.
644   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
645   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
646   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
647   * @throws { BusinessError } 24000017 - The capability is not supported.
648   * @syscap SystemCapability.Security.Asset
649   * @systemapi
650   * @since 12
651   */
652  function queryAsUser(userId: number, query: AssetMap): Promise<Array<AssetMap>>;
653
654  /**
655   * Query one or more Assets that match a search query.
656   *
657   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
658   * @returns { Array<AssetMap> } the query result.
659   * @throws { BusinessError } 401 - Parameter error. Possible causes:
660   *     1. Incorrect parameter types.
661   *     2. Parameter verification failed.
662   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
663   * @throws { BusinessError } 24000002 - The asset is not found.
664   * @throws { BusinessError } 24000004 - Access denied.
665   * @throws { BusinessError } 24000005 - The screen lock status does not match.
666   * @throws { BusinessError } 24000006 - Insufficient memory.
667   * @throws { BusinessError } 24000007 - The asset is corrupted.
668   * @throws { BusinessError } 24000008 - The database operation failed.
669   * @throws { BusinessError } 24000009 - The cryptography operation failed.
670   * @throws { BusinessError } 24000010 - IPC failed.
671   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
672   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
673   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
674   * @throws { BusinessError } 24000017 - The capability is not supported.
675   * @syscap SystemCapability.Security.Asset
676   * @since 12
677   */
678  /**
679   * Query one or more Assets that match a search query.
680   *
681   * @param { AssetMap } query - a map object containing attributes of the Asset to be queried.
682   * @returns { Array<AssetMap> } the query result.
683   * @throws { BusinessError } 401 - Parameter error. Possible causes:
684   *     1. Incorrect parameter types.
685   *     2. Parameter verification failed.
686   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
687   * @throws { BusinessError } 24000002 - The asset is not found.
688   * @throws { BusinessError } 24000004 - Access denied.
689   * @throws { BusinessError } 24000005 - The screen lock status does not match.
690   * @throws { BusinessError } 24000006 - Insufficient memory.
691   * @throws { BusinessError } 24000007 - The asset is corrupted.
692   * @throws { BusinessError } 24000008 - The database operation failed.
693   * @throws { BusinessError } 24000009 - The cryptography operation failed.
694   * @throws { BusinessError } 24000010 - IPC failed.
695   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
696   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
697   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
698   * @throws { BusinessError } 24000017 - The capability is not supported.
699   * @syscap SystemCapability.Security.Asset
700   * @atomicservice
701   * @since 14
702   */
703  function querySync(query: AssetMap): Array<AssetMap>;
704
705  /**
706   * Post-processing (e.g. release cached resource) for querying multiple Assets that require user authentication.
707   *
708   * @param { AssetMap } handle - a map object containing the handle returned by {@link preQuery}.
709   * @returns { Promise<void> } the promise object returned by the function.
710   * @throws { BusinessError } 401 - Parameter error. Possible causes:
711   *     1. Mandatory parameters are left unspecified.
712   *     2. Incorrect parameter types.
713   *     3. Parameter verification failed.
714   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
715   * @throws { BusinessError } 24000006 - Insufficient memory.
716   * @throws { BusinessError } 24000010 - IPC failed.
717   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
718   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
719   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
720   * @syscap SystemCapability.Security.Asset
721   * @since 11
722   */
723  /**
724   * Post-processing (e.g. release cached resource) for querying multiple Assets that require user authentication.
725   *
726   * @param { AssetMap } handle - a map object containing the handle returned by {@link preQuery}.
727   * @returns { Promise<void> } the promise object returned by the function.
728   * @throws { BusinessError } 401 - Parameter error. Possible causes:
729   *     1. Mandatory parameters are left unspecified.
730   *     2. Incorrect parameter types.
731   *     3. Parameter verification failed.
732   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
733   * @throws { BusinessError } 24000006 - Insufficient memory.
734   * @throws { BusinessError } 24000010 - IPC failed.
735   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
736   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
737   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
738   * @syscap SystemCapability.Security.Asset
739   * @atomicservice
740   * @since 14
741   */
742  function postQuery(handle: AssetMap): Promise<void>;
743
744  /**
745   * Post-processing (e.g. release cached resource) for querying multiple Assets that require user authentication in a
746   * specific user space.
747   *
748   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
749   * @param { number } userId - the user identifier to post-query one or more Assets. The user identifier cannot be
750   *     lower than 100.
751   * @param { AssetMap } handle - a map object containing the handle returned by {@link preQueryAsUser}.
752   * @returns { Promise<void> } the promise object returned by the function.
753   * @throws { BusinessError } 201 - The caller doesn't have the permission.
754   * @throws { BusinessError } 202 - Non-system applications use system APIs.
755   * @throws { BusinessError } 401 - Parameter error. Possible causes:
756   *     1. Mandatory parameters are left unspecified.
757   *     2. Incorrect parameter types.
758   *     3. Parameter verification failed.
759   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
760   * @throws { BusinessError } 24000006 - Insufficient memory.
761   * @throws { BusinessError } 24000010 - IPC failed.
762   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
763   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
764   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
765   * @syscap SystemCapability.Security.Asset
766   * @systemapi
767   * @since 12
768   */
769  function postQueryAsUser(userId:number, handle: AssetMap): Promise<void>;
770
771  /**
772   * Post-processing (e.g. release cached resource) for querying multiple Assets that require user authentication.
773   *
774   * @param { AssetMap } handle - a map object containing the handle returned by {@link preQuerySync}.
775   * @throws { BusinessError } 401 - Parameter error. Possible causes:
776   *     1. Mandatory parameters are left unspecified.
777   *     2. Incorrect parameter types.
778   *     3. Parameter verification failed.
779   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
780   * @throws { BusinessError } 24000006 - Insufficient memory.
781   * @throws { BusinessError } 24000010 - IPC failed.
782   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
783   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
784   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
785   * @syscap SystemCapability.Security.Asset
786   * @since 12
787   */
788  /**
789   * Post-processing (e.g. release cached resource) for querying multiple Assets that require user authentication.
790   *
791   * @param { AssetMap } handle - a map object containing the handle returned by {@link preQuerySync}.
792   * @throws { BusinessError } 401 - Parameter error. Possible causes:
793   *     1. Mandatory parameters are left unspecified.
794   *     2. Incorrect parameter types.
795   *     3. Parameter verification failed.
796   * @throws { BusinessError } 24000001 - The ASSET service is unavailable.
797   * @throws { BusinessError } 24000006 - Insufficient memory.
798   * @throws { BusinessError } 24000010 - IPC failed.
799   * @throws { BusinessError } 24000011 - Calling the Bundle Manager service failed.
800   * @throws { BusinessError } 24000012 - Calling the OS Account service failed.
801   * @throws { BusinessError } 24000013 - Calling the Access Token service failed.
802   * @syscap SystemCapability.Security.Asset
803   * @atomicservice
804   * @since 14
805   */
806  function postQuerySync(handle: AssetMap): void;
807
808  /**
809   * A Map type containing tag-value pairs that describe the attributes of an Asset.
810   *
811   * @typedef { Map<Tag, Value> }
812   * @syscap SystemCapability.Security.Asset
813   * @since 11
814   */
815  /**
816   * A Map type containing tag-value pairs that describe the attributes of an Asset.
817   *
818   * @typedef { Map<Tag, Value> }
819   * @syscap SystemCapability.Security.Asset
820   * @atomicservice
821   * @since 14
822   */
823  type AssetMap = Map<Tag, Value>;
824
825  /**
826   * A type that indicates the secret or attribute value of an Asset tag.
827   *
828   * @typedef { boolean | number | Uint8Array }
829   * @syscap SystemCapability.Security.Asset
830   * @since 11
831   */
832  /**
833   * A type that indicates the secret or attribute value of an Asset tag.
834   *
835   * @typedef { boolean | number | Uint8Array }
836   * @syscap SystemCapability.Security.Asset
837   * @atomicservice
838   * @since 14
839   */
840  type Value = boolean | number | Uint8Array;
841
842  /**
843   * An enum type indicates when the Asset is accessible.
844   *
845   * @enum { number }
846   * @syscap SystemCapability.Security.Asset
847   * @since 11
848   */
849  /**
850   * An enum type indicates when the Asset is accessible.
851   *
852   * @enum { number }
853   * @syscap SystemCapability.Security.Asset
854   * @atomicservice
855   * @since 14
856   */
857  enum Accessibility {
858    /**
859     * The secret value in the Asset can only be accessed after the device is powered on.
860     *
861     * @syscap SystemCapability.Security.Asset
862     * @since 11
863     */
864    /**
865     * The secret value in the Asset can only be accessed after the device is powered on.
866     *
867     * @syscap SystemCapability.Security.Asset
868     * @atomicservice
869     * @since 14
870     */
871    DEVICE_POWERED_ON = 0,
872    /**
873     * The secret value in the Asset can only be accessed after the device is first unlocked.
874     *
875     * @syscap SystemCapability.Security.Asset
876     * @since 11
877     */
878    /**
879     * The secret value in the Asset can only be accessed after the device is first unlocked.
880     *
881     * @syscap SystemCapability.Security.Asset
882     * @atomicservice
883     * @since 14
884     */
885    DEVICE_FIRST_UNLOCKED = 1,
886    /**
887     * The secret value in the Asset can only be accessed while the device is unlocked.
888     *
889     * @syscap SystemCapability.Security.Asset
890     * @since 11
891     */
892    /**
893     * The secret value in the Asset can only be accessed while the device is unlocked.
894     *
895     * @syscap SystemCapability.Security.Asset
896     * @atomicservice
897     * @since 14
898     */
899    DEVICE_UNLOCKED = 2,
900  }
901
902  /**
903   * An enum type indicates the user authentication type for Asset access control.
904   *
905   * @enum { number }
906   * @syscap SystemCapability.Security.Asset
907   * @since 11
908   */
909  /**
910   * An enum type indicates the user authentication type for Asset access control.
911   *
912   * @enum { number }
913   * @syscap SystemCapability.Security.Asset
914   * @atomicservice
915   * @since 14
916   */
917  enum AuthType {
918    /**
919     * The access to an Asset doesn't require user authentication.
920     *
921     * @syscap SystemCapability.Security.Asset
922     * @since 11
923     */
924    /**
925     * The access to an Asset doesn't require user authentication.
926     *
927     * @syscap SystemCapability.Security.Asset
928     * @atomicservice
929     * @since 14
930     */
931    NONE = 0x00,
932    /**
933     * The access to an Asset requires user authentication using either PIN/pattern/password or biometric traits.
934     *
935     * @syscap SystemCapability.Security.Asset
936     * @since 11
937     */
938    /**
939     * The access to an Asset requires user authentication using either PIN/pattern/password or biometric traits.
940     *
941     * @syscap SystemCapability.Security.Asset
942     * @atomicservice
943     * @since 14
944     */
945    ANY = 0xFF,
946  }
947
948  /**
949   * An enum type indicates the type of Asset synchronization.
950   *
951   * @enum { number }
952   * @syscap SystemCapability.Security.Asset
953   * @since 11
954   */
955  /**
956   * An enum type indicates the type of Asset synchronization.
957   *
958   * @enum { number }
959   * @syscap SystemCapability.Security.Asset
960   * @atomicservice
961   * @since 14
962   */
963  enum SyncType {
964    /**
965     * An Asset with this attribute value is never allowed to be transferred out.
966     *
967     * @syscap SystemCapability.Security.Asset
968     * @since 11
969     */
970    /**
971     * An Asset with this attribute value is never allowed to be transferred out.
972     *
973     * @syscap SystemCapability.Security.Asset
974     * @atomicservice
975     * @since 14
976     */
977    NEVER = 0,
978    /**
979     * An Asset with this attribute value can only be restored to the device from which it was transferred out.
980     *
981     * @syscap SystemCapability.Security.Asset
982     * @since 11
983     */
984    /**
985     * An Asset with this attribute value can only be restored to the device from which it was transferred out.
986     *
987     * @syscap SystemCapability.Security.Asset
988     * @atomicservice
989     * @since 14
990     */
991    THIS_DEVICE = 1 << 0,
992    /**
993     * An Asset with this attribute value can only be transferred out to a trusted device (user authorized).
994     *
995     * @syscap SystemCapability.Security.Asset
996     * @since 11
997     */
998    /**
999     * An Asset with this attribute value can only be transferred out to a trusted device (user authorized).
1000     *
1001     * @syscap SystemCapability.Security.Asset
1002     * @atomicservice
1003     * @since 14
1004     */
1005    TRUSTED_DEVICE = 1 << 1,
1006    /**
1007     * An Asset with this attribute value can only be transferred out to devices logged in with trusted accounts.
1008     *
1009     * @syscap SystemCapability.Security.Asset
1010     * @since 12
1011     */
1012    /**
1013     * An Asset with this attribute value can only be transferred out to devices logged in with trusted accounts.
1014     *
1015     * @syscap SystemCapability.Security.Asset
1016     * @atomicservice
1017     * @since 14
1018     */
1019    TRUSTED_ACCOUNT = 1 << 2,
1020  }
1021
1022  /**
1023   * An enum type indicates the strategy for conflict resolution when handling duplicated Asset alias.
1024   *
1025   * @enum { number }
1026   * @syscap SystemCapability.Security.Asset
1027   * @since 11
1028   */
1029  /**
1030   * An enum type indicates the strategy for conflict resolution when handling duplicated Asset alias.
1031   *
1032   * @enum { number }
1033   * @syscap SystemCapability.Security.Asset
1034   * @atomicservice
1035   * @since 14
1036   */
1037  enum ConflictResolution {
1038    /**
1039     * Directly overwrite an Asset with duplicated alias when a conflict is detected.
1040     *
1041     * @syscap SystemCapability.Security.Asset
1042     * @since 11
1043     */
1044    /**
1045     * Directly overwrite an Asset with duplicated alias when a conflict is detected.
1046     *
1047     * @syscap SystemCapability.Security.Asset
1048     * @atomicservice
1049     * @since 14
1050     */
1051    OVERWRITE = 0,
1052    /**
1053     * Throw an error so that the caller can take measures when a conflict is detected.
1054     *
1055     * @syscap SystemCapability.Security.Asset
1056     * @since 11
1057     */
1058    /**
1059     * Throw an error so that the caller can take measures when a conflict is detected.
1060     *
1061     * @syscap SystemCapability.Security.Asset
1062     * @atomicservice
1063     * @since 14
1064     */
1065    THROW_ERROR = 1,
1066  }
1067
1068  /**
1069   * An enum type indicates the return type of the queried Asset.
1070   *
1071   * @enum { number }
1072   * @syscap SystemCapability.Security.Asset
1073   * @since 11
1074   */
1075  /**
1076   * An enum type indicates the return type of the queried Asset.
1077   *
1078   * @enum { number }
1079   * @syscap SystemCapability.Security.Asset
1080   * @atomicservice
1081   * @since 14
1082   */
1083  enum ReturnType {
1084    /**
1085     * Specify that the return data should contain both secret value and attributes.
1086     *
1087     * @syscap SystemCapability.Security.Asset
1088     * @since 11
1089     */
1090    /**
1091     * Specify that the return data should contain both secret value and attributes.
1092     *
1093     * @syscap SystemCapability.Security.Asset
1094     * @atomicservice
1095     * @since 14
1096     */
1097    ALL = 0,
1098    /**
1099     * Specify that the return data contains only attributes.
1100     *
1101     * @syscap SystemCapability.Security.Asset
1102     * @since 11
1103     */
1104    /**
1105     * Specify that the return data contains only attributes.
1106     *
1107     * @syscap SystemCapability.Security.Asset
1108     * @atomicservice
1109     * @since 14
1110     */
1111    ATTRIBUTES = 1,
1112  }
1113
1114  /**
1115   * An enum type indicates the additional action to be performed during operation.
1116   *
1117   * @enum { number }
1118   * @syscap SystemCapability.Security.Asset
1119   * @since 12
1120   */
1121  enum OperationType {
1122    /**
1123     * Synchronization is required during operation.
1124     *
1125     * @syscap SystemCapability.Security.Asset
1126     * @since 12
1127     */
1128    NEED_SYNC = 0,
1129    /**
1130     * Logout is required during operation.
1131     *
1132     * @syscap SystemCapability.Security.Asset
1133     * @since 12
1134     */
1135    NEED_LOGOUT = 1,
1136  }
1137
1138  /**
1139   * An enum type containing the data type definitions for Asset attribute value.
1140   *
1141   * @enum { number }
1142   * @syscap SystemCapability.Security.Asset
1143   * @since 11
1144   */
1145  /**
1146   * An enum type containing the data type definitions for Asset attribute value.
1147   *
1148   * @enum { number }
1149   * @syscap SystemCapability.Security.Asset
1150   * @atomicservice
1151   * @since 14
1152   */
1153  enum TagType {
1154    /**
1155     * The data type of Asset attribute value is bool.
1156     *
1157     * @syscap SystemCapability.Security.Asset
1158     * @since 11
1159     */
1160    /**
1161     * The data type of Asset attribute value is bool.
1162     *
1163     * @syscap SystemCapability.Security.Asset
1164     * @atomicservice
1165     * @since 14
1166     */
1167    BOOL = 0x01 << 28,
1168    /**
1169     * The data type of Asset attribute value is uint32.
1170     *
1171     * @syscap SystemCapability.Security.Asset
1172     * @since 11
1173     */
1174    /**
1175     * The data type of Asset attribute value is uint32.
1176     *
1177     * @syscap SystemCapability.Security.Asset
1178     * @atomicservice
1179     * @since 14
1180     */
1181    NUMBER = 0x02 << 28,
1182    /**
1183     * The data type of Asset attribute value is byte array.
1184     *
1185     * @syscap SystemCapability.Security.Asset
1186     * @since 11
1187     */
1188    /**
1189     * The data type of Asset attribute value is byte array.
1190     *
1191     * @syscap SystemCapability.Security.Asset
1192     * @atomicservice
1193     * @since 14
1194     */
1195    BYTES = 0x03 << 28,
1196  }
1197
1198  /**
1199   * An enum type containing the Asset attribute tags.
1200   *
1201   * @enum { number }
1202   * @syscap SystemCapability.Security.Asset
1203   * @since 11
1204   */
1205  /**
1206   * An enum type containing the Asset attribute tags.
1207   *
1208   * @enum { number }
1209   * @syscap SystemCapability.Security.Asset
1210   * @atomicservice
1211   * @since 14
1212   */
1213  enum Tag {
1214    /**
1215     * A tag whose value is a byte array indicating the sensitive user data such as passwords and tokens.
1216     *
1217     * @syscap SystemCapability.Security.Asset
1218     * @since 11
1219     */
1220    /**
1221     * A tag whose value is a byte array indicating the sensitive user data such as passwords and tokens.
1222     *
1223     * @syscap SystemCapability.Security.Asset
1224     * @atomicservice
1225     * @since 14
1226     */
1227    SECRET = TagType.BYTES | 0x01,
1228    /**
1229     * A tag whose value is a byte array identifying an Asset.
1230     *
1231     * @syscap SystemCapability.Security.Asset
1232     * @since 11
1233     */
1234    /**
1235     * A tag whose value is a byte array identifying an Asset.
1236     *
1237     * @syscap SystemCapability.Security.Asset
1238     * @atomicservice
1239     * @since 14
1240     */
1241    ALIAS = TagType.BYTES | 0x02,
1242    /**
1243     * A tag whose value is a 32-bit unsigned integer indicating when the Asset can be accessed.
1244     *
1245     * @syscap SystemCapability.Security.Asset
1246     * @since 11
1247     */
1248    /**
1249     * A tag whose value is a 32-bit unsigned integer indicating when the Asset can be accessed.
1250     *
1251     * @syscap SystemCapability.Security.Asset
1252     * @atomicservice
1253     * @since 14
1254     */
1255    ACCESSIBILITY = TagType.NUMBER | 0x03,
1256    /**
1257     * A tag whose value is a bool indicating whether a screen lock password is required for the device.
1258     *
1259     * @syscap SystemCapability.Security.Asset
1260     * @since 11
1261     */
1262    /**
1263     * A tag whose value is a bool indicating whether a screen lock password is required for the device.
1264     *
1265     * @syscap SystemCapability.Security.Asset
1266     * @atomicservice
1267     * @since 14
1268     */
1269    REQUIRE_PASSWORD_SET = TagType.BOOL | 0x04,
1270    /**
1271     * A tag whose value is a 32-bit unsigned integer indicating the user authentication type for Asset access control.
1272     *
1273     * @syscap SystemCapability.Security.Asset
1274     * @since 11
1275     */
1276    /**
1277     * A tag whose value is a 32-bit unsigned integer indicating the user authentication type for Asset access control.
1278     *
1279     * @syscap SystemCapability.Security.Asset
1280     * @atomicservice
1281     * @since 14
1282     */
1283    AUTH_TYPE = TagType.NUMBER | 0x05,
1284    /**
1285     * A tag whose value is a 32-bit unsigned integer indicating the validity period in seconds of user authentication.
1286     *
1287     * @syscap SystemCapability.Security.Asset
1288     * @since 11
1289     */
1290    /**
1291     * A tag whose value is a 32-bit unsigned integer indicating the validity period in seconds of user authentication.
1292     *
1293     * @syscap SystemCapability.Security.Asset
1294     * @atomicservice
1295     * @since 14
1296     */
1297    AUTH_VALIDITY_PERIOD = TagType.NUMBER | 0x06,
1298    /**
1299     * A tag whose value is a byte array indicating the authentication challenge for anti-replay protection.
1300     *
1301     * @syscap SystemCapability.Security.Asset
1302     * @since 11
1303     */
1304    /**
1305     * A tag whose value is a byte array indicating the authentication challenge for anti-replay protection.
1306     *
1307     * @syscap SystemCapability.Security.Asset
1308     * @atomicservice
1309     * @since 14
1310     */
1311    AUTH_CHALLENGE = TagType.BYTES | 0x07,
1312    /**
1313     * A tag whose value is a byte array indicating the authentication token after a user is verified.
1314     *
1315     * @syscap SystemCapability.Security.Asset
1316     * @since 11
1317     */
1318    /**
1319     * A tag whose value is a byte array indicating the authentication token after a user is verified.
1320     *
1321     * @syscap SystemCapability.Security.Asset
1322     * @atomicservice
1323     * @since 14
1324     */
1325    AUTH_TOKEN = TagType.BYTES | 0x08,
1326    /**
1327     * A tag whose value is a 32-bit unsigned integer indicating the type of Asset synchronization.
1328     *
1329     * @syscap SystemCapability.Security.Asset
1330     * @since 11
1331     */
1332    /**
1333     * A tag whose value is a 32-bit unsigned integer indicating the type of Asset synchronization.
1334     *
1335     * @syscap SystemCapability.Security.Asset
1336     * @atomicservice
1337     * @since 14
1338     */
1339    SYNC_TYPE = TagType.NUMBER | 0x10,
1340    /**
1341     * A tag whose value is a bool indicating whether Asset is stored persistently.
1342     *
1343     * @syscap SystemCapability.Security.Asset
1344     * @since 11
1345     */
1346    IS_PERSISTENT = TagType.BOOL | 0x11,
1347    /**
1348     * A tag whose value is a byte array indicating the first user-defined Asset data label (not allow to update).
1349     *
1350     * @syscap SystemCapability.Security.Asset
1351     * @since 11
1352     */
1353    /**
1354     * A tag whose value is a byte array indicating the first user-defined Asset data label (not allow to update).
1355     *
1356     * @syscap SystemCapability.Security.Asset
1357     * @atomicservice
1358     * @since 14
1359     */
1360    DATA_LABEL_CRITICAL_1 = TagType.BYTES | 0x20,
1361    /**
1362     * A tag whose value is a byte array indicating the second user-defined Asset data label (not allow to update).
1363     *
1364     * @syscap SystemCapability.Security.Asset
1365     * @since 11
1366     */
1367    /**
1368     * A tag whose value is a byte array indicating the second user-defined Asset data label (not allow to update).
1369     *
1370     * @syscap SystemCapability.Security.Asset
1371     * @atomicservice
1372     * @since 14
1373     */
1374    DATA_LABEL_CRITICAL_2 = TagType.BYTES | 0x21,
1375    /**
1376     * A tag whose value is a byte array indicating the third user-defined Asset data label (not allow to update).
1377     *
1378     * @syscap SystemCapability.Security.Asset
1379     * @since 11
1380     */
1381    /**
1382     * A tag whose value is a byte array indicating the third user-defined Asset data label (not allow to update).
1383     *
1384     * @syscap SystemCapability.Security.Asset
1385     * @atomicservice
1386     * @since 14
1387     */
1388    DATA_LABEL_CRITICAL_3 = TagType.BYTES | 0x22,
1389    /**
1390     * A tag whose value is a byte array indicating the fourth user-defined Asset data label (not allow to update).
1391     *
1392     * @syscap SystemCapability.Security.Asset
1393     * @since 11
1394     */
1395    /**
1396     * A tag whose value is a byte array indicating the fourth user-defined Asset data label (not allow to update).
1397     *
1398     * @syscap SystemCapability.Security.Asset
1399     * @atomicservice
1400     * @since 14
1401     */
1402    DATA_LABEL_CRITICAL_4 = TagType.BYTES | 0x23,
1403    /**
1404     * A tag whose value is a byte array indicating the first user-defined Asset data label (allow to update).
1405     *
1406     * @syscap SystemCapability.Security.Asset
1407     * @since 11
1408     */
1409    /**
1410     * A tag whose value is a byte array indicating the first user-defined Asset data label (allow to update).
1411     *
1412     * @syscap SystemCapability.Security.Asset
1413     * @atomicservice
1414     * @since 14
1415     */
1416    DATA_LABEL_NORMAL_1 = TagType.BYTES | 0x30,
1417    /**
1418     * A tag whose value is a byte array indicating the second user-defined Asset data label (allow to update).
1419     *
1420     * @syscap SystemCapability.Security.Asset
1421     * @since 11
1422     */
1423    /**
1424     * A tag whose value is a byte array indicating the second user-defined Asset data label (allow to update).
1425     *
1426     * @syscap SystemCapability.Security.Asset
1427     * @atomicservice
1428     * @since 14
1429     */
1430    DATA_LABEL_NORMAL_2 = TagType.BYTES | 0x31,
1431    /**
1432     * A tag whose value is a byte array indicating the third user-defined Asset data label (allow to update).
1433     *
1434     * @syscap SystemCapability.Security.Asset
1435     * @since 11
1436     */
1437    /**
1438     * A tag whose value is a byte array indicating the third user-defined Asset data label (allow to update).
1439     *
1440     * @syscap SystemCapability.Security.Asset
1441     * @atomicservice
1442     * @since 14
1443     */
1444    DATA_LABEL_NORMAL_3 = TagType.BYTES | 0x32,
1445    /**
1446     * A tag whose value is a byte array indicating the fourth user-defined Asset data label (allow to update).
1447     *
1448     * @syscap SystemCapability.Security.Asset
1449     * @since 11
1450     */
1451    /**
1452     * A tag whose value is a byte array indicating the fourth user-defined Asset data label (allow to update).
1453     *
1454     * @syscap SystemCapability.Security.Asset
1455     * @atomicservice
1456     * @since 14
1457     */
1458    DATA_LABEL_NORMAL_4 = TagType.BYTES | 0x33,
1459    /**
1460     * A local tag whose value is a byte array indicating the first user-defined Asset data label (allow to update).
1461     * The information of a local tag will not be synchronized.
1462     *
1463     * @syscap SystemCapability.Security.Asset
1464     * @since 12
1465     */
1466    /**
1467     * A local tag whose value is a byte array indicating the first user-defined Asset data label (allow to update).
1468     * The information of a local tag will not be synchronized.
1469     *
1470     * @syscap SystemCapability.Security.Asset
1471     * @atomicservice
1472     * @since 14
1473     */
1474    DATA_LABEL_NORMAL_LOCAL_1 = TagType.BYTES | 0x34,
1475    /**
1476     * A local tag whose value is a byte array indicating the second user-defined Asset data label (allow to update).
1477     * The information of a local tag will not be synchronized.
1478     *
1479     * @syscap SystemCapability.Security.Asset
1480     * @since 12
1481     */
1482    /**
1483     * A local tag whose value is a byte array indicating the second user-defined Asset data label (allow to update).
1484     * The information of a local tag will not be synchronized.
1485     *
1486     * @syscap SystemCapability.Security.Asset
1487     * @atomicservice
1488     * @since 14
1489     */
1490    DATA_LABEL_NORMAL_LOCAL_2 = TagType.BYTES | 0x35,
1491    /**
1492     * A local tag whose value is a byte array indicating the third user-defined Asset data label (allow to update).
1493     * The information of a local tag will not be synchronized.
1494     *
1495     * @syscap SystemCapability.Security.Asset
1496     * @since 12
1497     */
1498    /**
1499     * A local tag whose value is a byte array indicating the third user-defined Asset data label (allow to update).
1500     * The information of a local tag will not be synchronized.
1501     *
1502     * @syscap SystemCapability.Security.Asset
1503     * @atomicservice
1504     * @since 14
1505     */
1506    DATA_LABEL_NORMAL_LOCAL_3 = TagType.BYTES | 0x36,
1507    /**
1508     * A local tag whose value is a byte array indicating the fourth user-defined Asset data label (allow to update).
1509     * The information of a local tag will not be synchronized.
1510     *
1511     * @syscap SystemCapability.Security.Asset
1512     * @since 12
1513     */
1514    /**
1515     * A local tag whose value is a byte array indicating the fourth user-defined Asset data label (allow to update).
1516     * The information of a local tag will not be synchronized.
1517     *
1518     * @syscap SystemCapability.Security.Asset
1519     * @atomicservice
1520     * @since 14
1521     */
1522    DATA_LABEL_NORMAL_LOCAL_4 = TagType.BYTES | 0x37,
1523    /**
1524     * A tag whose value is a 32-bit unsigned integer indicating the return type of the queried Asset.
1525     *
1526     * @syscap SystemCapability.Security.Asset
1527     * @since 11
1528     */
1529    /**
1530     * A tag whose value is a 32-bit unsigned integer indicating the return type of the queried Asset.
1531     *
1532     * @syscap SystemCapability.Security.Asset
1533     * @atomicservice
1534     * @since 14
1535     */
1536    RETURN_TYPE = TagType.NUMBER | 0x40,
1537    /**
1538     * A tag whose value is a 32-bit unsigned integer indicating the maximum number of returned Assets in one query.
1539     *
1540     * @syscap SystemCapability.Security.Asset
1541     * @since 11
1542     */
1543    /**
1544     * A tag whose value is a 32-bit unsigned integer indicating the maximum number of returned Assets in one query.
1545     *
1546     * @syscap SystemCapability.Security.Asset
1547     * @atomicservice
1548     * @since 14
1549     */
1550    RETURN_LIMIT = TagType.NUMBER | 0x41,
1551    /**
1552     * A tag whose value is a 32-bit unsigned integer indicating the offset of return data in batch query.
1553     *
1554     * @syscap SystemCapability.Security.Asset
1555     * @since 11
1556     */
1557    /**
1558     * A tag whose value is a 32-bit unsigned integer indicating the offset of return data in batch query.
1559     *
1560     * @syscap SystemCapability.Security.Asset
1561     * @atomicservice
1562     * @since 14
1563     */
1564    RETURN_OFFSET = TagType.NUMBER | 0x42,
1565    /**
1566     * A tag whose value is a 32-bit unsigned integer indicating how the query results are sorted.
1567     *
1568     * @syscap SystemCapability.Security.Asset
1569     * @since 11
1570     */
1571    /**
1572     * A tag whose value is a 32-bit unsigned integer indicating how the query results are sorted.
1573     *
1574     * @syscap SystemCapability.Security.Asset
1575     * @atomicservice
1576     * @since 14
1577     */
1578    RETURN_ORDERED_BY = TagType.NUMBER | 0x43,
1579    /**
1580     * A tag whose value is a 32-bit unsigned integer indicating the strategy for resolving Asset conflicts.
1581     *
1582     * @syscap SystemCapability.Security.Asset
1583     * @since 11
1584     */
1585    /**
1586     * A tag whose value is a 32-bit unsigned integer indicating the strategy for resolving Asset conflicts.
1587     *
1588     * @syscap SystemCapability.Security.Asset
1589     * @atomicservice
1590     * @since 14
1591     */
1592    CONFLICT_RESOLUTION = TagType.NUMBER | 0x44,
1593    /**
1594     * A tag whose value is a byte array indicating the update time of an Asset.
1595     *
1596     * @syscap SystemCapability.Security.Asset
1597     * @since 12
1598     */
1599    /**
1600     * A tag whose value is a byte array indicating the update time of an Asset.
1601     *
1602     * @syscap SystemCapability.Security.Asset
1603     * @atomicservice
1604     * @since 14
1605     */
1606    UPDATE_TIME = TagType.BYTES | 0x45,
1607    /**
1608     * A tag whose value is a 32-bit unsigned integer indicating the additional action to be performed during operation.
1609     *
1610     * @syscap SystemCapability.Security.Asset
1611     * @since 12
1612     */
1613    OPERATION_TYPE = TagType.NUMBER | 0x46,
1614    /**
1615     * A tag whose value is a bool indicating whether the attributes of an asset are required to be encrypted.
1616     *
1617     * @syscap SystemCapability.Security.Asset
1618     * @atomicservice
1619     * @since 14
1620     */
1621    REQUIRE_ATTR_ENCRYPTED = TagType.BOOL | 0x47,
1622  }
1623
1624  /**
1625   * An enum type containing the Asset error codes.
1626   *
1627   * @enum { number }
1628   * @syscap SystemCapability.Security.Asset
1629   * @since 11
1630   */
1631  /**
1632   * An enum type containing the Asset error codes.
1633   *
1634   * @enum { number }
1635   * @syscap SystemCapability.Security.Asset
1636   * @atomicservice
1637   * @since 14
1638   */
1639  enum ErrorCode {
1640    /**
1641     * The error code indicates that the caller doesn't have the permission.
1642     *
1643     * @syscap SystemCapability.Security.Asset
1644     * @since 11
1645     */
1646    PERMISSION_DENIED = 201,
1647    /**
1648     * The error code indicates that the caller is not a system application.
1649     *
1650     * @syscap SystemCapability.Security.Asset
1651     * @since 12
1652     */
1653    NOT_SYSTEM_APPLICATION = 202,
1654    /**
1655     * The error code indicates that the argument is invalid.
1656     *
1657     * @syscap SystemCapability.Security.Asset
1658     * @since 11
1659     */
1660    /**
1661     * The error code indicates that the argument is invalid.
1662     *
1663     * @syscap SystemCapability.Security.Asset
1664     * @atomicservice
1665     * @since 14
1666     */
1667    INVALID_ARGUMENT = 401,
1668    /**
1669     * The error code indicates that the ASSET service is unavailable.
1670     *
1671     * @syscap SystemCapability.Security.Asset
1672     * @since 11
1673     */
1674    /**
1675     * The error code indicates that the ASSET service is unavailable.
1676     *
1677     * @syscap SystemCapability.Security.Asset
1678     * @atomicservice
1679     * @since 14
1680     */
1681    SERVICE_UNAVAILABLE = 24000001,
1682    /**
1683     * The error code indicates that the asset is not found.
1684     *
1685     * @syscap SystemCapability.Security.Asset
1686     * @since 11
1687     */
1688    /**
1689     * The error code indicates that the asset is not found.
1690     *
1691     * @syscap SystemCapability.Security.Asset
1692     * @atomicservice
1693     * @since 14
1694     */
1695    NOT_FOUND = 24000002,
1696    /**
1697     * The error code indicates that the asset already exists.
1698     *
1699     * @syscap SystemCapability.Security.Asset
1700     * @since 11
1701     */
1702    /**
1703     * The error code indicates that the asset already exists.
1704     *
1705     * @syscap SystemCapability.Security.Asset
1706     * @atomicservice
1707     * @since 14
1708     */
1709    DUPLICATED = 24000003,
1710    /**
1711     * The error code indicates that access to the asset is denied.
1712     *
1713     * @syscap SystemCapability.Security.Asset
1714     * @since 11
1715     */
1716    /**
1717     * The error code indicates that access to the asset is denied.
1718     *
1719     * @syscap SystemCapability.Security.Asset
1720     * @atomicservice
1721     * @since 14
1722     */
1723    ACCESS_DENIED = 24000004,
1724    /**
1725     * The error code indicates that the screen lock status does not match.
1726     *
1727     * @syscap SystemCapability.Security.Asset
1728     * @since 11
1729     */
1730    /**
1731     * The error code indicates that the screen lock status does not match.
1732     *
1733     * @syscap SystemCapability.Security.Asset
1734     * @atomicservice
1735     * @since 14
1736     */
1737    STATUS_MISMATCH = 24000005,
1738    /**
1739     * The error code indicates insufficient memory.
1740     *
1741     * @syscap SystemCapability.Security.Asset
1742     * @since 11
1743     */
1744    /**
1745     * The error code indicates insufficient memory.
1746     *
1747     * @syscap SystemCapability.Security.Asset
1748     * @atomicservice
1749     * @since 14
1750     */
1751    OUT_OF_MEMORY = 24000006,
1752    /**
1753     * The error code indicates that the asset is corrupted.
1754     *
1755     * @syscap SystemCapability.Security.Asset
1756     * @since 11
1757     */
1758    /**
1759     * The error code indicates that the asset is corrupted.
1760     *
1761     * @syscap SystemCapability.Security.Asset
1762     * @atomicservice
1763     * @since 14
1764     */
1765    DATA_CORRUPTED = 24000007,
1766    /**
1767     * The error code indicates that the database operation failed.
1768     *
1769     * @syscap SystemCapability.Security.Asset
1770     * @since 11
1771     */
1772    /**
1773     * The error code indicates that the database operation failed.
1774     *
1775     * @syscap SystemCapability.Security.Asset
1776     * @atomicservice
1777     * @since 14
1778     */
1779    DATABASE_ERROR = 24000008,
1780    /**
1781     * The error code indicates that the cryptography operation failed.
1782     *
1783     * @syscap SystemCapability.Security.Asset
1784     * @since 11
1785     */
1786    /**
1787     * The error code indicates that the cryptography operation failed.
1788     *
1789     * @syscap SystemCapability.Security.Asset
1790     * @atomicservice
1791     * @since 14
1792     */
1793    CRYPTO_ERROR = 24000009,
1794    /**
1795     * The error code indicates that the ipc failed.
1796     *
1797     * @syscap SystemCapability.Security.Asset
1798     * @since 11
1799     */
1800    /**
1801     * The error code indicates that the ipc failed.
1802     *
1803     * @syscap SystemCapability.Security.Asset
1804     * @atomicservice
1805     * @since 14
1806     */
1807    IPC_ERROR = 24000010,
1808    /**
1809     * The error code indicates that calling the Bundle Manager service failed.
1810     *
1811     * @syscap SystemCapability.Security.Asset
1812     * @since 11
1813     */
1814    /**
1815     * The error code indicates that calling the Bundle Manager service failed.
1816     *
1817     * @syscap SystemCapability.Security.Asset
1818     * @atomicservice
1819     * @since 14
1820     */
1821    BMS_ERROR = 24000011,
1822    /**
1823     * The error code indicates that calling the OS Account service failed.
1824     *
1825     * @syscap SystemCapability.Security.Asset
1826     * @since 11
1827     */
1828    /**
1829     * The error code indicates that calling the OS Account service failed.
1830     *
1831     * @syscap SystemCapability.Security.Asset
1832     * @atomicservice
1833     * @since 14
1834     */
1835    ACCOUNT_ERROR = 24000012,
1836    /**
1837     * The error code indicates that calling the Access Token service failed.
1838     *
1839     * @syscap SystemCapability.Security.Asset
1840     * @since 11
1841     */
1842    /**
1843     * The error code indicates that calling the Access Token service failed.
1844     *
1845     * @syscap SystemCapability.Security.Asset
1846     * @atomicservice
1847     * @since 14
1848     */
1849    ACCESS_TOKEN_ERROR = 24000013,
1850    /**
1851     * The error code indicates that the file operation failed.
1852     *
1853     * @syscap SystemCapability.Security.Asset
1854     * @since 11
1855     */
1856    /**
1857     * The error code indicates that the file operation failed.
1858     *
1859     * @syscap SystemCapability.Security.Asset
1860     * @atomicservice
1861     * @since 14
1862     */
1863    FILE_OPERATION_ERROR = 24000014,
1864    /**
1865     * The error code indicates that getting the system time failed.
1866     *
1867     * @syscap SystemCapability.Security.Asset
1868     * @since 11
1869     */
1870    /**
1871     * The error code indicates that getting the system time failed.
1872     *
1873     * @syscap SystemCapability.Security.Asset
1874     * @atomicservice
1875     * @since 14
1876     */
1877    GET_SYSTEM_TIME_ERROR = 24000015,
1878    /**
1879     * The error code indicates that the cache exceeds the limit.
1880     *
1881     * @syscap SystemCapability.Security.Asset
1882     * @since 11
1883     */
1884    /**
1885     * The error code indicates that the cache exceeds the limit.
1886     *
1887     * @syscap SystemCapability.Security.Asset
1888     * @atomicservice
1889     * @since 14
1890     */
1891    LIMIT_EXCEEDED = 24000016,
1892    /**
1893     * The error code indicates that the capability is not supported.
1894     *
1895     * @syscap SystemCapability.Security.Asset
1896     * @since 11
1897     */
1898    /**
1899     * The error code indicates that the capability is not supported.
1900     *
1901     * @syscap SystemCapability.Security.Asset
1902     * @atomicservice
1903     * @since 14
1904     */
1905    UNSUPPORTED = 24000017,
1906  }
1907}
1908
1909export default asset;
1910