@spiffcommerce/core 26.23.4-beta.20d47a7c-f527-5383-9ed3-ea8e5da544b2 → 26.23.4-beta.9a6b3f77-3bf6-52ad-a823-41cd49720f64
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 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -39
- 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
|
|
@@ -4371,36 +4371,17 @@ const X = new li(), vn = y`
|
|
|
4371
4371
|
minQty
|
|
4372
4372
|
percentage
|
|
4373
4373
|
}
|
|
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
4374
|
}
|
|
4394
4375
|
}
|
|
4395
|
-
`, gi =
|
|
4396
|
-
${In
|
|
4376
|
+
`, gi = y`
|
|
4377
|
+
${In}
|
|
4397
4378
|
query GetIntegrationProducts($ids: [String!]!) {
|
|
4398
4379
|
integrationProducts(ids: $ids) {
|
|
4399
4380
|
...IntegrationProductFields
|
|
4400
4381
|
}
|
|
4401
4382
|
}
|
|
4402
|
-
`, fi =
|
|
4403
|
-
${In
|
|
4383
|
+
`, fi = y`
|
|
4384
|
+
${In}
|
|
4404
4385
|
query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
|
|
4405
4386
|
integrationProductFromExternalIds(
|
|
4406
4387
|
externalIntegrationId: $externalIntegrationId
|
|
@@ -15245,7 +15226,7 @@ class kc {
|
|
|
15245
15226
|
} catch (a) {
|
|
15246
15227
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15247
15228
|
}
|
|
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
|
|
15229
|
+
}, 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
15230
|
}
|
|
15250
15231
|
configure(t) {
|
|
15251
15232
|
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 +15776,34 @@ class kc {
|
|
|
15795
15776
|
const e = k.getMap("partnerCustomerIds") || /* @__PURE__ */ new Map();
|
|
15796
15777
|
e.set(t.partner.id, t.id), k.setMap("partnerCustomerIds", e);
|
|
15797
15778
|
}
|
|
15798
|
-
async getIntegrationProductById(t
|
|
15799
|
-
var
|
|
15800
|
-
const
|
|
15801
|
-
query: gi
|
|
15779
|
+
async getIntegrationProductById(t) {
|
|
15780
|
+
var i, s;
|
|
15781
|
+
const n = (i = (await b.getShadowGraphqlClient().query({
|
|
15782
|
+
query: gi,
|
|
15802
15783
|
variables: {
|
|
15803
15784
|
ids: [t]
|
|
15804
15785
|
},
|
|
15805
15786
|
fetchPolicy: "no-cache",
|
|
15806
15787
|
errorPolicy: "all"
|
|
15807
|
-
})).data) == null ? void 0 :
|
|
15808
|
-
if (!
|
|
15788
|
+
})).data) == null ? void 0 : i.integrationProducts;
|
|
15789
|
+
if (!n || n.length === 0 || !((s = n[0]) != null && s.id))
|
|
15809
15790
|
throw new Error("Integration product not found.");
|
|
15810
|
-
return new qa(
|
|
15791
|
+
return new qa(n[0]);
|
|
15811
15792
|
}
|
|
15812
|
-
async getIntegrationProductFromExternalIds(t, e
|
|
15813
|
-
var
|
|
15814
|
-
const
|
|
15815
|
-
query: fi
|
|
15793
|
+
async getIntegrationProductFromExternalIds(t, e) {
|
|
15794
|
+
var s;
|
|
15795
|
+
const i = (s = (await b.getShadowGraphqlClient().query({
|
|
15796
|
+
query: fi,
|
|
15816
15797
|
variables: {
|
|
15817
15798
|
externalProductId: e,
|
|
15818
15799
|
externalIntegrationId: t
|
|
15819
15800
|
},
|
|
15820
15801
|
fetchPolicy: "no-cache",
|
|
15821
15802
|
errorPolicy: "all"
|
|
15822
|
-
})).data) == null ? void 0 :
|
|
15823
|
-
if (!(
|
|
15803
|
+
})).data) == null ? void 0 : s.integrationProductFromExternalIds;
|
|
15804
|
+
if (!(i != null && i.id))
|
|
15824
15805
|
throw new Error("Integration product not found.");
|
|
15825
|
-
return new qa(
|
|
15806
|
+
return new qa(i);
|
|
15826
15807
|
}
|
|
15827
15808
|
async getIntegrationProduct(t) {
|
|
15828
15809
|
return t.type === "integration" ? this.getIntegrationProductById(t.integrationProductId) : this.getIntegrationProductFromExternalIds(t.externalIntegrationId, t.externalProductId);
|