• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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 * containing the common event content and attributes
18 * @name CommonEventPublishData
19 * @since 7
20 * @permission N/A
21 */
22export interface CommonEventPublishData {
23  /**
24   * bundle name
25   * @default -
26   * @since 7
27   */
28  bundleName?: string;
29
30  /**
31   * The custom result code of the common event.
32   *
33   * @default 0
34   * @since 7
35   */
36  code?: number;
37
38  /**
39   * The custom result data of the common event.
40   *
41   * @default ""
42   * @since 7
43   */
44  data?: string;
45
46  /**
47   * The permissions for subscribers. Only subscribers with required permissions can receive published common events.
48   *
49   * @default -
50   * @since 7
51   */
52  subscriberPermissions?: Array<string>;
53
54  /**
55   * Whether the type of a common event is ordered or not.
56   *
57   * @default false
58   * @since 7
59   */
60  isOrdered?: boolean;
61
62  /**
63   * Whether the type of a common event is sticky or not.
64   *
65   * @default false
66   * @since 7
67   */
68  isSticky?: boolean;
69
70  /**
71   * The description of the parameters in a common event.
72   *
73   * @default -
74   * @since 7
75   */
76  parameters?: {[key: string]: any};
77}