stand_socotra_policy_transformer 1.0.1 → 1.0.3

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.
@@ -5,6 +5,7 @@
5
5
  "policyEndTimestamp": 1763884800000,
6
6
  "finalize": false,
7
7
  "paymentScheduleName": "upfront",
8
+ "configVersion": 2,
8
9
  "exposures": [
9
10
  {
10
11
  "exposureName": "dwelling",
@@ -155,6 +155,6 @@
155
155
  "stand_second_approval": "Yes",
156
156
  "fronting_carrier_approval": "Yes",
157
157
  "reinsurance_carrier_approved": "Yes",
158
- "reinsurance_rate": "0.21"
159
-
158
+ "reinsurance_rate": "0.21",
159
+ "socotra_config_version": 2
160
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stand_socotra_policy_transformer",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Stands internal javscipt module for executing underwritting",
5
5
  "main": "dist/stand_underwriter.js",
6
6
  "scripts": {
@@ -147,6 +147,7 @@ function solar_panel_functions(){
147
147
 
148
148
  const entries = [
149
149
  new SocotraEntry("quote_name", "quote_name", "quote.name"),
150
+ new SocotraEntry("socotra_config_version", "config_version", "quote.version"),
150
151
  new SocotraEntry("fire_deductible", "wf_deductible", "exposure.dwelling.fields", parseFloat),
151
152
  new SocotraEntry("other_deductible", "aop_deductible", "exposure.dwelling.fields", parseInt),
152
153
  new SocotraEntry("water_deductible", "water_deductible", "exposure.dwelling.fields", parseInt),
@@ -188,8 +189,6 @@ const entries = [
188
189
  new SocotraEntry("windows_frame_type", "window_frame_type", "exposure.dwelling.fields"),
189
190
  new SocotraEntry("windows_type", "window_glass_type", "exposure.dwelling.fields"),
190
191
 
191
-
192
- new SocotraEntry("replacement_cost", "full_replacement_value", "policy.fields", parseInt),
193
192
  new SocotraEntry("replacement_cost", "full_replacement_value", "policy.fields", parseInt),
194
193
  new SocotraEntry("street_address", "address", "policy.fields"),
195
194
  new SocotraEntry("state", "state", "policy.fields"),
@@ -8,6 +8,7 @@ const socotra_locations = Object.freeze([
8
8
  'quote.name',
9
9
  'effective_date',
10
10
  'payment_schedule',
11
+ "quote.version",
11
12
  ])
12
13
  class SocotraEntry {
13
14
  constructor(retool_id, socotra_id, socotra_location, to_retool_func = (x) => x, to_socotra_func = (x) => x) {
@@ -44,6 +45,8 @@ class SocotraEntry {
44
45
  if( ['upfront', 'quarterly'].includes(value)){
45
46
  socotra_response.paymentScheduleName = value
46
47
  }
48
+ } else if (this.socotra_location === 'quote.version'){
49
+ socotra_response.configVersion = value
47
50
  }
48
51
  else {
49
52
  throw new Error(`Location Not implemented: ${JSON.stringify(this)}`)
@@ -70,6 +73,8 @@ class SocotraEntry {
70
73
  } else if (this.socotra_location === 'payment_schedule'){
71
74
  retool_response[this.retool_id] = socotra_payload[this.socotra_id]
72
75
  return
76
+ } else if (this.socotra_location == 'quote.version'){
77
+ return
73
78
  }
74
79
 
75
80
  else {
@@ -200,7 +205,8 @@ class SocotraEntry {
200
205
  }
201
206
  ],
202
207
  "fieldValues": {},
203
- "fieldGroups": []
208
+ "fieldGroups": [],
209
+ "configVersion": -1
204
210
  }
205
211
  }
206
212