From f023a85b17b73182cc323a03278e96da24ecc6d8 Mon Sep 17 00:00:00 2001 From: duanweiling Date: Mon, 7 Nov 2022 15:15:19 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fixed=20745f0ed=20from=20https://gitee.com/?= =?UTF-8?q?yiweiyai/interface=5Fsdk-js/pulls/3284=20Context=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duanweiling --- api/@ohos.data.preferences.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 3129833c98..dabe5d7527 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ import {AsyncCallback, Callback} from './basic'; -import Context from "./application/Context"; +import Context from "./application/BaseContext"; /** * Provides interfaces to obtain and modify preferences data. -- Gitee From f6357a7fefaea0ba0641798f3d2f08c7d3ba6a41 Mon Sep 17 00:00:00 2001 From: wangyihui Date: Wed, 16 Nov 2022 14:47:39 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=8C=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyihui Change-Id: I37d4255e13663403f12eef7911852396649fa4d2 --- api/@ohos.account.appAccount.d.ts | 40 ++++++------- api/@ohos.account.distributedAccount.d.ts | 6 +- api/@ohos.account.osAccount.d.ts | 68 +++++++++++------------ 3 files changed, 58 insertions(+), 56 deletions(-) diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index 7f20b3b89a..2d4f53cb36 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -168,7 +168,7 @@ declare namespace appAccount { * @returns void. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid name or bundlename. + * @throws {BusinessError} 12300002 - invalid name or bundle name. * @throws {BusinessError} 12300003 - the account indicated by localId dose not exist. * @throws {BusinessError} 12400001 - the application indicated by bundlename does not exist. * @since 9 @@ -184,7 +184,7 @@ declare namespace appAccount { * @returns void. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid name or bundlename. + * @throws {BusinessError} 12300002 - invalid name or bundle name. * @throws {BusinessError} 12300003 - the account indicated by localId dose not exist. * @since 9 */ @@ -198,7 +198,7 @@ declare namespace appAccount { * through the distributed networking. On the connected devices, you can call this method to check * whether application data can be synchronized. *

- * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param name Indicates the name of the application account. * @returns Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise. * @since 7 @@ -215,7 +215,7 @@ declare namespace appAccount { * through the distributed networking. On the connected devices, you can call this method to check * whether application data can be synchronized. *

- * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param name Indicates the name of the application account. * @returns Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise. * @throws {BusinessError} 201 - permission denied. @@ -268,6 +268,7 @@ declare namespace appAccount { * @returns void. * @since 7 * @deprecated since 9 + * @useinstead appAccount.AppAccountManager#setCustomData */ setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback): void; setAccountExtraInfo(name: string, extraInfo: string): Promise; @@ -276,7 +277,7 @@ declare namespace appAccount { * Sets whether a specified application account allows application data synchronization. *

* If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the networked devices, you can call this method to set whether to + * through the distributed networking. On the connected devices, you can call this method to set whether to * allow cross-device data synchronization. If synchronization is allowed, application data can be synchronized * among these devices in the event of any changes related to the application account. * If synchronization is not allowed, the application data is stored only on the local device. @@ -287,7 +288,7 @@ declare namespace appAccount { * Application data that can be synchronized: application account name, token, * and data associated with this application account *

- * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param name Indicates the name of the application account. * @param isEnable Specifies whether to allow application data synchronization. * @returns void. @@ -302,7 +303,7 @@ declare namespace appAccount { * Sets whether a specified application account enables application data synchronization. *

* If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the networked devices, you can call this method to set whether to + * through the distributed networking. On the connected devices, you can call this method to set whether to * enable cross-device data synchronization. If synchronization is enabled, application data can be synchronized * among these devices in the event of any changes related to the application account. * If synchronization is not enabled, the application data is stored only on the local device. @@ -313,7 +314,7 @@ declare namespace appAccount { * Application data that can be synchronized: application account name, token, * and data associated with this application account *

- * @permission ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param name Indicates the name of the application account. * @param isEnabled Specifies whether to enable application data synchronization. * @returns void. @@ -365,7 +366,7 @@ declare namespace appAccount { *

  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @returns Returns a list of application accounts. * @since 7 * @deprecated since 9 @@ -383,7 +384,7 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @returns Returns a list of application accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -402,7 +403,7 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @param owner Indicates the account owner of your application or third-party applications. * @returns Returns a list of application accounts. * @since 7 @@ -421,14 +422,14 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS * @param owner Indicates the account owner of your application or third-party applications. * @returns Returns a list of application accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. * @throws {BusinessError} 12300002 - invalid owner. - * @throws {BusinessError} 12400001 - the application indicated by bundlename does not exist. + * @throws {BusinessError} 12400001 - the application indicated by bundle name does not exist. * @since 9 */ getAccountsByOwner(owner: string, callback: AsyncCallback>): void; @@ -468,6 +469,7 @@ declare namespace appAccount { * for example, if the account does not exist. * @since 7 * @deprecated since 9 + * @useinstead appAccount.AppAccountManager#getCustomData */ getAccountExtraInfo(name: string, callback: AsyncCallback): void; getAccountExtraInfo(name: string): Promise; @@ -792,7 +794,7 @@ declare namespace appAccount { getAllAuthTokens(name: string, owner: string): Promise>; /** - * Gets the open authorization list with a specified authentication type for a paticular application account. + * Gets the open authorization list with a specified authentication type for a particular application account. *

    * Only the owner of the application account has the permission to call this method. * @param name Indicates the account name of your application. @@ -806,7 +808,7 @@ declare namespace appAccount { getOAuthList(name: string, authType: string): Promise>; /** - * Gets the open authorization list with a specified authentication type for a paticular application account. + * Gets the open authorization list with a specified authentication type for a particular application account. *

    * Only the owner of the application account has the permission to call this method. * @param name Indicates the account name of your application. @@ -875,7 +877,7 @@ declare namespace appAccount { queryAuthenticatorInfo(owner: string): Promise; /** - * Checks whether a paticular account has all specified labels. + * Checks whether a particular account has all specified labels. * @param name Indicates the account name. * @param owner Indicates the account owner. * @param labels Indicates an array of labels to check. @@ -1066,7 +1068,7 @@ declare namespace appAccount { */ interface AuthResult { /** - * The account infomation. + * The account information. * @since 9 */ account?: AppAccountInfo; @@ -1157,7 +1159,7 @@ declare namespace appAccount { */ interface VerifyCredentialOptions { /** - * The credentail type to be verified. + * The credential type to be verified. * @since 9 */ credentialType?: string; @@ -1284,7 +1286,7 @@ declare namespace appAccount { KEY_ACTION = "action", /** - * Indicates the key of authentiaction type. + * Indicates the key of authentication type. * * @since 8 */ diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 6d92f11f88..c5deff6f2b 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -51,7 +51,7 @@ declare namespace distributedAccount { /** * Gets the distributed information of the current OS account. - * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC. + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC * @returns The distributed information of the current OS account. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -63,7 +63,7 @@ declare namespace distributedAccount { /** * Updates the distributed information of the OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param accountInfo Indicates the information of the OS account used for a distributed system. * @returns void * @since 7 @@ -75,7 +75,7 @@ declare namespace distributedAccount { /** * Sets the distributed information of the OS account. - * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS. + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS * @param accountInfo Indicates the information of the OS account used for a distributed system. * @returns void * @throws {BusinessError} 201 - permission denied. diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 093b0dbfbb..c9ab2e1901 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -44,7 +44,7 @@ declare namespace osAccount { * to run in the foreground. Then, the OS account originally running in the foreground will be * switched to the background. *

    - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION. + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION * @param localId Indicates the local ID of the OS account. * @returns void. * @throws {BusinessError} 201 - permission denied. @@ -94,7 +94,7 @@ declare namespace osAccount { /** * Checks whether an OS account is activated based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns void * @throws {BusinessError} 201 - permission denied. @@ -109,7 +109,7 @@ declare namespace osAccount { /** * Checks whether a constraint has been enabled for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @param constraint Indicates the constraint to check. The value can be: *
      @@ -132,7 +132,7 @@ declare namespace osAccount { /** * Checks whether a constraint has been enabled for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @param constraint Indicates the constraint to check. The value can be: *
        @@ -178,7 +178,7 @@ declare namespace osAccount { /** * Checks whether an OS account has been verified based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns Returns {@code true} if the OS account has been verified successfully; * returns {@code false} otherwise. @@ -193,7 +193,7 @@ declare namespace osAccount { /** * Checks whether an OS account has been verified based on its ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns Returns {@code true} if the OS account has been verified successfully; * returns {@code false} otherwise. @@ -210,7 +210,7 @@ declare namespace osAccount { /** * Removes an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns void. * @throws {BusinessError} 201 - permission denied. @@ -227,7 +227,7 @@ declare namespace osAccount { /** * Sets constraints for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @param constraints Indicates the constraints to set for the OS account. The value can be: *
          @@ -256,7 +256,7 @@ declare namespace osAccount { /** * Sets the local name for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @param localName Indicates the local name to set for the OS account. * @returns void. @@ -274,7 +274,7 @@ declare namespace osAccount { /** * Obtains the number of all OS accounts created on a device. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns the number of created OS accounts. * @since 7 * @deprecated since 9 @@ -285,7 +285,7 @@ declare namespace osAccount { /** * Obtains the number of all OS accounts created on a device. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns the number of created OS accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -340,7 +340,7 @@ declare namespace osAccount { /** * Queries the local ID of an OS account which is bound to the specified domain account - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param domainInfo Indicates the domain account info. * @returns Returns the local ID of the OS account. * @since 8 @@ -353,7 +353,7 @@ declare namespace osAccount { /** * Queries the ID of an account which is bound to the specified domain account * - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param domainInfo Indicates the domain account info. * @returns Returns the local ID of the OS account. * @throws {BusinessError} 201 - permission denied. @@ -378,7 +378,7 @@ declare namespace osAccount { /** * Obtains all constraints of an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns Returns a list of constraints. * @since 7 @@ -390,7 +390,7 @@ declare namespace osAccount { /** * Obtains all constraints of an account based on its ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns Returns a list of constraints. * @throws {BusinessError} 201 - permission denied. @@ -405,7 +405,7 @@ declare namespace osAccount { /** * Queries the list of all the OS accounts that have been created in the system. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns a list of OS accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -438,7 +438,7 @@ declare namespace osAccount { /** * Creates an OS account using the local name and account type. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localName Indicates the local name of the OS account to create. * @param type Indicates the type of the OS account to create. * {@link OsAccountType} specifies the account types available in the system. @@ -458,7 +458,7 @@ declare namespace osAccount { /** * Creates an OS account using the account type and domain account info. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param type Indicates the type of the OS account to create. * {@link OsAccountType} specifies the account types available in the system. * @param domainInfo Indicates the domain account info. @@ -478,7 +478,7 @@ declare namespace osAccount { /** * Queries information about the current OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns information about the current OS account; returns {@code null} if the query fails. * @since 7 * @deprecated since 9 @@ -489,7 +489,7 @@ declare namespace osAccount { /** * Gets information about the current OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns information about the current OS account; returns {@code null} if the query fails. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -502,7 +502,7 @@ declare namespace osAccount { /** * Queries OS account information based on the local ID. * - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION * @param localId Indicates the local ID of the OS account. * @returns Returns the OS account information; returns {@code null} if the query fails. * @throws {BusinessError} 201 - permission denied. @@ -542,11 +542,11 @@ declare namespace osAccount { * Obtains the distributed virtual device ID (DVID). *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the networked devices, you can call this method to obtain the DVIDs. + * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs. * The same application running on different devices obtains the same DVID, whereas different applications * obtain different DVIDs. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns the DVID if obtained; returns an empty string if no OHOS account has logged in. * @since 7 * @deprecated since 9 @@ -559,11 +559,11 @@ declare namespace osAccount { * Queries the distributed virtual device ID (DVID). *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the networked devices, you can call this method to obtain the DVIDs. + * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs. * The same application running on different devices obtains the same DVID, whereas different applications * obtain different DVIDs. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns the DVID if obtained; returns an empty string if no OHOS account has logged in. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -575,7 +575,7 @@ declare namespace osAccount { /** * Obtains the profile photo of an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @returns Returns the profile photo if obtained; * returns {@code null} if the profile photo fails to be obtained. @@ -592,7 +592,7 @@ declare namespace osAccount { /** * Sets the profile photo for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param localId Indicates the local ID of the OS account. * @param photo Indicates the profile photo to set for the OS account. * @returns void. @@ -706,7 +706,7 @@ declare namespace osAccount { /** * Check whether current process belongs to the main account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns {@code true} if current process belongs to the main os account; * returns {@code false} otherwise. * @throws {BusinessError} 201 - permission denied. @@ -720,7 +720,7 @@ declare namespace osAccount { /** * Query the constraint source type list of the OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @returns Returns the constraint source type infos of the os account; * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -979,7 +979,7 @@ declare namespace osAccount { * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid contexId. + * @throws {BusinessError} 12300002 - invalid contextId. * @systemapi Hide this for inner system use. * @since 8 */ @@ -1059,7 +1059,7 @@ declare namespace osAccount { *

          * Add user credential information, pass in credential addition method and credential information * (credential type, subclass, if adding user's non password credentials, pass in password authentication token), - * and get the result / acquireinfo callback. + * and get the result / acquireInfo callback. * @permission ohos.permission.MANAGE_USER_IDM * @param credentialInfo Indicates the credential information. * @param callback Indicates the callback to get results and acquireInfo. @@ -1214,9 +1214,9 @@ declare namespace osAccount { * The authentication result code is returned through the callback. * @param result Indicates the authentication result code. * @param extraInfo Indicates the specific information for different situation. - * If the authentication is passed, the authentication token is returned in extrainfo, - * If the authentication fails, the remaining authentication times are returned in extrainfo, - * If the authentication executor is locked, the freezing time is returned in extrainfo. + * If the authentication is passed, the authentication token is returned in extraInfo, + * If the authentication fails, the remaining authentication times are returned in extraInfo, + * If the authentication executor is locked, the freezing time is returned in extraInfo. * @systemapi Hide this for inner system use. * @since 8 */ -- Gitee From d6704afdbf67042e0909264113eafe85bb63df97 Mon Sep 17 00:00:00 2001 From: huangjie Date: Wed, 16 Nov 2022 18:10:56 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fixed=20c54b4c7=20from=20https://gitee.com/?= =?UTF-8?q?maoziduanl/interface=5Fsdk-js/pulls/3342=20doc=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangjie --- api/@ohos.resourceManager.d.ts | 74 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/api/@ohos.resourceManager.d.ts b/api/@ohos.resourceManager.d.ts index b4f2afb22a..a450af8ff3 100644 --- a/api/@ohos.resourceManager.d.ts +++ b/api/@ohos.resourceManager.d.ts @@ -207,7 +207,7 @@ export function getResourceManager(bundleName: string, callback: AsyncCallback; * Obtains the ResourceManager object of the specified application. * * @param bundleName Indicates the bundle name of the specified application. - * @return Returns that the ResourceManager object is returned in Promise mode. + * @returns Returns that the ResourceManager object is returned in Promise mode. * @since 6 * @FAModelOnly */ @@ -244,7 +244,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the character string corresponding to the resource ID. + * @returns Returns the character string corresponding to the resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getStringValue @@ -268,7 +268,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @return Returns the character string corresponding to the resource object. + * @returns Returns the character string corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -292,7 +292,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the array of character strings corresponding to the specified resource ID. + * @returns Returns the array of character strings corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getStringArrayValue @@ -316,7 +316,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @return Returns the array of character strings corresponding to the specified resource object. + * @returns Returns the array of character strings corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -340,7 +340,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the content of the media file corresponding to the specified resource ID. + * @returns Returns the content of the media file corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getMediaContent @@ -363,7 +363,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @return Returns the content of the media file corresponding to the specified resource object. + * @returns Returns the content of the media file corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -387,7 +387,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the Base64 code of the image resource corresponding to the specified resource ID. + * @returns Returns the Base64 code of the image resource corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getMediaContentBase64 @@ -411,7 +411,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @return Returns the Base64 code of the image resource corresponding to the specified resource object. + * @returns Returns the Base64 code of the image resource corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -430,7 +430,7 @@ export interface ResourceManager { /** * Obtains the device capability in Promise mode. * - * @return Returns the device capability. + * @returns Returns the device capability. * @since 6 */ getDeviceCapability(): Promise; @@ -472,7 +472,7 @@ export interface ResourceManager { * * @param resId Indicates the resource ID. * @param num Indicates the number. - * @return Returns the singular-plural character string represented by the ID string + * @returns Returns the singular-plural character string represented by the ID string * corresponding to the specified number. * @since 6 * @deprecated since 9 @@ -502,7 +502,7 @@ export interface ResourceManager { * * @param resource Indicates the resource object. * @param num Indicates the number. - * @return Returns the singular-plural character string represented by the resource object string + * @returns Returns the singular-plural character string represented by the resource object string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. @@ -527,7 +527,7 @@ export interface ResourceManager { * Obtains the raw file resource corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @return Returns the raw file resource corresponding to the specified resource path. + * @returns Returns the raw file resource corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.getRawFileContent @@ -549,7 +549,7 @@ export interface ResourceManager { * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @return Returns the raw file resource descriptor corresponding to the specified resource path. + * @returns Returns the raw file resource descriptor corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.getRawFd @@ -571,7 +571,7 @@ export interface ResourceManager { * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @return Returns result close raw file resource descriptor corresponding to the specified resource path. + * @returns Returns result close raw file resource descriptor corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.closeRawFd @@ -595,7 +595,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @return Returns the character string corresponding to the resource name. + * @returns Returns the character string corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -621,7 +621,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @return Returns the array of character strings corresponding to the specified resource name. + * @returns Returns the array of character strings corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -646,7 +646,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @return Returns the content of the media file corresponding to the specified resource name. + * @returns Returns the content of the media file corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -671,7 +671,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @return Returns the Base64 code of the image resource corresponding to the specified resource name. + * @returns Returns the Base64 code of the image resource corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -701,7 +701,7 @@ export interface ResourceManager { * * @param resName Indicates the resource name. * @param num Indicates the number. - * @return Returns the singular-plural character string represented by the name string + * @returns Returns the singular-plural character string represented by the name string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. @@ -715,7 +715,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID. * * @param resId Indicates the resource ID. - * @return Returns the character string corresponding to the resource ID. + * @returns Returns the character string corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -728,7 +728,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource object. * * @param resource Indicates the resource object. - * @return Returns the character string corresponding to the resource object. + * @returns Returns the character string corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -741,7 +741,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource name. * * @param resName Indicates the resource name. - * @return Returns the character string corresponding to the resource name. + * @returns Returns the character string corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -754,7 +754,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource ID. * * @param resId Indicates the resource ID. - * @return Returns the boolean resource corresponding to the resource ID. + * @returns Returns the boolean resource corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -767,7 +767,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource object. * * @param resource Indicates the resource object. - * @return Returns the boolean resource corresponding to the resource object. + * @returns Returns the boolean resource corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -780,7 +780,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource name. * * @param resName Indicates the resource name. - * @return Returns the boolean resource corresponding to the resource name. + * @returns Returns the boolean resource corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -793,7 +793,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource ID. * * @param resId Indicates the resource ID. - * @return Returns the number resource corresponding to the resource ID. + * @returns Returns the number resource corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -806,7 +806,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource object. * * @param resource Indicates the resource object. - * @return Returns the number resource corresponding to the resource object. + * @returns Returns the number resource corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -819,7 +819,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource name. * * @param resName Indicates the resource name. - * @return Returns the number resource corresponding to the resource name. + * @returns Returns the number resource corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -852,7 +852,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the character string corresponding to the resource ID. + * @returns Returns the character string corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -878,7 +878,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the array of character strings corresponding to the specified resource ID. + * @returns Returns the array of character strings corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -909,7 +909,7 @@ export interface ResourceManager { * * @param resId Indicates the resource ID. * @param num Indicates the number. - * @return Returns the singular-plural character string represented by the ID string + * @returns Returns the singular-plural character string represented by the ID string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. @@ -935,7 +935,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the content of the media file corresponding to the specified resource ID. + * @returns Returns the content of the media file corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -960,7 +960,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @return Returns the Base64 code of the image resource corresponding to the specified resource ID. + * @returns Returns the Base64 code of the image resource corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -983,7 +983,7 @@ export interface ResourceManager { * Obtains the raw file resource corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @return Returns the raw file resource corresponding to the specified resource path. + * @returns Returns the raw file resource corresponding to the specified resource path. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001005 - If the resource not found by path. * @since 9 @@ -1005,7 +1005,7 @@ export interface ResourceManager { * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @return Returns the raw file resource descriptor corresponding to the specified resource path. + * @returns Returns the raw file resource descriptor corresponding to the specified resource path. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001005 - If the resource not found by path. * @since 9 -- Gitee From 5f4e83d7e59263efde5ddc099fd7ba58db429a62 Mon Sep 17 00:00:00 2001 From: zhaogan Date: Tue, 15 Nov 2022 16:17:14 +0800 Subject: [PATCH 4/8] Issue: #I619ZB Description: monthly: fix alarms of d.ts files Sig: SIG_ApplicaitonFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: zhaogan --- api/@ohos.bundle.appControl.d.ts | 12 ++--- api/@ohos.bundle.bundleManager.d.ts | 38 +++++++-------- api/@ohos.bundle.d.ts | 19 -------- api/@ohos.bundle.defaultAppManager.d.ts | 52 ++++++++++----------- api/@ohos.bundle.distributedBundle.d.ts | 16 +++---- api/@ohos.bundle.freeInstall.d.ts | 8 ++-- api/@ohos.bundle.innerBundleManager.d.ts | 5 +- api/@ohos.bundle.installer.d.ts | 28 +++++------ api/@ohos.bundle.launcherBundleManager.d.ts | 8 ++-- api/@ohos.distributedBundle.d.ts | 1 - api/@ohos.zlib.d.ts | 10 ---- api/@system.package.d.ts | 5 +- api/bundle/PermissionDef.d.ts | 1 - api/bundle/abilityInfo.d.ts | 1 - api/bundle/applicationInfo.d.ts | 7 +-- api/bundle/bundleInfo.d.ts | 3 -- api/bundle/bundleInstaller.d.ts | 3 -- api/bundle/customizeData.d.ts | 1 - api/bundle/elementName.d.ts | 2 - api/bundle/hapModuleInfo.d.ts | 1 - api/bundle/launcherAbilityInfo.d.ts | 14 ------ api/bundle/moduleInfo.d.ts | 1 - api/bundle/remoteAbilityInfo.d.ts | 6 +-- api/bundle/shortcutInfo.d.ts | 23 ++------- 24 files changed, 96 insertions(+), 169 deletions(-) diff --git a/api/@ohos.bundle.appControl.d.ts b/api/@ohos.bundle.appControl.d.ts index 519affca68..d780a5e477 100644 --- a/api/@ohos.bundle.appControl.d.ts +++ b/api/@ohos.bundle.appControl.d.ts @@ -33,7 +33,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -49,7 +49,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -64,7 +64,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -79,7 +79,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -94,7 +94,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -109,7 +109,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified appId was not found. + * @throws { BusinessError } 17700005 - The specified app ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 49c47e6b98..4899df4c73 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -575,7 +575,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -594,7 +594,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -612,7 +612,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -631,7 +631,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -647,7 +647,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @param { AsyncCallback } callback - The callback of getting a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -663,7 +663,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @returns { Promise> } Returns a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -678,7 +678,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @param { AsyncCallback } callback - The callback of getting a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -694,7 +694,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @returns { Promise> } Returns a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -849,7 +849,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700030 - The specified bundleName does not support cleaning cache files. + * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -864,7 +864,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700030 - The specified bundleName does not support cleaning cache files. + * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -994,7 +994,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1012,7 +1012,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1031,7 +1031,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1048,7 +1048,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified abilityName is not existed. - * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. + * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -1065,7 +1065,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified abilityName is not existed. - * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. + * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -1082,7 +1082,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. - * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. + * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -1098,7 +1098,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. - * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. + * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -1227,7 +1227,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1246,7 +1246,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified userId is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 7279d03950..7f0fba3c7d 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -27,7 +27,6 @@ import { BundleInstaller } from './bundle/bundleInstaller'; * @name bundle * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager */ @@ -37,8 +36,6 @@ declare namespace bundle { * @name BundleFlag * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.BundleFlag, ohos.bundle.bundleManager.ApplicationFlag or * ohos.bundle.bundleManager.AbilityFlag @@ -77,8 +74,6 @@ declare namespace bundle { * @name ColorMode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 */ export enum ColorMode { @@ -91,8 +86,6 @@ declare namespace bundle { * @name GrantStatus * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.PermissionGrantState */ @@ -105,8 +98,6 @@ declare namespace bundle { * @name AbilityType * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.AbilityType */ @@ -144,8 +135,6 @@ declare namespace bundle { * @name AbilitySubType * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 */ export enum AbilitySubType { @@ -157,8 +146,6 @@ declare namespace bundle { * @name DisplayOrientation * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.DisplayOrientation */ @@ -196,8 +183,6 @@ declare namespace bundle { * @name LaunchMode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.LaunchType */ @@ -221,8 +206,6 @@ declare namespace bundle { * @name BundleOptions * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 */ export interface BundleOptions { @@ -238,8 +221,6 @@ declare namespace bundle { * @name InstallErrorCode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @import NA - * @permission NA * @deprecated since 9 */ export enum InstallErrorCode{ diff --git a/api/@ohos.bundle.defaultAppManager.d.ts b/api/@ohos.bundle.defaultAppManager.d.ts index 65a065a00c..28b075eab9 100644 --- a/api/@ohos.bundle.defaultAppManager.d.ts +++ b/api/@ohos.bundle.defaultAppManager.d.ts @@ -20,62 +20,62 @@ import { ElementName } from './bundleManager/elementName'; /** * Default application manager. * @namespace defaultAppManager - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ declare namespace defaultAppManager { /** * The constant for application type. * @enum {number} - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ export enum ApplicationType { /** * Default browser identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ BROWSER = "Web Browser", /** * Default image identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ IMAGE = "Image Gallery", /** * Default audio identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ AUDIO = "Audio Player", /** * Default video identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ VIDEO = "Video Player", /** * Default PDF identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ PDF = "PDF Viewer", /** * Default word identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ WORD = "Word Viewer", /** * Default excel identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ EXCEL = "Excel Viewer", /** * Default PPT identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ PPT = "PPT Viewer", @@ -87,7 +87,7 @@ declare namespace defaultAppManager { * @param { AsyncCallback } callback - The callback of querying default application result. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ function isDefaultApplication(type: string, callback: AsyncCallback) : void; @@ -98,7 +98,7 @@ declare namespace defaultAppManager { * @returns { Promise } Return true if caller is default application; return false otherwise. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @since 9 */ function isDefaultApplication(type: string) : Promise; @@ -112,10 +112,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700023 - The specified default app does not exist. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ @@ -131,10 +131,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700023 - The specified default app does not exist. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ @@ -150,10 +150,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @throws { BusinessError } 17700028 - The specified ability and type does not match. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @throws { BusinessError } 17700028 - The ability does not match the type. + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ @@ -170,10 +170,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @throws { BusinessError } 17700028 - The specified ability and type does not match. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @throws { BusinessError } 17700028 - The ability does not match the type. + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ @@ -188,9 +188,9 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ @@ -206,9 +206,9 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user id is not found. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi * @since 9 */ diff --git a/api/@ohos.bundle.distributedBundle.d.ts b/api/@ohos.bundle.distributedBundle.d.ts index 76c67d47bd..a5b16cec77 100644 --- a/api/@ohos.bundle.distributedBundle.d.ts +++ b/api/@ohos.bundle.distributedBundle.d.ts @@ -35,7 +35,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -53,7 +53,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -71,7 +71,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -89,7 +89,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -108,7 +108,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -127,7 +127,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -146,7 +146,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -165,7 +165,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device id is not found. + * @throws { BusinessError } 17700007 - The specified device ID is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi diff --git a/api/@ohos.bundle.freeInstall.d.ts b/api/@ohos.bundle.freeInstall.d.ts index 1d42117b9b..331dbced29 100644 --- a/api/@ohos.bundle.freeInstall.d.ts +++ b/api/@ohos.bundle.freeInstall.d.ts @@ -88,7 +88,7 @@ declare namespace freeInstall { } /** - * Sets wether to upgrade the module. + * Sets whether to upgrade the module. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application. * @param { string } moduleName - Indicates the module name of the application. @@ -106,7 +106,7 @@ declare namespace freeInstall { function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback) : void; /** - * Sets wether to upgrade the module. + * Sets whether to upgrade the module. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application. * @param { string } moduleName - Indicates the module name of the application. @@ -158,7 +158,7 @@ declare namespace freeInstall { function isHapModuleRemovable(bundleName: string, moduleName: string): Promise; /** - * Obtains bundlePackInfo based on bundleName and bundleFlags. + * Obtains bundlePackInfo based on bundleName and bundlePackFlags. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { BundlePackFlag } bundlePackFlag - Indicates the application bundle pack flag to be queried. @@ -174,7 +174,7 @@ declare namespace freeInstall { function getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback: AsyncCallback): void; /** - * Obtains bundlePackInfo based on bundleName and bundleFlags. + * Obtains bundlePackInfo based on bundleName and bundlePackFlags. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { BundlePackFlag } bundlePackFlag - Indicates the application bundle pack flag to be queried. diff --git a/api/@ohos.bundle.innerBundleManager.d.ts b/api/@ohos.bundle.innerBundleManager.d.ts index f9d0bb358e..526e4bee19 100644 --- a/api/@ohos.bundle.innerBundleManager.d.ts +++ b/api/@ohos.bundle.innerBundleManager.d.ts @@ -23,7 +23,6 @@ import { ShortcutInfo } from './bundle/shortcutInfo'; * @name innerBundleManager * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager @@ -53,7 +52,7 @@ declare namespace innerBundleManager { * @syscap SystemCapability.BundleManager.BundleFramework * @param type Indicates the command should be implement. * @param LauncherStatusCallback Indicates the callback to be register. - * @return Returns the result or error maeeage. + * @return { string | Promise } Returns the result of register. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use * @deprecated since 9 @@ -68,7 +67,7 @@ declare namespace innerBundleManager { * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework * @param type Indicates the command should be implement. - * @return Returns the result or error maeeage. + * @return { string | Promise } Returns the result of unregister. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use * @deprecated since 9 diff --git a/api/@ohos.bundle.installer.d.ts b/api/@ohos.bundle.installer.d.ts index 854e0b7d31..40ffa7185a 100644 --- a/api/@ohos.bundle.installer.d.ts +++ b/api/@ohos.bundle.installer.d.ts @@ -60,13 +60,13 @@ declare namespace installer { * @param { AsyncCallback } callback - The callback of installing haps result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified userId is not existed. - * @throws { BusinessError } 17700010 - To parse file of config.json or module.json failed. - * @throws { BusinessError } 17700011 - To verify signature failed. - * @throws { BusinessError } 17700012 - Invalid hap file path or too large file size. - * @throws { BusinessError } 17700015 - Multiple haps have inconsistent configured information. - * @throws { BusinessError } 17700016 - No disk space left for installation. - * @throws { BusinessError } 17700017 - Downgrade installation is prohibited. + * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. + * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. + * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. + * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. + * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. + * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. * @throws { BusinessError } 17700101 - The system service is excepted. * @throws { BusinessError } 17700103 - I/O operation is failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -79,11 +79,11 @@ declare namespace installer { * Uninstall an application. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. - * @param { InstallParam } installParam - Indicates other parameters required for the uninstallation. + * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. * @param { AsyncCallback } callback - The callback of uninstalling application result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified userId is not existed. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled. * @throws { BusinessError } 17700101 - The system service is excepted. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -91,16 +91,16 @@ declare namespace installer { * @since 9 */ uninstall(bundleName: string, installParam: InstallParam, callback : AsyncCallback) : void; - + /** * recover an application. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. - * @param { InstallParam } installParam - Indicates other parameters required for the uninstallation. - * @param { AsyncCallback } callback - The callback of recoverring application result. + * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. + * @param { AsyncCallback } callback - The callback of recovering application result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified userId is not existed. + * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -122,7 +122,7 @@ declare namespace installer { * @since 9 */ moduleName: string; - + /** * Indicates the hash value * @syscap SystemCapability.BundleManager.BundleFramework.Core diff --git a/api/@ohos.bundle.launcherBundleManager.d.ts b/api/@ohos.bundle.launcherBundleManager.d.ts index 11759af3a6..1553297a6e 100644 --- a/api/@ohos.bundle.launcherBundleManager.d.ts +++ b/api/@ohos.bundle.launcherBundleManager.d.ts @@ -36,7 +36,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. * @throws {BusinessError} 17700001 - The specified bundle name is not found. - * @throws {BusinessError} 17700004 - The specified user id is not found. + * @throws {BusinessError} 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -53,7 +53,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. * @throws {BusinessError} 17700001 - The specified bundle name is not found. - * @throws {BusinessError} 17700004 - The specified user id is not found. + * @throws {BusinessError} 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -68,7 +68,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 201 - Verify permission denied. * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. - * @throws {BusinessError} 17700004 - The specified user id is not found. + * @throws {BusinessError} 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -83,7 +83,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 201 - Verify permission denied. * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. - * @throws {BusinessError} 17700004 - The specified user id is not found. + * @throws {BusinessError} 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 diff --git a/api/@ohos.distributedBundle.d.ts b/api/@ohos.distributedBundle.d.ts index a00959bcb3..0edb99e97f 100644 --- a/api/@ohos.distributedBundle.d.ts +++ b/api/@ohos.distributedBundle.d.ts @@ -22,7 +22,6 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; * @name distributedBundle * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.distributeBundle diff --git a/api/@ohos.zlib.d.ts b/api/@ohos.zlib.d.ts index 6aca560c79..9230b0f9c4 100644 --- a/api/@ohos.zlib.d.ts +++ b/api/@ohos.zlib.d.ts @@ -20,8 +20,6 @@ declare namespace zlib { * @name ErrorCode * @since 7 * @syscap SystemCapability.BundleManager.Zlib - * @import NA - * @permission NA * @deprecated since 9 */ export enum ErrorCode { @@ -33,8 +31,6 @@ declare namespace zlib { * @name CompressLevel * @since 7 * @syscap SystemCapability.BundleManager.Zlib - * @import NA - * @permission NA */ export enum CompressLevel { COMPRESS_LEVEL_NO_COMPRESSION = 0, @@ -47,8 +43,6 @@ declare namespace zlib { * @name CompressStrategy * @since 7 * @syscap SystemCapability.BundleManager.Zlib - * @import NA - * @permission NA */ export enum CompressStrategy { COMPRESS_STRATEGY_DEFAULT_STRATEGY = 0, @@ -62,8 +56,6 @@ declare namespace zlib { * @name MemLevel * @since 7 * @syscap SystemCapability.BundleManager.Zlib - * @import NA - * @permission NA */ export enum MemLevel { MEM_LEVEL_MIN = 1, @@ -75,8 +67,6 @@ declare namespace zlib { * @name Options * @since 7 * @syscap SystemCapability.BundleManager.Zlib - * @import NA - * @permission NA */ interface Options { level?: CompressLevel; diff --git a/api/@system.package.d.ts b/api/@system.package.d.ts index 548e4ec621..130b0a3979 100644 --- a/api/@system.package.d.ts +++ b/api/@system.package.d.ts @@ -55,7 +55,7 @@ export interface CheckPackageHasInstalledOptions { fail?: (data: any, code: number) => void; /** - * Called when the excution is completed. + * Called when the execution is completed. * @syscap SystemCapability.BundleManager.BundleFramework * @since 3 */ @@ -65,12 +65,11 @@ export interface CheckPackageHasInstalledOptions { /** * @syscap SystemCapability.BundleManager.BundleFramework * @since 3 - * @import package from '@system.package'; * @deprecated since 9 */ export default class Package { /** - * Checks whethers an application exists, or whether a native application has been installed. + * Checks whether an application exists, or whether a native application has been installed. * @param options Options * @syscap SystemCapability.BundleManager.BundleFramework * @deprecated since 9 diff --git a/api/bundle/PermissionDef.d.ts b/api/bundle/PermissionDef.d.ts index 0f5f91ba38..fcb7d7a70d 100644 --- a/api/bundle/PermissionDef.d.ts +++ b/api/bundle/PermissionDef.d.ts @@ -17,7 +17,6 @@ * @name Indicates the defined permission details in file config.json * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.PermissionDef diff --git a/api/bundle/abilityInfo.d.ts b/api/bundle/abilityInfo.d.ts index 582105fe21..a37c9d8b43 100644 --- a/api/bundle/abilityInfo.d.ts +++ b/api/bundle/abilityInfo.d.ts @@ -21,7 +21,6 @@ import bundle from './../@ohos.bundle'; * @name Obtains configuration information about an ability * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.AbilityInfo */ diff --git a/api/bundle/applicationInfo.d.ts b/api/bundle/applicationInfo.d.ts index 6b24191948..8f9f27ded1 100644 --- a/api/bundle/applicationInfo.d.ts +++ b/api/bundle/applicationInfo.d.ts @@ -20,7 +20,6 @@ import { CustomizeData } from './customizeData'; * @name Obtains configuration information about an application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ApplicationInfo */ @@ -71,7 +70,8 @@ export interface ApplicationInfo { * @default Indicates the label id of the application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @deprecated since 9, use labelIndex + * @deprecated since 9 + * @useinstead ohos.bundle.bundleManager.ApplicationInfo.labelIndex */ readonly labelId: string; @@ -86,7 +86,8 @@ export interface ApplicationInfo { * @default Indicates the icon id of the application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @deprecated since 9, use iconIndex + * @deprecated since 9 + * @useinstead ohos.bundle.bundleManager.ApplicationInfo.iconIndex */ readonly iconId: string; diff --git a/api/bundle/bundleInfo.d.ts b/api/bundle/bundleInfo.d.ts index fe6cf36753..de3c304a3f 100644 --- a/api/bundle/bundleInfo.d.ts +++ b/api/bundle/bundleInfo.d.ts @@ -21,7 +21,6 @@ import { HapModuleInfo } from './hapModuleInfo'; * @name The scene which is used * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.UsedScene * @@ -46,7 +45,6 @@ export interface UsedScene { * @name Indicates the required permissions details defined in file config.json * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ReqPermissionDetail */ @@ -77,7 +75,6 @@ export interface ReqPermissionDetail { * @name Obtains configuration information about a bundle * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.BundleInfo */ diff --git a/api/bundle/bundleInstaller.d.ts b/api/bundle/bundleInstaller.d.ts index 337ad6bd27..95997273a7 100644 --- a/api/bundle/bundleInstaller.d.ts +++ b/api/bundle/bundleInstaller.d.ts @@ -20,7 +20,6 @@ import bundle from './../@ohos.bundle'; * @name Provides parameters required for installing or uninstalling an application. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.installer#InstallParam @@ -58,7 +57,6 @@ export interface InstallParam { * @name Indicates the install or uninstall status * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 */ @@ -85,7 +83,6 @@ export interface InstallStatus { * @name Offers install, upgrade, and remove bundles on the devices. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.installer#BundleInstaller diff --git a/api/bundle/customizeData.d.ts b/api/bundle/customizeData.d.ts index 762a082e1e..8eb7c2f5fa 100644 --- a/api/bundle/customizeData.d.ts +++ b/api/bundle/customizeData.d.ts @@ -17,7 +17,6 @@ * @name Indicates the custom metadata * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.Metadata * diff --git a/api/bundle/elementName.d.ts b/api/bundle/elementName.d.ts index 605f8e19ef..662559af6f 100644 --- a/api/bundle/elementName.d.ts +++ b/api/bundle/elementName.d.ts @@ -20,8 +20,6 @@ * @name Contains basic Ability information, which uniquely identifies an ability * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * - * @permission N/A * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ElementName */ diff --git a/api/bundle/hapModuleInfo.d.ts b/api/bundle/hapModuleInfo.d.ts index cf1c3282e5..c544a57d25 100644 --- a/api/bundle/hapModuleInfo.d.ts +++ b/api/bundle/hapModuleInfo.d.ts @@ -19,7 +19,6 @@ import { AbilityInfo } from "./abilityInfo"; * @name Obtains configuration information about an module. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.HapModuleInfo */ diff --git a/api/bundle/launcherAbilityInfo.d.ts b/api/bundle/launcherAbilityInfo.d.ts index 31438d20dd..62bfc257a5 100644 --- a/api/bundle/launcherAbilityInfo.d.ts +++ b/api/bundle/launcherAbilityInfo.d.ts @@ -23,8 +23,6 @@ import { ElementName } from './elementName' * @name Contains basic launcher Ability information, which uniquely identifies an LauncherAbilityInfo * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * - * @permission N/A * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.LauncherAbilityInfo @@ -34,8 +32,6 @@ export interface LauncherAbilityInfo { * @name Obtains application info information about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly applicationInfo: ApplicationInfo; @@ -43,8 +39,6 @@ export interface LauncherAbilityInfo { * @name Obtains element name about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly elementName : ElementName; @@ -52,8 +46,6 @@ export interface LauncherAbilityInfo { * @name Obtains labelId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly labelId: number; @@ -61,8 +53,6 @@ export interface LauncherAbilityInfo { * @name Obtains iconId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly iconId: number; @@ -70,8 +60,6 @@ export interface LauncherAbilityInfo { * @name Obtains userId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly userId: number; @@ -79,8 +67,6 @@ export interface LauncherAbilityInfo { * @name Obtains installTime about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA - * */ readonly installTime : number; } diff --git a/api/bundle/moduleInfo.d.ts b/api/bundle/moduleInfo.d.ts index 2f23150f40..0f504cb0bb 100644 --- a/api/bundle/moduleInfo.d.ts +++ b/api/bundle/moduleInfo.d.ts @@ -17,7 +17,6 @@ * @name Stores module information about an application. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.HapModuleInfo */ diff --git a/api/bundle/remoteAbilityInfo.d.ts b/api/bundle/remoteAbilityInfo.d.ts index 176c28d969..59e0630bd0 100644 --- a/api/bundle/remoteAbilityInfo.d.ts +++ b/api/bundle/remoteAbilityInfo.d.ts @@ -20,8 +20,6 @@ import { ElementName } from './elementName'; * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * - * @permission N/A * @deprecated since 9 * @useinstead ohos.bundle.distributedBundle.RemoteAbilityInfo */ @@ -32,14 +30,14 @@ export interface RemoteAbilityInfo { * @syscap SystemCapability.BundleManager.DistributedBundleFramework */ readonly elementName: ElementName; - + /** * @default Indicates the label of the ability * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework */ readonly label: string; - + /** * @default Indicates the icon of the ability * @since 8 diff --git a/api/bundle/shortcutInfo.d.ts b/api/bundle/shortcutInfo.d.ts index cc3bf43326..747cebec72 100644 --- a/api/bundle/shortcutInfo.d.ts +++ b/api/bundle/shortcutInfo.d.ts @@ -18,104 +18,91 @@ * bundle name, target module name and ability class name. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager.ShortcutWant */ export interface ShortcutWant{ /** - * @default Indicates the target bundle of the shortcut want * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly targetBundle: string; /** - * @default Indicates the target class of the shortcut want * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly targetClass: string; } - + /** * @name Provides information about a shortcut, including the shortcut ID and label. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager.ShortcutInfo */ export interface ShortcutInfo { /** - * @default Indicates the ID of the application to which this shortcut belongs * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * + * */ readonly id: string; /** - * @default Indicates the name of the bundle containing the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly bundleName: string; /** - * @default Indicates the host ability of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly hostAbility: string; /** - * @default Indicates the icon of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly icon: string; /** - * @default Indicates the icon id of the shortcut * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly iconId: number; /** - * @default Indicates the label of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly label: string; /** - * @default Indicates the label id of the shortcut * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly labelId: number; /** - * @default Indicates the disableMessage of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly disableMessage: string; /** - * @default Indicates the wants of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly wants: Array; /** - * @default Indicates whether the shortcut is static + * @default false * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly isStatic?: boolean /** - * @default Indicates whether the shortcut is homeshortcut + * @default false * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly isHomeShortcut?: boolean; /** - * @default Indicates whether the shortcut is enabled + * @default false * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ -- Gitee From 067ba67210997f119e9ec9222b10d3a413512412 Mon Sep 17 00:00:00 2001 From: dboy190 Date: Thu, 17 Nov 2022 22:22:05 +0800 Subject: [PATCH 5/8] errorcode bug fix Signed-off-by: dboy190 --- api/@ohos.data.distributedData.d.ts | 789 ++++++++++++++----------- api/@ohos.data.distributedKVStore.d.ts | 505 ++++++++++++---- 2 files changed, 831 insertions(+), 463 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 9231cbc643..0c17584892 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -13,10 +13,10 @@ * limitations under the License. */ -import { AsyncCallback, Callback } from './basic'; +import {AsyncCallback, Callback} from './basic'; /** - * Providers interfaces to creat a {@link KVManager} istances. + * Providers interfaces to creat a {@link KVManager} instance. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 7 * @deprecated since 9 @@ -61,16 +61,16 @@ declare namespace distributedData { * @deprecated since 9 */ interface UserInfo { - /** - * Indicates the user ID to set + /** + * Indicates the user ID to set * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 */ userId?: string; - /** - * Indicates the user type to set + /** + * Indicates the user type to set * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -86,8 +86,8 @@ declare namespace distributedData { * @deprecated since 9 */ enum UserType { - /** - * Indicates a user that logs in to different devices using the same account. + /** + * Indicates a user that logs in to different devices using the same account. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -170,8 +170,8 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.ValueType */ enum ValueType { - /** - * Indicates that the value type is string. + /** + * Indicates that the value type is string. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -180,7 +180,7 @@ declare namespace distributedData { STRING = 0, /** - * Indicates that the value type is int. + * Indicates that the value type is int. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -188,8 +188,8 @@ declare namespace distributedData { */ INTEGER = 1, - /** - * Indicates that the value type is float. + /** + * Indicates that the value type is float. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -197,17 +197,17 @@ declare namespace distributedData { */ FLOAT = 2, - /** - * Indicates that the value type is byte array. + /** + * Indicates that the value type is byte array. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.ValueTypeB#YTE_ARRAY + * @useinstead ohos.data.distributedKVStore.ValueType#BYTE_ARRAY * */ BYTE_ARRAY = 3, - /** - * Indicates that the value type is boolean. + /** + * Indicates that the value type is boolean. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -215,8 +215,8 @@ declare namespace distributedData { * */ BOOLEAN = 4, - /** - * Indicates that the value type is double. + /** + * Indicates that the value type is double. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -294,15 +294,15 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.ChangeNotification */ interface ChangeNotification { - /** - * Indicates data addition records. + /** + * Indicates data addition records. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.ChangeNotification#insertEntries */ insertEntries: Entry[]; - /** + /** * Indicates data update records. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 @@ -310,8 +310,8 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.ChangeNotification#updateEntries */ updateEntries: Entry[]; - /** - * Indicates data deletion records. + /** + * Indicates data deletion records. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -337,7 +337,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SyncMode */ enum SyncMode { - /** + /** * Indicates that data is only pulled from the remote end. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 @@ -345,16 +345,16 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SyncMode#PULL_ONLY */ PULL_ONLY = 0, - /** - * Indicates that data is only pushed from the local end. + /** + * Indicates that data is only pushed from the local end. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SyncMode#PUSH_ONLY */ PUSH_ONLY = 1, - /** - * Indicates that data is pushed from the local end, and then pulled from the remote end. + /** + * Indicates that data is pushed from the local end, and then pulled from the remote end. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -372,26 +372,26 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SubscribeType */ enum SubscribeType { - /** - * Subscription to local data changes + /** + * Subscription to local data changes * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SubscribeType#SUBSCRIBE_TYPE_LOCAL - */ + */ SUBSCRIBE_TYPE_LOCAL = 0, - /** - * Subscription to remote data changes + /** + * Subscription to remote data changes * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SubscribeType#SUBSCRIBE_TYPE_REMOTE - */ + */ SUBSCRIBE_TYPE_REMOTE = 1, - /** - * Subscription to both local and remote data changes + /** + * Subscription to both local and remote data changes * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -409,8 +409,8 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreType */ enum KVStoreType { - /** - * Device-collaborated database, as specified by {@code DeviceKVStore} + /** + * Device-collaboration database, as specified by {@code DeviceKVStore} * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 7 * @deprecated since 9 @@ -418,8 +418,8 @@ declare namespace distributedData { */ DEVICE_COLLABORATION = 0, - /** - * Single-version database, as specified by {@code SingleKVStore} + /** + * Single-version database, as specified by {@code SingleKVStore} * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -427,8 +427,8 @@ declare namespace distributedData { */ SINGLE_VERSION = 1, - /** - * Multi-version database, as specified by {@code MultiKVStore} + /** + * Multi-version database, as specified by {@code MultiKVStore} * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 7 * @deprecated since 9 @@ -522,7 +522,7 @@ declare namespace distributedData { */ interface Options { /** - * Indicates whether to createa database when the database file does not exist + * Indicates whether to create a database when the database file does not exist * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -555,7 +555,7 @@ declare namespace distributedData { */ autoSync?: boolean; /** - * Indicates setting the databse type + * Indicates setting the database type * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -571,7 +571,7 @@ declare namespace distributedData { */ securityLevel?: SecurityLevel; /** - * Indicates schema object + * Indicates schema object * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -582,9 +582,9 @@ declare namespace distributedData { /** * Represents the database schema. - * + * * You can create Schema objects and put them in Options when creating or opening the database. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -593,34 +593,35 @@ declare namespace distributedData { class Schema { /** * A constructor used to create a Schema instance. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Schema#constructor */ constructor() + /** * Indicates the root json object. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Schema#root */ - root: FieldNode; + root: FieldNode; /** * Indicates the string array of json. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Schema#indexes */ - indexes: Array; + indexes: Array; /** * Indicates the mode of schema. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -628,8 +629,8 @@ declare namespace distributedData { */ mode: number; /** - * Indicates the skipsize of schema. - * + * Indicates the skip size of schema. + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -640,13 +641,13 @@ declare namespace distributedData { /** * Represents a node of a {@link Schema} instance. - * + * *

          Through the {@link Schema} instance, you can define the fields contained in the values stored in a database. - * + * *

          A FieldNode of the {@link Schema} instance is either a leaf or a non-leaf node. - * + * *

          The leaf node must have a value; the non-leaf node must have a child {@code FieldNode}. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -656,18 +657,19 @@ declare namespace distributedData { /** * A constructor used to create a FieldNode instance with the specified field. * name Indicates the field node name. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.FieldNode#constructor */ constructor(name: string) + /** * Adds a child node to this {@code FieldNode}. - * + * *

          Adding a child node makes this node a non-leaf node. Field value will be ignored if it has child node. - * + * * @param child The field node to append. * @returns Returns true if the child node is successfully added to this {@code FieldNode}; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore @@ -676,41 +678,42 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.FieldNode#appendChild */ appendChild(child: FieldNode): boolean; + /** - * Indicates the default value of fieldnode. + * Indicates the default value of field node. * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.FieldNode#default */ - default: string; - /** - * Indicates the nullable of database field. - * - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.FieldNode#nullable - */ - nullable: boolean; - /** - * Indicates the type of value. - * - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.FieldNode#type - */ - type: number; + default: string; + /** + * Indicates the nullable of database field. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.FieldNode#nullable + */ + nullable: boolean; + /** + * Indicates the type of value. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.FieldNode#type + */ + type: number; } /** * Provide methods to obtain the result set of the {@code KvStore} database. - * + * *

          The result set is created by using the {@code getResultSet} method in the {@code DeviceKVStore} class. This interface also provides * methods for moving the data read position in the result set. - * + * * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -719,7 +722,7 @@ declare namespace distributedData { interface KvStoreResultSet { /** * Obtains the number of lines in a result set. - * + * * @returns Returns the number of lines. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -727,9 +730,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#getCount */ getCount(): number; + /** * Obtains the current read position in a result set. - * + * * @returns Returns the current read position. The read position starts with 0. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -737,9 +741,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#getPosition */ getPosition(): number; + /** * Moves the read position to the first line. - * + * *

          If the result set is empty, false is returned. * * @returns Returns true if the operation succeeds; return false otherwise. @@ -749,9 +754,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#moveToFirst */ moveToFirst(): boolean; + /** * Moves the read position to the last line. - * + * *

          If the result set is empty, false is returned. * * @returns Returns true if the operation succeeds; return false otherwise. @@ -761,9 +767,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#moveToLast */ moveToLast(): boolean; + /** * Moves the read position to the next line. - * + * *

          If the result set is empty or the data in the last line is being read, false is returned. * * @returns Returns true if the operation succeeds; return false otherwise. @@ -773,9 +780,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#moveToNext */ moveToNext(): boolean; + /** * Moves the read position to the previous line. - * + * *

          If the result set is empty or the data in the first line is being read, false is returned. * * @returns Returns true if the operation succeeds; return false otherwise. @@ -785,12 +793,13 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#moveToPrevious */ moveToPrevious(): boolean; + /** * Moves the read position by a relative offset to the current position. - * - * @param offset Indicates the relative offset to the current position. Anegative offset indicates moving backwards, and a - * positive offset indicates moving forewards. Forexample, if the current position is entry 1 and thisoffset is 2, - * the destination position will be entry 3; ifthe current position is entry 3 and this offset is -2, + * + * @param offset Indicates the relative offset to the current position. A negative offset indicates moving backwards, and a + * positive offset indicates moving forwards. For example, if the current position is entry 1 and this offset is 2, + * the destination position will be entry 3; if the current position is entry 3 and this offset is -2, * the destination position will be entry 1. The valid final position after moving forwards starts with 0. If the * final position is invalid, false will be returned. * @returns Returns true if the operation succeeds; return false otherwise. @@ -800,9 +809,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#move */ move(offset: number): boolean; + /** * Moves the read position from 0 to an absolute position. - * + * * @param position Indicates the absolute position. * @returns Returns true if the operation succeeds; return false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -811,9 +821,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#moveToPosition */ moveToPosition(position: number): boolean; + /** * Checks whether the read position is the first line. - * + * * @returns Returns true if the read position is the first line; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -821,9 +832,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#isFirst */ isFirst(): boolean; + /** * Checks whether the read position is the last line. - * + * * @returns Returns true if the read position is the last line; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -831,9 +843,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#isLast */ isLast(): boolean; + /** * Checks whether the read position is before the last line. - * + * * @returns Returns true if the read position is before the first line; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -841,9 +854,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#isBeforeFirst */ isBeforeFirst(): boolean; + /** * Checks whether the read position is after the last line. - * + * * @returns Returns true if the read position is after the last line; returns false otherwise. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -851,9 +865,10 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVStoreResultSet#isAfterLast */ isAfterLast(): boolean; + /** * Obtains a key-value pair. - * + * * @returns Returns a key-value pair. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 @@ -886,6 +901,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#constructor */ constructor() + /** * Resets this {@code Query} object. * @@ -896,6 +912,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#reset */ reset(): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is equal to the specified long value. * @@ -908,7 +925,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#equalTo */ - equalTo(field: string, value: number|string|boolean): Query; + equalTo(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not equal to the specified int value. * @@ -921,7 +939,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#notEqualTo */ - notEqualTo(field: string, value: number|string|boolean): Query; + notEqualTo(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or equal to the * specified int value. @@ -935,7 +954,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#greaterThan */ - greaterThan(field: string, value: number|string|boolean): Query; + greaterThan(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is less than the specified int value. * @@ -948,7 +968,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#lessThan */ - lessThan(field: string, value: number|string): Query; + lessThan(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or equal to the * specified int value. @@ -962,7 +983,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#greaterThanOrEqualTo */ - greaterThanOrEqualTo(field: string, value: number|string): Query; + greaterThanOrEqualTo(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is less than or equal to the * specified int value. @@ -976,7 +998,8 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#lessThanOrEqualTo */ - lessThanOrEqualTo(field: string, value: number|string): Query; + lessThanOrEqualTo(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is null. * @@ -989,6 +1012,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#isNull */ isNull(field: string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified int value list. * @@ -1002,6 +1026,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#inNumber */ inNumber(field: string, valueList: number[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified string value list. * @@ -1015,6 +1040,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#inString */ inString(field: string, valueList: string[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified int value list. * @@ -1028,6 +1054,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#notInNumber */ notInNumber(field: string, valueList: number[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified string value list. * @@ -1041,6 +1068,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#notInString */ notInString(field: string, valueList: string[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is similar to the specified string value. * @@ -1054,6 +1082,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#like */ like(field: string, value: string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not similar to the specified string value. * @@ -1067,6 +1096,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#unlike */ unlike(field: string, value: string): Query; + /** * Constructs a {@code Query} object with the and condition. * @@ -1079,6 +1109,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#and */ and(): Query; + /** * Constructs a {@code Query} object with the or condition. * @@ -1091,6 +1122,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#or */ or(): Query; + /** * Constructs a {@code Query} object to sort the query results in ascending order. * @@ -1103,6 +1135,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#orderByAsc */ orderByAsc(field: string): Query; + /** * Constructs a {@code Query} object to sort the query results in descending order. * @@ -1115,6 +1148,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#orderByDesc */ orderByDesc(field: string): Query; + /** * Constructs a {@code Query} object to specify the number of results and the start position. * @@ -1127,6 +1161,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#limit */ limit(total: number, offset: number): Query; + /** * Creates a {@code query} condition with a specified field that is not null. * @@ -1139,6 +1174,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#isNotNull */ isNotNull(field: string): Query; + /** * Creates a query condition group with a left bracket. * @@ -1152,6 +1188,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#beginGroup */ beginGroup(): Query; + /** * Creates a query condition group with a right bracket. * @@ -1165,6 +1202,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#endGroup */ endGroup(): Query; + /** * Creates a query condition with a specified key prefix. * @@ -1177,6 +1215,7 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#prefixKey */ prefixKey(prefix: string): Query; + /** * Sets a specified index that will be preferentially used for query. * @@ -1189,31 +1228,33 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.Query#setSuggestIndex */ setSuggestIndex(index: string): Query; - /** - * Add device ID key prefix.Used by {@code DeviceKVStore}. - * - * @param deviceId Specify device id to query from. - * @return Returns the {@code Query} object with device ID prefix added. - * @throw Throws this exception if input is invalid. + + /** + * Add device ID key prefix.Used by {@code DeviceKVStore}. + * + * @param deviceId Specify device id to query from. + * @returns Returns the {@code Query} object with device ID prefix added. + * @throws Throws this exception if input is invalid. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#deviceId - */ - deviceId(deviceId:string):Query; - /** - * Get a String that repreaents this {@code Query}. - * - *

          The String would be parsed to DB query format. - * The String length should be no longer than 500kb. - * - * @return String representing this {@code Query}. + */ + deviceId(deviceId: string): Query; + + /** + * Get a String that represents this {@code Query}. + * + *

          The String would be parsed to DB query format. + * The String length should be no longer than 500kb. + * + * @returns String representing this {@code Query}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.Query#getSqlLike - */ - getSqlLike():string; + */ + getSqlLike(): string; } /** @@ -1283,7 +1324,7 @@ declare namespace distributedData { on(event: 'dataChange', type: SubscribeType, listener: Callback): void; /** - * Subscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. + * Subscribe the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. * * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, @@ -1296,7 +1337,7 @@ declare namespace distributedData { on(event: 'syncComplete', syncCallback: Callback>): void; /** - * Unsubscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. + * Unsubscribe the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. * * @param listener Indicates the data change observer registered by {#subscribe(SubscribeType, KvStoreObserver)}. * @throws Throws this exception if any of the following errors @@ -1309,6 +1350,20 @@ declare namespace distributedData { */ off(event: 'dataChange', listener?: Callback): void; + /** + * UnRegister the {@code KvStore} database synchronization callback. + * + * @param syncCallback Indicates the callback used to send the synchronization result to caller. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.SingleKVStore#off + */ + off(event: 'syncComplete', syncCallback?: Callback>): void; + /** * Inserts key-value pairs into the {@code KvStore} database in batches. * @@ -1539,7 +1594,7 @@ declare namespace distributedData { removeDeviceData(deviceId: string): Promise; /** - * Synchronizes the database to the specified devices with the specified delay allowed. + * Synchronize the database to the specified devices with the specified delay allowed. * * @param deviceIds Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. @@ -1553,10 +1608,25 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#sync */ - sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; + sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; + + /** + * Register a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback + * in the {@code KvStoreObserver} will be invoked. + * + * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param listener Indicates the observer of data change events in the distributed database. + * @throws Throws this exception if no {@code SingleKvStore} database is available. + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.SingleKVStore#on + */ + on(event: 'dataChange', type: SubscribeType, listener: Callback): void; /** - * Register Synchronizes SingleKvStore databases callback. + * Register a SingleKvStore database synchronization callback. *

          Sync result is returned through asynchronous callback. * * @param syncCallback Indicates the callback used to send the synchronization result to the caller. @@ -1566,10 +1636,24 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#on */ - on(event: 'syncComplete', syncCallback: Callback>): void; + on(event: 'syncComplete', syncCallback: Callback>): void; /** - * UnRegister Synchronizes SingleKvStore databases callback. + * Unsubscribe the SingleKvStore database based on the specified subscribeType and {@code KvStoreObserver}. + * + * @param listener Indicates the data change observer registered by {#subscribe(SubscribeType, KvStoreObserver)}. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.SingleKVStore#off + */ + off(event: 'dataChange', listener?: Callback): void; + + /** + * UnRegister the SingleKvStore database synchronization callback. * * @throws Throws this exception if no {@code SingleKvStore} database is available. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1577,35 +1661,35 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#off */ - off(event: 'syncComplete', syncCallback?: Callback>): void; - - /** - * Sets the default delay allowed for database synchronization - * - * @param defaultAllowedDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. - * @throws Throws this exception if any of the following errors occurs:{@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.SingleKVStore#setSyncParam - */ - setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback): void; - setSyncParam(defaultAllowedDelayMs: number): Promise; - - /** - * Get the security level of the database. - * - * @returns SecurityLevel {@code SecurityLevel} the security level of the database. - * @throws Throws this exception if any of the following errors occurs:{@code SERVER_UNAVAILABLE}, - * {@code IPC_ERROR}, and {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.SingleKVStore#getSecurityLevel - */ - getSecurityLevel(callback: AsyncCallback): void; - getSecurityLevel(): Promise; + off(event: 'syncComplete', syncCallback?: Callback>): void; + + /** + * Sets the default delay allowed for database synchronization + * + * @param defaultAllowedDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. + * @throws Throws this exception if any of the following errors occurs:{@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.SingleKVStore#setSyncParam + */ + setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback): void; + setSyncParam(defaultAllowedDelayMs: number): Promise; + + /** + * Get the security level of the database. + * + * @returns SecurityLevel {@code SecurityLevel} the security level of the database. + * @throws Throws this exception if any of the following errors occurs:{@code SERVER_UNAVAILABLE}, + * {@code IPC_ERROR}, and {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.SingleKVStore#getSecurityLevel + */ + getSecurityLevel(callback: AsyncCallback): void; + getSecurityLevel(): Promise; } /** @@ -1627,7 +1711,7 @@ declare namespace distributedData { * * @param deviceId Indicates the device to be queried. * @param key Indicates the key of the value to be queried. - * @return Returns the value matching the given criteria. + * @returns Returns the value matching the given criteria. * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}, and {@code KEY_NOT_FOUND}. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore @@ -1635,165 +1719,165 @@ declare namespace distributedData { * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.DeviceKVStore#get */ - get(deviceId: string, key: string, callback: AsyncCallback): void; - get(deviceId: string, key: string): Promise; - - /** - * Obtains all key-value pairs matching a specified device ID and key prefix. - * - * @param deviceId Identifies the device whose data is to be queried. - * @param keyPrefix Indicates the key prefix to match. - * @returns Returns the list of all key-value pairs meeting the given criteria. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries - */ - getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback): void; - getEntries(deviceId: string, keyPrefix: string): Promise; - - /** - * Obtains the list of key-value pairs matching the specified {@code Query} object. - * - * @param query Indicates the {@code Query} object. - * @returns Returns the list of key-value pairs matching the specified {@code Query} object. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries - */ - getEntries(query: Query, callback: AsyncCallback): void; - getEntries(query: Query): Promise; - - /** - * Obtains the list of key-value pairs matching a specified device ID and {@code Query} object. - * - * @param deviceId Indicates the ID of the device to which the key-value pairs belong. - * @param query Indicates the {@code Query} object. - * @returns Returns the list of key-value pairs matching the specified {@code Query} object. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries - */ - getEntries(deviceId: string, query: Query, callback: AsyncCallback): void; - getEntries(deviceId: string, query: Query): Promise; - - /** - * Obtains the {@code KvStoreResultSet} object matching the specified device ID and key prefix. - * - *

          The {@code KvStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code KvStore} - * instance can have a maximum of four {@code KvStoreResultSet} objects at the same time. If you have created four objects, - * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary - * {@code KvStoreResultSet} objects in a timely manner. - * - * @param deviceId Identifies the device whose data is to be queried. - * @param keyPrefix Indicates the key prefix to match. - * @returns Returns the {@code KvStoreResultSet} objects. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet - */ - getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback): void; - getResultSet(deviceId: string, keyPrefix: string): Promise; - - /** - * Obtains the {@code KvStoreResultSet} object matching the specified {@code Query} object. - * - * @param query Indicates the {@code Query} object. - * @returns Returns the {@code KvStoreResultSet} object matching the specified {@code Query} object. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet - */ - getResultSet(query: Query, callback: AsyncCallback): void; - getResultSet(query: Query): Promise; - - /** - * Obtains the {@code KvStoreResultSet} object matching a specified device ID and {@code Query} object. - * - * @param deviceId Indicates the ID of the device to which the {@code KvStoreResultSet} object belongs. - * @param query Indicates the {@code Query} object. - * @returns Returns the {@code KvStoreResultSet} object matching the specified {@code Query} object. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet - */ - getResultSet(deviceId: string, query: Query, callback: AsyncCallback): void; - getResultSet(deviceId: string, query: Query): Promise; - - /** - * Closes a {@code KvStoreResultSet} object returned by getResultSet. - * - * @param resultSet Indicates the {@code KvStoreResultSet} object to close. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#closeResultSet - */ - closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback): void; - closeResultSet(resultSet: KvStoreResultSet): Promise; - - /** - * Obtains the number of results matching the specified {@code Query} object. - * - * @param query Indicates the {@code Query} object. - * @returns Returns the number of results matching the specified {@code Query} object. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSize - */ - getResultSize(query: Query, callback: AsyncCallback): void; - getResultSize(query: Query): Promise; - - /** - * Obtains the number of results matching a specified device ID and {@code Query} object. - * - * @param deviceId Indicates the ID of the device to which the results belong. - * @param query Indicates the {@code Query} object. - * @returns Returns the number of results matching the specified {@code Query} object. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSize - */ - getResultSize(deviceId: string, query: Query, callback: AsyncCallback): void; - getResultSize(deviceId: string, query: Query): Promise; - - /** - * Removes data of a specified device from the current database. This method is used to remove only the data - * synchronized from remote devices. This operation does not synchronize data to other databases or affect - * subsequent data synchronization. - * - * @param deviceId Identifies the device whose data is to be removed. The value cannot be the current device ID. - * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, - * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 8 - * @deprecated since 9 - * @useinstead ohos.data.distributedKVStore.DeviceKVStore#removeDeviceData - */ - removeDeviceData(deviceId: string, callback: AsyncCallback): void; - removeDeviceData(deviceId: string): Promise; - - /** - * Synchronizes {@code DeviceKVStore} databases. + get(deviceId: string, key: string, callback: AsyncCallback): void; + get(deviceId: string, key: string): Promise; + + /** + * Obtains all key-value pairs matching a specified device ID and key prefix. + * + * @param deviceId Identifies the device whose data is to be queried. + * @param keyPrefix Indicates the key prefix to match. + * @returns Returns the list of all key-value pairs meeting the given criteria. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries + */ + getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback): void; + getEntries(deviceId: string, keyPrefix: string): Promise; + + /** + * Obtains the list of key-value pairs matching the specified {@code Query} object. + * + * @param query Indicates the {@code Query} object. + * @returns Returns the list of key-value pairs matching the specified {@code Query} object. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries + */ + getEntries(query: Query, callback: AsyncCallback): void; + getEntries(query: Query): Promise; + + /** + * Obtains the list of key-value pairs matching a specified device ID and {@code Query} object. + * + * @param deviceId Indicates the ID of the device to which the key-value pairs belong. + * @param query Indicates the {@code Query} object. + * @returns Returns the list of key-value pairs matching the specified {@code Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getEntries + */ + getEntries(deviceId: string, query: Query, callback: AsyncCallback): void; + getEntries(deviceId: string, query: Query): Promise; + + /** + * Obtains the {@code KvStoreResultSet} object matching the specified device ID and key prefix. + * + *

          The {@code KvStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. Each {@code KvStore} + * instance can have a maximum of four {@code KvStoreResultSet} objects at the same time. If you have created four objects, + * calling this method will return a failure. Therefore, you are advised to call the closeResultSet method to close unnecessary + * {@code KvStoreResultSet} objects in a timely manner. + * + * @param deviceId Identifies the device whose data is to be queried. + * @param keyPrefix Indicates the key prefix to match. + * @returns Returns the {@code KvStoreResultSet} objects. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet + */ + getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback): void; + getResultSet(deviceId: string, keyPrefix: string): Promise; + + /** + * Obtains the {@code KvStoreResultSet} object matching the specified {@code Query} object. + * + * @param query Indicates the {@code Query} object. + * @returns Returns the {@code KvStoreResultSet} object matching the specified {@code Query} object. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet + */ + getResultSet(query: Query, callback: AsyncCallback): void; + getResultSet(query: Query): Promise; + + /** + * Obtains the {@code KvStoreResultSet} object matching a specified device ID and {@code Query} object. + * + * @param deviceId Indicates the ID of the device to which the {@code KvStoreResultSet} object belongs. + * @param query Indicates the {@code Query} object. + * @returns Returns the {@code KvStoreResultSet} object matching the specified {@code Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSet + */ + getResultSet(deviceId: string, query: Query, callback: AsyncCallback): void; + getResultSet(deviceId: string, query: Query): Promise; + + /** + * Closes a {@code KvStoreResultSet} object returned by getResultSet. + * + * @param resultSet Indicates the {@code KvStoreResultSet} object to close. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#closeResultSet + */ + closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback): void; + closeResultSet(resultSet: KvStoreResultSet): Promise; + + /** + * Obtains the number of results matching the specified {@code Query} object. + * + * @param query Indicates the {@code Query} object. + * @returns Returns the number of results matching the specified {@code Query} object. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSize + */ + getResultSize(query: Query, callback: AsyncCallback): void; + getResultSize(query: Query): Promise; + + /** + * Obtains the number of results matching a specified device ID and {@code Query} object. + * + * @param deviceId Indicates the ID of the device to which the results belong. + * @param query Indicates the {@code Query} object. + * @returns Returns the number of results matching the specified {@code Query} object. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#getResultSize + */ + getResultSize(deviceId: string, query: Query, callback: AsyncCallback): void; + getResultSize(deviceId: string, query: Query): Promise; + + /** + * Removes data of a specified device from the current database. This method is used to remove only the data + * synchronized from remote devices. This operation does not synchronize data to other databases or affect + * subsequent data synchronization. + * + * @param deviceId Identifies the device whose data is to be removed. The value cannot be the current device ID. + * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, + * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 8 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#removeDeviceData + */ + removeDeviceData(deviceId: string, callback: AsyncCallback): void; + removeDeviceData(deviceId: string): Promise; + + /** + * Synchronize the {@code DeviceKVStore} databases. * *

          This method returns immediately and sync result will be returned through asynchronous callback. * @@ -1812,7 +1896,24 @@ declare namespace distributedData { sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; /** - * Register Synchronizes DeviceKVStore databases callback. + * Register a {@code KvStoreObserver} for the database. When data in the distributed database changes, the + * callback in the {@code KvStoreObserver} will be invoked. + * + * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param listener Indicates the observer of data change events in the distributed database. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#on + */ + on(event: 'dataChange', type: SubscribeType, listener: Callback): void; + + + /** + * Register a DeviceKVStore database synchronization callback. * *

          Sync result is returned through asynchronous callback. * @@ -1826,7 +1927,21 @@ declare namespace distributedData { on(event: 'syncComplete', syncCallback: Callback>): void; /** - * UnRegister Synchronizes DeviceKVStore databases callback. + * Unsubscribe the DeviceKVStore database based on the specified subscribeType and {@code KvStoreObserver}. + * + * @param listener Indicates the data change observer registered by {#subscribe(SubscribeType, KvStoreObserver)}. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + * @deprecated since 9 + * @useinstead ohos.data.distributedKVStore.DeviceKVStore#off + */ + off(event: 'dataChange', listener?: Callback): void; + + /** + * UnRegister the DeviceKVStore database synchronization callback. * * @throws Throws this exception if no DeviceKVStore database is available. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1845,7 +1960,7 @@ declare namespace distributedData { * * @param config Indicates the {@link KVStore} configuration information, * including the user information and package name. - * @return Returns the {@code KVManager} instance. + * @returns Returns the {@code KVManager} instance. * @throws Throws exception if input is invalid. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 @@ -1873,7 +1988,7 @@ declare namespace distributedData { * @param storeId Identifies the {@code KVStore} database. * The value of this parameter must be unique for the same application, * and different applications can share the same value. - * @return Returns a {@code KVStore}, or {@code SingleKVStore}. + * @returns Returns a {@code KVStore}, or {@code SingleKVStore}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 7 * @deprecated since 9 @@ -1884,18 +1999,18 @@ declare namespace distributedData { /** * Closes the {@code KvStore} database. - * + * *

          Warning: This method is not thread-safe. If you call this method to stop a KvStore database that is running, your * thread may crash. - * - *

          The {@code KvStore} database to close must be an object created by using the {@code getKvStore} method. Before using this + * + *

          The {@code KvStore} database to close must be an object created by using the {@code getKvStore} method. Before using this * method, release the resources created for the database, for example, {@code KvStoreResultSet} for {@code SingleKvStore}, * otherwise closing the database will fail. If you are attempting to close a database that is already closed, an error * will be returned. * * @param kvStore Indicates the {@code KvStore} database to close. * @throws Throws this exception if any of the following errors - * occurs:{@code INVALID_ARGUMENT}, {@code ERVER_UNAVAILABLE}, + * occurs:{@code INVALID_ARGUMENT}, {@code SERVER_UNAVAILABLE}, * {@code STORE_NOT_OPEN}, {@code STORE_NOT_FOUND}, {@code DB_ERROR}, * {@code PERMISSION_DENIED}, and {@code IPC_ERROR}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1908,14 +2023,14 @@ declare namespace distributedData { /** * Deletes the {@code KvStore} database identified by storeId. - * + * *

          Before using this method, close all {@code KvStore} instances in use that are identified by the same storeId. - * + * *

          You can use this method to delete a {@code KvStore} database not in use. After the database is deleted, all its data will be * lost. * * @param storeId Identifies the {@code KvStore} database to delete. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code STORE_NOT_FOUND}, * {@code DB_ERROR}, {@code PERMISSION_DENIED}, and {@code IPC_ERROR}. @@ -1930,9 +2045,9 @@ declare namespace distributedData { /** * Obtains the storeId of all {@code KvStore} databases that are created by using the {@code getKvStore} method and not deleted by * calling the {@code deleteKvStore} method. - * + * * @returns Returns the storeId of all created {@code KvStore} databases. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code DB_ERROR}, * {@code PERMISSION_DENIED}, and {@code IPC_ERROR}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1945,9 +2060,9 @@ declare namespace distributedData { /** * register DeviceChangeCallback to get notification when device's status changed - * + * * @param deathCallback device change callback {@code DeviceChangeCallback} - * @throws exception maybe occurs. + * @throws exception maybe occurs. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 8 * @deprecated since 9 @@ -1957,7 +2072,7 @@ declare namespace distributedData { /** * unRegister DeviceChangeCallback and can not receive notification - * + * * @param deathCallback device change callback {@code DeviceChangeCallback} which has been registered. * @throws exception maybe occurs. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore diff --git a/api/@ohos.data.distributedKVStore.d.ts b/api/@ohos.data.distributedKVStore.d.ts index 7eb0434464..9f076e0da9 100644 --- a/api/@ohos.data.distributedKVStore.d.ts +++ b/api/@ohos.data.distributedKVStore.d.ts @@ -13,13 +13,13 @@ * limitations under the License. */ -import { AsyncCallback, Callback } from './basic'; -import { ValuesBucket } from './@ohos.data.ValuesBucket'; +import {AsyncCallback, Callback} from './basic'; +import {ValuesBucket} from './@ohos.data.ValuesBucket'; import dataSharePredicates from './@ohos.data.dataSharePredicates'; import Context from './application/Context'; /** - * Provider interfaces to create a {@link KVManager} istances. + * Provider interfaces to create a {@link KVManager} instance. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -41,7 +41,7 @@ declare namespace distributedKVStore { /** * Indicates the ability or hap context * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @Note: if swap the area, you should close all the KV store and use the new Context to create the KVManager + * if swap the area, you should close all the KV store and use the new Context to create the KVManager * @since 9 */ context: Context; @@ -106,43 +106,43 @@ declare namespace distributedKVStore { * @since 9 */ enum ValueType { - /** - * Indicates that the value type is string. + /** + * Indicates that the value type is string. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ STRING, /** - * Indicates that the value type is int. + * Indicates that the value type is int. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ INTEGER, - /** - * Indicates that the value type is float. + /** + * Indicates that the value type is float. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ FLOAT, - /** - * Indicates that the value type is byte array. + /** + * Indicates that the value type is byte array. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 * */ BYTE_ARRAY, - /** - * Indicates that the value type is boolean. + /** + * Indicates that the value type is boolean. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 * */ BOOLEAN, - /** - * Indicates that the value type is double. + /** + * Indicates that the value type is double. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -163,6 +163,7 @@ declare namespace distributedKVStore { * @since 9 */ type: ValueType; + /** * Indicates the value * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -184,6 +185,7 @@ declare namespace distributedKVStore { * @since 9 */ key: string; + /** * Indicates the value * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -209,18 +211,21 @@ declare namespace distributedKVStore { * @since 9 */ insertEntries: Entry[]; + /** * Indicates data update records. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ updateEntries: Entry[]; + /** * Indicates data deletion records. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ deleteEntries: Entry[]; + /** * Indicates the device id which brings the data change. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -242,12 +247,14 @@ declare namespace distributedKVStore { * @since 9 */ PULL_ONLY, + /** * Indicates that data is only pushed from the local end. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ PUSH_ONLY, + /** * Indicates that data is pushed from the local end, and then pulled from the remote end. * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -267,14 +274,14 @@ declare namespace distributedKVStore { * Subscription to local data changes * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 - */ + */ SUBSCRIBE_TYPE_LOCAL, /** * Subscription to remote data changes * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 - */ + */ SUBSCRIBE_TYPE_REMOTE, /** @@ -293,7 +300,7 @@ declare namespace distributedKVStore { */ enum KVStoreType { /** - * Device-collaborated database, as specified by {@code DeviceKVStore} + * Device-collaboration database, as specified by {@code DeviceKVStore} * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -364,18 +371,21 @@ declare namespace distributedKVStore { * @since 9 */ createIfMissing?: boolean; + /** * Indicates whether database files to be encrypted * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ encrypt?: boolean; + /** * Indicates whether to back up database files * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ backup?: boolean; + /** * Indicates whether database files are automatically synchronized * @permission ohos.permission.DISTRIBUTED_DATASYNC @@ -383,18 +393,21 @@ declare namespace distributedKVStore { * @since 9 */ autoSync?: boolean; + /** * Indicates the database type * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ kvStoreType?: KVStoreType; + /** * Indicates the database security level * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ securityLevel: SecurityLevel; + /** * Indicates the database schema * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore @@ -419,13 +432,15 @@ declare namespace distributedKVStore { * @since 9 */ constructor() + /** * Indicates the root json object. * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ - root: FieldNode; + root: FieldNode; + /** * Indicates the string array of json. * @@ -433,6 +448,7 @@ declare namespace distributedKVStore { * @since 9 */ indexes: Array; + /** * Indicates the mode of schema. * @@ -440,6 +456,7 @@ declare namespace distributedKVStore { * @since 9 */ mode: number; + /** * Indicates the skip size of schema. * @@ -471,6 +488,7 @@ declare namespace distributedKVStore { * @since 9 */ constructor(name: string) + /** * Adds a child node to this {@code FieldNode}. * @@ -483,27 +501,30 @@ declare namespace distributedKVStore { * @since 9 */ appendChild(child: FieldNode): boolean; + /** * Indicates the default value of field node. * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ - default: string; - /** - * Indicates the nullable of database field. - * - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 - */ - nullable: boolean; - /** - * Indicates the type of value. - * - * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 - */ - type: number; + default: string; + + /** + * Indicates the nullable of database field. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + nullable: boolean; + + /** + * Indicates the type of value. + * + * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore + * @since 9 + */ + type: number; } /** @@ -525,6 +546,7 @@ declare namespace distributedKVStore { * @since 9 */ getCount(): number; + /** * Obtains the current read position in a result set. * @@ -533,6 +555,7 @@ declare namespace distributedKVStore { * @since 9 */ getPosition(): number; + /** * Moves the read position to the first line. * @@ -543,6 +566,7 @@ declare namespace distributedKVStore { * @since 9 */ moveToFirst(): boolean; + /** * Moves the read position to the last line. * @@ -553,6 +577,7 @@ declare namespace distributedKVStore { * @since 9 */ moveToLast(): boolean; + /** * Moves the read position to the next line. * @@ -563,6 +588,7 @@ declare namespace distributedKVStore { * @since 9 */ moveToNext(): boolean; + /** * Moves the read position to the previous line. * @@ -573,12 +599,13 @@ declare namespace distributedKVStore { * @since 9 */ moveToPrevious(): boolean; + /** * Moves the read position by a relative offset to the current position. * - * @param {number} offset - Indicates the relative offset to the current position. Anegative offset indicates moving - * backwards, and a positive offset indicates moving forewards. Forexample, if the current position is entry 1 and - * thisoffset is 2, the destination position will be entry 3; ifthe current position is entry 3 and this offset is -2, + * @param {number} offset - Indicates the relative offset to the current position. A negative offset indicates moving + * backwards, and a positive offset indicates moving forwards. For example, if the current position is entry 1 and + * this offset is 2, the destination position will be entry 3; if the current position is entry 3 and this offset is -2, * the destination position will be entry 1. The valid final position after moving forwards starts with 0. If the * final position is invalid, false will be returned. * @returns Returns true if the operation succeeds; return false otherwise. @@ -587,6 +614,7 @@ declare namespace distributedKVStore { * @since 9 */ move(offset: number): boolean; + /** * Moves the read position from 0 to an absolute position. * @@ -597,6 +625,7 @@ declare namespace distributedKVStore { * @since 9 */ moveToPosition(position: number): boolean; + /** * Checks whether the read position is the first line. * @@ -605,6 +634,7 @@ declare namespace distributedKVStore { * @since 9 */ isFirst(): boolean; + /** * Checks whether the read position is the last line. * @@ -613,6 +643,7 @@ declare namespace distributedKVStore { * @since 9 */ isLast(): boolean; + /** * Checks whether the read position is before the last line. * @@ -621,6 +652,7 @@ declare namespace distributedKVStore { * @since 9 */ isBeforeFirst(): boolean; + /** * Checks whether the read position is after the last line. * @@ -629,6 +661,7 @@ declare namespace distributedKVStore { * @since 9 */ isAfterLast(): boolean; + /** * Obtains a key-value pair. * @@ -658,6 +691,7 @@ declare namespace distributedKVStore { * @since 9 */ constructor() + /** * Resets this {@code Query} object. * @@ -666,6 +700,7 @@ declare namespace distributedKVStore { * @since 9 */ reset(): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is equal to the specified long value. * @@ -677,6 +712,7 @@ declare namespace distributedKVStore { * @since 9 */ equalTo(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not equal to the specified int value. * @@ -688,6 +724,7 @@ declare namespace distributedKVStore { * @since 9 */ notEqualTo(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or equal to the * specified int value. @@ -700,6 +737,7 @@ declare namespace distributedKVStore { * @since 9 */ greaterThan(field: string, value: number | string | boolean): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is less than the specified int value. * @@ -711,6 +749,7 @@ declare namespace distributedKVStore { * @since 9 */ lessThan(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is greater than or * equal to the specified int value. @@ -723,6 +762,7 @@ declare namespace distributedKVStore { * @since 9 */ greaterThanOrEqualTo(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is less than or equal to the * specified int value. @@ -735,6 +775,7 @@ declare namespace distributedKVStore { * @since 9 */ lessThanOrEqualTo(field: string, value: number | string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is null. * @@ -745,6 +786,7 @@ declare namespace distributedKVStore { * @since 9 */ isNull(field: string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified int value list. * @@ -756,6 +798,7 @@ declare namespace distributedKVStore { * @since 9 */ inNumber(field: string, valueList: number[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is within the specified string value list. * @@ -767,6 +810,7 @@ declare namespace distributedKVStore { * @since 9 */ inString(field: string, valueList: string[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified int value list. * @@ -778,6 +822,7 @@ declare namespace distributedKVStore { * @since 9 */ notInNumber(field: string, valueList: number[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not within the specified string value list. * @@ -789,6 +834,7 @@ declare namespace distributedKVStore { * @since 9 */ notInString(field: string, valueList: string[]): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is similar to the specified string value. * @@ -800,6 +846,7 @@ declare namespace distributedKVStore { * @since 9 */ like(field: string, value: string): Query; + /** * Constructs a {@code Query} object to query entries with the specified field whose value is not similar to the specified string value. * @@ -811,6 +858,7 @@ declare namespace distributedKVStore { * @since 9 */ unlike(field: string, value: string): Query; + /** * Constructs a {@code Query} object with the and condition. * @@ -821,6 +869,7 @@ declare namespace distributedKVStore { * @since 9 */ and(): Query; + /** * Constructs a {@code Query} object with the or condition. * @@ -831,6 +880,7 @@ declare namespace distributedKVStore { * @since 9 */ or(): Query; + /** * Constructs a {@code Query} object to sort the query results in ascending order. * @@ -841,6 +891,7 @@ declare namespace distributedKVStore { * @since 9 */ orderByAsc(field: string): Query; + /** * Constructs a {@code Query} object to sort the query results in descending order. * @@ -851,6 +902,7 @@ declare namespace distributedKVStore { * @since 9 */ orderByDesc(field: string): Query; + /** * Constructs a {@code Query} object to specify the number of results and the start position. * @@ -862,6 +914,7 @@ declare namespace distributedKVStore { * @since 9 */ limit(total: number, offset: number): Query; + /** * Creates a {@code Query} condition with a specified field that is not null. * @@ -872,6 +925,7 @@ declare namespace distributedKVStore { * @since 9 */ isNotNull(field: string): Query; + /** * Creates a query condition group with a left bracket. * @@ -883,6 +937,7 @@ declare namespace distributedKVStore { * @since 9 */ beginGroup(): Query; + /** * Creates a query condition group with a right bracket. * @@ -894,6 +949,7 @@ declare namespace distributedKVStore { * @since 9 */ endGroup(): Query; + /** * Creates a query condition with a specified key prefix. * @@ -904,6 +960,7 @@ declare namespace distributedKVStore { * @since 9 */ prefixKey(prefix: string): Query; + /** * Sets a specified index that will be preferentially used for query. * @@ -914,27 +971,29 @@ declare namespace distributedKVStore { * @since 9 */ setSuggestIndex(index: string): Query; + /** * Add device ID key prefix.Used by {@code DeviceKVStore}. * * @param {string} deviceId - Specify device id to query from. - * @return Returns the {@code Query} object with device ID prefix added. + * @returns Returns the {@code Query} object with device ID prefix added. * @throws {BusinessError} 401 - if parameter check failed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - deviceId(deviceId:string):Query; + deviceId(deviceId: string): Query; + /** - * Get a String that repreaents this {@code Query}. + * Get a String that represents this {@code Query}. * *

          The String would be parsed to DB query format. * The String length should be no longer than 500kb. * - * @return String representing this {@code Query}. + * @returns String representing this {@code Query}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - getSqlLike():string; + getSqlLike(): string; } /** @@ -962,7 +1021,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of put. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -979,7 +1038,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -992,7 +1051,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of putBatch. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1005,7 +1064,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1018,7 +1077,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of putBatch. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @systemapi * @since 9 @@ -1032,7 +1091,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @systemapi * @since 9 @@ -1047,8 +1106,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of delete. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1062,8 +1120,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1076,8 +1133,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of delete. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 @@ -1091,8 +1147,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 @@ -1106,8 +1161,7 @@ declare namespace distributedKVStore { * @param {AsyncCallback} callback - the callback of deleteBatch. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1120,8 +1174,7 @@ declare namespace distributedKVStore { * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100004 - if the data not exist when delete data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1135,7 +1188,7 @@ declare namespace distributedKVStore { * @param {string} deviceId - Identifies the device whose data is to be removed and the value cannot be the current device ID. * @param {AsyncCallback} callback - the callback of removeDeviceData. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1149,7 +1202,7 @@ declare namespace distributedKVStore { * @param {string} deviceId - Identifies the device whose data is to be removed and the value cannot be the current device ID. * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1164,7 +1217,7 @@ declare namespace distributedKVStore { * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. * @throws {BusinessError} 15100004 - if the data not exist when query data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1179,7 +1232,7 @@ declare namespace distributedKVStore { * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. * @throws {BusinessError} 15100004 - if the data not exist when query data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1189,11 +1242,11 @@ declare namespace distributedKVStore { * Obtains all key-value pairs that match a specified key prefix. * * @param {string} keyPrefix - Indicates the key prefix to match. - \* @param {AsyncCallback} callback - {Entry[]}: the list of all key-value pairs + * @param {AsyncCallback} callback - {Entry[]}: the list of all key-value pairs * that match the specified key prefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1207,7 +1260,7 @@ declare namespace distributedKVStore { * specified key prefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1221,8 +1274,7 @@ declare namespace distributedKVStore { * matching the specified {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1236,8 +1288,7 @@ declare namespace distributedKVStore { * specified {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1255,7 +1306,7 @@ declare namespace distributedKVStore { * object matching the specified keyPrefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1273,7 +1324,7 @@ declare namespace distributedKVStore { * object matching the specified keyPrefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1287,7 +1338,7 @@ declare namespace distributedKVStore { * object matching the specified {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1301,7 +1352,7 @@ declare namespace distributedKVStore { * object matching the specified {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1315,7 +1366,7 @@ declare namespace distributedKVStore { * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 @@ -1330,7 +1381,7 @@ declare namespace distributedKVStore { * object matching the specified {@code dataSharePredicates.DataSharePredicates} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 @@ -1367,7 +1418,7 @@ declare namespace distributedKVStore { * specified {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1381,7 +1432,7 @@ declare namespace distributedKVStore { * {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1393,12 +1444,11 @@ declare namespace distributedKVStore { * @param {string} file - Indicates the database backup filename. * @param {AsyncCallback} callback - the callback of backup. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - backup(file:string, callback: AsyncCallback):void; + backup(file: string, callback: AsyncCallback): void; /** * Backs up a database in the specified filename. @@ -1406,12 +1456,11 @@ declare namespace distributedKVStore { * @param {string} file - Indicates the database backup filename. * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - backup(file:string): Promise; + backup(file: string): Promise; /** * Restores a database from a specified database file. @@ -1419,12 +1468,11 @@ declare namespace distributedKVStore { * @param {string} file - Indicates the database backup filename. * @param {AsyncCallback} callback - the callback of restore. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - restore(file:string, callback: AsyncCallback):void; + restore(file: string, callback: AsyncCallback): void; /** * Restores a database from a specified database file. @@ -1432,12 +1480,11 @@ declare namespace distributedKVStore { * @param {string} file - Indicates the database backup filename. * @returns {Promise} the promise returned by the function. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - restore(file:string): Promise; + restore(file: string): Promise; /** * Delete database backup files based on the specified filenames. @@ -1450,7 +1497,7 @@ declare namespace distributedKVStore { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - deleteBackup(files:Array, callback: AsyncCallback>):void; + deleteBackup(files: Array, callback: AsyncCallback>): void; /** * Delete database backup files based on the specified filenames. @@ -1462,7 +1509,7 @@ declare namespace distributedKVStore { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - deleteBackup(files:Array): Promise>; + deleteBackup(files: Array): Promise>; /** * Starts a transaction operation in the {@code SingleKVStore} database. @@ -1470,7 +1517,7 @@ declare namespace distributedKVStore { *

          After the database transaction is started, you can submit or roll back the operation. * * @param {AsyncCallback} callback - the callback of startTransaction. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1482,7 +1529,7 @@ declare namespace distributedKVStore { *

          After the database transaction is started, you can submit or roll back the operation. * * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1492,7 +1539,7 @@ declare namespace distributedKVStore { * Submits a transaction operation in the {@code SingleKVStore} database. * * @param {AsyncCallback} callback - the callback of commit. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1502,7 +1549,7 @@ declare namespace distributedKVStore { * Submits a transaction operation in the {@code SingleKVStore} database. * * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1512,7 +1559,7 @@ declare namespace distributedKVStore { * Rolls back a transaction operation in the {@code SingleKVStore} database. * * @param {AsyncCallback} callback - the callback of rollback. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1522,7 +1569,7 @@ declare namespace distributedKVStore { * Rolls back a transaction operation in the {@code SingleKVStore} database. * * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1607,7 +1654,7 @@ declare namespace distributedKVStore { setSyncParam(defaultAllowedDelayMs: number): Promise; /** - * Synchronizes the database to the specified devices with the specified delay allowed. + * Synchronize the database to the specified devices with the specified delay allowed. * * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param {string[]} deviceIds - Indicates the list of devices to which to synchronize the database. @@ -1623,7 +1670,7 @@ declare namespace distributedKVStore { sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void /** - * Synchronizes the database to the specified devices with the specified delay allowed. + * Synchronize the database to the specified devices with the specified delay allowed. * * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param {string[]} deviceIds - Indicates the list of devices to which to synchronize the database. @@ -1648,7 +1695,7 @@ declare namespace distributedKVStore { * object indicates the data change events in the distributed database. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100001 - if the database has been subscribed over the max subscription time limit. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1673,11 +1720,11 @@ declare namespace distributedKVStore { * @param {Callback} listener - {ChangeNotification}: the {@code ChangeNotification} * object indicates the data change events in the distributed database. * @throws {BusinessError} 401 - if parameter check failed. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ - off(event:'dataChange', listener?: Callback): void; + off(event: 'dataChange', listener?: Callback): void; /** * Unregister the database synchronization callback. @@ -1696,7 +1743,7 @@ declare namespace distributedKVStore { * * @param {AsyncCallback} callback - {SecurityLevel}: the {@code SecurityLevel} * object indicates the security level of the database. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1707,7 +1754,7 @@ declare namespace distributedKVStore { * * @returns {Promise} {SecurityLevel}: the {@code SecurityLevel} object indicates * the security level of the database. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @since 9 */ @@ -1727,39 +1774,97 @@ declare namespace distributedKVStore { */ interface DeviceKVStore extends SingleKVStore { /** - * Obtains the {@code String} value matching a specified device ID and key. + * Obtains the value matching the local device ID and specified key. + * + * @param {string} key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @param {AsyncCallback} callback - + * {Uint8Array|string|boolean|number}: the returned value specified by the local device ID and specified key. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100004 - if the data not exist when query data. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string, callback: AsyncCallback): void; + + /** + * Obtains the value matching the local device ID and specified key. + * + * @param {string} key - Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. + * @returns {Promise} + * {Uint8Array|string|boolean|number}: the returned value specified by the local device ID and specified key. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100004 - if the data not exist when query data. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + get(key: string): Promise; + + /** + * Obtains the value matching a specified device ID and key. * * @param {string} deviceId - Indicates the device to be queried. * @param {string} key - Indicates the key of the value to be queried. * @param {AsyncCallback} callback - * {boolean|string|number|Uint8Array}: the returned value specified by the deviceId and key. - * @return Returns the value matching the given criteria. + * @returns Returns the value matching the given criteria. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. * @throws {BusinessError} 15100004 - if the data not exist when query data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ get(deviceId: string, key: string, callback: AsyncCallback): void; /** - * Obtains the {@code String} value matching a specified device ID and key. + * Obtains the value matching a specified device ID and key. * * @param {string} deviceId - Indicates the device to be queried. * @param {string} key - Indicates the key of the value to be queried. * @returns {Promise} * {Uint8Array|string|boolean|number}: the returned value specified by the deviceId and key. - * @return Returns the value matching the given criteria. + * @returns Returns the value matching the given criteria. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. * @throws {BusinessError} 15100004 - if the data not exist when query data. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ get(deviceId: string, key: string): Promise; + /** + * Obtains all key-value pairs that match the local device ID and specified key prefix. + * + * @param {string} keyPrefix - Indicates the key prefix to match. + * @param {AsyncCallback} callback - {Entry[]}: the list of all key-value pairs + * that match the local device ID and specified key prefix. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string, callback: AsyncCallback): void; + + /** + * Obtains all key-value pairs that match the local device ID and specified key prefix. + * + * @param {string} keyPrefix - Indicates the key prefix to match. + * @returns {Promise} {Entry[]}: the list of all key-value pairs that match the + * local device ID and specified key prefix. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(keyPrefix: string): Promise; + /** * Obtains all key-value pairs matching a specified device ID and key prefix. * @@ -1770,7 +1875,7 @@ declare namespace distributedKVStore { * @returns Returns the list of all key-value pairs meeting the given criteria. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1786,12 +1891,40 @@ declare namespace distributedKVStore { * @returns Returns the list of all key-value pairs meeting the given criteria. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ getEntries(deviceId: string, keyPrefix: string): Promise; + /** + * Obtains the list of key-value pairs matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @param {AsyncCallback} callback - {Entry[]}: the list of all key-value pairs + * matching the local device ID and specified {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query, callback: AsyncCallback): void; + + /** + * Obtains the list of key-value pairs matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @returns {Promise} {Entry[]}: the list of all key-value pairs matching the local device ID and + * specified {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getEntries(query: Query): Promise; + /** * Obtains the list of key-value pairs matching a specified device ID and {@code Query} object. * @@ -1801,8 +1934,7 @@ declare namespace distributedKVStore { * matching the specified deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1817,13 +1949,48 @@ declare namespace distributedKVStore { * specified deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100005 - if not support the operation. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ getEntries(deviceId: string, query: Query): Promise; + /** + * Obtains the result set with the local device ID and specified prefix from a {@code SingleKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code SingleKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param {string} keyPrefix - Indicates the key prefix to match. + * @param {AsyncCallback} callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSet(keyPrefix: string, callback: AsyncCallback): void; + + /** + * Obtains the result set with the local device ID and specified prefix from a {@code SingleKVStore} database. + * The {@code KVStoreResultSet} object can be used to query all key-value pairs that meet the search criteria. + * Each {@code SingleKVStore} instance can have a maximum of four {@code KVStoreResultSet} objects at the same time. + * If you have created four objects, calling this method will return a failure. Therefore, you are advised to + * call the closeResultSet method to close unnecessary {@code KVStoreResultSet} objects in a timely manner. + * + * @param {string} keyPrefix - Indicates the key prefix to match. + * @returns {Promise} {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified keyPrefix. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSet(keyPrefix: string): Promise; + /** * Obtains the {@code KVStoreResultSet} object matching the specified device ID and key prefix. * @@ -1838,7 +2005,7 @@ declare namespace distributedKVStore { * object matching the specified deviceId and keyPrefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1858,12 +2025,40 @@ declare namespace distributedKVStore { * object matching the specified deviceId and keyPrefix. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ getResultSet(deviceId: string, keyPrefix: string): Promise; + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @param {AsyncCallback} callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSet(query: Query, callback: AsyncCallback): void; + + /** + * Obtains the {@code KVStoreResultSet} object matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @returns {Promise} {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSet(query: Query): Promise; + /** * Obtains the {@code KVStoreResultSet} object matching a specified device ID and {@code Query} object. * @@ -1873,7 +2068,7 @@ declare namespace distributedKVStore { * object matching the specified deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1888,12 +2083,42 @@ declare namespace distributedKVStore { * object matching the specified deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ getResultSet(deviceId: string, query: Query): Promise; + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param {dataSharePredicates.DataSharePredicates} predicates - Indicates the datasharePredicates. + * @param {AsyncCallback} callback - {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @since 9 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; + + /** + * Obtains the KVStoreResultSet object matching the local device ID and specified predicate object. + * + * @param {dataSharePredicates.DataSharePredicates} predicates - Indicates the datasharePredicates. + * @returns {Promise} {KVStoreResultSet}: the {@code KVStoreResultSet} + * object matching the local device ID and specified {@code dataSharePredicates.DataSharePredicates} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.DataShare.Provider + * @systemapi + * @since 9 + */ + getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise; + /** * Obtains the KVStoreResultSet object matching a specified Device ID and Predicate object. * @@ -1903,7 +2128,7 @@ declare namespace distributedKVStore { * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 @@ -1919,13 +2144,41 @@ declare namespace distributedKVStore { * object matching the specified deviceId and {@code dataSharePredicates.DataSharePredicates} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @since 9 */ getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise; + /** + * Obtains the number of results matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @param {AsyncCallback} callback - {number}: the number of results matching the + * local device ID and specified {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query, callback: AsyncCallback): void; + + /** + * Obtains the number of results matching the local device ID and specified {@code Query} object. + * + * @param {Query} query - Indicates the {@code Query} object. + * @returns {Promise} {number}: the number of results matching the local device ID and specified + * {@code Query} object. + * @throws {BusinessError} 401 - if parameter check failed. + * @throws {BusinessError} 15100003 - if the database is corrupted. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @since 9 + */ + getResultSize(query: Query): Promise; + /** * Obtains the number of results matching a specified device ID and {@code Query} object. * @@ -1935,7 +2188,7 @@ declare namespace distributedKVStore { * specified deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ @@ -1950,7 +2203,7 @@ declare namespace distributedKVStore { * deviceId and {@code Query} object. * @throws {BusinessError} 401 - if parameter check failed. * @throws {BusinessError} 15100003 - if the database is corrupted. - * @throws {BusinessError} 15100006 - if the database or result set has been closed. + * @throws {BusinessError} 15100005 - if the database or result set has been closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 */ -- Gitee From ce9752a6f05567dc6d67aa2d3521a8a62e4b2d68 Mon Sep 17 00:00:00 2001 From: dboy190 Date: Fri, 18 Nov 2022 17:37:42 +0800 Subject: [PATCH 6/8] fix empty lines Signed-off-by: dboy190 --- api/@ohos.data.distributedData.d.ts | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index b02fbe5d6c..0c17584892 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1289,7 +1289,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#put */ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncCallback): void; - put(key: string, value: Uint8Array | string | number | boolean): Promise; /** @@ -1306,7 +1305,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#delete */ delete(key: string, callback: AsyncCallback): void; - delete(key: string): Promise; /** @@ -1377,7 +1375,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#putBatch */ putBatch(entries: Entry[], callback: AsyncCallback): void; - putBatch(entries: Entry[]): Promise; /** @@ -1391,7 +1388,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#deleteBatch */ deleteBatch(keys: string[], callback: AsyncCallback): void; - deleteBatch(keys: string[]): Promise; /** @@ -1406,7 +1402,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#startTransaction */ startTransaction(callback: AsyncCallback): void; - startTransaction(): Promise; /** @@ -1420,7 +1415,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#commit */ commit(callback: AsyncCallback): void; - commit(): Promise; /** @@ -1433,7 +1427,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#rollback */ rollback(callback: AsyncCallback): void; - rollback(): Promise; /** @@ -1448,7 +1441,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#enableSync */ enableSync(enabled: boolean, callback: AsyncCallback): void; - enableSync(enabled: boolean): Promise; /** @@ -1465,7 +1457,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#setSyncRange */ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: AsyncCallback): void; - setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise; } @@ -1498,7 +1489,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#get */ get(key: string, callback: AsyncCallback): void; - get(key: string): Promise; /** @@ -1514,7 +1504,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#getEntries */ getEntries(keyPrefix: string, callback: AsyncCallback): void; - getEntries(keyPrefix: string): Promise; /** @@ -1530,7 +1519,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#getEntries */ getEntries(query: Query, callback: AsyncCallback): void; - getEntries(query: Query): Promise; /** @@ -1549,7 +1537,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#getResultSet */ getResultSet(keyPrefix: string, callback: AsyncCallback): void; - getResultSet(keyPrefix: string): Promise; /** @@ -1564,7 +1551,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#getResultSet */ getResultSet(query: Query, callback: AsyncCallback): void; - getResultSet(query: Query): Promise; /** @@ -1579,7 +1565,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#closeResultSet */ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback): void; - closeResultSet(resultSet: KvStoreResultSet): Promise; /** @@ -1595,7 +1580,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#getResultSize */ getResultSize(query: Query, callback: AsyncCallback): void; - getResultSize(query: Query): Promise; /** @@ -1607,7 +1591,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.SingleKVStore#removeDeviceData */ removeDeviceData(deviceId: string, callback: AsyncCallback): void; - removeDeviceData(deviceId: string): Promise; /** @@ -2012,7 +1995,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVManager#getKVStore */ getKVStore(storeId: string, options: Options): Promise; - getKVStore(storeId: string, options: Options, callback: AsyncCallback): void; /** @@ -2037,7 +2019,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVManager#closeKVStore */ closeKVStore(appId: string, storeId: string, kvStore: KVStore, callback: AsyncCallback): void; - closeKVStore(appId: string, storeId: string, kvStore: KVStore): Promise; /** @@ -2059,7 +2040,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVManager#deleteKVStore */ deleteKVStore(appId: string, storeId: string, callback: AsyncCallback): void; - deleteKVStore(appId: string, storeId: string): Promise; /** @@ -2076,7 +2056,6 @@ declare namespace distributedData { * @useinstead ohos.data.distributedKVStore.KVManager#getAllKVStoreId */ getAllKVStoreId(appId: string, callback: AsyncCallback): void; - getAllKVStoreId(appId: string): Promise; /** -- Gitee From d66157c0212f691a7ba143f669f8bda2992e12bf Mon Sep 17 00:00:00 2001 From: dboy190 Date: Fri, 18 Nov 2022 19:26:39 +0800 Subject: [PATCH 7/8] fix since history problem Signed-off-by: dboy190 --- api/@ohos.data.distributedData.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 0c17584892..e21dc7b043 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1358,7 +1358,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#off */ @@ -1619,7 +1619,7 @@ declare namespace distributedData { * @throws Throws this exception if no {@code SingleKvStore} database is available. * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#on */ @@ -1646,7 +1646,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.SingleKVStore#off */ @@ -1905,7 +1905,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.DeviceKVStore#on */ @@ -1934,7 +1934,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since 8 * @deprecated since 9 * @useinstead ohos.data.distributedKVStore.DeviceKVStore#off */ -- Gitee From f84763fcd9f05875df5db573f4b93f8bedf3d668 Mon Sep 17 00:00:00 2001 From: dboy190 Date: Fri, 18 Nov 2022 19:48:30 +0800 Subject: [PATCH 8/8] revert wrong merge Signed-off-by: dboy190 --- api/@ohos.account.appAccount.d.ts | 40 ++++++----- api/@ohos.account.distributedAccount.d.ts | 6 +- api/@ohos.account.osAccount.d.ts | 68 +++++++++---------- api/@ohos.bundle.appControl.d.ts | 12 ++-- api/@ohos.bundle.bundleManager.d.ts | 38 +++++------ api/@ohos.bundle.d.ts | 19 ++++++ api/@ohos.bundle.defaultAppManager.d.ts | 52 +++++++-------- api/@ohos.bundle.distributedBundle.d.ts | 16 ++--- api/@ohos.bundle.freeInstall.d.ts | 8 +-- api/@ohos.bundle.innerBundleManager.d.ts | 5 +- api/@ohos.bundle.installer.d.ts | 28 ++++---- api/@ohos.bundle.launcherBundleManager.d.ts | 8 +-- api/@ohos.data.preferences.d.ts | 2 +- api/@ohos.distributedBundle.d.ts | 1 + api/@ohos.resourceManager.d.ts | 74 ++++++++++----------- api/@ohos.zlib.d.ts | 10 +++ api/@system.package.d.ts | 5 +- api/bundle/PermissionDef.d.ts | 1 + api/bundle/abilityInfo.d.ts | 1 + api/bundle/applicationInfo.d.ts | 7 +- api/bundle/bundleInfo.d.ts | 3 + api/bundle/bundleInstaller.d.ts | 3 + api/bundle/customizeData.d.ts | 1 + api/bundle/elementName.d.ts | 2 + api/bundle/hapModuleInfo.d.ts | 1 + api/bundle/launcherAbilityInfo.d.ts | 14 ++++ api/bundle/moduleInfo.d.ts | 1 + api/bundle/remoteAbilityInfo.d.ts | 6 +- api/bundle/shortcutInfo.d.ts | 23 +++++-- 29 files changed, 263 insertions(+), 192 deletions(-) diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index 2d4f53cb36..7f20b3b89a 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -168,7 +168,7 @@ declare namespace appAccount { * @returns void. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid name or bundle name. + * @throws {BusinessError} 12300002 - invalid name or bundlename. * @throws {BusinessError} 12300003 - the account indicated by localId dose not exist. * @throws {BusinessError} 12400001 - the application indicated by bundlename does not exist. * @since 9 @@ -184,7 +184,7 @@ declare namespace appAccount { * @returns void. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid name or bundle name. + * @throws {BusinessError} 12300002 - invalid name or bundlename. * @throws {BusinessError} 12300003 - the account indicated by localId dose not exist. * @since 9 */ @@ -198,7 +198,7 @@ declare namespace appAccount { * through the distributed networking. On the connected devices, you can call this method to check * whether application data can be synchronized. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @permission ohos.permission.DISTRIBUTED_DATASYNC. * @param name Indicates the name of the application account. * @returns Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise. * @since 7 @@ -215,7 +215,7 @@ declare namespace appAccount { * through the distributed networking. On the connected devices, you can call this method to check * whether application data can be synchronized. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @permission ohos.permission.DISTRIBUTED_DATASYNC. * @param name Indicates the name of the application account. * @returns Returns {@code true} if application data synchronization is allowed; returns {@code false} otherwise. * @throws {BusinessError} 201 - permission denied. @@ -268,7 +268,6 @@ declare namespace appAccount { * @returns void. * @since 7 * @deprecated since 9 - * @useinstead appAccount.AppAccountManager#setCustomData */ setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback): void; setAccountExtraInfo(name: string, extraInfo: string): Promise; @@ -277,7 +276,7 @@ declare namespace appAccount { * Sets whether a specified application account allows application data synchronization. *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the connected devices, you can call this method to set whether to + * through the distributed networking. On the networked devices, you can call this method to set whether to * allow cross-device data synchronization. If synchronization is allowed, application data can be synchronized * among these devices in the event of any changes related to the application account. * If synchronization is not allowed, the application data is stored only on the local device. @@ -288,7 +287,7 @@ declare namespace appAccount { * Application data that can be synchronized: application account name, token, * and data associated with this application account *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @permission ohos.permission.DISTRIBUTED_DATASYNC. * @param name Indicates the name of the application account. * @param isEnable Specifies whether to allow application data synchronization. * @returns void. @@ -303,7 +302,7 @@ declare namespace appAccount { * Sets whether a specified application account enables application data synchronization. *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the connected devices, you can call this method to set whether to + * through the distributed networking. On the networked devices, you can call this method to set whether to * enable cross-device data synchronization. If synchronization is enabled, application data can be synchronized * among these devices in the event of any changes related to the application account. * If synchronization is not enabled, the application data is stored only on the local device. @@ -314,7 +313,7 @@ declare namespace appAccount { * Application data that can be synchronized: application account name, token, * and data associated with this application account *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @permission ohos.permission.DISTRIBUTED_DATASYNC. * @param name Indicates the name of the application account. * @param isEnabled Specifies whether to enable application data synchronization. * @returns void. @@ -366,7 +365,7 @@ declare namespace appAccount { *

        • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
        • *
        - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. * @returns Returns a list of application accounts. * @since 7 * @deprecated since 9 @@ -384,7 +383,7 @@ declare namespace appAccount { *
      • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
      • *
      - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. * @returns Returns a list of application accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -403,7 +402,7 @@ declare namespace appAccount { *
    • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
    • *
    - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. * @param owner Indicates the account owner of your application or third-party applications. * @returns Returns a list of application accounts. * @since 7 @@ -422,14 +421,14 @@ declare namespace appAccount { *
  • Accounts of third-party applications. To obtain such information, * your application must have gained authorization from the third-party applications.
  • * - * @permission ohos.permission.GET_ALL_APP_ACCOUNTS + * @permission ohos.permission.GET_ALL_APP_ACCOUNTS. * @param owner Indicates the account owner of your application or third-party applications. * @returns Returns a list of application accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. * @throws {BusinessError} 12300002 - invalid owner. - * @throws {BusinessError} 12400001 - the application indicated by bundle name does not exist. + * @throws {BusinessError} 12400001 - the application indicated by bundlename does not exist. * @since 9 */ getAccountsByOwner(owner: string, callback: AsyncCallback>): void; @@ -469,7 +468,6 @@ declare namespace appAccount { * for example, if the account does not exist. * @since 7 * @deprecated since 9 - * @useinstead appAccount.AppAccountManager#getCustomData */ getAccountExtraInfo(name: string, callback: AsyncCallback): void; getAccountExtraInfo(name: string): Promise; @@ -794,7 +792,7 @@ declare namespace appAccount { getAllAuthTokens(name: string, owner: string): Promise>; /** - * Gets the open authorization list with a specified authentication type for a particular application account. + * Gets the open authorization list with a specified authentication type for a paticular application account. *

    * Only the owner of the application account has the permission to call this method. * @param name Indicates the account name of your application. @@ -808,7 +806,7 @@ declare namespace appAccount { getOAuthList(name: string, authType: string): Promise>; /** - * Gets the open authorization list with a specified authentication type for a particular application account. + * Gets the open authorization list with a specified authentication type for a paticular application account. *

    * Only the owner of the application account has the permission to call this method. * @param name Indicates the account name of your application. @@ -877,7 +875,7 @@ declare namespace appAccount { queryAuthenticatorInfo(owner: string): Promise; /** - * Checks whether a particular account has all specified labels. + * Checks whether a paticular account has all specified labels. * @param name Indicates the account name. * @param owner Indicates the account owner. * @param labels Indicates an array of labels to check. @@ -1068,7 +1066,7 @@ declare namespace appAccount { */ interface AuthResult { /** - * The account information. + * The account infomation. * @since 9 */ account?: AppAccountInfo; @@ -1159,7 +1157,7 @@ declare namespace appAccount { */ interface VerifyCredentialOptions { /** - * The credential type to be verified. + * The credentail type to be verified. * @since 9 */ credentialType?: string; @@ -1286,7 +1284,7 @@ declare namespace appAccount { KEY_ACTION = "action", /** - * Indicates the key of authentication type. + * Indicates the key of authentiaction type. * * @since 8 */ diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index c5deff6f2b..6d92f11f88 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -51,7 +51,7 @@ declare namespace distributedAccount { /** * Gets the distributed information of the current OS account. - * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC. * @returns The distributed information of the current OS account. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -63,7 +63,7 @@ declare namespace distributedAccount { /** * Updates the distributed information of the OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param accountInfo Indicates the information of the OS account used for a distributed system. * @returns void * @since 7 @@ -75,7 +75,7 @@ declare namespace distributedAccount { /** * Sets the distributed information of the OS account. - * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS. * @param accountInfo Indicates the information of the OS account used for a distributed system. * @returns void * @throws {BusinessError} 201 - permission denied. diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index c9ab2e1901..093b0dbfbb 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -44,7 +44,7 @@ declare namespace osAccount { * to run in the foreground. Then, the OS account originally running in the foreground will be * switched to the background. *

    - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION. * @param localId Indicates the local ID of the OS account. * @returns void. * @throws {BusinessError} 201 - permission denied. @@ -94,7 +94,7 @@ declare namespace osAccount { /** * Checks whether an OS account is activated based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns void * @throws {BusinessError} 201 - permission denied. @@ -109,7 +109,7 @@ declare namespace osAccount { /** * Checks whether a constraint has been enabled for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @param constraint Indicates the constraint to check. The value can be: *
      @@ -132,7 +132,7 @@ declare namespace osAccount { /** * Checks whether a constraint has been enabled for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @param constraint Indicates the constraint to check. The value can be: *
        @@ -178,7 +178,7 @@ declare namespace osAccount { /** * Checks whether an OS account has been verified based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns Returns {@code true} if the OS account has been verified successfully; * returns {@code false} otherwise. @@ -193,7 +193,7 @@ declare namespace osAccount { /** * Checks whether an OS account has been verified based on its ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns Returns {@code true} if the OS account has been verified successfully; * returns {@code false} otherwise. @@ -210,7 +210,7 @@ declare namespace osAccount { /** * Removes an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns void. * @throws {BusinessError} 201 - permission denied. @@ -227,7 +227,7 @@ declare namespace osAccount { /** * Sets constraints for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @param constraints Indicates the constraints to set for the OS account. The value can be: *
          @@ -256,7 +256,7 @@ declare namespace osAccount { /** * Sets the local name for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @param localName Indicates the local name to set for the OS account. * @returns void. @@ -274,7 +274,7 @@ declare namespace osAccount { /** * Obtains the number of all OS accounts created on a device. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns the number of created OS accounts. * @since 7 * @deprecated since 9 @@ -285,7 +285,7 @@ declare namespace osAccount { /** * Obtains the number of all OS accounts created on a device. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns the number of created OS accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -340,7 +340,7 @@ declare namespace osAccount { /** * Queries the local ID of an OS account which is bound to the specified domain account - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param domainInfo Indicates the domain account info. * @returns Returns the local ID of the OS account. * @since 8 @@ -353,7 +353,7 @@ declare namespace osAccount { /** * Queries the ID of an account which is bound to the specified domain account * - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param domainInfo Indicates the domain account info. * @returns Returns the local ID of the OS account. * @throws {BusinessError} 201 - permission denied. @@ -378,7 +378,7 @@ declare namespace osAccount { /** * Obtains all constraints of an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns Returns a list of constraints. * @since 7 @@ -390,7 +390,7 @@ declare namespace osAccount { /** * Obtains all constraints of an account based on its ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns Returns a list of constraints. * @throws {BusinessError} 201 - permission denied. @@ -405,7 +405,7 @@ declare namespace osAccount { /** * Queries the list of all the OS accounts that have been created in the system. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns a list of OS accounts. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -438,7 +438,7 @@ declare namespace osAccount { /** * Creates an OS account using the local name and account type. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localName Indicates the local name of the OS account to create. * @param type Indicates the type of the OS account to create. * {@link OsAccountType} specifies the account types available in the system. @@ -458,7 +458,7 @@ declare namespace osAccount { /** * Creates an OS account using the account type and domain account info. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param type Indicates the type of the OS account to create. * {@link OsAccountType} specifies the account types available in the system. * @param domainInfo Indicates the domain account info. @@ -478,7 +478,7 @@ declare namespace osAccount { /** * Queries information about the current OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns information about the current OS account; returns {@code null} if the query fails. * @since 7 * @deprecated since 9 @@ -489,7 +489,7 @@ declare namespace osAccount { /** * Gets information about the current OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns information about the current OS account; returns {@code null} if the query fails. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -502,7 +502,7 @@ declare namespace osAccount { /** * Queries OS account information based on the local ID. * - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION. * @param localId Indicates the local ID of the OS account. * @returns Returns the OS account information; returns {@code null} if the query fails. * @throws {BusinessError} 201 - permission denied. @@ -542,11 +542,11 @@ declare namespace osAccount { * Obtains the distributed virtual device ID (DVID). *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs. + * through the distributed networking. On the networked devices, you can call this method to obtain the DVIDs. * The same application running on different devices obtains the same DVID, whereas different applications * obtain different DVIDs. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns the DVID if obtained; returns an empty string if no OHOS account has logged in. * @since 7 * @deprecated since 9 @@ -559,11 +559,11 @@ declare namespace osAccount { * Queries the distributed virtual device ID (DVID). *

          * If the same OHOS account has logged in to multiple devices, these devices constitute a super device - * through the distributed networking. On the connected devices, you can call this method to obtain the DVIDs. + * through the distributed networking. On the networked devices, you can call this method to obtain the DVIDs. * The same application running on different devices obtains the same DVID, whereas different applications * obtain different DVIDs. *

          - * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns the DVID if obtained; returns an empty string if no OHOS account has logged in. * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -575,7 +575,7 @@ declare namespace osAccount { /** * Obtains the profile photo of an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @returns Returns the profile photo if obtained; * returns {@code null} if the profile photo fails to be obtained. @@ -592,7 +592,7 @@ declare namespace osAccount { /** * Sets the profile photo for an OS account based on its local ID. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @param localId Indicates the local ID of the OS account. * @param photo Indicates the profile photo to set for the OS account. * @returns void. @@ -706,7 +706,7 @@ declare namespace osAccount { /** * Check whether current process belongs to the main account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns {@code true} if current process belongs to the main os account; * returns {@code false} otherwise. * @throws {BusinessError} 201 - permission denied. @@ -720,7 +720,7 @@ declare namespace osAccount { /** * Query the constraint source type list of the OS account. - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS. * @returns Returns the constraint source type infos of the os account; * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. @@ -979,7 +979,7 @@ declare namespace osAccount { * @throws {BusinessError} 201 - permission denied. * @throws {BusinessError} 401 - the parameter check failed. * @throws {BusinessError} 12300001 - system service exception. - * @throws {BusinessError} 12300002 - invalid contextId. + * @throws {BusinessError} 12300002 - invalid contexId. * @systemapi Hide this for inner system use. * @since 8 */ @@ -1059,7 +1059,7 @@ declare namespace osAccount { *

          * Add user credential information, pass in credential addition method and credential information * (credential type, subclass, if adding user's non password credentials, pass in password authentication token), - * and get the result / acquireInfo callback. + * and get the result / acquireinfo callback. * @permission ohos.permission.MANAGE_USER_IDM * @param credentialInfo Indicates the credential information. * @param callback Indicates the callback to get results and acquireInfo. @@ -1214,9 +1214,9 @@ declare namespace osAccount { * The authentication result code is returned through the callback. * @param result Indicates the authentication result code. * @param extraInfo Indicates the specific information for different situation. - * If the authentication is passed, the authentication token is returned in extraInfo, - * If the authentication fails, the remaining authentication times are returned in extraInfo, - * If the authentication executor is locked, the freezing time is returned in extraInfo. + * If the authentication is passed, the authentication token is returned in extrainfo, + * If the authentication fails, the remaining authentication times are returned in extrainfo, + * If the authentication executor is locked, the freezing time is returned in extrainfo. * @systemapi Hide this for inner system use. * @since 8 */ diff --git a/api/@ohos.bundle.appControl.d.ts b/api/@ohos.bundle.appControl.d.ts index d780a5e477..519affca68 100644 --- a/api/@ohos.bundle.appControl.d.ts +++ b/api/@ohos.bundle.appControl.d.ts @@ -33,7 +33,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -49,7 +49,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -64,7 +64,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -79,7 +79,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -94,7 +94,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 @@ -109,7 +109,7 @@ declare namespace appControl { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700005 - The specified app ID is not found. + * @throws { BusinessError } 17700005 - The specified appId was not found. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 9 diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 4899df4c73..49c47e6b98 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -575,7 +575,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -594,7 +594,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -612,7 +612,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -631,7 +631,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -647,7 +647,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @param { AsyncCallback } callback - The callback of getting a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -663,7 +663,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @returns { Promise> } Returns a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -678,7 +678,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @param { AsyncCallback } callback - The callback of getting a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -694,7 +694,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @returns { Promise> } Returns a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -849,7 +849,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. + * @throws { BusinessError } 17700030 - The specified bundleName does not support cleaning cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -864,7 +864,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. + * @throws { BusinessError } 17700030 - The specified bundleName does not support cleaning cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -994,7 +994,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1012,7 +1012,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1031,7 +1031,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1048,7 +1048,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified abilityName is not existed. - * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. + * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -1065,7 +1065,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified abilityName is not existed. - * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. + * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -1082,7 +1082,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. - * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. + * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -1098,7 +1098,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 401 - Input parameters check failed. * @throws { BusinessError } 17700002 - The specified moduleName is not existed. * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. - * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. + * @throws { BusinessError } 17700024 - The specified metadataName is not existed or the profile is not json-format. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -1227,7 +1227,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi @@ -1246,7 +1246,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 17700001 - The specified bundleName is not found. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not found. * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 7f0fba3c7d..7279d03950 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -27,6 +27,7 @@ import { BundleInstaller } from './bundle/bundleInstaller'; * @name bundle * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager */ @@ -36,6 +37,8 @@ declare namespace bundle { * @name BundleFlag * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.BundleFlag, ohos.bundle.bundleManager.ApplicationFlag or * ohos.bundle.bundleManager.AbilityFlag @@ -74,6 +77,8 @@ declare namespace bundle { * @name ColorMode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 */ export enum ColorMode { @@ -86,6 +91,8 @@ declare namespace bundle { * @name GrantStatus * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.PermissionGrantState */ @@ -98,6 +105,8 @@ declare namespace bundle { * @name AbilityType * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.AbilityType */ @@ -135,6 +144,8 @@ declare namespace bundle { * @name AbilitySubType * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 */ export enum AbilitySubType { @@ -146,6 +157,8 @@ declare namespace bundle { * @name DisplayOrientation * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.DisplayOrientation */ @@ -183,6 +196,8 @@ declare namespace bundle { * @name LaunchMode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.LaunchType */ @@ -206,6 +221,8 @@ declare namespace bundle { * @name BundleOptions * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 */ export interface BundleOptions { @@ -221,6 +238,8 @@ declare namespace bundle { * @name InstallErrorCode * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @import NA + * @permission NA * @deprecated since 9 */ export enum InstallErrorCode{ diff --git a/api/@ohos.bundle.defaultAppManager.d.ts b/api/@ohos.bundle.defaultAppManager.d.ts index 28b075eab9..65a065a00c 100644 --- a/api/@ohos.bundle.defaultAppManager.d.ts +++ b/api/@ohos.bundle.defaultAppManager.d.ts @@ -20,62 +20,62 @@ import { ElementName } from './bundleManager/elementName'; /** * Default application manager. * @namespace defaultAppManager - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ declare namespace defaultAppManager { /** * The constant for application type. * @enum {number} - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ export enum ApplicationType { /** * Default browser identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ BROWSER = "Web Browser", /** * Default image identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ IMAGE = "Image Gallery", /** * Default audio identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ AUDIO = "Audio Player", /** * Default video identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ VIDEO = "Video Player", /** * Default PDF identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ PDF = "PDF Viewer", /** * Default word identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ WORD = "Word Viewer", /** * Default excel identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ EXCEL = "Excel Viewer", /** * Default PPT identifier. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ PPT = "PPT Viewer", @@ -87,7 +87,7 @@ declare namespace defaultAppManager { * @param { AsyncCallback } callback - The callback of querying default application result. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ function isDefaultApplication(type: string, callback: AsyncCallback) : void; @@ -98,7 +98,7 @@ declare namespace defaultAppManager { * @returns { Promise } Return true if caller is default application; return false otherwise. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @since 9 */ function isDefaultApplication(type: string) : Promise; @@ -112,10 +112,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700023 - The specified default app does not exist. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ @@ -131,10 +131,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700023 - The specified default app does not exist. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ @@ -150,10 +150,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @throws { BusinessError } 17700028 - The ability does not match the type. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @throws { BusinessError } 17700028 - The specified ability and type does not match. + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ @@ -170,10 +170,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @throws { BusinessError } 17700028 - The ability does not match the type. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @throws { BusinessError } 17700028 - The specified ability and type does not match. + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ @@ -188,9 +188,9 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ @@ -206,9 +206,9 @@ declare namespace defaultAppManager { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified user id is not found. * @throws { BusinessError } 17700025 - The specified type is invalid. - * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp + * @syscap SystemCapability.BundleManager.BundleFramework.DefaultAppManager * @systemapi * @since 9 */ diff --git a/api/@ohos.bundle.distributedBundle.d.ts b/api/@ohos.bundle.distributedBundle.d.ts index a5b16cec77..76c67d47bd 100644 --- a/api/@ohos.bundle.distributedBundle.d.ts +++ b/api/@ohos.bundle.distributedBundle.d.ts @@ -35,7 +35,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -53,7 +53,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -71,7 +71,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -89,7 +89,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -108,7 +108,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -127,7 +127,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -146,7 +146,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi @@ -165,7 +165,7 @@ declare namespace distributedBundle { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700003 - The specified ability name is not found. - * @throws { BusinessError } 17700007 - The specified device ID is not found. + * @throws { BusinessError } 17700007 - The specified device id is not found. * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi diff --git a/api/@ohos.bundle.freeInstall.d.ts b/api/@ohos.bundle.freeInstall.d.ts index 331dbced29..1d42117b9b 100644 --- a/api/@ohos.bundle.freeInstall.d.ts +++ b/api/@ohos.bundle.freeInstall.d.ts @@ -88,7 +88,7 @@ declare namespace freeInstall { } /** - * Sets whether to upgrade the module. + * Sets wether to upgrade the module. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application. * @param { string } moduleName - Indicates the module name of the application. @@ -106,7 +106,7 @@ declare namespace freeInstall { function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback) : void; /** - * Sets whether to upgrade the module. + * Sets wether to upgrade the module. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application. * @param { string } moduleName - Indicates the module name of the application. @@ -158,7 +158,7 @@ declare namespace freeInstall { function isHapModuleRemovable(bundleName: string, moduleName: string): Promise; /** - * Obtains bundlePackInfo based on bundleName and bundlePackFlags. + * Obtains bundlePackInfo based on bundleName and bundleFlags. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { BundlePackFlag } bundlePackFlag - Indicates the application bundle pack flag to be queried. @@ -174,7 +174,7 @@ declare namespace freeInstall { function getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback: AsyncCallback): void; /** - * Obtains bundlePackInfo based on bundleName and bundlePackFlags. + * Obtains bundlePackInfo based on bundleName and bundleFlags. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { BundlePackFlag } bundlePackFlag - Indicates the application bundle pack flag to be queried. diff --git a/api/@ohos.bundle.innerBundleManager.d.ts b/api/@ohos.bundle.innerBundleManager.d.ts index 526e4bee19..f9d0bb358e 100644 --- a/api/@ohos.bundle.innerBundleManager.d.ts +++ b/api/@ohos.bundle.innerBundleManager.d.ts @@ -23,6 +23,7 @@ import { ShortcutInfo } from './bundle/shortcutInfo'; * @name innerBundleManager * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager @@ -52,7 +53,7 @@ declare namespace innerBundleManager { * @syscap SystemCapability.BundleManager.BundleFramework * @param type Indicates the command should be implement. * @param LauncherStatusCallback Indicates the callback to be register. - * @return { string | Promise } Returns the result of register. + * @return Returns the result or error maeeage. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use * @deprecated since 9 @@ -67,7 +68,7 @@ declare namespace innerBundleManager { * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework * @param type Indicates the command should be implement. - * @return { string | Promise } Returns the result of unregister. + * @return Returns the result or error maeeage. * @permission ohos.permission.LISTEN_BUNDLE_CHANGE * @systemapi Hide this for inner system use * @deprecated since 9 diff --git a/api/@ohos.bundle.installer.d.ts b/api/@ohos.bundle.installer.d.ts index 40ffa7185a..854e0b7d31 100644 --- a/api/@ohos.bundle.installer.d.ts +++ b/api/@ohos.bundle.installer.d.ts @@ -60,13 +60,13 @@ declare namespace installer { * @param { AsyncCallback } callback - The callback of installing haps result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. - * @throws { BusinessError } 17700010 - Failed to install the HAP because the HAP fails to be parsed. - * @throws { BusinessError } 17700011 - Failed to install the HAP because the HAP signature fails to be verified. - * @throws { BusinessError } 17700012 - Failed to install the HAP because the HAP path is invalid or the HAP is too large. - * @throws { BusinessError } 17700015 - Failed to install the HAPs because they have different configuration information. - * @throws { BusinessError } 17700016 - Failed to install the HAP because of insufficient system disk space. - * @throws { BusinessError } 17700017 - Failed to install the HAP since the version of the HAP to install is too early. + * @throws { BusinessError } 17700004 - The specified userId is not existed. + * @throws { BusinessError } 17700010 - To parse file of config.json or module.json failed. + * @throws { BusinessError } 17700011 - To verify signature failed. + * @throws { BusinessError } 17700012 - Invalid hap file path or too large file size. + * @throws { BusinessError } 17700015 - Multiple haps have inconsistent configured information. + * @throws { BusinessError } 17700016 - No disk space left for installation. + * @throws { BusinessError } 17700017 - Downgrade installation is prohibited. * @throws { BusinessError } 17700101 - The system service is excepted. * @throws { BusinessError } 17700103 - I/O operation is failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -79,11 +79,11 @@ declare namespace installer { * Uninstall an application. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. - * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. + * @param { InstallParam } installParam - Indicates other parameters required for the uninstallation. * @param { AsyncCallback } callback - The callback of uninstalling application result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not existed. * @throws { BusinessError } 17700020 - The specified bundle is pre-installed bundle which cannot be uninstalled. * @throws { BusinessError } 17700101 - The system service is excepted. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -91,16 +91,16 @@ declare namespace installer { * @since 9 */ uninstall(bundleName: string, installParam: InstallParam, callback : AsyncCallback) : void; - + /** * recover an application. * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of the application to be uninstalled. - * @param { InstallParam } installParam - Indicates other parameters required for the uninstall. - * @param { AsyncCallback } callback - The callback of recovering application result. + * @param { InstallParam } installParam - Indicates other parameters required for the uninstallation. + * @param { AsyncCallback } callback - The callback of recoverring application result. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @throws { BusinessError } 401 - Input parameters check failed. - * @throws { BusinessError } 17700004 - The specified user ID is not found. + * @throws { BusinessError } 17700004 - The specified userId is not existed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 9 @@ -122,7 +122,7 @@ declare namespace installer { * @since 9 */ moduleName: string; - + /** * Indicates the hash value * @syscap SystemCapability.BundleManager.BundleFramework.Core diff --git a/api/@ohos.bundle.launcherBundleManager.d.ts b/api/@ohos.bundle.launcherBundleManager.d.ts index 1553297a6e..11759af3a6 100644 --- a/api/@ohos.bundle.launcherBundleManager.d.ts +++ b/api/@ohos.bundle.launcherBundleManager.d.ts @@ -36,7 +36,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. * @throws {BusinessError} 17700001 - The specified bundle name is not found. - * @throws {BusinessError} 17700004 - The specified user ID is not found. + * @throws {BusinessError} 17700004 - The specified user id is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -53,7 +53,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. * @throws {BusinessError} 17700001 - The specified bundle name is not found. - * @throws {BusinessError} 17700004 - The specified user ID is not found. + * @throws {BusinessError} 17700004 - The specified user id is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -68,7 +68,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 201 - Verify permission denied. * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. - * @throws {BusinessError} 17700004 - The specified user ID is not found. + * @throws {BusinessError} 17700004 - The specified user id is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 @@ -83,7 +83,7 @@ declare namespace launcherBundleManager { * @throws {BusinessError} 201 - Verify permission denied. * @throws {BusinessError} 401 - The parameter check failed. * @throws {BusinessError} 801 - Capability not support. - * @throws {BusinessError} 17700004 - The specified user ID is not found. + * @throws {BusinessError} 17700004 - The specified user id is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 9 diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index dabe5d7527..3129833c98 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ import {AsyncCallback, Callback} from './basic'; -import Context from "./application/BaseContext"; +import Context from "./application/Context"; /** * Provides interfaces to obtain and modify preferences data. diff --git a/api/@ohos.distributedBundle.d.ts b/api/@ohos.distributedBundle.d.ts index 0edb99e97f..a00959bcb3 100644 --- a/api/@ohos.distributedBundle.d.ts +++ b/api/@ohos.distributedBundle.d.ts @@ -22,6 +22,7 @@ import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; * @name distributedBundle * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.distributeBundle diff --git a/api/@ohos.resourceManager.d.ts b/api/@ohos.resourceManager.d.ts index a450af8ff3..b4f2afb22a 100644 --- a/api/@ohos.resourceManager.d.ts +++ b/api/@ohos.resourceManager.d.ts @@ -207,7 +207,7 @@ export function getResourceManager(bundleName: string, callback: AsyncCallback; * Obtains the ResourceManager object of the specified application. * * @param bundleName Indicates the bundle name of the specified application. - * @returns Returns that the ResourceManager object is returned in Promise mode. + * @return Returns that the ResourceManager object is returned in Promise mode. * @since 6 * @FAModelOnly */ @@ -244,7 +244,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the character string corresponding to the resource ID. + * @return Returns the character string corresponding to the resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getStringValue @@ -268,7 +268,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @returns Returns the character string corresponding to the resource object. + * @return Returns the character string corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -292,7 +292,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the array of character strings corresponding to the specified resource ID. + * @return Returns the array of character strings corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getStringArrayValue @@ -316,7 +316,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @returns Returns the array of character strings corresponding to the specified resource object. + * @return Returns the array of character strings corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -340,7 +340,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the content of the media file corresponding to the specified resource ID. + * @return Returns the content of the media file corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getMediaContent @@ -363,7 +363,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @returns Returns the content of the media file corresponding to the specified resource object. + * @return Returns the content of the media file corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -387,7 +387,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the Base64 code of the image resource corresponding to the specified resource ID. + * @return Returns the Base64 code of the image resource corresponding to the specified resource ID. * @since 6 * @deprecated since 9 * @useinstead ohos.resourceManager.getMediaContentBase64 @@ -411,7 +411,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource object in Promise mode. * * @param resource Indicates the resource object. - * @returns Returns the Base64 code of the image resource corresponding to the specified resource object. + * @return Returns the Base64 code of the image resource corresponding to the specified resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -430,7 +430,7 @@ export interface ResourceManager { /** * Obtains the device capability in Promise mode. * - * @returns Returns the device capability. + * @return Returns the device capability. * @since 6 */ getDeviceCapability(): Promise; @@ -472,7 +472,7 @@ export interface ResourceManager { * * @param resId Indicates the resource ID. * @param num Indicates the number. - * @returns Returns the singular-plural character string represented by the ID string + * @return Returns the singular-plural character string represented by the ID string * corresponding to the specified number. * @since 6 * @deprecated since 9 @@ -502,7 +502,7 @@ export interface ResourceManager { * * @param resource Indicates the resource object. * @param num Indicates the number. - * @returns Returns the singular-plural character string represented by the resource object string + * @return Returns the singular-plural character string represented by the resource object string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. @@ -527,7 +527,7 @@ export interface ResourceManager { * Obtains the raw file resource corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @returns Returns the raw file resource corresponding to the specified resource path. + * @return Returns the raw file resource corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.getRawFileContent @@ -549,7 +549,7 @@ export interface ResourceManager { * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @returns Returns the raw file resource descriptor corresponding to the specified resource path. + * @return Returns the raw file resource descriptor corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.getRawFd @@ -571,7 +571,7 @@ export interface ResourceManager { * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @returns Returns result close raw file resource descriptor corresponding to the specified resource path. + * @return Returns result close raw file resource descriptor corresponding to the specified resource path. * @since 8 * @deprecated since 9 * @useinstead ohos.resourceManager.closeRawFd @@ -595,7 +595,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @returns Returns the character string corresponding to the resource name. + * @return Returns the character string corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -621,7 +621,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @returns Returns the array of character strings corresponding to the specified resource name. + * @return Returns the array of character strings corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -646,7 +646,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @returns Returns the content of the media file corresponding to the specified resource name. + * @return Returns the content of the media file corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -671,7 +671,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource name in Promise mode. * * @param resName Indicates the resource name. - * @returns Returns the Base64 code of the image resource corresponding to the specified resource name. + * @return Returns the Base64 code of the image resource corresponding to the specified resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -701,7 +701,7 @@ export interface ResourceManager { * * @param resName Indicates the resource name. * @param num Indicates the number. - * @returns Returns the singular-plural character string represented by the name string + * @return Returns the singular-plural character string represented by the name string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. @@ -715,7 +715,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID. * * @param resId Indicates the resource ID. - * @returns Returns the character string corresponding to the resource ID. + * @return Returns the character string corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -728,7 +728,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource object. * * @param resource Indicates the resource object. - * @returns Returns the character string corresponding to the resource object. + * @return Returns the character string corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -741,7 +741,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource name. * * @param resName Indicates the resource name. - * @returns Returns the character string corresponding to the resource name. + * @return Returns the character string corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -754,7 +754,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource ID. * * @param resId Indicates the resource ID. - * @returns Returns the boolean resource corresponding to the resource ID. + * @return Returns the boolean resource corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -767,7 +767,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource object. * * @param resource Indicates the resource object. - * @returns Returns the boolean resource corresponding to the resource object. + * @return Returns the boolean resource corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -780,7 +780,7 @@ export interface ResourceManager { * Obtains the boolean result with a specified resource name. * * @param resName Indicates the resource name. - * @returns Returns the boolean resource corresponding to the resource name. + * @return Returns the boolean resource corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -793,7 +793,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource ID. * * @param resId Indicates the resource ID. - * @returns Returns the number resource corresponding to the resource ID. + * @return Returns the number resource corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -806,7 +806,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource object. * * @param resource Indicates the resource object. - * @returns Returns the number resource corresponding to the resource object. + * @return Returns the number resource corresponding to the resource object. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the module resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by module resId. @@ -819,7 +819,7 @@ export interface ResourceManager { * Obtains the number result with a specified resource name. * * @param resName Indicates the resource name. - * @returns Returns the number resource corresponding to the resource name. + * @return Returns the number resource corresponding to the resource name. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001003 - If the resName invalid. * @throws { BusinessError } 9001004 - If the resource not found by resName. @@ -852,7 +852,7 @@ export interface ResourceManager { * Obtains string resources associated with a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the character string corresponding to the resource ID. + * @return Returns the character string corresponding to the resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -878,7 +878,7 @@ export interface ResourceManager { * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the array of character strings corresponding to the specified resource ID. + * @return Returns the array of character strings corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -909,7 +909,7 @@ export interface ResourceManager { * * @param resId Indicates the resource ID. * @param num Indicates the number. - * @returns Returns the singular-plural character string represented by the ID string + * @return Returns the singular-plural character string represented by the ID string * corresponding to the specified number. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. @@ -935,7 +935,7 @@ export interface ResourceManager { * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the content of the media file corresponding to the specified resource ID. + * @return Returns the content of the media file corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -960,7 +960,7 @@ export interface ResourceManager { * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. * * @param resId Indicates the resource ID. - * @returns Returns the Base64 code of the image resource corresponding to the specified resource ID. + * @return Returns the Base64 code of the image resource corresponding to the specified resource ID. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001001 - If the resId invalid. * @throws { BusinessError } 9001002 - If the resource not found by resId. @@ -983,7 +983,7 @@ export interface ResourceManager { * Obtains the raw file resource corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @returns Returns the raw file resource corresponding to the specified resource path. + * @return Returns the raw file resource corresponding to the specified resource path. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001005 - If the resource not found by path. * @since 9 @@ -1005,7 +1005,7 @@ export interface ResourceManager { * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. * * @param path Indicates the resource relative path. - * @returns Returns the raw file resource descriptor corresponding to the specified resource path. + * @return Returns the raw file resource descriptor corresponding to the specified resource path. * @throws { BusinessError } 401 - If the input parameter invalid. * @throws { BusinessError } 9001005 - If the resource not found by path. * @since 9 diff --git a/api/@ohos.zlib.d.ts b/api/@ohos.zlib.d.ts index 9230b0f9c4..6aca560c79 100644 --- a/api/@ohos.zlib.d.ts +++ b/api/@ohos.zlib.d.ts @@ -20,6 +20,8 @@ declare namespace zlib { * @name ErrorCode * @since 7 * @syscap SystemCapability.BundleManager.Zlib + * @import NA + * @permission NA * @deprecated since 9 */ export enum ErrorCode { @@ -31,6 +33,8 @@ declare namespace zlib { * @name CompressLevel * @since 7 * @syscap SystemCapability.BundleManager.Zlib + * @import NA + * @permission NA */ export enum CompressLevel { COMPRESS_LEVEL_NO_COMPRESSION = 0, @@ -43,6 +47,8 @@ declare namespace zlib { * @name CompressStrategy * @since 7 * @syscap SystemCapability.BundleManager.Zlib + * @import NA + * @permission NA */ export enum CompressStrategy { COMPRESS_STRATEGY_DEFAULT_STRATEGY = 0, @@ -56,6 +62,8 @@ declare namespace zlib { * @name MemLevel * @since 7 * @syscap SystemCapability.BundleManager.Zlib + * @import NA + * @permission NA */ export enum MemLevel { MEM_LEVEL_MIN = 1, @@ -67,6 +75,8 @@ declare namespace zlib { * @name Options * @since 7 * @syscap SystemCapability.BundleManager.Zlib + * @import NA + * @permission NA */ interface Options { level?: CompressLevel; diff --git a/api/@system.package.d.ts b/api/@system.package.d.ts index 130b0a3979..548e4ec621 100644 --- a/api/@system.package.d.ts +++ b/api/@system.package.d.ts @@ -55,7 +55,7 @@ export interface CheckPackageHasInstalledOptions { fail?: (data: any, code: number) => void; /** - * Called when the execution is completed. + * Called when the excution is completed. * @syscap SystemCapability.BundleManager.BundleFramework * @since 3 */ @@ -65,11 +65,12 @@ export interface CheckPackageHasInstalledOptions { /** * @syscap SystemCapability.BundleManager.BundleFramework * @since 3 + * @import package from '@system.package'; * @deprecated since 9 */ export default class Package { /** - * Checks whether an application exists, or whether a native application has been installed. + * Checks whethers an application exists, or whether a native application has been installed. * @param options Options * @syscap SystemCapability.BundleManager.BundleFramework * @deprecated since 9 diff --git a/api/bundle/PermissionDef.d.ts b/api/bundle/PermissionDef.d.ts index fcb7d7a70d..0f5f91ba38 100644 --- a/api/bundle/PermissionDef.d.ts +++ b/api/bundle/PermissionDef.d.ts @@ -17,6 +17,7 @@ * @name Indicates the defined permission details in file config.json * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.PermissionDef diff --git a/api/bundle/abilityInfo.d.ts b/api/bundle/abilityInfo.d.ts index a37c9d8b43..582105fe21 100644 --- a/api/bundle/abilityInfo.d.ts +++ b/api/bundle/abilityInfo.d.ts @@ -21,6 +21,7 @@ import bundle from './../@ohos.bundle'; * @name Obtains configuration information about an ability * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.AbilityInfo */ diff --git a/api/bundle/applicationInfo.d.ts b/api/bundle/applicationInfo.d.ts index 8f9f27ded1..6b24191948 100644 --- a/api/bundle/applicationInfo.d.ts +++ b/api/bundle/applicationInfo.d.ts @@ -20,6 +20,7 @@ import { CustomizeData } from './customizeData'; * @name Obtains configuration information about an application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ApplicationInfo */ @@ -70,8 +71,7 @@ export interface ApplicationInfo { * @default Indicates the label id of the application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @deprecated since 9 - * @useinstead ohos.bundle.bundleManager.ApplicationInfo.labelIndex + * @deprecated since 9, use labelIndex */ readonly labelId: string; @@ -86,8 +86,7 @@ export interface ApplicationInfo { * @default Indicates the icon id of the application * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * @deprecated since 9 - * @useinstead ohos.bundle.bundleManager.ApplicationInfo.iconIndex + * @deprecated since 9, use iconIndex */ readonly iconId: string; diff --git a/api/bundle/bundleInfo.d.ts b/api/bundle/bundleInfo.d.ts index de3c304a3f..fe6cf36753 100644 --- a/api/bundle/bundleInfo.d.ts +++ b/api/bundle/bundleInfo.d.ts @@ -21,6 +21,7 @@ import { HapModuleInfo } from './hapModuleInfo'; * @name The scene which is used * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.UsedScene * @@ -45,6 +46,7 @@ export interface UsedScene { * @name Indicates the required permissions details defined in file config.json * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ReqPermissionDetail */ @@ -75,6 +77,7 @@ export interface ReqPermissionDetail { * @name Obtains configuration information about a bundle * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.BundleInfo */ diff --git a/api/bundle/bundleInstaller.d.ts b/api/bundle/bundleInstaller.d.ts index 95997273a7..337ad6bd27 100644 --- a/api/bundle/bundleInstaller.d.ts +++ b/api/bundle/bundleInstaller.d.ts @@ -20,6 +20,7 @@ import bundle from './../@ohos.bundle'; * @name Provides parameters required for installing or uninstalling an application. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.installer#InstallParam @@ -57,6 +58,7 @@ export interface InstallParam { * @name Indicates the install or uninstall status * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 */ @@ -83,6 +85,7 @@ export interface InstallStatus { * @name Offers install, upgrade, and remove bundles on the devices. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.installer#BundleInstaller diff --git a/api/bundle/customizeData.d.ts b/api/bundle/customizeData.d.ts index 8eb7c2f5fa..762a082e1e 100644 --- a/api/bundle/customizeData.d.ts +++ b/api/bundle/customizeData.d.ts @@ -17,6 +17,7 @@ * @name Indicates the custom metadata * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.Metadata * diff --git a/api/bundle/elementName.d.ts b/api/bundle/elementName.d.ts index 662559af6f..605f8e19ef 100644 --- a/api/bundle/elementName.d.ts +++ b/api/bundle/elementName.d.ts @@ -20,6 +20,8 @@ * @name Contains basic Ability information, which uniquely identifies an ability * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * + * @permission N/A * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.ElementName */ diff --git a/api/bundle/hapModuleInfo.d.ts b/api/bundle/hapModuleInfo.d.ts index c544a57d25..cf1c3282e5 100644 --- a/api/bundle/hapModuleInfo.d.ts +++ b/api/bundle/hapModuleInfo.d.ts @@ -19,6 +19,7 @@ import { AbilityInfo } from "./abilityInfo"; * @name Obtains configuration information about an module. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.HapModuleInfo */ diff --git a/api/bundle/launcherAbilityInfo.d.ts b/api/bundle/launcherAbilityInfo.d.ts index 62bfc257a5..31438d20dd 100644 --- a/api/bundle/launcherAbilityInfo.d.ts +++ b/api/bundle/launcherAbilityInfo.d.ts @@ -23,6 +23,8 @@ import { ElementName } from './elementName' * @name Contains basic launcher Ability information, which uniquely identifies an LauncherAbilityInfo * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * + * @permission N/A * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.LauncherAbilityInfo @@ -32,6 +34,8 @@ export interface LauncherAbilityInfo { * @name Obtains application info information about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly applicationInfo: ApplicationInfo; @@ -39,6 +43,8 @@ export interface LauncherAbilityInfo { * @name Obtains element name about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly elementName : ElementName; @@ -46,6 +52,8 @@ export interface LauncherAbilityInfo { * @name Obtains labelId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly labelId: number; @@ -53,6 +61,8 @@ export interface LauncherAbilityInfo { * @name Obtains iconId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly iconId: number; @@ -60,6 +70,8 @@ export interface LauncherAbilityInfo { * @name Obtains userId about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly userId: number; @@ -67,6 +79,8 @@ export interface LauncherAbilityInfo { * @name Obtains installTime about an launcher ability. * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA + * */ readonly installTime : number; } diff --git a/api/bundle/moduleInfo.d.ts b/api/bundle/moduleInfo.d.ts index 0f504cb0bb..2f23150f40 100644 --- a/api/bundle/moduleInfo.d.ts +++ b/api/bundle/moduleInfo.d.ts @@ -17,6 +17,7 @@ * @name Stores module information about an application. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.bundleManager.HapModuleInfo */ diff --git a/api/bundle/remoteAbilityInfo.d.ts b/api/bundle/remoteAbilityInfo.d.ts index 59e0630bd0..176c28d969 100644 --- a/api/bundle/remoteAbilityInfo.d.ts +++ b/api/bundle/remoteAbilityInfo.d.ts @@ -20,6 +20,8 @@ import { ElementName } from './elementName'; * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi + * + * @permission N/A * @deprecated since 9 * @useinstead ohos.bundle.distributedBundle.RemoteAbilityInfo */ @@ -30,14 +32,14 @@ export interface RemoteAbilityInfo { * @syscap SystemCapability.BundleManager.DistributedBundleFramework */ readonly elementName: ElementName; - + /** * @default Indicates the label of the ability * @since 8 * @syscap SystemCapability.BundleManager.DistributedBundleFramework */ readonly label: string; - + /** * @default Indicates the icon of the ability * @since 8 diff --git a/api/bundle/shortcutInfo.d.ts b/api/bundle/shortcutInfo.d.ts index 747cebec72..cc3bf43326 100644 --- a/api/bundle/shortcutInfo.d.ts +++ b/api/bundle/shortcutInfo.d.ts @@ -18,91 +18,104 @@ * bundle name, target module name and ability class name. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @systemapi Hide this for inner system use * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager.ShortcutWant */ export interface ShortcutWant{ /** + * @default Indicates the target bundle of the shortcut want * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly targetBundle: string; /** + * @default Indicates the target class of the shortcut want * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly targetClass: string; } - + /** * @name Provides information about a shortcut, including the shortcut ID and label. * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework + * @permission NA * @deprecated since 9 * @useinstead ohos.bundle.launcherBundleManager.ShortcutInfo */ export interface ShortcutInfo { /** + * @default Indicates the ID of the application to which this shortcut belongs * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework - * + * */ readonly id: string; /** + * @default Indicates the name of the bundle containing the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly bundleName: string; /** + * @default Indicates the host ability of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly hostAbility: string; /** + * @default Indicates the icon of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly icon: string; /** + * @default Indicates the icon id of the shortcut * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly iconId: number; /** + * @default Indicates the label of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly label: string; /** + * @default Indicates the label id of the shortcut * @since 8 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly labelId: number; /** + * @default Indicates the disableMessage of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly disableMessage: string; /** + * @default Indicates the wants of the shortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly wants: Array; /** - * @default false + * @default Indicates whether the shortcut is static * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly isStatic?: boolean /** - * @default false + * @default Indicates whether the shortcut is homeshortcut * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ readonly isHomeShortcut?: boolean; /** - * @default false + * @default Indicates whether the shortcut is enabled * @since 7 * @syscap SystemCapability.BundleManager.BundleFramework */ -- Gitee