id
stringlengths
12
53
messages
listlengths
3
3
code_inactive-sku_3bade3cd
[ { "role": "system", "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": "user", "content": "Show me the implementation of inactive-sku/dangerfile.js from the inactive-sku VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// dangerfile.js\nconst { verify } = require('@vtex/danger')\n\nconst config = {\n // Set to true to enforce keepachangelog rules.\n keepachangelog: {\n changeVersion: false,\n },\n rules: {\n description: ['fail', { minLength: 20 }],\n assignee: 'fail',\n reviewers: 'fail',\n pr_size: ['warn', { additionLimit: 800, deletionLimit: -1 }],\n lock_file: 'warn',\n no_ignored_test: ['fail', { pattern: /test|spec/i }],\n no_debugger: ['fail', { pattern: /\\.[tj]sx?$/i }],\n enforce_graphql_provider: 'off',\n },\n}\n\nverify(config)\n\n```" } ]
code_inactive-sku_af6754cc
[ { "role": "system", "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": "user", "content": "Show me the implementation of inactive-sku/package.json from the inactive-sku VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"test-link-fixer\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.12.21\",\n \"@vtex/prettier-config\": \"^0.3.1\",\n \"@vtex/danger\": \"^0.2.7\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.7.0\",\n \"husky\": \"^4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^2.0.5\",\n \"typescript\": \"^3.9.6\"\n }\n}\n\n```" } ]
code_inactive-sku_dcf1922c
[ { "role": "system", "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": "user", "content": "Show me the implementation of inactive-sku/manifest.json from the inactive-sku VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"inactive-sku\",\n \"vendor\": \"vtex\",\n \"version\": \"1.0.2\",\n \"title\": \"inactive SKu\",\n \"description\": \"Inactive sku without images\",\n \"dependencies\": {},\n \"builders\": {\n \"node\": \"6.x\",\n \"docs\": \"0.x\"\n },\n \"scripts\": {},\n \"credentialType\": \"absolute\",\n \"policies\": [\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"portal.vtexcommercestable.com.br\",\n \"path\": \"/api/catalog/*\"\n }\n },\n {\n \"name\": \"colossus-fire-event\"\n },\n {\n \"name\": \"colossus-write-logs\"\n },\n {\n \"name\": \"vbase-read-write\"\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_easy-shipping-setup_85bcc9d1
[ { "role": "system", "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": "user", "content": "Show me the implementation of easy-shipping-setup/README.md from the easy-shipping-setup VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# easy-shipping-setup\n\nSimple shipping setup application to setup one carrier with one dock, single delivery price and a max shipping promotion.\n\n\n\nThis app and all affiliated services are provided “as is”, without warranty of any kind, either express or implied. Neither the publisher nor its partners, affiliates, employees, or contractors guarantee that this app will meet your requirements, provide uninterrupted use, or operate without delay or without error. Neither the publisher nor its partners, affiliates, employees, or contractors assume any responsibility for any errors and malfunctions within the app and will not provide support or maintenance of any kind.\n \n\nAll provisions and warranties of any kind, express or implied, including but not limited to any guarantees of performance, process integrity, or particular functionalities, are hereby disclaimed and excluded unless otherwise prohibited or restricted by applicable law.\n\n_Developed under EE FPA._\n\n```" } ]
code_easy-shipping-setup_a55d7b45
[ { "role": "system", "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": "user", "content": "Show me the implementation of easy-shipping-setup/package.json from the easy-shipping-setup VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"version\": \"0.0.0\",\n \"name\": \"shipping-strategy\",\n \"private\": false,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"intl-equalizer\": {\n \"referenceLocale\": \"en\",\n \"localeDirectory\": \"messages\"\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/intl-equalizer\": \"^2.5.0\",\n \"@vtex/prettier-config\": \"^0.3.5\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.11\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"husky\": \"^4.3.0\",\n \"lint-staged\": \"^10.5.1\",\n \"prettier\": \"^2.2.0\",\n \"typescript\": \"^3.9.6\"\n }\n}\n\n```" } ]
code_easy-shipping-setup_ab5b0464
[ { "role": "system", "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": "user", "content": "Show me the implementation of easy-shipping-setup/manifest.json from the easy-shipping-setup VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"easy-shipping-setup\",\n \"version\": \"1.0.2\",\n \"title\": \"Easy Shipping Setup\",\n \"description\": \"Display the shipping settings to sellers and allow certain data manipulation\",\n \"builders\": {\n \"react\": \"3.x\",\n \"admin\": \"0.x\",\n \"messages\": \"1.x\",\n \"node\": \"6.x\",\n \"docs\": \"0.x\",\n \"graphql\": \"1.x\"\n },\n \"dependencies\": {\n \"vtex.styleguide\": \"9.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"policies\": [\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"{{account}}.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"portal.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"logistics.vtexcommercestable.com.br\",\n \"path\": \"/api/logistics/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"app.io.vtex.com\",\n \"path\": \"*\"\n }\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_fixed-prices-app_56a931c2
[ { "role": "system", "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": "user", "content": "Show me the implementation of fixed-prices-app/dangerfile.js from the fixed-prices-app VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// dangerfile.js\nconst { verify } = require('@vtex/danger')\n\nconst config = {\n // Set to true to enforce keepachangelog rules.\n keepachangelog: {\n changeVersion: false,\n },\n rules: {\n description: ['fail', { minLength: 20 }],\n assignee: 'fail',\n reviewers: 'fail',\n pr_size: ['warn', { additionLimit: 800, deletionLimit: -1 }],\n lock_file: 'warn',\n no_ignored_test: ['fail', { pattern: /test|spec/i }],\n no_debugger: ['fail', { pattern: /\\.[tj]sx?$/i }],\n enforce_graphql_provider: 'off',\n },\n}\n\nverify(config)\n\n```" } ]
code_fixed-prices-app_024f8280
[ { "role": "system", "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": "user", "content": "Show me the implementation of fixed-prices-app/package.json from the fixed-prices-app VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"fixed-app\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ],\n \"messages/*.json\": [\n \"yarn lint:locales\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/intl-equalizer\": \"^2.5.0\",\n \"@vtex/prettier-config\": \"^0.3.5\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.11\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"@vtex/danger\": \"^0.2.7\",\n \"@types/node\": \"^12.12.21\",\n \"husky\": \"^4.3.6\",\n \"lint-staged\": \"^10.5.3\",\n \"prettier\": \"^2.2.1\",\n \"typescript\": \"^3.7.5\"\n },\n \"version\": \"0.0.0\",\n \"intl-equalizer\": {\n \"referenceLocale\": \"en\",\n \"localeDirectory\": \"messages\"\n }\n}\n```" } ]
code_fixed-prices-app_14f6f355
[ { "role": "system", "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": "user", "content": "Show me the implementation of fixed-prices-app/manifest.json from the fixed-prices-app VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtexarg\",\n \"name\": \"fixed-app\",\n \"version\": \"2.0.0\",\n \"title\": \"Fixed app\",\n \"description\": \"Fixed app\",\n \"builders\": {\n \"react\": \"3.x\",\n \"messages\": \"1.x\",\n \"store\": \"0.x\",\n \"node\": \"6.x\",\n \"docs\": \"0.x\",\n \"graphql\": \"1.x\"\n },\n \"dependencies\": {\n \"vtex.store-graphql\": \"2.x\",\n \"vtex.search-graphql\": \"0.x\",\n \"vtex.product-context\": \"0.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"credentialType\": \"absolute\",\n \"billingOptions\": {\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n },\n \"type\": \"free\",\n \"availableCountries\": [\n \"*\"\n ]\n },\n \"policies\": [\n {\n \"name\": \"colossus-fire-event\"\n },\n {\n \"name\": \"colossus-write-logs\"\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"{{account}}.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"portal.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"api.vtex.com\",\n \"path\": \"/{{account}}/pricing/prices/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"api.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"*\",\n \"path\": \"*\"\n }\n },\n {\n \"name\": \"read_prices\"\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_checkout-profile_bc67d724
[ { "role": "system", "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": "user", "content": "Show me the implementation of checkout-profile/package.json from the checkout-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"checkout-profile\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,js,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"eslint-config-vtex-react\": \"^6.2.1\",\n \"husky\": \"^4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^1.19.1\",\n \"typescript\": \"^3.7.5\"\n },\n \"version\": \"0.0.0\"\n}\n\n```" } ]
code_checkout-profile_916d5373
[ { "role": "system", "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": "user", "content": "Show me the implementation of checkout-profile/manifest.json from the checkout-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"checkout-profile\",\n \"version\": \"0.3.1\",\n \"title\": \"Checkout Profile\",\n \"description\": \"Profile form and summary used in Checkout\",\n \"builders\": {\n \"docs\": \"0.x\",\n \"messages\": \"1.x\",\n \"react\": \"3.x\"\n },\n \"dependencies\": {\n \"vtex.checkout-container\": \"0.x\",\n \"vtex.country-data-settings\": \"0.x\",\n \"vtex.document-field\": \"0.x\",\n \"vtex.order-manager\": \"0.x\",\n \"vtex.order-profile\": \"0.x\",\n \"vtex.phone-field\": \"0.x\",\n \"vtex.styleguide\": \"9.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_antifraud-provider-tests_0fbfc89e
[ { "role": "system", "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": "user", "content": "Show me the implementation of antifraud-provider-tests/Anti-Fraud Webhook Mock.postman_collection.json from the antifraud-provider-tests VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n\t\"info\": {\n\t\t\"_postman_id\": \"4d55be4a-ce5e-46f1-99c7-4866b09b6828\",\n\t\t\"name\": \"Anti-fraud Webhook Mock\",\n\t\t\"schema\": \"https://schema.getpostman.com/json/collection/v2.1.0/collection.json\",\n\t\t\"_exporter_id\": \"20194184\"\n\t},\n\t\"item\": [\n\t\t{\n\t\t\t\"name\": \"Status hook\",\n\t\t\t\"event\": [\n\t\t\t\t{\n\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"request\": {\n\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\"header\": [],\n\t\t\t\t\"body\": {\n\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\"raw\": \"\",\n\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"url\": {\n\t\t\t\t\t\"raw\": \"{{url}}/antifraud-provider/transactions/:requestId/hook?accountName={{accountName}}\",\n\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\"{{url}}\"\n\t\t\t\t\t],\n\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\"antifraud-provider\",\n\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\":requestId\",\n\t\t\t\t\t\t\"hook\"\n\t\t\t\t\t],\n\t\t\t\t\t\"query\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"key\": \"accountName\",\n\t\t\t\t\t\t\t\"value\": \"{{accountName}}\"\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"variable\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"key\": \"requestId\",\n\t\t\t\t\t\t\t\"value\": null\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"response\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Ok\",\n\t\t\t\t\t\"originalRequest\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{url}}/antifraud-provider/transactions/:requestId/hook?accountName={{accountName}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{url}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"antifraud-provider\",\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\":requestId\",\n\t\t\t\t\t\t\t\t\"hook\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"query\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"key\": \"accountName\",\n\t\t\t\t\t\t\t\t\t\"value\": \"{{accountName}}\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"variable\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"key\": \"requestId\",\n\t\t\t\t\t\t\t\t\t\"value\": null\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"status\": \"OK\",\n\t\t\t\t\t\"code\": 200,\n\t\t\t\t\t\"_postman_previewlanguage\": null,\n\t\t\t\t\t\"header\": null,\n\t\t\t\t\t\"cookie\": [],\n\t\t\t\t\t\"body\": null\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"variable\": [\n\t\t{\n\t\t\t\"key\": \"url\",\n\t\t\t\"value\": \"https://2b3b0d4c-87ea-40d2-8be5-5a55c0827039.mock.pstmn.io\"\n\t\t}\n\t]\n}\n```" } ]
code_antifraud-provider-tests_0a284184
[ { "role": "system", "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": "user", "content": "Show me the implementation of antifraud-provider-tests/README.md from the antifraud-provider-tests VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Anti-fraud Provider Tests\n\n## Disclaimer\n\nHere you can find the Postman assets that will allow you to test the implementation of an Anti-fraud provider, following the [same instructions and test cases](https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works) previously available on the Anti-Fraud Provider Test Suite app.\nThe collection is organized into folders that represent each test case. The requests required to run each test case are in organized in order.\n\nYou will need the tree files available here:\n- Collection\n- Environment\n- Mock Server\n\nIn the following section, you will be guided on how to setup each step.\n\n![Test Results](test-results.png)\n\n## Getting Started: Setting up the mock server\n\n[Import the collection \"Anti-Fraud Webhook Mock\".](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-postman-data)\n\nThe mock server is required for sending the webhook calls.\n\n[Create a mock from the collection.](https://learning.postman.com/docs/designing-and-developing-your-api/mocking-data/setting-up-mock/#creating-a-mock-from-a-collection)\n\nAlso, make sure to copy the Mock URL for later use.\n\n## Getting Started: Environment Variables\n\n[Import the environment.](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-postman-data)\n\nSet the values for the variables:\n - serviceUrl: URL of your provider service.\n - appKey and appToken: credential values that the merchant will configure to authenticate with the provider. They are sent in all requests as X-PROVIDER-API-AppKey and X-PROVIDER-API-AppToken headers.\n - accountName: the name of the VTEX account that will be processing payments with this anti-fraud provider.\n - mockServerAddress: the Mock URL copied in the previous step.\n\n\n## Running the Tests\n\n[Import the collection \"Anti-Fraud Test Suite\".](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-postman-data)\n\n[Run the collection.](https://learning.postman.com/docs/collections/running-collections/intro-to-collection-runs/)\n\nWe recommend using a **2000ms delay** between requests.\n\n```" } ]
code_antifraud-provider-tests_036781a6
[ { "role": "system", "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": "user", "content": "Show me the implementation of antifraud-provider-tests/Anti-Fraud Test Suite.postman_environment.json from the antifraud-provider-tests VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n\t\"id\": \"61100912-d469-4fce-a9b9-268829c47d73\",\n\t\"name\": \"Anti-Fraud Test Suite\",\n\t\"values\": [\n\t\t{\n\t\t\t\"key\": \"serviceUrl\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"appKey\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"appToken\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"accountName\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"requestId\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"mockServerAddress\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"default\",\n\t\t\t\"enabled\": true\n\t\t},\n\t\t{\n\t\t\t\"key\": \"webhookUrl\",\n\t\t\t\"value\": \"\",\n\t\t\t\"type\": \"any\",\n\t\t\t\"enabled\": true\n\t\t}\n\t],\n\t\"_postman_variable_scope\": \"environment\",\n\t\"_postman_exported_at\": \"2023-06-27T16:44:39.202Z\",\n\t\"_postman_exported_using\": \"Postman/10.11.2\"\n}\n```" } ]
code_antifraud-provider-tests_319dfff5
[ { "role": "system", "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": "user", "content": "Show me the implementation of antifraud-provider-tests/Anti-fraud Test Suite.postman_collection.json from the antifraud-provider-tests VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n\t\"info\": {\n\t\t\"_postman_id\": \"23b7eb5b-69fe-4276-b829-415fe958df20\",\n\t\t\"name\": \"Anti-fraud Test Suite\",\n\t\t\"schema\": \"https://schema.getpostman.com/json/collection/v2.1.0/collection.json\",\n\t\t\"_exporter_id\": \"20194184\"\n\t},\n\t\"item\": [\n\t\t{\n\t\t\t\"name\": \"Authorize\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}1\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is approved\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('approved');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Deny\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}2\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is denied\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('denied');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Async Authorize\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}3\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Undefined\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is undefined\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('undefined');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Approved\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is approved\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('approved');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Async Deny\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}4\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Undefined\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is undefined\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('undefined');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Denied\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is denied\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('denied');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Async Authorize Hook\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}5\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"// set hook to env\",\n\t\t\t\t\t\t\t\t\t\"var jsonData = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"webhookUrl\\\", jsonData.hook);\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Undefined\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is undefined\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('undefined');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Status Notification Webhook\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"tid\\\": \\\"{{$guid}}\\\",\\n \\\"status\\\": \\\"approved\\\",\\n \\\"code\\\": \\\"async\\\",\\n \\\"message\\\": \\\"Low risk of fraud\\\",\\n \\\"analysisType\\\": \\\"automatic\\\",\\n \\\"score\\\": 5.01,\\n \\\"responses\\\": {\\n \\\"customIdentifier\\\": \\\"test\\\"\\n }\\n}\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{mockServerAddress}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"antifraud-provider\",\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\",\n\t\t\t\t\t\t\t\t\"hook\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"query\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"key\": \"accountName\",\n\t\t\t\t\t\t\t\t\t\"value\": \"{{accountName}}\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Approved\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is approved\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('approved');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Async Deny Hook\",\n\t\t\t\"item\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"SendAntifraudDataRequest\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"prerequest\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"const guid = pm.variables.replaceIn(\\\"{{$guid}}6\\\");\",\n\t\t\t\t\t\t\t\t\t\"const formattedGuid = guid.replace(/-/g, '').toUpperCase()\",\n\t\t\t\t\t\t\t\t\t\"pm.environment.set(\\\"requestId\\\", formattedGuid);\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200 or 201\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(pm.response.code).to.be.oneOf([200,201]);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response status should be 'received'\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('received');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"reference\\\": \\\"{{$guid}}\\\",\\n \\\"value\\\": 150.6,\\n \\\"ip\\\": \\\"192.168.0.1\\\",\\n \\\"deviceFingerprint\\\": \\\"12ade389087fexd\\\",\\n \\\"miniCart\\\": {\\n \\\"buyer\\\": {\\n \\\"id\\\": null,\\n \\\"firstName\\\": \\\"John\\\",\\n \\\"lastName\\\": \\\"Doe\\\",\\n \\\"document\\\": \\\"01234567890\\\",\\n \\\"documentType\\\": \\\"CPF\\\",\\n \\\"email\\\": \\\"john.doe@example.com\\\",\\n \\\"phone\\\": \\\"+5521987654321\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Brig. Faria Lima Avenue\\\",\\n \\\"number\\\": \\\"4440\\\",\\n \\\"complement\\\": \\\"10th Floor\\\",\\n \\\"neighborhood\\\": \\\"Itaim Bibi\\\",\\n \\\"postalCode\\\": \\\"04538132\\\",\\n \\\"city\\\": \\\"São Paulo\\\",\\n \\\"state\\\": \\\"SP\\\"\\n }\\n },\\n \\\"shipping\\\": {\\n \\\"value\\\": 10.3,\\n \\\"estimatedDate\\\": \\\"2017-08-02T14:46:47\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n },\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"132981\\\",\\n \\\"name\\\": \\\"Some useful product\\\",\\n \\\"price\\\": 140.3,\\n \\\"quantity\\\": 1,\\n \\\"deliveryType\\\": \\\"Normal\\\",\\n \\\"deliverySlaInMinutes\\\": 4320,\\n \\\"categoryId\\\": \\\"111\\\",\\n \\\"categoryName\\\": \\\"Electronics\\\",\\n \\\"discount\\\": 0\\n }\\n ],\\n \\\"taxValue\\\": 0,\\n \\\"listRegistry\\\": {\\n \\\"name\\\": \\\"My Wedding List\\\",\\n \\\"deliveryToOwner\\\": false\\n }\\n },\\n \\\"payments\\\": [\\n {\\n \\\"id\\\": \\\"{{$guid}}\\\",\\n \\\"method\\\": \\\"CreditCard\\\",\\n \\\"name\\\": \\\"Visa\\\",\\n \\\"value\\\": 150.6,\\n \\\"installments\\\": 3,\\n \\\"details\\\": {\\n \\\"bin\\\": \\\"486902\\\",\\n \\\"lastDigits\\\": \\\"8214\\\",\\n \\\"holder\\\": \\\"John Doe\\\",\\n \\\"address\\\": {\\n \\\"country\\\": \\\"BRA\\\",\\n \\\"street\\\": \\\"Praia de Botafogo St.\\\",\\n \\\"number\\\": \\\"300\\\",\\n \\\"complement\\\": \\\"3rd Floor\\\",\\n \\\"neighborhood\\\": \\\"Botafogo\\\",\\n \\\"postalCode\\\": \\\"22250040\\\",\\n \\\"city\\\": \\\"Rio de Janeiro\\\",\\n \\\"state\\\": \\\"RJ\\\"\\n }\\n }\\n }\\n ],\\n \\\"hook\\\": \\\"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\\\"\\n}\\n\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Undefined\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is undefined\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('undefined');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Status Notification Webhook\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppKey\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appKey}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-AppToken\",\n\t\t\t\t\t\t\t\t\"value\": \"{{appToken}}\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\n \\\"id\\\": \\\"{{requestId}}\\\",\\n \\\"tid\\\": \\\"{{$guid}}\\\",\\n \\\"status\\\": \\\"denied\\\",\\n \\\"code\\\": \\\"async\\\",\\n \\\"message\\\": \\\"Extremely risky\\\",\\n \\\"analysisType\\\": \\\"automatic\\\",\\n \\\"score\\\": 99.01,\\n \\\"responses\\\": {\\n \\\"customIdentifier\\\": \\\"test\\\"\\n }\\n}\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{mockServerAddress}}/antifraud-provider/transactions/{{requestId}}/hook?accountName={{accountName}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{mockServerAddress}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"antifraud-provider\",\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\",\n\t\t\t\t\t\t\t\t\"hook\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"query\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"key\": \"accountName\",\n\t\t\t\t\t\t\t\t\t\"value\": \"{{accountName}}\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"GetAntifraudStatus - Denied\",\n\t\t\t\t\t\"event\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"listen\": \"test\",\n\t\t\t\t\t\t\t\"script\": {\n\t\t\t\t\t\t\t\t\"exec\": [\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Status code is 200\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" pm.response.to.have.status(200);\",\n\t\t\t\t\t\t\t\t\t\"});\",\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\t\"pm.test(\\\"Response Status is denied\\\", function () {\",\n\t\t\t\t\t\t\t\t\t\" var response = pm.response.json();\",\n\t\t\t\t\t\t\t\t\t\" pm.expect(response.status).to.be.equal('denied');\",\n\t\t\t\t\t\t\t\t\t\"});\"\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"type\": \"text/javascript\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"key\": \"X-PROVIDER-API-IS-TESTSUITE\",\n\t\t\t\t\t\t\t\t\"value\": \"true\",\n\t\t\t\t\t\t\t\t\"type\": \"text\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{serviceUrl}}/transactions/{{requestId}}\",\n\t\t\t\t\t\t\t\"host\": [\n\t\t\t\t\t\t\t\t\"{{serviceUrl}}\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": [\n\t\t\t\t\t\t\t\t\"transactions\",\n\t\t\t\t\t\t\t\t\"{{requestId}}\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": []\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}\n```" } ]
code_checkout-components_38715df9
[ { "role": "system", "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": "user", "content": "Show me the implementation of checkout-components/package.json from the checkout-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"checkout-components\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"eslint-config-vtex-react\": \"^6.2.1\",\n \"husky\": \"^4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^2.1.2\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_checkout-components_10d881ef
[ { "role": "system", "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": "user", "content": "Show me the implementation of checkout-components/manifest.json from the checkout-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"checkout-components\",\n \"version\": \"0.5.1\",\n \"builders\": {\n \"docs\": \"0.x\",\n \"react\": \"3.x\"\n },\n \"dependencies\": {\n \"vtex.styleguide\": \"9.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_edition-hello_b5776b0b
[ { "role": "system", "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": "user", "content": "Show me the implementation of edition-hello/README.md from the edition-hello VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Hello Editions #\n\nA quick setup for an edition app in VTEX.\n\n### Getting Started ###\n\n#### Clone ####\n\nTo clone this repository simply run `vtex init` and choose the `edition app` option.\n\nIf you don't have `vtex` toolbelt installed, you can also clone it manually:\n\n```\n$ git clone https://github.com/vtex/edition-hello edition-hello\n$ cd edition-hello\n```\n\n#### Manifest definition ####\n\nAfter that, you need to, in the `manifest.json`:\n - Change the `vendor` and `name` to your preferred choice\n - By convention, we name any edition app with an `edition-` prefix, like `edition-hello` or `edition-global`\n - Set the appropriate parent edition in the `dependencies` field (must be published by the vendor's sponsor)\n\n#### Adding apps for sub-accounts ####\n\nThen, you can specify apps to be installed in the sub-accounts that have this edition configured.\nYou do that through the `edition/apps.json` file, adding an entry to the object under the `apps` key\nin the format:\n\n```\n \"<vendor>.<name>\": {\n \"major\": <desired major>,\n \"settings\": <initial settings>\n }\n```\n\nThe settings are optional and can be omitted, but they will define the initial settings that should be\nconfigured for the app when it is installed through the current edition.\n\ne.g.: The contents of the `apps.json` file could be:\n```\n{\n \"apps\": {\n \"vtex.node-getting-started\": { \"major\": 0 }\n }\n}\n```\n\n#### Testing ####\n\nBe sure to have [VTEX's toolbelt](https://github.com/vtex/toolbelt)\ninstalled.\n\nEdition apps are not link-able, so to test you have to launch a pre-release versions and set them\non test accounts or workspaces for validation. To do so:\n - Launch a pre-release of your edition: `vtex release patch beta`\n - Check the edition of current account/workspace: `vtex edition`\n - Set the edition in current account/workspace: `vtex edition set <edition>@<version>`\n - All the apps configured in the `apps.json` file will be automatically installed in that\n workspace where the edition was set. You can validate that by inspecting the `vtex ls`\n command output.\n```" } ]
code_edition-hello_fe3e571b
[ { "role": "system", "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": "user", "content": "Show me the implementation of edition-hello/manifest.json from the edition-hello VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"edition-hello\",\n \"version\": \"0.1.1\",\n \"title\": \"Getting Started with VTEX Edition Apps\",\n \"description\": \"A sample edition app with a blank apps.json\",\n \"builders\": {\n \"edition\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.edition-business\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_locale-switcher_fc0bca6a
[ { "role": "system", "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": "user", "content": "Show me the implementation of locale-switcher/package.json from the locale-switcher VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"locale-switcher\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,js,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.0.3\",\n \"eslint-config-vtex-react\": \"^6.0.3\",\n \"husky\": \"^4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^1.19.1\",\n \"react\": \"^16.12.0\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_locale-switcher_ff1045aa
[ { "role": "system", "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": "user", "content": "Show me the implementation of locale-switcher/manifest.json from the locale-switcher VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"locale-switcher\",\n \"version\": \"0.5.6\",\n \"title\": \"Locale Switcher\",\n \"description\": \"Locale Switcher\",\n \"defaultLocale\": \"pt-BR\",\n \"builders\": {\n \"messages\": \"1.x\",\n \"store\": \"0.x\",\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"mustUpdateAt\": \"2019-05-28\",\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"dependencies\": {\n \"vtex.styleguide\": \"9.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.css-handles\": \"0.x\",\n \"vtex.tenant-graphql\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_list-context_361dfeb0
[ { "role": "system", "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": "user", "content": "Show me the implementation of list-context/package.json from the list-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"list-context\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --quiet --fix --ext ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"test\": \"cd ./react && yarn test\",\n \"verify\": \"yarn lint && yarn test\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"yarn lint\",\n \"pre-push\": \"yarn verify\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"@vtex/tsconfig\": \"^0.4.4\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"eslint-config-vtex-react\": \"^6.2.1\",\n \"husky\": \"^4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^1.19.1\",\n \"typescript\": \"^3.7.5\"\n },\n \"version\": \"0.1.0\"\n}\n\n```" } ]
code_list-context_f86856ed
[ { "role": "system", "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": "user", "content": "Show me the implementation of list-context/manifest.json from the list-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"list-context\",\n \"version\": \"0.2.1\",\n \"title\": \"VTEX List Context\",\n \"description\": \"Interfaces that enable the use of list-contexts in VTEX IO Store Framework\",\n \"builders\": {\n \"store\": \"0.x\",\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.native-types\": \"0.x\",\n \"vtex.css-handles\": \"1.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"policies\": [],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_search-result_572b513b
[ { "role": "system", "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": "user", "content": "Show me the implementation of search-result/package.json from the search-result VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"search-result\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"test\": \"cd ./react && yarn test\",\n \"prepare\": \"husky install\"\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"babel-eslint\": \"^10.1.0\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.10\",\n \"eslint-config-vtex-react\": \"^6.8.2\",\n \"husky\": \"^8.0.0\",\n \"lint-staged\": \"^13.0.3\",\n \"prettier\": \"^2.3.2\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_search-result_3a59bd70
[ { "role": "system", "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": "user", "content": "Show me the implementation of search-result/manifest.json from the search-result VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"search-result\",\n \"vendor\": \"vtex\",\n \"version\": \"3.143.0\",\n \"title\": \"VTEX Search Result\",\n \"description\": \"A search result wrapper component\",\n \"mustUpdateAt\": \"2019-04-25\",\n \"registries\": [\n \"smartcheckout\"\n ],\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"builders\": {\n \"react\": \"3.x\",\n \"messages\": \"1.x\",\n \"store\": \"0.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.store-graphql\": \"2.x\",\n \"vtex.store-resources\": \"0.x\",\n \"vtex.store-components\": \"3.x\",\n \"vtex.native-types\": \"0.x\",\n \"vtex.breadcrumb\": \"1.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.shelf\": \"1.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.shop-review-interfaces\": \"0.x\",\n \"vtex.pixel-manager\": \"1.x\",\n \"vtex.format-currency\": \"0.x\",\n \"vtex.device-detector\": \"0.x\",\n \"vtex.rich-text\": \"0.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.tab-layout\": \"0.x\",\n \"vtex.search-page-context\": \"0.x\",\n \"vtex.blog-interfaces\": \"0.x\",\n \"vtex.responsive-values\": \"0.x\",\n \"vtex.css-handles\": \"0.x\",\n \"vtex.store-drawer\": \"0.x\",\n \"vtex.product-list-context\": \"0.x\",\n \"vtex.structured-data\": \"0.x\",\n \"vtex.shipping-option-components\": \"1.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_wishlist_0bf1e0ac
[ { "role": "system", "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": "user", "content": "Show me the implementation of wishlist/README.md from the wishlist VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Deprecated - VTEX Wishlist app\n\n:warning: This app is no longer maintained and shouldn't be used by any store.\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n\n## Description\n\nThe Wishlist is a native app that any VTEX store can use. This app is responsible for managing the customer's lists of products.\n\n:loudspeaker: **Disclaimer:** Don't fork this project; use, contribute, or open issue with your feature request.\n\n## Release schedule\n\n| Release | Status | Initial Release | Maintenance LTS Start | End-of-life | Store Compatibility |\n| :-----: | :-----------------: | :-------------: | :-------------------: | :---------: | :-----------------: |\n| [0.x] | **Current Release** | 2019-04-03 | | | 2.x |\n\nSee our [LTS policy](https://github.com/vtex-apps/awesome-io#lts-policy) for more information.\n\n## Table of Contents\n\n- [Usage](#usage)\n - [Blocks API](#blocks-api)\n - [Configuration](#configuration)\n - [Styles API](#styles-api)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [Tests](#tests)\n\n## Usage\n\nThis app uses our store builder with the blocks architecture. To know more about Store Builder [click here.](https://help.vtex.com/en/tutorial/understanding-storebuilder-and-stylesbuilder#structuring-and-configuring-our-store-with-object-object)\n\nTo use this app, you need to add it in your `dependencies` in the `manifest.json` file.\n\n```json\n dependencies: {\n \"vtex.wishlist\": \"0.x\"\n }\n```\n\nThen, if you want to add the _Add to List_ button in your app, you just need to add the `add-to-list-btn` block into our app theme. You also can add a menu item with a link to redirect to the lists page. To do that, you should use the [Menu Builder](/) by including list item block, as the example bellow.\n\n```\n\"unstable--menu-item#lists\": {\n \"props\": {\n \"id\": \"unstable--menu-item-lists\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"store/lists\",\n \"noFollow\": true,\n \"tagTitle\": \"lists\",\n \"text\": \"My Lists\"\n }\n }\n },\n```\n\n\nIn order to use this app, you should follow the steps bellow.\n\n#### 1. Create Master Data's Entities:\n\nThe lists' information are submitted to Master Data on two entities. One entity with the acronym `WL` to store list's basic informations and another, acronym `LP`, to store the lists' items. Bellow we have the configuration that these entetities should follow.\n\n**Acronym name:** `WL`\n\n| Field | Type | Configuration | Description |\n| --------- | -------------- | ---- | ------------- |\n| name | `Varchar 50` | Public to read and public to write | List's name |\n| owner | `Varchar 50` | Allow null, public to read, public to write, public to filter and searchable | The e-mail of the list's owner |\n| isPublic | `Boolean` | Allow null, public to read and public to write | Flag to indicate the list visibility |\n| isEditable| `Boolean` | Allow null, public to read and public to write | Flag to indicate if the list's basic information |\n| items | `Text` | Allow null, public to read and public to write | Set of the DocumentId of the items added to the list |\n\n**Acronym name:** `LP`\n\n| Field | Type | Configuration | Description |\n| ----- | ---- | ------------- | ----------- |\n| productId | `Varchar 50` | Public to read and public to write | Id of the product |\n| skuId\t\t| `Varchar 50` | Public to read and public to write | SKU id of the product |\n| quantity | `Integer` | Public to read and public to write | Quantity of the product |\n\n#### 2. Install the WishList app in your store:\n\nUse this command to install this app: `vtex install vtex.wishlist`.\n\nAfter that, Wishlist's _Add to List_ button will be displayed on `ProductSummary` and `ProductDetails`.\n\n### Blocks API\n\n\nThis app has an interface that describes what rules must be implemented by a block when you want to use the WishList app.\n\n```json\n{\n \"addon-summary-btn.add-to-list\": {\n \"component\": \"AddProductBtn\",\n \"required\": [\"lists\", \"product-summary\"]\n },\n \"addon-details-btn.add-to-list\": {\n \"component\": \"AddProductBtn\",\n \"required\": [\"lists\", \"product-summary\"]\n },\n \"add-to-list-btn\": {\n \"component\": \"AddProductBtn\",\n \"required\": [\"lists\", \"product-summary\"]\n },\n \"lists\": {\n \"component\": \"ListsPage\",\n \"required\": [\"product-summary\"]\n },\n \"store.lists\": {\n \"component\": \"ContainerWrapper\",\n \"required\": [\n \"lists\"\n ],\n \"before\": [\n \"header.full\"\n ],\n \"after\": [\n \"footer\"\n ]\n }\n}\n\n```\n\n#### Configuration\n\n`AddProductBtn`\n\n| Prop name | Type | Description | Default Value |\n| ----------------------- | --------- | ----------------------------------------------------------------- | ------------- |\n| `product` | `Product` | Informations about the product that will be added to lists | `undefined` |\n| `large` | `Boolean` | Flag that indicates if the should be large or not | false |\n| `icon` | `ReactChild` | The icon that should appear in the _Add to List_ button | [`IconHeart`](https://github.com/vtex-apps/store-icons) |\n\n`Product`\n\n| Prop name | Type | Description | Default Value |\n| ----------------------- | --------- | ----------------------------------------------------------------- | ------------- |\n| `productId` | `String` | Id of the product | `undefined` |\n| `skuId` | `String` | SKU id of the product | `undefined` |\n| `quantity` | `Number` | Quantity of the product | `undefined` |\n\n\n### Styles API\n\nThis app provides some CSS classes as an API for style customization.\n\nTo use this CSS API, you must add the `styles` builder and create an app styling CSS file.\n\n1. Add the `styles` builder to your `manifest.json`:\n\n```json\n \"builders\": {\n \"styles\": \"1.x\"\n }\n```\n\n2. Create a file called `vtex.wishList.css` inside the `styles/css` folder. Add your custom styles:\n\n```css\n.container {\n margin-top: 1rem;\n}\n```\n\n#### CSS namespaces\n\n| Class name | Description | Component Source |\n| -------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `listPageItemsContainer` | List page's container of the products | [ListsPage/Content](/react/components/ListsPage/Content.tsx) |\n| `listPage` | List page's main container | [ListsPage/Content](/react/components/ListsPage/Content.tsx) |\n| `confirmSelectedListsBtn` | Container of the button to confirm selected lists to add a product in the mobile mode | [AddToList/Footer](/react/components/AddToList/Footer.tsx) |\n| `contentContainer` | Container of the `AddToList`'s content | [AddToList/Content](/react/components/AddToList/Content.tsx) |\n| `popover` | Container of the `Popover` component | [Popover](/react/components/Popover.tsx) |\n| `formViewDialog` | Dialog content of the FormView component in the desktop mode | [FormView](/react/components/Form/FormView.tsx) |\n| `summaryContainer` | Container of the `ProductSummary` in the list item details | [ListDetails/ItemDetails](/react/components/ListDetails/ItemDetails.tsx) |\n| `summaryContainerLarge` | Container of the `ProductSummary` in the list item details in desktop mode | [ListDetails/ItemDetails](/react/components/ListDetails/ItemDetails.tsx) |\n| `addToListContent` | Main container of the `AddToList` component | [AddToList/Content](/react/components/AddToList/Content.tsx) |\n| `addToListListsToSwitch` | Container of the lists to be selected in the `AddToList` component | [AddToList/Content](/react/components/AddToList/Content.tsx) |\n| `createList` | Container of the `CreateList` | [CreateList](/react/components/Form/CreateList.tsx) |\n| `createListButtonContainer` | Container of the button to create a new list | [ListForm](/react/components/Form/ListForm.tsx) |\n| `isPublicLabel` | Label for show the privacy message in the `ListForm` | [ListForm](react/components/Form/ListForm.tsx) |\n| `isPublicHint` | Label for show the privacy hint in the `ListForm` | [ListForm](/react/components/Form/ListForm.tsx) |\n| `isPublicContainer` | Container of the privacy information in the `ListForm` | [ListForm](/react/components/Form/ListForm.tsx) |\n| `nameInputContainer` | Container of the list's name input | [ListForm](/react/components/Form/ListForm.tsx) |\n| `form` | Main container of the `ListForm` | [ListForm](/react/components/Form/ListForm.tsx) |\n| `updateList` | Main container of the update list form | [UpdateList](/react/components/Form/UpdateList.tsx) |\n| `listEmptyContainer` | Container of the empty list message in in the list details | [ListDetails/Content](/react/components/ListDetails/Content.tsx) |\n| `listEmptyLabel` | Container of the empty message label when a list does not have products added to it | [ListDetails/Content](/react/components/ListDetails/Content.tsx) |\n| `goToAddProductsButtonContainer` | Container of the button that redirect to the `Galery` | [ListDetails/Content](/react/components/ListDetails/Content.tsx) |\n| `listDetailsContent` | Main container of the list details | [ListDetails/Content](/react/components/ListDetails/Content.tsx) |\n| `buySelectedItemsBtnContainer` | Container of the `BuyButton` that add to the cart the selected products of a list | [ListDetails/Footer](/react/components/ListDetails/Footer.tsx) |\n| `totalPriceLabel` | Label of the quantity of products in a list | [ListDetails/Footer](/react/components/ListDetails/Footer.tsx) |\n| `pricesContainer` | Label of the total price of the selected items from a list | [ListDetails/Footer](/react/components/ListDetails/Footer.tsx) |\n| `quantityOfSelectedItemsLabel` | Label for the quantity of selected items in a list | [ListDetails/Footer](/react/components/ListDetails/Footer.tsx) |\n| `ListDetailsFooter` | Container of the list details' footer | [ListDetails/Footer](/react/components/ListDetails/Footer.tsx) |\n\n\n## Troubleshooting\n\nYou can check if others are passing through similar issues [here](https://github.com/vtex-apps/wishlist/issues). Also feel free to [open issues](https://github.com/vtex-apps/wishlist/issues/new) or contribute with pull requests.\n\n## Contributing\n\nCheck it out [how to contribute](https://github.com/vtex-apps/awesome-io#contributing) with this project. \n\n## Tests\n\n:construction: :construction: Not implemented yet :construction: :construction: \n\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore -->\n<table>\n <tr>\n <td align=\"center\"><a href=\"https://github.com/MatheusR42\"><img src=\"https://avatars0.githubusercontent.com/u/16908590?v=4\" width=\"100px;\" alt=\"Matheus Araujo\"/><br /><sub><b>Matheus Araujo</b></sub></a><br /><a href=\"https://github.com/vtex-apps/wishlist/commits?author=MatheusR42\" title=\"Documentation\">📖</a></td>\n </tr>\n</table>\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n```" } ]
code_wishlist_6721a700
[ { "role": "system", "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": "user", "content": "Show me the implementation of wishlist/manifest.json from the wishlist VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"wishlist\",\n \"title\": \"Wishlist\",\n \"version\": \"0.3.1\",\n \"defaultLocale\": \"pt-BR\",\n \"builders\": {\n \"react\": \"3.x\",\n \"messages\": \"1.x\",\n \"store\": \"0.x\",\n \"node\": \"4.x\",\n \"graphql\": \"1.x\"\n },\n \"mustUpdateAt\": \"2019-04-20\",\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"dependencies\": {\n \"vtex.store-components\": \"3.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.store-graphql\": \"2.x\",\n \"vtex.store-resources\": \"0.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.product-details\": \"1.x\",\n \"vtex.store\": \"2.x\",\n \"vtex.store-footer\": \"2.x\",\n \"vtex.store-header\": \"2.x\"\n },\n \"settingsSchema\": {\n \"title\": \"Wish List\",\n \"type\": \"object\",\n \"properties\": {\n \"enableMultipleLists\": {\n \"title\": \"Enable creating custom lists\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"defaultListName\": {\n \"title\": \"Default list name\",\n \"type\": \"string\"\n }\n }\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_bitcot-qa-theme_b5a7a713
[ { "role": "system", "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": "user", "content": "Show me the implementation of bitcot-qa-theme/manifest.json from the bitcot-qa-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"bitcot-qa-theme\",\n \"version\": \"0.0.1\",\n \"builders\": {\n \"styles\": \"2.x\",\n \"store\": \"0.x\",\n \"sitemap\": \"0.x\",\n \"docs\": \"0.x\"\n },\n \"mustUpdateAt\": \"2018-09-05\",\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"dependencies\": {\n \"vtex.store\": \"2.x\",\n \"vtex.store-header\": \"2.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.store-footer\": \"2.x\",\n \"vtex.store-components\": \"3.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.slider\": \"0.x\",\n \"vtex.carousel\": \"2.x\",\n \"vtex.shelf\": \"1.x\",\n \"vtex.menu\": \"2.x\",\n \"vtex.minicart\": \"2.x\",\n \"vtex.product-details\": \"1.x\",\n \"vtex.product-kit\": \"1.x\",\n \"vtex.search-result\": \"3.x\",\n \"vtex.login\": \"2.x\",\n \"vtex.my-account\": \"1.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.rich-text\": \"0.x\",\n \"vtex.store-drawer\": \"0.x\",\n \"vtex.locale-switcher\": \"0.x\",\n \"vtex.product-quantity\": \"1.x\",\n \"vtex.product-identifier\": \"0.x\",\n \"vtex.breadcrumb\": \"1.x\",\n \"vtex.sticky-layout\": \"0.x\",\n \"vtex.product-customizer\": \"2.x\",\n \"vtex.stack-layout\": \"0.x\",\n \"vtex.product-specification-badges\": \"0.x\",\n \"vtex.product-review-interfaces\": \"1.x\",\n \"vtex.telemarketing\": \"2.x\",\n \"vtex.order-placed\": \"2.x\",\n \"vtex.checkout-summary\": \"0.x\",\n \"vtex.product-list\": \"0.x\",\n \"vtex.add-to-cart-button\": \"0.x\",\n \"vtex.product-bookmark-interfaces\": \"1.x\",\n \"vtex.responsive-layout\": \"0.x\",\n \"vtex.slider-layout\": \"0.x\",\n \"vtex.store-image\": \"0.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.modal-layout\": \"0.x\",\n \"vtex.store-link\": \"0.x\",\n \"vtex.store-video\": \"1.x\",\n \"vtex.product-gifts\": \"0.x\",\n \"vtex.product-price\": \"1.x\",\n \"vtex.disclosure-layout\": \"1.x\",\n \"vtex.store-form\": \"0.x\",\n \"vtex.product-highlights\": \"2.x\",\n \"vtex.product-specifications\": \"1.x\",\n \"vtex.tab-layout\": \"0.x\",\n \"vtex.condition-layout\": \"2.x\",\n \"vtex.css-handles\": \"1.x\",\n \"vtex.affirm-components\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_shopper-location-theme_991744b0
[ { "role": "system", "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": "user", "content": "Show me the implementation of shopper-location-theme/manifest.json from the shopper-location-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"shopper-location-qa-theme\",\n \"version\": \"0.0.1\",\n \"builders\": {\n \"styles\": \"2.x\",\n \"store\": \"0.x\",\n \"sitemap\": \"0.x\",\n \"docs\": \"0.x\"\n },\n \"mustUpdateAt\": \"2018-09-05\",\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"dependencies\": {\n \"vtex.store\": \"2.x\",\n \"vtex.store-header\": \"2.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.store-footer\": \"2.x\",\n \"vtex.store-components\": \"3.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.slider\": \"0.x\",\n \"vtex.carousel\": \"2.x\",\n \"vtex.shelf\": \"1.x\",\n \"vtex.menu\": \"2.x\",\n \"vtex.minicart\": \"2.x\",\n \"vtex.product-details\": \"1.x\",\n \"vtex.product-kit\": \"1.x\",\n \"vtex.search-result\": \"3.x\",\n \"vtex.login\": \"2.x\",\n \"vtex.my-account\": \"1.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.rich-text\": \"0.x\",\n \"vtex.store-drawer\": \"0.x\",\n \"vtex.locale-switcher\": \"0.x\",\n \"vtex.product-quantity\": \"1.x\",\n \"vtex.product-identifier\": \"0.x\",\n \"vtex.breadcrumb\": \"1.x\",\n \"vtex.sticky-layout\": \"0.x\",\n \"vtex.product-customizer\": \"2.x\",\n \"vtex.stack-layout\": \"0.x\",\n \"vtex.product-specification-badges\": \"0.x\",\n \"vtex.product-review-interfaces\": \"1.x\",\n \"vtex.telemarketing\": \"2.x\",\n \"vtex.order-placed\": \"2.x\",\n \"vtex.checkout-summary\": \"0.x\",\n \"vtex.product-list\": \"0.x\",\n \"vtex.add-to-cart-button\": \"0.x\",\n \"vtex.product-bookmark-interfaces\": \"1.x\",\n \"vtex.responsive-layout\": \"0.x\",\n \"vtex.slider-layout\": \"0.x\",\n \"vtex.store-image\": \"0.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.modal-layout\": \"0.x\",\n \"vtex.store-link\": \"0.x\",\n \"vtex.store-video\": \"1.x\",\n \"vtex.product-gifts\": \"0.x\",\n \"vtex.product-price\": \"1.x\",\n \"vtex.disclosure-layout\": \"1.x\",\n \"vtex.store-form\": \"0.x\",\n \"vtex.product-highlights\": \"2.x\",\n \"vtex.product-specifications\": \"1.x\",\n \"vtex.tab-layout\": \"0.x\",\n \"vtex.condition-layout\": \"2.x\",\n \"vtex.css-handles\": \"1.x\"\n },\n \"peerDependencies\": {\n \"vtex.shopper-location\": \"1.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_b2b-suite_9e88a072
[ { "role": "system", "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": "user", "content": "Show me the implementation of b2b-suite/package.json from the b2b-suite VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"b2b-suite\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"0.1.4\",\n \"@vtex/tsconfig\": \"^0.6.0\",\n \"eslint\": \"7.12.1\",\n \"eslint-config-vtex\": \"^14.1.1\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"husky\": \"4.2.3\",\n \"lint-staged\": \"10.1.1\",\n \"prettier\": \"2.0.2\",\n \"typescript\": \"3.8.3\"\n },\n \"dependencies\": {\n \"react\": \"^17.0.2\"\n }\n}\n\n```" } ]
code_b2b-suite_e868ab26
[ { "role": "system", "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": "user", "content": "Show me the implementation of b2b-suite/manifest.json from the b2b-suite VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"b2b-suite\",\n \"vendor\": \"vtex\",\n \"version\": \"2.0.0\",\n \"title\": \"B2B Suite\",\n \"description\": \"Suite of apps to add various essential B2B functionalities to your VTEX store\",\n \"mustUpdateAt\": \"2022-08-28\",\n \"scripts\": {\n \"postreleasy\": \"vtex publish\"\n },\n \"dependencies\": {\n \"vtex.b2b-admin-customers\": \"2.x\",\n \"vtex.b2b-checkout-settings\": \"3.x\",\n \"vtex.b2b-orders-history\": \"2.x\",\n \"vtex.b2b-organizations\": \"3.x\",\n \"vtex.b2b-quotes\": \"3.x\",\n \"vtex.store\": \"2.x\",\n \"vtex.storefront-permissions-ui\": \"3.x\"\n },\n \"builders\": {\n \"admin\": \"0.x\",\n \"docs\": \"0.x\",\n \"react\": \"3.x\",\n \"store\": \"0.x\"\n },\n \"billingOptions\": {\n \"support\": {\n \"url\": \"https://help-tickets.vtex.com/en/support?app=vtex.b2b-suite\"\n },\n \"type\": \"free\",\n \"availableCountries\": [\n \"*\"\n ]\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_adobe-launch-pixel_0d175bb1
[ { "role": "system", "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": "user", "content": "Show me the implementation of adobe-launch-pixel/package.json from the adobe-launch-pixel VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"YOURAPPNAME\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.1.4\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.3.2\",\n \"eslint-config-vtex-react\": \"^6.3.2\",\n \"husky\": \"^4.2.3\",\n \"lint-staged\": \"^10.1.1\",\n \"prettier\": \"^2.0.2\",\n \"typescript\": \"^3.8.3\"\n },\n \"dependencies\": {\n \"@adobe/adobe-client-data-layer\": \"^2.0.2\",\n \"yarn\": \"^1.22.17\"\n }\n}\n\n```" } ]
code_adobe-launch-pixel_b0870e88
[ { "role": "system", "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": "user", "content": "Show me the implementation of adobe-launch-pixel/manifest.json from the adobe-launch-pixel VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"adobe-launch-pixel\",\n \"vendor\": \"vtexasia\",\n \"version\": \"0.0.5\",\n \"title\": \"adobe launch pixel\",\n \"description\": \"adobe launch pixel app\",\n \"billingOptions\": {\n \"termsURL\": \"https://compliance.vtex.com/gdpr/policies/vtex-privacy-policy\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n },\n \"free\": true,\n \"type\": \"free\",\n \"availableCountries\": [\n \"*\"\n ]\n },\n \"builders\": {\n \"react\": \"3.x\",\n \"store\": \"0.x\",\n \"pixel\": \"0.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.pixel-interfaces\": \"1.x\"\n },\n \"settingsSchema\": {\n \"title\": \"adobe-launch-pixel\",\n \"type\": \"object\",\n \"properties\": {\n \"adobeId_1\": {\n \"title\": \"Adobe Experience Platform ID-1\",\n \"description\": \"Enter the First ID from your Adobe Experience Platform. eg, if your script is 'https://assets.adobedtm.com/8s8wwe70yyu7/hui6t3fe6y9o/launch-er45i4b9pp90-development.min.js', then the First ID should be '8s8wwe70yyu7/hui6t3fe6y9o' \",\n \"type\": \"string\"\n },\n \"adobeId_2\": {\n \"title\": \"Adobe Experience Platform ID-2\",\n \"description\": \"Enter the Second ID from your Adobe Experience Platform. eg, if your script is 'https://assets.adobedtm.com/8s8wwe70yyu7/hui6t3fe6y9o/launch-er45i4b9pp90-development.min.js', then the Second ID should be 'launch-er45i4b9pp90-development.min.js' \",\n \"type\": \"string\"\n }\n }\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_store_91848f76
[ { "role": "system", "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": "user", "content": "Show me the implementation of store/package.json from the store VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"store\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"prepare\": \"husky install\"\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.7.12\",\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"eslint\": \"^7.0.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"eslint-config-vtex-react\": \"^6.2.1\",\n \"husky\": \"^8.0.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^1.19.1\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_store_2129a328
[ { "role": "system", "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": "user", "content": "Show me the implementation of store/manifest.json from the store VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"store\",\n \"version\": \"2.145.0\",\n \"title\": \"VTEX Store\",\n \"description\": \"The VTEX basic store.\",\n \"builders\": {\n \"store\": \"0.x\",\n \"messages\": \"1.x\",\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.store-indexer\": \"0.x\",\n \"vtex.store-resources\": \"0.x\",\n \"vtex.store-graphql\": \"2.x\",\n \"vtex.store-header\": \"2.x\",\n \"vtex.store-footer\": \"2.x\",\n \"vtex.pwa-graphql\": \"1.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.pixel-interfaces\": \"1.x\",\n \"vtex.search-result\": \"3.x\",\n \"vtex.login\": \"2.x\",\n \"vtex.my-account\": \"1.x\",\n \"vtex.pixel-manager\": \"1.x\",\n \"vtex.product-context\": \"0.x\",\n \"vtex.blog-interfaces\": \"0.x\",\n \"vtex.open-graph\": \"1.x\",\n \"vtex.structured-data\": \"0.x\",\n \"vtex.pwa-components\": \"0.x\",\n \"vtex.order-manager\": \"0.x\",\n \"vtex.order-items\": \"0.x\",\n \"vtex.product-specification-badges\": \"0.x\",\n \"vtex.product-review-interfaces\": \"1.x\",\n \"vtex.rich-text\": \"0.x\",\n \"vtex.native-types\": \"0.x\",\n \"vtex.telemarketing\": \"2.x\",\n \"vtex.shipping-option-components\": \"1.x\"\n },\n \"settingsSchema\": {\n \"title\": \"admin/store.title\",\n \"type\": \"object\",\n \"bindingBounded\": true,\n \"properties\": {\n \"storeName\": {\n \"title\": \"admin/store.storeName.title\",\n \"type\": \"string\"\n },\n \"requiresAuthorization\": {\n \"title\": \"admin/store.requiresAuthorization.title\",\n \"type\": \"boolean\"\n },\n \"titleTag\": {\n \"title\": \"admin/store.titleTag.title\",\n \"type\": \"string\"\n },\n \"metaTagDescription\": {\n \"title\": \"admin/store.metaTagDescription.title\",\n \"type\": \"string\"\n },\n \"metaTagRobots\": {\n \"title\": \"admin/store.metaTagRobots.title\",\n \"type\": \"string\",\n \"description\": \"admin/store.metaTagRobots.description\"\n },\n \"faviconLinks\": {\n \"title\": \"admin/store.faviconLinks.title\",\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"rel\": {\n \"title\": \"admin/store.faviconLinks.rel.title\",\n \"type\": \"string\",\n \"description\": \"admin/store.faviconLinks.rel.description\"\n },\n \"type\": {\n \"title\": \"admin/store.faviconLinks.type.title\",\n \"type\": \"string\",\n \"description\": \"admin/store.faviconLinks.type.description\"\n },\n \"sizes\": {\n \"title\": \"admin/store.faviconLinks.sizes.title\",\n \"type\": \"string\",\n \"pattern\": \"^[0-9]+x[0-9]+$\",\n \"description\": \"admin/store.faviconLinks.sizes.description\"\n },\n \"href\": {\n \"title\": \"admin/store.faviconLinks.href.title\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"rel\",\n \"href\"\n ]\n },\n \"description\": \"admin/store.faviconLinks.description\"\n },\n \"advancedSettings\": {\n \"title\": \"admin/store.advancedSettings.title\",\n \"type\": \"object\",\n \"properties\": {\n \"enableOrderFormOptimization\": {\n \"title\": \"admin/store.advancedSettings.enableOrderFormOptimization.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.enableOrderFormOptimization.description\"\n },\n \"enableServiceWorker\": {\n \"title\": \"admin/store.advancedSettings.enableServiceWorker.title\",\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"admin/store.advancedSettings.enableServiceWorker.description\"\n },\n \"enableCriticalCSS\": {\n \"title\": \"admin/store.advancedSettings.enableCriticalCSS.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.enableCriticalCSS.description\"\n },\n \"enableCriticalCSSOnSearch\": {\n \"title\": \"admin/store.advancedSettings.enableCriticalCSSOnSearch.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.enableCriticalCSSOnSearch.description\"\n },\n \"enableCriticalCSSOnCustom\": {\n \"title\": \"admin/store.advancedSettings.enableCriticalCSSOnCustom.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.enableCriticalCSSOnCustom.description\"\n },\n \"enableCriticalCSSOnProduct\": {\n \"title\": \"admin/store.advancedSettings.enableCriticalCSSOnProduct.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.enableCriticalCSSOnProduct.description\"\n },\n \"enableCSSConcatenation\": {\n \"title\": \"admin/store.advancedSettings.enableCSSConcatenation.title\",\n \"description\": \"admin/store.advancedSettings.enableCSSConcatenation.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enablePrefetch\": {\n \"title\": \"admin/store.advancedSettings.enablePrefetch.title\",\n \"description\": \"admin/store.advancedSettings.enablePrefetch.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableLazyRuntime\": {\n \"title\": \"admin/store.advancedSettings.enableLazyRuntime.title\",\n \"description\": \"admin/store.advancedSettings.enableLazyRuntime.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableMenuRenderingOptimization\": {\n \"title\": \"admin/store.advancedSettings.enableMenuRenderingOptimization.title\",\n \"description\": \"admin/store.advancedSettings.enableMenuRenderingOptimization.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableSearchRenderingOptimization\": {\n \"title\": \"admin/store.advancedSettings.enableSearchRenderingOptimization.title\",\n \"description\": \"admin/store.advancedSettings.enableSearchRenderingOptimization.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableAsyncScripts\": {\n \"title\": \"admin/store.advancedSettings.enableAsyncScripts.title\",\n \"description\": \"admin/store.advancedSettings.enableAsyncScripts.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableConcurrentMode\": {\n \"title\": \"admin/store.advancedSettings.enableConcurrentMode.title\",\n \"description\": \"admin/store.advancedSettings.enableConcurrentMode.description\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableFiltersFetchOptimization\": {\n \"title\": \"admin/store.advancedSettings.enableFiltersFetchOptimization.title\",\n \"description\": \"admin/store.advancedSettings.enableFiltersFetchOptimization.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableFullSSROnProduct\": {\n \"title\": \"admin/store.advancedSettings.enableFullSSROnProduct.title\",\n \"description\": \"admin/store.advancedSettings.enableFullSSROnProduct.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableLazyFooter\": {\n \"title\": \"admin/store.advancedSettings.enableLazyFooter.title\",\n \"description\": \"admin/store.advancedSettings.enableLazyFooter.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableLazyFold\": {\n \"title\": \"admin/store.advancedSettings.enableLazyFold.title\",\n \"description\": \"admin/store.advancedSettings.enableLazyFold.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enablePageNumberTitle\": {\n \"title\": \"admin/store.advancedSettings.enablePageNumberTitle.title\",\n \"description\": \"admin/store.advancedSettings.enablePageNumberTitle.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"canonicalWithoutUrlParams\": {\n \"title\": \"admin/store.advancedSettings.canonicalWithoutUrlParams.title\",\n \"description\": \"admin/store.advancedSettings.canonicalWithoutUrlParams.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"removeStoreNameTitle\": {\n \"title\": \"admin/store.advancedSettings.removeStoreNameTitle.title\",\n \"description\": \"admin/store.advancedSettings.removeStoreNameTitle.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableCustomCurrencySymbol\": {\n \"title\": \"admin/store.advancedSettings.enableCustomCurrencySymbol.title\",\n \"description\": \"admin/store.advancedSettings.enableCustomCurrencySymbol.description\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"publisherId\": {\n \"title\": \"admin/store.advancedSettings.publisherId.title\",\n \"description\": \"admin/store.advancedSettings.publisherId.description\",\n \"type\": \"string\",\n \"default\": \"\"\n },\n \"a11ySemanticHtmlMigration\": {\n \"title\": \"admin/store.advancedSettings.a11ySemanticHtmlMigration.title\",\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"admin/store.advancedSettings.a11ySemanticHtmlMigration.description\"\n },\n \"customHeader\": {\n \"title\": \"admin/store.advancedSettings.customHeader.title\",\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"__editorItemTitle\": {\n \"type\": \"string\",\n \"title\": \"admin/store.advancedSettings.customHeader.__editorItemTitle.title\",\n \"description\": \"admin/store.advancedSettings.customHeader.__editorItemTitle.description\"\n },\n \"key\": {\n \"type\": \"string\",\n \"title\": \"admin/store.advancedSettings.customHeader.key.title\",\n \"description\": \"admin/store.advancedSettings.customHeader.key.description\"\n },\n \"value\": {\n \"type\": \"string\",\n \"title\": \"admin/store.advancedSettings.customHeader.value.title\",\n \"description\": \"admin/store.advancedSettings.customHeader.value.description\"\n }\n },\n \"required\": [\n \"key\",\n \"value\"\n ]\n }\n },\n \"useDefaultBrowserNavigation\": {\n \"title\": \"admin/store.advancedSettings.useDefaultBrowserNavigation.title\",\n \"description\": \"admin/store.advancedSettings.useDefaultBrowserNavigation.description\",\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n },\n \"dependencies\": {\n \"requiresAuthorization\": {\n \"oneOf\": [\n {\n \"properties\": {\n \"requiresAuthorization\": {\n \"enum\": [\n false\n ]\n }\n }\n },\n {\n \"properties\": {\n \"requiresAuthorization\": {\n \"enum\": [\n true\n ]\n },\n \"b2bEnabled\": {\n \"title\": \"admin/store.b2benabled.title\",\n \"type\": \"string\",\n \"format\": \"read-only\",\n \"default\": \"true\"\n }\n }\n }\n ]\n }\n }\n },\n \"settingsUiSchema\": {\n \"requiresAuthorization\": {\n \"ui:widget\": \"hidden\"\n },\n \"b2bEnabled\": {\n \"ui:disabled\": \"true\"\n },\n \"ui:order\": [\n \"storeName\",\n \"requiresAuthorization\",\n \"b2bEnabled\",\n \"*\"\n ]\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_console_2b6dae80
[ { "role": "system", "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": "user", "content": "Show me the implementation of console/manifest.json from the console VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"console\",\n \"vendor\": \"vtex\",\n \"version\": \"0.6.1\",\n \"title\": \"IO Console\",\n \"description\": \"VTEX developer console\",\n \"mustUpdateAt\": \"2019-10-16\",\n \"dependencies\": {\n \"vtex.admin\": \"1.x\",\n \"vtex.console-graphql\": \"0.x\",\n \"vtex.render-runtime\": \"7.x\",\n \"vtex.styleguide\": \"8.x\",\n \"vtex.builder-log\": \"0.x\"\n },\n \"scripts\": {},\n \"builders\": {\n \"react\": \"2.x\",\n \"pages\": \"0.x\",\n \"messages\": \"1.x\",\n \"docs\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_facebook-domain-verification_e020c34b
[ { "role": "system", "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": "user", "content": "Show me the implementation of facebook-domain-verification/manifest.json from the facebook-domain-verification VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"facebook-domain-verification\",\n \"version\": \"1.0.2\",\n \"title\": \"Facebook Domain Verification\",\n \"description\": \"Verify your domain ownership.\",\n \"builders\": {\n \"pixel\": \"0.x\",\n \"docs\": \"0.x\"\n },\n \"billingOptions\": {\n \"termsURL\": \"\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n },\n \"free\": true\n },\n \"settingsSchema\": {\n \"title\": \"Facebook Domain Verification\",\n \"description\": \"Enter the content provided by Facebook Business Settings\",\n \"type\": \"object\",\n \"properties\": {\n \"content\": {\n \"title\": \"Domain verification code\",\n \"type\": \"string\"\n }\n }\n },\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_product-list_c22c21a2
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-list/package.json from the product-list VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"product-list\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.7.12\",\n \"@vtex/prettier-config\": \"^0.3.5\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"eslint-config-vtex-react\": \"^6.7.8\",\n \"husky\": \"~4.2.0\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^2.2.1\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_product-list_863e4b85
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-list/manifest.json from the product-list VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"product-list\",\n \"version\": \"0.37.4\",\n \"title\": \"Product List\",\n \"description\": \"Product List\",\n \"defaultLocale\": \"pt-BR\",\n \"builders\": {\n \"messages\": \"1.x\",\n \"styles\": \"2.x\",\n \"store\": \"0.x\",\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"mustUpdateAt\": \"2019-04-02\",\n \"dependencies\": {\n \"vtex.checkout-graphql\": \"0.x\",\n \"vtex.css-handles\": \"0.x\",\n \"vtex.device-detector\": \"0.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.format-currency\": \"0.x\",\n \"vtex.formatted-price\": \"0.x\",\n \"vtex.order-manager\": \"0.x\",\n \"vtex.store-icons\": \"0.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.on-view\": \"1.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_vtex-ads_9b68c233
[ { "role": "system", "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": "user", "content": "Show me the implementation of vtex-ads/dangerfile.js from the vtex-ads VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// dangerfile.js\nconst { verify } = require('@vtex/danger')\n\nconst config = {\n // Set to true to enforce keepachangelog rules.\n keepachangelog: {\n changeVersion: false,\n },\n rules: {\n description: ['fail', { minLength: 20 }],\n assignee: 'fail',\n reviewers: 'fail',\n pr_size: ['warn', { additionLimit: 800, deletionLimit: -1 }],\n lock_file: 'warn',\n no_ignored_test: ['fail', { pattern: /test|spec/i }],\n no_debugger: ['fail', { pattern: /\\.[tj]sx?$/i }],\n enforce_graphql_provider: 'off',\n },\n}\n\nverify(config)\n\n```" } ]
code_vtex-ads_35ebd01e
[ { "role": "system", "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": "user", "content": "Show me the implementation of vtex-ads/README.md from the vtex-ads VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# VTEX Ads APP\n\nEste é um **Storefront app** que permite exibir anúncios em lojas VTEX de forma simples e configurável. Ele oferece componentes prontos para uso que renderizam banners, carrosséis de produtos patrocinados e posicionamentos de marcas patrocinadas em áreas estratégicas da sua loja.\n\n> 📚 **Documentação VTEX IO**: Para mais informações sobre desenvolvimento de Storefront apps, consulte a [documentação oficial da VTEX](https://developers.vtex.com/docs/guides/vtex-io-documentation-1-developing-storefront-apps-using-react-and-vtex-io).\n\nEmbora este app seja projetado para funcionar perfeitamente com o VTEX Site Editor (CMS), a configuração inicial requer um desenvolvedor. Os blocos de anúncios devem primeiro ser declarados no código do tema da loja antes de ficarem disponíveis no Site Editor, onde as configurações visuais e comportamentais podem então ser ajustadas conforme necessário.\n\n## Pré-requisitos\n\nAntes de começar a implementação, certifique-se de ter:\n\n- **VTEX CLI** instalado e configurado\n- **Acesso ao store-theme** da loja (código do tema)\n- **Permissões de desenvolvedor** na conta VTEX\n\n> 📚 Para mais informações sobre o VTEX CLI, consulte a [documentação oficial da VTEX](https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference).\n\n## Modo de desenvolvimento\n\n> 🚧 `vtex use vtexads`\n\nToda implementação deve ser feita no ambiente de desenvolvimento. [Use o workspace](https://developers.vtex.com/docs/guides/vtex-io-documentation-workspace) vtexads para o desenvolvimento. Após validação, publique no ambiente master da loja.\n\n## Instalação\n\nA instalação envolve os seguintes passos:\n1. Instalar o App via VTEX CLI\n2. Declarar a dependência no manifest.json no store-theme\n3. Linkar o tema\n4. Configurar o app\n5. Exibir anúncios\n\n### 1. Instalar o App via VTEX CLI\n\n```bash\nvtex install vtex.vtex-ads\n```\n\n### 2. Declarar a dependência no manifest.json\nAdicione o app VTEX ADS como dependência do store-theme no arquivo `manifest.json`.\n\n```json\n{\n \"dependencies\": {\n \"vtex.vtex-ads\": \"0.x\"\n }\n}\n```\n\n### 3. Linkar o tema\nLinke o tema para ver as mudanças no ambiente de desenvolvimento. `vtex link`\n\n### 4. Configurar o app\n\nNeste momento, temos um passo importante para exibirmos anúncios. Acesse o painel administrativo da sua loja e configure:\n- Publisher ID (obrigatório)\n- Brand ID (opcional para publishers multi-marca)\n\nVocê pode acessar a configuração manualmente pelo VTEX Admin:\n\n1. Vá ao menu lateral e clique em **Apps**.\n2. Em seguida, selecione **Meus Apps**.\n3. Procure por **VTEX Ads**.\n4. Clique no app para acessar sua página de configuração.\n\n> ⚙️ A configuração também pode ser feita via link direto: \n> `https://{{workspace}}--{{account}}.myvtex.com/admin/apps/vtex.vtex-ads@0.0.1/setup` \n> \n> ⚠️ Este link pode variar dependendo do **workspace** ou **versão do app**.\n\n### 5. Lidando com os componentes\nAgora você precisa declarar os componentes nas páginas do seu tema. Os componentes são dividos em 2 classes: exibição de anúncios e notificação de eventos.\n\n⚠️ Para mais detalhes, consulte a seção de exemplos.\n\n#### Componentes Disponíveis (exibição e notificação de eventos)\n\n1. Exibição\n 1. `vtex-ads-banner` \n Exibe banners patrocinados no local configurado. Este componente funciona de forma autônoma e não requer filhos.\n\n 2. `vtex-ads-shelf` \n Exibe produtos patrocinados em formato de prateleira. Para funcionar corretamente, é necessário receber os blocos `list-context.product-list-static`, `slider-layout` e o card de produto do tema (`product-summary.shelf`). \n > Essa estrutura garante liberdade para reaproveitar estilos e regras de negócio já aplicados no tema.\n\n 3. `vtex-ads-sponsored-brands` \n Exibe marcas patrocinadas em carrossel. Também requer os blocos `list-context.product-list-static`, `slider-layout` e o card de produto do tema (ex: `product-summary.shelf`).\n\n2. Notificação de eventos\n 1. `vtex-ads-pixel-event` \n Este componente deve ser usado dentro dos cards de produto para escutar eventos de produto (cliques, impressões, etc.).\n 2. `vtex-ads-conversion` \n Este componente é responsável por gerenciar eventos de conversão. \n **⚠️ Por favor, consulte o suporte técnico antes de implementar este componente.**\n \n\n### Exibindo Anúncios\n\n**⚠️ É essencial ter pelo menos um entendimento básico da declaração de blocos VTEX.**\n\n> 📁 **Exemplos Completos**: Verifique a pasta `examples/` para exemplos de implementação padronizados, mais robustos e completos que cobrem diferentes cenários e casos de uso.\n\nAdicione os componentes correspondentes às páginas que exibirão os anúncios e faça os ajustes visuais necessários.\n\n#### 📄 Exemplos de Uso\nUse a página de busca como exemplo. \n`store/blocks/search/`\n> Lembre-se, o nome do arquivo pode variar dependendo do tema se ele foi personalizado.\n\n1. Banner\n ```json\n {\n \"vtex-ads-banner#search-top\": {\n \"title\": \"VTEX Ads - Banner top PDP\",\n \"props\": {\n \"placementName\": \"site_search_top_banner\", // {canal}_{contexto}_{posição}_{tipo}\n \"size\": \"1280x176\", // Mesmo tamanho cadastrado no admin de ads\n \"sizeMobile\": \"634x300\" // Mesmo tamanho cadastrado no admin de ads\n }\n },\n \"store.search\": {\n \"blocks\": [\n \"vtex-ads-banner#search-top\",\n \"search-result-layout\"\n ]\n }\n }\n ```\n\n2. Produtos patrocinados\n> Para mantermos a originalidade e regras de negócio do tema, as shelfs recebem alguns componentes adicionais: `list-context.product-list-static`, `slider-layout` e `product-summary.shelf`.\n ```json\n {\n \"list-context.product-list-static#vtex-ads\": {\n \"blocks\": [\"product-summary.shelf#product-custom-ads\"],\n \"children\": [\"slider-layout#vtex-ads\"],\n \"title\": \"VTEX Ads - Product shelf - Wrapper context\"\n },\n \"vtex-ads-shelf#pdp-middle\": {\n \"title\": \"VTEX Ads - Product shelf middle PDP\",\n \"blocks\": [\n \"rich-text#vtex-ads-sponsored-title\", // Optional\n \"list-context.product-list-static#vtex-ads\"\n ],\n \"props\": {\n \"placementName\": \"site_search_topproduct\", // {channel}_{context}_ {position}_{type}\n \"quantity\": 10 // Optional, default is 20\n }\n },\n \"store.search\": {\n \"blocks\": [\n \"vtex-ads-shelf#pdp-middle\",\n \"search-result-layout\"\n ]\n }\n }\n ```\n\n\n3. Marcas patrocinadas (sponsored brands)\n> Para mantermos a originalidade e regras de negócio do tema, as shelfs recebem alguns componentes adicionais: `list-context.product-list-static`, `slider-layout` e `product-summary.shelf`.\n ```json\n {\n \"list-context.product-list-static#vtex-ads\": {\n \"blocks\": [\"product-summary.shelf#product-custom-ads\"],\n \"children\": [\"slider-layout#vtex-ads\"],\n \"title\": \"VTEX Ads - Product shelf - Wrapper context\"\n },\n \"vtex-ads-sponsored-brands#search-top\": {\n \"title\": \"VTEX Ads - Sponsored brand\",\n \"blocks\": [\"list-context.product-list-static#vtex-ads\"],\n \"props\": {\n \"placementName\": \"site_search_top_sb\", // {channel}_{context}_ {position}_{type}\n \"sizeMobile\": \"450x150\", // Same size registered in the ad platform\n \"size\": \"450x225\", // Same size registered in the ad platform\n \"hideHeader\": true // Optional\n }\n },\n \"store.search\": {\n \"blocks\": [\n \"vtex-ads-sponsored-brands#search-top\",\n \"search-result-layout\"\n ]\n }\n }\n ```\n\n### Notificando Eventos\n\nPara rastrear eventos de produto (cliques, impressões, etc.), adicione o componente `vtex-ads-pixel-event` dentro dos seus cards de produto.\n\n```json\n{\n \"product-summary.shelf\": {\n \"children\": [\n \"vtex-ads-pixel-event\",\n \"product-summary-image\",\n \"product-summary-name\",\n \"product-summary-price\"\n ]\n }\n}\n```\n\n> O componente `vtex-ads-pixel-event` deve ser posicionado como filho do componente de card de produto para rastrear adequadamente as interações do usuário.\n\n### Notificando Conversão\n\n> ⚠️ **Importante**: Antes de implementar o componente de conversão, por favor consulte o suporte técnico para determinar se é necessário para o seu caso de uso específico.\n\nVocê também precisará adicionar um componente à página `OrderPlaced` para rastrear eventos de conversão.\n\n1. Adicione o `vtex-ads-conversion` ao arquivo de configuração da página Order Placed `store/blocks/orderplaced.jsonc`.\n\n> O nome do arquivo pode variar dependendo do tema se ele foi personalizado.\n\n```json\n{\n \"store.orderplaced\": {\n \"blocks\": [\"order-placed\", \"vtex-ads-conversion\"]\n }\n}\n```\n\n```" } ]
code_vtex-ads_5d543da8
[ { "role": "system", "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": "user", "content": "Show me the implementation of vtex-ads/package.json from the vtex-ads VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.ads\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ],\n \"messages/*.json\": [\n \"yarn lint:locales\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.12.21\",\n \"@vtex/danger\": \"^0.2.7\",\n \"@vtex/intl-equalizer\": \"^2.5.0\",\n \"@vtex/prettier-config\": \"^0.3.5\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.11\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"husky\": \"^4.3.0\",\n \"lint-staged\": \"^10.5.1\",\n \"prettier\": \"^2.2.0\",\n \"typescript\": \"^3.9.6\"\n },\n \"version\": \"2.0.16\",\n \"intl-equalizer\": {\n \"referenceLocale\": \"en\",\n \"localeDirectory\": \"messages\"\n }\n}\n```" } ]
code_vtex-ads_7f5879ed
[ { "role": "system", "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": "user", "content": "Show me the implementation of vtex-ads/manifest.json from the vtex-ads VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"vtex-ads\",\n \"version\": \"0.0.1\",\n \"title\": \"VTEX Ads\",\n \"description\": \"Storefront app de integração com o sistema de anúncios VTEX Ads para Store Framework.\",\n \"builders\": {\n \"docs\": \"0.x\",\n \"messages\": \"1.x\",\n \"react\": \"3.x\",\n \"store\": \"0.x\",\n \"styles\": \"2.x\",\n \"pixel\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.device-detector\": \"0.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.slider-layout\": \"0.x\",\n \"vtex.search-graphql\": \"0.x\",\n \"vtex.session-client\": \"1.x\",\n \"vtex.product-list-context\": \"0.x\",\n \"vtex.search-page-context\": \"0.x\",\n \"vtex.product-highlights\": \"2.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.rich-text\": \"0.x\",\n \"vtex.product-price\": \"1.x\",\n \"vtex.product-context\": \"0.x\",\n \"vtex.pixel-interfaces\": \"1.x\",\n \"vtex.pixel-manager\": \"1.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.order-manager\": \"0.x\",\n \"vtex.order-items\": \"0.x\",\n \"vtex.css-handles\": \"1.x\",\n \"vtex.product-summary-context\": \"0.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"policies\": [\n {\n \"name\": \"read-write-apps-settings\"\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\",\n \"settingsSchema\": {\n \"title\": \"VTEX Ads\",\n \"type\": \"object\",\n \"properties\": {\n \"publisherId\": {\n \"title\": \"Publisher ID\",\n \"description\": \"Insira seu publisher ID. Caso não saiba, entre em contato.\",\n \"type\": \"string\"\n },\n \"brandCode\": {\n \"title\": \"Código da marca\",\n \"description\": \"Se houver, insira o código da marca. Caso não saiba, entre em contato.\",\n \"type\": \"string\"\n }\n }\n }\n}\n\n```" } ]
code_shelf-components_fdcd329f
[ { "role": "system", "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": "user", "content": "Show me the implementation of shelf-components/package.json from the shelf-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"shelf-components\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged && intl-equalizer && intl-equalizer --fix\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ],\n \"*.{json}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/intl-equalizer\": \"^2.4.2\",\n \"@vtex/prettier-config\": \"^0.1.4\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.3.2\",\n \"eslint-config-vtex-react\": \"^6.3.2\",\n \"husky\": \"^4.2.3\",\n \"lint-staged\": \"^10.1.1\",\n \"prettier\": \"^2.0.2\",\n \"react-intersection-observer\": \"^8.30.3\",\n \"typescript\": \"^3.8.3\"\n },\n \"version\": \"0.0.0\"\n}\n\n```" } ]
code_shelf-components_e8db0ffd
[ { "role": "system", "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": "user", "content": "Show me the implementation of shelf-components/manifest.json from the shelf-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"shelf-components\",\n \"version\": \"0.10.1\",\n \"title\": \"Shelf components\",\n \"description\": \"Components of the new shelves\",\n \"builders\": {\n \"docs\": \"0.x\",\n \"messages\": \"1.x\",\n \"react\": \"3.x\",\n \"store\": \"0.x\",\n \"styles\": \"2.x\"\n },\n \"dependencies\": {\n \"vtex.add-to-cart-button\": \"0.x\",\n \"vtex.css-handles\": \"0.x\",\n \"vtex.device-detector\": \"0.x\",\n \"vtex.flex-layout\": \"0.x\",\n \"vtex.format-currency\": \"0.x\",\n \"vtex.messages\": \"1.x\",\n \"vtex.pixel-manager\": \"1.x\",\n \"vtex.product-context\": \"0.x\",\n \"vtex.product-group-context\": \"0.x\",\n \"vtex.product-list-context\": \"0.x\",\n \"vtex.product-price\": \"1.x\",\n \"vtex.product-summary\": \"2.x\",\n \"vtex.responsive-layout\": \"0.x\",\n \"vtex.store-components\": \"3.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.slider-layout\": \"0.x\",\n \"vtex.store-resources\": \"0.x\",\n \"vtex.search-graphql\": \"0.x\",\n \"vtex.recommendation-context\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_store-video_42dff111
[ { "role": "system", "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": "user", "content": "Show me the implementation of store-video/package.json from the store-video VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"video\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged && intl-equalizer && intl-equalizer --fix\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/intl-equalizer\": \"^2.5.0\",\n \"@vtex/prettier-config\": \"^0.3.5\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.11\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"husky\": \"^4.3.0\",\n \"lint-staged\": \"^10.5.1\",\n \"prettier\": \"^2.2.0\",\n \"typescript\": \"^3.9.6\"\n },\n \"version\": \"0.0.1\",\n \"intl-equalizer\": {\n \"referenceLocale\": \"en\",\n \"localeDirectory\": \"messages\"\n }\n}\n\n```" } ]
code_store-video_f91e06c1
[ { "role": "system", "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": "user", "content": "Show me the implementation of store-video/manifest.json from the store-video VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"store-video\",\n \"version\": \"1.4.3\",\n \"title\": \"Video\",\n \"description\": \"Store component to handle video\",\n \"builders\": {\n \"react\": \"3.x\",\n \"store\": \"0.x\",\n \"messages\": \"1.x\",\n \"docs\": \"0.x\"\n },\n \"dependencies\": {\n \"vtex.native-types\": \"0.x\",\n \"vtex.css-handles\": \"1.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.store-icons\": \"0.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"policies\": [],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_pwa-components_fdbcaa84
[ { "role": "system", "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": "user", "content": "Show me the implementation of pwa-components/package.json from the pwa-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.pwa-components\",\n \"version\": \"0.1.0\",\n \"description\": \"Components related to PWA features\",\n \"scripts\": {\n \"lint\": \"tsc --noEmit -p react && eslint --ext ts,tsx react\",\n \"lint:fix\": \"tsc --noEmit -p react && eslint --ext ts,tsx react --fix\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.7.7\",\n \"@vtex/tsconfig\": \"^0.3.0\",\n \"eslint\": \"^6.4.0\",\n \"eslint-config-vtex\": \"^11.1.0\",\n \"eslint-config-vtex-react\": \"^5.0.1\",\n \"prettier\": \"^1.18.2\",\n \"typescript\": \"^3.6.3\"\n }\n}\n\n```" } ]
code_pwa-components_59304d06
[ { "role": "system", "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": "user", "content": "Show me the implementation of pwa-components/manifest.json from the pwa-components VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"pwa-components\",\n \"title\": \"PWA Components\",\n \"vendor\": \"vtex\",\n \"version\": \"0.4.2\",\n \"description\": \"Components related to PWA features\",\n \"dependencies\": {\n \"vtex.pwa-graphql\": \"1.x\",\n \"vtex.styleguide\": \"9.x\",\n \"vtex.store-resources\": \"0.x\"\n },\n \"builders\": {\n \"react\": \"3.x\",\n \"docs\": \"0.x\",\n \"store\": \"0.x\",\n \"messages\": \"1.x\"\n },\n \"scripts\": {\n \"postreleasy\": \"vtex publish --verbose\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_octopia-scheduler_64a924af
[ { "role": "system", "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": "user", "content": "Show me the implementation of octopia-scheduler/dangerfile.js from the octopia-scheduler VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// dangerfile.js\nconst { verify } = require('@vtex/danger')\n\nconst config = {\n // Set to true to enforce keepachangelog rules.\n keepachangelog: {\n changeVersion: false,\n },\n rules: {\n description: ['fail', { minLength: 20 }],\n assignee: 'fail',\n reviewers: 'fail',\n pr_size: ['warn', { additionLimit: 800, deletionLimit: -1 }],\n lock_file: 'warn',\n no_ignored_test: ['fail', { pattern: /test|spec/i }],\n no_debugger: ['fail', { pattern: /\\.[tj]sx?$/i }],\n enforce_graphql_provider: 'off',\n },\n}\n\nverify(config)\n\n```" } ]
code_octopia-scheduler_c09c679a
[ { "role": "system", "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": "user", "content": "Show me the implementation of octopia-scheduler/package.json from the octopia-scheduler VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"octopia-scheduler\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.12.21\",\n \"@vtex/prettier-config\": \"^0.3.6\",\n \"@vtex/danger\": \"^0.2.7\",\n \"eslint\": \"^7.16.0\",\n \"eslint-config-vtex\": \"^12.9.3\",\n \"husky\": \"^4.3.6\",\n \"lint-staged\": \"^10.5.3\",\n \"prettier\": \"^2.2.1\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_octopia-scheduler_6b02582e
[ { "role": "system", "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": "user", "content": "Show me the implementation of octopia-scheduler/manifest.json from the octopia-scheduler VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"octopia-scheduler\",\n \"vendor\": \"vtex\",\n \"version\": \"0.0.1\",\n \"title\": \"Octopia scheduler\",\n \"description\": \"Scheduler service for Octopia integration\",\n \"mustUpdateAt\": \"2018-01-04\",\n \"categories\": [],\n \"dependencies\": {},\n \"builders\": {\n \"node\": \"6.x\",\n \"docs\": \"0.x\",\n \"graphql\": \"1.x\"\n },\n \"scripts\": {\n \"prereleasy\": \"bash lint.sh\"\n },\n \"credentialType\": \"absolute\",\n \"policies\": [\n {\n \"name\": \"ADMIN_DS\"\n },\n {\n \"name\": \"colossus-fire-event\"\n },\n {\n \"name\": \"colossus-write-logs\"\n },\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"portal.vtexcommercestable.com.br\",\n \"path\": \"/api/*\"\n }\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_product-context_f049ef46
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-context/package.json from the product-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"product-context\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/prettier-config\": \"^0.3.6\",\n \"eslint\": \"^7.14.0\",\n \"eslint-config-vtex\": \"^12.8.11\",\n \"eslint-config-vtex-react\": \"^6.8.3\",\n \"husky\": \"^4.3.0\",\n \"lint-staged\": \"^10.5.1\",\n \"prettier\": \"^2.2.0\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_product-context_e76fa0d7
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-context/manifest.json from the product-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"product-context\",\n \"vendor\": \"vtex\",\n \"version\": \"0.10.1\",\n \"title\": \"VTEX Product Context\",\n \"description\": \"\",\n \"settingsSchema\": {},\n \"dependencies\": {},\n \"builders\": {\n \"react\": \"3.x\",\n \"docs\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_admin-vbase-example_975a730a
[ { "role": "system", "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": "user", "content": "Show me the implementation of admin-vbase-example/package.json from the admin-vbase-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"version\": \"0.0.0\",\n \"name\": \"admin-example\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"cd ./react && yarn test\"\n },\n \"intl-equalizer\": {\n \"referenceLocale\": \"en\",\n \"localeDirectory\": \"messages\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"lint-staged && intl-equalizer && intl-equalizer --fix\"\n }\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.json\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@vtex/intl-equalizer\": \"^2.4.2\",\n \"@vtex/prettier-config\": \"^0.3.3\",\n \"eslint\": \"^7.4.0\",\n \"eslint-config-vtex\": \"^12.7.0\",\n \"eslint-config-vtex-react\": \"^6.7.0\",\n \"husky\": \"^4.2.5\",\n \"lint-staged\": \"^10.2.11\",\n \"prettier\": \"^2.0.5\",\n \"typescript\": \"^3.9.6\"\n }\n}\n\n```" } ]
code_admin-vbase-example_13e90425
[ { "role": "system", "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": "user", "content": "Show me the implementation of admin-vbase-example/manifest.json from the admin-vbase-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vendor\": \"vtex\",\n \"name\": \"admin-vbase-example\",\n \"version\": \"0.0.2\",\n \"title\": \"Admin Example - VBase\",\n \"description\": \"Admin Example - VBase\",\n \"builders\": {\n \"react\": \"3.x\",\n \"messages\": \"1.x\",\n \"node\": \"6.x\",\n \"docs\": \"0.x\",\n \"admin\": \"0.x\",\n \"graphql\": \"1.x\"\n },\n \"dependencies\": {\n \"vtex.styleguide\": \"9.x\"\n },\n \"registries\": [\n \"smartcheckout\"\n ],\n \"policies\": [\n {\n \"name\": \"outbound-access\",\n \"attrs\": {\n \"host\": \"portal.vtexcommercestable.com.br\",\n \"path\": \"*\"\n }\n },\n {\n \"name\": \"vbase-read-write\"\n }\n ],\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_service-course_6874a0b2
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/config.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"title\": \"VTEX IO Service Course\",\n \"tagline\": \"Building backend applications with VTEX IO\",\n \"description\": \"In this course, learn about the main possibilities of backend applications in VTEX IO. Export routes, handle events and connect with external and internal apps, to make your VTEX IO app even better and take the best out of VTEX infrastructure.\",\n \"languages\": [\n \"en\"\n ],\n \"steps\": [\n {\n \"folder\": \"00-services\",\n \"title\": {\n \"en\": \"Services in VTEX IO\"\n },\n \"description\": {\n \"en\": \"On this step, we have an overview of services in VTEX IO and brief explanation of backend possibilities\"\n },\n \"challenge\": \"none\"\n }\n ]\n}\n\n```" } ]
code_service-course_7b8971ae
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/README.md from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Service Course\n\n> **This content was moved to another place. We no longer support these courses and learning portal.**\n\nTo check out this course in our new platform, you can click [here](https://developers.vtex.com/learning/docs/course-service-course-lang-en). You can also have a look at [our new landing page](https://developers.vtex.com/learning), where you can find interesing content for you!\n\n```" } ]
code_service-course_11bfbbe8
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/package.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"build\": \"tsc\",\n \"test\": \"yarn jest\"\n },\n \"dependencies\": {\n \"postcss\": \"^7.0.27\",\n \"ramda\": \"^0.27.0\",\n \"typescript\": \"3.7.3\"\n },\n \"devDependencies\": {\n \"@types/ramda\": \"^0.26.43\"\n }\n}\n\n```" } ]
code_service-course_7497fb97
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/global.d.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport * as ramda from 'ramda'\n\nexport {} \n\ndeclare global {\n interface TestContext {\n getFile: (path: string) => Promise<string>\n parseCss: (content: string) => object\n parseJsonc: (content: string) => object\n ramda: typeof ramda\n [key: string]: any\n }\n\n interface TestFunctionParameters {\n ctx: TestContext\n }\n\n interface TestCase {\n tests: {\n description: string\n failMsg: string\n test: (param: TestFunctionParameters) => Promise<boolean> | boolean\n }[]\n }\n}\n\n```" } ]
code_service-course_c152f413
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/docs/README.md from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Service Course\n\n\n**Upcoming documentation:**\n\n - [Steps and Boilerplate](https://github.com/vtex-apps/service-course/pull/2)\n```" } ]
code_service-course_6db3f88a
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/package.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"backend-course\",\n \"private\": true,\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"lint\": \"eslint --ext js,jsx,ts,tsx .\",\n \"format\": \"prettier --write \\\"**/*.{ts,tsx,js,jsx,json}\\\"\"\n },\n \"lint-staged\": {\n \"*.{ts,js,tsx,jsx}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"*.{json,graphql,gql}\": [\n \"prettier --write\"\n ]\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.12.21\",\n \"@vtex/prettier-config\": \"^0.1.3\",\n \"eslint\": \"^6.8.0\",\n \"eslint-config-vtex\": \"^12.2.1\",\n \"lint-staged\": \"^10.0.2\",\n \"prettier\": \"^1.19.1\",\n \"typescript\": \"^3.7.5\"\n }\n}\n\n```" } ]
code_service-course_c1d6d04a
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/manifest.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"backend-course\",\n \"vendor\": \"vtex\",\n \"version\": \"0.0.2\",\n \"title\": \"Backend Course\",\n \"description\": \"Reference app for the Backend Course\",\n \"builders\": {\n \"node\": \"6.x\"\n },\n \"scripts\": {\n \"prereleasy\": \"bash lint.sh\"\n },\n \"credentialType\": \"absolute\",\n \"policies\": [],\n \"dependencies\": {\n \"vtex.events-example\": \"0.x\"\n },\n \"$schema\": \"https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema\"\n}\n\n```" } ]
code_service-course_efb6504d
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/service.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"memory\": 128,\n \"ttl\": 10,\n \"timeout\": 10,\n \"minReplicas\": 2,\n \"maxReplicas\": 10,\n \"workers\": 4,\n \"routes\": {\n \"analytics\": {\n \"path\": \"/_v/app/analytics/realTime\",\n \"public\": true\n }\n }\n}\n\n```" } ]
code_service-course_9e5a8305
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/package.json from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"dependencies\": {\n \"co-body\": \"^6.0.0\"\n },\n \"devDependencies\": {\n \"@types/co-body\": \"^0.0.3\",\n \"@types/node\": \"12.x\",\n \"@vtex/api\": \"6.30.1\",\n \"eslint\": \"^6.3.0\",\n \"eslint-config-vtex\": \"^11.0.0\",\n \"prettier\": \"^1.18.2\",\n \"typescript\": \"3.8.3\"\n },\n \"resolutions\": {\n \"**/**/lodash\": \"^4.17.19\"\n },\n \"scripts\": {\n \"lint\": \"tsc --noEmit --pretty && eslint -c .eslintrc.json --fix './**/*.ts'\"\n },\n \"version\": \"0.7.2\"\n}\n\n```" } ]
code_service-course_5869e344
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/index.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n LRUCache,\n Service,\n ServiceContext,\n ParamsContext,\n RecorderState,\n method,\n} from '@vtex/api'\nimport { Clients } from './clients'\nimport { analytics } from './handlers/analytics'\n\n// Create a LRU memory cache for the Status client.\n// The @vtex/api HttpClient respects Cache-Control headers and uses the provided cache.\nconst memoryCache = new LRUCache<string, any>({ max: 5000 })\nmetrics.trackCache('status', memoryCache)\n\ndeclare global {\n type Context = ServiceContext<Clients, State>\n\n interface State extends RecorderState {\n code: number\n }\n}\n\nexport default new Service<Clients, State, ParamsContext>({\n clients: {\n implementation: Clients,\n options: {\n default: {\n retries: 2,\n timeout: 10000,\n },\n },\n },\n routes: {\n analytics: method({\n GET: [analytics],\n }),\n },\n})\n\n```" } ]
code_service-course_6b10867a
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/clients/analytics.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { AppClient } from '@vtex/api'\n\nexport default class Analytics extends AppClient {}\n\n```" } ]
code_service-course_685a5f57
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/clients/index.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { IOClients } from '@vtex/api'\n\n\n// Extend the default IOClients implementation with our own custom clients.\nexport class Clients extends IOClients {\n\n}\n\n```" } ]
code_service-course_44536da8
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/utils/constants.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const COURSE_ENTITY = 'course_backend_product_list'\n\n```" } ]
code_service-course_84f2343f
[ { "role": "system", "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": "user", "content": "Show me the implementation of service-course/course/template/node/handlers/analytics.ts from the service-course VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport async function analytics(ctx: Context, next: () => Promise<any>) {\n ctx.status = 200\n ctx.body = 'OK'\n ctx.set('cache-control', 'no-cache')\n\n await next()\n}\n\n```" } ]
code_payment-provider-example_c4b539b9
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/docs/README.md from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Payment Provider Framework (IO)\n\n## ⚠️ Disclaimer\n\nThis is a feature in BETA stage, which means it's on a testing phase. In case there is a new scenario that PPF is not ready, our team will take some time to perform an investigation. If it's a case that need the development of anything new, this will enter the process of prioritization of the product team. This can take some time, so we don't recommend the use of this Beta version of PPF for connectors related to stores with rollout date close (less than 3 months).\n\n## 🐣 Getting Started\n\n### ⬇️ Cloning base repository\n\nIf you're starting a brand new project, we recommend you clone [the example repository](https://github.com/vtex-apps/payment-provider-example), as it already has all the basic configuration setup.\n\n### 🆕 Updating project\n\nYour first step should be to run the following command on your node folder:\n\n```\nyarn add @vtex/payment-provider\n```\n\nAfterwards, go to your ***package.json*** and make sure it has been added as a dependency with the correct version:\n\n```\n\"@vtex/payment-provider\": \"1.x\",\n```\n\nAlso check in the ***package.json*** is the version of vtex/api, which should be listed in the *devDependencies* as follows:\n\n```\n\"@vtex/api\": \"6.x\",\n```\n\n(When linking your app, this version might get updated to a **later 6.x** version, which is fine.)\n\nIn case it's not listed as a **devDependency**, run the following command on your node folder:\n\n```\nyarn add -D @vtex/api\n```\n\n> ℹ️ **Info**: If you get any type errors or conflicts in your project related to @vtex/api, follow these steps to resolve the problem: delete the **node_modules** folder and the **yarn.lock** file from both your project root and your project's **node** folder, then run the command **yarn install -f** in both folders. \n\nLastly, in your ***manifest.json,*** you should check the ***builders*** section, in which you must include the ***paymentProvider*** in it's current version:\n\n```json\n\"builders\": {\n \"node\": \"6.x\", \n \"paymentProvider\": \"1.x\"\n}\n```\n\n> ℹ️ **Info**: This will add policies to callback the Payment Gateway APIs and also expose Payment Provider protocol routes.\n\n\nNow, in order to create your service, you must implement your payment provider connector and the service itself. To help you with them, keep reading the next sections.\n\n## 💳 Payment Provider\n\nThis is an abstract class with the signatures of the routes functions required in your connector, according to the [protocol](https://help.vtex.com/en/tutorial/payment-provider-protocol).\n\nYou must create a new class extending the `PaymentProvider`, which must implement a function for each route. The functions will receive the request body (when there is one) as a parameter and the response must be returned as an object, such as the example shown below:\n\n```tsx\nimport {\n\tPaymentProvider,\n\t// ...\n} from '@vtex/payment-provider'\n\nclass YourPaymentConnector extends PaymentProvider {\n\n\t// ... implementation of the other routes functions\n}\n```\n\nTypescript should automatically check for typing errors, but if you need, you can check the requests and responses signatures [here](https://developers.vtex.com/vtex-developer-docs/reference/payment-flow).\n\n### 🏗️ Payment Provider Builder\n\nIn order to specify which payment methods the connector will accept to process, you need to create a folder named ***paymentProvider*** using the following folder structure\n\n```markdown\nnode\npaymentProvider\nmanifest.json\n```\n\nThen, inside **_paymentProvider_** folder you must create a file named ***configuration.json***\n\n```markdown\nnode\npaymentProvider\n |--configuration.json\nmanifest.json\n```\n\nNext, declare the accepted payment methods, for instance:\n\n```json\n{\n \"name\": \"MyConnector\",\n \"paymentMethods\": [\n {\n \"name\": \"Visa\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"American Express\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Diners\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Elo\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Hipercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Mastercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"BankInvoice\",\n \"allowsSplit\": \"onAuthorize\"\n }\n ]\n}\n```\n\nBy doing this you don't need to declare **_/manifest_** or **_/payment-methods_** route, it will be implemented automatically by the builder.\n\n### ⚙️️ Overriding Default Routes\n\nYou can also override the default generated routes by redeclaring it on ***service.json***\n\n```json\n{\n \"memory\": 256,\n \"ttl\": 10,\n \"timeout\": 10,\n \"minReplicas\": 2,\n \"maxReplicas\": 3,\n \"routes\": {\n \"authorize\": {\n \"path\": \"/_v/api/my-connector/payments\",\n \"public\": true\n },\n \"cancel\": {\n \"path\": \"/_v/api/my-connector/payments/:paymentId/cancellations\",\n \"public\": true\n },\n \"settle\": {\n \"path\": \"/_v/api/my-connector/payments/:paymentId/settlements\",\n \"public\": true\n },\n \"refund\": {\n \"path\": \"/_v/api/my-connector/payments/:paymentId/refunds\",\n \"public\": true\n },\n \"inbound\": {\n \"path\": \"/_v/api/my-connector/payments/:paymentId/inbound/hooks\",\n \"public\": true\n }\n }\n}\n```\n\nThen you must specify which is the new `serviceUrl` on **_paymentProvider/configuration.json_**\n\n```json\n{\n \"name\": \"MyConnector\",\n \"serviceUrl\": \"/_v/api/my-connector\",\n \"paymentMethods\": [\n {\n \"name\": \"Visa\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"American Express\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Diners\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Elo\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Hipercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Mastercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"BankInvoice\",\n \"allowsSplit\": \"onAuthorize\"\n }\n ]\n}\n```\n> ⚠️ **Important**: Prefer using default generated routes!\n\n### ⚙️️ Overriding the Manifest Route\n\nThe manifest route is special, it is automatically generated by the builder, our payment gateway exposes it as a proxy of your app.\n\nGenerally speaking, the manifest route makes no difference at runtime, and if you have a use case to override the default route tell us.\n\nBut, if you want to override it anyway you have to add special parameters on it:\n\n```json\n{\n \"memory\": 256,\n \"ttl\": 10,\n \"timeout\": 10,\n \"minReplicas\": 2,\n \"maxReplicas\": 3,\n \"routes\": {\n \"manifest\": {\n \"path\": \"/_v/api/my-connector/manifest\",\n \"handler\": \"vtex.payment-gateway@1.x/providerManifest\",\n \"headers\": {\n \"x-provider-app\": \"$appVendor.$appName@$appVersion\"\n },\n \"public\": true\n }\n }\n}\n```\n\nPay attention on `x-provider-app`. It should be updated every time that your major changes. Example:\n\n- `vtex.payment-provider-example@1.2.3` should be `vtex.payment-provider-example@1.2.3`\n\nThe same applies to payment-methods route.\n\nYou can also omit the `handler` and `headers` parameters, by doing it you will need to implement it by your own\n\n\n### ⚙️ Available Configurable Options\n\nAlong with manifest fields (`paymentMethods` and `customFields`) there are another configurable options:\n\n- `serviceUrl` _(required, default: auto-generated for IO Connectors)_\n - A valid url (can include relative paths)\n- `implementsOAuth` _(default: **false**)_\n - ***true*** - The provider implements the configuration flow supporting OAuth.\n - ***false*** - The provider dosnt implements the configuration flow\n- `implementsSplit` _(default: **false**)_\n - ***true*** - The provider implements can receive recipients on payment flow (capture or authorization)\n - ***false*** - The provider doesn't implements the split flow\n- `usesProviderHeadersName` _(default: ***true***, for IOConnectors it should be true)_\n - ***true*** - The provider will reiceve appKey and appToken headers as ```\"x-provider-api-appKey\"``` & `\"x-provider-api-appToken\"`\n - ***false*** - The provider will reiceve appKey and appToken headers as `\"x-vtex-api-appKey\"` & `\"x-vtex-api-appToken\"`\n- `usesAntifraud` _(default: **false**)_\n - ***true*** - The provider can be used along antifrauds.\n - ***false*** - The provider can't be used along antifrauds\n- `usesBankInvoiceEnglishName` _(**default**: false)_\n- `name` (required)\n - The connector name\n- `usesSecureProxy` _(**default**: true)_\n - ***true*** - The provider can process payment without being PCI-Certified, the connector will receive a secureProxyUrl on createPayment flow, and the card encrypted data.\n - ***false*** - The provider MUST be a PCI-Certified entity, and we should receive the AoC containing the provided serviceUrl. Apps implemented within VTEX IO cannot have the secureProxy disabled, this option only works for a configuration app.\n- `requiresDocument` _(**default**: false)_\n - ***true*** - The customer must include the card holder document on checkout. A new field will appear on checkout form.\n - ***false*** - The customer doesn't need to include card holder document.\n- `acceptSplitPartialRefund` _(**default**: false)_\n - ***true*** - Partial refund will be sent when payment split occurs.\n - ***false*** - The connector couldn't process partial refund when payment split occurs.\n- `usesAutoSettleOptions` _(**default**: false)_\n - ***true*** - The client will be able to choose the behaviour of the auto settlement in the VTEX admin configurations of the provider. The options available are the following: Use behavior recommended by the payment processor, Automatic capture immediately after payment authorization, Automatic capture immediately after anti-fraud analysis, Deactivated: Not automatically captured.\n - ***false*** - The connector won't have this dropdown configuration field for auto settlement.\n\n\n### 🔁 Request a retry from Payment Gateway\n\nA retry is required in order to develop your connector according to the [protocol](https://help.vtex.com/en/tutorial/payment-provider-protocol), so we built a function, which can be invoked like shown below:\n\n```tsx\nthis.retry(request)\n```\n\nCallback flow is replaced by retry flow. Payment Providers implemented using VTEX IO are not able to callback the Payment Gateway with the Payment status updated. Instead, the retry flow allow the connector to ask the Payment Gateway to call create payment route again.\nThe connector should be able to respond approved/denied consistently.\n\n![image](https://user-images.githubusercontent.com/5839364/138521406-fe3875c1-92ae-4064-aafe-c4c5de56427e.png)\n\n### 💵 Payment Provider Service\n\nThis is a class that extends the Service from `@vtex/api`. You must invoke it passing the developed connector as a property of the first parameter and it will automatically setup the required routes for you.\n\n```tsx\nimport {\n\tPaymentProviderService,\n} from '@vtex/payment-provider'\n\nnew PaymentProviderService({\n\tconnector: YourPaymentConnector,\n})\n```\n\nBy default, the Payment Provider Service declares the following routes:\n\n- /payment-methods\n- /manifest\n- /payments\n- /settlements\n- /refunds\n- /cancellations\n- /inbounds\n\nIf your service requires any extra routes, you must declare them separately and use them as parameters:\n\n```tsx\nnew PaymentProviderService({\n\troutes: newRoutes,\n\tconnector: YourPaymentConnector,\n})\n```\n\nIf your connector requires any extra clients, you must also pass them in the parameters along with the connector:\n\n```tsx\nnew PaymentProviderService({\n\tclients: NewClients,\n\tconnector: YourPaymentConnector,\n})\n```\n\n### 🔒 Using Secure Proxy\n\nThose who aren't PCI-certified, could use Secure Proxy to make calls to a PCI-Certified endpoint.\n\n> ⚠️ **Important**: The endpoint must be allowed by VTEX Secure Proxy by sending the AOC with the wanted endpoint.\n\n> ⚠️ **Important**: Currently we only accept two Content-Types: `application/json` or `application/x-www-form-urlencoded`. Any other Content-Type will not be supported by the Secure Proxy.\n\nIn order to make calls over our Secure Proxy, you must:\n\n1. Extend `SecureExternalClient` abstract class. In the code example below, it means that VTEX allows `http://my-pci-certified-domain.com` as one of the trusted destinations by receiving its AOC.\n\n ```tsx\n import { SecureExternalClient } from '@vtex/payment-provider'\n import type {\n InstanceOptions,\n IOContext\n } from '@vtex/api'\n export class MyPCICertifiedClient extends SecureExternalClient {\n constructor(protected context: IOContext, options?: InstanceOptions) {\n super('http://my-pci-certified-domain.com', context, options)\n }\n // ...\n }\n ```\n \n2. Set secure proxy URL on the request that you want to be proxied:\n\n ```tsx\n import { SecureExternalClient, CardAuthorization } from '@vtex/payment-provider'\n import type {\n InstanceOptions,\n IOContext,\n RequestConfig,\n } from '@vtex/api'\n \n export class MyPCICertifiedClient extends SecureExternalClient {\n constructor(protected context: IOContext, options?: InstanceOptions) {\n super('http://my-pci-certified-domain.com', context, options)\n }\n \n public myPCIEndpoint = (cardRequest: CardAuthorization) => {\n return this.http.post(\n 'my-pci-endpoint',\n {\n holder: cardRequest.holderToken,\n number: cardRequest.numberToken,\n expiration: cardRequest.expiration,\n csc: cardRequest.cscToken\n },\n {\n headers: {\n Authorization: 'my-pci-endpoint-authorization',\n },\n secureProxy: cardRequest.secureProxyUrl,\n } as RequestConfig\n )\n }\n }\n ```\n \n > ℹ️ **Info**: SecureProxyURL is received on createPayment flow\n\n## 🛍️ Placing an Order with your new Connector\n\nNow that we have a new connector ready to be use, we can test it entirely in the production flow \nusing your store's checkout. To submit a request to add an account to test IO connectors, you can use the workflow \"**_Allow Account to test_**\"\nin the `#provider-review` slack channel.\n\n> ❗**Attention**: The account **MUST BE ALLOWED** to use IO Connectors! \n\n> ❗**Attention**: For processing NEW payment methods, their creation must be requested!\n\nA prerequisite for this step is to have products for sale at your store for testing\n\n1. Launch a beta version of your connector, e.g. `vtex.payment-provider-test@0.1.0-beta`\n2. Install the beta version on `master` workspace (wait ~1 hour)\n3. Go to `https://${account}.myvtex.com/admin/pci-gateway/#/affiliations/vtex-payment-provider-test-v0/`\n \n The format is: `${vendor}-${appName}-${appMajor}`\n \n ![new-configuration-production](https://user-images.githubusercontent.com/27698855/116406925-91d7ab80-a807-11eb-9a26-44e2f418df9d.png)\n\n4. Change the toggle configuration to `Test`\n\n5. Click save and refresh page\n\n6. Enter again in the saved configuration and you will notice that a new field appears, called `workspace`\n\n7. Set the `workspace` as you wish (you can leave it as `master`)\n\n ![new-configuration-test](https://user-images.githubusercontent.com/27698855/116406935-94d29c00-a807-11eb-80c6-190e8fd6d373.png)\n\n8. Configure a payment condition with your newly created connector and wait 10 minutes to appear on checkout!\n\n## 📖 Making your connector available to everyone\n\n> ⚠️ **Important**: If you want to make your connector available to all accounts, make sure to have the billing options field in your manifest\n\nThe publication process is made via app store, more info on how to do that here: \n\n[Submitting your app in the VTEX app store](https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-submitting-your-app-in-the-vtex-app-store)\n\nAfter the homolog step is complete, your app needs to be installed in the account that wants to use it, and after that, a new affiliation will be available to configure it.\n\nThe app should be available at `apps.vtex.com`.\n\n## 📄Upcoming documentation\n\n - [Add vbase client to persist responses](https://github.com/vtex-apps/payment-provider-example/pull/30)\n\n```" } ]
code_payment-provider-example_cd88743c
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/paymentProvider/configuration.json from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"TestSuitApprover\",\n \"paymentMethods\": [\n {\n \"name\": \"Visa\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"American Express\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Diners\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Elo\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Hipercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"Mastercard\",\n \"allowsSplit\": \"onCapture\"\n },\n {\n \"name\": \"BankInvoice\",\n \"allowsSplit\": \"onAuthorize\"\n }\n ],\n \"customFields\": [\n {\n \"name\": \"Client ID\",\n \"type\": \"text\"\n },\n {\n \"name\": \"Secret Token\",\n \"type\": \"password\"\n },\n {\n \"name\": \"Currency\",\n \"type\": \"select\",\n \"options\": [\n {\n \"text\": \"BRL\",\n \"value\": \"1\"\n },\n {\n \"text\": \"USD\",\n \"value\": \"2\"\n }\n ]\n }\n ]\n}\n\n```" } ]
code_payment-provider-example_4df72be8
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/node/connector.ts from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n AuthorizationRequest,\n AuthorizationResponse,\n CancellationRequest,\n CancellationResponse,\n Cancellations,\n PaymentProvider,\n RefundRequest,\n RefundResponse,\n Refunds,\n SettlementRequest,\n SettlementResponse,\n Settlements,\n} from '@vtex/payment-provider'\nimport { VBase } from '@vtex/api'\n\nimport { randomString } from './utils'\nimport { executeAuthorization } from './flow'\n\nconst authorizationsBucket = 'authorizations'\nconst persistAuthorizationResponse = async (\n vbase: VBase,\n resp: AuthorizationResponse\n) => vbase.saveJSON(authorizationsBucket, resp.paymentId, resp)\n\nconst getPersistedAuthorizationResponse = async (\n vbase: VBase,\n req: AuthorizationRequest\n) =>\n vbase.getJSON<AuthorizationResponse | undefined>(\n authorizationsBucket,\n req.paymentId,\n true\n )\n\nexport default class TestSuiteApprover extends PaymentProvider {\n // This class needs modifications to pass the test suit.\n // Refer to https://help.vtex.com/en/tutorial/payment-provider-protocol#4-testing\n // in order to learn about the protocol and make the according changes.\n\n private async saveAndRetry(\n req: AuthorizationRequest,\n resp: AuthorizationResponse\n ) {\n await persistAuthorizationResponse(this.context.clients.vbase, resp)\n this.callback(req, resp)\n }\n\n public async authorize(\n authorization: AuthorizationRequest\n ): Promise<AuthorizationResponse> {\n if (this.isTestSuite) {\n const persistedResponse = await getPersistedAuthorizationResponse(\n this.context.clients.vbase,\n authorization\n )\n\n if (persistedResponse !== undefined && persistedResponse !== null) {\n return persistedResponse\n }\n\n return executeAuthorization(authorization, response =>\n this.saveAndRetry(authorization, response)\n )\n }\n\n throw new Error('Not implemented')\n }\n\n public async cancel(\n cancellation: CancellationRequest\n ): Promise<CancellationResponse> {\n if (this.isTestSuite) {\n return Cancellations.approve(cancellation, {\n cancellationId: randomString(),\n })\n }\n\n throw new Error('Not implemented')\n }\n\n public async refund(refund: RefundRequest): Promise<RefundResponse> {\n if (this.isTestSuite) {\n return Refunds.deny(refund)\n }\n\n throw new Error('Not implemented')\n }\n\n public async settle(\n settlement: SettlementRequest\n ): Promise<SettlementResponse> {\n if (this.isTestSuite) {\n return Settlements.deny(settlement)\n }\n\n throw new Error('Not implemented')\n }\n\n public inbound: undefined\n}\n\n```" } ]
code_payment-provider-example_44833465
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/node/utils.ts from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const randomString = () => {\n return Math.random()\n .toString(36)\n .substring(7)\n}\n\nexport const randomUrl = () => {\n return `https://${randomString()}.com`\n}\n\n```" } ]
code_payment-provider-example_477b4229
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/node/flow.ts from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n isBankInvoiceAuthorization,\n isCardAuthorization,\n isTokenizedCard,\n AuthorizationRequest,\n AuthorizationResponse,\n Authorizations,\n} from '@vtex/payment-provider'\n\nimport { randomString, randomUrl } from './utils'\n\ntype Flow =\n | 'Authorize'\n | 'Denied'\n | 'Cancel'\n | 'AsyncApproved'\n | 'AsyncDenied'\n | 'BankInvoice'\n | 'Redirect'\n\nexport const flows: Record<\n Flow,\n (\n authorization: AuthorizationRequest,\n retry: (response: AuthorizationResponse) => void\n ) => AuthorizationResponse\n> = {\n Authorize: request =>\n Authorizations.approve(request, {\n authorizationId: randomString(),\n nsu: randomString(),\n tid: randomString(),\n }),\n\n Denied: request => Authorizations.deny(request, { tid: randomString() }),\n\n Cancel: (request, retry) => flows.Authorize(request, retry),\n\n AsyncApproved: (request, retry) => {\n retry(\n Authorizations.approve(request, {\n authorizationId: randomString(),\n nsu: randomString(),\n tid: randomString(),\n })\n )\n\n return Authorizations.pending(request, {\n delayToCancel: 1000,\n tid: randomString(),\n })\n },\n\n AsyncDenied: (request, retry) => {\n retry(Authorizations.deny(request, { tid: randomString() }))\n\n return Authorizations.pending(request, {\n delayToCancel: 1000,\n tid: randomString(),\n })\n },\n\n BankInvoice: (request, retry) => {\n retry(\n Authorizations.approve(request, {\n authorizationId: randomString(),\n nsu: randomString(),\n tid: randomString(),\n })\n )\n\n return Authorizations.pendingBankInvoice(request, {\n delayToCancel: 1000,\n paymentUrl: randomUrl(),\n tid: randomString(),\n })\n },\n\n Redirect: (request, retry) => {\n retry(\n Authorizations.approve(request, {\n authorizationId: randomString(),\n nsu: randomString(),\n tid: randomString(),\n })\n )\n\n return Authorizations.redirect(request, {\n delayToCancel: 1000,\n redirectUrl: randomUrl(),\n tid: randomString(),\n })\n },\n}\n\nexport type CardNumber =\n | '4444333322221111'\n | '4444333322221112'\n | '4222222222222224'\n | '4222222222222225'\n | 'null'\n\nconst cardResponses: Record<CardNumber, Flow> = {\n '4444333322221111': 'Authorize',\n '4444333322221112': 'Denied',\n '4222222222222224': 'AsyncApproved',\n '4222222222222225': 'AsyncDenied',\n null: 'Redirect',\n}\n\nconst findFlow = (request: AuthorizationRequest): Flow => {\n if (isBankInvoiceAuthorization(request)) return 'BankInvoice'\n\n if (isCardAuthorization(request)) {\n const { card } = request\n const cardNumber = isTokenizedCard(card) ? null : card.number\n\n return cardResponses[cardNumber as CardNumber]\n }\n\n return 'Authorize'\n}\n\nexport const executeAuthorization = (\n request: AuthorizationRequest,\n retry: (response: AuthorizationResponse) => void\n): AuthorizationResponse => {\n const flow = findFlow(request)\n\n return flows[flow](request, retry)\n}\n\n```" } ]
code_payment-provider-example_1da710ea
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/node/package.json from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"dependencies\": {\n \"@vtex/payment-provider\": \"^1.4.0\",\n \"axios\": \"^0.21.1\",\n \"co-body\": \"^6.0.0\",\n \"ramda\": \"^0.25.0\",\n \"typescript-string-enums\": \"^1.0.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/ramda\": \"types/npm-ramda#dist\",\n \"@vtex/api\": \"6.45.6\",\n \"@vtex/test-tools\": \"^1.0.0\",\n \"typescript\": \"3.9.7\",\n \"vtex.payment-provider-example\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.payment-provider-example@1.0.2/public/_types/react\"\n },\n \"scripts\": {\n \"lint\": \"tsc --noEmit --pretty\"\n },\n \"version\": \"1.2.0\"\n}\n\n```" } ]
code_payment-provider-example_089dcd0d
[ { "role": "system", "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": "user", "content": "Show me the implementation of payment-provider-example/node/index.ts from the payment-provider-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { PaymentProviderService } from '@vtex/payment-provider'\n\nimport TestSuiteApprover from './connector'\n\nexport default new PaymentProviderService({\n connector: TestSuiteApprover,\n})\n\n```" } ]
code_product-specification-badges_9ca747e4
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/messages/pt.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/editor.product-specification-badges.title\": \"Medalhas de Especificação de Produto\",\n \"admin/editor.product-specification-badges.description\": \"Componente para mostrar as medalhas de especificação de produto na página de produto\",\n \"admin/editor.product-specification-badges.specificationGroupName.title\": \"Nome do Grupo de Especificação\",\n \"admin/editor.product-specification-badges.specificationName.title\": \"Nome da Especificação\",\n \"admin/editor.product-specification-badges.visibleWhen.title\": \"Visível Quando\",\n \"admin/editor.product-specification-badges.displayValue.title\": \"Valor a mostrar\",\n \"admin/editor.product-specification-badges.orientation.title\": \"Orientação\",\n \"admin/editor.product-specification-badges.specificationsOptions.title\": \"Opções de Especificações\",\n \"admin/editor.product-specification-badges.specificationsOptions.item.title\": \"Opção de Especificação\",\n \"admin/editor.product-specification-badges.orientation.horizontal\": \"Horizontal\",\n \"admin/editor.product-specification-badges.orientation.vertical\": \"Vertical\",\n \"admin/editor.product-specification-badges.specificationGroupName.description\": \"Nome do grupo que quer aplicar\",\n \"admin/editor.product-specification-badges.specificationName.description\": \"Nome da especificação que você quer aplicar, deixe vazio para aplicar em todas dentro do grupo\",\n \"admin/editor.product-specification-badges.visibleWhen.description\": \"Insira um valor para mostrar a medalha apenas quando a especificação conter um valor exatamente igual ao passado.\",\n \"admin/editor.product-specification-badges.displayValue.description\": \"Escolha o que mostrar dentro da medalha. Leia a documentação para possíveis valores.Choose what to show inside badge.\",\n \"admin/editor.product-specification-badges.orientation.description\": \"Escolha a orientação em que quer mostrar as medalhas\",\n \"admin/editor.product-specification-badges.specificationsOptions.description\": \"Especifique opções mais detalhadas para diferentes especificações dentro do grupo\",\n \"store/product-specification-badges.baseSpecificationBadges.aria-label\": \"Medalha {Badge}\"\n}\n\n```" } ]
code_product-specification-badges_c86edfb0
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/messages/en.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/editor.product-specification-badges.title\": \"Product Specification Badges\",\n \"admin/editor.product-specification-badges.description\": \"Component to show product specification badges on product page\",\n \"admin/editor.product-specification-badges.specificationGroupName.title\": \"Specification Group Name\",\n \"admin/editor.product-specification-badges.specificationName.title\": \"Specification Name\",\n \"admin/editor.product-specification-badges.visibleWhen.title\": \"Visible When\",\n \"admin/editor.product-specification-badges.displayValue.title\": \"Display Value\",\n \"admin/editor.product-specification-badges.orientation.title\": \"Orientation\",\n \"admin/editor.product-specification-badges.specificationsOptions.title\": \"Specifications Options\",\n \"admin/editor.product-specification-badges.specificationsOptions.item.title\": \"Specification Option\",\n \"admin/editor.product-specification-badges.orientation.horizontal\": \"Horizontal\",\n \"admin/editor.product-specification-badges.orientation.vertical\": \"Vertical\",\n \"admin/editor.product-specification-badges.specificationGroupName.description\": \"Name of the group you want to target\",\n \"admin/editor.product-specification-badges.specificationName.description\": \"Name of the specification you want to target, leave empty to target all inside group\",\n \"admin/editor.product-specification-badges.visibleWhen.description\": \"Insert value to display badge only when specification value is an exact match\",\n \"admin/editor.product-specification-badges.displayValue.description\": \"Choose what to show inside badge. Read documentation for possible values.\",\n \"admin/editor.product-specification-badges.orientation.description\": \"Choose orientation in which to display badges\",\n \"admin/editor.product-specification-badges.specificationsOptions.description\": \"Specify more detailed options for different specifications within group\",\n \"store/product-specification-badges.baseSpecificationBadges.aria-label\": \"Badge {Badge}\"\n}\n\n```" } ]
code_product-specification-badges_208f7854
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/messages/context.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/editor.product-specification-badges.title\": \"Title of component\",\n \"admin/editor.product-specification-badges.description\": \"Description of component\",\n \"admin/editor.product-specification-badges.specificationGroupName.title\": \"Title of specificationGroupName prop\",\n \"admin/editor.product-specification-badges.specificationName.title\": \"Title of specificationName prop\",\n \"admin/editor.product-specification-badges.visibleWhen.title\": \"Title of visibleWhen prop\",\n \"admin/editor.product-specification-badges.displayValue.title\": \"Title of displayValue prop\",\n \"admin/editor.product-specification-badges.orientation.title\": \"Title of orientation prop\",\n \"admin/editor.product-specification-badges.specificationsOptions.title\": \"Title of specificationsOptions prop\",\n \"admin/editor.product-specification-badges.specificationsOptions.item.title\": \"Title of specificationsOptions item\",\n \"admin/editor.product-specification-badges.orientation.horizontal\": \"Name of value to show badges from left to right\",\n \"admin/editor.product-specification-badges.orientation.vertical\": \"Name of value to show badges from up to left\",\n \"admin/editor.product-specification-badges.specificationGroupName.description\": \"Description of specificationGroupName prop\",\n \"admin/editor.product-specification-badges.specificationName.description\": \"Description of specificationName prop\",\n \"admin/editor.product-specification-badges.visibleWhen.description\": \"Description of visibleWhen prop\",\n \"admin/editor.product-specification-badges.displayValue.description\": \"Description of displayValue prop\",\n \"admin/editor.product-specification-badges.orientation.description\": \"Description of orientation prop\",\n \"admin/editor.product-specification-badges.specificationsOptions.description\": \"Description of specificationsOptions prop\",\n \"store/product-specification-badges.baseSpecificationBadges.aria-label\": \"Badge {Badge}\"\n}\n\n```" } ]
code_product-specification-badges_4264bd60
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/messages/es.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/editor.product-specification-badges.title\": \"Medallas de especificación de producto\",\n \"admin/editor.product-specification-badges.description\": \"Componente para mostrar medallas de especificación de producto en la página del producto\",\n \"admin/editor.product-specification-badges.specificationGroupName.title\": \"Nombre del grupo de especificación\",\n \"admin/editor.product-specification-badges.specificationName.title\": \"Nombre de especificación\",\n \"admin/editor.product-specification-badges.visibleWhen.title\": \"Visible cuándo\",\n \"admin/editor.product-specification-badges.displayValue.title\": \"Valor para mostrar\",\n \"admin/editor.product-specification-badges.orientation.title\": \"Orientación\",\n \"admin/editor.product-specification-badges.specificationsOptions.title\": \"Opciones de especificación\",\n \"admin/editor.product-specification-badges.specificationsOptions.item.title\": \"Opción de especificación\",\n \"admin/editor.product-specification-badges.orientation.horizontal\": \"Horizontal\",\n \"admin/editor.product-specification-badges.orientation.vertical\": \"Vertical\",\n \"admin/editor.product-specification-badges.specificationGroupName.description\": \"Nombre del grupo que desea aplicar\",\n \"admin/editor.product-specification-badges.specificationName.description\": \"Nombre de la especificación que desea aplicar, deje en blanco para aplicar a todos los miembros del grupo\",\n \"admin/editor.product-specification-badges.visibleWhen.description\": \"Ingrese un valor para mostrar la medalla solo cuando la especificación contenga un valor exactamente igual al pasado\",\n \"admin/editor.product-specification-badges.displayValue.description\": \"Elija qué mostrar dentro de la medalla. Lea la documentación para conocer los posibles valores.\",\n \"admin/editor.product-specification-badges.orientation.description\": \"Elija la orientación en la que desea mostrar las medallas\",\n \"admin/editor.product-specification-badges.specificationsOptions.description\": \"Especifique opciones más detalladas para diferentes especificaciones dentro del grupo\",\n \"store/product-specification-badges.baseSpecificationBadges.aria-label\": \"Medalla {Badge}\"\n}\n\n```" } ]
code_product-specification-badges_db9d882c
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/docs/README.md from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# VTEX Product Specification Badges\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nUse this component to show badges based on your product specifications inside your product page.\n\n### Configuration\n\nThis component must be configured to be able to display the specifications properly. Its props can be configured via `blocks.json` and they are:\n\n| Prop name | Type | Description | Default value |\n| ----------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `blockClass` | `string` | Allows to pass a custom name to be added to component css classes | `null` |\n| `displayValue` | `SPECIFICATION_NAME` or `SPECIFICATION_VALUE` or `string` | Choose the value that will appear if the specification condition is met and the badge will be showed. Pass `SPECIFICATION_NAME` if you want to display the specification name. Pass `SPECIFICATION_VALUE` if you want to display its value. Pass any other custom string to display it. | `null` |\n| `multipleValuesSeparator` | `string` | Define the separator string to be rendered when a specification value has multiple values. | `/` |\n| `orientation` | `vertical` or `horizontal` | Determines if the group of specifications are showed horizontally or vertically | `vertical` |\n| `specificationGroupName` | `String` | The name of the specification group in which the desired specifications are | `\"\"` |\n| `specificationName` | `String` | Pass the name of the specification you want to target. If left empy, will target all of the group | `\"\"` |\n| `specificationsOptions` | `Array<Option>` | Pass this if you want to control the conditions to show certain specifications. Each value of the array should be a valid object of the `Option` format. | `null` |\n| `visibleWhen` | `String` | Pass this if you want the specification to be displayed only if it has this exact value. If left empty, the badge will be showed regardless of the specification value. | `\"\"` |\n\n`Option` type:\n\n| Prop name | Type | Description | Default value |\n| ------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `displayValue` | `SPECIFICATION_NAME` or `SPECIFICATION_VALUE` or `string` | Choose the value that will appear if the option condition is met and the badge will be showed. Pass `SPECIFICATION_NAME` if you want to show the specification name. Pass `SPECIFICATION_VALUE` if you want to show its value. Pass any other custom string to show it. | `null` |\n| `specificationName` | `String` | Pass the name of the specification you want to target. If empty, option will not be checked. | `\"\"` |\n| `visibleWhen` | `string` | Pass this if you want this option to be applied when the specification has the exactly same value as specified in `visibleWhen`. If left empty, the badge will be showed regardless of the specification value. | `null` |\n\n**Important note:**\n\nAll products come with a default `allSpecifications` group, that is a group that combines all specifications in your product. If you manually create another group and add a specification in it, this specification will also appear in the `allSpecifications` group. So, if you want to apply your conditions to all specification, regardless of group, you must pass the value `allSpecifications`.\n\n### Example 1\n\nLet's say your product has this specification groups:\n\n```json\n// specificationGroups array\n[\n {\n \"name\": \"Group\",\n \"specifications\": [\n {\n \"name\": \"On Sale\",\n \"values\": [\"True\"]\n }\n ]\n },\n {\n \"name\": \"Group 2\",\n \"specifications\": [\n {\n \"name\": \"Demo\",\n \"values\": [\"True\"]\n },\n {\n \"name\": \"PromoExclusion\",\n \"values\": [\"1\"]\n }\n ]\n },\n {\n \"name\": \"allSpecifications\",\n \"specifications\": [\n {\n \"name\": \"On Sale\",\n \"values\": [\"True\"]\n },\n {\n \"name\": \"Demo\",\n \"values\": [\"True\"]\n },\n {\n \"name\": \"PromoExclusion\",\n \"values\": [\"1\"]\n }\n ]\n }\n]\n```\n\nIf you want to display all specifications with the value `True`, you could then pass:\n\n```json\n\"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"allSpecifications\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"visibleWhen\": \"True\"\n }\n },\n```\n\nIn this case, it will appear the `On Sale` and `Demo` badges (because you passed the `SPECIFICATION_NAME` in `displayValue`).\n\n### Example 2\n\nUsing the specification groups from example 1, we can get the same result with the specificationOptions prop:\n\n```json\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"allSpecifications\",\n \"specificationsOptions\": [{\n \"specificationName\": \"On Sale\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"visibleWhen\": \"True\"\n },\n {\n \"specificationName\": \"Demo\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"visibleWhen\": \"True\"\n }]\n }\n },\n```\n\n### Example 3\n\n```json\n// specificationGroups array\n[\n {\n \"name\": \"Group\",\n \"specifications\": [\n {\n \"name\": \"On Sale\",\n \"values\": [\"True\"]\n }\n ]\n },\n {\n \"name\": \"Group 2\",\n \"specifications\": [\n {\n \"name\": \"Demo\",\n \"values\": [\"True\"]\n },\n {\n \"name\": \"PromoExclusion\",\n \"values\": [\"1\"]\n }\n ]\n },\n {\n \"name\": \"allSpecifications\",\n \"specifications\": [\n {\n \"name\": \"On Sale\",\n \"values\": [\"True\"]\n },\n {\n \"name\": \"Demo\",\n \"values\": [\"My Cool Value\"]\n },\n {\n \"name\": \"PromoExclusion\",\n \"values\": [\"1\"]\n }\n ]\n }\n]\n```\n\nIf you want to show the value for the `Demo` specification, you could pass:\n\n```json\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"allSpecifications\",\n \"specificationsOptions\": [{\n \"specificationName\": \"On Sale\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"visibleWhen\": \"True\"\n },\n {\n \"specificationName\": \"Demo\",\n \"displayValue\": \"SPECIFICATION_VALUE\",\n }]\n }\n },\n```\n\nFinal result: will appear the `On Sale` badge and a badge with `My Cool Value`.\n\nNote the use of `SPECIFICATION_VALUE` in `displayValue` and the lack of `visibleWhen` in `Demo`.\n\n### Example 4\n\nUsing the example given in example 3.\n\nTo show a custom string you could do:\n\n```json\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"allSpecifications\",\n \"specificationsOptions\": [{\n \"specificationName\": \"On Sale\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"visibleWhen\": \"True\"\n },\n {\n \"specificationName\": \"Demo\",\n \"displayValue\": \"SPECIFICATION_VALUE\",\n },\n {\n \"specificationName\": \"PromoExclusion\",\n \"displayValue\": \"Cool Promo\",\n }]\n }\n },\n```\n\nFinal result: will appear the `On Sale` badge, a badge with `My Cool Value` and a badge with the string `Cool Promo`.\n\nNote the usage of a custom value in the `displayValue` config.\n\n### Usage tip\n\nYou can use our `stack-layout` to show the badges over your product image for example.\n\n```json\n \"stack-layout\": {\n \"children\": [\n \"product-images\",\n \"product-specification-badges\"\n ]\n },\n\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"allSpecifications\",\n \"displayValue\": \"SPECIFICATION_NAME\",\n \"specificationName\": \"On Sale\",\n \"visibleWhen\": \"True\"\n }\n },\n \"flex-layout.row#product-image\": {\n \"children\": [\"product-images\"]\n },\n```\n\n### CSS API\n\n| CSS class | Description |\n| ---------------- | ------------------------------------------- |\n| `groupContainer` | Container that wrapps the whole badge group |\n| `badgeContainer` | Container for each badge |\n| `badgeText` | Text displayed inside badge |\n\nNote: each badge receives a class `badgeContainer` with its specification name slug appended to it.\nExample: with the specification `On Sale: true` the badge will also have the class `badgeContainer--on-sale`.\n\nNote: each badge receives a class `badgeText` with its specification value slug appended to it.\nExample: with the specification `Nationality: Brazilian` the badge will also have the class `badgeText--brazilian`.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n```" } ]
code_product-specification-badges_41209d68
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/index.tsx from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useProduct } from 'vtex.product-context'\n\nimport BaseSpecificationBadges from './components/BaseSpecificationBadges'\n\nconst ProductSpecificationBadges: StorefrontFunctionComponent<BaseProps> = ({\n specificationGroupName,\n visibleWhen,\n specificationsOptions,\n specificationName,\n displayValue,\n orientation,\n multipleValuesSeparator,\n}) => {\n const ctx = useProduct()\n\n if (ctx?.product == null) {\n return null\n }\n\n const { product } = ctx\n\n return (\n <BaseSpecificationBadges\n product={product}\n orientation={orientation}\n specificationGroupName={specificationGroupName}\n visibleWhen={visibleWhen}\n specificationsOptions={specificationsOptions}\n specificationName={specificationName}\n displayValue={displayValue}\n multipleValuesSeparator={multipleValuesSeparator}\n />\n )\n}\n\nProductSpecificationBadges.schema = {\n ...BaseSpecificationBadges.schema,\n title: 'admin/editor.product-specification-badges.title',\n description: 'admin/editor.product-specification-badges.description',\n}\n\nexport default ProductSpecificationBadges\n\n```" } ]
code_product-specification-badges_0e88f0a6
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/package.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"test\": \"vtex-test-tools test\",\n \"pretest\": \"yarn\",\n \"lint\": \"eslint --ext ts,tsx .\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"react\": \"^16.8.3\",\n \"react-dom\": \"^16.8.3\",\n \"react-intl\": \"^4.6.3\",\n \"slugify\": \"^1.3.5\"\n },\n \"devDependencies\": {\n \"@apollo/react-testing\": \"^3.1.4\",\n \"@types/jest\": \"^25.2.3\",\n \"@types/node\": \"^14.0.6\",\n \"@types/prop-types\": \"^15.7.0\",\n \"@types/ramda\": \"^0.26.5\",\n \"@types/react\": \"^16.9.35\",\n \"@types/react-intl\": \"^3.0.0\",\n \"@vtex/test-tools\": \"^3.1.0\",\n \"@vtex/tsconfig\": \"^0.2.0\",\n \"apollo-cache-inmemory\": \"^1.6.6\",\n \"apollo-client\": \"^2.6.10\",\n \"graphql\": \"^15.0.0\",\n \"typescript\": \"3.9.7\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles\",\n \"vtex.product-context\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.4/public/@types/vtex.product-context\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.126.1/public/@types/vtex.render-runtime\"\n },\n \"vtexTestTools\": {\n \"defaultLocale\": \"pt-BR\"\n },\n \"version\": \"0.4.1\"\n}\n\n```" } ]
code_product-specification-badges_1406a4da
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/BaseSpecificationBadges.tsx from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport BaseSpecificationBadges from './components/BaseSpecificationBadges'\n\nexport default BaseSpecificationBadges\n\n```" } ]
code_product-specification-badges_f3ef1565
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/store/interfaces.json from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-specification-badges\": {\n \"component\": \"index\"\n }\n}\n\n```" } ]
code_product-specification-badges_2ed55d42
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/__fixtures__/product.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const getProduct = (customFields = {}) => {\n return {\n cacheId: 'product-slug',\n productName: 'Product Name',\n productId: '1',\n description: 'Product Description',\n titleTag: 'Product Name',\n metaTagDescription: null,\n linkText: 'product-slug',\n categories: [\n '/Category A/',\n '/Category A/Category B/',\n '/Category A/Category B/Category C/',\n ],\n categoryId: '1',\n categoriesIds: ['/1/2/3/', '/1/2/', '/1/'],\n brand: 'Brand',\n categoryTree: [\n { id: '1', name: 'Category A', href: 'category-a' },\n { id: '2', name: 'Category B', href: 'category-a/category-b' },\n { id: '3', name: 'Category C', href: 'category-a/category-b/category-c' },\n ],\n items: [\n {\n itemId: '1',\n name: 'Item One',\n nameComplete: 'Name One Complete',\n images: [\n {\n imageId: '1',\n imageLabel: '1-Color',\n imageTag: 'imageTag',\n imageUrl: 'imageurl.com',\n imageText: 'imageText',\n },\n ],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'Store Name',\n commertialOffer: {\n AvailableQuantity: 10,\n ListPrice: 100,\n Price: 90,\n },\n },\n ],\n },\n ],\n specificationGroups: [\n {\n name: 'Group',\n specifications: [\n {\n name: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: '506-Group',\n specifications: [\n {\n name: 'Gender',\n values: ['Mens'],\n },\n {\n name: 'Demo',\n values: ['True'],\n },\n {\n name: 'Internet Dropship',\n values: ['Yes'],\n },\n {\n name: 'PromoExclusion',\n values: ['1'],\n },\n {\n name: 'Badge',\n values: ['presale.png'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Gender',\n values: ['Mens'],\n },\n {\n name: 'Demo',\n values: ['True'],\n },\n {\n name: 'Internet Dropship',\n values: ['Yes'],\n },\n {\n name: 'PromoExclusion',\n values: ['1'],\n },\n {\n name: 'Badge',\n values: ['presale.png'],\n },\n ],\n },\n ],\n ...customFields,\n }\n}\n\nexport const getItem = (\n id = '1',\n price = 90,\n quantity = 10,\n customFields = {}\n) => {\n return {\n itemId: id,\n name: `Item ${id}`,\n nameComplete: `Name ${id} Complete`,\n images: [\n {\n imageId: id,\n imageLabel: `${id}-Color`,\n imageTag: 'imageTag',\n imageUrl: 'imageurl.com',\n imageText: 'imageText',\n },\n ],\n sellers: [\n {\n sellerId: id,\n sellerName: 'Store Name',\n commertialOffer: {\n AvailableQuantity: quantity,\n ListPrice: price + 10,\n Price: price,\n },\n },\n ],\n ...customFields,\n }\n}\n\n```" } ]
code_product-specification-badges_43c0e6a3
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.react-portal.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.react-portal' {\n import { ComponentType } from 'react'\n export const Overlay: ComponentType<{}>\n}\n\n```" } ]
code_product-specification-badges_8bee0941
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.css-handles.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.css-handles' {\n type CssHandlesInput = readonly string[]\n type ValueOf<T extends readonly any[]> = T[number]\n type CssHandles<T extends CssHandlesInput> = Record<ValueOf<T>, string>\n interface CssHandlesOptions {\n migrationFrom?: string | string[]\n }\n\n export const useCssHandles: <T extends CssHandlesInput>(\n handles: T,\n options: CssHandlesOptions = {}\n ) => CssHandles<T>\n export const applyModifiers: (\n handles: string,\n modifier: string | string[]\n ) => string\n}\n\n```" } ]
code_product-specification-badges_3cd98afe
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.render-runtime.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "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 interface Runtime {\n navigate: (options: NavigationOptions) => void\n culture: {\n country: string\n }\n }\n\n export interface NavigationOptions {\n page: string\n params?: any\n }\n\n export interface RenderContextProps {\n runtime: Runtime\n }\n\n interface ExtensionPointProps {\n id: string\n [key: string]: any\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 withRuntimeContext: <TOriginalProps extends object>(\n Component: ComponentType<TOriginalProps & RenderContextProps>\n ) => ComponentType<TOriginalProps>\n\n export const useRuntime: () => Runtime\n}\n\n```" } ]
code_product-specification-badges_42587d0e
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.device-detector.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.device-detector' {\n interface DeviceType {\n isMobile: boolean\n }\n export const useDevice: () => DeviceType\n}\n\n```" } ]
code_product-specification-badges_cedc38b9
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.store-icons.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.store-icons' {\n import { ComponentType } from 'react'\n interface Props {\n size: number\n viewBox?: string\n }\n\n export const IconLocationInput: ComponentType<Props>\n export const IconClose: ComponentType<Props & { type: string }>\n}\n\n```" } ]
code_product-specification-badges_a086487f
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/global.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { FC, Component } from 'react'\nimport { Orientations } from '../modules/constants'\n\ndeclare global {\n interface StorefrontFunctionComponent<P = {}> extends FC<P> {\n getSchema?(props: P): object\n schema?: object\n }\n\n interface StorefrontComponent<P = {}, S = {}> extends Component<P, S> {\n getSchema?(props: P): object\n schema: object\n }\n\n interface Condition {\n visibleWhen?: string\n displayValue?: string\n }\n\n interface BaseProps extends Condition {\n specificationGroupName: string\n orientation?: Orientations\n specificationsOptions?: ConditionWithName[]\n specificationName?: string\n multipleValuesSeparator?: string\n }\n\n type ConditionWithName = Condition & {\n specificationName: BaseProps['specificationName']\n }\n}\n\n```" } ]
code_product-specification-badges_8c7cdb3f
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/css.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.css' {\n const css: any\n export default css\n}\n\n```" } ]
code_product-specification-badges_dec4477d
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/typings/vtex.styleguide.d.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.styleguide' {\n import { ComponentType } from 'react'\n\n export const Input: ComponentType<InputProps>\n export const Spinner: ComponentType<InputProps>\n\n interface InputProps {\n [key: string]: any\n }\n\n export const Button: ComponentType<{\n onClick: () => void\n variation?: string\n size?: string\n }>\n\n export const Modal: ComponentType<{\n onClose: () => void\n isOpen: boolean\n centered: boolean\n title?: string\n }>\n\n export const Radio: ComponentType<{\n checked: boolean\n onChange: () => void\n id: string\n label: string\n name: string\n value: string\n }>\n}\n\n```" } ]
code_product-specification-badges_1b6b40df
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/components/BaseSpecificationBadges.tsx from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useCssHandles, applyModifiers } from 'vtex.css-handles'\nimport type {\n Product,\n ProductSpecification,\n} from 'vtex.product-context/react/ProductTypes'\n\nimport slugify from '../modules/slug'\nimport { Orientations, DisplayValues } from '../modules/constants'\nimport { useIntl } from 'react-intl'\n\nconst CSS_HANDLES = ['groupContainer', 'badgeContainer', 'badgeText'] as const\n\ninterface Props {\n product?: Product\n}\n\nconst checkConditionForSpecification = (\n condition: Condition,\n specification: ProductSpecification\n) => {\n const { displayValue, visibleWhen } = condition\n\n if (!displayValue) {\n return false\n }\n\n if (!visibleWhen) {\n return specification?.values[0]\n }\n\n return (\n specification.values &&\n visibleWhen &&\n specification.values[0] === visibleWhen\n )\n}\n\nconst getValidSpecificationForCondition = (\n condition: ConditionWithName,\n specifications: ProductSpecification[]\n) => {\n const { displayValue, specificationName } = condition\n const specification = specifications.find(\n (spec) => spec.name === specificationName\n )\n\n if (!specification) {\n return null\n }\n\n const isValid = checkConditionForSpecification(condition, specification)\n\n if (!isValid) {\n return null\n }\n\n return {\n displayValue,\n specification,\n }\n}\n\ninterface VisibleSpecification {\n specification: ProductSpecification\n displayValue: Condition['displayValue']\n}\n\nconst getVisibleBadges = ({\n product,\n baseCondition,\n groupName,\n specificationsOptions,\n}: {\n product: Product | undefined\n baseCondition: ConditionWithName\n groupName: string\n specificationsOptions: BaseProps['specificationsOptions']\n}): VisibleSpecification[] => {\n if (!product) {\n return []\n }\n\n const { specificationGroups, properties } = product\n\n let specifications: ProductSpecification[] = []\n\n if (properties?.length) {\n specifications = properties\n } else {\n // map specificationGroup values to properties for backwards-compatibility\n const group = specificationGroups?.find((g) => g.originalName === groupName)\n\n if (group) {\n specifications = group.specifications.map((i) => ({\n name: i.originalName,\n values: i.values,\n }))\n }\n }\n\n if (specifications.length === 0) {\n return []\n }\n\n let badges: VisibleSpecification[] = []\n\n if (baseCondition.visibleWhen && baseCondition.displayValue) {\n const { specificationName } = baseCondition\n\n let specs = specifications\n\n if (specificationName != null) {\n specs = specs.filter((spec) => spec.name === specificationName)\n }\n\n badges = specs\n .map((spec) => {\n if (checkConditionForSpecification(baseCondition, spec)) {\n return {\n specification: spec,\n displayValue: baseCondition.displayValue,\n }\n }\n\n return null\n })\n .filter(Boolean) as VisibleSpecification[]\n }\n\n if (specificationsOptions) {\n const optionsBadges = specificationsOptions\n .map((option) =>\n getValidSpecificationForCondition(option, specifications)\n )\n .filter(Boolean) as VisibleSpecification[]\n\n badges = badges.concat(optionsBadges)\n }\n\n return badges\n}\n\nconst getMarginToken = (\n isVertical: boolean,\n isFirst: boolean,\n isLast: boolean\n) => {\n let marginTokens = ''\n\n if (isVertical) {\n if (!isFirst) {\n marginTokens += 'mt2 '\n }\n\n if (!isLast) {\n marginTokens += 'mb2 '\n }\n }\n\n if (!isVertical) {\n if (!isFirst) {\n marginTokens += 'ml2 '\n }\n\n if (!isLast) {\n marginTokens += 'mr2 '\n }\n }\n\n return marginTokens.trim()\n}\n\nconst BaseSpecificationBadges: StorefrontFunctionComponent<\n Props & BaseProps\n> = ({\n product,\n specificationGroupName,\n visibleWhen,\n specificationsOptions,\n specificationName,\n displayValue,\n orientation = Orientations.vertical,\n multipleValuesSeparator,\n}) => {\n const badges = getVisibleBadges({\n product,\n baseCondition: { specificationName, displayValue, visibleWhen },\n groupName: specificationGroupName,\n specificationsOptions,\n })\n\n const handles = useCssHandles(CSS_HANDLES)\n\n if (!product || badges.length === 0) {\n return null\n }\n\n const isVertical = orientation === Orientations.vertical\n\n const orientationToken = isVertical ? 'inline-flex flex-column' : 'flex'\n\n return (\n <div className={`${handles.groupContainer} ${orientationToken} ma2`}>\n {badges.map((badge, idx) => {\n const { displayValue: badgeDisplayValue } = badge\n let valueToShow = badgeDisplayValue\n\n if (badgeDisplayValue === DisplayValues.specificationValue) {\n const specificationValues = badge.specification.values\n\n if (multipleValuesSeparator != null) {\n valueToShow = specificationValues.join(multipleValuesSeparator)\n } else {\n valueToShow = specificationValues[0]\n\n if (specificationValues.length > 1) {\n console.warn(\n `[product-specification-badges] The specification \"${\n badge.specification.name\n }\" have multiple values (${specificationValues.join(\n ','\n )}) but the \"multipleValuesSeparator\" prop was not set. Please refer to this app's documentation for further detail on how to show all the values at once: https://vtex.io/docs/app/vtex.product-specification-badges`\n )\n }\n }\n }\n\n if (badgeDisplayValue === DisplayValues.specificationName) {\n valueToShow = badge.specification.name\n }\n\n if (!badgeDisplayValue) {\n console.warn(\n 'You need to set a `displayValue` for the `product-specification-badges` block, either `SPECIFICATION_VALUE` or `SPECIFICATION_NAME`'\n )\n\n return null\n }\n\n const slugifiedName = slugify(badge.specification.name)\n const slugifiedValue = valueToShow && slugify(valueToShow)\n const marginToken = getMarginToken(\n isVertical,\n idx === 0,\n idx === badges.length - 1\n )\n const intl = useIntl()\n\n return (\n <div\n aria-label={intl.formatMessage(\n { id: 'store/product-specification-badges.baseSpecificationBadges.aria-label' }, { Badge: badgeDisplayValue})}\n key={`${badge.specification.name}-${valueToShow}`}\n className={`${applyModifiers(\n handles.badgeContainer,\n slugifiedName\n )} ${marginToken} bg-base flex items-center justify-center\"`}\n >\n <span\n className={`${applyModifiers(\n handles.badgeText,\n slugifiedValue || ''\n )} ma3 t-body c-muted-1 tc`}\n >\n {valueToShow}\n </span>\n </div>\n )\n })}\n </div>\n )\n}\n\nBaseSpecificationBadges.schema = {\n type: 'object',\n properties: {\n specificationGroupName: {\n type: 'string',\n title:\n 'admin/editor.product-specification-badges.specificationGroupName.title',\n description:\n 'admin/editor.product-specification-badges.specificationGroupName.description',\n },\n specificationName: {\n type: 'string',\n title:\n 'admin/editor.product-specification-badges.specificationName.title',\n description:\n 'admin/editor.product-specification-badges.specificationName.description',\n },\n visibleWhen: {\n type: 'string',\n title: 'admin/editor.product-specification-badges.visibleWhen.title',\n description:\n 'admin/editor.product-specification-badges.visibleWhen.description',\n },\n displayValue: {\n type: 'string',\n title: 'admin/editor.product-specification-badges.displayValue.title',\n description:\n 'admin/editor.product-specification-badges.displayValue.description',\n },\n orientation: {\n title: 'admin/editor.product-specification-badges.orientation.title',\n description:\n 'admin/editor.product-specification-badges.orientation.description',\n enum: ['vertical', 'horizontal'],\n enumNames: [\n 'admin/editor.product-specification-badges.orientation.vertical',\n 'admin/editor.product-specification-badges.orientation.horizontal',\n ],\n type: 'string',\n default: 'vertical',\n widget: {\n 'ui:widget': 'radio',\n 'ui:options': {\n inline: true,\n },\n },\n },\n specificationsOptions: {\n type: 'array',\n title:\n 'admin/editor.product-specification-badges.specificationsOptions.title',\n description:\n 'admin/editor.product-specification-badges.specificationsOptions.description',\n items: {\n title:\n 'admin/editor.product-specification-badges.specificationsOptions.item.title',\n type: 'object',\n properties: {\n specificationName: {\n type: 'string',\n title:\n 'admin/editor.product-specification-badges.specificationName.title',\n },\n visibleWhen: {\n type: 'string',\n title:\n 'admin/editor.product-specification-badges.visibleWhen.title',\n },\n displayValue: {\n type: 'string',\n title:\n 'admin/editor.product-specification-badges.displayValue.title',\n },\n },\n },\n },\n },\n}\n\nexport default BaseSpecificationBadges\n\n```" } ]
code_product-specification-badges_27b40411
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/__tests__/index.test.tsx from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render } from '@vtex/test-tools/react'\nimport { ProductContextProvider } from 'vtex.product-context'\n\nimport Index from '../index'\nimport { getProduct } from '../__fixtures__/product'\n\nconst renderComponent = (customProps: any = {}) => {\n const product = customProps.product || getProduct()\n\n return render(\n <ProductContextProvider query={{}} product={product}>\n <Index\n visibleWhen={customProps.visibleWhen}\n specificationsOptions={customProps.specificationsOptions}\n specificationGroupName={customProps.specificationGroupName}\n specificationName={customProps.specificationName}\n displayValue={customProps.displayValue}\n multipleValuesSeparator={customProps.multipleValuesSeparator}\n />\n </ProductContextProvider>\n )\n}\n\ntest('show names inside group that meet condition', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { getByText, queryByText } = renderComponent({\n specificationGroupName: 'allSpecifications',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n product: getProduct({ specificationGroups }),\n })\n\n getByText(/On Sale/)\n getByText(/Demo/)\n\n expect(queryByText(/PromoExclusion/)).toBeFalsy()\n})\n\ntest('show names inside group that meet conditions array', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { getByText, queryByText } = renderComponent({\n specificationGroupName: 'allSpecifications',\n specificationsOptions: [\n {\n specificationName: 'On Sale',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n },\n ],\n product: getProduct({ specificationGroups }),\n })\n\n getByText(/On Sale/)\n expect(queryByText(/Demo/)).toBeFalsy()\n expect(queryByText(/PromoExclusion/)).toBeFalsy()\n})\n\ntest('show badges of generic condition and for specific options', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['Enabled'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['Enabled'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { getByText, queryByText } = renderComponent({\n specificationGroupName: 'allSpecifications',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n specificationsOptions: [\n {\n specificationName: 'Demo',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'Enabled',\n },\n ],\n product: getProduct({ specificationGroups }),\n })\n\n getByText(/On Sale/)\n getByText(/Demo/)\n expect(queryByText(/PromoExclusion/)).toBeFalsy()\n})\n\ntest('generic condition with specification Name being passed', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { getByText, queryByText } = renderComponent({\n specificationGroupName: 'allSpecifications',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n specificationName: 'On Sale',\n product: getProduct({ specificationGroups }),\n })\n\n getByText(/On Sale/)\n expect(queryByText(/Demo/)).toBeFalsy()\n expect(queryByText(/PromoExclusion/)).toBeFalsy()\n})\n\ntest('show demo, value and custom string', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['DemoValue'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['DemoValue'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { queryByText } = renderComponent({\n specificationsOptions: [\n {\n specificationName: 'On Sale',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n },\n {\n specificationName: 'Demo',\n displayValue: 'SPECIFICATION_VALUE',\n },\n {\n specificationName: 'PromoExclusion',\n displayValue: 'Custom String',\n },\n ],\n specificationGroupName: 'allSpecifications',\n product: getProduct({ specificationGroups }),\n })\n\n expect(queryByText(/On Sale/)).toBeInTheDocument()\n expect(queryByText(/DemoValue/)).toBeInTheDocument()\n expect(queryByText(/Custom String/)).toBeInTheDocument()\n})\n\ntest('dont break if wrong group name', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['DemoValue'],\n },\n {\n name: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['DemoValue'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { queryByText } = renderComponent({\n specificationsOptions: [\n {\n specificationName: 'On Sale',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n },\n {\n specificationName: 'Demo',\n displayValue: 'SPECIFICATION_VALUE',\n },\n {\n specificationName: 'PromoExclusion',\n displayValue: 'Custom String',\n },\n ],\n specificationGroupName: 'adsaadsad',\n product: getProduct({ specificationGroups }),\n })\n\n expect(queryByText(/On Sale/)).toBeFalsy()\n})\n\ntest('dont show item with displayValue condition not provided', () => {\n const specificationGroups = [\n {\n name: 'Group',\n originalName: 'Group',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n ],\n },\n {\n name: 'Group 2',\n originalName: 'Group 2',\n specifications: [\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n originalName: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n originalName: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n originalName: 'PromoExclusion',\n values: ['1'],\n },\n ],\n },\n ]\n\n const { queryByText, getByText } = renderComponent({\n specificationsOptions: [\n {\n specificationName: 'On Sale',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n },\n {\n specificationName: 'Demo',\n },\n ],\n specificationGroupName: 'allSpecifications',\n product: getProduct({ specificationGroups }),\n })\n\n getByText(/On Sale/)\n expect(queryByText(/Demo/)).toBeFalsy()\n})\n\ntest('do not break if specificationgroups is undefined', () => {\n const { queryByText } = renderComponent({\n specificationsOptions: [\n {\n specificationName: 'On Sale',\n displayValue: 'SPECIFICATION_NAME',\n visibleWhen: 'True',\n },\n {\n specificationName: 'Demo',\n },\n ],\n specificationGroupName: 'allSpecifications',\n product: getProduct({ specificationGroups: undefined }),\n })\n\n expect(queryByText(/On Sale/)).toBeFalsy()\n})\n\ntest('display multiple specification values separated by a string', () => {\n const specificationGroups = [\n {\n name: 'allSpecifications',\n originalName: 'allSpecifications',\n specifications: [\n {\n name: 'Season',\n originalName: 'Season',\n values: ['Spring', 'Summer'],\n },\n ],\n },\n ]\n\n const { queryByText } = renderComponent({\n specificationsOptions: [\n {\n specificationName: 'Season',\n visibleWhen: 'Spring',\n displayValue: 'SPECIFICATION_VALUE',\n },\n ],\n multipleValuesSeparator: ', ',\n specificationGroupName: 'allSpecifications',\n product: getProduct({ specificationGroups }),\n })\n\n expect(queryByText(/Spring, Summer/)).toBeInTheDocument()\n})\n\ntest('works with properties field', () => {\n const properties = [\n {\n name: 'On Sale',\n values: ['True'],\n },\n {\n name: 'Demo',\n values: ['True'],\n },\n {\n name: 'PromoExclusion',\n values: ['1'],\n },\n ]\n\n const { getByText, queryByText } = renderComponent({\n visibleWhen: 'True',\n displayValue: 'SPECIFICATION_NAME',\n product: getProduct({ properties }),\n })\n\n getByText(/On Sale/)\n getByText(/Demo/)\n\n expect(queryByText(/PromoExclusion/)).toBeFalsy()\n})\n\n```" } ]
code_product-specification-badges_a9fdf626
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/modules/slug.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport slugify from 'slugify'\n\nexport default function slug(str: string) {\n const replaced = (str && str.replace(/[*+~.()'\"!:@&\\[\\]]/g, '')) || ''\n const slugified = slugify(replaced, { lower: true }) || ''\n return slugified\n}\n```" } ]
code_product-specification-badges_3b6714f7
[ { "role": "system", "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": "user", "content": "Show me the implementation of product-specification-badges/react/modules/constants.ts from the product-specification-badges VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport enum Orientations {\n horizontal = 'horizontal',\n vertical = 'vertical',\n}\n\nexport enum DisplayValues {\n specificationName = 'SPECIFICATION_NAME',\n specificationValue = 'SPECIFICATION_VALUE',\n}\n\n```" } ]
code_admin-messages-catalog_c9bec7ce
[ { "role": "system", "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": "user", "content": "Show me the implementation of admin-messages-catalog/messages/nl.json from the admin-messages-catalog VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/messages.header.product.title\": \"Productvertalingen\",\n \"admin/messages.header.sku.title\": \"SKU-vertalingen\",\n \"admin/messages.header.brand.title\": \"Merkvertalingen\",\n \"admin/messages.header.category.title\": \"Categorievertalingen\",\n \"admin/messages.header.specification.title\": \"Specificatievertalingen\",\n \"admin/messages.navigation.label\": \"Vertaling\",\n \"admin/messages.navigation.product-label\": \"Artikel\",\n \"admin/messages.navigation.sku-label\": \"SKU\",\n \"admin/messages.navigation.category-label\": \"Categorie\",\n \"admin/messages.navigation.brand-label\": \"Merk\",\n \"admin/messages.navigation.specification-label\": \"Specificatie\",\n \"admin/messages.next\": \"Volgende\",\n \"admin/messages.back\": \"Terug\",\n \"admin/messages.cancel\": \"Annuleer\",\n \"admin/messages.retry\": \"Probeer opnieuw\",\n \"admin/messages.done\": \"Klaar\",\n \"admin/messages.catalog.download.instruction1\": \"1. Download de gegevens die u wilt vertalen uit uw catalogus\",\n \"admin/messages.catalog.download.instruction2\": \"2. Open het geëxporteerde bestand in Excel of Numbers\",\n \"admin/messages.catalog.download.instruction3\": \"3. Vertaal de volgende kolommen in het specificatieblad:\",\n \"admin/messages.catalog.download.instruction4\": \"4. Na het vertalen: sla het bestand op en klik op Volgende om verder te gaan\",\n \"admin/messages.catalog.export.catalog-exported\": \"Catalogus geëxporteerd\",\n \"admin/messages.catalog.export.something-wrong\": \"Er is iets misgegaan. Probeer het nog eens\",\n \"admin/messages.catalog.export.export-began\": \"Catalogus wordt geëxporteerd. Controleer uw e-mail in een paar ogenblikken\",\n \"admin/messages.catalog.export.exportCatalog\": \"Catalogus exporteren\",\n \"admin/messages.catalog.export.instruction1\": \"1. Exporteer uw productcatalogus naar uw e-mail\",\n \"admin/messages.catalog.export.instruction2\": \"2. Na het exporteren: open uw e-mail en download het bijgevoegde bestand\",\n \"admin/messages.catalog.export.instruction3\": \"3. Open het geëxporteerde bestand in Excel of Numbers\",\n \"admin/messages.catalog.export.instruction4\": \"4. Vertaal de volgende kolommen in het specificatieblad:\",\n \"admin/messages.catalog.export.instruction5\": \"5. Na het vertalen: sla het bestand op en klik op Volgende om verder te gaan\",\n \"admin/messages.catalog.product.description\": \"Productbeschrijving\",\n \"admin/messages.catalog.product.descriptionShort\": \"Korte productbeschrijving\",\n \"admin/messages.catalog.product.keywords\": \"Trefwoorden\",\n \"admin/messages.catalog.product.metaTagDescription\": \"Meta tag beschrijving\",\n \"admin/messages.catalog.product.name\": \"Naam\",\n \"admin/messages.catalog.product.titleTag\": \"Titel tag\",\n \"admin/messages.catalog.sku.name\": \"Naam\",\n \"admin/messages.catalog.sku.name-complete\": \"Volledige naam\",\n \"admin/messages.catalog.brand.name\": \"Naam\",\n \"admin/messages.catalog.brand.title\": \"Titel\",\n \"admin/messages.catalog.brand.metaTagDescription\": \"Meta-tag beschrijving\",\n \"admin/messages.catalog.category.name\": \"Naam\",\n \"admin/messages.catalog.category.title\": \"Titel\",\n \"admin/messages.catalog.category.metaTagDescription\": \"Meta tag beschrijving\",\n \"admin/messages.stepCounter\": \"Stap {current} van {total}\",\n \"admin/messages.messages-upload.target-lang\": \"Doeltaal\",\n \"admin/messages.messages-upload.upload-label\": \"Upload\",\n \"admin/messages.messages-upload.pick-lang\": \"Kies een taal\",\n \"admin/messages.messages-upload.pick-lang.en\": \"Engels\",\n \"admin/messages.messages-upload.pick-lang.es\": \"Spaans\",\n \"admin/messages.messages-upload.pick-lang.pt\": \"Portugees\",\n \"admin/messages.messages-upload.pick-lang.fr\": \"Frans\",\n \"admin/messages.messages-upload.error-supported-file\": \"Bestand niet ondersteund. Voeg alleen .csv en .xls toe onder 20 MB.\",\n \"admin/messages.messages-upload.error-id-column\": \"\\\"_ProductId\\\"-kolom niet gevonden op het geüploade bestand.\",\n \"admin/messages.messages-upload.error-no-translatable-field\": \"Geen vertaalbaar veld gevonden.\",\n \"admin/messages.messages-upload.catalog-label\": \"Vertaalde catalogus\",\n \"admin/messages.messages-progress.translate-progress\": \"Vertaalde {progress} van {total} producten naar {language}\",\n \"admin/messages.messages-progress.translation-faileded\": \"{failed} vertalingen zijn mislukt. Wilt u ze opnieuw proberen?\",\n \"admin/messages.messages-progress.translation-succeeded\": \"De vertaling in het {language} is succesvol voltooid\"\n}\n\n```" } ]