@singcl/ad-execute-manager 1.0.12 → 1.0.14
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/dist/{example → ad}/RewardAdNovel.d.ts +11 -25
- package/package.json +1 -1
- package/dist/example/AdUnlock/RewardAdNovelUnlock.d.ts +0 -114
- package/dist/example/AdUnlock/UnlockSettings.d.ts +0 -42
- package/dist/example/CommonSettings.d.ts +0 -179
- package/dist/example/RewardAdLaunch.d.ts +0 -91
- package/dist/example/RewardAdLaunchAlone.d.ts +0 -63
- package/dist/example/RewardAdReadingLoad.d.ts +0 -83
- package/dist/example/RewardAdReadingUnload.d.ts +0 -44
- /package/dist/{src/ad → ad}/AdExecuteManager.d.ts +0 -0
- /package/dist/{src/ad → ad}/CountRecorder.d.ts +0 -0
- /package/dist/{src/ad → ad}/ExbAnalyticsJS.d.ts +0 -0
- /package/dist/{src/ad → ad}/Logger.d.ts +0 -0
- /package/dist/{src/ad → ad}/LovelUnlockManager.d.ts +0 -0
- /package/dist/{src/ad → ad}/RewardAdFather.d.ts +0 -0
- /package/dist/{src/ad → ad}/RewardAdGlobalRecorder.d.ts +0 -0
- /package/dist/{src/ad → ad}/RewardAdSceneTriggerManager.d.ts +0 -0
- /package/dist/{src/ad → ad}/SerializableError.d.ts +0 -0
- /package/dist/{src/ad → ad}/Storage.d.ts +0 -0
- /package/dist/{src/ad → ad}/compose.d.ts +0 -0
- /package/dist/{src/ad → ad}/const.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/typings → typings}/ad.d.ts +0 -0
- /package/dist/{src/typings → typings}/tracker.d.ts +0 -0
- /package/dist/{src/utils → utils}/functional.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default RewardAdNovel;
|
|
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
|
|
@@ -201,11 +201,11 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
201
201
|
/**
|
|
202
202
|
* 初始化
|
|
203
203
|
* 子类可以选择覆盖此方法,或使用默认实现
|
|
204
|
-
* @param {IRewordAdConfig}
|
|
204
|
+
* @param {IRewordAdConfig} args
|
|
205
205
|
* @param {(v: IRewardedVideoAd) => void} [callback] 初始化成功回调
|
|
206
206
|
* @returns {this} 当前实例
|
|
207
207
|
*/
|
|
208
|
-
initialize(args:
|
|
208
|
+
initialize(args: IRewordAdConfig, callback?: (v: IRewardedVideoAd) => void): this;
|
|
209
209
|
_initAdLister(): void;
|
|
210
210
|
/**
|
|
211
211
|
* @param {object} args
|
|
@@ -243,25 +243,25 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
243
243
|
* 确保广告按顺序执行
|
|
244
244
|
* @param {Object} [ctx] 上下文对象,用于传递数据和状态
|
|
245
245
|
* @param {IRewordAdConfig} [ctx.options] 广告执行选项
|
|
246
|
-
* @param {import('../
|
|
246
|
+
* @param {import('../typings/ad.js').CallbackCollection} [ctx.collection] 回调集合
|
|
247
247
|
*
|
|
248
248
|
* @returns {Promise.<IEndArgs & ICloseArgs | Undefined>}
|
|
249
249
|
*/
|
|
250
250
|
addExecuteManager(ctx?: {
|
|
251
251
|
options?: IRewordAdConfig;
|
|
252
|
-
collection?: import("../
|
|
252
|
+
collection?: import("../typings/ad.js").CallbackCollection;
|
|
253
253
|
}): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
254
254
|
/**
|
|
255
255
|
* @param {object} [ctx] 广告执行上下文
|
|
256
|
-
* @param {import('../
|
|
257
|
-
* @param {import('../
|
|
256
|
+
* @param {import('../typings/ad.js').IRewordAdConfig} [ctx.options] 广告执行选项
|
|
257
|
+
* @param {import('../typings/ad.js').CallbackCollection} [ctx.collection] 回调集合
|
|
258
258
|
* @param {Function} next 执行下一个任务的回调函数,手动调用以继续执行流程
|
|
259
259
|
*
|
|
260
260
|
* @returns {Promise.<IEndArgs & ICloseArgs | Undefined>}
|
|
261
261
|
*/
|
|
262
262
|
ad(ctx?: {
|
|
263
|
-
options?: import("../
|
|
264
|
-
collection?: import("../
|
|
263
|
+
options?: import("../typings/ad.js").IRewordAdConfig;
|
|
264
|
+
collection?: import("../typings/ad.js").CallbackCollection;
|
|
265
265
|
}, next?: Function): Promise<(IEndArgs & ICloseArgs) | undefined>;
|
|
266
266
|
/**
|
|
267
267
|
* @param {object} [ctx] 广告执行上下文
|
|
@@ -323,7 +323,7 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
323
323
|
*/
|
|
324
324
|
shift(): void;
|
|
325
325
|
}
|
|
326
|
-
import RewardAdFather from '
|
|
326
|
+
import RewardAdFather from './RewardAdFather.js';
|
|
327
327
|
declare class RewardAdNovelConfig {
|
|
328
328
|
/**
|
|
329
329
|
*
|
|
@@ -344,12 +344,10 @@ declare class RewardAdNovelConfig {
|
|
|
344
344
|
constructor(args?: {
|
|
345
345
|
retry?: number;
|
|
346
346
|
});
|
|
347
|
-
free_incentive_frequency: number;
|
|
348
347
|
frequency: {
|
|
349
348
|
total: number;
|
|
350
349
|
current: number;
|
|
351
350
|
};
|
|
352
|
-
commonSettings: CommonSettings;
|
|
353
351
|
/**
|
|
354
352
|
*
|
|
355
353
|
* @param {object} [args]
|
|
@@ -369,16 +367,4 @@ declare class RewardAdNovelConfig {
|
|
|
369
367
|
reset(): void;
|
|
370
368
|
updateRetry(): void;
|
|
371
369
|
remain(): number;
|
|
372
|
-
options(): {
|
|
373
|
-
multiton: boolean;
|
|
374
|
-
multitonRewardTimes: number;
|
|
375
|
-
multitonRewardMsg: string[];
|
|
376
|
-
progressTip: boolean;
|
|
377
|
-
} | {
|
|
378
|
-
multiton?: undefined;
|
|
379
|
-
multitonRewardTimes?: undefined;
|
|
380
|
-
multitonRewardMsg?: undefined;
|
|
381
|
-
progressTip?: undefined;
|
|
382
|
-
};
|
|
383
370
|
}
|
|
384
|
-
import CommonSettings from './CommonSettings.js';
|
package/package.json
CHANGED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
export default RewardAdNovelUnlock;
|
|
2
|
-
export type IRewordAdConfig = any;
|
|
3
|
-
export type ICallbackArgs = any;
|
|
4
|
-
export type IConnection = {
|
|
5
|
-
/**
|
|
6
|
-
* 广告中途退出回调
|
|
7
|
-
*/
|
|
8
|
-
onHalfway?: (args: ICallbackArgs) => void;
|
|
9
|
-
/**
|
|
10
|
-
* 广告展示回调
|
|
11
|
-
*/
|
|
12
|
-
onShow?: (args: ICallbackArgs) => void;
|
|
13
|
-
/**
|
|
14
|
-
* 广告执行成功回调
|
|
15
|
-
*/
|
|
16
|
-
onFinish?: (args: ICallbackArgs) => void;
|
|
17
|
-
/**
|
|
18
|
-
* 广告执行成功或失败回调
|
|
19
|
-
*/
|
|
20
|
-
onAlways?: (args: ICallbackArgs) => void;
|
|
21
|
-
/**
|
|
22
|
-
* 广告执行失败回调
|
|
23
|
-
*/
|
|
24
|
-
onError?: (e: unknown) => void;
|
|
25
|
-
};
|
|
26
|
-
export type ICloseArgs = {
|
|
27
|
-
/**
|
|
28
|
-
* 是否看完
|
|
29
|
-
*/
|
|
30
|
-
isEnded: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* 完整观看次数
|
|
33
|
-
*/
|
|
34
|
-
count: number;
|
|
35
|
-
};
|
|
36
|
-
export type IConstructArgs = {
|
|
37
|
-
/**
|
|
38
|
-
* 初始化标识
|
|
39
|
-
*/
|
|
40
|
-
sign: string;
|
|
41
|
-
/**
|
|
42
|
-
* 解锁设置
|
|
43
|
-
*/
|
|
44
|
-
unlockSettings: import("./UnlockSettings").default;
|
|
45
|
-
/**
|
|
46
|
-
* 激励视频参数 (可选)
|
|
47
|
-
*/
|
|
48
|
-
adConfig?: IRewordAdConfig | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* 回调集合
|
|
51
|
-
*/
|
|
52
|
-
collection?: IConnection | undefined;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* @typedef {import('../../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* @typedef {import('../../typings/ad.js').ICallbackArgs} ICallbackArgs
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* @typedef IConnection
|
|
62
|
-
* @property {(args: ICallbackArgs) => void} [onHalfway] 广告中途退出回调
|
|
63
|
-
* @property {(args: ICallbackArgs) => void} [onShow] 广告展示回调
|
|
64
|
-
* @property {(args: ICallbackArgs) => void} [onFinish] 广告执行成功回调
|
|
65
|
-
* @property {(args: ICallbackArgs) => void} [onAlways] 广告执行成功或失败回调
|
|
66
|
-
* @property {(e:unknown) => void} [onError] 广告执行失败回调
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* @typedef ICloseArgs
|
|
70
|
-
* @property {boolean} isEnded 是否看完
|
|
71
|
-
* @property {number} count 完整观看次数
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* @typedef IConstructArgs
|
|
75
|
-
* @property {string} sign 初始化标识
|
|
76
|
-
* @property {import('./UnlockSettings').default} unlockSettings 解锁设置
|
|
77
|
-
* @property {IRewordAdConfig=} adConfig 激励视频参数 (可选)
|
|
78
|
-
* @property {IConnection=} collection 回调集合
|
|
79
|
-
*/
|
|
80
|
-
declare class RewardAdNovelUnlock extends RewardAdNovel {
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @param {IConstructArgs} args
|
|
84
|
-
* @returns {RewardAdNovelUnlock}
|
|
85
|
-
*/
|
|
86
|
-
static build(args: IConstructArgs): RewardAdNovelUnlock;
|
|
87
|
-
static unshift(): typeof RewardAdNovelUnlock;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @returns {RewardAdNovelUnlock}
|
|
91
|
-
*/
|
|
92
|
-
static getInstance(): RewardAdNovelUnlock;
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* @returns {RewardAdNovelUnlock | null}
|
|
96
|
-
*/
|
|
97
|
-
static getNovelInstance(): RewardAdNovelUnlock | null;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @param {IConstructArgs} args
|
|
101
|
-
* @returns {RewardAdNovelUnlock}
|
|
102
|
-
*/
|
|
103
|
-
static "new"(args: IConstructArgs): RewardAdNovelUnlock;
|
|
104
|
-
/**
|
|
105
|
-
* @param {IConstructArgs} args
|
|
106
|
-
*/
|
|
107
|
-
constructor(args: IConstructArgs);
|
|
108
|
-
_scene: 2;
|
|
109
|
-
/**
|
|
110
|
-
* @type {import('./UnlockSettings').default}
|
|
111
|
-
*/
|
|
112
|
-
unlockSettings: import("./UnlockSettings").default;
|
|
113
|
-
}
|
|
114
|
-
import RewardAdNovel from '../RewardAdNovel.js';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export default UnlockSettings;
|
|
2
|
-
declare class UnlockSettings {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {object} args
|
|
6
|
-
* @param {string} args.sign 初始化标识
|
|
7
|
-
* @returns {UnlockSettings}
|
|
8
|
-
*/
|
|
9
|
-
static "new"(args: {
|
|
10
|
-
sign: string;
|
|
11
|
-
}): UnlockSettings;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param {object} [args]
|
|
15
|
-
*/
|
|
16
|
-
constructor(args?: object);
|
|
17
|
-
max_tan_ad: {
|
|
18
|
-
total: number;
|
|
19
|
-
current: number;
|
|
20
|
-
};
|
|
21
|
-
look_jls_p: {
|
|
22
|
-
is_look_complete: number;
|
|
23
|
-
total: number;
|
|
24
|
-
current: number;
|
|
25
|
-
};
|
|
26
|
-
commonSettings: CommonSettings;
|
|
27
|
-
_init(): void;
|
|
28
|
-
_adTimes(): void;
|
|
29
|
-
reset(): void;
|
|
30
|
-
updateMaxTan(): void;
|
|
31
|
-
updateLookJlsP(): void;
|
|
32
|
-
remainMaxTan(): number;
|
|
33
|
-
remainLook(): number;
|
|
34
|
-
/**
|
|
35
|
-
* 看广告的次数和弹框的次数不一致
|
|
36
|
-
* 并且需要完整的看完广告,并且弹框次数小于最大弹框次数
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
end(): boolean;
|
|
40
|
-
ok(): boolean;
|
|
41
|
-
}
|
|
42
|
-
import CommonSettings from '../CommonSettings';
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
export default CommonSettings;
|
|
2
|
-
export type ISysConfig = {
|
|
3
|
-
/**
|
|
4
|
-
* 再看一次配置
|
|
5
|
-
*/
|
|
6
|
-
free_incentive_frequency?: number | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* 自定义解锁弹窗配置
|
|
9
|
-
*/
|
|
10
|
-
c_unlock_pop_enable?: number | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* 是否进入简介页
|
|
13
|
-
*/
|
|
14
|
-
launch_go_jianjieye?: number | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* 是否可以返回首页
|
|
17
|
-
*/
|
|
18
|
-
launch_can_back_home?: number | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* 返回书城激励视频每日展示次数 0 不展示 具体数量展示几次
|
|
21
|
-
*/
|
|
22
|
-
back_book_store_ad?: number | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* 是否开启启动激励
|
|
25
|
-
*/
|
|
26
|
-
inter_site_pop_ups?: number | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* 启动激励次数
|
|
29
|
-
*/
|
|
30
|
-
inter_site_pop_ups_num?: number | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* 阅读强激励循环次数
|
|
33
|
-
*/
|
|
34
|
-
strong_incentive_frequency?: number | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* 阅读页返回广告
|
|
37
|
-
*/
|
|
38
|
-
read_page_back_ad?: number | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* 进入阅读页每日自动展示激励次数
|
|
41
|
-
*/
|
|
42
|
-
first_user_day?: number | undefined;
|
|
43
|
-
};
|
|
44
|
-
export type IUserConfig = {
|
|
45
|
-
/**
|
|
46
|
-
* 解锁章节中配置的观看解锁章节数
|
|
47
|
-
*/
|
|
48
|
-
ad_unlock_chapter_num?: number | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* 解锁章节中配置的观看奖励视频次数
|
|
51
|
-
*/
|
|
52
|
-
look_jlsp_num?: number | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* 解锁章节中配置的弹窗广告次数
|
|
55
|
-
*/
|
|
56
|
-
max_tan_ad_num?: number | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* 奖励视频是否观看完成
|
|
59
|
-
*/
|
|
60
|
-
jlsp_is_look_complete?: number | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* 书籍ID
|
|
63
|
-
*/
|
|
64
|
-
dy_book_id?: number | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* 默认书籍ID
|
|
67
|
-
*/
|
|
68
|
-
default_book_id?: number | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* 章节ID
|
|
71
|
-
*/
|
|
72
|
-
index?: number | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* 2 表示跳转至速度页面 1 不处理
|
|
75
|
-
*/
|
|
76
|
-
open_page: string;
|
|
77
|
-
/**
|
|
78
|
-
* 是否解锁全部章节 0 未解锁 1 解锁
|
|
79
|
-
*/
|
|
80
|
-
is_unlock_all: number;
|
|
81
|
-
};
|
|
82
|
-
export type IUserInfo = {
|
|
83
|
-
/**
|
|
84
|
-
* 用户ID
|
|
85
|
-
*/
|
|
86
|
-
id: string;
|
|
87
|
-
/**
|
|
88
|
-
* 用户归因类型 1:信息流;2:工具版;3:新用户;4:老用户;5:未归因用户
|
|
89
|
-
*/
|
|
90
|
-
user_type: 1 | 2 | 3 | 4 | 5;
|
|
91
|
-
/**
|
|
92
|
-
* 用户组 - 0:对照组A;1:测试组B
|
|
93
|
-
*/
|
|
94
|
-
user_ab: 0 | 1;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* 投放渠道参数
|
|
98
|
-
*/
|
|
99
|
-
export type IDeliverOption = {
|
|
100
|
-
/**
|
|
101
|
-
* 书籍ID
|
|
102
|
-
*/
|
|
103
|
-
book_id: string;
|
|
104
|
-
/**
|
|
105
|
-
* 章节ID
|
|
106
|
-
*/
|
|
107
|
-
chapter_id: string;
|
|
108
|
-
/**
|
|
109
|
-
* 过去的书籍ID
|
|
110
|
-
*/
|
|
111
|
-
past_book_id: string;
|
|
112
|
-
};
|
|
113
|
-
declare class CommonSettings {
|
|
114
|
-
static instance: any;
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* @param {object} args
|
|
118
|
-
* @param {string} args.sign 初始化标识
|
|
119
|
-
* @returns {CommonSettings}
|
|
120
|
-
*/
|
|
121
|
-
static build(args: {
|
|
122
|
-
sign: string;
|
|
123
|
-
}): CommonSettings;
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* @returns {CommonSettings}
|
|
127
|
-
*/
|
|
128
|
-
static getInstance(): CommonSettings;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* @param {object} args
|
|
132
|
-
* @param {string} args.sign 初始化标识
|
|
133
|
-
* @returns {CommonSettings}
|
|
134
|
-
*/
|
|
135
|
-
static "new"(args: {
|
|
136
|
-
sign: string;
|
|
137
|
-
}): CommonSettings;
|
|
138
|
-
/**
|
|
139
|
-
* @param {object} args
|
|
140
|
-
* @param {string} args.sign 初始化标识
|
|
141
|
-
* @param {string} args.loginInfo 登录信息
|
|
142
|
-
*/
|
|
143
|
-
constructor(args: {
|
|
144
|
-
sign: string;
|
|
145
|
-
loginInfo: string;
|
|
146
|
-
});
|
|
147
|
-
_initSign: string;
|
|
148
|
-
_loginInfo: {};
|
|
149
|
-
/**
|
|
150
|
-
* 获取用户配置
|
|
151
|
-
* @returns {IUserConfig}
|
|
152
|
-
*/
|
|
153
|
-
getUserConfig(): IUserConfig;
|
|
154
|
-
/**
|
|
155
|
-
* 获取用户信息
|
|
156
|
-
* @returns {IUserInfo}
|
|
157
|
-
*/
|
|
158
|
-
getUserInfo(): IUserInfo;
|
|
159
|
-
/**
|
|
160
|
-
* 获取APP配置
|
|
161
|
-
* @returns {ISysConfig}
|
|
162
|
-
*/
|
|
163
|
-
getSysConfig(): ISysConfig;
|
|
164
|
-
/**
|
|
165
|
-
* 获取用户ID
|
|
166
|
-
* @returns
|
|
167
|
-
*/
|
|
168
|
-
getUserId(): string;
|
|
169
|
-
/**
|
|
170
|
-
* 1:测试组A 一般指全部功能都开启; 0:对照组B一般会有一个或者几个功能关闭
|
|
171
|
-
* @returns
|
|
172
|
-
*/
|
|
173
|
-
getUserAB(): number;
|
|
174
|
-
/**
|
|
175
|
-
* 站位方法,没有任何左右
|
|
176
|
-
* @returns
|
|
177
|
-
*/
|
|
178
|
-
placeholder(): any;
|
|
179
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
export default RewardAdLaunch;
|
|
2
|
-
export type IRewordAdConfig = import("../src/typings/ad.js").IRewordAdConfig;
|
|
3
|
-
export type IConstructArgs = import("../src/typings/ad.js").IConstructArgs;
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {import('../src/typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @typedef {import('../src/typings/ad.js').IConstructArgs} IConstructArgs
|
|
9
|
-
*/
|
|
10
|
-
declare class RewardAdLaunch extends RewardAdNovel {
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param {IConstructArgs} args
|
|
14
|
-
* @returns {RewardAdLaunch}
|
|
15
|
-
*/
|
|
16
|
-
static build(args: IConstructArgs): RewardAdLaunch;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @returns {RewardAdLaunch}
|
|
20
|
-
*/
|
|
21
|
-
static getInstance(): RewardAdLaunch;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {IConstructArgs} args
|
|
25
|
-
* @returns {RewardAdLaunch}
|
|
26
|
-
*/
|
|
27
|
-
static "new"(args: IConstructArgs): RewardAdLaunch;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {Promise.<unknown>}
|
|
31
|
-
*/
|
|
32
|
-
static ad: Promise<unknown>;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param {object} options 启动参数
|
|
36
|
-
* @param {string} options.path 启动路径
|
|
37
|
-
* @param {object} options.query 启动参数
|
|
38
|
-
* @param {string} options.query.promotionid 推广参数
|
|
39
|
-
* @param {(args: { options: object } | null) => Promise.<void>} callback 回调
|
|
40
|
-
* @returns
|
|
41
|
-
*/
|
|
42
|
-
static satisfy(options: {
|
|
43
|
-
path: string;
|
|
44
|
-
query: {
|
|
45
|
-
promotionid: string;
|
|
46
|
-
};
|
|
47
|
-
}, callback: (args: {
|
|
48
|
-
options: object;
|
|
49
|
-
} | null) => Promise<void>): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* @param {object} args
|
|
52
|
-
* @param {string} args.sign 初始化标识
|
|
53
|
-
*/
|
|
54
|
-
constructor(args: {
|
|
55
|
-
sign: string;
|
|
56
|
-
});
|
|
57
|
-
_scene: 0;
|
|
58
|
-
launchSettings: RewardAdLaunchSettings;
|
|
59
|
-
}
|
|
60
|
-
import RewardAdNovel from './RewardAdNovel.js';
|
|
61
|
-
declare class RewardAdLaunchSettings {
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @param {object} args
|
|
65
|
-
* @param {string} args.sign 初始化标识
|
|
66
|
-
* @returns {RewardAdLaunchSettings}
|
|
67
|
-
*/
|
|
68
|
-
static "new"(args: {
|
|
69
|
-
sign: string;
|
|
70
|
-
}): RewardAdLaunchSettings;
|
|
71
|
-
_fixedFrequency: any;
|
|
72
|
-
frequency: {
|
|
73
|
-
total: number;
|
|
74
|
-
current: number;
|
|
75
|
-
};
|
|
76
|
-
commonSettings: CommonSettings;
|
|
77
|
-
countRecorder: CountRecorder;
|
|
78
|
-
/**
|
|
79
|
-
* 获取启动广告的展示次数
|
|
80
|
-
* @returns {number} 启动广告的展示次数配置,如果没有配置则返回0
|
|
81
|
-
*/
|
|
82
|
-
_adTimes(): number;
|
|
83
|
-
updateToday(): void;
|
|
84
|
-
updateFrequency(): void;
|
|
85
|
-
remainFrequency(): number;
|
|
86
|
-
timesPerFrequency(): number;
|
|
87
|
-
_remain(): number;
|
|
88
|
-
condition(): boolean;
|
|
89
|
-
}
|
|
90
|
-
import CommonSettings from './CommonSettings';
|
|
91
|
-
import { CountRecorder } from '../src/ad/CountRecorder.js';
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
export default RewardAdLaunchAlone;
|
|
2
|
-
export type IRewordAdConfig = import("../src/typings/ad.js").IRewordAdConfig;
|
|
3
|
-
export type IConstructArgs = import("../src/typings/ad.js").IConstructArgs;
|
|
4
|
-
export type CallbackCollection = import("../src/typings/ad.js").CallbackCollection;
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {import('../src/typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* @typedef {import('../src/typings/ad.js').IConstructArgs} IConstructArgs
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {import('../src/typings/ad.js').CallbackCollection} CallbackCollection
|
|
13
|
-
*/
|
|
14
|
-
declare class RewardAdLaunchAlone extends RewardAdNovel {
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param {IConstructArgs} args
|
|
18
|
-
* @returns {RewardAdLaunchAlone}
|
|
19
|
-
*/
|
|
20
|
-
static build(args: IConstructArgs): RewardAdLaunchAlone;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @returns {RewardAdLaunchAlone}
|
|
24
|
-
*/
|
|
25
|
-
static getInstance(): RewardAdLaunchAlone;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @param {IConstructArgs} args
|
|
29
|
-
* @returns {RewardAdLaunchAlone}
|
|
30
|
-
*/
|
|
31
|
-
static "new"(args: IConstructArgs): RewardAdLaunchAlone;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @type {Promise.<unknown>}
|
|
35
|
-
*/
|
|
36
|
-
static ad: Promise<unknown>;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {object} options 启动参数
|
|
40
|
-
* @param {string} options.path 启动路径
|
|
41
|
-
* @param {object} options.query 启动参数
|
|
42
|
-
* @param {string} options.query.promotionid 推广参数
|
|
43
|
-
* @param {() => Promise.<void>} callback 回调
|
|
44
|
-
* @returns
|
|
45
|
-
*/
|
|
46
|
-
static satisfy(options: {
|
|
47
|
-
path: string;
|
|
48
|
-
query: {
|
|
49
|
-
promotionid: string;
|
|
50
|
-
};
|
|
51
|
-
}, callback: () => Promise<void>): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* @param {object} args
|
|
54
|
-
* @param {string} args.sign 初始化标识
|
|
55
|
-
* @param {IRewordAdConfig=} args.adConfig 激励视频参数 (可选)
|
|
56
|
-
*/
|
|
57
|
-
constructor(args: {
|
|
58
|
-
sign: string;
|
|
59
|
-
adConfig?: IRewordAdConfig | undefined;
|
|
60
|
-
});
|
|
61
|
-
_scene: 9;
|
|
62
|
-
}
|
|
63
|
-
import RewardAdNovel from './RewardAdNovel.js';
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export default RewardAdReadingLoad;
|
|
2
|
-
export type ISysConfig = {
|
|
3
|
-
/**
|
|
4
|
-
* 再看一次配置
|
|
5
|
-
*/
|
|
6
|
-
free_incentive_frequency?: number | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* 自定义解锁弹窗配置
|
|
9
|
-
*/
|
|
10
|
-
c_unlock_pop_enable?: number | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* 返回书城激励视频每日展示次数 0 不展示 具体数量展示几次
|
|
13
|
-
*/
|
|
14
|
-
read_load_times?: number | undefined;
|
|
15
|
-
};
|
|
16
|
-
export type IRewordAdConfig = import("../src/typings/ad.js").IRewordAdConfig;
|
|
17
|
-
export type IConstructArgs = import("../src/typings/ad.js").IConstructArgs;
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {import('../src/typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* @typedef {import('../src/typings/ad.js').IConstructArgs} IConstructArgs
|
|
23
|
-
*/
|
|
24
|
-
declare class RewardAdReadingLoad extends RewardAdNovel {
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {IConstructArgs} args
|
|
28
|
-
* @returns {RewardAdReadingLoad}
|
|
29
|
-
*/
|
|
30
|
-
static build(args: IConstructArgs): RewardAdReadingLoad;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @returns {RewardAdReadingLoad}
|
|
34
|
-
*/
|
|
35
|
-
static getInstance(): RewardAdReadingLoad;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @param {IConstructArgs} args
|
|
39
|
-
* @returns {RewardAdReadingLoad}
|
|
40
|
-
*/
|
|
41
|
-
static "new"(args: IConstructArgs): RewardAdReadingLoad;
|
|
42
|
-
constructor(args: any);
|
|
43
|
-
loadSettings: RewardAdReadingLoadSettings;
|
|
44
|
-
/**
|
|
45
|
-
* @param {object} options
|
|
46
|
-
* @param {(con:boolean, options:object) => void} [callback]
|
|
47
|
-
*/
|
|
48
|
-
satisfy(options: object, callback?: (con: boolean, options: object) => void): void | Promise<void>;
|
|
49
|
-
}
|
|
50
|
-
import RewardAdNovel from './RewardAdNovel.js';
|
|
51
|
-
declare class RewardAdReadingLoadSettings {
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @param {object} args
|
|
55
|
-
* @param {string} args.sign 初始化标识
|
|
56
|
-
* @returns {RewardAdReadingLoadSettings}
|
|
57
|
-
*/
|
|
58
|
-
static "new"(args: {
|
|
59
|
-
sign: string;
|
|
60
|
-
}): RewardAdReadingLoadSettings;
|
|
61
|
-
frequency: {
|
|
62
|
-
total: number;
|
|
63
|
-
current: number;
|
|
64
|
-
};
|
|
65
|
-
commonSettings: CommonSettings;
|
|
66
|
-
storage: Storage;
|
|
67
|
-
_init(): void;
|
|
68
|
-
/**
|
|
69
|
-
* 获取返回广告的展示次数
|
|
70
|
-
* @returns {number} 返回广告的展示次数配置,如果没有配置则返回0
|
|
71
|
-
*/
|
|
72
|
-
_adTimes(): number;
|
|
73
|
-
_safeLocalValue(v: any): any;
|
|
74
|
-
_initLocalTimes(): void;
|
|
75
|
-
_initFrequency(): void;
|
|
76
|
-
updateFrequency(): void;
|
|
77
|
-
remainFrequency(): number;
|
|
78
|
-
updateToday(): void;
|
|
79
|
-
_remain(): number;
|
|
80
|
-
condition(): boolean;
|
|
81
|
-
}
|
|
82
|
-
import CommonSettings from './CommonSettings';
|
|
83
|
-
import Storage from '../src/ad/Storage.js';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export default RewardAdReadingUnload;
|
|
2
|
-
export type ISysConfig = {
|
|
3
|
-
/**
|
|
4
|
-
* 再看一次配置
|
|
5
|
-
*/
|
|
6
|
-
free_incentive_frequency?: number | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* 自定义解锁弹窗配置
|
|
9
|
-
*/
|
|
10
|
-
c_unlock_pop_enable?: number | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* 返回书城激励视频每日展示次数 0 不展示 具体数量展示几次
|
|
13
|
-
*/
|
|
14
|
-
read_page_back_ad?: number | undefined;
|
|
15
|
-
};
|
|
16
|
-
export type IRewordAdConfig = import("../src/typings/ad.js").IRewordAdConfig;
|
|
17
|
-
export type IConstructArgs = import("../src/typings/ad.js").IConstructArgs;
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {import('../src/typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* @typedef {import('../src/typings/ad.js').IConstructArgs} IConstructArgs
|
|
23
|
-
*/
|
|
24
|
-
declare class RewardAdReadingUnload extends RewardAdNovel {
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {IConstructArgs} args
|
|
28
|
-
* @returns {RewardAdReadingUnload}
|
|
29
|
-
*/
|
|
30
|
-
static build(args: IConstructArgs): RewardAdReadingUnload;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @param {IConstructArgs} args
|
|
34
|
-
* @returns {RewardAdReadingUnload}
|
|
35
|
-
*/
|
|
36
|
-
static "new"(args: IConstructArgs): RewardAdReadingUnload;
|
|
37
|
-
/**
|
|
38
|
-
* @param {object} options
|
|
39
|
-
* @param {(con:boolean, options:object) => void} [callback]
|
|
40
|
-
*/
|
|
41
|
-
static satisfy(options: object, callback?: (con: boolean, options: object) => void): void | Promise<void>;
|
|
42
|
-
constructor(args: any);
|
|
43
|
-
}
|
|
44
|
-
import RewardAdNovel from './RewardAdNovel.js';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|