@simplybusiness/services 2.5.2 → 2.6.1

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/index.js +144 -214
  3. package/dist/cjs/index.js.map +3 -3
  4. package/dist/cjs/meta.json +71 -87
  5. package/dist/cjs/snowplow/SnowplowContext.js +144 -213
  6. package/dist/cjs/snowplow/SnowplowContext.js.map +3 -3
  7. package/dist/cjs/snowplow/event-definitions/index.js +144 -214
  8. package/dist/cjs/snowplow/event-definitions/index.js.map +3 -3
  9. package/dist/cjs/snowplow/event-definitions/intervention.js +0 -8
  10. package/dist/cjs/snowplow/event-definitions/intervention.js.map +2 -2
  11. package/dist/cjs/snowplow/event-definitions/personalised_cover.js +0 -201
  12. package/dist/cjs/snowplow/event-definitions/personalised_cover.js.map +3 -3
  13. package/dist/cjs/snowplow/index.js +144 -214
  14. package/dist/cjs/snowplow/index.js.map +3 -3
  15. package/dist/cjs/utils/testUtils.js +144 -213
  16. package/dist/cjs/utils/testUtils.js.map +3 -3
  17. package/dist/esm/{chunk-3SO3SL37.js → chunk-HFULBVWF.js} +1 -64
  18. package/dist/esm/chunk-HFULBVWF.js.map +7 -0
  19. package/dist/esm/{chunk-RLSHHBYY.js → chunk-I2GKS3FR.js} +1 -9
  20. package/dist/esm/{chunk-RLSHHBYY.js.map → chunk-I2GKS3FR.js.map} +2 -2
  21. package/dist/esm/{chunk-TRQ236KL.js → chunk-MXPROAPE.js} +2 -2
  22. package/dist/esm/{chunk-3JWAIW5L.js → chunk-VH733I2Z.js} +3 -8
  23. package/dist/esm/{chunk-3JWAIW5L.js.map → chunk-VH733I2Z.js.map} +2 -2
  24. package/dist/esm/index.js +4 -6
  25. package/dist/esm/meta.json +58 -88
  26. package/dist/esm/snowplow/SnowplowContext.js +4 -4
  27. package/dist/esm/snowplow/event-definitions/index.js +3 -5
  28. package/dist/esm/snowplow/event-definitions/intervention.js +1 -1
  29. package/dist/esm/snowplow/event-definitions/personalised_cover.js +1 -3
  30. package/dist/esm/snowplow/index.js +4 -6
  31. package/dist/esm/utils/testUtils.js +4 -4
  32. package/dist/tsconfig.build.tsbuildinfo +1 -1
  33. package/dist/types/snowplow/event-definitions/index.d.ts +0 -1
  34. package/package.json +3 -3
  35. package/src/snowplow/event-definitions/index.ts +0 -5
  36. package/src/snowplow/event-definitions/intervention.ts +0 -8
  37. package/src/snowplow/event-definitions/personalised_cover.test.ts +0 -182
  38. package/src/snowplow/event-definitions/personalised_cover.ts +0 -66
  39. package/dist/esm/chunk-3SO3SL37.js.map +0 -7
  40. /package/dist/esm/{chunk-TRQ236KL.js.map → chunk-MXPROAPE.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a98adb4: Remove LiveChatIntervention component, uk2601ZendeskQcp experiment, and iaLiveChatInterventionClosed snowplow event (CMD-2358)
8
+ - Updated dependencies [e1c6657]
9
+ - Updated dependencies [b04ab48]
10
+ - Updated dependencies [5670ffc]
11
+ - Updated dependencies [013c707]
12
+ - @simplybusiness/mobius@10.3.0
13
+
14
+ ## 2.6.0
15
+
16
+ ### Minor Changes
17
+
18
+ - 80fc162: remove legacy pcp
19
+
3
20
  ## 2.5.2
4
21
 
5
22
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -31,7 +31,6 @@ __export(src_exports, {
31
31
  getSnowplowConfig: () => getSnowplowConfig,
32
32
  interventionPageEvents: () => interventionPageEvents,
33
33
  makeContexts: () => makeContexts,
34
- personalisedCoverPageEvents: () => personalisedCoverPageEvents,
35
34
  qcpPageEvents: () => qcpPageEvents,
36
35
  questionnairePageEvents: () => questionnairePageEvents,
37
36
  referralPageEvents: () => referralPageEvents,
@@ -309,161 +308,9 @@ var interventionEventDefinitions = [
309
308
  }
310
309
  };
311
310
  }
312
- },
313
- {
314
- name: "iaLiveChatInterventionClosed",
315
- type: "structured",
316
- makePayload: (_) => ({
317
- category: "insurance_assistant",
318
- action: "ia_live_chat_intervention_closed"
319
- })
320
311
  }
