@singcl/ad-execute-manager 1.0.6 → 1.0.7
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/ad/AdUnlock/RewardAdNovelUnlock.d.ts +4 -0
- package/dist/ad/AdUnlock/UnlockSettings.d.ts +2 -2
- package/dist/ad/CommonSettings.d.ts +4 -4
- package/dist/ad/RewardAdFather.d.ts +3 -5
- package/dist/ad/RewardAdGlobalRecorder.d.ts +2 -2
- package/dist/ad/RewardAdLaunch.d.ts +6 -2
- package/dist/ad/RewardAdLaunchAlone.d.ts +4 -0
- package/dist/ad/RewardAdNovel.d.ts +14 -3
- package/dist/ad/RewardAdReadingLoad.d.ts +6 -3
- package/dist/ad/RewardAdReadingUnload.d.ts +4 -6
- package/dist/ad/RewardAdSceneTriggerManager.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default RewardAdNovelUnlock;
|
|
2
2
|
export type IRewordAdConfig = import("../../typings/ad.js").IRewordAdConfig;
|
|
3
|
+
export type ICallbackArgs = import("../../typings/ad.js").ICallbackArgs;
|
|
3
4
|
export type IConnection = {
|
|
4
5
|
/**
|
|
5
6
|
* 广告中途退出回调
|
|
@@ -53,6 +54,9 @@ export type IConstructArgs = {
|
|
|
53
54
|
/**
|
|
54
55
|
* @typedef {import('../../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
55
56
|
*/
|
|
57
|
+
/**
|
|
58
|
+
* @typedef {import('../../typings/ad.js').ICallbackArgs} ICallbackArgs
|
|
59
|
+
*/
|
|
56
60
|
/**
|
|
57
61
|
* @typedef IConnection
|
|
58
62
|
* @property {(args: ICallbackArgs) => void} [onHalfway] 广告中途退出回调
|
|
@@ -3,11 +3,11 @@ declare class UnlockSettings {
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* @param {object} args
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {string} args.sign 初始化标识
|
|
7
7
|
* @returns {UnlockSettings}
|
|
8
8
|
*/
|
|
9
9
|
static "new"(args: {
|
|
10
|
-
sign:
|
|
10
|
+
sign: string;
|
|
11
11
|
}): UnlockSettings;
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
@@ -115,11 +115,11 @@ declare class CommonSettings {
|
|
|
115
115
|
/**
|
|
116
116
|
*
|
|
117
117
|
* @param {object} args
|
|
118
|
-
* @param {
|
|
118
|
+
* @param {string} args.sign 初始化标识
|
|
119
119
|
* @returns {CommonSettings}
|
|
120
120
|
*/
|
|
121
121
|
static build(args: {
|
|
122
|
-
sign:
|
|
122
|
+
sign: string;
|
|
123
123
|
}): CommonSettings;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
@@ -129,11 +129,11 @@ declare class CommonSettings {
|
|
|
129
129
|
/**
|
|
130
130
|
*
|
|
131
131
|
* @param {object} args
|
|
132
|
-
* @param {
|
|
132
|
+
* @param {string} args.sign 初始化标识
|
|
133
133
|
* @returns {CommonSettings}
|
|
134
134
|
*/
|
|
135
135
|
static "new"(args: {
|
|
136
|
-
sign:
|
|
136
|
+
sign: string;
|
|
137
137
|
}): CommonSettings;
|
|
138
138
|
/**
|
|
139
139
|
* @param {object} args
|
|
@@ -69,17 +69,15 @@ declare class RewardAdFather {
|
|
|
69
69
|
}, next?: Function): Promise<unknown>;
|
|
70
70
|
/**
|
|
71
71
|
* 确保广告按顺序执行
|
|
72
|
-
* @template T
|
|
73
|
-
* @param {T} value - 泛型参数
|
|
74
72
|
* @param {Object} [ctx] 上下文对象,用于传递数据和状态
|
|
75
73
|
* @param {IRewordAdConfig} [ctx.options] 广告执行选项
|
|
76
74
|
* @param {CallbackCollection} [ctx.collection] 回调集合
|
|
77
|
-
* @returns {Promise.<
|
|
75
|
+
* @returns {Promise.<unknown>} 广告执行结果的Promise
|
|
78
76
|
*/
|
|
79
|
-
addExecuteManager
|
|
77
|
+
addExecuteManager(ctx?: {
|
|
80
78
|
options?: IRewordAdConfig;
|
|
81
79
|
collection?: CallbackCollection;
|
|
82
|
-
}): Promise<
|
|
80
|
+
}): Promise<unknown>;
|
|
83
81
|
destroy(): void;
|
|
84
82
|
clear(): void;
|
|
85
83
|
/**
|
|
@@ -8,11 +8,11 @@ declare class RewardAdGlobalRecorder {
|
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param {object} args
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {string} args.sign 初始化标识
|
|
12
12
|
* @returns {RewardAdGlobalRecorder}
|
|
13
13
|
*/
|
|
14
14
|
static build(args: {
|
|
15
|
-
sign:
|
|
15
|
+
sign: string;
|
|
16
16
|
}): RewardAdGlobalRecorder;
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export default RewardAdLaunch;
|
|
2
2
|
export type IRewordAdConfig = import("../typings/ad.js").IRewordAdConfig;
|
|
3
|
+
export type IConstructArgs = import("../typings/ad.js").IConstructArgs;
|
|
3
4
|
/**
|
|
4
5
|
* @typedef {import('../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
5
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {import('../typings/ad.js').IConstructArgs} IConstructArgs
|
|
9
|
+
*/
|
|
6
10
|
declare class RewardAdLaunch extends RewardAdNovel {
|
|
7
11
|
/**
|
|
8
12
|
*
|
|
@@ -58,11 +62,11 @@ declare class RewardAdLaunchSettings {
|
|
|
58
62
|
/**
|
|
59
63
|
*
|
|
60
64
|
* @param {object} args
|
|
61
|
-
* @param {
|
|
65
|
+
* @param {string} args.sign 初始化标识
|
|
62
66
|
* @returns {RewardAdLaunchSettings}
|
|
63
67
|
*/
|
|
64
68
|
static "new"(args: {
|
|
65
|
-
sign:
|
|
69
|
+
sign: string;
|
|
66
70
|
}): RewardAdLaunchSettings;
|
|
67
71
|
_fixedFrequency: any;
|
|
68
72
|
frequency: {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export default RewardAdLaunchAlone;
|
|
2
2
|
export type IRewordAdConfig = import("../typings/ad.js").IRewordAdConfig;
|
|
3
|
+
export type IConstructArgs = import("../typings/ad.js").IConstructArgs;
|
|
3
4
|
export type CallbackCollection = import("../typings/ad.js").CallbackCollection;
|
|
4
5
|
/**
|
|
5
6
|
* @typedef {import('../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
6
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {import('../typings/ad.js').IConstructArgs} IConstructArgs
|
|
10
|
+
*/
|
|
7
11
|
/**
|
|
8
12
|
* @typedef {import('../typings/ad.js').CallbackCollection} CallbackCollection
|
|
9
13
|
*/
|
|
@@ -97,6 +97,12 @@ export type IEndArgs = {
|
|
|
97
97
|
*/
|
|
98
98
|
end_type?: "halfway" | "finished";
|
|
99
99
|
};
|
|
100
|
+
export type IRewardedVideoAd = {
|
|
101
|
+
/**
|
|
102
|
+
* 显示激励视频广告
|
|
103
|
+
*/
|
|
104
|
+
show: () => Promise<void>;
|
|
105
|
+
};
|
|
100
106
|
/**
|
|
101
107
|
* @typedef {import('../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
102
108
|
*/
|
|
@@ -138,6 +144,10 @@ export type IEndArgs = {
|
|
|
138
144
|
* @property {'halfway' | 'finished'} [end_type] 结束类型
|
|
139
145
|
*
|
|
140
146
|
*/
|
|
147
|
+
/**
|
|
148
|
+
* @typedef IRewardedVideoAd
|
|
149
|
+
* @property {() => Promise.<void>} show 显示激励视频广告
|
|
150
|
+
*/
|
|
141
151
|
declare class RewardAdNovel extends RewardAdFather {
|
|
142
152
|
/**
|
|
143
153
|
*
|
|
@@ -171,7 +181,8 @@ declare class RewardAdNovel extends RewardAdFather {
|
|
|
171
181
|
_finishedCallback: any;
|
|
172
182
|
_resolve: any;
|
|
173
183
|
_next: any;
|
|
174
|
-
|
|
184
|
+
/** @type {number} 广告执行场景 */
|
|
185
|
+
_scene: number;
|
|
175
186
|
_adTimeout: any;
|
|
176
187
|
_adTimeoutTime: number;
|
|
177
188
|
_adBeforeShowTimer: any;
|
|
@@ -317,12 +328,12 @@ declare class RewardAdNovelConfig {
|
|
|
317
328
|
/**
|
|
318
329
|
*
|
|
319
330
|
* @param {object} args
|
|
320
|
-
* @param {
|
|
331
|
+
* @param {string} args.sign 初始化标识
|
|
321
332
|
* @param {number} [args.retry] 重试次数
|
|
322
333
|
* @returns {RewardAdNovelConfig}
|
|
323
334
|
*/
|
|
324
335
|
static "new"(args: {
|
|
325
|
-
sign:
|
|
336
|
+
sign: string;
|
|
326
337
|
retry?: number;
|
|
327
338
|
}): RewardAdNovelConfig;
|
|
328
339
|
/**
|
|
@@ -14,9 +14,13 @@ export type ISysConfig = {
|
|
|
14
14
|
read_load_times?: number | undefined;
|
|
15
15
|
};
|
|
16
16
|
export type IRewordAdConfig = import("../typings/ad.js").IRewordAdConfig;
|
|
17
|
+
export type IConstructArgs = import("../typings/ad.js").IConstructArgs;
|
|
17
18
|
/**
|
|
18
19
|
* @typedef {import('../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
19
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {import('../typings/ad.js').IConstructArgs} IConstructArgs
|
|
23
|
+
*/
|
|
20
24
|
declare class RewardAdReadingLoad extends RewardAdNovel {
|
|
21
25
|
/**
|
|
22
26
|
*
|
|
@@ -36,7 +40,6 @@ declare class RewardAdReadingLoad extends RewardAdNovel {
|
|
|
36
40
|
*/
|
|
37
41
|
static "new"(args: IConstructArgs): RewardAdReadingLoad;
|
|
38
42
|
constructor(args: any);
|
|
39
|
-
_scene: number;
|
|
40
43
|
loadSettings: RewardAdReadingLoadSettings;
|
|
41
44
|
/**
|
|
42
45
|
* @param {object} options
|
|
@@ -49,11 +52,11 @@ declare class RewardAdReadingLoadSettings {
|
|
|
49
52
|
/**
|
|
50
53
|
*
|
|
51
54
|
* @param {object} args
|
|
52
|
-
* @param {
|
|
55
|
+
* @param {string} args.sign 初始化标识
|
|
53
56
|
* @returns {RewardAdReadingLoadSettings}
|
|
54
57
|
*/
|
|
55
58
|
static "new"(args: {
|
|
56
|
-
sign:
|
|
59
|
+
sign: string;
|
|
57
60
|
}): RewardAdReadingLoadSettings;
|
|
58
61
|
frequency: {
|
|
59
62
|
total: number;
|
|
@@ -14,9 +14,13 @@ export type ISysConfig = {
|
|
|
14
14
|
read_page_back_ad?: number | undefined;
|
|
15
15
|
};
|
|
16
16
|
export type IRewordAdConfig = import("../typings/ad.js").IRewordAdConfig;
|
|
17
|
+
export type IConstructArgs = import("../typings/ad.js").IConstructArgs;
|
|
17
18
|
/**
|
|
18
19
|
* @typedef {import('../typings/ad.js').IRewordAdConfig} IRewordAdConfig
|
|
19
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {import('../typings/ad.js').IConstructArgs} IConstructArgs
|
|
23
|
+
*/
|
|
20
24
|
declare class RewardAdReadingUnload extends RewardAdNovel {
|
|
21
25
|
/**
|
|
22
26
|
*
|
|
@@ -24,11 +28,6 @@ declare class RewardAdReadingUnload extends RewardAdNovel {
|
|
|
24
28
|
* @returns {RewardAdReadingUnload}
|
|
25
29
|
*/
|
|
26
30
|
static build(args: IConstructArgs): RewardAdReadingUnload;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @returns {RewardAdReadingUnload}
|
|
30
|
-
*/
|
|
31
|
-
static getInstance(): RewardAdReadingUnload;
|
|
32
31
|
/**
|
|
33
32
|
*
|
|
34
33
|
* @param {IConstructArgs} args
|
|
@@ -41,6 +40,5 @@ declare class RewardAdReadingUnload extends RewardAdNovel {
|
|
|
41
40
|
*/
|
|
42
41
|
static satisfy(options: object, callback?: (con: boolean, options: object) => void): void | Promise<void>;
|
|
43
42
|
constructor(args: any);
|
|
44
|
-
_scene: number;
|
|
45
43
|
}
|
|
46
44
|
import RewardAdNovel from './RewardAdNovel';
|
|
@@ -12,11 +12,11 @@ declare class RewardAdSceneTriggerManager {
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @param {object} args
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {string} args.sign 初始化标识
|
|
16
16
|
* @returns {RewardAdSceneTriggerManager}
|
|
17
17
|
*/
|
|
18
18
|
static build(args: {
|
|
19
|
-
sign:
|
|
19
|
+
sign: string;
|
|
20
20
|
}): RewardAdSceneTriggerManager;
|
|
21
21
|
/**
|
|
22
22
|
*
|