@shopify/hydrogen 0.1.0

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 (454) hide show
  1. package/README.md +29 -0
  2. package/client.d.ts +1 -0
  3. package/client.js +1 -0
  4. package/dist/esnext/client.d.ts +7 -0
  5. package/dist/esnext/client.js +7 -0
  6. package/dist/esnext/components/AddToCartButton/AddToCartButton.client.d.ts +15 -0
  7. package/dist/esnext/components/AddToCartButton/AddToCartButton.client.js +44 -0
  8. package/dist/esnext/components/AddToCartButton/index.d.ts +1 -0
  9. package/dist/esnext/components/AddToCartButton/index.js +1 -0
  10. package/dist/esnext/components/BuyNowButton/BuyNowButton.d.ts +12 -0
  11. package/dist/esnext/components/BuyNowButton/BuyNowButton.js +29 -0
  12. package/dist/esnext/components/BuyNowButton/index.d.ts +1 -0
  13. package/dist/esnext/components/BuyNowButton/index.js +1 -0
  14. package/dist/esnext/components/CartCheckoutButton/CartCheckoutButton.client.d.ts +7 -0
  15. package/dist/esnext/components/CartCheckoutButton/CartCheckoutButton.client.js +14 -0
  16. package/dist/esnext/components/CartCheckoutButton/index.d.ts +1 -0
  17. package/dist/esnext/components/CartCheckoutButton/index.js +1 -0
  18. package/dist/esnext/components/CartContainer/CartContainer.client.d.ts +9 -0
  19. package/dist/esnext/components/CartContainer/CartContainer.client.js +24 -0
  20. package/dist/esnext/components/CartContainer/index.d.ts +1 -0
  21. package/dist/esnext/components/CartContainer/index.js +1 -0
  22. package/dist/esnext/components/CartLineAttributes/CartLineAttributes.client.d.ts +10 -0
  23. package/dist/esnext/components/CartLineAttributes/CartLineAttributes.client.js +9 -0
  24. package/dist/esnext/components/CartLineAttributes/index.d.ts +1 -0
  25. package/dist/esnext/components/CartLineAttributes/index.js +1 -0
  26. package/dist/esnext/components/CartLineImage/CartLineImage.client.d.ts +6 -0
  27. package/dist/esnext/components/CartLineImage/CartLineImage.client.js +8 -0
  28. package/dist/esnext/components/CartLineImage/index.d.ts +1 -0
  29. package/dist/esnext/components/CartLineImage/index.js +1 -0
  30. package/dist/esnext/components/CartLinePrice/CartLinePrice.client.d.ts +6 -0
  31. package/dist/esnext/components/CartLinePrice/CartLinePrice.client.js +17 -0
  32. package/dist/esnext/components/CartLinePrice/index.d.ts +1 -0
  33. package/dist/esnext/components/CartLinePrice/index.js +1 -0
  34. package/dist/esnext/components/CartLineProductTitle/CartLineProductTitle.client.d.ts +3 -0
  35. package/dist/esnext/components/CartLineProductTitle/CartLineProductTitle.client.js +8 -0
  36. package/dist/esnext/components/CartLineProductTitle/index.d.ts +1 -0
  37. package/dist/esnext/components/CartLineProductTitle/index.js +1 -0
  38. package/dist/esnext/components/CartLineProvider/CartLineProvider.client.d.ts +6 -0
  39. package/dist/esnext/components/CartLineProvider/CartLineProvider.client.js +5 -0
  40. package/dist/esnext/components/CartLineProvider/context.d.ts +26 -0
  41. package/dist/esnext/components/CartLineProvider/context.js +2 -0
  42. package/dist/esnext/components/CartLineProvider/hooks.d.ts +26 -0
  43. package/dist/esnext/components/CartLineProvider/hooks.js +9 -0
  44. package/dist/esnext/components/CartLineProvider/index.d.ts +2 -0
  45. package/dist/esnext/components/CartLineProvider/index.js +2 -0
  46. package/dist/esnext/components/CartLineQuantity/CartLineQuantity.client.d.ts +3 -0
  47. package/dist/esnext/components/CartLineQuantity/CartLineQuantity.client.js +8 -0
  48. package/dist/esnext/components/CartLineQuantity/index.d.ts +1 -0
  49. package/dist/esnext/components/CartLineQuantity/index.js +1 -0
  50. package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.d.ts +8 -0
  51. package/dist/esnext/components/CartLineQuantityAdjustButton/CartLineQuantityAdjustButton.js +17 -0
  52. package/dist/esnext/components/CartLineQuantityAdjustButton/index.d.ts +1 -0
  53. package/dist/esnext/components/CartLineQuantityAdjustButton/index.js +1 -0
  54. package/dist/esnext/components/CartLineSelectedOptions/CartLineSelectedOptions.client.d.ts +10 -0
  55. package/dist/esnext/components/CartLineSelectedOptions/CartLineSelectedOptions.client.js +9 -0
  56. package/dist/esnext/components/CartLineSelectedOptions/index.d.ts +1 -0
  57. package/dist/esnext/components/CartLineSelectedOptions/index.js +1 -0
  58. package/dist/esnext/components/CartLines/CartLines.d.ts +7 -0
  59. package/dist/esnext/components/CartLines/CartLines.js +15 -0
  60. package/dist/esnext/components/CartLines/index.d.ts +1 -0
  61. package/dist/esnext/components/CartLines/index.js +1 -0
  62. package/dist/esnext/components/CartProvider/CartProvider.client.d.ts +7 -0
  63. package/dist/esnext/components/CartProvider/CartProvider.client.js +422 -0
  64. package/dist/esnext/components/CartProvider/CartServerProvider.server.d.ts +11 -0
  65. package/dist/esnext/components/CartProvider/CartServerProvider.server.js +20 -0
  66. package/dist/esnext/components/CartProvider/constants.d.ts +2 -0
  67. package/dist/esnext/components/CartProvider/constants.js +2 -0
  68. package/dist/esnext/components/CartProvider/context.d.ts +2 -0
  69. package/dist/esnext/components/CartProvider/context.js +2 -0
  70. package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.d.ts +18 -0
  71. package/dist/esnext/components/CartProvider/graphql/CartAttributesUpdateMutation.js +1 -0
  72. package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.d.ts +18 -0
  73. package/dist/esnext/components/CartProvider/graphql/CartBuyerIdentityUpdateMutation.js +1 -0
  74. package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.d.ts +17 -0
  75. package/dist/esnext/components/CartProvider/graphql/CartCreateMutation.js +1 -0
  76. package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.d.ts +18 -0
  77. package/dist/esnext/components/CartProvider/graphql/CartDiscountCodesUpdateMutation.js +1 -0
  78. package/dist/esnext/components/CartProvider/graphql/CartFragment.d.ts +68 -0
  79. package/dist/esnext/components/CartProvider/graphql/CartFragment.js +1 -0
  80. package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.d.ts +18 -0
  81. package/dist/esnext/components/CartProvider/graphql/CartLineAddMutation.js +1 -0
  82. package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.d.ts +18 -0
  83. package/dist/esnext/components/CartProvider/graphql/CartLineRemoveMutation.js +1 -0
  84. package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.d.ts +18 -0
  85. package/dist/esnext/components/CartProvider/graphql/CartLineUpdateMutation.js +1 -0
  86. package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.d.ts +18 -0
  87. package/dist/esnext/components/CartProvider/graphql/CartNoteUpdateMutation.js +1 -0
  88. package/dist/esnext/components/CartProvider/graphql/CartQuery.d.ts +13 -0
  89. package/dist/esnext/components/CartProvider/graphql/CartQuery.js +1 -0
  90. package/dist/esnext/components/CartProvider/hooks.d.ts +18 -0
  91. package/dist/esnext/components/CartProvider/hooks.js +79 -0
  92. package/dist/esnext/components/CartProvider/index.d.ts +4 -0
  93. package/dist/esnext/components/CartProvider/index.js +4 -0
  94. package/dist/esnext/components/CartProvider/types.d.ts +105 -0
  95. package/dist/esnext/components/CartProvider/types.js +1 -0
  96. package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.d.ts +2 -0
  97. package/dist/esnext/components/CartShopPayButton/CartShopPayButton.client.js +10 -0
  98. package/dist/esnext/components/CartShopPayButton/index.d.ts +1 -0
  99. package/dist/esnext/components/CartShopPayButton/index.js +1 -0
  100. package/dist/esnext/components/CartToggle/CartToggle.client.d.ts +8 -0
  101. package/dist/esnext/components/CartToggle/CartToggle.client.js +11 -0
  102. package/dist/esnext/components/CartToggle/index.d.ts +1 -0
  103. package/dist/esnext/components/CartToggle/index.js +1 -0
  104. package/dist/esnext/components/CartTotal/CartTotal.client.d.ts +3 -0
  105. package/dist/esnext/components/CartTotal/CartTotal.client.js +8 -0
  106. package/dist/esnext/components/CartTotal/index.d.ts +1 -0
  107. package/dist/esnext/components/CartTotal/index.js +1 -0
  108. package/dist/esnext/components/CartUIProvider/CartUIProvider.client.d.ts +5 -0
  109. package/dist/esnext/components/CartUIProvider/CartUIProvider.client.js +26 -0
  110. package/dist/esnext/components/CartUIProvider/context.d.ts +9 -0
  111. package/dist/esnext/components/CartUIProvider/context.js +2 -0
  112. package/dist/esnext/components/CartUIProvider/hooks.d.ts +1 -0
  113. package/dist/esnext/components/CartUIProvider/hooks.js +9 -0
  114. package/dist/esnext/components/CartUIProvider/index.d.ts +2 -0
  115. package/dist/esnext/components/CartUIProvider/index.js +2 -0
  116. package/dist/esnext/components/ExternalVideo/ExternalVideo.d.ts +14 -0
  117. package/dist/esnext/components/ExternalVideo/ExternalVideo.js +9 -0
  118. package/dist/esnext/components/ExternalVideo/ExternalVideoFragment.d.ts +4 -0
  119. package/dist/esnext/components/ExternalVideo/ExternalVideoFragment.js +1 -0
  120. package/dist/esnext/components/ExternalVideo/index.d.ts +1 -0
  121. package/dist/esnext/components/ExternalVideo/index.js +1 -0
  122. package/dist/esnext/components/Image/Image.d.ts +14 -0
  123. package/dist/esnext/components/Image/Image.js +10 -0
  124. package/dist/esnext/components/Image/ImageFragment.d.ts +4 -0
  125. package/dist/esnext/components/Image/ImageFragment.js +1 -0
  126. package/dist/esnext/components/Image/index.d.ts +1 -0
  127. package/dist/esnext/components/Image/index.js +1 -0
  128. package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.d.ts +6 -0
  129. package/dist/esnext/components/LocalizationProvider/LocalizationClientProvider.client.js +14 -0
  130. package/dist/esnext/components/LocalizationProvider/LocalizationContext.client.d.ts +8 -0
  131. package/dist/esnext/components/LocalizationProvider/LocalizationContext.client.js +2 -0
  132. package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.d.ts +4 -0
  133. package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +8 -0
  134. package/dist/esnext/components/LocalizationProvider/LocalizationQuery.d.ts +18 -0
  135. package/dist/esnext/components/LocalizationProvider/LocalizationQuery.js +1 -0
  136. package/dist/esnext/components/LocalizationProvider/hooks.d.ts +8 -0
  137. package/dist/esnext/components/LocalizationProvider/hooks.js +17 -0
  138. package/dist/esnext/components/LocalizationProvider/index.d.ts +2 -0
  139. package/dist/esnext/components/LocalizationProvider/index.js +2 -0
  140. package/dist/esnext/components/MediaFile/MediaFile.d.ts +19 -0
  141. package/dist/esnext/components/MediaFile/MediaFile.js +22 -0
  142. package/dist/esnext/components/MediaFile/MediaFileFragment.d.ts +22 -0
  143. package/dist/esnext/components/MediaFile/MediaFileFragment.js +1 -0
  144. package/dist/esnext/components/MediaFile/index.d.ts +1 -0
  145. package/dist/esnext/components/MediaFile/index.js +1 -0
  146. package/dist/esnext/components/Metafield/Metafield.client.d.ts +8 -0
  147. package/dist/esnext/components/Metafield/Metafield.client.js +50 -0
  148. package/dist/esnext/components/Metafield/MetafieldFragment.d.ts +4 -0
  149. package/dist/esnext/components/Metafield/MetafieldFragment.js +1 -0
  150. package/dist/esnext/components/Metafield/components/StarRating/StarRating.d.ts +12 -0
  151. package/dist/esnext/components/Metafield/components/StarRating/StarRating.js +48 -0
  152. package/dist/esnext/components/Metafield/components/StarRating/index.d.ts +1 -0
  153. package/dist/esnext/components/Metafield/components/StarRating/index.js +1 -0
  154. package/dist/esnext/components/Metafield/components/index.d.ts +1 -0
  155. package/dist/esnext/components/Metafield/components/index.js +1 -0
  156. package/dist/esnext/components/Metafield/index.d.ts +3 -0
  157. package/dist/esnext/components/Metafield/index.js +1 -0
  158. package/dist/esnext/components/Metafield/types.d.ts +4 -0
  159. package/dist/esnext/components/Metafield/types.js +1 -0
  160. package/dist/esnext/components/Model3D/Model3D.client.d.ts +25 -0
  161. package/dist/esnext/components/Model3D/Model3D.client.js +30 -0
  162. package/dist/esnext/components/Model3D/Model3DFragment.d.ts +11 -0
  163. package/dist/esnext/components/Model3D/Model3DFragment.js +1 -0
  164. package/dist/esnext/components/Model3D/index.d.ts +1 -0
  165. package/dist/esnext/components/Model3D/index.js +1 -0
  166. package/dist/esnext/components/Money/Money.client.d.ts +7 -0
  167. package/dist/esnext/components/Money/Money.client.js +10 -0
  168. package/dist/esnext/components/Money/index.d.ts +1 -0
  169. package/dist/esnext/components/Money/index.js +1 -0
  170. package/dist/esnext/components/ProductDescription/ProductDescription.client.d.ts +3 -0
  171. package/dist/esnext/components/ProductDescription/ProductDescription.client.js +10 -0
  172. package/dist/esnext/components/ProductDescription/index.d.ts +1 -0
  173. package/dist/esnext/components/ProductDescription/index.js +1 -0
  174. package/dist/esnext/components/ProductMetafield/ProductMetafield.client.d.ts +7 -0
  175. package/dist/esnext/components/ProductMetafield/ProductMetafield.client.js +16 -0
  176. package/dist/esnext/components/ProductMetafield/index.d.ts +1 -0
  177. package/dist/esnext/components/ProductMetafield/index.js +1 -0
  178. package/dist/esnext/components/ProductPrice/ProductPrice.client.d.ts +7 -0
  179. package/dist/esnext/components/ProductPrice/ProductPrice.client.js +32 -0
  180. package/dist/esnext/components/ProductPrice/index.d.ts +1 -0
  181. package/dist/esnext/components/ProductPrice/index.js +1 -0
  182. package/dist/esnext/components/ProductProvider/ProductProvider.client.d.ts +7 -0
  183. package/dist/esnext/components/ProductProvider/ProductProvider.client.js +35 -0
  184. package/dist/esnext/components/ProductProvider/ProductProviderFragment.d.ts +96 -0
  185. package/dist/esnext/components/ProductProvider/ProductProviderFragment.js +1 -0
  186. package/dist/esnext/components/ProductProvider/context.d.ts +13 -0
  187. package/dist/esnext/components/ProductProvider/context.js +2 -0
  188. package/dist/esnext/components/ProductProvider/hooks.d.ts +1 -0
  189. package/dist/esnext/components/ProductProvider/hooks.js +6 -0
  190. package/dist/esnext/components/ProductProvider/index.d.ts +2 -0
  191. package/dist/esnext/components/ProductProvider/index.js +2 -0
  192. package/dist/esnext/components/ProductProvider/types.d.ts +5 -0
  193. package/dist/esnext/components/ProductProvider/types.js +1 -0
  194. package/dist/esnext/components/ProductTitle/ProductTitle.client.d.ts +3 -0
  195. package/dist/esnext/components/ProductTitle/ProductTitle.client.js +11 -0
  196. package/dist/esnext/components/ProductTitle/index.d.ts +1 -0
  197. package/dist/esnext/components/ProductTitle/index.js +1 -0
  198. package/dist/esnext/components/RawHtml/RawHtml.d.ts +7 -0
  199. package/dist/esnext/components/RawHtml/RawHtml.js +13 -0
  200. package/dist/esnext/components/RawHtml/index.d.ts +1 -0
  201. package/dist/esnext/components/RawHtml/index.js +1 -0
  202. package/dist/esnext/components/SelectedVariantAddToCartButton/SelectedVariantAddToCartButton.client.d.ts +6 -0
  203. package/dist/esnext/components/SelectedVariantAddToCartButton/SelectedVariantAddToCartButton.client.js +12 -0
  204. package/dist/esnext/components/SelectedVariantAddToCartButton/index.d.ts +1 -0
  205. package/dist/esnext/components/SelectedVariantAddToCartButton/index.js +1 -0
  206. package/dist/esnext/components/SelectedVariantBuyNowButton/SelectedVariantBuyNowButton.d.ts +4 -0
  207. package/dist/esnext/components/SelectedVariantBuyNowButton/SelectedVariantBuyNowButton.js +12 -0
  208. package/dist/esnext/components/SelectedVariantBuyNowButton/index.d.ts +1 -0
  209. package/dist/esnext/components/SelectedVariantBuyNowButton/index.js +1 -0
  210. package/dist/esnext/components/SelectedVariantImage/SelectedVariantImage.client.d.ts +6 -0
  211. package/dist/esnext/components/SelectedVariantImage/SelectedVariantImage.client.js +12 -0
  212. package/dist/esnext/components/SelectedVariantImage/index.d.ts +1 -0
  213. package/dist/esnext/components/SelectedVariantImage/index.js +1 -0
  214. package/dist/esnext/components/SelectedVariantMetafield/SelectedVariantMetafield.client.d.ts +7 -0
  215. package/dist/esnext/components/SelectedVariantMetafield/SelectedVariantMetafield.client.js +15 -0
  216. package/dist/esnext/components/SelectedVariantMetafield/index.d.ts +1 -0
  217. package/dist/esnext/components/SelectedVariantMetafield/index.js +1 -0
  218. package/dist/esnext/components/SelectedVariantPrice/SelectedVariantPrice.client.d.ts +6 -0
  219. package/dist/esnext/components/SelectedVariantPrice/SelectedVariantPrice.client.js +18 -0
  220. package/dist/esnext/components/SelectedVariantPrice/index.d.ts +1 -0
  221. package/dist/esnext/components/SelectedVariantPrice/index.js +1 -0
  222. package/dist/esnext/components/SelectedVariantShopPayButton/SelectedVariantShopPayButton.client.d.ts +2 -0
  223. package/dist/esnext/components/SelectedVariantShopPayButton/SelectedVariantShopPayButton.client.js +12 -0
  224. package/dist/esnext/components/SelectedVariantShopPayButton/index.d.ts +1 -0
  225. package/dist/esnext/components/SelectedVariantShopPayButton/index.js +1 -0
  226. package/dist/esnext/components/SelectedVariantUnitPrice/SelectedVariantUnitPrice.client.d.ts +3 -0
  227. package/dist/esnext/components/SelectedVariantUnitPrice/SelectedVariantUnitPrice.client.js +12 -0
  228. package/dist/esnext/components/SelectedVariantUnitPrice/index.d.ts +1 -0
  229. package/dist/esnext/components/SelectedVariantUnitPrice/index.js +1 -0
  230. package/dist/esnext/components/ShopPayButton/ShopPayButton.client.d.ts +15 -0
  231. package/dist/esnext/components/ShopPayButton/ShopPayButton.client.js +32 -0
  232. package/dist/esnext/components/ShopPayButton/index.d.ts +1 -0
  233. package/dist/esnext/components/ShopPayButton/index.js +1 -0
  234. package/dist/esnext/components/UnitPrice/UnitPrice.client.d.ts +8 -0
  235. package/dist/esnext/components/UnitPrice/UnitPrice.client.js +16 -0
  236. package/dist/esnext/components/UnitPrice/index.d.ts +1 -0
  237. package/dist/esnext/components/UnitPrice/index.js +1 -0
  238. package/dist/esnext/components/Video/Video.d.ts +13 -0
  239. package/dist/esnext/components/Video/Video.js +8 -0
  240. package/dist/esnext/components/Video/VideoFragment.d.ts +11 -0
  241. package/dist/esnext/components/Video/VideoFragment.js +1 -0
  242. package/dist/esnext/components/Video/index.d.ts +1 -0
  243. package/dist/esnext/components/Video/index.js +1 -0
  244. package/dist/esnext/components/index.d.ts +41 -0
  245. package/dist/esnext/components/index.js +87 -0
  246. package/dist/esnext/components/types.d.ts +73 -0
  247. package/dist/esnext/components/types.js +10 -0
  248. package/dist/esnext/entry-client.d.ts +3 -0
  249. package/dist/esnext/entry-client.js +36 -0
  250. package/dist/esnext/entry-server.d.ts +3 -0
  251. package/dist/esnext/entry-server.js +286 -0
  252. package/dist/esnext/foundation/ClientMarker/ClientMarker.d.ts +10 -0
  253. package/dist/esnext/foundation/ClientMarker/ClientMarker.js +25 -0
  254. package/dist/esnext/foundation/ClientMarker/index.d.ts +1 -0
  255. package/dist/esnext/foundation/ClientMarker/index.js +1 -0
  256. package/dist/esnext/foundation/Hydration/Cache.client.d.ts +9 -0
  257. package/dist/esnext/foundation/Hydration/Cache.client.js +131 -0
  258. package/dist/esnext/foundation/Hydration/ClientComponents.server.d.ts +13 -0
  259. package/dist/esnext/foundation/Hydration/ClientComponents.server.js +18 -0
  260. package/dist/esnext/foundation/Hydration/Html.d.ts +5 -0
  261. package/dist/esnext/foundation/Hydration/Html.js +9 -0
  262. package/dist/esnext/foundation/Hydration/HydrationContext.server.d.ts +1 -0
  263. package/dist/esnext/foundation/Hydration/HydrationContext.server.js +2 -0
  264. package/dist/esnext/foundation/Hydration/ServerComponentRequest.server.d.ts +13 -0
  265. package/dist/esnext/foundation/Hydration/ServerComponentRequest.server.js +39 -0
  266. package/dist/esnext/foundation/Hydration/ServerComponentResponse.server.d.ts +18 -0
  267. package/dist/esnext/foundation/Hydration/ServerComponentResponse.server.js +35 -0
  268. package/dist/esnext/foundation/Hydration/react-utils.d.ts +5 -0
  269. package/dist/esnext/foundation/Hydration/react-utils.js +55 -0
  270. package/dist/esnext/foundation/Hydration/wire.server.d.ts +4 -0
  271. package/dist/esnext/foundation/Hydration/wire.server.js +75 -0
  272. package/dist/esnext/foundation/Hydration/writer.server.d.ts +14 -0
  273. package/dist/esnext/foundation/Hydration/writer.server.js +29 -0
  274. package/dist/esnext/foundation/Router/DefaultRoutes.d.ts +20 -0
  275. package/dist/esnext/foundation/Router/DefaultRoutes.js +54 -0
  276. package/dist/esnext/foundation/Router/ServerStateRouter.client.d.ts +6 -0
  277. package/dist/esnext/foundation/Router/ServerStateRouter.client.js +27 -0
  278. package/dist/esnext/foundation/Router/index.d.ts +1 -0
  279. package/dist/esnext/foundation/Router/index.js +1 -0
  280. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.client.d.ts +11 -0
  281. package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.client.js +48 -0
  282. package/dist/esnext/foundation/ServerStateProvider/index.d.ts +1 -0
  283. package/dist/esnext/foundation/ServerStateProvider/index.js +1 -0
  284. package/dist/esnext/foundation/ShopifyProvider/ShopifyContext.d.ts +1 -0
  285. package/dist/esnext/foundation/ShopifyProvider/ShopifyContext.js +2 -0
  286. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.d.ts +3 -0
  287. package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.js +11 -0
  288. package/dist/esnext/foundation/ShopifyProvider/ShopifyServerProvider.server.d.ts +8 -0
  289. package/dist/esnext/foundation/ShopifyProvider/ShopifyServerProvider.server.js +7 -0
  290. package/dist/esnext/foundation/ShopifyProvider/hooks.d.ts +2 -0
  291. package/dist/esnext/foundation/ShopifyProvider/hooks.js +9 -0
  292. package/dist/esnext/foundation/ShopifyProvider/index.d.ts +2 -0
  293. package/dist/esnext/foundation/ShopifyProvider/index.js +2 -0
  294. package/dist/esnext/foundation/ShopifyProvider/types.d.ts +12 -0
  295. package/dist/esnext/foundation/ShopifyProvider/types.js +1 -0
  296. package/dist/esnext/foundation/index.d.ts +4 -0
  297. package/dist/esnext/foundation/index.js +4 -0
  298. package/dist/esnext/framework/graphiql.d.ts +1 -0
  299. package/dist/esnext/framework/graphiql.js +39 -0
  300. package/dist/esnext/framework/middleware.d.ts +17 -0
  301. package/dist/esnext/framework/middleware.js +116 -0
  302. package/dist/esnext/framework/plugin.d.ts +3 -0
  303. package/dist/esnext/framework/plugin.js +14 -0
  304. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.d.ts +3 -0
  305. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +43 -0
  306. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +4 -0
  307. package/dist/esnext/framework/plugins/vite-plugin-hydrogen-middleware.js +28 -0
  308. package/dist/esnext/framework/plugins/vite-plugin-react-server-components-shim.d.ts +3 -0
  309. package/dist/esnext/framework/plugins/vite-plugin-react-server-components-shim.js +123 -0
  310. package/dist/esnext/framework/server-components.d.ts +12 -0
  311. package/dist/esnext/framework/server-components.js +72 -0
  312. package/dist/esnext/graphql/graphql-constants.d.ts +1295 -0
  313. package/dist/esnext/graphql/graphql-constants.js +2482 -0
  314. package/dist/esnext/graphql/types/types.d.ts +5583 -0
  315. package/dist/esnext/graphql/types/types.js +1414 -0
  316. package/dist/esnext/handle-event.d.ts +20 -0
  317. package/dist/esnext/handle-event.js +140 -0
  318. package/dist/esnext/handle-worker-event.d.ts +11 -0
  319. package/dist/esnext/handle-worker-event.js +14 -0
  320. package/dist/esnext/hooks/index.d.ts +5 -0
  321. package/dist/esnext/hooks/index.js +5 -0
  322. package/dist/esnext/hooks/useMeasurement/hooks.d.ts +9 -0
  323. package/dist/esnext/hooks/useMeasurement/hooks.js +13 -0
  324. package/dist/esnext/hooks/useMeasurement/index.d.ts +1 -0
  325. package/dist/esnext/hooks/useMeasurement/index.js +1 -0
  326. package/dist/esnext/hooks/useMoney/hooks.d.ts +11 -0
  327. package/dist/esnext/hooks/useMoney/hooks.js +33 -0
  328. package/dist/esnext/hooks/useMoney/index.d.ts +1 -0
  329. package/dist/esnext/hooks/useMoney/index.js +1 -0
  330. package/dist/esnext/hooks/useParsedMetafields/hooks.d.ts +3 -0
  331. package/dist/esnext/hooks/useParsedMetafields/hooks.js +15 -0
  332. package/dist/esnext/hooks/useParsedMetafields/index.d.ts +1 -0
  333. package/dist/esnext/hooks/useParsedMetafields/index.js +1 -0
  334. package/dist/esnext/hooks/useProductOptions/helpers.d.ts +4 -0
  335. package/dist/esnext/hooks/useProductOptions/helpers.js +33 -0
  336. package/dist/esnext/hooks/useProductOptions/index.d.ts +2 -0
  337. package/dist/esnext/hooks/useProductOptions/index.js +2 -0
  338. package/dist/esnext/hooks/useProductOptions/types.d.ts +50 -0
  339. package/dist/esnext/hooks/useProductOptions/types.js +1 -0
  340. package/dist/esnext/hooks/useProductOptions/useProductOptions.d.ts +23 -0
  341. package/dist/esnext/hooks/useProductOptions/useProductOptions.js +84 -0
  342. package/dist/esnext/hooks/useQuery/QueryProvider.d.ts +6 -0
  343. package/dist/esnext/hooks/useQuery/QueryProvider.js +13 -0
  344. package/dist/esnext/hooks/useQuery/hooks.d.ts +12 -0
  345. package/dist/esnext/hooks/useQuery/hooks.js +28 -0
  346. package/dist/esnext/hooks/useQuery/index.d.ts +2 -0
  347. package/dist/esnext/hooks/useQuery/index.js +2 -0
  348. package/dist/esnext/hooks/useShopQuery/hooks.d.ts +9 -0
  349. package/dist/esnext/hooks/useShopQuery/hooks.js +34 -0
  350. package/dist/esnext/hooks/useShopQuery/index.d.ts +1 -0
  351. package/dist/esnext/hooks/useShopQuery/index.js +1 -0
  352. package/dist/esnext/index.d.ts +9 -0
  353. package/dist/esnext/index.js +11 -0
  354. package/dist/esnext/types.d.ts +62 -0
  355. package/dist/esnext/types.js +1 -0
  356. package/dist/esnext/utilities/connections.d.ts +2 -0
  357. package/dist/esnext/utilities/connections.js +4 -0
  358. package/dist/esnext/utilities/environment.d.ts +2 -0
  359. package/dist/esnext/utilities/environment.js +2 -0
  360. package/dist/esnext/utilities/image_size.d.ts +17 -0
  361. package/dist/esnext/utilities/image_size.js +45 -0
  362. package/dist/esnext/utilities/index.d.ts +8 -0
  363. package/dist/esnext/utilities/index.js +8 -0
  364. package/dist/esnext/utilities/meaurement.d.ts +3 -0
  365. package/dist/esnext/utilities/meaurement.js +98 -0
  366. package/dist/esnext/utilities/metafields.d.ts +2 -0
  367. package/dist/esnext/utilities/metafields.js +32 -0
  368. package/dist/esnext/utilities/script_loader.d.ts +3 -0
  369. package/dist/esnext/utilities/script_loader.js +23 -0
  370. package/dist/esnext/utilities/suspense.d.ts +7 -0
  371. package/dist/esnext/utilities/suspense.js +32 -0
  372. package/dist/esnext/utilities/video_parameters.d.ts +47 -0
  373. package/dist/esnext/utilities/video_parameters.js +22 -0
  374. package/dist/esnext/version.d.ts +1 -0
  375. package/dist/esnext/version.js +1 -0
  376. package/dist/node/foundation/ClientMarker/ClientMarker.d.ts +10 -0
  377. package/dist/node/foundation/ClientMarker/ClientMarker.js +48 -0
  378. package/dist/node/foundation/ClientMarker/index.d.ts +1 -0
  379. package/dist/node/foundation/ClientMarker/index.js +13 -0
  380. package/dist/node/foundation/Hydration/HydrationContext.server.d.ts +1 -0
  381. package/dist/node/foundation/Hydration/HydrationContext.server.js +5 -0
  382. package/dist/node/foundation/Hydration/ServerComponentRequest.server.d.ts +13 -0
  383. package/dist/node/foundation/Hydration/ServerComponentRequest.server.js +43 -0
  384. package/dist/node/foundation/Hydration/ServerComponentResponse.server.d.ts +18 -0
  385. package/dist/node/foundation/Hydration/ServerComponentResponse.server.js +39 -0
  386. package/dist/node/foundation/Hydration/react-utils.d.ts +5 -0
  387. package/dist/node/foundation/Hydration/react-utils.js +63 -0
  388. package/dist/node/foundation/Router/DefaultRoutes.d.ts +20 -0
  389. package/dist/node/foundation/Router/DefaultRoutes.js +78 -0
  390. package/dist/node/foundation/Router/index.d.ts +1 -0
  391. package/dist/node/foundation/Router/index.js +5 -0
  392. package/dist/node/foundation/ShopifyProvider/ShopifyContext.d.ts +1 -0
  393. package/dist/node/foundation/ShopifyProvider/ShopifyContext.js +5 -0
  394. package/dist/node/foundation/ShopifyProvider/ShopifyProvider.d.ts +3 -0
  395. package/dist/node/foundation/ShopifyProvider/ShopifyProvider.js +34 -0
  396. package/dist/node/foundation/ShopifyProvider/ShopifyServerProvider.server.d.ts +8 -0
  397. package/dist/node/foundation/ShopifyProvider/ShopifyServerProvider.server.js +14 -0
  398. package/dist/node/foundation/ShopifyProvider/hooks.d.ts +2 -0
  399. package/dist/node/foundation/ShopifyProvider/hooks.js +13 -0
  400. package/dist/node/foundation/ShopifyProvider/index.d.ts +2 -0
  401. package/dist/node/foundation/ShopifyProvider/index.js +8 -0
  402. package/dist/node/foundation/ShopifyProvider/types.d.ts +12 -0
  403. package/dist/node/foundation/ShopifyProvider/types.js +2 -0
  404. package/dist/node/foundation/index.d.ts +4 -0
  405. package/dist/node/foundation/index.js +13 -0
  406. package/dist/node/framework/graphiql.d.ts +1 -0
  407. package/dist/node/framework/graphiql.js +43 -0
  408. package/dist/node/framework/middleware.d.ts +17 -0
  409. package/dist/node/framework/middleware.js +141 -0
  410. package/dist/node/framework/plugin.d.ts +3 -0
  411. package/dist/node/framework/plugin.js +19 -0
  412. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.d.ts +3 -0
  413. package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +45 -0
  414. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.d.ts +4 -0
  415. package/dist/node/framework/plugins/vite-plugin-hydrogen-middleware.js +33 -0
  416. package/dist/node/framework/plugins/vite-plugin-react-server-components-shim.d.ts +3 -0
  417. package/dist/node/framework/plugins/vite-plugin-react-server-components-shim.js +128 -0
  418. package/dist/node/framework/server-components.d.ts +12 -0
  419. package/dist/node/framework/server-components.js +77 -0
  420. package/dist/node/graphql/types/types.d.ts +5583 -0
  421. package/dist/node/graphql/types/types.js +1417 -0
  422. package/dist/node/handle-event.d.ts +20 -0
  423. package/dist/node/handle-event.js +143 -0
  424. package/dist/node/hooks/useQuery/QueryProvider.d.ts +6 -0
  425. package/dist/node/hooks/useQuery/QueryProvider.js +20 -0
  426. package/dist/node/hooks/useQuery/hooks.d.ts +12 -0
  427. package/dist/node/hooks/useQuery/hooks.js +32 -0
  428. package/dist/node/hooks/useQuery/index.d.ts +2 -0
  429. package/dist/node/hooks/useQuery/index.js +14 -0
  430. package/dist/node/types.d.ts +62 -0
  431. package/dist/node/types.js +2 -0
  432. package/dist/worker/foundation/Hydration/ServerComponentRequest.server.d.ts +13 -0
  433. package/dist/worker/foundation/Hydration/ServerComponentRequest.server.js +39 -0
  434. package/dist/worker/foundation/Hydration/ServerComponentResponse.server.d.ts +18 -0
  435. package/dist/worker/foundation/Hydration/ServerComponentResponse.server.js +35 -0
  436. package/dist/worker/graphql/types/types.d.ts +5583 -0
  437. package/dist/worker/graphql/types/types.js +1414 -0
  438. package/dist/worker/handle-event.d.ts +20 -0
  439. package/dist/worker/handle-event.js +140 -0
  440. package/dist/worker/handle-worker-event.d.ts +11 -0
  441. package/dist/worker/handle-worker-event.js +14 -0
  442. package/dist/worker/types.d.ts +62 -0
  443. package/dist/worker/types.js +1 -0
  444. package/entry-client.d.ts +1 -0
  445. package/entry-client.js +1 -0
  446. package/entry-server.d.ts +1 -0
  447. package/entry-server.js +1 -0
  448. package/marker.js +1 -0
  449. package/middleware.d.ts +1 -0
  450. package/middleware.js +1 -0
  451. package/package.json +98 -0
  452. package/plugin.d.ts +1 -0
  453. package/plugin.js +1 -0
  454. package/worker.js +1 -0
