@choiceform/os-client-core 3.4.8 → 3.4.13

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
@@ -2856,6 +2856,10 @@ interface ICFSmallPayload {
2856
2856
  * 测试用例数据
2857
2857
  */
2858
2858
  readonly testCases: ICFTestCase[];
2859
+ /**
2860
+ * 最后发布时间
2861
+ */
2862
+ readonly publishedAt: string;
2859
2863
  }
2860
2864
 
2861
2865
 
@@ -4250,7 +4254,11 @@ interface ICFSlideRateNode extends ICFSubjectNode, ICFFillNodeMixin {
4250
4254
  * 奖励节点
4251
4255
  * @ignore
4252
4256
  */
4253
- interface ICFGiftNode extends ICFInputNodeMixin {
4257
+ interface ICFGiftNode extends ICFInputNodeMixin, IOriginCustomLogo {
4258
+ /**
4259
+ * 自带的多语言翻译包,可以不需要请求大翻译包就实现开始页面的语言切换。
4260
+ */
4261
+ readonly i18n?: any;
4254
4262
  /**
4255
4263
  * 结束按钮文字
4256
4264
  * @ignore
@@ -4278,7 +4286,7 @@ interface ICFGiftNode extends ICFInputNodeMixin {
4278
4286
  * 中奖id
4279
4287
  * @ignore
4280
4288
  */
4281
- readonly goalId: string;
4289
+ readonly rewardId: string;
4282
4290
  /**
4283
4291
  * 手机号码
4284
4292
  */
@@ -4303,6 +4311,7 @@ interface ICFGiftNode extends ICFInputNodeMixin {
4303
4311
  * @ignore
4304
4312
  */
4305
4313
  readonly needVerification: boolean;
4314
+
4306
4315
  }
4307
4316
 
4308
4317
  /**
@@ -4505,6 +4514,11 @@ interface ICFStartNode extends ICFNode, ICFStartMiniState, ICFOutputNodeMixin, C
4505
4514
  * @ignore
4506
4515
  */
4507
4516
  readonly logoText: string;
4517
+ /**
4518
+ * @ignore
4519
+ * 自定义logo的图片内容
4520
+ */
4521
+ readonly logoImage?: CFImageInNode;
4508
4522
  /**
4509
4523
  * @ignore
4510
4524
  */
@@ -4544,7 +4558,7 @@ interface ICFStartNode extends ICFNode, ICFStartMiniState, ICFOutputNodeMixin, C
4544
4558
  * 循环节点
4545
4559
  * @ignore
4546
4560
  */
4547
- interface ICFLoopNode extends ICFInOutNodeMixin , ICFOptNodeMixin {
4561
+ interface ICFLoopNode extends ICFInOutNodeMixin, ICFOptNodeMixin {
4548
4562
  readonly loopEnd: ICFPort;
4549
4563
  readonly loopStart: ICFPort;
4550
4564
  }
@@ -5717,7 +5731,6 @@ interface IQuestionCustomData {}
5717
5731
  * 题目基础类型
5718
5732
  */
5719
5733
  interface CFQuestion extends ICFNode, ICFTypeInfo {
5720
- readonly __ques__: true;
5721
5734
  /**
5722
5735
  * 预留,其实很多题目并不需要该属性
5723
5736
  */
@@ -5746,7 +5759,7 @@ interface CFQuestion extends ICFNode, ICFTypeInfo {
5746
5759
  * 原始节点
5747
5760
  * @ignore
5748
5761
  */
5749
- readonly origin: ICFNode;
5762
+ readonly origin: any;
5750
5763
  /**
5751
5764
  * 选择类型
5752
5765
  * 对于选择类型的题目有效,用于确定这是单选模式和多选模式
@@ -6514,20 +6527,16 @@ interface CFEndPage extends ICFEndNode, CFQuestion, CFMediaNodeMixin {
6514
6527
  * 如果有[[CFLotteryPage.qrCode]]属性,则需要将他渲染成二维码,并提示用户微信扫描二维码可以领奖
6515
6528
  */
6516
6529
  interface CFLotteryPage extends ICFLotteryNode, CFQuestion {
6517
- /**
6518
- * 中奖节点id
6519
- * @ignore
6520
- */
6521
- readonly rewardNodeId: string;
6530
+ readonly rewardRaw?: ICFRewardRaw;
6522
6531
  /**
6523
6532
  * 二维码信息,如有值,则需要渲染成二维码,并提示微信扫码可领取奖励.
6524
6533
  */
6525
- readonly qrCode: string;
6534
+ readonly qrCode?: string;
6526
6535
  /**
6527
6536
  * 跳转链接
6528
6537
  * @ignore
6529
6538
  */
6530
- readonly linkUrl: string;
6539
+ readonly linkUrl?: string;
6531
6540
  /**
6532
6541
  * 结束按钮文字
6533
6542
  * @ignore
@@ -6537,11 +6546,7 @@ interface CFLotteryPage extends ICFLotteryNode, CFQuestion {
6537
6546
  * 是否已中奖
6538
6547
  * @ignore
6539
6548
  */
6540
- readonly goal: boolean;
6541
- /**
6542
- * 活动名称
6543
- */
6544
- readonly activityName: string;
6549
+ readonly goal?: boolean;
6545
6550
  /**
6546
6551
  * 奖励名称
6547
6552
  */
@@ -6837,7 +6842,7 @@ interface ICFDataHub extends ICFSubjectNode, CFSubjectQuestion {
6837
6842
  * 虚拟循环题
6838
6843
  * @ignore
6839
6844
  */
6840
- interface ICFLoopHub extends ICFLoopNode, CFQuestion , ICFOptNodeMixin{
6845
+ interface ICFLoopHub extends ICFLoopNode, CFQuestion, ICFOptNodeMixin {
6841
6846
  /**
6842
6847
  * 包含的循环仰视变量列表
6843
6848
  */
@@ -6899,6 +6904,7 @@ interface ICFIntroMeta {
6899
6904
  readonly payload_digest: string;
6900
6905
  readonly diagram_url: string;
6901
6906
  readonly langs: ICFRemoteLang[];
6907
+ readonly published_at:string;
6902
6908
  }
6903
6909
 
6904
6910
  /**
@@ -6924,6 +6930,7 @@ interface ICFParsedSmallPayload {
6924
6930
  readonly langResume: boolean;
6925
6931
  readonly testCases: ICFTestCase[];
6926
6932
  readonly disabledLangs: string[];
6933
+ readonly publishedAt: string;
6927
6934
  }
6928
6935
 
6929
6936
  /**
@@ -7238,6 +7245,10 @@ interface ICFEmbedApi {
7238
7245
  * @ignore
7239
7246
  */
7240
7247
  interface CFStateBase {
7248
+ /**
7249
+ * 核心
7250
+ */
7251
+ readonly core?: CFCore;
7241
7252
  /**
7242
7253
  * UI交互回调函数
7243
7254
  */
@@ -7395,15 +7406,23 @@ interface CFRealtimeState extends CFSurveyState, CFStartState {
7395
7406
  * 自定义logo
7396
7407
  * @ignore
7397
7408
  */
7398
- interface ICFCustomLogo {
7409
+ interface ICFCustomLogoBase {
7399
7410
  /**
7400
7411
  * 是否使用自定义logo
7401
7412
  * @ignore
7402
7413
  */
7403
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{
7404
7423
  /**
7405
- * 自定logo文字
7406
- */
7424
+ * 自定logo文字
7425
+ */
7407
7426
  readonly customText: string;
7408
7427
  /**
7409
7428
  * 自定logo图片地址
@@ -7417,10 +7436,10 @@ interface ICFCustomLogo {
7417
7436
  interface ICFRewardRaw {
7418
7437
  readonly id?: number;
7419
7438
  readonly gift_id?: string;
7420
- readonly code: string;
7421
- readonly type: GIFT_TYPE;
7422
- readonly lottery_id: string;
7423
- 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;
7424
7443
  }
7425
7444
 
7426
7445
  /**
@@ -7432,123 +7451,43 @@ interface ICFLotteryResult {
7432
7451
  readonly rewardImage?: CFImageInNode;
7433
7452
  }
7434
7453
 
7454
+
7435
7455
  /**
7436
7456
  * @ignore
7437
7457
  */
7438
- interface ICFRewardResult {
7458
+ interface ICFRedEnvelopeReward {
7439
7459
  readonly recipient?: CFUserInfo;
7460
+ readonly theme: CFTheme;
7440
7461
  gift?: {
7441
- readonly locale: string;
7442
- readonly id: string;
7462
+ readonly id: number;
7443
7463
  readonly title: string;
7444
7464
  readonly description: string;
7445
7465
  config: {
7446
7466
  readonly gift_name: string;
7447
7467
  };
7468
+ origin: ICFGiftNode
7448
7469
  };
7449
7470
  readonly amount?: number;
7450
7471
  readonly type?: GIFT_TYPE;
7451
7472
  }
7452
7473
 
7453
7474
  /**
7454
- * 奖励信息
7455
- * @ignore
7475
+ * 缓存的奖励信息,由于奖励页面会重开页面,内存会丢失,预览模式下和自定义奖励模式下后台是不给后续接口的,
7476
+ * 需要自己缓存关键信息用于展示奖励页面,正好这两种模式下都不会切换设备,所以用缓存也可以。
7477
+ *
7478
+ * 正式答题的红包奖励会使用后台后续接口给的信息,不会使用这些缓存信息。
7456
7479
  */
7457
- interface ICFRewardInfo extends ICFGiftNode, ICFLotteryResult, ICFCustomLogo {
7458
- readonly core?: CFCore;
7459
- /**
7460
- * @ignore
7461
- */
7462
- readonly goal: boolean;
7463
- /**
7464
- * @ignore
7465
- */
7466
- readonly goalId: string;
7467
- /**
7468
- * @ignore
7469
- */
7470
- readonly origin: ICFGiftNode;
7471
- /**
7472
- * 奖励标题
7473
- */
7474
- readonly rewardTitle: string;
7475
- /**
7476
- * 奖励描述
7477
- */
7478
- readonly rewardDescribe: string;
7479
- /**
7480
- * @ignore
7481
- */
7482
- readonly noWxShare: boolean;
7483
- /**
7484
- * @ignore
7485
- */
7486
- readonly wxShareInfo: ICFWxShareInfo;
7487
- /**
7488
- * @ignore
7489
- */
7490
- readonly quesTitle: string;
7491
- /**
7492
- * 图片列表
7493
- */
7494
- readonly images: CFImageInNode[];
7495
- /**
7496
- * 奖励名称
7497
- */
7498
- readonly rewardName: string;
7499
- /**
7500
- * 奖励数量
7501
- */
7502
- readonly rewardCount: number;
7503
- /**
7504
- * @ignore
7505
- */
7506
- readonly lotteryCount: number;
7507
- /**
7508
- * @ignore
7509
- */
7510
- readonly sendTime: string;
7511
- /**
7512
- * 奖励类型,UI根据此决定渲染方式
7513
- */
7514
- readonly rewardType: GIFT_TYPE;
7515
- /**
7516
- * @ignore
7517
- */
7518
- readonly verifyCode: string;
7519
- /**
7520
- * @ignore
7521
- */
7522
- readonly rewardNodeId: string;
7523
- /**
7524
- * @ignore
7525
- */
7526
- readonly logoUrl: string;
7527
- /**
7528
- * @ignore
7529
- */
7530
- readonly transactionID: string;
7531
- /**
7532
- * @ignore
7533
- * 问卷原始id
7534
- */
7535
- readonly surveyId: string;
7536
- /**
7537
- * 标题
7538
- */
7539
- readonly title: string;
7540
- /**
7541
- * @ignore
7542
- */
7543
- readonly companyID: string;
7544
- /**
7545
- * 活动名称
7546
- */
7547
- readonly activityName: string;
7480
+ interface ICFCachedReward {
7481
+ readonly custom?: ICFCustomReward;
7482
+ readonly redEnvelope?: ICFRedEnvelopeReward;
7483
+ }
7548
7484
 
7549
- readonly summary: string;
7550
7485
 
7551
- readonly language: string;
7486
+ interface ICFCustomReward {
7487
+ readonly qrCode: string;
7488
+ readonly theme: CFTheme;
7489
+ readonly giftNode: ICFGiftNode;
7490
+ readonly rewardId: number;
7552
7491
  }
7553
7492
 
7554
7493
  /**
@@ -7556,8 +7495,18 @@ interface ICFRewardInfo extends ICFGiftNode, ICFLotteryResult, ICFCustomLogo {
7556
7495
  *
7557
7496
  * 渲染奖励信息
7558
7497
  */
7559
- 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;
7560
7504
  readonly renderId: string;
7505
+ readonly rewardName: string;
7506
+ readonly title: string;
7507
+ readonly phoneNumber: string;
7508
+ readonly rewardId: string;
7509
+ images: CFImageInNode[]
7561
7510
  /**
7562
7511
  * 奖励类型,包含以下两种类型
7563
7512
  * 需要根据该类型渲染不同的内容.
@@ -7681,11 +7630,6 @@ interface ICFStartMiniState extends ICFCustomLogo {
7681
7630
  * 自带的多语言翻译包,可以不需要请求大翻译包就实现开始页面的语言切换。
7682
7631
  */
7683
7632
  readonly i18n?: any;
7684
- /**
7685
- * @ignore
7686
- * 自定义logo的图片内容
7687
- */
7688
- readonly logoImage?: CFImageInNode;
7689
7633
  /**
7690
7634
  * 是否显示题目编号
7691
7635
  */
@@ -7827,6 +7771,10 @@ interface CFStartState extends ICFTranMiniState, ICFStartMiniIntro, CFStateBase,
7827
7771
  * 是否正在加载,当该属性为true时,UI需要选人加载中的状态
7828
7772
  */
7829
7773
  readonly nextLoading: boolean;
7774
+ /**
7775
+ * 最后发布地址
7776
+ */
7777
+ readonly publishedAt: string;
7830
7778
  }
7831
7779
 
7832
7780
 
@@ -7878,10 +7826,6 @@ interface CFSurveyState
7878
7826
  * 进入答题页面后答案是否发生了变化
7879
7827
  */
7880
7828
  readonly answerChangedSinceStart: boolean;
7881
- /**
7882
- * 对于核心的引用
7883
- */
7884
- readonly core?: CFCore;
7885
7829
  /**
7886
7830
  * @ignore
7887
7831
  */
@@ -8086,10 +8030,6 @@ interface CFSurveyState
8086
8030
  * @ignore
8087
8031
  */
8088
8032
  readonly point?: CFMapPoint;
8089
- /**
8090
- * @ignore
8091
- */
8092
- readonly rewardInfo?: ICFRewardInfo;
8093
8033
  /**
8094
8034
  * 预览工具信息
8095
8035
  */
@@ -8272,6 +8212,7 @@ interface ICFLangEndNodeStore extends ICFLangNodeStore {
8272
8212
  interface ICFLangGiftNodeStore extends ICFLangNodeStore {
8273
8213
  readonly endBtnText: string;
8274
8214
  readonly activityName: string;
8215
+ readonly logoText: string;
8275
8216
  }
8276
8217
 
8277
8218
  /**
@@ -8975,9 +8916,13 @@ interface CFQueryParams {
8975
8916
  */
8976
8917
  readonly tid?: string;
8977
8918
  /**
8978
- * 奖励页面模板,只有动态组件下的奖励路由会使用到
8919
+ * 问卷使用的语言,奖励授权跳转的时候要用到
8920
+ */
8921
+ readonly locale?: string;
8922
+ /**
8923
+ * 奖励类型,跳转到奖励页面的时候会用到
8979
8924
  */
8980
- readonly rtpl?: string;
8925
+ readonly rt?: string;
8981
8926
  /**
8982
8927
  * 自动运行地址
8983
8928
  * @ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choiceform/os-client-core",
3
- "version": "3.4.8",
3
+ "version": "3.4.13",
4
4
  "description": "choiceform survey client core",
5
5
  "main": "./dist/core.js",
6
6
  "repository": "https://github.com/choice-form/os-client-core",