@spiffcommerce/core 34.3.0 → 34.3.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.
package/dist/index.mjs CHANGED
@@ -13331,20 +13331,17 @@ class Bl {
13331
13331
  throw new Q("Product undefined! Cannot finish an experience without a product.");
13332
13332
  if (!i)
13333
13333
  throw new Q("Workflow undefined! Cannot finish an experience without a workflow.");
13334
- return e.completed ? (await this.graphQlClient().mutate({
13335
- mutation: Xr,
13336
- variables: {
13337
- transactionId: e.id
13338
- }
13339
- }), {
13340
- event: "",
13341
- exportedData: {},
13342
- lineItemImageUrl: "",
13343
- optionsCost: 0,
13344
- transactionId: e.id,
13345
- workflowViewerLink: "",
13346
- workflowViewerReadOnlyLink: ""
13347
- }) : (await hi(
13334
+ if (e.isOrdered)
13335
+ return {
13336
+ event: "",
13337
+ exportedData: {},
13338
+ lineItemImageUrl: "",
13339
+ optionsCost: 0,
13340
+ transactionId: e.id,
13341
+ workflowViewerLink: "",
13342
+ workflowViewerReadOnlyLink: ""
13343
+ };
13344
+ const r = await hi(
13348
13345
  [
13349
13346
  {
13350
13347
  workflowManager: this.workflowManager,
@@ -13360,7 +13357,13 @@ class Bl {
13360
13357
  }
13361
13358
  ],
13362
13359
  (o) => t ? this.createPreviewImage(o, 1024) : Promise.resolve(void 0)
13363
- ))[0];
13360
+ );
13361
+ return e.completed && await this.graphQlClient().mutate({
13362
+ mutation: Xr,
13363
+ variables: {
13364
+ transactionId: e.id
13365
+ }
13366
+ }), r[0];
13364
13367
  }
13365
13368
  /**
13366
13369
  * @param step The step to test against.
@@ -16167,7 +16170,7 @@ class Ld {
16167
16170
  } catch (a) {
16168
16171
  throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
16169
16172
  }
16170
- }, this.options = t, this.options.applicationKey && ir(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.3.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16173
+ }, this.options = t, this.options.applicationKey && ir(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.3.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16171
16174
  }
16172
16175
  configure(t) {
16173
16176
  pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && or(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);