@@ -0,0 +1,2482 @@
1
+ /**
2
+ *```
3
+ *
4
+ * mutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $numCartLines: Int = 250) {
5
+ * cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {
6
+ * cart {
7
+ * ...CartFragment
8
+ * }
9
+ * }
10
+ * }
11
+ *
12
+ * fragment CartFragment on Cart {
13
+ * id
14
+ * checkoutUrl
15
+ * buyerIdentity {
16
+ * countryCode
17
+ * customer {
18
+ * id
19
+ * email
20
+ * firstName
21
+ * lastName
22
+ * displayName
23
+ * }
24
+ * email
25
+ * phone
26
+ * }
27
+ * lines(first: $numCartLines) {
28
+ * edges {
29
+ * node {
30
+ * id
31
+ * quantity
32
+ * attributes {
33
+ * key
34
+ * value
35
+ * }
36
+ * merchandise {
37
+ * ... on ProductVariant {
38
+ * id
39
+ * availableForSale
40
+ * compareAtPriceV2 {
41
+ * amount
42
+ * currencyCode
43
+ * }
44
+ * priceV2 {
45
+ * amount
46
+ * currencyCode
47
+ * }
48
+ * requiresShipping
49
+ * title
50
+ * image {
51
+ * originalSrc
52
+ * altText
53
+ * }
54
+ * product {
55
+ * handle
56
+ * title
57
+ * }
58
+ * selectedOptions {
59
+ * name
60
+ * value
61
+ * }
62
+ * }
63
+ * }
64
+ * }
65
+ * }
66
+ * }
67
+ * estimatedCost {
68
+ * subtotalAmount {
69
+ * currencyCode
70
+ * amount
71
+ * }
72
+ * totalAmount {
73
+ * currencyCode
74
+ * amount
75
+ * }
76
+ * totalDutyAmount {
77
+ * currencyCode
78
+ * amount
79
+ * }
80
+ * totalTaxAmount {
81
+ * currencyCode
82
+ * amount
83
+ * }
84
+ * }
85
+ * note
86
+ * attributes {
87
+ * key
88
+ * value
89
+ * }
90
+ * discountCodes {
91
+ * code
92
+ * }
93
+ * }
94
+ *
95
+ *```
96
+ */
97
+ export const CartAttributesUpdate = `
98
+ mutation CartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!, $numCartLines: Int = 250) {
99
+ cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {
100
+ cart {
101
+ ...CartFragment
102
+ }
103
+ }
104
+ }
105
+
106
+ fragment CartFragment on Cart {
107
+ id
108
+ checkoutUrl
109
+ buyerIdentity {
110
+ countryCode
111
+ customer {
112
+ id
113
+ email
114
+ firstName
115
+ lastName
116
+ displayName
117
+ }
118
+ email
119
+ phone
120
+ }
121
+ lines(first: $numCartLines) {
122
+ edges {
123
+ node {
124
+ id
125
+ quantity
126
+ attributes {
127
+ key
128
+ value
129
+ }
130
+ merchandise {
131
+ ... on ProductVariant {
132
+ id
133
+ availableForSale
134
+ compareAtPriceV2 {
135
+ amount
136
+ currencyCode
137
+ }
138
+ priceV2 {
139
+ amount
140
+ currencyCode
141
+ }
142
+ requiresShipping
143
+ title
144
+ image {
145
+ originalSrc
146
+ altText
147
+ }
148
+ product {
149
+ handle
150
+ title
151
+ }
152
+ selectedOptions {
153
+ name
154
+ value
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ estimatedCost {
162
+ subtotalAmount {
163
+ currencyCode
164
+ amount
165
+ }
166
+ totalAmount {
167
+ currencyCode
168
+ amount
169
+ }
170
+ totalDutyAmount {
171
+ currencyCode
172
+ amount
173
+ }
174
+ totalTaxAmount {
175
+ currencyCode
176
+ amount
177
+ }
178
+ }
179
+ note
180
+ attributes {
181
+ key
182
+ value
183
+ }
184
+ discountCodes {
185
+ code
186
+ }
187
+ }
188
+ `;
189
+ /**
190
+ *```
191
+ *
192
+ * mutation CartBuyerIdentityUpdate(
193
+ * $cartId: ID!
194
+ * $buyerIdentity: CartBuyerIdentityInput!
195
+ * $numCartLines: Int = 250
196
+ * ) {
197
+ * cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {
198
+ * cart {
199
+ * ...CartFragment
200
+ * }
201
+ * }
202
+ * }
203
+ *
204
+ * fragment CartFragment on Cart {
205
+ * id
206
+ * checkoutUrl
207
+ * buyerIdentity {
208
+ * countryCode
209
+ * customer {
210
+ * id
211
+ * email
212
+ * firstName
213
+ * lastName
214
+ * displayName
215
+ * }
216
+ * email
217
+ * phone
218
+ * }
219
+ * lines(first: $numCartLines) {
220
+ * edges {
221
+ * node {
222
+ * id
223
+ * quantity
224
+ * attributes {
225
+ * key
226
+ * value
227
+ * }
228
+ * merchandise {
229
+ * ... on ProductVariant {
230
+ * id
231
+ * availableForSale
232
+ * compareAtPriceV2 {
233
+ * amount
234
+ * currencyCode
235
+ * }
236
+ * priceV2 {
237
+ * amount
238
+ * currencyCode
239
+ * }
240
+ * requiresShipping
241
+ * title
242
+ * image {
243
+ * originalSrc
244
+ * altText
245
+ * }
246
+ * product {
247
+ * handle
248
+ * title
249
+ * }
250
+ * selectedOptions {
251
+ * name
252
+ * value
253
+ * }
254
+ * }
255
+ * }
256
+ * }
257
+ * }
258
+ * }
259
+ * estimatedCost {
260
+ * subtotalAmount {
261
+ * currencyCode
262
+ * amount
263
+ * }
264
+ * totalAmount {
265
+ * currencyCode
266
+ * amount
267
+ * }
268
+ * totalDutyAmount {
269
+ * currencyCode
270
+ * amount
271
+ * }
272
+ * totalTaxAmount {
273
+ * currencyCode
274
+ * amount
275
+ * }
276
+ * }
277
+ * note
278
+ * attributes {
279
+ * key
280
+ * value
281
+ * }
282
+ * discountCodes {
283
+ * code
284
+ * }
285
+ * }
286
+ *
287
+ *```
288
+ */
289
+ export const CartBuyerIdentityUpdate = `
290
+ mutation CartBuyerIdentityUpdate(
291
+ $cartId: ID!
292
+ $buyerIdentity: CartBuyerIdentityInput!
293
+ $numCartLines: Int = 250
294
+ ) {
295
+ cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {
296
+ cart {
297
+ ...CartFragment
298
+ }
299
+ }
300
+ }
301
+
302
+ fragment CartFragment on Cart {
303
+ id
304
+ checkoutUrl
305
+ buyerIdentity {
306
+ countryCode
307
+ customer {
308
+ id
309
+ email
310
+ firstName
311
+ lastName
312
+ displayName
313
+ }
314
+ email
315
+ phone
316
+ }
317
+ lines(first: $numCartLines) {
318
+ edges {
319
+ node {
320
+ id
321
+ quantity
322
+ attributes {
323
+ key
324
+ value
325
+ }
326
+ merchandise {
327
+ ... on ProductVariant {
328
+ id
329
+ availableForSale
330
+ compareAtPriceV2 {
331
+ amount
332
+ currencyCode
333
+ }
334
+ priceV2 {
335
+ amount
336
+ currencyCode
337
+ }
338
+ requiresShipping
339
+ title
340
+ image {
341
+ originalSrc
342
+ altText
343
+ }
344
+ product {
345
+ handle
346
+ title
347
+ }
348
+ selectedOptions {
349
+ name
350
+ value
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ }
357
+ estimatedCost {
358
+ subtotalAmount {
359
+ currencyCode
360
+ amount
361
+ }
362
+ totalAmount {
363
+ currencyCode
364
+ amount
365
+ }
366
+ totalDutyAmount {
367
+ currencyCode
368
+ amount
369
+ }
370
+ totalTaxAmount {
371
+ currencyCode
372
+ amount
373
+ }
374
+ }
375
+ note
376
+ attributes {
377
+ key
378
+ value
379
+ }
380
+ discountCodes {
381
+ code
382
+ }
383
+ }
384
+ `;
385
+ /**
386
+ *```
387
+ *
388
+ * mutation CartCreate($input: CartInput!, $numCartLines: Int = 250) {
389
+ * cartCreate(input: $input) {
390
+ * cart {
391
+ * ...CartFragment
392
+ * }
393
+ * }
394
+ * }
395
+ *
396
+ * fragment CartFragment on Cart {
397
+ * id
398
+ * checkoutUrl
399
+ * buyerIdentity {
400
+ * countryCode
401
+ * customer {
402
+ * id
403
+ * email
404
+ * firstName
405
+ * lastName
406
+ * displayName
407
+ * }
408
+ * email
409
+ * phone
410
+ * }
411
+ * lines(first: $numCartLines) {
412
+ * edges {
413
+ * node {
414
+ * id
415
+ * quantity
416
+ * attributes {
417
+ * key
418
+ * value
419
+ * }
420
+ * merchandise {
421
+ * ... on ProductVariant {
422
+ * id
423
+ * availableForSale
424
+ * compareAtPriceV2 {
425
+ * amount
426
+ * currencyCode
427
+ * }
428
+ * priceV2 {
429
+ * amount
430
+ * currencyCode
431
+ * }
432
+ * requiresShipping
433
+ * title
434
+ * image {
435
+ * originalSrc
436
+ * altText
437
+ * }
438
+ * product {
439
+ * handle
440
+ * title
441
+ * }
442
+ * selectedOptions {
443
+ * name
444
+ * value
445
+ * }
446
+ * }
447
+ * }
448
+ * }
449
+ * }
450
+ * }
451
+ * estimatedCost {
452
+ * subtotalAmount {
453
+ * currencyCode
454
+ * amount
455
+ * }
456
+ * totalAmount {
457
+ * currencyCode
458
+ * amount
459
+ * }
460
+ * totalDutyAmount {
461
+ * currencyCode
462
+ * amount
463
+ * }
464
+ * totalTaxAmount {
465
+ * currencyCode
466
+ * amount
467
+ * }
468
+ * }
469
+ * note
470
+ * attributes {
471
+ * key
472
+ * value
473
+ * }
474
+ * discountCodes {
475
+ * code
476
+ * }
477
+ * }
478
+ *
479
+ *```
480
+ */
481
+ export const CartCreate = `
482
+ mutation CartCreate($input: CartInput!, $numCartLines: Int = 250) {
483
+ cartCreate(input: $input) {
484
+ cart {
485
+ ...CartFragment
486
+ }
487
+ }
488
+ }
489
+
490
+ fragment CartFragment on Cart {
491
+ id
492
+ checkoutUrl
493
+ buyerIdentity {
494
+ countryCode
495
+ customer {
496
+ id
497
+ email
498
+ firstName
499
+ lastName
500
+ displayName
501
+ }
502
+ email
503
+ phone
504
+ }
505
+ lines(first: $numCartLines) {
506
+ edges {
507
+ node {
508
+ id
509
+ quantity
510
+ attributes {
511
+ key
512
+ value
513
+ }
514
+ merchandise {
515
+ ... on ProductVariant {
516
+ id
517
+ availableForSale
518
+ compareAtPriceV2 {
519
+ amount
520
+ currencyCode
521
+ }
522
+ priceV2 {
523
+ amount
524
+ currencyCode
525
+ }
526
+ requiresShipping
527
+ title
528
+ image {
529
+ originalSrc
530
+ altText
531
+ }
532
+ product {
533
+ handle
534
+ title
535
+ }
536
+ selectedOptions {
537
+ name
538
+ value
539
+ }
540
+ }
541
+ }
542
+ }
543
+ }
544
+ }
545
+ estimatedCost {
546
+ subtotalAmount {
547
+ currencyCode
548
+ amount
549
+ }
550
+ totalAmount {
551
+ currencyCode
552
+ amount
553
+ }
554
+ totalDutyAmount {
555
+ currencyCode
556
+ amount
557
+ }
558
+ totalTaxAmount {
559
+ currencyCode
560
+ amount
561
+ }
562
+ }
563
+ note
564
+ attributes {
565
+ key
566
+ value
567
+ }
568
+ discountCodes {
569
+ code
570
+ }
571
+ }
572
+ `;
573
+ /**
574
+ *```
575
+ *
576
+ * mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCartLines: Int = 250) {
577
+ * cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
578
+ * cart {
579
+ * ...CartFragment
580
+ * }
581
+ * }
582
+ * }
583
+ *
584
+ * fragment CartFragment on Cart {
585
+ * id
586
+ * checkoutUrl
587
+ * buyerIdentity {
588
+ * countryCode
589
+ * customer {
590
+ * id
591
+ * email
592
+ * firstName
593
+ * lastName
594
+ * displayName
595
+ * }
596
+ * email
597
+ * phone
598
+ * }
599
+ * lines(first: $numCartLines) {
600
+ * edges {
601
+ * node {
602
+ * id
603
+ * quantity
604
+ * attributes {
605
+ * key
606
+ * value
607
+ * }
608
+ * merchandise {
609
+ * ... on ProductVariant {
610
+ * id
611
+ * availableForSale
612
+ * compareAtPriceV2 {
613
+ * amount
614
+ * currencyCode
615
+ * }
616
+ * priceV2 {
617
+ * amount
618
+ * currencyCode
619
+ * }
620
+ * requiresShipping
621
+ * title
622
+ * image {
623
+ * originalSrc
624
+ * altText
625
+ * }
626
+ * product {
627
+ * handle
628
+ * title
629
+ * }
630
+ * selectedOptions {
631
+ * name
632
+ * value
633
+ * }
634
+ * }
635
+ * }
636
+ * }
637
+ * }
638
+ * }
639
+ * estimatedCost {
640
+ * subtotalAmount {
641
+ * currencyCode
642
+ * amount
643
+ * }
644
+ * totalAmount {
645
+ * currencyCode
646
+ * amount
647
+ * }
648
+ * totalDutyAmount {
649
+ * currencyCode
650
+ * amount
651
+ * }
652
+ * totalTaxAmount {
653
+ * currencyCode
654
+ * amount
655
+ * }
656
+ * }
657
+ * note
658
+ * attributes {
659
+ * key
660
+ * value
661
+ * }
662
+ * discountCodes {
663
+ * code
664
+ * }
665
+ * }
666
+ *
667
+ *```
668
+ */
669
+ export const CartDiscountCodesUpdate = `
670
+ mutation CartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!], $numCartLines: Int = 250) {
671
+ cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
672
+ cart {
673
+ ...CartFragment
674
+ }
675
+ }
676
+ }
677
+
678
+ fragment CartFragment on Cart {
679
+ id
680
+ checkoutUrl
681
+ buyerIdentity {
682
+ countryCode
683
+ customer {
684
+ id
685
+ email
686
+ firstName
687
+ lastName
688
+ displayName
689
+ }
690
+ email
691
+ phone
692
+ }
693
+ lines(first: $numCartLines) {
694
+ edges {
695
+ node {
696
+ id
697
+ quantity
698
+ attributes {
699
+ key
700
+ value
701
+ }
702
+ merchandise {
703
+ ... on ProductVariant {
704
+ id
705
+ availableForSale
706
+ compareAtPriceV2 {
707
+ amount
708
+ currencyCode
709
+ }
710
+ priceV2 {
711
+ amount
712
+ currencyCode
713
+ }
714
+ requiresShipping
715
+ title
716
+ image {
717
+ originalSrc
718
+ altText
719
+ }
720
+ product {
721
+ handle
722
+ title
723
+ }
724
+ selectedOptions {
725
+ name
726
+ value
727
+ }
728
+ }
729
+ }
730
+ }
731
+ }
732
+ }
733
+ estimatedCost {
734
+ subtotalAmount {
735
+ currencyCode
736
+ amount
737
+ }
738
+ totalAmount {
739
+ currencyCode
740
+ amount
741
+ }
742
+ totalDutyAmount {
743
+ currencyCode
744
+ amount
745
+ }
746
+ totalTaxAmount {
747
+ currencyCode
748
+ amount
749
+ }
750
+ }
751
+ note
752
+ attributes {
753
+ key
754
+ value
755
+ }
756
+ discountCodes {
757
+ code
758
+ }
759
+ }
760
+ `;
761
+ /**
762
+ *```
763
+ * fragment CartFragment on Cart {
764
+ * id
765
+ * checkoutUrl
766
+ * buyerIdentity {
767
+ * countryCode
768
+ * customer {
769
+ * id
770
+ * email
771
+ * firstName
772
+ * lastName
773
+ * displayName
774
+ * }
775
+ * email
776
+ * phone
777
+ * }
778
+ * lines(first: $numCartLines) {
779
+ * edges {
780
+ * node {
781
+ * id
782
+ * quantity
783
+ * attributes {
784
+ * key
785
+ * value
786
+ * }
787
+ * merchandise {
788
+ * ... on ProductVariant {
789
+ * id
790
+ * availableForSale
791
+ * compareAtPriceV2 {
792
+ * amount
793
+ * currencyCode
794
+ * }
795
+ * priceV2 {
796
+ * amount
797
+ * currencyCode
798
+ * }
799
+ * requiresShipping
800
+ * title
801
+ * image {
802
+ * originalSrc
803
+ * altText
804
+ * }
805
+ * product {
806
+ * handle
807
+ * title
808
+ * }
809
+ * selectedOptions {
810
+ * name
811
+ * value
812
+ * }
813
+ * }
814
+ * }
815
+ * }
816
+ * }
817
+ * }
818
+ * estimatedCost {
819
+ * subtotalAmount {
820
+ * currencyCode
821
+ * amount
822
+ * }
823
+ * totalAmount {
824
+ * currencyCode
825
+ * amount
826
+ * }
827
+ * totalDutyAmount {
828
+ * currencyCode
829
+ * amount
830
+ * }
831
+ * totalTaxAmount {
832
+ * currencyCode
833
+ * amount
834
+ * }
835
+ * }
836
+ * note
837
+ * attributes {
838
+ * key
839
+ * value
840
+ * }
841
+ * discountCodes {
842
+ * code
843
+ * }
844
+ * }
845
+ *
846
+
847
+ *```
848
+ */
849
+ export const CartFragment = `fragment CartFragment on Cart {
850
+ id
851
+ checkoutUrl
852
+ buyerIdentity {
853
+ countryCode
854
+ customer {
855
+ id
856
+ email
857
+ firstName
858
+ lastName
859
+ displayName
860
+ }
861
+ email
862
+ phone
863
+ }
864
+ lines(first: $numCartLines) {
865
+ edges {
866
+ node {
867
+ id
868
+ quantity
869
+ attributes {
870
+ key
871
+ value
872
+ }
873
+ merchandise {
874
+ ... on ProductVariant {
875
+ id
876
+ availableForSale
877
+ compareAtPriceV2 {
878
+ amount
879
+ currencyCode
880
+ }
881
+ priceV2 {
882
+ amount
883
+ currencyCode
884
+ }
885
+ requiresShipping
886
+ title
887
+ image {
888
+ originalSrc
889
+ altText
890
+ }
891
+ product {
892
+ handle
893
+ title
894
+ }
895
+ selectedOptions {
896
+ name
897
+ value
898
+ }
899
+ }
900
+ }
901
+ }
902
+ }
903
+ }
904
+ estimatedCost {
905
+ subtotalAmount {
906
+ currencyCode
907
+ amount
908
+ }
909
+ totalAmount {
910
+ currencyCode
911
+ amount
912
+ }
913
+ totalDutyAmount {
914
+ currencyCode
915
+ amount
916
+ }
917
+ totalTaxAmount {
918
+ currencyCode
919
+ amount
920
+ }
921
+ }
922
+ note
923
+ attributes {
924
+ key
925
+ value
926
+ }
927
+ discountCodes {
928
+ code
929
+ }
930
+ }
931
+
932
+ `;
933
+ /**
934
+ *```
935
+ *
936
+ * mutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int = 250) {
937
+ * cartLinesAdd(cartId: $cartId, lines: $lines) {
938
+ * cart {
939
+ * ...CartFragment
940
+ * }
941
+ * }
942
+ * }
943
+ *
944
+ * fragment CartFragment on Cart {
945
+ * id
946
+ * checkoutUrl
947
+ * buyerIdentity {
948
+ * countryCode
949
+ * customer {
950
+ * id
951
+ * email
952
+ * firstName
953
+ * lastName
954
+ * displayName
955
+ * }
956
+ * email
957
+ * phone
958
+ * }
959
+ * lines(first: $numCartLines) {
960
+ * edges {
961
+ * node {
962
+ * id
963
+ * quantity
964
+ * attributes {
965
+ * key
966
+ * value
967
+ * }
968
+ * merchandise {
969
+ * ... on ProductVariant {
970
+ * id
971
+ * availableForSale
972
+ * compareAtPriceV2 {
973
+ * amount
974
+ * currencyCode
975
+ * }
976
+ * priceV2 {
977
+ * amount
978
+ * currencyCode
979
+ * }
980
+ * requiresShipping
981
+ * title
982
+ * image {
983
+ * originalSrc
984
+ * altText
985
+ * }
986
+ * product {
987
+ * handle
988
+ * title
989
+ * }
990
+ * selectedOptions {
991
+ * name
992
+ * value
993
+ * }
994
+ * }
995
+ * }
996
+ * }
997
+ * }
998
+ * }
999
+ * estimatedCost {
1000
+ * subtotalAmount {
1001
+ * currencyCode
1002
+ * amount
1003
+ * }
1004
+ * totalAmount {
1005
+ * currencyCode
1006
+ * amount
1007
+ * }
1008
+ * totalDutyAmount {
1009
+ * currencyCode
1010
+ * amount
1011
+ * }
1012
+ * totalTaxAmount {
1013
+ * currencyCode
1014
+ * amount
1015
+ * }
1016
+ * }
1017
+ * note
1018
+ * attributes {
1019
+ * key
1020
+ * value
1021
+ * }
1022
+ * discountCodes {
1023
+ * code
1024
+ * }
1025
+ * }
1026
+ *
1027
+ *```
1028
+ */
1029
+ export const CartLineAdd = `
1030
+ mutation CartLineAdd($cartId: ID!, $lines: [CartLineInput!]!, $numCartLines: Int = 250) {
1031
+ cartLinesAdd(cartId: $cartId, lines: $lines) {
1032
+ cart {
1033
+ ...CartFragment
1034
+ }
1035
+ }
1036
+ }
1037
+
1038
+ fragment CartFragment on Cart {
1039
+ id
1040
+ checkoutUrl
1041
+ buyerIdentity {
1042
+ countryCode
1043
+ customer {
1044
+ id
1045
+ email
1046
+ firstName
1047
+ lastName
1048
+ displayName
1049
+ }
1050
+ email
1051
+ phone
1052
+ }
1053
+ lines(first: $numCartLines) {
1054
+ edges {
1055
+ node {
1056
+ id
1057
+ quantity
1058
+ attributes {
1059
+ key
1060
+ value
1061
+ }
1062
+ merchandise {
1063
+ ... on ProductVariant {
1064
+ id
1065
+ availableForSale
1066
+ compareAtPriceV2 {
1067
+ amount
1068
+ currencyCode
1069
+ }
1070
+ priceV2 {
1071
+ amount
1072
+ currencyCode
1073
+ }
1074
+ requiresShipping
1075
+ title
1076
+ image {
1077
+ originalSrc
1078
+ altText
1079
+ }
1080
+ product {
1081
+ handle
1082
+ title
1083
+ }
1084
+ selectedOptions {
1085
+ name
1086
+ value
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ }
1093
+ estimatedCost {
1094
+ subtotalAmount {
1095
+ currencyCode
1096
+ amount
1097
+ }
1098
+ totalAmount {
1099
+ currencyCode
1100
+ amount
1101
+ }
1102
+ totalDutyAmount {
1103
+ currencyCode
1104
+ amount
1105
+ }
1106
+ totalTaxAmount {
1107
+ currencyCode
1108
+ amount
1109
+ }
1110
+ }
1111
+ note
1112
+ attributes {
1113
+ key
1114
+ value
1115
+ }
1116
+ discountCodes {
1117
+ code
1118
+ }
1119
+ }
1120
+ `;
1121
+ /**
1122
+ *```
1123
+ *
1124
+ * mutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250) {
1125
+ * cartLinesRemove(cartId: $cartId, lineIds: $lines) {
1126
+ * cart {
1127
+ * ...CartFragment
1128
+ * }
1129
+ * }
1130
+ * }
1131
+ *
1132
+ * fragment CartFragment on Cart {
1133
+ * id
1134
+ * checkoutUrl
1135
+ * buyerIdentity {
1136
+ * countryCode
1137
+ * customer {
1138
+ * id
1139
+ * email
1140
+ * firstName
1141
+ * lastName
1142
+ * displayName
1143
+ * }
1144
+ * email
1145
+ * phone
1146
+ * }
1147
+ * lines(first: $numCartLines) {
1148
+ * edges {
1149
+ * node {
1150
+ * id
1151
+ * quantity
1152
+ * attributes {
1153
+ * key
1154
+ * value
1155
+ * }
1156
+ * merchandise {
1157
+ * ... on ProductVariant {
1158
+ * id
1159
+ * availableForSale
1160
+ * compareAtPriceV2 {
1161
+ * amount
1162
+ * currencyCode
1163
+ * }
1164
+ * priceV2 {
1165
+ * amount
1166
+ * currencyCode
1167
+ * }
1168
+ * requiresShipping
1169
+ * title
1170
+ * image {
1171
+ * originalSrc
1172
+ * altText
1173
+ * }
1174
+ * product {
1175
+ * handle
1176
+ * title
1177
+ * }
1178
+ * selectedOptions {
1179
+ * name
1180
+ * value
1181
+ * }
1182
+ * }
1183
+ * }
1184
+ * }
1185
+ * }
1186
+ * }
1187
+ * estimatedCost {
1188
+ * subtotalAmount {
1189
+ * currencyCode
1190
+ * amount
1191
+ * }
1192
+ * totalAmount {
1193
+ * currencyCode
1194
+ * amount
1195
+ * }
1196
+ * totalDutyAmount {
1197
+ * currencyCode
1198
+ * amount
1199
+ * }
1200
+ * totalTaxAmount {
1201
+ * currencyCode
1202
+ * amount
1203
+ * }
1204
+ * }
1205
+ * note
1206
+ * attributes {
1207
+ * key
1208
+ * value
1209
+ * }
1210
+ * discountCodes {
1211
+ * code
1212
+ * }
1213
+ * }
1214
+ *
1215
+ *```
1216
+ */
1217
+ export const CartLineRemove = `
1218
+ mutation CartLineRemove($cartId: ID!, $lines: [ID!]!, $numCartLines: Int = 250) {
1219
+ cartLinesRemove(cartId: $cartId, lineIds: $lines) {
1220
+ cart {
1221
+ ...CartFragment
1222
+ }
1223
+ }
1224
+ }
1225
+
1226
+ fragment CartFragment on Cart {
1227
+ id
1228
+ checkoutUrl
1229
+ buyerIdentity {
1230
+ countryCode
1231
+ customer {
1232
+ id
1233
+ email
1234
+ firstName
1235
+ lastName
1236
+ displayName
1237
+ }
1238
+ email
1239
+ phone
1240
+ }
1241
+ lines(first: $numCartLines) {
1242
+ edges {
1243
+ node {
1244
+ id
1245
+ quantity
1246
+ attributes {
1247
+ key
1248
+ value
1249
+ }
1250
+ merchandise {
1251
+ ... on ProductVariant {
1252
+ id
1253
+ availableForSale
1254
+ compareAtPriceV2 {
1255
+ amount
1256
+ currencyCode
1257
+ }
1258
+ priceV2 {
1259
+ amount
1260
+ currencyCode
1261
+ }
1262
+ requiresShipping
1263
+ title
1264
+ image {
1265
+ originalSrc
1266
+ altText
1267
+ }
1268
+ product {
1269
+ handle
1270
+ title
1271
+ }
1272
+ selectedOptions {
1273
+ name
1274
+ value
1275
+ }
1276
+ }
1277
+ }
1278
+ }
1279
+ }
1280
+ }
1281
+ estimatedCost {
1282
+ subtotalAmount {
1283
+ currencyCode
1284
+ amount
1285
+ }
1286
+ totalAmount {
1287
+ currencyCode
1288
+ amount
1289
+ }
1290
+ totalDutyAmount {
1291
+ currencyCode
1292
+ amount
1293
+ }
1294
+ totalTaxAmount {
1295
+ currencyCode
1296
+ amount
1297
+ }
1298
+ }
1299
+ note
1300
+ attributes {
1301
+ key
1302
+ value
1303
+ }
1304
+ discountCodes {
1305
+ code
1306
+ }
1307
+ }
1308
+ `;
1309
+ /**
1310
+ *```
1311
+ *
1312
+ * mutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartLines: Int = 250) {
1313
+ * cartLinesUpdate(cartId: $cartId, lines: $lines) {
1314
+ * cart {
1315
+ * ...CartFragment
1316
+ * }
1317
+ * }
1318
+ * }
1319
+ *
1320
+ * fragment CartFragment on Cart {
1321
+ * id
1322
+ * checkoutUrl
1323
+ * buyerIdentity {
1324
+ * countryCode
1325
+ * customer {
1326
+ * id
1327
+ * email
1328
+ * firstName
1329
+ * lastName
1330
+ * displayName
1331
+ * }
1332
+ * email
1333
+ * phone
1334
+ * }
1335
+ * lines(first: $numCartLines) {
1336
+ * edges {
1337
+ * node {
1338
+ * id
1339
+ * quantity
1340
+ * attributes {
1341
+ * key
1342
+ * value
1343
+ * }
1344
+ * merchandise {
1345
+ * ... on ProductVariant {
1346
+ * id
1347
+ * availableForSale
1348
+ * compareAtPriceV2 {
1349
+ * amount
1350
+ * currencyCode
1351
+ * }
1352
+ * priceV2 {
1353
+ * amount
1354
+ * currencyCode
1355
+ * }
1356
+ * requiresShipping
1357
+ * title
1358
+ * image {
1359
+ * originalSrc
1360
+ * altText
1361
+ * }
1362
+ * product {
1363
+ * handle
1364
+ * title
1365
+ * }
1366
+ * selectedOptions {
1367
+ * name
1368
+ * value
1369
+ * }
1370
+ * }
1371
+ * }
1372
+ * }
1373
+ * }
1374
+ * }
1375
+ * estimatedCost {
1376
+ * subtotalAmount {
1377
+ * currencyCode
1378
+ * amount
1379
+ * }
1380
+ * totalAmount {
1381
+ * currencyCode
1382
+ * amount
1383
+ * }
1384
+ * totalDutyAmount {
1385
+ * currencyCode
1386
+ * amount
1387
+ * }
1388
+ * totalTaxAmount {
1389
+ * currencyCode
1390
+ * amount
1391
+ * }
1392
+ * }
1393
+ * note
1394
+ * attributes {
1395
+ * key
1396
+ * value
1397
+ * }
1398
+ * discountCodes {
1399
+ * code
1400
+ * }
1401
+ * }
1402
+ *
1403
+ *```
1404
+ */
1405
+ export const CartLineUpdate = `
1406
+ mutation CartLineUpdate($cartId: ID!, $lines: [CartLineUpdateInput!]!, $numCartLines: Int = 250) {
1407
+ cartLinesUpdate(cartId: $cartId, lines: $lines) {
1408
+ cart {
1409
+ ...CartFragment
1410
+ }
1411
+ }
1412
+ }
1413
+
1414
+ fragment CartFragment on Cart {
1415
+ id
1416
+ checkoutUrl
1417
+ buyerIdentity {
1418
+ countryCode
1419
+ customer {
1420
+ id
1421
+ email
1422
+ firstName
1423
+ lastName
1424
+ displayName
1425
+ }
1426
+ email
1427
+ phone
1428
+ }
1429
+ lines(first: $numCartLines) {
1430
+ edges {
1431
+ node {
1432
+ id
1433
+ quantity
1434
+ attributes {
1435
+ key
1436
+ value
1437
+ }
1438
+ merchandise {
1439
+ ... on ProductVariant {
1440
+ id
1441
+ availableForSale
1442
+ compareAtPriceV2 {
1443
+ amount
1444
+ currencyCode
1445
+ }
1446
+ priceV2 {
1447
+ amount
1448
+ currencyCode
1449
+ }
1450
+ requiresShipping
1451
+ title
1452
+ image {
1453
+ originalSrc
1454
+ altText
1455
+ }
1456
+ product {
1457
+ handle
1458
+ title
1459
+ }
1460
+ selectedOptions {
1461
+ name
1462
+ value
1463
+ }
1464
+ }
1465
+ }
1466
+ }
1467
+ }
1468
+ }
1469
+ estimatedCost {
1470
+ subtotalAmount {
1471
+ currencyCode
1472
+ amount
1473
+ }
1474
+ totalAmount {
1475
+ currencyCode
1476
+ amount
1477
+ }
1478
+ totalDutyAmount {
1479
+ currencyCode
1480
+ amount
1481
+ }
1482
+ totalTaxAmount {
1483
+ currencyCode
1484
+ amount
1485
+ }
1486
+ }
1487
+ note
1488
+ attributes {
1489
+ key
1490
+ value
1491
+ }
1492
+ discountCodes {
1493
+ code
1494
+ }
1495
+ }
1496
+ `;
1497
+ /**
1498
+ *```
1499
+ *
1500
+ * mutation CartNoteUpdate($cartId: ID!, $note: String, $numCartLines: Int = 250) {
1501
+ * cartNoteUpdate(cartId: $cartId, note: $note) {
1502
+ * cart {
1503
+ * ...CartFragment
1504
+ * }
1505
+ * }
1506
+ * }
1507
+ *
1508
+ * fragment CartFragment on Cart {
1509
+ * id
1510
+ * checkoutUrl
1511
+ * buyerIdentity {
1512
+ * countryCode
1513
+ * customer {
1514
+ * id
1515
+ * email
1516
+ * firstName
1517
+ * lastName
1518
+ * displayName
1519
+ * }
1520
+ * email
1521
+ * phone
1522
+ * }
1523
+ * lines(first: $numCartLines) {
1524
+ * edges {
1525
+ * node {
1526
+ * id
1527
+ * quantity
1528
+ * attributes {
1529
+ * key
1530
+ * value
1531
+ * }
1532
+ * merchandise {
1533
+ * ... on ProductVariant {
1534
+ * id
1535
+ * availableForSale
1536
+ * compareAtPriceV2 {
1537
+ * amount
1538
+ * currencyCode
1539
+ * }
1540
+ * priceV2 {
1541
+ * amount
1542
+ * currencyCode
1543
+ * }
1544
+ * requiresShipping
1545
+ * title
1546
+ * image {
1547
+ * originalSrc
1548
+ * altText
1549
+ * }
1550
+ * product {
1551
+ * handle
1552
+ * title
1553
+ * }
1554
+ * selectedOptions {
1555
+ * name
1556
+ * value
1557
+ * }
1558
+ * }
1559
+ * }
1560
+ * }
1561
+ * }
1562
+ * }
1563
+ * estimatedCost {
1564
+ * subtotalAmount {
1565
+ * currencyCode
1566
+ * amount
1567
+ * }
1568
+ * totalAmount {
1569
+ * currencyCode
1570
+ * amount
1571
+ * }
1572
+ * totalDutyAmount {
1573
+ * currencyCode
1574
+ * amount
1575
+ * }
1576
+ * totalTaxAmount {
1577
+ * currencyCode
1578
+ * amount
1579
+ * }
1580
+ * }
1581
+ * note
1582
+ * attributes {
1583
+ * key
1584
+ * value
1585
+ * }
1586
+ * discountCodes {
1587
+ * code
1588
+ * }
1589
+ * }
1590
+ *
1591
+ *```
1592
+ */
1593
+ export const CartNoteUpdate = `
1594
+ mutation CartNoteUpdate($cartId: ID!, $note: String, $numCartLines: Int = 250) {
1595
+ cartNoteUpdate(cartId: $cartId, note: $note) {
1596
+ cart {
1597
+ ...CartFragment
1598
+ }
1599
+ }
1600
+ }
1601
+
1602
+ fragment CartFragment on Cart {
1603
+ id
1604
+ checkoutUrl
1605
+ buyerIdentity {
1606
+ countryCode
1607
+ customer {
1608
+ id
1609
+ email
1610
+ firstName
1611
+ lastName
1612
+ displayName
1613
+ }
1614
+ email
1615
+ phone
1616
+ }
1617
+ lines(first: $numCartLines) {
1618
+ edges {
1619
+ node {
1620
+ id
1621
+ quantity
1622
+ attributes {
1623
+ key
1624
+ value
1625
+ }
1626
+ merchandise {
1627
+ ... on ProductVariant {
1628
+ id
1629
+ availableForSale
1630
+ compareAtPriceV2 {
1631
+ amount
1632
+ currencyCode
1633
+ }
1634
+ priceV2 {
1635
+ amount
1636
+ currencyCode
1637
+ }
1638
+ requiresShipping
1639
+ title
1640
+ image {
1641
+ originalSrc
1642
+ altText
1643
+ }
1644
+ product {
1645
+ handle
1646
+ title
1647
+ }
1648
+ selectedOptions {
1649
+ name
1650
+ value
1651
+ }
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ estimatedCost {
1658
+ subtotalAmount {
1659
+ currencyCode
1660
+ amount
1661
+ }
1662
+ totalAmount {
1663
+ currencyCode
1664
+ amount
1665
+ }
1666
+ totalDutyAmount {
1667
+ currencyCode
1668
+ amount
1669
+ }
1670
+ totalTaxAmount {
1671
+ currencyCode
1672
+ amount
1673
+ }
1674
+ }
1675
+ note
1676
+ attributes {
1677
+ key
1678
+ value
1679
+ }
1680
+ discountCodes {
1681
+ code
1682
+ }
1683
+ }
1684
+ `;
1685
+ /**
1686
+ *```
1687
+ *
1688
+ * query CartQuery($id: ID!, $numCartLines: Int = 250) {
1689
+ * cart(id: $id) {
1690
+ * ...CartFragment
1691
+ * }
1692
+ * }
1693
+ *
1694
+ * fragment CartFragment on Cart {
1695
+ * id
1696
+ * checkoutUrl
1697
+ * buyerIdentity {
1698
+ * countryCode
1699
+ * customer {
1700
+ * id
1701
+ * email
1702
+ * firstName
1703
+ * lastName
1704
+ * displayName
1705
+ * }
1706
+ * email
1707
+ * phone
1708
+ * }
1709
+ * lines(first: $numCartLines) {
1710
+ * edges {
1711
+ * node {
1712
+ * id
1713
+ * quantity
1714
+ * attributes {
1715
+ * key
1716
+ * value
1717
+ * }
1718
+ * merchandise {
1719
+ * ... on ProductVariant {
1720
+ * id
1721
+ * availableForSale
1722
+ * compareAtPriceV2 {
1723
+ * amount
1724
+ * currencyCode
1725
+ * }
1726
+ * priceV2 {
1727
+ * amount
1728
+ * currencyCode
1729
+ * }
1730
+ * requiresShipping
1731
+ * title
1732
+ * image {
1733
+ * originalSrc
1734
+ * altText
1735
+ * }
1736
+ * product {
1737
+ * handle
1738
+ * title
1739
+ * }
1740
+ * selectedOptions {
1741
+ * name
1742
+ * value
1743
+ * }
1744
+ * }
1745
+ * }
1746
+ * }
1747
+ * }
1748
+ * }
1749
+ * estimatedCost {
1750
+ * subtotalAmount {
1751
+ * currencyCode
1752
+ * amount
1753
+ * }
1754
+ * totalAmount {
1755
+ * currencyCode
1756
+ * amount
1757
+ * }
1758
+ * totalDutyAmount {
1759
+ * currencyCode
1760
+ * amount
1761
+ * }
1762
+ * totalTaxAmount {
1763
+ * currencyCode
1764
+ * amount
1765
+ * }
1766
+ * }
1767
+ * note
1768
+ * attributes {
1769
+ * key
1770
+ * value
1771
+ * }
1772
+ * discountCodes {
1773
+ * code
1774
+ * }
1775
+ * }
1776
+ *
1777
+ *```
1778
+ */
1779
+ export const CartQuery = `
1780
+ query CartQuery($id: ID!, $numCartLines: Int = 250) {
1781
+ cart(id: $id) {
1782
+ ...CartFragment
1783
+ }
1784
+ }
1785
+
1786
+ fragment CartFragment on Cart {
1787
+ id
1788
+ checkoutUrl
1789
+ buyerIdentity {
1790
+ countryCode
1791
+ customer {
1792
+ id
1793
+ email
1794
+ firstName
1795
+ lastName
1796
+ displayName
1797
+ }
1798
+ email
1799
+ phone
1800
+ }
1801
+ lines(first: $numCartLines) {
1802
+ edges {
1803
+ node {
1804
+ id
1805
+ quantity
1806
+ attributes {
1807
+ key
1808
+ value
1809
+ }
1810
+ merchandise {
1811
+ ... on ProductVariant {
1812
+ id
1813
+ availableForSale
1814
+ compareAtPriceV2 {
1815
+ amount
1816
+ currencyCode
1817
+ }
1818
+ priceV2 {
1819
+ amount
1820
+ currencyCode
1821
+ }
1822
+ requiresShipping
1823
+ title
1824
+ image {
1825
+ originalSrc
1826
+ altText
1827
+ }
1828
+ product {
1829
+ handle
1830
+ title
1831
+ }
1832
+ selectedOptions {
1833
+ name
1834
+ value
1835
+ }
1836
+ }
1837
+ }
1838
+ }
1839
+ }
1840
+ }
1841
+ estimatedCost {
1842
+ subtotalAmount {
1843
+ currencyCode
1844
+ amount
1845
+ }
1846
+ totalAmount {
1847
+ currencyCode
1848
+ amount
1849
+ }
1850
+ totalDutyAmount {
1851
+ currencyCode
1852
+ amount
1853
+ }
1854
+ totalTaxAmount {
1855
+ currencyCode
1856
+ amount
1857
+ }
1858
+ }
1859
+ note
1860
+ attributes {
1861
+ key
1862
+ value
1863
+ }
1864
+ discountCodes {
1865
+ code
1866
+ }
1867
+ }
1868
+ `;
1869
+ /**
1870
+ *```
1871
+ * fragment ExternalVideoFragment on ExternalVideo {
1872
+ * id
1873
+ * embeddedUrl
1874
+ * host
1875
+ * }
1876
+ *
1877
+
1878
+ *```
1879
+ */
1880
+ export const ExternalVideoFragment = `fragment ExternalVideoFragment on ExternalVideo {
1881
+ id
1882
+ embeddedUrl
1883
+ host
1884
+ }
1885
+
1886
+ `;
1887
+ /**
1888
+ *```
1889
+ * fragment ImageFragment on Image {
1890
+ * id
1891
+ * originalSrc
1892
+ * altText
1893
+ * }
1894
+ *
1895
+
1896
+ *```
1897
+ */
1898
+ export const ImageFragment = `fragment ImageFragment on Image {
1899
+ id
1900
+ originalSrc
1901
+ altText
1902
+ }
1903
+
1904
+ `;
1905
+ /**
1906
+ *```
1907
+ * query Localization {
1908
+ * localization {
1909
+ * country {
1910
+ * isoCode
1911
+ * name
1912
+ * }
1913
+ * availableCountries {
1914
+ * isoCode
1915
+ * name
1916
+ * }
1917
+ * }
1918
+ * }
1919
+ *
1920
+
1921
+ *```
1922
+ */
1923
+ export const Localization = `query Localization {
1924
+ localization {
1925
+ country {
1926
+ isoCode
1927
+ name
1928
+ }
1929
+ availableCountries {
1930
+ isoCode
1931
+ name
1932
+ }
1933
+ }
1934
+ }
1935
+
1936
+ `;
1937
+ /**
1938
+ *```
1939
+ *
1940
+ * fragment MediaFileFragment on Media {
1941
+ * ... on MediaImage {
1942
+ * mediaContentType
1943
+ * image {
1944
+ * ...ImageFragment
1945
+ * }
1946
+ * }
1947
+ * ... on Video {
1948
+ * mediaContentType
1949
+ * ...VideoFragment
1950
+ * }
1951
+ * ... on ExternalVideo {
1952
+ * mediaContentType
1953
+ * ...ExternalVideoFragment
1954
+ * }
1955
+ * ... on Model3d {
1956
+ * mediaContentType
1957
+ * ...Model3DFragment
1958
+ * }
1959
+ * }
1960
+ *
1961
+ * fragment ImageFragment on Image {
1962
+ * id
1963
+ * originalSrc
1964
+ * altText
1965
+ * }
1966
+ *
1967
+ * fragment VideoFragment on Video {
1968
+ * id
1969
+ * previewImage {
1970
+ * originalSrc
1971
+ * }
1972
+ * sources {
1973
+ * mimeType
1974
+ * url
1975
+ * }
1976
+ * }
1977
+ *
1978
+ * fragment ExternalVideoFragment on ExternalVideo {
1979
+ * id
1980
+ * embeddedUrl
1981
+ * host
1982
+ * }
1983
+ *
1984
+ * fragment Model3DFragment on Model3d {
1985
+ * id
1986
+ * alt
1987
+ * mediaContentType
1988
+ * previewImage {
1989
+ * originalSrc
1990
+ * }
1991
+ * sources {
1992
+ * url
1993
+ * }
1994
+ * }
1995
+ *
1996
+ *```
1997
+ */
1998
+ export const MediaFileFragment = `
1999
+ fragment MediaFileFragment on Media {
2000
+ ... on MediaImage {
2001
+ mediaContentType
2002
+ image {
2003
+ ...ImageFragment
2004
+ }
2005
+ }
2006
+ ... on Video {
2007
+ mediaContentType
2008
+ ...VideoFragment
2009
+ }
2010
+ ... on ExternalVideo {
2011
+ mediaContentType
2012
+ ...ExternalVideoFragment
2013
+ }
2014
+ ... on Model3d {
2015
+ mediaContentType
2016
+ ...Model3DFragment
2017
+ }
2018
+ }
2019
+
2020
+ fragment ImageFragment on Image {
2021
+ id
2022
+ originalSrc
2023
+ altText
2024
+ }
2025
+
2026
+ fragment VideoFragment on Video {
2027
+ id
2028
+ previewImage {
2029
+ originalSrc
2030
+ }
2031
+ sources {
2032
+ mimeType
2033
+ url
2034
+ }
2035
+ }
2036
+
2037
+ fragment ExternalVideoFragment on ExternalVideo {
2038
+ id
2039
+ embeddedUrl
2040
+ host
2041
+ }
2042
+
2043
+ fragment Model3DFragment on Model3d {
2044
+ id
2045
+ alt
2046
+ mediaContentType
2047
+ previewImage {
2048
+ originalSrc
2049
+ }
2050
+ sources {
2051
+ url
2052
+ }
2053
+ }
2054
+ `;
2055
+ /**
2056
+ *```
2057
+ * fragment MetafieldFragment on Metafield {
2058
+ * id
2059
+ * type
2060
+ * namespace
2061
+ * key
2062
+ * value
2063
+ * createdAt
2064
+ * updatedAt
2065
+ * description
2066
+ * }
2067
+
2068
+ *```
2069
+ */
2070
+ export const MetafieldFragment = `fragment MetafieldFragment on Metafield {
2071
+ id
2072
+ type
2073
+ namespace
2074
+ key
2075
+ value
2076
+ createdAt
2077
+ updatedAt
2078
+ description
2079
+ }
2080
+ `;
2081
+ /**
2082
+ *```
2083
+ * fragment Model3DFragment on Model3d {
2084
+ * id
2085
+ * alt
2086
+ * mediaContentType
2087
+ * previewImage {
2088
+ * originalSrc
2089
+ * }
2090
+ * sources {
2091
+ * url
2092
+ * }
2093
+ * }
2094
+ *
2095
+
2096
+ *```
2097
+ */
2098
+ export const Model3DFragment = `fragment Model3DFragment on Model3d {
2099
+ id
2100
+ alt
2101
+ mediaContentType
2102
+ previewImage {
2103
+ originalSrc
2104
+ }
2105
+ sources {
2106
+ url
2107
+ }
2108
+ }
2109
+
2110
+ `;
2111
+ /**
2112
+ *```
2113
+ *
2114
+ * fragment ProductProviderFragment on Product {
2115
+ * availableForSale
2116
+ * compareAtPriceRange {
2117
+ * maxVariantPrice {
2118
+ * currencyCode
2119
+ * amount
2120
+ * }
2121
+ * minVariantPrice {
2122
+ * currencyCode
2123
+ * amount
2124
+ * }
2125
+ * }
2126
+ * createdAt
2127
+ * description
2128
+ * descriptionHtml
2129
+ * handle
2130
+ * id
2131
+ * media(first: $numProductMedia) {
2132
+ * edges {
2133
+ * node {
2134
+ * ...MediaFileFragment
2135
+ * }
2136
+ * }
2137
+ * }
2138
+ * metafields(first: $numProductMetafields) {
2139
+ * edges {
2140
+ * node {
2141
+ * ...MetafieldFragment
2142
+ * }
2143
+ * }
2144
+ * }
2145
+ * onlineStoreUrl
2146
+ * priceRange {
2147
+ * maxVariantPrice {
2148
+ * currencyCode
2149
+ * amount
2150
+ * }
2151
+ * minVariantPrice {
2152
+ * currencyCode
2153
+ * amount
2154
+ * }
2155
+ * }
2156
+ * productType
2157
+ * publishedAt
2158
+ * requiresSellingPlan
2159
+ * tags
2160
+ * title
2161
+ * totalInventory
2162
+ * updatedAt
2163
+ * vendor
2164
+ * variants(first: $numProductVariants) {
2165
+ * edges {
2166
+ * node {
2167
+ * id
2168
+ * title
2169
+ * availableForSale
2170
+ * image {
2171
+ * originalSrc
2172
+ * altText
2173
+ * id
2174
+ * }
2175
+ * unitPriceMeasurement {
2176
+ * measuredType
2177
+ * quantityUnit
2178
+ * quantityValue
2179
+ * referenceUnit
2180
+ * referenceValue
2181
+ * }
2182
+ * unitPrice {
2183
+ * amount
2184
+ * currencyCode
2185
+ * }
2186
+ * priceV2 {
2187
+ * amount
2188
+ * currencyCode
2189
+ * }
2190
+ * compareAtPriceV2 {
2191
+ * amount
2192
+ * currencyCode
2193
+ * }
2194
+ * selectedOptions {
2195
+ * name
2196
+ * value
2197
+ * }
2198
+ * metafields(first: $numProductVariantMetafields) {
2199
+ * edges {
2200
+ * node {
2201
+ * ...MetafieldFragment
2202
+ * }
2203
+ * }
2204
+ * }
2205
+ * }
2206
+ * }
2207
+ * }
2208
+ * }
2209
+ *
2210
+ * fragment ImageFragment on Image {
2211
+ * id
2212
+ * originalSrc
2213
+ * altText
2214
+ * }
2215
+ *
2216
+ *
2217
+ * fragment MediaFileFragment on Media {
2218
+ * ... on MediaImage {
2219
+ * mediaContentType
2220
+ * image {
2221
+ * ...ImageFragment
2222
+ * }
2223
+ * }
2224
+ * ... on Video {
2225
+ * mediaContentType
2226
+ * ...VideoFragment
2227
+ * }
2228
+ * ... on ExternalVideo {
2229
+ * mediaContentType
2230
+ * ...ExternalVideoFragment
2231
+ * }
2232
+ * ... on Model3d {
2233
+ * mediaContentType
2234
+ * ...Model3DFragment
2235
+ * }
2236
+ * }
2237
+ *
2238
+ * fragment MetafieldFragment on Metafield {
2239
+ * id
2240
+ * type
2241
+ * namespace
2242
+ * key
2243
+ * value
2244
+ * createdAt
2245
+ * updatedAt
2246
+ * description
2247
+ * }
2248
+ * fragment ImageFragment on Image {
2249
+ * id
2250
+ * originalSrc
2251
+ * altText
2252
+ * }
2253
+ *
2254
+ * fragment VideoFragment on Video {
2255
+ * id
2256
+ * previewImage {
2257
+ * originalSrc
2258
+ * }
2259
+ * sources {
2260
+ * mimeType
2261
+ * url
2262
+ * }
2263
+ * }
2264
+ *
2265
+ * fragment ExternalVideoFragment on ExternalVideo {
2266
+ * id
2267
+ * embeddedUrl
2268
+ * host
2269
+ * }
2270
+ *
2271
+ * fragment Model3DFragment on Model3d {
2272
+ * id
2273
+ * alt
2274
+ * mediaContentType
2275
+ * previewImage {
2276
+ * originalSrc
2277
+ * }
2278
+ * sources {
2279
+ * url
2280
+ * }
2281
+ * }
2282
+ *
2283
+ *```
2284
+ */
2285
+ export const ProductProviderFragment = `
2286
+ fragment ProductProviderFragment on Product {
2287
+ availableForSale
2288
+ compareAtPriceRange {
2289
+ maxVariantPrice {
2290
+ currencyCode
2291
+ amount
2292
+ }
2293
+ minVariantPrice {
2294
+ currencyCode
2295
+ amount
2296
+ }
2297
+ }
2298
+ createdAt
2299
+ description
2300
+ descriptionHtml
2301
+ handle
2302
+ id
2303
+ media(first: $numProductMedia) {
2304
+ edges {
2305
+ node {
2306
+ ...MediaFileFragment
2307
+ }
2308
+ }
2309
+ }
2310
+ metafields(first: $numProductMetafields) {
2311
+ edges {
2312
+ node {
2313
+ ...MetafieldFragment
2314
+ }
2315
+ }
2316
+ }
2317
+ onlineStoreUrl
2318
+ priceRange {
2319
+ maxVariantPrice {
2320
+ currencyCode
2321
+ amount
2322
+ }
2323
+ minVariantPrice {
2324
+ currencyCode
2325
+ amount
2326
+ }
2327
+ }
2328
+ productType
2329
+ publishedAt
2330
+ requiresSellingPlan
2331
+ tags
2332
+ title
2333
+ totalInventory
2334
+ updatedAt
2335
+ vendor
2336
+ variants(first: $numProductVariants) {
2337
+ edges {
2338
+ node {
2339
+ id
2340
+ title
2341
+ availableForSale
2342
+ image {
2343
+ originalSrc
2344
+ altText
2345
+ id
2346
+ }
2347
+ unitPriceMeasurement {
2348
+ measuredType
2349
+ quantityUnit
2350
+ quantityValue
2351
+ referenceUnit
2352
+ referenceValue
2353
+ }
2354
+ unitPrice {
2355
+ amount
2356
+ currencyCode
2357
+ }
2358
+ priceV2 {
2359
+ amount
2360
+ currencyCode
2361
+ }
2362
+ compareAtPriceV2 {
2363
+ amount
2364
+ currencyCode
2365
+ }
2366
+ selectedOptions {
2367
+ name
2368
+ value
2369
+ }
2370
+ metafields(first: $numProductVariantMetafields) {
2371
+ edges {
2372
+ node {
2373
+ ...MetafieldFragment
2374
+ }
2375
+ }
2376
+ }
2377
+ }
2378
+ }
2379
+ }
2380
+ }
2381
+
2382
+ fragment ImageFragment on Image {
2383
+ id
2384
+ originalSrc
2385
+ altText
2386
+ }
2387
+
2388
+
2389
+ fragment MediaFileFragment on Media {
2390
+ ... on MediaImage {
2391
+ mediaContentType
2392
+ image {
2393
+ ...ImageFragment
2394
+ }
2395
+ }
2396
+ ... on Video {
2397
+ mediaContentType
2398
+ ...VideoFragment
2399
+ }
2400
+ ... on ExternalVideo {
2401
+ mediaContentType
2402
+ ...ExternalVideoFragment
2403
+ }
2404
+ ... on Model3d {
2405
+ mediaContentType
2406
+ ...Model3DFragment
2407
+ }
2408
+ }
2409
+
2410
+ fragment MetafieldFragment on Metafield {
2411
+ id
2412
+ type
2413
+ namespace
2414
+ key
2415
+ value
2416
+ createdAt
2417
+ updatedAt
2418
+ description
2419
+ }
2420
+ fragment ImageFragment on Image {
2421
+ id
2422
+ originalSrc
2423
+ altText
2424
+ }
2425
+
2426
+ fragment VideoFragment on Video {
2427
+ id
2428
+ previewImage {
2429
+ originalSrc
2430
+ }
2431
+ sources {
2432
+ mimeType
2433
+ url
2434
+ }
2435
+ }
2436
+
2437
+ fragment ExternalVideoFragment on ExternalVideo {
2438
+ id
2439
+ embeddedUrl
2440
+ host
2441
+ }
2442
+
2443
+ fragment Model3DFragment on Model3d {
2444
+ id
2445
+ alt
2446
+ mediaContentType
2447
+ previewImage {
2448
+ originalSrc
2449
+ }
2450
+ sources {
2451
+ url
2452
+ }
2453
+ }
2454
+ `;
2455
+ /**
2456
+ *```
2457
+ * fragment VideoFragment on Video {
2458
+ * id
2459
+ * previewImage {
2460
+ * originalSrc
2461
+ * }
2462
+ * sources {
2463
+ * mimeType
2464
+ * url
2465
+ * }
2466
+ * }
2467
+ *
2468
+
2469
+ *```
2470
+ */
2471
+ export const VideoFragment = `fragment VideoFragment on Video {
2472
+ id
2473
+ previewImage {
2474
+ originalSrc
2475
+ }
2476
+ sources {
2477
+ mimeType
2478
+ url
2479
+ }
2480
+ }
2481
+
2482
+ `;