@misiki/gocommerce-connector 0.15.0 → 0.16.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/README.md +2 -2
- package/dist/{index-GdjWgh5b.d.cts → index-Dm_1E1ai.d.cts} +27 -2
- package/dist/{index-GdjWgh5b.d.ts → index-Dm_1E1ai.d.ts} +27 -2
- package/dist/index.cjs +29 -2
- 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 +29 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +29 -2
- 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 +29 -2
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
package/dist/services/index.cjs
CHANGED
|
@@ -3033,6 +3033,21 @@ var StoreService = class extends BaseService {
|
|
|
3033
3033
|
...profile?.logo_url ? { logo: mediaUrl(profile.logo_url), logoDark: void 0 } : {},
|
|
3034
3034
|
...profile?.logo_dark_url ? { logoDark: mediaUrl(profile.logo_dark_url) } : {},
|
|
3035
3035
|
...profile?.icon_url ? { favicon: mediaUrl(profile.icon_url) } : {},
|
|
3036
|
+
// What the contact page shows (D156), only what the store published. The address
|
|
3037
|
+
// in the shape the storefront's contact page and home-page JSON-LD already read. The
|
|
3038
|
+
// country beside it, not over `country`: that is the address form's default country.
|
|
3039
|
+
...profile?.country ? { businessCountry: profile.country } : {},
|
|
3040
|
+
...profile?.address ? {
|
|
3041
|
+
address: {
|
|
3042
|
+
street: [profile.address.line1, profile.address.line2].filter(Boolean).join(", "),
|
|
3043
|
+
city: profile.address.city,
|
|
3044
|
+
state: profile.address.state,
|
|
3045
|
+
pincode: profile.address.postal_code,
|
|
3046
|
+
country: profile.address.country
|
|
3047
|
+
}
|
|
3048
|
+
} : {},
|
|
3049
|
+
...profile?.map_location ? { mapLocation: profile.map_location } : {},
|
|
3050
|
+
...profile?.opening_hours?.length ? { openingHours: profile.opening_hours } : {},
|
|
3036
3051
|
currencyCode: code,
|
|
3037
3052
|
currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
|
|
3038
3053
|
currency: {
|
|
@@ -3046,6 +3061,16 @@ var StoreService = class extends BaseService {
|
|
|
3046
3061
|
// Features this connector serves from a module: on exactly when the
|
|
3047
3062
|
// module is installed and switched on, whatever the static record says.
|
|
3048
3063
|
isWishlist: { ...basePlugins.isWishlist, ...flag(plugins.has("wishlist")) },
|
|
3064
|
+
// The corner button and the contact page's WhatsApp card read the number from
|
|
3065
|
+
// here; the engine's plugin holds it, in international digits.
|
|
3066
|
+
whatsappChatButton: {
|
|
3067
|
+
...basePlugins.whatsappChatButton,
|
|
3068
|
+
...flag(plugins.has("whatsapp-chat")),
|
|
3069
|
+
...plugins.has("whatsapp-chat") ? {
|
|
3070
|
+
phone: String(plugins.get("whatsapp-chat")?.settings?.phone ?? ""),
|
|
3071
|
+
message: String(plugins.get("whatsapp-chat")?.settings?.message ?? "")
|
|
3072
|
+
} : {}
|
|
3073
|
+
},
|
|
3049
3074
|
isProductReviewsAndRatings: {
|
|
3050
3075
|
...basePlugins.isProductReviewsAndRatings,
|
|
3051
3076
|
...flag(plugins.has("product-reviews"))
|
|
@@ -3272,7 +3297,8 @@ var ContactService = class extends BaseService {
|
|
|
3272
3297
|
email,
|
|
3273
3298
|
phone,
|
|
3274
3299
|
message,
|
|
3275
|
-
subject
|
|
3300
|
+
subject,
|
|
3301
|
+
website
|
|
3276
3302
|
}) {
|
|
3277
3303
|
return this.data("/x/contact/messages", {
|
|
3278
3304
|
method: "POST",
|
|
@@ -3281,7 +3307,8 @@ var ContactService = class extends BaseService {
|
|
|
3281
3307
|
email: String(email ?? ""),
|
|
3282
3308
|
...phone ? { phone: String(phone) } : {},
|
|
3283
3309
|
...subject ? { subject: String(subject) } : {},
|
|
3284
|
-
body: String(message ?? "")
|
|
3310
|
+
body: String(message ?? ""),
|
|
3311
|
+
...website ? { website: String(website) } : {}
|
|
3285
3312
|
}
|
|
3286
3313
|
});
|
|
3287
3314
|
}
|