@faststore/api 3.95.1-dev.0 → 3.96.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/cjs/index.js +3521 -0
  2. package/dist/cjs/package.json +4 -1
  3. package/dist/cjs/src/__generated__/schema.d.ts +3 -0
  4. package/dist/cjs/src/__generated__/schema.d.ts.map +1 -1
  5. package/dist/cjs/src/__generated__/schema.js.map +1 -1
  6. package/dist/cjs/src/directives/cacheControl.d.ts +1 -1
  7. package/dist/cjs/src/directives/cacheControl.d.ts.map +1 -1
  8. package/dist/cjs/src/directives/cacheControl.js +5 -1
  9. package/dist/cjs/src/directives/cacheControl.js.map +1 -1
  10. package/dist/cjs/src/platforms/vtex/resolvers/userOrder.d.ts +5 -0
  11. package/dist/cjs/src/platforms/vtex/resolvers/userOrder.d.ts.map +1 -1
  12. package/dist/cjs/src/platforms/vtex/resolvers/userOrder.js +19 -2
  13. package/dist/cjs/src/platforms/vtex/resolvers/userOrder.js.map +1 -1
  14. package/dist/cjs/src/typeDefs/userOrder.graphql +3 -0
  15. package/dist/es/index.mjs +6022 -0
  16. package/dist/esm/package.json +4 -1
  17. package/dist/esm/src/__generated__/schema.d.ts +3 -0
  18. package/dist/esm/src/__generated__/schema.d.ts.map +1 -1
  19. package/dist/esm/src/__generated__/schema.js.map +1 -1
  20. package/dist/esm/src/directives/cacheControl.d.ts +1 -1
  21. package/dist/esm/src/directives/cacheControl.d.ts.map +1 -1
  22. package/dist/esm/src/directives/cacheControl.js +5 -1
  23. package/dist/esm/src/directives/cacheControl.js.map +1 -1
  24. package/dist/esm/src/platforms/vtex/resolvers/userOrder.d.ts +5 -0
  25. package/dist/esm/src/platforms/vtex/resolvers/userOrder.d.ts.map +1 -1
  26. package/dist/esm/src/platforms/vtex/resolvers/userOrder.js +17 -1
  27. package/dist/esm/src/platforms/vtex/resolvers/userOrder.js.map +1 -1
  28. package/dist/esm/src/typeDefs/userOrder.graphql +3 -0
  29. package/dist/src/__generated__/schema.d.ts +2400 -0
  30. package/dist/src/__generated__/schema.d.ts.map +1 -0
  31. package/dist/src/directives/auth.d.ts +4 -0
  32. package/dist/src/directives/auth.d.ts.map +1 -0
  33. package/dist/src/directives/cacheControl.d.ts +10 -0
  34. package/dist/src/directives/cacheControl.d.ts.map +1 -0
  35. package/dist/src/directives/index.d.ts +10 -0
  36. package/dist/src/directives/index.d.ts.map +1 -0
  37. package/dist/src/index.d.ts +11 -0
  38. package/dist/src/index.d.ts.map +1 -0
  39. package/dist/src/platforms/errors.d.ts +28 -0
  40. package/dist/src/platforms/errors.d.ts.map +1 -0
  41. package/dist/src/platforms/vtex/clients/commerce/Contract.d.ts +8 -0
  42. package/dist/src/platforms/vtex/clients/commerce/Contract.d.ts.map +1 -0
  43. package/dist/src/platforms/vtex/clients/commerce/index.d.ts +141 -0
  44. package/dist/src/platforms/vtex/clients/commerce/index.d.ts.map +1 -0
  45. package/dist/src/platforms/vtex/clients/commerce/types/Address.d.ts +17 -0
  46. package/dist/src/platforms/vtex/clients/commerce/types/Address.d.ts.map +1 -0
  47. package/dist/src/platforms/vtex/clients/commerce/types/Brand.d.ts +9 -0
  48. package/dist/src/platforms/vtex/clients/commerce/types/Brand.d.ts.map +1 -0
  49. package/dist/src/platforms/vtex/clients/commerce/types/CategoryTree.d.ts +10 -0
  50. package/dist/src/platforms/vtex/clients/commerce/types/CategoryTree.d.ts.map +1 -0
  51. package/dist/src/platforms/vtex/clients/commerce/types/Newsletter.d.ts +5 -0
  52. package/dist/src/platforms/vtex/clients/commerce/types/Newsletter.d.ts.map +1 -0
  53. package/dist/src/platforms/vtex/clients/commerce/types/OrderForm.d.ts +372 -0
  54. package/dist/src/platforms/vtex/clients/commerce/types/OrderForm.d.ts.map +1 -0
  55. package/dist/src/platforms/vtex/clients/commerce/types/PickupPoints.d.ts +37 -0
  56. package/dist/src/platforms/vtex/clients/commerce/types/PickupPoints.d.ts.map +1 -0
  57. package/dist/src/platforms/vtex/clients/commerce/types/Portal.d.ts +18 -0
  58. package/dist/src/platforms/vtex/clients/commerce/types/Portal.d.ts.map +1 -0
  59. package/dist/src/platforms/vtex/clients/commerce/types/Product.d.ts +175 -0
  60. package/dist/src/platforms/vtex/clients/commerce/types/Product.d.ts.map +1 -0
  61. package/dist/src/platforms/vtex/clients/commerce/types/Profile.d.ts +19 -0
  62. package/dist/src/platforms/vtex/clients/commerce/types/Profile.d.ts.map +1 -0
  63. package/dist/src/platforms/vtex/clients/commerce/types/Region.d.ts +20 -0
  64. package/dist/src/platforms/vtex/clients/commerce/types/Region.d.ts.map +1 -0
  65. package/dist/src/platforms/vtex/clients/commerce/types/SalesChannel.d.ts +25 -0
  66. package/dist/src/platforms/vtex/clients/commerce/types/SalesChannel.d.ts.map +1 -0
  67. package/dist/src/platforms/vtex/clients/commerce/types/Session.d.ts +55 -0
  68. package/dist/src/platforms/vtex/clients/commerce/types/Session.d.ts.map +1 -0
  69. package/dist/src/platforms/vtex/clients/commerce/types/ShippingData.d.ts +39 -0
  70. package/dist/src/platforms/vtex/clients/commerce/types/ShippingData.d.ts.map +1 -0
  71. package/dist/src/platforms/vtex/clients/commerce/types/Simulation.d.ts +155 -0
  72. package/dist/src/platforms/vtex/clients/commerce/types/Simulation.d.ts.map +1 -0
  73. package/dist/src/platforms/vtex/clients/commerce/types/Unit.d.ts +19 -0
  74. package/dist/src/platforms/vtex/clients/commerce/types/Unit.d.ts.map +1 -0
  75. package/dist/src/platforms/vtex/clients/commerce/types/VtexId.d.ts +12 -0
  76. package/dist/src/platforms/vtex/clients/commerce/types/VtexId.d.ts.map +1 -0
  77. package/dist/src/platforms/vtex/clients/fetch.d.ts +6 -0
  78. package/dist/src/platforms/vtex/clients/fetch.d.ts.map +1 -0
  79. package/dist/src/platforms/vtex/clients/index.d.ts +130 -0
  80. package/dist/src/platforms/vtex/clients/index.d.ts.map +1 -0
  81. package/dist/src/platforms/vtex/clients/search/index.d.ts +33 -0
  82. package/dist/src/platforms/vtex/clients/search/index.d.ts.map +1 -0
  83. package/dist/src/platforms/vtex/clients/search/types/AttributeSearchResult.d.ts +31 -0
  84. package/dist/src/platforms/vtex/clients/search/types/AttributeSearchResult.d.ts.map +1 -0
  85. package/dist/src/platforms/vtex/clients/search/types/FacetSearchResult.d.ts +32 -0
  86. package/dist/src/platforms/vtex/clients/search/types/FacetSearchResult.d.ts.map +1 -0
  87. package/dist/src/platforms/vtex/clients/search/types/ProductCountResult.d.ts +7 -0
  88. package/dist/src/platforms/vtex/clients/search/types/ProductCountResult.d.ts.map +1 -0
  89. package/dist/src/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +228 -0
  90. package/dist/src/platforms/vtex/clients/search/types/ProductSearchResult.d.ts.map +1 -0
  91. package/dist/src/platforms/vtex/index.d.ts +29 -0
  92. package/dist/src/platforms/vtex/index.d.ts.map +1 -0
  93. package/dist/src/platforms/vtex/loaders/collection.d.ts +6 -0
  94. package/dist/src/platforms/vtex/loaders/collection.d.ts.map +1 -0
  95. package/dist/src/platforms/vtex/loaders/index.d.ts +9 -0
  96. package/dist/src/platforms/vtex/loaders/index.d.ts.map +1 -0
  97. package/dist/src/platforms/vtex/loaders/salesChannel.d.ts +5 -0
  98. package/dist/src/platforms/vtex/loaders/salesChannel.d.ts.map +1 -0
  99. package/dist/src/platforms/vtex/loaders/simulation.d.ts +5 -0
  100. package/dist/src/platforms/vtex/loaders/simulation.d.ts.map +1 -0
  101. package/dist/src/platforms/vtex/loaders/sku.d.ts +5 -0
  102. package/dist/src/platforms/vtex/loaders/sku.d.ts.map +1 -0
  103. package/dist/src/platforms/vtex/resolvers/aggregateOffer.d.ts +7 -0
  104. package/dist/src/platforms/vtex/resolvers/aggregateOffer.d.ts.map +1 -0
  105. package/dist/src/platforms/vtex/resolvers/aggregateRating.d.ts +3 -0
  106. package/dist/src/platforms/vtex/resolvers/aggregateRating.d.ts.map +1 -0
  107. package/dist/src/platforms/vtex/resolvers/cancelOrder.d.ts +4 -0
  108. package/dist/src/platforms/vtex/resolvers/cancelOrder.d.ts.map +1 -0
  109. package/dist/src/platforms/vtex/resolvers/collection.d.ts +9 -0
  110. package/dist/src/platforms/vtex/resolvers/collection.d.ts.map +1 -0
  111. package/dist/src/platforms/vtex/resolvers/faceValue.d.ts +4 -0
  112. package/dist/src/platforms/vtex/resolvers/faceValue.d.ts.map +1 -0
  113. package/dist/src/platforms/vtex/resolvers/facet.d.ts +7 -0
  114. package/dist/src/platforms/vtex/resolvers/facet.d.ts.map +1 -0
  115. package/dist/src/platforms/vtex/resolvers/index.d.ts +237 -0
  116. package/dist/src/platforms/vtex/resolvers/index.d.ts.map +1 -0
  117. package/dist/src/platforms/vtex/resolvers/mutation.d.ts +65 -0
  118. package/dist/src/platforms/vtex/resolvers/mutation.d.ts.map +1 -0
  119. package/dist/src/platforms/vtex/resolvers/objectOrString.d.ts +3 -0
  120. package/dist/src/platforms/vtex/resolvers/objectOrString.d.ts.map +1 -0
  121. package/dist/src/platforms/vtex/resolvers/offer.d.ts +12 -0
  122. package/dist/src/platforms/vtex/resolvers/offer.d.ts.map +1 -0
  123. package/dist/src/platforms/vtex/resolvers/organization.d.ts +5 -0
  124. package/dist/src/platforms/vtex/resolvers/organization.d.ts.map +1 -0
  125. package/dist/src/platforms/vtex/resolvers/processOrderAuthorization.d.ts +6 -0
  126. package/dist/src/platforms/vtex/resolvers/processOrderAuthorization.d.ts.map +1 -0
  127. package/dist/src/platforms/vtex/resolvers/product.d.ts +17 -0
  128. package/dist/src/platforms/vtex/resolvers/product.d.ts.map +1 -0
  129. package/dist/src/platforms/vtex/resolvers/productGroup.d.ts +5 -0
  130. package/dist/src/platforms/vtex/resolvers/productGroup.d.ts.map +1 -0
  131. package/dist/src/platforms/vtex/resolvers/propertyValue.d.ts +5 -0
  132. package/dist/src/platforms/vtex/resolvers/propertyValue.d.ts.map +1 -0
  133. package/dist/src/platforms/vtex/resolvers/query.d.ts +131 -0
  134. package/dist/src/platforms/vtex/resolvers/query.d.ts.map +1 -0
  135. package/dist/src/platforms/vtex/resolvers/review.d.ts +3 -0
  136. package/dist/src/platforms/vtex/resolvers/review.d.ts.map +1 -0
  137. package/dist/src/platforms/vtex/resolvers/root.d.ts +13 -0
  138. package/dist/src/platforms/vtex/resolvers/root.d.ts.map +1 -0
  139. package/dist/src/platforms/vtex/resolvers/searchResult.d.ts +9 -0
  140. package/dist/src/platforms/vtex/resolvers/searchResult.d.ts.map +1 -0
  141. package/dist/src/platforms/vtex/resolvers/seo.d.ts +7 -0
  142. package/dist/src/platforms/vtex/resolvers/seo.d.ts.map +1 -0
  143. package/dist/src/platforms/vtex/resolvers/shippingSLA.d.ts +14 -0
  144. package/dist/src/platforms/vtex/resolvers/shippingSLA.d.ts.map +1 -0
  145. package/dist/src/platforms/vtex/resolvers/skuVariations.d.ts +5 -0
  146. package/dist/src/platforms/vtex/resolvers/skuVariations.d.ts.map +1 -0
  147. package/dist/src/platforms/vtex/resolvers/subscribeToNewsletter.d.ts +4 -0
  148. package/dist/src/platforms/vtex/resolvers/subscribeToNewsletter.d.ts.map +1 -0
  149. package/dist/src/platforms/vtex/resolvers/userOrder.d.ts +7 -0
  150. package/dist/src/platforms/vtex/resolvers/userOrder.d.ts.map +1 -0
  151. package/dist/src/platforms/vtex/resolvers/validateCart.d.ts +72 -0
  152. package/dist/src/platforms/vtex/resolvers/validateCart.d.ts.map +1 -0
  153. package/dist/src/platforms/vtex/resolvers/validateSession.d.ts +4 -0
  154. package/dist/src/platforms/vtex/resolvers/validateSession.d.ts.map +1 -0
  155. package/dist/src/platforms/vtex/typeDefs/index.d.ts +3 -0
  156. package/dist/src/platforms/vtex/typeDefs/index.d.ts.map +1 -0
  157. package/dist/src/platforms/vtex/utils/auth.d.ts +18 -0
  158. package/dist/src/platforms/vtex/utils/auth.d.ts.map +1 -0
  159. package/dist/src/platforms/vtex/utils/canonical.d.ts +3 -0
  160. package/dist/src/platforms/vtex/utils/canonical.d.ts.map +1 -0
  161. package/dist/src/platforms/vtex/utils/channel.d.ts +11 -0
  162. package/dist/src/platforms/vtex/utils/channel.d.ts.map +1 -0
  163. package/dist/src/platforms/vtex/utils/commercialAuth.d.ts +12 -0
  164. package/dist/src/platforms/vtex/utils/commercialAuth.d.ts.map +1 -0
  165. package/dist/src/platforms/vtex/utils/contex.d.ts +4 -0
  166. package/dist/src/platforms/vtex/utils/contex.d.ts.map +1 -0
  167. package/dist/src/platforms/vtex/utils/cookies.d.ts +48 -0
  168. package/dist/src/platforms/vtex/utils/cookies.d.ts.map +1 -0
  169. package/dist/src/platforms/vtex/utils/createNewAddress.d.ts +4 -0
  170. package/dist/src/platforms/vtex/utils/createNewAddress.d.ts.map +1 -0
  171. package/dist/src/platforms/vtex/utils/enhanceCommercialOffer.d.ts +11 -0
  172. package/dist/src/platforms/vtex/utils/enhanceCommercialOffer.d.ts.map +1 -0
  173. package/dist/src/platforms/vtex/utils/enhanceSku.d.ts +6 -0
  174. package/dist/src/platforms/vtex/utils/enhanceSku.d.ts.map +1 -0
  175. package/dist/src/platforms/vtex/utils/facets.d.ts +41 -0
  176. package/dist/src/platforms/vtex/utils/facets.d.ts.map +1 -0
  177. package/dist/src/platforms/vtex/utils/getAddressOrderForm.d.ts +4 -0
  178. package/dist/src/platforms/vtex/utils/getAddressOrderForm.d.ts.map +1 -0
  179. package/dist/src/platforms/vtex/utils/md5.d.ts +2 -0
  180. package/dist/src/platforms/vtex/utils/md5.d.ts.map +1 -0
  181. package/dist/src/platforms/vtex/utils/orderStatistics.d.ts +5 -0
  182. package/dist/src/platforms/vtex/utils/orderStatistics.d.ts.map +1 -0
  183. package/dist/src/platforms/vtex/utils/productStock.d.ts +8 -0
  184. package/dist/src/platforms/vtex/utils/productStock.d.ts.map +1 -0
  185. package/dist/src/platforms/vtex/utils/propertyValue.d.ts +24 -0
  186. package/dist/src/platforms/vtex/utils/propertyValue.d.ts.map +1 -0
  187. package/dist/src/platforms/vtex/utils/sanitizeHtml.d.ts +18 -0
  188. package/dist/src/platforms/vtex/utils/sanitizeHtml.d.ts.map +1 -0
  189. package/dist/src/platforms/vtex/utils/shouldUpdateShippingData.d.ts +7 -0
  190. package/dist/src/platforms/vtex/utils/shouldUpdateShippingData.d.ts.map +1 -0
  191. package/dist/src/platforms/vtex/utils/sku.d.ts +9 -0
  192. package/dist/src/platforms/vtex/utils/sku.d.ts.map +1 -0
  193. package/dist/src/platforms/vtex/utils/skuVariants.d.ts +16 -0
  194. package/dist/src/platforms/vtex/utils/skuVariants.d.ts.map +1 -0
  195. package/dist/src/platforms/vtex/utils/slugify.d.ts +2 -0
  196. package/dist/src/platforms/vtex/utils/slugify.d.ts.map +1 -0
  197. package/dist/src/platforms/vtex/utils/sort.d.ts +11 -0
  198. package/dist/src/platforms/vtex/utils/sort.d.ts.map +1 -0
  199. package/dist/src/platforms/vtex/utils/taxes.d.ts +2 -0
  200. package/dist/src/platforms/vtex/utils/taxes.d.ts.map +1 -0
  201. package/dist/src/typings/index.d.ts +21 -0
  202. package/dist/src/typings/index.d.ts.map +1 -0
  203. package/package.json +5 -2
  204. package/src/__generated__/schema.ts +3 -0
  205. package/src/directives/cacheControl.ts +12 -6
  206. package/src/platforms/vtex/resolvers/userOrder.ts +30 -1
  207. package/src/typeDefs/userOrder.graphql +3 -0
