mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-08 07:36:38 +00:00
commit
b30a2ad11a
0
api/@ohos.account.distributedaccount.d.ts
vendored
Normal file → Executable file
0
api/@ohos.account.distributedaccount.d.ts
vendored
Normal file → Executable file
0
api/@ohos.bundle_mgr.d.ts
vendored
Normal file → Executable file
0
api/@ohos.bundle_mgr.d.ts
vendored
Normal file → Executable file
0
api/@ohos.commonevent.d.ts
vendored
Normal file → Executable file
0
api/@ohos.commonevent.d.ts
vendored
Normal file → Executable file
0
api/@ohos.feature_ability.d.ts
vendored
Normal file → Executable file
0
api/@ohos.feature_ability.d.ts
vendored
Normal file → Executable file
0
api/@ohos.intl.d.ts
vendored
Normal file → Executable file
0
api/@ohos.intl.d.ts
vendored
Normal file → Executable file
0
api/@ohos.multimedia.audio.d.ts
vendored
Normal file → Executable file
0
api/@ohos.multimedia.audio.d.ts
vendored
Normal file → Executable file
0
api/@ohos.multimedia.media.d.ts
vendored
Normal file → Executable file
0
api/@ohos.multimedia.media.d.ts
vendored
Normal file → Executable file
0
api/@ohos.napi_ability_manager.d.ts
vendored
Normal file → Executable file
0
api/@ohos.napi_ability_manager.d.ts
vendored
Normal file → Executable file
0
api/@ohos.systemTime.d.ts
vendored
Normal file → Executable file
0
api/@ohos.systemTime.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.call.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.call.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.data.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.data.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.observer.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.observer.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.radio.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.radio.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.sim.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.sim.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.sms.d.ts
vendored
Normal file → Executable file
0
api/@ohos.telephony.sms.d.ts
vendored
Normal file → Executable file
0
api/@ohos.wifi.d.ts
vendored
Normal file → Executable file
0
api/@ohos.wifi.d.ts
vendored
Normal file → Executable file
0
api/basic.d.ts
vendored
Normal file → Executable file
0
api/basic.d.ts
vendored
Normal file → Executable file
127
api/phone/@ohos.hiAppEvent.d.ts
vendored
Normal file
127
api/phone/@ohos.hiAppEvent.d.ts
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 2021 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.
|
||||
*/
|
||||
|
||||
import { AsyncCallback } from './basic';
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @since 7
|
||||
* @devices phone, tablet, tv, wearable
|
||||
*/
|
||||
declare namespace hiAppEvent {
|
||||
/**
|
||||
* Enumerate application event types.
|
||||
*/
|
||||
enum EventType {
|
||||
/**
|
||||
* Fault event.
|
||||
*/
|
||||
FAULT = 1,
|
||||
|
||||
/**
|
||||
* Statistic event.
|
||||
*/
|
||||
STATISTIC = 2,
|
||||
|
||||
/**
|
||||
* Security event.
|
||||
*/
|
||||
SECURITY = 3,
|
||||
|
||||
/**
|
||||
* User behavior event.
|
||||
*/
|
||||
BEHAVIOR = 4
|
||||
}
|
||||
|
||||
/**
|
||||
* Preset event.
|
||||
*/
|
||||
namespace Event {
|
||||
/**
|
||||
* user login event.
|
||||
*/
|
||||
const USER_LOGIN: string;
|
||||
|
||||
/**
|
||||
* user logout event.
|
||||
*/
|
||||
const USER_LOGOUT: string;
|
||||
|
||||
/**
|
||||
* distributed service event.
|
||||
*/
|
||||
const DISTRIBUTED_SERVICE_START: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preset param.
|
||||
*/
|
||||
namespace Param {
|
||||
/**
|
||||
* user id.
|
||||
*/
|
||||
const USER_ID: string;
|
||||
|
||||
/**
|
||||
* distributed service name.
|
||||
*/
|
||||
const DISTRIBUTED_SERVICE_NAME: string;
|
||||
|
||||
/**
|
||||
* distributed service instance id.
|
||||
*/
|
||||
const DISTRIBUTED_SERVICE_INSTANCE_ID: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* write application event.
|
||||
*
|
||||
* @static
|
||||
* @param {string} eventName application event name.
|
||||
* @param {EventType} eventType application event type.
|
||||
* @param {object} keyValues application event key-value pair params.
|
||||
* @param {AsyncCallback} [callback] callback function.
|
||||
* @return {void | Promise<void>} no callback return Promise otherwise return void.
|
||||
*/
|
||||
function write(eventName: string, eventType: EventType, keyValues: object): Promise<void>;
|
||||
function write(eventName: string, eventType: EventType, keyValues: object, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* application event logging configuration interface.
|
||||
*
|
||||
* @static
|
||||
* @param {ConfigOption} config application event logging configuration item object.
|
||||
* @return {boolean} configuration result.
|
||||
*/
|
||||
function configure(config: ConfigOption): boolean;
|
||||
|
||||
interface ConfigOption {
|
||||
/**
|
||||
* configuration item: application event logging switch.
|
||||
*/
|
||||
disable?: boolean;
|
||||
|
||||
/**
|
||||
* configuration item: event file directory storage quota size.
|
||||
*/
|
||||
maxStorage?: string;
|
||||
}
|
||||
}
|
||||
|
||||
export default hiAppEvent;
|
Loading…
Reference in New Issue
Block a user