From cfbd7413855b6380c459eb1af9577ce1572de442 Mon Sep 17 00:00:00 2001 From: liujia178 Date: Wed, 25 Jun 2025 11:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=91=E5=8D=95=EF=BC=9A=E5=BC=BA=E5=9F=BAap?= =?UTF-8?q?i/@ohos.hiviewdfx.hiAppEvent.d.ts=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujia178 --- api/@ohos.hiviewdfx.hiAppEvent.d.ets | 1395 -------------------------- api/@ohos.hiviewdfx.hiAppEvent.d.ts | 282 ++++-- 2 files changed, 188 insertions(+), 1489 deletions(-) delete mode 100644 api/@ohos.hiviewdfx.hiAppEvent.d.ets diff --git a/api/@ohos.hiviewdfx.hiAppEvent.d.ets b/api/@ohos.hiviewdfx.hiAppEvent.d.ets deleted file mode 100644 index c990aed681..0000000000 --- a/api/@ohos.hiviewdfx.hiAppEvent.d.ets +++ /dev/null @@ -1,1395 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit PerformanceAnalysisKit - */ - -import { AsyncCallback } from '@ohos.base'; - -/** - * Provides the event logging function for applications to log the fault, statistical, security, - * and user behavior events reported during running. Based on event information, - * you will be able to analyze the running status of applications. - * - * @namespace hiAppEvent - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ -/** - * Provides the event logging function for applications to log the fault, statistical, security, - * and user behavior events reported during running. Based on event information, - * you will be able to analyze the running status of applications. - * - * @namespace hiAppEvent - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ -declare namespace hiAppEvent { - /** - * Enumerate application event types. - * - * @enum { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Enumerate application event types. - * - * @enum { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export enum EventType { - /** - * Fault event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Fault event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - FAULT = 1, - - /** - * Statistic event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Statistic event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - STATISTIC = 2, - - /** - * Security event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Security event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - SECURITY = 3, - - /** - * User behavior event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * User behavior event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - BEHAVIOR = 4 - } - - /** - * Preset domain. - * - * @namespace domain - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export namespace domain { - /** - * the domain of operating system. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const OS: string; - } - - /** - * Preset event. - * - * @namespace event - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Preset event. - * - * @namespace event - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 11 - */ - export namespace event { - /** - * User login event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * User login event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const USER_LOGIN: string; - - /** - * User logout event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * User logout event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const USER_LOGOUT: string; - - /** - * Distributed service event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Distributed service event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const DISTRIBUTED_SERVICE_START: string; - - /** - * crash event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const APP_CRASH: string; - - /** - * freeze event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const APP_FREEZE: string; - - /** - * launch event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const APP_LAUNCH: string; - - /** - * scroll jank event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const SCROLL_JANK: string; - - /** - * cpu usage high event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const CPU_USAGE_HIGH: string; - - /** - * battery usage event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const BATTERY_USAGE: string; - - /** - * resource overlimit event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const RESOURCE_OVERLIMIT: string; - - /** - * address sanitizer event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const ADDRESS_SANITIZER: string; - - /** - * main thread jank event. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const MAIN_THREAD_JANK: string; - } - - /** - * Preset param. - * - * @namespace param - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Preset param. - * - * @namespace param - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export namespace param { - /** - * User id. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * User id. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const USER_ID: string; - - /** - * Distributed service name. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Distributed service name. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const DISTRIBUTED_SERVICE_NAME: string; - - /** - * Distributed service instance id. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Distributed service instance id. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - const DISTRIBUTED_SERVICE_INSTANCE_ID: string; - } - - /** - * Application event logging configuration interface. - * - * @param { ConfigOption } config Application event logging configuration item object. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11103001 - Invalid max storage quota value. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Application event logging configuration interface. - * - * @param { ConfigOption } config Application event logging configuration item object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11103001 - Invalid max storage quota value. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function configure(config: ConfigOption): void; - - /** - * Describe the options for the configuration. - * - * @interface ConfigOption - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Describe the options for the configuration. - * - * @interface ConfigOption - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface ConfigOption { - /** - * Configuration item: application event logging switch. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Configuration item: application event logging switch. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - disable?: boolean; - - /** - * Configuration item: event file directory storage quota size. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Configuration item: event file directory storage quota size. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - maxStorage?: string; - } - - /** - * Definition of written application event information. - * - * @interface AppEventInfo - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of written application event information. - * - * @interface AppEventInfo - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface AppEventInfo { - /** - * The domain of the event. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The domain of the event. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - domain: string; - - /** - * The name of the event. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The name of the event. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - name: string; - - /** - * The type of the event. - * - * @type { EventType } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The type of the event. - * - * @type { EventType } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - eventType: EventType; - - /** - * The params of the event. - * - * @type { Record } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The params of the event. - * - * @type { Record } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - params: Record; - } - - /** - * Write application event. - * - * @param { AppEventInfo } info Application event information to be written. - * @returns { Promise } Return Promise. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. - * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. - * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Write application event. - * - * @param { AppEventInfo } info Application event information to be written. - * @returns { Promise } Return Promise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. - * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. - * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function write(info: AppEventInfo): Promise; - - /** - * Write application event. - * - * @param { AppEventInfo } info Application event information to be written. - * @param { AsyncCallback } callback Callback function. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. - * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. - * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Write application event. - * - * @param { AppEventInfo } info Application event information to be written. - * @param { AsyncCallback } callback Callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. - * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. - * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function write(info: AppEventInfo, callback: AsyncCallback): void; - - /** - * Indicates possible parameter types. - * - * @typedef {number | string | boolean | Array} - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - type ParamType = number | string | boolean | Array; - - /** - * It is used to set custom parameters for events, including both system-subscribed events and custom events. - * Existing parameter will be overwritten, and non-existing parameter will be created. - * - * @param { Record } params The parameters of the event. - * @param { string } domain The domain of the event. - * @param { string } name The name of the event. - * @returns { Promise } Return Promise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11101007 - The number of parameter keys exceeds the limit. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function setEventParam(params: Record, domain: string, name?: string): Promise; - - /** - * Set the config for the os event. - * - * @param { string } name The name of the os event. - * @param { Record } config The config info of the os event. - * @returns { Promise } Return Promise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3.Parameter verification failed. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function setEventConfig(name: string, config: Record): Promise; - - /** - * Definition of the read event package. - * - * @interface AppEventPackage - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of the read event package. - * - * @interface AppEventPackage - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface AppEventPackage { - /** - * The id of the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The id of the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - packageId: number; - - /** - * The number of events contained in the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The number of events contained in the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - row: number; - - /** - * The total size of events contained in the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The total size of events contained in the package. - * - * @type { number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - size: number; - - /** - * The events data contained in the package. - * - * @type { string[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The events data contained in the package. - * - * @type { string[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - data: string[]; - - /** - * The event json format data contained in the package. - * - * @type { Array } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - appEventInfos: Array; - } - - /** - * Definition of event holder object, which is used to read the event data monitored by the watcher. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of event holder object, which is used to read the event data monitored by the watcher. - * - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export class AppEventPackageHolder { - /** - * Constructor for AppEventPackageHolder. - * - * @param { string } watcherName Name of the watcher to read. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Constructor for AppEventPackageHolder. - * - * @param { string } watcherName Name of the watcher to read. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - constructor(watcherName: string); - - /** - * Set the threshold size per read. - * - * @param { number } size Threshold size. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11104001 - Invalid size value. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Set the threshold size per read. - * - * @param { number } size Threshold size. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - setSize(size: number): void; - - /** - * Set the number of rows per read. - * - * @param { number } size Row size. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - setRow(size: number): void; - - /** - * Read the event data monitored by the watcher. - * - * @returns { AppEventPackage } The read event package. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Read the event data monitored by the watcher. - * - * @returns { AppEventPackage } The read event package. - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - takeNext(): AppEventPackage; - } - - /** - * Definition of the condition for triggering callback when the watcher monitors event data. - * - * @interface TriggerCondition - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of the condition for triggering callback when the watcher monitors event data. - * - * @interface TriggerCondition - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface TriggerCondition { - /** - * The number of write events that trigger callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The number of write events that trigger callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - row?: number; - - /** - * The size of write events that trigger callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The size of write events that trigger callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - size?: number; - - /** - * The interval for triggering callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The interval for triggering callback. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - timeOut?: number; - } - - /** - * Definition of event filter object, which is used to filter events monitored by the watcher. - * - * @interface AppEventFilter - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of event filter object, which is used to filter events monitored by the watcher. - * - * @interface AppEventFilter - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface AppEventFilter { - /** - * The name of the event domain to be monitored by the watcher. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The name of the event domain to be monitored by the watcher. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - domain: string; - - /** - * The types of the events to be monitored by the watcher. - * - * @type { ?EventType[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The types of the events to be monitored by the watcher. - * - * @type { ?EventType[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - eventTypes?: EventType[]; - - /** - * The names of the events to be monitored by the watcher. - * - * @type { ?string[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - names?: string[]; - } - - /** - * Definition of event group. - * - * @interface AppEventGroup - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface AppEventGroup { - /** - * The name of the event. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - name: string; - - /** - * The event array which is group by the name. - * - * @type { Array } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - appEventInfos: Array; - } - - /** - * Definition of event watcher object, which is used to monitor written event data. - * - * @interface Watcher - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Definition of event watcher object, which is used to monitor written event data. - * - * @interface Watcher - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface Watcher { - /** - * The name of watcher. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The name of watcher. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - name: string; - - /** - * The condition for triggering callback. - * - * @type { ?TriggerCondition } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The condition for triggering callback. - * - * @type { ?TriggerCondition } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - triggerCondition?: TriggerCondition; - - /** - * The event filters for monitoring events. - * - * @type { ?AppEventFilter[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The event filters for monitoring events. - * - * @type { ?AppEventFilter[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - appEventFilters?: AppEventFilter[]; - - /** - * The callback function of watcher. - * - * @type { ?function } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * The callback function of watcher. - * - * @type { ?function } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - onTrigger?: (curRow: number, curSize: number, holder: AppEventPackageHolder) => void; - - /** - * The callback function, when watcher receive the event. - * - * @type { ?function } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - onReceive?: (domain: string, appEventGroups: Array) => void; - } - - /** - * Add event watcher. - * - * @param { Watcher } watcher Watcher object for monitoring events. - * @returns { AppEventPackageHolder } Holder object, which is used to read the monitoring data of the watcher. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @throws { BusinessError } 11102002 - Invalid filtering event domain. - * @throws { BusinessError } 11102003 - Invalid row value. - * @throws { BusinessError } 11102004 - Invalid size value. - * @throws { BusinessError } 11102005 - Invalid timeout value. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Add event watcher. - * - * @param { Watcher } watcher Watcher object for monitoring events. - * @returns { AppEventPackageHolder } Holder object, which is used to read the monitoring data of the watcher. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @throws { BusinessError } 11102002 - Invalid filtering event domain. - * @throws { BusinessError } 11102003 - Invalid row value. - * @throws { BusinessError } 11102004 - Invalid size value. - * @throws { BusinessError } 11102005 - Invalid timeout value. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function addWatcher(watcher: Watcher): AppEventPackageHolder; - - /** - * Remove event watcher. - * - * @param { Watcher } watcher Watcher object for monitoring events. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Remove event watcher. - * - * @param { Watcher } watcher Watcher object for monitoring events. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function removeWatcher(watcher: Watcher): void; - - /** - * Clear all local logging data of the application. - * - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @since 20 - */ - /** - * Clear all local logging data of the application. - * - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function clearData(): void; - - /** - * Set user ID. - * - * @param { string } name The key of the user ID. - * @param { string } value The value of the user ID. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function setUserId(name: string, value: string): void; - - /** - * Get user ID. - * - * @param { string } name The key of the user ID. - * @returns { string } the user ID value. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function getUserId(name: string): string; - - /** - * Set user property. - * - * @param { string } name The key of the user property. - * @param { string } value The value of the user property. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function setUserProperty(name: string, value: string): void; - - /** - * Get user property. - * - * @param { string } name The key of the user property. - * @returns { string } the user property value. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function getUserProperty(name: string): string; - - /** - * Describe the event config to be reported by processor. - * - * @interface AppEventReportConfig - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface AppEventReportConfig { - /** - * The domain of the event. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - domain?: string; - - /** - * The name of the event. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - name?: string; - - /** - * The realtime report event. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - isRealTime?: boolean; - } - - /** - * Definition of the processor. - * - * @interface Processor - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export interface Processor { - /** - * The name of the processor. - * - * @type { string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - name: string; - - /** - * The processor enable the developer to debug. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - debugMode?: boolean; - - /** - * The server location which used for the processor to receive the data, defined by the processor. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - routeInfo?: string; - - /** - * The app ID is provided by the processor. - * - * @type { ?string } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - appId?: string; - - /** - * The processor report the event when start. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - onStartReport?: boolean; - - /** - * The processor report the event when the application onBackground. - * - * @type { ?boolean } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - onBackgroundReport?: boolean; - - /** - * The processor report the event according to the period. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - periodReport?: int; - - /** - * The processor report the event according to the batch size. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - batchReport?: int; - - /** - * The user ID names which the processor can report. - * - * @type { ?string[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - userIds?: string[]; - - /** - * The user property names which the processor can report. - * - * @type { ?string[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - userProperties?: string[]; - - /** - * The events which the processor can report. - * - * @type { ?AppEventReportConfig[] } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - eventConfigs?: AppEventReportConfig[]; - - /** - * The processor config id. - * - * @type { ?number } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - configId?: int; - - /** - * The processor set custom config data. - * - * @type { ?Record } - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - customConfigs?: Record; - } - - /** - * Add the processor, who can report the event. - * - * @param { Processor } processor The instance which report the event - * @returns { number } The processor unique ID. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function addProcessor(processor: Processor): number; - - /** - * Remove the processor. - * - * @param { number } id The processor unique ID. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @static - * @syscap SystemCapability.HiviewDFX.HiAppEvent - * @atomicservice - * @since 20 - */ - export function removeProcessor(id: number): void; -} - -export default hiAppEvent; diff --git a/api/@ohos.hiviewdfx.hiAppEvent.d.ts b/api/@ohos.hiviewdfx.hiAppEvent.d.ts index 1825109022..481980b23c 100644 --- a/api/@ohos.hiviewdfx.hiAppEvent.d.ts +++ b/api/@ohos.hiviewdfx.hiAppEvent.d.ts @@ -37,7 +37,8 @@ import type { AsyncCallback } from './@ohos.base'; * @namespace hiAppEvent * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hiAppEvent { /** @@ -53,7 +54,8 @@ declare namespace hiAppEvent { * @enum { number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum EventType { /** @@ -67,7 +69,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FAULT = 1, @@ -82,7 +85,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATISTIC = 2, @@ -97,7 +101,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SECURITY = 3, @@ -112,7 +117,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BEHAVIOR = 4 } @@ -123,7 +129,8 @@ declare namespace hiAppEvent { * @namespace domain * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ namespace domain { /** @@ -131,7 +138,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const OS: string; } @@ -149,7 +157,8 @@ declare namespace hiAppEvent { * @namespace event * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ namespace event { /** @@ -163,7 +172,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_LOGIN: string; @@ -178,7 +188,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_LOGOUT: string; @@ -193,7 +204,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_START: string; @@ -202,7 +214,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_CRASH: string; @@ -211,7 +224,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_FREEZE: string; @@ -220,7 +234,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_LAUNCH: string; @@ -229,7 +244,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const SCROLL_JANK: string; @@ -238,7 +254,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const CPU_USAGE_HIGH: string; @@ -247,7 +264,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const BATTERY_USAGE: string; @@ -256,7 +274,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const RESOURCE_OVERLIMIT: string; @@ -265,7 +284,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ADDRESS_SANITIZER: string; @@ -274,7 +294,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MAIN_THREAD_JANK: string; } @@ -292,7 +313,8 @@ declare namespace hiAppEvent { * @namespace param * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ namespace param { /** @@ -306,7 +328,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_ID: string; @@ -321,7 +344,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_NAME: string; @@ -336,7 +360,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_INSTANCE_ID: string; } @@ -361,7 +386,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function configure(config: ConfigOption): void; @@ -378,7 +404,8 @@ declare namespace hiAppEvent { * @interface ConfigOption * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ConfigOption { /** @@ -394,7 +421,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disable?: boolean; @@ -411,7 +439,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxStorage?: string; } @@ -429,7 +458,8 @@ declare namespace hiAppEvent { * @interface AppEventInfo * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventInfo { /** @@ -445,7 +475,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -462,7 +493,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -479,7 +511,8 @@ declare namespace hiAppEvent { * @type { EventType } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ eventType: EventType; @@ -496,7 +529,8 @@ declare namespace hiAppEvent { * @type { object } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ params: object; } @@ -535,7 +569,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function write(info: AppEventInfo): Promise; @@ -573,7 +608,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function write(info: AppEventInfo, callback: AsyncCallback): void; @@ -583,7 +619,8 @@ declare namespace hiAppEvent { * @typedef {number | string | boolean | Array} * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type ParamType = number | string | boolean | Array; @@ -601,7 +638,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function setEventParam(params: Record, domain: string, name?: string): Promise; @@ -616,7 +654,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function setEventConfig(name: string, config: Record): Promise; @@ -633,7 +672,8 @@ declare namespace hiAppEvent { * @interface AppEventPackage * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventPackage { /** @@ -649,7 +689,8 @@ declare namespace hiAppEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ packageId: number; @@ -666,7 +707,8 @@ declare namespace hiAppEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ row: number; @@ -683,7 +725,8 @@ declare namespace hiAppEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size: number; @@ -700,7 +743,8 @@ declare namespace hiAppEvent { * @type { string[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ data: string[]; @@ -710,7 +754,8 @@ declare namespace hiAppEvent { * @type { Array } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appEventInfos: Array; } @@ -726,7 +771,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ class AppEventPackageHolder { /** @@ -742,7 +788,8 @@ declare namespace hiAppEvent { * @param { string } watcherName Name of the watcher to read. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(watcherName: string); @@ -764,7 +811,8 @@ declare namespace hiAppEvent { * @throws { BusinessError } 11104001 - Invalid size value. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setSize(size: number): void; @@ -777,7 +825,8 @@ declare namespace hiAppEvent { * @throws { BusinessError } 11104001 - Invalid size value. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setRow(size: number): void; @@ -794,7 +843,8 @@ declare namespace hiAppEvent { * @returns { AppEventPackage } The read event package. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ takeNext(): AppEventPackage; } @@ -812,7 +862,8 @@ declare namespace hiAppEvent { * @interface TriggerCondition * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TriggerCondition { /** @@ -828,7 +879,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ row?: number; @@ -845,7 +897,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: number; @@ -862,7 +915,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timeOut?: number; } @@ -880,7 +934,8 @@ declare namespace hiAppEvent { * @interface AppEventFilter * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventFilter { /** @@ -896,7 +951,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -913,7 +969,8 @@ declare namespace hiAppEvent { * @type { ?EventType[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ eventTypes?: EventType[]; @@ -923,7 +980,8 @@ declare namespace hiAppEvent { * @type { ?string[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ names?: string[]; } @@ -934,7 +992,8 @@ declare namespace hiAppEvent { * @interface AppEventGroup * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventGroup { /** @@ -943,7 +1002,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -953,7 +1013,8 @@ declare namespace hiAppEvent { * @type { Array } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ appEventInfos: Array; } @@ -971,7 +1032,8 @@ declare namespace hiAppEvent { * @interface Watcher * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Watcher { /** @@ -987,7 +1049,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -1004,7 +1067,8 @@ declare namespace hiAppEvent { * @type { ?TriggerCondition } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ triggerCondition?: TriggerCondition; @@ -1021,7 +1085,8 @@ declare namespace hiAppEvent { * @type { ?AppEventFilter[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ appEventFilters?: AppEventFilter[]; @@ -1038,7 +1103,8 @@ declare namespace hiAppEvent { * @type { ?function } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTrigger?: (curRow: number, curSize: number, holder: AppEventPackageHolder) => void; @@ -1048,7 +1114,8 @@ declare namespace hiAppEvent { * @type { ?function } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onReceive?: (domain: string, appEventGroups: Array) => void; } @@ -1083,7 +1150,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function addWatcher(watcher: Watcher): AppEventPackageHolder; @@ -1107,7 +1175,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function removeWatcher(watcher: Watcher): void; @@ -1124,7 +1193,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function clearData(): void; @@ -1138,7 +1208,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function setUserId(name: string, value: string): void; @@ -1152,7 +1223,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getUserId(name: string): string; @@ -1166,7 +1238,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function setUserProperty(name: string, value: string): void; @@ -1180,7 +1253,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getUserProperty(name: string): string; @@ -1190,7 +1264,8 @@ declare namespace hiAppEvent { * @interface AppEventReportConfig * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventReportConfig { /** @@ -1199,7 +1274,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ domain?: string; @@ -1209,7 +1285,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -1219,7 +1296,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isRealTime?: boolean; } @@ -1230,7 +1308,8 @@ declare namespace hiAppEvent { * @interface Processor * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Processor { /** @@ -1239,7 +1318,8 @@ declare namespace hiAppEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -1249,7 +1329,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ debugMode?: boolean; @@ -1259,7 +1340,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ routeInfo?: string; @@ -1269,7 +1351,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ appId?: string; @@ -1279,7 +1362,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onStartReport?: boolean; @@ -1289,7 +1373,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBackgroundReport?: boolean; @@ -1299,7 +1384,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ periodReport?: number; @@ -1309,7 +1395,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ batchReport?: number; @@ -1319,7 +1406,8 @@ declare namespace hiAppEvent { * @type { ?string[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ userIds?: string[]; @@ -1329,7 +1417,8 @@ declare namespace hiAppEvent { * @type { ?string[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ userProperties?: string[]; @@ -1339,7 +1428,8 @@ declare namespace hiAppEvent { * @type { ?AppEventReportConfig[] } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ eventConfigs?: AppEventReportConfig[]; @@ -1349,7 +1439,8 @@ declare namespace hiAppEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ configId?: number; @@ -1359,7 +1450,8 @@ declare namespace hiAppEvent { * @type { ?Record } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customConfigs?: Record; } @@ -1374,7 +1466,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function addProcessor(processor: Processor): number; @@ -1387,7 +1480,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function removeProcessor(id: number): void; } -- Gitee