@misiki/gocommerce-connector 0.27.0 → 0.28.0
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-BY0qUnNO.d.cts → index-BaFtBtaA.d.cts} +3 -1
- package/dist/{index-BY0qUnNO.d.ts → index-BaFtBtaA.d.ts} +3 -1
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +8 -1
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +8 -1
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
package/dist/services/index.cjs
CHANGED
|
@@ -367,12 +367,19 @@ var BaseService = class _BaseService {
|
|
|
367
367
|
* Prices a cart at the signed-in shopper's customer-group prices. The
|
|
368
368
|
* engine does this only for an account whose email is confirmed (403
|
|
369
369
|
* otherwise), and the cart stays the shopper's either way — so a refusal
|
|
370
|
-
* is not an error, and neither is a build without ext/identity.
|
|
370
|
+
* is not an error, and neither is a build without ext/identity. A refused
|
|
371
|
+
* claim still gives the cart the account's email, which the claim would
|
|
372
|
+
* have set, or the checkout asks the shopper for it again.
|
|
371
373
|
*/
|
|
372
374
|
async claimCartForAccount(cartId) {
|
|
373
375
|
try {
|
|
374
376
|
await this.engine("/x/identity/me/carts", { method: "POST", body: { cart_id: cartId }, auth: true });
|
|
375
377
|
} catch {
|
|
378
|
+
const email = currentMe()?.email;
|
|
379
|
+
if (email)
|
|
380
|
+
await this.engine(`/api/carts/${encodeURIComponent(cartId)}/email`, { method: "PUT", body: { email } }).catch(
|
|
381
|
+
() => void 0
|
|
382
|
+
);
|
|
376
383
|
}
|
|
377
384
|
}
|
|
378
385
|
// ------------------------------------------------------------ Litekart verbs
|