Signed-off-by: fyf <fengyunfei@huawei.com>
This commit is contained in:
fyf 2023-11-16 09:41:01 +08:00
commit bb61be4b99
13 changed files with 1059 additions and 33 deletions

View File

@ -1214,6 +1214,17 @@ declare class TextInputAttribute extends CommonMethod<TextInputAttribute> {
* @since 11
*/
customKeyboard(value: CustomBuilder): TextInputAttribute;
/**
* Define show counter of the text input.
*
* @param { boolean } value - Set the counter of the text input.
* @returns { TextInputAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 11
*/
showCounter(value: boolean): TextInputAttribute;
}
/**

View File

@ -108,7 +108,7 @@ declare namespace bundleResourceManager {
function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: number): Array<LauncherAbilityResourceInfo>;
/**
* Obtains BundleResourceInfo of all bundles available in the system.
* Obtains BundleResourceInfo of all bundles available in the system.
*
* @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES
* @param { number } resourceFlags - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned.
@ -123,7 +123,7 @@ declare namespace bundleResourceManager {
function getAllBundleResourceInfo(resourceFlags: number, callback: AsyncCallback<Array<BundleResourceInfo>>): void;
/**
* Obtains BundleResourceInfo of all bundles available in the system.
* Obtains BundleResourceInfo of all bundles available in the system.
*
* @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES
* @param { number } resourceFlags - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned.

View File

@ -24,7 +24,7 @@ import type { AsyncCallback } from './@ohos.base';
declare namespace identifier {
/**
* Obtain the OAID with callback.
* Obtaining OAID requires the permission:ohos.permission.APP_TRACKING_CONSENT, or the obtained OAID is empty.
* Obtaining OAID requires the permission:ohos.permission.APP_TRACKING_CONSENT, otherwise the obtained OAID is 00000000-0000-0000-0000-000000000000.
* @permission ohos.permission.APP_TRACKING_CONSENT
* @param { AsyncCallback<string> } callback - The callback to get the OAID.
* @throws { BusinessError } 17300001 - System internal error.
@ -34,10 +34,10 @@ declare namespace identifier {
function getOAID(callback: AsyncCallback<string>): void;
/**
* Obtain the OAID asynchronously.
* Obtaining OAID requires the permission:ohos.permission.APP_TRACKING_CONSENT, or the obtained OAID is empty.
* Obtain the OAID with promise.
* Obtaining OAID requires the permission:ohos.permission.APP_TRACKING_CONSENT, or the obtained OAID is 00000000-0000-0000-0000-000000000000.
* @permission ohos.permission.APP_TRACKING_CONSENT
* @returns { Promise<string> } Returns the OAID.
* @returns { Promise<string> } promise - Returns the OAID.
* @throws { BusinessError } 17300001 - System internal error.
* @syscap SystemCapability.Advertising.OAID
* @since 10

View File

@ -30,8 +30,8 @@ import { NotificationFlags as _NotificationFlags } from './notification/notifica
import { NotificationFlagStatus as _NotificationFlagStatus } from './notification/notificationFlags';
import { NotificationRequest as _NotificationRequest } from './notification/notificationRequest';
import { DistributedOptions as _DistributedOptions } from './notification/notificationRequest';
import { NotificationFilter as _NotificationFilter } from './notification/notificationRequest';
import { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest';
import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest';
import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest';
import { NotificationSlot as _NotificationSlot } from './notification/notificationSlot';
import { NotificationSorting as _NotificationSorting } from './notification/notificationSorting';
import { NotificationTemplate as _NotificationTemplate } from './notification/notificationTemplate';
@ -53,6 +53,24 @@ import type UIAbilityContext from './application/UIAbilityContext';
* @since 9
*/
declare namespace notificationManager {
/**
* Publishes a notification.
* <p>If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @param { AsyncCallback<void> } callback - The callback of publish.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Publishes a notification.
* <p>If a notification with the same ID has been published by the current application and has not been deleted,
@ -69,15 +87,33 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600007 - The notification is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No relevent right.
* @throws { BusinessError } 1600014 - No relevant right.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network is unreachable.
* @syscap SystemCapability.Notification.Notification
* @since 9
* @since 11
*/
function publish(request: NotificationRequest, callback: AsyncCallback<void>): void;
/**
* Publishes a notification.
* <p>If a notification with the same ID has been published by the current application and has not been deleted,
* this method will update the notification.
*
* @param { NotificationRequest } request - notification request
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
/**
* Publishes a notification.
* <p>If a notification with the same ID has been published by the current application and has not been deleted,
@ -94,15 +130,37 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600007 - The notification is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No relevent right.
* @throws { BusinessError } 1600014 - No relevant right.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network is unreachable.
* @syscap SystemCapability.Notification.Notification
* @since 9
* @since 11
*/
function publish(request: NotificationRequest): Promise<void>;
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { NotificationRequest } request - a notification.
* @param { number } userId - of subscriber receiving the notification.
* @param { AsyncCallback<void> } callback - The callback of publish.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Publishes a notification to the specified user.
*
@ -122,16 +180,38 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No relevent right.
* @throws { BusinessError } 1600014 - No relevant right.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network is unreachable.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
* @since 11
*/
function publish(request: NotificationRequest, userId: number, callback: AsyncCallback<void>): void;
/**
* Publishes a notification to the specified user.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { NotificationRequest } request - a notification.
* @param { number } userId - of subscriber receiving the notification.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Publishes a notification to the specified user.
*
@ -151,13 +231,13 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 1600014 - No relevent right.
* @throws { BusinessError } 1600014 - No relevant right.
* @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
* @throws { BusinessError } 1600016 - The notification version for this update is too low.
* @throws { BusinessError } 2300007 - Network is unreachable.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
* @since 11
*/
function publish(request: NotificationRequest, userId: number): Promise<void>;
@ -1640,12 +1720,31 @@ declare namespace notificationManager {
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
/**
* Set whether the application slot is enabled.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } type - Type of the notification slot.
* @param { boolean } enable - Set enable or not.
* @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
function setNotificationEnableSlot(
bundle: BundleOption,
type: SlotType,
@ -1660,8 +1759,9 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } type - Type of the notification slot.
* @param { boolean } enable - Set enable or not.
* @param { boolean } isForceControl - Is the notification slot enable affected by the application
* notification enable, false means affected.
* @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
* @param { boolean } isForceControl - Is the slot enable affected by the main enable, false means affected.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
@ -1708,7 +1808,8 @@ declare namespace notificationManager {
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } type - Type of the notification slot.
* @param { boolean } enable - Set enable or not.
* @param { boolean } isForceControl - Is the slot enable affected by the main enable, false means affected.
* @param { boolean } isForceControl - Is the notification slot enable affected by the application
* notification enable, false means affected.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
@ -2042,7 +2143,7 @@ declare namespace notificationManager {
* Label of the notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { string }
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
@ -2086,12 +2187,12 @@ declare namespace notificationManager {
* Additional information of the live view notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { [key: string]: any }
* @type { ?object }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
extraInfos?: { [key: string]: any };
extraInfos?: { [key: string]: object };
}
/**

View File

@ -105,6 +105,18 @@ declare namespace screenLock {
* @systemapi Hide this for inner system use.
* @since 9
*/
/**
* Unlock the screen.
*
* @param { AsyncCallback<boolean> } callback - the callback of unlock.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
* @throws { BusinessError } 13200003 - illegal use.
* @syscap SystemCapability.MiscServices.ScreenLock
* @systemapi Hide this for inner system use.
* @since 11
*/
function unlock(callback: AsyncCallback<boolean>): void;
/**
@ -117,6 +129,17 @@ declare namespace screenLock {
* @systemapi Hide this for inner system use.
* @since 9
*/
/**
* Unlock the screen.
*
* @returns { Promise<boolean> } the promise returned by the function.
* @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 13200002 - the screenlock management service is abnormal.
* @throws { BusinessError } 13200003 - illegal use.
* @syscap SystemCapability.MiscServices.ScreenLock
* @systemapi Hide this for inner system use.
* @since 11
*/
function unlock(): Promise<boolean>;
/**

File diff suppressed because it is too large Load Diff

View File

@ -140,6 +140,7 @@
"SystemCapability.Ability.AbilityRuntime.FAModel",
"SystemCapability.Ability.AbilityRuntime.AbilityCore",
"SystemCapability.Ability.AbilityRuntime.Mission",
"SystemCapability.Ability.AbilityRuntime.AutoFill",
"SystemCapability.Ability.AbilityTools.AbilityAssistant",
"SystemCapability.Ability.Form",
"SystemCapability.Ability.DistributedAbilityManager",

View File

@ -182,6 +182,7 @@
"SystemCapability.Ability.AbilityRuntime.FAModel",
"SystemCapability.Ability.AbilityRuntime.AbilityCore",
"SystemCapability.Ability.AbilityRuntime.Mission",
"SystemCapability.Ability.AbilityRuntime.AutoFill",
"SystemCapability.Ability.AbilityTools.AbilityAssistant",
"SystemCapability.Ability.Form",
"SystemCapability.Ability.DistributedAbilityManager",

View File

@ -176,6 +176,7 @@
"SystemCapability.Ability.AbilityRuntime.FAModel",
"SystemCapability.Ability.AbilityRuntime.AbilityCore",
"SystemCapability.Ability.AbilityRuntime.Mission",
"SystemCapability.Ability.AbilityRuntime.AutoFill",
"SystemCapability.Ability.AbilityTools.AbilityAssistant",
"SystemCapability.Ability.Form",
"SystemCapability.Ability.DistributedAbilityManager",

View File

@ -152,6 +152,7 @@
"SystemCapability.Ability.AbilityRuntime.FAModel",
"SystemCapability.Ability.AbilityRuntime.AbilityCore",
"SystemCapability.Ability.AbilityRuntime.Mission",
"SystemCapability.Ability.AbilityRuntime.AutoFill",
"SystemCapability.Ability.AbilityTools.AbilityAssistant",
"SystemCapability.Ability.Form",
"SystemCapability.Ability.DistributedAbilityManager",

View File

@ -146,6 +146,7 @@
"SystemCapability.Ability.AbilityRuntime.FAModel",
"SystemCapability.Ability.AbilityRuntime.AbilityCore",
"SystemCapability.Ability.AbilityRuntime.Mission",
"SystemCapability.Ability.AbilityRuntime.AutoFill",
"SystemCapability.Ability.AbilityTools.AbilityAssistant",
"SystemCapability.Ability.Form",
"SystemCapability.Ability.DistributedAbilityManager",

View File

@ -166,22 +166,22 @@ export interface NotificationLiveViewContent extends NotificationBasicContent {
/**
* Additional information of the live view notification.
*
* @type { [key: string]: any}
* @type { ?object}
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
extraInfo?: {[key: string]: any};
extraInfo?: { [key: string]: object };
/**
* Picture information of the live view notification.
* The picture information list of the live view notification.
*
* @type { [key: string]: Array<image.PixelMap> }
* @type { ?object }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11
*/
pictureMap?: {[key: string]: Array<image.PixelMap>};
pictureInfo?: { [key: string]: Array<image.PixelMap> };
}
/**

View File

@ -466,7 +466,7 @@ export interface NotificationFilter {
/**
* Indicates the label and id of the notification.
*
* @type { NotificationKey }
* @type { notificationSubscribe.NotificationKey }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 11