From adc5bc217b5e45196e0df360cf73f71962a9b487 Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 15:37:36 -0300 Subject: [PATCH 1/7] Add mocks for `fetch` calls performed by @faststore/api clients --- packages/api/mocks/AllCollectionsQuery.ts | 63 ++++++++++++++++++++++ packages/api/mocks/AllProductsQuery.ts | 34 ++++++++++++ packages/api/mocks/CollectionQuery.ts | 27 ++++++++++ packages/api/mocks/ProductQuery.ts | 24 +++++++++ packages/api/mocks/SearchQuery.ts | 34 ++++++++++++ packages/api/mocks/ValidateCartMutation.ts | 59 ++++++++++++++++++++ 6 files changed, 241 insertions(+) diff --git a/packages/api/mocks/AllCollectionsQuery.ts b/packages/api/mocks/AllCollectionsQuery.ts index b8ac1d4c9d..8f65decd8d 100644 --- a/packages/api/mocks/AllCollectionsQuery.ts +++ b/packages/api/mocks/AllCollectionsQuery.ts @@ -38,3 +38,66 @@ export const AllCollectionsQueryFirst5 = `query allCollections { } } ` + +export const catalogBrandListFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/brand/list', + init: undefined, + result: JSON.parse( + `[{"id":9280,"name":"Brand","isActive":true,"title":"Brand","metaTagDescription":"Brand","imageUrl":null},{"id":2000001,"name":"Skechers","isActive":true,"title":"Skechers","metaTagDescription":"Sport, casual, work, wide, kids' & performance shoes with style, comfort, innovation, quality & value.","imageUrl":"/155421/skechers.jpg"},{"id":2000002,"name":"Acer","isActive":true,"title":"Acer","metaTagDescription":"Acer laptops, desktops as well as servers and storage, personal digital assistance (PDA), peripherals, peripherals and e-business services for government, business, education, and home users.","imageUrl":null},{"id":2000003,"name":"iRobot","isActive":true,"title":"iRobot","metaTagDescription":"iRobot, the leading global consumer robot company, designs and builds robots that empower people to do more both inside and outside of the home.","imageUrl":null},{"id":2000004,"name":"adidas","isActive":true,"title":"adidas","metaTagDescription":"adidas shoes, clothing and view new collections for adidas Originals, running, football, soccer, training and much more.","imageUrl":null},{"id":2000005,"name":"BLACK+DECKER","isActive":true,"title":"BLACK+DECKER","metaTagDescription":"Stanley Black & Decker, Inc. is a global provider of hand tools, power tools and related accessories, mechanical access solutions, such as automatic doors and commercial locking systems, electronic security and monitoring systems, healthcare solutions, engineered fastening systems, and products and services for various industrial applciations.","imageUrl":null},{"id":2000006,"name":"Nike","isActive":true,"title":"Nike","metaTagDescription":"Nike designs, develops, and sells a variety of products to help in playing basketball and soccer (football), as well as in running, men's and women's training, and other action sports.","imageUrl":null},{"id":2000007,"name":"Sany","isActive":false,"title":"Sany","metaTagDescription":"Camera, Photo","imageUrl":null},{"id":2000008,"name":"Nykor","isActive":false,"title":"Nykor","metaTagDescription":"Camera, Photo","imageUrl":null},{"id":2000009,"name":"Canyon","isActive":false,"title":"Canyon","metaTagDescription":"Camera, Photo","imageUrl":null},{"id":2000010,"name":"Loyka","isActive":false,"title":"Loyka","metaTagDescription":"Camera, Photo","imageUrl":null},{"id":2000011,"name":"Kodak","isActive":false,"title":"Kodak","metaTagDescription":"Camera, Photo","imageUrl":null},{"id":2000012,"name":"Appel","isActive":false,"title":"Appel","metaTagDescription":"Computer, Notebook","imageUrl":null},{"id":2000013,"name":"Azer","isActive":false,"title":"Azer","metaTagDescription":"","imageUrl":null},{"id":2000014,"name":"Semsung","isActive":false,"title":"Semsung","metaTagDescription":"Mobile, Cellphone","imageUrl":null},{"id":2000015,"name":"Vauve","isActive":false,"title":"Vauve","metaTagDescription":"Video game, PC","imageUrl":null},{"id":2000016,"name":"Nentendo","isActive":false,"title":"Nentendo","metaTagDescription":"Video game, PC","imageUrl":null},{"id":2000017,"name":"Macrosoft","isActive":false,"title":"Macrosoft","metaTagDescription":"Video game, PC","imageUrl":null},{"id":2000018,"name":"Mottarola","isActive":false,"title":"Mottarola","metaTagDescription":"Mobile, Cellphone","imageUrl":null},{"id":2000019,"name":"Robot","isActive":false,"title":"Robot","metaTagDescription":"Meta tags, Robot","imageUrl":null},{"id":2000020,"name":"Lemovo","isActive":false,"title":"Lemovo","metaTagDescription":"Lemovo, PC","imageUrl":null},{"id":2000021,"name":"Dill","isActive":false,"title":"Dill","metaTagDescription":"Dell, Notebook","imageUrl":null},{"id":2000022,"name":"LB","isActive":false,"title":"LB","metaTagDescription":"Mobile, Cellphone","imageUrl":null},{"id":2000023,"name":"Fillips","isActive":false,"title":"Fillips","metaTagDescription":"TV, Television","imageUrl":null},{"id":2000024,"name":"Filco","isActive":false,"title":"Filco","metaTagDescription":"TV, Television","imageUrl":null},{"id":2000025,"name":"GBL","isActive":false,"title":"GBL","metaTagDescription":"TV, Television","imageUrl":null},{"id":2000026,"name":"Superlaser","isActive":false,"title":"Superlaser","metaTagDescription":"Superlaser, Audio","imageUrl":null},{"id":2000027,"name":"Beets","isActive":false,"title":"Beets","metaTagDescription":"Beets, Audio","imageUrl":null},{"id":2000028,"name":"Xaomi","isActive":false,"title":"Xaomi","metaTagDescription":"Xaomi, Mobile","imageUrl":null},{"id":2000029,"name":"Garman","isActive":false,"title":"Garman","metaTagDescription":"Garman, Mobile","imageUrl":null},{"id":2000030,"name":"PT-Link","isActive":false,"title":"PT-Link","metaTagDescription":"Router, Internet","imageUrl":null},{"id":2000031,"name":"Logitecho","isActive":false,"title":"Logitecho","metaTagDescription":"Logitecho, Camera","imageUrl":null},{"id":2000032,"name":"Air","isActive":false,"title":"Air","metaTagDescription":"Air, Audio","imageUrl":null},{"id":2000033,"name":"Blekin","isActive":false,"title":"Blekin","metaTagDescription":"Blekin, Audio","imageUrl":null},{"id":2000034,"name":"Incaser","isActive":false,"title":"Incaser","metaTagDescription":"Incaser, Audio","imageUrl":null}]` + ), +} + +export const catalogCategory3Fetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/category/tree/3', + init: undefined, + result: JSON.parse( + '[{"id":9282,"name":"Office","hasChildren":true,"url":"http://storeframework.vtexcommercestable.com.br/office","children":[{"id":9295,"name":"Desks","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/office/desks","children":[],"Title":"Desks","MetaTagDescription":"Desks for better productivity"},{"id":9296,"name":"Chairs","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/office/chairs","children":[],"Title":"Chairs","MetaTagDescription":"Comfort chairs"}],"Title":"Office","MetaTagDescription":"For the office and home office"},{"id":9285,"name":"Kitchen and Home Appliances","hasChildren":true,"url":"http://storeframework.vtexcommercestable.com.br/kitchen-and-home-appliances","children":[{"id":9293,"name":"Fridges","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/kitchen-and-home-appliances/fridges","children":[],"Title":"Fridges","MetaTagDescription":"Fridges for the penguin"},{"id":9294,"name":"Appliances","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/kitchen-and-home-appliances/appliances","children":[],"Title":"Appliances","MetaTagDescription":"Appliances for you"}],"Title":"Home Appliances","MetaTagDescription":"Stay home with style"},{"id":9286,"name":"Computer and Software","hasChildren":true,"url":"http://storeframework.vtexcommercestable.com.br/computer-and-software","children":[{"id":9291,"name":"Smartphones","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/computer-and-software/smartphones","children":[],"Title":"Smartphones","MetaTagDescription":"You know what it is"},{"id":9292,"name":"Gadgets","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/computer-and-software/gadgets","children":[],"Title":"Gadgets","MetaTagDescription":"Gadgets for you"}],"Title":"Computer and Software","MetaTagDescription":"Get in touch with tomorrows world today"},{"id":9297,"name":"Technology","hasChildren":false,"url":"http://storeframework.vtexcommercestable.com.br/technology","children":[],"Title":"Technology","MetaTagDescription":"Technology"}]' + ), +} + +export const catalogPageTypeSkechers = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/skechers', + init: undefined, + result: JSON.parse( + `{"id":"2000001","name":"Skechers","url":"storeframework.vtexcommercestable.com.br/Skechers","title":"Skechers","metaTagDescription":"Sport, casual, work, wide, kids' & performance shoes with style, comfort, innovation, quality & value.","pageType":"Brand"}` + ), +} + +export const catalogPageTypeAdidas = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/adidas', + init: undefined, + result: JSON.parse( + `{"id":"2000004","name":"adidas","url":"storeframework.vtexcommercestable.com.br/adidas","title":"adidas","metaTagDescription":"adidas shoes, clothing and view new collections for adidas Originals, running, football, soccer, training and much more.","pageType":"Brand"}` + ), +} + +export const catalogPageTypeAcer = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/acer', + init: undefined, + result: JSON.parse( + `{"id":"2000002","name":"Acer","url":"storeframework.vtexcommercestable.com.br/Acer","title":"Acer","metaTagDescription":"Acer laptops, desktops as well as servers and storage, personal digital assistance (PDA), peripherals, peripherals and e-business services for government, business, education, and home users.","pageType":"Brand"}` + ), +} + +export const catalogPageTypeIRobot = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/irobot', + init: undefined, + result: JSON.parse( + `{"id":"2000003","name":"iRobot","url":"storeframework.vtexcommercestable.com.br/iRobot","title":"iRobot","metaTagDescription":"iRobot, the leading global consumer robot company, designs and builds robots that empower people to do more both inside and outside of the home.","pageType":"Brand"}` + ), +} + +export const catalogPageTypeBrand = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/brand', + init: undefined, + result: JSON.parse( + `{"id":"9280","name":"Brand","url":"storeframework.vtexcommercestable.com.br/Brand","title":"Brand","metaTagDescription":"Brand","pageType":"Brand"}` + ), +} diff --git a/packages/api/mocks/AllProductsQuery.ts b/packages/api/mocks/AllProductsQuery.ts index 35360eddc4..be825e4658 100644 --- a/packages/api/mocks/AllProductsQuery.ts +++ b/packages/api/mocks/AllProductsQuery.ts @@ -70,3 +70,37 @@ export const AllProductsQueryFirst5 = `query AllProducts { } } ` + +export const productSearchPage1Count5Fetch = { + info: + 'http://portal.vtexcommercestable.com.br/search-api/v1/storeframework/api/split/product_search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&hide-unavailable-items=false', + init: undefined, + result: JSON.parse( + '{"total":5348,"products":[{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1638576000000,"discount":37,"reference":"6327601885574","collections":[],"price":349.12,"customSort":0,"stickers":[],"id":"43559243","stock":1,"brand":"Acer","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Kitchen and Home Appliances","Appliances"],"categoryIds":["9285","9294"]},{"categoryNames":["Kitchen and Home Appliances"],"categoryIds":["9285"]}],"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/168396/nihil.jpg?v=637753027573130000"},{"name":"similique","value":"http://storeframework.vteximg.com.br/arquivos/ids/168393/dolore.jpg?v=637753027558270000"},{"name":"deleniti","value":"http://storeframework.vteximg.com.br/arquivos/ids/168394/delectus.jpg?v=637753027564530000"},{"name":"sunt","value":"http://storeframework.vteximg.com.br/arquivos/ids/168395/qui.jpg?v=637753027568900000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000002","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":349.12,"paymentName":"Boleto Bancário","valueText":"$349.12"},"name":"Fantastic Soft Cheese","boost":{"newness":0.7111111111111111,"image":1,"revenue":1,"discount":1,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":349.12,"skus":[{"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/168396/nihil.jpg?v=637753027573130000"},{"name":"similique","value":"http://storeframework.vteximg.com.br/arquivos/ids/168393/dolore.jpg?v=637753027558270000"},{"name":"deleniti","value":"http://storeframework.vteximg.com.br/arquivos/ids/168394/delectus.jpg?v=637753027564530000"},{"name":"sunt","value":"http://storeframework.vteximg.com.br/arquivos/ids/168395/qui.jpg?v=637753027568900000"}],"nameComplete":"Fantastic Soft Cheese plum","complementName":"Explicabo et quibusdam eius excepturi et rem dolorem et. Eligendi ratione et quod error nisi asperiores fugit omnis itaque. Vel officia sapiente autem non. Ut consequatur veniam perspiciatis doloribus nulla saepe.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"6464716212392","idWithSplit":"2737806","name":"plum","attributes":[],"id":"2737806","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"fantastic-soft-cheese","wear":0,"description":"Iure eum pariatur provident dolorem et.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Kitchen and Home Appliances","Appliances"],"timestamp":1640818293024,"product":"43559243","oldPrice":557.57,"productSpecifications":[],"url":"/fantastic-soft-cheese/p","measurementUnit":"un","categoryIds":["9285","9294"],"textAttributes":[{"joinedValue":"acer@@@Acer@@@@@@acer@@@Acer","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Acer","id":["2000002"],"labelKey":"Brand","value":"acer","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"acer","originalLabelKey":"Brand","originalLabelValue":"Acer"},{"valueId":"9285","joinedValue":"kitchen-and-home-appliances@@@Kitchen and Home Appliances@@@9285@@@kitchen-and-home-appliances@@@Kitchen and Home Appliances","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Kitchen and Home Appliances","id":[],"labelKey":"Category 1","value":"kitchen-and-home-appliances","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"kitchen-and-home-appliances","originalLabelKey":"Category 1","originalLabelValue":"Kitchen and Home Appliances"},{"valueId":"9294","joinedValue":"appliances@@@Appliances@@@9294@@@appliances@@@Appliances","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Appliances","id":[],"labelKey":"Category 2","value":"appliances","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"appliances","originalLabelKey":"Category 2","originalLabelValue":"Appliances"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":349.12,"key":"price"}],"headSku":"2737806","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$557.57","priceText":"$349.12","spotPriceText":"$349.12"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639180800000,"discount":30,"reference":"8528464810736","collections":[],"price":531.54,"customSort":0,"stickers":[],"id":"42751008","stock":1,"brand":"iRobot","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Desks"],"categoryIds":["9282","9295"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"molestiae","value":"http://storeframework.vteximg.com.br/arquivos/ids/166870/sit.jpg?v=637753013266530000"},{"name":"occaecati","value":"http://storeframework.vteximg.com.br/arquivos/ids/166867/ratione.jpg?v=637753013256670000"},{"name":"labore","value":"http://storeframework.vteximg.com.br/arquivos/ids/166868/modi.jpg?v=637753013260600000"},{"name":"qui","value":"http://storeframework.vteximg.com.br/arquivos/ids/166869/quaerat.jpg?v=637753013263570000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000003","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":531.54,"paymentName":"Boleto Bancário","valueText":"$531.54"},"name":"Licensed Frozen Sausages","boost":{"newness":0.7888888888888889,"image":1,"revenue":1,"discount":0.9221868185823897,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":531.54,"skus":[{"images":[{"name":"molestiae","value":"http://storeframework.vteximg.com.br/arquivos/ids/166870/sit.jpg?v=637753013266530000"},{"name":"occaecati","value":"http://storeframework.vteximg.com.br/arquivos/ids/166867/ratione.jpg?v=637753013256670000"},{"name":"labore","value":"http://storeframework.vteximg.com.br/arquivos/ids/166868/modi.jpg?v=637753013260600000"},{"name":"qui","value":"http://storeframework.vteximg.com.br/arquivos/ids/166869/quaerat.jpg?v=637753013263570000"}],"nameComplete":"Licensed Frozen Sausages ivory","complementName":"Suscipit enim cupiditate hic neque velit alias minus fugiat repudiandae. Fuga et ea est provident nulla odit eligendi dolores delectus. Voluptate saepe sunt. Aspernatur libero dolores omnis maxime.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"4454274563902","idWithSplit":"97907082","name":"ivory","attributes":[],"id":"97907082","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"licensed-frozen-sausages","wear":0,"description":"Sed nostrum est nostrum quo ipsum et ut asperiores quasi.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Desks"],"timestamp":1640818257572,"product":"42751008","oldPrice":764.06,"productSpecifications":[],"url":"/licensed-frozen-sausages/p","measurementUnit":"un","categoryIds":["9282","9295"],"textAttributes":[{"joinedValue":"irobot@@@iRobot@@@@@@irobot@@@iRobot","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"iRobot","id":["2000003"],"labelKey":"Brand","value":"irobot","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"irobot","originalLabelKey":"Brand","originalLabelValue":"iRobot"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9295","joinedValue":"desks@@@Desks@@@9295@@@desks@@@Desks","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Desks","id":[],"labelKey":"Category 2","value":"desks","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"desks","originalLabelKey":"Category 2","originalLabelValue":"Desks"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":531.54,"key":"price"}],"headSku":"97907082","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$764.06","priceText":"$531.54","spotPriceText":"$531.54"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639440000000,"discount":29,"reference":"3063349269130","collections":[],"price":399.58,"customSort":0,"stickers":[],"id":"35322334","stock":1,"brand":"Nike","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Computer and Software","Gadgets"],"categoryIds":["9286","9292"]},{"categoryNames":["Computer and Software"],"categoryIds":["9286"]}],"images":[{"name":"vero","value":"http://storeframework.vteximg.com.br/arquivos/ids/169429/deleniti.jpg?v=637753037761670000"},{"name":"laborum","value":"http://storeframework.vteximg.com.br/arquivos/ids/169428/ratione.jpg?v=637753037756200000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000006","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":399.58,"paymentName":"Boleto Bancário","valueText":"$399.58"},"name":"Awesome Plastic Bacon","boost":{"newness":0.8222222222222222,"image":1,"revenue":1,"discount":0.8883077980355484,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":399.58,"skus":[{"images":[{"name":"vero","value":"http://storeframework.vteximg.com.br/arquivos/ids/169429/deleniti.jpg?v=637753037761670000"},{"name":"laborum","value":"http://storeframework.vteximg.com.br/arquivos/ids/169428/ratione.jpg?v=637753037756200000"}],"nameComplete":"Awesome Plastic Bacon violet","complementName":"Velit quia ab. Harum fugiat incidunt consequatur. Asperiores esse et distinctio. Magnam et enim aliquam atque cumque. Voluptas numquam modi excepturi hic laborum odit sit consequatur consectetur.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"2084120969524","idWithSplit":"9938908","name":"violet","attributes":[],"id":"9938908","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/169433-55-55/consequuntur.jpg?v=637753037805300000","images":[{"name":"vitae","value":"http://storeframework.vteximg.com.br/arquivos/ids/169433/consequuntur.jpg?v=637753037805300000"},{"name":"repellat","value":"http://storeframework.vteximg.com.br/arquivos/ids/169432/voluptatibus.jpg?v=637753037800170000"}],"spotPrice":474.77,"nameComplete":"Awesome Plastic Bacon silver","complementName":"Velit quia ab. Harum fugiat incidunt consequatur. Asperiores esse et distinctio. Magnam et enim aliquam atque cumque. Voluptas numquam modi excepturi hic laborum odit sit consequatur consectetur.","oldPrice":518.11,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":474.77,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/169433-55-55/consequuntur.jpg?v=637753037805300000","videos":[],"reference":"8869428115906","idWithSplit":"49950097","price":474.77,"name":"silver","attributes":[],"id":"49950097","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":474.77,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$518.11","priceText":"$474.77","spotPriceText":"$474.77"},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/169431-55-55/commodi.jpg?v=637753037785770000","images":[{"name":"animi","value":"http://storeframework.vteximg.com.br/arquivos/ids/169431/commodi.jpg?v=637753037785770000"},{"name":"error","value":"http://storeframework.vteximg.com.br/arquivos/ids/169430/sit.jpg?v=637753037781870000"}],"spotPrice":593.17,"nameComplete":"Awesome Plastic Bacon lime","complementName":"Velit quia ab. Harum fugiat incidunt consequatur. Asperiores esse et distinctio. Magnam et enim aliquam atque cumque. Voluptas numquam modi excepturi hic laborum odit sit consequatur consectetur.","oldPrice":610.36,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":593.17,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/169431-55-55/commodi.jpg?v=637753037785770000","videos":[],"reference":"2864754656701","idWithSplit":"60500870","price":593.17,"name":"lime","attributes":[],"id":"60500870","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":593.17,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$610.36","priceText":"$593.17","spotPriceText":"$593.17"}],"link":"awesome-plastic-bacon","wear":0,"description":"Laborum non soluta accusamus ut repellat dolorum.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Computer and Software","Gadgets"],"timestamp":1640818258514,"product":"35322334","oldPrice":565.29,"productSpecifications":[],"url":"/awesome-plastic-bacon/p","measurementUnit":"un","categoryIds":["9286","9292"],"textAttributes":[{"joinedValue":"nike@@@Nike@@@@@@nike@@@Nike","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Nike","id":["2000006"],"labelKey":"Brand","value":"nike","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"nike","originalLabelKey":"Brand","originalLabelValue":"Nike"},{"valueId":"9286","joinedValue":"computer-and-software@@@Computer and Software@@@9286@@@computer-and-software@@@Computer and Software","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Computer and Software","id":[],"labelKey":"Category 1","value":"computer-and-software","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"computer-and-software","originalLabelKey":"Category 1","originalLabelValue":"Computer and Software"},{"valueId":"9292","joinedValue":"gadgets@@@Gadgets@@@9292@@@gadgets@@@Gadgets","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Gadgets","id":[],"labelKey":"Category 2","value":"gadgets","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"gadgets","originalLabelKey":"Category 2","originalLabelValue":"Gadgets"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":399.58,"key":"price"}],"headSku":"9938908","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$565.29","priceText":"$399.58","spotPriceText":"$399.58"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1638662400000,"discount":33,"reference":"4715709796003","collections":[{"id":"137","position":1}],"price":200.64,"customSort":0,"stickers":[],"id":"29913569","stock":1,"brand":"Brand","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Desks"],"categoryIds":["9282","9295"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/186495/corporis.jpg?v=637755567185370000"},{"name":"in","value":"http://storeframework.vteximg.com.br/arquivos/ids/186492/qui.jpg?v=637755567174570000"},{"name":"consectetur","value":"http://storeframework.vteximg.com.br/arquivos/ids/186493/possimus.jpg?v=637755567178470000"},{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/186494/nihil.jpg?v=637755567181900000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"9280","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":200.64,"paymentName":"Boleto Bancário","valueText":"$200.64"},"name":"Unbranded Concrete Table Small","boost":{"newness":0.7222222222222222,"image":1,"revenue":1,"discount":0.9879785425636955,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":200.64,"skus":[{"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/186495/corporis.jpg?v=637755567185370000"},{"name":"in","value":"http://storeframework.vteximg.com.br/arquivos/ids/186492/qui.jpg?v=637755567174570000"},{"name":"consectetur","value":"http://storeframework.vteximg.com.br/arquivos/ids/186493/possimus.jpg?v=637755567178470000"},{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/186494/nihil.jpg?v=637755567181900000"}],"nameComplete":"Unbranded Concrete Table Small fuchsia","complementName":"Repellendus ipsum suscipit. Tempore consectetur illo dicta ducimus qui ut tempore. Consequatur non laboriosam aut deleniti doloribus nostrum ab et. Odio molestias hic dolor sunt ipsam non. Blanditiis rerum aut dolorum ratione eveniet voluptatibus. Laborum incidunt velit est est laudantium eos.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"1346198062637","idWithSplit":"64953394","name":"fuchsia","attributes":[],"id":"64953394","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"unbranded-concrete-table-small","wear":0,"description":"Aut omnis nobis tenetur.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Desks"],"timestamp":1640818300408,"product":"29913569","oldPrice":297.7,"productSpecifications":[],"url":"/unbranded-concrete-table-small/p","measurementUnit":"un","categoryIds":["9282","9295"],"textAttributes":[{"joinedValue":"brand@@@Brand@@@@@@brand@@@Brand","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Brand","id":["9280"],"labelKey":"Brand","value":"brand","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"brand","originalLabelKey":"Brand","originalLabelValue":"Brand"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9295","joinedValue":"desks@@@Desks@@@9295@@@desks@@@Desks","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Desks","id":[],"labelKey":"Category 2","value":"desks","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"desks","originalLabelKey":"Category 2","originalLabelValue":"Desks"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"137@@@137@@@@@@137@@@137","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"137","id":[],"labelKey":"productClusterIds","value":"137","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"137","originalLabelKey":"productClusterIds","originalLabelValue":"137"},{"valueId":"137","joinedValue":"all@@@All@@@137@@@all@@@All","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"All","id":[],"labelKey":"productClusterNames","value":"all","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"all","originalLabelKey":"productClusterNames","originalLabelValue":"All"},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":200.64,"key":"price"}],"headSku":"64953394","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$297.70","priceText":"$200.64","spotPriceText":"$200.64"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639094400000,"discount":31,"reference":"3220358025863","collections":[],"price":217.67,"customSort":0,"stickers":[],"id":"50513940","stock":1,"brand":"Skechers","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Computer and Software","Gadgets"],"categoryIds":["9286","9292"]},{"categoryNames":["Computer and Software"],"categoryIds":["9286"]}],"images":[{"name":"alias","value":"http://storeframework.vteximg.com.br/arquivos/ids/179022/possimus.jpg?v=637755499912700000"},{"name":"ipsum","value":"http://storeframework.vteximg.com.br/arquivos/ids/179019/tenetur.jpg?v=637755499903770000"},{"name":"cumque","value":"http://storeframework.vteximg.com.br/arquivos/ids/179020/vero.jpg?v=637755499907070000"},{"name":"facilis","value":"http://storeframework.vteximg.com.br/arquivos/ids/179021/maiores.jpg?v=637755499910030000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000001","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":217.67,"paymentName":"Boleto Bancário","valueText":"$217.67"},"name":"Tasty Rubber Tuna Rustic","boost":{"newness":0.7777777777777778,"image":1,"revenue":1,"discount":0.9289775744060549,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":217.67,"skus":[{"images":[{"name":"alias","value":"http://storeframework.vteximg.com.br/arquivos/ids/179022/possimus.jpg?v=637755499912700000"},{"name":"ipsum","value":"http://storeframework.vteximg.com.br/arquivos/ids/179019/tenetur.jpg?v=637755499903770000"},{"name":"cumque","value":"http://storeframework.vteximg.com.br/arquivos/ids/179020/vero.jpg?v=637755499907070000"},{"name":"facilis","value":"http://storeframework.vteximg.com.br/arquivos/ids/179021/maiores.jpg?v=637755499910030000"}],"nameComplete":"Tasty Rubber Tuna Rustic maroon","complementName":"Placeat accusamus similique praesentium temporibus vitae sit accusamus facilis. Dolore recusandae quis consequatur vero quae. Assumenda placeat magnam eveniet accusamus molestiae aut sed quaerat ratione.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"8942045886814","idWithSplit":"63114505","name":"maroon","attributes":[],"id":"63114505","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"tasty-rubber-tuna-rustic","wear":0,"description":"Corporis quasi assumenda ratione.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Computer and Software","Gadgets"],"timestamp":1640818300585,"product":"50513940","oldPrice":313.9,"productSpecifications":[],"url":"/tasty-rubber-tuna-rustic/p","measurementUnit":"un","categoryIds":["9286","9292"],"textAttributes":[{"joinedValue":"skechers@@@Skechers@@@@@@skechers@@@Skechers","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Skechers","id":["2000001"],"labelKey":"Brand","value":"skechers","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"skechers","originalLabelKey":"Brand","originalLabelValue":"Skechers"},{"valueId":"9286","joinedValue":"computer-and-software@@@Computer and Software@@@9286@@@computer-and-software@@@Computer and Software","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Computer and Software","id":[],"labelKey":"Category 1","value":"computer-and-software","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"computer-and-software","originalLabelKey":"Category 1","originalLabelValue":"Computer and Software"},{"valueId":"9292","joinedValue":"gadgets@@@Gadgets@@@9292@@@gadgets@@@Gadgets","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Gadgets","id":[],"labelKey":"Category 2","value":"gadgets","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"gadgets","originalLabelKey":"Category 2","originalLabelValue":"Gadgets"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":217.67,"key":"price"}],"headSku":"63114505","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$313.90","priceText":"$217.67","spotPriceText":"$217.67"}],"pagination":{"count":50,"current":{"index":1,"proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},"before":[],"after":[{"index":2,"proxyUrl":"search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":3,"proxyUrl":"search/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":4,"proxyUrl":"search/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":5,"proxyUrl":"search/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=0&operator=and"}],"perPage":5,"next":{"index":2,"proxyUrl":"search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},"previous":{"index":0},"first":{"index":0},"last":{"index":50,"proxyUrl":"search/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=0&operator=and"}},"sampling":false,"options":{"sorts":[{"field":"relevance","order":"desc","active":true,"proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=relevance:desc&fuzzy=0&operator=and"},{"field":"orders","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=orders:desc&fuzzy=0&operator=and"},{"field":"discount","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=discount:desc&fuzzy=0&operator=and"},{"field":"price","order":"asc","proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=price:asc&fuzzy=0&operator=and"},{"field":"price","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=5&query=&sort=price:desc&fuzzy=0&operator=and"}],"counts":[{"count":24,"proxyUrl":"search/trade-policy/1?page=1&count=24&query=&sort=&fuzzy=0&operator=and"},{"count":48,"proxyUrl":"search/trade-policy/1?page=1&count=48&query=&sort=&fuzzy=0&operator=and"},{"count":72,"proxyUrl":"search/trade-policy/1?page=1&count=72&query=&sort=&fuzzy=0&operator=and"},{"count":96,"proxyUrl":"search/trade-policy/1?page=1&count=96&query=&sort=&fuzzy=0&operator=and"}]},"translated":false,"locale":"en-US","query":"","operator":"and","fuzzy":"0","correction":{"misspelled":true}}' + ), +} + +export const checkoutSimulationFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForms/simulation?sc=1', + init: { + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body: JSON.stringify({ + items: [ + { quantity: 1, seller: '1', id: '2737806' }, + { quantity: 1, seller: '1', id: '97907082' }, + { quantity: 1, seller: '1', id: '9938908' }, + { quantity: 1, seller: '1', id: '49950097' }, + { quantity: 1, seller: '1', id: '60500870' }, + { quantity: 1, seller: '1', id: '64953394' }, + { quantity: 1, seller: '1', id: '63114505' }, + ], + }), + }, + result: JSON.parse( + '{"items":[{"id":"2737806","requestIndex":0,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:44:09Z","price":34912,"listPrice":55757,"rewardValue":0,"sellingPrice":34912,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/2737806","priceDefinition":{"calculatedSellingPrice":34912,"total":34912,"sellingPrices":[{"value":34912,"quantity":1}]}},{"id":"97907082","requestIndex":1,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:44:09Z","price":53154,"listPrice":76406,"rewardValue":0,"sellingPrice":53154,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/97907082","priceDefinition":{"calculatedSellingPrice":53154,"total":53154,"sellingPrices":[{"value":53154,"quantity":1}]}},{"id":"9938908","requestIndex":2,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:40:02Z","price":39958,"listPrice":56529,"rewardValue":0,"sellingPrice":39958,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/9938908","priceDefinition":{"calculatedSellingPrice":39958,"total":39958,"sellingPrices":[{"value":39958,"quantity":1}]}},{"id":"49950097","requestIndex":3,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:40:02Z","price":47477,"listPrice":51811,"rewardValue":0,"sellingPrice":47477,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/49950097","priceDefinition":{"calculatedSellingPrice":47477,"total":47477,"sellingPrices":[{"value":47477,"quantity":1}]}},{"id":"60500870","requestIndex":4,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:40:02Z","price":59317,"listPrice":61036,"rewardValue":0,"sellingPrice":59317,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/60500870","priceDefinition":{"calculatedSellingPrice":59317,"total":59317,"sellingPrices":[{"value":59317,"quantity":1}]}},{"id":"64953394","requestIndex":5,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:44:09Z","price":20064,"listPrice":29770,"rewardValue":0,"sellingPrice":20064,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/64953394","priceDefinition":{"calculatedSellingPrice":20064,"total":20064,"sellingPrices":[{"value":20064,"quantity":1}]}},{"id":"63114505","requestIndex":6,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:40:02Z","price":21767,"listPrice":31390,"rewardValue":0,"sellingPrice":21767,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/63114505","priceDefinition":{"calculatedSellingPrice":21767,"total":21767,"sellingPrices":[{"value":21767,"quantity":1}]}}],"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"paymentData":{"installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":"Boleto Bancário","paymentGroupName":"bankInvoicePaymentGroup","value":276649,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":276649,"total":276649,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":276649,"total":276649}]}]},{"paymentSystem":"201","bin":null,"paymentName":"Free","paymentGroupName":"custom201PaymentGroupPaymentGroup","value":276649,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":276649,"total":276649,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":276649,"total":276649}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":null,"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T13:23:16.4976709Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":null,"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T13:23:16.4976709Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"selectableGifts":[],"marketingData":null,"postalCode":null,"country":null,"logisticsInfo":[{"itemIndex":0,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":1,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":2,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":3,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":4,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":5,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":6,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]}],"messages":[],"purchaseConditions":{"itemPurchaseConditions":[{"id":"2737806","seller":"1","sellerChain":["1"],"slas":[],"price":34912,"listPrice":55757},{"id":"97907082","seller":"1","sellerChain":["1"],"slas":[],"price":53154,"listPrice":76406},{"id":"9938908","seller":"1","sellerChain":["1"],"slas":[],"price":39958,"listPrice":56529},{"id":"49950097","seller":"1","sellerChain":["1"],"slas":[],"price":47477,"listPrice":51811},{"id":"60500870","seller":"1","sellerChain":["1"],"slas":[],"price":59317,"listPrice":61036},{"id":"64953394","seller":"1","sellerChain":["1"],"slas":[],"price":20064,"listPrice":29770},{"id":"63114505","seller":"1","sellerChain":["1"],"slas":[],"price":21767,"listPrice":31390}]},"pickupPoints":[],"subscriptionData":null,"totals":[{"id":"Items","name":"Items Total","value":276649}],"itemMetadata":null}' + ), +} diff --git a/packages/api/mocks/CollectionQuery.ts b/packages/api/mocks/CollectionQuery.ts index cf655f3771..ef2ab06593 100644 --- a/packages/api/mocks/CollectionQuery.ts +++ b/packages/api/mocks/CollectionQuery.ts @@ -26,3 +26,30 @@ export const CollectionDesksQuery = `query CollectionQuery { } } ` + +export const pageTypeDesksFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/desks', + init: undefined, + result: JSON.parse( + '{"id":"9295","name":"Desks","url":"storeframework.vtexcommercestable.com.br/Office/Desks","title":"Desks","metaTagDescription":"Desks for better productivity","pageType":"Category"}' + ), +} + +export const pageTypeOfficeFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/Office', + init: undefined, + result: JSON.parse( + '{"id":"9282","name":"Office","url":"storeframework.vtexcommercestable.com.br/Office","title":"Office","metaTagDescription":"For the office and home office","pageType":"Department"}' + ), +} + +export const pageTypeOfficeDesksFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/catalog_system/pub/portal/pagetype/Office/Desks', + init: undefined, + result: JSON.parse( + '{"id":"9295","name":"Desks","url":"storeframework.vtexcommercestable.com.br/Office/Desks","title":"Desks","metaTagDescription":"Desks for better productivity","pageType":"Category"}' + ), +} diff --git a/packages/api/mocks/ProductQuery.ts b/packages/api/mocks/ProductQuery.ts index 86103fcbf4..3ab6ebf031 100644 --- a/packages/api/mocks/ProductQuery.ts +++ b/packages/api/mocks/ProductQuery.ts @@ -59,3 +59,27 @@ export const ProductByIdQuery = `query ProductQuery { } } ` + +export const productSearchFetch = { + info: + 'http://portal.vtexcommercestable.com.br/search-api/v1/storeframework/api/split/product_search/trade-policy/1?page=1&count=1&query=sku%3A64953394&sort=&fuzzy=0&hide-unavailable-items=false', + init: undefined, + result: JSON.parse( + '{"total":1,"products":[{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1638662400000,"discount":33,"reference":"4715709796003","collections":[{"id":"137","position":1}],"price":200.64,"customSort":0,"stickers":[],"id":"29913569","stock":1,"brand":"Brand","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Desks"],"categoryIds":["9282","9295"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/186495/corporis.jpg?v=637755567185370000"},{"name":"in","value":"http://storeframework.vteximg.com.br/arquivos/ids/186492/qui.jpg?v=637755567174570000"},{"name":"consectetur","value":"http://storeframework.vteximg.com.br/arquivos/ids/186493/possimus.jpg?v=637755567178470000"},{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/186494/nihil.jpg?v=637755567181900000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"9280","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":200.64,"paymentName":"Boleto Bancário","valueText":"$200.64"},"name":"Unbranded Concrete Table Small","boost":{"newness":0.7222222222222222,"image":1,"revenue":1,"discount":0.9879785425636955,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":200.64,"skus":[{"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/186495/corporis.jpg?v=637755567185370000"},{"name":"in","value":"http://storeframework.vteximg.com.br/arquivos/ids/186492/qui.jpg?v=637755567174570000"},{"name":"consectetur","value":"http://storeframework.vteximg.com.br/arquivos/ids/186493/possimus.jpg?v=637755567178470000"},{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/186494/nihil.jpg?v=637755567181900000"}],"nameComplete":"Unbranded Concrete Table Small fuchsia","complementName":"Repellendus ipsum suscipit. Tempore consectetur illo dicta ducimus qui ut tempore. Consequatur non laboriosam aut deleniti doloribus nostrum ab et. Odio molestias hic dolor sunt ipsam non. Blanditiis rerum aut dolorum ratione eveniet voluptatibus. Laborum incidunt velit est est laudantium eos.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"1346198062637","idWithSplit":"64953394","name":"fuchsia","attributes":[],"id":"64953394","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"unbranded-concrete-table-small","wear":0,"description":"Aut omnis nobis tenetur.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Desks"],"timestamp":1640818300408,"product":"29913569","oldPrice":297.7,"productSpecifications":[],"url":"/unbranded-concrete-table-small/p","measurementUnit":"un","categoryIds":["9282","9295"],"textAttributes":[{"joinedValue":"brand@@@Brand@@@@@@brand@@@Brand","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Brand","id":["9280"],"labelKey":"Brand","value":"brand","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"brand","originalLabelKey":"Brand","originalLabelValue":"Brand"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9295","joinedValue":"desks@@@Desks@@@9295@@@desks@@@Desks","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Desks","id":[],"labelKey":"Category 2","value":"desks","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"desks","originalLabelKey":"Category 2","originalLabelValue":"Desks"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"137@@@137@@@@@@137@@@137","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"137","id":[],"labelKey":"productClusterIds","value":"137","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"137","originalLabelKey":"productClusterIds","originalLabelValue":"137"},{"valueId":"137","joinedValue":"all@@@All@@@137@@@all@@@All","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"All","id":[],"labelKey":"productClusterNames","value":"all","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"all","originalLabelKey":"productClusterNames","originalLabelValue":"All"},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":200.64,"key":"price"}],"headSku":"64953394","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$297.70","priceText":"$200.64","spotPriceText":"$200.64"}],"pagination":{"count":1,"current":{"index":1,"proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=&fuzzy=0&operator=and"},"before":[],"after":[],"perPage":1,"next":{"index":0},"previous":{"index":0},"first":{"index":0},"last":{"index":0}},"sampling":false,"options":{"sorts":[{"field":"relevance","order":"desc","active":true,"proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=relevance:desc&fuzzy=0&operator=and"},{"field":"orders","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=orders:desc&fuzzy=0&operator=and"},{"field":"discount","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=discount:desc&fuzzy=0&operator=and"},{"field":"price","order":"asc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=price:asc&fuzzy=0&operator=and"},{"field":"price","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=price:desc&fuzzy=0&operator=and"}],"counts":[{"count":24,"proxyUrl":"search/trade-policy/1?page=1&count=24&query=sku:64953394&sort=&fuzzy=0&operator=and"},{"count":48,"proxyUrl":"search/trade-policy/1?page=1&count=48&query=sku:64953394&sort=&fuzzy=0&operator=and"},{"count":72,"proxyUrl":"search/trade-policy/1?page=1&count=72&query=sku:64953394&sort=&fuzzy=0&operator=and"},{"count":96,"proxyUrl":"search/trade-policy/1?page=1&count=96&query=sku:64953394&sort=&fuzzy=0&operator=and"}]},"translated":false,"locale":"en-US","query":"sku:64953394","operator":"and","fuzzy":"0","correction":{"misspelled":true}}' + ), +} + +export const checkoutSimulationFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForms/simulation?sc=1', + init: { + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body: '{"items":[{"quantity":1,"seller":"1","id":"64953394"}]}', + }, + result: JSON.parse( + '{"items":[{"id":"64953394","requestIndex":0,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-29T13:55:09Z","price":20064,"listPrice":29770,"rewardValue":0,"sellingPrice":20064,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/64953394","priceDefinition":{"calculatedSellingPrice":20064,"total":20064,"sellingPrices":[{"value":20064,"quantity":1}]}}],"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"paymentData":{"installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":"Boleto Bancário","paymentGroupName":"bankInvoicePaymentGroup","value":20064,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":20064,"total":20064,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":20064,"total":20064}]}]},{"paymentSystem":"201","bin":null,"paymentName":"Free","paymentGroupName":"custom201PaymentGroupPaymentGroup","value":20064,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":20064,"total":20064,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":20064,"total":20064}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":null,"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T13:45:49.1075749Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":null,"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T13:45:49.1075749Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"selectableGifts":[],"marketingData":null,"postalCode":null,"country":null,"logisticsInfo":[{"itemIndex":0,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]}],"messages":[],"purchaseConditions":{"itemPurchaseConditions":[{"id":"64953394","seller":"1","sellerChain":["1"],"slas":[],"price":20064,"listPrice":29770}]},"pickupPoints":[],"subscriptionData":null,"totals":[{"id":"Items","name":"Items Total","value":20064}],"itemMetadata":null}' + ), +} diff --git a/packages/api/mocks/SearchQuery.ts b/packages/api/mocks/SearchQuery.ts index 4abe92786b..b9dc54a372 100644 --- a/packages/api/mocks/SearchQuery.ts +++ b/packages/api/mocks/SearchQuery.ts @@ -97,3 +97,37 @@ export const SearchQueryFirst5Products = `query SearchQuery { } } }` + +export const productSearchCategory1Fetch = { + info: + 'http://portal.vtexcommercestable.com.br/search-api/v1/storeframework/api/split/product_search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&hide-unavailable-items=false', + init: undefined, + result: JSON.parse( + '{"total":1826,"products":[{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639872000000,"discount":31,"reference":"3794642025652","collections":[],"price":129.09,"customSort":0,"stickers":[],"id":"6049813","stock":1,"brand":"Skechers","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Desks"],"categoryIds":["9282","9295"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"repellat","value":"http://storeframework.vteximg.com.br/arquivos/ids/181666/ut.jpg?v=637755525053770000"},{"name":"ut","value":"http://storeframework.vteximg.com.br/arquivos/ids/181664/qui.jpg?v=637755525048170000"},{"name":"omnis","value":"http://storeframework.vteximg.com.br/arquivos/ids/181665/explicabo.jpg?v=637755525050970000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000001","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":129.09,"paymentName":"Boleto Bancário","valueText":"$129.09"},"name":"Licensed Cotton Hat Licensed","boost":{"newness":0.999898,"image":1,"revenue":0.00026,"discount":0.000030585578319083715,"productScore":0.000001,"click":0,"availableSpecsCount":0.002,"promotion":0,"order":0.000002},"spotPrice":129.09,"skus":[{"images":[{"name":"repellat","value":"http://storeframework.vteximg.com.br/arquivos/ids/181666/ut.jpg?v=637755525053770000"},{"name":"ut","value":"http://storeframework.vteximg.com.br/arquivos/ids/181664/qui.jpg?v=637755525048170000"},{"name":"omnis","value":"http://storeframework.vteximg.com.br/arquivos/ids/181665/explicabo.jpg?v=637755525050970000"}],"nameComplete":"Licensed Cotton Hat Licensed green","complementName":"Occaecati omnis laboriosam perspiciatis voluptatem aut vel saepe. Eius sint tempora voluptatum qui nulla quae cumque alias. Velit quo nihil modi officia omnis.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"8463905750603","idWithSplit":"2791588","name":"green","attributes":[],"id":"2791588","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/181663-55-55/maiores.jpg?v=637755525037500000","images":[{"name":"esse","value":"http://storeframework.vteximg.com.br/arquivos/ids/181663/maiores.jpg?v=637755525037500000"},{"name":"necessitatibus","value":"http://storeframework.vteximg.com.br/arquivos/ids/181661/fugit.jpg?v=637755525031270000"},{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/181662/perspiciatis.jpg?v=637755525034530000"}],"spotPrice":264.63,"nameComplete":"Licensed Cotton Hat Licensed red","complementName":"Occaecati omnis laboriosam perspiciatis voluptatem aut vel saepe. Eius sint tempora voluptatum qui nulla quae cumque alias. Velit quo nihil modi officia omnis.","oldPrice":325.77,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":264.63,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/181663-55-55/maiores.jpg?v=637755525037500000","videos":[],"reference":"1747997762678","idWithSplit":"93344885","price":264.63,"name":"red","attributes":[],"id":"93344885","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":264.63,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$325.77","priceText":"$264.63","spotPriceText":"$264.63"}],"link":"licensed-cotton-hat-licensed","wear":0,"description":"Consequatur placeat optio adipisci aut voluptate excepturi.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Desks"],"timestamp":1648642605816,"product":"6049813","oldPrice":185.97,"productSpecifications":[],"url":"/licensed-cotton-hat-licensed/p","measurementUnit":"un","categoryIds":["9282","9295"],"textAttributes":[{"joinedValue":"skechers@@@Skechers@@@@@@skechers@@@Skechers","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Skechers","id":["2000001"],"labelKey":"Brand","value":"skechers","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"skechers","originalLabelKey":"Brand","originalLabelValue":"Skechers"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9295","joinedValue":"desks@@@Desks@@@9295@@@desks@@@Desks","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Desks","id":[],"labelKey":"Category 2","value":"desks","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"desks","originalLabelKey":"Category 2","originalLabelValue":"Desks"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":129.09,"key":"price"}],"headSku":"2791588","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$185.97","priceText":"$129.09","spotPriceText":"$129.09"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639699200000,"discount":33,"reference":"3167600753541","collections":[],"price":362.36,"customSort":0,"stickers":[],"id":"48182547","stock":1,"brand":"adidas","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Desks"],"categoryIds":["9282","9295"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"impedit","value":"http://storeframework.vteximg.com.br/arquivos/ids/184304/a.jpg?v=637755547736000000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000004","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":362.36,"paymentName":"Boleto Bancário","valueText":"$362.36"},"name":"Handmade Granite Computer Unbranded","boost":{"newness":0.999896,"image":1,"revenue":0.001451,"discount":0.000032584186046511616,"productScore":0.000001,"click":0,"availableSpecsCount":0.002,"promotion":0,"order":0.000002},"spotPrice":362.36,"skus":[{"images":[{"name":"impedit","value":"http://storeframework.vteximg.com.br/arquivos/ids/184304/a.jpg?v=637755547736000000"}],"nameComplete":"Handmade Granite Computer Unbranded red","complementName":"Voluptatem quia in maiores. Est aut delectus et odit molestiae occaecati sit architecto. Cum nostrum minima.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"8169125134781","idWithSplit":"44903104","name":"red","attributes":[],"id":"44903104","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/184305-55-55/nisi.jpg?v=637755547747730000","images":[{"name":"tempora","value":"http://storeframework.vteximg.com.br/arquivos/ids/184305/nisi.jpg?v=637755547747730000"}],"spotPrice":770,"nameComplete":"Handmade Granite Computer Unbranded magenta","complementName":"Voluptatem quia in maiores. Est aut delectus et odit molestiae occaecati sit architecto. Cum nostrum minima.","oldPrice":881.98,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":770,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/184305-55-55/nisi.jpg?v=637755547747730000","videos":[],"reference":"5151004785840","idWithSplit":"80744096","price":770,"name":"magenta","attributes":[],"id":"80744096","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":770,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$881.98","priceText":"$770.00","spotPriceText":"$770.00"}],"link":"handmade-granite-computer-unbranded","wear":0,"description":"Ipsa in sequi incidunt dolores.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Desks"],"timestamp":1648642588977,"product":"48182547","oldPrice":537.5,"productSpecifications":[],"url":"/handmade-granite-computer-unbranded/p","measurementUnit":"un","categoryIds":["9282","9295"],"textAttributes":[{"joinedValue":"adidas@@@adidas@@@@@@adidas@@@adidas","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"adidas","id":["2000004"],"labelKey":"Brand","value":"adidas","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"adidas","originalLabelKey":"Brand","originalLabelValue":"adidas"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9295","joinedValue":"desks@@@Desks@@@9295@@@desks@@@Desks","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Desks","id":[],"labelKey":"Category 2","value":"desks","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"desks","originalLabelKey":"Category 2","originalLabelValue":"Desks"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":362.36,"key":"price"}],"headSku":"44903104","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$537.50","priceText":"$362.36","spotPriceText":"$362.36"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639785600000,"discount":27,"reference":"3325400227651","collections":[],"price":247.01,"customSort":0,"stickers":[],"id":"8172115","stock":1,"brand":"Acer","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Chairs"],"categoryIds":["9282","9296"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"debitis","value":"http://storeframework.vteximg.com.br/arquivos/ids/178292/ea.jpg?v=637755492251130000"},{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/178290/voluptatum.jpg?v=637755492245200000"},{"name":"itaque","value":"http://storeframework.vteximg.com.br/arquivos/ids/178291/non.jpg?v=637755492248300000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000002","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":247.01,"paymentName":"Boleto Bancário","valueText":"$247.01"},"name":"Small Cotton Cheese","boost":{"newness":0.999897,"image":1,"revenue":0,"discount":0.000027180802452757882,"productScore":0.000001,"click":0.000004,"availableSpecsCount":0.003,"promotion":0,"order":0},"spotPrice":247.01,"skus":[{"images":[{"name":"debitis","value":"http://storeframework.vteximg.com.br/arquivos/ids/178292/ea.jpg?v=637755492251130000"},{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/178290/voluptatum.jpg?v=637755492245200000"},{"name":"itaque","value":"http://storeframework.vteximg.com.br/arquivos/ids/178291/non.jpg?v=637755492248300000"}],"nameComplete":"Small Cotton Cheese olive","complementName":"Reiciendis quo architecto. Totam est porro. Explicabo sed omnis adipisci consequuntur. Aut beatae qui quaerat et incidunt cumque. Velit eum sapiente eum tempore odit. Ab pariatur sunt.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"8277738323492","idWithSplit":"96175310","name":"olive","attributes":[],"id":"96175310","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/178298-55-55/enim.jpg?v=637755492291330000","images":[{"name":"numquam","value":"http://storeframework.vteximg.com.br/arquivos/ids/178298/enim.jpg?v=637755492291330000"},{"name":"explicabo","value":"http://storeframework.vteximg.com.br/arquivos/ids/178296/id.jpg?v=637755492284630000"},{"name":"numquam","value":"http://storeframework.vteximg.com.br/arquivos/ids/178297/autem.jpg?v=637755492288370000"}],"spotPrice":333.67,"nameComplete":"Small Cotton Cheese grey","complementName":"Reiciendis quo architecto. Totam est porro. Explicabo sed omnis adipisci consequuntur. Aut beatae qui quaerat et incidunt cumque. Velit eum sapiente eum tempore odit. Ab pariatur sunt.","oldPrice":504.39,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":333.67,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/178298-55-55/enim.jpg?v=637755492291330000","videos":[],"reference":"7345804070257","idWithSplit":"47744496","price":333.67,"name":"grey","attributes":[],"id":"47744496","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":333.67,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$504.39","priceText":"$333.67","spotPriceText":"$333.67"},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/178295-55-55/non.jpg?v=637755492271000000","images":[{"name":"totam","value":"http://storeframework.vteximg.com.br/arquivos/ids/178295/non.jpg?v=637755492271000000"},{"name":"sit","value":"http://storeframework.vteximg.com.br/arquivos/ids/178293/voluptatibus.jpg?v=637755492264430000"},{"name":"ad","value":"http://storeframework.vteximg.com.br/arquivos/ids/178294/natus.jpg?v=637755492268200000"}],"spotPrice":642.91,"nameComplete":"Small Cotton Cheese indigo","complementName":"Reiciendis quo architecto. Totam est porro. Explicabo sed omnis adipisci consequuntur. Aut beatae qui quaerat et incidunt cumque. Velit eum sapiente eum tempore odit. Ab pariatur sunt.","oldPrice":955.48,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":642.91,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/178295-55-55/non.jpg?v=637755492271000000","videos":[],"reference":"5040304227270","idWithSplit":"51309679","price":642.91,"name":"indigo","attributes":[],"id":"51309679","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":642.91,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$955.48","priceText":"$642.91","spotPriceText":"$642.91"}],"link":"small-cotton-cheese-3325400227651","wear":0,"description":"Dolor harum perferendis voluptatem tempora voluptatum ut et sapiente iure.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Chairs"],"timestamp":1648644597984,"product":"8172115","oldPrice":339.21,"productSpecifications":[],"url":"/small-cotton-cheese-3325400227651/p","measurementUnit":"un","categoryIds":["9282","9296"],"textAttributes":[{"joinedValue":"acer@@@Acer@@@@@@acer@@@Acer","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Acer","id":["2000002"],"labelKey":"Brand","value":"acer","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"acer","originalLabelKey":"Brand","originalLabelValue":"Acer"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9296","joinedValue":"chairs@@@Chairs@@@9296@@@chairs@@@Chairs","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Chairs","id":[],"labelKey":"Category 2","value":"chairs","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"chairs","originalLabelKey":"Category 2","originalLabelValue":"Chairs"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":247.01,"key":"price"}],"headSku":"96175310","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$339.21","priceText":"$247.01","spotPriceText":"$247.01"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639872000000,"discount":32,"reference":"2063346997441","collections":[],"price":1.37,"customSort":0,"stickers":[],"id":"31264637","stock":1,"brand":"adidas","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Chairs"],"categoryIds":["9282","9296"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"ipsam","value":"http://storeframework.vteximg.com.br/arquivos/ids/190604/vel.jpg?v=637755602570270000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000004","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":1.37,"paymentName":"Boleto Bancário","valueText":"$1.37"},"name":"Tasty Frozen Tuna Handmade","boost":{"newness":0.999898,"image":1,"revenue":0.000002,"discount":0.00003184079601990049,"productScore":0.000001,"click":0,"availableSpecsCount":0.002,"promotion":0,"order":0.000001},"spotPrice":1.37,"skus":[{"images":[{"name":"ipsam","value":"http://storeframework.vteximg.com.br/arquivos/ids/190604/vel.jpg?v=637755602570270000"}],"nameComplete":"Tasty Frozen Tuna Handmade fuchsia","complementName":"Ex dolores quibusdam omnis. Quis corporis perferendis aliquid labore amet quod. Repudiandae vel architecto ducimus consequatur in totam facilis saepe.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"6486061707855","idWithSplit":"12405783","name":"fuchsia","attributes":[],"id":"12405783","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/190605-55-55/dolorem.jpg?v=637755602585600000","images":[{"name":"ipsum","value":"http://storeframework.vteximg.com.br/arquivos/ids/190605/dolorem.jpg?v=637755602585600000"}],"spotPrice":582.1,"nameComplete":"Tasty Frozen Tuna Handmade azure","complementName":"Ex dolores quibusdam omnis. Quis corporis perferendis aliquid labore amet quod. Repudiandae vel architecto ducimus consequatur in totam facilis saepe.","oldPrice":638.97,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":582.1,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/190605-55-55/dolorem.jpg?v=637755602585600000","videos":[],"reference":"8573002454805","idWithSplit":"68456079","price":582.1,"name":"azure","attributes":[],"id":"68456079","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":582.1,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$638.97","priceText":"$582.10","spotPriceText":"$582.10"}],"link":"tasty-frozen-tuna-handmade","wear":0,"description":"Recusandae dolores alias.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Chairs"],"timestamp":1648644692068,"product":"31264637","oldPrice":2.01,"productSpecifications":[],"url":"/tasty-frozen-tuna-handmade/p","measurementUnit":"un","categoryIds":["9282","9296"],"textAttributes":[{"joinedValue":"adidas@@@adidas@@@@@@adidas@@@adidas","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"adidas","id":["2000004"],"labelKey":"Brand","value":"adidas","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"adidas","originalLabelKey":"Brand","originalLabelValue":"adidas"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9296","joinedValue":"chairs@@@Chairs@@@9296@@@chairs@@@Chairs","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Chairs","id":[],"labelKey":"Category 2","value":"chairs","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"chairs","originalLabelKey":"Category 2","originalLabelValue":"Chairs"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":1.37,"key":"price"}],"headSku":"12405783","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$2.01","priceText":"$1.37","spotPriceText":"$1.37"},{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1639526400000,"discount":30,"reference":"5751052565691","collections":[],"price":175.38,"customSort":0,"stickers":[],"id":"52016072","stock":1,"brand":"Acer","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Office","Chairs"],"categoryIds":["9282","9296"]},{"categoryNames":["Office"],"categoryIds":["9282"]}],"images":[{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/155949/voluptas.jpg?v=637752878341070000"},{"name":"dolores","value":"http://storeframework.vteximg.com.br/arquivos/ids/155948/molestiae.jpg?v=637752878337300000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000002","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":175.38,"paymentName":"Boleto Bancário","valueText":"$175.38"},"name":"Sleek Metal Pizza","boost":{"newness":0.999894,"image":1,"revenue":0.003493,"discount":0.000029605844103716783,"productScore":0.000001,"click":0,"availableSpecsCount":0.002,"promotion":0,"order":0.000004},"spotPrice":175.38,"skus":[{"images":[{"name":"ea","value":"http://storeframework.vteximg.com.br/arquivos/ids/155949/voluptas.jpg?v=637752878341070000"},{"name":"dolores","value":"http://storeframework.vteximg.com.br/arquivos/ids/155948/molestiae.jpg?v=637752878337300000"}],"nameComplete":"Sleek Metal Pizza olive","complementName":"Cum eum ut inventore aut quisquam. Accusamus odio laborum et id libero quia. Tenetur sint molestiae excepturi accusantium. Est porro occaecati quod. Nisi maiores deserunt laudantium perferendis rerum explicabo tenetur itaque amet. Temporibus beatae minus perferendis animi ut qui ullam veritatis.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"2231710663034","idWithSplit":"24041857","name":"olive","attributes":[],"id":"24041857","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]},{"image":"http://storeframework.vteximg.com.br/arquivos/ids/155951-55-55/molestiae.jpg?v=637752878358630000","images":[{"name":"quam","value":"http://storeframework.vteximg.com.br/arquivos/ids/155951/molestiae.jpg?v=637752878358630000"},{"name":"iure","value":"http://storeframework.vteximg.com.br/arquivos/ids/155950/et.jpg?v=637752878353500000"}],"spotPrice":517.54,"nameComplete":"Sleek Metal Pizza green","complementName":"Cum eum ut inventore aut quisquam. Accusamus odio laborum et id libero quia. Tenetur sint molestiae excepturi accusantium. Est porro occaecati quod. Nisi maiores deserunt laudantium perferendis rerum explicabo tenetur itaque amet. Temporibus beatae minus perferendis animi ut qui ullam veritatis.","oldPrice":666.42,"policies":[{"id":"1","sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":517.54,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"icon":"http://storeframework.vteximg.com.br/arquivos/ids/155951-55-55/molestiae.jpg?v=637752878358630000","videos":[],"reference":"5117662847505","idWithSplit":"94486378","price":517.54,"name":"green","attributes":[],"id":"94486378","stock":1,"sellers":[{"default":true,"installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":517.54,"paymentName":"Boleto Bancário"},"name":"VTEX","tax":0,"teasers":[],"id":"1"}],"oldPriceText":"$666.42","priceText":"$517.54","spotPriceText":"$517.54"}],"link":"sleek-metal-pizza","wear":0,"description":"Aliquam a cumque ratione voluptatem in.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Office","Chairs"],"timestamp":1648642505198,"product":"52016072","oldPrice":249.14,"productSpecifications":[],"url":"/sleek-metal-pizza/p","measurementUnit":"un","categoryIds":["9282","9296"],"textAttributes":[{"joinedValue":"acer@@@Acer@@@@@@acer@@@Acer","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Acer","id":["2000002"],"labelKey":"Brand","value":"acer","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"acer","originalLabelKey":"Brand","originalLabelValue":"Acer"},{"valueId":"9282","joinedValue":"office@@@Office@@@9282@@@office@@@Office","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Office","id":[],"labelKey":"Category 1","value":"office","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"office","originalLabelKey":"Category 1","originalLabelValue":"Office"},{"valueId":"9296","joinedValue":"chairs@@@Chairs@@@9296@@@chairs@@@Chairs","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Chairs","id":[],"labelKey":"Category 2","value":"chairs","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"chairs","originalLabelKey":"Category 2","originalLabelValue":"Chairs"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":175.38,"key":"price"}],"headSku":"24041857","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$249.14","priceText":"$175.38","spotPriceText":"$175.38"}],"pagination":{"count":50,"current":{"index":1,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},"before":[],"after":[{"index":2,"proxyUrl":"search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":3,"proxyUrl":"search/category-1/office/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":4,"proxyUrl":"search/category-1/office/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":5,"proxyUrl":"search/category-1/office/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=0&operator=and"}],"perPage":5,"next":{"index":2,"proxyUrl":"search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},"previous":{"index":0},"first":{"index":0},"last":{"index":50,"proxyUrl":"search/category-1/office/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=0&operator=and"}},"sampling":false,"options":{"sorts":[{"field":"relevance","order":"desc","active":true,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=relevance:desc&fuzzy=0&operator=and"},{"field":"orders","order":"desc","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=orders:desc&fuzzy=0&operator=and"},{"field":"discount","order":"desc","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=discount:desc&fuzzy=0&operator=and"},{"field":"price","order":"asc","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=price:asc&fuzzy=0&operator=and"},{"field":"price","order":"desc","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=price:desc&fuzzy=0&operator=and"}],"counts":[{"count":24,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=24&query=&sort=&fuzzy=0&operator=and"},{"count":48,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=48&query=&sort=&fuzzy=0&operator=and"},{"count":72,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=72&query=&sort=&fuzzy=0&operator=and"},{"count":96,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=96&query=&sort=&fuzzy=0&operator=and"}]},"translated":false,"locale":"en-US","query":"","operator":"and","fuzzy":"0","correction":{"misspelled":true}}' + ), +} + +export const attributeSearchCategory1Fetch = { + info: + 'http://portal.vtexcommercestable.com.br/search-api/v1/storeframework/api/split/attribute_search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&hide-unavailable-items=false', + init: undefined, + result: JSON.parse( + '{"total":1826,"pagination":{"count":50,"current":{"index":1,"proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},"before":[],"after":[{"index":2,"proxyUrl":"search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":3,"proxyUrl":"search/category-1/office/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":4,"proxyUrl":"search/category-1/office/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=0&operator=and"},{"index":5,"proxyUrl":"search/category-1/office/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=0&operator=and"}],"perPage":5,"next":{"index":2,"proxyUrl":"search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and"},"previous":{"index":0},"first":{"index":0},"last":{"index":50,"proxyUrl":"search/category-1/office/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=0&operator=and"}},"sampling":false,"translated":false,"locale":"en-US","query":"","operator":"and","fuzzy":"0","attributes":[{"ids":[],"visible":true,"values":[{"count":646,"active":false,"from":"*","to":"150","proxyUrl":"search/category-1/office/trade-policy/1/preco/*:150?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":601,"active":false,"from":"360","to":"*","proxyUrl":"search/category-1/office/trade-policy/1/preco/360:*?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":579,"active":false,"from":"150","to":"360","proxyUrl":"search/category-1/office/trade-policy/1/preco/150:360?page=1&count=5&query=&sort=&fuzzy=0&operator=and"}],"active":false,"key":"preco","originalKey":"price","label":"Preço","originalLabel":"Price","type":"number","minValue":0.23,"maxValue":995.92,"templateUrl":"search/category-1/office/trade-policy/1/preco/{from}:{to}?page=1&count=5&query=&sort=&fuzzy=0&operator=and","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"ids":[],"visible":true,"values":[{"count":951,"active":false,"key":"chairs","label":"Chairs","id":"9296","originalKey":"chairs","originalLabel":"Chairs","proxyUrl":"search/category-1/office/trade-policy/1/categoria/chairs?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":875,"active":false,"key":"desks","label":"Desks","id":"9295","originalKey":"desks","originalLabel":"Desks","proxyUrl":"search/category-1/office/trade-policy/1/categoria/desks?page=1&count=5&query=&sort=&fuzzy=0&operator=and"}],"active":false,"key":"categoria","originalKey":"category-2","label":"Categoria","originalLabel":"Category 2","type":"text"},{"ids":[],"visible":false,"values":[{"count":1,"active":true,"key":"office","label":"Office","originalKey":"office","originalLabel":"Office","id":"9282","proxyUrl":"search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and"}],"active":true,"type":"text","key":"departamento","label":"Departamento","originalKey":"category-1","originalLabel":"Category 1"},{"ids":["2000006","2000003","2000001","2000002","2000005","9280","2000004"],"visible":true,"values":[{"count":285,"active":false,"key":"nike","label":"Nike","id":"","originalKey":"nike","originalLabel":"Nike","proxyUrl":"search/category-1/office/trade-policy/1/marca/nike?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":284,"active":false,"key":"irobot","label":"iRobot","id":"","originalKey":"irobot","originalLabel":"iRobot","proxyUrl":"search/category-1/office/trade-policy/1/marca/irobot?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":270,"active":false,"key":"skechers","label":"Skechers","id":"","originalKey":"skechers","originalLabel":"Skechers","proxyUrl":"search/category-1/office/trade-policy/1/marca/skechers?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":263,"active":false,"key":"acer","label":"Acer","id":"","originalKey":"acer","originalLabel":"Acer","proxyUrl":"search/category-1/office/trade-policy/1/marca/acer?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":254,"active":false,"key":"black-decker","label":"BLACK+DECKER","id":"","originalKey":"black-decker","originalLabel":"BLACK+DECKER","proxyUrl":"search/category-1/office/trade-policy/1/marca/black-decker?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":239,"active":false,"key":"brand","label":"Brand","id":"","originalKey":"brand","originalLabel":"Brand","proxyUrl":"search/category-1/office/trade-policy/1/marca/brand?page=1&count=5&query=&sort=&fuzzy=0&operator=and"},{"count":231,"active":false,"key":"adidas","label":"adidas","id":"","originalKey":"adidas","originalLabel":"adidas","proxyUrl":"search/category-1/office/trade-policy/1/marca/adidas?page=1&count=5&query=&sort=&fuzzy=0&operator=and"}],"active":false,"key":"marca","originalKey":"brand","label":"Marca","originalLabel":"Brand","type":"text"}]}' + ), +} + +export const checkoutSimulationFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForms/simulation?sc=1', + init: { + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body: + '{"items":[{"quantity":1,"seller":"1","id":"2791588"},{"quantity":1,"seller":"1","id":"44903104"},{"quantity":1,"seller":"1","id":"96175310"},{"quantity":1,"seller":"1","id":"12405783"},{"quantity":1,"seller":"1","id":"24041857"}]}', + }, + result: JSON.parse( + '{"items":[{"id":"2791588","requestIndex":0,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-30T13:51:02Z","price":12909,"listPrice":18597,"rewardValue":0,"sellingPrice":12909,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/2791588","priceDefinition":{"calculatedSellingPrice":12909,"total":12909,"sellingPrices":[{"value":12909,"quantity":1}]}},{"id":"44903104","requestIndex":1,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-30T13:51:02Z","price":36236,"listPrice":53750,"rewardValue":0,"sellingPrice":36236,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/44903104","priceDefinition":{"calculatedSellingPrice":36236,"total":36236,"sellingPrices":[{"value":36236,"quantity":1}]}},{"id":"96175310","requestIndex":2,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-30T13:51:02Z","price":24701,"listPrice":33921,"rewardValue":0,"sellingPrice":24701,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/96175310","priceDefinition":{"calculatedSellingPrice":24701,"total":24701,"sellingPrices":[{"value":24701,"quantity":1}]}},{"id":"12405783","requestIndex":3,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-30T13:51:02Z","price":137,"listPrice":201,"rewardValue":0,"sellingPrice":137,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/12405783","priceDefinition":{"calculatedSellingPrice":137,"total":137,"sellingPrices":[{"value":137,"quantity":1}]}},{"id":"24041857","requestIndex":4,"quantity":1,"seller":"1","sellerChain":["1"],"tax":0,"priceValidUntil":"2023-03-30T13:51:02Z","price":17538,"listPrice":24914,"rewardValue":0,"sellingPrice":17538,"offerings":[],"priceTags":[],"measurementUnit":"un","unitMultiplier":1,"parentItemIndex":null,"parentAssemblyBinding":null,"availability":"available","catalogProvider":"vrn:vtex.catalog-api-proxy:-:storeframework:master:/proxy/authenticated/catalog/pvt/sku/stockkeepingunitbyid/24041857","priceDefinition":{"calculatedSellingPrice":17538,"total":17538,"sellingPrices":[{"value":17538,"quantity":1}]}}],"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"paymentData":{"installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":"Boleto Bancário","paymentGroupName":"bankInvoicePaymentGroup","value":91521,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":91521,"total":91521,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":91521,"total":91521}]}]},{"paymentSystem":"201","bin":null,"paymentName":"Free","paymentGroupName":"custom201PaymentGroupPaymentGroup","value":91521,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":91521,"total":91521,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":91521,"total":91521}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":null,"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"displayDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-06T13:40:36.4175734Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":null,"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"displayDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-06T13:40:36.4175734Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"selectableGifts":[],"marketingData":null,"postalCode":null,"country":null,"logisticsInfo":[{"itemIndex":0,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":1,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":2,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":3,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]},{"itemIndex":4,"addressId":null,"selectedSla":null,"selectedDeliveryChannel":null,"quantity":1,"shipsTo":["BRA","USA"],"slas":[],"deliveryChannels":[{"id":"delivery"}]}],"messages":[],"purchaseConditions":{"itemPurchaseConditions":[{"id":"2791588","seller":"1","sellerChain":["1"],"slas":[],"price":12909,"listPrice":18597},{"id":"44903104","seller":"1","sellerChain":["1"],"slas":[],"price":36236,"listPrice":53750},{"id":"96175310","seller":"1","sellerChain":["1"],"slas":[],"price":24701,"listPrice":33921},{"id":"12405783","seller":"1","sellerChain":["1"],"slas":[],"price":137,"listPrice":201},{"id":"24041857","seller":"1","sellerChain":["1"],"slas":[],"price":17538,"listPrice":24914}]},"pickupPoints":[],"subscriptionData":null,"totals":[{"id":"Items","name":"Items Total","value":91521}],"itemMetadata":null}' + ), +} diff --git a/packages/api/mocks/ValidateCartMutation.ts b/packages/api/mocks/ValidateCartMutation.ts index 9f985a341f..b46ab3b8d7 100644 --- a/packages/api/mocks/ValidateCartMutation.ts +++ b/packages/api/mocks/ValidateCartMutation.ts @@ -281,3 +281,62 @@ export const InvalidCart = { ], }, } + +// Valid Cart + +export const checkoutOrderFormValidFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?refreshOutdatedData=true&sc=1', + init: { method: 'POST', headers: { 'content-type': 'application/json' } }, + result: JSON.parse( + '{"orderFormId":"edbe3b03c8c94827a37ec5a6a4648fd2","salesChannel":"1","loggedIn":false,"isCheckedIn":false,"storeId":null,"checkedInPickupPointId":null,"allowManualPrice":false,"canEditData":true,"userProfileId":null,"userType":null,"ignoreProfileData":false,"value":69824,"messages":[],"items":[{"uniqueId":"90276D2ADB274F12B61A4ADE11874A0A","id":"2737806","productId":"43559243","productRefId":"6327601885574","refId":"6464716212392","ean":null,"name":"Fantastic Soft Cheese plum","skuName":"plum","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:50:01Z","tax":0,"price":34912,"listPrice":55757,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":34912,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Acer","brandId":"2000002","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9285/9294/","productCategories":{"9285":"Kitchen and Home Appliances","9294":"Appliances"},"quantity":2,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/168396-55-55/nihil.jpg?v=637753027573130000","detailUrl":"/fantastic-soft-cheese/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":34912,"total":69824,"sellingPrices":[{"value":34912,"quantity":2}]}}],"selectableGifts":[],"totalizers":[{"id":"Items","name":"Items Total","value":69824}],"shippingData":{"address":null,"logisticsInfo":[{"itemIndex":0,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"2737806","deliveryChannels":[{"id":"delivery"}]}],"selectedAddresses":[],"availableAddresses":[],"pickupPoints":[]},"clientProfileData":null,"paymentData":{"updateStatus":"updated","installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":null,"paymentGroupName":null,"value":69824,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824}]}]},{"paymentSystem":"201","bin":null,"paymentName":null,"paymentGroupName":null,"value":69824,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T14:40:00.2598674Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T14:40:00.2598674Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"marketingData":null,"sellers":[{"id":"1","name":"VTEX","logo":""}],"clientPreferencesData":{"locale":"en-US","optinNewsLetter":null},"commercialConditionData":null,"storePreferencesData":{"countryCode":"USA","saveUserData":true,"timeZone":"Central Standard Time","currencyCode":"USD","currencyLocale":1033,"currencySymbol":"$","currencyFormatInfo":{"currencyDecimalDigits":2,"currencyDecimalSeparator":".","currencyGroupSeparator":",","currencyGroupSize":3,"startsWithCurrencySymbol":true}},"giftRegistryData":null,"openTextField":null,"invoiceData":null,"customData":null,"itemMetadata":{"items":[{"id":"2737806","seller":"1","name":"Fantastic Soft Cheese plum","skuName":"plum","productId":"43559243","refId":"6464716212392","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/168396-55-55/nihil.jpg?v=637753027573130000","detailUrl":"/fantastic-soft-cheese/p","assemblyOptions":[]}]},"hooksData":null,"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"subscriptionData":null,"itemsOrdination":null}' + ), +} + +export const checkoutOrderFormItemsValidFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2/items?allowOutdatedData=paymentData&sc=1', + init: { + method: 'PATCH', + headers: { 'content-type': 'application/json' }, + body: `{"orderItems":[{"quantity":1,"seller":"1","id":"18643698"},{"quantity":1,"seller":"1","id":"97907082"},{"quantity":1,"seller":"1","id":"64953394"},{"quantity":1,"seller":"1","id":"85095548"},{"quantity":1,"seller":"1","id":"1191988"},{"quantity":0,"seller":"1","id":"2737806","index":0}]}`, + }, + + result: JSON.parse( + '{"orderFormId":"edbe3b03c8c94827a37ec5a6a4648fd2","salesChannel":"1","loggedIn":false,"isCheckedIn":false,"storeId":null,"checkedInPickupPointId":null,"allowManualPrice":false,"canEditData":true,"userProfileId":null,"userType":null,"ignoreProfileData":false,"value":203006,"messages":[],"items":[{"uniqueId":"A7E3AD875A0543F4BF52BA9F70CE34FE","id":"18643698","productId":"55127871","productRefId":"1056559252082","refId":"0969910297117","ean":null,"name":"Tasty Granite Towels Tasty silver","skuName":"silver","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:51:11Z","tax":0,"price":4424,"listPrice":6914,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":4424,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Nike","brandId":"2000006","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/182417-55-55/aut.jpg?v=637755531474870000","detailUrl":"/tasty-granite-towels-tasty/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":4424,"total":4424,"sellingPrices":[{"value":4424,"quantity":1}]}},{"uniqueId":"612DEBE9BC834445A33D60F5BAF40AB3","id":"97907082","productId":"42751008","productRefId":"8528464810736","refId":"4454274563902","ean":null,"name":"Licensed Frozen Sausages ivory","skuName":"ivory","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:47:55Z","tax":0,"price":53154,"listPrice":76406,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":53154,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"iRobot","brandId":"2000003","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/166870-55-55/sit.jpg?v=637753013266530000","detailUrl":"/licensed-frozen-sausages/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":53154,"total":53154,"sellingPrices":[{"value":53154,"quantity":1}]}},{"uniqueId":"BF69B3E6BD724181B716350A53BCF4D0","id":"64953394","productId":"29913569","productRefId":"4715709796003","refId":"1346198062637","ean":null,"name":"Unbranded Concrete Table Small fuchsia","skuName":"fuchsia","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:47:55Z","tax":0,"price":20064,"listPrice":29770,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":20064,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/186495-55-55/corporis.jpg?v=637755567185370000","detailUrl":"/unbranded-concrete-table-small/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":20064,"total":20064,"sellingPrices":[{"value":20064,"quantity":1}]}},{"uniqueId":"412B5DD9B47A4986848C55FB8CACBBD7","id":"85095548","productId":"32789477","productRefId":"4785818703589","refId":"8718443313149","ean":null,"name":"Small Concrete Tuna Incredible lime","skuName":"lime","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:47:55Z","tax":0,"price":65086,"listPrice":96830,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":65086,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9296/","productCategories":{"9282":"Office","9296":"Chairs"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/178893-55-55/nam.jpg?v=637755498809500000","detailUrl":"/small-concrete-tuna-incredible/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":65086,"total":65086,"sellingPrices":[{"value":65086,"quantity":1}]}},{"uniqueId":"87392CF7DC3F40B9BBD3750F532D78FC","id":"1191988","productId":"84484858","productRefId":"8905160026336","refId":"5987012953010","ean":null,"name":"Fantastic Soft Bacon fuchsia","skuName":"fuchsia","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:47:55Z","tax":0,"price":60278,"listPrice":83497,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":60278,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9286/9292/","productCategories":{"9286":"Computer and Software","9292":"Gadgets"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/177382-55-55/assumenda.jpg?v=637753139967300000","detailUrl":"/fantastic-soft-bacon/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":60278,"total":60278,"sellingPrices":[{"value":60278,"quantity":1}]}}],"selectableGifts":[],"totalizers":[{"id":"Items","name":"Items Total","value":203006}],"shippingData":{"address":null,"logisticsInfo":[{"itemIndex":0,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"18643698","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":1,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"97907082","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":2,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"64953394","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":3,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"85095548","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":4,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"1191988","deliveryChannels":[{"id":"delivery"}]}],"selectedAddresses":[],"availableAddresses":[],"pickupPoints":[]},"clientProfileData":null,"paymentData":{"updateStatus":"updated","installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":null,"paymentGroupName":null,"value":203006,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006}]}]},{"paymentSystem":"201","bin":null,"paymentName":null,"paymentGroupName":null,"value":203006,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T14:40:00.2598674Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T14:40:00.2598674Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"marketingData":null,"sellers":[{"id":"1","name":"VTEX","logo":""}],"clientPreferencesData":{"locale":"en-US","optinNewsLetter":null},"commercialConditionData":null,"storePreferencesData":{"countryCode":"USA","saveUserData":true,"timeZone":"Central Standard Time","currencyCode":"USD","currencyLocale":1033,"currencySymbol":"$","currencyFormatInfo":{"currencyDecimalDigits":2,"currencyDecimalSeparator":".","currencyGroupSeparator":",","currencyGroupSize":3,"startsWithCurrencySymbol":true}},"giftRegistryData":null,"openTextField":null,"invoiceData":null,"customData":null,"itemMetadata":{"items":[{"id":"18643698","seller":"1","name":"Tasty Granite Towels Tasty silver","skuName":"silver","productId":"55127871","refId":"0969910297117","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/182417-55-55/aut.jpg?v=637755531474870000","detailUrl":"/tasty-granite-towels-tasty/p","assemblyOptions":[]},{"id":"97907082","seller":"1","name":"Licensed Frozen Sausages ivory","skuName":"ivory","productId":"42751008","refId":"4454274563902","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/166870-55-55/sit.jpg?v=637753013266530000","detailUrl":"/licensed-frozen-sausages/p","assemblyOptions":[]},{"id":"64953394","seller":"1","name":"Unbranded Concrete Table Small fuchsia","skuName":"fuchsia","productId":"29913569","refId":"1346198062637","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/186495-55-55/corporis.jpg?v=637755567185370000","detailUrl":"/unbranded-concrete-table-small/p","assemblyOptions":[]},{"id":"85095548","seller":"1","name":"Small Concrete Tuna Incredible lime","skuName":"lime","productId":"32789477","refId":"8718443313149","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/178893-55-55/nam.jpg?v=637755498809500000","detailUrl":"/small-concrete-tuna-incredible/p","assemblyOptions":[]},{"id":"1191988","seller":"1","name":"Fantastic Soft Bacon fuchsia","skuName":"fuchsia","productId":"84484858","refId":"5987012953010","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/177382-55-55/assumenda.jpg?v=637753139967300000","detailUrl":"/fantastic-soft-bacon/p","assemblyOptions":[]}]},"hooksData":null,"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"subscriptionData":null,"itemsOrdination":null}' + ), +} + +// "Invalid" Cart + +export const checkoutOrderFormInvalidFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2?refreshOutdatedData=true&sc=1', + init: { method: 'POST', headers: { 'content-type': 'application/json' } }, + result: JSON.parse( + '{"orderFormId":"edbe3b03c8c94827a37ec5a6a4648fd2","salesChannel":"1","loggedIn":false,"isCheckedIn":false,"storeId":null,"checkedInPickupPointId":null,"allowManualPrice":false,"canEditData":true,"userProfileId":null,"userType":null,"ignoreProfileData":false,"value":203006,"messages":[],"items":[{"uniqueId":"A2A029701A484D8480687A3732DDA744","id":"18643698","productId":"55127871","productRefId":"1056559252082","refId":"0969910297117","ean":null,"name":"Tasty Granite Towels Tasty silver","skuName":"silver","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:31:38Z","tax":0,"price":4424,"listPrice":6914,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":4424,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Nike","brandId":"2000006","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/182417-55-55/aut.jpg?v=637755531474870000","detailUrl":"/tasty-granite-towels-tasty/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":4424,"total":4424,"sellingPrices":[{"value":4424,"quantity":1}]}},{"uniqueId":"8C8B1F4BC8FC43A1A434DB0C46806703","id":"97907082","productId":"42751008","productRefId":"8528464810736","refId":"4454274563902","ean":null,"name":"Licensed Frozen Sausages ivory","skuName":"ivory","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:30:03Z","tax":0,"price":53154,"listPrice":76406,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":53154,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"iRobot","brandId":"2000003","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/166870-55-55/sit.jpg?v=637753013266530000","detailUrl":"/licensed-frozen-sausages/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":53154,"total":53154,"sellingPrices":[{"value":53154,"quantity":1}]}},{"uniqueId":"59A65B645EDF4F55AF5C8235716D52B7","id":"64953394","productId":"29913569","productRefId":"4715709796003","refId":"1346198062637","ean":null,"name":"Unbranded Concrete Table Small fuchsia","skuName":"fuchsia","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:30:58Z","tax":0,"price":20064,"listPrice":29770,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":20064,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9295/","productCategories":{"9282":"Office","9295":"Desks"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/186495-55-55/corporis.jpg?v=637755567185370000","detailUrl":"/unbranded-concrete-table-small/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":20064,"total":20064,"sellingPrices":[{"value":20064,"quantity":1}]}},{"uniqueId":"3168E6B8923045EF8E8091009A63EED9","id":"85095548","productId":"32789477","productRefId":"4785818703589","refId":"8718443313149","ean":null,"name":"Small Concrete Tuna Incredible lime","skuName":"lime","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:30:58Z","tax":0,"price":65086,"listPrice":96830,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":65086,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9282/9296/","productCategories":{"9282":"Office","9296":"Chairs"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/178893-55-55/nam.jpg?v=637755498809500000","detailUrl":"/small-concrete-tuna-incredible/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":65086,"total":65086,"sellingPrices":[{"value":65086,"quantity":1}]}},{"uniqueId":"0BF31D8C4CBA42C1A55FAE6BBB83476C","id":"1191988","productId":"84484858","productRefId":"8905160026336","refId":"5987012953010","ean":null,"name":"Fantastic Soft Bacon fuchsia","skuName":"fuchsia","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:30:58Z","tax":0,"price":60278,"listPrice":83497,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":60278,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Brand","brandId":"9280","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9286/9292/","productCategories":{"9286":"Computer and Software","9292":"Gadgets"},"quantity":1,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/177382-55-55/assumenda.jpg?v=637753139967300000","detailUrl":"/fantastic-soft-bacon/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":60278,"total":60278,"sellingPrices":[{"value":60278,"quantity":1}]}}],"selectableGifts":[],"totalizers":[{"id":"Items","name":"Items Total","value":203006}],"shippingData":{"address":null,"logisticsInfo":[{"itemIndex":0,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"18643698","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":1,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"97907082","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":2,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"64953394","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":3,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"85095548","deliveryChannels":[{"id":"delivery"}]},{"itemIndex":4,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"1191988","deliveryChannels":[{"id":"delivery"}]}],"selectedAddresses":[],"availableAddresses":[],"pickupPoints":[]},"clientProfileData":null,"paymentData":{"updateStatus":"updated","installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":null,"paymentGroupName":null,"value":203006,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006}]}]},{"paymentSystem":"201","bin":null,"paymentName":null,"paymentGroupName":null,"value":203006,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":203006,"total":203006}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T14:18:23.1569301Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T14:18:23.1569301Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"marketingData":null,"sellers":[{"id":"1","name":"VTEX","logo":""}],"clientPreferencesData":{"locale":"en-US","optinNewsLetter":null},"commercialConditionData":null,"storePreferencesData":{"countryCode":"USA","saveUserData":true,"timeZone":"Central Standard Time","currencyCode":"USD","currencyLocale":1033,"currencySymbol":"$","currencyFormatInfo":{"currencyDecimalDigits":2,"currencyDecimalSeparator":".","currencyGroupSeparator":",","currencyGroupSize":3,"startsWithCurrencySymbol":true}},"giftRegistryData":null,"openTextField":null,"invoiceData":null,"customData":null,"itemMetadata":{"items":[{"id":"18643698","seller":"1","name":"Tasty Granite Towels Tasty silver","skuName":"silver","productId":"55127871","refId":"0969910297117","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/182417-55-55/aut.jpg?v=637755531474870000","detailUrl":"/tasty-granite-towels-tasty/p","assemblyOptions":[]},{"id":"97907082","seller":"1","name":"Licensed Frozen Sausages ivory","skuName":"ivory","productId":"42751008","refId":"4454274563902","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/166870-55-55/sit.jpg?v=637753013266530000","detailUrl":"/licensed-frozen-sausages/p","assemblyOptions":[]},{"id":"64953394","seller":"1","name":"Unbranded Concrete Table Small fuchsia","skuName":"fuchsia","productId":"29913569","refId":"1346198062637","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/186495-55-55/corporis.jpg?v=637755567185370000","detailUrl":"/unbranded-concrete-table-small/p","assemblyOptions":[]},{"id":"85095548","seller":"1","name":"Small Concrete Tuna Incredible lime","skuName":"lime","productId":"32789477","refId":"8718443313149","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/178893-55-55/nam.jpg?v=637755498809500000","detailUrl":"/small-concrete-tuna-incredible/p","assemblyOptions":[]},{"id":"1191988","seller":"1","name":"Fantastic Soft Bacon fuchsia","skuName":"fuchsia","productId":"84484858","refId":"5987012953010","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/177382-55-55/assumenda.jpg?v=637753139967300000","detailUrl":"/fantastic-soft-bacon/p","assemblyOptions":[]}]},"hooksData":null,"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"subscriptionData":null,"itemsOrdination":null}' + ), +} + +export const checkoutOrderFormItemsInvalidFetch = { + info: + 'https://storeframework.vtexcommercestable.com.br/api/checkout/pub/orderForm/edbe3b03c8c94827a37ec5a6a4648fd2/items?allowOutdatedData=paymentData&sc=1', + init: { + method: 'PATCH', + headers: { 'content-type': 'application/json' }, + body: + '{"orderItems":[{"quantity":1,"seller":"1","id":"18643698","index":0},{"quantity":1,"seller":"1","id":"97907082","index":1},{"quantity":1,"seller":"1","id":"64953394","index":2},{"quantity":1,"seller":"1","id":"85095548","index":3},{"quantity":1,"seller":"1","id":"1191988","index":4}]}', + }, + result: JSON.parse( + '{"orderFormId":"edbe3b03c8c94827a37ec5a6a4648fd2","salesChannel":"1","loggedIn":false,"isCheckedIn":false,"storeId":null,"checkedInPickupPointId":null,"allowManualPrice":false,"canEditData":true,"userProfileId":null,"userType":null,"ignoreProfileData":false,"value":69824,"messages":[],"items":[{"uniqueId":"90276D2ADB274F12B61A4ADE11874A0A","id":"2737806","productId":"43559243","productRefId":"6327601885574","refId":"6464716212392","ean":null,"name":"Fantastic Soft Cheese plum","skuName":"plum","modalType":null,"parentItemIndex":null,"parentAssemblyBinding":null,"assemblies":[],"priceValidUntil":"2023-03-29T14:32:10Z","tax":0,"price":34912,"listPrice":55757,"manualPrice":null,"manualPriceAppliedBy":null,"sellingPrice":34912,"rewardValue":0,"isGift":false,"additionalInfo":{"dimension":null,"brandName":"Acer","brandId":"2000002","offeringInfo":null,"offeringType":null,"offeringTypeId":null},"preSaleDate":null,"productCategoryIds":"/9285/9294/","productCategories":{"9285":"Kitchen and Home Appliances","9294":"Appliances"},"quantity":2,"seller":"1","sellerChain":["1"],"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/168396-55-55/nihil.jpg?v=637753027573130000","detailUrl":"/fantastic-soft-cheese/p","components":[],"bundleItems":[],"attachments":[],"attachmentOfferings":[],"offerings":[],"priceTags":[],"availability":"available","measurementUnit":"un","unitMultiplier":1,"manufacturerCode":null,"priceDefinition":{"calculatedSellingPrice":34912,"total":69824,"sellingPrices":[{"value":34912,"quantity":2}]}}],"selectableGifts":[],"totalizers":[{"id":"Items","name":"Items Total","value":69824}],"shippingData":{"address":null,"logisticsInfo":[{"itemIndex":0,"selectedSla":null,"selectedDeliveryChannel":null,"addressId":null,"slas":[],"shipsTo":["BRA","USA"],"itemId":"2737806","deliveryChannels":[{"id":"delivery"}]}],"selectedAddresses":[],"availableAddresses":[],"pickupPoints":[]},"clientProfileData":null,"paymentData":{"updateStatus":"updated","installmentOptions":[{"paymentSystem":"6","bin":null,"paymentName":null,"paymentGroupName":null,"value":69824,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824}]}]},{"paymentSystem":"201","bin":null,"paymentName":null,"paymentGroupName":null,"value":69824,"installments":[{"count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824,"sellerMerchantInstallments":[{"id":"STOREFRAMEWORK","count":1,"hasInterestRate":false,"interestRate":0,"value":69824,"total":69824}]}]}],"paymentSystems":[{"id":6,"name":"Boleto Bancário","groupName":"bankInvoicePaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"6","template":"bankInvoicePaymentGroup-template","requiresDocument":false,"isCustom":false,"description":null,"requiresAuthentication":false,"dueDate":"2022-04-05T14:18:23.1569301Z","availablePayments":null},{"id":201,"name":"Free","groupName":"custom201PaymentGroupPaymentGroup","validator":{"regex":null,"mask":null,"cardCodeRegex":null,"cardCodeMask":null,"weights":null,"useCvv":false,"useExpirationDate":false,"useCardHolderName":false,"useBillingAddress":false},"stringId":"201","template":"custom201PaymentGroupPaymentGroup-template","requiresDocument":false,"isCustom":true,"description":"Free pay to test checkout payments","requiresAuthentication":false,"dueDate":"2022-04-05T14:18:23.1569301Z","availablePayments":null}],"payments":[],"giftCards":[],"giftCardMessages":[],"availableAccounts":[],"availableTokens":[],"availableAssociations":{}},"marketingData":null,"sellers":[{"id":"1","name":"VTEX","logo":""}],"clientPreferencesData":{"locale":"en-US","optinNewsLetter":null},"commercialConditionData":null,"storePreferencesData":{"countryCode":"USA","saveUserData":true,"timeZone":"Central Standard Time","currencyCode":"USD","currencyLocale":1033,"currencySymbol":"$","currencyFormatInfo":{"currencyDecimalDigits":2,"currencyDecimalSeparator":".","currencyGroupSeparator":",","currencyGroupSize":3,"startsWithCurrencySymbol":true}},"giftRegistryData":null,"openTextField":null,"invoiceData":null,"customData":null,"itemMetadata":{"items":[{"id":"2737806","seller":"1","name":"Fantastic Soft Cheese plum","skuName":"plum","productId":"43559243","refId":"6464716212392","ean":null,"imageUrl":"http://storeframework.vteximg.com.br/arquivos/ids/168396-55-55/nihil.jpg?v=637753027573130000","detailUrl":"/fantastic-soft-cheese/p","assemblyOptions":[]}]},"hooksData":null,"ratesAndBenefitsData":{"rateAndBenefitsIdentifiers":[],"teaser":[]},"subscriptionData":null,"itemsOrdination":null}' + ), +} + +export const productSearchPage1Count1Fetch = { + info: + 'http://portal.vtexcommercestable.com.br/search-api/v1/storeframework/api/split/product_search/trade-policy/1?page=1&count=1&query=sku%3A2737806&sort=&fuzzy=0&hide-unavailable-items=false', + init: undefined, + result: JSON.parse( + '{"total":1,"products":[{"unitMultiplier":1,"year":0,"extraData":[{"value":"1","key":"sellerId"}],"release":1638576000000,"discount":37,"reference":"6327601885574","collections":[],"price":349.12,"customSort":0,"stickers":[],"id":"43559243","stock":1,"brand":"Acer","availableTradePolicies":["1"],"categoryTrees":[{"categoryNames":["Kitchen and Home Appliances","Appliances"],"categoryIds":["9285","9294"]},{"categoryNames":["Kitchen and Home Appliances"],"categoryIds":["9285"]}],"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/168396/nihil.jpg?v=637753027573130000"},{"name":"similique","value":"http://storeframework.vteximg.com.br/arquivos/ids/168393/dolore.jpg?v=637753027558270000"},{"name":"deleniti","value":"http://storeframework.vteximg.com.br/arquivos/ids/168394/delectus.jpg?v=637753027564530000"},{"name":"sunt","value":"http://storeframework.vteximg.com.br/arquivos/ids/168395/qui.jpg?v=637753027568900000"}],"locationAttributes":[],"tax":0,"productScore":1,"storeSplitAttribute":"__PLACEHOLDER__","brandId":"2000002","installment":{"interest":false,"count":1,"paymentGroupName":"bankInvoicePaymentGroup","value":349.12,"paymentName":"Boleto Bancário","valueText":"$349.12"},"name":"Fantastic Soft Cheese","boost":{"newness":0.7111111111111111,"image":1,"revenue":1,"discount":1,"productScore":0,"click":1,"availableSpecsCount":1,"promotion":0,"order":1},"spotPrice":349.12,"skus":[{"images":[{"name":"et","value":"http://storeframework.vteximg.com.br/arquivos/ids/168396/nihil.jpg?v=637753027573130000"},{"name":"similique","value":"http://storeframework.vteximg.com.br/arquivos/ids/168393/dolore.jpg?v=637753027558270000"},{"name":"deleniti","value":"http://storeframework.vteximg.com.br/arquivos/ids/168394/delectus.jpg?v=637753027564530000"},{"name":"sunt","value":"http://storeframework.vteximg.com.br/arquivos/ids/168395/qui.jpg?v=637753027568900000"}],"nameComplete":"Fantastic Soft Cheese plum","complementName":"Explicabo et quibusdam eius excepturi et rem dolorem et. Eligendi ratione et quod error nisi asperiores fugit omnis itaque. Vel officia sapiente autem non. Ut consequatur veniam perspiciatis doloribus nulla saepe.","policies":[{"id":"1","sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"videos":[],"reference":"6464716212392","idWithSplit":"2737806","name":"plum","attributes":[],"id":"2737806","stock":1,"sellers":[{"default":true,"name":"VTEX","tax":0,"teasers":[],"id":"1"}]}],"link":"fantastic-soft-cheese","wear":0,"description":"Iure eum pariatur provident dolorem et.","aclBlockList":[],"showIfNotAvailable":true,"clusterHighlights":{},"categories":["Kitchen and Home Appliances","Appliances"],"timestamp":1640818293024,"product":"43559243","oldPrice":557.57,"productSpecifications":[],"url":"/fantastic-soft-cheese/p","measurementUnit":"un","categoryIds":["9285","9294"],"textAttributes":[{"joinedValue":"acer@@@Acer@@@@@@acer@@@Acer","isSku":false,"joinedKey":"text@@@brand@@@Brand@@@brand@@@Brand","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Acer","id":["2000002"],"labelKey":"Brand","value":"acer","key":"brand","joinedValueTranslations":{},"originalKey":"brand","originalValue":"acer","originalLabelKey":"Brand","originalLabelValue":"Acer"},{"valueId":"9285","joinedValue":"kitchen-and-home-appliances@@@Kitchen and Home Appliances@@@9285@@@kitchen-and-home-appliances@@@Kitchen and Home Appliances","isSku":false,"joinedKey":"text@@@category-1@@@Category 1@@@category-1@@@Category 1","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Kitchen and Home Appliances","id":[],"labelKey":"Category 1","value":"kitchen-and-home-appliances","key":"category-1","joinedValueTranslations":{},"originalKey":"category-1","originalValue":"kitchen-and-home-appliances","originalLabelKey":"Category 1","originalLabelValue":"Kitchen and Home Appliances"},{"valueId":"9294","joinedValue":"appliances@@@Appliances@@@9294@@@appliances@@@Appliances","isSku":false,"joinedKey":"text@@@category-2@@@Category 2@@@category-2@@@Category 2","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Appliances","id":[],"labelKey":"Category 2","value":"appliances","key":"category-2","joinedValueTranslations":{},"originalKey":"category-2","originalValue":"appliances","originalLabelKey":"Category 2","originalLabelValue":"Appliances"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@new-release@@@New Release@@@new-release@@@New Release","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"New Release","value":"yes","key":"new-release","joinedValueTranslations":{},"originalKey":"new-release","originalValue":"yes","originalLabelKey":"New Release","originalLabelValue":"Yes"},{"joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusterids@@@productClusterIds@@@productclusterids@@@productClusterIds","joinedKeyTranslations":{},"isFilter":false,"labelValue":"","id":[],"labelKey":"productClusterIds","value":"","key":"productclusterids","joinedValueTranslations":{},"originalKey":"productclusterids","originalValue":"","originalLabelKey":"productClusterIds","originalLabelValue":""},{"valueId":"","joinedValue":"@@@@@@@@@@@@","isSku":false,"joinedKey":"text@@@productclusternames@@@productClusterNames@@@productclusternames@@@productClusterNames","joinedKeyTranslations":{},"isFilter":true,"labelValue":"","id":[],"labelKey":"productClusterNames","value":"","key":"productclusternames","joinedValueTranslations":{},"originalKey":"productclusternames","originalValue":"","originalLabelKey":"productClusterNames","originalLabelValue":""},{"joinedValue":"false@@@false@@@@@@false@@@false","isSku":false,"joinedKey":"text@@@subscription@@@subscription@@@subscription@@@subscription","joinedKeyTranslations":{},"isFilter":false,"labelValue":"false","id":[],"labelKey":"subscription","value":"false","key":"subscription","joinedValueTranslations":{},"originalKey":"subscription","originalValue":"false","originalLabelKey":"subscription","originalLabelValue":"false"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@trade-policy@@@Trade Policy@@@trade-policy@@@Trade Policy","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Trade Policy","value":"1","key":"trade-policy","joinedValueTranslations":{},"originalKey":"trade-policy","originalValue":"1","originalLabelKey":"Trade Policy","originalLabelValue":"1"},{"joinedValue":"1@@@1@@@@@@1@@@1","isSku":false,"joinedKey":"text@@@seller@@@Seller@@@seller@@@Seller","joinedKeyTranslations":{},"isFilter":false,"labelValue":"1","id":[],"labelKey":"Seller","value":"1","key":"seller","joinedValueTranslations":{},"originalKey":"seller","originalValue":"1","originalLabelKey":"Seller","originalLabelValue":"1"},{"valueId":"1","joinedValue":"vtex@@@VTEX@@@1@@@vtex@@@VTEX","isSku":false,"joinedKey":"text@@@sellername@@@sellerName@@@sellername@@@sellerName","joinedKeyTranslations":{},"isFilter":true,"labelValue":"VTEX","id":[],"labelKey":"sellerName","value":"vtex","key":"sellername","joinedValueTranslations":{},"originalKey":"sellername","originalValue":"vtex","originalLabelKey":"sellerName","originalLabelValue":"VTEX"},{"joinedValue":"yes@@@Yes@@@@@@yes@@@Yes","isSku":false,"joinedKey":"text@@@promotion@@@Promotion@@@promotion@@@Promotion","joinedKeyTranslations":{},"isFilter":true,"labelValue":"Yes","id":[],"labelKey":"Promotion","value":"yes","key":"promotion","joinedValueTranslations":{},"originalKey":"promotion","originalValue":"yes","originalLabelKey":"Promotion","originalLabelValue":"Yes"}],"numberAttributes":[{"labelKey":"Price","value":349.12,"key":"price"}],"headSku":"2737806","specificationGroups":"{}","extraInfo":{"sellerId":"1"},"oldPriceText":"$557.57","priceText":"$349.12","spotPriceText":"$349.12"}],"pagination":{"count":1,"current":{"index":1,"proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=&fuzzy=0&operator=and"},"before":[],"after":[],"perPage":1,"next":{"index":0},"previous":{"index":0},"first":{"index":0},"last":{"index":0}},"sampling":false,"options":{"sorts":[{"field":"relevance","order":"desc","active":true,"proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=relevance:desc&fuzzy=0&operator=and"},{"field":"orders","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=orders:desc&fuzzy=0&operator=and"},{"field":"discount","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=discount:desc&fuzzy=0&operator=and"},{"field":"price","order":"asc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=price:asc&fuzzy=0&operator=and"},{"field":"price","order":"desc","proxyUrl":"search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=price:desc&fuzzy=0&operator=and"}],"counts":[{"count":24,"proxyUrl":"search/trade-policy/1?page=1&count=24&query=sku:2737806&sort=&fuzzy=0&operator=and"},{"count":48,"proxyUrl":"search/trade-policy/1?page=1&count=48&query=sku:2737806&sort=&fuzzy=0&operator=and"},{"count":72,"proxyUrl":"search/trade-policy/1?page=1&count=72&query=sku:2737806&sort=&fuzzy=0&operator=and"},{"count":96,"proxyUrl":"search/trade-policy/1?page=1&count=96&query=sku:2737806&sort=&fuzzy=0&operator=and"}]},"translated":false,"locale":"en-US","query":"sku:2737806","operator":"and","fuzzy":"0","correction":{"misspelled":true}}' + ), +} From 12a5d1bf94a1ba20d9ec61c4c80c142220894c4e Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 15:39:13 -0300 Subject: [PATCH 2/7] Update snapshots --- .../test/__snapshots__/mutations.test.ts.snap | 70 +--- .../test/__snapshots__/queries.test.ts.snap | 306 +++++++++--------- 2 files changed, 167 insertions(+), 209 deletions(-) diff --git a/packages/api/test/__snapshots__/mutations.test.ts.snap b/packages/api/test/__snapshots__/mutations.test.ts.snap index f4c04e7193..b6a81a3ced 100644 --- a/packages/api/test/__snapshots__/mutations.test.ts.snap +++ b/packages/api/test/__snapshots__/mutations.test.ts.snap @@ -11,76 +11,16 @@ Object { "availability": "https://schema.org/InStock", "itemCondition": "https://schema.org/NewCondition", "itemOffered": Object { - "name": "silver", + "name": "plum", }, - "listPrice": 69.14, - "price": 44.24, + "listPrice": 557.57, + "price": 349.12, "priceCurrency": "", - "quantity": 1, + "quantity": 2, "seller": Object { "identifier": "1", }, - "sellingPrice": 44.24, - }, - Object { - "availability": "https://schema.org/InStock", - "itemCondition": "https://schema.org/NewCondition", - "itemOffered": Object { - "name": "ivory", - }, - "listPrice": 764.06, - "price": 531.54, - "priceCurrency": "", - "quantity": 1, - "seller": Object { - "identifier": "1", - }, - "sellingPrice": 531.54, - }, - Object { - "availability": "https://schema.org/InStock", - "itemCondition": "https://schema.org/NewCondition", - "itemOffered": Object { - "name": "fuchsia", - }, - "listPrice": 297.7, - "price": 200.64, - "priceCurrency": "", - "quantity": 1, - "seller": Object { - "identifier": "1", - }, - "sellingPrice": 200.64, - }, - Object { - "availability": "https://schema.org/InStock", - "itemCondition": "https://schema.org/NewCondition", - "itemOffered": Object { - "name": "lime", - }, - "listPrice": 968.3, - "price": 650.86, - "priceCurrency": "", - "quantity": 1, - "seller": Object { - "identifier": "1", - }, - "sellingPrice": 650.86, - }, - Object { - "availability": "https://schema.org/InStock", - "itemCondition": "https://schema.org/NewCondition", - "itemOffered": Object { - "name": "fuchsia", - }, - "listPrice": 834.97, - "price": 602.78, - "priceCurrency": "", - "quantity": 1, - "seller": Object { - "identifier": "1", - }, - "sellingPrice": 602.78, + "sellingPrice": 349.12, }, ], "orderNumber": "edbe3b03c8c94827a37ec5a6a4648fd2", diff --git a/packages/api/test/__snapshots__/queries.test.ts.snap b/packages/api/test/__snapshots__/queries.test.ts.snap index 06b2a860df..c96c15632c 100644 --- a/packages/api/test/__snapshots__/queries.test.ts.snap +++ b/packages/api/test/__snapshots__/queries.test.ts.snap @@ -11,8 +11,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/brand", - "name": "Brand", + "item": "/skechers", + "name": "Skechers", "position": 1, }, ], @@ -43,8 +43,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/skechers", - "name": "Skechers", + "item": "/adidas", + "name": "adidas", "position": 1, }, ], @@ -139,8 +139,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/adidas", - "name": "adidas", + "item": "/brand", + "name": "Brand", "position": 1, }, ], @@ -923,45 +923,47 @@ Object { "reviewCount": 0, }, "brand": Object { - "name": "iRobot", + "name": "Skechers", }, - "description": "Sed nostrum est nostrum quo ipsum et ut asperiores quasi.", - "gtin": "4454274563902", + "description": "Consequatur placeat optio adipisci aut voluptate excepturi.", + "gtin": "8463905750603", "image": Array [ Object { - "alternateName": "molestiae", - "url": "http://storeframework.vtexassets.com/arquivos/ids/166870/sit.jpg?v=637753013266530000", + "alternateName": "repellat", + "url": "http://storeframework.vtexassets.com/arquivos/ids/181666/ut.jpg?v=637755525053770000", }, Object { - "alternateName": "occaecati", - "url": "http://storeframework.vtexassets.com/arquivos/ids/166867/ratione.jpg?v=637753013256670000", + "alternateName": "ut", + "url": "http://storeframework.vtexassets.com/arquivos/ids/181664/qui.jpg?v=637755525048170000", }, Object { - "alternateName": "labore", - "url": "http://storeframework.vtexassets.com/arquivos/ids/166868/modi.jpg?v=637753013260600000", - }, - Object { - "alternateName": "qui", - "url": "http://storeframework.vtexassets.com/arquivos/ids/166869/quaerat.jpg?v=637753013263570000", + "alternateName": "omnis", + "url": "http://storeframework.vtexassets.com/arquivos/ids/181665/explicabo.jpg?v=637755525050970000", }, ], "isVariantOf": Object { "additionalProperty": Array [], "hasVariant": Array [ Object { - "name": "ivory", - "productID": "97907082", - "sku": "97907082", - "slug": "licensed-frozen-sausages-97907082", + "name": "green", + "productID": "2791588", + "sku": "2791588", + "slug": "licensed-cotton-hat-licensed-2791588", + }, + Object { + "name": "red", + "productID": "93344885", + "sku": "93344885", + "slug": "licensed-cotton-hat-licensed-93344885", }, ], - "name": "Licensed Frozen Sausages", - "productGroupID": "42751008", + "name": "Licensed Cotton Hat Licensed", + "productGroupID": "6049813", }, - "name": "ivory", + "name": "green", "offers": Object { - "highPrice": 531.54, - "lowPrice": 531.54, + "highPrice": 129.09, + "lowPrice": 129.09, "offerCount": 1, "offers": Array [ Object { @@ -970,26 +972,26 @@ Object { "itemOffered": Object { "seo": Object { "canonical": "", - "description": "Sed nostrum est nostrum quo ipsum et ut asperiores quasi.", - "title": "Licensed Frozen Sausages", + "description": "Consequatur placeat optio adipisci aut voluptate excepturi.", + "title": "Licensed Cotton Hat Licensed", "titleTemplate": "", }, }, - "listPrice": 764.06, - "price": 531.54, + "listPrice": 185.97, + "price": 129.09, "quantity": 1, "seller": Object { "identifier": "1", }, - "sellingPrice": 531.54, + "sellingPrice": 129.09, }, ], "priceCurrency": "", }, - "productID": "97907082", + "productID": "2791588", "review": Array [], - "sku": "97907082", - "slug": "licensed-frozen-sausages-97907082", + "sku": "2791588", + "slug": "licensed-cotton-hat-licensed-2791588", }, }, Object { @@ -1001,45 +1003,39 @@ Object { "reviewCount": 0, }, "brand": Object { - "name": "Brand", + "name": "adidas", }, - "description": "Aut omnis nobis tenetur.", - "gtin": "1346198062637", + "description": "Ipsa in sequi incidunt dolores.", + "gtin": "8169125134781", "image": Array [ Object { - "alternateName": "et", - "url": "http://storeframework.vtexassets.com/arquivos/ids/186495/corporis.jpg?v=637755567185370000", - }, - Object { - "alternateName": "in", - "url": "http://storeframework.vtexassets.com/arquivos/ids/186492/qui.jpg?v=637755567174570000", - }, - Object { - "alternateName": "consectetur", - "url": "http://storeframework.vtexassets.com/arquivos/ids/186493/possimus.jpg?v=637755567178470000", - }, - Object { - "alternateName": "ea", - "url": "http://storeframework.vtexassets.com/arquivos/ids/186494/nihil.jpg?v=637755567181900000", + "alternateName": "impedit", + "url": "http://storeframework.vtexassets.com/arquivos/ids/184304/a.jpg?v=637755547736000000", }, ], "isVariantOf": Object { "additionalProperty": Array [], "hasVariant": Array [ Object { - "name": "fuchsia", - "productID": "64953394", - "sku": "64953394", - "slug": "unbranded-concrete-table-small-64953394", + "name": "red", + "productID": "44903104", + "sku": "44903104", + "slug": "handmade-granite-computer-unbranded-44903104", + }, + Object { + "name": "magenta", + "productID": "80744096", + "sku": "80744096", + "slug": "handmade-granite-computer-unbranded-80744096", }, ], - "name": "Unbranded Concrete Table Small", - "productGroupID": "29913569", + "name": "Handmade Granite Computer Unbranded", + "productGroupID": "48182547", }, - "name": "fuchsia", + "name": "red", "offers": Object { - "highPrice": 200.64, - "lowPrice": 200.64, + "highPrice": 362.36, + "lowPrice": 362.36, "offerCount": 1, "offers": Array [ Object { @@ -1048,26 +1044,26 @@ Object { "itemOffered": Object { "seo": Object { "canonical": "", - "description": "Aut omnis nobis tenetur.", - "title": "Unbranded Concrete Table Small", + "description": "Ipsa in sequi incidunt dolores.", + "title": "Handmade Granite Computer Unbranded", "titleTemplate": "", }, }, - "listPrice": 297.7, - "price": 200.64, + "listPrice": 537.5, + "price": 362.36, "quantity": 1, "seller": Object { "identifier": "1", }, - "sellingPrice": 200.64, + "sellingPrice": 362.36, }, ], "priceCurrency": "", }, - "productID": "64953394", + "productID": "44903104", "review": Array [], - "sku": "64953394", - "slug": "unbranded-concrete-table-small-64953394", + "sku": "44903104", + "slug": "handmade-granite-computer-unbranded-44903104", }, }, Object { @@ -1079,37 +1075,53 @@ Object { "reviewCount": 0, }, "brand": Object { - "name": "Brand", + "name": "Acer", }, - "description": "Aliquam rerum dignissimos ex soluta est cumque.", - "gtin": "8718443313149", + "description": "Dolor harum perferendis voluptatem tempora voluptatum ut et sapiente iure.", + "gtin": "8277738323492", "image": Array [ Object { - "alternateName": "itaque", - "url": "http://storeframework.vtexassets.com/arquivos/ids/178893/nam.jpg?v=637755498809500000", + "alternateName": "debitis", + "url": "http://storeframework.vtexassets.com/arquivos/ids/178292/ea.jpg?v=637755492251130000", + }, + Object { + "alternateName": "et", + "url": "http://storeframework.vtexassets.com/arquivos/ids/178290/voluptatum.jpg?v=637755492245200000", }, Object { - "alternateName": "voluptatem", - "url": "http://storeframework.vtexassets.com/arquivos/ids/178892/quae.jpg?v=637755498804330000", + "alternateName": "itaque", + "url": "http://storeframework.vtexassets.com/arquivos/ids/178291/non.jpg?v=637755492248300000", }, ], "isVariantOf": Object { "additionalProperty": Array [], "hasVariant": Array [ Object { - "name": "lime", - "productID": "85095548", - "sku": "85095548", - "slug": "small-concrete-tuna-incredible-85095548", + "name": "olive", + "productID": "96175310", + "sku": "96175310", + "slug": "small-cotton-cheese-3325400227651-96175310", + }, + Object { + "name": "grey", + "productID": "47744496", + "sku": "47744496", + "slug": "small-cotton-cheese-3325400227651-47744496", + }, + Object { + "name": "indigo", + "productID": "51309679", + "sku": "51309679", + "slug": "small-cotton-cheese-3325400227651-51309679", }, ], - "name": "Small Concrete Tuna Incredible", - "productGroupID": "32789477", + "name": "Small Cotton Cheese", + "productGroupID": "8172115", }, - "name": "lime", + "name": "olive", "offers": Object { - "highPrice": 650.86, - "lowPrice": 650.86, + "highPrice": 247.01, + "lowPrice": 247.01, "offerCount": 1, "offers": Array [ Object { @@ -1118,26 +1130,26 @@ Object { "itemOffered": Object { "seo": Object { "canonical": "", - "description": "Aliquam rerum dignissimos ex soluta est cumque.", - "title": "Small Concrete Tuna Incredible", + "description": "Dolor harum perferendis voluptatem tempora voluptatum ut et sapiente iure.", + "title": "Small Cotton Cheese", "titleTemplate": "", }, }, - "listPrice": 968.3, - "price": 650.86, + "listPrice": 339.21, + "price": 247.01, "quantity": 1, "seller": Object { "identifier": "1", }, - "sellingPrice": 650.86, + "sellingPrice": 247.01, }, ], "priceCurrency": "", }, - "productID": "85095548", + "productID": "96175310", "review": Array [], - "sku": "85095548", - "slug": "small-concrete-tuna-incredible-85095548", + "sku": "96175310", + "slug": "small-cotton-cheese-3325400227651-96175310", }, }, Object { @@ -1149,39 +1161,39 @@ Object { "reviewCount": 0, }, "brand": Object { - "name": "Acer", + "name": "adidas", }, - "description": "In aut dolor perferendis voluptatibus hic dolores.", - "gtin": "8985861454535", + "description": "Recusandae dolores alias.", + "gtin": "6486061707855", "image": Array [ Object { - "alternateName": "labore", - "url": "http://storeframework.vtexassets.com/arquivos/ids/170491/vero.jpg?v=637753049086730000", + "alternateName": "ipsam", + "url": "http://storeframework.vtexassets.com/arquivos/ids/190604/vel.jpg?v=637755602570270000", }, ], "isVariantOf": Object { "additionalProperty": Array [], "hasVariant": Array [ Object { - "name": "sky blue", - "productID": "68237302", - "sku": "68237302", - "slug": "refined-metal-computer-68237302", + "name": "fuchsia", + "productID": "12405783", + "sku": "12405783", + "slug": "tasty-frozen-tuna-handmade-12405783", }, Object { - "name": "cyan", - "productID": "35445133", - "sku": "35445133", - "slug": "refined-metal-computer-35445133", + "name": "azure", + "productID": "68456079", + "sku": "68456079", + "slug": "tasty-frozen-tuna-handmade-68456079", }, ], - "name": "Refined Metal Computer", - "productGroupID": "70710833", + "name": "Tasty Frozen Tuna Handmade", + "productGroupID": "31264637", }, - "name": "sky blue", + "name": "fuchsia", "offers": Object { - "highPrice": 253.07, - "lowPrice": 253.07, + "highPrice": 1.37, + "lowPrice": 1.37, "offerCount": 1, "offers": Array [ Object { @@ -1190,26 +1202,26 @@ Object { "itemOffered": Object { "seo": Object { "canonical": "", - "description": "In aut dolor perferendis voluptatibus hic dolores.", - "title": "Refined Metal Computer", + "description": "Recusandae dolores alias.", + "title": "Tasty Frozen Tuna Handmade", "titleTemplate": "", }, }, - "listPrice": 388.35, - "price": 253.07, + "listPrice": 2.01, + "price": 1.37, "quantity": 1, "seller": Object { "identifier": "1", }, - "sellingPrice": 253.07, + "sellingPrice": 1.37, }, ], "priceCurrency": "", }, - "productID": "68237302", + "productID": "12405783", "review": Array [], - "sku": "68237302", - "slug": "refined-metal-computer-68237302", + "sku": "12405783", + "slug": "tasty-frozen-tuna-handmade-12405783", }, }, Object { @@ -1221,37 +1233,43 @@ Object { "reviewCount": 0, }, "brand": Object { - "name": "Brand", + "name": "Acer", }, - "description": "Cumque eos consequatur recusandae voluptatum vero optio.", - "gtin": "8187289187417", + "description": "Aliquam a cumque ratione voluptatem in.", + "gtin": "2231710663034", "image": Array [ Object { - "alternateName": "debitis", - "url": "http://storeframework.vtexassets.com/arquivos/ids/158554/quasi.jpg?v=637752901714930000", + "alternateName": "ea", + "url": "http://storeframework.vtexassets.com/arquivos/ids/155949/voluptas.jpg?v=637752878341070000", }, Object { - "alternateName": "voluptatem", - "url": "http://storeframework.vtexassets.com/arquivos/ids/158553/qui.jpg?v=637752901712270000", + "alternateName": "dolores", + "url": "http://storeframework.vtexassets.com/arquivos/ids/155948/molestiae.jpg?v=637752878337300000", }, ], "isVariantOf": Object { "additionalProperty": Array [], "hasVariant": Array [ Object { - "name": "salmon", - "productID": "28017861", - "sku": "28017861", - "slug": "incredible-fresh-fish-28017861", + "name": "olive", + "productID": "24041857", + "sku": "24041857", + "slug": "sleek-metal-pizza-24041857", + }, + Object { + "name": "green", + "productID": "94486378", + "sku": "94486378", + "slug": "sleek-metal-pizza-94486378", }, ], - "name": "Incredible Fresh Fish", - "productGroupID": "63474268", + "name": "Sleek Metal Pizza", + "productGroupID": "52016072", }, - "name": "salmon", + "name": "olive", "offers": Object { - "highPrice": 431.48, - "lowPrice": 431.48, + "highPrice": 175.38, + "lowPrice": 175.38, "offerCount": 1, "offers": Array [ Object { @@ -1260,26 +1278,26 @@ Object { "itemOffered": Object { "seo": Object { "canonical": "", - "description": "Cumque eos consequatur recusandae voluptatum vero optio.", - "title": "Incredible Fresh Fish", + "description": "Aliquam a cumque ratione voluptatem in.", + "title": "Sleek Metal Pizza", "titleTemplate": "", }, }, - "listPrice": 659.7, - "price": 431.48, + "listPrice": 249.14, + "price": 175.38, "quantity": 1, "seller": Object { "identifier": "1", }, - "sellingPrice": 431.48, + "sellingPrice": 175.38, }, ], "priceCurrency": "", }, - "productID": "28017861", + "productID": "24041857", "review": Array [], - "sku": "28017861", - "slug": "incredible-fresh-fish-28017861", + "sku": "24041857", + "slug": "sleek-metal-pizza-24041857", }, }, ], From a5b083a3774551436d1f71a50857203d36ae18dd Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 15:41:24 -0300 Subject: [PATCH 3/7] Update tests for `api` mutations to use mocked `fetch` calls --- packages/api/test/mutations.test.ts | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/packages/api/test/mutations.test.ts b/packages/api/test/mutations.test.ts index 8d3dbe8920..de921751ce 100644 --- a/packages/api/test/mutations.test.ts +++ b/packages/api/test/mutations.test.ts @@ -7,6 +7,11 @@ import { ValidateCartMutation, InvalidCart, ValidCart, + checkoutOrderFormItemsValidFetch, + checkoutOrderFormValidFetch, + checkoutOrderFormInvalidFetch, + checkoutOrderFormItemsInvalidFetch, + productSearchPage1Count1Fetch, } from '../mocks/ValidateCartMutation' let schema: GraphQLSchema @@ -20,6 +25,17 @@ const apiOptions = { hideUnavailableItems: false, } as Options +const mockedFetch = jest.fn((..._) => + // eslint-disable-next-line no-console + console.log( + 'fetch was called without a mocked implementation.\nThis could be caused by an extra fetch call being fired when a certain mutation was executed.' + ) +) + +jest.mock('../src/platforms/vtex/clients/fetch.ts', () => ({ + fetchAPI: (info: any, init?: any) => mockedFetch(info, init), +})) + beforeAll(async () => { schema = await getSchema(apiOptions) @@ -28,7 +44,13 @@ beforeAll(async () => { context = contextFactory({}) }) +beforeEach(() => mockedFetch.mockClear()) + test('`validateCart` mutation should return `null` when a valid cart is passed', async () => { + mockedFetch + .mockImplementationOnce(() => checkoutOrderFormValidFetch.result) + .mockImplementationOnce(() => checkoutOrderFormItemsValidFetch.result) + const response = await execute( schema, parse(ValidateCartMutation), @@ -37,10 +59,25 @@ test('`validateCart` mutation should return `null` when a valid cart is passed', { cart: ValidCart } ) + expect(mockedFetch).toHaveBeenCalledTimes(2) + expect(mockedFetch).toHaveBeenCalledWith( + checkoutOrderFormValidFetch.info, + checkoutOrderFormValidFetch.init + ) + expect(mockedFetch).toHaveBeenCalledWith( + checkoutOrderFormItemsValidFetch.info, + checkoutOrderFormItemsValidFetch.init + ) + expect(response).toEqual({ data: { validateCart: null } }) }) test('`validateCart` mutation should return the full order when an invalid cart is passed', async () => { + mockedFetch + .mockImplementationOnce(() => checkoutOrderFormInvalidFetch.result) + .mockImplementationOnce(() => checkoutOrderFormItemsInvalidFetch.result) + .mockImplementationOnce(() => productSearchPage1Count1Fetch.result) + const response = await execute( schema, parse(ValidateCartMutation), @@ -49,5 +86,19 @@ test('`validateCart` mutation should return the full order when an invalid cart { cart: InvalidCart } ) + expect(mockedFetch).toHaveBeenCalledTimes(3) + expect(mockedFetch).toHaveBeenCalledWith( + checkoutOrderFormInvalidFetch.info, + checkoutOrderFormInvalidFetch.init + ) + expect(mockedFetch).toHaveBeenCalledWith( + checkoutOrderFormItemsInvalidFetch.info, + checkoutOrderFormItemsInvalidFetch.init + ) + expect(mockedFetch).toHaveBeenCalledWith( + productSearchPage1Count1Fetch.info, + productSearchPage1Count1Fetch.init + ) + expect(response).toMatchSnapshot() }) From b449f1012f78b3826695e06f0dc8529795476146 Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 16:30:40 -0300 Subject: [PATCH 4/7] Update snapshots --- packages/api/test/__snapshots__/queries.test.ts.snap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/api/test/__snapshots__/queries.test.ts.snap b/packages/api/test/__snapshots__/queries.test.ts.snap index c96c15632c..dd184f5949 100644 --- a/packages/api/test/__snapshots__/queries.test.ts.snap +++ b/packages/api/test/__snapshots__/queries.test.ts.snap @@ -11,8 +11,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/skechers", - "name": "Skechers", + "item": "/brand", + "name": "Brand", "position": 1, }, ], @@ -43,8 +43,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/adidas", - "name": "adidas", + "item": "/skechers", + "name": "Skechers", "position": 1, }, ], @@ -139,8 +139,8 @@ Object { "breadcrumbList": Object { "itemListElement": Array [ Object { - "item": "/brand", - "name": "Brand", + "item": "/adidas", + "name": "adidas", "position": 1, }, ], From edbd252af6531069362f2678fe561181b0bae0ec Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 16:44:01 -0300 Subject: [PATCH 5/7] Make query tests more resilient to changes in implementation details --- packages/api/test/queries.test.ts | 169 ++++++++++++++++++++++++++++-- 1 file changed, 158 insertions(+), 11 deletions(-) diff --git a/packages/api/test/queries.test.ts b/packages/api/test/queries.test.ts index 8976b47579..bbf4f6c56e 100644 --- a/packages/api/test/queries.test.ts +++ b/packages/api/test/queries.test.ts @@ -3,11 +3,38 @@ import { execute, parse } from 'graphql' import type { Options } from '../src' import { getSchema, getContextFactory } from '../src' -import { AllCollectionsQueryFirst5 } from '../mocks/AllCollectionsQuery' -import { AllProductsQueryFirst5 } from '../mocks/AllProductsQuery' -import { CollectionDesksQuery } from '../mocks/CollectionQuery' -import { ProductByIdQuery } from '../mocks/ProductQuery' -import { SearchQueryFirst5Products } from '../mocks/SearchQuery' +import { + AllProductsQueryFirst5, + productSearchPage1Count5Fetch, + checkoutSimulationFetch as allProductsCheckoutSimulationFetch, +} from '../mocks/AllProductsQuery' +import { + CollectionDesksQuery, + pageTypeDesksFetch, + pageTypeOfficeDesksFetch, + pageTypeOfficeFetch, +} from '../mocks/CollectionQuery' +import { + checkoutSimulationFetch, + ProductByIdQuery, + productSearchFetch, +} from '../mocks/ProductQuery' +import { + AllCollectionsQueryFirst5, + catalogBrandListFetch, + catalogCategory3Fetch, + catalogPageTypeAcer, + catalogPageTypeAdidas, + catalogPageTypeBrand, + catalogPageTypeIRobot, + catalogPageTypeSkechers, +} from '../mocks/AllCollectionsQuery' +import { + SearchQueryFirst5Products, + productSearchCategory1Fetch, + attributeSearchCategory1Fetch, + checkoutSimulationFetch as searchCheckoutSimulationFetch, +} from '../mocks/SearchQuery' let schema: GraphQLSchema let context: Record @@ -20,6 +47,28 @@ const apiOptions = { hideUnavailableItems: false, } as Options +const mockedFetch = jest.fn() + +function pickFetchAPICallResult( + info: RequestInfo, + _: RequestInit | undefined, + expectedFetchAPICalls: Array> +) { + for (const call of expectedFetchAPICalls) { + if (info === call.info) { + return call.result + } + } + + throw new Error( + `fetchAPI was called with an unexpected 'info' argument.\ninfo: ${info}` + ) +} + +jest.mock('../src/platforms/vtex/clients/fetch.ts', () => ({ + fetchAPI: (info: RequestInfo, init?: RequestInit) => mockedFetch(info, init), +})) + beforeAll(async () => { schema = await getSchema(apiOptions) @@ -28,7 +77,21 @@ beforeAll(async () => { context = contextFactory({}) }) +// Always clear the mocked fetch before each test so we can count and validate +// the calls performed by each query independently. +beforeEach(() => mockedFetch.mockClear()) + test('`collection` query', async () => { + const fetchAPICalls = [ + pageTypeDesksFetch, + pageTypeOfficeFetch, + pageTypeOfficeDesksFetch, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) + const response = await execute( schema, parse(CollectionDesksQuery), @@ -36,44 +99,128 @@ test('`collection` query', async () => { context ) + expect(mockedFetch).toHaveBeenCalledTimes(3) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) + expect(response).toMatchSnapshot() }) test('`product` query', async () => { + const fetchAPICalls = [productSearchFetch, checkoutSimulationFetch] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) + const response = await execute(schema, parse(ProductByIdQuery), null, context) + expect(mockedFetch).toHaveBeenCalledTimes(2) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) + expect(response).toMatchSnapshot() }) -test('`search` query', async () => { +test('`allCollections` query', async () => { + const fetchAPICalls = [ + catalogBrandListFetch, + catalogCategory3Fetch, + catalogPageTypeSkechers, + catalogPageTypeAdidas, + catalogPageTypeAcer, + catalogPageTypeIRobot, + catalogPageTypeBrand, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) + const response = await execute( schema, - parse(SearchQueryFirst5Products), + parse(AllCollectionsQueryFirst5), null, context ) + expect(mockedFetch).toHaveBeenCalledTimes(7) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) + expect(response).toMatchSnapshot() }) -test('`allCollections` query', async () => { +test('`allProducts` query', async () => { + const fetchAPICalls = [ + productSearchPage1Count5Fetch, + allProductsCheckoutSimulationFetch, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) + const response = await execute( schema, - parse(AllCollectionsQueryFirst5), + parse(AllProductsQueryFirst5), null, context ) + expect(mockedFetch).toHaveBeenCalledTimes(2) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) + expect(response).toMatchSnapshot() }) -test('`allProducts` query', async () => { +test('`search` query', async () => { + const fetchAPICalls = [ + productSearchCategory1Fetch, + attributeSearchCategory1Fetch, + searchCheckoutSimulationFetch, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) + const response = await execute( schema, - parse(AllProductsQueryFirst5), + parse(SearchQueryFirst5Products), null, context ) + expect(mockedFetch).toHaveBeenCalledTimes(3) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) + expect(response).toMatchSnapshot() }) From 4e75bc7e0632c9619e4b126072d0e485927c10a6 Mon Sep 17 00:00:00 2001 From: victorhmp Date: Wed, 30 Mar 2022 16:44:20 -0300 Subject: [PATCH 6/7] Make mutation tests more resilient to changes in implementation details --- packages/api/test/mutations.test.ts | 83 +++++++++++++++++------------ 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/packages/api/test/mutations.test.ts b/packages/api/test/mutations.test.ts index de921751ce..dc6712e11e 100644 --- a/packages/api/test/mutations.test.ts +++ b/packages/api/test/mutations.test.ts @@ -25,15 +25,26 @@ const apiOptions = { hideUnavailableItems: false, } as Options -const mockedFetch = jest.fn((..._) => - // eslint-disable-next-line no-console - console.log( - 'fetch was called without a mocked implementation.\nThis could be caused by an extra fetch call being fired when a certain mutation was executed.' +const mockedFetch = jest.fn() + +function pickFetchAPICallResult( + info: RequestInfo, + _: RequestInit | undefined, + expectedFetchAPICalls: Array> +) { + for (const call of expectedFetchAPICalls) { + if (info === call.info) { + return call.result + } + } + + throw new Error( + `fetchAPI was called with an unexpected 'info' argument.\ninfo: ${info}` ) -) +} jest.mock('../src/platforms/vtex/clients/fetch.ts', () => ({ - fetchAPI: (info: any, init?: any) => mockedFetch(info, init), + fetchAPI: (info: RequestInfo, init?: RequestInit) => mockedFetch(info, init), })) beforeAll(async () => { @@ -44,12 +55,19 @@ beforeAll(async () => { context = contextFactory({}) }) +// Always clear the mocked fetch before each test so we can count and validate +// the calls performed by each query independently. beforeEach(() => mockedFetch.mockClear()) test('`validateCart` mutation should return `null` when a valid cart is passed', async () => { - mockedFetch - .mockImplementationOnce(() => checkoutOrderFormValidFetch.result) - .mockImplementationOnce(() => checkoutOrderFormItemsValidFetch.result) + const fetchAPICalls = [ + checkoutOrderFormValidFetch, + checkoutOrderFormItemsValidFetch, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) const response = await execute( schema, @@ -60,23 +78,27 @@ test('`validateCart` mutation should return `null` when a valid cart is passed', ) expect(mockedFetch).toHaveBeenCalledTimes(2) - expect(mockedFetch).toHaveBeenCalledWith( - checkoutOrderFormValidFetch.info, - checkoutOrderFormValidFetch.init - ) - expect(mockedFetch).toHaveBeenCalledWith( - checkoutOrderFormItemsValidFetch.info, - checkoutOrderFormItemsValidFetch.init - ) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) expect(response).toEqual({ data: { validateCart: null } }) }) test('`validateCart` mutation should return the full order when an invalid cart is passed', async () => { - mockedFetch - .mockImplementationOnce(() => checkoutOrderFormInvalidFetch.result) - .mockImplementationOnce(() => checkoutOrderFormItemsInvalidFetch.result) - .mockImplementationOnce(() => productSearchPage1Count1Fetch.result) + const fetchAPICalls = [ + checkoutOrderFormInvalidFetch, + checkoutOrderFormItemsInvalidFetch, + productSearchPage1Count1Fetch, + ] + + mockedFetch.mockImplementation((info, init) => + pickFetchAPICallResult(info, init, fetchAPICalls) + ) const response = await execute( schema, @@ -87,18 +109,13 @@ test('`validateCart` mutation should return the full order when an invalid cart ) expect(mockedFetch).toHaveBeenCalledTimes(3) - expect(mockedFetch).toHaveBeenCalledWith( - checkoutOrderFormInvalidFetch.info, - checkoutOrderFormInvalidFetch.init - ) - expect(mockedFetch).toHaveBeenCalledWith( - checkoutOrderFormItemsInvalidFetch.info, - checkoutOrderFormItemsInvalidFetch.init - ) - expect(mockedFetch).toHaveBeenCalledWith( - productSearchPage1Count1Fetch.info, - productSearchPage1Count1Fetch.init - ) + + fetchAPICalls.forEach((fetchAPICall) => { + expect(mockedFetch).toHaveBeenCalledWith( + fetchAPICall.info, + fetchAPICall.init + ) + }) expect(response).toMatchSnapshot() }) From a8033f908c77913932acffaca681f179d9d41774 Mon Sep 17 00:00:00 2001 From: victorhmp Date: Thu, 31 Mar 2022 11:36:16 -0300 Subject: [PATCH 7/7] Remove `pull_request_target` workflow --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86bf9d3ed..2348b511ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,6 @@ on: push: branches-ignore: - master - pull_request_target: - branches: - - master jobs: lint: