@veloceapps/sdk 11.0.0-80 → 11.0.0-81

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.
@@ -830,21 +830,11 @@ class FlowStateService {
830
830
  else {
831
831
  const state = this.salesTransactionService.state;
832
832
  if (state) {
833
- return this.salesTransactionApiService.upsert(state);
834
- }
835
- }
836
- return of({ id: '' });
837
- }
838
- submit$() {
839
- if (this.flowInfoService.flow.properties.stateful) {
840
- if (this.stateId$.value) {
841
- return this.flowStateApiService.submit(this.stateId$.value).pipe(map(({ quoteId }) => ({ id: quoteId })));
842
- }
843
- }
844
- else {
845
- const state = this.salesTransactionService.state;
846
- if (state) {
847
- return this.salesTransactionApiService.submit(state);
833
+ const request = {
834
+ transactionContext: state,
835
+ flowId: this.flowInfoService.flow.id,
836
+ };
837
+ return this.salesTransactionApiService.upsert(request).pipe(map(id => ({ id })));
848
838
  }
849
839
  }
850
840
  return of({ id: '' });
@@ -1336,7 +1326,11 @@ class ConfigurationStateService {
1336
1326
  }
1337
1327
  const { standalone } = this.flowInfoService.flow.properties;
1338
1328
  if (standalone) {
1339
- return this.salesTransactionApiService.upsert(state);
1329
+ const request = {
1330
+ transactionContext: state,
1331
+ flowId: this.flowInfoService.flow.id,
1332
+ };
1333
+ return this.salesTransactionApiService.upsert(request).pipe(map(id => ({ id })));
1340
1334
  }
1341
1335
  const transactionContext = this.salesTransactionService.state;
1342
1336
  const configurationRoot = this.configurationService.root;