@singcl/ad-execute-manager 1.13.2 → 1.13.3

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.
@@ -1,57 +1,6 @@
1
1
  export default RewardAdNovel;
2
2
  export type IRewordAdConfig = import("./typings/ad.js").IRewordAdConfig;
3
- export type IConnection = {
4
- /**
5
- * 广告中途退出回调
6
- */
7
- onHalfway?: (args: ICallbackArgs) => void;
8
- /**
9
- * 广告展示回调
10
- */
11
- onShow?: (args: ICallbackArgs) => void;
12
- /**
13
- * 广告执行成功回调
14
- */
15
- onFinish?: (args: ICallbackArgs) => void;
16
- /**
17
- * 广告执行成功回调
18
- */
19
- onAlways?: (args: ICallbackArgs) => void;
20
- /**
21
- * 广告执行失败回调
22
- */
23
- onError?: (e: unknown) => void;
24
- };
25
- export type IConstructArgs = {
26
- /**
27
- * 初始化标识
28
- */
29
- sign?: string;
30
- /**
31
- * 是否开启日志
32
- */
33
- log?: boolean;
34
- /**
35
- * 是否保留tt激励视频广告实例
36
- */
37
- preserveOnEnd?: boolean;
38
- /**
39
- * 是否需要在超时情况下结束广告
40
- */
41
- needEndOnTimeout?: boolean;
42
- /**
43
- * 是否需要在错误情况下查询剩余次数
44
- */
45
- lookUpRemainOnError?: boolean;
46
- /**
47
- * 激励视频参数 (可选)
48
- */
49
- adConfig?: IRewordAdConfig | undefined;
50
- /**
51
- * 回调集合
52
- */
53
- collection?: IConnection | undefined;
54
- };
3
+ export type IConstructArgs = import("./typings/ad.js").IConstructArgs;
55
4
  export type ICloseArgs = {
56
5
  /**
57
6
  * 是否看完
@@ -72,22 +21,7 @@ export type IRewardedVideoAd = {
72
21
  * @typedef {import('./typings/ad.js').IRewordAdConfig} IRewordAdConfig
73
22
  */
74
23
  /**
75
- * @typedef IConnection
76
- * @property {(args: ICallbackArgs) => void} [onHalfway] 广告中途退出回调
77
- * @property {(args: ICallbackArgs) => void} [onShow] 广告展示回调
78
- * @property {(args: ICallbackArgs) => void} [onFinish] 广告执行成功回调
79
- * @property {(args: ICallbackArgs) => void} [onAlways] 广告执行成功回调
80
- * @property {(e:unknown) => void} [onError] 广告执行失败回调
81
- */
82
- /**
83
- * @typedef IConstructArgs
84
- * @property {string} [sign] 初始化标识
85
- * @property {boolean} [log] 是否开启日志
86
- * @property {boolean} [preserveOnEnd] 是否保留tt激励视频广告实例
87
- * @property {boolean} [needEndOnTimeout] 是否需要在超时情况下结束广告
88
- * @property {boolean} [lookUpRemainOnError] 是否需要在错误情况下查询剩余次数
89
- * @property {IRewordAdConfig=} [adConfig] 激励视频参数 (可选)
90
- * @property {IConnection=} [collection] 回调集合
24
+ * @typedef {import('./typings/ad.js').IConstructArgs} IConstructArgs
91
25
  */
92
26
  /**
93
27
  * @typedef ICloseArgs
@@ -116,11 +50,6 @@ declare class RewardAdNovel extends RewardAdFather {
116
50
  * @returns {RewardAdNovel}
117
51
  */
118
52
  static "new"(args: IConstructArgs): RewardAdNovel;
119
- /**
120
- * @param {IConstructArgs} args
121
- *
122
- */
123
- constructor(args: IConstructArgs);
124
53
  _onHalfway: any;
125
54
  _onShow: any;
126
55
  _onFinish: any;
@@ -187,11 +187,19 @@ export type IConstructArgs = {
187
187
  /**
188
188
  * 初始化标识
189
189
  */
190
- sign: string;
190
+ sign?: string;
191
191
  /**
192
192
  * 是否保留tt激励视频广告实例
193
193
  */
194
- preserveOnEnd: boolean;
194
+ preserveOnEnd?: boolean;
195
+ /**
196
+ * 是否需要在超时情况下结束广告
197
+ */
198
+ needEndOnTimeout?: boolean;
199
+ /**
200
+ * 是否需要在错误情况下查询剩余次数
201
+ */
202
+ lookUpRemainOnError?: boolean;
195
203
  /**
196
204
  * 激励视频参数 (可选)
197
205
  */
package/package.json CHANGED
@@ -1,86 +1,86 @@
1
- {
2
- "name": "@singcl/ad-execute-manager",
3
- "version": "1.13.2",
4
- "description": "A powerful and flexible ad execution management library for handling reward-based ads, interstitial ads, and other advertising formats in JavaScript applications.",
5
- "type": "module",
6
- "exports": {
7
- ".": {
8
- "import": "./dist/index.js",
9
- "require": "./dist/index.cjs",
10
- "types": "./dist/index.d.ts"
11
- }
12
- },
13
- "main": "./dist/index.cjs",
14
- "types": "./dist/index.d.ts",
15
- "files": [
16
- "dist"
17
- ],
18
- "author": {
19
- "name": "singcl",
20
- "email": "iambabyer@gmail.com",
21
- "url": "https://github.com/singcl"
22
- },
23
- "license": "MIT",
24
- "homepage": "https://npmx.dev/package/@singcl/ad-execute-manager",
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/singcl/ad-execute-manager.git"
28
- },
29
- "bugs": {
30
- "url": "https://github.com/singcl/ad-execute-manager/issues"
31
- },
32
- "engines": {
33
- "node": ">=8.0.0",
34
- "npm": ">=6.0.0",
35
- "yarn": ">=1.0.0",
36
- "pnpm": ">=8.0.0"
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- },
41
- "keywords": [
42
- "ad",
43
- "advertisement",
44
- "reward-ad",
45
- "interstitial-ad",
46
- "ad-manager",
47
- "ad-execution",
48
- "javascript",
49
- "nodejs"
50
- ],
51
- "scripts": {
52
- "build": "rslib build && tsc",
53
- "dev": "rslib build --watch",
54
- "format": "prettier --write .",
55
- "lint": "eslint .",
56
- "test": "rstest",
57
- "prepublishOnly": "npm i && npm run build",
58
- "packages:install": "node build-packages.js install",
59
- "packages:build": "node build-packages.js build",
60
- "packages:publish": "node build-packages.js publish",
61
- "packages:publish:patch": "node build-packages.js publish patch",
62
- "packages:publish:minor": "node build-packages.js publish minor",
63
- "packages:publish:major": "node build-packages.js publish major",
64
- "packages:lint": "node build-packages.js lint",
65
- "packages:format": "node build-packages.js format",
66
- "packages:clean": "node build-packages.js clean",
67
- "packages:all": "node build-packages.js all",
68
- "packages:all:patch": "node build-packages.js all patch",
69
- "packages:all:minor": "node build-packages.js all minor",
70
- "packages:all:major": "node build-packages.js all major"
71
- },
72
- "devDependencies": {
73
- "@babel/eslint-parser": "^7.28.5",
74
- "@babel/preset-env": "^7.28.5",
75
- "@douyin-microapp/typings": "^1.3.1",
76
- "@eslint/js": "^9.39.1",
77
- "@rslib/core": "^0.18.5",
78
- "@rstest/core": "^0.7.2",
79
- "@singcl/ad-execute-manager": "^1.11.12",
80
- "eslint": "^9.39.2",
81
- "eslint-plugin-import": "^2.32.0",
82
- "globals": "^16.5.0",
83
- "prettier": "^3.7.3",
84
- "typescript": "^5.9.3"
85
- }
86
- }
1
+ {
2
+ "name": "@singcl/ad-execute-manager",
3
+ "version": "1.13.3",
4
+ "description": "A powerful and flexible ad execution management library for handling reward-based ads, interstitial ads, and other advertising formats in JavaScript applications.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.cjs",
10
+ "types": "./dist/index.d.ts"
11
+ }
12
+ },
13
+ "main": "./dist/index.cjs",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "author": {
19
+ "name": "singcl",
20
+ "email": "iambabyer@gmail.com",
21
+ "url": "https://github.com/singcl"
22
+ },
23
+ "license": "MIT",
24
+ "homepage": "https://npmx.dev/package/@singcl/ad-execute-manager",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/singcl/ad-execute-manager.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/singcl/ad-execute-manager/issues"
31
+ },
32
+ "engines": {
33
+ "node": ">=8.0.0",
34
+ "npm": ">=6.0.0",
35
+ "yarn": ">=1.0.0",
36
+ "pnpm": ">=8.0.0"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "keywords": [
42
+ "ad",
43
+ "advertisement",
44
+ "reward-ad",
45
+ "interstitial-ad",
46
+ "ad-manager",
47
+ "ad-execution",
48
+ "javascript",
49
+ "nodejs"
50
+ ],
51
+ "scripts": {
52
+ "build": "rslib build && tsc",
53
+ "dev": "rslib build --watch",
54
+ "format": "prettier --write .",
55
+ "lint": "eslint .",
56
+ "test": "rstest",
57
+ "prepublishOnly": "npm i && npm run build",
58
+ "packages:install": "node build-packages.js install",
59
+ "packages:build": "node build-packages.js build",
60
+ "packages:publish": "node build-packages.js publish",
61
+ "packages:publish:patch": "node build-packages.js publish patch",
62
+ "packages:publish:minor": "node build-packages.js publish minor",
63
+ "packages:publish:major": "node build-packages.js publish major",
64
+ "packages:lint": "node build-packages.js lint",
65
+ "packages:format": "node build-packages.js format",
66
+ "packages:clean": "node build-packages.js clean",
67
+ "packages:all": "node build-packages.js all",
68
+ "packages:all:patch": "node build-packages.js all patch",
69
+ "packages:all:minor": "node build-packages.js all minor",
70
+ "packages:all:major": "node build-packages.js all major"
71
+ },
72
+ "devDependencies": {
73
+ "@babel/eslint-parser": "^7.28.5",
74
+ "@babel/preset-env": "^7.28.5",
75
+ "@douyin-microapp/typings": "^1.3.1",
76
+ "@eslint/js": "^9.39.1",
77
+ "@rslib/core": "^0.18.5",
78
+ "@rstest/core": "^0.7.2",
79
+ "@singcl/ad-execute-manager": "^1.11.12",
80
+ "eslint": "^9.39.2",
81
+ "eslint-plugin-import": "^2.32.0",
82
+ "globals": "^16.5.0",
83
+ "prettier": "^3.7.3",
84
+ "typescript": "^5.9.3"
85
+ }
86
+ }