1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * the data of the commonEvent 18 * 19 * @typedef CommonEventData 20 * @syscap SystemCapability.Notification.CommonEvent 21 * @since 7 22 */ 23export interface CommonEventData { 24 /** 25 * event type 26 * 27 * @type { string } 28 * @syscap SystemCapability.Notification.CommonEvent 29 * @since 7 30 */ 31 event: string; 32 33 /** 34 * bundle name 35 * 36 * @type { ?string } 37 * @syscap SystemCapability.Notification.CommonEvent 38 * @since 7 39 */ 40 bundleName?: string; 41 42 /** 43 * The custom result code of the common event. 44 * 45 * @type { ?number } 46 * @default 0 47 * @syscap SystemCapability.Notification.CommonEvent 48 * @since 7 49 */ 50 code?: number; 51 52 /** 53 * The custom result data of the common event. 54 * 55 * @type { ?string } 56 * @syscap SystemCapability.Notification.CommonEvent 57 * @since 7 58 */ 59 data?: string; 60 61 /** 62 * The description of the parameters in a common event. 63 * 64 * @type { ?object } 65 * @syscap SystemCapability.Notification.CommonEvent 66 * @since 7 67 */ 68 parameters?: { [key: string]: any }; 69} 70