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 * @file The data of the commonEvent 18 * @kit BasicServicesKit 19 */ 20 21/** 22 * the data of the commonEvent 23 * 24 * @typedef CommonEventData 25 * @syscap SystemCapability.Notification.CommonEvent 26 * @since 7 27 */ 28/** 29 * the data of the commonEvent 30 * 31 * @typedef CommonEventData 32 * @syscap SystemCapability.Notification.CommonEvent 33 * @crossplatform 34 * @atomicservice 35 * @since 11 36 */ 37export interface CommonEventData { 38 /** 39 * event type 40 * 41 * @type { string } 42 * @syscap SystemCapability.Notification.CommonEvent 43 * @since 7 44 */ 45 /** 46 * event type 47 * 48 * @type { string } 49 * @syscap SystemCapability.Notification.CommonEvent 50 * @crossplatform 51 * @atomicservice 52 * @since 11 53 */ 54 event: string; 55 56 /** 57 * bundle name 58 * 59 * @type { ?string } 60 * @syscap SystemCapability.Notification.CommonEvent 61 * @since 7 62 */ 63 /** 64 * bundle name 65 * 66 * @type { ?string } 67 * @syscap SystemCapability.Notification.CommonEvent 68 * @atomicservice 69 * @since 11 70 */ 71 bundleName?: string; 72 73 /** 74 * The custom result code of the common event. 75 * 76 * @type { ?number } 77 * @default 0 78 * @syscap SystemCapability.Notification.CommonEvent 79 * @since 7 80 */ 81 /** 82 * The custom result code of the common event. 83 * 84 * @type { ?number } 85 * @default 0 86 * @syscap SystemCapability.Notification.CommonEvent 87 * @atomicservice 88 * @since 11 89 */ 90 code?: number; 91 92 /** 93 * The custom result data of the common event. 94 * 95 * @type { ?string } 96 * @syscap SystemCapability.Notification.CommonEvent 97 * @since 7 98 */ 99 /** 100 * The custom result data of the common event. 101 * 102 * @type { ?string } 103 * @syscap SystemCapability.Notification.CommonEvent 104 * @atomicservice 105 * @since 11 106 */ 107 /** 108 * The custom result data of the common event. 109 * 110 * @type { ?string } 111 * @syscap SystemCapability.Notification.CommonEvent 112 * @crossplatform 113 * @atomicservice 114 * @since 12 115 */ 116 data?: string; 117 118 /** 119 * The description of the parameters in a common event. 120 * 121 * @type { ?object } 122 * @syscap SystemCapability.Notification.CommonEvent 123 * @since 7 124 */ 125 /** 126 * The description of the parameters in a common event. 127 * 128 * @type { ?object } 129 * @syscap SystemCapability.Notification.CommonEvent 130 * @atomicservice 131 * @since 11 132 */ 133 parameters?: { [key: string]: any }; 134} 135