@spiffcommerce/core 26.23.4-beta.20d47a7c-f527-5383-9ed3-ea8e5da544b2 → 26.23.4
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.d.ts +2 -2
- package/dist/index.js +6 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4309,7 +4309,7 @@ const X = new li(), vn = y`
|
|
|
4309
4309
|
workflowState
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
|
-
`, In =
|
|
4312
|
+
`, In = y`
|
|
4313
4313
|
${De}
|
|
4314
4314
|
fragment IntegrationProductFields on IntegrationProduct {
|
|
4315
4315
|
id
|
|
@@ -4325,7 +4325,6 @@ const X = new li(), vn = y`
|
|
|
4325
4325
|
enabled
|
|
4326
4326
|
externalIntegrationId
|
|
4327
4327
|
type
|
|
4328
|
-
isCurrent
|
|
4329
4328
|
}
|
|
4330
4329
|
product {
|
|
4331
4330
|
id
|
|
@@ -4371,36 +4370,17 @@ const X = new li(), vn = y`
|
|
|
4371
4370
|
minQty
|
|
4372
4371
|
percentage
|
|
4373
4372
|
}
|
|
4374
|
-
${r ? `
|
|
4375
|
-
integrationProducts {
|
|
4376
|
-
id
|
|
4377
|
-
externalProductId
|
|
4378
|
-
externalVariantId
|
|
4379
|
-
additionalExternalProductId
|
|
4380
|
-
additionalExternalVariantId
|
|
4381
|
-
additionalIntegrationProduct {
|
|
4382
|
-
...AdditionalIntegrationProductFields
|
|
4383
|
-
}
|
|
4384
|
-
integration {
|
|
4385
|
-
id
|
|
4386
|
-
enabled
|
|
4387
|
-
externalIntegrationId
|
|
4388
|
-
type
|
|
4389
|
-
isCurrent
|
|
4390
|
-
}
|
|
4391
|
-
}
|
|
4392
|
-
` : ""}
|
|
4393
4373
|
}
|
|
4394
4374
|
}
|
|
4395
|
-
`, gi =
|
|
4396
|
-
${In
|
|
4375
|
+
`, gi = y`
|
|
4376
|
+
${In}
|
|
4397
4377
|
query GetIntegrationProducts($ids: [String!]!) {
|
|
4398
4378
|
integrationProducts(ids: $ids) {
|
|
4399
4379
|
...IntegrationProductFields
|
|
4400
4380
|
}
|
|
4401
4381
|
}
|
|
4402
|
-
`, fi =
|
|
4403
|
-
${In
|
|
4382
|
+
`, fi = y`
|
|
4383
|
+
${In}
|
|
4404
4384
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
|
4405
4385
|
integrationProductFromExternalIds(
|
|
4406
4386
|
externalIntegrationId: $externalIntegrationId
|
|
@@ -15245,7 +15225,7 @@ class kc {
|
|
|
15245
15225
|
} catch (a) {
|
|
15246
15226
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15247
15227
|
}
|
|
15248
|
-
}, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.4
|
|
15228
|
+
}, this.options = t, this.options.applicationKey && Fr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.4"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15249
15229
|
}
|
|
15250
15230
|
configure(t) {
|
|
15251
15231
|
wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15795,34 +15775,34 @@ class kc {
|
|
|
15795
15775
|
const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
|
15796
15776
|
e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
|
|
15797
15777
|
}
|
|
15798
|
-
async getIntegrationProductById(t
|
|
15799
|
-
var
|
|
15800
|
-
const
|
|
15801
|
-
query: gi
|
|
15778
|
+
async getIntegrationProductById(t) {
|
|
15779
|
+
var i, s;
|
|
15780
|
+
const n = (i = (await b.getShadowGraphqlClient().query({
|
|
15781
|
+
query: gi,
|
|
15802
15782
|
variables: {
|
|
15803
15783
|
ids: [t]
|
|
15804
15784
|
},
|
|
15805
15785
|
fetchPolicy: "no-cache",
|
|
15806
15786
|
errorPolicy: "all"
|
|
15807
|
-
})).data) == null ? void 0 :
|
|
15808
|
-
if (!
|
|
15787
|
+
})).data) == null ? void 0 : i.integrationProducts;
|
|
15788
|
+
if (!n || n.length === 0 || !((s = n[0]) != null && s.id))
|
|
15809
15789
|
throw new Error("Integration product not found.");
|
|
15810
|
-
return new qa(
|
|
15790
|
+
return new qa(n[0]);
|
|
15811
15791
|
}
|
|
15812
|
-
async getIntegrationProductFromExternalIds(t, e
|
|
15813
|
-
var
|
|
15814
|
-
const
|
|
15815
|
-
query: fi
|
|
15792
|
+
async getIntegrationProductFromExternalIds(t, e) {
|
|
15793
|
+
var s;
|
|
15794
|
+
const i = (s = (await b.getShadowGraphqlClient().query({
|
|
15795
|
+
query: fi,
|
|
15816
15796
|
variables: {
|
|
15817
15797
|
externalProductId: e,
|
|
15818
15798
|
externalIntegrationId: t
|
|
15819
15799
|
},
|
|
15820
15800
|
fetchPolicy: "no-cache",
|
|
15821
15801
|
errorPolicy: "all"
|
|
15822
|
-
})).data) == null ? void 0 :
|
|
15823
|
-
if (!(
|
|
15802
|
+
})).data) == null ? void 0 : s.integrationProductFromExternalIds;
|
|
15803
|
+
if (!(i != null && i.id))
|
|
15824
15804
|
throw new Error("Integration product not found.");
|
|
15825
|
-
return new qa(
|
|
15805
|
+
return new qa(i);
|
|
15826
15806
|
}
|
|
15827
15807
|
async getIntegrationProduct(t) {
|
|
15828
15808
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|