1/*
2 * Copyright (c) 2021-2024 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 Description of the notification channel
18 * @kit NotificationKit
19 */
20
21import notification from '../@ohos.notification';
22import type notificationManager from '../@ohos.notificationManager';
23
24/**
25 * Describes a NotificationSlot instance.
26 *
27 * @typedef NotificationSlot
28 * @syscap SystemCapability.Notification.Notification
29 * @since 7
30 */
31export interface NotificationSlot {
32  /**
33   * Obtains the type of a notification slot.
34   *
35   * @type { ?notification.SlotType }
36   * @syscap SystemCapability.Notification.Notification
37   * @since 7
38   * @deprecated since 11
39   * @useinstead NotificationSlot#notificationType
40   */
41  type?: notification.SlotType;
42
43  /**
44   * Notification slot type.
45   *
46   * @type { ?notificationManager.SlotType }
47   * @syscap SystemCapability.Notification.Notification
48   * @since 11
49   */
50  notificationType?: notificationManager.SlotType;
51
52  /**
53   * Obtains the level of a notification slot
54   *
55   * @type { ?notification.SlotLevel }
56   * @syscap SystemCapability.Notification.Notification
57   * @since 7
58   */
59  level?: notification.SlotLevel;
60
61  /**
62   * Obtains the description of a notification slot.
63   *
64   * @type { ?string }
65   * @syscap SystemCapability.Notification.Notification
66   * @since 7
67   */
68  desc?: string;
69
70  /**
71   * Obtains the application icon badge status of a notification slot.
72   *
73   * @type { ?boolean }
74   * @syscap SystemCapability.Notification.Notification
75   * @since 7
76   */
77  badgeFlag?: boolean;
78
79  /**
80   * Obtains whether DND mode is bypassed for a notification slot.
81   *
82   * @type { ?boolean }
83   * @syscap SystemCapability.Notification.Notification
84   * @since 7
85   */
86  bypassDnd?: boolean;
87
88  /**
89   * Whether and how to display notifications on the lock screen.
90   *
91   * @type { ?number }
92   * @syscap SystemCapability.Notification.Notification
93   * @since 7
94   */
95  lockscreenVisibility?: number;
96
97  /**
98   * Obtains the vibration status of the notification slot.
99   *
100   * @type { ?boolean }
101   * @syscap SystemCapability.Notification.Notification
102   * @since 7
103   */
104  vibrationEnabled?: boolean;
105
106  /**
107   * Obtains the prompt tone of the notification slot.
108   *
109   * @type { ?string }
110   * @syscap SystemCapability.Notification.Notification
111   * @since 7
112   */
113  sound?: string;
114
115  /**
116   * Obtains whether the notification light is enabled in a notification slot.
117   *
118   * @type { ?boolean }
119   * @syscap SystemCapability.Notification.Notification
120   * @since 7
121   */
122  lightEnabled?: boolean;
123
124  /**
125   * Obtains the color of the notification light in a notification slot.
126   *
127   * @type { ?number }
128   * @syscap SystemCapability.Notification.Notification
129   * @since 7
130   */
131  lightColor?: number;
132
133  /**
134   * Obtains the vibration style of notifications in this notification slot.
135   *
136   * @type { ?Array<number> }
137   * @syscap SystemCapability.Notification.Notification
138   * @since 7
139   */
140  vibrationValues?: Array<number>;
141
142  /**
143   * Read-only enabled status in this notification slot.
144   *
145   * @type { ?boolean }
146   * @syscap SystemCapability.Notification.Notification
147   * @since 9
148   */
149  readonly enabled?: boolean;
150
151  /**
152   * Obtains the notification reminder mode of the current notification entry.
153   *
154   * @type { ?number }
155   * @readonly
156   * @syscap SystemCapability.Notification.Notification
157   * @systemapi
158   * @since 11
159   */
160  readonly reminderMode?: number;
161
162  /**
163   * Obtains channel information is authorized by the user.
164   *
165   * @type { ?number }
166   * @readonly
167   * @syscap SystemCapability.Notification.Notification
168   * @systemapi
169   * @since 12
170   */
171  readonly authorizedStatus?: number;
172}
173