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 * Defines the advertisement data model. 18 * @typedef Advertisement 19 * @syscap SystemCapability.Advertising.Ads 20 * @since 11 21 */ 22export interface Advertisement { 23 /** 24 * The advertisement type. 25 * @type { number } 26 * @syscap SystemCapability.Advertising.Ads 27 * @since 11 28 */ 29 adType: number; 30 31 /** 32 * The server verifies the configuration parameters. 33 * @type { Map<string, string> } 34 * @syscap SystemCapability.Advertising.Ads 35 * @since 11 36 */ 37 rewardVerifyConfig: Map<string, string>; 38 39 /** 40 * The unique identifier of the advertisement. 41 * @type { string } 42 * @syscap SystemCapability.Advertising.Ads 43 * @since 11 44 */ 45 uniqueId: string; 46 47 /** 48 * The subscriber has been rewarded. 49 * @type { boolean } 50 * @syscap SystemCapability.Advertising.Ads 51 * @since 11 52 */ 53 rewarded: boolean; 54 55 /** 56 * The advertisement has been shown. 57 * @type { boolean } 58 * @syscap SystemCapability.Advertising.Ads 59 * @since 11 60 */ 61 shown: boolean; 62 63 /** 64 * The advertisement has been clicked. 65 * @type { boolean } 66 * @syscap SystemCapability.Advertising.Ads 67 * @since 11 68 */ 69 clicked: boolean; 70 71 /** 72 * The extended attributes of advertisement. 73 * @type { Object } 74 * @syscap SystemCapability.Advertising.Ads 75 * @since 11 76 */ 77 [key:string]: Object; 78}