@veloceapps/sdk 8.0.0-3 → 8.0.0-5

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,7 +137,7 @@ var RuntimeStep;
137
137
  RuntimeStep["UPDATE"] = "UPDATE";
138
138
  })(RuntimeStep || (RuntimeStep = {}));
139
139
 
140
- const UI_DEFINITION_VERSION = 2;
140
+ const UI_DEFINITION_VERSION = 3;
141
141
 
142
142
  class RuntimeContextService {
143
143
  constructor(configurationApiService) {
@@ -1142,6 +1142,22 @@ class FlowUpdateService {
1142
1142
  }
1143
1143
  }
1144
1144
  break;
1145
+ case 'COST':
1146
+ {
1147
+ const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1148
+ if (charge) {
1149
+ charge.netCost = update.newValue;
1150
+ }
1151
+ }
1152
+ break;
1153
+ case 'MARGIN_PERCENT':
1154
+ {
1155
+ const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1156
+ if (charge) {
1157
+ charge.marginPercent = update.newValue;
1158
+ }
1159
+ }
1160
+ break;
1145
1161
  default:
1146
1162
  throw new Error(`Not suppored AttributeType for LineItem update: ${update.attributeType}`);
1147
1163
  }