From e8e38b4f076e9a4a06a5d3257c47afba11ed579e Mon Sep 17 00:00:00 2001 From: deserttime Date: Sun, 18 Feb 2024 16:46:13 +0800 Subject: [PATCH] =?UTF-8?q?Description:=20=E5=B9=BF=E5=91=8AAPI=E6=89=93?= =?UTF-8?q?=E6=A0=87=E5=85=83=E6=9C=8D=E5=8A=A1=20Feature=20or=20Bugfix:?= =?UTF-8?q?=20feature=20Binary=20Source:=20NO=20Signed-off-by:=20xiangjian?= =?UTF-8?q?g=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.advertising.AdComponent.d.ets | 5 +++ api/@ohos.advertising.AutoAdComponent.d.ets | 6 ++++ api/@ohos.advertising.d.ts | 35 +++++++++++++++++++++ api/advertising/advertisement.d.ts | 8 +++++ 4 files changed, 54 insertions(+) diff --git a/api/@ohos.advertising.AdComponent.d.ets b/api/@ohos.advertising.AdComponent.d.ets index 3e68aeccd..d897360f8 100644 --- a/api/@ohos.advertising.AdComponent.d.ets +++ b/api/@ohos.advertising.AdComponent.d.ets @@ -23,6 +23,7 @@ import advertising from './@ohos.advertising'; /** * Defines the ad component. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ @Component @@ -31,6 +32,7 @@ declare struct AdComponent { * The ads to display. * @type { Advertisement[] } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ ads: advertising.Advertisement[]; @@ -39,6 +41,7 @@ declare struct AdComponent { * The interaction options info for displaying ads. * @type { AdDisplayOptions } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ displayOptions: advertising.AdDisplayOptions; @@ -47,6 +50,7 @@ declare struct AdComponent { * The interaction listener to be registered that use to show ads. * @type { AdInteractionListener } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ interactionListener: advertising.AdInteractionListener; @@ -54,6 +58,7 @@ declare struct AdComponent { /** * The method to build ad component. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ build(): void; diff --git a/api/@ohos.advertising.AutoAdComponent.d.ets b/api/@ohos.advertising.AutoAdComponent.d.ets index e74d2a294..c26fab9c2 100644 --- a/api/@ohos.advertising.AutoAdComponent.d.ets +++ b/api/@ohos.advertising.AutoAdComponent.d.ets @@ -23,6 +23,7 @@ import advertising from './@ohos.advertising'; /** * Defines the auto ad component. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ @Component @@ -31,6 +32,7 @@ declare struct AutoAdComponent { * The parameters in the request for loading ads. * @type { AdRequestParams } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adParam: advertising.AdRequestParams; @@ -39,6 +41,7 @@ declare struct AutoAdComponent { * The ad options of loading ads. * @type { AdOptions } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adOptions: advertising.AdOptions; @@ -47,6 +50,7 @@ declare struct AutoAdComponent { * The interaction options info for displaying ads. * @type { AdDisplayOptions } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ displayOptions: advertising.AdDisplayOptions; @@ -55,6 +59,7 @@ declare struct AutoAdComponent { * The interaction listener to be registered that use to show ads. * @type { AdInteractionListener } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ interactionListener: advertising.AdInteractionListener; @@ -62,6 +67,7 @@ declare struct AutoAdComponent { /** * The method to build auto ad component. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ build(): void; diff --git a/api/@ohos.advertising.d.ts b/api/@ohos.advertising.d.ts index 08829f24f..0937fe908 100644 --- a/api/@ohos.advertising.d.ts +++ b/api/@ohos.advertising.d.ts @@ -25,12 +25,14 @@ import type { Advertisement as _Advertisement } from './advertising/advertisemen * Provides the capability to load and display advertisements. * @namespace advertising * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ declare namespace advertising { /** * Indicates the advertisement data model. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export type Advertisement = _Advertisement; @@ -39,6 +41,7 @@ declare namespace advertising { * The parameters in the request for loading one or more advertisements. * @typedef AdRequestParams * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface AdRequestParams { @@ -46,6 +49,7 @@ declare namespace advertising { * The advertisement slot id. * @type { string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adId: string; @@ -54,6 +58,7 @@ declare namespace advertising { * The advertisement type of request. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adType?: number; @@ -62,6 +67,7 @@ declare namespace advertising { * The advertisement quantity of request. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adCount?: number; @@ -70,6 +76,7 @@ declare namespace advertising { * The advertisement view size width that expects. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adWidth?: number; @@ -78,6 +85,7 @@ declare namespace advertising { * The advertisement view size height that expects. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adHeight?: number; @@ -86,6 +94,7 @@ declare namespace advertising { * The advertisement search keyword. * @type { ?string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adSearchKeyword?: string; @@ -94,6 +103,7 @@ declare namespace advertising { * The extended attributes for request parameters. * @type { number | boolean | string | undefined } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ [key: string]: number | boolean | string | undefined; @@ -103,6 +113,7 @@ declare namespace advertising { * The ad options of loading ads. * @typedef AdOptions * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface AdOptions { @@ -110,6 +121,7 @@ declare namespace advertising { * The tags for children's content. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ tagForChildProtection?: number; @@ -118,6 +130,7 @@ declare namespace advertising { * Advertisement content classification setting. * @type { ?string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adContentClassification?: string; @@ -126,6 +139,7 @@ declare namespace advertising { * Non-personalized ad settings. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ nonPersonalizedAd?: number; @@ -134,6 +148,7 @@ declare namespace advertising { * The extended attributes for ad options. * @type { number | boolean | string | undefined } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ [key: string]: number | boolean | string | undefined; @@ -143,6 +158,7 @@ declare namespace advertising { * The interaction options info for displaying ad. * @typedef AdDisplayOptions * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface AdDisplayOptions { @@ -150,6 +166,7 @@ declare namespace advertising { * Ad custom data. * @type { ?string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ customData?: string; @@ -158,6 +175,7 @@ declare namespace advertising { * User id. * @type { ?string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ userId?: string; @@ -167,6 +185,7 @@ declare namespace advertising { * and application download in non-Wi-Fi scenarios. * @type { ?boolean } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ useMobileDataReminder?: boolean; @@ -175,6 +194,7 @@ declare namespace advertising { * Indicates whether to mute the playback of the ad video. * @type { ?boolean } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ mute?: boolean; @@ -183,6 +203,7 @@ declare namespace advertising { * The type of the scenario where the audio focus is obtained during video playback. * @type { ?number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ audioFocusType?: number; @@ -191,6 +212,7 @@ declare namespace advertising { * The extended attributes for interaction options. * @type { number | boolean | string | undefined } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ [key: string]: number | boolean | string | undefined; @@ -200,6 +222,7 @@ declare namespace advertising { * The listener of ad interaction. * @interface AdInteractionListener * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface AdInteractionListener { @@ -209,6 +232,7 @@ declare namespace advertising { * @param { Advertisement } ad - The ad which status is changed. * @param { string } data - The data of current ad status. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ onStatusChanged(status: string, ad: Advertisement, data: string); @@ -218,6 +242,7 @@ declare namespace advertising { * The listener of loading ad. * @interface AdLoadListener * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface AdLoadListener { @@ -226,6 +251,7 @@ declare namespace advertising { * @param { number } errorCode - code of ad loading failure. * @param { string } errorMsg - error message. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ onAdLoadFailure(errorCode: number, errorMsg: string): void; @@ -234,6 +260,7 @@ declare namespace advertising { * Called by system when the ad load has been succeeded. * @param { Array } ads - advertisements are loaded successfully. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ onAdLoadSuccess(ads: Array): void; @@ -243,6 +270,7 @@ declare namespace advertising { * The listener of loading multi-slots ad. * @interface MultiSlotsAdLoadListener * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface MultiSlotsAdLoadListener { @@ -251,6 +279,7 @@ declare namespace advertising { * @param { number } errorCode - code of ad loading failure. * @param { string } errorMsg - error message. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ onAdLoadFailure(errorCode: number, errorMsg: string): void; @@ -259,6 +288,7 @@ declare namespace advertising { * Called by system when the ad load has been succeeded. * @param { Map> } adsMap - advertisements are loaded successfully. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ onAdLoadSuccess(adsMap: Map>): void; @@ -273,6 +303,7 @@ declare namespace advertising { * @throws { BusinessError } 21800001 - System internal error. * @throws { BusinessError } 21800004 - Failed to display the ad. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ function showAd(ad: Advertisement, options: AdDisplayOptions, context?: common.UIAbilityContext): void; @@ -280,6 +311,7 @@ declare namespace advertising { /** * Provides the functions of loading ads. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export class AdLoader { @@ -287,6 +319,7 @@ declare namespace advertising { * Constructs a adLoader object, context should be transferred. * @param { common.Context } context - Indicates the context of the media application. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ constructor(context: common.Context); @@ -300,6 +333,7 @@ declare namespace advertising { * @throws { BusinessError } 21800001 - System internal error. * @throws { BusinessError } 21800003 - Failed to load the ad request. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ loadAd(adParam: AdRequestParams, adOptions: AdOptions, listener: AdLoadListener): void; @@ -313,6 +347,7 @@ declare namespace advertising { * @throws { BusinessError } 21800001 - System internal error. * @throws { BusinessError } 21800003 - Failed to load the ad request. * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ loadAdWithMultiSlots(adParams: AdRequestParams[], adOptions: AdOptions, listener: MultiSlotsAdLoadListener): void; diff --git a/api/advertising/advertisement.d.ts b/api/advertising/advertisement.d.ts index 3b40dce2a..c8ed7f484 100644 --- a/api/advertising/advertisement.d.ts +++ b/api/advertising/advertisement.d.ts @@ -17,6 +17,7 @@ * Defines the advertisement data model. * @typedef Advertisement * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ export interface Advertisement { @@ -24,6 +25,7 @@ export interface Advertisement { * The advertisement type. * @type { number } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ adType: number; @@ -32,6 +34,7 @@ export interface Advertisement { * The server verifies the configuration parameters. * @type { Map } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ rewardVerifyConfig: Map; @@ -40,6 +43,7 @@ export interface Advertisement { * The unique identifier of the advertisement. * @type { string } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ uniqueId: string; @@ -48,6 +52,7 @@ export interface Advertisement { * The subscriber has been rewarded. * @type { boolean } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ rewarded: boolean; @@ -56,6 +61,7 @@ export interface Advertisement { * The advertisement has been shown. * @type { boolean } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ shown: boolean; @@ -64,6 +70,7 @@ export interface Advertisement { * The advertisement has been clicked. * @type { boolean } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ clicked: boolean; @@ -72,6 +79,7 @@ export interface Advertisement { * The extended attributes of advertisement. * @type { Object } * @syscap SystemCapability.Advertising.Ads + * @atomicservice * @since 11 */ [key:string]: Object;