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.
package/package.json
CHANGED
|
@@ -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
|
|