diff --git a/packages/commerce-sdk-react/mock-responses/usecategories-returns-data.json b/packages/commerce-sdk-react/mock-responses/usecategories-returns-data.json index c2913a404c..a46301db61 100644 --- a/packages/commerce-sdk-react/mock-responses/usecategories-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/usecategories-returns-data.json @@ -2,17 +2,20 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 200, "response": [ - "1f8b0800000000000003ec544d6fd4400cbdf7575839944b3efaa122d86b7aa9a0ea612b7140a8f2ce38c9c064bc1a3bdd6e2bfe3b4aba5b9afd28502e1cb84419fbc5e3f75eec870380c4bbd669328193b43f59544c26f0f90000e06178022406956a8e8ee429f73c3f609c4d26902cb8a52019775a3995241d215aaca90735aa739914c5fd7dacb2a3a3e35c30d819dfe59d1c9de6f62e37dcb6140d19cf9dcd053d49c5d1509f283814965a0c768191725154678aac983a25c94439521539686650d1739db559e09051ff55859dd7c22ede99b3f727b3b75531b4248578d642bad9cd0c43a0288541cd1edfb331a3fcebbc1eb30ad80ea4ae76519e634de72426bab93a0e3d8ef7e1ae9d7a7a01112968f968c4f2e2b9d8c6b3362ed42f7d701d8946de6dfab7e5e1a8da88e9a7c7fc28fd3dfdfdcabb1b1e5d51ae11afbf64978a3b0d1b5ff1ecf465a4a7b9a180334f25b7bdb4c9042af4421b18697871112e2974c904347674b0a3f9fd73b35626539effb3d3737c7a466748f60fa6a7a7b37f74aeb7c8ee989b69c373187ebd3702d3c645951ca60d47050c163c871ac413dd520a577715479b82b418350583d2a11f60c6a3883320baf4245071842ecc08b5b7160cb7555fb08adcc292bb0896e41b28833604752454e04e2d7314408572a5349483d4db1c3ed072c1d1ca4f8b41fad653589d6c24d98c2df896c2468cabca19da08ae780dc117f6c95ab45e6670c1f8ceba50afb43b848fbd72d39572e550328572a5d3215c72a4ffabe8af56d1fea9de1e83576fa37ed9fc6a196de6dd3d950d46bd384f7e000000ffff221487c9f1a06cee04ced59e83a62832484933b534354e45298a7212f340095c1f5be8830b2132cb64705e4d1db4c5724aaa8985b161622a09c532d447b84b66176c5e265438434d0517ae8939390af9c9c989c599f979c8854f5a7e512e", - "a89c492d4bcd03f1c16533a438cbcc534854284b2cca4c2da954c84f5348cecfc15adc1251e2b9a0b9c41fe692d1028d3a051ab62c813501d1be9105000000ffffec98c16edb300c86ef7b0a9eda8b13b4c15620eb692b306cdd6143d617602cc656635b0545c7cbdb0fb46523719da609ba211872952c4ab4f47ff8c923043d77222e3f59414f2657d3f9e4fafd01820e19ed16f4e7a194f709fa815de989fd187e32c662e35ab9e8d72371a38a905b3b55a5c4b42256ef74c90429a1213386bb94e2a53a2778b0f99c58097de96181b92b3d70992464a2dac28d32f4a24090b067048f84855713c78983272cc4d7b4c81dd3b11eac8ed2d9a8658a4bdb1bdbd82d525b3847d9385218d89af67d5bb61d3064d1da3e2a6cde8cbd0263e1d2e05b87cfef7a64af768d13e7a3ee8622b8d79867dbf6a6941be2c4a0aafe2ee50e736f4732f111e3259d6ee76612135df70ddfcb4c0c19ed66e27df3015cc09d4339908d6171d4ac850bf8510ab14271dc1551a1641c0979210309724e8ab1ca4a0ac268ac86d64a4ed699cadb90a0cd3c48aa9461b7b2a62b4e23b0852f33d4253508093da94fcadd8a346e04558a526358abd68a5052e26351f9d8e6d7c2cd6da22e0bc1fb5f5528c44fecdce2d954383d9967332bf2fd10c0e4ad172c04061fe6202ebb1bd800e6e61d6719c57276816fc7c7a1ab795161ff012717442ad511933955562e3e4ca68be90d1ec04a26b39b935f9a946146e6758cd4065a2bca1919f8a5c71e87e65d045ed1549b966561ebd7d178baacae01f5282f138ad534ee92669f0b1eda170f9f9a0d06d23803e03800ec12c3cee7f3afcac177bda87b7ed20989f76a319d4f906e0e106f9bce96829fdf7737b3cfdab42bc630a30c7fabdac4e69469c73af4d1bd567a10a3ca355b832b6e9bde7953df8883d8b129d9ad9b9aad55bccef8d0c2ff5a26048c45424db3a710ca9f1c23afebce4fc9cd528add08f5776a4bde2685ff18faf14db555d11f000000ffffec9a4b6e83301086f73d05072852e2a63cb6a85d7441bb482f608c91a8221c6150d59cbeb2cd1b1b6caa4410759728d1180bcfef7fbe19984f202295bb21b555686c078384cd97a1f19fd695d66d7cb4613f79bcba821bd4651392a3facf48659477955cc487ca6274ebc9438e95649c7733993c758deb83ea95426a887cecbafb6729a466695c7db6d90fe2c84953faa1f3be16b4e6fb924dcb15f7e7f707847de0b83ae2c7b7c577a3762ec732d5adeb422e7d3c1ec7c65149d38c291ec9adf309435a320bf39a7d911f21753d561da7498259bad6448c73edb2d0eb1636ca12325d3936cf10d4cfc0a2890eddbc73b98a6f99762de142cf7203c73277f825c7e5b645ca0a75cb01c083004313dd1a64a3e635b3290415f9e80979c0d716a7eb00a8f0bef1531f3e75d1931c3c29b1930a3a7591d342e0d47b0552d8149ce0e58273fa2fd77f91eb4df1a5cdcd50a0e40076cece3396f9aeae2d127ade3db64521b85a2bea0337462ed2b7a2a2ae9d1ea9a8189889d27726c5a8724682d5d8c278b6a316b4c8d3332bdea3b2284866c5e43b7bb4d846d39c640d753318af08dbe18a6a23ddb1b27ab9402cf7c2977b2799fd2696d3eb4c1aebe12f000000ffffec9ad10e822014407fa52f708812f0116e6d6ebdabc463b5faffad717d9012c44b562cfd00a7809cedee9c15f1d07b6ffc3fda57b3b204212744234ac9391a72b0d7d69d8e02dddda496e9866354d09c951a81b8cb24e26ac77203f3f6f506a882070ddd3a7304e76c7774cdd626db8e0056ddbfc4fd751b815003f4780f5d7fc0ea47e8bcd59a487dc28fd0c3158b220ec447a902a7e0b4cd0551b38103abf1f3e6305eec346e160cda9e19f493a8cd4edac6415b7ccee688d9ec940d11b2f5bb", - "0ec7f481886d033586038e9bb38dcb087831253bc1c81e8df40162413f9dbc9d2e14232d95cd6c822fe5a6ab3f31d3995f4dbf8a694b4bcf90d295474983d388d1d1efca68bf8aae10223aaca11f000000ffffa2d5343417cc24b0294a25f9258939a0edd25cb500000000ffff0300772c72733f3d0000" + "1f8b0800000000000003000000ffffec544b6fd4400cbef7575839944b1e7da808f6487a5941d5c356e28050e59d719281c9783576ba7d88ff8e926ea1d9470b8503072e51c6fee2f1f7399feff60012ef5aa7c9048ed2fe64513199c0a73d0080bbe109901854aa393a921fb9c7f901e36c328164c92d05c9b8d3caa924e908d1624d3da8515dc8a4286e6f63951d1c1ce682c1cef93aefe4e038b7d7b9e1b6a568c878ee6c2ee8492a8e86fa44c1a1b0d462b04b8c948ba23a5364c5cc294926ca91aac84133838a9eebaccd02878cfaaf2aecbc1676f9c69cbc3d9abfae8aa12529c4b316d2cd2fe7180245290c6a76ff9e8d19e55f16f59855c0762075be8df2026b3a2531d12dd471e871bc0b77e1d4d313884841cbfb41dc4c1f8b6d3c6be342fdd40717916834bbf5f96dcc70546dc4f4e37d7e94fe96fe7ae5ed0d8fae281f102fbf649b8a5b0736bee2d1e9f3484f734901e79e4a6e7b69930954e885d630d2f0721ace2874c9043476b4b7a5f9ddbe795026535efcb3ee393c3ea11324fb1beee9e9ecb6cec506d92dbe9935bc80e1d77b25306b5c54c961d67054c060c173a8413cd115a5707e5d71b429488b515330281dfa01663c8a3803a2379e042a8ed08539a1f6a305c36dd517ac22b770c35d044bf21594411b823a122a70a796390aa042b9521aca41ea4d0eefe966c9d1cacf1183f4ada7b03ad948b21e5bf21585b518579533b4165cf11a824fec9307d17a99c105e33beb42bdd26e1f3ef4cacd56ca9543c914ca954efb70c691feafa23f5a45bb5dbd6983176fa37ed93cb78cd6f3ee96ca06a34e4f9f9da1b9ec6dfe6e70f5f4afafa2ef000000ffffc25d1401000000ffffec98c16edb300c86ef7b0a6287f6e2644dda0ccb752d06ac3b74e8fa028c45c74a6cab90181b79", + "fb81b26cb8a99326410604438e962c9ab4f47ff8a9dd28ba51c9643ab9a53728cab09003fea5efef7b081dc964af553a5b2c2bbafb763b423a00cba1a2ed647ee82bf9233887a81eae986560e2189d3645173e89b1b970864a2ae4d9b3b9c6992e00a144ab89d76012884dd68bdb3d88f7b091c95393c90568a7015a9f247a0fd0599aac996136f9d90a7a3cbe99cec6a3bb03041d2ada2ee8ef7d257f24e8176b568eac1bc26f8b31ebd82b17dd7ac0665011dac64e5529592ac98a77bab60429a1223584fb94e2a5382778d1f98cac10fada4182b95939b0abf99c54e42ddc2043c702040edf8c604158383171766ee0150b769e16b9b174ac07f3515a1bb54c71a937c63a5f8bc416ce903b29858137d36ed396bd0d18aa686c1f153aafc7f6c058d834f8d9e2f397a4ecc4aed9b97151bb43113c4acc8b6d3b29e5fa38d1abaa7f4bb9c3dcdb914c5c60bca4f3bdb919c744a34dc3b79b89a1a2ed4c7cac5f802bb837c807b2312c8eeab570054f2b262b501cb64d546819074c8e49c11c6d4e82b14a730a6c5169092d9d1caf3391b722469d39e05428634da955db9c46a00bb7ca50967810123a129f949b92246e04558aec312c5d6b45c829d96351b968ea6be066baa8cb42f0cdb72a64b2afd698e4dd54c89ed4bb9992dc6608b0e4b4632c187a0f662f2edb1de800b3bbc75946315f5ce0e9f8d8b7353b15f61f70322112a90e2ca973656532194f93e9573c809596d4764efea84b866752fb31522ed01a513e93823f92f6305cde45e0044ddeb42c0bed4f47ede932df034a2a9fa34f7f010000ffff", + "ec99d16e82301885ef7d8abe80cb649bc876359325bb214be65ea0d46a58909a9626c3a75ffe96a2400b48a2618b779a42a1b4e7f4fc5f5b1c8a43687449b3ee0b0299158f5ef5032cc3b819c030037089c1b97cae550e4e6abd767ca41189f77e13441ea6f333c46b8653517073becb96ae6863eeb8439f34c13fa0b62cded1048875c1d105547a8860906b922396be6876aeeb9b8c21c2f85a7296eb9acd281e5a4481f0dfe596228ed32dd5b027cde86ecf38e6b9223f92eb5b2961530c9f13907cbc4dc573c1e375b5a5b67b372272a51b66a242193b0012967feac1bfdd578e69e3e3d8ed97eacf5470b5baacc5725cd7345cc6b957d94dbcee2c67ed7af62e9b4ed2d45d8792dbb6f1fea07aa4901a9380fafeecc90aa941c6c5ef2934e8256795f4e464be061ccd572d5bc8119fcfcf1e090dbcb9dfc7fcd4b0d468dcc96525e3be755da8ac4ff5a7b07124459c82e3318ef609c5424284794bbf59aeadaec2aad7f1664341ae868829ae2db37ea785a5b384e02babf21d96e61da0377d42d79d5c2e925bda534b3830b35c21b1742d7ecb72b96e913242df9a7bde027b149fe35b3535f6dc66fe14828a02f240165ed0db9c2e03a0c2ff8d9faaf0e9143dd9c193133bb9a0d329721a089c2a5360854dcb041f0e948b9b5d0f7dc42f000000ffff", + "ec9a4b0e82301445b7c202d440455ba6c689038d098973019b30690d60dcbe69ab5243415ee3a74616401eaf9f93def6fcdcfdd2cf3914290d913ff70918f33ad7ac402f5f8fc72a083a7b148d10ce529cf63f8aaa5cdbad545cefc020a4d74cb1b2d59110195b1d3c6bd5a2ac8afc28c27b72aa2acebc8c9fd9c8138de60567f75b37805eb1aee58a6b23ba56762bb750e596b2dc86b3f14a95ebf73239f0d062dfb42fb48f6a650e428e903d09238cc1909363aded692bd09542b574571c430405b3900210c73b11171bda7d92b78f854495fc50d02d1553c026dece94ad85b66d01ac581531ffdd402050806e8ea16905fc7d840e124afd881ee011bade6256c491f291abc099629404c4cf7a034776d3ce9b6db3d96edcbc50687b64d057a4365d696b0a6df63a9b4166d3553680c8a6465d4ed31b24b601d4100e18768ecb71f9020000ffff", + "1a7445ba698a65b285a98119c9453aa21023383f3de867a78d534c0d928c2c13892ec1a93537ed3b4c66a6f5704f4da34f4c234d4b133129ed8b634a1a3ca741ce7434a593d1b8a7a27d4998881eb869682e98496053944af24b127340dba5b96a01000000ffff", + "0300772c72733f3d0000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:40 GMT", "content-type", "application/json;charset=UTF-8", "transfer-encoding", @@ -20,25 +23,29 @@ "connection", "close", "cf-ray", - "74abb35c995505d6-IAD", + "75d3845cef63a715-PHX", + "age", + "411", "allow", "GET, HEAD, OPTIONS", "cache-control", - "public, must-revalidate, max-age=900", + "max-age=900", + "last-modified", + "Thu, 20 Oct 2022 17:29:49 GMT", "strict-transport-security", "max-age=31536000; includeSubdomains;", "vary", "accept-encoding", "cf-cache-status", - "DYNAMIC", + "HIT", "jweb", "y", "x-content-type-options", "nosniff, nosniff", "x-correlation-id", - "74abb35c995505d6", + "75d3845cef63a715", "x-envoy-upstream-service-time", - "28", + "30", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", @@ -52,7 +59,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=womens-clothing%2Cmens-clothing&levels=2&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usecategories-returns-error.json b/packages/commerce-sdk-react/mock-responses/usecategories-returns-error.json index 0b7520dc66..bb8e6df48d 100644 --- a/packages/commerce-sdk-react/mock-responses/usecategories-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/usecategories-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=3%2C6%2C20%2C19%2C2%2C18%2C9%2C17%2C19%2C6%2C23%2C24%2C21%2C3%2C8%2C11%2C21%2C7%2C18%2C9%2C4%2C25%2C16%2C21%2C9%2C16%2C22%2C15%2C4%2C7%2C13%2C24%2C1%2C9%2C7%2C23%2C20%2C16%2C2%2C22%2C6%2C10%2C24%2C10%2C13%2C8%2C2%2C20%2C15%2C0%2C3&levels=2&siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=15%2C17%2C0%2C22%2C18%2C11%2C21%2C4%2C15%2C18%2C0%2C0%2C10%2C21%2C1%2C21%2C13%2C17%2C13%2C1%2C5%2C9%2C14%2C1%2C22%2C25%2C12%2C12%2C23%2C12%2C2%2C22%2C23%2C15%2C11%2C22%2C23%2C0%2C14%2C4%2C7%2C0%2C13%2C20%2C15%2C3%2C20%2C3%2C18%2C16%2C5&levels=2&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 400, "response": { @@ -12,7 +12,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -20,17 +20,17 @@ "connection", "close", "host", - "lb001-mprd-use1.cloudhub.commercecloud.salesforce.com", + "lb002-mprd-use1.cloudhub.commercecloud.salesforce.com", "cf-ew-via", "15", "cdn-loop", "cloudflare; subreqs=1", "x-real-ip", - "172.70.135.22", + "162.158.142.150", "x-forwarded-proto", "https", "cf-ray", - "74abb35edb00585a-IAD", + "75d3845ecd50a71a-PHX", "accept-encoding", "gzip", "accept", @@ -44,17 +44,17 @@ "_is_allowed", "true", "cf-connecting-ip", - "204.14.236.215", + "13.110.54.10", "cf-visitor", "{\"scheme\":\"https\"}", "cf-worker", "commerce-api-eu.api.commercecloud.salesforce.com", "true-client-ip", - "204.14.236.215", + "13.110.54.10", "x-correlation-id", - "74abb35edb00585a", + "75d3845ecd50a71a", "x-forwarded-for", - "204.14.236.215, 172.70.135.22", + "13.110.54.10, 162.158.142.150", "x-forwarded-host", "kv7kzm78.api.commercecloud.salesforce.com", "x-forwarded-proto-real", @@ -74,7 +74,7 @@ "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=3%2C6%2C20%2C19%2C2%2C18%2C9%2C17%2C19%2C6%2C23%2C24%2C21%2C3%2C8%2C11%2C21%2C7%2C18%2C9%2C4%2C25%2C16%2C21%2C9%2C16%2C22%2C15%2C4%2C7%2C13%2C24%2C1%2C9%2C7%2C23%2C20%2C16%2C2%2C22%2C6%2C10%2C24%2C10%2C13%2C8%2C2%2C20%2C15%2C0%2C3&levels=2&siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories?ids=15%2C17%2C0%2C22%2C18%2C11%2C21%2C4%2C15%2C18%2C0%2C0%2C10%2C21%2C1%2C21%2C13%2C17%2C13%2C1%2C5%2C9%2C14%2C1%2C22%2C25%2C12%2C12%2C23%2C12%2C2%2C22%2C23%2C15%2C11%2C22%2C23%2C0%2C14%2C4%2C7%2C0%2C13%2C20%2C15%2C3%2C20%2C3%2C18%2C16%2C5&levels=2&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usecategory-returns-data.json b/packages/commerce-sdk-react/mock-responses/usecategory-returns-data.json index fd72fdb64f..2d1b8dbdbb 100644 --- a/packages/commerce-sdk-react/mock-responses/usecategory-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/usecategory-returns-data.json @@ -2,16 +2,17 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?locale=en-US&siteId=RefArchGlobal", "body": "", "status": 200, "response": [ - "1f8b0800000000000003e4954d6f1b470c86effa15c41e92cb7e284e1ddb425d207151c005940470d01caac2a066b9da716687c2909b8d12e4bf173bfab6e4c0e929482fd200e472c899f77de6cb002031a834e360499211fc3d0000f8127f01125b2623483c751882fd884eb28e1bf292a49b8c0667d427d5aa731915c5e7cfa1ca86c367b9a02fa7fc296f65f83c2f3fe5869b868221e3b82d734147527130d4070af645490dfab2c340b928aa354556dc5825c944395015d86b6650d1f12c6b32cf3ea3feab0a5ba745d90dab8be909d28b22b6248538d642dae9ed14bda7208541cd96ebd5149971acb5f5b3fc6e3edb8ee4b18913bdbf37ea1c67f43b890976ae967d9ff29a3a78b93a1ab01e9675a142a92d7b9c3a02f425882e9c951a6e6a2649e10ecd0752892140e780b5a600eb6ea0e200ad9f126aac60b8a9382894b800ebd3f8cfade6f036a0516bd0c54abb9bf61b92405753a08f14406b023606c5b2cff7277a67d5d1b159e2f84f05fe60d68e30a4f0a6550acbe5d5bad727f0d21812590a68a77220af574b692daeefcbe8a1c4778168a3c25d251e57e3a6ccdebded0e926c12bea68f2c7a5fe2c734b1adba5afdb319c8dc52bc832b6efad9921154e88476e2527377edc7e4db64041adabd98637d15357afdc3180bcd059d9d3d3bdd3396435f5a3f8ba65aadb33e3065556e8e1a6cb0730ddf20cc8fca97e7e5e9707a72818fe1cb23e832fe5eb6f41fc01e3bfe3b3052209445a69cf5763ec0c582dba781a0262ca97c2c2fc691166b30a470d35a959f910f0fd361fcbf63c3f9399eff727176f63d6c88e6280389486d83ca0e1c06abd37ae02a8f5f618c1c31d04dcdf3f8bc7aea00b74a35aeed5b5a3ed6d148f1d1361be5de51472e2c52c0ad745390959e1b0e04a870b53ada5ef26db9ed626390f79bfad1baf7fdb275ca9febfd76ac024f60cc", - "81d6650fdd1298f55874cf220f63f6104887b6d85ec737849b98dbc889d08b7629cfbedaafb699013abd9cec83224a779280047339f969deb649029d2db5be9c242727a793048adf9283c379132cf9bec9a53cffa21059bc4e3cb0fee0ebbf000000ffff03008b50d7bca00b0000" + "1f8b0800000000000003e4954d6f1b470c86effa15c41e92cb7e284e1ddb425d207151c005940470d01caac2a066b9da716687c2909b8d12e4bf173bfab6e4c0e929482fd200e472c899f77de6cb002031a834e360499211fc3d0000f8127f01125b2623483c751882fd884eb28e1bf292a49b8c0667d427d5aa731915c5e7cfa1ca86c367b9a02fa7fc296f65f83c2f3fe5869b868221e3b82d734147527130d4070af645490dfab2c340b928aa354556dc5825c944395015d86b6650d1f12c6b32cf3ea3feab0a5ba745d90dab8be909d28b22b6248538d642dae9ed14bda7208541cd96ebd5149971acb5f5b3fc6e3edb8ee4b18913bdbf37ea1c67f43b890976ae967d9ff29a3a78b93a1ab01e9675a142a92d7b9c3a02f425882e9c951a6e6a2649e10ecd0752892140e780b5a600eb6ea0e200ad9f126aac60b8a9382894b800ebd3f8cfade6f036a0516bd0c54abb9bf61b92405753a08f14406b023606c5b2cff7277a67d5d1b159e2f84f05fe60d68e30a4f0a6550acbe5d5bad727f0d21812590a68a77220af574b692daeefcbe8a1c4778168a3c25d251e57e3a6ccdebded0e926c12bea68f2c7a5fe2c734b1adba5afdb319c8dc52bc832b6efad9921154e88476e2527377edc7e4db64041adabd98637d15357afdc3180bcd059d9d3d3bdd3396435f5a3f8ba65aadb33e3065556e8e1a6cb0730ddf20cc8fca97e7e5e9707a72818fe1cb23e832fe5eb6f41fc01e3bfe3b3052209445a69cf5763ec0c582dba781a0262ca97c2c2fc691166b30a470d35a959f910f0fd361fcbf63c3f9399eff727176f63d6c88e6280389486d83ca0e1c06abd37ae02a8f5f618c1c31d04dcdf3f8bc7aea00b74a35aeed5b5a3ed6d148f1d1361be5de51472e2c52c0ad745390959e1b0e04a870b53ada", + "5ef26db9ed626390f79bfad1baf7fdb275ca9febfd76ac024f60cc81d6650fdd1298f55874cf220f63f6104887b6d85ec737849b98dbc889d08b7629cfbedaafb699013abd9cec83224a779280047339f969deb649029d2db5be9c242727a793048adf9283c379132cf9bec9a53cffa21059bc4e3cb0fee0ebbf000000ffff", + "03008b50d7bca00b0000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:01 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "content-type", "application/json;charset=UTF-8", "transfer-encoding", @@ -19,31 +20,35 @@ "connection", "close", "cf-ray", - "74abb36078f10627-IAD", + "75d384628969a71a-PHX", + "age", + "411", "allow", "GET, HEAD, OPTIONS", "cache-control", - "public, must-revalidate, max-age=900", + "max-age=900", + "last-modified", + "Thu, 20 Oct 2022 17:29:50 GMT", "strict-transport-security", "max-age=31536000; includeSubdomains;", "vary", "accept-encoding", "cf-cache-status", - "DYNAMIC", + "HIT", "jweb", "y", "x-content-type-options", "nosniff, nosniff", "x-correlation-id", - "74abb36078f10627", + "75d384628969a71a", "x-envoy-upstream-service-time", - "26", + "13", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", "11700", "x-ratelimit-remaining", - "11699", + "11700", "x-xss-protection", "1; mode=block", "server", @@ -51,7 +56,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/newarrivals?locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usecategory-returns-error.json b/packages/commerce-sdk-react/mock-responses/usecategory-returns-error.json index 017b723d22..f333d2bdbf 100644 --- a/packages/commerce-sdk-react/mock-responses/usecategory-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/usecategory-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?locale=en-US&siteId=RefArchGlobal", "body": "", "status": 404, "response": { @@ -14,7 +14,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:01 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -22,21 +22,23 @@ "connection", "close", "host", - "lb002-mprd-use1.cloudhub.commercecloud.salesforce.com", + "lb001-mprd-use1.cloudhub.commercecloud.salesforce.com", "cf-ew-via", "15", "cdn-loop", "cloudflare; subreqs=1", "x-real-ip", - "172.70.35.16", + "162.158.142.176", "x-forwarded-proto", "https", "cf-ray", - "74abb362ae6b5a39-IAD", + "75d384642b90a6fd-PHX", "accept-encoding", "gzip", "accept", "*/*", + "cache-control", + "max-age=300", "strict-transport-security", "max-age=31536000; includeSubdomains;", "user-agent", @@ -46,17 +48,17 @@ "_is_allowed", "true", "cf-connecting-ip", - "204.14.236.215", + "13.110.54.10", "cf-visitor", "{\"scheme\":\"https\"}", "cf-worker", "commerce-api-eu.api.commercecloud.salesforce.com", "true-client-ip", - "204.14.236.215", + "13.110.54.10", "x-correlation-id", - "74abb362ae6b5a39", + "75d384642b90a6fd", "x-forwarded-for", - "204.14.236.215, 172.70.35.16", + "13.110.54.10, 162.158.142.176", "x-forwarded-host", "kv7kzm78.api.commercecloud.salesforce.com", "x-forwarded-proto-real", @@ -76,7 +78,7 @@ "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/categories/abc?locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usecommerceapi-returns-a-set-of-api-clients.json b/packages/commerce-sdk-react/mock-responses/usecommerceapi-returns-a-set-of-api-clients.json index 8b458f61cd..0637a088a0 100644 --- a/packages/commerce-sdk-react/mock-responses/usecommerceapi-returns-a-set-of-api-clients.json +++ b/packages/commerce-sdk-react/mock-responses/usecommerceapi-returns-a-set-of-api-clients.json @@ -1,110 +1 @@ -[ - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=oA2tKQq4s6suAvfxGG1k_YN2_pIY5p1ILMYCNTk6JWo", - "body": "", - "status": 303, - "response": "", - "rawHeaders": [ - "date", - "Wed, 14 Sep 2022 19:59:01 GMT", - "content-length", - "0", - "connection", - "close", - "location", - "http://localhost:3000/callback?usid=35413889-2255-43e3-9330-fce029d29d3f&code=fyoeV-TPn-OXWHf0xf2lLIAqiBpuWCWHU2h7GBXjslM", - "cf-ray", - "74abb362aa7b82f9-IAD", - "cache-control", - "no-store", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "74abb362aa7b82f9", - "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23996, 179972, 23999, 359800", - "x-ratelimit-1m-reset", - "58024, 58023, 58023, 58023", - "vary", - "Accept-Encoding", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=oA2tKQq4s6suAvfxGG1k_YN2_pIY5p1ILMYCNTk6JWo" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/callback?usid=35413889-2255-43e3-9330-fce029d29d3f&code=fyoeV-TPn-OXWHf0xf2lLIAqiBpuWCWHU2h7GBXjslM", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Date", - "Wed, 14 Sep 2022 19:59:02 GMT", - "Connection", - "close", - "Transfer-Encoding", - "chunked" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "POST", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=fyoeV-TPn-OXWHf0xf2lLIAqiBpuWCWHU2h7GBXjslM&code_verifier=hdd4kc9nzEjzcxG9has3AEdBgpyWxbXyifOqroMKvaypOi_cyMU5Og-FwEptcrNuTcItUnHvUnPtBEBgMi73yWy7bLv4o-7pKvM93lxqp_sF38YlX7xaOKSe3ya1i5HK&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=35413889-2255-43e3-9330-fce029d29d3f", - "status": 200, - "response": [ - "1f8b08000000000000008d55db92a248107d9fafe8e8e7ed0daa1047f60d01119a2a0644a07831a040e5aa2da0c2c6fefb16f6cc84bbe34c4f84849159793979322bebef4f4f4fcf11a569d36cda4391d6cf4f7f3d3da7bd01c340cfac4cbf9ab99499b2f116f16b261b43ac2d06939ff731b4cf697decc37276418a3ada9c22df1e7d78ec3b05cad7132c831c2905345d1b9281b4c49500eac13eccc302558b22ccd73c82ebd1974b03698cff96f0f628e7f1928cf22bca268399df74fb58a3a36eb11e74803343fc9301dd27c198d4587aeb52d5b34b4621bee8f981fd8739e98521d2c40bd5bcdef481407c9cc7bcd725b29091009fc2c019f425ae08441d85fb335dce4b9a8136f517398122886bbb23ac185a790385de23db0badc422f13147fbf9105638376b7c88f9f98511d8865a39b0388c4c4330035c92c0c823f947bb3828f704e273e20b9c591bfc4798a8b610629fd5a1951de59d3ef14119d70f6bc9930073310425ad51176b621df993dd07dc9c69e58cf60fec3060f9ce2c774f7ba10ffde4c86496e7c79a48b51822e8315ec02fe2fd27ef3ed49c3e0cf01006ac869a7e64ff9dfb98f19c2c7fe2138cc3ea00c23b4d143cee135d1aac26918b7cb17b74fea096dfc24782b20d594f235f60f80c70ebd9cf70322ec3da6e09f47ad6d72af2f13ed17e3d73bf3f531f7340e08263fd64f595e5a3f3fb78b77bc67bd978cf18b696c2eb9e0e87e9dd42985a35ced9429892a1ccb1e2656165b748f30ad4731cf1d5de740b010f6a8b957965293b01e7466629085af911505816568e0056d461", - "3c335dbdc7ee9ad9e292f90b684017d3676bc4957acbb7c76f0833bdd12bcca5b23ed56bdc90008d4b83cd27fa6871311bb6437295f92f4038fa5798cd03bb3315e3175e59cdf6799c915016598d46150cd205adc67c42c6f24e91cb5818d409c37845376e1c61e4c663fda1375c6c0f64232eef186ab3e937be9260de594502d8cc7363dd91ef7c97f585c7ee813eb5aae49d47df38f94b1c46bc714215c8569e715a6949142f17a1ef37170a76cc161f465b5d1e737a132adf611b1037628bfc05c7b05d714e06e4ee0076ed7e5cf089568c3c29a8409ca5ac21caa5aba5908be9aa13cb95201e760252508f5c152245679f34b025cffa267168c596b14576addc9dcea6dac12ce261f8198611c83a7d65d75526bfae2dd0989cb4591d5f36e79d2de118a79524cfccf430918f7b5315b7eb4e8e67af2bdef532a7580fe65cb29fff189fa82cb97b9ede55a7747b4a9bfd9d7e97a189434eee7665f6d799929cbff0def46da6160732988bdd5e7f7bfdb20dae4d1b71ef21d2eb31633136d9cd1fcc38eea6be45dcb4fd31bd859dab92a33aef1e5d932537252f4c003f9b892f100ac2cb844ff91791e7b9972d4d392826ecc76fdf5d68d7b4872a3d6dbe7a46711134a43815b08a75a758eec2f28d90826b82afa06abae99a3bfb249ef120fabc4d92199f24208511cf8934fd2c8820d96e67df083a6efeff8ed75d597efae75fa5001a1ee3070000" - ], - "rawHeaders": [ - "date", - "Wed, 14 Sep 2022 19:59:02 GMT", - "content-type", - "application/json", - "transfer-encoding", - "chunked", - "connection", - "close", - "cf-ray", - "74abb367aebc5a82-IAD", - "cache-control", - "no-store", - "content-encoding", - "gzip", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "vary", - "Accept-Encoding, User-Agent", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "74abb367aebc5a82", - "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23994, 179965, 23999, 359749", - "x-ratelimit-1m-reset", - "57596, 57595, 57594, 57592", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token" - ], - "responseIsBinary": false - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/packages/commerce-sdk-react/mock-responses/useproduct-returns-data.json b/packages/commerce-sdk-react/mock-responses/useproduct-returns-data.json index c2872ca316..9329759f2f 100644 --- a/packages/commerce-sdk-react/mock-responses/useproduct-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/useproduct-returns-data.json @@ -2,16 +2,16 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/25502228M?siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/25502228M?currency=USD&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 200, "response": [ - "1f8b0800000000000003000000ffffdc564d6f133110bde757587bceda5e27db34390644a4aaa088222105a16ae299dd1abc1fb2bd4d3fc47fafb2494acb81002965cb65e59dd18cdfcc7b7af26d8fb14837ce51a9afa3098b66d379d45f070dae7f559a4aa5d4f1db6db0809c66ae6a6a1f4dd8a71e638cddb6df5df27bfc61aecd830deb9653b28190bd02872687927d34e1829d85067d9ff5990597537bd97d1d1a3f054fa7a6fcbaaebf08a1f613210873e268bc0f39d7555190d3a46dd520f760c96795d3b44e085c89169ab85462b178ffe65cca4454a5402aa0c41538e23e40305ac4e2cc04f231d43538b271116b0860ab5c2065d0d8207095683590c36cbce9e9450b58cc673c912a4993d1989f9cc877a7af259f2ff8973a7f3c8bfd61889b1b97c55226dc4389cbea8a375e0e385efd7ca27f043e9860691f85d17dc5b7feffac0335d04b249dee5fe5b47b3a380cfcefea607bfabc6b125d1a5a7db8aedb1e1ba27b0f04f3b48652109aa6e8b2925295683986a31d191bc42fc5520e44ff9c9ed27d292c93e1886898fec2323be82a07a27f525bd972fdf77cc517606d97b50429e1d18868c7460bf8a5b8ca61e09fd3543aaf03b584ec38cdd4fe5576f1a1f227e0ef000000ffffd4586b6bdb3014fdde5f2142bf3ab5f368d3c2186d4a4b2121d9d28e321843b66f1c51590ad275ba0cfadf87243ff270969275857e8cacab7374efd1916efe8fa3b8421f15137fb886482c40a054a67772da695034d6d23e3d73ab34421a3d491583a2a12533a55c43fecd3559e5223f8bcba9b11a802a2be6cf15ec5a4aa38c9e06b000eed08f725d37b814c935e848b13932290ce0285324048d4403e74c24242a12c33411f29964f3989a843d9b3c511203d268664049081c091531d1267b4d32a64c1186c5cc7eae02d237322013940a889e01e73688a1414814502453a9", - "8860023c94de942dc04e08612945dc74dd664a3582aa32eb7edfd534a67fcb188bccd069d0ecb4cb9ca44c8cccfc2f1915c8d0542fb01f044df708c6519bd3043e66520df3fbfde7229fbc9abd6a640cea4130dcfc9052b5ec538444aaa5abd2b34c41682fe212674c241eca79b9b28cb308c74aa6d264b0e6ff8488722e331ceac452cd96440a20032912d20781a0c804684a264f4cb9ec2580a4454a8cbcfe398023d49f4916c1687a2545a6c74ac610a137765cece1f154c6c1b8775cff76582775dcf5c90dfb0531c9d7d0e4329599407219ca0590c0f7775239eefa36b488748136ce84bd02dd6ea240b6a5b7a2ce29e89c43abbb9b4399862cc2913b12a3694ee44a2ec0c46e389e02ebf422a63bcab63e2177cfea5e35b7e39cd3e537ca33abc182ff3520659c8c6902c4237d25b5261358bb5b1b8b3c2838dab8b92b5488ef10d2159308ce5bc3cd4de89954f831cfafe659f2a0f8bfdfc9fae42b4c2f5534bbe532a4fc24b45ee015bbf60c79cf6ee8a434dbe60c53fe9953917ccaefe89c14c27ccb4b71b5f495991b732e8d7841398b6f944cab89c5c2a67e7ee07b41e005bd7bbf7be1fb17bedff47dff7b63255e312ab04686f5f7419da71507c3a8d0e9e6cc0f4e3bad5eefbcd76a0fabc363c18c5cac76f5baac23c9a5d95e237f90acca56b3df56eae783dbe2b5f1527bbedf8674e7ec4d494f86ef41baedbf29e9e1f57b90ee76de94f4e36083746958e5da97888a851942dd1ff0969d432a59152f9afefaf0a2e0b8a3072ec2063453b0d1dfeccadd9a45971bdd7e5ed737e596bc4dc516f7c9dae86ba94f0e61bda2f6dd8d6181303c08a192e67e84c1410895cdec47783c0ca292ea56618d688f5efe000000ffff030077d855775a1a0000" + "1f8b0800000000000003dc564d6f133110bde757587b4e6caf936d9a1c4345a5aaa08a809082109a7866b706ef876c6fd30ff5bfa3dd24a5ed81002965cb65e59dd18cdfcc7b7af24d8fb148d7ce51a1afa2298b3ecc8fa27e1334d8fcaa24914aa9c3379b600e191dbbb2ae7c34659f7a8c3176d37eb7c91ff1fbb9360f36342d676403217b050e4d0605fb68c2399b871a7d9ff5990597517bd95d1d1a3f034fa7a6f8d6d49f8750f9a91084197134de878ceb32cfc969d2b6ac917bb0e4d3d2696a120257a285262e94582cdebdfe22652cca4220e550e00a1c711f20182d06626e02f901541538b2837ca021802d338194426d83c055acd5508ed2c9baa7172d607176cc63a9e2241e4ff8c9897c7b7a24f9d9827fadb287b3d847435c5fbb742065cc3d14b82c2f79ede590e3e5cf27fa47e0830996765118dd55dcf6ff671da8a15e22e964f72a67ddd3c17ee07f57079bd3e76d93e8c2d0eafd55d5f65813ddbb2798a735949cd0d479979594a858cb091c6cc958237e2996b227fae7f494ee4b61198fc644a3e41796d94157d913fd93daca86ebbfe72b3e076bbbac2548080fc6445b365ac02fc555f603ff9ca6d2791da825a48749aa76afb28b0f953f01ff1d0000ffff", + "d4585d4fdb30147de7575815af2949a1a3459a26280221b56ab7c084264dc8496e530bc7aeec9bb24ee2bf4fb6f3d18f74a08e21f158c7d7e7f8dee363dffe1f4771853e2827fe740d91588040a94cefe4b4d3a268ace5b8db73abb4221a3f4a9580a2912533a55c43f1cd3559d5220fe5e5d45a0d409597f3e70a762da551c68f43580077e80785ae5b5c8af41274acd81c991406709c2b128146a281732652129789619a08f944f279424dc29e4c9e284900693c33a024028e848a846893bd369950a608c372e6a050011918199010a502a267c0b90d626810520514c9542a2298000fa537650bb01322584a91b45db799518da0eaccbadf370d8de9df32c66233d4efb6fbfd2a2719136333ff6b4e053234d50bec0741b31704e3a8cd690a1f33a986f9edcbe7a298bc9abd7a6402ea4e30dcfc9051b51c508454aaa5abd293cc40682fe612674ca41eca79b5b24cf218274a66d264b0e1ff8498722e731ce9d452cd97440a20432952320081a048083423e123532e7b2920e9900aa3a87f01e0080d6692c5309e5e4891eb899209c4e84d1c177b783c957330ee9d34bf1dd6491d767d72c57e41428a353439cf642e909c47720124f0fd9d540ebbbe0d2d235da08d3361af40b79b28916de9ada80b0abae0d0e9eee650a5218f71ec8ec4785a10b9900b30b11b8ea7c03abd48e88eb2ad4f28dcb3be57cded38e774f99df2dc6ab0e47f09481927139a02f1c84049ad49086b776b6b510405071b37778d0ac90d42b6621241bf33dadc849e49851ff3fc6a9ea7778afffb9dac8fbec1f45cc5b36b2e23ca8f22eb055eb96bcf90f7ec868e2ab36dcf30e35f3815e967100f7761410961bee5a4b85af8daca8d355736bca09c25574a66f5c4e2eab7d5f303df0b022fe8ddfadd33df3ff3fdb6effb3f5a2bf18a51810d226cbe0d9a1cad3c1646834e35a77ef0e9a4d3ebf57b9de3517d742c98118b55ae5e17752cb934db6b15cf9155d16af6db0abd3fbc2edf1acf8da7fb6d489f9cbe29e970f41ea48ffd37253dba7c0fd2dd9337257d3fdc205dd955b5f639a262518ed0f4f7bb65e7902a56e57b66b03ebc2839eee880cbb021cd156c7437bb72b766d0d546b71fd7cd2db9256f53b1c53d5c1b7d2df5701fd62b6adfdd169608a3bd106a69be8c30dc0ba1b6999711eef783a8a5ba555823da83e73f000000ffff0300e04c879f581a0000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:59 GMT", + "Thu, 20 Oct 2022 17:36:39 GMT", "content-type", "application/json;charset=UTF-8", "transfer-encoding", @@ -19,11 +19,11 @@ "connection", "close", "cf-ray", - "74abb3570b7e6fef-IAD", + "75d384566a20a71b-PHX", "allow", "GET, HEAD, OPTIONS", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "vary", @@ -35,15 +35,15 @@ "x-content-type-options", "nosniff, nosniff", "x-correlation-id", - "74abb3570b7e6fef", + "75d384566a20a71b", "x-envoy-upstream-service-time", - "54", + "70", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", "28000", "x-ratelimit-remaining", - "27999", + "28000", "x-xss-protection", "1; mode=block", "server", @@ -51,7 +51,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/25502228M?siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/25502228M?currency=USD&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/useproduct-returns-error.json b/packages/commerce-sdk-react/mock-responses/useproduct-returns-error.json index 8a12739ddf..5f34d3ea37 100644 --- a/packages/commerce-sdk-react/mock-responses/useproduct-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/useproduct-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/abc?siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/abc?currency=USD&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 404, "response": { @@ -14,7 +14,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:40 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -22,21 +22,23 @@ "connection", "close", "host", - "lb001-mprd-use1.cloudhub.commercecloud.salesforce.com", + "lb002-mprd-use1.cloudhub.commercecloud.salesforce.com", "cf-ew-via", "15", "cdn-loop", "cloudflare; subreqs=1", "x-real-ip", - "172.70.34.203", + "162.158.142.154", "x-forwarded-proto", "https", "cf-ray", - "74abb3596aba5950-IAD", + "75d3845a2cb2a703-PHX", "accept-encoding", "gzip", "accept", "*/*", + "cache-control", + "max-age=300", "strict-transport-security", "max-age=31536000; includeSubdomains;", "user-agent", @@ -46,17 +48,17 @@ "_is_allowed", "true", "cf-connecting-ip", - "204.14.236.215", + "13.110.54.10", "cf-visitor", "{\"scheme\":\"https\"}", "cf-worker", "commerce-api-eu.api.commercecloud.salesforce.com", "true-client-ip", - "204.14.236.215", + "13.110.54.10", "x-correlation-id", - "74abb3596aba5950", + "75d3845a2cb2a703", "x-forwarded-for", - "204.14.236.215, 172.70.34.203", + "13.110.54.10, 162.158.142.154", "x-forwarded-host", "kv7kzm78.api.commercecloud.salesforce.com", "x-forwarded-proto-real", @@ -76,7 +78,7 @@ "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/abc?siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products/abc?currency=USD&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/useproducts-returns-data.json b/packages/commerce-sdk-react/mock-responses/useproducts-returns-data.json index 6c214d6dec..db5f3e18a9 100644 --- a/packages/commerce-sdk-react/mock-responses/useproducts-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/useproducts-returns-data.json @@ -2,21 +2,21 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=jP-HC6EVmsotdj94Sx2ur8tR7yZvPSb1hYxADZ5TbsQ", + "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=hlUVCcGIjZa2kuVKyQDjGppGPDY4ZSm0qGyT9G0YO20", "body": "", "status": 303, "response": "", "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:37 GMT", "content-length", "0", "connection", "close", "location", - "http://localhost:3000/callback?usid=c4a29128-44a1-4cd3-9769-dd4db9e72402&code=ZW-MCr28eaglrmXgRvTwQiYKw2hpH8Wq1i6X94I89k0", + "http://localhost:3000/callback?usid=5ea85eed-b537-469b-bddd-879d10a134f6&code=e4xuDqdkx9WPaVT7Yam3ERD2TrmmsDcqtN3aaFK4rXU", "cf-ray", - "74abb34cfafc59b6-IAD", + "75d384494a56a6f1-PHX", "cache-control", "no-store", "strict-transport-security", @@ -26,32 +26,32 @@ "pragma", "no-cache", "x-correlation-id", - "74abb34cfafc59b6", + "75d384494a56a6f1", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23971, 179178, 23999, 353000", + "469, 23999, 346315", "x-ratelimit-1m-reset", - "1845, 1844, 1843, 1842", + "22611, 22610, 22610", "vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=jP-HC6EVmsotdj94Sx2ur8tR7yZvPSb1hYxADZ5TbsQ" + "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=hlUVCcGIjZa2kuVKyQDjGppGPDY4ZSm0qGyT9G0YO20" ], "responseIsBinary": false }, { "scope": "http://localhost:3000", "method": "GET", - "path": "/callback?usid=c4a29128-44a1-4cd3-9769-dd4db9e72402&code=ZW-MCr28eaglrmXgRvTwQiYKw2hpH8Wq1i6X94I89k0", + "path": "/callback?usid=5ea85eed-b537-469b-bddd-879d10a134f6&code=e4xuDqdkx9WPaVT7Yam3ERD2TrmmsDcqtN3aaFK4rXU", "body": "", "status": 200, "response": "", "rawHeaders": [ "Date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:37 GMT", "Connection", "close", "Transfer-Encoding", @@ -63,15 +63,15 @@ "scope": "http://localhost:3000", "method": "POST", "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=ZW-MCr28eaglrmXgRvTwQiYKw2hpH8Wq1i6X94I89k0&code_verifier=fJ325YbnILSy0AcaIdg8RBP9s6OaQh_Wgz6E2R0HiLmMLDSM325Tua-AwEG0DJYRBUKBJvkVyB_1gxfbrmRweDV4Axy-CqQBb--3cAoiQPseWWTHohIkN4iCMZbbpILZ&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=c4a29128-44a1-4cd3-9769-dd4db9e72402", + "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=e4xuDqdkx9WPaVT7Yam3ERD2TrmmsDcqtN3aaFK4rXU&code_verifier=iSKP5FZ-e1t2KxR0cqQXOq3dM9Y-0fLbSV91XOj7RPUvHY6TNxl0Zjna9lf489t74YqN89PIOx8rMxQzcdWgh7kYp1gk9BpTfMe8p3VMLhN8HphVRFQNVtLhSJFn_LrF&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=5ea85eed-b537-469b-bddd-879d10a134f6", "status": 200, "response": [ - "1f8b08000000000000008d554b73a33810becfaf48e5bcd902018ed99b5fbc068931c180b8b8402236e261c76013d8daffbe92333395ddf14ce604ddeac7d75fb75a7f7fbabbbb4f09c9db76db1dcabcb9bffbebee3e1f1c90c476e115f6abcb6685bb705e5265c36567cc4c637495f99081f5256f8e43524d7bb85c099b531aad858f8222bf846ca3a285cce0b2046eb00678c41d0e66321ce47dc29212d64699b08d02c146f84a793c13f15fa8b21632cb2c2ce4cfb05047975d75fbcc2442676c465b4685a3ffc981ee692c923a56b8a95676d11704a0de6607fe4d181eb43135f59e98e1e046b28623c432253cd38556e0189d92d81f6d0bd518c03301fb0bb1e61529e42e8f0c86812e67cdfa8c7931a40e4702c25bb63da9f592464822c37c4c6ac4dc061d3265de7302bbc4ac461e8793e9686e8c2a1c3b2c5dfc6897c5d51e0374a19126b98da37c848998869645bc0eb33a13c51f6824575973b3164663246540ae4803cf99a93769a4ee3ee0e6426a5fd8dfb04332cf77e1b90732684312d12397799e1f6bc2b531a620e4bcc8bf88f79fbcfbc4f48724466312f31a1af291fd77ee33ce33b57ee2138b61f565acf86d1adfee13b11c5e932ea5917ebe757ea396dfc287e3aa4b784fd348e3f81cf9dab39fe1e45c26cdbac3201c785feb34427b6afe7ae67e7fa63ee6000343e2fde4f555d5adf3f7f1aef74c090b71cf38b68e80d73d190f93770b61e23588f18530c163c5d0322c927add41332ce12049385a0d6e506a685c756839afbde54e43cc29bc25041e3bca0454a557430907b606035be50b84ff", - "735b13097fee873597df4b64fa8517f125c2d63d2cecd6ae91942fec89dda016c7502c0d3e9ff0a3c5c56df80e612bee6fc889f0af119f077e676ace2f78e535af2f62469285ce6b74ea789cf5f049e4d38aa4b02730e02c8c2b15059bde5b086e7c4d7013f2fe902b2ebe070a812b3c26e674f28d2f1acfcf5e49653ef392a83b8dfcefb26d84fc1ed813afa66f3c468e1259733395f64e5877b61f3a2d6eb8ac184914933e9377dc161d84adbd103943952cde611be128b0a59121716caf88e111063b190550150b9e9aa5e069094b2879cb0d806cf6ea2d71ef062bd50b66008d3b0d2ea1e62ded01b29d0c852eb07b6fb9067623fdb97eb95c82c3986f1e07e2141a1cc24bf2b984bbddbeb58df4b499a6febc3f7c91b6fb35edfac48f3e5bf3b9833cffc9569e17b383f57262e16e52a55fb646674ea413c65fe4d9fd1fe2852ae8bbd7e94d75ca9f4f79bb7fa7f71db4559ff0ec7cc8a74bcbe969b1ad5953d4407fb206d6f6fd43a66a6d0833b77d0b91bf1e0b1e635b5cfde5a9245dd5d788db6e38e6d7b0f3d5cc5ff96f1ee7b6a057255153be8ac1f4415553f941255479d01f27fa03a52acdf4fc11a812787321e7b63bd4f969fbd533cdfaf86894961d96d6caaf32feff82712f1de2afa01ab23db7efec693655e4f4f199d2a942a99c83549174923f6aba4c9f9fa7df083a6effff8c37e7aafaf4cfbfa523affbe2070000" + "1f8b08000000000000008d555d97a238107d9f5fd1a79fd73d7c882dfba682084dc28a4a082f1e48680d5f3a0d2864cffef70df6cc6cef8e333d4f9c2a6e55ddbaa954fefaf4f0f0181392d6f5be39e569f5f8f0c7c363da3b4a14dacc6376e76633e62e9ccfb1ba13b6c3136bc95d75de27cafa9256e73e2aa657609803e63546eb21660cb2a08890d96326755001dcddfa83dde02d3cc2855c40bebb465b5bc30ab8626537c44a69381bf27fa6ea7ab0b3648507fb19b03177b39bef985864f02d77dc962173f4df05d1230d87a2ce2ad815a6cdae8c28f06a6727f18d32dc6b3cb6f42bb182de45b28611cc123568e942633884af51e8737b054b41a425caf14256f38230b949d132c38a2e27d5bac5c8cf491970a204f7b05752ea39455022fd9c4725ccdc0a9e12757e150236915570914788e9686e080b1c3a59bcf81e9784c5112bf0429126b995a37ec489584b2d41a20fab6889eaf714c94552dded25a3219412452e4805dac4d2ab188d0f1f687321a53fe0efe0a02cea5d44ed9ef45a1f217a16b6a8f37d4fb85cf25809842ef24ff2fda7ee31b2fc3e0a218f42d143453ec27fd33e113ad3d50f62c261587d19ab7e1d87f7cf89ac1cd1932ec5486feffdbfd3cb2ff1c361d144e24c63a4097e8e7c3bb31ff1145a46d5bac14ad08b732d63048fd4faf9ccfdfa4c7dac01569692384fd15f51dcfbff3edfed9ea9011bee99e0d610a53b127e9abc5b0813af8299580813cc8b0c1a018bca7503ac2007bd2461b11cdc6dae416e36d098979e71d060e630cf008a979d65a214b9279608de1ee40805b98b6c197022b058c34c66624e72777b503db4ee80657680fb2564766d97504a17f6c4ae608d43302c0d319fe0a3c52530628764a6885fcad1105f42310fe2ce94425fa5133daf2fc38c440b5df4e894219f5dc166a8a7b188d913b015ca64f6", + "1872a0c07ed0c6d7066d02713ee4c64bec0136f00ace91359d7cd58b86f3d6cba92c665e1afa8e91ffcdb69781b807f6c42be99b8ec8a969e85b0972a44d759413d951372b8893258d10eaec4d4e04169e06acbd186a0663b2f8979bb735b5815b8c9692e0d641b14d40765001cfd561c1532b1f7432400e24cfd8897fb3ce33f0d5dd9a2276a6407ed080013a90e53d344c091a3b0ef84cf80e92b711cbb8402d3fba59647b74314df4b9656d73f5f959df68db3d5b85a7e5c8183daf57e79431c5df3c69931a6a733f53c279dd0263093ada4cd1f6f2e7e7364f3e8f369a44c1f3e1faf8dbf04431faee797a73bda62faf697d7ce78ff2d4e69b05396bc035cc7d6a922a8eda561e4da7f521e7451cc5cf6094906c54bfa548bb331339f6ec162f4f25e9e6be65dc37fd39bda59d9b33dff4df22da9ad19b534be3a996a6749468ead3683cd1935142291d4d9f742a4bb1ac8e5f266f21a4ad9b5399beeebf44c649d136cb32699cae3df9d7551d1608e362e5585f485564dfd6eff03499aa72fcf442e954a5544e95589574923e69ba4c5f5ea65f053aefffff8e576d517cfafb1fc3bf3225e3070000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:38 GMT", "content-type", "application/json", "transfer-encoding", @@ -79,7 +79,7 @@ "connection", "close", "cf-ray", - "74abb34fdcc4827a-IAD", + "75d3844d093ba700-PHX", "cache-control", "no-store", "content-encoding", @@ -93,13 +93,13 @@ "pragma", "no-cache", "x-correlation-id", - "74abb34fdcc4827a", + "75d3844d093ba700", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23969, 179174, 23998, 352938", + "468, 23997, 346061", "x-ratelimit-1m-reset", - "1443, 1442, 1442, 1441", + "22019, 22019, 22018", "server", "cloudflare", "x-proxy-request-url", @@ -110,16 +110,18 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=25502228M%2C25503045M&siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=25502228M%2C25503045M¤cy=USD&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 200, "response": [ - "1f8b0800000000000003d4976d4fdb3010c7bf8a75afd33c95b6232f010d0db1d18d4993982674b12fc1c3b123fbd25210df7d4a4ba73d694085a6ec9de3dc9dff773ffdf3700746379aa1c82350c808c5e73b909df764e50a0a383e9843045a4101f96492e679feea6dbfd1604dc7de756d5867acaf374b340c051c906152e210bdd2355af149f39538e74e854844c2a0af0922503a1c60a0536dafa1802be636144942aaa658e910b88ea56b1af292a4719d8a031a0a95f392fa1b895a26eb8393459e5c5c7c787d99a659e26ca2a841ab96e8290e8cac65324ace35531861dba227336a4612198dab134515768613b5cc643e4ef7aafd4dcd90ac4526f3e3384bf36c92cdf6e39393f4dde9511acf2fe2af6d0d11989f85dfdefa6a94a6591cd0aad2ddc45d48c7b1baf97b17ff52306b36f4081eb88ffe638af958968ae4e4f1a11c0c83e20e829f46f14b040b4dcb8fabb68fddc0ead13ed3ab0d29dd3543c33cc93399eee3743bb58dca21bb7517c52f6ad761822cb3bd19d1dee409631988617751bc8b631f78ed60d9d0a03143038d1352d319d1766c6b914336ec0e825fd4af83a4989758bd9a54f9e34319caebf5f9827731eb0656bfa9ed822c3bbf82e20e900314e3e92c8212e5b5f38a3c967df10a4da0870febef1997fdd3f98720f61d45d07afa3d31b093d7a7b420b3ae7f1f8171b63ea220bd6e593b0b059c755e941458043246db5ac86d273a08eb96a26b15f61d2efbc65028629457fd31a224c302ad12a16f371673d45e68de461e3ea012873d2b71cece93085764cc3a49737f42ed095954ce0bab2d8dd88d2abda07540492b67550c113418987c3faacdeacdaf7f1a7f18879604c5348bf7c6f71134da9ef521ef3bb4ac790545f60d0000ffffd4585b6fda3014fe2b56d44702cead04a469a254add48140a3add0a63e388913a23931721c3686f8", - "ef939d0b4540b8ed213c06ce39dff1b97cc73e0d25465175029586324701bebd7809af5f8fd6a7b21da6fc6b8cd95b2cde7a9b1f23c4967dc47140d95286fe378d709ca82ea17c16c681cae93cb346bdd4e56346232aa295cd22171142533e4c02e14dba0434c66040e300f471cc3103138c2230f915b22c3801e640071b93992d89db9fd1d0c523ff81c6693266d4c32e57c719aa2c7395a5040b1ef424816e41df59103c857fb007728d04f4229ac61cf41cbac040837007f0ce8252a5d0c814a4bc10dfc1908e15f6659664d9e540498ea45bbb48e59152978fb2621df939dc035d60a12388239951c66faf221392066f8c5ccdf049eb3bf67bcc9d3d13ea20d2726475abc58955e1b82a0fd32af9a139e311f94a501c7cc9195f38c4f17c8b0db8a4e855c9358247d60d658148e83d311a89ff0af5aea2430daa9aa66af62bb4ba1076216c42087f2852858528e659f5573253d932b204da50bb3775dbeed8ba21484dda11397e47241517bb95e2524299d255f26924ce11fe155dde193c2b6b518e17e199edb3f126c32bf00c7836def0f10a3ccb3c1b6f3a50d6727a174a3dce59e8a43cbf61cb999ca99793a49f7f2e72fb3f57c53f0394324cf60d2a29fbc983f587bcca0bebd295d2f824fbdab53da9322bf3d428658795b222c61bd941a5aca8b78decb45a5804f3233bd9e1ada1014deba4ade123e5608c38c72c2ec75a6d374dd0355c5733f5bd8b1b5b33ade6cb8bf1ed7d3aadcb83e602878babf0fec47c7acadc54e63ca7e34343778e07a2268f980b1c3e96b993b78387325bcf7592edda9a6378dafee54c1dbbf2128faf6ecb7a26cff4b18f3a967542286ad29897787c5e67566d010f65b7969b23db46b063b7eff72e62fe6b63fe030000ffffecd8410b82301407f0af323c579a92b2aeddbb74e8186b1a8ea2857b151dfaeea13693d28d99c288ae63f27f6ff8c4fdfa1a4cf382bf9e4b3be536da524231d51f842553d9a160b3a1546a1f1e58fb70b3f6ad13049cef11a44c207a204230faf282fcce2eb1402ac08d9f33b423179e314850cc019dcace9530277fe65baf6bfec48b3430d774ca8d24d77353753d6baba1d6c5879b558b7f37b3dacd7a7e6d8622ae98c3f8195339975bcd989db82547e00d63022f08b137d3624cf1d935c12d55ded437ced362932a2f088df30a6cea9ae763e3bc02ef7ac62d172d5276e46ae32a0bf965e31a3974c3c432b94222406eca9756443e946f020ee4e0ccfdfb030000ffff0300dcba46565b270000" + "1f8b0800000000000003000000ffff", + "d497db4edc3010865fc59aeb6c4e4b80cd25a0a2225a68695589aa42137b125c1c3bb227bb2c8877afb20b554f2ab042557ae73833e37fe6d39fc32d18dd6a86328f402123949f6f41f6de93954b28e1e3d90144a015949017459ae7f9ee9b61a3c5860ebdebbbb0ca585daf9768184ad823c3a4c43e7aa51bb4e293e64b71c6bd0a91888441df1044a074d8c340c7da5e410997cc5d2893845443b1d22170134bd7b6e42549e37a150734146ae7250d3712b548560727f33c393f7fffea224db3c4d944518b562dd0531c1859cb64929c69a630c1ae434f66d24e24321ad7248a6aec0d276a91c97c9a6ed5b375cd90ac4426a7877196e65991edcce2a3a3f4edf1411a9f9ec75fbb0622303f0bbfb9f1f5244db338a05595bb8efb904e6375fdf72efea560d66ce8113c7017fdc714f3a9ac14c9e2f1a1ec8d83e206829f46f14b04734d8b0fcb6e885dc31ad03ed3ab2d29ddb763c35ce4994c67b8fd30b5b5ca31bb7513c52f6ad77182acb2ad1da2ade209631989613751bc8963ef796d60d9d0a23163038d05a9ed1da287b1ad448ed9b01b087e51bf8e92625e61bd5bd4f9e34319cbebf5f9823731eb1ad6b0a9ed9c2c3bbf84f216900394d36237820ae595f38a3c5643f11a4da0fb0febef1917c3d3f98720f63d45d079fa3d31b09357c73427b3aa7f178171b639a020bdee583b0b259cf45e541458043246db46c8874e7410d62d44df291c3a5c0c8da150c4282f8763444586055a25c2d06e2c4e517ba1f92172ff1e95d81f588933769e44b8246356499a87131a4fc8a2765e586d69c26e52eb39ad022a5a3aab6288a0c5c0e48751ad57af7ffdd3f8c338b4242867453c9bdd45d06a7b3284bcebd1b2e6259459f40d0000ffff", + "ec58ed6eda30147d152bda4f529c844082344d94aa953a58d1683bb4a9aa1cc740d41023c7a16315ef3ed9f9808a101a68a530ed67e0de7beeb7eda30468565c40a5a6ccd1849c5ebe84d7b77bfb53799da6e46b40d85d20de7aeb1f67882dbb889309654b99fa673a2341a8629ff2a9174c544ee7b135ea46980f189d5191adf82cc2c8f769c4fbe14478132d010d08e8d16002ba24e08481214133307cf2589c9c09e140076b93b12d89db9d520f939bf1390da270c0a84b30570731aa6c7395453e117bd0950bf415f42713824bef377141a21182ce8c4601071d872e08d020dc02fc6442a9926ac40a525e886f6148c752fbb24ab2ed12a03041d2cd6da42ca408f39bb8596fc609dc395d10a123164738a58c9f5e47867e34b963fed11b3eac7f27e30ec3d32b9f3ac8af3bb2bbd534625538aeca60ead97e389bf299ffc547c1e433091eef86c21d4ee6af7601970bfa25db34628bac6aca02f99e7bc9e84cfc971c1762f5400daa9aa66ad62d34db10b6213c8310fe54a40af350c0e3de2fdc4bd9c0c8066841add9d02dcbb67443ac34694754f81ef991b8d6bd2898fa94296d25398b441cde1f31e376ef4a5989663c08afd12a8d37ec1f8167c0d278fd8b23f0cc4669bc514f59c9b33b55ea70ce3c27e2c9fd5a9ec8b17a768e7493cf4562ffd74bfa4f0f458cf879c79494ddf060f5202ff2c2ba7425333e8cbfb66d0f8bccca3ad532d97ea1acc8f15ab657282bfa6d2d3b2a1616c97c8823dbcd191ab061be8933bca01c0c10e78405d9a156599e09620363ada1e7d23696d630cfaeaf8daff7a351559e3307389c5e84f30bb3f19039a9cab98e3d8686eeec4f44459e300738bcaf726fe6067755b69a6492852dcd315c2d9f9aa9e2541ee2f1d16359cde235c6648c6cd37c432a2a329887785c6e328b38c05dd5ad246f645908da56ab994bc3547230cb3b7cf45c5693b76d3918611bef4f4445a6f20087cb0d6521d767b73e96ebb35bb95cdf0f0238a54f804fbd10601f85a187d76c8178b1a75441ca012c69c4c0182d28f338012ee5601e475e48cba597f99dcfb5e67e5a2e2fcbb984dc3b07b5c99dedf261238a2dd6acf99f353b09d6ec9ddbe6a3082e97723581c958ae7a366355a4b69af9548c018da60dcdbd548c5cba65a8ad223c4d2f8db7976a2ac2339aa5f124d574289e6e97c693d4dd3b535b75d09d7a012d66b86247fe6586aba6e0472ffc469e3909792a247e1aa254490871ca91afb4f5d55f000000ffff", + "03003ee7503a57270000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:59 GMT", + "Thu, 20 Oct 2022 17:36:38 GMT", "content-type", "application/json;charset=UTF-8", "transfer-encoding", @@ -127,11 +129,11 @@ "connection", "close", "cf-ray", - "74abb351ba58cec0-IAD", + "75d3844f39431b1e-PHX", "allow", "GET, HEAD, OPTIONS", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "vary", @@ -143,9 +145,9 @@ "x-content-type-options", "nosniff, nosniff", "x-correlation-id", - "74abb351ba58cec0", + "75d3844f39431b1e", "x-envoy-upstream-service-time", - "105", + "99", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", @@ -159,7 +161,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=25502228M%2C25503045M&siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=25502228M%2C25503045M¤cy=USD&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/useproducts-returns-error.json b/packages/commerce-sdk-react/mock-responses/useproducts-returns-error.json index 902a0ca0aa..de7a290ac3 100644 --- a/packages/commerce-sdk-react/mock-responses/useproducts-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/useproducts-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=17%2C22%2C12%2C15%2C19%2C21%2C14%2C18%2C8%2C4%2C12%2C20%2C20%2C20%2C20%2C21%2C1%2C19%2C25%2C5%2C25%2C24%2C25%2C10%2C11%2C7&siteId=RefArchGlobal", + "path": "/mobify/proxy/api/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=10%2C22%2C4%2C1%2C9%2C11%2C9%2C2%2C15%2C24%2C23%2C11%2C24%2C7%2C25%2C8%2C7%2C22%2C3%2C3%2C23%2C25%2C23%2C15%2C23%2C8¤cy=USD&locale=en-US&siteId=RefArchGlobal", "body": "", "status": 400, "response": { @@ -12,7 +12,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:59 GMT", + "Thu, 20 Oct 2022 17:36:38 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -20,17 +20,17 @@ "connection", "close", "host", - "lb001-mprd-use1.cloudhub.commercecloud.salesforce.com", + "lb002-mprd-use1.cloudhub.commercecloud.salesforce.com", "cf-ew-via", "15", "cdn-loop", "cloudflare; subreqs=1", "x-real-ip", - "172.70.134.245", + "162.158.142.126", "x-forwarded-proto", "https", "cf-ray", - "74abb3544b4558ba-IAD", + "75d38452cb54a726-PHX", "accept-encoding", "gzip", "accept", @@ -44,17 +44,17 @@ "_is_allowed", "true", "cf-connecting-ip", - "204.14.236.215", + "13.110.54.10", "cf-visitor", "{\"scheme\":\"https\"}", "cf-worker", "commerce-api-eu.api.commercecloud.salesforce.com", "true-client-ip", - "204.14.236.215", + "13.110.54.10", "x-correlation-id", - "74abb3544b4558ba", + "75d38452cb54a726", "x-forwarded-for", - "204.14.236.215, 172.70.134.245", + "13.110.54.10, 162.158.142.126", "x-forwarded-host", "kv7kzm78.api.commercecloud.salesforce.com", "x-forwarded-proto-real", @@ -74,7 +74,7 @@ "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=17%2C22%2C12%2C15%2C19%2C21%2C14%2C18%2C8%2C4%2C12%2C20%2C20%2C20%2C20%2C21%2C1%2C19%2C25%2C5%2C25%2C24%2C25%2C10%2C11%2C7&siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zzrf_001/products?ids=10%2C22%2C4%2C1%2C9%2C11%2C9%2C2%2C15%2C24%2C23%2C11%2C24%2C7%2C25%2C8%2C7%2C22%2C3%2C3%2C23%2C25%2C23%2C15%2C23%2C8¤cy=USD&locale=en-US&siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-data.json b/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-data.json index 6d59927580..20c3a2efa7 100644 --- a/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-data.json @@ -2,21 +2,21 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=Y49L9Uv-KvepvnpN0SOEylDIZ_w8wspXQ15M6SZgQE0", + "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=TR68GlUUf63dwIHqNR8xr4x2MfxEfTWiywqbvJEn6Ic", "body": "", "status": 303, "response": "", "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:37 GMT", "content-length", "0", "connection", "close", "location", - "http://localhost:3000/callback?usid=9119db74-0053-4e06-b1a1-e33c615302bf&code=0s3MZ5PrLVpAvN-rjkZKc6vP1G2eD1uBq-WD2xsTD5U", + "http://localhost:3000/callback?usid=913d9ed2-12ea-497d-8290-f47e80c0524d&code=TnQdOM-ZXRKu8hgXG9E-TImneSl85FuN5ZpxcnlOHkw", "cf-ray", - "74abb34f3ddd5740-IAD", + "75d384494caba6fc-PHX", "cache-control", "no-store", "strict-transport-security", @@ -26,32 +26,32 @@ "pragma", "no-cache", "x-correlation-id", - "74abb34f3ddd5740", + "75d384494caba6fc", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23970, 179176, 23999, 352954", + "470, 23998, 346317", "x-ratelimit-1m-reset", - "1532, 1532, 1531, 1530", + "22615, 22615, 22614", "vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=Y49L9Uv-KvepvnpN0SOEylDIZ_w8wspXQ15M6SZgQE0" + "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=TR68GlUUf63dwIHqNR8xr4x2MfxEfTWiywqbvJEn6Ic" ], "responseIsBinary": false }, { "scope": "http://localhost:3000", "method": "GET", - "path": "/callback?usid=9119db74-0053-4e06-b1a1-e33c615302bf&code=0s3MZ5PrLVpAvN-rjkZKc6vP1G2eD1uBq-WD2xsTD5U", + "path": "/callback?usid=913d9ed2-12ea-497d-8290-f47e80c0524d&code=TnQdOM-ZXRKu8hgXG9E-TImneSl85FuN5ZpxcnlOHkw", "body": "", "status": 200, "response": "", "rawHeaders": [ "Date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:37 GMT", "Connection", "close", "Transfer-Encoding", @@ -63,15 +63,15 @@ "scope": "http://localhost:3000", "method": "POST", "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=0s3MZ5PrLVpAvN-rjkZKc6vP1G2eD1uBq-WD2xsTD5U&code_verifier=yAKo_CGMbnoO_RtfWkgz4XJGfy0ZFHPbxtvecdqOCM22RyrlmJilShczb-uthaCbEw4FVPsTfoU1hvS9wBAYCO3ZARHlRUyK3f3zIGXj_xnlEaUHTr2GWYSQc83Ie8gz&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=9119db74-0053-4e06-b1a1-e33c615302bf", + "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=TnQdOM-ZXRKu8hgXG9E-TImneSl85FuN5ZpxcnlOHkw&code_verifier=8fXOvWHCva7Pd1t7RiOcJntolASvgul2lT3mBgCnpF_p4hmqE4NDK8vT6GucdJrTQh5Z26a4Ew86dwmy6DIihoOvzEAjeqfhBhp9z1TYhjMAbpSzhDuVlplr5D71tPEx&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=913d9ed2-12ea-497d-8290-f47e80c0524d", "status": 200, "response": [ - "1f8b08000000000000008d554d93a33610bdefaf989a739c42023c26371b0c8641226631202e2e1078cca73d3618432aff3d92677733c97a77b638506afae3f5ebd6e3af4f0f0f8f31a5d9f9bc6d0f65d63c3efcf1f0980d168c42337772f36a17f3dc56add758dcb0b33526863edae26248e0fa9235c721aa663dd296dce714076b1e23e2c02d51b191b00a0aa495d0f6d6908ca425de1ca001eca3222a51ad9751b11111dcf058210be73cff6b2aaef9b94856849f9f512e8d7671b3ed1383729bbe194d80734bf99d01dda7212f6aadfc4db534f33ea710f7667160efa820833cc686d253c31fec00c824c04522fa5daaca3909f1290addd15ce19a40d451b8bfd0d5a2a23968b3402f085440d2ac3bc29aa1b53f52e8dff3ed69ad946980053a2cc6a8c685dde043222e7a46601b19d5c8f230322dd90e714542ab88d5effd92b0da13882f69200b7663891f61a2862e2701ebc3a83a2aba431a802a69eef652a4211612082adaa02e3194260ea4970fb8b9d0dae5fe77fc3060f52eacf64007798882f4c8ceaccef73d915a1f63e8335ec04ff2fda7ee3e32dc210af11885ac87867ee4ff8dfb84f19cae7e1013f265750111dd731cde9f135d59ac27458803a5bbf7fd4e2fbf848f84551bb199c681ccf059e036b31fe1645c46cdba25d01fd85ceb38c0fbd4f8f9cefdfa4e7dcc0181bac0e6c9faabaa7bdfdfe7bbdd33d1cff93d63d85a0aaf7b3a1ea6ef0461ea34b860823025635560cdcfa37add22c32fd1200824580eb657ca785cb6585bd48ef622e3c2ca1d0d41a738020aabd229ca2bf2aa921454b0bd", - "798f3dd46263d3e31ce428585eed603322c81e8fbd352b8f72f36cd658c854736a36f84c42c44583ed27fa48b8980fd39062c9e27510f1f81ab37d6077a666fcc22beb797de13b12a90aebd1aac371dea3cfbc9ecceb4e91c758189712f636bda3726e5c9973e3b3f9d01b2ea60339c7e51f236336fdca571a2e3aa74c01db7981f71d07eeb7b3a9fbec1e9853a74edf78ac71cbf00449e8f72ebc92045827b697710cd22808f7031357e68b0fdcd754794d5fa2ea3b6c231a39b638d00586ed8a0b3222ef05305e252ef0a951729e345422c1d1361015f3aba391def69692e3cd211e5f64a4a101794b883426c0c55ae2e28eb5b98c3f333186a6f76a74ad72dda9b9ae75d26c58772ad9da7feadea216c3c9dcd12607df12dc57b19f1d574adc58d198516b683ab1552ef9b4934e45a0ce9fd5a7c9eb65b65859f9f3a67ffc8dffa2f2f4ddefe9cd74ca76a7ecbc7f67af74e1703e36f910ed8c64b74a4f0415bb3de92ae9f96c9e5797f5cbeef3a8ab9db05ebea5c8aec79ce5d8e6b7783013849bf99671db0ec7ec9676b19cbb4bf72da23be7e9cda800a0a4c993341104599c4899309d242006934c14e914c8a20093dd5b08edceeda1ce4edb2f9109ad4fd4afbba3518507b74ce2a80c08b99e62e10ba8866ebbf3bffe719acc44103fedd27426a629c8602c0a0acd9e6405a4bbddec2b41c7edffffe34d57559ffefe07a22efd6ee3070000" + "1f8b08000000000000008d55cb96a33610ddcf57f4e9753a0784b14d767e81612c11b00d888d0f48d8e669b75f3c72f2ef29b967269d8c677a569c926e55ddba552afefaf4f4f41c31969ccf9bcb214faae7a73f9e9e93d6426160a6766a368b6c942e26d66ba4acc1b6bad8d0bb85326e63e4dc92ead886c5b0c6d399c09c22df113e3d9c7945e8cf5a9a4a0d41b85bac5c615fe88aecc9442e48b7aec395a952846b8ad6c2574a829188ffca1547d8593ca7c2fe8cd35eb7c8ee67fbd860e24c5f77a64c524bfb1d88ee7920925a736f5dccccb44e1922b5991de01b66b455bbc8d06a6678edc29755ea932c56bc2b9fa8290dc8290cdcce9c9312885c19dadfd87c5cb054be24be9e51a4c971e55ca9efe6acf43a86bc47d89a955ace7d22b176dc8525c9161539c4cab806012fa151741007c4b4d445400a1a585934f91e1707c59e2272e3be2a2d2a4bf98813337435f6a10ea3b832c56db92f1771f5b0968c07448a915cb00a5f6343ab22bfb7fb409b1b2b5d817f802332e4bb41ee96b56a1bfafc0836e4f9be265aea5d843cd045fe49bcffe4dd8786db8601e9c2006aa8d847f86fdac7a0339fffc02710c3eaca5471cf51f0b84f6c6e414d9a14f9daf5d1fd835a7e891f0d8a4b083d8d7c15f859f2bd673fe2095a869573a1c86ba1af65e4933d377e3e73bf3e531f6b40912e413fa1bea27874ff3edefd9d295e2ade1970bb30d4ec5977e8bf5b087dbb22192c843eed8a8c4cbd342c9d0b36bc1cb7924461392c56b94abad9854cc7a53ddda924b3527b8a919d1d65868adccef20623470d7d07b0b3562c1032cd957022c182c9eb854f2582d63d6ce09aac4c299c9867b324523231fb6645ce34c06269c07ce28f16176060876433f0d7e550f89704e601de4c09faa2066a766e6246c28906355a65d08d6abc14f9d4344ccd3e5e813299d9231d", + "46a415dab8aad0c683feb054e0600fa48297770c8d61ffab5e3c185fed9ccb30f392a83bf2dd6fb6a97bf00eccbe5df2371d7deb027c6862589f97d53e0d65ebc4cafd67aee8a1efcbad93e78025078135ef5a783d36f9979bbd9aa9825be4eb12706b086c139ced14dce58a58f0dcc8854e539c63c99eaee16ed4d8535a83f6e03b42a4dba9788a5b3235e1ce010c93ec15ebf0ca446409cbf82a1b03e3f5605771fdaa61bd1e9ef52abe31dccca89ff21e926ef3656f571369f752eea2e3917b5b92f13fcf83cc3b145b95d5cd08a72f276599dd069132d83a9eb3abeae7dfc42f2ae5ef7e4f6f47a7647b4acefb77e7fd5839d6db5549c75d3cc378ab337999cbeaf29885e736e3133e70e8ae3150571dde4224cd3185189bf4ee2f0f25e97e7c8fb8b9b4c7e41e763c1bb933f7cde37a4ef9fd509315ae251cbdc828895e7ada80bf0c9126bd6c7b8364283149453dfee6c2aee7cba14c4e9b2f9e515c9e58d0c496d5c43b373fedadfa95d2f23436bf90aad8e67a7e87e7f15091a3c196f3a1c2b99ca0489134960c544de6dbedf0ab40c7cdffffe3d5b5283efdfd0fc6d8c393e3070000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:58 GMT", + "Thu, 20 Oct 2022 17:36:38 GMT", "content-type", "application/json", "transfer-encoding", @@ -79,7 +79,7 @@ "connection", "close", "cf-ray", - "74abb351bd1f7fd5-IAD", + "75d3844d1958a714-PHX", "cache-control", "no-store", "content-encoding", @@ -93,13 +93,13 @@ "pragma", "no-cache", "x-correlation-id", - "74abb351bd1f7fd5", + "75d3844d1958a714", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23968, 179171, 23998, 352900", + "467, 23996, 346057", "x-ratelimit-1m-reset", - "1145, 1144, 1144, 1143", + "22013, 22012, 22011", "server", "cloudflare", "x-proxy-request-url", @@ -110,18 +110,21 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280..50%29", + "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280..50%29¤cy=USD&locale=en-US", "body": "", "status": 200, "response": [ - "1f8b0800000000000003ec5d5b739b46147ecfaf60f4d0271bed7d97bcc5719d5ab53b9e28d378d2e97490586c1a243c80ec249dfef70e5891750119ce52155c5e32b1d0772ebb8bbe73ce9e85bf5e59d6200c66413a786d117e94fd791ba4c9e0b5f5db2bcbb2acbff27f2d6b305dc4b19e4fbf0e5e5b8377275783a3ef176e83f4c3d73b9d7d3e739354c74f9782997b935df82ec4b2066e98691a8cd338b8d39e35be0de2f4c83ab24237bed12ba4650dbc203971137d11cc3f6780db34bd4b5e0f87dabbd1b61724497a634fa3d94cc7533d0da38567276ea8133f8aa73abb30f41e86b9fae13d197efaf4feec0f84f0309a0f3d3d73e7de831b6b3b49dd34980e8f87e320d5c9b17b77e7c63a3c9e1d4fddd40da39ba1a77d7711a643ef41b84cbafe843eca4c86b9b9c3ab77364604534cb93d1a39bf8edf70fbea93fde7ddcdba27e1960bdfbec5fe3142d84edcb93789bed88b0451dbfbb2df9fffc4f43448435d305f83e557fe5e4d75147b3a7627f9b7d378a15717eee2609a7d48844de8daa791b798a6e75e269c708e1553ec72b07dfd1777b6ab7ee75bcbe5b7b6ca960bf1d1941d5b637d17eb44cf53ed5d3d4ad84407b9551261c188e24c0a7439a820e4e9a659bf719e93b826f319503640b5410e0680a45c072dfff7fbcaf57b370edc3488e66fd2340e268b543febfa340aa3786d6559d660be9cdbb751182db6aeddbbe1624be8b6e00d19efa3af6e685d2ec234d810b477696e6acbc42c6f84c1c617fe5efbebf78a439904df74b1b7e39d2b757d1d9b78e88c2fb7bc3baaa6f5d248ebe5294ceb8591d68b7730add7666aaf2f2a2da057eb9f2c4dfb97d8f6ca0d92507fed0cdbfa628ab0f4451165512211b24723747a7a7ddd3eb635317dc5b65bf305615b65635ecab60ec6d42967db0df587645bca24e18e6a906db72556e2c00c2430068010eb18719e84eef4b3f583f5f13648b51975e6abbaa7ce174a9dff3987752d63443e459ea4a898088414f668f433156de43013d30f96313a1813dec28c31e3012a45c31cb62eb1321d3104005145012007758cf8debab117ccddd07aaf3deb072be74133fecbef88", - "9efffad4f145a58ebf44c7e77134b73ee82fe922d69e751aeb24e90c0b3b8afa5cb0022ae32384a8fc71647ffce9fcc38f6727eda36123db573cbc7f0201b44cb1ed3865b42c10637c0f2defb3e6602cad30c3420aec3456d72d90f83c772e4114710088033411c7018014018024c0274220a327244013058028150010810c39a6004d9201400ca209435684500010020c3961f5074262a7fe8a90842b000851008840cc631800c20800a2802127820340920040ca01809cfa6b4f5204308f6280799440cca380b5472560195101581194752d8b1c87ae59d9747cf1e6e4e2ec04966c18176d97e163bb9356cc2c3c24266e62c661038cb9915a8ea06a8d3de6508f85915a01f558187b2ca01e4b23b512eab134f658423d56466a15d46365ecb1827aec18a975801e1364a29620a85aa341260499f3c143e0a5b7c584f071f7525d46a06448a9898f6f60034bd9901a31c249eb36d542adef75989560ae42eda61dda5f639a5257615dd8d698e573f668748e791bf7d74c4c7fda5f2b9d3a404d8f311b8bf2ad36c2b2a4b574abadc49243eeba3144085eab8098efba6d4bacb4179683eab69b642082209a14ee58bed4409b497e63f4db6cbb5afb6db60e6fb39d0569febba9dd598738d8679c0b8fb02222435871d55e0e36317dc5c185b306d95223b6d877368266e705cae8b7c088039f90208caa664f486c48ac7a6e8130c60120e100409cf4ccdb336fcfbcdd67de93459a4673eb2c8ee669678857f9482932e5851d9a4cd01613af89e92be22d9a3448da2b6dba2fede55895f3eeae0d074e78d57a13482309afaad756f21d04c89255bdbe8def2055f35006c328a36b00a86ebf6d0eaadb3a9b8336e38fff6f285191807e8a52eb2afb09333340923e96e963993e9669411181fad499505918102042b280e013c2ad2c221898de742c43a52dcb6319c1a544ed8d65b8945c341acb6c4aac1861702995048004058064d79a9d1a78bc427e33f4b4dbd3ee8ba2dd533d0f668f3f9bd6c89d7ed65da05de22beebb9e53c85d580a963d1648b6b2846062fa8a768b260d42bbc896b89c7619cbfa74cb6877d786839e54a54c31469a3ca9ba25b1daf9d10c242900c41d0048888ed1eef9dc0b6e22c3c71ac9be74dff3ee4be3ddf70bdf0fb5b5d67fd4959c97ea89ef283d2962308659fe4cbe96d6ef4d4c5f916fe9cc418af8c876f615f105dfd3bb5662c861b35f4a65c3ad6b9b122be6a494cadaf5f50c54bfdf8d528500e6290c304fd58d47721081f844795fc9afc1476fa3d80dadf1626e5853e0aa8f6dfad8e66596f24fa3877977ba122672e2fbda2deca95342382dee4a30307dbb92bf3e678df7e26325b287173c53c87f32e1b0ad808251d9ecc3923725566cd0cbf81800a2758bffb9260c0051a76b0f8afc7ff40f5e9b31f5f518c65e7d7cd0c707756b1f51182ed3d6cec4079c4b32717461eb1f7610a7eddde93731fda9eab13b67cdbf48413a7c4fd3e28e09878d0f30276b397c13f1c1a6c48a048c39a95b15c8414401409dab0af4fbfc3de7f69cfb427272220976092b4b6c65465cf4d7eb566ef31b987ee89c9cb53927cf9fc8d9684ebe2eb17aa62c0800a40400e450004876ad117f1c84f73a6ee2b547f96dd4a7e67d98d08709cda6e667e1e3265747a205ccd164223d5c44b9843adc696f866e627a6186be39758dbf834930c950b5447ddd92c3beca8260daf0eb983625567cc104c18c4040759b0c7210eeda4375fa7cbd27e29e880b88f8229adfac8a9ddd7ab28e6298306f4a0ad98c3b2c3b59464edfb5722bddc0f41511974f1da4479fdbb8f48d155c3948ecc9decb2c392c1123c950b344bc29b1223d22c9980080a80300110200d57db3720ec21c00e2f45071c23f000000ffffec5ddb6ea33818beef5358", - "b958cd5e240203065fb61d6976bbd34ed556aa76a4d5ca0137414b7016c8647ab14f336f324fb6e210086043384c062a6ec1ffefcfc7cfc7cfc3d9c28fdaedb0c7096a97144a92da8e3b51b75851bb588d6eb11a2dd5943bc91a4b725bfd68d82d5ad832da6e154a567f8610bb24a3014b0d8f711f65f9a298d0805470d55f9586bb32d2053a4f6eb8a72d95ca6b1ba15e817692e4f04fdd5d092ff26309f7ac5c70ecf1643d012cb7903bc0b08572015626e582218e7ca615926985a421295f3bc4f76d138c523848d6898a2c8ab8bca6434d1dee75832ed0534aae2abc76ef7a56882122151915db15622ce75534c08671f4a4611f8a06798f27ea0c60c368aaa418193515458c8cf4e92ec144c7131dbf013a7e0c3c7b4bad514e905568a8042f9140d757458b9b9b2b0d5e4a037c8fa703f46c822c2ebbded5fc30d4aa0e1c0aa19c5ba018c9b867816224e3e6b2c148515a1841d4c268742f981ee474c135db2c3baa0c456d6422e58994dfd6d33cf1e9ab279b8e6c7e4c9750d10d68089e9933f07019b90bf4ec751e41c1fd008d21c5a850f9e3e338f7eb7812327a7e1defd8e3c96fd649066c6184710b237d6c17ef262e9eb878e2e2caa3f5d4215fa9057287b2c6a2732fbf587449b862f1d040485edcdc3c6369903af71da06767ebc565d7fbd33d48d35095ea9f08ca794959465aaf37f38a1e4fa44a19693a6e6184951646066a6184c6f6da9e4bf7c009804fc9c6f6036076e7f3a8794d37f4a661c4348ce841b09fed960e05d7cc7188070ecba5631948e84b1d418bffea8c8c6236fe4341431c4874819e29f757955eeff7f4b084ab5edfad0073de1b020843d8ab967fc1e38907e31186cd6f08200c35a5859132b61bfbd7c4b36c9738e0815ae01770e510b3e34376516b99e6f91341bfc18df0f206e6620c1be1ca8b2a139d2b15a76a6ab49bfcfeca18223d77815ed808e7965ddf2bef08eb9aaad66d8473a09c759eaf188622f5fa526fc1e36913e9d008aa2d8c9a0adc4646cad86ed17ffc7db54e96df3fd04d1f4bf0514b99a879a2e6b77ba93e7ab9ecd90ed6e0691f2e74bda701b19d119034921445d1115f5b0ecac818eed9f12ed0f9f7eb45a5d8fb7378b281abe8fa0450e795cec31a3460afd279798f276ad3614d91b4e646b0e9ae7914933cb6b5f6e934f9c4d413537398fadea124088f01dbcb516e98536db954a02571894e36e490e8e4cbbb21727417e82947d794df0f6067a58a9d2be19c97973528ebb8575ece7b3c912db5f0645a7323b9b93aad0665636cefd626eab41f3cfada8d9da38632b1f3c4ce6f6b897bcdbce0d0873e9095435cf0b861e63fe359e936916c9a1656b9cbc5ba8607ac89d2057ab6d25d5b847d4bcd23aca9aa5cb1e05d83e8acebdeb2a662add775ef82c7d356a343a3c6efda86464d2f634746a3bb8c3d69a34c043d5682be489ad6ecdf1df5225ef6d3c9c8cca32fb64b37d43dea5d522e2787e617f7ace6cab6b2bed1214beac4c73502ba625e367ee5d5bb5c4d5edbc135dbb961afa8e42a6ceaf38eeec1a5e7d95f88e373ea74727a941c42d4b69de318113fca67b6a1ae28b27dfcb3493c323f9a5b712485282a8759c5a2f93b2bc8eb5c5778544ef97eb0492949fcb45c517b55e87212ce8a7aef18dab21c284d71eca049ae420192d219211e9272a00c49f4af09122442b2abcf925298231cbb661922289a3bf2e5b50e865b0a93c288cc7b8071e5b1bd5b9b1de540597e44ff7a68771f3c4a6b91acca815224b1831eea6a69aecf07f22ac6f1da47867cf2885bdf7a1927540a2571d1048cc607139e28a883b22d85498144e63de4c9fdcedb3ab579b2e584caa0c43f7ba8270fd4aa43e21583a43042e34619222898f2be1107c6be1c2805123be8a12bf9933a0edbd7", - "4179e5844ab1242e9a80d1052c6efb26751ce252b6f3eb306dc48153687987ed0601f1e4b84cfcf7f9ef4d466782e47fff06253007dfbfa97881b12049efa0b45868d2afcdeaa1248a518b63c455316ad262214bb9289b8da26cff8eee395978341e6d959182fe261cee0bd212fd6a978ca5475cde40fdea15c4bf0af3029f12cf5cdfaf3de2d3c7dd6a45fdb0eefae99ac5cc8f3f522b0e739ce4a3550dfa9598c12d09cc75692233db4686d9dce3e23859c9c43f8be6897a1b4124ccb357e1d9f030487e2a9304080ab6e5e9d8cc649bad43031a66d60b71fcc28c6b6632cfa3a6f87f4542f365984b6b7ebef6573e072e92429df9d489a27ec8cdcb927238ac7ecdde652d2b31635e60bbab4fdb43c9156672763214f783f926044e7d5efda07e006e93dfdc8a6667fdccdc61fb79c0e66b7bb516f539e023db8327067e0bc3d43a0c3d851e8ffbefa2c3d0130858e8b8da61b460360fa7dd73e29bd4b56c77c5f51a0504e1d220b80473f0f964b7163dd5ef67300797557e850df6a8b5720d37cc0fe65bb6dd398437e3bb657e00ee93df156e02b69dfbd471a8c7ab164f6c0b1e93bf859e83bdbcf834e5ec59c002e244b471f1dfff000000ffff030081c4f30734df0000" + "1f8b0800000000000003000000ffffd496db6eda4010865f05cd45af8cbd8b0dc6be4b8a1a154185e2a645a9a26af10eb0cdfaa0dd75128278f7ca364948b0ac2a3d28bddc99dffe673cb39fbc0529126120a49e056b613484dfb610174a611a6f20848b680455e6f32647082161daa0020b44c25608e116983410426494c89177a2b550c6ea581dc9d40ac1022ef429d33811e93584b03626d7a1e3205fa1cd85d66665c75992a08a319659c16dcd24ea65a6622c130ebf752a27e7a6e75c5e9e7ff84e0875b2d4e198b094df3285b636cc88d8e93a9130a8bb2ccf9942d94dba31334c662b87e39215d238fc76c03c9f2d176efd4eed54453ab3339b921e75a9dbb7c7e3e04b74d2b76797f68f7c0516c8e785dfdfab6597106a6b96f2457667179ab836bf6befe25f166c8491783c11d85990298e8a2dcab451055a902b1123841eb183607f9aa1ba48cb8d780c66bc88cd470e21f4fa7d3af486de141ee39f587264f694ad9766fbb03595ebce0285b9428da9413eab85a54894163ea103af37ec7bfe804ca1515bef68a3fa285cd6da100e6863d8f7a7b0bbb2e08629c18cc8d21363945814060f3ce34c66e50548ebcedfef8f374c167bd93e739e6d98ec4c0b6904347cfbea0108613f40d85d3d56a4c53d3e3944f5e9d8206a7b6d10d52deeb5d356ed7474a89db46a276787da79bb783e29fbaa3a7b0554664c68899b370e95e52026d45f0e9aeea8dbf309b1c763321acde76f052aaf28f8012a2f26d20a15b7092a6e1354024adde0182acfcc7e1b2aaee7f7fac1f017a172a07e191e50da1826de9fa4c7a964f175e75de7eb5a186ce74735abff8a1faf47c25ff8cff8090000ffffc25d2400000000ffffecd8cf4bc3301407f07f25276f8efc7a2fc9553771113ccc81e0adda5486b5854ec53f5fda39c5e551bbae831e76fdf26802aff990bcde278c678aa74671fa84a1c189f7370ac743428f0d1ff79ee1849070ec7b467d6c95c13d48f8aede8d3527636515193b3ea414974995ae8a24678b90b233d6c0d10e46d3c9d38523d6651a8ad5ebe6e7623e797a09e325466616b22475e489150675fd3230301e627a6c784b0cd59656670ce58ca19c41ad25c6cec42b1e8e8dd2566bd915", + "9bdfea28368a8cc19131e290d8cc8b74f55cfef39ea9bb78e225e66551e639bbcb43f80823bfc00018f9e802907307c7414dbc7fe0623cbaf4d8f05617a22b430d4b8c031be3122d38c0c04480dc3c4b3a0d4c7eaaa33826a789a525630543dad26154d2b4f0444b4ccb6d793eafca822dc3e7db7b155236adc27a3d72659c5519a0265e1de0395766e627f7d7f3e5ecea622cccf4d9f1d699f616b592e328721c410e72ad817837b5ad7d983e5668810685eb34aefd5bbd1b2b0e640c64b5748e8cad2463437e5b4a7a27588f82bf000000ffff", + "ec59cb6ac33010fc15ff41a45d492b1de340a0905b0e3ddb75a0011343e2d0df2f79d64aa6721a7c7021470fc3686589b567f69ecd10667610265ca066c816036183d91aefd279082b582019b4a4e8807629643d84154398b088d110d60ac20c0b2467212c04611f201cd03b11565084351461c2220cdf090bdc3c3bb84b3683c604cbba480789cbc5345fccf3ee27ab377c3c37bb27bec8da647a42296d6d6cb7166d9364ab6272afba8dd55d92ec6275d7abee627549922556975e7589d57d92ec6375dfabee63f5902487489d548a4c2a2627cb2052dd6bf5b5aedacf9f7bf57e7ebcbf584c13e694f0b45b039b09272f563e94e19bd7cdb6a847fe47a6ad2a4ba934b251c4c186b1f9be270a46be2f3e9c81c65acec8a185a7ec5f77dd01e26cd2fc8709d7957d0b1bc2b032103e5ac9970b1c810b9cd5c56eb7fec8f27ddb369b6cbe6d36edd83b8e14c6552b3c8c16b28758f84d8f28c77ea2e04bc7491d4f8fff530af8bf1378d3739c073de7f79507c8b583f72793f250ae7d65dfc15641f8c68a5d601974dcfec098fd78a8afae03a666cdbeac57d9aca9eb629bfd8f09bd94e2a8628179b1734e1f06dedf000000ffff", + "ec5b4d4bc43010fd2bfd05cbcca44d936345108a7851f0dcd2a885ea422d2bfe7b69653fba3b8eb1e69085bd3e1ec994491fd3bcd7981cfa0505efec33a93fa1223c6035a33bc2d601c61d6d89bc0db53dfb044e350b678a85c7a8d2c5bd8f312ed8b96a704d72d5d6c9edfaedf93cac3697d5b5a2868dde001a34abb2c4e22e1e255a50f02e3e28772890a78f46a54c4659dc3c44669930b7fe99e52dfb18266061b48a854d507bffbeed36ae4f6e7af7298bd0d4e08b089d8ad0ec64b9ea753c7067f43566b327a8b161dfedf1c2605596595144f435f6f782b762e4d929519434274a9a13252093325900af22fe3f2a01e1f7dce2352aedd9c7305ae260c28c65e7866513bb081a7611021334c0b459f7bf68db745e16685b2a2d0b901e6a9096b9fa906b64ae99ddd68b17f080732f806432cdc8f2e361ea6fa700ea60123b45f41edbe12579f868df87e4da0d55dbc5fb071a28a5725db17a45a84d6cd75d0b0a6605f6a73e059bf92c37f379942088eb17000000ffff", + "ec5c4d4fc24010fd2b86b3879656a047c16862021a3d184d8c29652d4dca2e6e592bffde74f6a35fb3d0104cd078eccce3e56d7718b6d319ba9efc820bd574d0e9e467d04d73b3fd41a38300454307c07f01ecc4ce7cbfb0043f0afd68e10d23bcb4247b279dc9cbe9e4a403046339e9d072bce72369c9181b1da0a360b03b2dfd6069be0f9d24dde7680dba65c6e6685ddfc5e6685ddf3dee1cad9e847b1471c8f74cc2159bfe9fa1ec93b433b68996ba1cab22ee8ae5f4c43354d89ffb81371c594a4e5e7108b91d0e2e9d53c95007086e8ed8eedbaa2315eedd51d077edb3b7bb551ce5ece4769ec0aba05be6c041cf4e0e8e86c1bc23662841ceaed95797617fd8f5bf9da25ecf7b1f82f0223f652a4a38794f285911aaf634d4b71bc2308a9345f1950de7248557221b12cba7f4ca7d58269b0913b4f8af12afc43eb115a159af54914b43a1baf289f203d33a5c8261371a9ade4acd7ae78d409632c16df29c12382609245315d81069c03e570ed36506d775d1fd0a8f7a2bd4e6510ec303d7751ebfca237039d25eb288a698caa266e1e71623a1d2ae4900662519739653548a72182d706de5b9e184a03cb172681e09b48685aa786334db3acb8e45ddf190e2fbcdb4471329a895eabef8f94288d6d2ae69006627117c9da27ad6da6388a4c11a810f6481f170306b9202648d3dfd80d9e2c895c3f414c3b57551cf244d598e116db5473329a87551d3248b489a86943091218cdf000000ffff", + "849bc16ac3300c407f45841d3a98435ae860bb75a71dd6aeac3df5e6a66a1270e260b9cbc6d8bf0fd949eaa6293b5ad2b3225b910421513930e836be04c7ca876fc4c155b4ebf182161cd3dd2c010177eeef8ec0e36496c4f13cb91f06f3189073473e0dc97912c7d3e40a0dc969d23a1db2d3c4b96578b44616b4c2260873850d2c8c293ea5ba19ecd99afb47e0cd2dc7fcec8dacc206f1f20d5ec4ad86509a345fe746126e4e5986c4d7473c67905fe2c16bfd93e0974ced52da34ef8726a7edbb95dbb423b7684acf695364fca19e254167b3bd41aacb5aa1c543f47c948af0214ab5319886926be75df09d6f8e3f22548efb08dbe64f37dd45933e1722d2c61655f65eb74177b3cb1ec98a921d218527876461d98afb11c4ed2b946e84d5222fb27c98b8f0a61bd86a7865dd00637be6fcab7789b13d58cd7888b9e14ef0502124a5581d8a2abb609d01f0280a0b10b0bb011ff03f7a07021667fa2a917c1675ea529315b5ae4f4a86ed7ea9c9c2ba15f7c656d782502934e1016f750d9b56ca89a48f47425fc0acb652f1cbfefb070000ffff", + "0300ad2e4eb3764d0000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:58:59 GMT", + "Thu, 20 Oct 2022 17:36:38 GMT", "content-type", "application/json; charset=UTF-8", "transfer-encoding", @@ -129,9 +132,9 @@ "connection", "close", "cf-ray", - "74abb3533a6d5914-IAD", + "75d3844f4e96a6ea-PHX", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", @@ -139,13 +142,13 @@ "x-content-type-options", "nosniff", "x-correlation-id", - "74abb3533a6d5914", + "75d3844f4e96a6ea", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", "16400", "x-ratelimit-remaining", - "16393", + "16394", "x-xss-protection", "1; mode=block", "vary", @@ -155,7 +158,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280..50%29" + "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280..50%29¤cy=USD&locale=en-US" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-error.json b/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-error.json index 2370478f76..d323aa5b57 100644 --- a/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/useproductsearch-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280.500%29", + "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280.500%29¤cy=USD&locale=en-US", "body": "", "status": 400, "response": { @@ -13,7 +13,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:39 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -21,19 +21,19 @@ "connection", "close", "cf-ray", - "74abb358cff137fa-IAD", + "75d38453facca721-PHX", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", "DYNAMIC", "x-correlation-id", - "74abb358cff137fa", + "75d38453facca721", "Vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280.500%29" + "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/product-search?siteId=RefArchGlobal&q=shirt&refine=price%3D%280.500%29¤cy=USD&locale=en-US" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usepromotions-returns-data.json b/packages/commerce-sdk-react/mock-responses/usepromotions-returns-data.json index 29afee4fe3..902acbbbe3 100644 --- a/packages/commerce-sdk-react/mock-responses/usepromotions-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/usepromotions-returns-data.json @@ -2,21 +2,21 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=IcXVMRMyiVOCuwwh_CfzamM_UmKGCcYeNqw8_Nx4Ed4", + "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=AQIGdqW07XWD9i_GSUyfVE19CXgoPhXSdGy-UwVe4fw", "body": "", "status": 303, "response": "", "rawHeaders": [ "date", - "Tue, 11 Oct 2022 20:46:09 GMT", + "Thu, 20 Oct 2022 17:36:40 GMT", "content-length", "0", "connection", "close", "location", - "http://localhost:3000/callback?usid=a567c1d0-b035-40af-afdc-448f3f008644&code=nTKpEEF9Vznera_OJzn2_wLO1VqjIYLiyJYkXvfkpFc", + "http://localhost:3000/callback?usid=0b3fc31f-af1b-4162-9692-651a6fa4d1a4&code=fyscvmDS9m1STpdi1vi7319_k5uo-U1yhgJDY766Ops", "cf-ray", - "758a718bbdd41b1e-PHX", + "75d3845f78afa6f4-PHX", "cache-control", "no-store", "strict-transport-security", @@ -26,32 +26,32 @@ "pragma", "no-cache", "x-correlation-id", - "758a718bbdd41b1e", + "75d3845f78afa6f4", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23995, 179909, 23999, 358701", + "464, 23998, 344933", "x-ratelimit-1m-reset", - "50703, 50702, 50702, 50700", + "19065, 19065, 19064", "vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=IcXVMRMyiVOCuwwh_CfzamM_UmKGCcYeNqw8_Nx4Ed4" + "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=AQIGdqW07XWD9i_GSUyfVE19CXgoPhXSdGy-UwVe4fw" ], "responseIsBinary": false }, { "scope": "http://localhost:3000", "method": "GET", - "path": "/callback?usid=a567c1d0-b035-40af-afdc-448f3f008644&code=nTKpEEF9Vznera_OJzn2_wLO1VqjIYLiyJYkXvfkpFc", + "path": "/callback?usid=0b3fc31f-af1b-4162-9692-651a6fa4d1a4&code=fyscvmDS9m1STpdi1vi7319_k5uo-U1yhgJDY766Ops", "body": "", "status": 200, "response": "", "rawHeaders": [ "Date", - "Tue, 11 Oct 2022 20:46:09 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "Connection", "close", "Transfer-Encoding", @@ -63,15 +63,15 @@ "scope": "http://localhost:3000", "method": "POST", "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=nTKpEEF9Vznera_OJzn2_wLO1VqjIYLiyJYkXvfkpFc&code_verifier=E4MfA5rgR3oSw-dyLg_vcjcq_b8GuhxtfRXFD7JIhXe9D14VOlxYssCzRAvC-CSHhCuc5Z0r5Z9429BHRABRcwfXCydGH4trOheE8ND0DhHtIMJsr_EbY3KF3R3Rp0to&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=a567c1d0-b035-40af-afdc-448f3f008644", + "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=fyscvmDS9m1STpdi1vi7319_k5uo-U1yhgJDY766Ops&code_verifier=2yQpScDtnjf6xIzWzjG77Ja2BQzeNK7gMgiW5_RBcvZUUSDd-dhsKf8U11UcIqvf8h08qbr5BEapZ6ux-VH1AbJZG7PoiQ9vhMRt4CGEUvy8SajipPK06ylj23pf5hE5&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=0b3fc31f-af1b-4162-9692-651a6fa4d1a4", "status": 200, "response": [ - "1f8b08000000000000008d55cb76a33810ddf757e4643d992309e3c7ec6cb03104449bd880b4f1010987771c83cda3cffcfb08a7bb2733edeef4ca5671abead6ad52e9cba7bbbbfb80b1a8aaf6f54b1695f7777fdddd479d81a8af2776a2b7663a4f4cc5780da49d381b7da8ad7a535a7421da5ca2f2d8d17cda58ea72c09c026f3360328c8c84aa714c15d0937ed9995b27b3b54d6d6fdd0227a0a56ad68aff29dd66d0da92c11744fe7cf07de5d26638a7e19a0ce7472b19f5667ab5c5a1c606db6ad7eb1027c6ec4f4134e6fe35e9dadde54b3d69128670a3a72fe297a6a493fb409b354c733bd38332f1701a4aee992b72427c7ca2bed3eb6b5c10649d198a2f6cbdc85902ebc85ba504cd60586ecec4733256b83d43ee2d6cc38a59c63d0c58b7e8698153b3c42fa1b468848035d5f25ec411621ab2e9e39cf8461a283fe2423f8f09c217eec9c02c0de9234e4c5bc9a127ead0f233939c8e7b300fcb9bb5a4dcc720443067a5750eb5591978a3e70fb4b9b0c219f03770188a7c1791bb639ddc518f1fc559e4f9b12652acfa00b94217f88b78ffc91b53cde9a88f7bea8b1a4af611febbf6a1d099af7fe2e30fc3ea40223955e0dfee135b1ba2a61908bcd9f9d6f71bb5fc163fe2e735153d0d3c59f033e0b5673fe329b4a4e5a626c8ed445f8bc0c331d77e3d73bf3f531f6b40d00a887e8afaf2fcd6f7f7f1aef74c7293e19e096e35436dccfa97f1bb8530b64b9c8a8530267d9e62d54d68b1a92dcdcdac0e00e20d4b219371bfacb1ba286cf559c6a991d8aa85ecf40819ca33bb58429cf2d4f236", - "8de9e98dd5ef066c4c1318d3c249cded06d81ae9693a6f6c9500ace8955e601029fa582f71457c6b581a623ead8f1697c0881d922e85ff0ad2c1bfc0621ec49d2984bea815356f2ec38c5065266a340abf9f37d6d3904f4e68a28fc5124378bbebacedb2b79f066d1c79d0c615fd61c980137b201978b947aa4dc7dff4e2fee26c671c8a990743dd81e77c3feb2b57dc037d6c17fc4dc7024b62ee9a505d9cdc324e886b484fda8a84eb15f5bc3aa7cb4a60f1cb80d5af5ab823a6bce3966668e016782b20b8b53825106ff5567c978705cfb56cd049b5320bd8ea0e59e9bc15ba36e67639b2b77384fb67d952add64a455ffa4cf8ebc0daee245bd5654b11cbf8790a59abc9fe14cd7697b9acecb1a52afb31d60bf8bc3115d53c1ccab9f7b9755eb38c4c1e4323516c597b08aa6a14766b9356f3daf58e5b3e9de91a9a689d013fef9f9afb3f86272ae1ef9ea737d3293a9ca22a7e67bf00f834d1509f559ffd47670fb81657393b9a73eeee89921e51379e824a8839d7df4244ed311131f6c9d51f4e01b89aaf11f775778cae6117cbb9b374de3cce55c2afc6401e4f18e4e0210492fc3002c1e1213870f6301a4d0fd20180e978347a7361e7aa7e29a2d3feab67c89a53057290b96d1838cd3af0f35742b2883f7e2555b2fdb9fa171ff0702ac16072e07c2a710e23144860c6a2893c83fc70987e13e8b8ffff3b5e9ef3fcd3dfff005b9fa1fae3070000" + "1f8b08000000000000008d555d77a248107ddf5f9193e7cd1e1a84847d534184b19b91284df3e2816e543e350a41d8b3ff7d0b33339bdd7126f3c4a9ea5bd5b76e15d57ffd7677771f719e9ccf9bfa9027d5fddd9f77f749e7c86160a76e6a5f16d9385d4c9d97485983edf4b135eb17caa48be5e56b521dbbb0786ab1610e9853449743cc08677e1152b363a9742132ee172b6fb06bb6227b324505e9d76db8b25526e396c9eb21564a82f190ff4528cbc1cee2391bec4f381df58beceadbc7161f7cb3756f23923afa1f40742f82e15267eeaf0bd34edb94cba4b5b3037cc38c756a1f597acb2dbf5b50a4324ab258f11b3155531690531878bd3d27251069b8bc7fe5f349c1535427749631594771b56c18f5725efa3d97fd5bd896977a2e28917837e9c392648b8a1c6265d282807568153de401311d75119082054e164dbfc7c541b16732791554951695a37cc4895b3335a6508755345cf13a41511157376bc94440a4584605af70135b7a15d1d1ee036d5e79e90df81b3882e0be57b8bbe39dda85541cc1867bbeaf8995b33e927dd005fd24df7feedd8796d78501e9c3006aa8f847f86fdac7a0b398ff20261886d5434cf1ce5170bb4f7cee404dba1451bdb9757ea3965fe2c782a20ea1a71155819f83ae3dfb114fd032ac963593fd0efa5a4694ec85f5f399fbf599fa580326cf24e827d45714b7cedfe7bbfe678a9f0eff1970abb97cd9f3fea0bd5b089a5b910c1682c6fa2223869f86e5b2c6969fe34e92182c87c52a57496fd6c49894aeb15349e6a4ae8165373b222e17b99b4d520c1ae17e562ee8acc4d406ac29e354026c0ef10c616aca61694aa13183c5629fed9248c9d4d6ec8a9c598087a501f3893f5a5c80811d9299103f43e1105f129807f8674ad057be40cdcbd76146c2a90e353a65d08f5bfc3cdca7a6616a6b7805ca64f688f4", + "58c1cf83369e3a68e3437f783ae0600fa4032fff185a4fda57bd443069dc5c20987969a83ba2de37db9ef9f01fd89a5b8a371da97382feb0c4ac4fd4aa91408e2202418524424aeb4e200e587218b0f6550b7fc4a7ff727357763b708be84c026e1702db04673b8518e3cbb0e085950f3a1938c7926bace16c7c710dd62e5626c48e65d2ef546ce08e18369cd9125e8d3bbc5a22b25a5ef0332c63ea6432e14bf361bf262319cf3f1fa76d7a7093ec65656e8fa7c7fed08bd18b5d999a55e79bae5cae771ebaec5adf95bc49aa8bc7f9623c21fb97e7cde7f9a13c1ae1a3d2bc2cef7f1f9ea854bc7b9ede5ca7647b4acefb777e7816caf0325a6993b8c93f3ff39a31377bf8d4cc9a62ba51b349ac6bbd1eb749d6e3b714c9e598428e4d7a8d474f9274755f336eeaee985cd34eccb1677a6f11cd391557a7142b5baea0ed43b445f1c30869f283aee9f283a6a248db462381a2d15b086fcef5a14c4e9b2f91519c27bbe0f2290ff2a6f5daa6f55b8bb1fcd4d22fa42abe69ceeff0227e5250f4b815e24911022572a4483a4f1e551d89edf6e9ab40c7cdffdff1aa298adffefe07691bab10e3070000" ], "rawHeaders": [ "date", - "Tue, 11 Oct 2022 20:46:09 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "content-type", "application/json", "transfer-encoding", @@ -79,7 +79,7 @@ "connection", "close", "cf-ray", - "758a718e2cd3a726-PHX", + "75d384625e6ca709-PHX", "cache-control", "no-store", "content-encoding", @@ -93,13 +93,13 @@ "pragma", "no-cache", "x-correlation-id", - "758a718e2cd3a726", + "75d384625e6ca709", "x-ratelimit-1m-limit", - "24000, 180000, 24000, 360000", + "500, 24000, 360000", "x-ratelimit-1m-remaining", - "23994, 179908, 23998, 358652", + "463, 23997, 344751", "x-ratelimit-1m-reset", - "50311, 50310, 50310, 50309", + "18613, 18612, 18612", "server", "cloudflare", "x-proxy-request-url", @@ -114,11 +114,12 @@ "body": "", "status": 200, "response": [ - "1f8b0800000000000003000000ffff7c90c10ac2301044eff98a3150bcf450855efa0f7e8178084da281341b9a2d2aa5ff2e8d95a2a297856567e62d330a407ad739960df6e5bc69c54a36380a0018f30464abbca7810fe92c1bc85d5580ac4567c236210d8e13ae8e2f6869881464f9b269c3caf9347bccad35911d850415a3bfaf22a79f99646d8e5a2f4175e6074f66cd54fe7bb35e6cd46bd36f3e81755590b5f9f64d7cb32e2c019c72454cacfc5c98981e000000ffff03004cdfc37141010000" + "1f8b0800000000000003000000ffff", + "9c91b16ac3301086773fc55f41e8e2802cf0e2b96bb74c091d0e4b6a05b2ce58679212f2eec56a82494b0bed7220eebbfb7e71e70a50310c415407532f2f4b42aac3a1028073a980ea29469ee539bfaa0eaad11bb0f7185c7accc873908c639037f43c8f9c547d1bb34e28c4bcccb853ef46099c32681ce3fb0ab9649f48dc02196dccb6d15bd3eeb4eeb4deaf54b09f66f6be08d74ea2c1fd906a85b2d0245f354d73d314ec52fff6e9f6ba9e27eba687ffc56ff586bd2f1bbee7bf13fc317905bc94f3090bc5e598d5e5030000ffff0300b41f33f7dd010000" ], "rawHeaders": [ "date", - "Tue, 11 Oct 2022 20:46:10 GMT", + "Thu, 20 Oct 2022 17:36:41 GMT", "content-type", "application/json; charset=UTF-8", "transfer-encoding", @@ -126,17 +127,23 @@ "connection", "close", "cf-ray", - "758a7191dc6da6ea-PHX", + "75d384648bc7a6fa-PHX", + "age", + "2855", "cache-control", - "public, must-revalidate, max-age=3600", + "max-age=3600", + "last-modified", + "Thu, 20 Oct 2022 16:49:06 GMT", "strict-transport-security", "max-age=31536000; includeSubdomains;", + "vary", + "Accept-Encoding", "cf-cache-status", - "DYNAMIC", + "HIT", "x-content-type-options", "nosniff", "x-correlation-id", - "758a7191dc6da6ea", + "75d384648bc7a6fa", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", @@ -145,8 +152,6 @@ "800", "x-xss-protection", "1; mode=block", - "vary", - "Accept-Encoding", "server", "cloudflare", "content-encoding", diff --git a/packages/commerce-sdk-react/mock-responses/usepromotions-returns-error.json b/packages/commerce-sdk-react/mock-responses/usepromotions-returns-error.json index 74096f47e4..74690acb19 100644 --- a/packages/commerce-sdk-react/mock-responses/usepromotions-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/usepromotions-returns-error.json @@ -2,145 +2,37 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=orjIUis8M7aq923GmDxgGD3osqpJo1OYK5wA08Fd0cM", - "body": "", - "status": 303, - "response": "", - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 22:47:56 GMT", - "content-length", - "0", - "connection", - "close", - "location", - "http://localhost:3000/callback?usid=58cb74cf-f2f4-4c63-b82d-b7186971a279&code=70jO2bFuQGv2xWu5dLzeyRjUqDhIrc95ieK035NwseA", - "cf-ray", - "759361536be6a6f6-PHX", - "cache-control", - "no-store", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "759361536be6a6f6", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23985, 23999, 350799", - "x-ratelimit-1m-reset", - "3088, 3087, 3086", - "vary", - "Accept-Encoding", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=orjIUis8M7aq923GmDxgGD3osqpJo1OYK5wA08Fd0cM" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/callback?usid=58cb74cf-f2f4-4c63-b82d-b7186971a279&code=70jO2bFuQGv2xWu5dLzeyRjUqDhIrc95ieK035NwseA", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Date", - "Wed, 12 Oct 2022 22:47:57 GMT", - "Connection", - "close", - "Transfer-Encoding", - "chunked" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "POST", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=70jO2bFuQGv2xWu5dLzeyRjUqDhIrc95ieK035NwseA&code_verifier=WI1F2HOWj5m2BNpjMHGaK475KC899ZWJ4xuQa2mEcZcRnnOGjRZKGZ4DEUtI5FvVcpvcgC7VY6dodOesg9xGrB6oPoJ-Y6ERuMFNwscjVuAJO_U5mfoKNxTqXIzvzy7V&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=58cb74cf-f2f4-4c63-b82d-b7186971a279", - "status": 200, - "response": [ - "1f8b08000000000000008d554d97a23814ddcfafa853eba939104465762a8a2084915242b2f14082f2ad55820873e6bf4f6275f771a6edae5ee97bdcf775f372f3f76f4f4fcf21a5f1f9bcab8f795c3d3ffdf9f41c7716208199baa979b5b3496acfacb750d972dbea2363d1dbcab48bc0fa1257a78e14e3d6d1e702f31ea2b5c0e4105829d19384cca41ef7f3cede78b96bac6b77e3973095ae44cfaffc7f4636b9ec6cb08895e2602262df98b21676162db1b0574e3ae8edece64b22830adf62db9b324c2ded0fde68c2825bd1a5bf2de666daa614c0d6cc8efc9764b853fbd0d05a6af89d8d64152398458adfb0999ae200be93c0ebcd252c31701a0a920b5d4e0b9aca758c1619069a1c55eb06232fa7a5df53e03fc2b6b4d47286a044bb694f4a98d9153c46cab4e504d6c4287a9e879369a976000b1c585938fb1e1705458201bc30a44a7665299ff5448d851a213e87513454f13a86e422aa1ece92b1004a11900b5a394d6468558806874fb8b9d0d213f8073828f37a175ebba39dda11c44edce675be9f09978b3e043ee745fe49beffd44d88e17524803d09f80c15fd0cff8dfb88f3cc963f8809c4b27a3256bc73183c3e27bab4f84c9a1422ad79f4fdc12cbfd41f0e8a9af0330d91cafbb3e4db99fda84fce25a9d635067ec7cfb50c114c98f1f39dfbf59dfa9c030c16123f4f3e5f513cfa7e9fef76cf143f15f78cf75653704d687f1cde09c2d0ad60c6056188fb2283ba9f92725d3b869f3b9d246124442157613fafa13e2d5dfda0c2cc4a5ddd016e769229287237db0e30301568c0d246b823d9ba8686039c4ee6382bb791a9389b037037f48a37a6e2be9a67b384523c33876605cf38708468f0fd743e132e8ee11a92cd79fc422622be847c1ff89d2939bfe0ca675e5fc48e9099c667b4caa09fb4cead9e9a92d41c7211037083af503f", - "48b013dc78aae0c6e7e7435381e33a908abefc1331c6c3af7cb160dab83993f9ce4b62ee1079df6c73e1f37b600edd927df088ac33cd89c9a4648a02da32d91abc1a89cde722286098c9078e8547813567a2a63fa0b3bbde32ac88de42b490786fc2966136975c9d2a42e099910b9e742777b86f0b9c6c727575dcda9bf9c0dd4c00ec0faaa33b572733856877509f709be716d88e8bf1c1df1a2fafc1da3ebf2aa7fe182a86ffd635e9617f6a71a842d08e9a055979109f94b7d1fcd05a75b7238e761a36abeca222354ad0b832dbe4b241bdb7920a57b9ecb3c9f3efe2894ad9ddf3f4e17a8ff7eff139b9f3e787a3335ed864db6e735b896d535ad2d65b2fd12a58fdd5eca40b56c778d1a09d76f848115f4f29cfb14b6ff1f258926eee5bc65ddd9de25bdae97ce2cdbd8f88e69cb29b531dd36834a0fb973dd80f5e0674a8bc4463c05ea2913c1e6a23390423ed238436e7fa58c6efbb2f916154bc2f96ed72825ba9f5aecb64558418b7411b7c69aaa2bbe67c8767d15891c3d19eb1b1c2981c835091341a8f544d66fbfdf82b41a7ddffdff1aa298adffef917c7c0979de3070000" - ], - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 22:47:57 GMT", - "content-type", - "application/json", - "transfer-encoding", - "chunked", - "connection", - "close", - "cf-ray", - "759361584f69a715-PHX", - "cache-control", - "no-store", - "content-encoding", - "gzip", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "vary", - "Accept-Encoding, User-Agent", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "759361584f69a715", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23984, 23998, 350719", - "x-ratelimit-1m-reset", - "2460, 2459, 2459", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/mobify/proxy/api/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions?siteId=RefArchGlobal&ids=promo_10%2Cpromo_30%2Cpromo_42%2Cpromo_46%2Cpromo_21%2Cpromo_22%2Cpromo_13%2Cpromo_12%2Cpromo_20%2Cpromo_44%2Cpromo_10%2Cpromo_1%2Cpromo_22%2Cpromo_0%2Cpromo_23%2Cpromo_14%2Cpromo_36%2Cpromo_16%2Cpromo_2%2Cpromo_0%2Cpromo_31%2Cpromo_41%2Cpromo_32%2Cpromo_24%2Cpromo_11%2Cpromo_26%2Cpromo_36%2Cpromo_49%2Cpromo_23%2Cpromo_9%2Cpromo_30%2Cpromo_0%2Cpromo_46%2Cpromo_43%2Cpromo_4%2Cpromo_46%2Cpromo_14%2Cpromo_13%2Cpromo_2%2Cpromo_30%2Cpromo_43%2Cpromo_33%2Cpromo_47%2Cpromo_21%2Cpromo_32%2Cpromo_15%2Cpromo_26%2Cpromo_36%2Cpromo_41%2Cpromo_41%2Cpromo_14", + "path": "/mobify/proxy/api/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions?siteId=RefArchGlobal&ids=promo_4%2Cpromo_33%2Cpromo_17%2Cpromo_17%2Cpromo_2%2Cpromo_29%2Cpromo_35%2Cpromo_12%2Cpromo_27%2Cpromo_36%2Cpromo_6%2Cpromo_5%2Cpromo_10%2Cpromo_22%2Cpromo_43%2Cpromo_30%2Cpromo_0%2Cpromo_18%2Cpromo_14%2Cpromo_36%2Cpromo_14%2Cpromo_11%2Cpromo_9%2Cpromo_7%2Cpromo_25%2Cpromo_20%2Cpromo_21%2Cpromo_24%2Cpromo_13%2Cpromo_40%2Cpromo_9%2Cpromo_21%2Cpromo_17%2Cpromo_28%2Cpromo_35%2Cpromo_7%2Cpromo_27%2Cpromo_37%2Cpromo_20%2Cpromo_29%2Cpromo_43%2Cpromo_18%2Cpromo_21%2Cpromo_19%2Cpromo_13%2Cpromo_18%2Cpromo_35%2Cpromo_19%2Cpromo_20%2Cpromo_18%2Cpromo_45", "body": "", "status": 400, "response": { "title": "Bad Request", "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-query-parameter", - "detail": "Invalid value 'promo_10,promo_30,promo_42,promo_46,promo_21,promo_22,promo_13,promo_12,promo_20,promo_44,promo_10,promo_1,promo_22,promo_0,promo_23,promo_14,promo_36,promo_16,promo_2,promo_0,promo_31,promo_41,promo_32,promo_24,promo_11,promo_26,promo_36,promo_49,promo_23,promo_9,promo_30,promo_0,promo_46,promo_43,promo_4,promo_46,promo_14,promo_13,promo_2,promo_30,promo_43,promo_33,promo_47,promo_21,promo_32,promo_15,promo_26,promo_36,promo_41,promo_41,promo_14' for query parameter ids. expected maxLength: 256, actual: 450" + "detail": "Invalid value 'promo_4,promo_33,promo_17,promo_17,promo_2,promo_29,promo_35,promo_12,promo_27,promo_36,promo_6,promo_5,promo_10,promo_22,promo_43,promo_30,promo_0,promo_18,promo_14,promo_36,promo_14,promo_11,promo_9,promo_7,promo_25,promo_20,promo_21,promo_24,promo_13,promo_40,promo_9,promo_21,promo_17,promo_28,promo_35,promo_7,promo_27,promo_37,promo_20,promo_29,promo_43,promo_18,promo_21,promo_19,promo_13,promo_18,promo_35,promo_19,promo_20,promo_18,promo_45' for query parameter ids. expected maxLength: 256, actual: 449" }, "rawHeaders": [ "date", - "Wed, 12 Oct 2022 22:47:58 GMT", + "Thu, 20 Oct 2022 17:36:42 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", - "680", + "679", "connection", "close", "cf-ray", - "7593615accd2a6f6-PHX", + "75d38466fbd4a709-PHX", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", "DYNAMIC", "x-correlation-id", - "7593615accd2a6f6", + "75d38466fbd4a709", "Vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions?siteId=RefArchGlobal&ids=promo_10%2Cpromo_30%2Cpromo_42%2Cpromo_46%2Cpromo_21%2Cpromo_22%2Cpromo_13%2Cpromo_12%2Cpromo_20%2Cpromo_44%2Cpromo_10%2Cpromo_1%2Cpromo_22%2Cpromo_0%2Cpromo_23%2Cpromo_14%2Cpromo_36%2Cpromo_16%2Cpromo_2%2Cpromo_0%2Cpromo_31%2Cpromo_41%2Cpromo_32%2Cpromo_24%2Cpromo_11%2Cpromo_26%2Cpromo_36%2Cpromo_49%2Cpromo_23%2Cpromo_9%2Cpromo_30%2Cpromo_0%2Cpromo_46%2Cpromo_43%2Cpromo_4%2Cpromo_46%2Cpromo_14%2Cpromo_13%2Cpromo_2%2Cpromo_30%2Cpromo_43%2Cpromo_33%2Cpromo_47%2Cpromo_21%2Cpromo_32%2Cpromo_15%2Cpromo_26%2Cpromo_36%2Cpromo_41%2Cpromo_41%2Cpromo_14" + "https://kv7kzm78.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions?siteId=RefArchGlobal&ids=promo_4%2Cpromo_33%2Cpromo_17%2Cpromo_17%2Cpromo_2%2Cpromo_29%2Cpromo_35%2Cpromo_12%2Cpromo_27%2Cpromo_36%2Cpromo_6%2Cpromo_5%2Cpromo_10%2Cpromo_22%2Cpromo_43%2Cpromo_30%2Cpromo_0%2Cpromo_18%2Cpromo_14%2Cpromo_36%2Cpromo_14%2Cpromo_11%2Cpromo_9%2Cpromo_7%2Cpromo_25%2Cpromo_20%2Cpromo_21%2Cpromo_24%2Cpromo_13%2Cpromo_40%2Cpromo_9%2Cpromo_21%2Cpromo_17%2Cpromo_28%2Cpromo_35%2Cpromo_7%2Cpromo_27%2Cpromo_37%2Cpromo_20%2Cpromo_29%2Cpromo_43%2Cpromo_18%2Cpromo_21%2Cpromo_19%2Cpromo_13%2Cpromo_18%2Cpromo_35%2Cpromo_19%2Cpromo_20%2Cpromo_18%2Cpromo_45" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-data.json b/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-data.json index 5d397675b0..ccb774cbd3 100644 --- a/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-data.json @@ -1,112 +1,4 @@ [ - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=_KNksH2sBJTPRtCIhaNZxFkA8OJZD8iyY_B0oMGiNRk", - "body": "", - "status": 303, - "response": "", - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 23:49:32 GMT", - "content-length", - "0", - "connection", - "close", - "location", - "http://localhost:3000/callback?usid=96637591-1ae8-4b97-a8f6-bd40b5405ccd&code=ArP2Alu3SIM8kRvA_muSziSpJqU-0QmBrR27w0lYtbg", - "cf-ray", - "7593bb8d7cfea720-PHX", - "cache-control", - "no-store", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "7593bb8d7cfea720", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23985, 23999, 354209", - "x-ratelimit-1m-reset", - "27538, 27537, 27536", - "vary", - "Accept-Encoding", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=_KNksH2sBJTPRtCIhaNZxFkA8OJZD8iyY_B0oMGiNRk" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/callback?usid=96637591-1ae8-4b97-a8f6-bd40b5405ccd&code=ArP2Alu3SIM8kRvA_muSziSpJqU-0QmBrR27w0lYtbg", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Date", - "Wed, 12 Oct 2022 23:49:32 GMT", - "Connection", - "close", - "Transfer-Encoding", - "chunked" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "POST", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=ArP2Alu3SIM8kRvA_muSziSpJqU-0QmBrR27w0lYtbg&code_verifier=HI-3eazOVPd6g_YsqowQhBDyeAuZbtJcmvOXdVwxR3CEx3g7okgWzGlQpBRVxvgF6bb6Qf0WvGZ9dDk2qXMqjmHomfWUpukVQlTqAicfGCM5T9pvGPvsVZwDMXI32Hrg&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=96637591-1ae8-4b97-a8f6-bd40b5405ccd", - "status": 200, - "response": [ - "1f8b08000000000000008d55cb72a33814ddf757a4b29e4c21308e999d1f802146b40906a48d0b2462c4cb8e0dc63035ff3e92d39dca4cbb3bbd025deeeb9c7b75f8fbcbdddd7d4c487a3a6d9b7d91d6f7777fdddda7bd2de3c8622eb32eab7cca5673fb355636fc6c0f89690c2b65d627f2fa9cd6871e9793ce59e8c2e718876be15340d966789165782e0d68d0fb95ef15aeb96e5c3fa820932e78515cf87b8efd02383e12b1521a4d45ec2b55d6e29c274b24ce4f0e1b0dabfc6acb1293089bb1192c0099adfdc91bcd68742dba0c36a56eb18e11197656bee74f9ca35e1d6253eb8819f4ab10a8288479a2042d9dab0c45f088236fb096b042b2d312393b93e5ac240c346968e448d64052af5b147a05a98281c8c12ddf8e545a414328917e36e00ae6ab1aee1365d671021b6c9603cfc3c9b4d555044b14d9793cffd12f89ca0cc9f04c43555ad5b6f2594fc434d424e438ccb2258ad7d31094497d134b4e232825322849edb489a9d57138da7dc2cd99549ef0bfe10701af77e6b57bd2ab3d0ee9819f799d1f31a1ca186239e0bc805fe4fb4fdd0c9b5e8f2338e08863a8c967feefdc279c67bafc494c2496d50348f14e71747b4e6469734c9a14875a7bebfb0d2cbfd51f8aca06f399c6a1cafbb3c175663feb937389eb7583e4a0e773ade21066d4fcf5cefdfe4e7dce01920d89cf93e32bcb5bdf3fe6bbde332560e29ef1de1a225f3232ecc71f0461ecd630e78230464399c345c070b56e1c33289c5e92502844a150e1a0377031abdcc54e85b9cddc8523bbf90110b92cdcbc9061ee28d02f2e2bdfc8b0bf6ba069a9b007996b22791572a159cc18f4d71de49ce3b975b22a28a5736b6cd5f08422478806df4fe733e1e23e5c43729dc71b008bf80af27de077a6e2fcca178e797d163b82e71ac76857d130ed9c67514f659859632e6232", - "f4d1c55d6c24a717dc78aae026e0f3214cf8711d60a2afe080cdc9f83b5f349ab56e4101df7949e08e43effd6c1901bf07d6d8ade81b8fa1ddf0bde96290cdc20af408d8471a7a4f4968e030a2d6b3cf39afe05ef85a572e821199bff7d63b0b4711bdc5a121f1de2e304700e6fa08fa6410024fcd42f0b4700a47e23864279f723ca85bf9fac8f5a7321c762acfd13bc34675068bbf23050e1b9e633a82cf5c8ca7cbec7caaf59d390a0753e7042ff781149c3af2d40ccd4a618e6468f3cbd662bbb64d8cd94e6d28d471a56afbc7d98e7acfd56bb3dcd7f9288ab7735951774768af8beefe0ff18b62f4c3efe9cd744c5f8ee929fb6007cf4fd56563481bdd64e1d4710eac8f3d34e06c20065d7c3d9f37a1b97d7d623389bca5482f07c6736cd9351e4c24e96abe66dc36fd21bda69de9534ff7de22da13a357a3361e2b8faa061e409c4e1e4689f6f8104f5ec60f091d49893a925442e85b08694fcdbe4a8fdb6f9171521d3ba988a6b83a12af68a95dc508754b0b7c6baa26dbf6f4c19f261305c48f2f944e144a412ac78aa4915454a72f2f93ef041db6ffff8fd76d597ef9e75f277b780be3070000" - ], - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 23:49:33 GMT", - "content-type", - "application/json", - "transfer-encoding", - "chunked", - "connection", - "close", - "cf-ray", - "7593bb913f2f1b14-PHX", - "cache-control", - "no-store", - "content-encoding", - "gzip", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "vary", - "Accept-Encoding, User-Agent", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "7593bb913f2f1b14", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23984, 23999, 354126", - "x-ratelimit-1m-reset", - "26948, 26948, 26946", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token" - ], - "responseIsBinary": false - }, { "scope": "http://localhost:3000", "method": "GET", @@ -119,7 +11,7 @@ ], "rawHeaders": [ "date", - "Wed, 12 Oct 2022 23:49:33 GMT", + "Thu, 20 Oct 2022 17:36:42 GMT", "content-type", "application/json; charset=UTF-8", "transfer-encoding", @@ -127,9 +19,9 @@ "connection", "close", "cf-ray", - "7593bb93d87e1b19-PHX", + "75d3846a7d801b0f-PHX", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", @@ -137,7 +29,7 @@ "x-content-type-options", "nosniff", "x-correlation-id", - "7593bb93d87e1b19", + "75d3846a7d801b0f", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", diff --git a/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-error.json b/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-error.json index a0ac0ad1af..19796f7c2b 100644 --- a/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/usepromotionsforcampaign-returns-error.json @@ -2,145 +2,37 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=gumSJ99RYfjbt4EZHm4R0TPlJ9BC1IoH0uarxcoLkHE", - "body": "", - "status": 303, - "response": "", - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 23:50:12 GMT", - "content-length", - "0", - "connection", - "close", - "location", - "http://localhost:3000/callback?usid=f5e82ada-ed74-4a1a-9dfd-c716b3b7ae8e&code=dRDuGEitC6pdw1wUcRDgfHByP_UgBV7oIB_aU4P6iwY", - "cf-ray", - "7593bc88189fa70c-PHX", - "cache-control", - "no-store", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "7593bc88189fa70c", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23995, 23999, 357832", - "x-ratelimit-1m-reset", - "47446, 47445, 47444", - "vary", - "Accept-Encoding", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/authorize?redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&response_type=code&client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&hint=guest&code_challenge=gumSJ99RYfjbt4EZHm4R0TPlJ9BC1IoH0uarxcoLkHE" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/callback?usid=f5e82ada-ed74-4a1a-9dfd-c716b3b7ae8e&code=dRDuGEitC6pdw1wUcRDgfHByP_UgBV7oIB_aU4P6iwY", - "body": "", - "status": 200, - "response": "", - "rawHeaders": [ - "Date", - "Wed, 12 Oct 2022 23:50:12 GMT", - "Connection", - "close", - "Transfer-Encoding", - "chunked" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "POST", - "path": "/mobify/proxy/api/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token", - "body": "client_id=c9c45bfd-0ed3-4aa2-9971-40f88962b836&code=dRDuGEitC6pdw1wUcRDgfHByP_UgBV7oIB_aU4P6iwY&code_verifier=h0LY_71NXYp3Elteodn5-SLFKKr6nCl8WmX8SJ0QrXMua1eNZqDpVqOYReERmrg8CBLBZcGdg9B6nvEy0Gs1m1Y4yamVXZKXEDIF_ZvoBbHY-zCxiwI37hda9WlnREDY&grant_type=authorization_code_pkce&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback&usid=f5e82ada-ed74-4a1a-9dfd-c716b3b7ae8e", - "status": 200, - "response": [ - "1f8b08000000000000008d55cb72a33814ddf757a4b29e4c2130b6999d5f6008126de220a44d0a246cc4cb8e6d6c606afe7d84d39dca4cbb3bbd70615dce7d9c73af2e7f7fb9bbbb8f184b8ec797d32e4faafbbbbfeeee93d65169680b4fd88d9b4d843b735e23ed599e9d2eb6ccced5a66dacaece49b56f6931bec0f9a2c71c22bcea3139521d41e7694a674a47ba45ebaefddcb356276f1d9448280d9de78dfc9fd1750ee09af4be4a124e7adf57aeadfa73162f497f7e8462d0b9d9d596c616eb6de6736703241ce34f5968cac36bd265f05c2c6c71114c45173bdbc927cd48ab7791655c9815b42e063ac1288bb5a0e6335d90101d68e877f6129544853553d3335b4e0b26c029c166465403c4d5aa26d8cf5919744c0d6e612fac34728e91c2da69474b94b915dac5daf422053c51abe8641c29a6a3bb212a48e864d1ec475c1c162951d199635d712b47fbac2666997a8c250faba899e6b71c8322ae6e72c9788894580505ab601d5b4615e1c1f6136dceacf47bfc0d1c0232df59e66e59abb714f3bd3ccb3c3f7222a5d9456a207501bf88f79fbc29b5fc9686a8a3a1e450b1cff0efdac75267befc894fd80fab0f88e61fa3f0769fd8d2919c0c25c2467debfd0d2ebf551f098b13953d8db02eeb73c0b5673fab536a49abd589a8412bfb5a4618a5dcfaf5ccfdfe4c7dae01514d45f653f22b8a5bef3fc6bbde332d10fd3d93b59d98daa4acdb0d3f2c84a157a14c2e8421e98a0ccd0341cbd5095a410e5b4521b85f0ab98ebac509cda7a537dfea2873843787aa97ed01538bdc2b09a0eb6d2bef5feae22047ddea84ac45439e149d5a347731d4e09a0aa8da1ac1cf03fa641fed1229c9cc1eda153a9210f64b43ce27fc6c71498cdc21d942fa9b80f6fe2592f320ef4c29f5551bc97975ee6784ce0cc9d129c36e7281d77cbaa0c21eca25", - "a6a23569bcf9f300b6bd36bede6b13c8fe30d1e3e41e107d5dc19e5ae3e177bd7838adbd9c0339f34acf3bc2fefbd93603790feca157f2371db133785afa8f3176767e95160438038ec78de44571c85bba20128b763dd69ef53983019bbdd7d6c2f9aae96b8bb0a9c8da1a941180b2c540feba7ec1732bef759ac31c2a92870ab389e4432eee7a31f0d61315755b1dce610333b97cd710786ba2c0f5f682b23eae5cc6463015d0cf8625f8ba7d18aae12854f7469c78962796be17ccca47252ad3b44e72ad6d5f75eaaecf5f9dd89c3cef8155044b0caccb4104c96e682e4141278b3adf659bc9fd1ffd274af00f9fa737d321d91c9263fac12edc6183c176e3a726d83bc676ae2f661b93cd47d3f4d19c3dc1f36c2212bca5af1a7c0b91347b2163bc88ab3f182bcad57c8df8726af7c935ec7431f117fe9b477d14fc6adce8c9588d78f490f0d1e0611081e8c1e01bfec04660186bf1284ac6c99b0bab8fa75d991c5ebe794671b33c39659c9a4dc2fca6de812222e472e0e6b7a22af6521f3fe0793cd64034da703ed63807891a698ac192916e00bed98cbf0bb47ff9ff77bcaa8be2cb3fff028f9e7194e3070000" - ], - "rawHeaders": [ - "date", - "Wed, 12 Oct 2022 23:50:13 GMT", - "content-type", - "application/json", - "transfer-encoding", - "chunked", - "connection", - "close", - "cf-ray", - "7593bc8b68dfa724-PHX", - "cache-control", - "no-store", - "content-encoding", - "gzip", - "strict-transport-security", - "max-age=31536000; includeSubDomains", - "vary", - "Accept-Encoding, User-Agent", - "cf-cache-status", - "DYNAMIC", - "pragma", - "no-cache", - "x-correlation-id", - "7593bc8b68dfa724", - "x-ratelimit-1m-limit", - "24000, 24000, 360000", - "x-ratelimit-1m-remaining", - "23994, 23998, 357725", - "x-ratelimit-1m-reset", - "46913, 46912, 46912", - "server", - "cloudflare", - "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zzrf_001/oauth2/token" - ], - "responseIsBinary": false - }, - { - "scope": "http://localhost:3000", - "method": "GET", - "path": "/mobify/proxy/api/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions/campaigns/promo_9_promo_43_promo_9_promo_22_promo_38_promo_33_promo_42_promo_11_promo_10_promo_7_promo_18_promo_46_promo_48_promo_42_promo_26_promo_23_promo_1_promo_23_promo_40_promo_44_promo_31_promo_2_promo_2_promo_48_promo_20_promo_5_promo_16_promo_43_promo_49_promo_11_promo_31_promo_36_promo_35_promo_20_promo_39_promo_30_promo_18_promo_22_promo_2_promo_39_promo_33_promo_22_promo_15_promo_31_promo_27_promo_27_promo_15_promo_10_promo_8_promo_5_promo_18?siteId=RefArchGlobal", + "path": "/mobify/proxy/api/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions/campaigns/promo_37_promo_35_promo_31_promo_1_promo_15_promo_7_promo_3_promo_47_promo_35_promo_20_promo_36_promo_17_promo_46_promo_15_promo_38_promo_49_promo_21_promo_42_promo_44_promo_37_promo_44_promo_34_promo_20_promo_11_promo_45_promo_26_promo_25_promo_16_promo_17_promo_47_promo_38_promo_43_promo_45_promo_45_promo_5_promo_4_promo_37_promo_0_promo_32_promo_43_promo_3_promo_0_promo_1_promo_45_promo_33_promo_48_promo_18_promo_2_promo_1_promo_35_promo_31?siteId=RefArchGlobal", "body": "", "status": 400, "response": { "title": "Bad Request", "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-uri-parameter", - "detail": "Invalid value 'promo_9_promo_43_promo_9_promo_22_promo_38_promo_33_promo_42_promo_11_promo_10_promo_7_promo_18_promo_46_promo_48_promo_42_promo_26_promo_23_promo_1_promo_23_promo_40_promo_44_promo_31_promo_2_promo_2_promo_48_promo_20_promo_5_promo_16_promo_43_promo_49_promo_11_promo_31_promo_36_promo_35_promo_20_promo_39_promo_30_promo_18_promo_22_promo_2_promo_39_promo_33_promo_22_promo_15_promo_31_promo_27_promo_27_promo_15_promo_10_promo_8_promo_5_promo_18' for uri parameter campaignId. expected maxLength: 256, actual: 448" + "detail": "Invalid value 'promo_37_promo_35_promo_31_promo_1_promo_15_promo_7_promo_3_promo_47_promo_35_promo_20_promo_36_promo_17_promo_46_promo_15_promo_38_promo_49_promo_21_promo_42_promo_44_promo_37_promo_44_promo_34_promo_20_promo_11_promo_45_promo_26_promo_25_promo_16_promo_17_promo_47_promo_38_promo_43_promo_45_promo_45_promo_5_promo_4_promo_37_promo_0_promo_32_promo_43_promo_3_promo_0_promo_1_promo_45_promo_33_promo_48_promo_18_promo_2_promo_1_promo_35_promo_31' for uri parameter campaignId. expected maxLength: 256, actual: 447" }, "rawHeaders": [ "date", - "Wed, 12 Oct 2022 23:50:13 GMT", + "Thu, 20 Oct 2022 17:36:43 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", - "681", + "680", "connection", "close", "cf-ray", - "7593bc8dd862a6f4-PHX", + "75d384700e9ba6f7-PHX", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", "DYNAMIC", "x-correlation-id", - "7593bc8dd862a6f4", + "75d384700e9ba6f7", "Vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions/campaigns/promo_9_promo_43_promo_9_promo_22_promo_38_promo_33_promo_42_promo_11_promo_10_promo_7_promo_18_promo_46_promo_48_promo_42_promo_26_promo_23_promo_1_promo_23_promo_40_promo_44_promo_31_promo_2_promo_2_promo_48_promo_20_promo_5_promo_16_promo_43_promo_49_promo_11_promo_31_promo_36_promo_35_promo_20_promo_39_promo_30_promo_18_promo_22_promo_2_promo_39_promo_33_promo_22_promo_15_promo_31_promo_27_promo_27_promo_15_promo_10_promo_8_promo_5_promo_18?siteId=RefArchGlobal" + "https://kv7kzm78.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1/organizations/f_ecom_zzrf_001/promotions/campaigns/promo_37_promo_35_promo_31_promo_1_promo_15_promo_7_promo_3_promo_47_promo_35_promo_20_promo_36_promo_17_promo_46_promo_15_promo_38_promo_49_promo_21_promo_42_promo_44_promo_37_promo_44_promo_34_promo_20_promo_11_promo_45_promo_26_promo_25_promo_16_promo_17_promo_47_promo_38_promo_43_promo_45_promo_45_promo_5_promo_4_promo_37_promo_0_promo_32_promo_43_promo_3_promo_0_promo_1_promo_45_promo_33_promo_48_promo_18_promo_2_promo_1_promo_35_promo_31?siteId=RefArchGlobal" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-data.json b/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-data.json index 5b3f86721a..ca90cce51a 100644 --- a/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-data.json +++ b/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-data.json @@ -2,16 +2,16 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=shirt", + "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=shirt¤cy=USD&locale=en-US", "body": "", "status": 200, "response": [ "1f8b0800000000000003000000ffff", - "e4555d6bc230147df757843cab58addafa3807630f0ea1c21ec61eb2f4ae0db489dca43211fffb68add37e329913c69e0af7dce49c9c7393ee3a84d03764d2f79220006d84929acec8ae430821541f8ae0af00e3b4fe92d5498e673d0a4520248bd2163a235487020dcdf17df67ded10b2efa6549c1908146e6bd97250400393f0d3fd6390bac723654221839e8fa0752fe3d4b47bea952c86b4fb3ec58957c1d70c419a792ee729ef9ee7db96e4774b6e2c4364ba49257c306e16ccf090cec83b8b349cd3662b2bc2dae92e36ff8cd094d616d71f6c57f13a02037e556f8e23026fc60b07369894f10d8b12a84cc6e9bcc709a99d17250d4873a3e14cb451713bd735a2f74285867811c006fe4ef435c9b69db71cbdba34fa352a3fe1f5d1e75883333c4104c9b729f1c3ddb270ed51f0549033e9db83423ddbf0317b61a6b63bb547d66041ab1dc79762a17c4049ce6ef15792dd5f50e4b8d664ea8cda14ad4220cfa130704551c3497f386a12351c8f2dc776ec36519e41b106ff3a629cbe356e11e35ad6c86d13b3644247b0bd8933ae650dc7973bf3d3ff4df1929ebd39fa1b34fff83fa381210f9765bbf69f000000ffff030073dd35ce20090000" + "c493316f83301085ff4a743389204003acc9d22155245275a83ab8e60a96c0466753358af8ef15815202a91a3543473fdbdf3ddff31de195984ce22a4d511ba1a486e808ba5d62b2472a3444cf475024522159de281081ce0419a85f6a0b3833982a3a8c189d2cb0bd2f1288a040a9e73c572613329d27845acf4f240d1648562044b069d459fca5968c509a7557e3a13db3ee1050bf58df66771931dd95c30fc6cd96199e41f4c6728d1694a7ed718533c22fcfb5c0f407b82aca1c0d263d9f2b22e4436568c2508516bcb3bcc261fb4e0d54d2a03437655069a38a5b0825a9a4e263139dda3db92242c90f10c163bc69b221c11122c7f517b6dd23ee9ba4575eb8f25cc7de42af77d96d558224678310a0b67e867bf6220ccfd94bdf77022ff0a6ecd8902831b906eb5ec2868ee38653ec8e099de3e1cf6e43c759fab7b8bdd8e12074ee56813be5ee339c3d65c2e07993af1995f697f693a2a737ff67443432e2d96ee4eb130000ffff03005520f7eabd040000" ], "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:39 GMT", "content-type", "application/json; charset=UTF-8", "transfer-encoding", @@ -19,9 +19,9 @@ "connection", "close", "cf-ray", - "74abb35bfc18058f-IAD", + "75d38457f9f31b23-PHX", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", @@ -29,13 +29,13 @@ "x-content-type-options", "nosniff", "x-correlation-id", - "74abb35bfc18058f", + "75d38457f9f31b23", "x-frame-options", "SAMEORIGIN", "x-ratelimit-limit", "7200", "x-ratelimit-remaining", - "7199", + "7200", "x-xss-protection", "1; mode=block", "vary", @@ -45,7 +45,7 @@ "content-encoding", "gzip", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=shirt" + "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=shirt¤cy=USD&locale=en-US" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-error.json b/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-error.json index f4b1f6bae8..e0d8339db9 100644 --- a/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-error.json +++ b/packages/commerce-sdk-react/mock-responses/usesearchsuggestions-returns-error.json @@ -2,7 +2,7 @@ { "scope": "http://localhost:3000", "method": "GET", - "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=sh", + "path": "/mobify/proxy/api/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=sh¤cy=USD&locale=en-US", "body": "", "status": 400, "response": { @@ -14,7 +14,7 @@ }, "rawHeaders": [ "date", - "Wed, 14 Sep 2022 19:59:00 GMT", + "Thu, 20 Oct 2022 17:36:40 GMT", "content-type", "application/problem+json; charset=UTF-8", "content-length", @@ -22,21 +22,21 @@ "connection", "close", "cf-ray", - "74abb35e4ae97f7e-IAD", + "75d3845acd57a703-PHX", "cache-control", - "public, must-revalidate, max-age=60", + "max-age=60", "strict-transport-security", "max-age=31536000; includeSubdomains;", "cf-cache-status", "DYNAMIC", "x-correlation-id", - "74abb35e4ae97f7e", + "75d3845acd57a703", "Vary", "Accept-Encoding", "server", "cloudflare", "x-proxy-request-url", - "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=sh" + "https://kv7kzm78.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/f_ecom_zzrf_001/search-suggestions?siteId=RefArchGlobal&q=sh¤cy=USD&locale=en-US" ], "responseIsBinary": false } diff --git a/packages/commerce-sdk-react/src/auth/index.test.ts b/packages/commerce-sdk-react/src/auth/index.test.ts index a419f0e931..5640b1a0ee 100644 --- a/packages/commerce-sdk-react/src/auth/index.test.ts +++ b/packages/commerce-sdk-react/src/auth/index.test.ts @@ -39,6 +39,9 @@ jest.mock('./storage', () => { }, get(key: string) { return map.get(key) + }, + delete(key: string) { + map.delete(key) } } }) @@ -149,6 +152,19 @@ describe('Auth', () => { // @ts-expect-error private method expect(() => auth.isTokenExpired()).toThrow() }) + test('site switch clears auth storage', () => { + const auth = new Auth(config) + // @ts-expect-error private method + auth.set('access_token', '123') + // @ts-expect-error private method + auth.set('refresh_token_guest', '456') + const switchSiteConfig = {...config, siteId: 'another site'} + const newAuth = new Auth(switchSiteConfig) + // @ts-expect-error private method + expect(newAuth.get('access_token')).not.toBe('123') + // @ts-expect-error private method + expect(newAuth.get('refresh_token_guest')).not.toBe('456') + }) test('isTokenExpired', () => { const auth = new Auth(config) const JWTNotExpired = jwt.sign({exp: Math.floor(Date.now() / 1000) + 1000}, 'secret') diff --git a/packages/commerce-sdk-react/src/auth/index.ts b/packages/commerce-sdk-react/src/auth/index.ts index bcc02c21c6..dfe8590f13 100644 --- a/packages/commerce-sdk-react/src/auth/index.ts +++ b/packages/commerce-sdk-react/src/auth/index.ts @@ -37,6 +37,7 @@ type AuthDataKeys = | 'refresh_token_registered' | 'token_type' | 'usid' + | 'site_id' type AuthDataMap = Record< AuthDataKeys, { @@ -101,6 +102,10 @@ const DATA_MAP: AuthDataMap = { callback: () => { cookieStorage.delete('cc-nx-g') } + }, + site_id: { + storage: cookieStorage, + key: 'cc-site-id' } } @@ -131,6 +136,19 @@ class Auth { fetchOptions: config.fetchOptions }) + if (this.get('site_id') && this.get('site_id') !== config.siteId) { + // if site is switched, remove all existing auth data in storage + // and the next auth.ready() call with restart the auth flow + this.clearStorage() + this.pendingToken = undefined + } + + if (!this.get('site_id')) { + this.set('site_id', config.siteId, { + expires: this.REFRESH_TOKEN_EXPIRATION_DAYS + }) + } + this.redirectURI = config.redirectURI } @@ -146,6 +164,13 @@ class Auth { DATA_MAP[name].callback?.() } + private clearStorage() { + Object.keys(DATA_MAP).forEach((key) => { + type Key = keyof AuthDataMap + DATA_MAP[key as Key].storage.delete(DATA_MAP[key as Key].key) + }) + } + /** * Every method in this class that returns a `TokenResponse` constructs it via this getter. */ diff --git a/packages/commerce-sdk-react/src/hooks/ShopperProducts/query.test.tsx b/packages/commerce-sdk-react/src/hooks/ShopperProducts/query.test.tsx index eb419be4ff..6847cf349e 100644 --- a/packages/commerce-sdk-react/src/hooks/ShopperProducts/query.test.tsx +++ b/packages/commerce-sdk-react/src/hooks/ShopperProducts/query.test.tsx @@ -27,8 +27,8 @@ const ProductsComponent = ({ids}: {ids: string}): ReactElement => { )} {data && (