@misiki/gocommerce-connector 0.30.0 → 0.31.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/README.md +1 -1
- package/dist/{index-BdXhbm20.d.cts → index-sPZh8NN4.d.cts} +8 -6
- package/dist/{index-BdXhbm20.d.ts → index-sPZh8NN4.d.ts} +8 -6
- package/dist/index.cjs +8 -7
- 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 -7
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +8 -7
- 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 -7
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,7 +231,7 @@ Each of these is a real gap, listed so nobody has to find it in production.
|
|
|
231
231
|
none of them the gateway the shopper chose. Cash on delivery and Razorpay's
|
|
232
232
|
modal match engine gateways directly. The storefront's redirect flow (which it
|
|
233
233
|
reaches by the code `PAYPAL`) carries the store's first hosted-page gateway —
|
|
234
|
-
Adyen, Paddle, Lemon Squeezy, Creem, Hyperswitch or RevenueCat — under that
|
|
234
|
+
PayPal, Adyen, Paddle, Lemon Squeezy, Creem, Hyperswitch or RevenueCat — under that
|
|
235
235
|
gateway's own name and a neutral card icon; a second one cannot be told apart
|
|
236
236
|
from the first and is not offered. GoCommerce's Stripe is a Payment Element (a
|
|
237
237
|
client secret), which this storefront does not mount. Every method left off is
|
|
@@ -201,6 +201,8 @@ type Product = {
|
|
|
201
201
|
seo_description: string;
|
|
202
202
|
image_url?: string;
|
|
203
203
|
media_count?: number;
|
|
204
|
+
/** The picture after the lead, which a listing card shows on hover. */
|
|
205
|
+
hover_image_url?: string;
|
|
204
206
|
/** The gallery, pictures and videos in order: on the public product only (D134). */
|
|
205
207
|
media?: VariantImage[];
|
|
206
208
|
/** The sold count rounded down; absent unless the shop shows counts and it passed the threshold (D134). */
|
|
@@ -4719,12 +4721,12 @@ declare class CheckoutService extends BaseService {
|
|
|
4719
4721
|
checkoutStripeCapture(): Promise<never>;
|
|
4720
4722
|
/**
|
|
4721
4723
|
* The storefront's generic redirect flow, which it reaches through the code
|
|
4722
|
-
* `PAYPAL`.
|
|
4723
|
-
*
|
|
4724
|
-
*
|
|
4725
|
-
*
|
|
4726
|
-
*
|
|
4727
|
-
* webhook
|
|
4724
|
+
* `PAYPAL`. paymentMethodService puts the store's first hosted-page gateway
|
|
4725
|
+
* — PayPal, Adyen, Paddle, Lemon Squeezy, Creem, Hyperswitch or RevenueCat —
|
|
4726
|
+
* under that code, with its own name and a neutral icon, because this is the
|
|
4727
|
+
* one storefront flow that sends a shopper to a URL and back. The shopper
|
|
4728
|
+
* returns to the success page; the gateway's webhook tells the engine the
|
|
4729
|
+
* order is paid. PayPal's webhook is also what captures the approved payment.
|
|
4728
4730
|
*/
|
|
4729
4731
|
checkoutPaypal({ cartId, origin }?: {
|
|
4730
4732
|
cartId?: string;
|
|
@@ -201,6 +201,8 @@ type Product = {
|
|
|
201
201
|
seo_description: string;
|
|
202
202
|
image_url?: string;
|
|
203
203
|
media_count?: number;
|
|
204
|
+
/** The picture after the lead, which a listing card shows on hover. */
|
|
205
|
+
hover_image_url?: string;
|
|
204
206
|
/** The gallery, pictures and videos in order: on the public product only (D134). */
|
|
205
207
|
media?: VariantImage[];
|
|
206
208
|
/** The sold count rounded down; absent unless the shop shows counts and it passed the threshold (D134). */
|
|
@@ -4719,12 +4721,12 @@ declare class CheckoutService extends BaseService {
|
|
|
4719
4721
|
checkoutStripeCapture(): Promise<never>;
|
|
4720
4722
|
/**
|
|
4721
4723
|
* The storefront's generic redirect flow, which it reaches through the code
|
|
4722
|
-
* `PAYPAL`.
|
|
4723
|
-
*
|
|
4724
|
-
*
|
|
4725
|
-
*
|
|
4726
|
-
*
|
|
4727
|
-
* webhook
|
|
4724
|
+
* `PAYPAL`. paymentMethodService puts the store's first hosted-page gateway
|
|
4725
|
+
* — PayPal, Adyen, Paddle, Lemon Squeezy, Creem, Hyperswitch or RevenueCat —
|
|
4726
|
+
* under that code, with its own name and a neutral icon, because this is the
|
|
4727
|
+
* one storefront flow that sends a shopper to a URL and back. The shopper
|
|
4728
|
+
* returns to the success page; the gateway's webhook tells the engine the
|
|
4729
|
+
* order is paid. PayPal's webhook is also what captures the approved payment.
|
|
4728
4730
|
*/
|
|
4729
4731
|
checkoutPaypal({ cartId, origin }?: {
|
|
4730
4732
|
cartId?: string;
|
package/dist/index.cjs
CHANGED
|
@@ -561,6 +561,7 @@ function productImages(p) {
|
|
|
561
561
|
if (url && !out.includes(url)) out.push(url);
|
|
562
562
|
};
|
|
563
563
|
push(mediaUrl(p.image_url));
|
|
564
|
+
push(mediaUrl(p.hover_image_url));
|
|
564
565
|
for (const m of arr(p.media)) if (m.kind === "image") push(mediaUrl(m.url));
|
|
565
566
|
for (const v of arr(p.variants)) for (const url of variantImages(v)) push(url);
|
|
566
567
|
return out;
|
|
@@ -2229,12 +2230,12 @@ var CheckoutService = class extends BaseService {
|
|
|
2229
2230
|
}
|
|
2230
2231
|
/**
|
|
2231
2232
|
* The storefront's generic redirect flow, which it reaches through the code
|
|
2232
|
-
* `PAYPAL`.
|
|
2233
|
-
*
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2236
|
-
*
|
|
2237
|
-
* webhook
|
|
2233
|
+
* `PAYPAL`. paymentMethodService puts the store's first hosted-page gateway
|
|
2234
|
+
* — PayPal, Adyen, Paddle, Lemon Squeezy, Creem, Hyperswitch or RevenueCat —
|
|
2235
|
+
* under that code, with its own name and a neutral icon, because this is the
|
|
2236
|
+
* one storefront flow that sends a shopper to a URL and back. The shopper
|
|
2237
|
+
* returns to the success page; the gateway's webhook tells the engine the
|
|
2238
|
+
* order is paid. PayPal's webhook is also what captures the approved payment.
|
|
2238
2239
|
*/
|
|
2239
2240
|
async checkoutPaypal({ cartId, origin } = {}) {
|
|
2240
2241
|
const gateway = await this.redirectGateway();
|
|
@@ -2458,7 +2459,7 @@ var CheckoutService = class extends BaseService {
|
|
|
2458
2459
|
return result;
|
|
2459
2460
|
}
|
|
2460
2461
|
};
|
|
2461
|
-
var REDIRECT_GATEWAYS = /* @__PURE__ */ new Set(["adyen", "paddle", "lemonsqueezy", "creem", "hyperswitch", "revenuecat"]);
|
|
2462
|
+
var REDIRECT_GATEWAYS = /* @__PURE__ */ new Set(["paypal", "adyen", "paddle", "lemonsqueezy", "creem", "hyperswitch", "revenuecat"]);
|
|
2462
2463
|
var unsupported = (method, why) => new NotSupportedError("CheckoutService", method, why);
|
|
2463
2464
|
function keyAlreadyUsed(err) {
|
|
2464
2465
|
return err instanceof GoCommerceError && err.status === 400 && err.message.includes("Idempotency-Key was already used");
|