@shopify/shopify-api 3.1.2 → 4.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 (329) hide show
  1. package/CHANGELOG.md +73 -53
  2. package/dist/auth/session/session-utils.d.ts.map +1 -1
  3. package/dist/auth/session/session-utils.js +17 -5
  4. package/dist/auth/session/storage/__tests__/battery-of-tests.d.ts.map +1 -1
  5. package/dist/auth/session/storage/__tests__/battery-of-tests.js +32 -21
  6. package/dist/auth/session/storage/postgresql.js +4 -4
  7. package/dist/base-types.d.ts +2 -1
  8. package/dist/base-types.d.ts.map +1 -1
  9. package/dist/base-types.js +3 -2
  10. package/dist/error.d.ts +2 -0
  11. package/dist/error.d.ts.map +1 -1
  12. package/dist/error.js +9 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/rest-resources/{2021-07 → 2022-07}/abandoned_checkout.d.ts +3 -0
  16. package/dist/rest-resources/2022-07/abandoned_checkout.d.ts.map +1 -0
  17. package/dist/rest-resources/{2021-07 → 2022-07}/abandoned_checkout.js +4 -1
  18. package/dist/rest-resources/{2021-07 → 2022-07}/access_scope.d.ts +3 -0
  19. package/dist/rest-resources/2022-07/access_scope.d.ts.map +1 -0
  20. package/dist/rest-resources/{2021-07 → 2022-07}/access_scope.js +4 -1
  21. package/dist/rest-resources/{2021-07 → 2022-07}/android_pay_key.d.ts +3 -0
  22. package/dist/rest-resources/2022-07/android_pay_key.d.ts.map +1 -0
  23. package/dist/rest-resources/{2021-07 → 2022-07}/android_pay_key.js +4 -1
  24. package/dist/rest-resources/{2021-07 → 2022-07}/apple_pay_certificate.d.ts +3 -0
  25. package/dist/rest-resources/2022-07/apple_pay_certificate.d.ts.map +1 -0
  26. package/dist/rest-resources/{2021-07 → 2022-07}/apple_pay_certificate.js +4 -1
  27. package/dist/rest-resources/{2021-07 → 2022-07}/application_charge.d.ts +3 -0
  28. package/dist/rest-resources/2022-07/application_charge.d.ts.map +1 -0
  29. package/dist/rest-resources/{2021-07 → 2022-07}/application_charge.js +4 -1
  30. package/dist/rest-resources/{2021-07 → 2022-07}/application_credit.d.ts +3 -0
  31. package/dist/rest-resources/2022-07/application_credit.d.ts.map +1 -0
  32. package/dist/rest-resources/{2021-07 → 2022-07}/application_credit.js +4 -1
  33. package/dist/rest-resources/{2021-07 → 2022-07}/article.d.ts +3 -0
  34. package/dist/rest-resources/2022-07/article.d.ts.map +1 -0
  35. package/dist/rest-resources/{2021-07 → 2022-07}/article.js +4 -1
  36. package/dist/rest-resources/{2021-07 → 2022-07}/asset.d.ts +3 -0
  37. package/dist/rest-resources/2022-07/asset.d.ts.map +1 -0
  38. package/dist/rest-resources/{2021-07 → 2022-07}/asset.js +4 -1
  39. package/dist/rest-resources/{2021-07 → 2022-07}/assigned_fulfillment_order.d.ts +3 -0
  40. package/dist/rest-resources/2022-07/assigned_fulfillment_order.d.ts.map +1 -0
  41. package/dist/rest-resources/{2021-07 → 2022-07}/assigned_fulfillment_order.js +4 -1
  42. package/dist/rest-resources/{2021-07 → 2022-07}/balance.d.ts +3 -0
  43. package/dist/rest-resources/2022-07/balance.d.ts.map +1 -0
  44. package/dist/rest-resources/{2021-07 → 2022-07}/balance.js +4 -1
  45. package/dist/rest-resources/{2021-07 → 2022-07}/blog.d.ts +3 -0
  46. package/dist/rest-resources/2022-07/blog.d.ts.map +1 -0
  47. package/dist/rest-resources/{2021-07 → 2022-07}/blog.js +4 -1
  48. package/dist/rest-resources/{2021-07 → 2022-07}/cancellation_request.d.ts +3 -0
  49. package/dist/rest-resources/2022-07/cancellation_request.d.ts.map +1 -0
  50. package/dist/rest-resources/{2021-07 → 2022-07}/cancellation_request.js +4 -1
  51. package/dist/rest-resources/{2021-07 → 2022-07}/carrier_service.d.ts +3 -1
  52. package/dist/rest-resources/2022-07/carrier_service.d.ts.map +1 -0
  53. package/dist/rest-resources/{2021-07 → 2022-07}/carrier_service.js +4 -1
  54. package/dist/rest-resources/{2021-07 → 2022-07}/checkout.d.ts +3 -0
  55. package/dist/rest-resources/2022-07/checkout.d.ts.map +1 -0
  56. package/dist/rest-resources/{2021-07 → 2022-07}/checkout.js +4 -1
  57. package/dist/rest-resources/{2021-07 → 2022-07}/collect.d.ts +3 -0
  58. package/dist/rest-resources/2022-07/collect.d.ts.map +1 -0
  59. package/dist/rest-resources/{2021-07 → 2022-07}/collect.js +4 -1
  60. package/dist/rest-resources/{2021-07 → 2022-07}/collection.d.ts +3 -0
  61. package/dist/rest-resources/2022-07/collection.d.ts.map +1 -0
  62. package/dist/rest-resources/{2021-07 → 2022-07}/collection.js +4 -1
  63. package/dist/rest-resources/{2021-07 → 2022-07}/collection_listing.d.ts +3 -0
  64. package/dist/rest-resources/2022-07/collection_listing.d.ts.map +1 -0
  65. package/dist/rest-resources/{2021-07 → 2022-07}/collection_listing.js +4 -1
  66. package/dist/rest-resources/{2021-07 → 2022-07}/comment.d.ts +3 -0
  67. package/dist/rest-resources/2022-07/comment.d.ts.map +1 -0
  68. package/dist/rest-resources/{2021-07 → 2022-07}/comment.js +4 -1
  69. package/dist/rest-resources/{2021-07 → 2022-07}/country.d.ts +3 -0
  70. package/dist/rest-resources/2022-07/country.d.ts.map +1 -0
  71. package/dist/rest-resources/{2021-07 → 2022-07}/country.js +4 -1
  72. package/dist/rest-resources/{2021-07 → 2022-07}/currency.d.ts +3 -0
  73. package/dist/rest-resources/2022-07/currency.d.ts.map +1 -0
  74. package/dist/rest-resources/{2021-07 → 2022-07}/currency.js +4 -1
  75. package/dist/rest-resources/{2021-07 → 2022-07}/custom_collection.d.ts +3 -0
  76. package/dist/rest-resources/2022-07/custom_collection.d.ts.map +1 -0
  77. package/dist/rest-resources/{2021-07 → 2022-07}/custom_collection.js +4 -1
  78. package/dist/rest-resources/{2021-07 → 2022-07}/customer.d.ts +11 -0
  79. package/dist/rest-resources/2022-07/customer.d.ts.map +1 -0
  80. package/dist/rest-resources/{2021-07 → 2022-07}/customer.js +4 -1
  81. package/dist/rest-resources/{2021-07 → 2022-07}/customer_address.d.ts +3 -0
  82. package/dist/rest-resources/2022-07/customer_address.d.ts.map +1 -0
  83. package/dist/rest-resources/{2021-07 → 2022-07}/customer_address.js +4 -1
  84. package/dist/rest-resources/{2021-07 → 2022-07}/customer_saved_search.d.ts +3 -0
  85. package/dist/rest-resources/2022-07/customer_saved_search.d.ts.map +1 -0
  86. package/dist/rest-resources/{2021-07 → 2022-07}/customer_saved_search.js +4 -1
  87. package/dist/rest-resources/{2021-07 → 2022-07}/deprecated_api_call.d.ts +3 -0
  88. package/dist/rest-resources/2022-07/deprecated_api_call.d.ts.map +1 -0
  89. package/dist/rest-resources/{2021-07 → 2022-07}/deprecated_api_call.js +4 -1
  90. package/dist/rest-resources/{2021-07 → 2022-07}/discount_code.d.ts +3 -0
  91. package/dist/rest-resources/2022-07/discount_code.d.ts.map +1 -0
  92. package/dist/rest-resources/{2021-07 → 2022-07}/discount_code.js +4 -1
  93. package/dist/rest-resources/{2021-07 → 2022-07}/dispute.d.ts +3 -0
  94. package/dist/rest-resources/2022-07/dispute.d.ts.map +1 -0
  95. package/dist/rest-resources/{2021-07 → 2022-07}/dispute.js +4 -1
  96. package/dist/rest-resources/2022-07/dispute_evidence.d.ts +56 -0
  97. package/dist/rest-resources/2022-07/dispute_evidence.d.ts.map +1 -0
  98. package/dist/rest-resources/2022-07/dispute_evidence.js +48 -0
  99. package/dist/rest-resources/2022-07/dispute_file_upload.d.ts +35 -0
  100. package/dist/rest-resources/2022-07/dispute_file_upload.d.ts.map +1 -0
  101. package/dist/rest-resources/2022-07/dispute_file_upload.js +46 -0
  102. package/dist/rest-resources/{2021-07 → 2022-07}/draft_order.d.ts +8 -1
  103. package/dist/rest-resources/2022-07/draft_order.d.ts.map +1 -0
  104. package/dist/rest-resources/{2021-07 → 2022-07}/draft_order.js +9 -6
  105. package/dist/rest-resources/{2021-07 → 2022-07}/event.d.ts +3 -0
  106. package/dist/rest-resources/2022-07/event.d.ts.map +1 -0
  107. package/dist/rest-resources/{2021-07 → 2022-07}/event.js +4 -1
  108. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment.d.ts +13 -0
  109. package/dist/rest-resources/2022-07/fulfillment.d.ts.map +1 -0
  110. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment.js +28 -1
  111. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_event.d.ts +3 -0
  112. package/dist/rest-resources/2022-07/fulfillment_event.d.ts.map +1 -0
  113. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_event.js +4 -1
  114. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_order.d.ts +33 -0
  115. package/dist/rest-resources/2022-07/fulfillment_order.d.ts.map +1 -0
  116. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_order.js +74 -2
  117. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_request.d.ts +6 -1
  118. package/dist/rest-resources/2022-07/fulfillment_request.d.ts.map +1 -0
  119. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_request.js +9 -6
  120. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_service.d.ts +4 -1
  121. package/dist/rest-resources/2022-07/fulfillment_service.d.ts.map +1 -0
  122. package/dist/rest-resources/{2021-07 → 2022-07}/fulfillment_service.js +4 -1
  123. package/dist/rest-resources/{2021-07 → 2022-07}/gift_card.d.ts +3 -0
  124. package/dist/rest-resources/2022-07/gift_card.d.ts.map +1 -0
  125. package/dist/rest-resources/{2021-07 → 2022-07}/gift_card.js +4 -1
  126. package/dist/rest-resources/{2021-07 → 2022-07}/gift_card_adjustment.d.ts +3 -0
  127. package/dist/rest-resources/2022-07/gift_card_adjustment.d.ts.map +1 -0
  128. package/dist/rest-resources/{2021-07 → 2022-07}/gift_card_adjustment.js +4 -1
  129. package/dist/rest-resources/{2021-07 → 2022-07}/image.d.ts +3 -0
  130. package/dist/rest-resources/2022-07/image.d.ts.map +1 -0
  131. package/dist/rest-resources/{2021-07 → 2022-07}/image.js +4 -1
  132. package/dist/rest-resources/{2021-07 → 2022-07}/index.d.ts +2 -0
  133. package/dist/rest-resources/2022-07/index.d.ts.map +1 -0
  134. package/dist/rest-resources/{2021-07 → 2022-07}/index.js +6 -2
  135. package/dist/rest-resources/{2021-07 → 2022-07}/inventory_item.d.ts +3 -0
  136. package/dist/rest-resources/2022-07/inventory_item.d.ts.map +1 -0
  137. package/dist/rest-resources/{2021-07 → 2022-07}/inventory_item.js +4 -1
  138. package/dist/rest-resources/{2021-07 → 2022-07}/inventory_level.d.ts +3 -0
  139. package/dist/rest-resources/2022-07/inventory_level.d.ts.map +1 -0
  140. package/dist/rest-resources/{2021-07 → 2022-07}/inventory_level.js +4 -1
  141. package/dist/rest-resources/{2021-07 → 2022-07}/location.d.ts +3 -0
  142. package/dist/rest-resources/2022-07/location.d.ts.map +1 -0
  143. package/dist/rest-resources/{2021-07 → 2022-07}/location.js +4 -1
  144. package/dist/rest-resources/{2021-07 → 2022-07}/locations_for_move.d.ts +3 -0
  145. package/dist/rest-resources/2022-07/locations_for_move.d.ts.map +1 -0
  146. package/dist/rest-resources/{2021-07 → 2022-07}/locations_for_move.js +4 -1
  147. package/dist/rest-resources/{2021-07 → 2022-07}/marketing_event.d.ts +3 -0
  148. package/dist/rest-resources/2022-07/marketing_event.d.ts.map +1 -0
  149. package/dist/rest-resources/{2021-07 → 2022-07}/marketing_event.js +4 -1
  150. package/dist/rest-resources/{2021-07 → 2022-07}/metafield.d.ts +3 -0
  151. package/dist/rest-resources/2022-07/metafield.d.ts.map +1 -0
  152. package/dist/rest-resources/{2021-07 → 2022-07}/metafield.js +4 -1
  153. package/dist/rest-resources/{2021-07 → 2022-07}/mobile_platform_application.d.ts +3 -0
  154. package/dist/rest-resources/2022-07/mobile_platform_application.d.ts.map +1 -0
  155. package/dist/rest-resources/{2021-07 → 2022-07}/mobile_platform_application.js +4 -1
  156. package/dist/rest-resources/{2021-07 → 2022-07}/order.d.ts +6 -0
  157. package/dist/rest-resources/2022-07/order.d.ts.map +1 -0
  158. package/dist/rest-resources/{2021-07 → 2022-07}/order.js +4 -1
  159. package/dist/rest-resources/{2021-07 → 2022-07}/order_risk.d.ts +3 -0
  160. package/dist/rest-resources/2022-07/order_risk.d.ts.map +1 -0
  161. package/dist/rest-resources/{2021-07 → 2022-07}/order_risk.js +4 -1
  162. package/dist/rest-resources/{2021-07 → 2022-07}/page.d.ts +3 -0
  163. package/dist/rest-resources/2022-07/page.d.ts.map +1 -0
  164. package/dist/rest-resources/{2021-07 → 2022-07}/page.js +4 -1
  165. package/dist/rest-resources/{2021-07 → 2022-07}/payment.d.ts +3 -0
  166. package/dist/rest-resources/2022-07/payment.d.ts.map +1 -0
  167. package/dist/rest-resources/{2021-07 → 2022-07}/payment.js +4 -1
  168. package/dist/rest-resources/{2021-07 → 2022-07}/payment_gateway.d.ts +3 -0
  169. package/dist/rest-resources/2022-07/payment_gateway.d.ts.map +1 -0
  170. package/dist/rest-resources/{2021-07 → 2022-07}/payment_gateway.js +4 -1
  171. package/dist/rest-resources/{2021-07 → 2022-07}/payment_transaction.d.ts +3 -0
  172. package/dist/rest-resources/2022-07/payment_transaction.d.ts.map +1 -0
  173. package/dist/rest-resources/{2021-07 → 2022-07}/payment_transaction.js +4 -1
  174. package/dist/rest-resources/{2021-07 → 2022-07}/payout.d.ts +3 -0
  175. package/dist/rest-resources/2022-07/payout.d.ts.map +1 -0
  176. package/dist/rest-resources/{2021-07 → 2022-07}/payout.js +4 -1
  177. package/dist/rest-resources/{2021-07 → 2022-07}/policy.d.ts +3 -0
  178. package/dist/rest-resources/2022-07/policy.d.ts.map +1 -0
  179. package/dist/rest-resources/{2021-07 → 2022-07}/policy.js +4 -1
  180. package/dist/rest-resources/{2021-07 → 2022-07}/price_rule.d.ts +4 -1
  181. package/dist/rest-resources/2022-07/price_rule.d.ts.map +1 -0
  182. package/dist/rest-resources/{2021-07 → 2022-07}/price_rule.js +4 -1
  183. package/dist/rest-resources/{2021-07 → 2022-07}/product.d.ts +3 -0
  184. package/dist/rest-resources/2022-07/product.d.ts.map +1 -0
  185. package/dist/rest-resources/{2021-07 → 2022-07}/product.js +4 -1
  186. package/dist/rest-resources/{2021-07 → 2022-07}/product_listing.d.ts +3 -0
  187. package/dist/rest-resources/2022-07/product_listing.d.ts.map +1 -0
  188. package/dist/rest-resources/{2021-07 → 2022-07}/product_listing.js +4 -1
  189. package/dist/rest-resources/{2021-07 → 2022-07}/product_resource_feedback.d.ts +3 -0
  190. package/dist/rest-resources/2022-07/product_resource_feedback.d.ts.map +1 -0
  191. package/dist/rest-resources/{2021-07 → 2022-07}/product_resource_feedback.js +4 -1
  192. package/dist/rest-resources/{2021-07 → 2022-07}/province.d.ts +3 -0
  193. package/dist/rest-resources/2022-07/province.d.ts.map +1 -0
  194. package/dist/rest-resources/{2021-07 → 2022-07}/province.js +4 -1
  195. package/dist/rest-resources/{2021-07 → 2022-07}/recurring_application_charge.d.ts +3 -0
  196. package/dist/rest-resources/2022-07/recurring_application_charge.d.ts.map +1 -0
  197. package/dist/rest-resources/{2021-07 → 2022-07}/recurring_application_charge.js +4 -1
  198. package/dist/rest-resources/{2021-07 → 2022-07}/redirect.d.ts +3 -0
  199. package/dist/rest-resources/2022-07/redirect.d.ts.map +1 -0
  200. package/dist/rest-resources/{2021-07 → 2022-07}/redirect.js +4 -1
  201. package/dist/rest-resources/{2021-07 → 2022-07}/refund.d.ts +3 -0
  202. package/dist/rest-resources/2022-07/refund.d.ts.map +1 -0
  203. package/dist/rest-resources/{2021-07 → 2022-07}/refund.js +4 -1
  204. package/dist/rest-resources/{2021-07 → 2022-07}/report.d.ts +3 -0
  205. package/dist/rest-resources/2022-07/report.d.ts.map +1 -0
  206. package/dist/rest-resources/{2021-07 → 2022-07}/report.js +4 -1
  207. package/dist/rest-resources/{2021-07 → 2022-07}/resource_feedback.d.ts +3 -0
  208. package/dist/rest-resources/2022-07/resource_feedback.d.ts.map +1 -0
  209. package/dist/rest-resources/{2021-07 → 2022-07}/resource_feedback.js +4 -1
  210. package/dist/rest-resources/{2021-07 → 2022-07}/script_tag.d.ts +3 -0
  211. package/dist/rest-resources/2022-07/script_tag.d.ts.map +1 -0
  212. package/dist/rest-resources/{2021-07 → 2022-07}/script_tag.js +4 -1
  213. package/dist/rest-resources/{2021-07 → 2022-07}/shipping_zone.d.ts +3 -0
  214. package/dist/rest-resources/2022-07/shipping_zone.d.ts.map +1 -0
  215. package/dist/rest-resources/{2021-07 → 2022-07}/shipping_zone.js +4 -1
  216. package/dist/rest-resources/{2021-07 → 2022-07}/shop.d.ts +3 -0
  217. package/dist/rest-resources/2022-07/shop.d.ts.map +1 -0
  218. package/dist/rest-resources/{2021-07 → 2022-07}/shop.js +4 -1
  219. package/dist/rest-resources/{2021-07 → 2022-07}/smart_collection.d.ts +3 -0
  220. package/dist/rest-resources/2022-07/smart_collection.d.ts.map +1 -0
  221. package/dist/rest-resources/{2021-07 → 2022-07}/smart_collection.js +4 -1
  222. package/dist/rest-resources/{2021-07 → 2022-07}/storefront_access_token.d.ts +3 -0
  223. package/dist/rest-resources/2022-07/storefront_access_token.d.ts.map +1 -0
  224. package/dist/rest-resources/{2021-07 → 2022-07}/storefront_access_token.js +4 -1
  225. package/dist/rest-resources/{2021-07 → 2022-07}/tender_transaction.d.ts +3 -0
  226. package/dist/rest-resources/2022-07/tender_transaction.d.ts.map +1 -0
  227. package/dist/rest-resources/{2021-07 → 2022-07}/tender_transaction.js +4 -1
  228. package/dist/rest-resources/{2021-07 → 2022-07}/theme.d.ts +3 -0
  229. package/dist/rest-resources/2022-07/theme.d.ts.map +1 -0
  230. package/dist/rest-resources/{2021-07 → 2022-07}/theme.js +4 -1
  231. package/dist/rest-resources/{2021-07 → 2022-07}/transaction.d.ts +6 -0
  232. package/dist/rest-resources/2022-07/transaction.d.ts.map +1 -0
  233. package/dist/rest-resources/{2021-07 → 2022-07}/transaction.js +4 -1
  234. package/dist/rest-resources/{2021-07 → 2022-07}/usage_charge.d.ts +3 -0
  235. package/dist/rest-resources/2022-07/usage_charge.d.ts.map +1 -0
  236. package/dist/rest-resources/{2021-07 → 2022-07}/usage_charge.js +4 -1
  237. package/dist/rest-resources/{2021-07 → 2022-07}/user.d.ts +3 -0
  238. package/dist/rest-resources/2022-07/user.d.ts.map +1 -0
  239. package/dist/rest-resources/{2021-07 → 2022-07}/user.js +4 -1
  240. package/dist/rest-resources/{2021-07 → 2022-07}/variant.d.ts +3 -0
  241. package/dist/rest-resources/2022-07/variant.d.ts.map +1 -0
  242. package/dist/rest-resources/{2021-07 → 2022-07}/variant.js +4 -1
  243. package/dist/rest-resources/{2021-07 → 2022-07}/webhook.d.ts +3 -0
  244. package/dist/rest-resources/2022-07/webhook.d.ts.map +1 -0
  245. package/dist/rest-resources/{2021-07 → 2022-07}/webhook.js +4 -1
  246. package/dist/utils/get-embedded-app-url.d.ts +9 -0
  247. package/dist/utils/get-embedded-app-url.d.ts.map +1 -0
  248. package/dist/utils/get-embedded-app-url.js +26 -0
  249. package/dist/utils/index.d.ts +2 -0
  250. package/dist/utils/index.d.ts.map +1 -1
  251. package/dist/utils/index.js +2 -0
  252. package/dist/version.d.ts +1 -1
  253. package/dist/version.js +1 -1
  254. package/package.json +4 -4
  255. package/dist/rest-resources/2021-07/abandoned_checkout.d.ts.map +0 -1
  256. package/dist/rest-resources/2021-07/access_scope.d.ts.map +0 -1
  257. package/dist/rest-resources/2021-07/android_pay_key.d.ts.map +0 -1
  258. package/dist/rest-resources/2021-07/apple_pay_certificate.d.ts.map +0 -1
  259. package/dist/rest-resources/2021-07/application_charge.d.ts.map +0 -1
  260. package/dist/rest-resources/2021-07/application_credit.d.ts.map +0 -1
  261. package/dist/rest-resources/2021-07/article.d.ts.map +0 -1
  262. package/dist/rest-resources/2021-07/asset.d.ts.map +0 -1
  263. package/dist/rest-resources/2021-07/assigned_fulfillment_order.d.ts.map +0 -1
  264. package/dist/rest-resources/2021-07/balance.d.ts.map +0 -1
  265. package/dist/rest-resources/2021-07/blog.d.ts.map +0 -1
  266. package/dist/rest-resources/2021-07/cancellation_request.d.ts.map +0 -1
  267. package/dist/rest-resources/2021-07/carrier_service.d.ts.map +0 -1
  268. package/dist/rest-resources/2021-07/checkout.d.ts.map +0 -1
  269. package/dist/rest-resources/2021-07/collect.d.ts.map +0 -1
  270. package/dist/rest-resources/2021-07/collection.d.ts.map +0 -1
  271. package/dist/rest-resources/2021-07/collection_listing.d.ts.map +0 -1
  272. package/dist/rest-resources/2021-07/comment.d.ts.map +0 -1
  273. package/dist/rest-resources/2021-07/country.d.ts.map +0 -1
  274. package/dist/rest-resources/2021-07/currency.d.ts.map +0 -1
  275. package/dist/rest-resources/2021-07/custom_collection.d.ts.map +0 -1
  276. package/dist/rest-resources/2021-07/customer.d.ts.map +0 -1
  277. package/dist/rest-resources/2021-07/customer_address.d.ts.map +0 -1
  278. package/dist/rest-resources/2021-07/customer_saved_search.d.ts.map +0 -1
  279. package/dist/rest-resources/2021-07/deprecated_api_call.d.ts.map +0 -1
  280. package/dist/rest-resources/2021-07/discount_code.d.ts.map +0 -1
  281. package/dist/rest-resources/2021-07/dispute.d.ts.map +0 -1
  282. package/dist/rest-resources/2021-07/draft_order.d.ts.map +0 -1
  283. package/dist/rest-resources/2021-07/event.d.ts.map +0 -1
  284. package/dist/rest-resources/2021-07/fulfillment.d.ts.map +0 -1
  285. package/dist/rest-resources/2021-07/fulfillment_event.d.ts.map +0 -1
  286. package/dist/rest-resources/2021-07/fulfillment_order.d.ts.map +0 -1
  287. package/dist/rest-resources/2021-07/fulfillment_request.d.ts.map +0 -1
  288. package/dist/rest-resources/2021-07/fulfillment_service.d.ts.map +0 -1
  289. package/dist/rest-resources/2021-07/gift_card.d.ts.map +0 -1
  290. package/dist/rest-resources/2021-07/gift_card_adjustment.d.ts.map +0 -1
  291. package/dist/rest-resources/2021-07/image.d.ts.map +0 -1
  292. package/dist/rest-resources/2021-07/index.d.ts.map +0 -1
  293. package/dist/rest-resources/2021-07/inventory_item.d.ts.map +0 -1
  294. package/dist/rest-resources/2021-07/inventory_level.d.ts.map +0 -1
  295. package/dist/rest-resources/2021-07/location.d.ts.map +0 -1
  296. package/dist/rest-resources/2021-07/locations_for_move.d.ts.map +0 -1
  297. package/dist/rest-resources/2021-07/marketing_event.d.ts.map +0 -1
  298. package/dist/rest-resources/2021-07/metafield.d.ts.map +0 -1
  299. package/dist/rest-resources/2021-07/mobile_platform_application.d.ts.map +0 -1
  300. package/dist/rest-resources/2021-07/order.d.ts.map +0 -1
  301. package/dist/rest-resources/2021-07/order_risk.d.ts.map +0 -1
  302. package/dist/rest-resources/2021-07/page.d.ts.map +0 -1
  303. package/dist/rest-resources/2021-07/payment.d.ts.map +0 -1
  304. package/dist/rest-resources/2021-07/payment_gateway.d.ts.map +0 -1
  305. package/dist/rest-resources/2021-07/payment_transaction.d.ts.map +0 -1
  306. package/dist/rest-resources/2021-07/payout.d.ts.map +0 -1
  307. package/dist/rest-resources/2021-07/policy.d.ts.map +0 -1
  308. package/dist/rest-resources/2021-07/price_rule.d.ts.map +0 -1
  309. package/dist/rest-resources/2021-07/product.d.ts.map +0 -1
  310. package/dist/rest-resources/2021-07/product_listing.d.ts.map +0 -1
  311. package/dist/rest-resources/2021-07/product_resource_feedback.d.ts.map +0 -1
  312. package/dist/rest-resources/2021-07/province.d.ts.map +0 -1
  313. package/dist/rest-resources/2021-07/recurring_application_charge.d.ts.map +0 -1
  314. package/dist/rest-resources/2021-07/redirect.d.ts.map +0 -1
  315. package/dist/rest-resources/2021-07/refund.d.ts.map +0 -1
  316. package/dist/rest-resources/2021-07/report.d.ts.map +0 -1
  317. package/dist/rest-resources/2021-07/resource_feedback.d.ts.map +0 -1
  318. package/dist/rest-resources/2021-07/script_tag.d.ts.map +0 -1
  319. package/dist/rest-resources/2021-07/shipping_zone.d.ts.map +0 -1
  320. package/dist/rest-resources/2021-07/shop.d.ts.map +0 -1
  321. package/dist/rest-resources/2021-07/smart_collection.d.ts.map +0 -1
  322. package/dist/rest-resources/2021-07/storefront_access_token.d.ts.map +0 -1
  323. package/dist/rest-resources/2021-07/tender_transaction.d.ts.map +0 -1
  324. package/dist/rest-resources/2021-07/theme.d.ts.map +0 -1
  325. package/dist/rest-resources/2021-07/transaction.d.ts.map +0 -1
  326. package/dist/rest-resources/2021-07/usage_charge.d.ts.map +0 -1
  327. package/dist/rest-resources/2021-07/user.d.ts.map +0 -1
  328. package/dist/rest-resources/2021-07/variant.d.ts.map +0 -1
  329. package/dist/rest-resources/2021-07/webhook.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,24 +5,44 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [3.1.1] - 2022-06-07