321
312
  ];
322
313
 
323
- // src/snowplow/constants.ts
324
- var DELIMITER = "|";
325
-
326
- // src/snowplow/event-definitions/questionnaire/redaction.ts
327
- var PII_ANSWER = [
328
- "customer_title",
329
- "customer_first_name",
330
- "customer_last_name",
331
- "customer_email_address",
332
- "preapp_email_address",
333
- "customer_telephone_number",
334
- "customer_alternative_telephone_number",
335
- "uk_address_lookup",
336
- "uk_correspondence_address_lookup",
337
- "customer_address_1_pre_quote",
338
- "customer_address_2_pre_quote",
339
- "customer_town_pre_quote",
340
- "customer_postcode_pre_quote",
341
- "customer_address_1",
342
- "customer_address_2",
343
- "customer_town",
344
- "customer_postcode",
345
- "address_1_pre_quote",
346
- "address_2_pre_quote",
347
- "uk_postcode_pre_quote",
348
- "town_pre_quote",
349
- "owner_first_name",
350
- "owner_last_name",
351
- "beneficiary_first_name",
352
- "beneficiary_last_name",
353
- "gender",
354
- "dynamic_ssn_fein",
355
- "ssn",
356
- "fein",
357
- "sof_county_court_judgement_online_yes",
358
- "sof_county_court_judgement_online_no",
359
- "sof_ccj_count",
360
- "sof_ccj_value",
361
- "sof_ccj_date",
362
- "sof_court_judgement_yes",
363
- "sof_court_judgement_no",
364
- "ccj_date",
365
- "sof_single_ccj_no",
366
- "sof_single_ccj_yes",
367
- "sof_ccj_yes",
368
- "sof_ccj_no",
369
- "ccj_count",
370
- "sof_bankrupt_yes",
371
- "sof_bankrupt_no",
372
- "sof_multiple_bankruptcies_yes",
373
- "sof_multiple_bankruptcies_no",
374
- "bankruptcy_date",
375
- "sof_single_bankruptcy_no",
376
- "sof_single_bankruptcy_yes",
377
- "sof_bankruptcy_yes",
378
- "sof_bankruptcy_no",
379
- "bankruptcy_discharged",
380
- "sof_liquidation_yes",
381
- "sof_liquidation_no",
382
- "sof_multiple_liquidations",
383
- "liquidation_date",
384
- "sof_criminal_offence_yes",
385
- "sof_criminal_offence_no",
386
- "sof_criminal_yes",
387
- "sof_criminal_no",
388
- "hcp_date_of_birth_1",
389
- "hcp_date_of_birth_2",
390
- "hcp_date_of_birth_3",
391
- "hcp_date_of_birth_4",
392
- "hcp_date_of_birth_5",
393
- "hcp_date_of_birth_6",
394
- "hcp_date_of_birth_7",
395
- "hcp_date_of_birth_8",
396
- "hcp_date_of_birth_9",
397
- "hcp_date_of_birth_10",
398
- "sof_previous_claims_yes",
399
- "sof_previous_claims_no",
400
- "sof_claims_yes",
401
- "sof_claims_no",
402
- "sof_property_claims_in_the_last_5_years_yes",
403
- "sof_property_claims_in_the_last_5_years_no",
404
- "sof_property_claims_in_the_last_0_to_4_years_yes",
405
- "sof_property_claims_in_the_last_0_to_4_years_no",
406
- "claim_count",
407
- "sof_number_of_claims",
408
- "number_of_claims_in_last_5_years",
409
- "number_of_claims_in_time_owned",
410
- "date_of_incident_1",
411
- "date_of_incident_2",
412
- "date_of_incident_3",
413
- "date_of_incident_4",
414
- "date_of_incident_5",
415
- "type_of_incident_1",
416
- "type_of_incident_2",
417
- "type_of_incident_3",
418
- "type_of_incident_4",
419
- "type_of_incident_5",
420
- "incident_value_1",
421
- "incident_value_2",
422
- "incident_value_3",
423
- "incident_value_4",
424
- "incident_value_5",
425
- "sof_pollution_disease_claims_yes",
426
- "sof_pollution_disease_claims_no",
427
- "sof_potential_claims_yes",
428
- "sof_potential_claims_no",
429
- "sof_previous_circumstances_yes",
430
- "sof_previous_circumstances_no",
431
- "sof_possible_claims_yes",
432
- "sof_possible_claims_no",
433
- "date_of_possible_incident",
434
- "type_of_possible_incident",
435
- "possible_incident_value",
436
- "sof_property_claims_yes",
437
- "sof_property_claims_no",
438
- "sof_liability_claims_yes",
439
- "sof_liability_claims_no",
440
- "van_registration",
441
- "sof_disqualified_director_yes",
442
- "sof_disqualified_director_no",
443
- "sof_insurance_refused_yes",
444
- "sof_insurance_refused_no",
445
- "sof_insurance_declined_yes",
446
- "sof_insurance_declined_no",
447
- "insurance_refused"
448
- ];
449
- var RADIO_ANSWER_FROM_QUESTIONS = [
450
- "have_secondary_trade_yes",
451
- "have_secondary_trade_no"
452
- ];
453
- var ANSWER_SUFFIX_PATTERN = /_(yes|no)$/;
454
- var redact = (params) => {
455
- let { question, answer } = params;
456
- const piiAnswer = new Set(PII_ANSWER);
457
- const radioAnswerFromQuestions = new Set(RADIO_ANSWER_FROM_QUESTIONS);
458
- if (piiAnswer.has(question)) {
459
- answer = "REDACTED";
460
- question = question?.replace(ANSWER_SUFFIX_PATTERN, "");
461
- } else if (radioAnswerFromQuestions.has(question)) {
462
- question = question?.replace(ANSWER_SUFFIX_PATTERN, "");
463
- }
464
- return { question, answer };
465
- };
466
-
467
314
  // src/snowplow/event-definitions/personalised_cover.ts
