mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2025-02-20 17:21:09 +00:00
fix: 401_notes
Signed-off-by: suozhipeng <suozhipeng@huawei.com>
This commit is contained in:
parent
4cbbc42d78
commit
9a6619a2bb
10
api/@ohos.batteryInfo.d.ts
vendored
10
api/@ohos.batteryInfo.d.ts
vendored
@ -42,10 +42,12 @@ declare namespace batteryInfo {
|
||||
* Sets the battery config by scene name.
|
||||
*
|
||||
* @param { string } sceneName - Indicates the battery charging scene name.
|
||||
* sceneName parameter must be of type string.
|
||||
* @param { string } sceneValue - Indicates the battery charging scene value.
|
||||
* sceneValue parameter must be of type string.
|
||||
* @returns { number } Return to set the charging configuration result.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the reason is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryManager.Core
|
||||
* @systemapi
|
||||
@ -57,9 +59,10 @@ declare namespace batteryInfo {
|
||||
* Queries the battery config by scene name.
|
||||
*
|
||||
* @param { string } sceneName - Indicates the battery charging scene name.
|
||||
* sceneName parameter must be of type string.
|
||||
* @returns { string } Returns the battery charging configuration, returns "" otherwise.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the reason is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryManager.Core
|
||||
* @systemapi
|
||||
@ -71,9 +74,10 @@ declare namespace batteryInfo {
|
||||
* Checks the battery config is enable by scene name.
|
||||
*
|
||||
* @param { string } sceneName - Indicates the battery charging scene name.
|
||||
* sceneName parameter must be of type string.
|
||||
* @returns { boolean } Returns true if the device supports the charging scene, returns false otherwise.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the reason is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryManager.Core
|
||||
* @systemapi
|
||||
|
9
api/@ohos.batteryStatistics.d.ts
vendored
9
api/@ohos.batteryStatistics.d.ts
vendored
@ -127,8 +127,9 @@ declare namespace batteryStats {
|
||||
* Obtains the power consumption information list.
|
||||
*
|
||||
* @param { AsyncCallback<Array<BatteryStatsInfo>> } callback Indicates the callback of power consumption information list.
|
||||
* AsyncCallback encapsulates an interface of BatteryStatsInfo type.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the callback is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @throws { BusinessError } 4600101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryStatistics
|
||||
* @systemapi
|
||||
@ -166,9 +167,10 @@ declare namespace batteryStats {
|
||||
* Obtains power consumption information(mAh) for a given type.
|
||||
*
|
||||
* @param { ConsumptionType } type Indicates the hardware type.
|
||||
* the ConsumptionType type is an enumeration class.
|
||||
* @returns { number } Power consumption information(mAh).
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the type is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @throws { BusinessError } 4600101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryStatistics
|
||||
* @systemapi
|
||||
@ -180,9 +182,10 @@ declare namespace batteryStats {
|
||||
* Obtains power consumption information(Percent) for a given type.
|
||||
*
|
||||
* @param { ConsumptionType } type Indicates the hardware type.
|
||||
* the ConsumptionType type is an enumeration class.
|
||||
* @returns { number } Power consumption information(Percent).
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the type is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @throws { BusinessError } 4600101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.BatteryStatistics
|
||||
* @systemapi
|
||||
|
9
api/@ohos.brightness.d.ts
vendored
9
api/@ohos.brightness.d.ts
vendored
@ -33,8 +33,10 @@ declare namespace brightness {
|
||||
* Sets the screen brightness.
|
||||
*
|
||||
* @param { number } value Brightness value, ranging from 0 to 255.
|
||||
* value parameter must be of type number.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the value is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
|
||||
* 2. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4700101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.DisplayPowerManager
|
||||
* @systemapi
|
||||
@ -46,11 +48,14 @@ declare namespace brightness {
|
||||
* Sets the screen brightness.
|
||||
*
|
||||
* @param { number } value - Brightness value, ranging from 0 to 255.
|
||||
* value parameter must be of type number.
|
||||
* @param { boolean } continuous - This parameter is used in the scenario of continuous adjustment to the brightness.
|
||||
* You are advised to set this parameter to true during the continuous adjustment and
|
||||
* to false at the end of the continuous adjustment for better performance.
|
||||
* continuous parameter must be of type boolean.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the value is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
|
||||
* 2. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4700101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.DisplayPowerManager
|
||||
* @systemapi
|
||||
|
15
api/@ohos.power.d.ts
vendored
15
api/@ohos.power.d.ts
vendored
@ -34,9 +34,10 @@ declare namespace power {
|
||||
*
|
||||
* @permission ohos.permission.REBOOT
|
||||
* @param { string } reason Indicates the shutdown reason.
|
||||
* reason parameter must be of type string.
|
||||
* @throws { BusinessError } 201 - If the permission is denied.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the reason is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @systemapi
|
||||
@ -65,9 +66,10 @@ declare namespace power {
|
||||
* @permission ohos.permission.REBOOT
|
||||
* @param { string } reason Indicates the restart reason. For example, "updater" indicates entering the updater mode
|
||||
* after the restart. If the parameter is not specified, the system enters the normal mode after the restart.
|
||||
* reason parameter must be of type string.
|
||||
* @throws { BusinessError } 201 - If the permission is denied.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the reason is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @systemapi
|
||||
@ -113,8 +115,9 @@ declare namespace power {
|
||||
* Wakes up the device to turn on the screen.
|
||||
*
|
||||
* @param { string } detail Indicates the detail information who request wakeup.
|
||||
* detail parameter must be of type string.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If the detail is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @systemapi
|
||||
@ -158,10 +161,11 @@ declare namespace power {
|
||||
*
|
||||
* @permission ohos.permission.POWER_OPTIMIZATION
|
||||
* @param { DevicePowerMode } mode Indicates power mode {@link DevicePowerMode} to set.
|
||||
* the DevicePowerMode type is an enumeration class.
|
||||
* @param { AsyncCallback<void> } callback Indicates the callback of setting the power mode.
|
||||
* @throws { BusinessError } 201 – If the permission is denied.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If mode or callback is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @systemapi
|
||||
@ -174,10 +178,11 @@ declare namespace power {
|
||||
*
|
||||
* @permission ohos.permission.POWER_OPTIMIZATION
|
||||
* @param { DevicePowerMode } mode Indicates power mode {@link DevicePowerMode} to set.
|
||||
* the DevicePowerMode type is an enumeration class.
|
||||
* @returns { Promise<void> }
|
||||
* @throws { BusinessError } 201 – If the permission is denied.
|
||||
* @throws { BusinessError } 202 - If the system permission is denied.
|
||||
* @throws { BusinessError } 401 - If mode or callback is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @systemapi
|
||||
|
16
api/@ohos.runningLock.d.ts
vendored
16
api/@ohos.runningLock.d.ts
vendored
@ -55,7 +55,8 @@ declare namespace runningLock {
|
||||
* @permission ohos.permission.RUNNING_LOCK
|
||||
* @param { number } timeout Indicates the lock duration (ms). After the lock duration times out,
|
||||
* the lock is automatically released and the system hibernates if no other {@link RunningLock} is set.
|
||||
* @throws { BusinessError } 401 - If the timeout is not valid.
|
||||
* timeout parameter must be of type number.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @since 9
|
||||
@ -168,8 +169,10 @@ declare namespace runningLock {
|
||||
* Checks whether the specified {@link RunningLockType} is supported.
|
||||
*
|
||||
* @param { RunningLockType } type Indicates the specified {@link RunningLockType}.
|
||||
* the RunningLockType type is an enumeration class.
|
||||
* @returns { boolean } Whether the specified {@link RunningLockType} is supported.
|
||||
* @throws { BusinessError } 401 - If the type is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* 2. Parameter verification failed.
|
||||
* @throws { BusinessError } 4900101 - If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @since 9
|
||||
@ -218,9 +221,12 @@ declare namespace runningLock {
|
||||
* @permission ohos.permission.RUNNING_LOCK
|
||||
* @param { string } name Indicates the {@link RunningLock} name. A recommended name consists of the package or
|
||||
* class name and a suffix.
|
||||
* name parameter must be of type string.
|
||||
* @param { RunningLockType } type Indicates the {@link RunningLockType}.
|
||||
* the RunningLockType type is an enumeration class.
|
||||
* @param { AsyncCallback<RunningLock> } callback Indicates the callback of {@link RunningLock} object.
|
||||
* @throws { BusinessError } 401 - If the name, type or callback is not valid.
|
||||
* AsyncCallback encapsulates a class of RunningLock type
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @since 9
|
||||
*/
|
||||
@ -234,9 +240,11 @@ declare namespace runningLock {
|
||||
* @permission ohos.permission.RUNNING_LOCK
|
||||
* @param { string } name Indicates the {@link RunningLock} name. A recommended name consists of the package or
|
||||
* class name and a suffix.
|
||||
* name parameter must be of type string.
|
||||
* @param { RunningLockType } type Indicates the {@link RunningLockType}.
|
||||
* the RunningLockType type is an enumeration class.
|
||||
* @returns { Promise<RunningLock> } The {@link RunningLock} object.
|
||||
* @throws { BusinessError } 401 - If the name or type is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
|
||||
* @syscap SystemCapability.PowerManager.PowerManager.Core
|
||||
* @since 9
|
||||
*/
|
||||
|
5
api/@ohos.thermal.d.ts
vendored
5
api/@ohos.thermal.d.ts
vendored
@ -117,7 +117,8 @@ declare namespace thermal {
|
||||
* Registers to callbacks of thermal level changes.
|
||||
*
|
||||
* @param { Callback<ThermalLevel> } callback Callback of thermal level changes.
|
||||
* @throws { BusinessError } 401 - If callback is not valid.
|
||||
* this param is a function type.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4800101 If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.ThermalManager
|
||||
* @since 9
|
||||
@ -139,7 +140,7 @@ declare namespace thermal {
|
||||
* Unregisters from the callbacks of thermal level changes.
|
||||
*
|
||||
* @param { Callback<void> } callback Callback of thermal level changes.
|
||||
* @throws { BusinessError } 401 - If callback is not valid.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
|
||||
* @throws { BusinessError } 4800101 If connecting to the service failed.
|
||||
* @syscap SystemCapability.PowerManager.ThermalManager
|
||||
* @since 9
|
||||
|
Loading…
x
Reference in New Issue
Block a user