@shoppexio/storefront 1.0.79 → 1.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.
- package/CHANGELOG.md +9 -0
- package/dist/{chunk-ZVOFFURI.js → chunk-QNHOMMRG.js} +3 -1
- package/dist/{chunk-ZVOFFURI.js.map → chunk-QNHOMMRG.js.map} +1 -1
- package/dist/customer.cjs +2 -0
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.js +1 -1
- package/dist/index.cjs +16 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/customer.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
customerResellerWalletSchema,
|
|
39
39
|
customerWarrantyClaimSchema,
|
|
40
40
|
customerWarrantyListSchema
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QNHOMMRG.js";
|
|
42
42
|
|
|
43
43
|
// ../sdk/src/headless-customer.ts
|
|
44
44
|
var DEFAULT_API_ORIGIN = "https://api.shoppex.io";
|
package/dist/index.cjs
CHANGED
|
@@ -17128,10 +17128,11 @@ var publicInvoiceWireSchema = external_exports.object({
|
|
|
17128
17128
|
cashapp_qrcode: external_exports.string().nullable().optional(),
|
|
17129
17129
|
created_at: external_exports.string().optional(),
|
|
17130
17130
|
crypto_address: external_exports.string().nullable().optional(),
|
|
17131
|
-
|
|
17131
|
+
// null when the invoice has no crypto leg (card, PayPal, unselected gateway).
|
|
17132
|
+
crypto_amount: stringOrNumberSchema.nullable().optional(),
|
|
17132
17133
|
crypto_confirmations_needed: external_exports.number().nullable().optional(),
|
|
17133
17134
|
crypto_exchange_rate: stringOrNumberSchema.nullable().optional(),
|
|
17134
|
-
crypto_received: stringOrNumberSchema.optional(),
|
|
17135
|
+
crypto_received: stringOrNumberSchema.nullable().optional(),
|
|
17135
17136
|
crypto_uri: external_exports.string().nullable().optional(),
|
|
17136
17137
|
developer_invoice: external_exports.unknown().optional(),
|
|
17137
17138
|
developer_return_url: external_exports.string().nullable().optional(),
|
|
@@ -17845,6 +17846,8 @@ var customerResellerRelationshipSchema = external_exports.object({
|
|
|
17845
17846
|
});
|
|
17846
17847
|
var customerResellerSummarySchema = external_exports.object({
|
|
17847
17848
|
program_enabled: external_exports.boolean(),
|
|
17849
|
+
api_enabled: external_exports.boolean(),
|
|
17850
|
+
portal_purchasing_enabled: external_exports.boolean(),
|
|
17848
17851
|
enrollment_mode: external_exports.enum(["MANUAL", "APPLICATION", "OPEN"]),
|
|
17849
17852
|
application_message: nullableStringSchema,
|
|
17850
17853
|
require_application_note: external_exports.boolean(),
|
|
@@ -19516,8 +19519,7 @@ async function captureAffiliateFromUrl(param = "ref") {
|
|
|
19516
19519
|
if (!code) return null;
|
|
19517
19520
|
const held = getStoredAffiliate();
|
|
19518
19521
|
const holdsOtherCode = held !== null && held.code !== code;
|
|
19519
|
-
|
|
19520
|
-
if (!mayHoldFirstClick) {
|
|
19522
|
+
if (!holdsOtherCode) {
|
|
19521
19523
|
setAffiliateCode(code, held?.windowDays ?? DEFAULT_TTL_DAYS, held?.mode);
|
|
19522
19524
|
}
|
|
19523
19525
|
if (isInitialized()) {
|
|
@@ -19540,14 +19542,12 @@ async function captureAffiliateFromUrl(param = "ref") {
|
|
|
19540
19542
|
const heldMode = res.success && res.data?.held_attribution_mode ? normalizeMode(res.data.held_attribution_mode) : null;
|
|
19541
19543
|
const holdsFirstClick = holdsOtherCode && (heldMode ?? held?.mode) === "FIRST_CLICK";
|
|
19542
19544
|
if (holdsFirstClick && held) {
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
});
|
|
19550
|
-
}
|
|
19545
|
+
restoreStoredAffiliate({
|
|
19546
|
+
code: held.code,
|
|
19547
|
+
expiresAt: held.expiresAt,
|
|
19548
|
+
windowDays: held.windowDays,
|
|
19549
|
+
mode: heldMode ?? held.mode
|
|
19550
|
+
});
|
|
19551
19551
|
return held.code;
|
|
19552
19552
|
}
|
|
19553
19553
|
if (res.success && res.data?.accepted && res.data.affiliate_code) {
|
|
@@ -19555,15 +19555,16 @@ async function captureAffiliateFromUrl(param = "ref") {
|
|
|
19555
19555
|
return res.data.affiliate_code;
|
|
19556
19556
|
}
|
|
19557
19557
|
if (res.success && res.data && res.data.accepted === false) {
|
|
19558
|
+
if (holdsOtherCode) return held.code;
|
|
19558
19559
|
clearAffiliateCode();
|
|
19559
19560
|
return null;
|
|
19560
19561
|
}
|
|
19561
|
-
return
|
|
19562
|
+
return holdsOtherCode ? held.code : code;
|
|
19562
19563
|
} catch {
|
|
19563
|
-
return
|
|
19564
|
+
return holdsOtherCode ? held.code : code;
|
|
19564
19565
|
}
|
|
19565
19566
|
}
|
|
19566
|
-
return
|
|
19567
|
+
return holdsOtherCode ? held.code : code;
|
|
19567
19568
|
}
|
|
19568
19569
|
|
|
19569
19570
|
// ../sdk/src/utils/cart-line-id.ts
|