@choiceform/os-client-core 3.4.2 → 3.4.6

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/index.d.ts CHANGED
@@ -382,6 +382,13 @@ interface CFEnvNetWork {
382
382
  * 默认行为:什么也不做
383
383
  */
384
384
  closeSocket?(): void;
385
+ /**
386
+ * 推动socket消息的方法
387
+ * 默认行为:什么也不做
388
+ * @param message 消息名
389
+ * @param payload 附带的数据
390
+ */
391
+ pushSocket?(message:string, payload: object): void;
385
392
  }
386
393
  /**
387
394
  * 授权相关的配置,不同的运行平台有不同的账户系统,所以授权方式也不一样。
@@ -603,10 +610,6 @@ interface CFEnvOptions {
603
610
  * 服务配置信息
604
611
  */
605
612
  interface CFHostConfig {
606
- /**
607
- * 错误统计服务key
608
- */
609
- readonly sentryKey: string;
610
613
  /**
611
614
  * 操作记录接口地址
612
615
  */
@@ -5802,10 +5805,6 @@ interface CFQuestion extends ICFNode, ICFTypeInfo {
5802
5805
  * 前一道题
5803
5806
  */
5804
5807
  readonly prev: CFQuestion;
5805
- /**
5806
- * 后一道题
5807
- */
5808
- readonly next: CFQuestion;
5809
5808
  /**
5810
5809
  * 编号,该题的唯一代号
5811
5810
  * 如果有该属性,UI要渲染
@@ -6854,17 +6853,6 @@ interface ICFRandomHub extends ICFRandomNode, CFQuestion {
6854
6853
  readonly origin: ICFRandomNode;
6855
6854
  }
6856
6855
 
6857
- /**
6858
- * 虚拟奖励问题
6859
- * @ignore
6860
- */
6861
- interface ICFGiftHub extends ICFGiftNode, CFQuestion {
6862
- /**
6863
- * 是否获取短信失败
6864
- */
6865
- readonly messageGetFailed: boolean;
6866
- }
6867
-
6868
6856
  /**
6869
6857
  * @ignore
6870
6858
  * 虚拟逻辑题
@@ -7571,6 +7559,7 @@ interface ICFRewardInfo extends ICFGiftNode, ICFLotteryResult, ICFCustomLogo {
7571
7559
  * 渲染奖励信息
7572
7560
  */
7573
7561
  interface CFRewardState extends ICFRewardInfo, CFStateBase {
7562
+ readonly renderId: string;
7574
7563
  /**
7575
7564
  * 奖励类型,包含以下两种类型
7576
7565
  * 需要根据该类型渲染不同的内容.
@@ -7629,6 +7618,10 @@ interface CFRewardState extends ICFRewardInfo, CFStateBase {
7629
7618
  * @ignore 该属性只在此核心项目中编程时使用,不会包含到发布后的包中
7630
7619
  */
7631
7620
  readonly language: string;
7621
+ /**
7622
+ * 是否获取短信失败
7623
+ */
7624
+ readonly messageGetFailed?: boolean;
7632
7625
  }
7633
7626
 
7634
7627
 
@@ -7734,6 +7727,14 @@ interface ICFStartMiniState extends ICFCustomLogo {
7734
7727
  */
7735
7728
  interface CFStartState extends ICFTranMiniState, ICFStartMiniIntro, CFStateBase, ICFCustomLogo {
7736
7729
  readonly core?: CFCore;
7730
+ /**
7731
+ * 开始节点的类型
7732
+ */
7733
+ readonly type: NODE_TYPE;
7734
+ /**
7735
+ * 开始节点的名称
7736
+ */
7737
+ readonly nodeName:string;
7737
7738
  /**
7738
7739
  * 开始节点的布局设置
7739
7740
  */
@@ -9387,9 +9388,10 @@ interface CFUIEventHandler {
9387
9388
  /**
9388
9389
  * 获取验证码按钮点击回调,适用题目,验证节点,奖励节点
9389
9390
  * 回调中逻辑层会去获取短信验证码或者图片验证码
9390
- * @param question 所在题目
9391
+ * 当发送成功会返回Promise<true>,否则返回Promise<false>
9392
+ * @param target 使用短信的对象
9391
9393
  */
9392
- handleGetCodeClick?(question: CFQuestion): Promise<void>;
9394
+ handleGetCodeClick?(target: CFVerifyQuestion | CFRewardState): Promise<boolean>;
9393
9395
 
9394
9396
  /**
9395
9397
  * 选项输入回调函数:适用题目填空题,打分题,数值分配题,连续评价题,上传题,输入方式排序或挑选方式排序的排序题以及有其他选项需要输入的题型
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@choiceform/os-client-core",
3
- "version": "3.4.2",
4
- "description": "choice form survey client core",
3
+ "version": "3.4.6",
4
+ "description": "choiceform survey client core",
5
5
  "main": "./dist/core.js",
6
6
  "repository": "https://github.com/choice-form/os-client-core",
7
7
  "author": "fenyiwudian <laiq@cform.io>",
@@ -42,6 +42,7 @@
42
42
  "@babel/preset-env": "^7.10.4",
43
43
  "@babel/runtime": "^7.12.1",
44
44
  "@types/node-fetch": "^2.5.8",
45
+ "@types/phoenix": "^1.5.3",
45
46
  "@typescript-eslint/eslint-plugin": "^4.31.0",
46
47
  "@typescript-eslint/parser": "^4.31.0",
47
48
  "babel-loader": "^8.1.0",
@@ -60,7 +61,7 @@
60
61
  "messageformat": "^2.3.0",
61
62
  "node-fetch": "^2.6.1",
62
63
  "pako": "^1.0.10",
63
- "phoenix": "^1.5.3",
64
+ "phoenix": "^1.6.2",
64
65
  "prettier": "^2.3.2",
65
66
  "typedoc": "^0.15.0",
66
67
  "ua-parser-js": "^0.7.20"
@@ -72,4 +73,4 @@
72
73
  "webpack-cli": "^4.8.0",
73
74
  "webpack-dev-server": "^4.1.1"
74
75
  }
75
- }
76
+ }