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 NotificationActionButton module provides APIs for describing the button displayed in the notification. 18 * @kit NotificationKit 19 */ 20 21import { NotificationUserInput } from './notificationUserInput'; 22/*** if arkts 1.1 */ 23import { WantAgent } from '../@ohos.wantAgent'; 24/*** endif */ 25/*** if arkts 1.2 */ 26import { WantAgent } from '../@ohos.app.ability.wantAgent'; 27/*** endif */ 28 29/** 30 * The NotificationActionButton module provides APIs for describing the button displayed in the notification. 31 * 32 * @typedef NotificationActionButton 33 * @syscap SystemCapability.Notification.Notification 34 * @since arkts {'1.1':'7', '1.2':'20'} 35 * @arkts 1.1&1.2 36 */ 37export interface NotificationActionButton { 38 /** 39 * Button title. 40 * 41 * @type { string } 42 * @syscap SystemCapability.Notification.Notification 43 * @since arkts {'1.1':'7', '1.2':'20'} 44 * @arkts 1.1&1.2 45 */ 46 title: string; 47 48 /** 49 * WantAgent of the button. 50 * 51 * @type { WantAgent } 52 * @syscap SystemCapability.Notification.Notification 53 * @since arkts {'1.1':'7', '1.2':'20'} 54 * @arkts 1.1&1.2 55 */ 56 wantAgent: WantAgent; 57 58 /** 59 * Extra information of the button. 60 * 61 * @type { ?object } 62 * @syscap SystemCapability.Notification.Notification 63 * @since 7 64 */ 65 extras?: { [key: string]: any }; 66 67 /** 68 * Extra information of the button. 69 * 70 * @type { ?object } 71 * @syscap SystemCapability.Notification.Notification 72 * @since 20 73 * @arkts 1.2 74 */ 75 extras?: Record<string, Object>; 76 77 /** 78 * User input object. ID entered by a subscriber. 79 * 80 * @type { ?NotificationUserInput } 81 * @syscap SystemCapability.Notification.Notification 82 * @since arkts {'1.1':'8', '1.2':'20'} 83 * @arkts 1.1&1.2 84 */ 85 userInput?: NotificationUserInput; 86} 87