@singcl/ad-execute-manager 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +558 -631
- package/dist/ad/dist/index.d.cts +1 -0
- package/dist/ad/dist/index.d.ts +229 -0
- package/dist/ad/{InterstitialAdFather.d.ts → src/InterstitialAdFather.d.ts} +5 -5
- package/dist/ad/{InterstitialAdNovel.d.ts → src/InterstitialAdNovel.d.ts} +8 -8
- package/dist/ad/{RewardAdFather.d.ts → src/RewardAdFather.d.ts} +6 -6
- package/dist/ad/{RewardAdNovel.d.ts → src/RewardAdNovel.d.ts} +65 -36
- package/dist/ad/src/index.d.ts +5 -0
- package/dist/{typings → ad/src/typings}/ad.d.ts +0 -4
- package/dist/analytics/dist/index.d.cts +1 -0
- package/dist/analytics/dist/index.d.ts +23 -0
- package/dist/analytics/{AdAnalyticsJS.d.ts → src/AdAnalyticsJS.d.ts} +1 -1
- package/dist/analytics/src/index.d.ts +1 -0
- package/dist/core/dist/index.d.cts +1 -0
- package/dist/core/dist/index.d.ts +41 -0
- package/dist/core/{AdExecuteManager.d.ts → src/AdExecuteManager.d.ts} +27 -10
- package/dist/core/src/index.d.ts +1 -0
- package/dist/core/src/typings/ad.d.ts +208 -0
- package/dist/core/typings/ad.d.ts +208 -0
- package/dist/helper/dist/index.d.cts +1 -0
- package/dist/helper/dist/index.d.ts +96 -0
- package/dist/helper/{PubSub.d.ts → src/PubSub.d.ts} +1 -1
- package/dist/helper/src/index.d.ts +6 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +13 -13
- package/dist/index.js +2 -2
- package/dist/tools/dist/index.d.cts +1 -0
- package/dist/tools/dist/index.d.ts +69 -0
- package/dist/{other → tools/src}/RewardAdGlobalRecorder.d.ts +2 -2
- package/dist/{other → tools/src}/RewardAdSceneTriggerManager.d.ts +11 -11
- package/dist/tools/src/const.d.ts +3 -0
- package/dist/tools/src/index.d.ts +3 -0
- package/dist/tools/src/typings/ad.d.ts +208 -0
- package/dist/tools/src/typings/common.d.ts +14 -0
- package/dist/tools/src/typings/create-interstitial-ad.d.ts +42 -0
- package/dist/tools/src/typings/create-rewarded-video-ad.d.ts +42 -0
- package/dist/tools/src/typings/tracker.d.ts +1 -0
- package/package.json +6 -2
- /package/dist/{const → ad/src/const}/const.d.ts +0 -0
- /package/dist/{typings → ad/src/typings}/common.d.ts +0 -0
- /package/dist/{typings → ad/src/typings}/create-interstitial-ad.d.ts +0 -0
- /package/dist/{typings → ad/src/typings}/create-rewarded-video-ad.d.ts +0 -0
- /package/dist/{typings → ad/src/typings}/tracker.d.ts +0 -0
- /package/dist/{utils → ad/src/utils}/functional.d.ts +0 -0
- /package/dist/core/{_util.d.ts → src/_util.d.ts} +0 -0
- /package/dist/core/{compose.d.ts → src/compose.d.ts} +0 -0
- /package/dist/helper/{CountRecorder.d.ts → src/CountRecorder.d.ts} +0 -0
- /package/dist/helper/{EventEmitter.d.ts → src/EventEmitter.d.ts} +0 -0
- /package/dist/helper/{Logger.d.ts → src/Logger.d.ts} +0 -0
- /package/dist/helper/{SerializableError.d.ts → src/SerializableError.d.ts} +0 -0
- /package/dist/helper/{Storage.d.ts → src/Storage.d.ts} +0 -0
- /package/dist/{other → tools/src}/LovelUnlockManager.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { AdExecuteManager as e } from "@ad-execute-manager/core";
|
|
2
|
+
declare let r: typeof l;
|
|
3
|
+
declare let A: typeof c;
|
|
4
|
+
declare let n: typeof s;
|
|
5
|
+
declare let _: typeof h;
|
|
6
|
+
declare class l {
|
|
7
|
+
static args: any;
|
|
8
|
+
static buildArgs(e: any): void;
|
|
9
|
+
static executeWithManager(t: any, r: any): Promise<any>;
|
|
10
|
+
constructor(e: any);
|
|
11
|
+
_logger: any;
|
|
12
|
+
_initSign: string;
|
|
13
|
+
_preserveOnEnd: boolean;
|
|
14
|
+
_interstitialAd: any;
|
|
15
|
+
__ad__: any;
|
|
16
|
+
_ttErrorMsgs: string[];
|
|
17
|
+
_ttErrorCodes: number[];
|
|
18
|
+
_adConfig: any;
|
|
19
|
+
initialize(e: any, i: any): this;
|
|
20
|
+
initialized(): boolean;
|
|
21
|
+
ad(e: any, i?: any): Promise<void>;
|
|
22
|
+
addExecuteManager(e: any): Promise<any>;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
clear(): void;
|
|
25
|
+
record(e: any): this;
|
|
26
|
+
onClose(e: any): void;
|
|
27
|
+
offClose(e: any): void;
|
|
28
|
+
show(): any;
|
|
29
|
+
load(): any;
|
|
30
|
+
onError(e: any): void;
|
|
31
|
+
offError(e: any): void;
|
|
32
|
+
onLoad(e: any): void;
|
|
33
|
+
offLoad(e: any): void;
|
|
34
|
+
placeholder(): any;
|
|
35
|
+
}
|
|
36
|
+
declare class c extends l {
|
|
37
|
+
static build(e: any): any;
|
|
38
|
+
static getInstance(): any;
|
|
39
|
+
static "new"(e: any): c;
|
|
40
|
+
_onHalfway: any;
|
|
41
|
+
_onShow: any;
|
|
42
|
+
_onFinish: any;
|
|
43
|
+
_onAlways: any;
|
|
44
|
+
_onError: any;
|
|
45
|
+
_alwaysCallback: any;
|
|
46
|
+
_halfwayCallback: any;
|
|
47
|
+
_finishedCallback: any;
|
|
48
|
+
_resolve: any;
|
|
49
|
+
_next: any;
|
|
50
|
+
_scene: any;
|
|
51
|
+
_adTypeR: number;
|
|
52
|
+
_adTimeout: any;
|
|
53
|
+
_adTimeoutTime: number;
|
|
54
|
+
_adBeforeShowTimer: any;
|
|
55
|
+
_adBeforeShowTime: number;
|
|
56
|
+
_adSpeedCloseTimer: any;
|
|
57
|
+
_adSpeedCloseTime: number;
|
|
58
|
+
_needEndOnTimeout: boolean;
|
|
59
|
+
_needSpeedEndOnTimeout: boolean;
|
|
60
|
+
bindAdCloseLister: any;
|
|
61
|
+
bindAdErrorLister: any;
|
|
62
|
+
bindAdLoadLister: any;
|
|
63
|
+
bindApiAdErrorLister: any;
|
|
64
|
+
_bindShiftCloseLister: any;
|
|
65
|
+
_bindShiftErrorLister: any;
|
|
66
|
+
initialize(e: any, i: any): this;
|
|
67
|
+
_initAdLister(): void;
|
|
68
|
+
_initNovelConfig(e: any): void;
|
|
69
|
+
novelConfig: f;
|
|
70
|
+
_onInnerExecuteBefore(): any;
|
|
71
|
+
_onInnerAdShowSuccess(): any;
|
|
72
|
+
_setAdTimeout(e: any): void;
|
|
73
|
+
_adPreludeInterval(e: any): void;
|
|
74
|
+
_clearAdTimeout(): void;
|
|
75
|
+
_adShowBeforeAnalytics(e: any): any;
|
|
76
|
+
_adShowSuccessAnalytics(e: any): any;
|
|
77
|
+
_adShowFailureAnalytics(e: any): any;
|
|
78
|
+
_adLoadSuccessAnalytics(e: any): any;
|
|
79
|
+
_adLoadFailureAnalytics(e: any): any;
|
|
80
|
+
_adCloseSuccessAnalytics(e: any): any;
|
|
81
|
+
get rewardAd(): any;
|
|
82
|
+
ad(e: any, i?: any): Promise<any>;
|
|
83
|
+
_adInner(e: any, i?: any): void;
|
|
84
|
+
_before: any;
|
|
85
|
+
_success: any;
|
|
86
|
+
adLoad(): any;
|
|
87
|
+
adShow(): any;
|
|
88
|
+
_outerCloseCallback(e: any): void;
|
|
89
|
+
_outerHalfwayCallback(e: any): void;
|
|
90
|
+
_outerFinishedCallback(e: any): void;
|
|
91
|
+
adCloseLister(): void;
|
|
92
|
+
adErrorLister(e: any): void;
|
|
93
|
+
apiAdErrorLister(e: any): void;
|
|
94
|
+
adLoadLister(e: any): void;
|
|
95
|
+
adDestroy(): void;
|
|
96
|
+
_shiftCloseLister(e: any): void;
|
|
97
|
+
_shiftErrorLister(e: any): void;
|
|
98
|
+
shift(): void;
|
|
99
|
+
}
|
|
100
|
+
declare class s {
|
|
101
|
+
static args: any;
|
|
102
|
+
static buildArgs(e: any): void;
|
|
103
|
+
static executeWithManager(t: any, l: any): Promise<any>;
|
|
104
|
+
constructor(e: any);
|
|
105
|
+
_logger: any;
|
|
106
|
+
_adTimeoutTime: number;
|
|
107
|
+
_initSign: string;
|
|
108
|
+
_preserveOnEnd: boolean;
|
|
109
|
+
_rewardAd: any;
|
|
110
|
+
__ad__: any;
|
|
111
|
+
_ttErrorMsgs: string[];
|
|
112
|
+
_ttErrorCodes: number[];
|
|
113
|
+
__bindAdErrorForeverHandler: any;
|
|
114
|
+
_adConfig: any;
|
|
115
|
+
initialize(e: any, i: any): this;
|
|
116
|
+
initialized(): boolean;
|
|
117
|
+
__adErrorForeverHandler(e: any): void;
|
|
118
|
+
adErrorForeverHandler(e: any): any;
|
|
119
|
+
ad(e: any, i?: any): Promise<void>;
|
|
120
|
+
addExecuteManager(e: any): Promise<any>;
|
|
121
|
+
destroy(): void;
|
|
122
|
+
clear(): void;
|
|
123
|
+
record(e: any): this;
|
|
124
|
+
onClose(e: any): void;
|
|
125
|
+
offClose(e: any): void;
|
|
126
|
+
show(): any;
|
|
127
|
+
load(): any;
|
|
128
|
+
onError(e: any): void;
|
|
129
|
+
offError(e: any): void;
|
|
130
|
+
onLoad(e: any): void;
|
|
131
|
+
offLoad(e: any): void;
|
|
132
|
+
placeholder(): any;
|
|
133
|
+
}
|
|
134
|
+
declare class h extends s {
|
|
135
|
+
static build(e: any): any;
|
|
136
|
+
static getInstance(): any;
|
|
137
|
+
static "new"(e: any): h;
|
|
138
|
+
_onHalfway: any;
|
|
139
|
+
_onShow: any;
|
|
140
|
+
_onFinish: any;
|
|
141
|
+
_onAlways: any;
|
|
142
|
+
_onError: any;
|
|
143
|
+
_alwaysCallback: any;
|
|
144
|
+
_halfwayCallback: any;
|
|
145
|
+
_finishedCallback: any;
|
|
146
|
+
_resolve: any;
|
|
147
|
+
_next: any;
|
|
148
|
+
_scene: any;
|
|
149
|
+
_adTypeR: number;
|
|
150
|
+
_adTimeout: any;
|
|
151
|
+
_adBeforeShowTimer: any;
|
|
152
|
+
_adBeforeShowTime: number;
|
|
153
|
+
_adSpeedCloseTimer: any;
|
|
154
|
+
_adSpeedCloseTime: number;
|
|
155
|
+
_needEndOnTimeout: boolean;
|
|
156
|
+
_needSpeedEndOnTimeout: boolean;
|
|
157
|
+
bindAdCloseLister: any;
|
|
158
|
+
bindAdErrorLister: any;
|
|
159
|
+
bindAdLoadLister: any;
|
|
160
|
+
bindApiAdErrorLister: any;
|
|
161
|
+
_bindShiftCloseLister: any;
|
|
162
|
+
_bindShiftErrorLister: any;
|
|
163
|
+
initialize(e: any, i: any): this;
|
|
164
|
+
_initAdLister(): void;
|
|
165
|
+
_initNovelConfig(e: any): void;
|
|
166
|
+
novelConfig: u;
|
|
167
|
+
_onInnerExecuteBefore(): any;
|
|
168
|
+
_onInnerAdShowSuccess(e: any): any;
|
|
169
|
+
_setAdTimeout(e: any): void;
|
|
170
|
+
_adTimeoutBeforeEnd(e: any): any;
|
|
171
|
+
_adPreludeInterval(e: any): void;
|
|
172
|
+
_clearAdTimeout(): void;
|
|
173
|
+
_adShowBeforeAnalytics(e: any): any;
|
|
174
|
+
_adShowSuccessAnalytics(e: any): any;
|
|
175
|
+
_adShowFailureAnalytics(e: any): any;
|
|
176
|
+
_adLoadSuccessAnalytics(e: any): any;
|
|
177
|
+
_adLoadFailureAnalytics(e: any): any;
|
|
178
|
+
_adCloseSuccessAnalytics(e: any): any;
|
|
179
|
+
get rewardAd(): any;
|
|
180
|
+
ad(e: any, i?: any): Promise<any>;
|
|
181
|
+
_recovered: any;
|
|
182
|
+
_adInner(e: any, i?: any): void;
|
|
183
|
+
_before: any;
|
|
184
|
+
_success: any;
|
|
185
|
+
adLoad(): any;
|
|
186
|
+
adShow(): any;
|
|
187
|
+
_outerCloseCallback(e: any): void;
|
|
188
|
+
_outerHalfwayCallback(e: any): void;
|
|
189
|
+
_outerFinishedCallback(e: any): void;
|
|
190
|
+
__adCloseLister__(e: any): void;
|
|
191
|
+
adCloseLister(e: any, i: any): void;
|
|
192
|
+
__adErrorLister__(e: any): void;
|
|
193
|
+
adErrorLister(e: any): any;
|
|
194
|
+
__apiAdErrorLister__(e: any): void;
|
|
195
|
+
apiAdErrorLister(e: any): any;
|
|
196
|
+
__adLoadLister__(e: any): void;
|
|
197
|
+
adLoadLister(e: any): any;
|
|
198
|
+
adDestroy(): void;
|
|
199
|
+
_shiftCloseLister(e: any): void;
|
|
200
|
+
_shiftErrorLister(e: any): void;
|
|
201
|
+
shift(): void;
|
|
202
|
+
}
|
|
203
|
+
declare class f {
|
|
204
|
+
static "new"(e: any): f;
|
|
205
|
+
constructor(e: any);
|
|
206
|
+
frequency: {
|
|
207
|
+
total: number;
|
|
208
|
+
current: number;
|
|
209
|
+
};
|
|
210
|
+
_init(e: any): void;
|
|
211
|
+
_adTimes(e: any): void;
|
|
212
|
+
reset(): void;
|
|
213
|
+
updateRetry(): void;
|
|
214
|
+
remain(): number;
|
|
215
|
+
}
|
|
216
|
+
declare class u {
|
|
217
|
+
static "new"(e: any): u;
|
|
218
|
+
constructor(e: any);
|
|
219
|
+
frequency: {
|
|
220
|
+
total: number;
|
|
221
|
+
current: number;
|
|
222
|
+
};
|
|
223
|
+
_init(e: any): void;
|
|
224
|
+
_adTimes(e: any): void;
|
|
225
|
+
reset(): void;
|
|
226
|
+
updateRetry(): void;
|
|
227
|
+
remain(): number;
|
|
228
|
+
}
|
|
229
|
+
export { e as AdExecuteManager, r as InterstitialAdFather, A as InterstitialAdNovel, n as RewardAdFather, _ as RewardAdNovel };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default InterstitialAdFather;
|
|
2
|
-
export type IRewordAdConfig = import("
|
|
3
|
-
export type CallbackCollection = import("
|
|
4
|
-
export type IConstructArgs = import("
|
|
2
|
+
export type IRewordAdConfig = import("./typings/ad.js").IRewordAdConfig;
|
|
3
|
+
export type CallbackCollection = import("./typings/ad.js").CallbackCollection;
|
|
4
|
+
export type IConstructArgs = import("./typings/ad.js").IConstructArgs;
|
|
5
5
|
/**
|
|
6
6
|
* 激励视频实例
|
|
7
7
|
*/
|
|
8
|
-
export type InterstitialAd = import("
|
|
8
|
+
export type InterstitialAd = import("./typings/create-interstitial-ad.js").InterstitialAd;
|
|
9
9
|
export type IRewardedVideoAd = {
|
|
10
10
|
/**
|
|
11
11
|
* 显示激励视频广告
|
|
@@ -160,4 +160,4 @@ declare class InterstitialAdFather {
|
|
|
160
160
|
*/
|
|
161
161
|
placeholder(): any;
|
|
162
162
|
}
|
|
163
|
-
import { Logger } from '
|
|
163
|
+
import { Logger } from '@ad-execute-manager/helper';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default InterstitialAdNovel;
|
|
2
|
-
export type IRewordAdConfig = import("
|
|
2
|
+
export type IRewordAdConfig = import("./typings/ad.js").IRewordAdConfig;
|
|
3
3
|
export type ICallbackArgs = {
|
|
4
4
|
/**
|
|
5
5
|
* 广告执行场景
|
|
@@ -104,7 +104,7 @@ export type IRewardedVideoAd = {
|
|
|
104
104
|
show: () => Promise<void>;
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
107
|
-
* @typedef {import('
|
|
107
|
+
* @typedef {import('./typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
108
108
|
*/
|
|
109
109
|
/**
|
|
110
110
|
* @typedef ICallbackArgs
|
|
@@ -331,26 +331,26 @@ declare class InterstitialAdNovel extends InterstitialAdFather {
|
|
|
331
331
|
* @override
|
|
332
332
|
* @param {Object} [ctx] 上下文对象,用于传递数据和状态
|
|
333
333
|
* @param {IRewordAdConfig} [ctx.options] 广告执行选项
|
|
334
|
-
* @param {import('
|
|
334
|
+
* @param {import('./typings/ad.js').CallbackCollection} [ctx.collection] 回调集合
|
|
335
335
|
* @returns {Promise.<IEndArgs & ICloseArgs | Undefined>}
|
|
336
336
|
*/
|
|
337
337
|
override addExecuteManager(ctx?: {
|
|
338
338
|
options?: IRewordAdConfig;
|
|
339
|
-
collection?: import("
|
|
339
|
+
collection?: import("./typings/ad.js").CallbackCollection;
|
|
340
340
|
}): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
341
341
|
/**
|
|
342
342
|
* ATTENTION: 应用一旦进入后台,90%概率.show() 方法的.then() 回调将不会被执行, .catch() 回调也不会被执行。
|
|
343
343
|
* 此时将进入超时处理逻辑
|
|
344
344
|
* @override
|
|
345
345
|
* @param {object} [ctx] 广告执行上下文
|
|
346
|
-
* @param {import('
|
|
347
|
-
* @param {import('
|
|
346
|
+
* @param {import('./typings/ad.js').IRewordAdConfig} [ctx.options] 广告执行选项
|
|
347
|
+
* @param {import('./typings/ad.js').CallbackCollection} [ctx.collection] 回调集合
|
|
348
348
|
* @param {Function} next 执行下一个任务的回调函数,手动调用以继续执行流程
|
|
349
349
|
* @returns {Promise.<IEndArgs & ICloseArgs | Undefined>}
|
|
350
350
|
*/
|
|
351
351
|
override ad(ctx?: {
|
|
352
|
-
options?: import("
|
|
353
|
-
collection?: import("
|
|
352
|
+
options?: import("./typings/ad.js").IRewordAdConfig;
|
|
353
|
+
collection?: import("./typings/ad.js").CallbackCollection;
|
|
354
354
|
}, next?: Function): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
355
355
|
/**
|
|
356
356
|
* ATTENTION: 应用一旦进入后台,90%概率.show() 方法的.then() 回调将不会被执行, .catch() 回调也不会被执行。
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default RewardAdFather;
|
|
2
|
-
export type IRewordAdConfig = import("
|
|
3
|
-
export type CallbackCollection = import("
|
|
4
|
-
export type RecoveredInfo = import("
|
|
5
|
-
export type IConstructArgs = import("
|
|
6
|
-
export type RewardedVideoAd = import("
|
|
2
|
+
export type IRewordAdConfig = import("./typings/ad.js").IRewordAdConfig;
|
|
3
|
+
export type CallbackCollection = import("./typings/ad.js").CallbackCollection;
|
|
4
|
+
export type RecoveredInfo = import("./typings/ad.js").RecoveredInfo;
|
|
5
|
+
export type IConstructArgs = import("./typings/ad.js").IConstructArgs;
|
|
6
|
+
export type RewardedVideoAd = import("./typings/create-rewarded-video-ad.js").RewardedVideoAd;
|
|
7
7
|
export type IRewardedVideoAd = {
|
|
8
8
|
/**
|
|
9
9
|
* 显示激励视频广告
|
|
@@ -178,4 +178,4 @@ declare class RewardAdFather {
|
|
|
178
178
|
*/
|
|
179
179
|
placeholder(): any;
|
|
180
180
|
}
|
|
181
|
-
import { Logger } from '
|
|
181
|
+
import { Logger } from '@ad-execute-manager/helper';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default RewardAdNovel;
|
|
2
|
-
export type IRewordAdConfig =
|
|
2
|
+
export type IRewordAdConfig = any;
|
|
3
3
|
export type ICallbackArgs = {
|
|
4
4
|
/**
|
|
5
5
|
* 广告执行场景
|
|
@@ -64,10 +64,6 @@ export type IConstructArgs = {
|
|
|
64
64
|
* 是否需要在超时情况下结束广告
|
|
65
65
|
*/
|
|
66
66
|
needEndOnTimeout?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* 关闭广告时候是否需要主动结束任务
|
|
69
|
-
*/
|
|
70
|
-
proactive?: boolean;
|
|
71
67
|
/**
|
|
72
68
|
* 激励视频参数 (可选)
|
|
73
69
|
*/
|
|
@@ -137,7 +133,6 @@ export type IRewardedVideoAd = {
|
|
|
137
133
|
* @property {boolean} [log] 是否开启日志
|
|
138
134
|
* @property {boolean} [preserveOnEnd] 是否保留tt激励视频广告实例
|
|
139
135
|
* @property {boolean} [needEndOnTimeout] 是否需要在超时情况下结束广告
|
|
140
|
-
* @property {boolean} [proactive] 关闭广告时候是否需要主动结束任务
|
|
141
136
|
* @property {IRewordAdConfig=} [adConfig] 激励视频参数 (可选)
|
|
142
137
|
* @property {IConnection=} [collection] 回调集合
|
|
143
138
|
*/
|
|
@@ -202,16 +197,13 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
202
197
|
_needEndOnTimeout: boolean;
|
|
203
198
|
/** @deprecated TODO 移除 */
|
|
204
199
|
_needSpeedEndOnTimeout: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* @description 关闭广告时候是否需要主动结束任务
|
|
207
|
-
*/
|
|
208
|
-
_proactive: boolean;
|
|
209
200
|
bindAdCloseLister: any;
|
|
210
201
|
bindAdErrorLister: any;
|
|
211
202
|
bindAdLoadLister: any;
|
|
212
203
|
bindApiAdErrorLister: any;
|
|
213
204
|
_bindShiftCloseLister: any;
|
|
214
205
|
_bindShiftErrorLister: any;
|
|
206
|
+
_adConfig: any;
|
|
215
207
|
/**
|
|
216
208
|
* 初始化
|
|
217
209
|
* 子类可以选择覆盖此方法,或使用默认实现
|
|
@@ -240,7 +232,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
240
232
|
_onInnerAdShowSuccess(_args: {
|
|
241
233
|
scene: string;
|
|
242
234
|
result?: number;
|
|
243
|
-
recovered?:
|
|
235
|
+
recovered?: any;
|
|
244
236
|
}): any;
|
|
245
237
|
/**
|
|
246
238
|
* 广告展示超时设置
|
|
@@ -305,7 +297,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
305
297
|
scene: string;
|
|
306
298
|
msg?: string;
|
|
307
299
|
result: 0 | 1;
|
|
308
|
-
recovered?:
|
|
300
|
+
recovered?: any;
|
|
309
301
|
}): any;
|
|
310
302
|
/**
|
|
311
303
|
* 广告展示失败分析
|
|
@@ -376,7 +368,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
376
368
|
ad_is_completed: number;
|
|
377
369
|
ad_count: number;
|
|
378
370
|
}): any;
|
|
379
|
-
get rewardAd(): import("
|
|
371
|
+
get rewardAd(): import("./typings/create-rewarded-video-ad.js").RewardedVideoAd;
|
|
380
372
|
/**
|
|
381
373
|
* 确保广告按顺序执行
|
|
382
374
|
* @override
|
|
@@ -387,7 +379,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
387
379
|
*/
|
|
388
380
|
override addExecuteManager(ctx?: {
|
|
389
381
|
options?: IRewordAdConfig;
|
|
390
|
-
collection?:
|
|
382
|
+
collection?: any;
|
|
391
383
|
}): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
392
384
|
/**
|
|
393
385
|
* @override
|
|
@@ -399,11 +391,11 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
399
391
|
* @returns {Promise.<IEndArgs & ICloseArgs | Undefined>}
|
|
400
392
|
*/
|
|
401
393
|
override ad(ctx?: {
|
|
402
|
-
options?:
|
|
403
|
-
collection?:
|
|
404
|
-
recovered?:
|
|
394
|
+
options?: any;
|
|
395
|
+
collection?: any;
|
|
396
|
+
recovered?: any;
|
|
405
397
|
}, next?: Function): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
406
|
-
_recovered:
|
|
398
|
+
_recovered: any;
|
|
407
399
|
/**
|
|
408
400
|
* @param {object} [ctx] 广告执行上下文
|
|
409
401
|
* @param {object} [ctx.options] 广告执行选项
|
|
@@ -424,7 +416,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
424
416
|
timeout?: number;
|
|
425
417
|
};
|
|
426
418
|
collection: object;
|
|
427
|
-
recovered?:
|
|
419
|
+
recovered?: any;
|
|
428
420
|
}, next?: Function): void;
|
|
429
421
|
_before: any;
|
|
430
422
|
_success: any;
|
|
@@ -442,33 +434,70 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
442
434
|
_outerHalfwayCallback(args: any): void;
|
|
443
435
|
_outerFinishedCallback(args: any): void;
|
|
444
436
|
/**
|
|
445
|
-
*
|
|
437
|
+
* 内部关闭激励视频
|
|
438
|
+
* @private
|
|
446
439
|
* @param {ICloseArgs} args
|
|
447
440
|
*/
|
|
448
|
-
__adCloseLister__
|
|
441
|
+
private __adCloseLister__;
|
|
449
442
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
443
|
+
* 关闭激励视频
|
|
444
|
+
* 子类可重写该方法
|
|
445
|
+
* @protected
|
|
453
446
|
* @param {object} args
|
|
454
|
-
* @param {
|
|
455
|
-
* @param {
|
|
447
|
+
* @param {boolean} args.isEnded 广告是否完成
|
|
448
|
+
* @param {number} args.count 广告执行次数
|
|
449
|
+
* @param {string} args.scene 广告执行场景
|
|
450
|
+
* @param {number} args.adTypeR 广告类型
|
|
451
|
+
* @param {string} args.end_type 广告关闭类型
|
|
452
|
+
* @param {object} [connection] 广告关闭回调集合
|
|
453
|
+
* @param {(ctx: object) => void} [connection.conn] 调用外部传入的回调
|
|
454
|
+
* @param {(ctx: object) => void} [connection.end] 结束任务的回调
|
|
455
|
+
*
|
|
456
456
|
*/
|
|
457
|
-
adCloseLister(args: {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
457
|
+
protected adCloseLister(args: {
|
|
458
|
+
isEnded: boolean;
|
|
459
|
+
count: number;
|
|
460
|
+
scene: string;
|
|
461
|
+
adTypeR: number;
|
|
462
|
+
end_type: string;
|
|
463
|
+
}, connection?: {
|
|
464
|
+
conn?: (ctx: object) => void;
|
|
465
|
+
end?: (ctx: object) => void;
|
|
466
|
+
}): void;
|
|
467
|
+
/**
|
|
468
|
+
* 激励视频广告组件**失败**时会触发
|
|
469
|
+
* @private
|
|
470
|
+
*/
|
|
471
|
+
private __adErrorLister__;
|
|
466
472
|
/**
|
|
473
|
+
* 激励视频广告组件**失败**时会触发
|
|
474
|
+
* @protected
|
|
475
|
+
*/
|
|
476
|
+
protected adErrorLister(e: any): any;
|
|
477
|
+
/**
|
|
478
|
+
* 激励视频广告组件api**失败**时会触发
|
|
479
|
+
* @private
|
|
480
|
+
*/
|
|
481
|
+
private __apiAdErrorLister__;
|
|
482
|
+
/**
|
|
483
|
+
* 激励视频广告组件api**失败**时会触发
|
|
484
|
+
* @protected
|
|
485
|
+
*/
|
|
486
|
+
protected apiAdErrorLister(e: any): any;
|
|
487
|
+
/**
|
|
488
|
+
* @private
|
|
489
|
+
* 激励视频广告组件**成功**拉取广告素材时会触发
|
|
490
|
+
* 创建激励时候后会自动拉取广告素材,如果广告拉取成功,也会触发此事件,不管是否调用show方法
|
|
491
|
+
* @param {unknown} e
|
|
492
|
+
*/
|
|
493
|
+
private __adLoadLister__;
|
|
494
|
+
/**
|
|
495
|
+
* @protected
|
|
467
496
|
* 激励视频广告组件**成功**拉取广告素材时会触发
|
|
468
497
|
* 创建激励时候后会自动拉取广告素材,如果广告拉取成功,也会触发此事件,不管是否调用show方法
|
|
469
498
|
* @param {unknown} e
|
|
470
499
|
*/
|
|
471
|
-
adLoadLister(e: unknown):
|
|
500
|
+
protected adLoadLister(e: unknown): unknown;
|
|
472
501
|
adDestroy(): void;
|
|
473
502
|
_shiftCloseLister(args: any): void;
|
|
474
503
|
_shiftErrorLister(args: any): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AdExecuteManager } from "@ad-execute-manager/core";
|
|
2
|
+
export { default as InterstitialAdFather } from "./InterstitialAdFather";
|
|
3
|
+
export { default as RewardAdFather } from "./RewardAdFather";
|
|
4
|
+
export { default as RewardAdNovel } from "./RewardAdNovel";
|
|
5
|
+
export { default as InterstitialAdNovel } from "./InterstitialAdNovel";
|
|
@@ -38,10 +38,6 @@ export type IRewordAdConfig = {
|
|
|
38
38
|
* 是否绑定永远的错误事件 - 自用参数,非tt API要求的参数
|
|
39
39
|
*/
|
|
40
40
|
foreverErrorBind?: boolean | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* 关闭广告时候是否需要主动结束任务 - 自用参数,非tt API要求的参数
|
|
43
|
-
*/
|
|
44
|
-
proactive?: boolean | undefined;
|
|
45
41
|
};
|
|
46
42
|
export type InterstitialAdConfig = {
|
|
47
43
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { e as AdAnalyticsJS };
|
|
2
|
+
declare let e: typeof t;
|
|
3
|
+
declare class t {
|
|
4
|
+
static instance: any;
|
|
5
|
+
static build(n: any): any;
|
|
6
|
+
static getInstance(): any;
|
|
7
|
+
static "new"(n: any): t;
|
|
8
|
+
constructor(e: any);
|
|
9
|
+
_logger: any;
|
|
10
|
+
_initSign: string;
|
|
11
|
+
_needReport: boolean;
|
|
12
|
+
_commonConfig: any;
|
|
13
|
+
initialize(n: any): any;
|
|
14
|
+
track(n: any, t: any, e: any): void;
|
|
15
|
+
getCommonInfo(): any;
|
|
16
|
+
getTrackCommonInfo(): any;
|
|
17
|
+
identify(n: any, t: any): this;
|
|
18
|
+
alias(): any;
|
|
19
|
+
pages(): any;
|
|
20
|
+
page(n: any, t: any): void;
|
|
21
|
+
cpage(n: any): void;
|
|
22
|
+
placeholder(): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AdAnalyticsJS } from "./AdAnalyticsJS.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export { i as AdExecuteManager };
|
|
2
|
+
declare let i: typeof t;
|
|
3
|
+
declare class t {
|
|
4
|
+
static _instance: any;
|
|
5
|
+
static getInstance(e: any): any;
|
|
6
|
+
static build(e: any): any;
|
|
7
|
+
static "new"(e: any): t;
|
|
8
|
+
static getSafeInstance(): any;
|
|
9
|
+
constructor(t: any);
|
|
10
|
+
_taskStack: any[];
|
|
11
|
+
_currentBatchTasks: any[];
|
|
12
|
+
_isRunning: boolean;
|
|
13
|
+
_currentTask: any;
|
|
14
|
+
_isForeground: boolean;
|
|
15
|
+
_appShowListener: any;
|
|
16
|
+
_appHideListener: any;
|
|
17
|
+
_enableVisibilityListener: boolean;
|
|
18
|
+
_maxRetryCount: number;
|
|
19
|
+
_retryQueue: any[];
|
|
20
|
+
_errorRetryStrategy: {
|
|
21
|
+
timeout: boolean;
|
|
22
|
+
background: boolean;
|
|
23
|
+
};
|
|
24
|
+
logger: e;
|
|
25
|
+
initialize(e: any): this;
|
|
26
|
+
_initVisibilityListener(): void;
|
|
27
|
+
_handleAppHide(): void;
|
|
28
|
+
_handleAppShow(): void;
|
|
29
|
+
destroyVisibilityListener(): void;
|
|
30
|
+
enableVisibilityListener(): void;
|
|
31
|
+
disableVisibilityListener(): void;
|
|
32
|
+
isVisibilityListenerEnabled(): boolean;
|
|
33
|
+
addTask(e: any, t: any): Promise<any>;
|
|
34
|
+
_compose(): void;
|
|
35
|
+
clearTasks(): void;
|
|
36
|
+
getTaskCount(): number;
|
|
37
|
+
isRunning(): boolean;
|
|
38
|
+
getCurrentTaskId(): any;
|
|
39
|
+
whenAllTasksComplete(): Promise<any>;
|
|
40
|
+
}
|
|
41
|
+
import { Logger as e } from "@ad-execute-manager/helper";
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
export default AdExecuteManager;
|
|
2
|
+
export type IAdInstance = {
|
|
3
|
+
/**
|
|
4
|
+
* 超时时间
|
|
5
|
+
*/
|
|
6
|
+
_adTimeoutTime: number;
|
|
7
|
+
/**
|
|
8
|
+
* 初始化广告
|
|
9
|
+
*/
|
|
10
|
+
initialize: (ctx: unknown) => IAdInstance;
|
|
11
|
+
/**
|
|
12
|
+
* 显示广告
|
|
13
|
+
*/
|
|
14
|
+
ad: (options: unknown, ctx: unknown, recovered: unknown) => Promise<unknown>;
|
|
15
|
+
clear: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type IRewordAdConfig = import("./typings/ad.js").IRewordAdConfig;
|
|
18
|
+
export type CallbackCollection = import("./typings/ad.js").CallbackCollection;
|
|
2
19
|
export type AdTask = {
|
|
3
20
|
/**
|
|
4
21
|
* RewardAdFather的子类实例
|
|
5
22
|
*/
|
|
6
|
-
adInstance:
|
|
23
|
+
adInstance: IAdInstance;
|
|
7
24
|
/**
|
|
8
25
|
* 广告执行选项
|
|
9
26
|
*/
|
|
10
|
-
options:
|
|
27
|
+
options: IRewordAdConfig;
|
|
11
28
|
/**
|
|
12
29
|
* 回调集合
|
|
13
30
|
*/
|
|
14
|
-
callbackCollection:
|
|
31
|
+
callbackCollection: CallbackCollection;
|
|
15
32
|
/**
|
|
16
33
|
* 广告执行成功的回调函数
|
|
17
34
|
*/
|
|
@@ -191,15 +208,15 @@ declare class AdExecuteManager {
|
|
|
191
208
|
isVisibilityListenerEnabled(): boolean;
|
|
192
209
|
/**
|
|
193
210
|
* 添加广告任务
|
|
194
|
-
* @param {
|
|
211
|
+
* @param {IAdInstance} adInstance RewardAdFather的子类实例
|
|
195
212
|
* @param {Object} ctx 广告执行上下文
|
|
196
|
-
* @param {
|
|
197
|
-
* @param {
|
|
213
|
+
* @param {IRewordAdConfig} ctx.options 广告执行选项
|
|
214
|
+
* @param {CallbackCollection} ctx.collection 回调集合
|
|
198
215
|
* @returns {Promise} 广告执行结果的Promise
|
|
199
216
|
*/
|
|
200
|
-
addTask(adInstance:
|
|
201
|
-
options:
|
|
202
|
-
collection:
|
|
217
|
+
addTask(adInstance: IAdInstance, ctx: {
|
|
218
|
+
options: IRewordAdConfig;
|
|
219
|
+
collection: CallbackCollection;
|
|
203
220
|
}): Promise<any>;
|
|
204
221
|
/**
|
|
205
222
|
* 组合所有任务
|
|
@@ -232,4 +249,4 @@ declare class AdExecuteManager {
|
|
|
232
249
|
*/
|
|
233
250
|
whenAllTasksComplete(): Promise<void>;
|
|
234
251
|
}
|
|
235
|
-
import { Logger } from '
|
|
252
|
+
import { Logger } from '@ad-execute-manager/helper';
|