@@ -0,0 +1,3521 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zn=require("@graphql-tools/merge"),$n=require("@graphql-tools/schema"),V=require("@graphql-tools/utils"),Q=require("graphql"),en=require("cookie"),Oe=require("isomorphic-unfetch"),tn=require("dataloader"),Vn=require("p-limit"),Ce=require("sanitize-html"),In=require("fast-deep-equal"),be=require("node:crypto");var qn=(n=>(n.Accepted="accepted",n.Denied="denied",n.Pending="pending",n))(qn||{}),xn=(n=>(n.Brand="Brand",n.Category="Category",n.Cluster="Cluster",n.Collection="Collection",n.Department="Department",n.SubCategory="SubCategory",n))(xn||{}),Wn=(n=>(n.Boolean="BOOLEAN",n.Range="RANGE",n))(Wn||{}),jn=(n=>(n.DiscountDesc="discount_desc",n.NameAsc="name_asc",n.NameDesc="name_desc",n.OrdersDesc="orders_desc",n.PriceAsc="price_asc",n.PriceDesc="price_desc",n.ReleaseDesc="release_desc",n.ScoreDesc="score_desc",n))(jn||{}),Gn=(n=>(n.Error="ERROR",n.Info="INFO",n.Warning="WARNING",n))(Gn||{}),Hn=(n=>(n.Input="Input",n.Output="Output",n))(Hn||{});const De=()=>function(e={}){const t=process.env.FS_DISCOVERY_APP_KEY??"",r=process.env.FS_DISCOVERY_APP_TOKEN??"";if(!t||!r)throw new X("No authentication AppKey and AppToken passed.");return{...e,"X-VTEX-API-AppKey":t,"X-VTEX-API-AppToken":r}},we=async n=>{const{clients:{commerce:e}}=n;try{if((await e.vtexid.validate())?.authStatus?.toLowerCase()!=="success")throw new H("Authentication required")}catch(t){const r=t.extensions?.status??t.status;throw r===401?new H("Authentication required"):r===403?new X("You are not allowed to access this resource"):new H("Authentication required")}},Ae="auth",Xn={typeDefs:"directive @auth on FIELD_DEFINITION",transformer:n=>V.mapSchema(n,{[V.MapperKind.OBJECT_FIELD]:e=>{if(V.getDirective(n,e,Ae)?.[0]){const r=e.resolve;e.resolve=async(i,o,a,s)=>(await we(a),r?.(i,o,a,s))}return e}})},Pe="cacheControl",ke=({scope:n="private",sMaxAge:e=0,staleWhileRevalidate:t=0})=>`${n}, s-maxage=${e}, stale-while-revalidate=${t}`,bn=(n,e)=>typeof n=="number"&&typeof e=="number"?n>e?e:n:typeof n=="number"?n:e,_e=(n,e)=>typeof n=="string"&&typeof e=="string"?n==="public"&&e==="public"?"public":"private":n||e,Yn={typeDefs:"directive @cacheControl(sMaxAge: Int, staleWhileRevalidate: Int, scope: String) on FIELD_DEFINITION",transformer:n=>V.mapSchema(n,{[V.MapperKind.OBJECT_FIELD]:e=>{const t=V.getDirective(n,e,Pe)?.[0];if(t){const{sMaxAge:r,staleWhileRevalidate:i,scope:o}=t,a=e.resolve;e.resolve=(s,c,p,u)=>(p.cacheControl={sMaxAge:bn(p.cacheControl?.sMaxAge,r),staleWhileRevalidate:bn(p.cacheControl?.staleWhileRevalidate,i),scope:_e(p.cacheControl?.scope,o)},a?.(s,c,p,u))}return e}})},Jn=n=>(e,t)=>{const r=zn.mergeTypeDefs([...(n??[]).map(({typeDefs:i})=>i),t]);return(n??[]).reduce((i,{transformer:o})=>o?.(i)??i,$n.makeExecutableSchema({typeDefs:r,resolvers:e}))},Ue="@faststore/api",Ee="3.95.0",Dn={name:Ue,version:Ee};class W extends Error{constructor(e,t){super(t),this.extensions=e,this.name="FastStoreError"}}class B extends W{constructor(e){super({status:400,type:"BadRequestError"},e)}}class H extends W{constructor(e){super({status:401,type:"UnauthorizedError"},e)}}class X extends W{constructor(e){super({status:403,type:"ForbiddenError"},e)}}class L extends W{constructor(e){super({status:404,type:"NotFoundError"},e)}}const Ne=n=>n?.name==="FastStoreError",Te=n=>n?.extensions?.type==="BadRequestError",Fe=n=>n?.extensions?.type==="UnauthorizedError",Kn=n=>n?.extensions?.type==="ForbiddenError",Qn=n=>n?.extensions?.type==="NotFoundError",Re=`${Dn.name}@${Dn.version}`,I=async(n,e,t)=>{const r=await Oe(n,{...e,headers:{...e?.headers??{},"User-Agent":Re}});if(r.ok)return t?.storeCookies&&t.storeCookies(r.headers),r.status!==204?r.json():void 0;console.error(n,e,r);const i=await r.text();if(typeof r?.status=="number")switch(r.status){case 400:throw new B(i);case 401:throw new H(i);case 403:throw new X(i);case 404:throw new L(i);default:throw new W({status:r.status,type:"UnknownError"},i)}throw new Error(i)},Zn=n=>{if(!n)return n;const e=new Map,t=n.split(";"),r=[];return t.forEach(i=>{const o=i.trim();if(o){const a=o.indexOf("=");if(a>0){const s=o.substring(0,a),c=o.substring(a+1);e.has(s)||r.push(s),e.set(s,c)}}}),r.map(i=>`${i}=${e.get(i)}`).join("; ")},Le=/^([^=]+)=([^;]*)/,Me=(n,e)=>{const t=e.match(Le);if(t){const r=t[1],i=t[2];n.storage.cookies.set(r,{value:i,setCookie:e})}},Be=(n,e)=>{e.getSetCookie().forEach(t=>Me(n,t))},ze=n=>e=>Be(n,e),$e=n=>{if(!n.headers?.cookie)return null;const e=Zn(n.headers.cookie),t=Array.from(n.storage.cookies.entries());return t.length===0?e:t.reduce((r,[i,{value:o}])=>qe(r,i,o),e)},vn=n=>function(t){const r=$e(n);return r?{...t,cookie:r}:t},On=(n,e)=>{const t=Zn(n);return en.parse(t)[`VtexIdclientAutCookie_${e}`]||""},Ve=n=>{const e=vn(n);return function(r,i){const o=e({"content-type":"application/json","X-FORWARDED-HOST":r}),a=On(n?.headers?.cookie??"",i);return o.VtexIdclientAutCookie=a,o}},qe=(n,e,t)=>{const r=new RegExp(`(${e})=([^;]*)`),i=n.match(r);return i?n.replace(i[0],`${i[1]}=${t}`):`${n};${e}=${t}`};function Cn(n){return n?JSON.parse(Buffer.from(n.split(".")[1],"base64").toString()):null}const G={method:"POST",headers:{"content-type":"application/json"}},xe=({account:n,environment:e,incrementAddress:t,subDomainPrefix:r},i)=>{const o=`https://${n}.${e}.com.br`,a=ze(i),s=vn(i),c=Ve(i),p=De(),u=new Headers(i.headers).get("x-forwarded-host")??i.headers?.host??"",m=r&&r.map(l=>l+".").find(l=>u.includes(l))||"",d=u.replace(m,"");return{catalog:{salesChannel:l=>I(`${o}/api/catalog_system/pub/saleschannel/${l}`,void 0,{storeCookies:a}),brand:{list:()=>I(`${o}/api/catalog_system/pub/brand/list`,void 0,{storeCookies:a})},category:{tree:(l=3)=>I(`${o}/api/catalog_system/pub/category/tree/${l}`,void 0,{storeCookies:a})},portal:{pagetype:l=>I(`${o}/api/catalog_system/pub/portal/pagetype/${l}`,void 0,{storeCookies:a})},products:{crossselling:({type:l,productId:g,groupByProduct:S=!0})=>{const f=new URLSearchParams({sc:i.storage.channel.salesChannel,groupByProduct:S.toString()});return I(`${o}/api/catalog_system/pub/products/crossselling/${l}/${g}?${f}`,void 0,{storeCookies:a})}}},checkout:{simulation:(l,{salesChannel:g}=i.storage.channel)=>{const S=new URLSearchParams({sc:g}),f=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForms/simulation?${S.toString()}`,{...G,headers:f,body:JSON.stringify(l)},{storeCookies:a})},shippingData:({id:l,index:g,deliveryMode:S,selectedAddresses:f},C)=>{const b=C?{startDateUtc:S?.deliveryWindow?.startDate,endDateUtc:S?.deliveryWindow?.endDate}:null,P={logisticsInfo:Array.from({length:g},(v,A)=>({itemIndex:A,selectedDeliveryChannel:S?.deliveryChannel||null,selectedSla:S?.deliveryMethod||null,deliveryWindow:b})),selectedAddresses:f,clearAddressIfPostalCodeNotFound:t},N=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}/attachments/shippingData`,{...G,headers:N,body:JSON.stringify(P)},{storeCookies:a})},marketingData:({id:l,marketingData:g})=>{const S=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}/attachments/marketingData`,{headers:S,body:JSON.stringify(g),method:"POST"},{storeCookies:a})},orderForm:({id:l,refreshOutdatedData:g=!0,channel:S=i.storage.channel})=>{const{salesChannel:f}=S,C=new URLSearchParams({refreshOutdatedData:g.toString(),sc:f}),b=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}?${C.toString()}`,{...G,headers:b},{storeCookies:a})},clearOrderFormMessages:({id:l})=>{const g=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}/messages/clear`,{...G,headers:g,body:"{}"})},updateOrderFormItems:({id:l,orderItems:g,allowOutdatedData:S="paymentData",salesChannel:f=i.storage.channel.salesChannel,shouldSplitItem:C=!0})=>{const b=new URLSearchParams({allowOutdatedData:S,sc:f}),P=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}/items?${b}`,{headers:P,body:JSON.stringify({orderItems:g,noSplitItem:!C}),method:"PATCH"},{storeCookies:a})},setCustomData:({id:l,appId:g,key:S,value:f})=>{const C=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orderForm/${l}/customData/${g}/${S}`,{headers:C,body:JSON.stringify({value:f}),method:"PUT"})},region:async({postalCode:l,geoCoordinates:g,country:S,salesChannel:f})=>{const C=new URLSearchParams({country:S,sc:f??""});l?C.append("postalCode",l):C.append("geoCoordinates",`${g?.longitude};${g?.latitude}`);const b=`${o}/api/checkout/pub/regions/?${C.toString()}`,P=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(b,{headers:P},{storeCookies:a})},address:async({postalCode:l,country:g})=>{const S=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/postal-code/${g}/${l}`,{headers:S},{storeCookies:a})},cancelOrder:({orderId:l,customerEmail:g,reason:S})=>{const f=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/checkout/pub/orders/${l}/user-cancel-request`,{method:"POST",headers:f,body:JSON.stringify({customerEmail:g,reason:S})},{})},pickupPoints:({geoCoordinates:l})=>{if(!l)throw new Error("Missing required parameter for listing pickup points.");const g=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/logistics-shipping/pickuppoints/_search`,{method:"POST",headers:g,body:JSON.stringify({coordinate:l})},{storeCookies:a})}},session:l=>{const g=new URLSearchParams(l);g.set("items","profile.id,profile.email,profile.firstName,profile.lastName,shopper.firstName,shopper.lastName,shopper.organizationManager,store.channel,store.countryCode,store.cultureInfo,store.currencyCode,store.currencySymbol,authentication.customerId,authentication.storeUserId,authentication.storeUserEmail,authentication.unitId,authentication.unitName,checkout.regionId,public.postalCode");const S=s({"content-type":"application/json"}),f=en.parse(i?.headers?.cookie??"")?.vtex_session;return I(`${o}/api/sessions?${g.toString()}`,{method:f?"PATCH":"POST",headers:S,body:"{}"},{storeCookies:a})},subscribeToNewsletter:l=>I(`${o}/api/dataentities/NL/documents/`,{...G,body:JSON.stringify({...l,isNewsletterOptIn:!0}),method:"PATCH"},{storeCookies:a}),profile:{addresses:async l=>{const g=c(d,n);return I(`${o}/api/profile-system/pvt/profiles/${l}/addresses`,{headers:g},{storeCookies:a})}},oms:{userOrder:({orderId:l})=>{const g=c(d,n);return I(`${o}/api/oms/user/orders/${l}`,{method:"GET",headers:g},{storeCookies:a})},listUserOrders:({page:l,status:g,dateInitial:S,dateFinal:f,text:C,clientEmail:b,perPage:P,pendingMyApproval:N})=>{const v=new URLSearchParams;if(S){const h=new Date(S).setHours(0,0,0,0);S=new Date(h).toISOString()}if(f){const h=new Date(f).setHours(23,59,59,999);f=new Date(h).toISOString()}C&&v.append("text",C),g&&g.length>0&&v.append("status",g.filter(Boolean).join(",")),S&&f?v.append("creation_date",`creationDate:[${S} TO ${f}]`):S?v.append("creation_date",`creationDate:[${S} TO *]`):f&&v.append("creation_date",`creationDate:[* TO ${f}]`),b&&v.append("clientEmail",b),l&&v.append("page",l.toString()),P&&v.append("per_page",P.toString()),N&&v.append("my_pending_approvals",String(!0));const A=s({"content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/oms/user/orders?${v.toString()}`,{method:"GET",headers:A},{storeCookies:a})},getCommercialAuthorizationsByOrderId:({orderId:l})=>{const g=c(d,n);return I(`${o}/${n}/commercial-authorizations/order/${l}`,{method:"GET",headers:g},{storeCookies:a})},processOrderAuthorization:async({orderAuthorizationId:l,dimensionId:g,ruleId:S,approved:f})=>{const C=c(d,n),N={params:{ruleId:S,dimensionId:g,score:f?100:0}};return I(`${o}/${n}/commercial-authorizations/${l}/callback`,{method:"POST",headers:C,body:JSON.stringify(N)},{storeCookies:a})}},units:{getUnitByUserId:({userId:l})=>{const g=c(d,n);return I(`${o}/api/units/v1/${l}/unit`,{method:"GET",headers:g},{})},getOrgUnitById:({orgUnitId:l})=>{const g=c(d,n);return I(`${o}/api/units/v1/${l}`,{method:"GET",headers:g},{})},getScopesByOrgUnit:({orgUnitId:l})=>{const g=c(d,n);return I(`${o}/api/units/v1/${l}/scopes`,{method:"GET",headers:g},{})}},licenseManager:{getUserById:({userId:l})=>{const g=c(d,n);return I(`${o}/api/license-manager/users/${l}`,{method:"GET",headers:g},{})},getUserByEmail:({email:l})=>{const g=c(d,n);return I(`${o}/api/license-manager/pvt/users/${l}`,{method:"GET",headers:g},{})}},masterData:{getContractById:({contractId:l})=>{if(!l)throw new B("Missing contractId to fetch CL fields.");const g=p({Accept:"application/json","content-type":"application/json","X-FORWARDED-HOST":d});return I(`${o}/api/dataentities/CL/documents/${l}?_fields=_all`,{method:"GET",headers:g},{})},getShopperById:({userId:l})=>{if(!l)throw new B("Missing userId to fetch shopper name.");const g=p({Accept:"application/json","content-type":"application/json","X-FORWARDED-HOST":d}),S=l.replace(/-/g,"");return I(`${o}/api/dataentities/shopper/search?_where=(userId=${S} OR userId=${l})&_fields=_all&_schema=v1`,{method:"GET",headers:g},{})}},vtexid:{validate:()=>{const l=c(d,n);return I(`${o}/api/vtexid/credential/validate`,{headers:l,body:JSON.stringify({token:l.VtexIdclientAutCookie}),method:"POST"},{storeCookies:a})}}}},sn="trade-policy",cn="region-id",ln="fuzzy",dn="operator",un="pickupPoint",ne="shipping",ee="delivery-options",te="in-stock",We=new Set([sn,cn,ln,dn,un,ne,ee,te]),je=n=>n.key==="fuzzy"&&(n.value==="0"||n.value==="1"||n.value==="auto"),Ge=n=>n.key==="operator"&&(n.value==="and"||n.value==="or"),He=({account:n,environment:e,hideUnavailableItems:t,simulationBehavior:r,showSponsored:i,subDomainPrefix:o},a)=>{const s=`https://${n}.${e}.com.br/api/io`,c=vn(a),p=new Headers(a.headers).get("x-forwarded-host")??a.headers?.host??"",u=o&&o.map(h=>h+".").find(h=>p.includes(h))||"",m=p.replace(u,""),d=c({"content-type":"application/json","X-FORWARDED-HOST":m}),l=()=>{const{salesChannel:h}=a.storage.channel;return h?{key:sn,value:h}:null},g=()=>{const{regionId:h,seller:O}=a.storage.channel,y=(O?Buffer.from(`SW#${O}`).toString("base64"):null)??h;return y?{key:cn,value:y}:null},S=h=>{const O=h.filter(({key:k})=>!We.has(k)),D=h.find(({key:k,value:E})=>k===ne&&E!=="all-delivery-methods")??null,y=h.find(({key:k,value:E})=>k===ee&&E!=="all-delivery-options")??null,w=h.find(({key:k})=>k===sn)??l(),_=h.find(({key:k})=>k===cn)??g();return D!==null&&O.push(D),y!==null&&O.push(y),w!==null&&O.push(w),_!==null&&O.push(_),O},f=(h,O)=>{const D=h.find(({key:_})=>_===ln)??null,y=h.find(({key:_})=>_===dn)??null,w=h.find(({key:_})=>_===un)??null;D&&je(D)&&O.append(ln,D.value),y&&Ge(y)&&O.append(dn,y.value),w&&O.append(un,w.value)},C=({query:h="",page:O,count:D,sort:y="",selectedFacets:w=[],type:_,showInvisibleItems:k,sponsoredCount:E,hideUnavailableItems:T,allowRedirect:j=!1})=>{const U=new URLSearchParams({page:(O+1).toString(),count:D!==0?D.toString():"1",query:h,sort:y,locale:a.storage.locale});if(f(w,U),k&&U.append("show-invisible-items","true"),t!==void 0){const J=w.find(({key:ve})=>ve===te),on=J?J.value:T?.toString()??t.toString();U.append("hideUnavailableItems",on)}r!==void 0&&U.append("simulationBehavior",r.toString()),i!==void 0&&U.append("showSponsored",i.toString()),E!==void 0&&U.append("sponsoredCount",E.toString()),j!==void 0&&U.append("allowRedirect",j.toString());const rn=S(w).map(({key:J,value:on})=>`${J}/${on}`).join("/");return I(`${s}/_v/api/intelligent-search/${_}/${rn}?${U.toString()}`,{headers:d})};return{facets:h=>C({...h,type:"facets"}),products:h=>C({...h,type:"product_search"}),suggestedTerms:h=>{const O=new URLSearchParams({query:h.query?.toString()??"",locale:a.storage.locale});return I(`${s}/_v/api/intelligent-search/search_suggestions?${O.toString()}`,{headers:d})},topSearches:()=>{const h=new URLSearchParams({locale:a.storage.locale});return I(`${s}/_v/api/intelligent-search/top_searches?${h.toString()}`,{headers:d})},productCount:h=>{const O=new URLSearchParams;return h?.query&&O.append("query",h.query.toString()),I(`${s}/_v/api/intelligent-search/catalog_count?${O.toString()}`,{headers:d})}}},Xe=(n,e)=>{const t=He(n,e),r=xe(n,e);return{search:t,commerce:r}},Ye=20,Je=new Set(["brand","category","department","subcategory","collection","cluster"]),q=n=>typeof n.pageType=="string"&&Je.has(n.pageType.toLowerCase()),Ke=(n,e)=>{const t=Vn(Ye),r=async i=>Promise.all(i.map(o=>t(async()=>{const a=await e.commerce.catalog.portal.pagetype(o);if(q(a))return a;throw new L(`Catalog returned ${a.pageType} for slug: ${o}. This usually happens when there is more than one category with the same name in the same category tree level.`)})));return new tn(r,{batch:!1})},Qe=(n,e)=>{const t=async r=>Promise.all(r.map(i=>e.commerce.catalog.salesChannel(i)));return new tn(t)},Ze=1,nt=(n,e)=>{const t=Vn(Ze),r=async o=>{const a=o.reduce((m,{items:d})=>[...m,d],[]),s=[...a.flat()],c=await e.commerce.checkout.simulation({country:o[0].country,postalCode:o[0].postalCode,items:s}),p=c.items.reduce((m,d)=>{const l=d.requestIndex;return typeof l=="number"&&l<m.length&&(m[l]=d),m},Array(s.length).fill(null)),u=a.reduce((m,d)=>[...m,d.length+m[m.length-1]],[0]);return a.map((m,d)=>({...c,items:p.slice(u[d],u[d+1]).filter(l=>!!l)}))},i=async o=>t(r,o);return new tn(i,{maxBatchSize:50})},et=(n,e)=>Ce(n,e);function tt(n){return{...n,description:n.description?et(n.description):n.description}}const M=(n,e)=>({...n,isVariantOf:tt(e)}),rt=({flags:n},e)=>{const t=async r=>{const i=r.map(u=>u.split("-")[0]),o=r.some(u=>u.split("-")[1]==="invisibleItems"),{products:a}=await e.search.products({query:`sku:${i.join(";")}`,page:0,count:i.length,showInvisibleItems:o,...n?.enableUnavailableItemsOnCart&&{hideUnavailableItems:!1}}),s=a.reduce((u,m)=>{for(const d of m.items)u[d.itemId]=M(d,m);return u},{}),c=i.map(u=>s[u]),p=i.filter(u=>!s[u]);if(p.length>0)throw new L(`Search API did not found the following skus: ${p.join(",")}`);return c};return new tn(t,{maxBatchSize:99})},it=(n,{clients:e})=>{const t=rt(n,e),r=nt(n,e),i=Ke(n,e),o=Qe(n,e);return{skuLoader:t,simulationLoader:r,collectionLoader:i,salesChannelLoader:o}},z=n=>n.AvailableQuantity>0,x=n=>n.spotPrice??0,ot=n=>n.Price??0,wn=n=>n?"https://schema.org/InStock":"https://schema.org/OutOfStock",re=(n,e)=>z(n)&&!z(e)?-1:!z(n)&&z(e)?1:x(n)-x(e),at=n=>n==="available",$=(n,e=0,t=1)=>{const r=e/t;return Math.round((n+r)*100)/100},st=(n,e={includeTaxes:!1})=>{const t=n.filter(z),r=t[t.length-1],i=r?x(r):0;return e.includeTaxes?$(i,r?.Tax,r?.product?.unitMultiplier):i},An=(n,e={includeTaxes:!1})=>{const[t]=n.filter(z),r=t?x(t):0;return e.includeTaxes?$(r,t?.Tax,t?.product?.unitMultiplier):r},ct={highPrice:n=>st(n),lowPrice:n=>An(n),lowPriceWithTaxes:n=>An(n,{includeTaxes:!0}),offerCount:n=>n.length,priceCurrency:async(n,e,t)=>{const{loaders:{salesChannelLoader:r},storage:{channel:i}}=t;return(await r.load(i.salesChannel)).CurrencyCode??""},offers:n=>n},lt={ratingValue:()=>5,reviewCount:()=>0},Pn="ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",dt="AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa",ut=n=>{let e=n.slice(0);for(let t=0;t<Pn.length;t++)e=e.replace(new RegExp(Pn.charAt(t),"g"),dt.charAt(t));return e},pt=n=>n.replace(/[·/_,:]/,"-");function ie(n){const t=n.replace(/,/g,"").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}><=_^]/g,"-");return pt(ut(t)).toLowerCase()}const K=n=>n.type==="brand"||q(n)&&n.pageType.toLowerCase()==="brand",pn=n=>q(n)&&n.pageType.toLowerCase()==="collection",an=n=>K(n)||pn(n)?ie(n.name):q(n)?new URL(`https://${n.url}`).pathname.slice(1).toLowerCase():new URL(n.url).pathname.slice(1).toLowerCase(),oe={id:({id:n})=>n.toString(),slug:n=>an(n),seo:n=>K(n)||q(n)?{title:n.title??n.name,description:n.metaTagDescription}:{title:n.Title,description:n.MetaTagDescription},type:n=>K(n)?"Brand":q(n)?n.pageType:n.level===0?"Department":"Category",meta:n=>{const e=an(n);return K(n)?{selectedFacets:[{key:"brand",value:e}]}:pn(n)?{selectedFacets:[{key:"productclusterids",value:n.id}]}:{selectedFacets:e.split("/").map((t,r)=>({key:`category-${r+1}`,value:t}))}},breadcrumbList:async(n,e,t)=>{const{loaders:{collectionLoader:r}}=t,o=an(n).split("/").filter(c=>!!c),a=o.map((c,p)=>o.slice(0,p+1).join("/")),s=await Promise.all(a.map(async c=>{const p=await r.load(c);return{slug:c,...p}}));return{itemListElement:s.map((c,p)=>({item:pn(c)?`/${c.slug}`:new URL(`https://${c.url}`).pathname.toLowerCase(),name:c.name,position:p+1})),numberOfItems:s.length}}},ae={buy:"whoboughtalsobought",view:"whosawalsosaw",similars:"similars",viewAndBought:"whosawalsobought",accessories:"accessories",suggestions:"suggestions"},kn=({key:n,value:e})=>{switch(n){case"price":return{key:n,value:e.replace("-to-",":")};case"channel":case"locale":case"buy":case"view":case"similars":case"viewAndBought":case"accessories":case"suggestions":return[];default:return{key:n,value:e}}},_n=n=>{const e=n.split(":").map(Number);return e.length!==2||Number.isNaN(e[0])||Number.isNaN(e[1])?null:e},gt=n=>typeof ae[n]=="string",mt=n=>{const e=n?.filter(t=>gt(t.key));if(Array.isArray(e)&&e.length>1)throw new B(`You passed ${e.length} cross selling facets but only one is allowed. Please leave one of the following facet: ${e.map(t=>t.key).join(",")}`);return e?.[0]??null},ht=n=>n?.find(e=>e.key==="slug")?.value??null,St=n=>n?.find(e=>e.key==="id")?.value??null,Un=n=>n?.find(e=>e.key==="locale")?.value??null,En=n=>n?.find(e=>e.key==="channel")?.value??null,gn=(n,e)=>{let t=0;for(let r=1;r<n.length;r++)e(n[t],n[r])>0&&(t=r);return n[t]},ft={__resolveType:({type:n,values:e})=>n!=="TEXT"&&n!=="DELIVERY"?"StoreFacetRange":!e||e.length===0?"StoreFacetBoolean":e.every(t=>t.range)?"StoreFacetRange":"StoreFacetBoolean"},yt={key:({key:n})=>n,label:({name:n})=>n,values:({values:n})=>n.sort((e,t)=>e.name.localeCompare(t.name))},It={key:({key:n})=>n,label:({name:n})=>n,min:({values:n,key:e},t,{storage:{searchArgs:r}})=>{const i=_n(r?.selectedFacets?.find(s=>s.key===e)?.value??""),a=gn(n,(s,c)=>s.range.from-c.range.from)?.range?.from??0;return{selected:i?.[0]??a,absolute:a}},max:({values:n,key:e},t,{storage:{searchArgs:r}})=>{const i=_n(r?.selectedFacets?.find(s=>s.key===e)?.value??""),a=gn(n,(s,c)=>c.range.to-s.range.to)?.range?.to??0;return{selected:i?.[1]??a,absolute:a}}},vt={value:({value:n})=>n,label:({name:n})=>n||"unknown",selected:({selected:n})=>n,quantity:({quantity:n})=>n},Ot=async(n,{data:e},{clients:{commerce:t}})=>{if(!e?.orderId)throw new B("Missing orderId");return{data:(await t.checkout.cancelOrder(e))?.data}};function se(n){if(!n||n.status!=="pending")return null;for(const e of n.dimensionStatus){if(e.status!=="pending")continue;const t=e.ruleCollection.find(r=>r.status==="pending"&&r.isUserNextAuthorizer);if(t)return{rule:t,orderAuthorizationId:n.id,dimensionId:e.id}}return null}function Ct(n){if(!n||n.status!=="pending")return!1;const e=n.dimensionStatus.filter(t=>t.status==="pending").flatMap(t=>t.ruleCollection).filter(t=>t.status==="pending");return e.length===0?!1:e.every(t=>!t.isUserNextAuthorizer)}const bt=async(n,{data:e},{clients:{commerce:t}})=>{const r=await t.oms.processOrderAuthorization(e),i=se(r);return{isPendingForOtherAuthorizer:!i&&Ct(r),ruleForAuthorization:i}},Dt=async(n,{data:e},{clients:{commerce:t}})=>({id:(await t.subscribeToNewsletter(e))?.Id});class Z{static parse(e){try{const t=JSON.parse(e);return{seller:t.seller??"",regionId:t.regionId??"",salesChannel:t.salesChannel??"",hasOnlyDefaultSalesChannel:t.hasOnlyDefaultSalesChannel??!0}}catch(t){throw console.error(t),new Error("Malformed channel string")}}static stringify(e){return JSON.stringify(e)}}const mn=(n,e)=>{n.storage.channel=Z.parse(e)},hn=(n,e)=>{n.storage.locale=e},ce=n=>be.createHash("md5").update(n).digest("hex"),Y={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"};function le(n){return{name:n.name,value:n.content,valueReference:Y.attachment}}function wt(n){return{propertyID:n.id,name:n.name,value:n.value,valueReference:{valueReference:Y.attribute,visible:n.visible}}}function de(n){return ce(`${n.name}:${JSON.stringify(n.value)}:${n.valueReference}`)}const At=n=>{const e=n.postalCode,t=n.geoCoordinates,r={addressType:n.addressType||null,postalCode:e||null,city:null,state:null,country:n.country||null,street:null,number:null,neighborhood:null,complement:null,reference:null,geoCoordinates:[]};if(t){const i=typeof t=="object"&&"latitude"in t?t.latitude:null,o=typeof t=="object"&&"longitude"in t?t.longitude:null;r.geoCoordinates=i!==null&&o!==null?[o,i]:[]}return[r]},Pt=(n,e,t)=>{const r=e.postalCode,i=e.geoCoordinates,o=n?.shippingData?.availableAddresses??[],a=n?.shippingData?.selectedAddresses??[];if(!t&&a.length>0)return[a[0]];if(t&&o.length>0)for(const s of o){if(r&&i&&(s.postalCode===r||s.geoCoordinates[0]===i.longitude&&s.geoCoordinates[1]===i.latitude))return[s];if(r&&!i&&s.postalCode===r)return[s];if(i&&!r&&s.geoCoordinates[0]===i.longitude&&s.geoCoordinates[1]===i.latitude)return[s]}return null},kt=(n,e)=>{if(!_t(e))return{updateShipping:!1,addressChanged:!1};if(!Tt(n))return{updateShipping:!1,addressChanged:!1};const[t]=n?.shippingData?.selectedAddresses??[];if(Ut(t,e.postalCode)||Et(t,e.geoCoordinates)||Nt(t,e.addressType))return{updateShipping:!0,addressChanged:!0};const{logisticsInfo:r}=n.shippingData;return Ft(r,e)?{updateShipping:!0,addressChanged:!1}:{updateShipping:!1,addressChanged:!1}},_t=n=>!!n.postalCode||n.geoCoordinates?.latitude&&n.geoCoordinates?.longitude,Ut=(n,e)=>typeof e=="string"&&n?.postalCode!==e,Et=(n,e)=>typeof e?.latitude=="number"&&typeof e?.longitude=="number"&&(n?.geoCoordinates[0]!==e?.longitude||n?.geoCoordinates[1]!==e?.latitude),Nt=(n,e)=>typeof e=="string"&&n?.addressType!==e,Tt=n=>n.items.length!==0,Ft=(n,e)=>{const t=e?.deliveryMode?.deliveryChannel,r=e?.deliveryMode?.deliveryMethod,{startDate:i,endDate:o}=e?.deliveryMode?.deliveryWindow||{};return n.some(({selectedDeliveryChannel:a,selectedSla:s,slas:c})=>{const p=t&&a!==t,u=r&&s!==r;return c?.some(m=>p&&m.deliveryChannel===t||u&&m.id===r?!0:i&&o&&m.deliveryChannel===t&&m.id===r&&(!m?.deliveryWindow||m?.deliveryWindow?.startDateUtc!==i||m?.deliveryWindow?.endDateUtc!==o)&&m.availableDeliveryWindows?.some(d=>d?.startDateUtc===i&&d?.endDateUtc===o))})},ue=n=>n.valueReference===Y.attachment,Sn=n=>[n.itemOffered.sku,n.seller.identifier,n.price<.01?"Gift":void 0,n.itemOffered.additionalProperty?.filter(ue).map(de).join("-")].filter(Boolean).join("::"),nn=(n,e)=>({listPrice:n.listPrice/100,price:n.sellingPrice/100,quantity:n.quantity,seller:{identifier:n.seller},itemOffered:{sku:n.id,image:[],name:n.name,additionalProperty:n.attachments.map(le)},index:e}),Rt=n=>({quantity:n.quantity,seller:n.seller.identifier,id:n.itemOffered.sku,index:n.index,attachments:(n.itemOffered.additionalProperty?.filter(ue)??[]).map(e=>({name:e.name,content:e.value}))}),Nn=n=>n.reduce((e,t)=>{const r=Sn(t);return e.has(r)||e.set(r,[]),e.get(r)?.push(t),e},new Map),Lt=(n,e)=>{const t=(s,c)=>({...s,itemOffered:{sku:s.itemOffered.sku},index:c}),r=e.items.map(nn).map(t),i=n.acceptedOffer.map(t),o=n.orderNumber===e.orderFormId,a=In(r,i);return o&&a};function pe(n,e){return n?.some(t=>t.parentItemIndex!==null&&t.parentItemIndex!==void 0&&n[t.parentItemIndex]?.id===e)}function ge(n,e){return n?.some(t=>t.id===e&&t.parentItemIndex!==null)}const Tn=n=>{const e=n.items.reduce((t,r,i)=>{const o=ge(n.items,r.id)||pe(n.items,r.id)?`${Sn(nn(r))}::${i}`:Sn(nn(r));return t[o]||(t[o]=[]),t[o].push(r),t},{});return{...n,items:Object.values(e).map(t=>{const[r]=t,i=t.reduce((a,s)=>a+s.quantity,0),o=t.reduce((a,s)=>a+(s?.priceDefinition?.total??(s?.quantity??0)*(s?.sellingPrice??0)),0);return{...r,quantity:i,sellingPrice:o/i}})}},Fn=async(n,e,t)=>({order:{orderNumber:n.orderFormId,acceptedOffer:n.items.map(async r=>({...r,product:await e.load(`${r.id}-invisibleItems`)})),shouldSplitItem:t},messages:n.messages.map(({text:r,status:i})=>({text:r,status:i.toUpperCase()}))}),me=({items:n},e)=>ce(JSON.stringify({sessionId:e?.id??"",items:n})),Rn=async(n,e,t)=>{try{return await e.checkout.setCustomData({id:n.orderFormId,appId:"faststore",key:"cartEtag",value:me(n,t)})}catch(r){throw console.error(`Error while setting custom data to orderForm.
2
+ Make sure to add the following custom app to the orderForm:
3
+ {"fields":["cartEtag"],"id":"faststore","major":1}.
4
+ More info at: https://developers.vtex.com/vtex-rest-api/docs/customizable-fields-with-checkout-api`),r}},Mt=(n,e)=>{const r=n.customData?.customApps.find(o=>o.id==="faststore")?.fields?.cartEtag;return r==null?!0:me(n,e)!==r},Bt=async(n,{clients:{commerce:e}})=>e.checkout.orderForm({id:n}),zt=async(n,{clients:{commerce:e}})=>e.checkout.clearOrderFormMessages({id:n}),$t=async(n,e,{clients:{commerce:t}})=>{if(!e)return n;const{updateShipping:r,addressChanged:i}=kt(n,e);if(r){const o=Pt(n,e,i),s=o||At(e);return!!e.deliveryMode?.deliveryWindow&&await t.checkout.shippingData({id:n.orderFormId,index:n.items.length,deliveryMode:e.deliveryMode,selectedAddresses:s},!1),t.checkout.shippingData({id:n.orderFormId,index:n.items.length,deliveryMode:e.deliveryMode,selectedAddresses:s},!0)}return n},Vt=(n,e)=>{if(!n)return"";const r=en.parse(n)[e];return r?r.split("=")[1]:""},qt=async(n,{cart:{order:e},session:t},r)=>{const i=Vt(r.headers.cookie,"checkout.vtex.com"),o=i!==""?i:e?.orderNumber,{acceptedOffer:a,shouldSplitItem:s}=e,{clients:{commerce:c},loaders:{skuLoader:p}}=r,u=t?.channel,m=t?.locale;u&&mn(r,u),m&&hn(r,m);const d=await Bt(o,r);d.messages.length!==0&&await zt(o,r);const l=en.parse(r?.headers?.cookie??"")?.vtex_session,g=Cn(l);if(Mt(d,g)){const y=await Rn(d,c,g).then(Tn);if(o)return Fn(y,p,s)}const f=Nn(a),C=Nn(d.items.map(nn)),b=Array.from(C.entries()),P=Array.from(f.entries()),{itemsToAdd:N,itemsToUpdate:v}=P.reduce((y,[w,_])=>{const k=C.get(w);if(!k)return _.forEach(U=>y.itemsToAdd.push(U)),y;const[E,...T]=k;if(ge(d.items,E.itemOffered.sku)||pe(d.items,E.itemOffered.sku))return y.itemsToUpdate.push(E),y;const j=_.reduce((U,rn)=>U+rn.quantity,0);return y.itemsToUpdate.push({...E,quantity:j}),T.forEach(U=>y.itemsToUpdate.push({...U,quantity:0})),y},{itemsToAdd:[],itemsToUpdate:[]}),A=b.filter(([y])=>!f.has(y)).flatMap(([,y])=>y.map(w=>({...w,quantity:0}))),h=[...N,...v,...A].map(Rt);if(h.length===0)return null;const O=await c.checkout.updateOrderFormItems({id:d.orderFormId,orderItems:h,shouldSplitItem:s}).then(y=>$t(y,t,r)).then(y=>{if(t?.marketingData){const w={...y.marketingData,...t.marketingData};return c.checkout.marketingData({id:d.orderFormId,marketingData:w})}return y}).then(y=>Rn(y,c,g)).then(Tn),D=In(d.messages,O.messages);return Lt(e,O)&&D?null:Fn(O,p,s)};async function xt(n,e,t){try{const r=await n.commerce.checkout.address({postalCode:t,country:e}),[i,o]=r.geoCoordinates;return{city:r.city,geoCoordinates:{latitude:o,longitude:i}}}catch(r){throw console.error(`Error while getting geo coordinates for the current postal code (${t}) and country (${e}).
5
+ `),r}}const Wt=async(n,{session:e,search:t},{clients:r,headers:i,account:o})=>{const a=Z.parse(e.channel??""),s=String(e.postalCode??""),c=e.country??"";let p=e.city??null,u=e.geoCoordinates??null;if((!p||!u)&&s!==""&&c!==""){const T=await xt(r,c,s);p=T.city,u=T.geoCoordinates}const d=new URLSearchParams(t);d.has("facets")&&d.delete("facets");const l=d.get("sc")??a.salesChannel;d.set("sc",l),s&&d.set("postalCode",s),c&&d.set("country",c),u&&d.set("geoCoordinates",`${u.longitude},${u.latitude}`);const{marketingData:g}=e,S={utmCampaign:d.get("utm_campaign")??g?.utmCampaign??"",utmMedium:d.get("utm_medium")??g?.utmMedium??"",utmSource:d.get("utm_source")??g?.utmSource??"",utmiCampaign:d.get("utmi_cp")??g?.utmiCampaign??"",utmiPage:d.get("utmi_p")??g?.utmiPage??"",utmiPart:d.get("utmi_pc")??g?.utmiPart??""},f=Cn(On(i?.cookie??"",o));let C=!1;if(f)try{C=(await r.commerce.vtexid.validate())?.authStatus?.toLowerCase()==="success"}catch(T){console.warn("JWT validation failed:",T),C=!1}const b=C?f?.isRepresentative:!1,P=C?f?.customerId:void 0,N=C?f?.unitId:void 0,v=await r.commerce.session(d.toString()).catch(()=>null),A=v?.namespaces.profile??null,h=v?.namespaces.shopper??null,O=v?.namespaces.store??null,D=v?.namespaces.authentication??null,y=v?.namespaces.checkout??null,w=v?.namespaces.public??null;let _=null;if(b&&A?.id?.value)try{_=await r.commerce.masterData.getContractById({contractId:A.id.value})}catch{console.error(`Error while getting contract data for profile ID (${A.id.value}).
6
+ `)}let k;a.seller&&(s||u)&&(k=(await r.commerce.checkout.region({postalCode:s,geoCoordinates:u,country:c,salesChannel:l}))?.[0]?.sellers.find(U=>a.seller===U.id));const E={...e,currency:{code:O?.currencyCode?.value??e.currency.code,symbol:O?.currencySymbol?.value??e.currency.symbol},country:O?.countryCode?.value??c,channel:Z.stringify({salesChannel:O?.channel?.value??a.salesChannel,regionId:y?.regionId?.value??a.regionId,seller:k?.id,hasOnlyDefaultSalesChannel:!O?.channel?.value}),b2b:b?{isRepresentative:b??!1,customerId:D?.customerId?.value??P??"",unitName:D?.unitName?.value??"",unitId:D?.unitId?.value??N??"",firstName:typeof h?.firstName?.value=="string"?h.firstName.value:"",lastName:typeof h?.lastName?.value=="string"?h.lastName.value:"",userName:`${typeof h?.firstName?.value=="string"?h.firstName.value:""} ${typeof h?.lastName?.value=="string"?h.lastName.value:""}`.trim(),userEmail:D?.storeUserEmail.value??"",savedPostalCode:w?.postalCode?.value??"",contractName:_?.corporateName??"",organizationManager:h?.organizationManager?.value??!1}:null,marketingData:S,person:A?.id?{id:A.id?.value??"",email:A.email?.value??"",givenName:A.firstName?.value??"",familyName:A.lastName?.value??""}:null,geoCoordinates:u?.latitude&&u?.longitude&&u||null,city:p};return In(e,E)?null:E},jt={validateCart:qt,validateSession:Wt,subscribeToNewsletter:Dt,cancelOrder:Ot,processOrderAuthorization:bt};var fn;(function(n){n.NAME="Name",n.DOCUMENT="Document",n.OPERATION_DEFINITION="OperationDefinition",n.VARIABLE_DEFINITION="VariableDefinition",n.SELECTION_SET="SelectionSet",n.FIELD="Field",n.ARGUMENT="Argument",n.FRAGMENT_SPREAD="FragmentSpread",n.INLINE_FRAGMENT="InlineFragment",n.FRAGMENT_DEFINITION="FragmentDefinition",n.VARIABLE="Variable",n.INT="IntValue",n.FLOAT="FloatValue",n.STRING="StringValue",n.BOOLEAN="BooleanValue",n.NULL="NullValue",n.ENUM="EnumValue",n.LIST="ListValue",n.OBJECT="ObjectValue",n.OBJECT_FIELD="ObjectField",n.DIRECTIVE="Directive",n.NAMED_TYPE="NamedType",n.LIST_TYPE="ListType",n.NON_NULL_TYPE="NonNullType",n.SCHEMA_DEFINITION="SchemaDefinition",n.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",n.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",n.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",n.FIELD_DEFINITION="FieldDefinition",n.INPUT_VALUE_DEFINITION="InputValueDefinition",n.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",n.UNION_TYPE_DEFINITION="UnionTypeDefinition",n.ENUM_TYPE_DEFINITION="EnumTypeDefinition",n.ENUM_VALUE_DEFINITION="EnumValueDefinition",n.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",n.DIRECTIVE_DEFINITION="DirectiveDefinition",n.SCHEMA_EXTENSION="SchemaExtension",n.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",n.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",n.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",n.UNION_TYPE_EXTENSION="UnionTypeExtension",n.ENUM_TYPE_EXTENSION="EnumTypeExtension",n.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(fn||(fn={}));const Gt=n=>typeof n=="string"?he(n):null;function he(n){try{return JSON.parse(n)}catch{return n}}const Ht=n=>typeof n=="object"?JSON.stringify(n):typeof n=="string"?n:null,Xt=new Q.GraphQLScalarType({name:"ObjectOrString",description:"A string or the string representation of an object (a stringified object).",parseValue:Gt,serialize:Ht,parseLiteral(n){return n.kind===fn.STRING?he(n.value):null}}),F=n=>"Price"in n&&"seller"in n&&"product"in n,R=n=>"skuName"in n,Yt={priceCurrency:async(n,e,t)=>{const{loaders:{salesChannelLoader:r},storage:{channel:i}}=t;return(await r.load(i.salesChannel)).CurrencyCode??""},priceValidUntil:n=>F(n)?n.PriceValidUntil??"":R(n)?n.priceValidUntil??"":null,itemCondition:()=>"https://schema.org/NewCondition",availability:async n=>F(n)?wn(z(n)):R(n)?wn(at(n.availability)):null,seller:(n,e,t)=>F(n)?{identifier:t.storage.channel?.seller||n.seller.sellerId||""}:R(n)?{identifier:n.seller}:null,price:n=>F(n)?x(n):R(n)?n.sellingPrice/100:null,priceWithTaxes:n=>F(n)?$(x(n),n?.Tax,n.product.unitMultiplier):R(n)?$(n.sellingPrice/100,n.tax/100,n.unitMultiplier):null,sellingPrice:n=>F(n)?ot(n):R(n)?n.sellingPrice/100:null,listPrice:n=>F(n)?n.ListPrice??0:R(n)?n.listPrice/100:null,listPriceWithTaxes:n=>F(n)?$(n.ListPrice??0,n?.Tax,n.product.unitMultiplier):R(n)?$(n.listPrice/100,n.tax/100,n.unitMultiplier):null,itemOffered:n=>F(n)?n.product:R(n)?{...n.product,attachmentsValues:n.attachments}:null,quantity:n=>F(n)?n.AvailableQuantity??0:R(n)?n.quantity:null},Jt=({linkText:n})=>`/${n}/p`,Kt=({offer:n,seller:e,product:t})=>({...n,product:t,seller:e}),Qt={imageText:"image",imageUrl:"https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg",imageLabel:"label"},Se=(n,e)=>`${n}-${e}`,Zt=(n,e)=>`/${Se(n,e)}/p`,nr=n=>Array.isArray(n)&&n.length>0?n:null;function fe(n){return n.replace(/^\/+|\/+$/g,"")}const er=(n,e)=>{const t=n.findIndex(r=>fe(r).split("/").at(-1)===e);return t<0?0:t},tr={productID:({itemId:n})=>n,name:({isVariantOf:n,name:e})=>e??n.productName,slug:({isVariantOf:{linkText:n},itemId:e})=>Se(n,e),description:({isVariantOf:{description:n}})=>n,seo:({isVariantOf:n})=>({title:n.productTitle||n.productName,description:n.metaTagDescription||n.description,canonical:Jt(n)}),brand:({isVariantOf:{brand:n}})=>({name:n}),unitMultiplier:({unitMultiplier:n})=>n,breadcrumbList:({isVariantOf:{categories:n,productName:e,linkText:t,categoryId:r,categoriesIds:i},itemId:o})=>{const a=er(i,r),s=n[a],c=fe(s).split("/");return{itemListElement:[...c.map((p,u)=>{const m=`/${c.slice(0,u+1).map(ie).join("/")}/`;return{name:p,item:m,position:u+1}}),{name:e,item:Zt(t,o),position:c.length+1}],numberOfItems:c.length}},image:({images:n},e)=>{const t=(nr(n)??[Qt]).map(({imageUrl:s,imageText:c,imageLabel:p})=>({alternateName:c??"",url:s.replace("vteximg.com.br","vtexassets.com"),keywords:p}));if(typeof e!="object")return t;let{context:r,limit:i}=e;const o=r!=="generic";i=i||-1,i=i<=-1?void 0:i;let a=o?t.filter(({keywords:s})=>s===r):t;return a=a.length===0?t:a,a.slice(0,i)},sku:({itemId:n})=>n,gtin:({ean:n,referenceId:e})=>n||(e[0]?.Value??""),review:()=>[],aggregateRating:()=>({}),offers:n=>n.sellers.map(e=>Kt({offer:e.commertialOffer,seller:e,product:n})).sort(re),isVariantOf:n=>n,additionalProperty:({variations:n=[],attachmentsValues:e=[],attributes:t=[]})=>{const r=n.flatMap(({name:a,values:s})=>s.map(c=>({name:a,value:c,valueReference:Y.specification}))),i=e.map(le),o=t.map(wt);return[...r,...i,...o]},hasSpecifications:({isVariantOf:n})=>!!n.skuSpecifications?.length,skuSpecifications:({isVariantOf:{skuSpecifications:n}})=>n??[],specificationGroups:({isVariantOf:{specificationGroups:n}})=>n,releaseDate:({isVariantOf:{releaseDate:n}})=>n??"",advertisement:({isVariantOf:{advertisement:n}})=>n,deliveryPromiseBadges:({isVariantOf:{deliveryPromisesBadges:n}})=>n},rr=new Set(["allSpecifications"]),ir={hasVariant:n=>n.isVariantOf.items.map(e=>M(e,n.isVariantOf)),productGroupID:({isVariantOf:n})=>n.productId,name:n=>n.isVariantOf.productName,skuVariants:n=>n,additionalProperty:({isVariantOf:{specificationGroups:n}})=>n.filter(e=>!rr.has(e.name)).flatMap(({specifications:e})=>e.flatMap(({name:t,values:r})=>r.map(i=>({name:t,value:i,valueReference:Y.specification}))))},or={propertyID:n=>n.propertyID||de(n),name:({name:n})=>n,value:({value:n})=>n,valueReference:({valueReference:n})=>n},yn=n=>{const e=n.flatMap(r=>r.sellers.map(i=>({offer:i.commertialOffer,sku:r}))),t=gn(e,({offer:r},{offer:i})=>re(r,i));return t?t.sku:n[0]},ar=n=>n!==""&&!Number.isNaN(Number(n)),sr={price_desc:"price:desc",price_asc:"price:asc",orders_desc:"orders:desc",name_desc:"name:desc",name_asc:"name:asc",release_desc:"release:desc",discount_desc:"discount:desc",score_desc:""},cr={product:async(n,{locator:e},t)=>{const r=En(e),i=Un(e),o=St(e),a=ht(e);r&&mn(t,r),i&&hn(t,i);const{loaders:{skuLoader:s},clients:{commerce:c,search:p}}=t;try{const u=o??a?.split("-").pop()??"";if(!ar(u))throw new Error("Invalid SkuId");const m=await s.load(u);if(a&&m.isVariantOf.linkText&&!a.startsWith(m.isVariantOf.linkText))throw new Error(`Slug was set but the fetched sku does not satisfy the slug condition. slug: ${a}, linkText: ${m.isVariantOf.linkText}`);return m}catch{if(a==null)throw new B("Missing slug or id");const m=await c.catalog.portal.pagetype(`${a}/p`);if(m.pageType!=="Product"||!m.id)throw new L(`No product found for slug ${a}`);const{products:[d]}=await p.products({page:0,count:1,query:`product:${m.id}`,hideUnavailableItems:!1});if(!d)throw new L(`No product found for id ${m.id}`);const l=yn(d.items);return M(l,d)}},collection:(n,{slug:e},t)=>{const{loaders:{collectionLoader:r}}=t;return r.load(e)},search:async(n,{first:e,after:t,sort:r,term:i,selectedFacets:o,sponsoredCount:a},s)=>{const c=En(o),p=Un(o),u=mt(o);c&&mn(s,c),p&&hn(s,p);let m=i;u&&(m=`product:${(await s.clients.commerce.catalog.products.crossselling({type:ae[u.key],productId:u.value})).map(f=>f.productId).slice(0,e).join(";")}`);const d=t?Number(t):0,l={page:Math.ceil(d/e)||0,count:e,query:m??void 0,sort:sr[r??"score_desc"],selectedFacets:o?.flatMap(kn)??[],sponsoredCount:a??void 0},g=s.clients.search.products(l);return{searchArgs:l,productSearchPromise:g}},allProducts:async(n,{first:e,after:t},r)=>{const{clients:{search:i}}=r,o=t?Number(t):0,a=await i.products({page:Math.ceil(o/e),count:e}),s=a.products.flatMap(c=>c.items.map(p=>M(p,c))).filter(c=>c.sellers.length>0);return{pageInfo:{hasNextPage:a.pagination.after.length>0,hasPreviousPage:a.pagination.before.length>0,startCursor:"0",endCursor:a.recordsFiltered.toString(),totalCount:a.recordsFiltered},edges:s.map((c,p)=>({node:c,cursor:(o+p).toString()}))}},products:async(n,{productIds:e},t)=>{const{clients:{search:r}}=t;if(!e.length)return[];const i=`id:${e.join(";")}`;return(await r.products({page:0,count:e.length,query:i})).products.flatMap(a=>a.items.map(s=>M(s,a))).filter(a=>e.includes(a.itemId)&&a.sellers.length>0)},allCollections:async(n,{first:e,after:t},r)=>{const{clients:{commerce:i}}=r,o=t?Number(t):0,[a,s]=await Promise.all([i.catalog.brand.list(),i.catalog.category.tree()]),c=[],p=(d,l)=>{c.push({...d,level:l});for(const g of d.children)p(g,l+1)};for(const d of s)p(d,0);const m=[...a.filter(d=>d.isActive).map(d=>({...d,type:"brand"})),...c].filter(d=>!!oe.slug(d,null,r,null));return{pageInfo:{hasNextPage:m.length-o>e,hasPreviousPage:o>0,startCursor:"0",endCursor:(Math.min(e,m.length-o)-1).toString(),totalCount:m.length},edges:m.slice(o,o+e).map((d,l)=>({node:d,cursor:(o+l).toString()}))}},shipping:async(n,{country:e,items:t,postalCode:r},i)=>{const{loaders:{simulationLoader:o},clients:{commerce:a}}=i,[s,c]=await Promise.all([o.load({country:e,items:t,postalCode:r}),a.checkout.address({postalCode:r,country:e})]);return{...s,address:c}},redirect:async(n,{term:e,selectedFacets:t},r)=>{if(!e&&(!t||!t.length))return null;const{redirect:i}=await r.clients.search.products({page:1,count:1,query:e??void 0,selectedFacets:t?.flatMap(kn)??[],allowRedirect:!0});return{url:i}},sellers:async(n,{postalCode:e,geoCoordinates:t,country:r,salesChannel:i},o)=>{const{clients:{commerce:a}}=o,c=(await a.checkout.region({postalCode:e,geoCoordinates:t,country:r,salesChannel:i}))?.[0],{id:p,sellers:u}=c;return{id:p,sellers:u}},profile:async(n,{id:e},t)=>{const{clients:{commerce:r}}=t,i=await r.profile.addresses(e);function o(s){return!s||Object.keys(s).length===0?[]:Object.values(s).map(c=>JSON.parse(c))}return{addresses:o(i)}},productCount:async(n,{term:e},t)=>{const{clients:{search:r}}=t;return await r.productCount({query:e??void 0})},userOrder:async(n,{orderId:e},t)=>{try{if(!e)throw new B("Missing orderId");const{clients:{commerce:r}}=t,i=await r.oms.userOrder({orderId:e});if(!i)throw new L(`No order found for id ${e}`);let o=null;try{const c=await r.oms.getCommercialAuthorizationsByOrderId({orderId:e});o=se(c)}catch{}const s=(await r.masterData.getShopperById({userId:i.purchaseAgentData?.purchaseAgents?.[0]?.userId??""})??[])[0]??{};return{orderId:i.orderId,creationDate:i.creationDate,totals:i.totals,items:i.items,shippingData:i.shippingData,paymentData:i.paymentData,customData:i.customData,status:i.status,statusDescription:i.statusDescription,allowCancellation:i.allowCancellation,storePreferencesData:i.storePreferencesData,clientProfileData:i.clientProfileData,canProcessOrderAuthorization:(i.status==="waiting-for-confirmation"||i.status==="waiting-for-authorization")&&!!o,ruleForAuthorization:o,shopper:{firstName:s?.firstName||"",lastName:s?.lastName||"",email:s?.email||"",phone:s?.phone||""}}}catch(r){const i=r.message;let o={};try{const s=JSON.parse(i);o=s.error||s}catch{o={message:i}}const a=o?.message||i;throw Qn(r)?new L(`No order found for id ${e}. ${a}.`):Kn(r)?new X(`You are forbidden to interact with order with id ${e}. ${a}.`):r}},listUserOrders:async(n,e,t)=>{const{clients:{commerce:r}}=t,i=await r.oms.listUserOrders(e);return{list:i.list?.map(o=>({orderId:o.orderId,creationDate:o.creationDate,clientName:o.clientName,items:o.items,totalValue:o.totalValue,status:o.status,statusDescription:o.statusDescription,ShippingEstimatedDate:o.ShippingEstimatedDate,customFields:o.customFields,currencyCode:o.currencyCode})),paging:i.paging}},validateUser:async(n,e,t)=>({isValid:!0}),userDetails:async(n,e,t)=>{const{clients:{commerce:r}}=t,i=await r.session("").catch(()=>null),o=i?.namespaces.shopper??null,a=i?.namespaces.authentication??null;return{name:o?.firstName?.value??"",email:a?.storeUserEmail.value??"",role:["Admin"],orgUnit:a?.unitName?.value??""}},accountProfile:async(n,e,t)=>{const{account:r,headers:i,clients:{commerce:o}}=t,a=Cn(On(i?.cookie??"",r));if(!a?.userId)return null;if(a?.isRepresentative){const c=await o.session("").catch(()=>null);if(!c)return null;const p=c.namespaces.profile??null;return{name:((await o.masterData.getContractById({contractId:p?.id?.value??""}))?.corporateName??`${(p?.firstName?.value??"").trim()} ${(p?.lastName?.value??"").trim()}`.trim())||"",email:p?.email?.value||"",id:p?.id?.value||""}}const s=await o.licenseManager.getUserById({userId:a?.userId}).catch(()=>null);return{name:s?.name||"",email:s?.email||"",id:s?.id||""}},pickupPoints:async(n,{geoCoordinates:e},t)=>{const{clients:{commerce:r}}=t;return await r.checkout.pickupPoints({geoCoordinates:e})}},lr={reviewRating:()=>({ratingValue:5,bestRating:5}),author:()=>({name:""})},dr=(n,e,t)=>e?n.key==="category-1":t?n.key==="brand":!1,ur={suggestions:async(n,e,t)=>{const{clients:{search:r}}=t,{searchArgs:i}=n;if(!i.query)return{terms:(await r.topSearches()).searches.map(m=>({value:m.term,count:m.count})),products:[]};const{productSearchPromise:o}=n,[a,s]=await Promise.all([r.suggestedTerms(i),o]),c=s.products.map(u=>{const m=yn(u.items);return m&&M(m,u)}).filter(u=>!!u),{searches:p}=a;return{terms:p.map(u=>({value:u.term,count:u.count})),products:c}},products:async({productSearchPromise:n})=>{const e=await n,t=e.products.map(r=>{const i=yn(r.items);return i&&M(i,r)}).filter(r=>!!r);return{pageInfo:{hasNextPage:e.pagination.after.length>0,hasPreviousPage:e.pagination.before.length>0,startCursor:"0",endCursor:e.recordsFiltered.toString(),totalCount:e.recordsFiltered},edges:t.map((r,i)=>({node:r,cursor:i.toString()}))}},facets:async({searchArgs:n},e,t)=>{const{clients:{search:r}}=t;t.storage.searchArgs=n;const{facets:i=[]}=await r.facets(n),o=!n.query,a=n.selectedFacets?.length?n.selectedFacets[0].key==="category-1":!1,s=n.selectedFacets?.length?n.selectedFacets[0].key==="brand":!1;return i.filter(p=>!o||!dr(p,a,s))},metadata:async({productSearchPromise:n})=>{const e=await n;return{isTermMisspelled:e.correction?.misspelled??!1,logicalOperator:e.operator,fuzzy:e.fuzzy}}},pr={title:({title:n})=>n??"",description:({description:n})=>n??"",canonical:({canonical:n})=>n??"",titleTemplate:()=>""},gr=["bd","d","h","m"],mr=n=>gr.includes(n),hr={bd:{0:"Today",1:"In 1 business day",other:"Up to # business days"},d:{0:"Today",1:"In 1 day",other:"Up to # days"},h:{0:"Now",1:"In 1 hour",other:"Up to # hours"},m:{0:"Now",1:"In 1 minute",other:"Up to # minutes"}},ye=n=>{const[e,t]=[n.split(/\D+/)[0],n.split(/[0-9]+/)[1]],r=e!==""&&!Number.isNaN(Number(e)),i=mr(t);if(!r||!i)return"";const o=Number(e)<2?Number(e):"other";return hr[t][o].replace("#",e)??""},Sr={carrier:n=>n?.friendlyName??n?.name??"",price:n=>n?.price?n.price/100:n?.price,localizedEstimates:n=>n?.shippingEstimate?ye(n.shippingEstimate):""},Ln="skuvariation";function Mn(n,e){const t=`${Ln}${e}`.toLowerCase(),r=n.find(o=>o.imageLabel===t);if(r)return r;const i=n.find(o=>o.imageLabel===Ln);return i||n[0]}function fr(n,e,t){const r={};return n.forEach(i=>{const o=i.variations;if(o.length===0)return;const a=`${e}-${o.find(c=>c.name===e)?.values[0]??""}`,s=o.reduce((c,p)=>p.name===e?c:c+`-${p.name}-${p.values[0]}`,a);r[s]=`${t}-${i.itemId}`}),r}function Bn(n){const e={};return n.forEach(t=>{e[t.name]=t.values[0]}),e}function yr(n){const e={};return n?.forEach(t=>{e[t.field.originalName??t.field.name]=t.values.map(r=>r.originalName??r.name)}),e}function Ir(n,e){return Number.isNaN(Number(n)-Number(e))?n<e?-1:n>e?1:0:Number(n)-Number(e)}function vr(n){const e=n;for(const t in n)n[t].every(i=>!Number.isNaN(Number(i.value)))&&n[t].sort((i,o)=>Ir(i.value,o.value));return e}function Or(n,e,t){const r={},i=new Set;return n.forEach(o=>{if(o.variations.length===0)return;const a=o.variations.find(c=>c.name===e);if(!(a?.values[0]===t)){const c=`${e}-${a?.values[0]}`;if(!a||i.has(c))return;i.add(c);const p=Mn(o.images,e),u={src:p.imageUrl,alt:p.imageLabel??"",label:`${e}: ${a.values[0]}`,value:a.values[0]};r[a.name]?r[a.name].push(u):r[a.name]=[u];return}o.variations.forEach(c=>{const p=`${c.name}-${c.values[0]}`;if(i.has(p))return;i.add(p);const u=Mn(o.images,c.name),m={src:u.imageUrl,alt:u.imageText??"",label:`${c.name}: ${c.values[0]}`,value:c.values[0]};r[c.name]?r[c.name].push(m):r[c.name]=[m]})}),vr(r)}const Cr={activeVariations:n=>Bn(n.variations),allVariantsByName:n=>yr(n.isVariantOf.skuSpecifications),slugsMap:(n,e)=>fr(n.isVariantOf.items,e.dominantVariantName??n.variations[0]?.name,n.isVariantOf.linkText),availableVariations:(n,e)=>{const t=e.dominantVariantName??n.variations[0]?.name,i=Bn(n.variations)[t];return Or(n.isVariantOf.items,t,i)},allVariantProducts:n=>n.isVariantOf.items.map(e=>M(e,n.isVariantOf))},br={"pickup-in-point":"Pickup",delivery:"Delivery",pickup:"Pickup","take-away":"Take away","":""},Dr={deliveryOptionsData:n=>{const{shippingData:e,items:t}=n,r=e?.logisticsInfo||[],i=e?.selectedAddresses||e?.availableAddresses||[e?.address],o=r.reduce((p,u)=>{const m=u?.selectedSla||"",d=u?.selectedDeliveryChannel||u?.deliveryChannel||"",l=u?.deliveryCompany||"",g=u?.deliveryWindow,S=u?.pickupStoreInfo,f=u?.shippingEstimate||"",C=u?.shippingEstimate?ye(u?.shippingEstimate):"",b=u?.shippingEstimateDate||"",P=u?.addressId||"",N=u?.itemIndex??0,v=t?.[N],A=v?.seller||"",h=`${m}|${d}|${l}|${A}|${f}|${b}|${P}|${g?.startDateUtc}|${g?.endDateUtc}`,O=i?.find(w=>w?.addressId===P),D=`${br[d]||""} ${C} ${O?.neighborhood?`to ${O?.neighborhood}`:""}`.trim(),y=(v?.sellingPrice??0)*(v?.quantity??0)+(v?.tax??0);return p[h]||(p[h]={selectedSla:m,deliveryChannel:d,deliveryCompany:l,deliveryWindow:g,shippingEstimate:f,shippingEstimateDate:b,seller:A,friendlyShippingEstimate:C,friendlyDeliveryOptionName:D,address:O,pickupStoreInfo:S,quantityOfDifferentItems:0,total:0,items:[]}),p[h]&&(p[h].items?.push({id:v?.id||"",uniqueId:v?.uniqueId||"",name:v?.name||"",quantity:v?.quantity||0,price:v?.price||0,imageUrl:v?.imageUrl||"",tax:v?.tax||0,total:y}),p[h].quantityOfDifferentItems=(p[h].quantityOfDifferentItems??0)+1,p[h].total=(p[h].total??0)+y),p},{}),a=Object.values(o),s=e?.contactInformation?.[0],c={name:`${s?.firstName??""} ${s?.lastName??""}`.trim()||a?.[0]?.address?.receiverName||"",email:s?.email||"",phone:s?.phone||""};return{deliveryOptions:a,contact:c}},customFields:n=>{const e=n?.customData?.customFields||[];return Object.values(e.reduce((t,r)=>{const i=r?.linkedEntity?.type||"",o=r?.linkedEntity?.id||"",a=`${i}|${o||""}`;return t[a]||(t[a]={type:i,id:o,fields:[]}),t[a].fields.push(...r?.fields||[]),t},{}))||[]}},wr={StoreCollection:oe,StoreAggregateOffer:ct,StoreProduct:tr,StoreSeo:pr,StoreFacet:ft,StoreFacetBoolean:yt,StoreFacetRange:It,StoreFacetValueBoolean:vt,StoreOffer:Yt,StoreAggregateRating:lt,StoreReview:lr,StoreProductGroup:ir,StoreSearchResult:ur,StorePropertyValue:or,SkuVariants:Cr,ShippingSLA:Sr,UserOrderResult:Dr,ObjectOrString:Xt,Query:cr,Mutation:jt},Ar=()=>wr,Pr=`"""
7
+ Address information.
8
+ """
9
+ type Address {
10
+ """
11
+ Address postal code
12
+ """
13
+ postalCode: String
14
+ """
15
+ Address city
16
+ """
17
+ city: String
18
+ """
19
+ Address state
20
+ """
21
+ state: String
22
+ """
23
+ Address country
24
+ """
25
+ country: String
26
+ """
27
+ Address street
28
+ """
29
+ street: String
30
+ """
31
+ Address number
32
+ """
33
+ number: String
34
+ """
35
+ Address neighborhood
36
+ """
37
+ neighborhood: String
38
+ """
39
+ Address complement
40
+ """
41
+ complement: String
42
+ """
43
+ Address reference
44
+ """
45
+ reference: String
46
+ """
47
+ Address geoCoordinates
48
+ """
49
+ geoCoordinates: [Float]
50
+ }
51
+ `,kr=`"""
52
+ Advertisement information about a specific product in a campaign
53
+ """
54
+ type Advertisement {
55
+ """
56
+ Advertiser ID of the product.
57
+ """
58
+ adId: String!
59
+ """
60
+ Campaign ID.
61
+ """
62
+ campaignId: String!
63
+ """
64
+ Cost of the action, usually Cost Per Click.
65
+ """
66
+ actionCost: Float!
67
+ """
68
+ Advertiser Request ID.
69
+ """
70
+ adRequestId: String!
71
+ """
72
+ Advertiser Response ID.
73
+ """
74
+ adResponseId: String!
75
+ }
76
+ `,_r=`"""
77
+ Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
78
+ """
79
+ type StoreAggregateOffer {
80
+ """
81
+ Highest price among all sellers.
82
+ """
83
+ highPrice: Float!
84
+ """
85
+ Lowest price among all sellers.
86
+ """
87
+ lowPrice: Float!
88
+ """
89
+ Lowest price among all sellers with current taxes.
90
+ """
91
+ lowPriceWithTaxes: Float!
92
+ """
93
+ Number of sellers selling this SKU.
94
+ """
95
+ offerCount: Int!
96
+ """
97
+ ISO code of the currency used for the offer prices.
98
+ """
99
+ priceCurrency: String!
100
+ """
101
+ Array with information on each available offer.
102
+ """
103
+ offers: [StoreOffer!]!
104
+ }
105
+ `,Ur=`"""
106
+ Average rating, based on multiple ratings or reviews.
107
+ """
108
+ type StoreAggregateRating {
109
+ """
110
+ Value of the aggregate rating.
111
+ """
112
+ ratingValue: Float!
113
+ """
114
+ Total number of ratings.
115
+ """
116
+ reviewCount: Int!
117
+ }
118
+ `,Er=`"""
119
+ information about the author of a product review or rating.
120
+ """
121
+ type StoreAuthor {
122
+ """
123
+ Author name.
124
+ """
125
+ name: String!
126
+ }
127
+ `,Nr=`"""
128
+ Brand of a given product.
129
+ """
130
+ type StoreBrand {
131
+ """
132
+ Brand name.
133
+ """
134
+ name: String!
135
+ }
136
+ `,Tr=`"""
137
+ Item of a list.
138
+ """
139
+ type StoreListItem {
140
+ """
141
+ List item value.
142
+ """
143
+ item: String!
144
+ """
145
+ Name of the list item.
146
+ """
147
+ name: String!
148
+ """
149
+ Position of the item in the list.
150
+ """
151
+ position: Int!
152
+ }
153
+
154
+ """
155
+ List of items consisting of chain linked web pages, ending with the current page.
156
+ """
157
+ type StoreBreadcrumbList {
158
+ """
159
+ Array with breadcrumb elements.
160
+ """
161
+ itemListElement: [StoreListItem!]!
162
+ """
163
+ Number of breadcrumbs in the list.
164
+ """
165
+ numberOfItems: Int!
166
+ }
167
+ `,Fr=`"""
168
+ Shopping cart message.
169
+ """
170
+ type StoreCartMessage {
171
+ """
172
+ Shopping cart message text.
173
+ """
174
+ text: String!
175
+ """
176
+ Shopping cart message status, which can be \`INFO\`, \`WARNING\` or \`ERROR\`.
177
+ """
178
+ status: StoreStatus!
179
+ }
180
+
181
+ """
182
+ Shopping cart information.
183
+ """
184
+ type StoreCart {
185
+ """
186
+ Order information, including \`orderNumber\`, \`acceptedOffer\` and \`shouldSplitItem\`.
187
+ """
188
+ order: StoreOrder!
189
+ """
190
+ List of shopping cart messages.
191
+ """
192
+ messages: [StoreCartMessage!]!
193
+ }
194
+
195
+ """
196
+ Shopping cart input.
197
+ """
198
+ input IStoreCart {
199
+ """
200
+ Order information, including \`orderNumber\`, \`acceptedOffer\` and \`shouldSplitItem\`.
201
+ """
202
+ order: IStoreOrder!
203
+ }
204
+ `,Rr=`"""
205
+ Product collection type. Possible values are \`Department\`, \`Category\`, \`Brand\`, \`Cluster\`, \`SubCategory\` or \`Collection\`.
206
+ """
207
+ enum StoreCollectionType {
208
+ """
209
+ First level of product categorization.
210
+ """
211
+ Department
212
+ """
213
+ Second level of product categorization.
214
+ """
215
+ Category
216
+ """
217
+ Third level of product categorization.
218
+ """
219
+ SubCategory
220
+ """
221
+ Product brand.
222
+ """
223
+ Brand
224
+ """
225
+ Product cluster.
226
+ """
227
+ Cluster
228
+ """
229
+ Product collection.
230
+ """
231
+ Collection
232
+ }
233
+
234
+ """
235
+ Product collection facet, used for search.
236
+ """
237
+ type StoreCollectionFacet {
238
+ """
239
+ Facet key.
240
+ """
241
+ key: String!
242
+ """
243
+ Facet value.
244
+ """
245
+ value: String!
246
+ }
247
+
248
+ """
249
+ Collection meta information. Used for search.
250
+ """
251
+ type StoreCollectionMeta {
252
+ """
253
+ List of selected collection facets.
254
+ """
255
+ selectedFacets: [StoreCollectionFacet!]!
256
+ }
257
+
258
+ """
259
+ Product collection information.
260
+ """
261
+ type StoreCollection {
262
+ """
263
+ Meta tag data.
264
+ """
265
+ seo: StoreSeo!
266
+ """
267
+ List of items consisting of chain linked web pages, ending with the current page.
268
+ """
269
+ breadcrumbList: StoreBreadcrumbList!
270
+ """
271
+ Collection meta information. Used for search.
272
+ """
273
+ meta: StoreCollectionMeta!
274
+ """
275
+ Collection ID.
276
+ """
277
+ id: ID!
278
+ """
279
+ Corresponding collection URL slug, with which to retrieve this entity.
280
+ """
281
+ slug: String!
282
+ """
283
+ Collection type.
284
+ """
285
+ type: StoreCollectionType!
286
+ }
287
+ `,Lr=`"""
288
+ Delivery Promise badge.
289
+ """
290
+ type DeliveryPromiseBadge {
291
+ """
292
+ Badge type.
293
+ """
294
+ typeName: String
295
+ }
296
+ `,Mr=`union StoreFacet = StoreFacetRange | StoreFacetBoolean
297
+
298
+ """
299
+ Search facet range information.
300
+ """
301
+ type StoreFacetRange {
302
+ """
303
+ Facet key.
304
+ """
305
+ key: String!
306
+ """
307
+ Facet label.
308
+ """
309
+ label: String!
310
+ """
311
+ Minimum facet range value.
312
+ """
313
+ min: StoreFacetValueRange!
314
+ """
315
+ Maximum facet range value.
316
+ """
317
+ max: StoreFacetValueRange!
318
+ }
319
+
320
+ """
321
+ Search facet boolean information.
322
+ """
323
+ type StoreFacetBoolean {
324
+ """
325
+ Facet key.
326
+ """
327
+ key: String!
328
+ """
329
+ Facet label.
330
+ """
331
+ label: String!
332
+ """
333
+ Array with information on each facet value.
334
+ """
335
+ values: [StoreFacetValueBoolean!]!
336
+ }
337
+
338
+ """
339
+ Search facet range value information. Used for minimum and maximum range values.
340
+ """
341
+ type StoreFacetValueRange {
342
+ """
343
+ Search facet range absolute value.
344
+ """
345
+ absolute: Float!
346
+ """
347
+ Search facet range selected value.
348
+ """
349
+ selected: Float!
350
+ }
351
+
352
+ """
353
+ Information of a specific facet value.
354
+ """
355
+ type StoreFacetValueBoolean {
356
+ """
357
+ Facet value.
358
+ """
359
+ value: String!
360
+ """
361
+ Facet value label.
362
+ """
363
+ label: String!
364
+ """
365
+ Indicates whether facet is selected.
366
+ """
367
+ selected: Boolean!
368
+ """
369
+ Number of items with this facet.
370
+ """
371
+ quantity: Int
372
+ }
373
+ `,Br=`"""
374
+ Image.
375
+ """
376
+ type StoreImage {
377
+ """
378
+ Image URL.
379
+ """
380
+ url: String!
381
+ """
382
+ Alias for the image.
383
+ """
384
+ alternateName: String!
385
+ }
386
+
387
+ """
388
+ Image input.
389
+ """
390
+ input IStoreImage {
391
+ """
392
+ Image input URL.
393
+ """
394
+ url: String!
395
+ """
396
+ Alias for the input image.
397
+ """
398
+ alternateName: String!
399
+ }
400
+ `,zr=`type Mutation {
401
+ """
402
+ Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns \`null\`.
403
+ """
404
+ validateCart(cart: IStoreCart!, session: IStoreSession): StoreCart
405
+ """
406
+ Updates a web session with the specified values.
407
+ """
408
+ validateSession(session: IStoreSession!, search: String!): StoreSession
409
+ """
410
+ Subscribes a new person to the newsletter list.
411
+ """
412
+ subscribeToNewsletter(data: IPersonNewsletter!): PersonNewsletter
413
+ """
414
+ Cancels user order
415
+ """
416
+ cancelOrder(data: IUserOrderCancel!): UserOrderCancel
417
+ """
418
+ Process Order Authorization
419
+ """
420
+ processOrderAuthorization(
421
+ data: IProcessOrderAuthorization!
422
+ ): ProcessOrderAuthorizationResponse
423
+ }
424
+ `,$r=`"""
425
+ Newsletter information.
426
+ """
427
+ type PersonNewsletter {
428
+ """
429
+ Person's ID in the newsletter list.
430
+ """
431
+ id: String!
432
+ }
433
+
434
+ """
435
+ Person data input to the newsletter.
436
+ """
437
+ input IPersonNewsletter {
438
+ """
439
+ Person's name.
440
+ """
441
+ name: String!
442
+ """
443
+ Person's email.
444
+ """
445
+ email: String!
446
+ }
447
+ `,Vr=`scalar ObjectOrString
448
+ `,qr=`"""
449
+ Offer information.
450
+ """
451
+ type StoreOffer {
452
+ """
453
+ This is displayed as the "from" price in the context of promotions' price comparison. This may change before it reaches the shelf.
454
+ """
455
+ listPrice: Float!
456
+ """
457
+ List price among with current taxes.
458
+ """
459
+ listPriceWithTaxes: Float!
460
+ """
461
+ Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf.
462
+ """
463
+ sellingPrice: Float!
464
+ """
465
+ ISO code of the currency used for the offer prices.
466
+ """
467
+ priceCurrency: String!
468
+ """
469
+ Also known as spot price.
470
+ """
471
+ price: Float!
472
+ """
473
+ Also known as spot price with taxes.
474
+ """
475
+ priceWithTaxes: Float!
476
+ """
477
+ Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.
478
+ """
479
+ priceValidUntil: String!
480
+ """
481
+ Offer item condition.
482
+ """
483
+ itemCondition: String!
484
+ """
485
+ Offer item availability.
486
+ """
487
+ availability: String!
488
+ """
489
+ Seller responsible for the offer.
490
+ """
491
+ seller: StoreOrganization!
492
+ """
493
+ Information on the item being offered.
494
+ """
495
+ itemOffered: StoreProduct!
496
+ """
497
+ Number of items offered.
498
+ """
499
+ quantity: Int!
500
+ }
501
+
502
+ """
503
+ Offer input.
504
+ """
505
+ input IStoreOffer {
506
+ """
507
+ Also known as spot price.
508
+ """
509
+ price: Float!
510
+ """
511
+ This is displayed as the "from" price in the context of promotions' price comparison. This may change before it reaches the shelf.
512
+ """
513
+ listPrice: Float!
514
+ """
515
+ Seller responsible for the offer.
516
+ """
517
+ seller: IStoreOrganization!
518
+ """
519
+ Information on the item being offered.
520
+ """
521
+ itemOffered: IStoreProduct!
522
+ """
523
+ Number of items offered.
524
+ """
525
+ quantity: Int!
526
+ }
527
+ `,xr=`"""
528
+ Information of a specific order.
529
+ """
530
+ type StoreOrder {
531
+ """
532
+ ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).
533
+ """
534
+ orderNumber: String!
535
+ """
536
+ Array with information on each accepted offer.
537
+ """
538
+ acceptedOffer: [StoreOffer!]!
539
+ """
540
+ Indicates whether or not items with attachments should be split.
541
+ """
542
+ shouldSplitItem: Boolean
543
+ }
544
+
545
+ """
546
+ Order input.
547
+ """
548
+ input IStoreOrder {
549
+ """
550
+ ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).
551
+ """
552
+ orderNumber: String!
553
+ """
554
+ Array with information on each accepted offer.
555
+ """
556
+ acceptedOffer: [IStoreOffer!]!
557
+ """
558
+ Indicates whether or not items with attachments should be split.
559
+ """
560
+ shouldSplitItem: Boolean
561
+ }
562
+ `,Wr=`"""
563
+ Commercial Authorization response.
564
+ """
565
+ type CommercialAuthorizationResponse {
566
+ """
567
+ Commercial Authorization ID.
568
+ """
569
+ id: String!
570
+ """
571
+ Order ID associated with the commercial authorization.
572
+ """
573
+ orderId: String!
574
+ """
575
+ Workflow instance ID.
576
+ """
577
+ workflowInstanceId: String!
578
+ """
579
+ Current status of the commercial authorization.
580
+ """
581
+ status: CommercialAuthorizationStatus!
582
+ """
583
+ List of units.
584
+ """
585
+ units: [String!]!
586
+ """
587
+ Callback endpoint URL.
588
+ """
589
+ callbackEndpoint: String!
590
+ """
591
+ Total order value desired by the seller.
592
+ """
593
+ totalOrderValueDesiredBySeller: Float!
594
+ """
595
+ Marketplace payment value.
596
+ """
597
+ marketPlacePaymentValue: Float!
598
+ """
599
+ Collection of items in the commercial authorization.
600
+ """
601
+ itemCollection: [CommercialAuthorizationItem!]!
602
+ """
603
+ Additional information as key-value pairs.
604
+ """
605
+ additionalInfo: JSONObject!
606
+ """
607
+ Dimension status information.
608
+ """
609
+ dimensionStatus: [CommercialAuthorizationDimensionStatus!]!
610
+ """
611
+ Creation version.
612
+ """
613
+ creationVersion: String!
614
+ """
615
+ Creation environment.
616
+ """
617
+ creationEnvironment: String!
618
+ """
619
+ User profile ID.
620
+ """
621
+ userProfileId: String!
622
+ }
623
+
624
+ """
625
+ Commercial Authorization status.
626
+ """
627
+ enum CommercialAuthorizationStatus {
628
+ """
629
+ Authorization is pending.
630
+ """
631
+ pending
632
+ """
633
+ Authorization has been accepted.
634
+ """
635
+ accepted
636
+ """
637
+ Authorization has been denied.
638
+ """
639
+ denied
640
+ }
641
+
642
+ """
643
+ Commercial Authorization item.
644
+ """
645
+ type CommercialAuthorizationItem {
646
+ """
647
+ Item ID.
648
+ """
649
+ id: String!
650
+ """
651
+ Item SKU.
652
+ """
653
+ sku: String!
654
+ """
655
+ Item price.
656
+ """
657
+ price: Float!
658
+ """
659
+ Total system discount applied.
660
+ """
661
+ totalSystemDiscount: Float!
662
+ """
663
+ Total manual discount applied.
664
+ """
665
+ totalManualDiscount: Float!
666
+ """
667
+ Item quantity.
668
+ """
669
+ quantity: Int!
670
+ """
671
+ Additional information as key-value pairs.
672
+ """
673
+ additionalInfo: JSONObject!
674
+ }
675
+
676
+ """
677
+ Commercial Authorization dimension status.
678
+ """
679
+ type CommercialAuthorizationDimensionStatus {
680
+ """
681
+ Dimension status ID.
682
+ """
683
+ id: String!
684
+ """
685
+ Dimension status name.
686
+ """
687
+ name: String!
688
+ """
689
+ Unit ID, if applicable.
690
+ """
691
+ unitId: String
692
+ """
693
+ Current status of the dimension.
694
+ """
695
+ status: CommercialAuthorizationStatus!
696
+ """
697
+ Dimension score.
698
+ """
699
+ score: Float!
700
+ """
701
+ Priority level.
702
+ """
703
+ priority: Int!
704
+ """
705
+ Indicates if simulation should be performed.
706
+ """
707
+ shouldSimulate: Boolean!
708
+ """
709
+ Collection of rules for this dimension.
710
+ """
711
+ ruleCollection: [CommercialAuthorizationRule!]!
712
+ """
713
+ Creation date.
714
+ """
715
+ creationDate: String!
716
+ """
717
+ Creation version.
718
+ """
719
+ creationVersion: String!
720
+ """
721
+ Creation environment.
722
+ """
723
+ creationEnvironment: String!
724
+ """
725
+ Indicates if all rules acceptance is required.
726
+ """
727
+ requireAllRulesAcceptance: Boolean!
728
+ }
729
+
730
+ """
731
+ Commercial Authorization rule.
732
+ """
733
+ type CommercialAuthorizationRule {
734
+ """
735
+ Rule ID.
736
+ """
737
+ id: String!
738
+ """
739
+ Rule name.
740
+ """
741
+ name: String!
742
+ """
743
+ Current status of the rule.
744
+ """
745
+ status: CommercialAuthorizationStatus!
746
+ """
747
+ DO ID, if applicable.
748
+ """
749
+ doId: String
750
+ """
751
+ List of authorized email addresses.
752
+ """
753
+ authorizedEmails: [String!]!
754
+ """
755
+ Rule priority.
756
+ """
757
+ priority: Int!
758
+ """
759
+ Rule trigger configuration.
760
+ """
761
+ trigger: CommercialAuthorizationRuleTrigger!
762
+ """
763
+ Timeout value.
764
+ """
765
+ timeout: Int!
766
+ """
767
+ Indicates if notification is enabled.
768
+ """
769
+ notification: Boolean!
770
+ """
771
+ Score interval configuration.
772
+ """
773
+ scoreInterval: CommercialAuthorizationRuleScoreInterval!
774
+ """
775
+ Authorization data, if available.
776
+ """
777
+ authorizationData: CommercialAuthorizationRuleAuthorizationData
778
+ """
779
+ Indicates that the user is listed as one of the possible approvers,
780
+ but does not necessarily mean that he or she is the next in the chain to approve.
781
+ """
782
+ isUserAuthorized: Boolean!
783
+ """
784
+ Indicates that the user is next in the approval chain.
785
+ This means that they must take an approval or rejection action.
786
+ """
787
+ isUserNextAuthorizer: Boolean!
788
+ }
789
+
790
+ """
791
+ Commercial Authorization rule trigger.
792
+ """
793
+ type CommercialAuthorizationRuleTrigger {
794
+ """
795
+ Trigger condition.
796
+ """
797
+ condition: CommercialAuthorizationRuleTriggerCondition!
798
+ """
799
+ Trigger effect.
800
+ """
801
+ effect: CommercialAuthorizationRuleTriggerEffect!
802
+ }
803
+
804
+ """
805
+ Commercial Authorization rule trigger condition.
806
+ """
807
+ type CommercialAuthorizationRuleTriggerCondition {
808
+ """
809
+ Condition type.
810
+ """
811
+ conditionType: Int!
812
+ """
813
+ Condition description.
814
+ """
815
+ description: String
816
+ """
817
+ Less than value.
818
+ """
819
+ lessThan: Float
820
+ """
821
+ Greater than value.
822
+ """
823
+ greatherThan: Float
824
+ """
825
+ Condition expression.
826
+ """
827
+ expression: String
828
+ }
829
+
830
+ """
831
+ Commercial Authorization rule trigger effect.
832
+ """
833
+ type CommercialAuthorizationRuleTriggerEffect {
834
+ """
835
+ Effect description.
836
+ """
837
+ description: String
838
+ """
839
+ Effect type.
840
+ """
841
+ effectType: Int!
842
+ """
843
+ Function path.
844
+ """
845
+ funcPath: String
846
+ }
847
+
848
+ """
849
+ Commercial Authorization rule score interval.
850
+ """
851
+ type CommercialAuthorizationRuleScoreInterval {
852
+ """
853
+ Accept score threshold.
854
+ """
855
+ accept: Float!
856
+ """
857
+ Deny score threshold.
858
+ """
859
+ deny: Float!
860
+ }
861
+
862
+ """
863
+ Commercial Authorization rule authorization data.
864
+ """
865
+ type CommercialAuthorizationRuleAuthorizationData {
866
+ """
867
+ Indicates if all approvals are required.
868
+ """
869
+ requireAllApprovals: Boolean!
870
+ """
871
+ List of authorizers.
872
+ """
873
+ authorizers: [CommercialAuthorizationRuleAuthorizer!]!
874
+ }
875
+
876
+ """
877
+ Commercial Authorization rule authorizer.
878
+ """
879
+ type CommercialAuthorizationRuleAuthorizer {
880
+ """
881
+ Authorizer ID.
882
+ """
883
+ id: String!
884
+ """
885
+ Authorizer email.
886
+ """
887
+ email: String
888
+ """
889
+ Authorizer type.
890
+ """
891
+ type: String!
892
+ """
893
+ Authorization date.
894
+ """
895
+ authorizationDate: String
896
+ }
897
+
898
+ """
899
+ Input to get commercial authorizations by order ID.
900
+ """
901
+ input ICommercialAuthorizationByOrderId {
902
+ """
903
+ Order ID to get commercial authorizations for.
904
+ """
905
+ orderId: String!
906
+ }
907
+
908
+ """
909
+ Input to process order authorization (approve or reject).
910
+ """
911
+ input IProcessOrderAuthorization {
912
+ """
913
+ Order authorization ID.
914
+ """
915
+ orderAuthorizationId: String!
916
+ """
917
+ Rule ID associated with the authorization.
918
+ """
919
+ ruleId: String!
920
+ """
921
+ Dimension ID associated with the authorization.
922
+ """
923
+ dimensionId: String!
924
+ """
925
+ Whether the authorization is approved (true) or rejected (false).
926
+ """
927
+ approved: Boolean!
928
+ }
929
+
930
+ """
931
+ Process Order Authorization response.
932
+ """
933
+ type ProcessOrderAuthorizationResponse {
934
+ """
935
+ Indicates if authorization is pending for other authorizers.
936
+ """
937
+ isPendingForOtherAuthorizer: Boolean!
938
+ """
939
+ The updated rule for authorization, if any.
940
+ """
941
+ ruleForAuthorization: ProcessOrderAuthorizationRule
942
+ }
943
+
944
+ """
945
+ Extended Commercial Authorization rule with additional process context.
946
+ """
947
+ type ProcessOrderAuthorizationRule {
948
+ """
949
+ Order authorization ID.
950
+ """
951
+ orderAuthorizationId: String!
952
+ """
953
+ Dimension ID.
954
+ """
955
+ dimensionId: String!
956
+ """
957
+ Base rule information.
958
+ """
959
+ rule: CommercialAuthorizationRule!
960
+ }
961
+ `,jr=`"""
962
+ Organization.
963
+ """
964
+ type StoreOrganization {
965
+ """
966
+ Organization ID.
967
+ """
968
+ identifier: String!
969
+ }
970
+
971
+ """
972
+ Organization input.
973
+ """
974
+ input IStoreOrganization {
975
+ """
976
+ Organization ID.
977
+ """
978
+ identifier: String!
979
+ }
980
+ `,Gr=`"""
981
+ Whenever you make a query that allows for pagination, such as \`allProducts\` or \`allCollections\`, you can check \`StorePageInfo\` to learn more about the complete set of items and use it to paginate your queries.
982
+ """
983
+ type StorePageInfo {
984
+ """
985
+ Indicates whether there is at least one more page with items after the ones returned in the current query.
986
+ """
987
+ hasNextPage: Boolean!
988
+ """
989
+ Indicates whether there is at least one more page with items before the ones returned in the current query.
990
+ """
991
+ hasPreviousPage: Boolean!
992
+ """
993
+ Cursor corresponding to the first possible item.
994
+ """
995
+ startCursor: String!
996
+ """
997
+ Cursor corresponding to the last possible item.
998
+ """
999
+ endCursor: String!
1000
+ """
1001
+ Total number of items (products or collections), not pages.
1002
+ """
1003
+ totalCount: Int!
1004
+ }
1005
+ `,Hr=`"""
1006
+ Input type for setting a new password.
1007
+ """
1008
+ input ISetPassword {
1009
+ """
1010
+ The email of the user for whom the password is being set.
1011
+ """
1012
+ email: String!
1013
+
1014
+ """
1015
+ The new password to be set for the user.
1016
+ """
1017
+ newPassword: String!
1018
+
1019
+ """
1020
+ The current password of the user, required for verification before changing to the new password.
1021
+ """
1022
+ currentPassword: String!
1023
+
1024
+ """
1025
+ Optional access key for the user, used in some authentication flows.
1026
+ """
1027
+ accesskey: String
1028
+
1029
+ """
1030
+ Optional reCAPTCHA token for security verification.
1031
+ """
1032
+ recaptcha: String
1033
+ }
1034
+
1035
+ """
1036
+ Response type for setting a new password.
1037
+ """
1038
+ type SetPasswordResponse {
1039
+ """
1040
+ Indicates whether the password was successfully set.
1041
+ """
1042
+ success: Boolean!
1043
+ """
1044
+ Message providing additional information about the operation.
1045
+ """
1046
+ message: String
1047
+ }
1048
+ `,Xr=`"""
1049
+ Client profile data.
1050
+ """
1051
+ type StorePerson {
1052
+ """
1053
+ Client ID.
1054
+ """
1055
+ id: String!
1056
+ """
1057
+ Client email.
1058
+ """
1059
+ email: String!
1060
+ """
1061
+ Client first name.
1062
+ """
1063
+ givenName: String!
1064
+ """
1065
+ Client last name.
1066
+ """
1067
+ familyName: String!
1068
+ }
1069
+
1070
+ """
1071
+ Client profile data.
1072
+ """
1073
+ input IStorePerson {
1074
+ """
1075
+ Client ID.
1076
+ """
1077
+ id: String!
1078
+ """
1079
+ Client email.
1080
+ """
1081
+ email: String!
1082
+ """
1083
+ Client first name.
1084
+ """
1085
+ givenName: String!
1086
+ """
1087
+ Client last name.
1088
+ """
1089
+ familyName: String!
1090
+ }
1091
+ `,Yr=`type PickupPointAddress {
1092
+ """
1093
+ Address city.
1094
+ """
1095
+ city: String
1096
+ """
1097
+ Address neighborhood.
1098
+ """
1099
+ neighborhood: String
1100
+ """
1101
+ Address number.
1102
+ """
1103
+ number: String
1104
+ """
1105
+ Address postal code.
1106
+ """
1107
+ postalCode: String
1108
+ """
1109
+ Address street.
1110
+ """
1111
+ street: String
1112
+ """
1113
+ Address state.
1114
+ """
1115
+ state: String
1116
+ }
1117
+
1118
+ type BusinessHour {
1119
+ """
1120
+ Number that represents the day of the week.
1121
+ """
1122
+ dayOfWeek: Int
1123
+ """
1124
+ Business hour opening time.
1125
+ """
1126
+ openingTime: String
1127
+ """
1128
+ Business hour closing time.
1129
+ """
1130
+ closingTime: String
1131
+ }
1132
+
1133
+ type PickupPointDistance {
1134
+ """
1135
+ Pickup point ID.
1136
+ """
1137
+ pickupId: String
1138
+ """
1139
+ Pickup point distance.
1140
+ """
1141
+ distance: Float
1142
+ """
1143
+ Pickup point name.
1144
+ """
1145
+ pickupName: String
1146
+ """
1147
+ Whether the pickup point is active.
1148
+ """
1149
+ isActive: Boolean
1150
+ """
1151
+ Pickup point address.
1152
+ """
1153
+ address: PickupPointAddress
1154
+ """
1155
+ Pickup point business hours.
1156
+ """
1157
+ businessHours: [BusinessHour]
1158
+ }
1159
+
1160
+ type PickupPoints {
1161
+ """
1162
+ List of pickup point distances for the given location.
1163
+ """
1164
+ pickupPointDistances: [PickupPointDistance]
1165
+ """
1166
+ Hash of the pickup points data.
1167
+ """
1168
+ pickupPointsHash: String
1169
+ }
1170
+ `,Jr=`"""
1171
+ Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
1172
+ """
1173
+ type StoreProduct {
1174
+ """
1175
+ Meta tag data.
1176
+ """
1177
+ seo: StoreSeo!
1178
+ """
1179
+ List of items consisting of chain linked web pages, ending with the current page.
1180
+ """
1181
+ breadcrumbList: StoreBreadcrumbList!
1182
+ """
1183
+ Corresponding collection URL slug, with which to retrieve this entity.
1184
+ """
1185
+ slug: String!
1186
+ """
1187
+ Product name.
1188
+ """
1189
+ name: String!
1190
+ """
1191
+ Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.
1192
+ """
1193
+ productID: String!
1194
+ """
1195
+ Product brand.
1196
+ """
1197
+ brand: StoreBrand!
1198
+ """
1199
+ Product description.
1200
+ """
1201
+ description: String!
1202
+ """
1203
+ Array of images.
1204
+ """
1205
+ image(context: String = "generic", limit: Int = -1): [StoreImage!]!
1206
+ """
1207
+ Aggregate offer information.
1208
+ """
1209
+ offers: StoreAggregateOffer!
1210
+ """
1211
+ Stock Keeping Unit. Merchant-specific ID for the product.
1212
+ """
1213
+ sku: String!
1214
+ """
1215
+ Global Trade Item Number.
1216
+ """
1217
+ gtin: String!
1218
+ """
1219
+ Array with review information.
1220
+ """
1221
+ review: [StoreReview!]!
1222
+ """
1223
+ Aggregate ratings data.
1224
+ """
1225
+ aggregateRating: StoreAggregateRating!
1226
+ """
1227
+ Indicates product group related to this product.
1228
+ """
1229
+ isVariantOf: StoreProductGroup!
1230
+ """
1231
+ Array of additional properties.
1232
+ """
1233
+ additionalProperty: [StorePropertyValue!]!
1234
+ """
1235
+ The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601
1236
+ """
1237
+ releaseDate: String!
1238
+ """
1239
+ Sku Unit Multiplier
1240
+ """
1241
+ unitMultiplier: Float
1242
+ """
1243
+ Advertisement information about the product.
1244
+ """
1245
+ advertisement: Advertisement
1246
+ """
1247
+ Indicates whether the product has specifications.
1248
+ """
1249
+ hasSpecifications: Boolean
1250
+ """
1251
+ Indicate the specifications of a product.
1252
+ """
1253
+ skuSpecifications: [SkuSpecification!]!
1254
+ """
1255
+ Indicate the specifications of a group of SKUs.
1256
+ """
1257
+ specificationGroups: [SpecificationGroup!]!
1258
+ """
1259
+ Delivery Promise product's badge.
1260
+ """
1261
+ deliveryPromiseBadges: [DeliveryPromiseBadge]
1262
+ }
1263
+
1264
+ type SkuSpecification {
1265
+ field: SKUSpecificationField!
1266
+ values: [SKUSpecificationValue!]!
1267
+ }
1268
+
1269
+ type SKUSpecificationValue {
1270
+ name: String!
1271
+ id: String
1272
+ fieldId: String
1273
+ originalName: String
1274
+ }
1275
+
1276
+ type SKUSpecificationField {
1277
+ name: String!
1278
+ originalName: String
1279
+ id: String
1280
+ }
1281
+
1282
+ type SpecificationGroup {
1283
+ name: String!
1284
+ originalName: String!
1285
+ specifications: [Specification!]!
1286
+ }
1287
+
1288
+ type Specification {
1289
+ name: String!
1290
+ originalName: String!
1291
+ values: [String!]!
1292
+ }
1293
+
1294
+ """
1295
+ Product input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
1296
+ """
1297
+ input IStoreProduct {
1298
+ """
1299
+ Stock Keeping Unit. Merchant-specific ID for the product.
1300
+ """
1301
+ sku: String!
1302
+ """
1303
+ Product name.
1304
+ """
1305
+ name: String!
1306
+ """
1307
+ Array of product images.
1308
+ """
1309
+ image: [IStoreImage!]!
1310
+ """
1311
+ Custom Product Additional Properties.
1312
+ """
1313
+ additionalProperty: [IStorePropertyValue!]
1314
+ }
1315
+ `,Kr=`"""
1316
+ Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
1317
+ """
1318
+ type StoreProductGroup {
1319
+ """
1320
+ Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#).
1321
+ """
1322
+ hasVariant: [StoreProduct!]!
1323
+ """
1324
+ Product group ID.
1325
+ """
1326
+ productGroupID: String!
1327
+ """
1328
+ Product group name.
1329
+ """
1330
+ name: String!
1331
+ """
1332
+ Array of additional properties.
1333
+ """
1334
+ additionalProperty: [StorePropertyValue!]!
1335
+ """
1336
+ Object containing data structures to facilitate handling different SKU
1337
+ variant properties. Specially useful for implementing SKU selection
1338
+ components.
1339
+ """
1340
+ skuVariants: SkuVariants
1341
+ }
1342
+ `,Qr=`type Profile {
1343
+ """
1344
+ Collection of user's address
1345
+ """
1346
+ addresses: [ProfileAddress]
1347
+ }
1348
+
1349
+ type ProfileAddress {
1350
+ """
1351
+ ProfileAddress address name/id.
1352
+ """
1353
+ addressName: String
1354
+ """
1355
+ ProfileAddress address type.
1356
+ """
1357
+ addressType: String
1358
+ """
1359
+ ProfileAddress postal code.
1360
+ """
1361
+ postalCode: String
1362
+ """
1363
+ ProfileAddress city.
1364
+ """
1365
+ city: String
1366
+ """
1367
+ ProfileAddress state.
1368
+ """
1369
+ state: String
1370
+ """
1371
+ ProfileAddress country.
1372
+ """
1373
+ country: String
1374
+ """
1375
+ ProfileAddress street.
1376
+ """
1377
+ street: String
1378
+ """
1379
+ ProfileAddress number.
1380
+ """
1381
+ number: String
1382
+ """
1383
+ ProfileAddress neighborhood.
1384
+ """
1385
+ neighborhood: String
1386
+ """
1387
+ ProfileAddress complement.
1388
+ """
1389
+ complement: String
1390
+ """
1391
+ ProfileAddress reference.
1392
+ """
1393
+ reference: String
1394
+ """
1395
+ ProfileAddress receiver name.
1396
+ """
1397
+ receiverName: String
1398
+ """
1399
+ ProfileAddress geo coordinate.
1400
+ """
1401
+ geoCoordinate: [Float]
1402
+ }
1403
+ `,Zr=`"""
1404
+ Properties that can be associated with products and products groups.
1405
+ """
1406
+ type StorePropertyValue {
1407
+ """
1408
+ Property id. This propert changes according to the content of the object.
1409
+ """
1410
+ propertyID: String!
1411
+ """
1412
+ Property value. May hold a string or the string representation of an object.
1413
+ """
1414
+ value: ObjectOrString!
1415
+ """
1416
+ Property name.
1417
+ """
1418
+ name: String!
1419
+ """
1420
+ Specifies the nature of the value
1421
+ """
1422
+ valueReference: ObjectOrString!
1423
+ }
1424
+
1425
+ input IStorePropertyValue {
1426
+ """
1427
+ Property id. This propert changes according to the content of the object.
1428
+ """
1429
+ propertyID: String
1430
+ """
1431
+ Property value. May hold a string or the string representation of an object.
1432
+ """
1433
+ value: ObjectOrString!
1434
+ """
1435
+ Property name.
1436
+ """
1437
+ name: String!
1438
+ """
1439
+ Specifies the nature of the value
1440
+ """
1441
+ valueReference: ObjectOrString!
1442
+ }
1443
+ `,ni=`"""
1444
+ Each product edge contains a \`node\`, with product information, and a \`cursor\`, that can be used as a reference for pagination.
1445
+ """
1446
+ type StoreProductEdge {
1447
+ """
1448
+ Each product node contains the information of a product returned by the query.
1449
+ """
1450
+ node: StoreProduct!
1451
+ """
1452
+ Product cursor. Used as pagination reference.
1453
+ """
1454
+ cursor: String!
1455
+ }
1456
+
1457
+ """
1458
+ Product connections, including pagination information and products returned by the query.
1459
+ """
1460
+ type StoreProductConnection {
1461
+ """
1462
+ Product pagination information.
1463
+ """
1464
+ pageInfo: StorePageInfo!
1465
+ """
1466
+ Array with product connection edges, each containing a product and a corresponding cursor.
1467
+ """
1468
+ edges: [StoreProductEdge!]!
1469
+ }
1470
+
1471
+ """
1472
+ Each collection edge contains a \`node\`, with product collection information, and a \`cursor\`, that can be used as a reference for pagination.
1473
+ """
1474
+ type StoreCollectionEdge {
1475
+ """
1476
+ Each collection node contains the information of a product collection returned by the query.
1477
+ """
1478
+ node: StoreCollection!
1479
+ """
1480
+ Collection cursor. Used as pagination reference.
1481
+ """
1482
+ cursor: String!
1483
+ }
1484
+
1485
+ """
1486
+ Collection connections, including pagination information and collections returned by the query.
1487
+ """
1488
+ type StoreCollectionConnection {
1489
+ """
1490
+ Collection pagination information.
1491
+ """
1492
+ pageInfo: StorePageInfo!
1493
+ """
1494
+ Array with collection connection page edges, each containing a collection and a corresponding cursor..
1495
+ """
1496
+ edges: [StoreCollectionEdge!]!
1497
+ }
1498
+
1499
+ """
1500
+ Product search results sorting options.
1501
+ """
1502
+ enum StoreSort {
1503
+ """
1504
+ Sort by price, from highest to lowest.
1505
+ """
1506
+ price_desc
1507
+ """
1508
+ Sort by price, from lowest to highest.
1509
+ """
1510
+ price_asc
1511
+ """
1512
+ Sort by orders, from highest to lowest.
1513
+ """
1514
+ orders_desc
1515
+ """
1516
+ Sort by name, in reverse alphabetical order.
1517
+ """
1518
+ name_desc
1519
+ """
1520
+ Sort by name, in alphabetical order.
1521
+ """
1522
+ name_asc
1523
+ """
1524
+ Sort by release date, from highest to lowest.
1525
+ """
1526
+ release_desc
1527
+ """
1528
+ Sort by discount value, from highest to lowest.
1529
+ """
1530
+ discount_desc
1531
+ """
1532
+ Sort by product score, from highest to lowest.
1533
+ """
1534
+ score_desc
1535
+ }
1536
+
1537
+ """
1538
+ Selected search facet input.
1539
+ """
1540
+ input IStoreSelectedFacet {
1541
+ """
1542
+ Selected search facet key.
1543
+ """
1544
+ key: String!
1545
+ """
1546
+ Selected search facet value.
1547
+ """
1548
+ value: String!
1549
+ }
1550
+
1551
+ """
1552
+ Search facet type.
1553
+ """
1554
+ enum StoreFacetType {
1555
+ """
1556
+ Indicates boolean search facet.
1557
+ """
1558
+ BOOLEAN
1559
+ """
1560
+ Indicates range type search facet.
1561
+ """
1562
+ RANGE
1563
+ }
1564
+
1565
+ """
1566
+ Suggestion term.
1567
+ """
1568
+ type StoreSuggestionTerm {
1569
+ """
1570
+ The term.
1571
+ """
1572
+ value: String!
1573
+ """
1574
+ Its occurrences count.
1575
+ """
1576
+ count: Int!
1577
+ }
1578
+
1579
+ """
1580
+ Suggestions information.
1581
+ """
1582
+ type StoreSuggestions {
1583
+ """
1584
+ Array with suggestion terms.
1585
+ """
1586
+ terms: [StoreSuggestionTerm!]!
1587
+ """
1588
+ Array with suggestion products' information.
1589
+ """
1590
+ products: [StoreProduct!]!
1591
+ }
1592
+
1593
+ """
1594
+ Search result.
1595
+ """
1596
+ type SearchMetadata {
1597
+ """
1598
+ Indicates if the search term was misspelled.
1599
+ """
1600
+ isTermMisspelled: Boolean!
1601
+ """
1602
+ Logical operator used to run the search.
1603
+ """
1604
+ logicalOperator: String!
1605
+ """
1606
+ Indicates how the search engine corrected the misspelled word by using fuzzy logic.
1607
+ """
1608
+ fuzzy: String
1609
+ }
1610
+
1611
+ """
1612
+ Search result.
1613
+ """
1614
+ type StoreSearchResult {
1615
+ """
1616
+ Search result products.
1617
+ """
1618
+ products: StoreProductConnection!
1619
+ """
1620
+ Array of search result facets.
1621
+ """
1622
+ facets: [StoreFacet!]!
1623
+ """
1624
+ Search result suggestions.
1625
+ """
1626
+ suggestions: StoreSuggestions!
1627
+ """
1628
+ Search result metadata. Additional data can be used to send analytics events.
1629
+ """
1630
+ metadata: SearchMetadata
1631
+ }
1632
+
1633
+ input IGeoCoordinates {
1634
+ """
1635
+ The latitude of the geographic coordinates.
1636
+ """
1637
+ latitude: Float!
1638
+ """
1639
+ The longitude of the geographic coordinates.
1640
+ """
1641
+ longitude: Float!
1642
+ }
1643
+
1644
+ type ProductCountResult {
1645
+ """
1646
+ Total product count.
1647
+ """
1648
+ total: Int!
1649
+ }
1650
+
1651
+ type Query {
1652
+ """
1653
+ Returns the details of a product based on the specified locator.
1654
+ """
1655
+ product(
1656
+ """
1657
+ An array of selected search facets.
1658
+ """
1659
+ locator: [IStoreSelectedFacet!]!
1660
+ ): StoreProduct!
1661
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1662
+
1663
+ """
1664
+ Returns the details of a collection based on the collection slug.
1665
+ """
1666
+ collection(
1667
+ """
1668
+ Collection slug.
1669
+ """
1670
+ slug: String!
1671
+ ): StoreCollection!
1672
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1673
+
1674
+ """
1675
+ Returns the result of a product, facet, or suggestion search.
1676
+ """
1677
+ search(
1678
+ """
1679
+ Search pagination argument, indicating how many results should be returned from the complete result list.
1680
+ """
1681
+ first: Int!
1682
+ """
1683
+ Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.
1684
+ """
1685
+ after: String
1686
+ """
1687
+ Search results sorting mode.
1688
+ """
1689
+ sort: StoreSort = score_desc
1690
+ """
1691
+ Search term.
1692
+ """
1693
+ term: String = ""
1694
+ """
1695
+ Array of selected search facets.
1696
+ """
1697
+ selectedFacets: [IStoreSelectedFacet!]
1698
+ """
1699
+ Search advertisement products return in result.
1700
+ """
1701
+ sponsoredCount: Int
1702
+ ): StoreSearchResult!
1703
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1704
+
1705
+ """
1706
+ Returns information about all products.
1707
+ """
1708
+ allProducts(
1709
+ """
1710
+ Product pagination argument, indicating how many items should be returned from the complete result list.
1711
+ """
1712
+ first: Int!
1713
+ """
1714
+ Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.
1715
+ """
1716
+ after: String
1717
+ ): StoreProductConnection!
1718
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1719
+
1720
+ """
1721
+ Returns information about selected products.
1722
+ """
1723
+ products(productIds: [String!]!): [StoreProduct!]!
1724
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1725
+
1726
+ """
1727
+ Returns information about all collections.
1728
+ """
1729
+ allCollections(
1730
+ """
1731
+ Collection pagination argument, indicating how many items should be returned from the complete result list.
1732
+ """
1733
+ first: Int!
1734
+ """
1735
+ Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.
1736
+ """
1737
+ after: String
1738
+ ): StoreCollectionConnection!
1739
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1740
+
1741
+ """
1742
+ Returns information about shipping simulation.
1743
+ """
1744
+ shipping(
1745
+ """
1746
+ List of SKU products
1747
+ """
1748
+ items: [IShippingItem!]!
1749
+ """
1750
+ Postal code to freight calculator
1751
+ """
1752
+ postalCode: String!
1753
+ """
1754
+ Country of postal code
1755
+ """
1756
+ country: String!
1757
+ ): ShippingData
1758
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1759
+
1760
+ """
1761
+ Returns if there's a redirect for a search.
1762
+ """
1763
+ redirect(
1764
+ """
1765
+ Search term.
1766
+ """
1767
+ term: String
1768
+ """
1769
+ Array of selected search facets.
1770
+ """
1771
+ selectedFacets: [IStoreSelectedFacet!]
1772
+ ): StoreRedirect
1773
+
1774
+ """
1775
+ Returns a list of sellers available for a specific localization.
1776
+ """
1777
+ sellers(
1778
+ """
1779
+ Postal code input to calculate sellers
1780
+ """
1781
+ postalCode: String
1782
+ """
1783
+ Geocoordinates input to calculate sellers
1784
+ """
1785
+ geoCoordinates: IGeoCoordinates
1786
+ """
1787
+ Country of localization
1788
+ """
1789
+ country: String!
1790
+ """
1791
+ Sales channel of the navigation
1792
+ """
1793
+ salesChannel: String
1794
+ ): SellersData
1795
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1796
+
1797
+ """
1798
+ Returns information about the profile.
1799
+ """
1800
+ profile(
1801
+ """
1802
+ Identifier for user.
1803
+ """
1804
+ id: String!
1805
+ ): Profile
1806
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1807
+
1808
+ """
1809
+ Returns the total product count information based on a specific location accessible through the VTEX segment cookie.
1810
+ """
1811
+ productCount(
1812
+ """
1813
+ Search term.
1814
+ """
1815
+ term: String
1816
+ ): ProductCountResult
1817
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1818
+
1819
+ """
1820
+ Returns information about the Details of an User Order.
1821
+ """
1822
+ userOrder(
1823
+ """
1824
+ Identifier for the order.
1825
+ """
1826
+ orderId: String!
1827
+ ): UserOrderResult
1828
+ @auth
1829
+ @cacheControl(scope: "private", sMaxAge: 300, staleWhileRevalidate: 3600)
1830
+
1831
+ """
1832
+ Returns the list of Orders that the User can view.
1833
+ """
1834
+ listUserOrders(
1835
+ """
1836
+ Page number of the list of orders.
1837
+ """
1838
+ page: Int
1839
+ """
1840
+ Quantity of items per page of the list of orders.
1841
+ """
1842
+ perPage: Int
1843
+ """
1844
+ Status of the list of orders.
1845
+ """
1846
+ status: [String]
1847
+ """
1848
+ Initial date of the list of orders.
1849
+ """
1850
+ dateInitial: String
1851
+ """
1852
+ Final date of the list of orders.
1853
+ """
1854
+ dateFinal: String
1855
+ """
1856
+ Text used to full text filter of the list of orders.
1857
+ """
1858
+ text: String
1859
+ """
1860
+ Client email used to filter of the list of orders.
1861
+ """
1862
+ clientEmail: String
1863
+ """
1864
+ Filter orders that are pending user approval.
1865
+ """
1866
+ pendingMyApproval: Boolean
1867
+ ): UserOrderListMinimalResult
1868
+ @auth
1869
+ @cacheControl(scope: "private", sMaxAge: 300, staleWhileRevalidate: 3600)
1870
+
1871
+ """
1872
+ Returns information about the current user details.
1873
+ """
1874
+ userDetails: StoreUserDetails!
1875
+ @auth
1876
+ @cacheControl(scope: "private", sMaxAge: 300, staleWhileRevalidate: 3600)
1877
+
1878
+ """
1879
+ Returns the account profile information for the current authenticated user (b2b or b2c user).
1880
+ """
1881
+ accountProfile: StoreAccountProfile!
1882
+ @auth
1883
+ @cacheControl(scope: "private", sMaxAge: 300, staleWhileRevalidate: 3600)
1884
+
1885
+ """
1886
+ Returns information about the user validation.
1887
+ """
1888
+ validateUser: ValidateUserData
1889
+ @auth
1890
+ @cacheControl(scope: "private", sMaxAge: 300, staleWhileRevalidate: 3600)
1891
+
1892
+ """
1893
+ Returns a list of pickup points near to the given geo coordinates.
1894
+ """
1895
+ pickupPoints(
1896
+ """
1897
+ Geo coordinates input.
1898
+ """
1899
+ geoCoordinates: IStoreGeoCoordinates
1900
+ ): PickupPoints
1901
+ @cacheControl(scope: "public", sMaxAge: 300, staleWhileRevalidate: 3600)
1902
+ }
1903
+
1904
+ type ValidateUserData {
1905
+ """
1906
+ Indicates if the user is valid.
1907
+ """
1908
+ isValid: Boolean!
1909
+ }
1910
+
1911
+ """
1912
+ Redirect informations, including url returned by the query.
1913
+ https://schema.org/Thing
1914
+ """
1915
+ type StoreRedirect {
1916
+ """
1917
+ URL to redirect
1918
+ """
1919
+ url: String
1920
+ }
1921
+
1922
+ """
1923
+ Regionalization with sellers information.
1924
+ """
1925
+ type SellersData {
1926
+ """
1927
+ Identification of region.
1928
+ """
1929
+ id: String
1930
+ """
1931
+ List of sellers.
1932
+ """
1933
+ sellers: [SellerInfo]
1934
+ }
1935
+
1936
+ """
1937
+ Information of sellers.
1938
+ """
1939
+ type SellerInfo {
1940
+ """
1941
+ Identification of the seller
1942
+ """
1943
+ id: String
1944
+ """
1945
+ Name of the seller
1946
+ """
1947
+ name: String
1948
+ """
1949
+ Logo of the seller
1950
+ """
1951
+ logo: String
1952
+ }
1953
+
1954
+ """
1955
+ User details information.
1956
+ """
1957
+ type StoreUserDetails {
1958
+ """
1959
+ User's name.
1960
+ """
1961
+ name: String
1962
+ """
1963
+ User's email.
1964
+ """
1965
+ email: String
1966
+ """
1967
+ User's role.
1968
+ """
1969
+ role: [String]
1970
+ """
1971
+ User's organizational unit.
1972
+ """
1973
+ orgUnit: String
1974
+ }
1975
+
1976
+ """
1977
+ Account profile information.
1978
+ """
1979
+ type StoreAccountProfile {
1980
+ name: String
1981
+ email: String
1982
+ id: String
1983
+ }
1984
+ `,ei=`"""
1985
+ Information of a given review rating.
1986
+ """
1987
+ type StoreReviewRating {
1988
+ """
1989
+ Rating value.
1990
+ """
1991
+ ratingValue: Float!
1992
+ """
1993
+ Best rating value.
1994
+ """
1995
+ bestRating: Float!
1996
+ }
1997
+
1998
+ """
1999
+ Information of a given review.
2000
+ """
2001
+ type StoreReview {
2002
+ """
2003
+ Review rating information.
2004
+ """
2005
+ reviewRating: StoreReviewRating!
2006
+ """
2007
+ Review author.
2008
+ """
2009
+ author: StoreAuthor!
2010
+ }
2011
+ `,ti=`"""
2012
+ Search Engine Optimization (SEO) tags data.
2013
+ """
2014
+ type StoreSeo {
2015
+ """
2016
+ Title tag.
2017
+ """
2018
+ title: String!
2019
+ """
2020
+ Title template tag.
2021
+ """
2022
+ titleTemplate: String!
2023
+ """
2024
+ Description tag.
2025
+ """
2026
+ description: String!
2027
+ """
2028
+ Canonical tag.
2029
+ """
2030
+ canonical: String!
2031
+ }
2032
+ `,ri=`"""
2033
+ Currency information.
2034
+ """
2035
+ type StoreCurrency {
2036
+ """
2037
+ Currency code (e.g: USD).
2038
+ """
2039
+ code: String!
2040
+ """
2041
+ Currency symbol (e.g: $).
2042
+ """
2043
+ symbol: String!
2044
+ }
2045
+
2046
+ input IStoreCurrency {
2047
+ """
2048
+ Currency code (e.g: USD).
2049
+ """
2050
+ code: String!
2051
+ """
2052
+ Currency symbol (e.g: $).
2053
+ """
2054
+ symbol: String!
2055
+ }
2056
+
2057
+ """
2058
+ Marketing information.
2059
+ """
2060
+ type StoreMarketingData {
2061
+ utmCampaign: String
2062
+ utmMedium: String
2063
+ utmSource: String
2064
+ utmiCampaign: String
2065
+ utmiPart: String
2066
+ utmiPage: String
2067
+ }
2068
+
2069
+ input IStoreMarketingData {
2070
+ utmCampaign: String
2071
+ utmMedium: String
2072
+ utmSource: String
2073
+ utmiCampaign: String
2074
+ utmiPart: String
2075
+ utmiPage: String
2076
+ }
2077
+
2078
+ """
2079
+ Geographic coordinates information.
2080
+ """
2081
+ type StoreGeoCoordinates {
2082
+ """
2083
+ The latitude of the geographic coordinates.
2084
+ """
2085
+ latitude: Float!
2086
+ """
2087
+ The longitude of the geographic coordinates.
2088
+ """
2089
+ longitude: Float!
2090
+ }
2091
+
2092
+ input IStoreGeoCoordinates {
2093
+ """
2094
+ The latitude of the geographic coordinates.
2095
+ """
2096
+ latitude: Float!
2097
+ """
2098
+ The longitude of the geographic coordinates.
2099
+ """
2100
+ longitude: Float!
2101
+ }
2102
+
2103
+ """
2104
+ Delivery window information.
2105
+ """
2106
+ type StoreDeliveryWindow {
2107
+ """
2108
+ The delivery window start date information.
2109
+ """
2110
+ startDate: String!
2111
+ """
2112
+ The delivery window end date information.
2113
+ """
2114
+ endDate: String!
2115
+ }
2116
+
2117
+ """
2118
+ Delivery window information.
2119
+ """
2120
+ input IStoreDeliveryWindow {
2121
+ """
2122
+ The delivery window start date information.
2123
+ """
2124
+ startDate: String!
2125
+ """
2126
+ The delivery window end date information.
2127
+ """
2128
+ endDate: String!
2129
+ }
2130
+
2131
+ """
2132
+ Delivery mode information.
2133
+ """
2134
+ type StoreDeliveryMode {
2135
+ """
2136
+ The delivery channel information of the session.
2137
+ """
2138
+ deliveryChannel: String!
2139
+ """
2140
+ The delivery method information of the session.
2141
+ """
2142
+ deliveryMethod: String!
2143
+ """
2144
+ The delivery window information of the session.
2145
+ """
2146
+ deliveryWindow: StoreDeliveryWindow
2147
+ }
2148
+
2149
+ input IStoreDeliveryMode {
2150
+ """
2151
+ The delivery channel information of the session.
2152
+ """
2153
+ deliveryChannel: String!
2154
+ """
2155
+ The delivery method information of the session.
2156
+ """
2157
+ deliveryMethod: String!
2158
+ """
2159
+ The delivery window information of the session.
2160
+ """
2161
+ deliveryWindow: IStoreDeliveryWindow
2162
+ }
2163
+
2164
+ """
2165
+ Session information.
2166
+ """
2167
+ type StoreSession {
2168
+ """
2169
+ Session locale.
2170
+ """
2171
+ locale: String!
2172
+ """
2173
+ Session currency.
2174
+ """
2175
+ currency: StoreCurrency!
2176
+ """
2177
+ Session country.
2178
+ """
2179
+ country: String!
2180
+ """
2181
+ Session channel.
2182
+ """
2183
+ channel: String
2184
+ """
2185
+ Session delivery mode.
2186
+ """
2187
+ deliveryMode: StoreDeliveryMode
2188
+ """
2189
+ Session address type.
2190
+ """
2191
+ addressType: String
2192
+ """
2193
+ Session city.
2194
+ """
2195
+ city: String
2196
+ """
2197
+ Session postal code.
2198
+ """
2199
+ postalCode: String
2200
+ """
2201
+ Session input geoCoordinates.
2202
+ """
2203
+ geoCoordinates: StoreGeoCoordinates
2204
+ """
2205
+ Session input person.
2206
+ """
2207
+ person: StorePerson
2208
+ """
2209
+ B2B Information.
2210
+ """
2211
+ b2b: StoreB2B
2212
+ """
2213
+ Marketing information.
2214
+ """
2215
+ marketingData: StoreMarketingData
2216
+ """
2217
+ Refresh token after Information.
2218
+ """
2219
+ refreshAfter: String
2220
+ }
2221
+
2222
+ type StoreB2B {
2223
+ customerId: String!
2224
+ isRepresentative: Boolean
2225
+ unitName: String
2226
+ unitId: String
2227
+ firstName: String
2228
+ lastName: String
2229
+ userName: String
2230
+ userEmail: String
2231
+ savedPostalCode: String
2232
+ contractName: String
2233
+ organizationManager: Boolean
2234
+ }
2235
+
2236
+ input IStoreB2B {
2237
+ customerId: String!
2238
+ isRepresentative: Boolean
2239
+ unitName: String
2240
+ unitId: String
2241
+ firstName: String
2242
+ lastName: String
2243
+ userName: String
2244
+ userEmail: String
2245
+ savedPostalCode: String
2246
+ contractName: String
2247
+ organizationManager: Boolean
2248
+ }
2249
+
2250
+ """
2251
+ Session input.
2252
+ """
2253
+ input IStoreSession {
2254
+ """
2255
+ Session input locale.
2256
+ """
2257
+ locale: String!
2258
+ """
2259
+ Session input currency.
2260
+ """
2261
+ currency: IStoreCurrency!
2262
+ """
2263
+ Session input country.
2264
+ """
2265
+ country: String!
2266
+ """
2267
+ Session input channel.
2268
+ """
2269
+ channel: String
2270
+ """
2271
+ Session input delivery mode.
2272
+ """
2273
+ deliveryMode: IStoreDeliveryMode
2274
+ """
2275
+ Session input address type.
2276
+ """
2277
+ addressType: String
2278
+ """
2279
+ Session input city.
2280
+ """
2281
+ city: String
2282
+ """
2283
+ Session input postal code.
2284
+ """
2285
+ postalCode: String
2286
+ """
2287
+ Session input geoCoordinates.
2288
+ """
2289
+ geoCoordinates: IStoreGeoCoordinates
2290
+ """
2291
+ Session input person.
2292
+ """
2293
+ person: IStorePerson
2294
+ """
2295
+ Session input b2b.
2296
+ """
2297
+ b2b: IStoreB2B
2298
+ """
2299
+ Marketing information input.
2300
+ """
2301
+ marketingData: IStoreMarketingData
2302
+ """
2303
+ Refresh token after Information.
2304
+ """
2305
+ refreshAfter: String
2306
+ }
2307
+ `,ii=`"""
2308
+ Shipping Simulation item input.
2309
+ """
2310
+ input IShippingItem {
2311
+ """
2312
+ ShippingItem ID / Sku.
2313
+ """
2314
+ id: String!
2315
+ """
2316
+ Number of items.
2317
+ """
2318
+ quantity: Int!
2319
+ """
2320
+ Seller responsible for the ShippingItem.
2321
+ """
2322
+ seller: String!
2323
+ }
2324
+
2325
+ """
2326
+ Shipping Simulation information.
2327
+ """
2328
+ type ShippingData {
2329
+ """
2330
+ List of LogisticsItem.
2331
+ """
2332
+ items: [LogisticsItem]
2333
+ """
2334
+ List of LogisticsInfo.
2335
+ """
2336
+ logisticsInfo: [LogisticsInfo]
2337
+ """
2338
+ List of MessageInfo.
2339
+ """
2340
+ messages: [MessageInfo]
2341
+ """
2342
+ Address information.
2343
+ """
2344
+ address: Address
2345
+ }
2346
+
2347
+ """
2348
+ Shipping Simulation Logistic Item.
2349
+ """
2350
+ type LogisticsItem {
2351
+ """
2352
+ LogisticsItem ID / Sku.
2353
+ """
2354
+ id: String
2355
+ requestIndex: Int
2356
+ """
2357
+ Number of items.
2358
+ """
2359
+ quantity: Int
2360
+ """
2361
+ Seller responsible for the ShippingItem.
2362
+ """
2363
+ seller: String
2364
+ """
2365
+ List of Sellers.
2366
+ """
2367
+ sellerChain: [String]
2368
+ """
2369
+ LogisticsItem tax.
2370
+ """
2371
+ tax: Int
2372
+ """
2373
+ Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.
2374
+ """
2375
+ priceValidUntil: String
2376
+ """
2377
+ LogisticsItem price.
2378
+ """
2379
+ price: Int
2380
+ """
2381
+ LogisticsItem listPrice.
2382
+ """
2383
+ listPrice: Int
2384
+ """
2385
+ LogisticsItem rewardValue.
2386
+ """
2387
+ rewardValue: Int
2388
+ """
2389
+ LogisticsItem sellingPrice.
2390
+ """
2391
+ sellingPrice: Int
2392
+ """
2393
+ LogisticsItem measurementUnit.
2394
+ """
2395
+ measurementUnit: String
2396
+ """
2397
+ LogisticsItem unitMultiplier.
2398
+ """
2399
+ unitMultiplier: Int
2400
+ """
2401
+ LogisticsItem availability.
2402
+ """
2403
+ availability: String
2404
+ }
2405
+
2406
+ type LogisticsInfo {
2407
+ """
2408
+ LogisticsInfo itemIndex.
2409
+ """
2410
+ itemIndex: String
2411
+ """
2412
+ LogisticsInfo selectedSla.
2413
+ """
2414
+ selectedSla: String
2415
+ """
2416
+ List of LogisticsInfo ShippingSLA.
2417
+ """
2418
+ slas: [ShippingSLA]
2419
+ }
2420
+
2421
+ type ShippingSLA {
2422
+ """
2423
+ ShippingSLA id.
2424
+ """
2425
+ id: String
2426
+ """
2427
+ ShippingSLA name.
2428
+ """
2429
+ name: String
2430
+ """
2431
+ ShippingSLA price.
2432
+ """
2433
+ price: Float
2434
+ """
2435
+ ShippingSLA shipping estimate.
2436
+ """
2437
+ shippingEstimate: String
2438
+ """
2439
+ ShippingSLA localized shipping estimate.
2440
+ Note: this will always return a localized string for locale \`en-US\`.
2441
+ """
2442
+ localizedEstimates: String
2443
+ """
2444
+ ShippingSLA available delivery windows.
2445
+ """
2446
+ availableDeliveryWindows: [AvailableDeliveryWindows]
2447
+ """
2448
+ ShippingSLA shipping estimate date.
2449
+ """
2450
+ shippingEstimateDate: String
2451
+ """
2452
+ List of ShippingSLA delivery ids.
2453
+ """
2454
+ deliveryIds: [DeliveryIds]
2455
+ """
2456
+ ShippingSLA delivery channel.
2457
+ """
2458
+ deliveryChannel: String
2459
+ """
2460
+ ShippingSLA friendly name.
2461
+ """
2462
+ friendlyName: String
2463
+ """
2464
+ ShippingSLA carrier.
2465
+ """
2466
+ carrier: String
2467
+ """
2468
+ ShippingSLA pickup point id.
2469
+ """
2470
+ pickupPointId: String
2471
+ """
2472
+ ShippingSLA pickup store info.
2473
+ """
2474
+ pickupStoreInfo: PickupStoreInfo
2475
+ """
2476
+ ShippingSLA pickup distance.
2477
+ """
2478
+ pickupDistance: Float
2479
+ }
2480
+
2481
+ type AvailableDeliveryWindows {
2482
+ """
2483
+ Available delivery window start date in UTC
2484
+ """
2485
+ startDateUtc: String
2486
+ """
2487
+ Available delivery window end date in UTC
2488
+ """
2489
+ endDateUtc: String
2490
+ """
2491
+ Available delivery window price
2492
+ """
2493
+ price: Int
2494
+ """
2495
+ Available delivery window list price
2496
+ """
2497
+ listPrice: Int
2498
+ """
2499
+ Available delivery window tax
2500
+ """
2501
+ tax: Int
2502
+ }
2503
+
2504
+ type DeliveryIds {
2505
+ """
2506
+ DeliveryIds courier id
2507
+ """
2508
+ courierId: String
2509
+ """
2510
+ DeliveryIds warehouse id
2511
+ """
2512
+ warehouseId: String
2513
+ """
2514
+ DeliveryIds dock id
2515
+ """
2516
+ dockId: String
2517
+ """
2518
+ DeliveryIds courier name
2519
+ """
2520
+ courierName: String
2521
+ """
2522
+ DeliveryIds quantity
2523
+ """
2524
+ quantity: Int
2525
+ }
2526
+
2527
+ type PickupStoreInfo {
2528
+ """
2529
+ PickupStoreInfo friendly name.
2530
+ """
2531
+ friendlyName: String
2532
+ """
2533
+ PickupStoreInfo address.
2534
+ """
2535
+ address: PickupAddress
2536
+ """
2537
+ PickupStoreInfo additional information.
2538
+ """
2539
+ additionalInfo: String
2540
+ """
2541
+ PickupStoreInfo dock id.
2542
+ """
2543
+ dockId: String
2544
+ """
2545
+ Information if the store has pickup enable.
2546
+ """
2547
+ isPickupStore: Boolean
2548
+ }
2549
+
2550
+ type PickupAddress {
2551
+ """
2552
+ PickupAddress address type.
2553
+ """
2554
+ addressType: String
2555
+ """
2556
+ PickupAddress receiver name.
2557
+ """
2558
+ receiverName: String
2559
+ """
2560
+ PickupAddress address id.
2561
+ """
2562
+ addressId: String
2563
+ """
2564
+ PickupAddress postal code.
2565
+ """
2566
+ postalCode: String
2567
+ """
2568
+ PickupAddress city.
2569
+ """
2570
+ city: String
2571
+ """
2572
+ PickupAddress state.
2573
+ """
2574
+ state: String
2575
+ """
2576
+ PickupAddress country.
2577
+ """
2578
+ country: String
2579
+ """
2580
+ PickupAddress street.
2581
+ """
2582
+ street: String
2583
+ """
2584
+ PickupAddress number.
2585
+ """
2586
+ number: String
2587
+ """
2588
+ PickupAddress neighborhood.
2589
+ """
2590
+ neighborhood: String
2591
+ """
2592
+ PickupAddress complement.
2593
+ """
2594
+ complement: String
2595
+ """
2596
+ PickupAddress reference.
2597
+ """
2598
+ reference: String
2599
+ """
2600
+ PickupAddress geo coordinates.
2601
+ """
2602
+ geoCoordinates: [Float]
2603
+ }
2604
+
2605
+ type MessageInfo {
2606
+ """
2607
+ MessageInfo code.
2608
+ """
2609
+ code: String
2610
+ """
2611
+ MessageInfo text.
2612
+ """
2613
+ text: String
2614
+ """
2615
+ MessageInfo status.
2616
+ """
2617
+ status: String
2618
+ """
2619
+ MessageInfo fields.
2620
+ """
2621
+ fields: MessageFields
2622
+ }
2623
+
2624
+ type MessageFields {
2625
+ """
2626
+ MessageFields item index.
2627
+ """
2628
+ itemIndex: String
2629
+ """
2630
+ MessageFields ean.
2631
+ """
2632
+ ean: String
2633
+ """
2634
+ MessageFields sku name.
2635
+ """
2636
+ skuName: String
2637
+ }
2638
+ `,oi=`type SkuVariants {
2639
+ """
2640
+ SKU property values for the current SKU.
2641
+ """
2642
+ activeVariations: ActiveVariations
2643
+ """
2644
+ All available options for each SKU variant property, indexed by their name.
2645
+ """
2646
+ allVariantsByName: VariantsByName
2647
+ """
2648
+ Maps property value combinations to their respective SKU's slug. Enables
2649
+ us to retrieve the slug for the SKU that matches the currently selected
2650
+ variations in O(1) time.
2651
+ If \`dominantVariantName\` is not present, the first variant will be
2652
+ considered the dominant one.
2653
+ """
2654
+ slugsMap(dominantVariantName: String): SlugsMap
2655
+ """
2656
+ Available options for each varying SKU property, taking into account the
2657
+ \`dominantVariantName\` property. Returns all available options for the
2658
+ dominant property, and only options that can be combined with its current
2659
+ value for other properties.
2660
+ If \`dominantVariantName\` is not present, the first variant will be
2661
+ considered the dominant one.
2662
+ """
2663
+ availableVariations(dominantVariantName: String): FormattedVariants
2664
+
2665
+ """
2666
+ All available options for each SKU variant property, indexed by their name.
2667
+ """
2668
+ allVariantProducts: [StoreProduct!]
2669
+ }
2670
+
2671
+ """
2672
+ Example:
2673
+
2674
+ \`\`\`json
2675
+ {
2676
+ 'Color-Red-Size-40': 'classic-shoes-37'
2677
+ }
2678
+ \`\`\`
2679
+ """
2680
+ scalar SlugsMap
2681
+ """
2682
+ Example:
2683
+
2684
+ \`\`\`json
2685
+ {
2686
+ Color: 'Red', Size: '42'
2687
+ }
2688
+ \`\`\`
2689
+ """
2690
+ scalar ActiveVariations
2691
+ """
2692
+ Example:
2693
+
2694
+ \`\`\`json
2695
+ {
2696
+ Color: [ "Red", "Blue", "Green" ],
2697
+ Size: [ "40", "41" ]
2698
+ }
2699
+ \`\`\`
2700
+ """
2701
+ scalar VariantsByName
2702
+ """
2703
+ Example:
2704
+
2705
+ \`\`\`json
2706
+ {
2707
+ Color: [
2708
+ {
2709
+ src: "https://storecomponents.vtexassets.com/...",
2710
+ alt: "...",
2711
+ label: "...",
2712
+ value: "..."
2713
+ },
2714
+ {
2715
+ src: "https://storecomponents.vtexassets.com/...",
2716
+ alt: "...",
2717
+ label: "...",
2718
+ value: "..."
2719
+ }
2720
+ ],
2721
+ Size: [
2722
+ {
2723
+ src: "https://storecomponents.vtexassets.com/...",
2724
+ alt: "...",
2725
+ label: "...",
2726
+ value: "..."
2727
+ }
2728
+ ]
2729
+ }
2730
+ \`\`\`
2731
+ """
2732
+ scalar FormattedVariants
2733
+ `,ai=`"""
2734
+ Status used to indicate a message type. For instance, a shopping cart informative or error message.
2735
+ """
2736
+ enum StoreStatus {
2737
+ INFO
2738
+ WARNING
2739
+ ERROR
2740
+ }
2741
+ `,si=`scalar JSONObject
2742
+
2743
+ type UserOrder {
2744
+ orderId: String
2745
+ sequence: String
2746
+ marketplaceOrderId: String
2747
+ marketplaceServicesEndpoint: String
2748
+ sellerOrderId: String
2749
+ origin: String
2750
+ affiliateId: String
2751
+ salesChannel: String
2752
+ merchantName: String
2753
+ status: String
2754
+ workflowIsInError: Boolean
2755
+ statusDescription: String
2756
+ value: Float
2757
+ creationDate: String
2758
+ lastChange: String
2759
+ orderGroup: String
2760
+ giftRegistryData: String
2761
+ marketingData: String
2762
+ callCenterOperatorData: String
2763
+ followUpEmail: String
2764
+ lastMessage: String
2765
+ hostname: String
2766
+ invoiceData: String
2767
+ changesAttachment: String
2768
+ openTextField: String
2769
+ roundingError: Int
2770
+ orderFormId: String
2771
+ commercialConditionData: String
2772
+ isCompleted: Boolean
2773
+ allowCancellation: Boolean
2774
+ allowEdition: Boolean
2775
+ isCheckedIn: Boolean
2776
+ authorizedDate: String
2777
+ invoicedDate: String
2778
+ cancelReason: String
2779
+ subscriptionData: String
2780
+ taxData: String
2781
+ checkedInPickupPointId: String
2782
+ cancellationData: UserOrderCancellationData
2783
+ cancellationRequests: [UserOrderCancellationRequest]
2784
+ customData: UserOrderCustomData
2785
+ clientPreferencesData: UserOrderClientPreferencesData
2786
+ itemMetadata: UserOrderItemMetadata
2787
+ marketplace: UserOrderMarketplace
2788
+ storePreferencesData: UserOrderStorePreferencesData
2789
+ sellers: [UserOrderStoreSellers]
2790
+ packageAttachment: UserOrderPackageAttachment
2791
+ paymentData: UserOrderPaymentData
2792
+ shippingData: UserOrderShippingData
2793
+ ratesAndBenefitsData: UserOrderRatesAndBenefitsData
2794
+ clientProfileData: UserOrderClientProfileData
2795
+ marketplaceItems: [UserOrderItems]
2796
+ items: [UserOrderItems]
2797
+ totals: [UserOrderTotals]
2798
+ deliveryOptionsData: UserOrderDeliveryOptionsData
2799
+ customFields: [UserOrderCustomFieldsGrouped]
2800
+ canProcessOrderAuthorization: Boolean
2801
+ ruleForAuthorization: ProcessOrderAuthorizationRule
2802
+ purchaseAgentData: UserOrderPurchaseAgentData
2803
+ }
2804
+
2805
+ type UserOrderPurchaseAgentData {
2806
+ purchaseAgents: [UserOrderPurchaseAgent]
2807
+ }
2808
+
2809
+ type UserOrderPurchaseAgent {
2810
+ userId: String
2811
+ versionId: String
2812
+ persona: String
2813
+ unitId: String
2814
+ }
2815
+
2816
+ type UserOrderResult {
2817
+ orderId: String
2818
+ creationDate: String
2819
+ status: String
2820
+ canProcessOrderAuthorization: Boolean
2821
+ statusDescription: String
2822
+ allowCancellation: Boolean
2823
+ storePreferencesData: UserOrderStorePreferencesData
2824
+ clientProfileData: UserOrderClientProfileData
2825
+ customData: UserOrderCustomData
2826
+ customFields: [UserOrderCustomFieldsGrouped]
2827
+ deliveryOptionsData: UserOrderDeliveryOptionsData
2828
+ paymentData: UserOrderPaymentData
2829
+ totals: [UserOrderTotals]
2830
+ shippingData: UserOrderShippingData
2831
+ items: [UserOrderItems]
2832
+ ruleForAuthorization: ProcessOrderAuthorizationRule
2833
+ shopper: UserOrderShopper
2834
+ }
2835
+
2836
+ type UserOrderShopper {
2837
+ firstName: String
2838
+ lastName: String
2839
+ email: String
2840
+ phone: String
2841
+ }
2842
+
2843
+ type UserOrderListResult {
2844
+ list: [UserOrderFromList!]
2845
+ paging: UserOrderListPaging
2846
+ stats: UserOrderListStats
2847
+ facets: [String]
2848
+ reportRecordsLimit: Int
2849
+ }
2850
+
2851
+ type UserOrderListPaging {
2852
+ total: Int
2853
+ pages: Int
2854
+ currentPage: Int
2855
+ perPage: Int
2856
+ }
2857
+
2858
+ type UserOrderListStats {
2859
+ stats: UserOrderListStatsData
2860
+ }
2861
+
2862
+ type UserOrderListStatsData {
2863
+ totalValue: UserOrderListStatsValue
2864
+ totalItems: UserOrderListStatsValue
2865
+ }
2866
+
2867
+ type UserOrderListStatsValue {
2868
+ Count: Int
2869
+ Max: Float
2870
+ Mean: Float
2871
+ Min: Float
2872
+ Missing: Int
2873
+ StdDev: Float
2874
+ Sum: Float
2875
+ SumOfSquares: Float
2876
+ Facets: JSONObject
2877
+ }
2878
+
2879
+ type UserOrderFromList {
2880
+ orderId: String
2881
+ creationDate: String
2882
+ clientName: String
2883
+ items: [UserOrderItemsSummarized]
2884
+ totalValue: Float
2885
+ paymentNames: String
2886
+ status: String
2887
+ statusDescription: String
2888
+ marketPlaceOrderId: String
2889
+ sequence: String
2890
+ salesChannel: String
2891
+ affiliateId: String
2892
+ origin: String
2893
+ workflowInErrorState: Boolean
2894
+ workflowInRetry: Boolean
2895
+ lastMessageUnread: String
2896
+ ShippingEstimatedDate: String
2897
+ ShippingEstimatedDateMax: String
2898
+ ShippingEstimatedDateMin: String
2899
+ orderIsComplete: Boolean
2900
+ listId: String
2901
+ listType: String
2902
+ authorizedDate: String
2903
+ callCenterOperatorName: String
2904
+ totalItems: Int
2905
+ currencyCode: String
2906
+ hostname: String
2907
+ invoiceOutput: [String]
2908
+ invoiceInput: [String]
2909
+ lastChange: String
2910
+ isAllDelivered: Boolean
2911
+ isAnyDelivered: Boolean
2912
+ giftCardProviders: [String]
2913
+ orderFormId: String
2914
+ paymentApprovedDate: String
2915
+ readyForHandlingDate: String
2916
+ deliveryDates: [String]
2917
+ customFields: [UserOrderFromListCustomFields]
2918
+ }
2919
+
2920
+ type UserOrderCustomData {
2921
+ customApps: [UserOrderCustomApp]
2922
+ customFields: [UserOrderCustomField]
2923
+ }
2924
+
2925
+ type UserOrderCustomApp {
2926
+ fields: UserOrderFields
2927
+ id: String
2928
+ major: Int
2929
+ }
2930
+
2931
+ type UserOrderFields {
2932
+ cartEtag: String
2933
+ }
2934
+
2935
+ type UserOrderStoreSellers {
2936
+ id: String
2937
+ name: String
2938
+ logo: String
2939
+ fulfillmentEndpoint: String
2940
+ }
2941
+
2942
+ type UserOrderClientPreferencesData {
2943
+ locale: String
2944
+ optinNewsLetter: Boolean
2945
+ }
2946
+
2947
+ type UserOrderItemMetadata {
2948
+ Items: [UserOrderItemMetadataItem]
2949
+ }
2950
+
2951
+ type UserOrderItemMetadataItem {
2952
+ Id: String
2953
+ Seller: String
2954
+ Name: String
2955
+ SkuName: String
2956
+ ProductId: String
2957
+ RefId: String
2958
+ Ean: String
2959
+ ImageUrl: String
2960
+ DetailUrl: String
2961
+ AssemblyOptions: [UserOrderAssemblyOptions]
2962
+ }
2963
+
2964
+ type UserOrderAssemblyOptions {
2965
+ Id: String
2966
+ Name: String
2967
+ Required: Boolean
2968
+ }
2969
+
2970
+ type UserOrderOfferings {
2971
+ type: String
2972
+ id: String
2973
+ name: String
2974
+ price: Float
2975
+ }
2976
+
2977
+ type UserOrderMarketplace {
2978
+ baseURL: String
2979
+ isCertified: String
2980
+ name: String
2981
+ }
2982
+
2983
+ type UserOrderCurrencyFormatInfo {
2984
+ CurrencyDecimalDigits: Int
2985
+ CurrencyDecimalSeparator: String
2986
+ CurrencyGroupSeparator: String
2987
+ CurrencyGroupSize: Int
2988
+ StartsWithCurrencySymbol: Boolean
2989
+ }
2990
+
2991
+ type UserOrderStorePreferencesData {
2992
+ countryCode: String
2993
+ currencyCode: String
2994
+ currencyLocale: Int
2995
+ currencySymbol: String
2996
+ timeZone: String
2997
+ currencyFormatInfo: UserOrderCurrencyFormatInfo
2998
+ }
2999
+
3000
+ type UserOrderPackageAttachment {
3001
+ packages: [UserOrderPackage]
3002
+ }
3003
+
3004
+ type UserOrderPackage {
3005
+ courier: String
3006
+ courierStatus: UserOrderCourierStatus
3007
+ invoiceNumber: String!
3008
+ invoiceUrl: String
3009
+ invoiceValue: Float!
3010
+ extraValue: Float
3011
+ issuanceDate: String
3012
+ items: [UserOrderPackageItem!]
3013
+ trackingNumber: String
3014
+ trackingUrl: String
3015
+ invoiceKey: String
3016
+ type: UserOrderInvoiceType
3017
+ restitutions: UserOrderRestitutions
3018
+ }
3019
+
3020
+ type UserOrderCourierStatus {
3021
+ data: [UserOrderTrackingInformation!]
3022
+ finished: Boolean
3023
+ status: String
3024
+ }
3025
+
3026
+ type UserOrderTrackingInformation {
3027
+ city: String
3028
+ description: String
3029
+ lastChange: String
3030
+ state: String
3031
+ }
3032
+
3033
+ enum UserOrderInvoiceType {
3034
+ Input
3035
+ Output
3036
+ }
3037
+
3038
+ type UserOrderPackageItem {
3039
+ description: String
3040
+ itemIndex: Int
3041
+ price: Int
3042
+ quantity: Int
3043
+ }
3044
+
3045
+ type UserOrderRestitutions {
3046
+ Refund: UserOrderRestitutionOption
3047
+ GiftCard: UserOrderRestitutionOption
3048
+ }
3049
+
3050
+ type UserOrderRestitutionOption {
3051
+ value: Float
3052
+ items: [UserOrderRestitutionItem!]
3053
+ }
3054
+
3055
+ type UserOrderRestitutionItem {
3056
+ useFreight: Boolean
3057
+ isCompensation: Boolean
3058
+ compensationValue: Float
3059
+ itemIndex: Int
3060
+ id: ID
3061
+ quantity: Int
3062
+ price: Float
3063
+ description: String
3064
+ unitMultiplier: Float
3065
+ }
3066
+
3067
+ type UserOrderPaymentConnectorResponses {
3068
+ Tid: String
3069
+ ReturnCode: String
3070
+ Message: String
3071
+ authId: String
3072
+ }
3073
+
3074
+ type UserOrderPayments {
3075
+ id: String
3076
+ paymentSystem: String
3077
+ paymentSystemName: String
3078
+ value: Int
3079
+ installments: Int
3080
+ referenceValue: Int
3081
+ cardHolder: String
3082
+ cardNumber: String
3083
+ firstDigits: String
3084
+ lastDigits: String
3085
+ cvv2: String
3086
+ expireMonth: String
3087
+ expireYear: String
3088
+ url: String
3089
+ giftCardId: String
3090
+ giftCardName: String
3091
+ giftCardCaption: String
3092
+ redemptionCode: String
3093
+ group: String
3094
+ tid: String
3095
+ dueDate: String
3096
+ connectorResponses: UserOrderPaymentConnectorResponses
3097
+ giftCardProvider: String
3098
+ giftCardAsDiscount: String
3099
+ koinUrl: String
3100
+ accountId: String
3101
+ parentAccountId: String
3102
+ bankIssuedInvoiceIdentificationNumber: String
3103
+ bankIssuedInvoiceIdentificationNumberFormatted: String
3104
+ bankIssuedInvoiceBarCodeNumber: String
3105
+ bankIssuedInvoiceBarCodeType: String
3106
+ billingAddress: String
3107
+ paymentOrigin: String
3108
+ }
3109
+
3110
+ type UserOrderTransactions {
3111
+ isActive: Boolean
3112
+ transactionId: String
3113
+ merchantName: String
3114
+ payments: [UserOrderPayments]
3115
+ }
3116
+
3117
+ type UserOrderPaymentData {
3118
+ transactions: [UserOrderTransactions]
3119
+ giftCards: [String]
3120
+ }
3121
+
3122
+ type UserOrderPickupStoreInfo {
3123
+ additionalInfo: String
3124
+ address: UserOrderAddress
3125
+ dockId: String
3126
+ friendlyName: String
3127
+ isPickupStore: Boolean
3128
+ }
3129
+
3130
+ type UserOrderDeliveryChannels {
3131
+ id: String
3132
+ stockBalance: Int
3133
+ }
3134
+
3135
+ type UserOrderDeliveryIds {
3136
+ courierId: String
3137
+ courierName: String
3138
+ dockId: String
3139
+ quantity: Int
3140
+ warehouseId: String
3141
+ accountCarrierName: String
3142
+ kitItemDetails: [String]
3143
+ }
3144
+ type UserOrderDeliveryWindow {
3145
+ startDateUtc: String
3146
+ endDateUtc: String
3147
+ price: Float
3148
+ }
3149
+
3150
+ type UserOrderSlas {
3151
+ id: String
3152
+ name: String
3153
+ shippingEstimate: String
3154
+ shippingEstimateDate: String
3155
+ deliveryWindow: UserOrderDeliveryWindow
3156
+ listPrice: Float
3157
+ price: Float
3158
+ deliveryChannel: String
3159
+ polygonName: String
3160
+ lockTTL: String
3161
+ pickupPointId: String
3162
+ transitTime: String
3163
+ pickupDistance: Int
3164
+ pickupStoreInfo: UserOrderPickupStoreInfo
3165
+ deliveryIds: [UserOrderDeliveryIds]
3166
+ availableDeliveryWindows: [UserOrderDeliveryWindow]
3167
+ }
3168
+
3169
+ type UserOrderLogisticsInfo {
3170
+ itemIndex: Int
3171
+ itemId: String
3172
+ selectedDeliveryChannel: String
3173
+ selectedSla: String
3174
+ lockTTL: String
3175
+ price: Float
3176
+ listPrice: Float
3177
+ sellingPrice: Float
3178
+ deliveryWindow: UserOrderDeliveryWindow
3179
+ deliveryCompany: String
3180
+ shippingEstimate: String
3181
+ shippingEstimateDate: String
3182
+ deliveryChannel: String
3183
+ addressId: String
3184
+ versionId: String
3185
+ entityId: String
3186
+ polygonName: String
3187
+ pickupPointId: String
3188
+ transitTime: String
3189
+ pickupStoreInfo: UserOrderPickupStoreInfo
3190
+ deliveryChannels: [UserOrderDeliveryChannels]
3191
+ deliveryIds: [UserOrderDeliveryIds]
3192
+ shipsTo: [String]
3193
+ slas: [UserOrderSlas]
3194
+ }
3195
+
3196
+ type UserOrderAddress {
3197
+ addressType: String
3198
+ receiverName: String
3199
+ addressId: String
3200
+ versionId: String
3201
+ entityId: String
3202
+ postalCode: String
3203
+ city: String
3204
+ state: String
3205
+ country: String
3206
+ street: String
3207
+ number: String
3208
+ neighborhood: String
3209
+ complement: String
3210
+ reference: String
3211
+ geoCoordinates: [Float]
3212
+ }
3213
+
3214
+ type UserOrderShippingData {
3215
+ id: String
3216
+ trackingHints: String
3217
+ contactInformation: [UserOrderContactInformation]
3218
+ availableAddresses: [UserOrderAddress]
3219
+ selectedAddresses: [UserOrderAddress]
3220
+ logisticsInfo: [UserOrderLogisticsInfo]
3221
+ address: UserOrderAddress
3222
+ }
3223
+
3224
+ type UserOrderRatesAndBenefitsData {
3225
+ id: String
3226
+ rateAndBenefitsIdentifiers: [UserOrderRateAndBenefitsIdentifier]
3227
+ }
3228
+
3229
+ type UserOrderRateAndBenefitsIdentifier {
3230
+ id: ID
3231
+ additionalInfo: String
3232
+ description: String
3233
+ featured: Boolean
3234
+ name: String
3235
+ }
3236
+
3237
+ type UserOrderClientProfileData {
3238
+ id: String
3239
+ email: String
3240
+ firstName: String
3241
+ lastName: String
3242
+ documentType: String
3243
+ document: String
3244
+ phone: String
3245
+ corporateName: String
3246
+ tradeName: String
3247
+ corporateDocument: String
3248
+ stateInscription: String
3249
+ corporatePhone: String
3250
+ isCorporate: Boolean
3251
+ userProfileId: String
3252
+ userProfileVersion: String
3253
+ customerClass: String
3254
+ customerCode: String
3255
+ }
3256
+
3257
+ type UserOrderSellingPrices {
3258
+ value: Float
3259
+ quantity: Int
3260
+ }
3261
+
3262
+ type UserOrderPriceDefinition {
3263
+ calculatedSellingPrice: Float
3264
+ total: Float
3265
+ reason: String
3266
+ sellingPrices: [UserOrderSellingPrices]
3267
+ }
3268
+
3269
+ type UserOrderDimension {
3270
+ cubicweight: Float
3271
+ height: Int
3272
+ length: Int
3273
+ weight: Int
3274
+ width: Int
3275
+ }
3276
+
3277
+ type UserOrderCategories {
3278
+ id: Int
3279
+ name: String
3280
+ }
3281
+
3282
+ type UserOrderAdditionalInfo {
3283
+ brandName: String
3284
+ brandId: String
3285
+ categoriesIds: String
3286
+ productClusterId: String
3287
+ commercialConditionId: String
3288
+ offeringInfo: String
3289
+ offeringType: String
3290
+ offeringTypeId: String
3291
+ dimension: UserOrderDimension
3292
+ categories: [UserOrderCategories]
3293
+ }
3294
+
3295
+ type UserOrderAttachmentOfferings {
3296
+ name: String
3297
+ required: Boolean
3298
+ }
3299
+
3300
+ type UserOrderItemAttachment {
3301
+ name: String
3302
+ }
3303
+
3304
+ type UserOrderItems {
3305
+ uniqueId: String
3306
+ id: String
3307
+ productId: String
3308
+ ean: String
3309
+ lockId: String
3310
+ quantity: Int
3311
+ seller: String
3312
+ name: String
3313
+ refId: String
3314
+ price: Float
3315
+ listPrice: Float
3316
+ manualPrice: String
3317
+ manualPriceAppliedBy: String
3318
+ imageUrl: String
3319
+ detailUrl: String
3320
+ sellerSku: String
3321
+ priceValidUntil: String
3322
+ commission: Float
3323
+ tax: Float
3324
+ preSaleDate: String
3325
+ measurementUnit: String
3326
+ unitMultiplier: Float
3327
+ sellingPrice: Float
3328
+ isGift: Boolean
3329
+ shippingPrice: String
3330
+ rewardValue: Float
3331
+ freightCommission: Float
3332
+ taxCode: String
3333
+ parentItemIndex: String
3334
+ parentAssemblyBinding: String
3335
+ callCenterOperator: String
3336
+ serialNumbers: String
3337
+ costPrice: Float
3338
+ assemblies: [String]
3339
+ priceDefinition: UserOrderPriceDefinition
3340
+ additionalInfo: UserOrderAdditionalInfo
3341
+ attachmentOfferings: [UserOrderAttachmentOfferings]
3342
+ offerings: [UserOrderOfferings]
3343
+ params: [String]
3344
+ bundleItems: [UserOrderItems]
3345
+ components: [UserOrderItems]
3346
+ priceTags: [UserOrderPriceTag]
3347
+ attachments: [UserOrderAttachments]
3348
+ itemAttachment: UserOrderItemAttachment
3349
+ }
3350
+
3351
+ type UserOrderItemsSummarized {
3352
+ seller: String
3353
+ quantity: Int
3354
+ description: String
3355
+ ean: String
3356
+ refId: String
3357
+ id: String
3358
+ productId: String
3359
+ sellingPrice: Float
3360
+ price: Float
3361
+ }
3362
+
3363
+ type UserOrderAttachments {
3364
+ name: String
3365
+ content: JSONObject
3366
+ }
3367
+
3368
+ type UserOrderPriceTag {
3369
+ name: String!
3370
+ value: Float
3371
+ rawValue: Float!
3372
+ rate: Float
3373
+ jurisCode: String
3374
+ jurisType: String
3375
+ jurisName: String
3376
+ isPercentual: Boolean
3377
+ identifier: String
3378
+ owner: String
3379
+ }
3380
+
3381
+ type UserOrderTotals {
3382
+ id: String
3383
+ name: String
3384
+ value: Float
3385
+ }
3386
+
3387
+ type UserOrderContactInformation {
3388
+ id: ID!
3389
+ email: String
3390
+ firstName: String
3391
+ lastName: String
3392
+ document: String
3393
+ documentType: String
3394
+ phone: String
3395
+ }
3396
+
3397
+ type UserOrderDeliveryOptionsData {
3398
+ deliveryOptions: [UserOrderDeliveryOption]
3399
+ contact: UserOrderDeliveryOptionsContact
3400
+ }
3401
+
3402
+ type UserOrderDeliveryOption {
3403
+ selectedSla: String
3404
+ deliveryChannel: String
3405
+ deliveryCompany: String
3406
+ deliveryWindow: UserOrderDeliveryWindow
3407
+ shippingEstimate: String
3408
+ shippingEstimateDate: String
3409
+ friendlyShippingEstimate: String
3410
+ friendlyDeliveryOptionName: String
3411
+ seller: String
3412
+ address: UserOrderAddress
3413
+ pickupStoreInfo: UserOrderPickupStoreInfo
3414
+ quantityOfDifferentItems: Int
3415
+ total: Int
3416
+ items: [UserOrderDeliveryOptionsItems]
3417
+ }
3418
+
3419
+ type UserOrderDeliveryOptionsItems {
3420
+ id: String
3421
+ uniqueId: String
3422
+ name: String
3423
+ quantity: Int
3424
+ price: Float
3425
+ imageUrl: String
3426
+ tax: Float
3427
+ total: Float
3428
+ }
3429
+
3430
+ type UserOrderDeliveryOptionsContact {
3431
+ name: String
3432
+ email: String
3433
+ phone: String
3434
+ }
3435
+
3436
+ type UserOrderCancel {
3437
+ data: String
3438
+ }
3439
+
3440
+ """
3441
+ Input to the cancel order API.
3442
+ """
3443
+ input IUserOrderCancel {
3444
+ """
3445
+ Person's name.
3446
+ """
3447
+ orderId: String!
3448
+ """
3449
+ Customer's email.
3450
+ """
3451
+ customerEmail: String
3452
+ """
3453
+ Reason.
3454
+ """
3455
+ reason: String
3456
+ }
3457
+
3458
+ type UserOrderCancellationData {
3459
+ RequestedByUser: Boolean
3460
+ RequestedBySystem: Boolean
3461
+ RequestedBySellerNotification: Boolean
3462
+ RequestedByPaymentNotification: Boolean
3463
+ Reason: String
3464
+ CancellationDate: String
3465
+ }
3466
+
3467
+ type UserOrderCancellationRequest {
3468
+ id: String
3469
+ reason: String
3470
+ cancellationRequestDate: String
3471
+ requestedByUser: Boolean
3472
+ deniedBySeller: Boolean
3473
+ deniedBySellerReason: String
3474
+ cancellationRequestDenyDate: String
3475
+ }
3476
+
3477
+ type UserOrderCustomField {
3478
+ linkedEntity: UserOrderCustomFieldLinkedEntity!
3479
+ fields: [UserOrderCustomFieldField!]!
3480
+ }
3481
+
3482
+ type UserOrderCustomFieldLinkedEntity {
3483
+ type: String!
3484
+ id: String
3485
+ }
3486
+
3487
+ type UserOrderCustomFieldField {
3488
+ name: String!
3489
+ value: String!
3490
+ refId: String
3491
+ }
3492
+
3493
+ type UserOrderCustomFieldsGrouped {
3494
+ type: String!
3495
+ id: String
3496
+ fields: [UserOrderCustomFieldField]
3497
+ }
3498
+
3499
+ type UserOrderFromListCustomFields {
3500
+ type: String
3501
+ value: [String]
3502
+ }
3503
+
3504
+ type UserOrderListMinimalResult {
3505
+ list: [UserOrderFromListMinimal]
3506
+ paging: UserOrderListPaging
3507
+ }
3508
+
3509
+ type UserOrderFromListMinimal {
3510
+ orderId: String
3511
+ creationDate: String
3512
+ clientName: String
3513
+ items: [UserOrderItemsSummarized]
3514
+ totalValue: Float
3515
+ status: String
3516
+ statusDescription: String
3517
+ ShippingEstimatedDate: String
3518
+ customFields: [UserOrderFromListCustomFields]
3519
+ currencyCode: String
3520
+ }
3521
+ `,ci=Object.assign({"./address.graphql":Pr,"./advertisement.graphql":kr,"./aggregateOffer.graphql":_r,"./aggregateRating.graphql":Ur,"./author.graphql":Er,"./brand.graphql":Nr,"./breadcrumb.graphql":Tr,"./cart.graphql":Fr,"./collection.graphql":Rr,"./deliveryPromisesBadge.graphql":Lr,"./facet.graphql":Mr,"./image.graphql":Br,"./mutation.graphql":zr,"./newsletter.graphql":$r,"./objectOrString.graphql":Vr,"./offer.graphql":qr,"./order.graphql":xr,"./orderCommercialAuthorizaton.graphql":Wr,"./organization.graphql":jr,"./pageInfo.graphql":Gr,"./password.graphql":Hr,"./person.graphql":Xr,"./pickupPoints.graphql":Yr,"./product.graphql":Jr,"./productGroup.graphql":Kr,"./profile.graphql":Qr,"./propertyValue.graphql":Zr,"./query.graphql":ni,"./review.graphql":ei,"./seo.graphql":ti,"./session.graphql":ri,"./shipping.graphql":ii,"./skuVariants.graphql":oi,"./status.graphql":ai,"./userOrder.graphql":si}),li=Q.print(Object.values(ci).map(n=>Q.parse(n)).reduce((n,e)=>zn.mergeTypeDefs([n,e],{sort:!0}))),Ie=li,di=n=>e=>(e.storage={channel:Z.parse(n.channel),flags:n.flags??{},locale:n.locale,cookies:new Map},e.clients=Xe(n,e),e.loaders=it(n,e),e.account=n.account,e);function ui(n){const t=Jn([Yn,Xn])(Ar(),Ie);return n&&Q.isSchema(n)?$n.mergeSchemas({schemas:[t,n]}):t}exports.AuthDirective=Xn;exports.BadRequestError=B;exports.CacheControlDirective=Yn;exports.CommercialAuthorizationStatus=qn;exports.FastStoreError=W;exports.ForbiddenError=X;exports.GraphqlVtexContextFactory=di;exports.GraphqlVtexSchema=ui;exports.NotFoundError=L;exports.StoreCollectionType=xn;exports.StoreFacetType=Wn;exports.StoreSort=jn;exports.StoreStatus=Gn;exports.UnauthorizedError=H;exports.UserOrderInvoiceType=Hn;exports.isBadRequestError=Te;exports.isFastStoreError=Ne;exports.isForbiddenError=Kn;exports.isNotFoundError=Qn;exports.isUnauthorizedError=Fe;exports.stringifyCacheControl=ke;exports.typeDefs=Ie;exports.withDirectives=Jn;