468
315
  var personalisedCoverEventDefinitions = [
469
316
  {
@@ -476,16 +323,6 @@ var personalisedCoverEventDefinitions = [
476
323
  property: "personalised_cover"
477
324
  })
478
325
  },
479
- {
480
- name: "selectPackageClicked",
481
- type: "structured",
482
- makePayload: (_) => ({
483
- category: "personalised_cover",
484
- action: "select_package_clicked",
485
- label: "page",
486
- property: "personalised_cover"
487
- })
488
- },
489
326
  {
490
327
  name: "validationShown",
491
328
  type: "structured",
@@ -499,27 +336,6 @@ var personalisedCoverEventDefinitions = [
499
336
  };
500
337
  }
501
338
  },
502
- {
503
- name: "coverQuestionAnswered",
504
- type: "unstructured",
505
- makePayload: (params) => {
506
- const { context } = params;
507
- const { question, answer } = redact(params);
508
- const flatAnswer = Array.isArray(answer) ? answer.join(DELIMITER) : answer;
509
- return {
510
- schema: "iglu:com.simplybusiness/form_question_answered/jsonschema/1-0-4",
511
- data: {
512
- site: context.site,
513
- page_name: "personalised_cover",
514
- section_name: "Personalised Cover Questions",
515
- question,
516
- answer: flatAnswer,
517
- vertical: context.vertical,
518
- journey_id: context.journeyId
519
- }
520
- };
521
- }
522
- },
523
339
  {
524
340
  name: "limitLinkClicked",
525
341
  type: "structured",
@@ -571,32 +387,6 @@ var personalisedCoverEventDefinitions = [
571
387
  property
572
388
  };
573
389
  }
