@yagolive/event-kit 1.0.9 → 1.0.10
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/CHANGELOG.md +32 -0
- package/README.md +18 -2
- package/dist/js/action_bridge.umd.js +47 -3
- package/dist/js/action_creator.umd.js +35 -3
- package/package.json +8 -8
- package/src/bridge/ActionBridge.js +14 -0
- package/src/bridge/index.d.ts +6 -1
- package/src/core/ActionCreator.js +16 -0
- package/src/core/index.d.ts +14 -1
- package/src/core/index.js +1 -0
- package/src/core/types/VerifyTradePassword.js +16 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## @1.0.10 (2026-07-02)
|
|
4
|
+
|
|
5
|
+
### 新增
|
|
6
|
+
|
|
7
|
+
- **VerifyTradePassword Action(验证交易密码)**: 新增验证交易密码动作类型
|
|
8
|
+
- `ActionType.VERIFY_TRADE_PASSWORD` = `'verify_trade_password'`
|
|
9
|
+
- `VerifyTradePassword` 数据类:仅含 `text` 可选字段(继承自 `Base`)
|
|
10
|
+
- `ActionCreator.buildVerifyTradePassword()`、`createVerifyTradePasswordAction()`、`createVerifyTradePasswordActionWithData()`
|
|
11
|
+
- `ActionBridge.verifyTradePassword()`、`buildVerifyTradePassword()`、`createVerifyTradePasswordAction()`、`createVerifyTradePasswordActionWithData()`
|
|
12
|
+
|
|
13
|
+
### Action 类型完整列表
|
|
14
|
+
|
|
15
|
+
| 类型 | 字段 | 说明 |
|
|
16
|
+
|------|------|------|
|
|
17
|
+
| jump | path: string, text?: string | 页面跳转 |
|
|
18
|
+
| navigate | screen: string, params?: Record, text?: string | 导航到指定屏幕 |
|
|
19
|
+
| replace | screen: string, params?: Record, text?: string | 替换当前页面 |
|
|
20
|
+
| goback | text?: string | 返回上一页 |
|
|
21
|
+
| enter_room | id?: number, match?: string, callbacks?: Record, useReplace?: boolean, text?: string | 进入房间 |
|
|
22
|
+
| live_detect | text?: string | 活体检测 |
|
|
23
|
+
| onelink | url: string, share?: boolean, text?: string | 分享链接 |
|
|
24
|
+
| ask | id: number, title?: string, message?: string, accepted?: boolean, text?: string | 通用询问(邀请、审核) |
|
|
25
|
+
| agency_invite | id: number, type: string, title?: string, message?: string, agencyInfo?: AgencyInfo, accepted?: boolean, text?: string | 工会邀请 |
|
|
26
|
+
| recharge | text?: string | 充值操作 |
|
|
27
|
+
| close | text?: string | 关闭 WebView 窗口(addon 附加) |
|
|
28
|
+
| config | theme?: 'dark' \| 'light', brandColor?: string, tintColor?: string, title?: string, text?: string | 配置 WebView 主题(addon 附加) |
|
|
29
|
+
| track | name: string, params?: Record, options?: Record, text?: string | 统计事件上报 |
|
|
30
|
+
| grant_benefits | benefits: any[], title?: string, message?: string, okAction?: Action, closeable?: boolean, duration?: number, theme?: { image, tintColor, buttonImage?, topInset? }, text?: string | 权益下发 |
|
|
31
|
+
| verify_trade_password | text?: string | 验证交易密码 |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
3
35
|
## @1.0.9 (2026-06-24)
|
|
4
36
|
|
|
5
37
|
### 新增
|
package/README.md
CHANGED
|
@@ -169,8 +169,8 @@ import { ActionCreator } from '@yagolive/event-kit';
|
|
|
169
169
|
|
|
170
170
|
| 属性 | 类型 | 说明 |
|
|
171
171
|
|------|------|------|
|
|
172
|
-
| `ActionData` | Object | 包含所有数据类型类:Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits |
|
|
173
|
-
| `ActionType` | Object | Action 类型枚举:JUMP, NAVIGATE, REPLACE, GOBACK, ENTER_ROOM, LIVE_DETECT, ONELINK, ASK, AGENCY_INVITE, RECHARGE, CLOSE, CONFIG, TRACK, GRANT_BENEFITS |
|
|
172
|
+
| `ActionData` | Object | 包含所有数据类型类:Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits, VerifyTradePassword |
|
|
173
|
+
| `ActionType` | Object | Action 类型枚举:JUMP, NAVIGATE, REPLACE, GOBACK, ENTER_ROOM, LIVE_DETECT, ONELINK, ASK, AGENCY_INVITE, RECHARGE, CLOSE, CONFIG, TRACK, GRANT_BENEFITS, VERIFY_TRADE_PASSWORD |
|
|
174
174
|
|
|
175
175
|
#### 工厂方法
|
|
176
176
|
|
|
@@ -220,6 +220,9 @@ import { ActionCreator } from '@yagolive/event-kit';
|
|
|
220
220
|
| `buildGrantBenefits(benefits)` | benefits: any[] | GrantBenefits | 构建 GrantBenefits 对象(链式配置) |
|
|
221
221
|
| `createGrantBenefitsAction(benefits)` | benefits: any[] | Action | 创建权益下发 Action |
|
|
222
222
|
| `createGrantBenefitsActionWithData(grantBenefits)` | grantBenefits: GrantBenefits | Action | 从 GrantBenefits 对象创建 Action |
|
|
223
|
+
| `buildVerifyTradePassword()` | - | VerifyTradePassword | 构建 VerifyTradePassword 对象(链式配置) |
|
|
224
|
+
| `createVerifyTradePasswordAction()` | - | Action | 创建验证交易密码 Action |
|
|
225
|
+
| `createVerifyTradePasswordActionWithData(verifyTradePassword)` | verifyTradePassword: VerifyTradePassword | Action | 从 VerifyTradePassword 对象创建 Action |
|
|
223
226
|
|
|
224
227
|
#### 使用示例
|
|
225
228
|
|
|
@@ -267,6 +270,7 @@ ActionType.CLOSE // 'close' (addon)
|
|
|
267
270
|
ActionType.CONFIG // 'config' (addon)
|
|
268
271
|
ActionType.TRACK // 'track'
|
|
269
272
|
ActionType.GRANT_BENEFITS // 'grant_benefits'
|
|
273
|
+
ActionType.VERIFY_TRADE_PASSWORD // 'verify_trade_password'
|
|
270
274
|
```
|
|
271
275
|
|
|
272
276
|
### ActionBridge
|
|
@@ -355,6 +359,9 @@ new ActionBridge(adapter, options?)
|
|
|
355
359
|
| `grantBenefits(benefits, options?)` | benefits: any[], options?: { title?, message?, okAction?, closeable?, duration?, theme?, text? } | Promise | 权益下发 |
|
|
356
360
|
| `buildGrantBenefits(benefits)` | benefits: any[] | GrantBenefits | 构建 GrantBenefits 对象(链式配置) |
|
|
357
361
|
| `createGrantBenefitsActionWithData(grantBenefits)` | grantBenefits: GrantBenefits | Action | 从 GrantBenefits 对象创建 Action(不自动发送) |
|
|
362
|
+
| `verifyTradePassword()` | - | Promise | 验证交易密码 |
|
|
363
|
+
| `buildVerifyTradePassword()` | - | VerifyTradePassword | 构建 VerifyTradePassword 对象(链式配置) |
|
|
364
|
+
| `createVerifyTradePasswordActionWithData(verifyTradePassword)` | verifyTradePassword: VerifyTradePassword | Action | 从 VerifyTradePassword 对象创建 Action(不自动发送) |
|
|
358
365
|
|
|
359
366
|
#### 静态方法
|
|
360
367
|
|
|
@@ -812,6 +819,15 @@ Onelink Action 数据。
|
|
|
812
819
|
| `setButtonImage(buttonImage)` | buttonImage: string | 设置按钮图片,返回 this |
|
|
813
820
|
| `setTopInset(topInset)` | topInset: number | 设置头部高度(默认 196),返回 this |
|
|
814
821
|
|
|
822
|
+
### VerifyTradePassword
|
|
823
|
+
|
|
824
|
+
验证交易密码 Action 数据。
|
|
825
|
+
|
|
826
|
+
| 方法 | 参数 | 说明 |
|
|
827
|
+
|------|------|------|
|
|
828
|
+
| `constructor()` | - | 创建验证交易密码数据 |
|
|
829
|
+
| `setText(text)` | text: string | 设置显示文本,返回 this |
|
|
830
|
+
|
|
815
831
|
### Action
|
|
816
832
|
|
|
817
833
|
Action 对象,封装类型和数据。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* YAGO Event Kit - Action Bridge (Full)
|
|
3
|
-
* @version 1.0.
|
|
3
|
+
* @version 1.0.10
|
|
4
4
|
*
|
|
5
5
|
* Generated by build script - do not edit manually.
|
|
6
6
|
* Supports: Browser script tag, CommonJS, AMD
|
|
@@ -839,6 +839,26 @@ var GrantBenefits = class {
|
|
|
839
839
|
GrantBenefits.Theme = Theme;
|
|
840
840
|
var GrantBenefits_default = GrantBenefits;
|
|
841
841
|
|
|
842
|
+
// src/core/types/VerifyTradePassword.js
|
|
843
|
+
var VerifyTradePassword = class {
|
|
844
|
+
constructor() {
|
|
845
|
+
this.text = null;
|
|
846
|
+
}
|
|
847
|
+
getText() {
|
|
848
|
+
return this.text;
|
|
849
|
+
}
|
|
850
|
+
setText(text) {
|
|
851
|
+
this.text = text;
|
|
852
|
+
return this;
|
|
853
|
+
}
|
|
854
|
+
toMap() {
|
|
855
|
+
const map = {};
|
|
856
|
+
if (this.text != null) map.text = this.text;
|
|
857
|
+
return map;
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
var VerifyTradePassword_default = VerifyTradePassword;
|
|
861
|
+
|
|
842
862
|
// src/core/types/Action.js
|
|
843
863
|
var Action = class {
|
|
844
864
|
constructor(type, data) {
|
|
@@ -890,7 +910,8 @@ var ActionType = {
|
|
|
890
910
|
CLOSE: "close",
|
|
891
911
|
CONFIG: "config",
|
|
892
912
|
TRACK: "track",
|
|
893
|
-
GRANT_BENEFITS: "grant_benefits"
|
|
913
|
+
GRANT_BENEFITS: "grant_benefits",
|
|
914
|
+
VERIFY_TRADE_PASSWORD: "verify_trade_password"
|
|
894
915
|
};
|
|
895
916
|
var ActionData = {
|
|
896
917
|
Jump: Jump_default,
|
|
@@ -906,7 +927,8 @@ var ActionData = {
|
|
|
906
927
|
Close: Close_default,
|
|
907
928
|
Config: Config_default,
|
|
908
929
|
Track: Track_default,
|
|
909
|
-
GrantBenefits: GrantBenefits_default
|
|
930
|
+
GrantBenefits: GrantBenefits_default,
|
|
931
|
+
VerifyTradePassword: VerifyTradePassword_default
|
|
910
932
|
};
|
|
911
933
|
var ActionCreator = {
|
|
912
934
|
ActionData,
|
|
@@ -1058,6 +1080,16 @@ var ActionCreator = {
|
|
|
1058
1080
|
},
|
|
1059
1081
|
createGrantBenefitsActionWithData(grantBenefits) {
|
|
1060
1082
|
return new Action_default(ActionType.GRANT_BENEFITS, grantBenefits);
|
|
1083
|
+
},
|
|
1084
|
+
// VerifyTradePassword
|
|
1085
|
+
buildVerifyTradePassword() {
|
|
1086
|
+
return new VerifyTradePassword_default();
|
|
1087
|
+
},
|
|
1088
|
+
createVerifyTradePasswordAction() {
|
|
1089
|
+
return new Action_default(ActionType.VERIFY_TRADE_PASSWORD, new VerifyTradePassword_default());
|
|
1090
|
+
},
|
|
1091
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword) {
|
|
1092
|
+
return new Action_default(ActionType.VERIFY_TRADE_PASSWORD, verifyTradePassword);
|
|
1061
1093
|
}
|
|
1062
1094
|
};
|
|
1063
1095
|
|
|
@@ -1441,6 +1473,18 @@ var ActionBridge = class _ActionBridge {
|
|
|
1441
1473
|
createGrantBenefitsActionWithData(grantBenefits) {
|
|
1442
1474
|
return ActionCreator.createGrantBenefitsActionWithData(grantBenefits);
|
|
1443
1475
|
}
|
|
1476
|
+
verifyTradePassword() {
|
|
1477
|
+
return this._adapter.sendAction(ActionCreator.createVerifyTradePasswordAction());
|
|
1478
|
+
}
|
|
1479
|
+
buildVerifyTradePassword() {
|
|
1480
|
+
return ActionCreator.buildVerifyTradePassword();
|
|
1481
|
+
}
|
|
1482
|
+
createVerifyTradePasswordAction() {
|
|
1483
|
+
return ActionCreator.createVerifyTradePasswordAction();
|
|
1484
|
+
}
|
|
1485
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword) {
|
|
1486
|
+
return ActionCreator.createVerifyTradePasswordActionWithData(verifyTradePassword);
|
|
1487
|
+
}
|
|
1444
1488
|
destroy() {
|
|
1445
1489
|
if (typeof this._adapter.destroy === "function") {
|
|
1446
1490
|
this._adapter.destroy();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* YAGO Event Kit - Action Creator (Core Only)
|
|
3
|
-
* @version 1.0.
|
|
3
|
+
* @version 1.0.10
|
|
4
4
|
*
|
|
5
5
|
* Generated by build script - do not edit manually.
|
|
6
6
|
* Supports: Browser script tag, CommonJS, AMD
|
|
@@ -839,6 +839,26 @@ var GrantBenefits = class {
|
|
|
839
839
|
GrantBenefits.Theme = Theme;
|
|
840
840
|
var GrantBenefits_default = GrantBenefits;
|
|
841
841
|
|
|
842
|
+
// src/core/types/VerifyTradePassword.js
|
|
843
|
+
var VerifyTradePassword = class {
|
|
844
|
+
constructor() {
|
|
845
|
+
this.text = null;
|
|
846
|
+
}
|
|
847
|
+
getText() {
|
|
848
|
+
return this.text;
|
|
849
|
+
}
|
|
850
|
+
setText(text) {
|
|
851
|
+
this.text = text;
|
|
852
|
+
return this;
|
|
853
|
+
}
|
|
854
|
+
toMap() {
|
|
855
|
+
const map = {};
|
|
856
|
+
if (this.text != null) map.text = this.text;
|
|
857
|
+
return map;
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
var VerifyTradePassword_default = VerifyTradePassword;
|
|
861
|
+
|
|
842
862
|
// src/core/types/Action.js
|
|
843
863
|
var Action = class {
|
|
844
864
|
constructor(type, data) {
|
|
@@ -890,7 +910,8 @@ var ActionType = {
|
|
|
890
910
|
CLOSE: "close",
|
|
891
911
|
CONFIG: "config",
|
|
892
912
|
TRACK: "track",
|
|
893
|
-
GRANT_BENEFITS: "grant_benefits"
|
|
913
|
+
GRANT_BENEFITS: "grant_benefits",
|
|
914
|
+
VERIFY_TRADE_PASSWORD: "verify_trade_password"
|
|
894
915
|
};
|
|
895
916
|
var ActionData = {
|
|
896
917
|
Jump: Jump_default,
|
|
@@ -906,7 +927,8 @@ var ActionData = {
|
|
|
906
927
|
Close: Close_default,
|
|
907
928
|
Config: Config_default,
|
|
908
929
|
Track: Track_default,
|
|
909
|
-
GrantBenefits: GrantBenefits_default
|
|
930
|
+
GrantBenefits: GrantBenefits_default,
|
|
931
|
+
VerifyTradePassword: VerifyTradePassword_default
|
|
910
932
|
};
|
|
911
933
|
var ActionCreator = {
|
|
912
934
|
ActionData,
|
|
@@ -1058,6 +1080,16 @@ var ActionCreator = {
|
|
|
1058
1080
|
},
|
|
1059
1081
|
createGrantBenefitsActionWithData(grantBenefits) {
|
|
1060
1082
|
return new Action_default(ActionType.GRANT_BENEFITS, grantBenefits);
|
|
1083
|
+
},
|
|
1084
|
+
// VerifyTradePassword
|
|
1085
|
+
buildVerifyTradePassword() {
|
|
1086
|
+
return new VerifyTradePassword_default();
|
|
1087
|
+
},
|
|
1088
|
+
createVerifyTradePasswordAction() {
|
|
1089
|
+
return new Action_default(ActionType.VERIFY_TRADE_PASSWORD, new VerifyTradePassword_default());
|
|
1090
|
+
},
|
|
1091
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword) {
|
|
1092
|
+
return new Action_default(ActionType.VERIFY_TRADE_PASSWORD, verifyTradePassword);
|
|
1061
1093
|
}
|
|
1062
1094
|
};
|
|
1063
1095
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagolive/event-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "YAGO Event Kit - 跨环境 Action 创建与通信工具库,支持浏览器、React、Vue",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"browser": "dist/js/action_bridge.umd.js",
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
"dist/",
|
|
11
11
|
"CHANGELOG.md"
|
|
12
12
|
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "node scripts/build.js --watch && npx serve .",
|
|
15
|
+
"build": "node scripts/build.js",
|
|
16
|
+
"build:core": "node scripts/build.js --core",
|
|
17
|
+
"build:bridge": "node scripts/build.js --bridge",
|
|
18
|
+
"build:watch": "node scripts/build.js --watch"
|
|
19
|
+
},
|
|
13
20
|
"exports": {
|
|
14
21
|
".": {
|
|
15
22
|
"types": "./src/index.d.ts",
|
|
@@ -71,13 +78,6 @@
|
|
|
71
78
|
"optional": true
|
|
72
79
|
}
|
|
73
80
|
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"dev": "node scripts/build.js --watch && npx serve .",
|
|
76
|
-
"build": "node scripts/build.js",
|
|
77
|
-
"build:core": "node scripts/build.js --core",
|
|
78
|
-
"build:bridge": "node scripts/build.js --bridge",
|
|
79
|
-
"build:watch": "node scripts/build.js --watch"
|
|
80
|
-
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"esbuild": "^0.25.0"
|
|
83
83
|
},
|
|
@@ -282,6 +282,20 @@ export default class ActionBridge {
|
|
|
282
282
|
return ActionCreator.createGrantBenefitsActionWithData(grantBenefits);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
verifyTradePassword() {
|
|
286
|
+
return this._adapter.sendAction(ActionCreator.createVerifyTradePasswordAction());
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
buildVerifyTradePassword() {
|
|
290
|
+
return ActionCreator.buildVerifyTradePassword();
|
|
291
|
+
}
|
|
292
|
+
createVerifyTradePasswordAction() {
|
|
293
|
+
return ActionCreator.createVerifyTradePasswordAction();
|
|
294
|
+
}
|
|
295
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword) {
|
|
296
|
+
return ActionCreator.createVerifyTradePasswordActionWithData(verifyTradePassword);
|
|
297
|
+
}
|
|
298
|
+
|
|
285
299
|
destroy() {
|
|
286
300
|
if (typeof this._adapter.destroy === 'function') {
|
|
287
301
|
this._adapter.destroy();
|
package/src/bridge/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Action, Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits,
|
|
2
|
+
Action, Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits, VerifyTradePassword,
|
|
3
3
|
ActionType, ActionData, ActionCreator,
|
|
4
4
|
} from '../core/index.js';
|
|
5
5
|
import { IActionAdapter, RNWebViewAdapter, MockAdapter, AdapterOptions, SendActionOption } from '../adapters/index.js';
|
|
@@ -87,6 +87,11 @@ export declare class ActionBridge {
|
|
|
87
87
|
createGrantBenefitsAction(benefits: any[]): Action;
|
|
88
88
|
createGrantBenefitsActionWithData(grantBenefits: GrantBenefits): Action;
|
|
89
89
|
|
|
90
|
+
verifyTradePassword(): Promise<any>;
|
|
91
|
+
buildVerifyTradePassword(): VerifyTradePassword;
|
|
92
|
+
createVerifyTradePasswordAction(): Action;
|
|
93
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword: VerifyTradePassword): Action;
|
|
94
|
+
|
|
90
95
|
destroy(): void;
|
|
91
96
|
|
|
92
97
|
static ActionCreator: typeof ActionCreator;
|
|
@@ -12,6 +12,7 @@ import Close from './types/Close.js';
|
|
|
12
12
|
import Config from './types/Config.js';
|
|
13
13
|
import Track from './types/Track.js';
|
|
14
14
|
import GrantBenefits from './types/GrantBenefits.js';
|
|
15
|
+
import VerifyTradePassword from './types/VerifyTradePassword.js';
|
|
15
16
|
import Action from './types/Action.js';
|
|
16
17
|
|
|
17
18
|
const ActionType = {
|
|
@@ -29,6 +30,7 @@ const ActionType = {
|
|
|
29
30
|
CONFIG: 'config',
|
|
30
31
|
TRACK: 'track',
|
|
31
32
|
GRANT_BENEFITS: 'grant_benefits',
|
|
33
|
+
VERIFY_TRADE_PASSWORD: 'verify_trade_password',
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
const ActionData = {
|
|
@@ -46,6 +48,7 @@ const ActionData = {
|
|
|
46
48
|
Config,
|
|
47
49
|
Track,
|
|
48
50
|
GrantBenefits,
|
|
51
|
+
VerifyTradePassword,
|
|
49
52
|
};
|
|
50
53
|
|
|
51
54
|
const ActionCreator = {
|
|
@@ -243,6 +246,19 @@ const ActionCreator = {
|
|
|
243
246
|
createGrantBenefitsActionWithData(grantBenefits) {
|
|
244
247
|
return new Action(ActionType.GRANT_BENEFITS, grantBenefits);
|
|
245
248
|
},
|
|
249
|
+
|
|
250
|
+
// VerifyTradePassword
|
|
251
|
+
buildVerifyTradePassword() {
|
|
252
|
+
return new VerifyTradePassword();
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
createVerifyTradePasswordAction() {
|
|
256
|
+
return new Action(ActionType.VERIFY_TRADE_PASSWORD, new VerifyTradePassword());
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword) {
|
|
260
|
+
return new Action(ActionType.VERIFY_TRADE_PASSWORD, verifyTradePassword);
|
|
261
|
+
},
|
|
246
262
|
};
|
|
247
263
|
|
|
248
264
|
export { ActionCreator, ActionData, ActionType };
|
package/src/core/index.d.ts
CHANGED
|
@@ -309,6 +309,14 @@ export class GrantBenefits {
|
|
|
309
309
|
toMap(): Record<string, any>;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
+
export class VerifyTradePassword {
|
|
313
|
+
constructor();
|
|
314
|
+
text: string | null;
|
|
315
|
+
getText(): string | null;
|
|
316
|
+
setText(text: string): this;
|
|
317
|
+
toMap(): Record<string, any>;
|
|
318
|
+
}
|
|
319
|
+
|
|
312
320
|
export class Action {
|
|
313
321
|
constructor(type: ActionTypeValue, data: any);
|
|
314
322
|
type: ActionTypeValue;
|
|
@@ -322,7 +330,7 @@ export class Action {
|
|
|
322
330
|
toJson(): string;
|
|
323
331
|
}
|
|
324
332
|
|
|
325
|
-
export type ActionTypeValue = 'jump' | 'navigate' | 'replace' | 'goback' | 'enter_room' | 'live_detect' | 'onelink' | 'ask' | 'agency_invite' | 'recharge' | 'close' | 'config' | 'track' | 'grant_benefits';
|
|
333
|
+
export type ActionTypeValue = 'jump' | 'navigate' | 'replace' | 'goback' | 'enter_room' | 'live_detect' | 'onelink' | 'ask' | 'agency_invite' | 'recharge' | 'close' | 'config' | 'track' | 'grant_benefits' | 'verify_trade_password';
|
|
326
334
|
|
|
327
335
|
export const ActionType: {
|
|
328
336
|
JUMP: 'jump';
|
|
@@ -339,6 +347,7 @@ export const ActionType: {
|
|
|
339
347
|
CONFIG: 'config';
|
|
340
348
|
TRACK: 'track';
|
|
341
349
|
GRANT_BENEFITS: 'grant_benefits';
|
|
350
|
+
VERIFY_TRADE_PASSWORD: 'verify_trade_password';
|
|
342
351
|
};
|
|
343
352
|
|
|
344
353
|
export const ActionData: {
|
|
@@ -356,6 +365,7 @@ export const ActionData: {
|
|
|
356
365
|
Config: typeof Config;
|
|
357
366
|
Track: typeof Track;
|
|
358
367
|
GrantBenefits: typeof GrantBenefits;
|
|
368
|
+
VerifyTradePassword: typeof VerifyTradePassword;
|
|
359
369
|
};
|
|
360
370
|
|
|
361
371
|
export const ActionCreator: {
|
|
@@ -405,4 +415,7 @@ export const ActionCreator: {
|
|
|
405
415
|
buildGrantBenefits(benefits: any[]): GrantBenefits;
|
|
406
416
|
createGrantBenefitsAction(benefits: any[]): Action;
|
|
407
417
|
createGrantBenefitsActionWithData(grantBenefits: GrantBenefits): Action;
|
|
418
|
+
buildVerifyTradePassword(): VerifyTradePassword;
|
|
419
|
+
createVerifyTradePasswordAction(): Action;
|
|
420
|
+
createVerifyTradePasswordActionWithData(verifyTradePassword: VerifyTradePassword): Action;
|
|
408
421
|
};
|
package/src/core/index.js
CHANGED
|
@@ -13,4 +13,5 @@ export { default as Close } from './types/Close.js';
|
|
|
13
13
|
export { default as Config } from './types/Config.js';
|
|
14
14
|
export { default as Track } from './types/Track.js';
|
|
15
15
|
export { default as GrantBenefits } from './types/GrantBenefits.js';
|
|
16
|
+
export { default as VerifyTradePassword } from './types/VerifyTradePassword.js';
|
|
16
17
|
export { default as Action } from './types/Action.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class VerifyTradePassword {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.text = null;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
getText() { return this.text; }
|
|
7
|
+
setText(text) { this.text = text; return this; }
|
|
8
|
+
|
|
9
|
+
toMap() {
|
|
10
|
+
const map = {};
|
|
11
|
+
if (this.text != null) map.text = this.text;
|
|
12
|
+
return map;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default VerifyTradePassword;
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ActionBridge } from './bridge/index.js';
|
|
2
|
-
export { ActionCreator, ActionData, ActionType, Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits, Action } from './core/index.js';
|
|
2
|
+
export { ActionCreator, ActionData, ActionType, Jump, Navigate, Replace, Goback, EnterRoom, LiveDetect, Onelink, Ask, AgencyInvite, Recharge, Close, Config, Track, GrantBenefits, VerifyTradePassword, Action } from './core/index.js';
|
|
3
3
|
export { RNWebViewAdapter, MockAdapter, IActionAdapter, MockCall } from './adapters/index.js';
|
|
4
4
|
export { ActionBridgeProvider, useActionBridge } from './integrations/react/index.js';
|
package/src/index.js
CHANGED
|
@@ -15,4 +15,5 @@ export { Close } from './core/index.js';
|
|
|
15
15
|
export { Config } from './core/index.js';
|
|
16
16
|
export { Track } from './core/index.js';
|
|
17
17
|
export { GrantBenefits } from './core/index.js';
|
|
18
|
+
export { VerifyTradePassword } from './core/index.js';
|
|
18
19
|
export { Action } from './core/index.js';
|