@misiki/gocommerce-connector 0.24.0 → 0.25.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 CHANGED
@@ -158,7 +158,7 @@ down stays best-effort: the storefront renders from its static record.
158
158
  | WhatsApp order updates at checkout | `/x/notify-whatsapp/consent` — `whatsappService.consentOffer()`: `{ enabled, marketing }`, whether to show the order-updates box and the offers-and-reminders box; both false when ext/notify-whatsapp is not in the engine or does not answer, so checkout never waits on it. `whatsappService.setConsent({ cartId, phone, orderUpdates, marketing })` (PUT) records both answers for the phone, an unticked box as `false`; with `marketing` the engine keeps the phone on the bag for basket reminders. It throws the engine's 400 (`validation_failed`) when the phone is not a WhatsApp number for the store's country |
159
159
  | contact form, product enquiries | `/x/contact/messages`, with the form's hidden `website` honeypot passed on so the engine drops what a bot filled in |
160
160
  | search words, type-ahead (plugin on) | `/x/meilisearch/search`, falling back to the engine's own search when it is off or down |
161
- | store record | the storefront's own config, with the engine's currency, menus and module switches over it; the store's own logo, dark logo and icon (`logo_url`, `logo_dark_url`, `icon_url` from `/api/store`, D148) replace `logo`, `logoDark` and `favicon` when it has them; for the contact page (D156), the address once the store shows it (as `address: { street, city, state, pincode, country }`), `mapLocation` and `openingHours` when set, `businessCountry` (the store's ISO country, for the phone's country code), the `whatsapp-chat` plugin's number as `plugins.whatsappChatButton`, and Google Customer Reviews (ext/google-reviews) as `plugins.googleReviewsOptIn` (`active` while the survey is on) and `plugins.googleStoreWidget` (`{ active, position: 'RIGHT_BOTTOM' \| 'LEFT_BOTTOM' }`, off without the survey) |
161
+ | store record | the storefront's own config, with the engine's currency, menus and module switches over it; the store's own logo, dark logo and icon (`logo_url`, `logo_dark_url`, `icon_url` from `/api/store`, D148) replace `logo`, `logoDark` and `favicon` when it has them; for the contact page (D156), the address once the store shows it (as `address: { street, city, state, pincode, country }`), `mapLocation` and `openingHours` when set, `businessCountry` (the store's ISO country, for the phone's country code), the `whatsapp-chat` plugin's number as `plugins.whatsappChatButton`, and Google Customer Reviews (ext/google-reviews) as `plugins.googleReviewsOptIn` (`active` while the survey is on), `plugins.googleStoreWidget` (`{ active, position: 'RIGHT_BOTTOM' \| 'LEFT_BOTTOM' }`, off without the survey), and the `criteo` plugin's account as `plugins.criteo: { active, accountId }` (the engine decides, never the static record) |
162
162
  | resized product pictures | `/images/{store}/cdn-cgi/image/width=…/…` — the store record's `plugins.imageCdn` is turned on with provider `cloudflare` and the engine's `images_path` (from `/api/store`, D139) after `PUBLIC_GOCOMMERCE_API_URL`, so the storefront's srcset asks the engine for each width; an engine without it leaves the static record's setting |
163
163
 
164
164
  Blogs, banners, reels, chat, warranties, deals and uploads have no engine
package/dist/index.cjs CHANGED
@@ -3260,6 +3260,14 @@ var StoreService = class extends BaseService {
3260
3260
  message: String(plugins.get("whatsapp-chat")?.settings?.message ?? "")
3261
3261
  } : {}
3262
3262
  },
3263
+ // Criteo's OneTag, for this store's own account. The engine decides: on a shared
3264
+ // deployment the static record is every store's, and one store's account must
3265
+ // never load on another's pages.
3266
+ criteo: {
3267
+ ...basePlugins.criteo,
3268
+ ...flag(plugins.has("criteo")),
3269
+ ...plugins.has("criteo") ? { accountId: String(plugins.get("criteo")?.settings?.account_id ?? "") } : {}
3270
+ },
3263
3271
  isProductReviewsAndRatings: {
3264
3272
  ...basePlugins.isProductReviewsAndRatings,
3265
3273
  ...flag(plugins.has("product-reviews"))