574
- },
575
- {
576
- name: "additionalQuestionsClicked",
577
- type: "structured",
578
- makePayload: (params) => {
579
- const { property } = params;
580
- return {
581
- category: "personalised_cover",
582
- action: "cover_details_clicked",
583
- label: "cover_name",
584
- property
585
- };
586
- }
587
- },
588
- {
589
- name: "chatbotPromptClicked",
590
- type: "structured",
591
- makePayload: (params) => {
592
- const { label, property } = params;
593
- return {
594
- category: "personalised_cover",
595
- action: "chatbot_prompt_clicked",
596
- label: property,
597
- property: label
598
- };
599
- }
600
390
  }
601
391
  ];
602
392
 
@@ -950,6 +740,150 @@ var qcpEventDefinitions = [
950
740
  }
951
741
  ];
952
742
 
743
+ // src/snowplow/constants.ts
744
+ var DELIMITER = "|";
745
+
746
+ // src/snowplow/event-definitions/questionnaire/redaction.ts
747
+ var PII_ANSWER = [
748
+ "customer_title",
749
+ "customer_first_name",
750
+ "customer_last_name",
751
+ "customer_email_address",
752
+ "preapp_email_address",
753
+ "customer_telephone_number",
754
+ "customer_alternative_telephone_number",
755
+ "uk_address_lookup",
756
+ "uk_correspondence_address_lookup",
757
+ "customer_address_1_pre_quote",
758
+ "customer_address_2_pre_quote",
759
+ "customer_town_pre_quote",
760
+ "customer_postcode_pre_quote",
761
+ "customer_address_1",
762
+ "customer_address_2",
763
+ "customer_town",
764
+ "customer_postcode",
765
+ "address_1_pre_quote",
766
+ "address_2_pre_quote",
767
+ "uk_postcode_pre_quote",
768
+ "town_pre_quote",
769
+ "owner_first_name",
770
+ "owner_last_name",
771
+ "beneficiary_first_name",
772
+ "beneficiary_last_name",
773
+ "gender",
774
+ "dynamic_ssn_fein",
775
+ "ssn",
776
+ "fein",
777
+ "sof_county_court_judgement_online_yes",
778
+ "sof_county_court_judgement_online_no",
779
+ "sof_ccj_count",
780
+ "sof_ccj_value",
781
+ "sof_ccj_date",
782
+ "sof_court_judgement_yes",
783
+ "sof_court_judgement_no",
784
+ "ccj_date",
785
+ "sof_single_ccj_no",
786
+ "sof_single_ccj_yes",
787
+ "sof_ccj_yes",
788
+ "sof_ccj_no",
789
+ "ccj_count",
790
+ "sof_bankrupt_yes",
791
+ "sof_bankrupt_no",
792
+ "sof_multiple_bankruptcies_yes",
793
+ "sof_multiple_bankruptcies_no",
794
+ "bankruptcy_date",
795
+ "sof_single_bankruptcy_no",
796
+ "sof_single_bankruptcy_yes",
797
+ "sof_bankruptcy_yes",
798
+ "sof_bankruptcy_no",
799
+ "bankruptcy_discharged",
800
+ "sof_liquidation_yes",
801
+ "sof_liquidation_no",
802
+ "sof_multiple_liquidations",
803
+ "liquidation_date",
804
+ "sof_criminal_offence_yes",
805
+ "sof_criminal_offence_no",
806
+ "sof_criminal_yes",
807
+ "sof_criminal_no",
808
+ "hcp_date_of_birth_1",
809
+ "hcp_date_of_birth_2",
810
+ "hcp_date_of_birth_3",
811
+ "hcp_date_of_birth_4",
812
+ "hcp_date_of_birth_5",
813
+ "hcp_date_of_birth_6",
814
+ "hcp_date_of_birth_7",
815
+ "hcp_date_of_birth_8",
816
+ "hcp_date_of_birth_9",
817
+ "hcp_date_of_birth_10",
818
+ "sof_previous_claims_yes",
819
+ "sof_previous_claims_no",
820
+ "sof_claims_yes",
821
+ "sof_claims_no",
822
+ "sof_property_claims_in_the_last_5_years_yes",
823
+ "sof_property_claims_in_the_last_5_years_no",
824
+ "sof_property_claims_in_the_last_0_to_4_years_yes",
825
+ "sof_property_claims_in_the_last_0_to_4_years_no",
826
+ "claim_count",
827
+ "sof_number_of_claims",
828
+ "number_of_claims_in_last_5_years",
829
+ "number_of_claims_in_time_owned",
830
+ "date_of_incident_1",
831
+ "date_of_incident_2",
832
+ "date_of_incident_3",
833
+ "date_of_incident_4",
834
+ "date_of_incident_5",
835
+ "type_of_incident_1",
836
+ "type_of_incident_2",
837
+ "type_of_incident_3",
838
+ "type_of_incident_4",
839
+ "type_of_incident_5",
840
+ "incident_value_1",
841
+ "incident_value_2",
842
+ "incident_value_3",
843
+ "incident_value_4",
844
+ "incident_value_5",
845
+ "sof_pollution_disease_claims_yes",
846
+ "sof_pollution_disease_claims_no",
847
+ "sof_potential_claims_yes",
848
+ "sof_potential_claims_no",
849
+ "sof_previous_circumstances_yes",
850
+ "sof_previous_circumstances_no",
851
+ "sof_possible_claims_yes",
852
+ "sof_possible_claims_no",
853
+ "date_of_possible_incident",
854
+ "type_of_possible_incident",
855
+ "possible_incident_value",
856
+ "sof_property_claims_yes",
857
+ "sof_property_claims_no",
858
+ "sof_liability_claims_yes",
859
+ "sof_liability_claims_no",
860
+ "van_registration",
861
+ "sof_disqualified_director_yes",
862
+ "sof_disqualified_director_no",
863
+ "sof_insurance_refused_yes",
864
+ "sof_insurance_refused_no",
865
+ "sof_insurance_declined_yes",
866
+ "sof_insurance_declined_no",
867
+ "insurance_refused"
868
+ ];
869
+ var RADIO_ANSWER_FROM_QUESTIONS = [
870
+ "have_secondary_trade_yes",
871
+ "have_secondary_trade_no"
872
+ ];
873
+ var ANSWER_SUFFIX_PATTERN = /_(yes|no)$/;
874
+ var redact = (params) => {
875
+ let { question, answer } = params;
876
+ const piiAnswer = new Set(PII_ANSWER);
877
+ const radioAnswerFromQuestions = new Set(RADIO_ANSWER_FROM_QUESTIONS);
878
+ if (piiAnswer.has(question)) {
879
+ answer = "REDACTED";
880
+ question = question?.replace(ANSWER_SUFFIX_PATTERN, "");
881
+ } else if (radioAnswerFromQuestions.has(question)) {
882
+ question = question?.replace(ANSWER_SUFFIX_PATTERN, "");
883
+ }
884
+ return { question, answer };
885
+ };
886
+
953
887
  // src/snowplow/event-definitions/questionnaire/questionnaire.ts
954
888
  var questionnaireEventDefinitions = [
955
889
  {
@@ -1349,10 +1283,6 @@ var referralPageEvents = [
1349
1283
  ...baseEventDefinitions,
1350
1284
  ...referralEventDefinitions
1351
1285
  ];
1352
- var personalisedCoverPageEvents = [
1353
- ...baseEventDefinitions,
1354
- ...personalisedCoverEventDefinitions
1355
- ];
1356
1286
  var interventionPageEvents = [...interventionEventDefinitions];
1357
1287
  var questionnairePageEvents = [...questionnaireEventDefinitions];
1358
1288
  var coverageSelectionPageEvents = [