@choiceform/os-client-core 3.4.10 → 3.4.12

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
@@ -4254,7 +4254,11 @@ interface ICFSlideRateNode extends ICFSubjectNode, ICFFillNodeMixin {
4254
4254
  * 奖励节点
4255
4255
  * @ignore
4256
4256
  */
4257
- interface ICFGiftNode extends ICFInputNodeMixin {
4257
+ interface ICFGiftNode extends ICFInputNodeMixin, IOriginCustomLogo {
4258
+ /**
4259
+ * 自带的多语言翻译包,可以不需要请求大翻译包就实现开始页面的语言切换。
4260
+ */
4261
+ readonly i18n?: any;
4258
4262
  /**
4259
4263
  * 结束按钮文字
4260
4264
  * @ignore
@@ -4282,7 +4286,7 @@ interface ICFGiftNode extends ICFInputNodeMixin {
4282
4286
  * 中奖id
4283
4287
  * @ignore
4284
4288
  */
4285
- readonly goalId: string;
4289
+ readonly rewardId: string;
4286
4290
  /**
4287
4291
  * 手机号码
4288
4292
  */
@@ -4307,6 +4311,7 @@ interface ICFGiftNode extends ICFInputNodeMixin {
4307
4311
  * @ignore
4308
4312
  */
4309
4313
  readonly needVerification: boolean;
4314
+
4310
4315
  }
4311
4316
 
4312
4317
  /**
@@ -4509,6 +4514,11 @@ interface ICFStartNode extends ICFNode, ICFStartMiniState, ICFOutputNodeMixin, C
4509
4514
  * @ignore
4510
4515
  */
4511
4516
  readonly logoText: string;
4517
+ /**
4518
+ * @ignore
4519
+ * 自定义logo的图片内容
4520
+ */
4521
+ readonly logoImage?: CFImageInNode;
4512
4522
  /**
4513
4523
  * @ignore
4514
4524
  */
@@ -4548,7 +4558,7 @@ interface ICFStartNode extends ICFNode, ICFStartMiniState, ICFOutputNodeMixin, C
4548
4558
  * 循环节点
4549
4559
  * @ignore
4550
4560
  */
4551
- interface ICFLoopNode extends ICFInOutNodeMixin , ICFOptNodeMixin {
4561
+ interface ICFLoopNode extends ICFInOutNodeMixin, ICFOptNodeMixin {
4552
4562
  readonly loopEnd: ICFPort;
4553
4563
  readonly loopStart: ICFPort;
4554
4564
  }
@@ -5721,7 +5731,6 @@ interface IQuestionCustomData {}
5721
5731
  * 题目基础类型
5722
5732
  */
5723
5733
  interface CFQuestion extends ICFNode, ICFTypeInfo {
5724
- readonly __ques__: true;
5725
5734
  /**
5726
5735
  * 预留,其实很多题目并不需要该属性
5727
5736
  */
@@ -5750,7 +5759,7 @@ interface CFQuestion extends ICFNode, ICFTypeInfo {
5750
5759
  * 原始节点
5751
5760
  * @ignore
5752
5761
  */
5753
- readonly origin: ICFNode;
5762
+ readonly origin: any;
5754
5763
  /**
5755
5764
  * 选择类型
5756
5765
  * 对于选择类型的题目有效,用于确定这是单选模式和多选模式
@@ -6518,20 +6527,16 @@ interface CFEndPage extends ICFEndNode, CFQuestion, CFMediaNodeMixin {
6518
6527
  * 如果有[[CFLotteryPage.qrCode]]属性,则需要将他渲染成二维码,并提示用户微信扫描二维码可以领奖
6519
6528
  */
6520
6529
  interface CFLotteryPage extends ICFLotteryNode, CFQuestion {
6521
- /**
6522
- * 中奖节点id
6523
- * @ignore
6524
- */
6525
- readonly rewardNodeId: string;
6530
+ readonly rewardRaw?: ICFRewardRaw;
6526
6531
  /**
6527
6532
  * 二维码信息,如有值,则需要渲染成二维码,并提示微信扫码可领取奖励.
6528
6533
  */
6529
- readonly qrCode: string;
6534
+ readonly qrCode?: string;
6530
6535
  /**
6531
6536
  * 跳转链接
6532
6537
  * @ignore
6533
6538
  */
6534
- readonly linkUrl: string;
6539
+ readonly linkUrl?: string;
6535
6540
  /**
6536
6541
  * 结束按钮文字
6537
6542
  * @ignore
@@ -6541,11 +6546,7 @@ interface CFLotteryPage extends ICFLotteryNode, CFQuestion {
6541
6546
  * 是否已中奖
6542
6547
  * @ignore
6543
6548
  */
6544
- readonly goal: boolean;
6545
- /**
6546
- * 活动名称
6547
- */
6548
- readonly activityName: string;
6549
+ readonly goal?: boolean;
6549
6550
  /**
6550
6551
  * 奖励名称
6551
6552
  */
@@ -6841,7 +6842,7 @@ interface ICFDataHub extends ICFSubjectNode, CFSubjectQuestion {
6841
6842
  * 虚拟循环题
6842
6843
  * @ignore
6843
6844
  */
6844
- interface ICFLoopHub extends ICFLoopNode, CFQuestion , ICFOptNodeMixin{
6845
+ interface ICFLoopHub extends ICFLoopNode, CFQuestion, ICFOptNodeMixin {
6845
6846
  /**
6846
6847
  * 包含的循环仰视变量列表
6847
6848
  */
@@ -7244,6 +7245,10 @@ interface ICFEmbedApi {
7244
7245
  * @ignore
7245
7246
  */
7246
7247
  interface CFStateBase {
7248
+ /**
7249
+ * 核心
7250
+ */
7251
+ readonly core?: CFCore;
7247
7252
  /**
7248
7253
  * UI交互回调函数
7249
7254
  */
@@ -7401,15 +7406,23 @@ interface CFRealtimeState extends CFSurveyState, CFStartState {
7401
7406
  * 自定义logo
7402
7407
  * @ignore
7403
7408
  */
7404
- interface ICFCustomLogo {
7409
+ interface ICFCustomLogoBase {
7405
7410
  /**
7406
7411
  * 是否使用自定义logo
7407
7412
  * @ignore
7408
7413
  */
7409
7414
  readonly useCustomLogo: boolean;
7415
+ }
7416
+
7417
+ interface IOriginCustomLogo extends ICFCustomLogoBase {
7418
+ readonly logoText?: string;
7419
+ readonly logoImage?: CFImageInNode;
7420
+ }
7421
+
7422
+ interface ICFCustomLogo extends ICFCustomLogoBase{
7410
7423
  /**
7411
- * 自定logo文字
7412
- */
7424
+ * 自定logo文字
7425
+ */
7413
7426
  readonly customText: string;
7414
7427
  /**
7415
7428
  * 自定logo图片地址
@@ -7423,10 +7436,10 @@ interface ICFCustomLogo {
7423
7436
  interface ICFRewardRaw {
7424
7437
  readonly id?: number;
7425
7438
  readonly gift_id?: string;
7426
- readonly code: string;
7427
- readonly type: GIFT_TYPE;
7428
- readonly lottery_id: string;
7429
- readonly lottery_option_id: string;
7439
+ readonly code?: string;
7440
+ readonly type?: GIFT_TYPE;
7441
+ readonly lottery_id?: string;
7442
+ readonly lottery_option_id?: string;
7430
7443
  }
7431
7444
 
7432
7445
  /**
@@ -7438,123 +7451,43 @@ interface ICFLotteryResult {
7438
7451
  readonly rewardImage?: CFImageInNode;
7439
7452
  }
7440
7453
 
7454
+
7441
7455
  /**
7442
7456
  * @ignore
7443
7457
  */
7444
- interface ICFRewardResult {
7458
+ interface ICFRedEnvelopeReward {
7445
7459
  readonly recipient?: CFUserInfo;
7460
+ readonly theme: CFTheme;
7446
7461
  gift?: {
7447
- readonly locale: string;
7448
- readonly id: string;
7462
+ readonly id: number;
7449
7463
  readonly title: string;
7450
7464
  readonly description: string;
7451
7465
  config: {
7452
7466
  readonly gift_name: string;
7453
7467
  };
7468
+ origin: ICFGiftNode
7454
7469
  };
7455
7470
  readonly amount?: number;
7456
7471
  readonly type?: GIFT_TYPE;
7457
7472
  }
7458
7473
 
7459
7474
  /**
7460
- * 奖励信息
7461
- * @ignore
7475
+ * 缓存的奖励信息,由于奖励页面会重开页面,内存会丢失,预览模式下和自定义奖励模式下后台是不给后续接口的,
7476
+ * 需要自己缓存关键信息用于展示奖励页面,正好这两种模式下都不会切换设备,所以用缓存也可以。
7477
+ *
7478
+ * 正式答题的红包奖励会使用后台后续接口给的信息,不会使用这些缓存信息。
7462
7479
  */
7463
- interface ICFRewardInfo extends ICFGiftNode, ICFLotteryResult, ICFCustomLogo {
7464
- readonly core?: CFCore;
7465
- /**
7466
- * @ignore
7467
- */
7468
- readonly goal: boolean;
7469
- /**
7470
- * @ignore
7471
- */
7472
- readonly goalId: string;
7473
- /**
7474
- * @ignore
7475
- */
7476
- readonly origin: ICFGiftNode;
7477
- /**
7478
- * 奖励标题
7479
- */
7480
- readonly rewardTitle: string;
7481
- /**
7482
- * 奖励描述
7483
- */
7484
- readonly rewardDescribe: string;
7485
- /**
7486
- * @ignore
7487
- */
7488
- readonly noWxShare: boolean;
7489
- /**
7490
- * @ignore
7491
- */
7492
- readonly wxShareInfo: ICFWxShareInfo;
7493
- /**
7494
- * @ignore
7495
- */
7496
- readonly quesTitle: string;
7497
- /**
7498
- * 图片列表
7499
- */
7500
- readonly images: CFImageInNode[];
7501
- /**
7502
- * 奖励名称
7503
- */
7504
- readonly rewardName: string;
7505
- /**
7506
- * 奖励数量
7507
- */
7508
- readonly rewardCount: number;
7509
- /**
7510
- * @ignore
7511
- */
7512
- readonly lotteryCount: number;
7513
- /**
7514
- * @ignore
7515
- */
7516
- readonly sendTime: string;
7517
- /**
7518
- * 奖励类型,UI根据此决定渲染方式
7519
- */
7520
- readonly rewardType: GIFT_TYPE;
7521
- /**
7522
- * @ignore
7523
- */
7524
- readonly verifyCode: string;
7525
- /**
7526
- * @ignore
7527
- */
7528
- readonly rewardNodeId: string;
7529
- /**
7530
- * @ignore
7531
- */
7532
- readonly logoUrl: string;
7533
- /**
7534
- * @ignore
7535
- */
7536
- readonly transactionID: string;
7537
- /**
7538
- * @ignore
7539
- * 问卷原始id
7540
- */
7541
- readonly surveyId: string;
7542
- /**
7543
- * 标题
7544
- */
7545
- readonly title: string;
7546
- /**
7547
- * @ignore
7548
- */
7549
- readonly companyID: string;
7550
- /**
7551
- * 活动名称
7552
- */
7553
- readonly activityName: string;
7480
+ interface ICFCachedReward {
7481
+ readonly custom?: ICFCustomReward;
7482
+ readonly redEnvelope?: ICFRedEnvelopeReward;
7483
+ }
7554
7484
 
7555
- readonly summary: string;
7556
7485
 
7557
- readonly language: string;
7486
+ interface ICFCustomReward {
7487
+ readonly qrCode: string;
7488
+ readonly theme: CFTheme;
7489
+ readonly giftNode: ICFGiftNode;
7490
+ readonly rewardId: number;
7558
7491
  }
7559
7492
 
7560
7493
  /**
@@ -7562,8 +7495,18 @@ interface ICFRewardInfo extends ICFGiftNode, ICFLotteryResult, ICFCustomLogo {
7562
7495
  *
7563
7496
  * 渲染奖励信息
7564
7497
  */
7565
- interface CFRewardState extends ICFRewardInfo, CFStateBase {
7498
+ interface CFRewardState extends CFStateBase, ICFCustomLogo {
7499
+ readonly quesTitle: string;
7500
+ readonly nodeName: string;
7501
+ readonly type: NODE_TYPE;
7502
+ readonly layout: CFNodeLayout;
7503
+ readonly template?: CFNodeTemplate;
7566
7504
  readonly renderId: string;
7505
+ readonly rewardName: string;
7506
+ readonly title: string;
7507
+ readonly phoneNumber: string;
7508
+ readonly rewardId: string;
7509
+ images: CFImageInNode[]
7567
7510
  /**
7568
7511
  * 奖励类型,包含以下两种类型
7569
7512
  * 需要根据该类型渲染不同的内容.
@@ -7687,11 +7630,6 @@ interface ICFStartMiniState extends ICFCustomLogo {
7687
7630
  * 自带的多语言翻译包,可以不需要请求大翻译包就实现开始页面的语言切换。
7688
7631
  */
7689
7632
  readonly i18n?: any;
7690
- /**
7691
- * @ignore
7692
- * 自定义logo的图片内容
7693
- */
7694
- readonly logoImage?: CFImageInNode;
7695
7633
  /**
7696
7634
  * 是否显示题目编号
7697
7635
  */
@@ -7888,10 +7826,6 @@ interface CFSurveyState
7888
7826
  * 进入答题页面后答案是否发生了变化
7889
7827
  */
7890
7828
  readonly answerChangedSinceStart: boolean;
7891
- /**
7892
- * 对于核心的引用
7893
- */
7894
- readonly core?: CFCore;
7895
7829
  /**
7896
7830
  * @ignore
7897
7831
  */
@@ -8096,10 +8030,6 @@ interface CFSurveyState
8096
8030
  * @ignore
8097
8031
  */
8098
8032
  readonly point?: CFMapPoint;
8099
- /**
8100
- * @ignore
8101
- */
8102
- readonly rewardInfo?: ICFRewardInfo;
8103
8033
  /**
8104
8034
  * 预览工具信息
8105
8035
  */
@@ -8282,6 +8212,7 @@ interface ICFLangEndNodeStore extends ICFLangNodeStore {
8282
8212
  interface ICFLangGiftNodeStore extends ICFLangNodeStore {
8283
8213
  readonly endBtnText: string;
8284
8214
  readonly activityName: string;
8215
+ readonly logoText: string;
8285
8216
  }
8286
8217
 
8287
8218
  /**
@@ -8985,9 +8916,13 @@ interface CFQueryParams {
8985
8916
  */
8986
8917
  readonly tid?: string;
8987
8918
  /**
8988
- * 奖励页面模板,只有动态组件下的奖励路由会使用到
8919
+ * 问卷使用的语言,奖励授权跳转的时候要用到
8920
+ */
8921
+ readonly locale?: string;
8922
+ /**
8923
+ * 奖励类型,跳转到奖励页面的时候会用到
8989
8924
  */
8990
- readonly rtpl?: string;
8925
+ readonly rt?: string;
8991
8926
  /**
8992
8927
  * 自动运行地址
8993
8928
  * @ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choiceform/os-client-core",
3
- "version": "3.4.10",
3
+ "version": "3.4.12",
4
4
  "description": "choiceform survey client core",
5
5
  "main": "./dist/core.js",
6
6
  "repository": "https://github.com/choice-form/os-client-core",