id
stringlengths 12
68
| messages
listlengths 3
7
|
|---|---|
doc_3acf3cb6
|
[
{
"content": "You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.",
"role": "system"
},
{
"content": "How do I use zopim?",
"role": "user"
},
{
"content": "Documentation\n\n[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)\n\n[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides)\n\n[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/api-reference)\n\n[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/app-development)\n\n[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/storefront-development)\n\n[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/vtex-io-apps)\n\n[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/troubleshooting)\n\n[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/updates/release-notes)\n\nVTEX IO Apps\n\n[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/basic-components)\n\n---\n\n[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/store-components)\n\n---\n\n[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/advanced-components)\n\n---\n\n[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/b2b-components)\n\n---\n\n[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.b2b-suite)\n\n---\n\n[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/functional-apps)\n\n---\n\n[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/layout-apps)\n\n---\n\n[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/pixel-apps)\n\n[Alexa Certify](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.alexa-certify-code)\n\n[Audara](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.audara)\n\n[Bluecore](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.bluecore)\n\n[Blueknow app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.blueknow)\n\n[BTG360](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.btg360)\n\n[Cookiebot](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cookiebot)\n\n[Cookie Script](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cookie-script)\n\n[CyberSource Fingerprint](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cybersource-fingerprint)\n\n[Elfsight](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.elfsight)\n\n[Facebook pixel](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.facebook-pixel)\n\n[Facebook Domain Verification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.facebook-domain-verification)\n\n[Google Adwords](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-adwords)\n\n[Google Customer Reviews](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-customer-reviews)\n\n[Hotjar](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.hotjar)\n\n[Idea CRM](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.ideacrm)\n\n[Iubenda](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.iubenda)\n\n[JivoChat](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.jivochat)\n\n[Kelkoo app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.kelkoo)\n\n[LogRocket](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.logrocket)\n\n[Lucky Orange](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.lucky-orange)\n\n[Search Console](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-search-console)\n\n[Shareasale](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.shareasale)\n\n[smarthint](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.smarthint)\n\n[Suiteshare](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.suite-share)\n\n[Tawk.to](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.tawk-to)\n\n[Trustpilot](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.trustpilot)\n\n[Zendesk Chat](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zendesk-chat)\n\n[Zopim](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zopim)\n\n---\n\n[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.my-account)\n\n---\n\n[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/vtex-io-deprecated-apps)\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides)\n\n[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/api-reference)\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/app-development)\n\n[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/storefront-development)\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/vtex-io-apps)\n\n[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/troubleshooting)\n\n---\n\n[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/updates/release-notes)\n\nVTEX IO Apps\n\n[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/basic-components)\n\n---\n\n[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/store-components)\n\n---\n\n[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/advanced-components)\n\n---\n\n[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/b2b-components)\n\n---\n\n[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.b2b-suite)\n\n---\n\n[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/functional-apps)\n\n---\n\n[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/layout-apps)\n\n---\n\n[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/pixel-apps)\n\n[Alexa Certify](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.alexa-certify-code)\n\n[Audara](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.audara)\n\n[Bluecore](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.bluecore)\n\n[Blueknow app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.blueknow)\n\n[BTG360](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.btg360)\n\n[Cookiebot](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cookiebot)\n\n[Cookie Script](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cookie-script)\n\n[CyberSource Fingerprint](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.cybersource-fingerprint)\n\n[Elfsight](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.elfsight)\n\n[Facebook pixel](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.facebook-pixel)\n\n[Facebook Domain Verification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.facebook-domain-verification)\n\n[Google Adwords](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-adwords)\n\n[Google Customer Reviews](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-customer-reviews)\n\n[Hotjar](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.hotjar)\n\n[Idea CRM](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.ideacrm)\n\n[Iubenda](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.iubenda)\n\n[JivoChat](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.jivochat)\n\n[Kelkoo app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.kelkoo)\n\n[LogRocket](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.logrocket)\n\n[Lucky Orange](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.lucky-orange)\n\n[Search Console](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.google-search-console)\n\n[Shareasale](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.shareasale)\n\n[smarthint](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.smarthint)\n\n[Suiteshare](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.suite-share)\n\n[Tawk.to](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.tawk-to)\n\n[Trustpilot](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.trustpilot)\n\n[Zendesk Chat](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zendesk-chat)\n\n[Zopim](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zopim)\n\n---\n\n[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.my-account)\n\n---\n\n[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/vtex-io-deprecated-apps)\n\n---\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/vtex-io-apps)\n\n[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/guides/pixel-apps)\n\nZopim\n\nOfficial extension\n\nVersion: 1.2.3\n\nLatest version: 1.2.3\n\nVTEX Zopim first-party app\n\n## How to install\n\nOpen the VTEX App Store and install this app on your store.\n\nNow, open the app settings on your admin and fill in your Zopim's Account Key.\n\n[Zendesk Chat« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zendesk-chat)[My Account - StoreV2 versionNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.my-account)\n\nSee also\n\n[VTEX App StoreVTEX IO Apps](https://read.calvincode.net/reader?url=https://apps.vtex.com/)\n\nON THIS PAGE\n\n[How to install](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.zopim/docs/apps/vtex.zopim%23how-to-install)\n\nWas this helpful?\n\n[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)",
"role": "assistant"
}
] |
code_glovo-integration_bd124350
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Icon Glovo component in my VTEX store?",
"role": "user"
},
{
"content": "```tsx\nimport type { FC } from 'react'\nimport React from 'react'\n\nimport logo from './GlovoLogo.png'\n\ninterface Props {\n size?: number\n}\n\nconst IconGlovo: FC<Props> = ({ size = 80 }) => {\n return <img src={logo} style={{ width: `${size}px` }} alt=\"Glovo logo\" />\n}\n\nexport { IconGlovo }\n\n```",
"role": "assistant"
}
] |
code_community_bc99f2d7
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in community/b2b-newstore-theme-experimental/store/blocks/product/features.jsonc.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```jsonc\n{\n \"flex-layout.row#features\": {\n \"children\": [\"flex-layout.col#features\"],\n \"props\": {\n \"blockClass\": \"specification\"\n }\n },\n\n \"flex-layout.col#features\": {\n \"children\": [\"disclosure-layout#features\", \"flex-layout.col#divider\"],\n \"props\": {\n \"blockClass\": \"specification\",\n \"width\": \"74%\"\n }\n },\n\n \"disclosure-layout#features\": {\n \"children\": [\"disclosure-trigger#features\", \"disclosure-content#features\"],\n \"props\": {\n \"initialVisibility\": \"visible\"\n }\n },\n\n \"disclosure-trigger#features\": {\n \"children\": [\"flex-layout.row#disclosure-trigger-features\"],\n \"props\": {\n \"as\": \"div\"\n }\n },\n\n \"flex-layout.row#disclosure-trigger-features\": {\n \"children\": [\n \"rich-text#features-disclosure-trigger-heading\",\n \"flex-layout.col#spacer\",\n \"disclosure-state-indicator\"\n ],\n \"props\": {\n \"blockClass\": [\"items-end\", \"disclosure-trigger-specification\"],\n \"colGap\": 0,\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true\n }\n },\n\n \"rich-text#features-disclosure-trigger-heading\": {\n \"props\": {\n \"blockClass\": [\"features\", \"disclosure-trigger-heading\"],\n \"text\": \"<span>Features & details</span>\",\n \"font\": \"t-heading-5\"\n }\n },\n\n \"disclosure-content#features\": {\n \"children\": [\"product-specification-group#features\"],\n \"props\": {\n \"blockClass\": \"specification\"\n }\n },\n\n \"product-specification-group#features\": {\n \"children\": [\"flex-layout.row#spec-group--features\"],\n \"props\": {\n \"filter\": {\n \"type\": \"show\",\n \"specificationGroups\": [\"Features & details\"]\n }\n }\n },\n\n \"flex-layout.row#spec-group--features\": {\n \"children\": [\"flex-layout.col#spec-group--features\"],\n \"props\": {\n \"blockClass\": [\"spec-group\"]\n }\n },\n\n \"flex-layout.col#spec-group--features\": {\n \"children\": [\"product-specification#table--features\"],\n \"props\": {\n \"blockClass\": [\"spec-group\"]\n }\n },\n\n \"product-specification#table--features\": {\n \"children\": [\"flex-layout.row#spec-item--features\"]\n },\n\n \"flex-layout.row#spec-item--features\": {\n \"children\": [\"flex-layout.col#spec-name--features\"],\n \"props\": {\n \"blockClass\": [\"spec-item\"],\n \"preserveLayoutOnMobile\": true,\n \"colGap\": 3\n }\n },\n\n \"flex-layout.col#spec-name--features\": {\n \"children\": [\"product-specification-text#features\"],\n \"props\": {\n \"blockClass\": [\"spec-name\", \"features\"]\n }\n },\n\n \"product-specification-text#features\": {\n \"props\": {\n \"blockClass\": [\"bullet-list\"],\n \"message\": \"{specificationName}\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_product-availability-gallery_230bccbc
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Show Available component in my VTEX store?",
"role": "user"
},
{
"content": "The implementation is:\n\n```tsx\nimport React from 'react'\n\nimport { useContextCssHandles } from './CssHandlesContext'\n\ninterface Props {\n showAvailabilityMessage?: string\n availableQuantity: number\n}\n\nfunction HighStock({ showAvailabilityMessage, availableQuantity }: Props) {\n const { handles } = useContextCssHandles()\n\n return (\n <span className={`${handles.showAvailableText} c-muted-2 t-body b mh1`}>\n {showAvailabilityMessage} {availableQuantity}\n </span>\n )\n}\n\nexport default HighStock\n\n```",
"role": "assistant"
}
] |
troubleshoot_store-header_performance_issues_af81ac32
|
[
{
"content": "You are a VTEX debugging expert. You help developers troubleshoot issues with VTEX IO apps, Store Framework components, and GraphQL services. You provide clear, actionable solutions with code fixes.",
"role": "system"
},
{
"content": "My page with store-header is loading slowly. What can I do to improve performance?",
"role": "user"
},
{
"content": "## Common Causes\n\nSlow page loading with `store-header` typically stems from these issues:\n\n1. **Unoptimized menu data fetching** - The header often loads navigation menus that fetch category trees synchronously, blocking render\n2. **Large header bundle size** - Including unnecessary components like search autocomplete, login widgets, and mega menus increases initial JavaScript payload\n3. **Missing lazy loading for below-fold components** - Components like minicart dropdowns and user account menus load eagerly even when not immediately visible\n4. **Excessive API calls** - Multiple simultaneous requests for user session, wishlist counts, and cart data create network bottleneck\n5. **Uncompressed or uncached static assets** - Logo images and icon fonts without proper caching headers force repeated downloads\n\n## Debugging Steps\n\n**Step 1: Analyze the header's network requests**\n\nOpen Chrome DevTools Network tab, filter by \"Fetch/XHR\", and reload the page. Look for requests triggered by header components - common culprits include `/api/catalog_system/pub/category/tree`, `/api/sessions`, and `/api/checkout/pub/orderForm`.\n\n**Step 2: Check component render timing**\n\nIn the Performance tab, record a page load and search for \"store-header\" in the flame chart. Identify which child blocks take longest to render.\n\n**Step 3: Audit bundle composition**\n\nRun `vtex deps list` and check which header-related apps are installed. Each dependency adds to the bundle size.\n\n**Step 4: Verify caching headers**\n\nIn Network tab, check the response headers for your logo and static assets. Look for `Cache-Control` and `ETag` headers.\n\n## Solution\n\n**Implement lazy loading for non-critical header components:**\n\n```json\n// store/blocks/header.jsonc\n{\n \"header-layout.desktop\": {\n \"children\": [\n \"header-row#main\",\n \"header-row#menu\"\n ]\n },\n \"header-row#main\": {\n \"children\": [\n \"logo#header\",\n \"search-bar\",\n \"minicart.v2#lazy\"\n ],\n \"props\": {\n \"blockClass\": \"main-header\",\n \"horizontalAlign\": \"center\"\n }\n },\n \"minicart.v2#lazy\": {\n \"props\": {\n \"variation\": \"popup\",\n \"openOnHover\": false,\n \"drawerSlideDirection\": \"rightToLeft\",\n \"MinicartIcon\": \"icon-cart#minicart\"\n }\n }\n}\n```\n\n**Optimize menu data fetching with memoization:**\n\n```json\n// store/blocks/header/menu.jsonc\n{\n \"vtex.menu@2.x:menu#header\": {\n \"props\": {\n \"orientation\": \"horizontal\",\n \"categoryId\": 1,\n \"textType\": \"t-body\",\n \"experimentalOptimizeRendering\": true\n },\n \"children\": [\n \"menu-item#category-womens\",\n \"menu-item#category-mens\"\n ]\n },\n \"menu-item#category-womens\": {\n \"props\": {\n \"id\": \"menu-item-womens\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/womens\",\n \"noFollow\": false,\n \"tagTitle\": \"Womens\",\n \"text\": \"Womens\"\n }\n }\n }\n}\n```\n\n**Reduce search bar initialization overhead:**\n\n```json\n{\n \"search-bar\": {\n \"props\": {\n \"placeholder\": \"Search products...\",\n \"attemptPageTypeSearch\": false,\n \"autocompleteAlignment\": \"left\",\n \"openAutocompleteOnFocus\": false,\n \"blurOnSubmit\": true,\n \"minSearchTermLength\": 3,\n \"autocompleteFullWidth\": false,\n \"displayMode\": \"search-button\"\n }\n }\n}\n```\n\n**Configure proper image optimization for logo:**\n\n```json\n{\n \"logo#header\": {\n \"props\": {\n \"url\": \"https://youraccount.vtexassets.com/assets/your-logo.svg\",\n \"width\": 150,\n \"height\": 40,\n \"title\": \"Store Name\",\n \"fetchpriority\": \"high\"\n }\n }\n}\n```\n\n## Prevention Tips\n\n1. **Use SVG logos** - Vector formats are smaller and scale without quality loss; avoid PNG/JPG for logos when possible\n\n2. **Defer non-essential widgets** - Login dropdowns, wishlist counters, and notification badges can load after initial paint using `experimentalLazyImages` and similar props\n\n3. **Limit menu depth** - Restrict category tree fetching to 2-3 levels maximum; deeper navigation should use separate page navigation\n\n4. **Enable HTTP/2** - Ensure your CDN configuration supports multiplexed connections to parallelize header asset loading\n\n5. **Audit regularly** - Run Lighthouse performance audits monthly; target a Time to Interactive under 3.5 seconds for header-heavy pages\n\n6. **Use `blockClass` strategically** - Apply custom classes only where needed to avoid CSS selector bloat that impacts render performance",
"role": "assistant"
}
] |
code_list-wallet_01da120c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of list-wallet/messages/fi.json from list-wallet.",
"role": "user"
},
{
"content": "```json\n{\n \"titles.value.gift.card\": \"Lahjakortin saldo: \",\n \"titles.credit\": \"Hyvitys: \",\n \"titles.redemption\": \"Luo lunastus:\",\n \"input.value.label\": \"Syötä summa\",\n \"input.value.button\": \"LUNASTA\",\n \"input.tooltip\": \"Koodi lahjakortin lunastamiseksi. Tämä koodi on ainutlaatuinen. Käytä sitä kaikissa ostoksissasi myymälässä.\",\n \"input.value.tooltip\": \"Muunna hyvityksesi lahjakorttisaldoksi.\",\n \"input.code.label\": \"Lahjakortin koodi\",\n \"input.code.placeholder\": \"Koodi\",\n \"input.code.button\": \"KOPIOI KOODI\",\n \"input.code.loading\": \"Ladataan...\",\n \"history.open.button\": \"Lauseke\",\n \"history.empty.title\": \"Ei toimintaa\",\n \"history.empty.message\": \"Lompakkosi saldo ei ole muuttunut.\",\n \"history.credit.description\": \"Hyvitys vastaanotettu\",\n \"history.debit.description\": \"Hyvitys muunnettu lahjakortiksi\",\n \"history.credit.status\": \"Hyvitys\",\n \"history.debit.status\": \"Veloitus\",\n \"history.date.title\": \"Päivämäärä\",\n \"history.description.title\": \"Kuvaus\",\n \"history.value.title\": \"Summa\",\n \"history.status.title\": \"Tila\",\n \"history.pagination.of\": \"alkaen\",\n \"history.filter.clear\": \"Tyhjennä suodattimet\",\n \"history.filter.all\": \"Kaikki\",\n \"history.filter.is\": \"on\",\n \"history.filter.between\": \"–\",\n \"history.filter.and\": \"ja\",\n \"history.filter.date\": \"Päivämäärä\",\n \"history.filter.status\": \"Tila\",\n \"history.filter.status.credit\": \"Hyvitykset\",\n \"history.filter.status.debit\": \"Veloitukset\",\n \"collapsible.title\": \"Minun lompakkoni\",\n \"provider.without.code\": \"Ei koodia\",\n \"provider.missing.value\": \"Syötä lunastussumma\",\n \"provider.value.negative\": \"Lisää summa, joka on suurempi kuin 0\",\n \"provider.value.bigger.than.could.be\": \"Syötä summa, joka on vähemmän tai yhtä suuri kuin \",\n \"toast.rescue.value\": \"Määrä: \",\n \"toast.rescue.sucess\": \"Lunastus onnistui!\",\n \"toast.rescue.error\": \"Virhe summan lisäämisessä lahjakortille\",\n \"toast.code\": \"Koodi \",\n \"toast.copy\": \"Kopioitu onnistuneesti\",\n \"toast.copy.error\": \"Koodin kopiointi epäonnistui\",\n \"toast.without.code\": \"Ei koodia\"\n}\n\n```",
"role": "assistant"
}
] |
code_native-types_2375f302
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of native-types/messages/sv-SE.json from native-types.",
"role": "user"
},
{
"content": "This is the code:\n\n```json\n{\n \"admin/native-types.brand\": \"Varumärke\",\n \"admin/native-types.category\": \"Kategori\",\n \"admin/native-types.collection\": \"Samling\",\n \"admin/native-types.department\": \"Avdelning\",\n \"admin/native-types.image\": \"Bild\",\n \"admin/native-types.image.description\": \"Beskrivning\",\n \"admin/native-types.image.desktop\": \"Skrivbord\",\n \"admin/native-types.image.filename\": \"Filnamn\",\n \"admin/native-types.image.mobile\": \"Mobil\",\n \"admin/native-types.link\": \"Koppla\",\n \"admin/native-types.link.attributeNofollow\": \"Attribut nofollow\",\n \"admin/native-types.link.attributeTitle\": \"Attribut title\",\n \"admin/native-types.link.newTab\": \"Ny flik\",\n \"admin/native-types.link.url\": \"URL\",\n \"admin/native-types.richText\": \"RTF\",\n \"admin/native-types.text\": \"Text\",\n \"admin/native-types.url\": \"URL\",\n \"admin/native-types.video.description\": \"Beskrivning\",\n \"admin/native-types.video.thumbnail\": \"Miniatyr\",\n \"admin/native-types.video\": \"Video\",\n \"admin/native-types.video.title\": \"Rubrik\",\n \"admin/native-types.video.url\": \"URL\",\n \"store/native-types.text\": \"Skriv din text här\",\n \"store/native-types.richText\": \"Lorem ipsum...\",\n \"store/native-types.url\": \"https://example.com\",\n \"admin/format-io-message.empty-string-example\": \"\",\n \"admin/format-io-message.working-static-example\": \"Det fungerar :)\",\n \"admin/format-io-message.working-dynamic-example\": \"{subject} {verb} {emoji}\"\n}\n\n```",
"role": "assistant"
}
] |
code_search-result_1f31a08f
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of search-result/react/components/FacetItem.js from search-result.",
"role": "user"
},
{
"content": "```javascript\nimport React, { useContext, useState, useEffect, useMemo } from 'react'\nimport { Checkbox } from 'vtex.styleguide'\nimport { useCssHandles, applyModifiers } from 'vtex.css-handles'\nimport classNames from 'classnames'\nimport { useSearchPage } from 'vtex.search-page-context/SearchPageContext'\nimport { usePixel } from 'vtex.pixel-manager'\nimport { useIntl } from 'react-intl'\n\nimport { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents'\nimport SettingsContext from './SettingsContext'\nimport ShippingActionButton from './ShippingActionButton'\nimport useShippingActions from '../hooks/useShippingActions'\n\nconst CSS_HANDLES = ['filterItem', 'productCount', 'filterItemTitle']\n\n// These are used to prevent creating a <Checkbox /> with id equal\n// to any of these words.\nconst reservedVariableNames = [\n 'global',\n 'window',\n 'document',\n 'self',\n 'screen',\n 'parent',\n]\n\nconst FacetItem = ({\n navigateToFacet,\n facetTitle,\n facet,\n className,\n preventRouteChange,\n showTitle = false,\n onOpenPostalCodeModal,\n onOpenPickupModal,\n}) => {\n const intl = useIntl()\n const { push } = usePixel()\n\n const { actionLabel, actionType, shouldDisable } = useShippingActions(facet)\n\n const showActionButton = !!actionType\n\n const { showFacetQuantity } = useContext(SettingsContext)\n\n const [selected, setSelected] = useState(facet.selected)\n const handles = useCssHandles(CSS_HANDLES)\n const classes = classNames(\n applyModifiers(handles.filterItem, facet.value),\n { [`${handles.filterItem}--selected`]: facet.selected },\n className,\n 'lh-copy w-100'\n )\n\n const { searchQuery } = useSearchPage()\n const sampling = searchQuery?.facets?.sampling\n\n const checkBoxId = reservedVariableNames.includes(facet.value)\n ? `filterItem--${facet.key}-${facet.value}`\n : `${facet.key}-${facet.value}`\n\n // This effect fixes the issue described in this PR\n // https://github.com/vtex-apps/search-result/pull/422\n useEffect(() => {\n if (facet.selected !== selected) {\n setSelected(facet.selected)\n }\n // however, having `selected` as a dependency causes it\n // to always reset back to `facet.selected`. So, we remove it,\n // so only changes in facet.selected affect the state.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [facet.selected])\n\n const facetLabel = useMemo(() => {\n let labelElement = facet.name\n\n if (showFacetQuantity && !sampling) {\n labelElement = (\n <>\n {labelElement}{' '}\n <span\n data-testid={`facet-quantity-${facet.value}-${facet.quantity}`}\n className={handles.productCount}\n >\n ({facet.quantity})\n </span>\n </>\n )\n }\n\n if (showActionButton) {\n labelElement = (\n <div>\n <div>{labelElement}</div>\n <ShippingActionButton\n label={intl.formatMessage({ id: actionLabel ?? 'none' })}\n openDrawer={\n actionType === 'DELIVERY'\n ? onOpenPostalCodeModal\n : onOpenPickupModal\n }\n />\n </div>\n )\n }\n\n if (showTitle) {\n labelElement = (\n <>\n <span className={handles.filterItemTitle}>{facetTitle}</span>:{' '}\n {labelElement}\n </>\n )\n }\n\n return labelElement\n }, [\n showFacetQuantity,\n sampling,\n facet.name,\n facet.value,\n facet.quantity,\n handles.productCount,\n handles.filterItemTitle,\n showActionButton,\n actionLabel,\n showTitle,\n facetTitle,\n intl,\n actionType,\n onOpenPostalCodeModal,\n onOpenPickupModal,\n ])\n\n return (\n <div\n className={classes}\n style={{ hyphens: 'auto', wordBreak: 'break-word', alignSelf: 'center' }}\n alt={facet.name}\n title={facet.name}\n >\n <Checkbox\n id={checkBoxId}\n checked={selected}\n label={facetLabel}\n name={facet.name}\n onChange={() => {\n pushFilterManipulationPixelEvent({\n name: facetTitle,\n value: facet.name,\n products: searchQuery?.products ?? [],\n push,\n })\n\n setSelected(!selected)\n navigateToFacet({ ...facet, title: facetTitle }, preventRouteChange)\n }}\n value={facet.name}\n disabled={shouldDisable}\n />\n </div>\n )\n}\n\nexport default FacetItem\n\n```",
"role": "assistant"
}
] |
code_mycheckout-sdk_e18d69d4
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of mycheckout-sdk/src/components/shared/Carousel/index.ts from mycheckout-sdk.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\nimport { Carousel as CarouselHOC } from './Carousel'\nimport { CarouselItem } from './CarouselItems/CarouselItem'\nimport type { CarouselHOCProps } from '../interfaces/interfaces'\n\nexport const Carousel: CarouselHOCProps = Object.assign(CarouselHOC, {\n Item: CarouselItem,\n})\n\nexport default Carousel\n\n```",
"role": "assistant"
}
] |
code_storefront-permissions_090e0137
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from storefront-permissions.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\nimport { AuthenticationError, ForbiddenError } from '@vtex/api'\nimport type { GraphQLField } from 'graphql'\nimport { defaultFieldResolver } from 'graphql'\nimport { SchemaDirectiveVisitor } from 'graphql-tools'\n\nimport sendAuthMetric, { AuthMetric } from '../metrics/auth'\nimport {\n validateAdminToken,\n validateAdminTokenOnHeader,\n validateApiToken,\n validateStoreToken,\n} from './helper'\n\nexport class CheckUserAccess extends SchemaDirectiveVisitor {\n public visitFieldDefinition(field: GraphQLField<any, any>) {\n const { resolve = defaultFieldResolver } = field\n\n field.resolve = async (\n root: any,\n args: any,\n context: Context,\n info: any\n ) => {\n const {\n vtex: { adminUserAuthToken, storeUserAuthToken, logger },\n } = context\n\n // now we emit a metric with all the collected data before we proceed\n const operation = field?.astNode?.name?.value ?? context?.request?.url\n const userAgent = context?.request?.headers['user-agent'] as string\n const caller = context?.request?.headers['x-vtex-caller'] as string\n const forwardedHost = context?.request?.headers[\n 'x-forwarded-host'\n ] as string\n\n const metricFields = {\n operation,\n forwardedHost,\n caller,\n userAgent,\n }\n\n const { hasAdminToken, hasValidAdminToken, hasCurrentValidAdminToken } =\n await validateAdminToken(\n context,\n adminUserAuthToken as string,\n metricFields\n )\n\n const {\n hasAdminTokenOnHeader,\n hasValidAdminTokenOnHeader,\n hasCurrentValidAdminTokenOnHeader,\n } = await validateAdminTokenOnHeader(context, metricFields)\n\n const { hasApiToken, hasValidApiToken } = await validateApiToken(\n context,\n metricFields\n )\n\n const { hasStoreToken, hasValidStoreToken, hasCurrentValidStoreToken } =\n await validateStoreToken(context, storeUserAuthToken as string)\n\n const auditMetric = new AuthMetric(\n context?.vtex?.account,\n {\n operation,\n forwardedHost,\n caller,\n userAgent,\n hasAdminToken,\n hasValidAdminToken,\n hasApiToken,\n hasValidApiToken,\n hasStoreToken,\n hasCurrentValidStoreToken,\n hasValidStoreToken,\n hasAdminTokenOnHeader,\n hasValidAdminTokenOnHeader,\n },\n 'CheckUserAccessAudit'\n )\n\n sendAuthMetric(logger, auditMetric)\n\n if (\n !hasAdminToken &&\n !hasApiToken &&\n !hasStoreToken &&\n !hasAdminTokenOnHeader\n ) {\n logger.warn({\n message: 'CheckUserAccess: No token provided',\n userAgent,\n caller,\n forwardedHost,\n operation,\n hasAdminToken,\n hasValidAdminToken,\n hasApiToken,\n hasValidApiToken,\n hasStoreToken,\n hasAdminTokenOnHeader,\n hasValidAdminTokenOnHeader,\n })\n throw new AuthenticationError('No token was provided')\n }\n\n if (\n !hasCurrentValidAdminToken &&\n !hasValidApiToken &&\n !hasCurrentValidStoreToken &&\n !hasCurrentValidAdminTokenOnHeader\n ) {\n logger.warn({\n message: `CheckUserAccess: Invalid token`,\n userAgent,\n caller,\n forwardedHost,\n operation,\n hasAdminToken,\n hasValidAdminToken,\n hasApiToken,\n hasValidApiToken,\n hasStoreToken,\n hasCurrentValidStoreToken,\n hasValidStoreToken,\n hasAdminTokenOnHeader,\n hasValidAdminTokenOnHeader,\n })\n throw new ForbiddenError('Unauthorized Access')\n }\n\n return resolve(root, args, context, info)\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_b2b-theme_e1cd6679
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the CSS/SCSS implementation from b2b-theme.",
"role": "user"
},
{
"content": "This is the code:\n\n```css\n.containerCreate,\n.containerList,\n.containerView {\n max-width: 1440px;\n width: 100%;\n padding: 0px;\n margin: 0px auto;\n}\n\n.buttonSave :global(.vtex-button),\n.createButton :global(.vtex-button),\n.buttonUse :global(.vtex-button) {\n background: var(--serious-blue-dark);\n}\n\n```",
"role": "assistant"
}
] |
code_order-manager_8e235c7b
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What dependencies does order-manager require?",
"role": "user"
},
{
"content": "This is the code:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"order-manager\",\n \"version\": \"0.12.1\",\n \"title\": \"Order Manager\",\n \"description\": \"Order Manager\",\n \"defaultLocale\": \"pt-BR\",\n \"builders\": {\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.checkout-resources\": \"0.x\",\n \"vtex.checkout-graphql\": \"0.x\",\n \"vtex.checkout-splunk\": \"0.x\",\n \"vtex.styleguide\": \"9.x\"\n },\n \"mustUpdateAt\": \"2019-04-02\",\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```",
"role": "assistant"
}
] |
code_product-availability-gallery_bdc3966a
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Product Availability component in my VTEX store?",
"role": "user"
},
{
"content": "The implementation is:\n\n```tsx\nimport ProductAvailabilityWrapper from './components/ProductAvailabilityWrapper'\n\nexport default ProductAvailabilityWrapper\n\n\n```",
"role": "assistant"
}
] |
code_relevanc_7e1bd4ae
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How does relevanc resolve GraphQL queries?",
"role": "user"
},
{
"content": "Here's how it works:\n\n```typescript\nimport { after } from './after'\nimport { before } from './before'\n\nexport const resolvers = {\n Query: {\n before,\n after,\n },\n}\n\n```",
"role": "assistant"
}
] |
code_b2b-organizations_c34c1dda
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of b2b-organizations/messages/ru.json from b2b-organizations.",
"role": "user"
},
{
"content": "```json\n{\n \"admin/b2b-organizations.autocomplete-searching\": \"Поиск организаций\",\n \"admin/b2b-organizations.b2b-organizations.navigation.label\": \"Корпоративные организации и финансовые центры\",\n \"admin/b2b-organizations.back\": \"Назад\",\n \"admin/b2b-organizations.bulk-import.import.done\": \"Готово\",\n \"admin/b2b-organizations.bulk-import.import.downloadReviewedLink\": \"Скачать проверенный XLSX\",\n \"admin/b2b-organizations.bulk-import.import.errorMessage\": \"Сбой импортирования. Повторите попытку.\",\n \"admin/b2b-organizations.bulk-import.import.fileExtensionError\": \"К сожалению, выбранный формат файлов не поддерживается.\",\n \"admin/b2b-organizations.bulk-import.import.fileSizeError\": \"К сожалению, размер файла слишком большой.\",\n \"admin/b2b-organizations.bulk-import.import.importDetails\": \"Информация об импортировании\",\n \"admin/b2b-organizations.bulk-import.import.importError\": \"Файл {fileName} импортирован с ошибками.\",\n \"admin/b2b-organizations.bulk-import.import.importErrorReportTitle\": \"Из-за ошибок не удалось импортировать организации-покупатели: {count} шт.\",\n \"admin/b2b-organizations.bulk-import.import.importErrorTryAgain\": \"Попробовать снова\",\n \"admin/b2b-organizations.bulk-import.import.importing\": \"Импорт\",\n \"admin/b2b-organizations.bulk-import.import.importProgress\": \"{completed} из {total}\",\n \"admin/b2b-organizations.bulk-import.import.importReportErrorTab\": \"Не импортировано ({count})\",\n \"admin/b2b-organizations.bulk-import.import.importReportGenericError\": \"Импортирование прервано из-за ошибок. Не удалось импортировать организации-покупатели: {count} шт. Проверьте ваш файл и загрузите его заново.\\nНужна помощь? Ознакомьтесь с нашим руководством по применению.\",\n \"admin/b2b-organizations.bulk-import.import.importReportSuccessTab\": \"Успешно импортировано ({count})\",\n \"admin/b2b-organizations.bulk-import.import.importReportTabTitle\": \"Отчет\",\n \"admin/b2b-organizations.bulk-import.import.importReportTitle\": \"Отчет об импортировании организаций-покупателей\",\n \"admin/b2b-organizations.bulk-import.import.importSuccess\": \"Файл {fileName} успешно импортирован.\",\n \"admin/b2b-organizations.bulk-import.import.importSuccessReportTitle\": \"Удалось импортировать организации-покупатели: {count} шт.\",\n \"admin/b2b-organizations.bulk-import.import.permissionAlertTooltip\": \"Требуется разрешение\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationDescription\": \"Файл {fileName} загружен {uploadDate} пользователем {userName}\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationImportFailed\": \"Не удалось импортировать\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationImportSuccessFully\": \"Успешно импортировано\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationInitialImport\": \"Скачайте файл <file-name-link>reviewed.xlsx</file-name-link> с полной разбивкой. В файле для каждой строки показан статус: зеленый означает успешное устранение ошибки, а красный — что ошибка осталась. В последнем столбце ошибок приведены ошибки и их детали, где это применимо.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationInitialUpload\": \"Скачайте <file-name-link>reviewed.xlsx</file-name-link> для устранения ошибок. В файле для каждой строки показан статус: зеленый означает успешное устранение ошибки, а красный — что ошибка осталась. В последнем столбце ошибок приведены ошибки и их детали, где это применимо.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationListTotal\": \"Всего\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationNextSteps\": \"Для устранения ошибок выполните следующие шаги:\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep1\": \"1. Проверьте строки, выделенные красным.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep2\": \"2. Исправьте ошибки.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep3Import\": \"3. Заново загрузите файл с помощью инструмента массового импортирования.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep3Upload\": \"3. Заново загрузите исправленные строки с помощью инструмента массового импортирования.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep4\": \"4. Убедитесь, что используете формат <template-link>VTEX File Template</template-link>. Нужна помощь? Ознакомьтесь с нашим <best-practices-link>руководством по импортированию</best-practices-link>.\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep4Filename\": \"VTEX File Template\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep4ImportGuide\": \"Ознакомьтесь с нашим руководством по импортированию\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationStep4NeedGuidance\": \"Нужна помощь?\",\n \"admin/b2b-organizations.bulk-import.import.reportInformationTitle\": \"Успешно импортировано {fullPercentage} % файлов\",\n \"admin/b2b-organizations.bulk-import.import.reportScreenDescription\": \"Файл <file-name-link>{fileName}</file-name-link>\",\n \"admin/b2b-organizations.bulk-import.import.reportScreenLabel\": \"Всего ошибок\",\n \"admin/b2b-organizations.bulk-import.import.reportScreenSuccessCount\": \"Организаций-покупателей: {successCount}\",\n \"admin/b2b-organizations.bulk-import.import.reportScreenTitle\": \"В этом файле обнаружены ошибки ({errorCount} шт.)\",\n \"admin/b2b-organizations.bulk-import.upload.back\": \"Назад\",\n \"admin/b2b-organizations.bulk-import.upload.close\": \"Закрыть\",\n \"admin/b2b-organizations.bulk-import.upload.dragDrop\": \"Перетяните файл сюда\",\n \"admin/b2b-organizations.bulk-import.upload.filesType\": \"Тип файла\",\n \"admin/b2b-organizations.bulk-import.upload.helpLinks\": \"Нужна помощь? Скачайте <template-link>VTEX File Template</template-link> или ознакомьтесь с нашим <best-practices-link>руководством</best-practices-link>.\",\n \"admin/b2b-organizations.bulk-import.upload.maxSize\": \"Максимальный размер\",\n \"admin/b2b-organizations.bulk-import.upload.unknownRowName\": \"Неизвестно\",\n \"admin/b2b-organizations.bulk-import.upload.upload\": \"Загрузить\",\n \"admin/b2b-organizations.bulk-import.upload.uploadErrorCount\": \"Найдено ошибок: {count}\",\n \"admin/b2b-organizations.bulk-import.upload.uploadErrorReport\": \"Отчет об ошибке файла\",\n \"admin/b2b-organizations.bulk-import.upload.uploadErrorReportMessage\": \"В этом файле обнаружены ошибки: {count} шт. Исправьте их и загрузите файл еще раз.\",\n \"admin/b2b-organizations.bulk-import.upload.uploadFinish\": \"Импортировать\",\n \"admin/b2b-organizations.bulk-import.upload.uploadGeneralFailure\": \"Произошла непредвиденная ошибка.\",\n \"admin/b2b-organizations.bulk-import.upload.uploading\": \"Загрузка и проверка файла...\",\n \"admin/b2b-organizations.bulk-import.upload.uploadMultipleErrors\": \"В файле обнаружены ошибки.\",\n \"admin/b2b-organizations.bulk-import.upload.uploadSuccess\": \"Готово! Файл можно импортировать.\",\n \"admin/b2b-organizations.bulk-import.upload.uploadSuccessItems\": \"Организаций-покупателей: {count}\",\n \"admin/b2b-organizations.bulk-import.upload.uploadTitle\": \"Массовое импортирование организаций-покупателей\",\n \"admin/b2b-organizations.bulk-import.upload.uploadViewReport\": \"Просмотр отчета\",\n \"admin/b2b-organizations.check-it-out\": \"Взгляните!\",\n \"admin/b2b-organizations.costCenter-details.address.delete\": \"Удалить\",\n \"admin/b2b-organizations.costCenter-details.address.edit\": \"Редактировать\",\n \"admin/b2b-organizations.costCenter-details.address.new\": \"Добавить новый адрес\",\n \"admin/b2b-organizations.costCenter-details.addresses\": \"Адреса\",\n \"admin/b2b-organizations.costCenter-details.addresses.nothing-to-show\": \"Nothing to show\",\n \"admin/b2b-organizations.costCenter-details.addresses.search-address\": \"Search addresses...\",\n \"admin/b2b-organizations.costCenter-details.addresses.show-rows\": \"Show rows\",\n \"admin/b2b-organizations.costCenter-details.addresses.pagination.of\": \"of\",\n \"admin/b2b-organizations.costCenter-details.businessDocument\": \"Деловая документация\",\n \"admin/b2b-organizations.costCenter-details.businessDocument.helpText\": \"Предоставьте деловую документацию этого финансового центра, такую как регистрационный номер компании, налоговый номер, номер плательщика НДС или тому подобное. Документация будет прилагаться к заказам финансового центра. (Необязательно)\",\n \"admin/b2b-organizations.costCenter-details.button.add\": \"Добавить\",\n \"admin/b2b-organizations.costCenter-details.button.cancel\": \"Отменить\",\n \"admin/b2b-organizations.costCenter-details.button.delete\": \"Удалить\",\n \"admin/b2b-organizations.costCenter-details.button.delete-confirm\": \"Да, удалить\",\n \"admin/b2b-organizations.costCenter-details.button.save\": \"Сохранить\",\n \"admin/b2b-organizations.costCenter-details.button.update\": \"Обновить\",\n \"admin/b2b-organizations.costCenter-details.costCenter-name\": \"Имя\",\n \"admin/b2b-organizations.costCenter-details.default-address\": \"Стандартный адрес\",\n \"admin/b2b-organizations.costCenter-details.delete-address-confirmation\": \"Вы действительно хотите удалить этот адрес?\",\n \"admin/b2b-organizations.costCenter-details.delete-costCenter-confirmation\": \"Вы действительно хотите удалить этот финансовый центр?\",\n \"admin/b2b-organizations.costCenter-details.duplicate-address\": \"Дублировать адрес\",\n \"admin/b2b-organizations.costCenter-details.empty-state\": \"Финансовый центр не найден.\",\n \"admin/b2b-organizations.costCenter-details.marketing-tags\": \"Маркетинговые метки\",\n \"admin/b2b-organizations.costCenter-details.phoneNumber\": \"Номер телефона\",\n \"admin/b2b-organizations.costCenter-details.phoneNumber.helpText\": \"Укажите номер телефона этого финансового центра. Он будет отображаться при оформлении заказа тем пользователям, которые относятся к этому финансовому центру. (Необязательно)\",\n \"admin/b2b-organizations.costCenter-details.stateRegistration\": \"Государственная регистрация\",\n \"admin/b2b-organizations.costCenter-details.stateRegistration.helpText\": \"Предоставьте государственную регистрацию этого финансового центра, такую как государственный регистрационный номер компании, налоговый номер, номер плательщика НДС и т. Д. Документация будет прилагаться к заказам финансового центра. (Не обязательно)\",\n \"admin/b2b-organizations.costCenter-details.table.column-address.receiverName\": \"Recipient\",\n \"admin/b2b-organizations.costCenter-details.table.column-address.title\": \"Адрес\",\n \"admin/b2b-organizations.costCenter-details.title\": \"Информация о финансовом центре\",\n \"admin/b2b-organizations.costCenter-details.toast.delete-failure\": \"Не удалось удалить. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.costCenter-details.toast.update-failure\": \"Не удалось обновить. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.costCenter-details.toast.update-success\": \"Финансовый центр обновлён\",\n \"admin/b2b-organizations.custom-fields.addField\": \"Добавить поле\",\n \"admin/b2b-organizations.custom-fields.explanation\": \"Пользовательские поля используются для сохранения дополнительной информации о формах организации или центра затрат.\",\n \"admin/b2b-organizations.custom-fields.name-singular\": \"Название пользовательского поля\",\n \"admin/b2b-organizations.custom-fields.removeField\": \"Удалить поле\",\n \"admin/b2b-organizations.custom-fields.table.add-dropdown-line\": \"Добавить линию\",\n \"admin/b2b-organizations.custom-fields.table.dropdown-label\": \"Падающий список\",\n \"admin/b2b-organizations.custom-fields.table.dropdown-line-label\": \"Этикетка\",\n \"admin/b2b-organizations.custom-fields.table.dropdown-line-value\": \"Данные\",\n \"admin/b2b-organizations.custom-fields.table.dropdown-preview\": \"Раскрывающийся предварительный просмотр\",\n \"admin/b2b-organizations.custom-fields.table.field-name\": \"Имя поля\",\n \"admin/b2b-organizations.custom-fields.table.field-type\": \"Тип поля\",\n \"admin/b2b-organizations.custom-fields.table.remove-dropdown-line\": \"Удалить линию\",\n \"admin/b2b-organizations.custom-fields.table.text-label\": \"Текст\",\n \"admin/b2b-organizations.custom-fields.table.use-on-registration\": \"Используйте при регистрации\",\n \"admin/b2b-organizations.custom-fields.title\": \"Настраиваемые поля\",\n \"admin/b2b-organizations.invalid-schema\": \"В настоящее время создание корпоративных пользователей не работает, поскольку схема MasterData CL (профиль пользователя) для этой учетной записи недействительна. Ознакомьтесь с документацией в разделе частых вопросов для корпоративного пакета (B2B Suite), чтобы получить более подробную информацию.\",\n \"admin/b2b-organizations.of\": \"из\",\n \"admin/b2b-organizations.organization-details.add-costCenter\": \"Добавить финансовый центр\",\n \"admin/b2b-organizations.organization-details.add-costCenter.helpText\": \"Укажите стандартный адрес финансового центра. Дополнительные адреса можно добавить позже.\",\n \"admin/b2b-organizations.organization-details.add-to-org\": \"Добавить в организацию\",\n \"admin/b2b-organizations.organization-details.add-user\": \"Добавить нового пользователя\",\n \"admin/b2b-organizations.organization-details.add-user.helpText\": \"Если введённый вами адрес электронной почты не совпадает с адресом существующего пользователя этого магазина, для такого пользователя будет создана новая учётная запись.\",\n \"admin/b2b-organizations.organization-details.assigned-to-org\": \"Назначено огранизации\",\n \"admin/b2b-organizations.organization-details.available\": \"Доступно\",\n \"admin/b2b-organizations.organization-details.button.add\": \"Добавить\",\n \"admin/b2b-organizations.organization-details.button.cancel\": \"Отменить\",\n \"admin/b2b-organizations.organization-details.button.new\": \"Новое\",\n \"admin/b2b-organizations.organization-details.button.remove-user\": \"Удалить пользователя\",\n \"admin/b2b-organizations.organization-details.button.remove-user-confirm\": \"Да, удалить пользователя\",\n \"admin/b2b-organizations.organization-details.button.save\": \"Сохранить\",\n \"admin/b2b-organizations.organization-details.collections\": \"Коллекции\",\n \"admin/b2b-organizations.organization-details.costCenters\": \"Финансовые центры\",\n \"admin/b2b-organizations.organization-details.settings\": \"Настройки\",\n \"admin/b2b-organizations.organization-details.settings.createQuote\": \"Создать котировку\",\n \"admin/b2b-organizations.organization-details.created\": \"Создано\",\n \"admin/b2b-organizations.organization-details.default\": \"Общее\",\n \"admin/b2b-organizations.organization-details.edit-user\": \"Редактировать пользователя\",\n \"admin/b2b-organizations.organization-details.empty-state\": \"Организаций не обнаружено.\",\n \"admin/b2b-organizations.organization-details.none\": \"Никто\",\n \"admin/b2b-organizations.organization-details.organization-name\": \"Название организации\",\n \"admin/b2b-organizations.organization-details.organization-name-required\": \"Требуется название организации.\",\n \"admin/b2b-organizations.organization-details.paymentTerms\": \"Условия оплаты\",\n \"admin/b2b-organizations.organization-details.permission-settings\": \"Настройки разрешений\",\n \"admin/b2b-organizations.organization-details.price-tables\": \"Прейскуранты\",\n \"admin/b2b-organizations.organization-details.remove-from-org\": \"Удалить из организации\",\n \"admin/b2b-organizations.organization-details.remove-user\": \"Удалить пользователя\",\n \"admin/b2b-organizations.organization-details.remove-user.helpText\": \"Вы действительно хотите удалить пользователя {email}? Учётная запись пользователя останется, но он не будет иметь доступа к этой организации.\",\n \"admin/b2b-organizations.organization-details.sales-admin-title\": \"Управление пользователями, связанными с продажами\",\n \"admin/b2b-organizations.organization-details.sales-channel\": \"Торговая политика\",\n \"admin/b2b-organizations.organization-details.sellers\": \"Продавцы\",\n \"admin/b2b-organizations.organization-details.status\": \"Статус\",\n \"admin/b2b-organizations.organization-details.status.active\": \"Активен\",\n \"admin/b2b-organizations.organization-details.status.inactive\": \"Неактивен\",\n \"admin/b2b-organizations.organization-details.status.on-hold\": \"В ожидании\",\n \"admin/b2b-organizations.organization-details.table.column-addresses.title\": \"Адреса\",\n \"admin/b2b-organizations.organization-details.table.column-name.title\": \"Имя\",\n \"admin/b2b-organizations.organization-details.title\": \"Информация об организации\",\n \"admin/b2b-organizations.organization-details.toast.add-costCenter-failure\": \"Не удалось создать финансовый центр. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-details.toast.add-costCenter-success\": \"Финансовый центр создан\",\n \"admin/b2b-organizations.organization-details.toast.update-failure\": \"Не удалось обновить. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-details.toast.update-success\": \"Организация обновлена\",\n \"admin/b2b-organizations.organization-details.tradeName\": \"Торговое наименование\",\n \"admin/b2b-organizations.organization-details.tradeName.helpText\": \"Укажите коммерческое название организации, которое будет указываться при оформлении заказа. (Необязательно)\",\n \"admin/b2b-organizations.organization-details.users\": \"Пользователи\",\n \"admin/b2b-organizations.organization-request-admin.customFields\": \"Пользовательские поля организации\",\n \"admin/b2b-organizations.organization-request-admin.customFields.dropdownValues\": \"Выпадающий список значений\",\n \"admin/b2b-organizations.organization-request-admin.customFields.label\": \"Метка\",\n \"admin/b2b-organizations.organization-request-admin.customFields.name\": \"Название\",\n \"admin/b2b-organizations.organization-request-admin.customFields.type\": \"Тип\",\n \"admin/b2b-organizations.organization-request-admin.customFields.value\": \"Значение\",\n \"admin/b2b-organizations.organization-request-admin.customFieldsCostCenter\": \"Пользовательские поля центра затрат\",\n \"admin/b2b-organizations.organization-request-details.add-note.charactersLeft\": \"{count, plural, =499{осталось символов}=500{Вы достигли лимита в 500 символов}other{осталось символов}}\",\n \"admin/b2b-organizations.organization-request-details.add-note.label\": \"Добавить примечание\",\n \"admin/b2b-organizations.organization-request-details.b2b-customer-admin\": \"Пользователь, который будет администратором корпоративных клиентов для этой организации\",\n \"admin/b2b-organizations.organization-request-details.button.approve\": \"Утвердить\",\n \"admin/b2b-organizations.organization-request-details.button.decline\": \"Отклонить\",\n \"admin/b2b-organizations.organization-request-details.created\": \"Дата запроса\",\n \"admin/b2b-organizations.organization-request-details.default-cost-center\": \"Стандартный финансовый центр\",\n \"admin/b2b-organizations.organization-request-details.default-cost-center.businessDocument\": \"Деловая документация: {businessDocument}\",\n \"admin/b2b-organizations.organization-request-details.default-cost-center.phoneNumber\": \"Номер телефона: {phoneNumber}\",\n \"admin/b2b-organizations.organization-request-details.default-cost-center.stateRegistration\": \"Государственная регистрация: {stateRegistration}\",\n \"admin/b2b-organizations.organization-request-details.empty-state\": \"Запросы организаций не найдены.\",\n \"admin/b2b-organizations.organization-request-details.organization-name\": \"Название организации\",\n \"admin/b2b-organizations.organization-request-details.request-status\": \"Статус\",\n \"admin/b2b-organizations.organization-request-details.title\": \"Запрос организации\",\n \"admin/b2b-organizations.organization-request-details.toast.created-success\": \"Организация создана\",\n \"admin/b2b-organizations.organization-request-details.toast.update-failure\": \"Не удалось обновить. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-request-details.toast.update-failure-missing-email\": \"Missing B2B Customer Admin in organization, unable to approve it\",\n \"admin/b2b-organizations.organization-request-details.toast.update-success\": \"Запрос организации обновлён\",\n \"admin/b2b-organizations.organization-request-details.tradeName\": \"Торговое наименование\",\n \"admin/b2b-organizations.organization-request-details.tradeName.helpText\": \"Укажите коммерческое название организации, которое будет указываться при оформлении заказа. (Необязательно)\",\n \"admin/b2b-organizations.organization-requests-admin.table.clearFilters.label\": \"Сбросить фильтры\",\n \"admin/b2b-organizations.organization-requests-admin.table.column-admin.title\": \"Администратор\",\n \"admin/b2b-organizations.organization-requests-admin.table.column-created.title\": \"Дата запроса\",\n \"admin/b2b-organizations.organization-requests-admin.table.column-name.title\": \"Название организации\",\n \"admin/b2b-organizations.organization-requests-admin.table.column-status.title\": \"Статус\",\n \"admin/b2b-organizations.organization-requests-admin.table.empty-state\": \"Запросы организаций не найдены.\",\n \"admin/b2b-organizations.organization-requests-admin.table.filters.all\": \"Все\",\n \"admin/b2b-organizations.organization-requests-admin.table.filters.includes\": \"включает\",\n \"admin/b2b-organizations.organization-requests-admin.table.filters.none\": \"Отсутствует\",\n \"admin/b2b-organizations.organization-requests-admin.table.search.placeholder\": \"Найти\",\n \"admin/b2b-organizations.organization-requests-admin.table.statusFilter.label\": \"Статус\",\n \"admin/b2b-organizations.organization-requests-admin.table.toggleFields.hideAllLabel\": \"Скрыть все\",\n \"admin/b2b-organizations.organization-requests-admin.table.toggleFields.label\": \"Переключение видимых полей\",\n \"admin/b2b-organizations.organization-requests-admin.table.toggleFields.showAllLabel\": \"Показать все\",\n \"admin/b2b-organizations.organization-requests-admin.table.view.label\": \"Просмотр\",\n \"admin/b2b-organizations.organization-requests-admin.title\": \"Запросы организаций\",\n \"admin/b2b-organizations.organization-requests.navigation.keywords\": \"корпоративные, организации, финансовые центры\",\n \"admin/b2b-organizations.organization-requests.navigation.label\": \"Запросы организаций\",\n \"admin/b2b-organizations.organization-settings-admin.autoApprove\": \"Автоподтверждение новых организаций\",\n \"admin/b2b-organizations.organization-settings-admin.availablePaymentsTableTitle\": \"Доступные условия оплаты\",\n \"admin/b2b-organizations.organization-settings-admin.availablePriceTablesTitle\": \"Доступные прейскуранты\",\n \"admin/b2b-organizations.organization-settings-admin.businessReadOnly\": \"Сделать деловую документацию доступной только для чтения\",\n \"admin/b2b-organizations.organization-settings-admin.customFieldsTitle\": \"Настраиваемые поля\",\n \"admin/b2b-organizations.organization-settings-admin.generalSettings\": \"Общие настройки\",\n \"admin/b2b-organizations.organization-settings-admin.saveSettings\": \"Сохранить настройки\",\n \"admin/b2b-organizations.organization-settings-admin.selectedPaymentsTableTitle\": \"Выбранные условия оплаты\",\n \"admin/b2b-organizations.organization-settings-admin.selectedPriceTablesTitle\": \"Выбранные прейскуранты\",\n \"admin/b2b-organizations.organization-settings-admin.stateReadOnly\": \"Сделать государственную регистрацию доступной только для чтения\",\n \"admin/b2b-organizations.organization-settings-admin.title\": \"Настройки\",\n \"admin/b2b-organizations.organization-settings-admin.toast.update-failure\": \"Не удалось обновить. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-settings-admin.toast.update-success\": \"Настройки обновлены\",\n \"admin/b2b-organizations.organization-settings-autoApprove\": \"Автоматически подтверждать новые организации\",\n \"admin/b2b-organizations.organization-settings-clearCart\": \"Очищать корзину при переключении компании или входе в систему\",\n \"admin/b2b-organizations.organization-settings-fullImpersonation\": \"Разрешить выбор организации и центра затрат во время имитации\",\n \"admin/b2b-organizations.organization-settings-select.add-to-binding\": \"Добавить к привязкам\",\n \"admin/b2b-organizations.organization-settings-select.binding.available\": \"Доступные привязки\",\n \"admin/b2b-organizations.organization-settings-select.binding.selected\": \"Выбранные привязки\",\n \"admin/b2b-organizations.organization-settings-select.binding.title\": \"Привязки\",\n \"admin/b2b-organizations.organization-settings-select.remove-from-binding\": \"Удалить из привязок\",\n \"admin/b2b-organizations.organization-settings-select.toast.update-failure\": \"Не удалось обновить привязки. Просмотрите консоль для получения дополнительной информации.\",\n \"admin/b2b-organizations.organization-settings-select.toast.update-success\": \"Привязки обновлены\",\n \"admin/b2b-organizations.organization-settings-showModal\": \"Использовать форму для смены компании\",\n \"admin/b2b-organizations.organization-settings.navigation.label\": \"Настройки\",\n \"admin/b2b-organizations.organization-users.column.costCenter\": \"Финансовый центр\",\n \"admin/b2b-organizations.organization-users.column.email\": \"Эл. почта\",\n \"admin/b2b-organizations.organization-users.column.role\": \"Роль\",\n \"admin/b2b-organizations.organization-users.emptyState\": \"Пользователи не найдены.\",\n \"admin/b2b-organizations.organization-users.toast.add-failure\": \"Не удалось добавить пользователя. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-users.toast.add-success\": \"Пользователь добавлен\",\n \"admin/b2b-organizations.organization-users.toast.duplicated\": \"Этот пользователь уже зарегистрирован в другой организации.\",\n \"admin/b2b-organizations.organization-users.toast.duplicated-organization\": \"Этот пользователь уже зарегистрирован в этой организации.\",\n \"admin/b2b-organizations.organization-users.toast.remove-failure\": \"Не удалось удалить пользователя. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-users.toast.remove-success\": \"Пользователь удалён из организации.\",\n \"admin/b2b-organizations.organization-users.toast.update-failure\": \"Не удалось обновить пользователя. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organization-users.toast.update-success\": \"Пользователь обновлен\",\n \"admin/b2b-organizations.organizations-admin.add-bulk\": \"Массовое импортирование\",\n \"admin/b2b-organizations.organizations-admin.add-organization\": \"Добавить организацию\",\n \"admin/b2b-organizations.organizations-admin.add-organization.default-costCenter-name\": \"Название финансового центра\",\n \"admin/b2b-organizations.organizations-admin.add-organization.default-costCenter.helpText\": \"Укажите название и адрес начального финансового центра. Дополнительны центры и адреса можно добавить позже.\",\n \"admin/b2b-organizations.organizations-admin.add-organization.organization-name\": \"Название организации\",\n \"admin/b2b-organizations.organizations-admin.add-single\": \"Добавлять индивидуально\",\n \"admin/b2b-organizations.organizations-admin.button.refetch\": \"Повторная выборка\",\n \"admin/b2b-organizations.organizations-admin.table.clearFilters.label\": \"Сбросить фильтры\",\n \"admin/b2b-organizations.organizations-admin.table.column-name.title\": \"Имя\",\n \"admin/b2b-organizations.organizations-admin.table.column-status.title\": \"Статус\",\n \"admin/b2b-organizations.organizations-admin.table.empty-state\": \"Организаций не обнаружено.\",\n \"admin/b2b-organizations.organizations-admin.table.filters.all\": \"Все\",\n \"admin/b2b-organizations.organizations-admin.table.filters.includes\": \"включает\",\n \"admin/b2b-organizations.organizations-admin.table.filters.none\": \"Отсутствует\",\n \"admin/b2b-organizations.organizations-admin.table.search.placeholder\": \"Найти\",\n \"admin/b2b-organizations.organizations-admin.table.statusFilter.label\": \"Статус\",\n \"admin/b2b-organizations.organizations-admin.table.view.label\": \"Просмотр\",\n \"admin/b2b-organizations.organizations-admin.title\": \"Организации\",\n \"admin/b2b-organizations.organizations-admin.toast.add-organization-failure\": \"Не удалось создать организацию. Подробная информация доступна на консоли.\",\n \"admin/b2b-organizations.organizations-admin.toast.add-organization-success\": \"Организация создана\",\n \"admin/b2b-organizations.organizations.navigation.label\": \"Организации\",\n \"admin/b2b-organizations.selected-rows\": \"Выбранные строки: {qty}\",\n \"admin/b2b-organizations.showRows\": \"Показать строки\",\n \"admin/b2b-organizations.user-details.costCenter\": \"Финансовый центр\",\n \"admin/b2b-organizations.user-details.email\": \"Эл. почта\",\n \"admin/b2b-organizations.user-details.name\": \"Имя\",\n \"admin/b2b-organizations.organizations.not-allow-view-message\": \"У вас нет доступа к просмотру организаций из-за отсутствия функции «Организации покупателей». Обратитесь к администратору вашей учетной записи.\",\n \"admin/b2b-organizations.user-details.organization\": \"Организация\",\n \"admin/b2b-organizations.user-details.placeholder-costCenter\": \"Выбрать финансовый центр\",\n \"admin/b2b-organizations.user-details.placeholder-role\": \"Выбрать роль\",\n \"admin/b2b-organizations.user-details.role\": \"Роль\",\n \"admin/b2b-organizations.warning-topbar-inative-org.form.title\": \"Topbar customization\",\n \"admin/b2b-organizations.warning-topbar-inative-org.form.help-text\": \"Customize the message and color of the top bar notifications that are displayed when the organization is disabled\",\n \"admin/b2b-organizations.warning-topbar-inative-org.form.color-picker-label\": \"Topbar color\",\n \"admin/b2b-organizations.warning-topbar-inative-org.form.textarea-label\": \"Message\",\n \"admin/b2b-organizations.warning-topbar-inative-org.form.textarea-help-text\": \"If no message is entered, a default message will be displayed.\",\n \"store/b2b-organizations.autocomplete-searching\": \"Поиск организаций\",\n \"store/b2b-organizations.autocomplete-searching.cost-center\": \"Поиск финансового центра\",\n \"store/b2b-organizations.back\": \"Назад\",\n \"store/b2b-organizations.change-organization\": \"Изменить организацию\",\n \"store/b2b-organizations.check-it-out\": \"Взгляните!\",\n \"store/b2b-organizations.costCenter-details.address.delete\": \"Удалить\",\n \"store/b2b-organizations.costCenter-details.address.edit\": \"Редактировать\",\n \"store/b2b-organizations.costCenter-details.address.new\": \"Добавить новый адрес\",\n \"store/b2b-organizations.costCenter-details.addresses\": \"Адреса\",\n \"store/b2b-organizations.costCenter-details.addresses.helpText\": \"Пользователи этого финансового центра при оформлении заказа смогут выбрать один из следующих адресов доставки. Каждый финансовый центр должен иметь хотя бы один адрес.\",\n \"store/b2b-organizations.costCenter-details.businessDocument\": \"Деловая документация\",\n \"store/b2b-organizations.costCenter-details.businessDocument.helpText\": \"Предоставьте деловую документацию этого финансового центра, такую как регистрационный номер компании, налоговый номер, номер плательщика НДС или тому подобное. Документация будет прилагаться к заказам финансового центра. (Необязательно)\",\n \"store/b2b-organizations.costCenter-details.button.add\": \"Добавить\",\n \"store/b2b-organizations.costCenter-details.button.cancel\": \"Отменить\",\n \"store/b2b-organizations.costCenter-details.button.delete\": \"Удалить\",\n \"store/b2b-organizations.costCenter-details.button.delete-confirm\": \"Да, удалить\",\n \"store/b2b-organizations.costCenter-details.button.save\": \"Сохранить\",\n \"store/b2b-organizations.costCenter-details.button.update\": \"Обновить\",\n \"store/b2b-organizations.costCenter-details.costCenter-name\": \"Имя\",\n \"store/b2b-organizations.costCenter-details.default-address\": \"Стандартный адрес\",\n \"store/b2b-organizations.costCenter-details.delete-address-confirmation\": \"Вы действительно хотите удалить этот адрес?\",\n \"store/b2b-organizations.costCenter-details.delete-costCenter-confirmation\": \"Вы действительно хотите удалить этот финансовый центр?\",\n \"store/b2b-organizations.costCenter-details.duplicate-address\": \"Дублировать адрес\",\n \"store/b2b-organizations.costCenter-details.empty-state\": \"Финансовый центр не найден.\",\n \"store/b2b-organizations.costCenter-details.payment-terms\": \"Условия оплаты\",\n \"store/b2b-organizations.costCenter-details.payment-terms.helpText\": \"Пользователи этого финансового центра при оформлении заказа смогут выбрать одно из следующих условий оплаты. Каждый финансовый центр должен иметь хотя бы одни активные работающие условия оплаты.\",\n \"store/b2b-organizations.costCenter-details.phoneNumber\": \"Номер телефона\",\n \"store/b2b-organizations.costCenter-details.phoneNumber.helpText\": \"Укажите номер телефона этого финансового центра. Он будет отображаться при оформлении заказа тем пользователям, которые относятся к этому финансовому центру. (Необязательно)\",\n \"store/b2b-organizations.costCenter-details.stateRegistration\": \"Государственная регистрация\",\n \"store/b2b-organizations.costCenter-details.stateRegistration.helpText\": \"Предоставьте государственную регистрацию этого финансового центра, такую как государственный регистрационный номер компании, налоговый номер, номер плательщика НДС и т. Д. Документация будет прилагаться к заказам финансового центра. (Не обязательно)\",\n \"store/b2b-organizations.costCenter-details.table.column-address.title\": \"Адрес\",\n \"store/b2b-organizations.costCenter-details.title\": \"Информация о финансовом центре\",\n \"store/b2b-organizations.costCenter-details.toast.delete-failure\": \"Не удалось удалить. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.costCenter-details.toast.update-failure\": \"Не удалось обновить. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.costCenter-details.toast.update-success\": \"Финансовый центр обновлён\",\n \"store/b2b-organizations.current-organization\": \"Текущая организация\",\n \"store/b2b-organizations.invalid-schema\": \"В настоящее время создание корпоративных пользователей не работает, поскольку схема MasterData CL (профиль пользователя) для этой учетной записи недействительна. Ознакомьтесь с документацией в разделе частых вопросов для корпоративного пакета (B2B Suite), чтобы получить более подробную информацию.\",\n \"store/b2b-organizations.modal.join\": \"Присоединиться\",\n \"store/b2b-organizations.modal.search\": \"Поиск\",\n \"store/b2b-organizations.modal.select-company\": \"Выбрать компанию\",\n \"store/b2b-organizations.my-account-link\": \"Моя организация\",\n \"store/b2b-organizations.not-authenticated\": \"Для доступа к данному содержимому необходимо авторизоваться.\",\n \"store/b2b-organizations.of\": \"из\",\n \"store/b2b-organizations.organization-details.add-costCenter\": \"Добавить финансовый центр\",\n \"store/b2b-organizations.organization-details.add-costCenter.helpText\": \"Укажите стандартный адрес финансового центра. Дополнительные адреса можно добавить позже.\",\n \"store/b2b-organizations.organization-details.add-user\": \"Добавить нового пользователя\",\n \"store/b2b-organizations.organization-details.add-user.helpText\": \"Если введённый вами адрес электронной почты не совпадает с адресом существующего пользователя этого магазина, для такого пользователя будет создана новая учётная запись.\",\n \"store/b2b-organizations.organization-details.button.add\": \"Добавить\",\n \"store/b2b-organizations.organization-details.button.cancel\": \"Отменить\",\n \"store/b2b-organizations.organization-details.button.new\": \"Новое\",\n \"store/b2b-organizations.organization-details.button.remove-user\": \"Удалить пользователя\",\n \"store/b2b-organizations.organization-details.button.remove-user-confirm\": \"Да, удалить пользователя\",\n \"store/b2b-organizations.organization-details.button.save\": \"Сохранить\",\n \"store/b2b-organizations.organization-details.costCenters\": \"Финансовые центры\",\n \"store/b2b-organizations.organization-details.edit-user\": \"Редактировать пользователя\",\n \"store/b2b-organizations.organization-details.empty-state\": \"Организаций не обнаружено.\",\n \"store/b2b-organizations.organization-details.organization-name\": \"Название организации\",\n \"store/b2b-organizations.organization-details.organizations-without-sales-manager-ok\": \"Все организации имеют менеджера по продажам\",\n \"store/b2b-organizations.organization-details.organizations-without-sales-manager-title\": \"Организации без менеджера по продажам\",\n \"store/b2b-organizations.organization-details.organizations-without-sales-manager-warning\": \"У некоторых организаций нет менеджера по продажам\",\n \"store/b2b-organizations.organization-details.remove-user\": \"Удалить пользователя\",\n \"store/b2b-organizations.organization-details.remove-user.helpText\": \"Вы действительно хотите удалить пользователя {email}? Учётная запись пользователя останется, но он не будет иметь доступа к вашей организации.\",\n \"store/b2b-organizations.organization-details.sales-admin-title\": \"Управление пользователями, связанными с продажами\",\n \"store/b2b-organizations.organization-details.table.column-addresses.title\": \"Адреса\",\n \"store/b2b-organizations.organization-details.table.column-name.title\": \"Имя\",\n \"store/b2b-organizations.organization-details.title\": \"Информация об организации\",\n \"store/b2b-organizations.organization-details.toast.add-costCenter-failure\": \"Не удалось создать финансовый центр. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.organization-details.toast.add-costCenter-success\": \"Финансовый центр создан\",\n \"store/b2b-organizations.organization-details.tradeName\": \"Торговое наименование\",\n \"store/b2b-organizations.organization-details.tradeName.helpText\": \"Укажите коммерческое название организации, которое будет указываться при оформлении заказа. (Необязательно)\",\n \"store/b2b-organizations.organization-details.users\": \"Пользователи\",\n \"store/b2b-organizations.organization-users.column.costCenter\": \"Финансовый центр\",\n \"store/b2b-organizations.organization-users.column.email\": \"Эл. почта\",\n \"store/b2b-organizations.organization-users.column.organizationName\": \"Организация\",\n \"store/b2b-organizations.organization-users.column.role\": \"Роль\",\n \"store/b2b-organizations.organization-users.emptyState\": \"Пользователи не найдены.\",\n \"store/b2b-organizations.organization-users.impersonate\": \"Войти как пользователь\",\n \"store/b2b-organizations.organization-users.table.search.placeholder\": \"Найти\",\n \"store/b2b-organizations.organization-users.toast.add-failure\": \"Не удалось добавить пользователя. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.organization-users.toast.add-success\": \"Пользователь добавлен\",\n \"store/b2b-organizations.organization-users.toast.duplicated\": \"Этот пользователь уже зарегистрирован в другой организации.\",\n \"store/b2b-organizations.organization-users.toast.duplicated-organization\": \"Этот пользователь уже зарегистрирован в этой организации.\",\n \"store/b2b-organizations.organization-users.toast.impersonate-failure\": \"Сбой работы от имени другого лица. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.organization-users.toast.impersonate-forbidden\": \"У вас нет прав для совершения действий от имени этого пользователя\",\n \"store/b2b-organizations.organization-users.toast.impersonate-id-missing\": \"Пользователь должен завершить создание своего профиля, прежде чем другим пользователям можно будет совершать действия от его имени.\",\n \"store/b2b-organizations.organization-users.toast.impersonate-starting\": \"Запуск работы от имени другого лица...\",\n \"store/b2b-organizations.organization-users.toast.impersonate-success\": \"Теперь вы работаете от имени {email}\",\n \"store/b2b-organizations.organization-users.toast.remove-failure\": \"Не удалось удалить пользователя. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.organization-users.toast.remove-success\": \"Пользователь удалён из организации.\",\n \"store/b2b-organizations.organization-users.toast.update-failure\": \"Не удалось обновить пользователя. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.organization-users.toast.update-success\": \"Пользователь обновлен\",\n \"store/b2b-organizations.organizations-found\": \"Найдено организаций\",\n \"store/b2b-organizations.request-new-organization.approved-request\": \"Ваша организация создана. Добавленные в организацию пользователи могут просматривать различные аспекты организации и/или управлять ими, войдя в систему и перейдя в «Мой аккаунт», раздел «Моя организация».\",\n \"store/b2b-organizations.request-new-organization.b2b-customer-admin.helpText\": \"Следующий пользователь будет назначен администратором новой организации. После утверждения и создания организации он получит уведомление по электронной почте. После создания организации этот администратор сможет добавить в неё новых пользователей.\",\n \"store/b2b-organizations.request-new-organization.b2b-customer-admin.title\": \"Пользователь, который будет администратором организации\",\n \"store/b2b-organizations.request-new-organization.businessDocument\": \"Деловая документация\",\n \"store/b2b-organizations.request-new-organization.businessDocument.helpText\": \"Предоставьте деловую документацию этого финансового центра, такую как регистрационный номер компании, налоговый номер, номер плательщика НДС или тому подобное. Документация будет прилагаться к заказам финансового центра. (Необязательно)\",\n \"store/b2b-organizations.request-new-organization.declined-request\": \"Ваш запрос, созданный {created} и касающийся организации, был отклонён.\",\n \"store/b2b-organizations.request-new-organization.default-cost-center-name.label\": \"Название финансового центра\",\n \"store/b2b-organizations.request-new-organization.default-cost-center.helpText\": \"Укажите название и адрес начального финансового центра организации. После создания организации можно добавить дополнительные финансовые центры и адреса.\",\n \"store/b2b-organizations.request-new-organization.default-cost-center.title\": \"Стандартный финансовый центр\",\n \"store/b2b-organizations.request-new-organization.email.label\": \"Эл. почта\",\n \"store/b2b-organizations.request-new-organization.first-name.label\": \"Имя\",\n \"store/b2b-organizations.request-new-organization.helpText\": \"Заполните следующую форму для отправки запроса о создании новой организации.\",\n \"store/b2b-organizations.request-new-organization.last-name.label\": \"Фамилия\",\n \"store/b2b-organizations.request-new-organization.organization-name.label\": \"Название организации\",\n \"store/b2b-organizations.request-new-organization.pending-request\": \"Ваш запрос, касающийся организации, отправлен {created} и ожидает подтверждения. После подтверждения пользователь, отправивший запрос в качестве администратора организации, получит уведомление по электронной почте.\",\n \"store/b2b-organizations.request-new-organization.phoneNumber\": \"Номер телефона\",\n \"store/b2b-organizations.request-new-organization.phoneNumber.helpText\": \"Укажите номер телефона этого финансового центра. Он будет отображаться при оформлении заказа тем пользователям, которые относятся к этому финансовому центру. (Необязательно)\",\n \"store/b2b-organizations.request-new-organization.stateRegistration\": \"Государственная регистрация\",\n \"store/b2b-organizations.request-new-organization.stateRegistration.helpText\": \"Предоставьте государственную регистрацию этого финансового центра, такую как государственный регистрационный номер компании, налоговый номер, номер плательщика НДС и т. Д. Документация будет прилагаться к заказам финансового центра. (Не обязательно)\",\n \"store/b2b-organizations.request-new-organization.submit-button.create-new-request\": \"Создать новый запрос\",\n \"store/b2b-organizations.request-new-organization.submit-button.label\": \"Отправить\",\n \"store/b2b-organizations.request-new-organization.submit.toast-duplicate-approved\": \"Адрес электронной почты в вашем запросе уже связан с другим подтверждённым запросом.\",\n \"store/b2b-organizations.request-new-organization.submit.toast-duplicate-pending\": \"Адрес электронной почты в вашем запросе уже связан с другим обрабатываемым запросом.\",\n \"store/b2b-organizations.request-new-organization.submit.toast-failure\": \"Не удалось отправить. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.request-new-organization.submit.toast-success\": \"Ваш запрос отправлен.\",\n \"store/b2b-organizations.request-new-organization.title\": \"Запросить новую организацию\",\n \"store/b2b-organizations.request-new-organization.tradeName\": \"Торговое наименование\",\n \"store/b2b-organizations.request-new-organization.tradeName.helpText\": \"Укажите коммерческое название организации, которое будет указываться при оформлении заказа. (Необязательно)\",\n \"store/b2b-organizations.selected-rows\": \"Выбранные строки: {qty}\",\n \"store/b2b-organizations.set-current-organization\": \"Установить текущую организацию\",\n \"store/b2b-organizations.set-organization-error\": \"Не удалось установить текущую организацию. Просмотрите консоль для получения дополнительной информации.\",\n \"store/b2b-organizations.showRows\": \"Показать строки\",\n \"store/b2b-organizations.stop-impersonation\": \"Остановить работу от имени другого лица\",\n \"store/b2b-organizations.stop-impersonation-error\": \"Сбой остановки работы от имени другого лица. Подробная информация доступна на консоли.\",\n \"store/b2b-organizations.user-details.costCenter\": \"Финансовый центр\",\n \"store/b2b-organizations.user-details.email\": \"Эл. почта\",\n \"store/b2b-organizations.user-details.name\": \"Имя\",\n \"store/b2b-organizations.user-details.organization\": \"Организация\",\n \"store/b2b-organizations.user-details.placeholder-costCenter\": \"Выбрать финансовый центр\",\n \"store/b2b-organizations.user-details.placeholder-role\": \"Выбрать роль\",\n \"store/b2b-organizations.user-details.role\": \"Роль\",\n \"store/b2b-organizations.user-widget.costCenter\": \"Финансовый центр:\",\n \"store/b2b-organizations.user-widget.impersonating\": \"Работа от имени другого лица:\",\n \"store/b2b-organizations.user-widget.manage-organization\": \"Управление организацией\",\n \"store/b2b-organizations.user-widget.organization\": \"Организация:\",\n \"store/b2b-organizations.user-widget.role\": \"Моя роль:\",\n \"store/b2b-organizations.user-widget.status\": \"Статус организации:\",\n \"store/b2b-organizations.user-widget.status.active\": \"Активен\",\n \"store/b2b-organizations.user-widget.status.inactive\": \"Неактивен\",\n \"store/b2b-organizations.user-widget.status.on-hold\": \"В ожидании\",\n \"store/b2b-organizations.warning-topbar-inative-org.message\": \"Your organization's account is paused, and you cannot complete purchases now.\"\n}\n\n```",
"role": "assistant"
}
] |
code_places-graphql_c64e1802
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What GraphQL queries are available in places-graphql?",
"role": "user"
},
{
"content": "Here's the graphql schema:\n\n```graphql\ntype Address {\n addressId: ID\n addressType: AddressType\n city: String\n complement: String\n country: String\n geoCoordinates: [Float!]\n neighborhood: String\n number: String\n postalCode: String\n receiverName: String\n reference: String\n state: String\n street: String\n}\n\nenum AddressType {\n residential\n commercial\n inStore\n giftRegistry\n pickup\n search\n}\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_ab5a8c27
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in store-on-localhost/src/monobloco/components/new/StoreComponents/components/Share/components/SocialButton.js.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport * as ReactShare from 'react-share'\n\nimport { SOCIAL_TO_ENUM, SOCIAL_ENUM_TO_COMPONENT } from '../constants/social'\nimport styles from '../styles.css'\n\nexport default class SocialButton extends Component {\n static propTypes = {\n /** Share URL */\n url: PropTypes.string.isRequired,\n /** Message to be shared */\n message: PropTypes.string,\n /** Social Network Enum */\n socialEnum: PropTypes.string.isRequired,\n /** Button size in pixels */\n size: PropTypes.number,\n /** Classes to be applied to social button */\n buttonClass: PropTypes.string,\n /** Classes to be applied to icon of the button */\n iconClass: PropTypes.string,\n /** Image url to share in social medias */\n imageUrl: PropTypes.string,\n }\n\n static defaultProps = {\n size: 32,\n buttonClass: 'mh1 pointer outline-0 dim',\n }\n\n render() {\n const {\n url,\n message,\n size,\n socialEnum,\n buttonClass,\n iconClass,\n imageUrl,\n } = this.props\n const socialComponentName = SOCIAL_ENUM_TO_COMPONENT[socialEnum]\n const SocialComponent = ReactShare[`${socialComponentName}ShareButton`]\n const SocialIcon = ReactShare[`${socialComponentName}Icon`]\n const additionalProps = message && resolveMessageProp(message, socialEnum)\n\n const icon = (\n <SocialIcon\n round\n size={size}\n className={classNames(styles.shareSocialIcon, iconClass)}\n />\n )\n\n /* Pinterest requires imageUrl for the \"media\" prop, but\n * it might not be loaded yet */\n if (socialComponentName === SOCIAL_TO_ENUM.pinterest && !imageUrl) {\n return icon\n }\n\n return (\n <SocialComponent\n url={url}\n className={classNames(styles.shareSocialButton, buttonClass)}\n media={imageUrl}\n {...additionalProps}\n >\n {icon}\n </SocialComponent>\n )\n }\n}\n\nfunction resolveMessageProp(message, socialEnum) {\n const titlePropMessage = [\n SOCIAL_TO_ENUM.whatsapp,\n SOCIAL_TO_ENUM.twitter,\n SOCIAL_TO_ENUM.telegram,\n SOCIAL_TO_ENUM.pinterest,\n ]\n\n return titlePropMessage.includes(socialEnum)\n ? { title: message }\n : socialEnum === SOCIAL_TO_ENUM.facebook\n ? { quote: message }\n : { body: message }\n}\n\n```",
"role": "assistant"
}
] |
code_render-runtime_22df5406
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Box component in my VTEX store?",
"role": "user"
},
{
"content": "Here's the react component:\n\n```tsx\nimport React from 'react'\nimport { ContentLoader, Rect } from './ContentLoader'\n\ninterface Props {\n width: number | string\n height: number | string\n}\n\nconst Box = ({ width, height }: Props) => (\n <ContentLoader width={width} height={height}>\n <Rect x={0} y={0} width={width} height={height} />\n </ContentLoader>\n)\n\nexport default Box\n\n```",
"role": "assistant"
}
] |
code_admin-pages_78805386
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What props does Store Settings accept and how do I configure them?",
"role": "user"
},
{
"content": "Here's the react component:\n\n```tsx\nimport React from 'react'\nimport { injectIntl, InjectedIntlProps } from 'react-intl'\n\nimport AdminStructure from './components/admin/AdminStructure'\nimport Store from './components/admin/store'\n\nconst StoreSettings: React.FC<InjectedIntlProps> = ({ intl }) => (\n <AdminStructure\n title={intl.formatMessage({\n defaultMessage: 'Store settings',\n id: 'admin/pages.editor.store.settings.title',\n })}\n >\n <Store />\n </AdminStructure>\n)\n\nexport default injectIntl(StoreSettings)\n\n```",
"role": "assistant"
}
] |
code_b2cstoreqa.theme_0d6c3645
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in b2cstoreqa.theme/store/blocks/mobile/home.jsonc.",
"role": "user"
},
{
"content": "```jsonc\n{\n \"responsive-layout.mobile\": {\n \"children\": [\n \"flex-layout.row#imageList--mobile\",\n \"flex-layout.row#shopByCategory\",\n // Deprecated\n // \"flex-layout.row#shopByBrandMobile\",\n \"flex-layout.row#shelfMobile\",\n \"flex-layout.row#banners\",\n \"flex-layout.row#singleBannerMobile\",\n \"flex-layout.row#popular-picks\",\n \"flex-layout.row#trending\",\n \"flex-layout.row#benefits\",\n \"flex-layout.row#newsletter\"\n ]\n },\n\n // Deprecated\n // \"flex-layout.row#shopByBrandMobile\": {\n // \"props\": {\n // \"blockClass\": \"shopByBrandSection\"\n // },\n // \"children\": [\n // \"flex-layout.row#shopByBrandHead\",\n // \"list-context.image-list#brandImagesMobile\"\n // ]\n // },\n // \"flex-layout.row#shopByBrandHead\": {\n // \"props\": {\n // \"blockClass\": \"shopByBrandHead\",\n // \"preventHorizontalStretch\": true\n // },\n // \"children\": [\"rich-text#sectionTitle\", \"rich-text#sectionLink\"]\n // },\n // \"rich-text#sectionLink\": {\n // \"props\": {\n // \"text\": \"[See all brands](/brands)\",\n // \"blockClass\": \"sectionLink\"\n // }\n // },\n // \"list-context.image-list#brandImagesMobile\": {\n // \"children\": [\"slider-layout#shopByBrand\"],\n // \"props\": {\n // \"height\": 100,\n // \"images\": [\n // {\n // \"image\": \"assets/placeholders/cokeBrand.png\",\n // \"mobileImage\": \"assets/placeholders/cokeBrand.png\",\n // \"description\": \"something something\"\n // },\n // {\n // \"image\": \"assets/placeholders/AppleBrand.png\",\n // \"mobileImage\": \"assets/placeholders/AppleBrand.png\",\n // \"description\": \"something something\"\n // },\n // {\n // \"image\": \"assets/placeholders/whirlpoolBrand.png\",\n // \"mobileImage\": \"assets/placeholders/whirlpoolBrand.png\",\n // \"description\": \"something something\"\n // },\n // {\n // \"image\": \"assets/placeholders/cokeBrand.png\",\n // \"mobileImage\": \"assets/placeholders/cokeBrand.png\",\n // \"description\": \"something something\"\n // },\n // {\n // \"image\": \"assets/placeholders/AppleBrand.png\",\n // \"mobileImage\": \"assets/placeholders/AppleBrand.png\",\n // \"description\": \"something something\"\n // },\n // {\n // \"image\": \"assets/placeholders/whirlpoolBrand.png\",\n // \"mobileImage\": \"assets/placeholders/whirlpoolBrand.png\",\n // \"description\": \"something something\"\n // }\n // ]\n // }\n // },\n // \"slider-layout#shopByBrand\": {\n // \"props\": {\n // \"blockClass\": \"brandSliderMobile\",\n // \"itemsPerPage\": {\n // \"phone\": 3\n // },\n // \"showNavigationArrows\": \"never\",\n // \"infinite\": false\n // }\n // },\n\n \"flex-layout.row#banners\": {\n \"props\": {\n \"blockClass\": \"bannersSection\"\n },\n \"children\": [\"flex-layout.col#banners\"]\n },\n \"flex-layout.col#banners\": {\n \"children\": [\"rich-text#bannersSectionTitle\", \"slider-layout#banners\"]\n },\n \"rich-text#bannersSectionTitle\": {\n \"props\": {\n \"text\": \"### Summer essentials\",\n \"blockClass\": \"titleWithBorder\"\n }\n },\n \"slider-layout#banners\": {\n \"props\": {\n \"blockClass\": \"bannersSlider\",\n \"itemsPerPage\": {\n \"phone\": 1\n },\n \"showNavigationArrows\": \"never\",\n \"infinite\": false\n },\n \"children\": [\n \"flex-layout.row#banner1\",\n \"flex-layout.row#banner2\",\n \"flex-layout.row#banner3\"\n ]\n },\n \"flex-layout.row#banner1\": {\n \"children\": [\"flex-layout.col#banner1\"]\n },\n \"flex-layout.row#banner2\": {\n \"children\": [\"flex-layout.col#banner2\"]\n },\n \"flex-layout.row#banner3\": {\n \"children\": [\"flex-layout.col#banner3\"]\n },\n \"flex-layout.row#singleBannerMobile\": {\n \"props\": {\n \"blockClass\": \"singleBanner\"\n },\n \"children\": [\"image#singleBannerMobile\"]\n },\n \"image#singleBannerMobile\": {\n \"props\": {\n \"src\": \"assets/placeholders/singleBannerMobile.png\",\n \"maxHeight\": 160,\n \"blockClass\": \"singleBanner\"\n }\n },\n \"flex-layout.row#shelfMobile\": {\n \"children\": [\"list-context.product-list#productSliderMobile\"],\n \"props\": {\n \"blockClass\": \"shelfComplete\"\n }\n },\n \"list-context.product-list#productSliderMobile\": {\n \"blocks\": [\"product-summary.shelf#normal\"],\n \"children\": [\"slider-layout#productsMobile\"],\n \"props\": {\n \"orderBy\": \"OrderByTopSaleDESC\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_search-resolver_0e7a62a2
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How does search-resolver resolve GraphQL queries?",
"role": "user"
},
{
"content": "```typescript\ninterface OrderFormMarketingData {\n utmCampaign?: string\n utmMedium?: string\n utmSource?: string\n utmiCampaign?: string\n utmiPart?: string\n utmipage?: string\n marketingTags?: string\n}\n\ninterface CheckoutAddress {\n addressType: string\n receiverName: string\n addressId: string\n postalCode: string\n city: string\n state: string\n country: string\n street: string\n number: string\n neighborhood: string\n complement: string\n reference: string | null\n geoCoordinates: [number, number]\n}\ninterface OrderFormItem {\n id: string\n name: string\n detailUrl: string\n imageUrl: string\n productRefId: string\n skuName: string\n quantity: number\n uniqueId: string\n productId: string\n refId: string\n ean: string\n priceValidUntil: string\n price: number\n tax: number\n listPrice: number\n sellingPrice: number\n rewardValue: number\n isGift: boolean\n parentItemIndex: number | null\n parentAssemblyBinding: string | null\n productCategoryIds: string\n priceTags: string[]\n measurementUnit: string\n additionalInfo: {\n brandName: string\n brandId: string\n offeringInfo: any | null\n offeringType: any | null\n offeringTypeId: any | null\n }\n productCategories: Record<string, string>\n seller: string\n sellerChain: string[]\n availability: string\n unitMultiplier: number\n}\n\ninterface PaymentData {\n installmentOptions: {\n paymentSystem: string\n bin: string | null\n paymentName: string | null\n paymentGroupName: string | null\n value: number\n installments: {\n count: number\n hasInterestRate: false\n interestRate: number\n value: number\n total: number\n sellerMerchantInstallments: {\n count: number\n hasInterestRate: false\n interestRate: number\n value: number\n total: number\n }[]\n }[]\n }[]\n paymentSystems: {\n id: string\n name: string\n groupName: string\n validator: {\n regex: string\n mask: string\n cardCodeRegex: string\n cardCodeMask: string\n weights: number[]\n useCvv: boolean\n useExpirationDate: boolean\n useCardHolderName: boolean\n useBillingAddress: boolean\n }\n stringId: string\n template: string\n requiresDocument: boolean\n isCustom: boolean\n description: string | null\n requiresAuthentication: boolean\n dueDate: string\n availablePayments: any | null\n }[]\n payments: any[]\n giftCards: any[]\n giftCardMessages: any[]\n availableAccounts: any[]\n availableTokens: any[]\n}\n\ninterface LogisticsInfo {\n itemIndex: number\n selectedSla: string\n selectedDeliveryChannel: string\n addressId: string\n stockBalance: number\n slas: {\n id: string\n deliveryChannel: string\n name: string\n deliveryIds: {\n courierId: string\n warehouseId: string\n dockId: string\n courierName: string\n quantity: number\n }[]\n shippingEstimate: string\n shippingEstimateDate: string | null\n lockTTL: string | null\n availableDeliveryWindows: any[]\n deliveryWindow: string | null\n price: number\n listPrice: number\n tax: number\n pickupStoreInfo: {\n isPickupStore: boolean\n friendlyName: string | null\n\n address: CheckoutAddress | null\n additionalInfo: any | null\n dockId: string | null\n }\n pickupPointId: string | null\n pickupDistance: number\n polygonName: string | null\n }\n shipsTo: string[]\n itemId: string\n deliveryChannels: { id: string }[]\n\n}\n\ninterface OrderForm {\n orderFormId: string\n salesChannel: string\n loggedIn: boolean\n isCheckedIn: boolean\n storeId: string | null\n checkedInPickupPointId: string | null\n allowManualPrice: boolean\n canEditData: boolean\n userProfileId: string | null\n userType: string | null\n ignoreProfileData: boolean\n value: number\n messages: any[]\n items: OrderFormItem[]\n selectableGifts: any[]\n totalizers: { id: string; name: string; value: number }[]\n logisticsInfo: LogisticsInfo[]\n shippingData: {\n address: CheckoutAddress\n selectedAddresses: CheckoutAddress[]\n availableAddresses: CheckoutAddress[]\n pickupPoints: {\n friendlyName: string\n address: CheckoutAddress\n additionalInfo: string\n id: string\n businessHours: {\n DayOfWeek: number\n OpeningTime: string\n ClosingTime: string\n }[]\n }[]\n }\n clientProfileData: any | null\n paymentData: PaymentData\n marketingData: OrderFormMarketingData | null\n sellers: {\n id: string\n name: string\n logo: string\n }[]\n clientPreferencesData: {\n locale: string\n optinNewsLetter: any | null\n }\n commercialConditionData: any | null\n storePreferencesData: {\n countryCode: string\n saveUserData: boolean\n timeZone: string\n currencyCode: string\n currencyLocale: number\n currencySymbol: string\n currencyFormatInfo: {\n currencyDecimalDigits: number\n currencyDecimalSeparator: string\n currencyGroupSeparator: string\n currencyGroupSize: number\n startsWithCurrencySymbol: boolean\n }\n }\n giftRegistryData: any | null\n openTextField: any | null\n invoiceData: any | null\n customData: any | null\n itemMetadata: {\n items: MetadataItem[]\n }\n hooksData: any | null\n ratesAndBenefitsData: RatesAndBenefitsData\n subscriptionData: any | null\n itemsOrdination: any | null\n}\n\ninterface Teaser {\n featured: boolean\n id: string\n name: string\n conditions: {\n parameters: {\n name: string\n value: string\n }[]\n minimumQuantity: number\n }\n effects: {\n parameters: {\n name: string\n value: string\n }[]\n }\n teaserType: string\n}\ninterface RatesAndBenefitsData {\n rateAndBenefitsIdentifiers: {\n id: string\n name: string\n featured: boolean\n description: string\n }[]\n teaser: Teaser[]\n}\n\ninterface PayloadItem {\n id: string\n quantity: number\n seller: string\n parentItemIndex?: number | null\n parentAssemblyBinding?: string | null\n}\n\ninterface SimulationPayload {\n country?: string\n items: PayloadItem[]\n postalCode?: string\n isCheckedIn?: boolean\n priceTables?: string[]\n marketingData?: Record<string, string>\n shippingData?: ShippingData\n}\n\ninterface ShippingData {\n logisticsInfo?: { regionId?: string | null }[]\n}\n\n```",
"role": "assistant"
}
] |
code_community_dfe20dfe
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What npm dependencies does community use?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```json\n{\n \"name\": \"for-forin\",\n \"version\": \"1.0.0\",\n \"description\": \"\",\n \"main\": \"index.js\",\n \"scripts\": {\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n },\n \"keywords\": [],\n \"author\": \"\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"axios\": \"^0.19.2\"\n }\n}\n\n```",
"role": "assistant"
}
] |
code_bitcot-qa-theme_3eab3999
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of bitcot-qa-theme/store/blocks/product-price.jsonc from bitcot-qa-theme.",
"role": "user"
},
{
"content": "This is the code:\n\n```jsonc\n{\n \"flex-layout.row#selling-price\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 4\n },\n \"children\": [\n \"product-selling-price\"\n ]\n },\n\n \"flex-layout.row#list-price-savings\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 2,\n \"marginTop\": 5\n },\n \"children\": [\n \"product-list-price\",\n \"product-price-savings\"\n ]\n }\n}\n\n```",
"role": "assistant"
}
] |
code_b2b-organizations_c1c8b778
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What GraphQL queries are available in b2b-organizations?",
"role": "user"
},
{
"content": "Here's the graphql schema:\n\n```graphql\nquery GetPriceTables {\n priceTables @context(provider: \"vtex.admin-graphql\")\n}\n\n```",
"role": "assistant"
}
] |
code_regionalization-theme_562487b6
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in regionalization-theme/store/blocks/faq.jsonc.",
"role": "user"
},
{
"content": "Here's the source code:\n\n```jsonc\n{\n \"store.custom#faq\": {\n \"children\": [\n \"flex-layout.row#faq\"\n ]\n },\n\n \"flex-layout.row#faq\": {\n \"props\": {\n \"blockClass\": \"faq\"\n },\n \"children\": [\n \"flex-layout.col#faq\"\n ]\n },\n\n \"flex-layout.col#faq\": {\n \"children\": [\n \"rich-text#faq\",\n \"disclosure-layout-group#group\"\n ]\n },\n \"rich-text#faq\": {\n \"props\": {\n \"text\": \"## FAQ\"\n }\n },\n\n \"disclosure-layout-group#group\": {\n \"children\": [\n \"disclosure-layout#first\",\n \"disclosure-layout#second\",\n \"disclosure-layout#third\",\n \"disclosure-layout#fourth\"\n ]\n },\n\n \"disclosure-layout#first\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#first\", \"disclosure-content#first\"]\n },\n \"disclosure-trigger#first\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question1\"]\n },\n \"disclosure-content#first\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer1\"]\n },\n \"rich-text#question1\": {\n \"props\": {\n \"text\": \"How can I change my shipping address?\"\n }\n },\n \"rich-text#answer1\": {\n \"props\": {\n \"text\": \"Call us at the number (212) 1234-1234.\"\n }\n },\n\n \"disclosure-layout#second\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#second\", \"disclosure-content#second\"]\n },\n \"disclosure-trigger#second\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question2\"]\n },\n \"disclosure-content#second\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer2\"]\n },\n \"rich-text#question2\": {\n \"props\": {\n \"text\": \"How can I track my order?\"\n }\n },\n \"rich-text#answer2\": {\n \"props\": {\n \"text\": \"After logging into your account, you can find this info at the link Orders.\"\n }\n },\n\n\n \"disclosure-layout#third\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#third\", \"disclosure-content#third\"]\n },\n \"disclosure-trigger#third\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question3\"]\n },\n \"disclosure-content#third\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer3\"]\n },\n \"rich-text#question3\": {\n \"props\": {\n \"text\": \"How can I change my shipping address?\"\n }\n },\n \"rich-text#answer3\": {\n \"props\": {\n \"text\": \"Call us at the number (212) 1234-1234.\"\n }\n },\n\n\n \"disclosure-layout#fourth\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#fourth\", \"disclosure-content#fourth\"]\n },\n \"disclosure-trigger#fourth\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question4\"]\n },\n \"disclosure-content#fourth\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer2\"]\n },\n \"rich-text#question4\": {\n \"props\": {\n \"text\": \"How can I track my order?\"\n }\n },\n \"rich-text#answer4\": {\n \"props\": {\n \"text\": \"After logging into your account, you can find this info at the link Orders.\"\n }\n },\n\n\n \"disclosure-state-indicator\": {\n \"props\": {\n \"Show\": \"icon-caret#down\",\n \"Hide\": \"icon-caret#up\"\n }\n },\n \"icon-caret#down\": {\n \"props\": {\n \"orientation\": \"down\"\n }\n },\n \"icon-caret#up\": {\n \"props\": {\n \"orientation\": \"up\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_admin-pages_d595383b
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the GraphQL schema for admin-pages.",
"role": "user"
},
{
"content": "The implementation is:\n\n```graphql\nquery AvailableTemplates($interfaceId: String) {\n availableTemplates(interfaceId: $interfaceId) {\n id\n }\n}\n\n```",
"role": "assistant"
}
] |
code_telemarketing_31407c72
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in telemarketing/react/typings/vtex.store-components.d.ts.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\ndeclare module 'vtex.store-components' {\n export const Container\n}\n\n```",
"role": "assistant"
}
] |
code_easy-setup_f0d66c3c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement a Node.js service in VTEX IO like easy-setup?",
"role": "user"
},
{
"content": "```json\n{\n \"extends\": [\"tslint-config-vtex\", \"tslint-config-prettier\"],\n \"rules\": {\n \"object-literal-sort-keys\": false\n }\n}\n\n```",
"role": "assistant"
}
] |
doc_cad1b0c6
|
[
{
"content": "You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.",
"role": "system"
},
{
"content": "Provide a guide on guides vtex io documentation running native ab testing in VTEX.",
"role": "user"
},
{
"content": "Documentation\n\n[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)\n\n[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides)\n\n[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/api-reference)\n\n[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/app-development)\n\n[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/storefront-development)\n\n[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/vtex-io-apps)\n\n[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/troubleshooting)\n\n[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/ab-tests)\n\n[Running A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing)\n\n[A/B testing Legacy and IO store versions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-performing-ab-testing-between-legacy-and-io)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-app-store)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides)\n\n[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/api-reference)\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/app-development)\n\n[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/storefront-development)\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/vtex-io-apps)\n\n[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/troubleshooting)\n\n---\n\n[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/ab-tests)\n\n[Running A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing)\n\n[A/B testing Legacy and IO store versions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-performing-ab-testing-between-legacy-and-io)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-app-store)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/app-development)\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/ab-tests)\n\n[Running A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing)\n\nRunning A/B tests\n\nIn this guide, you will learn how to manage an A/B test, covering steps from running the test to providing the results.\n\nA/B testing involves comparing traffic between two store workspaces and helps you determine which performs better regarding user engagement and conversions. To run an A/B test, you can use the [VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference) or the [A/B Tester](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtexarg-abtester) app.\n\n> A/B tests have a maximum duration of 30 days from their start date. After this period, tests may end automatically without notice.\n\n## Before you begin\n\nMake sure you have [VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference) installed on your machine.\n\n## Running A/B tests via Admin\n\nThe A/B Tester app allows you to run A/B tests via the Admin. To use the app, follow these steps:\n\n1. Open the terminal and log in to the desired account. \n`1 \nvtex login {accountName} \n` \n> Replace the values between curly brackets based on your account name.\n2. Install the A/B Tester app in the `master` workspace by running: \n`1 \nvtex use master \n2 \nvtex install vtex.ab-tester \n`\n3. Type `y` to confirm that you want to install the app in the `master` workspace.\n4. Install the **A/B Tester app** in the `master` workspace by running the following: \n`1 \nvtex install vtexarg.abtester \n`\n5. Type `y` to confirm the installation.\n6. Now, in the VTEX Admin, go to **Extensions Hub > Installed Apps > AB Tester**.\n7. See the [A/B Tester Admin app documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtexarg-abtester%23usage) to create A/B tests, compare and conclude tests.\n\n## Running A/B tests via VTEX IO CLI\n\n### Step 1 - Enabling A/B testing\n\n1. Open the terminal and log in to the desired account. _Remember to replace the values between curly brackets based on your account name._ \n`1 \nvtex login {accountName} \n` \n> Replace the values between curly brackets based on your account name.\n2. [Create and switch to a Production workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-creating-a-production-workspace) by running the following command: \n`1 \nvtex use {workspaceName} --production \n`\n3. Perform the changes you want to test in the production workspace you are using, such as installing or editing an app. \n> If your store uses the [Checkout UI Custom](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-checkout-ui-custom-v0) app, you must first publish its configurations on your new production workspace. Otherwise, you might experience undesired consequences, such as losing the Checkout custom JavaScript code and styles.\n4. Switch to the `master` workspace. \n`1 \nvtex use master \n`\n5. Install the VTEX A/B tester app in the `master` workspace to enable A/B testing on your store website by running: \n`1 \nvtex install vtex.ab-tester \n` \n> You can run `vtex ls` to ensure you have successfully installed `vtex.ab-tester` in the `master` workspace.\n6. Run the following command in the `master` workspace. \n`1 \nvtex workspace abtest start \n` \n\n7. Select the production workspace you want to use for comparison with the `master` and agree to proceed.\n\n### Step 2 - Configuring the traffic and time\n\nBy agreeing to proceed with the test, you need to answer the following two questions:\n\n1. `What's the proportion of traffic initially directed to the master workspace?`\n\nYou must answer this question with any whole number between 0 and 10000\\. For example, if you answer `9000`, you will set 90% of the traffic to the `master` workspace.\n\n> To promote the changes from your production workspace in the safest way possible, we strongly recommend leaving 90% of traffic dedicated to the `master` and the other 10% to the production workspace being tested.\n\n1. `What's the amount of time respecting the restriction?`\n\nThis is the time (in hours) when the traffic proportion stated in the previous question remains constant. After this period, the A/B testing system automatically balances the traffic proportions, sending more traffic to the best-performing workspace. There are two possible answers to this question:\n\n| Option | Description |\n| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Answer 0 to automatically proceed with the A/B test.** | In this case, VTEX IO will automatically split your website traffic between workspaces, routing 50% of your store traffic to the master and the other 50% to the production workspace being tested.Following that, the platform will automatically balance traffic every three minutes based on the conversion rates. This means that traffic will be gradually routed from the workspace with the lowest conversion rate to the workspace with the highest conversion rate.**The test doesn't conclude independently.** **Evaluate the test results daily.** |\n| **Answer with the number of hours you want to keep constant the proportion of traffic previously specified.** | During peak operational periods, it's critical for the test to extract as much data as possible. At the same time, the test shouldn't overextend and end up harming users navigating the workspace with the poorest performance. |\n\nYou can run many A/B tests simultaneously by comparing two or more workspaces to the `master` individually. However, if you set up the traffic manually, the A/B test will distribute the traffic evenly among all production workspaces being A/B tested. For example, suppose you started an A/B test between workspace A and `master`, routing 90% of traffic to the former and 10% to the latter. If you run a new A/B test between workspace B and the `master`, each production workspace, A and B, will only receive 5% of the store traffic.\n\n> When a user session begins, their assigned workspace is determined by a cookie that lasts for 24 hours. During this period, the user will remain in the same workspace, regardless of traffic redistribution. After 24 hours, when a new session starts, the user may be randomly assigned to either workspace, which could be the same as before or a different one.\n\n### Step 3 - Interpreting the test results\n\nAny time during the A/B test, you can monitor the live results by executing the following command:\n\n`1\n\nvtex workspace abtest status \n\n`\n\n\n\nYou can update the workspaces used in the A/B test if necessary. However, fewer changes to these workspaces will lead to more accurate results.\n\nBefore concluding your A/B test, it's essential to understand the comparative and final results of the two workspaces. The following presents the metrics available for both results:\n\n#### Comparative results\n\n| Metric | Description |\n| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Conversion** | Conversion rate percentage displayed by each workspace during the test. |\n| **Expected Loss** | Anticipated percentage of conversion loss for the store if the lower conversion rate workspace is selected as the winner (based on **Conversion** results). |\n| **N. of Sessions** | Total number of sessions for each workspace since the beginning of the test. |\n| **N. of Sessions (last 24hrs)** | Number of sessions for each workspace during the test in the past 24 hours. |\n| **Revenue** | Total revenue placed by users navigating the store version associated with each workspace since the beginning of the test (expressed in the store's native currency). |\n| **Revenue (last 24 hs)** | Total revenue placed by users navigating the store version associated with each workspace in the past 24 hours during the test (expressed in the store's native currency). |\n\n#### Final results\n\n| **Metric** | **Description** |\n| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Start Date** | Date and time for the test to start. |\n| **Running Time** | Test duration. |\n| **Probability B beats A** | Probability, in percentage points, that the production workspace is better for your store than the current master workspace. This calculation is based on session and completed sales counts. If this metric is greater than 10%, the production workspace can become the winner. |\n| **Winner** | Workspace you selected as the winner. |\n\n> The main results of the A/B test are aimed at scenarios where the platform automatically directs store traffic. Although A/B testing can and should be used even in cases where traffic is directed manually, the numbers behind each result reflect an automatic segmentation depending on each workspace experience.\n\n#### Validating the winner workspace\n\nThe best way to validate your A/B test workspace winner is to set a maximum conversion loss value based on the size of your store operation.\n\nFor example, when starting your test, you can set a maximum conversion loss of `0,0001%`. Then, when either workspace achieves an `Expect Loss` result greater than `0,0001%`, you should end the test and declare a winner.\n\n### Step 4 - Finishing the A/B test\n\nIf your test has already reached the time frame you have manually set, or if you've already detected a winner during [Step 3](#step-3---interpreting-the-test-results), run the following command in `master` to conclude the test:\n\n`1\n\nvtex workspace abtest finish \n\n`\n\n> If you've manually set a predefined time frame to run your A/B test, monitor it throughout the entire period. Although the platform automatically redistributes traffic according to how each workspace behaves after the set time frame, overseeing the test is fundamental to its success.\n\nThis command displays a list of all workspaces tested by the `vtex.ab-tester` app in the `master` environment. Choose the workspace that you intend to finish. For example:\n\n\n\n> Remember to save any relevant data using the `vtex workspace abtest finish` command before it ends automatically in 30 days – A/B test data can't be retrieved otherwise. You can access data from ongoing tests with the `vtex workspace abtest status` command.\n\nAfter concluding the A/B test, follow the next step to promote the workspace to `master`.\n\n### Step 5 - Promoting the production workspace to master\n\nIn [Step 4](#step-4---finishing-the-ab-test), you only ended the test on the selected workspace. Now, you need to promote it to `master` by following the steps below.\n\n1. Change to the production workspace to be promoted. \n> You must be logged in to your VTEX account. \n`1 \nvtex use {workspaceName} \n` \n> Replace the values between curly brackets based on your workspace name.\n2. Promote the workspace being used. \n`1 \nvtex workspace promote \n`\n\nNow, all changes made in production are available in the master workspace.\n\nContributors\n\n2\n\n[](https://github.com/barbara-celi)\n\n[](https://github.com/carolinamenezes)\n\nWas this helpful?\n\nYes\n\nNo\n\n[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/ab-tests/vtex-io-documentation-running-native-ab-testing.md)\n\n[A/B tests« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing//docs/guides/ab-tests)[A/B testing Legacy and IO store versionsNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing//docs/guides/vtex-io-documentation-performing-ab-testing-between-legacy-and-io)\n\nSee also\n\n[AB TesterVTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtexarg-abtester)\n\nContributors\n\n2\n\n[](https://github.com/barbara-celi)\n\n[](https://github.com/carolinamenezes)\n\nON THIS PAGE\n\n[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23before-you-begin)\n\n[Running A/B tests via Admin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23running-ab-tests-via-admin)\n\n[Running A/B tests via VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23running-ab-tests-via-vtex-io-cli)\n\n[Step 1 - Enabling A/B testing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-1-enabling-ab-testing)[Step 2 - Configuring the traffic and time](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-2-configuring-the-traffic-and-time)[Step 3 - Interpreting the test results](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-3-interpreting-the-test-results)[Step 4 - Finishing the A/B test](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-4-finishing-the-ab-test)[Step 5 - Promoting the production workspace to master](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-5-promoting-the-production-workspace-to-master)\n\nWas this helpful?\n\n Send feedback\n\n[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/ab-tests/vtex-io-documentation-running-native-ab-testing.md)\n\nCopy page\n\nOn this page\n\nON THIS PAGE\n\n[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23before-you-begin)\n\n[Running A/B tests via Admin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23running-ab-tests-via-admin)\n\n[Running A/B tests via VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23running-ab-tests-via-vtex-io-cli)\n\n[Step 1 - Enabling A/B testing](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-1-enabling-ab-testing)[Step 2 - Configuring the traffic and time](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-2-configuring-the-traffic-and-time)[Step 3 - Interpreting the test results](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-3-interpreting-the-test-results)[Step 4 - Finishing the A/B test](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-4-finishing-the-ab-test)[Step 5 - Promoting the production workspace to master](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-running-native-ab-testing/docs/guides/vtex-io-documentation-running-native-ab-testing%23step-5-promoting-the-production-workspace-to-master)\n\nOn this page\n\n[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)",
"role": "assistant"
}
] |
code_user-identifier-extension-example_3ea8606c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What npm dependencies does user-identifier-extension-example use?",
"role": "user"
},
{
"content": "```json\n{\n \"name\": \"user-identifier-extension-example\",\n \"private\": true,\n \"license\": \"UNLICENSED\"\n}\n\n```",
"role": "assistant"
}
] |
code_store-components_5fbb25da
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in store-components/react/components/CategoriesHighlights/constants.js.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```javascript\nexport const ITEMS_PER_ROW = 2\nexport const SQUARED = 'squared'\nexport const RECTANGULAR = 'rectangular'\n\n```",
"role": "assistant"
}
] |
doc_747553b5
|
[
{
"content": "You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.",
"role": "system"
},
{
"content": "Provide a guide on guides vtex io documentation managing application logs in VTEX.",
"role": "user"
},
{
"content": "Documentation\n\n[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)\n\n[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides)\n\n[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/api-reference)\n\n[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/app-development)\n\n[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/storefront-development)\n\n[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/vtex-io-apps)\n\n[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/troubleshooting)\n\n[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)\n\n[Running IO scripts in non-IO VTEX stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)\n\n[Creating an interface for your app settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-creating-an-interface-for-your-app-settings)\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/ab-tests)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-app-store)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides)\n\n[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/api-reference)\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/app-development)\n\n[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/storefront-development)\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/vtex-io-apps)\n\n[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/troubleshooting)\n\n---\n\n[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)\n\n[Running IO scripts in non-IO VTEX stores](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)\n\n[Creating an interface for your app settings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-creating-an-interface-for-your-app-settings)\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/ab-tests)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-app-store)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/app-development)\n\nDevelopment guides\n\n[Managing application logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs)\n\nManaging application logs\n\nVTEX IO provides a logging service that allows developers to keep track of app errors, warnings, and informative events. The VTEX IO Logging Service collects data from the cloud infrastructure where VTEX applications run and delivers them via the VTEX IO CLI.\n\nIn the following section, you'll learn how to implement the VTEX IO Logging Service in your apps and how to retrieve their respective logs.\n\n> The VTEX IO Logging Service is currently available for Node apps only.\n\n---\n\n## Before you begin\n\nTo follow this guide, you must have the VTEX IO CLI installed on your machine. For more information, please see [this document](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-install).\n\n---\n\n## Instructions\n\n### Implementing the VTEX IO Logging Service\n\n1. Open your Node app in the code editor of your choice.\n2. Define an object with the `Context` interface as a parameter in a function where you want to provide logging messages. See the following example:\n\n`1\n\nconst helloWorld = (ctx: Context) => { \n\n2\n\n const { vtex: { logger } } = ctx \n\n3\n\n \n4\n\n logger.info('Hello World!') \n\n5\n\n} \n\n`\n\nIn this example, the `helloWorld` function receives an object with a [**Context**](https://read.calvincode.net/reader?url=https://github.com/vtex/node-vtex-api/blob/master/src/service/worker/runtime/typings.ts%23L34) interface as a parameter.\n\n> The `Context` interface contains many implementations inherent to the VTEX IO platform. One of those implementations is called `vtex` — an object containing all [VTEX IO infrastructure](https://read.calvincode.net/reader?url=https://github.com/vtex/node-vtex-api/blob/master/src/service/worker/runtime/typings.ts%23L116) related metadata, such as `account`, `workspace`, `tenant`, `settings`, and some service implementations. In the previous example, we used the `logger` service, an implementation inside `vtex` that generates log messages.\n\n1. [Destructure](https://read.calvincode.net/reader?url=https://www.typescriptlang.org/docs/handbook/variable-declarations.html%23destructuring) the `logger` object from the `vtex` context and use its methods (`error`, `warn`, `info`, and `debug`) to provide error, warning, debugging, or informative messages in the log. See the following example:\n\n`1\n\nconst helloWorld = (ctx: Context) => { \n\n2\n\n const { vtex: { logger } } = ctx \n\n3\n\n \n4\n\n logger.warn('Warning the world!') \n\n5\n\n \n6\n\n logger.error('Error!!!') \n\n7\n\n \n8\n\n logger.debug('Verbose debug message!') \n\n9\n\n} \n\n`\n\n> Every exception that happens in a VTEX IO service app is intercepted and automatically logged with a `logger.error` implementation.\n\n### Retrieving app logs\n\nEvery log written by a running app with the VTEX IO Logging Service is collected and stored for later retrieval.\n\nYou can retrieve the logs using the [VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference) by following the steps:\n\n1. Log in to your VTEX account.\n2. Install the Logs plugin for the VTEX IO CLI by running the following command:\n\n`1\n\nvtex plugins add logs \n\n`\n\n1. Check if the installation of the Logs plugin was successful by running `vtex logs --help`.\n2. Retrieve logs from all apps installed in your account by running the following command:\n\n`1\n\nvtex logs --all \n\n`\n\nThe output should be a message similar to the following:\n\n`1\n\nvtex logs --all \n\n2\n\n18:15:26.779 - info: Connecting to logs stream for store components \n\n3\n\n18:15:26.782 - info: Press CTRL+C to abort \n\n4\n\n \n5\n\n18:15:43.856 - info: Listening to store components logs \n\n6\n\n \n7\n\n info: { status: 403, \n\n8\n\n code: 'FORBIDDEN', \n\n9\n\n name: 'ForbiddenError', \n\n10\n\n level: 'error', \n\n11\n\n message: 'This username is already registered with another email', \n\n12\n\n stack: \n\n13\n\n 'ForbiddenError: This username is already registered with another email[ErrorStack...] \n\n14\n\n routeId: 'login' } \n\n`\n\n> You can also retrieve logs from a specific app installed in your account by running the following command: `vtex logs {serviceAppExample}`. Replace `serviceAppExample` with the desired app name.\n\nWe suggest running `vtex logs --all > {mylogfile.logs}` to save the log messages in a local file. Replace `{mylogfile.logs}` with a name that fits your environment.\n\nIf you want to see log messages that you have previously retrieved, run `vtex logs --past`.\n\n## Log storage and retention limits\n\nVTEX limits the storage size and retention period of logs to guarantee the stability and performance of the platform. The limits are:\n\n* Logs are stored for 7 days at most.\n* Each app can have up to 1 GB of logs stored per account. If an app generates more than 1 GB of logs in one account in 7 days or less, the oldest logs are deleted.\n\nIf you need more than 1 GB of logs per week for an app, we recommend retrieving and storing your logs before they reach the storage limit. You can check the size of the logs from the size of the retrieved files in your local environment. See the instructions in the [Retrieving app logs](#retrieving-app-logs) section.\n\n> VTEX may change the storage limits of app logs without additional notice. Check this documentation for the updated limit values.\n\nContributors\n\n2\n\n[](https://github.com/henriquessb)\n\n[](https://github.com/carolinamenezes)\n\nWas this helpful?\n\nYes\n\nNo\n\n[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/configuring-workspaces/vtex-io-documentation-managing-application-logs.md)\n\n[Deprecating an app« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs//docs/guides/vtex-io-documentation-deprecating-an-app)[Running IO scripts in non-IO VTEX storesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs//docs/guides/vtex-io-documentation-running-io-scripts-in-non-io-vtex-stores)\n\nContributors\n\n2\n\n[](https://github.com/henriquessb)\n\n[](https://github.com/carolinamenezes)\n\nON THIS PAGE\n\n[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23before-you-begin)\n\n[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23instructions)\n\n[Implementing the VTEX IO Logging Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23implementing-the-vtex-io-logging-service)[Retrieving app logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23retrieving-app-logs)\n\n[Log storage and retention limits](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23log-storage-and-retention-limits)\n\nWas this helpful?\n\n Send feedback\n\n[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/App-Guides/configuring-workspaces/vtex-io-documentation-managing-application-logs.md)\n\nCopy page\n\nOn this page\n\nON THIS PAGE\n\n[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23before-you-begin)\n\n[Instructions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23instructions)\n\n[Implementing the VTEX IO Logging Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23implementing-the-vtex-io-logging-service)[Retrieving app logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23retrieving-app-logs)\n\n[Log storage and retention limits](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-managing-application-logs/docs/guides/vtex-io-documentation-managing-application-logs%23log-storage-and-retention-limits)\n\nOn this page\n\n[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)",
"role": "assistant"
}
] |
code_pharma-orders-admin_77b8e6ba
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of pharma-orders-admin/react/utils/intl.ts from pharma-orders-admin.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```typescript\nimport { defineMessages } from 'react-intl'\n\nconst prefix = 'admin/admin.app.pharma-orders.'\n\nexport const titlesIntl = defineMessages({\n textOf: { id: `${prefix}textOf` },\n textShowRows: { id: `${prefix}textShowRows` },\n filterClear: { id: `${prefix}filterClear` },\n filterAll: { id: `${prefix}filterAll` },\n filterNone: { id: `${prefix}filterNone` },\n filterAny: { id: `${prefix}filterAny` },\n filterIs: { id: `${prefix}filterIs` },\n filterIsNot: { id: `${prefix}filterIsNot` },\n filterContains: { id: `${prefix}filterContains` },\n filterApply: { id: `${prefix}filterApply` },\n ordersTableOrderId: { id: `${prefix}ordersTableOrderId` },\n ordersTableStatus: { id: `${prefix}ordersTableStatus` },\n ordersTableProducts: { id: `${prefix}ordersTableProducts` },\n ordersTableFiles: { id: `${prefix}ordersTableFiles` },\n selectedOrders: { id: `${prefix}selectedOrders` },\n selectAllOrders: { id: `${prefix}selectAllOrders` },\n pageTitle: { id: `${prefix}pageTitle` },\n approve: { id: `${prefix}approve` },\n confirm: { id: `${prefix}confirm` },\n cancel: { id: `${prefix}cancel` },\n buttonShowProducts: { id: `${prefix}buttonShowProducts` },\n buttonShowFiles: { id: `${prefix}buttonShowFiles` },\n productTableProductId: { id: `${prefix}productTableProductId` },\n productTableQuantity: { id: `${prefix}productTableQuantity` },\n productTableName: { id: `${prefix}productTableName` },\n prescription: { id: `${prefix}prescription` },\n withoutPrescription: { id: `${prefix}withoutPrescription` },\n theOrder: { id: `${prefix}theOrder` },\n wasCanceled: { id: `${prefix}wasCanceled` },\n wasNotCanceled: { id: `${prefix}wasNotCanceled` },\n wasAlreadyCanceled: { id: `${prefix}wasAlreadyCanceled` },\n canceled: { id: `${prefix}canceled` },\n created: { id: `${prefix}created` },\n approved: { id: `${prefix}approved` },\n confirmed: { id: `${prefix}confirmed` },\n wasApproved: { id: `${prefix}wasApproved` },\n wasNotApproved: { id: `${prefix}wasNotApproved` },\n wasAlreadyApproved: { id: `${prefix}wasAlreadyApproved` },\n wasConfirmed: { id: `${prefix}wasConfirmed` },\n isConfirmed: { id: `${prefix}isConfirmed` },\n wasNotConfirmed: { id: `${prefix}wasNotConfirmed` },\n wasAlreadyConfirmed: { id: `${prefix}wasAlreadyConfirmed` },\n approvedBeforeConfirming: { id: `${prefix}approvedBeforeConfirming` },\n isCanceled: { id: `${prefix}isCanceled` },\n noOrdersYet: { id: `${prefix}noOrdersYet` },\n invoiceNumber: { id: `${prefix}invoiceNumber` },\n placeholderInvoiceNumber: { id: `${prefix}placeholderInvoiceNumber` },\n noInvoiceNumber: { id: `${prefix}noInvoiceNumber` },\n})\n\n```",
"role": "assistant"
}
] |
code_store-theme_c6007a31
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I style components in store-theme?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```css\n.row--menu-row {\n padding-right: 24px;\n}\n\n.row--menu-row .rowContainer {\n align-items: flex-start;\n}\n\n.row--payment-methods {\n padding-top: 16px;\n}\n\n```",
"role": "assistant"
}
] |
code_admin-organizations_f6cf2130
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of admin-organizations/messages/pt.json from admin-organizations.",
"role": "user"
},
{
"content": "This is the code:\n\n```json\n{\n \"admin-authorization.navigation.label-group\": \"Autorizações\",\n \"admin-authorization.navigation.label-details\": \"Exemplo de detalhes\",\n \"admin-authorization.navigation.label-table\": \"Exemplo de tabela\",\n \"admin-authorization.navigation.search.kws\": \"teste, mock, fake\",\n \"admin-authorization.navigation.details.search.kws\": \"detalhe, mock, test, oi\",\n \"admin-authorization.navigation.table.search.kws\": \"tabela, mock, test, tchau\",\n \"admin-authorization.hello-world\": \"Admin de exemplo\",\n \"admin-authorization.navigation.label-permissions\": \"All Permissions\",\n \"admin-authorization.navigation.label-roles\": \"All Roles\",\n \"admin-authorization.navigation.roles.search.kws\": \"roles, vtex\",\n \"admin-authorization.navigation.label-user-roles\": \"User roles\",\n \"admin-authorization.navigation.user-roles.search.kws\": \"user role, vtex\",\n \"admin-authorization.permissions.title\": \"Permissions\",\n \"admin-authorization.roles.title\": \"Roles\",\n \"admin-authorization.user-roles.title\": \"User roles\"\n}\n```",
"role": "assistant"
}
] |
code_product-customizer_db3467bd
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What props does Text Input Value accept and how do I configure them?",
"role": "user"
},
{
"content": "This is the code:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Input } from 'vtex.styleguide'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport useInputValue from './useInputValue'\n\nconst CSS_HANDLES = ['textInputValue'] as const\n\nconst TextInputValue: FC<Props> = ({ inputValueInfo }) => {\n const [state, onChange] = useInputValue(inputValueInfo.label)\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target\n\n onChange({ value })\n }\n\n const handles = useCssHandles(CSS_HANDLES)\n\n return (\n <div className={`${handles.textInputValue} mb4`}>\n <Input\n value={state}\n onChange={handleChange}\n label={inputValueInfo.label}\n maxLength={inputValueInfo.maxLength}\n />\n </div>\n )\n}\n\ninterface Props {\n inputValueInfo: TextInputValue\n}\n\nexport default TextInputValue\n\n```",
"role": "assistant"
}
] |
code_affirm-qa-theme_80c8ca69
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in affirm-qa-theme/store/blocks/contact.jsonc.",
"role": "user"
},
{
"content": "This is the code:\n\n```jsonc\n{\n \"store.custom#contact-us\": {\n \"children\": [\n \"flex-layout.row#contact-us\"\n ]\n },\n\n \"flex-layout.row#contact-us\": {\n \"props\": {\n \"blockClass\": \"contact\"\n },\n \"children\": [\n \"flex-layout.col#contact-us\"\n ]\n },\n\n \"flex-layout.col#contact-us\": {\n \"children\": [\n \"rich-text#contact-us\",\n \"form#contact-us\"\n ]\n },\n \"rich-text#contact-us\": {\n \"props\": {\n \"text\": \"## Contact Us\"\n }\n },\n\n \"form#contact-us\": {\n \"props\": {\n \"entity\": \"contact\",\n \"schema\": \"site-contact\"\n },\n \"blocks\": [\n \"form-success#contact-us\"\n ],\n \"children\": [\n \"form-input.text#title\",\n \"form-input.text#name\",\n \"form-input.text#email\",\n \"form-input.textarea#message\",\n \"form-submit#contact\"\n ]\n },\n\n \"form-success#contact-us\": {\n \"children\": [\n \"rich-text#success-submit\"\n ]\n },\n \"rich-text#success-submit\": {\n \"props\": {\n \"text\": \"Thanks for reaching out! We will come back shortly.\",\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\"\n }\n },\n\n \"form-input.text#title\": {\n \"props\": {\n \"pointer\": \"#/properties/title\"\n }\n },\n \"form-input.text#name\": {\n \"props\": {\n \"pointer\": \"#/properties/name\"\n }\n },\n \"form-input.text#email\": {\n \"props\": {\n \"pointer\": \"#/properties/email\"\n }\n },\n \"form-input.textarea#message\": {\n \"props\": {\n \"pointer\": \"#/properties/message\"\n }\n },\n\n \"form-submit#contact\": {\n \"props\": {\n \"label\": \"Submit\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_mycheckout-sdk_aacd0ef1
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I style components in mycheckout-sdk?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```css\n.loading {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgb(255, 255, 255);\n z-index: 9999;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n max-height: 100%;\n overflow: hidden;\n}\n\n\n.loading .message {\n margin-top: 1rem;\n font-family: 'Lato';\n font-weight: lighter;\n color: #011D1A;\n text-align: center;\n width: 50%;\n position: relative;\n top: -175px;\n}\n\n.placeholder {\n display: block;\n height: 150px;\n}\n\n@media screen and (min-width: 992px) {\n .placeholder {\n display: none;\n }\n}\n\n```",
"role": "assistant"
}
] |
code_wordpress-integration-qa-theme_64f2824c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of wordpress-integration-qa-theme/store/blocks.jsonc from wordpress-integration-qa-theme.",
"role": "user"
},
{
"content": "The implementation is:\n\n```jsonc\n/* Blocks can be defined both on the store/blocks.json file, and in any number of json\n * files inside the store/blocks directory, with any arbitrary directory structure.\n *\n * Additionally, all blocks files can support comments, such as this one, if given the\n * .jsonc file extension.\n *\n * The store/blocks.json file is intended for backwards compatibility, for miscellaneous\n * blocks, or if the app is simple enough that it doesn't warrant splitting the file.\n */\n{\n \"store.orderplaced\": {\n \"blocks\": [\"order-placed\"]\n },\n\n \"store.account\": {\n \"blocks\": [\"my-account\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n },\n\n \"store.login\": {\n \"blocks\": [\"login-content#default\"]\n },\n\n \"login-content#default\": {\n \"props\": {\n \"isInitialScreenOptionOnly\": false,\n \"defaultOption\": 1,\n \"showPasswordVerificationIntoTooltip\": true\n }\n },\n\n \"store.product-review-form\": {\n \"blocks\": [\"product-review-form\"]\n },\n\n \"store.not-found#product\": {\n \"blocks\": [\"rich-text#not-found\"]\n },\n\n \"store.not-found#search\": {\n \"blocks\": [\"rich-text#not-found\"]\n },\n\n \"rich-text#not-found\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"**PAGE NOT FOUND**\",\n \"font\": \"t-heading-1\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_broadcaster-worker_b97145d5
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement a Node.js service in VTEX IO like broadcaster-worker?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\nimport { TooManyRequestsError } from '@vtex/api'\nimport { any } from 'ramda'\n\nconst ERROR_429 = 'E_HTTP_429'\n\nconst isTooManyRequestsError = (error: any) => {\n // Checks if has one error and it is the TooManyRequestError\n if (error.graphQLErrors && error.graphQLErrors.length === 1) {\n return any((err: any )=> err.extensions?.exception?.code === ERROR_429 , error.graphQLErrors)\n }\n return false\n}\n\nexport async function errors(_: Context, next: () => Promise<void>) {\n try {\n await next()\n } catch (error) {\n if (isTooManyRequestsError(error)) {\n throw new TooManyRequestsError()\n }\n throw error\n }\n}\n\n```",
"role": "assistant"
}
] |
code_cross-device-cart_afc90470
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in cross-device-cart/react/utils/insertRootPath.ts.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```typescript\nexport default function insertRootPath(\n rootPath: string | undefined,\n apiRoute: string\n) {\n const pathWithRootPath = rootPath ? `${rootPath}${apiRoute}` : apiRoute\n\n return pathWithRootPath\n}\n\n```",
"role": "assistant"
}
] |
code_fixed-prices-app_a14c09e0
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement a Node.js service in VTEX IO like fixed-prices-app?",
"role": "user"
},
{
"content": "The implementation is:\n\n```json\n{\n \"memory\": 512,\n \"ttl\": 10,\n \"timeout\": 200,\n \"minReplicas\": 2,\n \"maxReplicas\": 4,\n \"workers\": 2,\n \"routes\": {\n \n \"prices\": {\n \"path\": \"/v0/demo/prices/:itemId/:priceTableId\",\n \"public\": true\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_training-week-demo_85ce9c04
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in training-week-demo/store-theme/store/blocks/product-summary/product-specification-list.jsonc.",
"role": "user"
},
{
"content": "The implementation is:\n\n```jsonc\n{\n \"product-specification-group#summary\": {\n \"children\": [\n \"product-specification#summary\"\n ]\n },\n \"product-specification#summary\": {\n \"children\": [\n \"flex-layout.row#summarySpecificationValues\"\n ]\n },\n \"flex-layout.row#summarySpecificationValues\": {\n \"props\": {\n \"preventHorizontalStretch\": true,\n \"colGap\": 3\n },\n \"children\": [\n \"rich-text#summarySpecificationBullet\",\n \"product-specification-values\"\n ]\n },\n \"rich-text#summarySpecificationBullet\": {\n \"props\": {\n \"text\": \"•\",\n \"textColor\": \"c-action-primary\",\n \"blockClass\": \"summarySpecificationBullet\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_product-quantity_d53deefd
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in product-quantity/messages/nn.json.",
"role": "user"
},
{
"content": "This is the code:\n\n```json\n{\n \"store/product-quantity.quantity\": \"Antall\",\n \"store/product-quantity.quantity-available\": \"{availableQuantity, plural, one {# tilgjengelig} other {# tilgjengelig}}\",\n \"admin/editor.product-quantity.title\": \"Komponent for produktmengde\",\n \"admin/editor.product-quantity.description\": \"En komponent som lar brukeren velge antall varer å legge i handlekurven\",\n \"admin/editor.product-quantity.warningQuantityThreshold.title\": \"Terskeladvarsel for tilgjengelig mengde\",\n \"admin/editor.product-quantity.warningQuantityThreshold.description\": \"Vis kun antall gjenværende varer på lager dersom tilgjengelige antall er mindre enn eller lik verdien som passeres i denne egenskapen\",\n \"admin/editor.product-quantity.showUnit.title\": \"Måleenhet i mengdevelgeren\",\n \"admin/editor.product-quantity.showUnit.description\": \"Vis eller skjul måleenhet i mengdevelgeren\"\n}\n\n```",
"role": "assistant"
}
] |
code_std_50976cfa
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What are the key features of std?",
"role": "user"
},
{
"content": "Here's the documentation:\n\n```markdown\n# vtex.land/std\n\nThe core apps of the `vex` platform.\n\nThese apps do not have external dependencies and they are reviewed and maintained by the VTEX IO core team. The intention is to have a standard set of high quality code that all VTEX IO projects can use fearlessly.\n\nContributions are welcome!\n\n### Recognition\n\nThis is heavily inspired by the great work happening at the Deno community.\n```",
"role": "assistant"
}
] |
code_add-to-cart-validation_40d0aadb
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in add-to-cart-validation/store/interfaces.json.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```json\n{\n \"add-to-cart-validation\": {\n \"component\": \"AddToCartValidation\"\n }\n}\n\n```",
"role": "assistant"
}
] |
troubleshoot_telemarketing_not_rendering_c3e5ec9c
|
[
{
"content": "You are a VTEX debugging expert. You help developers troubleshoot issues with VTEX IO apps, Store Framework components, and GraphQL services. You provide clear, actionable solutions with code fixes.",
"role": "system"
},
{
"content": "telemarketing is not rendering on my page. I've added it to my blocks.jsonc but nothing shows up. What could be wrong?",
"role": "user"
},
{
"content": "## Common Causes\n\nThe telemarketing component not rendering is typically caused by one of these issues:\n\n1. **Missing store-header dependency** - The telemarketing block is designed to work within the header context and requires the `vtex.store-header` app to be installed and properly configured.\n\n2. **Incorrect block placement** - The telemarketing block must be declared as a child of `header-layout.desktop` or within a compatible header row, not as a standalone block in your store theme.\n\n3. **Missing CSS Handles or styling issues** - The component may be rendering but invisible due to CSS conflicts or missing styles.\n\n4. **App not installed in workspace** - The `vtex.telemarketing` app may not be installed in your current workspace, even if declared in blocks.jsonc.\n\n5. **User authentication context missing** - Telemarketing requires specific authentication contexts that may not be available if header components are incorrectly structured.\n\n## Debugging Steps\n\n**Step 1: Verify app installation**\n\nOpen your terminal and run:\n```bash\nvtex list\n```\nLook for `vtex.telemarketing` in the installed apps. If missing, install it:\n```bash\nvtex install vtex.telemarketing\n```\n\n**Step 2: Check your manifest.json dependencies**\n\nEnsure your store theme includes the required peer dependencies:\n```json\n{\n \"peerDependencies\": {\n \"vtex.store-header\": \"2.x\"\n }\n}\n```\n\n**Step 3: Inspect block hierarchy in browser**\n\nOpen your store in the browser, access DevTools (F12), and search for `telemarketing` in the Elements panel. If the element exists but is not visible, it's a CSS issue. If it doesn't exist, the block declaration is incorrect.\n\n**Step 4: Verify you're logged in as a telemarketing operator**\n\nThe telemarketing bar only appears for users with the telemarketing role. Log in with an account that has telemarketing permissions in the VTEX Admin under Account Settings > Roles.\n\n**Step 5: Check the console for errors**\n\nLook for any JavaScript errors or GraphQL failures related to telemarketing or session authentication.\n\n## Solution\n\nThe telemarketing block must be placed within your header structure. Here's the correct implementation:\n\n**In `header.jsonc` or `header/desktop.jsonc`:**\n\n```json\n{\n \"header-layout.desktop\": {\n \"children\": [\n \"header-row#notification\",\n \"header-row#main\"\n ]\n },\n\n \"header-row#notification\": {\n \"children\": [\n \"telemarketing\"\n ],\n \"props\": {\n \"fullWidth\": true\n }\n },\n\n \"header-row#main\": {\n \"children\": [\n \"logo\",\n \"search-bar\",\n \"minicart.v2\"\n ]\n },\n\n \"telemarketing\": {\n \"props\": {\n \"attendantEmail\": true\n }\n }\n}\n```\n\n**Common mistake to avoid:**\n\n```json\n// WRONG - telemarketing as root block\n{\n \"store.home\": {\n \"blocks\": [\n \"telemarketing\",\n \"rich-text#home\"\n ]\n }\n}\n```\n\nThe telemarketing component must be inside a header row, not directly in a store template.\n\n**If you need telemarketing in mobile header:**\n\n```json\n{\n \"header-layout.mobile\": {\n \"children\": [\n \"header-row#telemarketing-mobile\",\n \"header-row#main-mobile\"\n ]\n },\n\n \"header-row#telemarketing-mobile\": {\n \"children\": [\n \"telemarketing\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"sticky\": true\n }\n }\n}\n```\n\n**Verify the header is included in your store template:**\n\nIn `store/blocks/home.jsonc` or your base template:\n```json\n{\n \"store.home\": {\n \"blocks\": [\n \"header-layout.desktop#home\",\n \"flex-layout.row#home-content\",\n \"footer\"\n ]\n }\n}\n```\n\n## Prevention Tips\n\n1. **Always check app documentation** - Run `vtex info vtex.telemarketing` to see required peer dependencies and proper usage.\n\n2. **Use VTEX IO CLI to validate** - Run `vtex link` and carefully review warnings about missing dependencies or block hierarchy issues.\n\n3. **Test with proper user roles** - Create a test user with telemarketing permissions specifically for development and QA.\n\n4. **Keep header structure modular** - Maintain separate files for header configuration (`header.jsonc`) to make troubleshooting easier.\n\n5. **Check the Site Editor** - Sometimes blocks are hidden via Site Editor settings. Verify in Admin > Storefront > Site Editor that the telemarketing block isn't disabled.",
"role": "assistant"
}
] |
code_apub-app-center_ef28c792
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Card Div component in my VTEX store?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst CardDiv = (props: any) => {\n return (\n <div className='w-100 flex flex-wrap bg-white ba br2 b--muted-4 pa6 card-hover pa6 h-100 flex flex-column justify-between'>\n {props.children}\n </div>\n )\n}\n\nexport default CardDiv\n\n```",
"role": "assistant"
}
] |
code_minicart_326ef26e
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What props does Popup accept and how do I configure them?",
"role": "user"
},
{
"content": "Here's how it works:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Overlay } from 'vtex.react-portal'\nimport { usePixelEventCallback, PixelEventTypes } from 'vtex.pixel-manager'\n\nimport MinicartIconButton from './MinicartIconButton'\nimport { useMinicartCssHandles } from './CssHandlesContext'\nimport { useMinicartState, useMinicartDispatch } from '../MinicartContext'\nimport styles from '../styles.css'\n\nexport const CSS_HANDLES = [\n 'popupWrapper',\n 'popupContentContainer',\n 'arrowUp',\n 'popupChildrenContainer',\n] as const\n\ninterface Props {\n Icon: React.ComponentType\n quantityDisplay: QuantityDisplayType\n itemCountMode: MinicartTotalItemsType\n customPixelEventId?: string\n customPixelEventName?: PixelEventTypes.EventName\n variation?: string\n}\n\nconst PopupMode: FC<Props> = props => {\n const {\n children,\n quantityDisplay,\n Icon,\n itemCountMode,\n customPixelEventId,\n customPixelEventName,\n variation,\n } = props\n\n const {\n open,\n openBehavior,\n hasBeenOpened,\n openOnHoverProp,\n } = useMinicartState()\n\n const dispatch = useMinicartDispatch()\n const { handles } = useMinicartCssHandles()\n\n usePixelEventCallback({\n eventId: customPixelEventId,\n eventName: customPixelEventName,\n handler: () => {\n dispatch({ type: 'OPEN_MINICART' })\n },\n })\n\n const handleClick = () => {\n if (openOnHoverProp) {\n dispatch({ type: 'SET_OPEN_BEHAVIOR', value: 'hover' })\n }\n\n dispatch({ type: 'CLOSE_MINICART' })\n }\n\n const handleMouseLeave = () => {\n dispatch({ type: 'CLOSE_MINICART' })\n }\n\n return (\n <div onMouseLeave={openBehavior === 'hover' ? handleMouseLeave : undefined}>\n <MinicartIconButton\n variation={variation}\n Icon={Icon}\n itemCountMode={itemCountMode}\n quantityDisplay={quantityDisplay}\n />\n {open && (\n <Overlay>\n {openBehavior === 'click' && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className=\"fixed top-0 left-0 w-100 h-100\"\n onClick={handleClick}\n />\n )}\n <div\n className={`${handles.popupWrapper} ${styles.popupBoxPosition} absolute z-max flex flex-column`}\n >\n <div\n className={`${handles.popupContentContainer} w-100 shadow-3 bg-base`}\n >\n <div\n className={`${handles.arrowUp} ${styles.popupArrowUp} absolute top-0 bg-base h1 w1 pa4 rotate-45`}\n />\n <div\n className={`${handles.popupChildrenContainer} mt3 bg-base relative flex flex-column ph5 pv3`}\n >\n {hasBeenOpened && children}\n </div>\n </div>\n </div>\n </Overlay>\n )}\n </div>\n )\n}\n\nexport default PopupMode\n\n```",
"role": "assistant"
}
] |
code_wishlist_167a76cc
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Graphql Client component in my VTEX store?",
"role": "user"
},
{
"content": "This is the code:\n\n```tsx\nimport { ApolloClient } from 'apollo-client'\nimport { append, concat, contains, filter, map, path, without } from 'ramda'\nimport createListMutation from './graphql/mutations/createList.gql'\nimport deleteListMutation from './graphql/mutations/deleteList.gql'\nimport updateListMutation from './graphql/mutations/updateList.gql'\nimport getListQuery from './graphql/queries/getList.gql'\nimport getListDetailedQuery from './graphql/queries/getListDetails.gql'\nimport getListsByOwnerQuery from './graphql/queries/getListsByOwner.gql'\n\nconst WISHLIST_STORAGE_KEY = 'vtexwishlists'\n\nexport const getListsIdFromCookies = () => {\n const lists = localStorage.getItem(WISHLIST_STORAGE_KEY)\n return (\n (lists &&\n lists\n .split(',')\n .map((id: string) => id.replace('\"', '').replace('\"', ''))) ||\n []\n )\n}\n\nexport const saveListIdInLocalStorage = (id: string | undefined): void => {\n if (id) {\n const lists = localStorage.getItem(WISHLIST_STORAGE_KEY)\n const newLists = lists ? lists + ',' + id : id\n localStorage.setItem(WISHLIST_STORAGE_KEY, newLists)\n }\n}\n\nexport const removeListIdFromLocalStorage = (listId: string): void => {\n const listsId = getListsIdFromCookies()\n const listsIdWithoutRemoved = filter((id: string) => id !== listId, listsId)\n localStorage.setItem(WISHLIST_STORAGE_KEY, listsIdWithoutRemoved.toString())\n}\n\nexport const getList = (\n client: ApolloClient<ResponseList>,\n id: string\n): Promise<ResponseList> => {\n return client.query({\n fetchPolicy: 'network-only',\n query: getListQuery,\n variables: { id },\n })\n}\n\nconst fetchListsByOwner = (\n client: ApolloClient<ResponseList>,\n owner: string,\n page?: number,\n pageSize?: number\n): Promise<ResponseList> =>\n client.query({\n fetchPolicy: 'network-only',\n query: getListsByOwnerQuery,\n variables: { owner, page, pageSize },\n })\n\nconst joinLists = (\n listsByOwner: List[] | undefined,\n listsNotIndexed: ResponseList[]\n) => {\n const localListsId = getListsIdFromCookies()\n const notIndexed = map(item => item.data.list || {}, listsNotIndexed)\n const lists = filter(\n item => contains(item.id, localListsId),\n listsByOwner || []\n )\n return concat(lists, notIndexed)\n}\n\nconst isListFromOwner = (listsNotIndexed: ResponseList[], owner: string) => {\n return (\n listsNotIndexed.length > 0 &&\n path(['data', 'list', 'owner'], listsNotIndexed[0]) !== owner\n )\n}\n\nconst getSyncLists = async (\n client: ApolloClient<ResponseList>,\n owner: string\n): Promise<ResponseList> => {\n let {\n data: { listsByOwner },\n } = await fetchListsByOwner(client, owner)\n\n const listsId = map(item => item.id, listsByOwner || [])\n const listIdFromLocal = getListsIdFromCookies()\n if (!listIdFromLocal || !listIdFromLocal.length) {\n map(saveListIdInLocalStorage, listsId)\n } else {\n const listsIdNotIndexed = without(listsId, listIdFromLocal)\n const listsNotIndexed = await Promise.all(\n map(id => getList(client, id || ''), listsIdNotIndexed)\n )\n\n if (isListFromOwner(listsNotIndexed, owner)) {\n localStorage.removeItem(WISHLIST_STORAGE_KEY)\n map(saveListIdInLocalStorage, listsId)\n } else {\n listsByOwner = joinLists(listsByOwner, listsNotIndexed)\n }\n }\n return { data: { listsByOwner } }\n}\n\nexport const getListsByOwner = (\n client: ApolloClient<ResponseList>,\n owner: string\n): Promise<ResponseList> => getSyncLists(client, owner)\n\nexport const updateList = (\n client: ApolloClient<ResponseList>,\n id: string,\n { name, isPublic, items }: List\n): Promise<ResponseList> => {\n return client.mutate({\n mutation: updateListMutation,\n variables: {\n id,\n list: {\n isPublic,\n items,\n name,\n },\n },\n })\n}\n\nexport const createList = (\n client: ApolloClient<ResponseList>,\n list: List\n): Promise<ResponseList> =>\n client\n .mutate({\n mutation: createListMutation,\n variables: {\n ...list,\n },\n })\n .then((response: ResponseList) => {\n const {\n data: { createList },\n } = response\n saveListIdInLocalStorage(createList ? createList.id : '')\n return response\n })\n\nexport const addProductToDefaultList = async (\n client: ApolloClient<ResponseList>,\n owner: string,\n listName: string,\n product: ListItem\n): Promise<ResponseList> => {\n const {\n data: { listsByOwner },\n } = await getSyncLists(client, owner)\n if (listsByOwner && listsByOwner.length) {\n const list = listsByOwner[0]\n return updateList(client, list.id || '', {\n items: append(product, list ? list.items || [] : []),\n name: list ? list.name : '',\n })\n }\n return createList(client, {\n isEditable: false,\n items: [product],\n name: listName,\n owner,\n })\n}\n\nexport const getListsFromLocaleStorage = (\n client: ApolloClient<ResponseList>\n): Promise<ResponseList[]> => {\n const listsId = getListsIdFromCookies() || []\n return Promise.all(\n map((id: string) => {\n return getList(client, id)\n }, listsId)\n )\n}\n\nexport const deleteList = (\n client: ApolloClient<ResponseList>,\n listId: string\n): Promise<void> => {\n return client\n .mutate({\n mutation: deleteListMutation,\n variables: {\n id: listId,\n },\n })\n .then(() => removeListIdFromLocalStorage(listId))\n}\n\nexport const getListDetailed = (\n client: ApolloClient<ResponseList>,\n listId: string\n): Promise<ResponseList> =>\n client.query({\n fetchPolicy: 'network-only',\n query: getListDetailedQuery,\n variables: { id: listId },\n })\n\n```",
"role": "assistant"
}
] |
code_session-client_05e2ae08
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from session-client.",
"role": "user"
},
{
"content": "```typescript\nimport { RecorderState, Service, IOClients, ServiceContext } from '@vtex/api'\n\nimport { Clients } from './clients'\nimport { updateSession } from './resolvers/updateSession'\nimport { session } from './resolvers/session'\n\nconst MEDIUM_TIMEOUT_MS = 2 * 1000\n\nexport default new Service<IOClients, RecorderState, ServiceContext<Clients>>({\n clients: {\n implementation: Clients,\n options: {\n default: {\n timeout: MEDIUM_TIMEOUT_MS,\n },\n },\n },\n graphql: {\n resolvers: {\n Session: {\n __resolveType(obj) {\n if (obj.type) {\n return 'SessionError'\n }\n\n return 'SessionSuccess'\n },\n },\n Mutation: {\n updateSession,\n },\n Query: {\n session,\n },\n },\n },\n})\n\n```",
"role": "assistant"
}
] |
code_order-configuration_45469825
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in order-configuration/messages/en.json.",
"role": "user"
},
{
"content": "This is the code:\n\n```json\n{\n \"store/form.error.required\": \"This field is required\",\n \"store/form.error.maxLength\": \"This field has a max length of: {value}\",\n \"store/form.error.minLength\": \"This field has a min length of: {value}\",\n \"store/form.error.maxValue\": \"The maximum value accepted by this field is {value}\",\n \"store/form.error.minValue\": \"The minimum value accepted by this field is {value}\",\n \"store/form.error.notFloat\": \"Must be a number\",\n \"store/form.error.notInteger\": \"Must be an integer\",\n \"store/form.error.pattern\": \"This text does not match the expected pattern\",\n \"store/form.error.notInEnum\": \"Must one of the following values: {values}\",\n \"store/form.error.multipleOf\": \"Must be a multiple of {value}\",\n \"store/form.error.undefinedError\": \"Invalid value.\",\n \"store/form.submit.buttonLabel\": \"Save\",\n \"store/form.submit.error.userInputError\": \"Found some errors in the data provided, please review the indicated fields try again!\",\n \"store/form.submit.error.serverError\": \"Internal Server Error! Please, try again later!\",\n \"store/form.schema.loading\": \"Loading form...\",\n \"store/form.schema.error\": \"Error loading form, try again later!\",\n \"store/form.submit.success\": \"Prices updated based on new order configuration\",\n \"admin/editor.custom-price-selector.title\": \"Order Configuration\",\n \"admin/editor.custom-price-selector.description\": \"Order configuration for B2B users\",\n \"admin/editor.custom-price-selector.formTitle.title\": \"Form Title\",\n \"admin/editor.custom-price-selector.formFields.title\": \"Form Fields\",\n \"admin/editor.custom-price-selector.formFields.name\": \"Field Name\",\n \"admin/editor.custom-price-selector.formFields.type\": \"Field Type\",\n \"admin/editor.custom-price-selector.formFields.fieldType\": \"Field Input Type\",\n \"admin/editor.custom-price-selector.formFields.label\": \"Field Label\",\n \"admin/editor.custom-price-selector.formFields.required\": \"Required\",\n \"admin/editor.custom-price-selector.formFields.showInTitle\": \"Show in Title\",\n \"admin/editor.custom-price-selector.formFields.format\": \"Input Format\",\n \"admin/editor.custom-price-selector.formFields.options\": \"Input Options\",\n \"admin/editor.custom-price-selector.formFields.options.description\": \"Options in case of select, radio or checkbox\",\n \"admin/editor.custom-price-selector.formFields.options.label\": \"Option Label\",\n \"admin/editor.custom-price-selector.formFields.options.value\": \"Option Value\"\n}\n\n```",
"role": "assistant"
}
] |
doc_91bea1a2
|
[
{
"content": "You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.",
"role": "system"
},
{
"content": "Provide a guide on guides vtex io documentation business guidelines marketing assets in VTEX.",
"role": "user"
},
{
"content": "Documentation\n\n[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)\n\n[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides)\n\n[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/api-reference)\n\n[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/app-development)\n\n[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/storefront-development)\n\n[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/vtex-io-apps)\n\n[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/troubleshooting)\n\n[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/ab-tests)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-app-store)\n\n[Becoming a registered VTEX App Store developer](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-becoming-a-registered-vtex-app-store-developer)\n\n[Developing an app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-developing-an-app)\n\n[Setting your app's billing model](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-setting-your-apps-billing-model)\n\n[Preparing your app for distribution](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-preparing-your-app-distribution)\n\n[Submitting your app to the VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-submitting-your-app-in-the-vtex-app-store)\n\n[Using the Docs builder to publish app documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/using-the-docs-builder-to-publish-app-documentation)\n\n[App Store Guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-homologation-requirements-for-vtex-app-store)\n\n[App monetization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-app-monetization)\n\n[Marketing guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets)\n\n[User Experience guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-design-guidelines)\n\n[Engineering guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-engineering-guidelines)\n\n[Documentation guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-docs-guidelines)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides)\n\n[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/api-reference)\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/app-development)\n\n[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/storefront-development)\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/vtex-io-apps)\n\n[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/troubleshooting)\n\n---\n\n[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/updates/release-notes)\n\nApp Development\n\n[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-what-is-vtex-io)\n\n---\n\n[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-what-is-a-vtex-app)\n\n---\n\n[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/governance-and-shared-security-in-vtex-io-apps)\n\n---\n\n[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/code-samples)\n\n---\n\n[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-getting-started)\n\n---\n\nProject structure\n\n---\n\n[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)\n\n---\n\n[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-workspace)\n\n---\n\nManaging apps\n\n---\n\nDevelopment guides\n\n---\n\n[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/app-development-guides)\n\n---\n\n[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/graphql-in-vtex-io)\n\n---\n\n[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-policies)\n\n---\n\n[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/ab-tests)\n\n---\n\n[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)\n\n---\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-app-store)\n\n[Becoming a registered VTEX App Store developer](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-becoming-a-registered-vtex-app-store-developer)\n\n[Developing an app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-developing-an-app)\n\n[Setting your app's billing model](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-setting-your-apps-billing-model)\n\n[Preparing your app for distribution](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-preparing-your-app-distribution)\n\n[Submitting your app to the VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-submitting-your-app-in-the-vtex-app-store)\n\n[Using the Docs builder to publish app documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/using-the-docs-builder-to-publish-app-documentation)\n\n[App Store Guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-homologation-requirements-for-vtex-app-store)\n\n[App monetization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-app-monetization)\n\n[Marketing guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets)\n\n[User Experience guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-design-guidelines)\n\n[Engineering guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-engineering-guidelines)\n\n[Documentation guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-docs-guidelines)\n\n---\n\n[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/managing-edition-apps)\n\n---\n\n[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-frequently-asked-questions)\n\n---\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/app-development)\n\n[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-app-store)\n\n[App Store Guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-homologation-requirements-for-vtex-app-store)\n\n[Marketing guidelines](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets)\n\nMarketing guidelines\n\nLearn how to prepare the App Page used to promote your app at the VTEX App Store\n\n> The App Store is now accessible within the Admin in the Extensions Hub. If the Extensions Hub is not yet installed in your store, you can request assistance from our team by [opening a ticket](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/opening-tickets-to-vtex-support--16yOEqpO32UQYygSmMSSAM). For more information, please refer to the [Extensions Hub](https://read.calvincode.net/reader?url=https://help.vtex.com/es/tracks/extensions-hub--AW7klkYMh557y5IUOgzco/2LDRvGujYsumxi7IlE7CEJ) track and [release note](https://read.calvincode.net/reader?url=https://developers.vtex.com/updates/release-notes/extensions-hub-our-new-place-to-promote-apps-and-partners-inside-vtex-admin).\n\nOnce you have [developed your app](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-developing-an-app), you have to prepare the App Page used to promote your app at the [VTEX App Store](https://read.calvincode.net/reader?url=https://apps.vtex.com/). The App Page is the first point of contact for merchants to learn more about your app and decide whether it suits their business.\n\n\n\nMake sure to present your solutions professionally by adhering to the following principles:\n\n* Clearly describe your app's value proposition, key benefits, and how merchants can benefit from it.\n* Choose a product name that indicates the purpose of the app.\n* Use high-quality images (icons and screenshots) and videos (if applicable).\n\nIf we identify areas for improvement, we will contact you before listing your app on the VTEX App Store.\n\nRefer to the following sections to improve your App Page and increase its adoption on the VTEX App Store.\n\n> We recommend following these best practices while setting up the files that compose an app's marketing assets. Please refer to [this guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-preparing-your-app-distribution%23step-2---setting-the-public-folder) for more information.\n\n## Tone & Voice\n\nChoose to favor Serious and Authority tones. We understand they capture the reliability and expertise our system's voice should have.\n\n| Tone and Voice | Description |\n| -------------- | ---------------------------------------------------------------------------------------- |\n| Serious | Speak firmly, respectfully, and honestly - always with a more serious tone than playful. |\n| Authority | Speak with mastery, proficiency, and expertise. |\n\nTo see more about VTEX's tone and voice, go to [UX Writing Guidelines](https://read.calvincode.net/reader?url=https://uxwriting.vtex.com/docs/principles/goals-principles/%23tone-and-voice) and [VTEX Brand Guide](https://read.calvincode.net/reader?url=https://brand.vtex.com/voice-and-tone/) pages.\n\n## Images\n\nImages are a tool to express the visual identity of your app, make users learn more about the app, and reinforce your brand in the VTEX environment. The principles of a pack of images for the app are the following:\n\n* Use high-quality images of your app's UI to show the users how it behaves.\n* Add one icon that represents your app. This icon will appear in search results, the first page of the VTEX App Store, and the App's page.\n* Upload up to ten and at least three screenshots (app's images).\n* For storefront apps, combine Admin and storefront images to illustrate your app's experience for both Merchants and Shoppers.\n* Add different mobile and desktop screenshots to improve the user experience depending on the screen.\n\n### Icon\n\nYour app icon is one of the first elements developers and merchants see when they install your app. It expresses the visual identity and reinforces your brand in the VTEX App Store environment.\n\n\n\n#### Attributes\n\nIcon artwork can populate the entire asset space, or you can design and position artwork elements, such as logos, onto the keyline grid. When placing your artwork, use keylines as a guideline, not a hard rule.\n\nWhen creating your artwork, ensure it conforms to the following:\n\n* Final size: 1024px x 1024px.\n* File type: 32-bit PNG.\n* Color space: sRGB.\n* Format: Square image, without rounded corners.\n* The background of your icon must be a solid color.\n* The icon design must be simple and avoid unnecessary visual details. This will help merchants understand your app's purpose and ensure a better fit on smaller screens.\n* The icon must not exceed 768px of the total space available in the icon size, which is equivalent to a 128px margin on each side.\n\n\n\nAfter the asset is uploaded, our platform dynamically applies the rounded mask to ensure consistency across all app icons.\n\n\n\nOn the left-hand side is your new icon asset. The following two images on the right-hand side show the dynamic processing of the icon.\n\n#### Sizing\n\nWhen dealing with minimalistic artwork, use the full asset space as the background. Use the keylines as guides for positioning artwork elements (e.g., logos).\n\n\n\nDo not force your logo or artwork to fit the full asset space. Instead, utilize the keyline grid.\n\n\n\nBelow we have examples of icon elements that mislead users and violate our guidelines.\n\n\n\n#### Brand adaptation\n\nIf shapes are critical to a logo, do not force the artwork to fully bleed. Instead, place it on the new keyline grid.\n\n\n\nFrom left to right: original icon asset, new icon asset (recommended adaptation), new icon rendered on the App Store.\n\nIf possible, pick a background color for your asset that is appropriate for your brand and does not include any transparency. Transparent assets will display the background color of the App Store UI.\n\n### Screenshots\n\nUse screenshots to visually represent your app's key features and purpose.\n\n\n\n#### Do's and Don'ts\n\n* Provide three to five images showing the app on a Desktop and Mobile screen.\n* Choose images of the app's interface and behavior, as well as the app's available configurations on the Admin panel.\n* Use the PNG format.\n* The image's size must be up to 700 x 400 pixels.\n* Ensure the text in your images is localized according to the app's applicable market.\n* Screenshots must highlight the purpose, actions, and benefits of the app.\n* Do not use images that reveal actual usernames and accounts. Opt to take images with fictional or blurred information.\n* Do not fully maximize the window when taking a screenshot. It can damage the quality of the image.\n\n## Licenses\n\nLicenses are written documents that contain your app's Terms and Conditions (T&C). They establish the direct business relationship between you, the developer, and the retailer that installs the app.\n\n### Do's and Don'ts\n\n* Seek legal advice for the writing of your T&C.\n* Prepare a Personal Data Governance Program, which includes clauses in its T&C on the subject, depending on the applicable legislation, and tools that allow data subjects to exercise their rights.\n* Consider wording limiting liability clauses.\n* Remember to cover Intellectual Property issues.\n* Offer the T&C in your User's language (Expected in English, Portuguese, and Spanish).\n* Analyze the consumer laws of the countries where you operate, and offer consumers the rights provided.\n* Review specific legislation related to your business, such as those issued by central banks if you are in financial services.\n* Make it clear how to hire your service: free, freemium, or premium, for example. Also, review the regulations regarding the payment methods you will accept.\n\n> The recommendations presented here are intended to serve as guidelines for third-party developers and do not represent a legal recommendation. VTEX is not responsible for direct, indirect, moral, punitive damages, consequential damages, or loss of profits arising from the use and/or compliance with these guidelines. Hiring legal advice is necessary and recommended for the final writing of terms and conditions for applications.\n\n## Messaging\n\nThe textual content of your App Page must clearly and concisely highlight your app's value proposition and features so merchants can easily understand what they can do and achieve with your app.\n\nRemember, your App Page is your main marketing tool and touchpoint with merchants.\n\n### Name - Required\n\nThe name of an app is decisive for how merchants will find your app on the VTEX App Store.\n\n\n\n#### Do's and Don'ts\n\n* The app name must be a maximum of 26 characters.\n* Keep it concise and descriptive. Ensure that it alludes to the experiences the app provides.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------- | -------------------------------------------------------------------------------------- |\n| Live Shopping | Live Shopping - The app that allows you to live stream events on your store's website. |\n\n* Capitalize the first letter of each word.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------- | ------------- |\n| Live Shopping | Live shopping |\n\n* Use _&_ instead of _And_.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ----------------- | ------------------- |\n| Reviews & Ratings | Reviews and Ratings |\n\n* Do not include the word _VTEX_.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| -------------- | ------------------- |\n| Abandoned Cart | VTEX Abandoned Cart |\n\n* Do not use punctuation, such as period, comma, exclamation point, question mark, semicolon, colon, or underscore unless it's part of the actual company name.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| -------------- | --------------- |\n| Social Selling | Social Selling! |\n\n* Do not include the app version number.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------------ | ---------------------- |\n| Google Tag Manager | Google Tag Manager 2.x |\n\n### Headline\n\nThe headline should describe the value proposition of your app in a concise sentence. It is shown on the App Page and square cards of apps.\n\n\n\n\n\n### Do's and Don'ts\n\n* The headline must have at most 120 characters.\n* Capture your app's key value proposition concisely.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |\n| Engage with customers through live broadcasts, real-time chat, and product promotion.Create live broadcasts on your store, increase sales, and boost customer interaction in real-time. | Live broadcasts with customers.Create Live streaming and sell more. |\n\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------ |\n| _Set_ shipping address based on user browser's or IP Geolocation. | This app _attempts to determine_ the users' location and set their shipping address. |\n\nConsider using verbs that reference the actions users will be able to take with your app and the benefits it will deliver.\n\n* `Integrate data` | `create wishlists` | `monitor performance`.\n* `Increase revenue` | `deliver convenient experiences`.\n* Avoid repeating the application name.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |\n| Integrate your store with Google's navigation and conversion tracking platform. | _Google Tag Manager_ is the app to integrate your store with Google's navigation and conversion tracking platform. |\n\n### Overview\n\nThe overview is the description of the app and should be an engaging message that focuses on how your app can benefit merchants in a clear and precise way.\n\n\n\n#### Do's and Don'ts\n\n* Write a short overview limited to a maximum of 200 characters.\n* The app description must give a glimpse of your app's benefits and functionalities, not a step-by-step explanation of how it works.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Integrate with WordPress to bring blog data to your VTEX IO store and create a blog \"homepage\", category pages, and blog post pages. | The Wordpress Integration app provides a way to bring in blog data from the Wordpress API and create a blog homepage, category pages, and blog post pages on your store, using your existing store header, footer, and styling. |\n\n* Make sure you are addressing for whom your app is, what need it solves, and how uniquely you solve it.\n\n> Numerous value proposition frameworks can be used as a reference in this task, such as the following: _Our \\[product\\] help(s) \\[audience\\] who wants to \\[jobs to be done\\] by \\[verb e.g. reducing, avoiding\\] + \\[a user pain or gain\\]_.\n\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| With The Live Shopping app, create live stream events on your store's website, promote product collections, increase sales, and enhance user experience simultaneously while interacting via live chat. | Live shopping is an app to stream live events on your store in real-time. |\n\n* Use the active voice to give the user a sense of action.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |\n| Offer an exclusive payment method to selected clients. With Customer Credit, you grant credit, determine limits, and manage invoices. | With Customer Credit, the credit will be granted, limits determined, and invoices will be managed. |\n\n* Avoid technical and jargon language.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| Interact with customers in real-time by generating personalized experiences through real-time chat and the interactive like button. | Interact with customers by managing the event's live chat in the events list by clicking on the desired live event's arrow button. |\n\n### Features\n\nIn `features`, provide a list of your app's main features. It is included at the bottom of the overview.\n\n\n\n#### Do's\n\n* Highlight which tasks can be performed within the app.\n* Write concise and brief descriptions (no more than 15 - 20 words).\n* Use bullet points to make the content easy to scan.\n* Describe what makes your app unique.\n**Show example**\n\n| ✅ Do | ❌ Don't |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Stream & Sell with the VTEX Live Shopping app. No need to hire a separate streaming platform.Highlight products in the live stream to increase sales.Add to cart alert: Show which products are trending and encourage the audience to add these products to their shopping cart. | Stream and sell with the VTEX Live Shopping app without hiring a separate streaming platform. Also, highlight products during the live stream to increase sales. |\n\n### Website URL\n\nThe Website URL is a hyperlink to your website that redirects users to your corporate or app page. Website hyperlinks will be displayed in the sidebar of the App Page. This is an interesting component for presenting your solution in more depth to retailers browsing the VTEX App Store.\n\n#### Do\n\n* Enter a valid URL in this field to direct them to a landing page, \"About Us\" page, or your corporate website.\n\n### Video\n\nUse videos to demonstrate how your app behaves in different scenarios. Videos are exciting resources that complement [images](#images) as an educational tool that shows your app's main benefits and features.\n\n\n\n\n\n#### Do's\n\n* Feature videos of a maximum of 2 minutes.\n* Make a video showing the main features and benefits of your app.\n* Localize your video audio and or transcription according to your audience.\n* Make visually compelling videos to attract attention from potential buyers of your app.\n\nFor example, check out the [video for the Live Shopping app](https://read.calvincode.net/reader?url=https://apps.vtex.com/liveshopping/p).\n\n### Metric description\n\n> Metric descriptions are required only for apps whose pricing is based on one or more metrics. If this is not the case, please do not fill out this field.\n\nFor each metric declared in the `billingOptions` field (found in the app's `manifest.json` file), you must include a simple description of how it works. This description will help the extension buyer understand what each metric does and how it will impact the application billing. For more information about variable rate charging using metrics, check the [Setting your app's billing model](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-setting-your-apps-billing-model%23setting-the-app-as-public) article.\n\nContributors\n\n1\n\n[](https://github.com/carolinamenezes)\n\nWas this helpful?\n\nYes\n\nNo\n\n[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Perks/vtex-io-documentation-homologation-requirements-for-vtex-app-store/vtex-io-documentation-business-guidelines-marketing-assets.md)\n\n[App monetization« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets//docs/guides/vtex-io-documentation-business-guidelines-app-monetization)[User Experience guidelinesNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets//docs/guides/vtex-io-documentation-design-guidelines)\n\nSee also\n\n[User Experience guidelinesApp Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-design-guidelines)[Submitting your app to the VTEX App StoreApp Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-submitting-your-app-in-the-vtex-app-store)[App Store GuidelinesApp Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-homologation-requirements-for-vtex-app-store)[Preparing your app for distributionApp Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-preparing-your-app-distribution)\n\nContributors\n\n1\n\n[](https://github.com/carolinamenezes)\n\nON THIS PAGE\n\n[Tone & Voice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23tone--voice)\n\n[Images](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23images)\n\n[Icon](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23icon)[Screenshots](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23screenshots)\n\n[Licenses](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23licenses)\n\n[Do's and Don'ts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23dos-and-donts)\n\n[Messaging](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23messaging)\n\n[Name - Required](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23name-required)[Headline](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23headline)[Do's and Don'ts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23dos-and-donts)[Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23overview)[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23features)[Website URL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23website-url)[Video](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23video)[Metric description](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23metric-description)\n\nWas this helpful?\n\n Send feedback\n\n[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Perks/vtex-io-documentation-homologation-requirements-for-vtex-app-store/vtex-io-documentation-business-guidelines-marketing-assets.md)\n\nCopy page\n\nOn this page\n\nON THIS PAGE\n\n[Tone & Voice](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23tone--voice)\n\n[Images](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23images)\n\n[Icon](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23icon)[Screenshots](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23screenshots)\n\n[Licenses](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23licenses)\n\n[Do's and Don'ts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23dos-and-donts)\n\n[Messaging](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23messaging)\n\n[Name - Required](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23name-required)[Headline](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23headline)[Do's and Don'ts](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23dos-and-donts)[Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23overview)[Features](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23features)[Website URL](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23website-url)[Video](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23video)[Metric description](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets/docs/guides/vtex-io-documentation-business-guidelines-marketing-assets%23metric-description)\n\nOn this page\n\n[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)",
"role": "assistant"
}
] |
code_mycheckout-checkout-service_a56aa53f
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the test patterns used in mycheckout-checkout-service.",
"role": "user"
},
{
"content": "The implementation is:\n\n```typescript\nimport { Test, TestingModule } from '@nestjs/testing';\nimport { getModelToken } from 'nestjs-dynamoose';\nimport { ChannelsService } from '../channels/channels.service';\nimport { AwsService } from '../common/aws/aws.service';\nimport { OmsService } from '../oms/oms.service';\nimport { PaymentProvidersService } from '../payment-providers/payment-providers.service';\nimport { OrdersService } from './orders.service';\nimport { Order } from './schemas/order.schema';\n\nconst AwsServiceProvider = {\n provide: AwsService,\n useFactory: () => ({}),\n};\n\nconst OrderModel = {\n provide: getModelToken(Order.name),\n useFactory: () => ({}),\n};\n\nconst ChannelsServiceProvider = {\n provide: ChannelsService,\n useFactory: () => ({}),\n};\nconst OmsServiceProvider = {\n provide: OmsService,\n useFactory: () => ({}),\n};\n\nconst PaymentProviderServiceProvider = {\n provide: PaymentProvidersService,\n useFactory: () => ({}),\n};\n\ndescribe('OrdersService', () => {\n let service: OrdersService;\n\n beforeEach(async () => {\n const module: TestingModule = await Test.createTestingModule({\n providers: [\n OrdersService,\n AwsServiceProvider,\n OrderModel,\n ChannelsServiceProvider,\n OmsServiceProvider,\n PaymentProviderServiceProvider,\n ],\n }).compile();\n\n service = module.get<OrdersService>(OrdersService);\n });\n\n it('should be defined', () => {\n expect(service).toBeDefined();\n });\n});\n\n```",
"role": "assistant"
}
] |
code_ffm-segment-prices-node-template_82200388
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What npm dependencies does ffm-segment-prices-node-template use?",
"role": "user"
},
{
"content": "The implementation is:\n\n```json\n{\n \"dependencies\": {\n \"co-body\": \"^6.0.0\",\n \"ramda\": \"^0.25.0\"\n },\n \"devDependencies\": {\n \"@types/co-body\": \"^0.0.3\",\n \"@types/jest\": \"^24.0.18\",\n \"@types/node\": \"^12.0.0\",\n \"@types/node-fetch\": \"^2.5.8\",\n \"@types/ramda\": \"types/npm-ramda#dist\",\n \"@vtex/api\": \"6.45.12\",\n \"@vtex/test-tools\": \"^1.0.0\",\n \"@vtex/tsconfig\": \"^0.6.0\",\n \"typescript\": \"3.9.7\"\n },\n \"scripts\": {\n \"lint\": \"tsc --noEmit --pretty\"\n },\n \"version\": \"0.3.1\"\n}\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_5ed15ef1
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of store-on-localhost/src/monobloco/components/new/Footer/typings/vtex.render-runtime.d.ts from store-on-localhost.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\n/* Typings for `render-runtime` */\ndeclare module 'vtex.render-runtime' {\n import { Component, ComponentType, ReactElement, ReactType } from 'react'\n\n export interface NavigationOptions {\n page: string\n params?: any\n }\n\n export interface RenderContextProps {\n runtime: {\n navigate: (options: NavigationOptions) => void\n }\n }\n\n interface ExtensionPointProps {\n id: string\n key: Record<string, any>\n }\n\n interface Pages {\n [name: string]: Page\n }\n\n interface Route {\n domain: string\n blockId: string\n canonicalPath?: string\n id: string\n params: Record<string, string>\n path: string\n title?: string\n }\n\n interface Culture {\n availableLocales: string[]\n locale: string\n language: string\n country: string\n currency: string\n }\n\n export interface RenderRuntime {\n account: string\n accountId: string\n appsEtag: string\n workspace: string\n disableSSR: boolean\n hints: {\n desktop: boolean\n mobile: boolean\n phone: boolean\n tablet: boolean\n }\n page: string\n route: Route\n version: string\n culture: Culture\n pages: Pages\n preview: boolean\n production: boolean\n publicEndpoint: string\n renderMajor: number\n query?: Record<string, string>\n start: boolean\n runtimeMeta: {\n version: string\n config?: any\n }\n settings: {\n app: Record<string, any>\n }\n segmentToken: string\n rootPath?: string\n workspaceCookie: string\n hasNewExtensions: boolean\n platform: string\n }\n\n export const ExtensionPoint: ComponentType<ExtensionPointProps>\n\n interface ChildBlockProps {\n id: string\n }\n\n export const ChildBlock: ComponentType<ChildBlockProps>\n export const useChildBlock = function({ id: string }): object {}\n\n export const Helmet: ReactElement\n export const Link: ReactType\n export const NoSSR: ReactElement\n export const RenderContextConsumer: ReactElement\n export const canUseDOM: boolean\n export const useRuntime: () => RenderRuntime\n export const withRuntimeContext: <TOriginalProps extends {}>(\n Component: ComponentType<TOriginalProps & RenderContextProps>\n ) => ComponentType<TOriginalProps>\n}\n\n```",
"role": "assistant"
}
] |
code_affirm-payment_45b9ea3e
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement a Node.js service in VTEX IO like affirm-payment?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\nimport { AuthType, ClientsConfig, IOClients, LRUCache } from '@vtex/api'\n\nimport AffirmDataSource from './payments'\nimport AffirmProxyDataSource from './paymentsProxy'\n\nconst TIMEOUT_MS = 8000\n\nconst defaultClientOptions = {\n retries: 2,\n timeout: TIMEOUT_MS,\n}\n\nconst memoryCache = new LRUCache<string, any>({ max: 5000 })\nmetrics.trackCache('affirm-payment', memoryCache)\n\nexport class Clients extends IOClients {\n public get payments(): AffirmDataSource {\n return this.getOrSet('payments', AffirmDataSource)\n }\n\n public get paymentsProxy(): AffirmProxyDataSource {\n return this.getOrSet('paymentsProxy', AffirmProxyDataSource)\n }\n}\n\nexport const clients: ClientsConfig<Clients> = {\n implementation: Clients,\n options: {\n default: defaultClientOptions,\n payments: {\n authType: AuthType.bearer,\n memoryCache,\n },\n paymentsProxy: {\n authType: AuthType.bearer,\n memoryCache,\n },\n },\n}\n\n```",
"role": "assistant"
}
] |
code_tax-protocol-example_dd329916
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from tax-protocol-example.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\nexport const parseVtexToProvider = (checkoutRequest: CheckoutRequest) => {\n // Parse here the checkout request to the expected format\n return checkoutRequest\n}\n\n```",
"role": "assistant"
}
] |
code_return-app_50162418
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the resolver implementation for return-app.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\nimport type { CategoryInfo } from 'vtex.return-app'\n\nconst transformCategoryTree = (\n categoryTree: CategoryTree[],\n parentName = ''\n): CategoryInfo[] => {\n const categoryInfoFlatten = []\n\n for (const category of categoryTree) {\n if (!category.hasChildren) {\n categoryInfoFlatten.push({\n id: category.id,\n name: parentName ? `${parentName} > ${category.name}` : category.name,\n })\n } else {\n const categoryTreeName = parentName\n ? `${parentName} > ${category.name}`\n : category.name\n\n const group = transformCategoryTree(category.children, categoryTreeName)\n\n categoryInfoFlatten.push(...group, {\n id: category.id,\n name: categoryTreeName,\n })\n }\n }\n\n return categoryInfoFlatten\n}\n\nexport const categoryTreeName = async (\n _: unknown,\n _args: unknown,\n ctx: Context\n): Promise<CategoryInfo[]> => {\n const {\n clients: { catalog },\n } = ctx\n\n const categoryTree = await catalog.getCategoryTree()\n\n return transformCategoryTree(categoryTree)\n}\n\n```",
"role": "assistant"
}
] |
code_b2b-orders-history_08fb2005
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of b2b-orders-history/react/components/Order/Order.js from b2b-orders-history.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { OrderUtils } from '../../utils'\nimport ViewAllOrderProductsButton from '../commons/ViewAllOrderProductsButton'\nimport OrderProduct from './OrderProduct'\nimport OrderActions from './OrderActions'\n\nconst CSS_HANDLES = ['orderBody']\n\nconst Order = ({ order, alwaysActive, allowSAC }) => {\n const cssHandles = useCssHandles(CSS_HANDLES)\n const {\n orderId,\n status,\n items = [],\n marketplaceItems = [],\n childOrders,\n storePreferencesData: { currencyCode },\n } = order\n\n if (\n !alwaysActive &&\n (!OrderUtils.isOrderActive(status) ||\n (childOrders && childOrders.length > 0))\n ) {\n return null\n }\n\n const MAX_PRODUCTS_SHOWN = 5\n\n const products =\n marketplaceItems.length === 0\n ? items.slice(0, MAX_PRODUCTS_SHOWN)\n : marketplaceItems.slice(0, MAX_PRODUCTS_SHOWN)\n\n return (\n <div className={`${cssHandles.orderBody} cf pa5 pa6-l bg-base bt-0`}>\n <div className=\"fl w-100 w-70-ns\">\n {products.map((item, index) => (\n <OrderProduct sku={item} currency={currencyCode} key={index} />\n ))}\n {items && items.length > MAX_PRODUCTS_SHOWN && (\n <ViewAllOrderProductsButton orderId={orderId} />\n )}\n </div>\n <OrderActions order={order} allowSAC={allowSAC} />\n </div>\n )\n}\n\nOrder.propTypes = {\n order: PropTypes.object.isRequired,\n alwaysActive: PropTypes.bool,\n allowSAC: PropTypes.bool,\n}\n\nexport default Order\n\n```",
"role": "assistant"
}
] |
code_minicart_13815110
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of minicart/messages/ro.json from minicart.",
"role": "user"
},
{
"content": "Here's the source code:\n\n```json\n{\n \"admin/editor.minicart.title\": \"Mini Cart\",\n \"admin/editor.minicart.description\": \"Un mini cart simplu care afișează toate produsele adăugate în el\",\n \"admin/editor.minicart.showDiscount.title\": \"Arată cantitatea banilor economisiți\",\n \"admin/editor.minicart.iconLabel.title\": \"Text care să apară lângă iconiță\",\n \"admin/editor.minicart.labelMiniCartEmpty.title\": \"Text care să apară când mini cart-ul este gol\",\n \"admin/editor.minicart.linkButtonFinishShopping.title\": \"Link pentru redirecționare după apăsarea butonului Go to Checkout\",\n \"admin/editor.minicart.labelButtonFinishShopping.title\": \"Text care să apară în butonul Finish Shopping\",\n \"admin/editor.minicart.showShippingCost.title\": \"Arată costul de expediere deasupra textului de subsol\",\n \"admin/editor.minicart.type.title\": \"Tip Mini Cart\",\n \"admin/editor.minicart.type.popup\": \"Pop Up\",\n \"admin/editor.minicart.type.sidebar\": \"Bară laterală\",\n \"store/finish-shopping-button-label\": \"Finalizează comanda\",\n \"store/minicart-empty\": \"Coșul tău de cumpărături este gol!\",\n \"store/sidebar-title\": \"Mini cart-ul meu\",\n \"store/minicart-content-footer-discount\": \"Salvează\",\n \"store/minicart.error-removal\": \"E eșuat ștergerea articolului, te rugăm încearcă din nou\",\n \"store/minicart.shipping-cost\": \"Total costuri livrare\",\n \"store/minicart.checkout-failure\": \"A apărut o eroare. Te rugăm să încerci din nou.\",\n \"store/minicart.go-to-checkout\": \"Finalizează comanda\",\n \"store/minicart.empty-state\": \"Coșul tău de cumpărături este gol.\",\n \"store/minicart.title\": \"Coș de cumpărături\"\n}\n\n```",
"role": "assistant"
}
] |
troubleshoot_flex-layout_mobile_layout_broken_a36cfd7c
|
[
{
"content": "You are a VTEX debugging expert. You help developers troubleshoot issues with VTEX IO apps, Store Framework components, and GraphQL services. You provide clear, actionable solutions with code fixes.",
"role": "system"
},
{
"content": "The flex-layout looks fine on desktop but is broken on mobile. How do I make it responsive?",
"role": "user"
},
{
"content": "## Common Causes\n\n1. **Missing mobile-specific block declarations**: The `flex-layout.row` and `flex-layout.col` blocks don't automatically adapt to mobile screens. You need to explicitly define how blocks should behave on smaller viewports using the `blockClass` property combined with responsive CSS, or use VTEX's built-in responsive props.\n\n2. **Fixed width values instead of relative units**: Using hardcoded pixel widths (`width: 200px`) instead of percentages or flex properties causes content to overflow or break on narrow screens.\n\n3. **Not using `preventHorizontalStretch` and `preventVerticalStretch` props**: These flex-layout properties control how children stretch to fill available space, and incorrect settings can cause layout issues on mobile.\n\n4. **Incorrect `colSizing` configuration**: When using `flex-layout.row`, the `colSizing` prop determines whether columns have equal width (`equal`) or size based on content (`auto`). Wrong settings lead to cramped or overflowing content on mobile.\n\n5. **Missing responsive hiding with `responsive-layout`**: Some desktop elements should be hidden on mobile, but without using `responsive-layout` blocks, all content renders regardless of screen size.\n\n## Debugging Steps\n\n1. **Inspect the current layout structure**: Open your browser's DevTools and use the device toolbar to simulate mobile viewports. Check which specific flex containers are causing overflow.\n\n2. **Review your block declarations**: In your `blocks.jsonc` or store theme files, examine each `flex-layout.row` and `flex-layout.col` for hardcoded dimensions.\n\n3. **Check the flex-layout props**: Look for missing responsive props like `colSizing`, `preserveLayoutOnMobile`, and `preventHorizontalStretch`.\n\n4. **Test with responsive-layout blocks**: Verify if you're using `responsive-layout.desktop` and `responsive-layout.mobile` to serve different content per device.\n\n5. **Examine custom CSS**: Check your CSS files for styles targeting flex-layout classes without proper media queries.\n\n## Solution\n\n**1. Use responsive-layout to serve different structures per device:**\n\n```json\n{\n \"store.home\": {\n \"blocks\": [\"responsive-layout.home\"]\n },\n \"responsive-layout.home\": {\n \"children\": [\n \"responsive-layout.desktop#home\",\n \"responsive-layout.mobile#home\"\n ]\n },\n \"responsive-layout.desktop#home\": {\n \"children\": [\"flex-layout.row#desktop-hero\"]\n },\n \"responsive-layout.mobile#home\": {\n \"children\": [\"flex-layout.col#mobile-hero\"]\n }\n}\n```\n\n**2. Configure flex-layout props for mobile responsiveness:**\n\n```json\n{\n \"flex-layout.row#product-details\": {\n \"children\": [\"flex-layout.col#image\", \"flex-layout.col#info\"],\n \"props\": {\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": false,\n \"preventHorizontalStretch\": true,\n \"colGap\": 4,\n \"rowGap\": 4\n }\n },\n \"flex-layout.col#image\": {\n \"children\": [\"product-images\"],\n \"props\": {\n \"width\": \"60%\",\n \"preventVerticalStretch\": true\n }\n },\n \"flex-layout.col#info\": {\n \"children\": [\"product-name\", \"product-price\", \"add-to-cart-button\"],\n \"props\": {\n \"width\": \"40%\",\n \"verticalAlign\": \"top\"\n }\n }\n}\n```\n\n**3. Add responsive CSS with proper media queries:**\n\n```css\n/* styles/css/vtex.flex-layout.css */\n\n.flexRow--product-details {\n flex-direction: row;\n}\n\n@media screen and (max-width: 768px) {\n .flexRow--product-details {\n flex-direction: column;\n }\n \n .flexCol--image,\n .flexCol--info {\n width: 100% !important;\n }\n}\n```\n\n**4. Apply blockClass for targeted styling:**\n\n```json\n{\n \"flex-layout.row#product-details\": {\n \"props\": {\n \"blockClass\": \"product-details\"\n },\n \"children\": [\"flex-layout.col#image\", \"flex-layout.col#info\"]\n }\n}\n```\n\n## Prevention Tips\n\n- **Design mobile-first**: Start with single-column layouts and expand for desktop rather than the reverse.\n- **Always set `preserveLayoutOnMobile: false`**: This allows rows to stack vertically on mobile by default.\n- **Use relative units**: Prefer percentages and flex values over fixed pixel widths.\n- **Leverage `responsive-layout` early**: Plan for device-specific variations from the start of development.\n- **Test across breakpoints regularly**: Use VTEX's Site Editor preview or browser DevTools to check layouts at 320px, 768px, and 1024px widths during development.\n- **Document your breakpoint strategy**: Maintain consistent media query breakpoints across all custom CSS files.",
"role": "assistant"
}
] |
code_return-app_7854a9bf
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What props does Product Action Status accept and how do I configure them?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { IconSuccess, IconFailure, IconWarning } from 'vtex.styleguide'\nimport { FormattedMessage } from 'react-intl'\n\ntype ActionStatus = 'deny' | 'approve' | 'partially-approve'\n\nconst getActionStatus = ({\n quantity,\n selectedQuantity,\n}: {\n quantity: number\n selectedQuantity: number\n}): ActionStatus =>\n selectedQuantity === 0\n ? 'deny'\n : selectedQuantity === quantity\n ? 'approve'\n : 'partially-approve'\n\nexport const ProductActionStatus = ({\n quantity,\n selectedQuantity,\n}: {\n quantity: number\n selectedQuantity: number\n}) => {\n const actionStatus = getActionStatus({ quantity, selectedQuantity })\n\n return (\n <>\n {actionStatus !== 'approve' ? null : (\n <div className=\"c-success flex items-center\">\n <span className=\"mr2 flex\">\n <IconSuccess size={14} />\n </span>\n <FormattedMessage id=\"admin/return-app.return-request-details.verify-items.action.approve\" />\n </div>\n )}\n {actionStatus !== 'deny' ? null : (\n <div className=\"c-danger flex items-center\">\n <span className=\"mr2 flex\">\n <IconFailure size={14} />\n </span>\n <FormattedMessage id=\"admin/return-app.return-request-details.verify-items.action.deny\" />\n </div>\n )}\n {actionStatus !== 'partially-approve' ? null : (\n <div className=\"c-warning flex items-center\">\n <span className=\"mr2 flex\">\n <IconWarning size={14} />\n </span>\n <FormattedMessage id=\"admin/return-app.return-request-details.verify-items.action.partially-approve\" />\n </div>\n )}\n </>\n )\n}\n\n```",
"role": "assistant"
}
] |
code_render-runtime_7570d225
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Extension component in my VTEX store?",
"role": "user"
},
{
"content": "Here's how it works:\n\n```tsx\nimport { ReactElement } from 'react'\n\nimport { useRuntime } from '../components/RenderContext'\nimport { useTreePath } from '../utils/treePath'\nimport { Extension } from '../typings/runtime'\n\nfunction mountTreePath(base: string, children: string[]) {\n return [base, ...children].filter((id) => !!id).join('/')\n}\n\ninterface Options {\n children?: string[] | string\n}\n\nconst useExtension = ({ children }: Options = {}): Extension | null => {\n const { extensions } = useRuntime()\n\n const { treePath: baseTreePath } = useTreePath()\n\n const treePath = children\n ? mountTreePath(\n baseTreePath,\n Array.isArray(children) ? children : [children]\n )\n : baseTreePath\n\n const extension = treePath && extensions[treePath]\n\n return extension || null\n}\n\ninterface ExtensionContext {\n extension?: Extension | null\n}\n\ninterface Props {\n children({ extension }: ExtensionContext): ReactElement<any> | null\n}\n\nconst ExtensionConsumer = ({ children }: Props) => {\n const extension = useExtension()\n\n return children({ extension })\n}\n\nexport { useExtension, ExtensionConsumer }\n\n```",
"role": "assistant"
}
] |
code_search-resolver_21886c2f
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the resolver implementation for search-resolver.",
"role": "user"
},
{
"content": "The implementation is:\n\n```typescript\nimport { Segment } from '@vtex/api'\nimport camelCase from 'camelcase'\nimport { both, pickBy } from 'ramda'\nimport { renameKeysWith } from '../../utils'\n\nconst isTruthy = (val?: string) => !!val\nconst isUtm = (_: any, key: string | number) => String(key).startsWith('utm')\nconst isValidUtm = both(isUtm, isTruthy)\n\ninterface Parent {\n items: SearchMetadataItem[]\n}\n\ninterface SimulationPayload {\n countryCode: string\n marketingData: Record<string, string>\n}\n\nconst getSimulationPayload = async (\n segment: Segment\n): Promise<SimulationPayload> => {\n const segmentData = await segment.getSegment()\n\n let marketingData: Record<string, string> = {}\n try {\n marketingData = renameKeysWith(\n camelCase,\n pickBy(isValidUtm, segmentData)\n ) as Record<string, string>\n } catch (e) {\n // TODO: Log to Splunk\n console.error(e)\n }\n\n return {\n countryCode: segmentData.countryCode,\n marketingData,\n }\n}\n\ntype PriceTableMap = Record<\n string,\n {\n compositionItem: CompositionItem\n simulationPayload: SimulationPayload\n items: SearchMetadataItem[]\n parent: SearchMetadataItem\n assemblyOption: AssemblyOption\n }[]\n>\n\nexport const resolvers = {\n ItemMetadata: {\n priceTable: async (\n { items }: Parent,\n _: any,\n { clients: { segment } }: Context\n ) => {\n const simulationPayload = await getSimulationPayload(segment)\n\n const itemsWithAssembly = items.filter(\n item => item.assemblyOptions.length > 0\n )\n\n const priceTableMap: PriceTableMap = itemsWithAssembly.reduce<PriceTableMap>((acc, item) => {\n for (const assemblyOption of item.assemblyOptions) {\n if (!assemblyOption.composition || !assemblyOption.composition.items) {\n continue\n }\n\n for (const compItem of assemblyOption.composition.items) {\n const currentArray = acc[compItem.priceTable] || []\n currentArray.push({\n compositionItem: compItem,\n simulationPayload,\n items: itemsWithAssembly,\n parent: item,\n assemblyOption,\n })\n acc[compItem.priceTable] = currentArray\n }\n }\n\n return acc\n }, {})\n\n return Object.entries(priceTableMap).map(\n ([priceTableName, priceTableValues]) => ({\n type: priceTableName,\n values: priceTableValues,\n })\n )\n },\n },\n}\n\n```",
"role": "assistant"
}
] |
code_store-components_6b170fc9
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in store-components/react/components/ProductImages/components/Video/Vimeo.js.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nclass Vimeo extends Component {\n constructor(props) {\n super(props)\n\n this.state = { iframe: {} }\n\n const { loop, autoplay, width, height, showTitle, url } = this.props\n const params = `autoplay=${autoplay}&loop=${loop}&title=${showTitle}&width=${width}&height=${height}`\n const getUrl = `https://vimeo.com/api/oembed.json?url=${url}&${params}`\n\n this.iframeRef = React.createRef()\n\n fetch(getUrl)\n .then(response => response.json())\n .then(response => {\n const { height: heightDiv, width: widthDiv, html, title } = response\n\n const thumbUrl = Vimeo.thumbUrlFromResp(response, props.thumbWidth)\n\n props.setThumb && props.setThumb(thumbUrl, title)\n\n const [, src] = html.match(/src= *\" *([^\"]*) *\"/) // Get url from response\n\n this.setState({\n iframe: {\n divStyle: { padding: `${(100 * heightDiv) / widthDiv}% 0 0 0` },\n src,\n },\n })\n })\n }\n\n static getThumbUrl = url => {\n const getUrl = `https://vimeo.com/api/oembed.json?url=${url}`\n\n return fetch(getUrl)\n .then(response => response.json())\n .then(response => response.thumbnail_url)\n }\n\n static thumbUrlFromResp(response, thumbWidth) {\n const { height, width } = response\n const thumb = response.thumbnail_url_with_play_button\n\n thumbWidth = thumbWidth || response.thumbnail_width\n const thumbHeight = Math.ceil((thumbWidth * height) / width)\n\n return thumb.replace(\n /_[0123456789]*x[0123456789]*./,\n `_${thumbWidth}x${thumbHeight}.`\n )\n }\n\n executeCommand = command => () => {\n if (!this.frameReady) return\n\n const vimeoCommand = JSON.stringify({ method: command })\n\n this.iframeRef.contentWindow.postMessage(\n vimeoCommand,\n 'https://player.vimeo.com'\n )\n }\n\n render() {\n const { iframe } = this.state\n const { className, id, cssHandles } = this.props\n\n this.props.playing\n ? this.executeCommand('play')()\n : this.executeCommand('pause')()\n\n return (\n <div\n style={iframe.divStyle}\n className={`relative ${className} ${cssHandles.videoContainer}`}\n >\n <iframe\n ref={this.iframeRef}\n title={id}\n className={`${cssHandles.video} absolute top-0 left-0 w-100 h-100`}\n src={iframe.src}\n frameBorder=\"0\"\n allowFullScreen\n allow=\"autoplay\"\n />\n </div>\n )\n }\n}\n\nVimeo.propTypes = {\n url: PropTypes.string.isRequired,\n id: PropTypes.number.isRequired, // Unique ID for iframe title\n setThumb: PropTypes.func,\n thumbWidth: PropTypes.number,\n className: PropTypes.string,\n loop: PropTypes.bool,\n autoplay: PropTypes.bool,\n showTitle: PropTypes.bool,\n width: PropTypes.number,\n height: PropTypes.number,\n playing: PropTypes.bool,\n cssHandles: PropTypes.shape({\n video: PropTypes.string.isRequired,\n videoContainer: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nVimeo.defaultProps = {\n loop: true,\n autoplay: false,\n width: null,\n height: null,\n showTitle: false,\n className: '',\n}\n\nexport default Vimeo\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_3c8a005c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in store-on-localhost/src/monobloco/components/new/Styleguide/IconColumns.js.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```javascript\nimport Columns from './components/icon/Columns/index'\n\nexport default Columns\n\n```",
"role": "assistant"
}
] |
code_mycheckout-checkout-service_7581f5a0
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in mycheckout-checkout-service/src/app/masters/countries/dtos/country.dto.ts.",
"role": "user"
},
{
"content": "```typescript\nimport { Type } from 'class-transformer';\nimport {\n IsNotEmpty,\n IsObject,\n IsString,\n ValidateNested,\n ValidationArguments,\n} from 'class-validator';\nimport { ApiError } from '../../../../shared/responses';\nimport { StateDto } from './state.dto';\n\nexport class CountryDto {\n @IsNotEmpty({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.not_empty', args),\n })\n @IsString({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.invalid_string', args),\n })\n readonly country: string;\n\n @IsNotEmpty({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.not_empty', args),\n })\n @IsString({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.invalid_string', args),\n })\n readonly iso: string;\n\n @IsNotEmpty({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.not_empty', args),\n })\n @IsString({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.invalid_string', args),\n })\n readonly phone: string;\n\n @IsNotEmpty({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.not_empty', args),\n })\n @IsString({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.invalid_string', args),\n })\n readonly postal_code_regex: string;\n\n @IsNotEmpty({\n message: (args: ValidationArguments) =>\n ApiError.parse('validations.not_empty', args),\n })\n @ValidateNested()\n //@Type(() => StateDto)\n states: StateDto[] | any;\n}\n\n```",
"role": "assistant"
}
] |
code_external-seller-example_c6ff59a3
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from external-seller-example.",
"role": "user"
},
{
"content": "```typescript\nimport { json } from 'co-body'\n\nexport async function sendTrackingInformation(ctx: Context) {\n const {\n clients: { oms },\n vtex: {\n route: {\n params: { marketplaceOrderId },\n },\n },\n } = ctx\n\n const body = await json(ctx.req)\n\n ctx.body = await oms.orderNotification(marketplaceOrderId as string, body)\n ctx.status = 200\n}\n\n```",
"role": "assistant"
}
] |
code_cy-runner_57b10ddd
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of cy-runner/cypress-shared/support/fedex-shipping/common.js from cy-runner.",
"role": "user"
},
{
"content": "```javascript\nimport {\n saveAppSetting,\n validateSaveAppSettingResponse,\n} from './graphql_testcase'\nimport { FEDEX_SHIPPING_APP } from './graphql_apps.js'\nimport { graphql } from '../common/graphql_utils'\n\nexport function updateSLASettings(appSetting, rate = 0, percentage = 0) {\n cy.getAppSettingstoJSON().then((items) => {\n const { slaSettings } = items.config.data.getAppSettings\n\n for (const ship in slaSettings) {\n slaSettings[ship].surchargeFlatRate = rate\n slaSettings[ship].surchargePercent = percentage\n }\n\n graphql(\n FEDEX_SHIPPING_APP,\n saveAppSetting(appSetting, slaSettings),\n validateSaveAppSettingResponse\n )\n })\n}\n\nexport function filterByShippingMethod(response, sla) {\n return response.body.filter(\n (r) =>\n r.shippingMethod === sla.FirstOvernight ||\n r.shippingMethod === sla.StandardOvernight\n )\n}\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_057c57b1
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I use store-on-localhost?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```markdown\n#### A Selectable Card represents a need for the user to make a choice among a few offered options.\n\n### 👍 Dos\n\n- Keep the list of options short. More than 4 options might start looking weird.\n- Always leave an option from the list selected by default.\n\n### 👎 Don'ts\n\n- Don't offer overlapping options, they should be clearly mutually exclusive.\n\n### Related components\n\n- Consider using a <a href=\"#/Components/Forms/RadioGroup\">Radio Group</a> if you prefer your options to be displayed vertically.\n- Consider using a <a href=\"#/Components/Forms/Checkbox\">Checkbox</a> if you need the user to select more than one option.\n- Consider using a <a href=\"#/Components/Forms/Dropdown\">Dropdown</a> if you have several options and they don't need much explanation.\n\nDefault\n\n```js\nclass SelectableCards extends React.Component {\n constructor(props) {\n super(props)\n this.state = { selected: 'card1' }\n }\n\n isSelected(opt) {\n return opt === this.state.selected\n }\n\n changeSelected(opt) {\n this.setState({ selected: opt })\n }\n\n render() {\n return (\n <div className=\"pa5 flex justify-center\">\n <SelectableCard\n hasGroupRigth\n noPadding\n selected={this.isSelected('card1')}\n onClick={() => this.setState({ selected: 'card1' })}>\n <div className=\"pa7\">\n <div className=\"f3 tc\">Card 1</div>\n </div>\n </SelectableCard>\n <SelectableCard\n hasGroupRigth\n hasGroupLeft\n noPadding\n selected={this.isSelected('card2')}\n onClick={() => this.setState({ selected: 'card2' })}>\n <div className=\"pa7\">\n <div className=\"f3 tc\">Card 2</div>\n </div>\n </SelectableCard>\n <SelectableCard\n hasGroupRigth\n hasGroupLeft\n noPadding\n selected={this.isSelected('card3')}\n onClick={() => this.setState({ selected: 'card3' })}>\n <div className=\"pa7\">\n <div className=\"f3 tc\">Card 3</div>\n </div>\n </SelectableCard>\n <SelectableCard\n hasGroupLeft\n noPadding\n selected={this.isSelected('card4')}\n onClick={() => this.setState({ selected: 'card4' })}>\n <div className=\"pa7\">\n <div className=\"f3 tc\">Card 4</div>\n </div>\n </SelectableCard>\n </div>\n )\n }\n}\n\n;<SelectableCards />\n```\n\n```",
"role": "assistant"
}
] |
doc_84a73ad7
|
[
{
"content": "You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.",
"role": "system"
},
{
"content": "Provide a guide on guides login integration guide admin saml2 in VTEX.",
"role": "user"
},
{
"content": "Documentation\n\n[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)\n\n[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides)\n\n[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/api-reference)\n\n[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/app-development)\n\n[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/storefront-development)\n\n[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/vtex-io-apps)\n\n[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/troubleshooting)\n\n[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/updates/release-notes)\n\nGuides\n\n[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/vtex-platform-overview)\n\n---\n\n[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/api-usage)\n\n---\n\n[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/getting-started)\n\n---\n\nIntegration Guides\n\n[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/erp-integration-guide)\n\n[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/customer-credit-integration-guide)\n\n[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/external-marketplace-integration-guide)\n\n[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/external-seller-integration-guide)\n\n[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/gift-card-integration-guide)\n\n[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/headless-commerce)\n\n[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide)\n\n[Admin (SAML 2.0)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2)\n\n[Webstore (OAuth 2.0)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-webstore-oauth2)\n\n[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/punchout)\n\n[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/sent-offers-integration-guide-connectors)\n\n[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/payments-integration-guide)\n\n[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/search-integration-guide)\n\n[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/session-manager)\n\n[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/tax-service-integration-guide)\n\n[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/pricing-hub)\n\n[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/recaptcha)\n\n---\n\n[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/catalog-integration)\n\n---\n\n[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/checkout-api-overview)\n\n---\n\n[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/master-data)\n\n---\n\nPayments\n\n---\n\nOrders\n\n---\n\nLogistics\n\n---\n\nB2B Suite\n\n---\n\nVTEX Sales App\n\n---\n\nUI Customization\n\n---\n\nMessage Center\n\n---\n\nPricing\n\n---\n\nPromotions\n\n---\n\nInfrastructure\n\n---\n\nSearch\n\n---\n\nStorefront Permissions\n\n---\n\n[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/activity-flow)\n\n---\n\n[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/vtex-ads)\n\n---\n\nVTEX Session\n\n---\n\nVTEX Shield\n\n---\n\n[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/data-protection-plus)\n\n---\n\nWeni by VTEX\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides)\n\n[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/api-reference)\n\n[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/app-development)\n\n[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/storefront-development)\n\n[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/vtex-io-apps)\n\n[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/troubleshooting)\n\n---\n\n[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/updates/release-notes)\n\nGuides\n\n[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/vtex-platform-overview)\n\n---\n\n[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/api-usage)\n\n---\n\n[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/getting-started)\n\n---\n\nIntegration Guides\n\n[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/erp-integration-guide)\n\n[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/customer-credit-integration-guide)\n\n[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/external-marketplace-integration-guide)\n\n[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/external-seller-integration-guide)\n\n[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/gift-card-integration-guide)\n\n[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/headless-commerce)\n\n[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide)\n\n[Admin (SAML 2.0)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2)\n\n[Webstore (OAuth 2.0)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-webstore-oauth2)\n\n[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/punchout)\n\n[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/sent-offers-integration-guide-connectors)\n\n[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/payments-integration-guide)\n\n[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/search-integration-guide)\n\n[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/session-manager)\n\n[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/tax-service-integration-guide)\n\n[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/pricing-hub)\n\n[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/recaptcha)\n\n---\n\n[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/catalog-integration)\n\n---\n\n[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/checkout-api-overview)\n\n---\n\n[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/master-data)\n\n---\n\nPayments\n\n---\n\nOrders\n\n---\n\nLogistics\n\n---\n\nB2B Suite\n\n---\n\nVTEX Sales App\n\n---\n\nUI Customization\n\n---\n\nMessage Center\n\n---\n\nPricing\n\n---\n\nPromotions\n\n---\n\nInfrastructure\n\n---\n\nSearch\n\n---\n\nStorefront Permissions\n\n---\n\n[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/activity-flow)\n\n---\n\n[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/vtex-ads)\n\n---\n\nVTEX Session\n\n---\n\nVTEX Shield\n\n---\n\n[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/data-protection-plus)\n\n---\n\nWeni by VTEX\n\n---\n\n[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides)\n\nIntegration Guides\n\n[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide)\n\n[Admin (SAML 2.0)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2)\n\nAdmin (SAML 2.0)\n\nUser management is a native feature of the VTEX platform. Store administrators can not only manage the users that can log in to the admin panel, but also specify which pages they can see and the operations they are allowed to perform using [roles](https://read.calvincode.net/reader?url=https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc). This granular control allows stores to adopt [best practices](https://read.calvincode.net/reader?url=https://developers.onelogin.com/saml/best-practices-and-faqs) in terms of security and compliance.\n\nHowever, there is often the need to enable or enforce the use of credentials from a central authentication system used by the organization. This guide provides the basic information you need to integrate such an authentication system to the Admin panel for a Single Sign-On (SSO) experience.\n\n> If you need to use an external identity provider to login to your Admin panel, it must adhere to the SAML 2.0 protocol. We do not currently support other authentication protocols for this scope.\n\n## SAML\n\nSecurity Assertion Markup Language (SAML) is a standard for exchanging authentication and authorization data between domains.\n\nSAML 2.0 is an XML-based protocol that enables web-based cross-domain Web Browser Single Sign-On (SSO). It uses secure, digitally signed tokens and encrypted messages to pass data between trusted parties.\n\nIt is an open standard, a product of the OASIS Security Services Technical Committee, and is supported by major vendors in the industry. Learn more about [SAML](https://read.calvincode.net/reader?url=https://github.com/jch/saml).\n\n## Authentication flow\n\n\n\n## SAML roles\n\nIn the context of SAML, you should be aware of the different roles performed by the entities that exchange information during authentication.\n\n### Identity Provider (IdP)\n\nAn **Identity Provider** (IdP) is a system that creates, maintains, and manages identity information for principals (users, services, or systems) and provides principal authentication to other Service Providers (applications) within a federation or distributed network.\n\nAn IdP is a trusted third party that can be relied upon when users and servers are establishing a dialog that must be authenticated. The IdP sends an attribute assertion containing trusted information about the user to the Service Provider. A user password is never sent to an SP.\n\n### Service Provider (SP)\n\nA **Service Provider** is an application server that communicates with an IdP to determine if a user has authenticated and obtain information about the user. The information obtained from the IdP may be used to make authorization decisions.\n\n> In the context of this guide, the external authentication system is the **Identity Provider** and the module for identifying users on the VTEX platform, VTEX ID, is the **Service Provider**.\n\n## SAML Assertions\n\nSAML 2.0 uses assertions (packages) to pass information between the SP and the IdP. These packages contain information about a user (subject) and are written using the XML markup language. Although the standard specification defines [three types of subject-related assertion statements](https://read.calvincode.net/reader?url=http://saml.xml.org/assertions), VTEX only supports the **Authentication Assertion** type. We recommend the reading of [this document](https://read.calvincode.net/reader?url=https://github.com/jch/saml) to get a better understanding of the SAML protocol.\n\n> An **Authentication Assertion** states that a user was authenticated by an external service at a particular time and is often used to enable web browser SSO.\n\n## Integration\n\nYou can implement a custom SAML login option for your Admin panel by providing some information about the communication between VTEX and your **identity provider**. To do that:\n\n1. Make sure that you have correctly [set up your identity provider](#identity-provider-configuration).\n2. Guarantee that you possess all the [required information](#required-information).\n3. Follow the [step by step setup](#setup).\n\n### Identity provider configuration\n\nIf required by the identity provider, you must use the appropriate service provider `metadata.xml` file to configure the identity provider. It is available for download in the following URL:\n\n`1\n\nhttps://vtexid.vtex.com.br/api/vtexid/pub/saml/{accountName}/sp/metadata \n\n`\n\nIf you do not use the file indicated above, configure your identity provider manually with the Assertion Consumer Service (ACS), **NameID** and **EntityDescriptor** present in the SP `metadata.xml`. URL:\n\n* **ACS**:\n\n`1\n\nhttps://vtexid.vtex.com.br/api/vtexid/pub/saml/{accountName}/idps/{accountName}-saml/sso \n\n`\n\n* **NameID**:\n\n`1\n\nurn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress \n\n`\n\n* **EntityDescriptor**:\n\n`1\n\nhttps://identity-broker.vtex.com/{accountName}/idps/{accountName}-saml \n\n`\n\n> The `entityID` of the **EntityDescriptor** is not a URL and must not be configured as one. It is an ID.\\\\n- The `{accountName}` is your business identification on the VTEX platform. It is the one you use inside the URL that gives access to your admin: `{accountName}.myvtex.com/admin`.\n\nThe identity provider must send the authenticated user's email in the **Name Identifier** (`saml:NameID`) variable. The response will be cryptographically signed with the certificate described in the Identity Provider's [Metadata](#metadata) file.\n\n### Required information\n\nIn the table below you can learn more about the information you need to provide when [setting up SAML](#setup).\n\n| **Information** | **Description** |\n| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Provider Name | Name displayed to unauthenticated users in the list of login options. |\n| SSO Service Endpoint | URL of your SAML Identity provider. Users will be redirected to this address. This URL must be HTTPS. |\n| Redirect URL | You can choose to redirect users to one of two URLs: https://{accountName}.myvtex.com/ or https://{accountName}.myvtex.com/admin. |\n| Allowed Email Hosts | List of hosts (the portion after the @ symbol in an email address) allowed for authentication. When a SAML Authentication Assertion is received by our platform, the email provided by the user is checked against the list of **Allowed Email Hosts**. Only emails with hosts listed here are allowed. |\n| Metadata | XML file that must be uploaded to the VTEX platform. It must describe your identity provider in a way that allows our servers to redirect users to it and securely identify assertions made by it. It usually contains information like the SSO and Logout URLs as well as the certificate used by the identity provider to sign the assertions. The authentication system your organization is using should be capable of generating this file for you. Learn more about [SAML 2.0 metadata](https://read.calvincode.net/reader?url=http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). This file must also contain the SSO Service Endpoint, described above. You can see an example file below. |\n\n#### Example metadata file\n\n`1\n\n<?xml version=\"1.0\"?> \n\n2\n\n<md:EntityDescriptor entityID=\"https://idp.example.org/SAML2\" validUntil=\"2013-03-22T23:00:00Z\" \n\n3\n\n xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" \n\n4\n\n xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" \n\n5\n\n xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"> \n\n6\n\n <md:IDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\" WantAuthnRequestsSigned=\"false\"> \n\n7\n\n <md:KeyDescriptor use=\"signing\"> \n\n8\n\n <ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"> \n\n9\n\n <ds:X509Data> \n\n10\n\n <ds:X509Certificate>...</ds:X509Certificate> \n\n11\n\n </ds:X509Data> \n\n12\n\n </ds:KeyInfo> \n\n13\n\n </md:KeyDescriptor> \n\n14\n\n <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat> \n\n15\n\n <md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://idp.example.org/SAML2/SSO/Redirect\"/> \n\n16\n\n <md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://idp.example.org/SAML2/SSO/POST\"/> \n\n17\n\n </md:IDPSSODescriptor> \n\n18\n\n <md:Organization> \n\n19\n\n <md:OrganizationName xml:lang=\"en\">Some Non-profit Organization of New York</md:OrganizationName> \n\n20\n\n <md:OrganizationDisplayName xml:lang=\"en\">Some Non-profit Organization</md:OrganizationDisplayName> \n\n21\n\n <md:OrganizationURL xml:lang=\"en\">https://www.example.org/</md:OrganizationURL> \n\n22\n\n </md:Organization> \n\n23\n\n <md:ContactPerson contactType=\"technical\"> \n\n24\n\n <md:SurName>SAML Technical Support</md:SurName> \n\n25\n\n <md:EmailAddress>mailto:saml-support@example.org</md:EmailAddress> \n\n26\n\n </md:ContactPerson> \n\n27\n\n</md:EntityDescriptor> \n\n`\n\n### Setup\n\nOnce you have [setup your identity provider](#identity-provider-configuration) and have all the [required information](#required-information), follow these steps to set up SAML login:\n\n1. Go to the **Admin panel** \\> **Account settings** \\> **Authentication**.\n2. Click the **Admin** tab. \n\n3. Click `Set up` in the **My SAML** section.\n4. Fill in the [required information](#required-information) as described above. \n\n5. Upload your metadata XML according to the information provided in [required information](#required-information). \n\n6. You have the option of setting the **Send AuthRequest** toggle. Turning it on means that the attributes `RelayState` and `SAMLRequest` will be sent on the URL when authenticating on the identity provider.\n7. Click `Save`.\n\nWith this, your SAML configuration is set up.\n\n### Edit existing SAML configuration\n\nOnce you created your SAML configuration, you may edit it by going through the same steps described above, in [Setup](#setup).\n\n## Certificate renewals\n\nWhen the certificate used by your **Identity Provider** to sign the assertions is about to expire, it's important to update the `metadata.xml` file in VTEX to allow for a seamless transition between the old and the new certificate.\n\nThis is done by including two `<md:KeyDescriptor use=\"signing\">` entries in your exported file, as seen in the example below, where the `{OLD CERTIFICATE}` and `{NEW CERTIFICATE}` placeholders should be replaced by valid **X.509** certificates.\n\n`1\n\n<?xml version=\"1.0\"?> \n\n2\n\n<md:EntityDescriptor entityID=\"https://idp.example.org/SAML2\" validUntil=\"2013-03-22T23:00:00Z\" \n\n3\n\n xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" \n\n4\n\n xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" \n\n5\n\n xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"> \n\n6\n\n <md:IDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\" WantAuthnRequestsSigned=\"false\"> \n\n7\n\n <md:KeyDescriptor use=\"signing\"> \n\n8\n\n <ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"> \n\n9\n\n <ds:X509Data> \n\n10\n\n <ds:X509Certificate>{OLD CERTIFICATE}</ds:X509Certificate> \n\n11\n\n </ds:X509Data> \n\n12\n\n </ds:KeyInfo> \n\n13\n\n </md:KeyDescriptor> \n\n14\n\n <md:KeyDescriptor use=\"signing\"> \n\n15\n\n <ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"> \n\n16\n\n <ds:X509Data> \n\n17\n\n <ds:X509Certificate>{NEW CERTIFICATE}</ds:X509Certificate> \n\n18\n\n </ds:X509Data> \n\n19\n\n </ds:KeyInfo> \n\n20\n\n </md:KeyDescriptor> \n\n21\n\n <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat> \n\n22\n\n <md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://idp.example.org/SAML2/SSO/Redirect\"/> \n\n23\n\n <md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" Location=\"https://idp.example.org/SAML2/SSO/POST\"/> \n\n24\n\n </md:IDPSSODescriptor> \n\n25\n\n <md:Organization> \n\n26\n\n <md:OrganizationName xml:lang=\"en\">Some Non-profit Organization of New York</md:OrganizationName> \n\n27\n\n <md:OrganizationDisplayName xml:lang=\"en\">Some Non-profit Organization</md:OrganizationDisplayName> \n\n28\n\n <md:OrganizationURL xml:lang=\"en\">https://www.example.org/</md:OrganizationURL> \n\n29\n\n </md:Organization> \n\n30\n\n <md:ContactPerson contactType=\"technical\"> \n\n31\n\n <md:SurName>SAML Technical Support</md:SurName> \n\n32\n\n <md:EmailAddress>mailto:saml-support@example.org</md:EmailAddress> \n\n33\n\n </md:ContactPerson> \n\n34\n\n</md:EntityDescriptor> \n\n`\n\nAs the SP, VTEX ID must know of the new certificate or it will not be able to validate the signatures. And since the SP is unable to check at what stage of renewal the IdP is, it always checks if the signature validates for each of the listed certificates.\n\n> We recommend checking if your IdP allows the configuration of a primary and secondary certificate to simplify the export process.\n\nOnce the old certificate expires, you may remove it from the `metadata.xml` file and re-upload it if you wish to avoid unnecessary requests in the **Send Valid Credentials** step of the [SAML authentication flow](#authentication-flow).\n\nContributors\n\n3\n\n[](https://github.com/julia-rabello)\n\n[](https://github.com/carolinamenezes)\n\n[](https://github.com/brunoamui)\n\nWas this helpful?\n\nYes\n\nNo\n\n[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/login-integration-guide/login-integration-guide-admin-saml2.md)\n\n[Login (SSO)« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2//docs/guides/login-integration-guide)[Webstore (OAuth 2.0)Next »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2//docs/guides/login-integration-guide-webstore-oauth2)\n\nContributors\n\n3\n\n[](https://github.com/julia-rabello)\n\n[](https://github.com/carolinamenezes)\n\n[](https://github.com/brunoamui)\n\nON THIS PAGE\n\n[SAML](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml)\n\n[Authentication flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23authentication-flow)\n\n[SAML roles](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml-roles)\n\n[Identity Provider (IdP)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23identity-provider-idp)[Service Provider (SP)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23service-provider-sp)\n\n[SAML Assertions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml-assertions)\n\n[Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23integration)\n\n[Identity provider configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23identity-provider-configuration)[Required information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23required-information)[Setup](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23setup)[Edit existing SAML configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23edit-existing-saml-configuration)\n\n[Certificate renewals](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23certificate-renewals)\n\nWas this helpful?\n\n Send feedback\n\n[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/login-integration-guide/login-integration-guide-admin-saml2.md)\n\nCopy page\n\nOn this page\n\nON THIS PAGE\n\n[SAML](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml)\n\n[Authentication flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23authentication-flow)\n\n[SAML roles](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml-roles)\n\n[Identity Provider (IdP)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23identity-provider-idp)[Service Provider (SP)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23service-provider-sp)\n\n[SAML Assertions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23saml-assertions)\n\n[Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23integration)\n\n[Identity provider configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23identity-provider-configuration)[Required information](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23required-information)[Setup](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23setup)[Edit existing SAML configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23edit-existing-saml-configuration)\n\n[Certificate renewals](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/login-integration-guide-admin-saml2/docs/guides/login-integration-guide-admin-saml2%23certificate-renewals)\n\nOn this page\n\n[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)",
"role": "assistant"
}
] |
code_community_9d49212c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in community/node-vtex-api/src/clients/infra/Assets.ts.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```typescript\nimport { contains, filter, isEmpty, pick as ramdaPick, zipObj } from 'ramda'\nimport { Readable } from 'stream'\n\nimport { AppMetaInfo } from '../..'\nimport { CacheType, inflightURL, InstanceOptions, RequestTracingConfig } from '../../HttpClient'\nimport {\n IgnoreNotFoundRequestConfig,\n} from '../../HttpClient/middlewares/notFound'\nimport { IOContext } from '../../service/worker/runtime/typings'\nimport { parseAppId, ParsedLocator } from '../../utils'\nimport { InfraClient } from './InfraClient'\n\nconst dependsOnApp = (appsAtMajor: string[]) => (a: AppMetaInfo) => {\n let dependsOn = false\n appsAtMajor.forEach(appAtMajor => {\n const [name, major] = appAtMajor.split('@')\n const sanitizedMajor = major.includes('.') ? major.split('.')[0] : major\n const version = a._resolvedDependencies[name]\n if (version) {\n const [depMajor] = version.split('.')\n if (sanitizedMajor === depMajor) {\n dependsOn = true\n }\n }\n })\n return dependsOn\n}\n\nconst useBuildJson = (app: AppMetaInfo, appVendorName: string) => {\n const buildFeatures = app._buildFeatures\n return buildFeatures && buildFeatures[appVendorName] && contains('build.json', buildFeatures[appVendorName])\n}\n\nexport interface AssetsParams {\n files?: string[]\n pick?: string[]\n}\n\nconst appOrRegistry = (workspace: string, { name, version, build }: ParsedLocator) =>\n build\n ? `${workspace}/apps/${name}@${version}+${build}`\n : `master/registry/${name}/${version}`\n\nconst createRoutes = (workspace: string) => ({\n Bundle: (scope: string, locator: ParsedLocator, path: string) => `/${scope}/${appOrRegistry(workspace, locator)}/bundle/${path}`,\n Files: (scope: string, locator: ParsedLocator, path: string) => `/${scope}/${appOrRegistry(workspace, locator)}/files/${path}`,\n})\n\nexport class Assets extends InfraClient {\n private routes: ReturnType<typeof createRoutes>\n\n constructor(context: IOContext, options?: InstanceOptions) {\n super('apps@0.x', context, options, true)\n this.routes = createRoutes(this.context.workspace)\n }\n\n public getSettings (dependencies: AppMetaInfo[], appAtMajor: string, params: AssetsParams = {}, tracingConfig?: RequestTracingConfig) {\n const {pick, files} = params\n const filtered = this.getFilteredDependencies(appAtMajor, dependencies)\n\n return Promise.all(filtered.map(dependency => {\n const [appVendorName] = appAtMajor.split('@')\n const buildJson = useBuildJson(dependency, appVendorName)\n\n return buildJson\n ? this.getBuildJSONForApp(dependency, appVendorName, pick, tracingConfig)\n : this.getSettingsFromFilesForApp(dependency, files, tracingConfig)\n }\n ))\n }\n\n public async getBuildJSONForApp(app: AppMetaInfo, appVendorName: string, pick: string | string[] = [], tracingConfig?: RequestTracingConfig): Promise<Record<string, any>> {\n const pickArray = Array.isArray(pick) ? pick : [pick]\n const buildJson: Record<string, any> = await this.getJSON(app.id, `dist/${appVendorName}/build.json`, undefined, tracingConfig)\n const result = !isEmpty(pickArray) ? ramdaPick(pickArray, buildJson) : buildJson\n\n result.declarer = app.id\n return result\n }\n\n public async getSettingsFromFilesForApp(app: AppMetaInfo, files: string | string[] = [], tracingConfig?: RequestTracingConfig): Promise<Record<string, any>> {\n // If there's no support for build.json, then fetch individual files and zip them into an {[file]: content} object.\n const filesArray = Array.isArray(files) ? files : [files]\n const fetched = await Promise.all(filesArray.map(file => this.getJSON(app.id, file, true, tracingConfig)))\n const result: Record<string, any> = zipObj(filesArray, fetched)\n\n result.declarer = app.id\n return result\n }\n\n public async getJSON<T extends object | null>(appId: string, file: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) {\n const locator = parseAppId(appId)\n const linked = !!locator.build\n\n if (linked) {\n return this.getAppJSONByAccount<T>(appId, file, nullIfNotFound, tracingConfig)\n }\n return this.getAppJSONByVendor<T>(appId, file, nullIfNotFound, tracingConfig)\n }\n\n public async getFile(appId: string, file: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) {\n const locator = parseAppId(appId)\n const linked = !!locator.build\n\n if (linked) {\n return this.getAppFileByAccount(appId, file, nullIfNotFound, tracingConfig)\n }\n return this.getAppFileByVendor(appId, file, nullIfNotFound, tracingConfig)\n }\n\n public getFilteredDependencies(apps: string | string[], dependencies: AppMetaInfo[]): AppMetaInfo[] {\n const appsAtMajor: string[] = typeof(apps) === 'string' ? [apps] : apps\n const depends = dependsOnApp(appsAtMajor)\n return filter(depends, dependencies)\n }\n\n public getAppBundleByVendor = (app: string, bundlePath: string, generatePackageJson: boolean, tracingConfig?: RequestTracingConfig): Promise<Readable> => {\n const locator = parseAppId(app)\n const params = generatePackageJson && {_packageJSONEngine: 'npm', _packageJSONFilter: 'vtex.render-builder@x'}\n const metric = locator.build ? 'apps-get-bundle' : 'registry-get-bundle'\n return this.http.getStream(this.routes.Bundle(this.context.account, locator, bundlePath), {\n headers: {\n Accept: 'application/x-gzip',\n 'Accept-Encoding': 'gzip',\n },\n metric,\n params,\n tracing: {\n requestSpanNameSuffix: metric,\n ...tracingConfig?.tracing,\n },\n })\n }\n\n protected getAppJSONByAccount = <T extends object | null>(app: string, path: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) => {\n const locator = parseAppId(app)\n const inflightKey = inflightURL\n const metric = 'assets-get-json-by-account'\n return this.http.get<T>(this.routes.Files(this.context.account, locator, path), {\n cacheable: CacheType.Memory,\n inflightKey,\n metric,\n nullIfNotFound,\n tracing: {\n requestSpanNameSuffix: metric,\n ...tracingConfig?.tracing,\n },\n } as IgnoreNotFoundRequestConfig)\n }\n\n protected getAppJSONByVendor = <T extends object | null>(app: string, path: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) => {\n const locator = parseAppId(app)\n const vendor = locator.name.split('.')[0]\n const inflightKey = inflightURL\n const metric = 'assets-get-json-by-vendor'\n return this.http.get<T>(this.routes.Files(vendor, locator, path), {\n cacheable: CacheType.Any,\n inflightKey,\n metric,\n nullIfNotFound,\n tracing: {\n requestSpanNameSuffix: metric,\n ...tracingConfig?.tracing,\n },\n } as IgnoreNotFoundRequestConfig)\n }\n\n protected getAppFileByAccount = (app: string, path: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) => {\n const locator = parseAppId(app)\n const inflightKey = inflightURL\n const metric = 'assets-get-file-by-account'\n return this.http.getBuffer(this.routes.Files(this.context.account, locator, path), {\n cacheable: CacheType.Any,\n inflightKey,\n metric,\n nullIfNotFound,\n tracing: {\n requestSpanNameSuffix: metric,\n ...tracingConfig?.tracing,\n },\n })\n }\n\n protected getAppFileByVendor = (app: string, path: string, nullIfNotFound?: boolean, tracingConfig?: RequestTracingConfig) => {\n const locator = parseAppId(app)\n const vendor = locator.name.split('.')[0]\n const inflightKey = inflightURL\n const metric = 'assets-get-file-by-vendor'\n return this.http.getBuffer(this.routes.Files(vendor, locator, path), {\n cacheable: CacheType.Any,\n inflightKey,\n metric,\n nullIfNotFound,\n tracing: {\n requestSpanNameSuffix: metric,\n ...tracingConfig?.tracing,\n },\n })\n }\n}\n\n\n\n```",
"role": "assistant"
}
] |
code_product-list_e6555189
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in product-list/messages/it-IT.json.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# prodotto disponibile} other {# prodotti disponibili}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# prodotto non disponibile} other {# prodotti non disponibili}}\",\n \"store/product-list.message.cantBeDelivered\": \"Questo prodotto non può essere consegnalo presso l'indirizzo indicato.\",\n \"store/product-list.message.noLongerAvailable\": \"Questo prodotto non è più disponibile.\",\n \"store/product-list.message.remove\": \"rimuovi\",\n \"store/product-list.quantity-selector.remove\": \"Rimuovi\",\n \"store/product-list.quantity-label\": \"{quantity}.\",\n \"store/product-list.delete-button.default-label\": \"Rimuovi prodotto\",\n \"store/product-list.priceChanged\": \"Modificato\",\n \"store/product-list.priceOptions\": \"Opzioni di prezzo\",\n \"store/product-list.changePrice\": \"Modifica il prezzo\",\n \"store/product-list.revertToOriginal\": \"Ripristina l'originale\",\n \"store/product-list.originalPrice\": \"Prezzo originale\",\n \"store/product-list.changeTo\": \"Modifica in\",\n \"store/product-list.manualPricePlaceholder\": \"Inserisci una valuta\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Questo prodotto è venduto per frazioni di {unitMultiplier}{measurementUnit}. Per questo motivo, la quantità inserita è stata arrotondata a {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantità del prodotto\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aumenta la quantità\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Riduci la quantità\"\n}\n\n```",
"role": "assistant"
}
] |
code_cross-device-cart_7c5a2395
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in cross-device-cart/messages/es.json.",
"role": "user"
},
{
"content": "The implementation is:\n\n```json\n{\n \"store/crossCart.challenge.cta\": \"Hazlo\",\n \"store/crossCart.challenge.text\": \"Parece que has dejado un carrito en otro dispositivo. ¿Quieres recuperarlo?\",\n \"store/crossCart.toast.success\": \"Tu ultimo carrito ha sido recuperado\",\n \"store/crossCart.toast.error\": \"Un error ocurrio al recuperar tu carrito\",\n \"admin/cross-device-cart.title\": \"Cross Device Cart\",\n \"admin/cross-device-cart.subtitle\": \"Configuración de la aplicación\",\n \"admin/cross-device-cart.error\": \"Ha ocurrido un problema cargando la configuración de la aplicación\",\n \"admin/cross-device-cart.automatic-toggle-automatic\": \"Automático\",\n \"admin/cross-device-cart.automatic-toggle-manual\": \"Manual\",\n \"admin/cross-device-cart.automatic-toggle-help-text\": \"Elija entre el modo Automático o Manual para el cross device cart.\",\n \"admin/cross-device-cart.automatic-toggle-explanation\": \"Cuando se selecciona el modo 'Automático' no se le pedirá al usuario que realice ninguna acción. Si se selecciona el modo 'Manual' el usuario deberá confirmar qué quiere hacer con los artículos que estaban previamente en el carrito.\"\n}\n\n```",
"role": "assistant"
}
] |
code_mycheckout-store-framework_8d34f36d
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the GraphQL schema for mycheckout-store-framework.",
"role": "user"
},
{
"content": "```graphql\nquery getButtonUses(\n $visualization: String\n $selectedFrom: String\n $selectedUntil: String\n $previousFrom: String\n $previousUntil: String\n $timezone: String\n) {\n button(\n data: {\n filters: {\n visualization: $visualization\n selectedPeriod: { from: $selectedFrom, until: $selectedUntil }\n previousPeriod: { from: $previousFrom, until: $previousUntil }\n }\n timezone: $timezone\n }\n ) @context(provider: \"kuikpay.my-checkout\") {\n selectedPeriodButton {\n _id\n use\n }\n currentDayButton\n currentMonthButton\n currentDayVariationButton\n previousPeriodButton {\n _id\n use\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
troubleshoot_disclosure-layout_performance_issues_68f5f0a1
|
[
{
"content": "You are a VTEX debugging expert. You help developers troubleshoot issues with VTEX IO apps, Store Framework components, and GraphQL services. You provide clear, actionable solutions with code fixes.",
"role": "system"
},
{
"content": "My page with disclosure-layout is loading slowly. What can I do to improve performance?",
"role": "user"
},
{
"content": "## Common Causes\n\n1. **Eager loading of heavy content** - All disclosure content renders immediately on page load, even when collapsed, causing unnecessary DOM bloat and resource consumption.\n\n2. **Unoptimized data fetching inside disclosures** - Product shelves, search results, or API-dependent blocks inside disclosure sections fetch data regardless of visibility state.\n\n3. **Too many disclosure instances** - Multiple disclosure-layout blocks on a single page compound performance issues, especially in FAQ sections or product specifications.\n\n4. **Large bundle size from nested components** - Complex components nested within disclosures increase JavaScript bundle size and parsing time.\n\n5. **Missing caching strategies** - Dynamic content inside disclosures refetches on every page load without leveraging VTEX's caching mechanisms.\n\n## Debugging Steps\n\n1. **Analyze render behavior** - Open Chrome DevTools, go to Performance tab, and record a page load. Look for long tasks during initial render that correspond to disclosure content.\n\n2. **Check Network waterfall** - In the Network tab, filter by Fetch/XHR. Identify requests triggered by content inside collapsed disclosures—these shouldn't fire until expansion.\n\n3. **Inspect DOM size** - Run `document.querySelectorAll('*').length` in console. A high count (>3000) suggests too much content rendering eagerly.\n\n4. **Audit with Lighthouse** - Run a Lighthouse performance audit focusing on \"Reduce unused JavaScript\" and \"Avoid enormous network payloads\" diagnostics.\n\n5. **Test isolation** - Temporarily remove disclosure content and measure baseline performance. Reintroduce blocks incrementally to identify the heaviest culprits.\n\n## Solution\n\nImplement lazy loading by wrapping heavy content with `__fold__` blocks and configuring conditional rendering:\n\n```json\n{\n \"disclosure-layout#faq\": {\n \"children\": [\"disclosure-trigger#faq\", \"disclosure-content#faq\"]\n },\n \n \"disclosure-trigger#faq\": {\n \"children\": [\"rich-text#question\"]\n },\n \n \"disclosure-content#faq\": {\n \"children\": [\"disclosure-layout-content#lazy\"]\n },\n \n \"disclosure-layout-content#lazy\": {\n \"children\": [\"__fold__.experimentalLazyAssets\", \"rich-text#answer\"]\n }\n}\n```\n\nFor product shelves or data-heavy components inside disclosures, use the `fold-block` wrapper:\n\n```json\n{\n \"disclosure-content#products\": {\n \"children\": [\"fold-block#shelf-wrapper\"]\n },\n \n \"fold-block#shelf-wrapper\": {\n \"props\": {\n \"foldType\": \"lazy\"\n },\n \"children\": [\"shelf#recommendations\"]\n },\n \n \"shelf#recommendations\": {\n \"props\": {\n \"maxItems\": 6,\n \"itemsPerPage\": 3\n }\n }\n}\n```\n\nOptimize multiple disclosures using `disclosure-layout-group` with single-open behavior to reduce active DOM:\n\n```json\n{\n \"disclosure-layout-group#specs\": {\n \"props\": {\n \"maxVisible\": 1,\n \"initialOpen\": false\n },\n \"children\": [\n \"disclosure-layout#spec-1\",\n \"disclosure-layout#spec-2\",\n \"disclosure-layout#spec-3\"\n ]\n }\n}\n```\n\nEnable aggressive caching for static disclosure content in your store's `render-runtime` configuration:\n\n```json\n{\n \"disclosure-content#cached-faq\": {\n \"props\": {\n \"blockClass\": \"cached-content\"\n },\n \"children\": [\"rich-text#static-answer\"]\n }\n}\n```\n\nAdd corresponding CSS to prevent layout shift during lazy load:\n\n```css\n.disclosureContent--cached-content {\n min-height: 100px;\n contain: content;\n}\n```\n\n## Prevention Tips\n\n- **Default to collapsed state** - Set `initialOpen: false` on disclosure triggers unless immediate visibility is essential for UX.\n\n- **Limit nesting depth** - Avoid placing disclosure-layout inside other disclosure-layout blocks. Flatten your information architecture instead.\n\n- **Use lightweight trigger content** - Keep disclosure-trigger children minimal—text and icons only, no images or complex components.\n\n- **Implement pagination for lists** - If disclosures contain product lists or search results, limit visible items and add \"load more\" functionality.\n\n- **Audit regularly** - Include disclosure performance in your CI/CD pipeline using Lighthouse CI with performance budgets for Time to Interactive under 3.5 seconds.\n\n- **Consider SSR implications** - Remember that server-side rendered content inside disclosures still contributes to initial HTML payload. For truly heavy content, consider client-side only rendering with `fold-block`.",
"role": "assistant"
}
] |
code_b2cstoreqa.theme_84793f0c
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of b2cstoreqa.theme/store/blocks/institutional.jsonc from b2cstoreqa.theme.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```jsonc\n{\n \"image#mobile-phone\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/mobile-phone.png\",\n \"maxHeight\": \"\",\n \"maxWidth\": \"\",\n \"blockClass\": \"storePrint\"\n }\n },\n\n \"rich-text#institutional-placeholder\": {\n \"props\": {\n \"text\": \"**Optimized store framework** \\n Free your front-end with our React + Node store framework. Improve usability and SEO, while driving more conversion with modular components, single page applications, and a ready-for-PWA structure. \\n\\n **Multi-currency and language** \\n Go international with multiple storefronts to support different languages and easily manage local currencies and payment conditions. \\n\\n **Serverless development platform** \\n Reduce loading time, improve usability, and make the best out of SEO. Developing scalable components with a comprehensive, easy-to-use toolset, you can build stores faster than ever.\",\n \"blockClass\": \"about\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_hermes_dea7652b
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How does hermes resolve GraphQL queries?",
"role": "user"
},
{
"content": "Here's the graphql resolver:\n\n```typescript\nasync function getGitHubStatus(_: string, __: any, ctx: Context) {\n const deliveryApps = await ctx.clients.status.getStatus()\n return deliveryApps\n}\n\nexport default getGitHubStatus\n\n```",
"role": "assistant"
}
] |
code_supply-lots_16f6e8c6
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the resolver implementation for supply-lots.",
"role": "user"
},
{
"content": "```typescript\nexport const getSkuAndWarehouseNames = (\n _: any,\n { skuId, warehouseId }: { skuId: string, warehouseId: string },\n { clients: { catalog, logistics } }: Context\n) => Promise.all([\n catalog.skuName(skuId),\n logistics.warehouseName(warehouseId)\n])\n\n```",
"role": "assistant"
}
] |
code_community_00fb2790
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the CSS/SCSS implementation from community.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```css\n.caretIcon--fresh-blue {\n color: var(--fresh-blue);\n}\n\n.caretIcon--lines-darker {\n color: var(--lines-darker);\n}\n\n```",
"role": "assistant"
}
] |
code_salesforce-oauth-middleware_06c0b1d6
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from salesforce-oauth-middleware.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\ninterface ISalesforceAccessTokenRes {\n sub: string\n user_id: string\n organization_id: string\n preferred_username: string\n nickname: string\n name: string\n email: string\n email_verified: boolean\n given_name: string\n family_name: string\n zoneinfo: string\n photos: {\n picture: string\n thumbnail: string\n }\n profile: string\n picture: string\n address: {\n country: string\n }\n urls: {\n enterprise: string\n metadata: string\n partner: string\n rest: string\n sobjects: string\n search: string\n query: string\n recent: string\n tooling_soap: string\n tooling_rest: string\n profile: string\n feeds: string\n groups: string\n users: string\n feed_items: string\n feed_elements: string\n custom_domain: string\n }\n active: boolean\n user_type: string\n language: string\n locale: string\n utcOffset: number\n updated_at: string\n}\n\ninterface ISalesforceAccessToken extends ISalesforceAccessTokenRes {\n end_date: Date\n}\n\ninterface ISalesforceRefreshToken {\n access_token: string\n id: string\n id_token?: string\n instance_url: string\n issued_at: string\n refresh_token?: string\n scope: string\n sfdc_community_id: string\n sfdc_community_url: string\n signature: string\n token_type: string\n}\n\n```",
"role": "assistant"
}
] |
code_pharma-orders-admin_d00c6754
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What GraphQL queries are available in pharma-orders-admin?",
"role": "user"
},
{
"content": "Here's the graphql schema:\n\n```graphql\ntype PaymentNotificationResponse {\n status: Int\n}\n\n```",
"role": "assistant"
}
] |
code_shipping-option-components_9c3b20e7
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of shipping-option-components/messages/cs.json from shipping-option-components.",
"role": "user"
},
{
"content": "```json\n{\n \"store/shipping-option-zipcode.deliverToButton.label\": \"Dodat na adresu:\",\n \"store/shipping-option-zipcode.deliverToButton.placeholder\": \"Zadejte polohu\",\n \"store/shipping-option-zipcode.storeButton.label\": \"Obchod:\",\n \"store/shipping-option-zipcode.storeButton.placeholder\": \"Vyberte obchod\",\n \"store/shipping-option-zipcode.deliverDrawer.title\": \"Zobrazte dostupnost pro svůj region\",\n \"store/shipping-option-zipcode.pickupDrawer.title.empty\": \"Prohlédněte si obchody ve svém regionu\",\n \"store/shipping-option-zipcode.pickupDrawer.title.filled\": \"Vyberte si obchod\",\n \"store/shipping-option-zipcode.postalCodeInput.placeholder\": \"Zadejte své poštovní směrovací číslo\",\n \"store/shipping-option-zipcode.postalCodeInput.error\": \"Zadané poštovní směrovací číslo se nenachází v naší oblasti pokrytí\",\n \"store/shipping-option-zipcode.currentLocationButton\": \"Použít aktuální polohu\",\n \"store/shipping-option-zipcode.storeHoursButton\": \"Zobrazit otevírací dobu obchodu\",\n \"store/shipping-option-zipcode.viewMoreButton\": \"Zobrazit více\",\n \"store/shipping-option-zipcode.shippinFilter.title\": \"Možnosti dopravy\",\n \"store/shipping-option-zipcode.shippinFilter.deliverTo.title\": \"Dodat na adresu\",\n \"store/shipping-option-zipcode.shippinFilter.deliverTo.enterButton\": \"Zadejte polohu\",\n \"store/shipping-option-zipcode.shippinFilter.pkcupAt.title\": \"Vyzvednutí v\",\n \"store/shipping-option-zipcode.shippinFilter.pkcupAt.chooseAStore\": \"Vyberte si obchod\",\n \"store/shipping-option-zipcode.shippinFilter.pickupnearBy\": \"Vyzvednutí v okolí\",\n \"store/shipping-option-zipcode.shippinFilter.pickpu\": \"Vyzvednutí\",\n \"store/shipping-option-zipcode.updateButton.label\": \"Aktualizovat\",\n \"store/shipping-option-zipcode.popoverButton.label\": \"Výběr místa\",\n \"store/shipping-option-zipcode.popover.description\": \"Možnosti dopravy a její rychlost se mohou lišit v závislosti na obchodu a adrese doručení\"\n}\n\n```",
"role": "assistant"
}
] |
code_checkout-payment_87b0c694
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in checkout-payment/messages/es.json.",
"role": "user"
},
{
"content": "Here's the source code:\n\n```json\n{\n \"store/checkout-payment.selectedPaymentLabel\": \"Tu seleccionaste\",\n \"store/checkout-payment.installmentsButton\": \"Elige cuota\",\n \"store/checkout-payment.creditCardExtraDataMessage\": \"Por su seguridad, complete los siguientes datos:\",\n \"store/checkout-payment.documentLabel\": \"Documento del titular de la tarjeta\",\n \"store/checkout-payment.requiredField\": \"Este campo es obligatorio.\",\n \"store/checkout-payment.invalidDigits\": \"Dígitos inválidos\",\n \"store/checkout-payment.creditCardLabel\": \"Tarjeta de Crédito\",\n \"store/checkout-payment.viewInstallmentOptionsLabel\": \"Ver opciones de pago\",\n \"store/checkout-payment.installmentsOptionsTitle\": \"Opciones de pago a plazos\",\n \"store/checkout-payment.installmentWithoutValue\": \"{count}x {hasInterestRate, select, false {sin interés} true {con interés de {interestRate}% mensual}}\",\n \"store/checkout-payment.installmentsTitle\": \"Cuotas\",\n \"store/checkout-payment.installmentOptionLabel\": \"Elige una cuota\",\n \"store/checkout-payment.installmentValue\": \"{installments}x {value}\",\n \"store/checkout-payment.changeInstallments\": \"Cambiar cuota\",\n \"store/checkout-payment.interestFree\": \"Sin interés\",\n \"store/checkout-payment.newCreditCardLabel\": \"Nueva tarjeta de credito\",\n \"store/checkout-payment.incompleteCardLabel\": \"Tarjeta Incompleta\",\n \"store/checkout-payment.choosePaymentMethodLabel\": \"Elija un método de pago\",\n \"store/checkout-payment.paymentSummaryCardMessage\": \"Tarjeta de crédito terminada en {value}\",\n \"store/checkout-payment.summaryInstallments\": \"{installmentsMessage} {hasInterestRate, select, false {- sin interés}}\",\n \"store/checkout-payment.boletoGenerationMessage\": \"Generado después de la compra\",\n \"store/checkout-payment.boletoNotice\": \"La entrega estimada está sujeta a confirmación de pago. Esto puede demorar hasta 1 día hábil.\",\n \"store/checkout-payment.reviewPurchaseLabel\": \"Revisar compra\",\n \"store/checkout-payment.billingAddressLabel\": \"Dirección de facturación\",\n \"store/checkout-payment.newAddressLabel\": \"+ Nueva dirección\",\n \"store/checkout-payment.cardFormTitle\": \"Contenedor para formulario de tarjeta de crédito\",\n \"store/checkout-payment.freePurchase\": \"Tu compra es gratis\",\n \"store/checkout-payment.informBillingAddress\": \"Ingrese su dirección de facturación\"\n}\n\n```",
"role": "assistant"
}
] |
code_course-template_cd3a2bb9
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What dependencies does course-template require?",
"role": "user"
},
{
"content": "The implementation is:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"change-me-course\",\n \"version\": \"0.1.0\",\n \"title\": \"Change me Course\",\n \"description\": \"\",\n \"defaultLocale\": \"en-US\",\n \"builders\": {\n \"store\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.store\": \"2.x\",\n \"vtex.rich-text\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```",
"role": "assistant"
}
] |
code_place-components_b1fb35e6
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What props does Device Coordinates accept and how do I configure them?",
"role": "user"
},
{
"content": "Here's the react component:\n\n```tsx\nimport React, { useState, useEffect, useCallback, useMemo } from 'react'\nimport { useAddressContext } from 'vtex.address-context/AddressContext'\nimport { ButtonPlain, Spinner, Tooltip, IconLocation } from 'vtex.styleguide'\nimport { FormattedMessage } from 'react-intl'\nimport { useLazyQuery } from 'react-apollo'\nimport { Address } from 'vtex.places-graphql'\n\nimport REVERSE_GEOCODE_QUERY from './graphql/reverseGeocode.graphql'\n\nexport interface GeolocationPosition {\n coords: {\n latitude: number\n longitude: number\n }\n}\n\ninterface GeolocationPositionError {\n code: number\n message: string\n}\n\ntype PermissionState = 'prompt' | 'pending' | 'granted' | 'denied'\n\ninterface Props {\n onSuccess?: (address: Address) => void\n}\n\nconst DeviceCoordinates: React.FC<Props> = ({ onSuccess }) => {\n const { setAddress } = useAddressContext()\n const [geolocationPermission, setGeolocationPermission] = useState<\n PermissionState\n >('prompt')\n\n const [executeReverseGeocode, geoResult] = useLazyQuery(REVERSE_GEOCODE_QUERY)\n\n const { loading } = geoResult\n\n useEffect(() => {\n if (geoResult.data) {\n setAddress(geoResult.data.reverseGeocode)\n onSuccess?.(geoResult.data.reverseGeocode)\n }\n\n if (geoResult.error) {\n console.warn(geoResult.error.message)\n }\n }, [geoResult, setAddress, onSuccess])\n\n const onGetCurrentPositionSuccess = useCallback(\n ({ coords }: GeolocationPosition) => {\n setGeolocationPermission('granted')\n\n executeReverseGeocode({\n variables: {\n lat: coords.latitude.toString(),\n lng: coords.longitude.toString(),\n },\n })\n },\n [executeReverseGeocode]\n )\n\n const onGetCurrentPositionError = useCallback(\n (err: GeolocationPositionError) => {\n setGeolocationPermission('denied')\n console.warn(`ERROR(${err.code}): ${err.message}`)\n },\n []\n )\n\n const requestGeolocation = useCallback(() => {\n setGeolocationPermission('pending')\n navigator.geolocation.getCurrentPosition(\n onGetCurrentPositionSuccess,\n onGetCurrentPositionError,\n {\n enableHighAccuracy: true,\n }\n )\n }, [onGetCurrentPositionError, onGetCurrentPositionSuccess])\n\n const handleButtonClick = () => {\n requestGeolocation()\n }\n\n useEffect(() => {\n // some browsers do not have/require permissions\n if (!navigator.permissions) {\n return\n }\n\n navigator.permissions\n .query({ name: 'geolocation' })\n .then((result: PermissionStatus) => {\n if (result.state === 'denied') {\n setGeolocationPermission('denied')\n }\n })\n }, [requestGeolocation])\n\n const locationIcon = useMemo(() => {\n switch (geolocationPermission) {\n case 'prompt':\n return <IconLocation block />\n\n case 'granted':\n return <IconLocation solid block />\n\n case 'pending':\n return <Spinner size={16} block />\n\n case 'denied':\n return <IconLocation block />\n\n default:\n return null\n }\n }, [geolocationPermission])\n\n let buttonElement = (\n <ButtonPlain\n disabled={geolocationPermission === 'denied'}\n onClick={handleButtonClick}\n >\n <div className=\"flex items-center\">\n <div className=\"flex-none mr3\">\n {loading ? <Spinner size={16} /> : locationIcon}\n </div>\n <div className=\"flex-auto\">\n <FormattedMessage id=\"place-components.label.useCurrentLocation\" />\n </div>\n </div>\n </ButtonPlain>\n )\n\n if (geolocationPermission === 'denied') {\n buttonElement = (\n <Tooltip label=\"Permission not granted\">{buttonElement}</Tooltip>\n )\n }\n\n return buttonElement\n}\n\nexport default DeviceCoordinates\n\n```",
"role": "assistant"
}
] |
code_marketplace-financial-commission_858588fa
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the backend implementation from marketplace-financial-commission.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\nimport { getDatesInvoiced } from '../../../utils'\n\n/**\n * Given a Seller and an optional Date range, return\n * all orders marked as INVOICED\n * @param sellersName the seller to query orders from\n * @param dateRange the date range in ISO format\n * @returns {VtexListOrder[]}\n */\nexport async function orderListInvoicedBySeller(\n ctx: Context,\n sellersName: string,\n dateRange?: DateRange | undefined\n): Promise<VtexListOrder[]> {\n const {\n clients: { ordersClient },\n } = ctx\n\n const dateInvoiced = getDatesInvoiced(dateRange)\n const dateStart = dateInvoiced.dateInvoiceInitial\n const dateEnd = dateInvoiced.dateInvoiceEnd\n const page = 1\n\n const orderListIni = await ordersClient.listOrders({\n fStatus: 'invoice,invoiced',\n fieldDate: 'invoicedDate',\n fieldDateStart: dateStart,\n fieldDateEnd: dateEnd,\n sellerName: sellersName,\n orderBy: 'invoicedDate',\n page,\n })\n\n const allOrders = []\n\n for (let pages = 0; pages <= orderListIni.paging.pages; pages++) {\n allOrders.push(\n ordersClient.listOrders({\n fStatus: 'invoice,invoiced',\n fieldDate: 'invoicedDate',\n fieldDateStart: dateStart,\n fieldDateEnd: dateEnd,\n sellerName: sellersName,\n orderBy: 'invoicedDate',\n page: pages,\n })\n )\n }\n\n const orderList = await Promise.all(allOrders)\n\n return orderList\n}\n\n```",
"role": "assistant"
}
] |
code_datadog-rum-pixel_4ea1a6b5
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in datadog-rum-pixel/public/metadata/messages/pt-BR.json.",
"role": "user"
},
{
"content": "The implementation is:\n\n```json\n{\n \"name\": \"Datadog RUM\",\n \"headline\": \"Integre sua loja com o Datadog Real User Monitor\",\n \"overview\": \"O Datadog Real User Monitoring (RUM) fornece uma visão profunda do desempenho do frontend da sua aplicação. Monitore dados de usuários reais para otimizar o desempenho da web e proporcionar experiências excepcionais aos usuários.\",\n \"features\": [\n \"Configure o Datadog Real User Monitor usando o painel de administração VTEX\",\n \"Acompanhe as interações dos usuários e as métricas de desempenho\",\n \"Monitore dados de usuários reais para otimizar o desempenho da web\"\n ],\n \"additionalInformation\": \"Para mais informações sobre como configurar seu Datadog RUM Pixel, consulte a [documentação do Datadog](https://docs.datadoghq.com/real_user_monitoring/browser/setup/)\",\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n}\n\n```",
"role": "assistant"
}
] |
code_shipping-calculator_a723ce37
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of shipping-calculator/store/interfaces.json from shipping-calculator.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```json\n{\n \"shipping-calculator\": {\n \"component\": \"Shipping\",\n \"allowed\": [\"estimate-shipping\"],\n \"composition\": \"children\",\n \"content\": {\n \"$ref\": \"#/definitions/ShippingCalculator\"\n },\n \"preview\": {\n \"type\": \"box\",\n \"height\": 30,\n \"width\": 200,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"estimate-shipping\": {\n \"component\": \"ShippingCalculator\"\n }\n}\n\n```",
"role": "assistant"
}
] |
code_regionalization-theme_d75703c1
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in regionalization-theme/store/blocks/product-summary/product-summary.jsonc.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```jsonc\n{\n \"product-summary.shelf\": {\n \"children\": [\n \"stack-layout#prodsum\",\n \"product-summary-name\", \n \"product-summary-space\",\n \"product-list-price#summary\",\n \"flex-layout.row#selling-price-savings\",\n \"product-installments#summary\",\n \"availability-badges\",\n \"add-to-cart-button\"\n ]\n }, \n\n \"stack-layout#prodsum\": {\n \"children\": [\n \"product-summary-image#shelf\",\n \"vtex.product-highlights@2.x:product-highlights#collection\",\n \"modal-trigger#quickview\" // Check quickview.jsonc\n ]\n },\n\n \"product-summary-image#shelf\": {\n \"props\": {\n \"showBadge\": false,\n \"aspectRatio\": \"1:1\",\n \"maxHeight\": 300\n }\n },\n\n \"vtex.product-highlights@2.x:product-highlights#collection\": {\n \"props\": {\n \"type\": \"collection\"\n },\n \"children\": [\"product-highlight-wrapper\"]\n },\n \"product-highlight-wrapper\": {\n \"props\": {\n \"blockClass\": \"collection\"\n },\n \"children\": [\"product-highlight-text\"]\n },\n \"product-highlight-text\": {\n \"props\": {\n \"message\": \"{highlightName}\"\n }\n },\n\n \"product-list-price#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"flex-layout.row#selling-price-savings\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 4\n },\n \"children\": [\n \"product-selling-price#summary\",\n \"product-price-savings#summary\"\n ]\n },\n \"product-installments#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"product-selling-price#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"product-price-savings#summary\": {\n \"props\": {\n \"markers\": [\n \"discount\"\n ],\n \"blockClass\": \"summary\"\n }\n }\n}\n\n```",
"role": "assistant"
}
] |
code_landing-pages_50bd90c2
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "What are the key features of landing-pages?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```markdown\n# VTEX Landing Pages\n\nThis app aggregates all landing pages served by VTEX IO.\n\nEach landing page has its own IO App:\n\n- [TETRIX](https://tetrix.vtex.com): https://github.com/vtex-apps/tetrix \n- [VTEX Code Cup](https://codecup.vtex.com): https://github.com/vtex-apps/code-cup \n- [VTEX IO](https://vtex.io): https://github.com/vtex-apps/io-landing \n- [VTEX IO Docs](https://vtex.io/docs): https://github.com/vtex-apps/docs-ui\n\n```",
"role": "assistant"
}
] |
code_product-gifts_5bad3f51
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Product Gift Text.Test component in my VTEX store?",
"role": "user"
},
{
"content": "Here's the react component:\n\n```tsx\n/* eslint-disable jest/no-mocks-import */\nimport React from 'react'\nimport { act } from 'react-dom/test-utils'\nimport wait from 'waait'\n\nimport ProductGifts from '../ProductGifts'\nimport GiftText from '../GiftText'\nimport ProductGiftList from '../ProductGiftList'\nimport ProductGiftImage from '../ProductGiftImage'\nimport { itemWithThreeGifts } from '../__mocks__/products'\nimport { renderWithProductContext } from '../__mocks__/testUtils'\nimport { productGiftsQueryResultWithThreeGifts } from '../__mocks__/productGiftsQueryResult'\n\ndescribe('ProductGiftText component', () => {\n it('should pass the correct values to IOMessage component', async () => {\n const { queryByText } = renderWithProductContext({\n Component: (\n <ProductGifts maxVisibleItems={1}>\n <GiftText text=\"This is a message ID\" />\n <ProductGiftList>\n <ProductGiftImage />\n </ProductGiftList>\n </ProductGifts>\n ),\n selectedItem: itemWithThreeGifts,\n productId: '3',\n graphqlConfig: {\n identifier: '3',\n result: productGiftsQueryResultWithThreeGifts,\n },\n })\n\n /**\n * This is necessary because of state changes triggered by react-apollo hooks\n * */\n await act(async () => {\n await wait(0)\n })\n\n const expectedValues = {\n totalGifts: 3,\n exceedingItems: 2,\n visibleItems: 1,\n }\n const expectedId = 'This is a message ID'\n\n const expectedStringResult = `Received message id: ${expectedId} and the following values (totalGifts, exceedingItems, visibleItems): ${Object.values(\n expectedValues\n )}`\n\n expect(queryByText(expectedStringResult)).toBeDefined()\n })\n})\n\n```",
"role": "assistant"
}
] |
synthetic_store-drawer_14_171870c6
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms. You provide detailed, accurate answers with working code examples.",
"role": "system"
},
{
"content": "How do I make store-drawer responsive?",
"role": "user"
},
{
"content": "The drawer has built-in responsive behavior, but you can enhance it with responsive props and CSS:\n\n**Code Example:**\n\n```jsonc\n// Using responsive backdropMode\n{\n \"drawer\": {\n \"children\": [\"menu#drawer\"],\n \"props\": {\n \"maxWidth\": \"80vw\",\n \"backdropMode\": {\n \"desktop\": \"visible\",\n \"tablet\": \"visible\",\n \"phone\": \"none\"\n }\n }\n }\n}\n```\n\n```css\n/* styles/css/vtex.store-drawer.css */\n\n/* Mobile-first responsive styles */\n.drawer {\n width: 100vw;\n max-width: 100vw;\n}\n\n/* Tablet and up */\n@media screen and (min-width: 768px) {\n .drawer {\n width: 400px;\n max-width: 400px;\n }\n}\n\n/* Desktop */\n@media screen and (min-width: 1024px) {\n .drawer {\n width: 450px;\n max-width: 450px;\n }\n}\n\n/* Full width on small phones */\n@media screen and (max-width: 375px) {\n .drawer {\n width: 100% !important;\n max-width: 100% !important;\n }\n}\n\n/* Adjust close button size for touch */\n@media screen and (max-width: 768px) {\n .closeIconButton {\n padding: 16px;\n min-height: 48px;\n min-width: 48px;\n }\n}\n\n/* Better touch scrolling on mobile */\n@media screen and (max-width: 768px) {\n .drawerContent {\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n }\n}\n```\n\n**Using isFullWidth for mobile:**\n\n```jsonc\n{\n \"drawer#mobile-full\": {\n \"children\": [\"menu#drawer\"],\n \"props\": {\n \"isFullWidth\": true,\n \"slideDirection\": \"horizontal\"\n }\n }\n}\n```\n\n---",
"role": "assistant"
}
] |
code_community_67094d1f
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the resolver implementation for community.",
"role": "user"
},
{
"content": "The implementation is:\n\n```typescript\nimport { DocumentNode, execute, GraphQLSchema } from 'graphql'\n\nimport { IOClients } from '../../../../clients/IOClients'\nimport { ParamsContext, RecorderState, ServiceContext } from '../typings'\n\nexport interface Query {\n variables?: Record<string, any>\n operationName?: string\n document: DocumentNode\n}\n\ntype TypeFromPromise<T> = T extends Promise<infer U> ? U : T\n\nexport type GraphQLResponse = TypeFromPromise<ReturnType<typeof execute>>\n\nexport interface GraphQLCacheControl {\n maxAge: number\n scope: 'private' | 'public' | 'segment'\n noCache: boolean\n noStore: boolean\n}\n\nexport interface GraphQLContext extends ParamsContext {\n graphql: {\n query?: Query\n graphqlResponse?: GraphQLResponse\n status: 'success' | 'error'\n cacheControl: GraphQLCacheControl\n }\n}\n\nexport type GraphQLServiceContext = ServiceContext<IOClients, RecorderState, GraphQLContext>\n\nexport interface ExecutableSchema {\n schema: GraphQLSchema\n hasProvider: boolean\n provider?: string\n}\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_303a4f80
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of store-on-localhost/src/monobloco/components/new/VtexId/service-components/RedirectLogout.js from store-on-localhost.",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```javascript\nimport PropTypes from 'prop-types'\nimport { Services } from '../utils'\n\nconst RedirectLogout = ({ children, returnUrl }) =>\n children({ action: () => Services.redirectLogout({ returnUrl }) })\n\nRedirectLogout.propTypes = {\n children: PropTypes.func.isRequired,\n returnUrl: PropTypes.string,\n}\n\nexport default RedirectLogout\n\n```",
"role": "assistant"
}
] |
code_store-on-localhost_0b6de772
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Show me the implementation of store-on-localhost/src/monobloco/components/new/ProductSummary/components/ProductSummaryContext.js from store-on-localhost.",
"role": "user"
},
{
"content": "Here's how it works:\n\n```javascript\nimport React, { createContext } from 'react'\n\nconst ProductSummaryContext = createContext(0)\n\nconst OriginalConsumer = ProductSummaryContext.Consumer\nProductSummaryContext.Consumer = function WrappedConsumer(props) {\n console.error(\n \"If you are seeing this, a component it's using ProductSummaryContext from vtex.product-summary, which is deprecated. Please see the issue https://github.com/vtex-apps/store-issues#28 on how to migrate to the new component.\"\n )\n\n return <OriginalConsumer {...props} />\n}\n\nexport default ProductSummaryContext\n\n```",
"role": "assistant"
}
] |
code_b2cstoreqa.theme_451c2b6d
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I style components in b2cstoreqa.theme?",
"role": "user"
},
{
"content": "Here's the styles:\n\n```css\n.removeButtonContainer {\n display: flex;\n justify-content: flex-end;\n}\n\n.productName--minicart {\n color: var(--black-dark);\n font-size: 14px;\n line-height: 18px;\n}\n\n.productImage {\n height: 48px;\n object-fit: contain;\n width: 48px;\n}\n\n.productImageAnchor {\n display: block;\n}\n\n.productImageContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n```",
"role": "assistant"
}
] |
code_checkout-resources_22b6570f
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "How do I implement the Use Checkout Url component in my VTEX store?",
"role": "user"
},
{
"content": "Here's the implementation:\n\n```tsx\nimport { useQuery } from 'react-apollo'\n\nimport installedApp from './graphql/installedApp.graphql'\n\nconst CHECKOUT_URL = {\n V0: '/checkout/#/cart',\n V1: '/cart',\n}\n\nexport const useCheckoutURL = () => {\n const { data } = useQuery(installedApp, {\n ssr: false,\n variables: {\n slug: 'vtex.checkout',\n },\n })\n\n const version = data?.installedApp?.version\n const major = version && parseInt(version.split('.')[0])\n\n return {\n url: major > 0 ? CHECKOUT_URL.V1 : CHECKOUT_URL.V0,\n major,\n }\n}\n\n```",
"role": "assistant"
}
] |
code_vtex-ads_998fd790
|
[
{
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms.",
"role": "system"
},
{
"content": "Explain the code in vtex-ads/react/components/Products/styles.ts.",
"role": "user"
},
{
"content": "This is the code:\n\n```typescript\nimport styled from 'styled-components'\n\nexport const Container = styled.div``\n\n```",
"role": "assistant"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.