1/* 2 * Copyright (c) 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 Defines the advertisement data model 18 * @kit AdsKit 19 */ 20 21/** 22 * Defines the advertisement data model. 23 * @typedef Advertisement 24 * @syscap SystemCapability.Advertising.Ads 25 * @since 11 26 */ 27/** 28 * Defines the advertisement data model. 29 * @typedef Advertisement 30 * @syscap SystemCapability.Advertising.Ads 31 * @atomicservice 32 * @since 12 33 */ 34export interface Advertisement { 35 /** 36 * The advertisement type. 37 * @type { number } 38 * @syscap SystemCapability.Advertising.Ads 39 * @since 11 40 */ 41 /** 42 * The advertisement type. 43 * @type { number } 44 * @syscap SystemCapability.Advertising.Ads 45 * @atomicservice 46 * @since 12 47 */ 48 adType: number; 49 50 /** 51 * The server verifies the configuration parameters. 52 * @type { Map<string, string> } 53 * @syscap SystemCapability.Advertising.Ads 54 * @since 11 55 */ 56 /** 57 * The server verifies the configuration parameters. 58 * @type { Map<string, string> } 59 * @syscap SystemCapability.Advertising.Ads 60 * @atomicservice 61 * @since 12 62 */ 63 rewardVerifyConfig: Map<string, string>; 64 65 /** 66 * The unique identifier of the advertisement. 67 * @type { string } 68 * @syscap SystemCapability.Advertising.Ads 69 * @since 11 70 */ 71 /** 72 * The unique identifier of the advertisement. 73 * @type { string } 74 * @syscap SystemCapability.Advertising.Ads 75 * @atomicservice 76 * @since 12 77 */ 78 uniqueId: string; 79 80 /** 81 * The subscriber has been rewarded. 82 * @type { boolean } 83 * @syscap SystemCapability.Advertising.Ads 84 * @since 11 85 */ 86 /** 87 * The subscriber has been rewarded. 88 * @type { boolean } 89 * @syscap SystemCapability.Advertising.Ads 90 * @atomicservice 91 * @since 12 92 */ 93 rewarded: boolean; 94 95 /** 96 * The advertisement has been shown. 97 * @type { boolean } 98 * @syscap SystemCapability.Advertising.Ads 99 * @since 11 100 */ 101 /** 102 * The advertisement has been shown. 103 * @type { boolean } 104 * @syscap SystemCapability.Advertising.Ads 105 * @atomicservice 106 * @since 12 107 */ 108 shown: boolean; 109 110 /** 111 * The advertisement has been clicked. 112 * @type { boolean } 113 * @syscap SystemCapability.Advertising.Ads 114 * @since 11 115 */ 116 /** 117 * The advertisement has been clicked. 118 * @type { boolean } 119 * @syscap SystemCapability.Advertising.Ads 120 * @atomicservice 121 * @since 12 122 */ 123 clicked: boolean; 124 125 /** 126 * The extended attributes of advertisement. 127 * @type { Object } 128 * @syscap SystemCapability.Advertising.Ads 129 * @since 11 130 */ 131 /** 132 * The extended attributes of advertisement. 133 * @type { Object } 134 * @syscap SystemCapability.Advertising.Ads 135 * @atomicservice 136 * @since 12 137 */ 138 [key:string]: Object; 139}