8
+ ## Unreleased
9
+
10
+ ## [4.1.0] - 2022-07-14
11
+
12
+ - Add new method to construct the host app URL [#419](https://github.com/Shopify/shopify-api-node/pull/419)
13
+
14
+ ## [4.0.0] - 2022-07-04
15
+
16
+ - ⚠️ [Breaking] Add REST resources for July 2022 API version, add `LATEST_API_VERSION` constant, remove support and REST resources for July 2021 (`2021-07`) API version [#415](https://github.com/Shopify/shopify-api-node/pull/415)
17
+ - Add support for July 2022 API version [#409](https://github.com/Shopify/shopify-api-node/pull/409)
18
+
19
+ ### Fixes
20
+
21
+ - Fix a bug where the PostgreSQL session storage always attempted to create the sessions table [#413](https://github.com/Shopify/shopify-api-node/pull/413)
22
+
23
+ ## [3.1.3] - 2022-06-08
24
+
25
+ ### Fixes
26
+ - Return instances of `Session` from session storages, not POJOs.
27
+
28
+ ## [3.1.2] - 2022-06-07
9
29
 
10
30
  ### Added
11
31
  - Store user id and expiration date of online tokens
12
32
 
13
33
  ### Fixes
14
- - Properly parse a non-json HTTP response [#257](https://github.com/Shopify/shopify-node-api/issues/257)
34
+ - Properly parse a non-json HTTP response [#257](https://github.com/Shopify/shopify-api-node/issues/257)
15
35
  - Don’t create a SQLite DB file if the SQLite storage is not used.
16
36
 
17
37
 
18
38
  ## [3.1.0] - 2022-05-16
19
39
 
20
40
  ### Added
21
- - Support for specifying the URI scheme of the host [#385](https://github.com/Shopify/shopify-node-api/pull/385)
41
+ - Support for specifying the URI scheme of the host [#385](https://github.com/Shopify/shopify-api-node/pull/385)
22
42
  - Add optional `saving` parameter to `serialize` of `Base` class - default is `false` and will include read-only attributes in returned object; `true` used for `save` when committing via API to Shopify.
23
43
 
24
44
  ### Fixed
25
- - Fixes [#363](https://github.com/Shopify/shopify-node-api/issues/363)
45
+ - Fixes [#363](https://github.com/Shopify/shopify-api-node/issues/363)
26
46
  - Webhooks `register` now checks for any attempt to register a GDPR topic (not done via API but by Partner Dashboard), provides an error message in response
27
47
  - For topics that don't exist, `register` checks the response from the initial API call for an `errors` field and returns accordingly
28
48
 
@@ -30,22 +50,22 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
30
50
 
31
51
  ### Added
32
52
 
33
- - Allow REST resources to configure a deny list of attributes to be excluded when saving [#355](https://github.com/Shopify/shopify-node-api/pull/355)
53
+ - Allow REST resources to configure a deny list of attributes to be excluded when saving [#355](https://github.com/Shopify/shopify-api-node/pull/355)
34
54
 
35
55
  ## [3.0.0] - 2022-04-04
36
56
 
37
57
  ### Added
38
58
 
39
- - ⚠️ [Breaking] Removing API version `2021-04` [#343](https://github.com/Shopify/shopify-node-api/pull/343)
59
+ - ⚠️ [Breaking] Removing API version `2021-04` [#343](https://github.com/Shopify/shopify-api-node/pull/343)
40
60
  - ⚠️ [Breaking] The `HttpResponseError` error and its flavours (all returned from HTTP requests) have been slightly altered:
41
61
  - They now take in a hash of values, and will always include the response code, body (as a string if the response is not JSON), and headers
42
62
  - All response fields are now contained within a `response` object, to make it easier to access them
43
- - ⚠️ [Breaking] Update supported Admin API versions [#310](https://github.com/Shopify/shopify-node-api/pull/310)
44
- - Allow full paths in REST requests [#301](https://github.com/Shopify/shopify-node-api/pull/301)
63
+ - ⚠️ [Breaking] Update supported Admin API versions [#310](https://github.com/Shopify/shopify-api-node/pull/310)
64
+ - Allow full paths in REST requests [#301](https://github.com/Shopify/shopify-api-node/pull/301)
45
65
 
46
66
  ### Fixed
47
67
 
48
- - ⚠️ [Breaking] Stop responding to the request in the GraphQL Proxy function, returning Shopify's response instead [#312](https://github.com/Shopify/shopify-node-api/pull/312)
68
+ - ⚠️ [Breaking] Stop responding to the request in the GraphQL Proxy function, returning Shopify's response instead [#312](https://github.com/Shopify/shopify-api-node/pull/312)
49
69
 
50
70
  The examples below are in [express](https://expressjs.com/); you will now need to handle the response yourself.
51
71
 
@@ -70,76 +90,76 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
70
90
 
71
91
  ### Added
72
92
 
73
- - Add support for January 2022 API version [#285](https://github.com/Shopify/shopify-node-api/pull/285)
93
+ - Add support for January 2022 API version [#285](https://github.com/Shopify/shopify-api-node/pull/285)
74
94
 
75
95
  ## [2.0.0] - 2021-10-28
76
96
 
77
97
  ### Added
78
98
 
79
- - Add a 5 second `clockTolerance` to fix `jwt not active` error [#227](https://github.com/Shopify/shopify-node-api/pull/227)
80
- - [Breaking] Change default for OAuth.beginAuth to online sessions [#203](https://github.com/Shopify/shopify-node-api/pull/203)
81
- - see [oauth.md](https://github.com/Shopify/shopify-node-api/blob/main/docs/usage/oauth.md) for updated docs
82
- - [Breaking] Return and delete session in `validateAuthCallback` [#217](https://github.com/Shopify/shopify-node-api/pull/217)
83
- - see [oauth.md](https://github.com/Shopify/shopify-node-api/blob/main/docs/usage/oauth.md) for updated usage
84
- - [Breaking] Extract `addHandler` and `getHandler` methods for webhooks out of `register` [#205](https://github.com/Shopify/shopify-node-api/pull/205)
85
- - [Breaking] Sessions no longer default to `false` for `isOnline` [#169](https://github.com/Shopify/shopify-node-api/pull/169)
86
- - Required `Session` arguments must be passed to the constructor [#169](https://github.com/Shopify/shopify-node-api/pull/169)
87
- - Allow `undefined` in `AuthScopes` [#169](https://github.com/Shopify/shopify-node-api/pull/169)
99
+ - Add a 5 second `clockTolerance` to fix `jwt not active` error [#227](https://github.com/Shopify/shopify-api-node/pull/227)
100
+ - [Breaking] Change default for OAuth.beginAuth to online sessions [#203](https://github.com/Shopify/shopify-api-node/pull/203)
101
+ - see [oauth.md](https://github.com/Shopify/shopify-api-node/blob/main/docs/usage/oauth.md) for updated docs
102
+ - [Breaking] Return and delete session in `validateAuthCallback` [#217](https://github.com/Shopify/shopify-api-node/pull/217)
103
+ - see [oauth.md](https://github.com/Shopify/shopify-api-node/blob/main/docs/usage/oauth.md) for updated usage
104
+ - [Breaking] Extract `addHandler` and `getHandler` methods for webhooks out of `register` [#205](https://github.com/Shopify/shopify-api-node/pull/205)
105
+ - [Breaking] Sessions no longer default to `false` for `isOnline` [#169](https://github.com/Shopify/shopify-api-node/pull/169)
106
+ - Required `Session` arguments must be passed to the constructor [#169](https://github.com/Shopify/shopify-api-node/pull/169)
107
+ - Allow `undefined` in `AuthScopes` [#169](https://github.com/Shopify/shopify-api-node/pull/169)
88
108
 
89
109
  ## [1.4.3] - 2021-10-22
90
110
 
91
111
  ### Fixed
92
112
 
93
- - Fixed the HTTP client error messages to expand objects [#252](https://github.com/Shopify/shopify-node-api/pull/252)
113
+ - Fixed the HTTP client error messages to expand objects [#252](https://github.com/Shopify/shopify-api-node/pull/252)
94
114
 
95
115
  ## [1.4.2] - 2021-10-20
96
116
 
97
- - Added `October21` to `ApiVersion` [#247](https://github.com/Shopify/shopify-node-api/pull/247)
117
+ - Added `October21` to `ApiVersion` [#247](https://github.com/Shopify/shopify-api-node/pull/247)
98
118
 
99
119
  ## [1.4.1] - 2021-06-11
100
120
 
101
- - Don't include extra params when calculating local hmac [#196](https://github.com/Shopify/shopify-node-api/pull/196)
121
+ - Don't include extra params when calculating local hmac [#196](https://github.com/Shopify/shopify-api-node/pull/196)
102
122
 
103
123
  ## [1.4.0] - 2021-05-21
104
124
 
105
125
  ### Added
106
126
 
107
- - Add support for registering Google Pub/Sub webhooks [#181](https://github.com/Shopify/shopify-node-api/pull/181)
108
- - Added `July21` to `ApiVersion` [#181](https://github.com/Shopify/shopify-node-api/pull/181)
127
+ - Add support for registering Google Pub/Sub webhooks [#181](https://github.com/Shopify/shopify-api-node/pull/181)
128
+ - Added `July21` to `ApiVersion` [#181](https://github.com/Shopify/shopify-api-node/pull/181)
109
129
 
110
130
  ## [1.3.0] - 2021-05-12
111
131
 
112
132
  ### Added
113
133
 
114
134
  - Added Storefront API client under `Shopify.Clients.Storefront`
115
- - Add `isActive()` method to `Session` class to check if session is active, replace `Session` with `SessionInterface` when used as a type [#153](https://github.com/Shopify/shopify-node-api/pull/153)
135
+ - Add `isActive()` method to `Session` class to check if session is active, replace `Session` with `SessionInterface` when used as a type [#153](https://github.com/Shopify/shopify-api-node/pull/153)
116
136
 
117
137
  ## [1.2.1] - 2021-03-26
118
138
 
119
139
  ### Added
120
140
 
121
- - Added `April21` to `ApiVersion` [#149](https://github.com/Shopify/shopify-node-api/pull/149)
141
+ - Added `April21` to `ApiVersion` [#149](https://github.com/Shopify/shopify-api-node/pull/149)
122
142
 
123
143
  ## [1.2.0] - 2021-03-16
124
144
 
125
145
  ### Added
126
146
 
127
- - Allow plain objects to be returned from the `loadCallback` on `CustomSessionStorage` [#126](https://github.com/shopify/shopify-node-api/pull/126)
128
- - Documentation and example code for `CustomSessionStorage` [#129](https://github.com/shopify/shopify-node-api/pull/129)
147
+ - Allow plain objects to be returned from the `loadCallback` on `CustomSessionStorage` [#126](https://github.com/Shopify/shopify-api-node/pull/126)
148
+ - Documentation and example code for `CustomSessionStorage` [#129](https://github.com/Shopify/shopify-api-node/pull/129)
129
149
 
130
150
  ### Fixed
131
151
 
132
- - Throw a different error for a missing cookie upon OAuth return [#131](https://github.com/shopify/shopify-node-api/pull/131)
133
- - Improved documentation for GraphQL and Rest Clients. [#123](https://github.com/Shopify/shopify-node-api/pull/123)
134
- - Made Docs directory more browseable in GitHub. [#136](https://github.com/Shopify/shopify-node-api/pull/136)
135
- - Make sure `CustomSessionStorage` converts the `expires` field from a string to `Date`. [#132](https://github.com/Shopify/shopify-node-api/pull/132)
136
- - Made `limit` optional for get-requests with query [#135](https://github.com/Shopify/shopify-node-api/pull/135)
152
+ - Throw a different error for a missing cookie upon OAuth return [#131](https://github.com/Shopify/shopify-api-node/pull/131)
153
+ - Improved documentation for GraphQL and Rest Clients. [#123](https://github.com/Shopify/shopify-api-node/pull/123)
154
+ - Made Docs directory more browseable in GitHub. [#136](https://github.com/Shopify/shopify-api-node/pull/136)
155
+ - Make sure `CustomSessionStorage` converts the `expires` field from a string to `Date`. [#132](https://github.com/Shopify/shopify-api-node/pull/132)
156
+ - Made `limit` optional for get-requests with query [#135](https://github.com/Shopify/shopify-api-node/pull/135)
137
157
 
138
158
  ## [1.1.0] - 2021-03-02
139
159
 
140
160
  - Minor text/doc changes
141
- - Added `2021-01` API version to enum. [#117](https://github.com/shopify/shopify-node-api/pull/117)
142
- - Allow retrieving offline sessions using `loadCurrentSession`. [#119](https://github.com/shopify/shopify-node-api/pull/119)
161
+ - Added `2021-01` API version to enum. [#117](https://github.com/Shopify/shopify-api-node/pull/117)
162
+ - Allow retrieving offline sessions using `loadCurrentSession`. [#119](https://github.com/Shopify/shopify-api-node/pull/119)
143
163
 
144
164
  ## [1.0.0]
145
165
 
@@ -149,56 +169,56 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
149
169
 
150
170
  ### Added
151
171
 
152
- - Added `AuthScopes` value object to allow apps to easily check whether scopes have been updated. [#110](https://github.com/shopify/shopify-node-api/pull/110)
172
+ - Added `AuthScopes` value object to allow apps to easily check whether scopes have been updated. [#110](https://github.com/Shopify/shopify-api-node/pull/110)
153
173
 
154
174
  ### Fixed
155
175
 
156
- - GraphQL Proxy attempts to parse the request body as JSON before passing it to the client. [#106](https://github.com/shopify/shopify-node-api/pull/106)
176
+ - GraphQL Proxy attempts to parse the request body as JSON before passing it to the client. [#106](https://github.com/Shopify/shopify-api-node/pull/106)
157
177
 
158
178
  ## [0.4.0] - 2021-02-10
159
179
 
160
180
  ### Added
161
181
 
162
- - Webhooks types are now exported outside the library [#91](https://github.com/shopify/shopify-node-api/pull/91)
163
- - Added support for private apps [#99](https://github.com/Shopify/shopify-node-api/pull/99)
164
- - `USER_AGENT_PREFIX` added to Context, to add agent to all requests [#101](https://github.com/Shopify/shopify-node-api/pull/101)
165
- - Add link to tutorial on how to rotate credentials if neccesary [#107](https://github.com/Shopify/shopify-node-api/pull/107)
182
+ - Webhooks types are now exported outside the library [#91](https://github.com/Shopify/shopify-api-node/pull/91)
183
+ - Added support for private apps [#99](https://github.com/Shopify/shopify-api-node/pull/99)
184
+ - `USER_AGENT_PREFIX` added to Context, to add agent to all requests [#101](https://github.com/Shopify/shopify-api-node/pull/101)
185
+ - Add link to tutorial on how to rotate credentials if neccesary [#107](https://github.com/Shopify/shopify-api-node/pull/107)
166
186
 
167
187
  ### Fixed
168
188
 
169
- - Export `withSession` utility method [#96](https://github.com/Shopify/shopify-node-api/pull/96)
170
- - GraphQL Client appropriately handles queries with variables [#97](https://github.com/Shopify/shopify-node-api/pull/97)
171
- - Use cryptographically random bytes to generate nonce [#98](https://github.com/Shopify/shopify-node-api/pull/98)
172
- - Stop using `SameSite=none` cookies for OAuth, using `lax` instead [#100](https://github.com/Shopify/shopify-node-api/pull/100)
189
+ - Export `withSession` utility method [#96](https://github.com/Shopify/shopify-api-node/pull/96)
190
+ - GraphQL Client appropriately handles queries with variables [#97](https://github.com/Shopify/shopify-api-node/pull/97)
191
+ - Use cryptographically random bytes to generate nonce [#98](https://github.com/Shopify/shopify-api-node/pull/98)
192
+ - Stop using `SameSite=none` cookies for OAuth, using `lax` instead [#100](https://github.com/Shopify/shopify-api-node/pull/100)
173
193
 
174
194
  ## [0.3.1] - 2021-02-03
175
195
 
176
196
  ### Fixed
177
197
 
178
- - Fixed an issue when deleting the current session for embedded apps [#88](https://github.com/shopify/shopify-node-api/pull/88)
198
+ - Fixed an issue when deleting the current session for embedded apps [#88](https://github.com/Shopify/shopify-api-node/pull/88)
179
199
 
180
200
  ## [0.3.0] - 2021-01-27
181
201
 
182
202
  ### Added
183
203
 
184
- - Add `withSession` utility method [#83](https://github.com/shopify/shopify-node-api/pull/83)
204
+ - Add `withSession` utility method [#83](https://github.com/Shopify/shopify-api-node/pull/83)
185
205
 
186
206
  ### Fixed
187
207
 
188
- - Refactor library public interface [#87](https://github.com/shopify/shopify-node-api/pull/87)
189
- - Check if a webhook is registered before calling Shopify [#82](https://github.com/shopify/shopify-node-api/pull/82)
208
+ - Refactor library public interface [#87](https://github.com/Shopify/shopify-api-node/pull/87)
209
+ - Check if a webhook is registered before calling Shopify [#82](https://github.com/Shopify/shopify-api-node/pull/82)
190
210
 
191
211
  ## [0.2.2] - 2021-01-14
192
212
 
193
213
  ### Fixed
194
214
 
195
- - Ensure that the OAuth session expiration matches the cookie expiration [#72](https://github.com/shopify/shopify-node-api/pull/72) / [#73](https://github.com/shopify/shopify-node-api/pull/73)
215
+ - Ensure that the OAuth session expiration matches the cookie expiration [#72](https://github.com/Shopify/shopify-api-node/pull/72) / [#73](https://github.com/Shopify/shopify-api-node/pull/73)
196
216
 
197
217
  ## [0.2.0] - 2021-01-13
198
218
 
199
- - Preserve the OAuth cookie session for a few seconds so SPA can perform their initial load using it [#70](https://github.com/shopify/shopify-node-api/pull/70)
200
- - Session fetches now return `undefined` when a session is not available [#64](https://github.com/shopify/shopify-node-api/pull/64)
201
- - Add `deleteCurrentSession` utils method [#60](https://github.com/shopify/shopify-node-api/pull/60)
219
+ - Preserve the OAuth cookie session for a few seconds so SPA can perform their initial load using it [#70](https://github.com/Shopify/shopify-api-node/pull/70)
220
+ - Session fetches now return `undefined` when a session is not available [#64](https://github.com/Shopify/shopify-api-node/pull/64)
221
+ - Add `deleteCurrentSession` utils method [#60](https://github.com/Shopify/shopify-api-node/pull/60)
202
222
 
203
223
  ## [0.1.0] - 2020-12-17
204
224
 
@@ -1 +1 @@
1
- {"version":3,"file":"session-utils.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,GACnC,gBAAgB,CAgDlB;AAYD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,gBAAgB,GACxB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAmB7B;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GACrC,OAAO,CAMT"}
1
+ {"version":3,"file":"session-utils.d.ts","sourceRoot":"","sources":["../../../src/auth/session/session-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,GACnC,gBAAgB,CAkDlB;AAYD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,gBAAgB,GACxB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAsB7B;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GACrC,OAAO,CAQT"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sessionEqual = exports.sessionEntries = exports.sessionFromEntries = void 0;
4
4
  var tslib_1 = require("tslib");
5
+ var session_1 = require("./session");
5
6
  /**
6
7
  * Like Object.fromEntries(), but normalizes the keys and filters out null values.
7
8
  */
@@ -9,7 +10,7 @@ function sessionFromEntries(entries) {
9
10
  var obj = Object.fromEntries(entries
10
11
  .filter(function (_a) {
11
12
  var _b = tslib_1.__read(_a, 2), _key = _b[0], value = _b[1];
12
- return value !== null;
13
+ return value !== null && value !== undefined;
13
14
  })
14
15
  // Sanitize keys
15
16
  .map(function (_a) {
@@ -55,6 +56,7 @@ function sessionFromEntries(entries) {
55
56
  return [key, value];
56
57
  }
57
58
  }));
59
+ Object.setPrototypeOf(obj, session_1.Session.prototype);
58
60
  return obj;
59
61
  }
60
62
  exports.sessionFromEntries = sessionFromEntries;
@@ -71,8 +73,8 @@ var includedKeys = [
71
73
  function sessionEntries(session) {
72
74
  return (Object.entries(session)
73
75
  .filter(function (_a) {
74
- var _b = tslib_1.__read(_a, 1), key = _b[0];
75
- return includedKeys.includes(key);
76
+ var _b = tslib_1.__read(_a, 2), key = _b[0], value = _b[1];
77
+ return includedKeys.includes(key) && value !== undefined && value !== null;
76
78
  })
77
79
  // Prepare values for db storage
78
80
  .map(function (_a) {
@@ -97,8 +99,18 @@ function sessionEqual(sessionA, sessionB) {
97
99
  return false;
98
100
  if (!sessionB)
99
101
  return false;
100
- var copyA = sessionFromEntries(sessionEntries(sessionA));
101
- var copyB = sessionFromEntries(sessionEntries(sessionB));
102
+ var copyA = sessionEntries(sessionA);
103
+ copyA.sort(function (_a, _b) {
104
+ var _c = tslib_1.__read(_a, 1), k1 = _c[0];
105
+ var _d = tslib_1.__read(_b, 1), k2 = _d[0];
106
+ return (k1 < k2 ? -1 : 1);
107
+ });
108
+ var copyB = sessionEntries(sessionB);
109
+ copyB.sort(function (_a, _b) {
110
+ var _c = tslib_1.__read(_a, 1), k1 = _c[0];
111
+ var _d = tslib_1.__read(_b, 1), k2 = _d[0];
112
+ return (k1 < k2 ? -1 : 1);
113
+ });
102
114
  return JSON.stringify(copyA) === JSON.stringify(copyB);
103
115
  }
104
116
  exports.sessionEqual = sessionEqual;
@@ -1 +1 @@
1
- {"version":3,"file":"battery-of-tests.d.ts","sourceRoot":"","sources":["../../../../../src/auth/session/storage/__tests__/battery-of-tests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAErD,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,QAqF3E"}
1
+ {"version":3,"file":"battery-of-tests.d.ts","sourceRoot":"","sources":["../../../../../src/auth/session/storage/__tests__/battery-of-tests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAErD,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,QA+F3E"}
@@ -2,22 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.batteryOfTests = void 0;
4
4
  var tslib_1 = require("tslib");
5
+ var context_1 = require("../../../../context");
5
6
  var session_1 = require("../../session");
6
7
  var session_utils_1 = require("../../session-utils");
7
8
  function batteryOfTests(storageFactory) {
8
9
  var _this = this;
9
10
  it('can store and delete all kinds of sessions', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
10
- var sessionFactories, sessionId, storage, sessionFactories_1, sessionFactories_1_1, factory, session, _a, _b, _c, _d, e_1_1;
11
- var e_1, _e;
11
+ var sessionFactories, sessionId, storage, sessionFactories_1, sessionFactories_1_1, factory, session, _a, _b, loadedSession, e_1_1;
12
+ var e_1, _c;
12
13
  var _this = this;
13
- return tslib_1.__generator(this, function (_f) {
14
- switch (_f.label) {
14
+ return tslib_1.__generator(this, function (_d) {
15
+ switch (_d.label) {
15
16
  case 0:
16
17
  sessionFactories = [
17
18
  function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
18
19
  var session;
19
20
  return tslib_1.__generator(this, function (_a) {
20
21
  session = new session_1.Session(sessionId, 'shop', 'state', false);
22
+ session.scope = context_1.Context.SCOPES.toString();
23
+ session.accessToken = '123';
21
24
  return [2 /*return*/, session];
22
25
  });
23
26
  }); },
@@ -28,6 +31,8 @@ function batteryOfTests(storageFactory) {
28
31
  expiryDate = new Date();
29
32
  expiryDate.setMinutes(expiryDate.getMinutes() + 60);
30
33
  session.expires = expiryDate;
34
+ session.accessToken = '123';
35
+ session.scope = context_1.Context.SCOPES.toString();
31
36
  return [2 /*return*/, session];
32
37
  });
33
38
  }); },
@@ -36,6 +41,8 @@ function batteryOfTests(storageFactory) {
36
41
  return tslib_1.__generator(this, function (_a) {
37
42
  session = new session_1.Session(sessionId, 'shop', 'state', false);
38
43
  session.expires = null;
44
+ session.scope = context_1.Context.SCOPES.toString();
45
+ session.accessToken = '123';
39
46
  return [2 /*return*/, session];
40
47
  });
41
48
  }); },
@@ -44,6 +51,8 @@ function batteryOfTests(storageFactory) {
44
51
  return tslib_1.__generator(this, function (_a) {
45
52
  session = new session_1.Session(sessionId, 'shop', 'state', false);
46
53
  session.expires = undefined;
54
+ session.scope = context_1.Context.SCOPES.toString();
55
+ session.accessToken = '123';
47
56
  return [2 /*return*/, session];
48
57
  });
49
58
  }); },
@@ -54,6 +63,8 @@ function batteryOfTests(storageFactory) {
54
63
  // eslint-disable-next-line @typescript-eslint/naming-convention
55
64
  session.onlineAccessInfo = { associated_user: {} };
56
65
  session.onlineAccessInfo.associated_user.id = 123;
66
+ session.scope = context_1.Context.SCOPES.toString();
67
+ session.accessToken = '123';
57
68
  return [2 /*return*/, session];
58
69
  });
59
70
  }); },
@@ -61,57 +72,57 @@ function batteryOfTests(storageFactory) {
61
72
  sessionId = 'test_session';
62
73
  return [4 /*yield*/, storageFactory()];
63
74
  case 1:
64
- storage = _f.sent();
65
- _f.label = 2;
75
+ storage = _d.sent();
76
+ _d.label = 2;
66
77
  case 2:
67
- _f.trys.push([2, 14, 15, 16]);
78
+ _d.trys.push([2, 14, 15, 16]);
68
79
  sessionFactories_1 = tslib_1.__values(sessionFactories), sessionFactories_1_1 = sessionFactories_1.next();
69
- _f.label = 3;
80
+ _d.label = 3;
70
81
  case 3:
71
82
  if (!!sessionFactories_1_1.done) return [3 /*break*/, 13];
72
83
  factory = sessionFactories_1_1.value;
73
84
  return [4 /*yield*/, factory()];
74
85
  case 4:
75
- session = _f.sent();
86
+ session = _d.sent();
76
87
  return [4 /*yield*/, expect(storage.storeSession(session)).resolves.toBe(true)];
77
88
  case 5:
78
- _f.sent();
89
+ _d.sent();
79
90
  _a = expect;
80
91
  _b = session_utils_1.sessionEqual;
81
92
  return [4 /*yield*/, storage.loadSession(sessionId)];
82
93
  case 6:
83
- _a.apply(void 0, [_b.apply(void 0, [_f.sent(), session])]).toBe(true);
94
+ _a.apply(void 0, [_b.apply(void 0, [_d.sent(), session])]).toBe(true);
84
95
  return [4 /*yield*/, expect(storage.storeSession(session)).resolves.toBe(true)];
85
96
  case 7:
86
- _f.sent();
87
- _c = expect;
88
- _d = session_utils_1.sessionEqual;
97
+ _d.sent();
89
98
  return [4 /*yield*/, storage.loadSession(sessionId)];
90
99
  case 8:
91
- _c.apply(void 0, [_d.apply(void 0, [_f.sent(), session])]).toBe(true);
100
+ loadedSession = _d.sent();
101
+ expect((0, session_utils_1.sessionEqual)(loadedSession, session)).toBe(true);
102
+ expect(loadedSession === null || loadedSession === void 0 ? void 0 : loadedSession.isActive()).toBe(true);
92
103
  return [4 /*yield*/, expect(storage.deleteSession(sessionId)).resolves.toBe(true)];
93
104
  case 9:
94
- _f.sent();
105
+ _d.sent();
95
106
  return [4 /*yield*/, expect(storage.loadSession(sessionId)).resolves.toBeUndefined()];
96
107
  case 10:
97
- _f.sent();
108
+ _d.sent();
98
109
  // Deleting a non-existing session should work
99
110
  return [4 /*yield*/, expect(storage.deleteSession(sessionId)).resolves.toBe(true)];
100
111
  case 11:
101
112
  // Deleting a non-existing session should work
102
- _f.sent();
103
- _f.label = 12;
113
+ _d.sent();
114
+ _d.label = 12;
104
115
  case 12:
105
116
  sessionFactories_1_1 = sessionFactories_1.next();
106
117
  return [3 /*break*/, 3];
107
118
  case 13: return [3 /*break*/, 16];
108
119
  case 14:
109
- e_1_1 = _f.sent();
120
+ e_1_1 = _d.sent();
110
121
  e_1 = { error: e_1_1 };
111
122
  return [3 /*break*/, 16];
112
123
  case 15:
113
124
  try {
114
- if (sessionFactories_1_1 && !sessionFactories_1_1.done && (_e = sessionFactories_1.return)) _e.call(sessionFactories_1);
125
+ if (sessionFactories_1_1 && !sessionFactories_1_1.done && (_c = sessionFactories_1.return)) _c.call(sessionFactories_1);
115
126
  }
116
127
  finally { if (e_1) throw e_1.error; }
117
128
  return [7 /*endfinally*/];
@@ -121,14 +121,14 @@ var PostgreSQLSessionStorage = /** @class */ (function () {
121
121
  };
122
122
  PostgreSQLSessionStorage.prototype.hasSessionTable = function () {
123
123
  return tslib_1.__awaiter(this, void 0, void 0, function () {
124
- var query, _a, rows;
125
- return tslib_1.__generator(this, function (_b) {
126
- switch (_b.label) {
124
+ var query, rows;
125
+ return tslib_1.__generator(this, function (_a) {
126
+ switch (_a.label) {
127
127
  case 0:
128
128
  query = "\n SELECT * FROM pg_catalog.pg_tables WHERE tablename = $1\n ";
129
129
  return [4 /*yield*/, this.query(query, [this.options.sessionTableName])];
130
130
  case 1:
131
- _a = tslib_1.__read.apply(void 0, [_b.sent(), 1]), rows = _a[0];
131
+ rows = _a.sent();
132
132
  return [2 /*return*/, Array.isArray(rows) && rows.length === 1];
133
133
  }
134
134
  });
@@ -15,12 +15,13 @@ export interface ContextParams {
15
15
  PRIVATE_APP_STOREFRONT_ACCESS_TOKEN?: string;
16
16
  }
17
17
  export declare enum ApiVersion {
18
- July21 = "2021-07",
19
18
  October21 = "2021-10",
20
19
  January22 = "2022-01",
21
20
  April22 = "2022-04",
21
+ July22 = "2022-07",
22
22
  Unstable = "unstable"
23
23
  }
24
+ export declare const LATEST_API_VERSION = ApiVersion.July22;
24
25
  export declare enum ShopifyHeader {
25
26
  AccessToken = "X-Shopify-Access-Token",
26
27
  StorefrontAccessToken = "X-Shopify-Storefront-Access-Token",
@@ -1 +1 @@
1
- {"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../src/base-types.ts"],"names":[],"mappings":"AAAA,OAAO,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Ac,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mCAAmC,CAAC,EAAE,MAAM,CAAC;CAC9C;AAED,oBAAY,UAAU;IACpB,SAAS,YAAY;IACrB,SAAS,YAAY;IACrB,OAAO,YAAY;IACnB,MAAM,YAAY;IAClB,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,oBAAY,aAAa;IACvB,WAAW,2BAA2B;IACtC,qBAAqB,sCAAsC;IAC3D,IAAI,0BAA0B;IAC9B,KAAK,oBAAoB;IACzB,MAAM,0BAA0B;CACjC"}
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShopifyHeader = exports.ApiVersion = void 0;
3
+ exports.ShopifyHeader = exports.LATEST_API_VERSION = exports.ApiVersion = void 0;
4
4
  var ApiVersion;
5
5
  (function (ApiVersion) {
6
- ApiVersion["July21"] = "2021-07";
7
6
  ApiVersion["October21"] = "2021-10";
8
7
  ApiVersion["January22"] = "2022-01";
9
8
  ApiVersion["April22"] = "2022-04";
9
+ ApiVersion["July22"] = "2022-07";
10
10
  ApiVersion["Unstable"] = "unstable";
11
11
  })(ApiVersion = exports.ApiVersion || (exports.ApiVersion = {}));
12
+ exports.LATEST_API_VERSION = ApiVersion.July22;
12
13
  var ShopifyHeader;
13
14
  (function (ShopifyHeader) {
14
15
  ShopifyHeader["AccessToken"] = "X-Shopify-Access-Token";
package/dist/error.d.ts CHANGED
@@ -68,5 +68,7 @@ export declare class MissingRequiredArgument extends ShopifyError {
68
68
  }
69
69
  export declare class UnsupportedClientType extends ShopifyError {
70
70
  }
71
+ export declare class InvalidRequestError extends ShopifyError {
72
+ }
71
73
  export {};
72
74
  //# sourceMappingURL=error.d.ts.map
@@ -1 +1 @@
1
- {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AAM,GAAG,OAAO,CAAA;KAAC,CAAC;CACpC;AACD,UAAU,uBAAwB,SAAQ,gBAAgB;IACxD,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;gBAEjB,EACjB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,OAAO,GACR,EAAE,uBAAuB;CAS3B;AACD,qBAAa,kBAAmB,SAAQ,iBAAiB;CAAG;AAC5D,qBAAa,iBAAkB,SAAQ,kBAAkB;CAAG;AAE5D,UAAU,uBAAwB,SAAQ,gBAAgB;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,UAAU,yBAA0B,SAAQ,uBAAuB;IACjE,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzD,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;gBAExB,EAAC,UAAU,EAAE,GAAG,MAAM,EAAC,EAAE,yBAAyB;CAItE;AAED,qBAAa,iBAAkB,SAAQ,YAAY;CAAG;AAEtD,qBAAa,iBAAkB,SAAQ,YAAY;CAAG;AACtD,qBAAa,eAAgB,SAAQ,YAAY;CAAG;AACpD,qBAAa,cAAe,SAAQ,YAAY;CAAG;AACnD,qBAAa,cAAe,SAAQ,YAAY;CAAG;AAEnD,qBAAa,mBAAoB,SAAQ,YAAY;CAAG;AACxD,qBAAa,mBAAoB,SAAQ,YAAY;CAAG;AAExD,qBAAa,uBAAwB,SAAQ,YAAY;CAAG;AAC5D,qBAAa,qBAAsB,SAAQ,YAAY;CAAG;AAE1D,qBAAa,mBAAoB,SAAQ,YAAY;CAAG"}
package/dist/error.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnsupportedClientType = exports.MissingRequiredArgument = exports.SessionStorageError = exports.InvalidWebhookError = exports.InvalidSession = exports.CookieNotFound = exports.SessionNotFound = exports.InvalidOAuthError = exports.RestResourceError = exports.HttpThrottlingError = exports.HttpInternalError = exports.HttpRetriableError = exports.HttpResponseError = exports.HttpMaxRetriesError = exports.HttpRequestError = exports.PrivateAppError = exports.UninitializedContextError = exports.SafeCompareError = exports.MissingJwtTokenError = exports.InvalidJwtError = exports.InvalidShopError = exports.InvalidHmacError = exports.ShopifyError = void 0;
3
+ exports.InvalidRequestError = exports.UnsupportedClientType = exports.MissingRequiredArgument = exports.SessionStorageError = exports.InvalidWebhookError = exports.InvalidSession = exports.CookieNotFound = exports.SessionNotFound = exports.InvalidOAuthError = exports.RestResourceError = exports.HttpThrottlingError = exports.HttpInternalError = exports.HttpRetriableError = exports.HttpResponseError = exports.HttpMaxRetriesError = exports.HttpRequestError = exports.PrivateAppError = exports.UninitializedContextError = exports.SafeCompareError = exports.MissingJwtTokenError = exports.InvalidJwtError = exports.InvalidShopError = exports.InvalidHmacError = exports.ShopifyError = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var ShopifyError = /** @class */ (function (_super) {
6
6
  tslib_1.__extends(ShopifyError, _super);
@@ -205,3 +205,11 @@ var UnsupportedClientType = /** @class */ (function (_super) {
205
205
  return UnsupportedClientType;
206
206
  }(ShopifyError));
207
207
  exports.UnsupportedClientType = UnsupportedClientType;
208
+ var InvalidRequestError = /** @class */ (function (_super) {
209
+ tslib_1.__extends(InvalidRequestError, _super);
210
+ function InvalidRequestError() {
211
+ return _super !== null && _super.apply(this, arguments) || this;
212
+ }
213
+ return InvalidRequestError;
214
+ }(ShopifyError));
215
+ exports.InvalidRequestError = InvalidRequestError;
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare const Shopify: {
40
40
  validateShop: typeof import("./utils/shop-validator").default;
41
41
  versionCompatible: typeof import("./utils/version-compatible").default;
42
42
  withSession: typeof import("./utils/with-session").default;
43
+ getEmbeddedAppUrl: typeof import("./utils/get-embedded-app-url").default;
43
44
  };
44
45
  Webhooks: {
45
46
  Registry: import("./webhooks/registry").RegistryInterface;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,aAAa,MAAM,SAAS,CAAC;AAOzC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAC;AAEF,eAAe,OAAO,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,aAAa,MAAM,SAAS,CAAC;AAOzC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAC;AAEF,eAAe,OAAO,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,3 +1,6 @@
1
+ /***********************************************************************************************************************
2
+ * This file is auto-generated. If you have an issue, please create a GitHub issue. *
3
+ ***********************************************************************************************************************/
1
4
  import Base, { ResourcePath } from '../../base-rest-resource';
2
5
  import { SessionInterface } from '../../auth/session/types';
3
6
  import { ApiVersion } from '../../base-types';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abandoned_checkout.d.ts","sourceRoot":"","sources":["../../../src/rest-resources/2022-07/abandoned_checkout.ts"],"names":[],"mappings":"AAAA;;wHAEwH;AAExH,OAAO,IAAI,EAAE,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,UAAU,aAAa;IACrB,CAA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AAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ /***********************************************************************************************************************
3
+ * This file is auto-generated. If you have an issue, please create a GitHub issue. *
4
+ ***********************************************************************************************************************/
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.AbandonedCheckout = void 0;
4
7
  var tslib_1 = require("tslib");
@@ -34,7 +37,7 @@ var AbandonedCheckout = /** @class */ (function (_super) {
34
37
  });
35
38
  });
36
39
  };
37
- AbandonedCheckout.API_VERSION = base_types_1.ApiVersion.July21;
40
+ AbandonedCheckout.API_VERSION = base_types_1.ApiVersion.July22;
38
41
  AbandonedCheckout.NAME = 'abandoned_checkout';
39
42
  AbandonedCheckout.PLURAL_NAME = 'abandoned_checkouts';
40
43
  AbandonedCheckout.HAS_ONE = {