@shopify/shopify-api 6.0.0-rc6 → 6.0.0-rc8

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 (826) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +20 -19
  3. package/adapters/__e2etests__/utils.d.ts.map +1 -1
  4. package/adapters/__e2etests__/utils.js +6 -3
  5. package/adapters/__e2etests__/utils.js.map +1 -1
  6. package/adapters/cf-worker/adapter.d.ts.map +1 -1
  7. package/adapters/cf-worker/adapter.js +3 -2
  8. package/adapters/cf-worker/adapter.js.map +1 -1
  9. package/adapters/cf-worker/index.js +0 -1
  10. package/adapters/cf-worker/index.js.map +1 -1
  11. package/adapters/mock/adapter.d.ts +0 -2
  12. package/adapters/mock/adapter.d.ts.map +1 -1
  13. package/adapters/mock/adapter.js +4 -6
  14. package/adapters/mock/adapter.js.map +1 -1
  15. package/adapters/mock/index.js +0 -1
  16. package/adapters/mock/index.js.map +1 -1
  17. package/adapters/node/adapter.d.ts +0 -2
  18. package/adapters/node/adapter.d.ts.map +1 -1
  19. package/adapters/node/adapter.js +3 -9
  20. package/adapters/node/adapter.js.map +1 -1
  21. package/adapters/node/index.js +0 -1
  22. package/adapters/node/index.js.map +1 -1
  23. package/lib/auth/oauth/oauth.d.ts.map +1 -1
  24. package/lib/auth/oauth/oauth.js +26 -11
  25. package/lib/auth/oauth/oauth.js.map +1 -1
  26. package/lib/base-types.d.ts +21 -9
  27. package/lib/base-types.d.ts.map +1 -1
  28. package/lib/base-types.js +1 -0
  29. package/lib/base-types.js.map +1 -1
  30. package/lib/billing/check.d.ts.map +1 -1
  31. package/lib/billing/check.js +1 -4
  32. package/lib/billing/check.js.map +1 -1
  33. package/lib/billing/request.d.ts.map +1 -1
  34. package/lib/billing/request.js +1 -4
  35. package/lib/billing/request.js.map +1 -1
  36. package/lib/billing/types.d.ts +3 -3
  37. package/lib/billing/types.d.ts.map +1 -1
  38. package/lib/clients/graphql/graphql_client.d.ts +16 -28
  39. package/lib/clients/graphql/graphql_client.d.ts.map +1 -1
  40. package/lib/clients/graphql/graphql_client.js +73 -57
  41. package/lib/clients/graphql/graphql_client.js.map +1 -1
  42. package/lib/clients/graphql/graphql_proxy.d.ts +1 -1
  43. package/lib/clients/graphql/graphql_proxy.d.ts.map +1 -1
  44. package/lib/clients/graphql/graphql_proxy.js +15 -25
  45. package/lib/clients/graphql/graphql_proxy.js.map +1 -1
  46. package/lib/clients/graphql/storefront_client.d.ts +12 -25
  47. package/lib/clients/graphql/storefront_client.d.ts.map +1 -1
  48. package/lib/clients/graphql/storefront_client.js +52 -18
  49. package/lib/clients/graphql/storefront_client.js.map +1 -1
  50. package/lib/clients/graphql/types.d.ts +10 -2
  51. package/lib/clients/graphql/types.d.ts.map +1 -1
  52. package/lib/clients/http_client/http_client.d.ts +32 -30
  53. package/lib/clients/http_client/http_client.d.ts.map +1 -1
  54. package/lib/clients/http_client/http_client.js +279 -248
  55. package/lib/clients/http_client/http_client.js.map +1 -1
  56. package/lib/clients/index.d.ts +10 -72
  57. package/lib/clients/index.d.ts.map +1 -1
  58. package/lib/clients/index.js +2 -1
  59. package/lib/clients/index.js.map +1 -1
  60. package/lib/clients/rest/rest_client.d.ts +17 -28
  61. package/lib/clients/rest/rest_client.d.ts.map +1 -1
  62. package/lib/clients/rest/rest_client.js +110 -102
  63. package/lib/clients/rest/rest_client.js.map +1 -1
  64. package/lib/clients/rest/types.d.ts +4 -0
  65. package/lib/clients/rest/types.d.ts.map +1 -1
  66. package/lib/config.d.ts +1 -2
  67. package/lib/config.d.ts.map +1 -1
  68. package/lib/config.js +11 -10
  69. package/lib/config.js.map +1 -1
  70. package/lib/error.d.ts +2 -2
  71. package/lib/error.d.ts.map +1 -1
  72. package/lib/error.js +9 -9
  73. package/lib/error.js.map +1 -1
  74. package/lib/index.d.ts +1 -2
  75. package/lib/index.d.ts.map +1 -1
  76. package/lib/index.js +2 -0
  77. package/lib/index.js.map +1 -1
  78. package/lib/logger/index.d.ts +10 -0
  79. package/lib/logger/index.d.ts.map +1 -0
  80. package/lib/logger/index.js +39 -0
  81. package/lib/logger/index.js.map +1 -0
  82. package/lib/logger/log.d.ts +6 -0
  83. package/lib/logger/log.d.ts.map +1 -0
  84. package/lib/logger/log.js +57 -0
  85. package/lib/logger/log.js.map +1 -0
  86. package/lib/logger/types.d.ts +6 -0
  87. package/lib/logger/types.d.ts.map +1 -0
  88. package/{runtime/session → lib/logger}/types.js +0 -0
  89. package/{runtime/session → lib/logger}/types.js.map +0 -0
  90. package/lib/session/classes.d.ts +0 -1
  91. package/lib/session/classes.d.ts.map +1 -1
  92. package/lib/session/classes.js +1 -3
  93. package/lib/session/classes.js.map +1 -1
  94. package/lib/session/index.d.ts +2 -5
  95. package/lib/session/index.d.ts.map +1 -1
  96. package/lib/session/index.js +3 -10
  97. package/lib/session/index.js.map +1 -1
  98. package/lib/session/session-utils.d.ts +2 -8
  99. package/lib/session/session-utils.d.ts.map +1 -1
  100. package/lib/session/session-utils.js +27 -124
  101. package/lib/session/session-utils.js.map +1 -1
  102. package/lib/session/session.d.ts +6 -2
  103. package/lib/session/session.d.ts.map +1 -1
  104. package/lib/session/session.js +121 -0
  105. package/lib/session/session.js.map +1 -1
  106. package/lib/session/types.d.ts +10 -26
  107. package/lib/session/types.d.ts.map +1 -1
  108. package/lib/version.d.ts +1 -1
  109. package/lib/version.js +1 -1
  110. package/lib/webhooks/index.d.ts +3 -5
  111. package/lib/webhooks/index.d.ts.map +1 -1
  112. package/lib/webhooks/index.js +8 -8
  113. package/lib/webhooks/index.js.map +1 -1
  114. package/lib/webhooks/process.d.ts +5 -0
  115. package/lib/webhooks/process.d.ts.map +1 -0
  116. package/lib/webhooks/process.js +180 -0
  117. package/lib/webhooks/process.js.map +1 -0
  118. package/lib/webhooks/query-template.d.ts +4 -0
  119. package/lib/webhooks/query-template.d.ts.map +1 -0
  120. package/lib/webhooks/query-template.js +14 -0
  121. package/lib/webhooks/query-template.js.map +1 -0
  122. package/lib/webhooks/register.d.ts +6 -0
  123. package/lib/webhooks/register.d.ts.map +1 -0
  124. package/lib/webhooks/register.js +428 -0
  125. package/lib/webhooks/register.js.map +1 -0
  126. package/lib/webhooks/registry.d.ts +8 -11
  127. package/lib/webhooks/registry.d.ts.map +1 -1
  128. package/lib/webhooks/registry.js +136 -333
  129. package/lib/webhooks/registry.js.map +1 -1
  130. package/lib/webhooks/types.d.ts +47 -26
  131. package/lib/webhooks/types.d.ts.map +1 -1
  132. package/lib/webhooks/types.js +7 -1
  133. package/lib/webhooks/types.js.map +1 -1
  134. package/package.json +8 -19
  135. package/rest/admin/2022-01/abandoned_checkout.d.ts +2 -2
  136. package/rest/admin/2022-01/abandoned_checkout.d.ts.map +1 -1
  137. package/rest/admin/2022-01/access_scope.d.ts +2 -2
  138. package/rest/admin/2022-01/access_scope.d.ts.map +1 -1
  139. package/rest/admin/2022-01/android_pay_key.d.ts +3 -3
  140. package/rest/admin/2022-01/android_pay_key.d.ts.map +1 -1
  141. package/rest/admin/2022-01/apple_pay_certificate.d.ts +4 -4
  142. package/rest/admin/2022-01/apple_pay_certificate.d.ts.map +1 -1
  143. package/rest/admin/2022-01/application_charge.d.ts +3 -3
  144. package/rest/admin/2022-01/application_charge.d.ts.map +1 -1
  145. package/rest/admin/2022-01/application_credit.d.ts +3 -3
  146. package/rest/admin/2022-01/application_credit.d.ts.map +1 -1
  147. package/rest/admin/2022-01/article.d.ts +7 -7
  148. package/rest/admin/2022-01/article.d.ts.map +1 -1
  149. package/rest/admin/2022-01/asset.d.ts +3 -3
  150. package/rest/admin/2022-01/asset.d.ts.map +1 -1
  151. package/rest/admin/2022-01/assigned_fulfillment_order.d.ts +2 -2
  152. package/rest/admin/2022-01/assigned_fulfillment_order.d.ts.map +1 -1
  153. package/rest/admin/2022-01/balance.d.ts +2 -2
  154. package/rest/admin/2022-01/balance.d.ts.map +1 -1
  155. package/rest/admin/2022-01/blog.d.ts +5 -5
  156. package/rest/admin/2022-01/blog.d.ts.map +1 -1
  157. package/rest/admin/2022-01/carrier_service.d.ts +4 -4
  158. package/rest/admin/2022-01/carrier_service.d.ts.map +1 -1
  159. package/rest/admin/2022-01/checkout.d.ts +3 -3
  160. package/rest/admin/2022-01/checkout.d.ts.map +1 -1
  161. package/rest/admin/2022-01/collect.d.ts +5 -5
  162. package/rest/admin/2022-01/collect.d.ts.map +1 -1
  163. package/rest/admin/2022-01/collection.d.ts +3 -3
  164. package/rest/admin/2022-01/collection.d.ts.map +1 -1
  165. package/rest/admin/2022-01/collection_listing.d.ts +5 -5
  166. package/rest/admin/2022-01/collection_listing.d.ts.map +1 -1
  167. package/rest/admin/2022-01/comment.d.ts +4 -4
  168. package/rest/admin/2022-01/comment.d.ts.map +1 -1
  169. package/rest/admin/2022-01/country.d.ts +5 -5
  170. package/rest/admin/2022-01/country.d.ts.map +1 -1
  171. package/rest/admin/2022-01/currency.d.ts +2 -2
  172. package/rest/admin/2022-01/currency.d.ts.map +1 -1
  173. package/rest/admin/2022-01/custom_collection.d.ts +5 -5
  174. package/rest/admin/2022-01/custom_collection.d.ts.map +1 -1
  175. package/rest/admin/2022-01/customer.d.ts +7 -7
  176. package/rest/admin/2022-01/customer.d.ts.map +1 -1
  177. package/rest/admin/2022-01/customer_address.d.ts +4 -4
  178. package/rest/admin/2022-01/customer_address.d.ts.map +1 -1
  179. package/rest/admin/2022-01/customer_saved_search.d.ts +6 -6
  180. package/rest/admin/2022-01/customer_saved_search.d.ts.map +1 -1
  181. package/rest/admin/2022-01/deprecated_api_call.d.ts +2 -2
  182. package/rest/admin/2022-01/deprecated_api_call.d.ts.map +1 -1
  183. package/rest/admin/2022-01/discount_code.d.ts +7 -7
  184. package/rest/admin/2022-01/discount_code.d.ts.map +1 -1
  185. package/rest/admin/2022-01/dispute.d.ts +3 -3
  186. package/rest/admin/2022-01/dispute.d.ts.map +1 -1
  187. package/rest/admin/2022-01/draft_order.d.ts +5 -5
  188. package/rest/admin/2022-01/draft_order.d.ts.map +1 -1
  189. package/rest/admin/2022-01/event.d.ts +4 -4
  190. package/rest/admin/2022-01/event.d.ts.map +1 -1
  191. package/rest/admin/2022-01/fulfillment.d.ts +4 -4
  192. package/rest/admin/2022-01/fulfillment.d.ts.map +1 -1
  193. package/rest/admin/2022-01/fulfillment_event.d.ts +4 -4
  194. package/rest/admin/2022-01/fulfillment_event.d.ts.map +1 -1
  195. package/rest/admin/2022-01/fulfillment_order.d.ts +3 -3
  196. package/rest/admin/2022-01/fulfillment_order.d.ts.map +1 -1
  197. package/rest/admin/2022-01/fulfillment_service.d.ts +4 -4
  198. package/rest/admin/2022-01/fulfillment_service.d.ts.map +1 -1
  199. package/rest/admin/2022-01/gift_card.d.ts +5 -5
  200. package/rest/admin/2022-01/gift_card.d.ts.map +1 -1
  201. package/rest/admin/2022-01/gift_card_adjustment.d.ts +3 -3
  202. package/rest/admin/2022-01/gift_card_adjustment.d.ts.map +1 -1
  203. package/rest/admin/2022-01/image.d.ts +5 -5
  204. package/rest/admin/2022-01/image.d.ts.map +1 -1
  205. package/rest/admin/2022-01/inventory_item.d.ts +3 -3
  206. package/rest/admin/2022-01/inventory_item.d.ts.map +1 -1
  207. package/rest/admin/2022-01/inventory_level.d.ts +3 -3
  208. package/rest/admin/2022-01/inventory_level.d.ts.map +1 -1
  209. package/rest/admin/2022-01/location.d.ts +5 -5
  210. package/rest/admin/2022-01/location.d.ts.map +1 -1
  211. package/rest/admin/2022-01/locations_for_move.d.ts +2 -2
  212. package/rest/admin/2022-01/locations_for_move.d.ts.map +1 -1
  213. package/rest/admin/2022-01/marketing_event.d.ts +5 -5
  214. package/rest/admin/2022-01/marketing_event.d.ts.map +1 -1
  215. package/rest/admin/2022-01/metafield.d.ts +5 -5
  216. package/rest/admin/2022-01/metafield.d.ts.map +1 -1
  217. package/rest/admin/2022-01/mobile_platform_application.d.ts +4 -4
  218. package/rest/admin/2022-01/mobile_platform_application.d.ts.map +1 -1
  219. package/rest/admin/2022-01/order.d.ts +5 -5
  220. package/rest/admin/2022-01/order.d.ts.map +1 -1
  221. package/rest/admin/2022-01/order_risk.d.ts +4 -4
  222. package/rest/admin/2022-01/order_risk.d.ts.map +1 -1
  223. package/rest/admin/2022-01/page.d.ts +5 -5
  224. package/rest/admin/2022-01/page.d.ts.map +1 -1
  225. package/rest/admin/2022-01/payment.d.ts +4 -4
  226. package/rest/admin/2022-01/payment.d.ts.map +1 -1
  227. package/rest/admin/2022-01/payment_gateway.d.ts +4 -4
  228. package/rest/admin/2022-01/payment_gateway.d.ts.map +1 -1
  229. package/rest/admin/2022-01/payment_transaction.d.ts +2 -2
  230. package/rest/admin/2022-01/payment_transaction.d.ts.map +1 -1
  231. package/rest/admin/2022-01/payout.d.ts +3 -3
  232. package/rest/admin/2022-01/payout.d.ts.map +1 -1
  233. package/rest/admin/2022-01/policy.d.ts +2 -2
  234. package/rest/admin/2022-01/policy.d.ts.map +1 -1
  235. package/rest/admin/2022-01/price_rule.d.ts +5 -5
  236. package/rest/admin/2022-01/price_rule.d.ts.map +1 -1
  237. package/rest/admin/2022-01/product.d.ts +5 -5
  238. package/rest/admin/2022-01/product.d.ts.map +1 -1
  239. package/rest/admin/2022-01/product_listing.d.ts +6 -6
  240. package/rest/admin/2022-01/product_listing.d.ts.map +1 -1
  241. package/rest/admin/2022-01/product_resource_feedback.d.ts +2 -2
  242. package/rest/admin/2022-01/product_resource_feedback.d.ts.map +1 -1
  243. package/rest/admin/2022-01/province.d.ts +4 -4
  244. package/rest/admin/2022-01/province.d.ts.map +1 -1
  245. package/rest/admin/2022-01/recurring_application_charge.d.ts +4 -4
  246. package/rest/admin/2022-01/recurring_application_charge.d.ts.map +1 -1
  247. package/rest/admin/2022-01/redirect.d.ts +5 -5
  248. package/rest/admin/2022-01/redirect.d.ts.map +1 -1
  249. package/rest/admin/2022-01/refund.d.ts +3 -3
  250. package/rest/admin/2022-01/refund.d.ts.map +1 -1
  251. package/rest/admin/2022-01/report.d.ts +4 -4
  252. package/rest/admin/2022-01/report.d.ts.map +1 -1
  253. package/rest/admin/2022-01/resource_feedback.d.ts +2 -2
  254. package/rest/admin/2022-01/resource_feedback.d.ts.map +1 -1
  255. package/rest/admin/2022-01/script_tag.d.ts +5 -5
  256. package/rest/admin/2022-01/script_tag.d.ts.map +1 -1
  257. package/rest/admin/2022-01/shipping_zone.d.ts +2 -2
  258. package/rest/admin/2022-01/shipping_zone.d.ts.map +1 -1
  259. package/rest/admin/2022-01/shop.d.ts +2 -2
  260. package/rest/admin/2022-01/shop.d.ts.map +1 -1
  261. package/rest/admin/2022-01/smart_collection.d.ts +5 -5
  262. package/rest/admin/2022-01/smart_collection.d.ts.map +1 -1
  263. package/rest/admin/2022-01/storefront_access_token.d.ts +3 -3
  264. package/rest/admin/2022-01/storefront_access_token.d.ts.map +1 -1
  265. package/rest/admin/2022-01/tender_transaction.d.ts +2 -2
  266. package/rest/admin/2022-01/tender_transaction.d.ts.map +1 -1
  267. package/rest/admin/2022-01/theme.d.ts +4 -4
  268. package/rest/admin/2022-01/theme.d.ts.map +1 -1
  269. package/rest/admin/2022-01/transaction.d.ts +4 -4
  270. package/rest/admin/2022-01/transaction.d.ts.map +1 -1
  271. package/rest/admin/2022-01/usage_charge.d.ts +3 -3
  272. package/rest/admin/2022-01/usage_charge.d.ts.map +1 -1
  273. package/rest/admin/2022-01/user.d.ts +4 -4
  274. package/rest/admin/2022-01/user.d.ts.map +1 -1
  275. package/rest/admin/2022-01/variant.d.ts +5 -5
  276. package/rest/admin/2022-01/variant.d.ts.map +1 -1
  277. package/rest/admin/2022-01/webhook.d.ts +5 -5
  278. package/rest/admin/2022-01/webhook.d.ts.map +1 -1
  279. package/rest/admin/2022-04/abandoned_checkout.d.ts +2 -2
  280. package/rest/admin/2022-04/abandoned_checkout.d.ts.map +1 -1
  281. package/rest/admin/2022-04/access_scope.d.ts +2 -2
  282. package/rest/admin/2022-04/access_scope.d.ts.map +1 -1
  283. package/rest/admin/2022-04/android_pay_key.d.ts +3 -3
  284. package/rest/admin/2022-04/android_pay_key.d.ts.map +1 -1
  285. package/rest/admin/2022-04/apple_pay_certificate.d.ts +4 -4
  286. package/rest/admin/2022-04/apple_pay_certificate.d.ts.map +1 -1
  287. package/rest/admin/2022-04/application_charge.d.ts +3 -3
  288. package/rest/admin/2022-04/application_charge.d.ts.map +1 -1
  289. package/rest/admin/2022-04/application_credit.d.ts +3 -3
  290. package/rest/admin/2022-04/application_credit.d.ts.map +1 -1
  291. package/rest/admin/2022-04/article.d.ts +7 -7
  292. package/rest/admin/2022-04/article.d.ts.map +1 -1
  293. package/rest/admin/2022-04/asset.d.ts +3 -3
  294. package/rest/admin/2022-04/asset.d.ts.map +1 -1
  295. package/rest/admin/2022-04/assigned_fulfillment_order.d.ts +2 -2
  296. package/rest/admin/2022-04/assigned_fulfillment_order.d.ts.map +1 -1
  297. package/rest/admin/2022-04/balance.d.ts +2 -2
  298. package/rest/admin/2022-04/balance.d.ts.map +1 -1
  299. package/rest/admin/2022-04/blog.d.ts +5 -5
  300. package/rest/admin/2022-04/blog.d.ts.map +1 -1
  301. package/rest/admin/2022-04/carrier_service.d.ts +4 -4
  302. package/rest/admin/2022-04/carrier_service.d.ts.map +1 -1
  303. package/rest/admin/2022-04/checkout.d.ts +3 -3
  304. package/rest/admin/2022-04/checkout.d.ts.map +1 -1
  305. package/rest/admin/2022-04/collect.d.ts +5 -5
  306. package/rest/admin/2022-04/collect.d.ts.map +1 -1
  307. package/rest/admin/2022-04/collection.d.ts +3 -3
  308. package/rest/admin/2022-04/collection.d.ts.map +1 -1
  309. package/rest/admin/2022-04/collection_listing.d.ts +5 -5
  310. package/rest/admin/2022-04/collection_listing.d.ts.map +1 -1
  311. package/rest/admin/2022-04/comment.d.ts +4 -4
  312. package/rest/admin/2022-04/comment.d.ts.map +1 -1
  313. package/rest/admin/2022-04/country.d.ts +5 -5
  314. package/rest/admin/2022-04/country.d.ts.map +1 -1
  315. package/rest/admin/2022-04/currency.d.ts +2 -2
  316. package/rest/admin/2022-04/currency.d.ts.map +1 -1
  317. package/rest/admin/2022-04/custom_collection.d.ts +5 -5
  318. package/rest/admin/2022-04/custom_collection.d.ts.map +1 -1
  319. package/rest/admin/2022-04/customer.d.ts +7 -7
  320. package/rest/admin/2022-04/customer.d.ts.map +1 -1
  321. package/rest/admin/2022-04/customer_address.d.ts +4 -4
  322. package/rest/admin/2022-04/customer_address.d.ts.map +1 -1
  323. package/rest/admin/2022-04/customer_saved_search.d.ts +6 -6
  324. package/rest/admin/2022-04/customer_saved_search.d.ts.map +1 -1
  325. package/rest/admin/2022-04/deprecated_api_call.d.ts +2 -2
  326. package/rest/admin/2022-04/deprecated_api_call.d.ts.map +1 -1
  327. package/rest/admin/2022-04/discount_code.d.ts +7 -7
  328. package/rest/admin/2022-04/discount_code.d.ts.map +1 -1
  329. package/rest/admin/2022-04/dispute.d.ts +3 -3
  330. package/rest/admin/2022-04/dispute.d.ts.map +1 -1
  331. package/rest/admin/2022-04/draft_order.d.ts +5 -5
  332. package/rest/admin/2022-04/draft_order.d.ts.map +1 -1
  333. package/rest/admin/2022-04/event.d.ts +4 -4
  334. package/rest/admin/2022-04/event.d.ts.map +1 -1
  335. package/rest/admin/2022-04/fulfillment.d.ts +4 -4
  336. package/rest/admin/2022-04/fulfillment.d.ts.map +1 -1
  337. package/rest/admin/2022-04/fulfillment_event.d.ts +4 -4
  338. package/rest/admin/2022-04/fulfillment_event.d.ts.map +1 -1
  339. package/rest/admin/2022-04/fulfillment_order.d.ts +3 -3
  340. package/rest/admin/2022-04/fulfillment_order.d.ts.map +1 -1
  341. package/rest/admin/2022-04/fulfillment_service.d.ts +4 -4
  342. package/rest/admin/2022-04/fulfillment_service.d.ts.map +1 -1
  343. package/rest/admin/2022-04/gift_card.d.ts +5 -5
  344. package/rest/admin/2022-04/gift_card.d.ts.map +1 -1
  345. package/rest/admin/2022-04/gift_card_adjustment.d.ts +3 -3
  346. package/rest/admin/2022-04/gift_card_adjustment.d.ts.map +1 -1
  347. package/rest/admin/2022-04/image.d.ts +5 -5
  348. package/rest/admin/2022-04/image.d.ts.map +1 -1
  349. package/rest/admin/2022-04/inventory_item.d.ts +3 -3
  350. package/rest/admin/2022-04/inventory_item.d.ts.map +1 -1
  351. package/rest/admin/2022-04/inventory_level.d.ts +3 -3
  352. package/rest/admin/2022-04/inventory_level.d.ts.map +1 -1
  353. package/rest/admin/2022-04/location.d.ts +5 -5
  354. package/rest/admin/2022-04/location.d.ts.map +1 -1
  355. package/rest/admin/2022-04/locations_for_move.d.ts +2 -2
  356. package/rest/admin/2022-04/locations_for_move.d.ts.map +1 -1
  357. package/rest/admin/2022-04/marketing_event.d.ts +5 -5
  358. package/rest/admin/2022-04/marketing_event.d.ts.map +1 -1
  359. package/rest/admin/2022-04/metafield.d.ts +5 -5
  360. package/rest/admin/2022-04/metafield.d.ts.map +1 -1
  361. package/rest/admin/2022-04/mobile_platform_application.d.ts +4 -4
  362. package/rest/admin/2022-04/mobile_platform_application.d.ts.map +1 -1
  363. package/rest/admin/2022-04/order.d.ts +5 -5
  364. package/rest/admin/2022-04/order.d.ts.map +1 -1
  365. package/rest/admin/2022-04/order_risk.d.ts +4 -4
  366. package/rest/admin/2022-04/order_risk.d.ts.map +1 -1
  367. package/rest/admin/2022-04/page.d.ts +5 -5
  368. package/rest/admin/2022-04/page.d.ts.map +1 -1
  369. package/rest/admin/2022-04/payment.d.ts +4 -4
  370. package/rest/admin/2022-04/payment.d.ts.map +1 -1
  371. package/rest/admin/2022-04/payment_gateway.d.ts +4 -4
  372. package/rest/admin/2022-04/payment_gateway.d.ts.map +1 -1
  373. package/rest/admin/2022-04/payment_transaction.d.ts +2 -2
  374. package/rest/admin/2022-04/payment_transaction.d.ts.map +1 -1
  375. package/rest/admin/2022-04/payout.d.ts +3 -3
  376. package/rest/admin/2022-04/payout.d.ts.map +1 -1
  377. package/rest/admin/2022-04/policy.d.ts +2 -2
  378. package/rest/admin/2022-04/policy.d.ts.map +1 -1
  379. package/rest/admin/2022-04/price_rule.d.ts +5 -5
  380. package/rest/admin/2022-04/price_rule.d.ts.map +1 -1
  381. package/rest/admin/2022-04/product.d.ts +5 -5
  382. package/rest/admin/2022-04/product.d.ts.map +1 -1
  383. package/rest/admin/2022-04/product_listing.d.ts +6 -6
  384. package/rest/admin/2022-04/product_listing.d.ts.map +1 -1
  385. package/rest/admin/2022-04/product_resource_feedback.d.ts +2 -2
  386. package/rest/admin/2022-04/product_resource_feedback.d.ts.map +1 -1
  387. package/rest/admin/2022-04/province.d.ts +4 -4
  388. package/rest/admin/2022-04/province.d.ts.map +1 -1
  389. package/rest/admin/2022-04/recurring_application_charge.d.ts +4 -4
  390. package/rest/admin/2022-04/recurring_application_charge.d.ts.map +1 -1
  391. package/rest/admin/2022-04/redirect.d.ts +5 -5
  392. package/rest/admin/2022-04/redirect.d.ts.map +1 -1
  393. package/rest/admin/2022-04/refund.d.ts +3 -3
  394. package/rest/admin/2022-04/refund.d.ts.map +1 -1
  395. package/rest/admin/2022-04/report.d.ts +4 -4
  396. package/rest/admin/2022-04/report.d.ts.map +1 -1
  397. package/rest/admin/2022-04/resource_feedback.d.ts +2 -2
  398. package/rest/admin/2022-04/resource_feedback.d.ts.map +1 -1
  399. package/rest/admin/2022-04/script_tag.d.ts +5 -5
  400. package/rest/admin/2022-04/script_tag.d.ts.map +1 -1
  401. package/rest/admin/2022-04/shipping_zone.d.ts +2 -2
  402. package/rest/admin/2022-04/shipping_zone.d.ts.map +1 -1
  403. package/rest/admin/2022-04/shop.d.ts +2 -2
  404. package/rest/admin/2022-04/shop.d.ts.map +1 -1
  405. package/rest/admin/2022-04/smart_collection.d.ts +5 -5
  406. package/rest/admin/2022-04/smart_collection.d.ts.map +1 -1
  407. package/rest/admin/2022-04/storefront_access_token.d.ts +3 -3
  408. package/rest/admin/2022-04/storefront_access_token.d.ts.map +1 -1
  409. package/rest/admin/2022-04/tender_transaction.d.ts +2 -2
  410. package/rest/admin/2022-04/tender_transaction.d.ts.map +1 -1
  411. package/rest/admin/2022-04/theme.d.ts +4 -4
  412. package/rest/admin/2022-04/theme.d.ts.map +1 -1
  413. package/rest/admin/2022-04/transaction.d.ts +4 -4
  414. package/rest/admin/2022-04/transaction.d.ts.map +1 -1
  415. package/rest/admin/2022-04/usage_charge.d.ts +3 -3
  416. package/rest/admin/2022-04/usage_charge.d.ts.map +1 -1
  417. package/rest/admin/2022-04/user.d.ts +4 -4
  418. package/rest/admin/2022-04/user.d.ts.map +1 -1
  419. package/rest/admin/2022-04/variant.d.ts +5 -5
  420. package/rest/admin/2022-04/variant.d.ts.map +1 -1
  421. package/rest/admin/2022-04/webhook.d.ts +5 -5
  422. package/rest/admin/2022-04/webhook.d.ts.map +1 -1
  423. package/rest/admin/2022-07/abandoned_checkout.d.ts +2 -2
  424. package/rest/admin/2022-07/abandoned_checkout.d.ts.map +1 -1
  425. package/rest/admin/2022-07/access_scope.d.ts +2 -2
  426. package/rest/admin/2022-07/access_scope.d.ts.map +1 -1
  427. package/rest/admin/2022-07/android_pay_key.d.ts +3 -3
  428. package/rest/admin/2022-07/android_pay_key.d.ts.map +1 -1
  429. package/rest/admin/2022-07/apple_pay_certificate.d.ts +4 -4
  430. package/rest/admin/2022-07/apple_pay_certificate.d.ts.map +1 -1
  431. package/rest/admin/2022-07/application_charge.d.ts +3 -3
  432. package/rest/admin/2022-07/application_charge.d.ts.map +1 -1
  433. package/rest/admin/2022-07/application_credit.d.ts +3 -3
  434. package/rest/admin/2022-07/application_credit.d.ts.map +1 -1
  435. package/rest/admin/2022-07/article.d.ts +7 -7
  436. package/rest/admin/2022-07/article.d.ts.map +1 -1
  437. package/rest/admin/2022-07/asset.d.ts +3 -3
  438. package/rest/admin/2022-07/asset.d.ts.map +1 -1
  439. package/rest/admin/2022-07/assigned_fulfillment_order.d.ts +2 -2
  440. package/rest/admin/2022-07/assigned_fulfillment_order.d.ts.map +1 -1
  441. package/rest/admin/2022-07/balance.d.ts +2 -2
  442. package/rest/admin/2022-07/balance.d.ts.map +1 -1
  443. package/rest/admin/2022-07/blog.d.ts +5 -5
  444. package/rest/admin/2022-07/blog.d.ts.map +1 -1
  445. package/rest/admin/2022-07/carrier_service.d.ts +4 -4
  446. package/rest/admin/2022-07/carrier_service.d.ts.map +1 -1
  447. package/rest/admin/2022-07/checkout.d.ts +3 -3
  448. package/rest/admin/2022-07/checkout.d.ts.map +1 -1
  449. package/rest/admin/2022-07/collect.d.ts +5 -5
  450. package/rest/admin/2022-07/collect.d.ts.map +1 -1
  451. package/rest/admin/2022-07/collection.d.ts +3 -3
  452. package/rest/admin/2022-07/collection.d.ts.map +1 -1
  453. package/rest/admin/2022-07/collection_listing.d.ts +5 -5
  454. package/rest/admin/2022-07/collection_listing.d.ts.map +1 -1
  455. package/rest/admin/2022-07/comment.d.ts +4 -4
  456. package/rest/admin/2022-07/comment.d.ts.map +1 -1
  457. package/rest/admin/2022-07/country.d.ts +5 -5
  458. package/rest/admin/2022-07/country.d.ts.map +1 -1
  459. package/rest/admin/2022-07/currency.d.ts +2 -2
  460. package/rest/admin/2022-07/currency.d.ts.map +1 -1
  461. package/rest/admin/2022-07/custom_collection.d.ts +5 -5
  462. package/rest/admin/2022-07/custom_collection.d.ts.map +1 -1
  463. package/rest/admin/2022-07/customer.d.ts +7 -7
  464. package/rest/admin/2022-07/customer.d.ts.map +1 -1
  465. package/rest/admin/2022-07/customer_address.d.ts +4 -4
  466. package/rest/admin/2022-07/customer_address.d.ts.map +1 -1
  467. package/rest/admin/2022-07/customer_saved_search.d.ts +6 -6
  468. package/rest/admin/2022-07/customer_saved_search.d.ts.map +1 -1
  469. package/rest/admin/2022-07/deprecated_api_call.d.ts +2 -2
  470. package/rest/admin/2022-07/deprecated_api_call.d.ts.map +1 -1
  471. package/rest/admin/2022-07/discount_code.d.ts +7 -7
  472. package/rest/admin/2022-07/discount_code.d.ts.map +1 -1
  473. package/rest/admin/2022-07/dispute.d.ts +3 -3
  474. package/rest/admin/2022-07/dispute.d.ts.map +1 -1
  475. package/rest/admin/2022-07/dispute_evidence.d.ts +2 -2
  476. package/rest/admin/2022-07/dispute_evidence.d.ts.map +1 -1
  477. package/rest/admin/2022-07/dispute_file_upload.d.ts +2 -2
  478. package/rest/admin/2022-07/dispute_file_upload.d.ts.map +1 -1
  479. package/rest/admin/2022-07/draft_order.d.ts +5 -5
  480. package/rest/admin/2022-07/draft_order.d.ts.map +1 -1
  481. package/rest/admin/2022-07/event.d.ts +4 -4
  482. package/rest/admin/2022-07/event.d.ts.map +1 -1
  483. package/rest/admin/2022-07/fulfillment.d.ts +4 -4
  484. package/rest/admin/2022-07/fulfillment.d.ts.map +1 -1
  485. package/rest/admin/2022-07/fulfillment_event.d.ts +4 -4
  486. package/rest/admin/2022-07/fulfillment_event.d.ts.map +1 -1
  487. package/rest/admin/2022-07/fulfillment_order.d.ts +3 -3
  488. package/rest/admin/2022-07/fulfillment_order.d.ts.map +1 -1
  489. package/rest/admin/2022-07/fulfillment_service.d.ts +4 -4
  490. package/rest/admin/2022-07/fulfillment_service.d.ts.map +1 -1
  491. package/rest/admin/2022-07/gift_card.d.ts +5 -5
  492. package/rest/admin/2022-07/gift_card.d.ts.map +1 -1
  493. package/rest/admin/2022-07/gift_card_adjustment.d.ts +3 -3
  494. package/rest/admin/2022-07/gift_card_adjustment.d.ts.map +1 -1
  495. package/rest/admin/2022-07/image.d.ts +5 -5
  496. package/rest/admin/2022-07/image.d.ts.map +1 -1
  497. package/rest/admin/2022-07/inventory_item.d.ts +3 -3
  498. package/rest/admin/2022-07/inventory_item.d.ts.map +1 -1
  499. package/rest/admin/2022-07/inventory_level.d.ts +3 -3
  500. package/rest/admin/2022-07/inventory_level.d.ts.map +1 -1
  501. package/rest/admin/2022-07/location.d.ts +5 -5
  502. package/rest/admin/2022-07/location.d.ts.map +1 -1
  503. package/rest/admin/2022-07/locations_for_move.d.ts +2 -2
  504. package/rest/admin/2022-07/locations_for_move.d.ts.map +1 -1
  505. package/rest/admin/2022-07/marketing_event.d.ts +5 -5
  506. package/rest/admin/2022-07/marketing_event.d.ts.map +1 -1
  507. package/rest/admin/2022-07/metafield.d.ts +5 -5
  508. package/rest/admin/2022-07/metafield.d.ts.map +1 -1
  509. package/rest/admin/2022-07/mobile_platform_application.d.ts +4 -4
  510. package/rest/admin/2022-07/mobile_platform_application.d.ts.map +1 -1
  511. package/rest/admin/2022-07/order.d.ts +5 -5
  512. package/rest/admin/2022-07/order.d.ts.map +1 -1
  513. package/rest/admin/2022-07/order_risk.d.ts +4 -4
  514. package/rest/admin/2022-07/order_risk.d.ts.map +1 -1
  515. package/rest/admin/2022-07/page.d.ts +5 -5
  516. package/rest/admin/2022-07/page.d.ts.map +1 -1
  517. package/rest/admin/2022-07/payment.d.ts +4 -4
  518. package/rest/admin/2022-07/payment.d.ts.map +1 -1
  519. package/rest/admin/2022-07/payment_gateway.d.ts +4 -4
  520. package/rest/admin/2022-07/payment_gateway.d.ts.map +1 -1
  521. package/rest/admin/2022-07/payment_transaction.d.ts +2 -2
  522. package/rest/admin/2022-07/payment_transaction.d.ts.map +1 -1
  523. package/rest/admin/2022-07/payout.d.ts +3 -3
  524. package/rest/admin/2022-07/payout.d.ts.map +1 -1
  525. package/rest/admin/2022-07/policy.d.ts +2 -2
  526. package/rest/admin/2022-07/policy.d.ts.map +1 -1
  527. package/rest/admin/2022-07/price_rule.d.ts +5 -5
  528. package/rest/admin/2022-07/price_rule.d.ts.map +1 -1
  529. package/rest/admin/2022-07/product.d.ts +5 -5
  530. package/rest/admin/2022-07/product.d.ts.map +1 -1
  531. package/rest/admin/2022-07/product_listing.d.ts +6 -6
  532. package/rest/admin/2022-07/product_listing.d.ts.map +1 -1
  533. package/rest/admin/2022-07/product_resource_feedback.d.ts +2 -2
  534. package/rest/admin/2022-07/product_resource_feedback.d.ts.map +1 -1
  535. package/rest/admin/2022-07/province.d.ts +4 -4
  536. package/rest/admin/2022-07/province.d.ts.map +1 -1
  537. package/rest/admin/2022-07/recurring_application_charge.d.ts +4 -4
  538. package/rest/admin/2022-07/recurring_application_charge.d.ts.map +1 -1
  539. package/rest/admin/2022-07/redirect.d.ts +5 -5
  540. package/rest/admin/2022-07/redirect.d.ts.map +1 -1
  541. package/rest/admin/2022-07/refund.d.ts +3 -3
  542. package/rest/admin/2022-07/refund.d.ts.map +1 -1
  543. package/rest/admin/2022-07/report.d.ts +4 -4
  544. package/rest/admin/2022-07/report.d.ts.map +1 -1
  545. package/rest/admin/2022-07/resource_feedback.d.ts +2 -2
  546. package/rest/admin/2022-07/resource_feedback.d.ts.map +1 -1
  547. package/rest/admin/2022-07/script_tag.d.ts +5 -5
  548. package/rest/admin/2022-07/script_tag.d.ts.map +1 -1
  549. package/rest/admin/2022-07/shipping_zone.d.ts +2 -2
  550. package/rest/admin/2022-07/shipping_zone.d.ts.map +1 -1
  551. package/rest/admin/2022-07/shop.d.ts +2 -2
  552. package/rest/admin/2022-07/shop.d.ts.map +1 -1
  553. package/rest/admin/2022-07/smart_collection.d.ts +5 -5
  554. package/rest/admin/2022-07/smart_collection.d.ts.map +1 -1
  555. package/rest/admin/2022-07/storefront_access_token.d.ts +3 -3
  556. package/rest/admin/2022-07/storefront_access_token.d.ts.map +1 -1
  557. package/rest/admin/2022-07/tender_transaction.d.ts +2 -2
  558. package/rest/admin/2022-07/tender_transaction.d.ts.map +1 -1
  559. package/rest/admin/2022-07/theme.d.ts +4 -4
  560. package/rest/admin/2022-07/theme.d.ts.map +1 -1
  561. package/rest/admin/2022-07/transaction.d.ts +4 -4
  562. package/rest/admin/2022-07/transaction.d.ts.map +1 -1
  563. package/rest/admin/2022-07/usage_charge.d.ts +3 -3
  564. package/rest/admin/2022-07/usage_charge.d.ts.map +1 -1
  565. package/rest/admin/2022-07/user.d.ts +4 -4
  566. package/rest/admin/2022-07/user.d.ts.map +1 -1
  567. package/rest/admin/2022-07/variant.d.ts +5 -5
  568. package/rest/admin/2022-07/variant.d.ts.map +1 -1
  569. package/rest/admin/2022-07/webhook.d.ts +5 -5
  570. package/rest/admin/2022-07/webhook.d.ts.map +1 -1
  571. package/rest/admin/2022-10/abandoned_checkout.d.ts +2 -2
  572. package/rest/admin/2022-10/abandoned_checkout.d.ts.map +1 -1
  573. package/rest/admin/2022-10/access_scope.d.ts +2 -2
  574. package/rest/admin/2022-10/access_scope.d.ts.map +1 -1
  575. package/rest/admin/2022-10/android_pay_key.d.ts +3 -3
  576. package/rest/admin/2022-10/android_pay_key.d.ts.map +1 -1
  577. package/rest/admin/2022-10/apple_pay_certificate.d.ts +4 -4
  578. package/rest/admin/2022-10/apple_pay_certificate.d.ts.map +1 -1
  579. package/rest/admin/2022-10/application_charge.d.ts +3 -3
  580. package/rest/admin/2022-10/application_charge.d.ts.map +1 -1
  581. package/rest/admin/2022-10/application_credit.d.ts +3 -3
  582. package/rest/admin/2022-10/application_credit.d.ts.map +1 -1
  583. package/rest/admin/2022-10/article.d.ts +7 -7
  584. package/rest/admin/2022-10/article.d.ts.map +1 -1
  585. package/rest/admin/2022-10/asset.d.ts +3 -3
  586. package/rest/admin/2022-10/asset.d.ts.map +1 -1
  587. package/rest/admin/2022-10/assigned_fulfillment_order.d.ts +2 -2
  588. package/rest/admin/2022-10/assigned_fulfillment_order.d.ts.map +1 -1
  589. package/rest/admin/2022-10/balance.d.ts +2 -2
  590. package/rest/admin/2022-10/balance.d.ts.map +1 -1
  591. package/rest/admin/2022-10/blog.d.ts +5 -5
  592. package/rest/admin/2022-10/blog.d.ts.map +1 -1
  593. package/rest/admin/2022-10/carrier_service.d.ts +4 -4
  594. package/rest/admin/2022-10/carrier_service.d.ts.map +1 -1
  595. package/rest/admin/2022-10/checkout.d.ts +3 -3
  596. package/rest/admin/2022-10/checkout.d.ts.map +1 -1
  597. package/rest/admin/2022-10/collect.d.ts +5 -5
  598. package/rest/admin/2022-10/collect.d.ts.map +1 -1
  599. package/rest/admin/2022-10/collection.d.ts +3 -3
  600. package/rest/admin/2022-10/collection.d.ts.map +1 -1
  601. package/rest/admin/2022-10/collection_listing.d.ts +5 -5
  602. package/rest/admin/2022-10/collection_listing.d.ts.map +1 -1
  603. package/rest/admin/2022-10/comment.d.ts +4 -4
  604. package/rest/admin/2022-10/comment.d.ts.map +1 -1
  605. package/rest/admin/2022-10/country.d.ts +5 -5
  606. package/rest/admin/2022-10/country.d.ts.map +1 -1
  607. package/rest/admin/2022-10/currency.d.ts +2 -2
  608. package/rest/admin/2022-10/currency.d.ts.map +1 -1
  609. package/rest/admin/2022-10/custom_collection.d.ts +5 -5
  610. package/rest/admin/2022-10/custom_collection.d.ts.map +1 -1
  611. package/rest/admin/2022-10/customer.d.ts +7 -7
  612. package/rest/admin/2022-10/customer.d.ts.map +1 -1
  613. package/rest/admin/2022-10/customer_address.d.ts +4 -4
  614. package/rest/admin/2022-10/customer_address.d.ts.map +1 -1
  615. package/rest/admin/2022-10/customer_saved_search.d.ts +6 -6
  616. package/rest/admin/2022-10/customer_saved_search.d.ts.map +1 -1
  617. package/rest/admin/2022-10/deprecated_api_call.d.ts +2 -2
  618. package/rest/admin/2022-10/deprecated_api_call.d.ts.map +1 -1
  619. package/rest/admin/2022-10/discount_code.d.ts +7 -7
  620. package/rest/admin/2022-10/discount_code.d.ts.map +1 -1
  621. package/rest/admin/2022-10/dispute.d.ts +3 -3
  622. package/rest/admin/2022-10/dispute.d.ts.map +1 -1
  623. package/rest/admin/2022-10/dispute_evidence.d.ts +2 -2
  624. package/rest/admin/2022-10/dispute_evidence.d.ts.map +1 -1
  625. package/rest/admin/2022-10/dispute_file_upload.d.ts +2 -2
  626. package/rest/admin/2022-10/dispute_file_upload.d.ts.map +1 -1
  627. package/rest/admin/2022-10/draft_order.d.ts +5 -5
  628. package/rest/admin/2022-10/draft_order.d.ts.map +1 -1
  629. package/rest/admin/2022-10/event.d.ts +4 -4
  630. package/rest/admin/2022-10/event.d.ts.map +1 -1
  631. package/rest/admin/2022-10/fulfillment.d.ts +4 -4
  632. package/rest/admin/2022-10/fulfillment.d.ts.map +1 -1
  633. package/rest/admin/2022-10/fulfillment_event.d.ts +4 -4
  634. package/rest/admin/2022-10/fulfillment_event.d.ts.map +1 -1
  635. package/rest/admin/2022-10/fulfillment_order.d.ts +3 -3
  636. package/rest/admin/2022-10/fulfillment_order.d.ts.map +1 -1
  637. package/rest/admin/2022-10/fulfillment_service.d.ts +4 -4
  638. package/rest/admin/2022-10/fulfillment_service.d.ts.map +1 -1
  639. package/rest/admin/2022-10/gift_card.d.ts +5 -5
  640. package/rest/admin/2022-10/gift_card.d.ts.map +1 -1
  641. package/rest/admin/2022-10/gift_card_adjustment.d.ts +3 -3
  642. package/rest/admin/2022-10/gift_card_adjustment.d.ts.map +1 -1
  643. package/rest/admin/2022-10/image.d.ts +5 -5
  644. package/rest/admin/2022-10/image.d.ts.map +1 -1
  645. package/rest/admin/2022-10/inventory_item.d.ts +3 -3
  646. package/rest/admin/2022-10/inventory_item.d.ts.map +1 -1
  647. package/rest/admin/2022-10/inventory_level.d.ts +3 -3
  648. package/rest/admin/2022-10/inventory_level.d.ts.map +1 -1
  649. package/rest/admin/2022-10/location.d.ts +5 -5
  650. package/rest/admin/2022-10/location.d.ts.map +1 -1
  651. package/rest/admin/2022-10/locations_for_move.d.ts +2 -2
  652. package/rest/admin/2022-10/locations_for_move.d.ts.map +1 -1
  653. package/rest/admin/2022-10/marketing_event.d.ts +5 -5
  654. package/rest/admin/2022-10/marketing_event.d.ts.map +1 -1
  655. package/rest/admin/2022-10/metafield.d.ts +5 -5
  656. package/rest/admin/2022-10/metafield.d.ts.map +1 -1
  657. package/rest/admin/2022-10/mobile_platform_application.d.ts +4 -4
  658. package/rest/admin/2022-10/mobile_platform_application.d.ts.map +1 -1
  659. package/rest/admin/2022-10/order.d.ts +5 -5
  660. package/rest/admin/2022-10/order.d.ts.map +1 -1
  661. package/rest/admin/2022-10/order_risk.d.ts +4 -4
  662. package/rest/admin/2022-10/order_risk.d.ts.map +1 -1
  663. package/rest/admin/2022-10/page.d.ts +5 -5
  664. package/rest/admin/2022-10/page.d.ts.map +1 -1
  665. package/rest/admin/2022-10/payment.d.ts +4 -4
  666. package/rest/admin/2022-10/payment.d.ts.map +1 -1
  667. package/rest/admin/2022-10/payment_gateway.d.ts +4 -4
  668. package/rest/admin/2022-10/payment_gateway.d.ts.map +1 -1
  669. package/rest/admin/2022-10/payment_transaction.d.ts +2 -2
  670. package/rest/admin/2022-10/payment_transaction.d.ts.map +1 -1
  671. package/rest/admin/2022-10/payout.d.ts +3 -3
  672. package/rest/admin/2022-10/payout.d.ts.map +1 -1
  673. package/rest/admin/2022-10/policy.d.ts +2 -2
  674. package/rest/admin/2022-10/policy.d.ts.map +1 -1
  675. package/rest/admin/2022-10/price_rule.d.ts +5 -5
  676. package/rest/admin/2022-10/price_rule.d.ts.map +1 -1
  677. package/rest/admin/2022-10/product.d.ts +5 -5
  678. package/rest/admin/2022-10/product.d.ts.map +1 -1
  679. package/rest/admin/2022-10/product_listing.d.ts +6 -6
  680. package/rest/admin/2022-10/product_listing.d.ts.map +1 -1
  681. package/rest/admin/2022-10/product_resource_feedback.d.ts +2 -2
  682. package/rest/admin/2022-10/product_resource_feedback.d.ts.map +1 -1
  683. package/rest/admin/2022-10/province.d.ts +4 -4
  684. package/rest/admin/2022-10/province.d.ts.map +1 -1
  685. package/rest/admin/2022-10/recurring_application_charge.d.ts +4 -4
  686. package/rest/admin/2022-10/recurring_application_charge.d.ts.map +1 -1
  687. package/rest/admin/2022-10/redirect.d.ts +5 -5
  688. package/rest/admin/2022-10/redirect.d.ts.map +1 -1
  689. package/rest/admin/2022-10/refund.d.ts +3 -3
  690. package/rest/admin/2022-10/refund.d.ts.map +1 -1
  691. package/rest/admin/2022-10/report.d.ts +4 -4
  692. package/rest/admin/2022-10/report.d.ts.map +1 -1
  693. package/rest/admin/2022-10/resource_feedback.d.ts +2 -2
  694. package/rest/admin/2022-10/resource_feedback.d.ts.map +1 -1
  695. package/rest/admin/2022-10/script_tag.d.ts +5 -5
  696. package/rest/admin/2022-10/script_tag.d.ts.map +1 -1
  697. package/rest/admin/2022-10/shipping_zone.d.ts +2 -2
  698. package/rest/admin/2022-10/shipping_zone.d.ts.map +1 -1
  699. package/rest/admin/2022-10/shop.d.ts +2 -2
  700. package/rest/admin/2022-10/shop.d.ts.map +1 -1
  701. package/rest/admin/2022-10/smart_collection.d.ts +5 -5
  702. package/rest/admin/2022-10/smart_collection.d.ts.map +1 -1
  703. package/rest/admin/2022-10/storefront_access_token.d.ts +3 -3
  704. package/rest/admin/2022-10/storefront_access_token.d.ts.map +1 -1
  705. package/rest/admin/2022-10/tender_transaction.d.ts +2 -2
  706. package/rest/admin/2022-10/tender_transaction.d.ts.map +1 -1
  707. package/rest/admin/2022-10/theme.d.ts +4 -4
  708. package/rest/admin/2022-10/theme.d.ts.map +1 -1
  709. package/rest/admin/2022-10/transaction.d.ts +4 -4
  710. package/rest/admin/2022-10/transaction.d.ts.map +1 -1
  711. package/rest/admin/2022-10/usage_charge.d.ts +3 -3
  712. package/rest/admin/2022-10/usage_charge.d.ts.map +1 -1
  713. package/rest/admin/2022-10/user.d.ts +4 -4
  714. package/rest/admin/2022-10/user.d.ts.map +1 -1
  715. package/rest/admin/2022-10/variant.d.ts +5 -5
  716. package/rest/admin/2022-10/variant.d.ts.map +1 -1
  717. package/rest/admin/2022-10/webhook.d.ts +5 -5
  718. package/rest/admin/2022-10/webhook.d.ts.map +1 -1
  719. package/rest/base.d.ts +8 -8
  720. package/rest/base.d.ts.map +1 -1
  721. package/rest/base.js +1 -4
  722. package/rest/base.js.map +1 -1
  723. package/rest/types.d.ts +2 -2
  724. package/rest/types.d.ts.map +1 -1
  725. package/runtime/index.d.ts +0 -1
  726. package/runtime/index.d.ts.map +1 -1
  727. package/runtime/index.js +0 -1
  728. package/runtime/index.js.map +1 -1
  729. package/runtime/types.d.ts +0 -1
  730. package/runtime/types.d.ts.map +1 -1
  731. package/runtime/types.js +0 -1
  732. package/runtime/types.js.map +1 -1
  733. package/.github/CODEOWNERS +0 -1
  734. package/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -35
  735. package/.github/ISSUE_TEMPLATE/ENHANCEMENT.md +0 -25
  736. package/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -30
  737. package/.github/PULL_REQUEST_TEMPLATE.md +0 -34
  738. package/.github/stale.yml +0 -42
  739. package/.github/workflows/ci.yml +0 -27
  740. package/.github/workflows/cla.yml +0 -22
  741. package/.github/workflows/markdown_link_check.yml +0 -12
  742. package/.github/workflows/markdown_link_checker_config.json +0 -4
  743. package/CODE_OF_CONDUCT.md +0 -46
  744. package/CONTRIBUTING.md +0 -39
  745. package/RELEASING.md +0 -77
  746. package/adapters/__e2etests__/.env.test +0 -1
  747. package/docs/issues.md +0 -25
  748. package/docs/migrating-to-v6.md +0 -957
  749. package/docs/usage/billing.md +0 -169
  750. package/docs/usage/customsessions.md +0 -154
  751. package/docs/usage/graphql.md +0 -132
  752. package/docs/usage/oauth.md +0 -171
  753. package/docs/usage/rest.md +0 -179
  754. package/docs/usage/runtimes.md +0 -54
  755. package/docs/usage/storefront.md +0 -72
  756. package/docs/usage/utils.md +0 -30
  757. package/docs/usage/webhooks.md +0 -215
  758. package/docs/usage/withsession.md +0 -74
  759. package/lib/clients/http_client/__tests__/test_logs.txt +0 -0
  760. package/lib/session/delete-current.d.ts +0 -4
  761. package/lib/session/delete-current.d.ts.map +0 -1
  762. package/lib/session/delete-current.js +0 -33
  763. package/lib/session/delete-current.js.map +0 -1
  764. package/lib/session/delete-offline.d.ts +0 -4
  765. package/lib/session/delete-offline.d.ts.map +0 -1
  766. package/lib/session/delete-offline.js +0 -22
  767. package/lib/session/delete-offline.js.map +0 -1
  768. package/lib/session/get-current.d.ts +0 -5
  769. package/lib/session/get-current.d.ts.map +0 -1
  770. package/lib/session/get-current.js +0 -32
  771. package/lib/session/get-current.js.map +0 -1
  772. package/lib/session/get-offline.d.ts +0 -4
  773. package/lib/session/get-offline.d.ts.map +0 -1
  774. package/lib/session/get-offline.js +0 -33
  775. package/lib/session/get-offline.js.map +0 -1
  776. package/lib/session/session_storage.d.ts +0 -41
  777. package/lib/session/session_storage.d.ts.map +0 -1
  778. package/lib/session/session_storage.js +0 -16
  779. package/lib/session/session_storage.js.map +0 -1
  780. package/lib/session/with-session.d.ts +0 -4
  781. package/lib/session/with-session.d.ts.map +0 -1
  782. package/lib/session/with-session.js +0 -54
  783. package/lib/session/with-session.js.map +0 -1
  784. package/runtime/crypto/__tests__/produce-node-base64.mjs +0 -18
  785. package/runtime/crypto/__tests__/produce-node-hmac.mjs +0 -27
  786. package/runtime/crypto/__tests__/random.mjs +0 -7
  787. package/runtime/session/index.d.ts +0 -5
  788. package/runtime/session/index.d.ts.map +0 -1
  789. package/runtime/session/index.js +0 -15
  790. package/runtime/session/index.js.map +0 -1
  791. package/runtime/session/types.d.ts +0 -3
  792. package/runtime/session/types.d.ts.map +0 -1
  793. package/session-storage/README.md +0 -211
  794. package/session-storage/__tests__/redis.conf +0 -1
  795. package/session-storage/custom.d.ts +0 -20
  796. package/session-storage/custom.d.ts.map +0 -1
  797. package/session-storage/custom.js +0 -156
  798. package/session-storage/custom.js.map +0 -1
  799. package/session-storage/kv.d.ts +0 -17
  800. package/session-storage/kv.d.ts.map +0 -1
  801. package/session-storage/kv.js +0 -184
  802. package/session-storage/kv.js.map +0 -1
  803. package/session-storage/memory.d.ts +0 -11
  804. package/session-storage/memory.d.ts.map +0 -1
  805. package/session-storage/memory.js +0 -61
  806. package/session-storage/memory.js.map +0 -1
  807. package/session-storage/mongodb.d.ts +0 -25
  808. package/session-storage/mongodb.d.ts.map +0 -1
  809. package/session-storage/mongodb.js +0 -190
  810. package/session-storage/mongodb.js.map +0 -1
  811. package/session-storage/mysql.d.ts +0 -24
  812. package/session-storage/mysql.d.ts.map +0 -1
  813. package/session-storage/mysql.js +0 -200
  814. package/session-storage/mysql.js.map +0 -1
  815. package/session-storage/postgresql.d.ts +0 -26
  816. package/session-storage/postgresql.d.ts.map +0 -1
  817. package/session-storage/postgresql.js +0 -218
  818. package/session-storage/postgresql.js.map +0 -1
  819. package/session-storage/redis.d.ts +0 -24
  820. package/session-storage/redis.d.ts.map +0 -1
  821. package/session-storage/redis.js +0 -178
  822. package/session-storage/redis.js.map +0 -1
  823. package/session-storage/sqlite.d.ts +0 -21
  824. package/session-storage/sqlite.d.ts.map +0 -1
  825. package/session-storage/sqlite.js +0 -175
  826. package/session-storage/sqlite.js.map +0 -1
@@ -1,957 +0,0 @@
1
- # Migrating to v6
2
-
3
- We've extended the functionality of this library so that it can now run on JavaScript runtimes other than Node.js, as long as there is a runtime adapter for it.
4
-
5
- To migrate your Node.js app to use this new adaptable version of the API library, you'll need to add an import of the node adapter in your app, _before_ importing the library functions themselves.
6
- Note you only need to import this once in your app.
7
-
8
- ```js
9
- import '@shopify/shopify-api/adapters/node';
10
- import { ... } from '@shopify/shopify-api';
11
- ```
12
-
13
- This automatically sets the library up to run on the Node.js runtime.
14
-
15
- In addition to making the library compatible with multiple runtimes, we've also improved its public interface to make it easier for apps to load only the features they need from the library.
16
- Once you set up your app with the right adapter, you can follow the next sections for instructions on how to upgrade the individual methods that were changed.
17
-
18
- **Note 1**: the examples below are assuming your app is running using Express.js, but the library still works with different frameworks as before.
19
-
20
- **Note 2**: in general, method calls in v6 of the library take parameter objects instead of positional parameters. A :warning: symbol will highlight where these changes have occurred below, as forgetting to migrate the parameters into parameter objects can result in confusing app behaviour.
21
-
22
- ## Table of contents
23
-
24
- To make it easier to navigate this guide, here is an overview of the sections it contains:
25
-
26
- - [Renamed `Shopify.Context` to `shopify.config`](#renamed-shopifycontext-to-shopifyconfig)
27
- - [Passing in framework requests / responses](#passing-in-framework-requests--responses)
28
- - [Simplified namespace for errors](#simplified-namespace-for-errors)
29
- - [Changes to `Session` and `SessionStorage`](#changes-to-session-and-sessionstorage)
30
- - [Changes to authentication functions](#changes-to-authentication-functions)
31
- - [Changes to API clients](#changes-to-api-clients)
32
- - [Billing](#billing)
33
- - [Utility functions](#utility-functions)
34
- - [Changes to webhook functions](#changes-to-webhook-functions)
35
- - [Changes to use of REST resources](#changes-to-use-of-rest-resources)
36
-
37
- ---
38
-
39
- ## Renamed `Shopify.Context` to `shopify.config`
40
-
41
- We've refactored the way objects are exported by this library, to remove the main static singleton `Shopify` object with global settings stored in `Shopify.Context`.
42
-
43
- Even though that object has no business logic, the fact that the configuration is global made it hard to mock for tests and to set up multiple instances of it.
44
- Part of the changes we made were to create a library object with local settings, to make it feel more idiomatic and easier to work with.
45
-
46
- In general, those changes don't affect any library functionality, unless explicitly mentioned below.
47
- You will probably need to search and replace most of the imports to this library to leverage the new approach, but it should not require any functionality changes.
48
-
49
- 1. Apps no longer set up the library with `Shopify.Context.initialize()`. The new library object constructor takes in the configuration.
50
- <div>Before
51
-
52
- ```ts
53
- import {Shopify} from '@shopify/shopify-api';
54
- Shopify.Context.initialize({ API_KEY: '...', ... });
55
- ```
56
-
57
- </div><div>After
58
-
59
- ```ts
60
- import {shopifyApi} from '@shopify/shopify-api';
61
- const shopify = shopifyApi({ apiKey: '...', ... });
62
- ```
63
-
64
- </div>
65
-
66
- 1. `Shopify.Context` was replaced with `shopify.config`, and config options are now `camelCase` instead of `UPPER_CASE`.
67
- <div>Before
68
-
69
- ```ts
70
- console.log(Shopify.Context.API_KEY);
71
- ```
72
-
73
- </div><div>After
74
-
75
- ```ts
76
- console.log(shopify.config.apiKey);
77
- ```
78
-
79
- </div>
80
-
81
- 1. `Shopify.Context.throwIfUnitialized` and `UninitializedContextError` were removed.
82
-
83
- ---
84
-
85
- ## Passing in framework requests / responses
86
-
87
- Using the v5 or earlier version of the library, apps would generally call library functions as follows:
88
-
89
- ```ts
90
- app.get(
91
- '/path',
92
- async (req: http.IncomingMessage, res: http.ServerResponse) => {
93
- const redirectUri = await Shopify.Auth.beginAuth(req, res);
94
- res.redirect(redirectUri);
95
- },
96
- );
97
- ```
98
-
99
- To enable the library to work across runtimes, we've abstracted these objects into `rawRequest` and `rawResponse?`.
100
- As a general rule, you'll need to update calls like above to:
101
-
102
- ```ts
103
- app.get(
104
- '/path',
105
- async (req: http.IncomingMessage, res: http.ServerResponse) => {
106
- // Library will automatically trigger the redirect in res
107
- await shopify.auth.begin({rawRequest: req, rawResponse: res});
108
- },
109
- );
110
- ```
111
-
112
- For runtimes that expect handlers to _return_ a `Response` object, rather than passing it in as a parameter (like CloudFlare workers), you can skip the `rawResponse` value.
113
-
114
- ```ts
115
- async function handleFetch(request: Request): Promise<Response> {
116
- // Library will return the Response object
117
- return shopify.auth.begin({rawRequest: request});
118
- },
119
- ```
120
-
121
- ---
122
-
123
- ## Simplified namespace for errors
124
-
125
- Using the v5 or earlier version of the library, error types were available via the `Shopify` instance, e.g., `Shopify.Errors.HttpResponseError`. In v6, they are now exported by the library and can be imported without any namespace prefix.
126
-
127
- <div>Before
128
-
129
- ```ts
130
- app.post('/webhooks', async (req, res) => {
131
- try {
132
- await Shopify.Webhooks.Registry.process(req, res);
133
- } catch (error) {
134
- if (error instanceof Shopify.Errors.InvalidWebhookError) {
135
- console.log(`Webhook processing error:\n\tmessage = ${error.message}`);
136
- } else {
137
- console.log('Other error:\n\t', error);
138
- }
139
- }
140
- });
141
- ```
142
-
143
- </div><div>:warning: After
144
-
145
- ```ts
146
- import {InvalidWebhookError} from '@shopify/shopify-api';
147
-
148
- // ...
149
-
150
- app.post('/webhooks', async (req, res) => {
151
- try {
152
- await shopify.webhooks.process({
153
- rawBody: (req as any).rawBody, // as a string
154
- rawRequest: req,
155
- rawResponse: res,
156
- });
157
- } catch (error) {
158
- if (error instanceof InvalidWebhookError) {
159
- console.log(`Webhook processing error:\n\tmessage = ${error.message}\n\tresponse = ${error.response}`);
160
- } else {
161
- console.log('Other error:\n\t', error);
162
- }
163
- }
164
- });
165
- ```
166
-
167
- ---
168
-
169
- ## Changes to `Session` and `SessionStorage`
170
-
171
- 1. `SessionStorage` is no longer an interface, but an abstract class. If you're using your own implementation of the interface, you need to replace `implements SessionStorage` with `extends SessionStorage`.
172
- <div>Before
173
-
174
- ```ts
175
- import {SessionStorage} from '@shopify/shopify-api';
176
- class MySessionStorage implements SessionStorage {
177
- // ...
178
- }
179
- ```
180
-
181
- </div><div>After
182
-
183
- ```ts
184
- import {SessionStorage} from '@shopify/shopify-api';
185
- class MySessionStorage extends SessionStorage {
186
- // ...
187
- }
188
- ```
189
-
190
- </div>
191
-
192
- 1. Since not all adapters work on all runtimes, they've been separated in their own import path. To use the provided storage options, you can import them directly using the following pattern:
193
- <div>Before
194
-
195
- ```ts
196
- import {MemorySessionStorage} from '@shopify/shopify-api';
197
- ```
198
-
199
- </div><div>After
200
-
201
- ```ts
202
- import {MemorySessionStorage} from '@shopify/shopify-api/session-storage/memory';
203
- ```
204
-
205
- </div>
206
-
207
- 1. The `Session` constructor now takes an object which allows all properties of a session, and `Session.cloneSession` was removed since we can use a session as arguments for the clone.
208
- <div>Before
209
-
210
- ```ts
211
- import {Session} from '@shopify/shopify-api';
212
- const session = new Session(
213
- 'session-id',
214
- 'shop.myshopify.com',
215
- 'state1234',
216
- true,
217
- );
218
- session.accessToken = 'token';
219
- const clone = Session.cloneSession(session, 'newId');
220
- ```
221
-
222
- </div><div>:warning: After
223
-
224
- ```ts
225
- import {Session} from '@shopify/shopify-api';
226
- const session = new Session({
227
- id: 'session-id',
228
- shop: 'shop.myshopify.com',
229
- state: 'state1234',
230
- isOnline: true,
231
- accessToken: 'token',
232
- });
233
- const clone = new Session({...session, id: 'newId'});
234
- ```
235
-
236
- </div>
237
-
238
- 1. The `isActive()` method of `Session` now takes a `scopes` parameter. If the scopes of the session don't match the scopes of the application (e.g., app has been restarted with new scopes), the session is deemed to be inactive and OAuth should be initiated again.
239
- <div>Before
240
-
241
- ```ts
242
- const session = await Shopify.Utils.loadCurrentSession(req, res);
243
-
244
- if (!session.isActive()) {
245
- // current session is not active - either expired or scopes have changed
246
- }
247
- ```
248
-
249
- </div><div>:warning: After
250
-
251
- ```ts
252
- const session = await shopify.session.getCurrent({
253
- isOnline: true,
254
- rawRequest: req,
255
- rawResponse: res,
256
- });
257
-
258
- if (!session.isActive(shopify.config.scopes)) {
259
- // current session is not active - either expired or scopes have changed
260
- }
261
- ```
262
-
263
- </div>
264
-
265
- ---
266
-
267
- ## Changes to authentication functions
268
-
269
- The OAuth methods still behave the same way, but we've updated their signatures to make it easier to work with them. See the [updated OAuth instructions](./usage/oauth.md) for a complete example.
270
-
271
- 1. `Shopify.Auth.beginAuth()` is now `shopify.auth.begin()`, it takes in an object, and it now also triggers a redirect response to the correct endpoint.
272
- <div>Before
273
-
274
- ```ts
275
- const redirectUri = await Shopify.Auth.beginAuth(
276
- req,
277
- res,
278
- 'my-shop.com',
279
- '/auth/callback',
280
- true,
281
- );
282
- // App had to redirect to the returned URL
283
- res.redirect(redirectUri);
284
- ```
285
-
286
- </div><div>:warning: After
287
-
288
- ```ts
289
- // Library handles redirecting
290
- await shopify.auth.begin({
291
- shop: 'my-shop.com',
292
- callbackPath: '/auth/callback',
293
- isOnline: true,
294
- rawRequest: req,
295
- rawResponse: res,
296
- });
297
- ```
298
-
299
- </div>
300
-
301
- 1. `Shopify.Auth.validateAuthCallback()` is now `shopify.auth.callback()`, it now takes an object with an `isOnline` value, but the `query` argument is no longer necessary - it will be read from the request. This method will set the appropriate response headers.
302
- <div>Before
303
-
304
- ```ts
305
- const session = Shopify.Auth.validateAuthCallback(
306
- req,
307
- res,
308
- req.query as AuthQuery,
309
- );
310
- // session.accessToken...
311
- res.redirect('url');
312
- ```
313
-
314
- </div><div>:warning: After
315
-
316
- ```ts
317
- const callbackResponse = shopify.auth.callback({
318
- isOnline: true,
319
- rawRequest: req,
320
- rawResponse: res,
321
- });
322
- // callbackResponse.session.accessToken...
323
- res.redirect('url');
324
- ```
325
-
326
- </div>
327
-
328
- 1. The `shopify.auth` component only exports the key functions now to make the API simpler, so `getCookieSessionId`, `getJwtSessionId`, `getOfflineSessionId`, `getCurrentSessionId` are no longer exported. They're internal library functions.
329
-
330
- 1. There is a new `shopify.session` object which contains session-specific functions. See the [Utility functions](#utility-functions) section for the specific changes.
331
-
332
- ---
333
-
334
- ## Changes to API clients
335
-
336
- The API clients this package provides now take an object of arguments, rather than positional ones. The returned objects behave the same way they did before, so you'll only need to update the constructor calls.
337
-
338
- 1. REST Admin API client:
339
-
340
- <div>Before
341
-
342
- ```ts
343
- const restClient = new Shopify.Clients.Rest(
344
- session.shop,
345
- session.accessToken,
346
- );
347
- ```
348
-
349
- </div><div>:warning: After
350
-
351
- ```ts
352
- const restClient = new shopify.clients.Rest({
353
- domain: session.shop,
354
- accessToken: session.accessToken,
355
- });
356
- ```
357
-
358
- </div>
359
-
360
- 1. GraphQL Admin API client:
361
-
362
- <div>Before
363
-
364
- ```ts
365
- const graphqlClient = new Shopify.Clients.Graphql(
366
- session.shop,
367
- session.accessToken,
368
- );
369
- ```
370
-
371
- </div><div>:warning: After
372
-
373
- ```ts
374
- const graphqlClient = new shopify.clients.Graphql({
375
- domain: session.shop,
376
- accessToken: session.accessToken,
377
- });
378
- ```
379
-
380
- </div>
381
-
382
- 1. Storefront API client:
383
-
384
- <div>Before
385
-
386
- ```ts
387
- const storefrontClient = new Shopify.Clients.Storefront(
388
- session.shop,
389
- storefrontAccessToken,
390
- );
391
- ```
392
-
393
- </div><div>:warning: After
394
-
395
- ```ts
396
- const storefrontClient = new shopify.clients.Storefront({
397
- domain: session.shop,
398
- accessToken: storefrontAccessToken,
399
- });
400
- ```
401
-
402
- </div>
403
-
404
- The `HttpResponseError`, `HttpRetriableError`, `HttpInternalError`, and `HttpThrottlingError` classes were updated to include more information on the errors.
405
-
406
- <div>Before
407
-
408
- ```ts
409
- catch (err) {
410
- if (err instanceof HttpResponseError) {
411
- console.log(err.code, err.statusText);
412
- }
413
- }
414
- ```
415
-
416
- </div><div>After
417
-
418
- ```ts
419
- catch (err) {
420
- if (err instanceof HttpResponseError) {
421
- console.log(err.response.code, err.response.statusText, err.response);
422
- }
423
- }
424
- ```
425
-
426
- </div>
427
-
428
- ---
429
-
430
- ## Billing
431
-
432
- The billing functionality hasn't changed, but the main difference is that the library now provides separate methods for checking and requesting payment, which gives apps more freedom to implement their billing logic.
433
-
434
- To configure billing, you can now pass in more than one billing plan, and they're indexed by plan name:
435
-
436
- <div>Before
437
-
438
- ```ts
439
- Shopify.Context.initialize({
440
- // ...
441
- billing: {
442
- chargeName: 'My plan',
443
- amount: 5.0,
444
- currencyCode: 'USD',
445
- interval: BillingInterval.Every30Days,
446
- },
447
- });
448
- ```
449
-
450
- </div><div>After
451
-
452
- ```ts
453
- const shopify = shopifyApi({
454
- // ...
455
- billing: {
456
- 'My plan': {
457
- amount: 5.0,
458
- currencyCode: 'USD',
459
- interval: BillingInterval.Every30Days,
460
- },
461
- },
462
- });
463
- ```
464
-
465
- </div>
466
-
467
- We broke the `Shopify.Billing.check` method up into `shopify.billing.check` and `shopify.billing.request`, as mentioned above:
468
-
469
- <div>Before
470
-
471
- ```ts
472
- const {hasPayment, confirmBillingUrl} = await Shopify.Billing.check({
473
- session,
474
- isTest: true,
475
- });
476
-
477
- if (!hasPayment) {
478
- return redirect(confirmBillingUrl);
479
- }
480
- ```
481
-
482
- </div><div>After
483
-
484
- ```ts
485
- const hasPayment = await shopify.billing.check({
486
- session,
487
- plans: 'My plan',
488
- isTest: true,
489
- });
490
-
491
- if (!hasPayment) {
492
- const confirmationUrl = await shopify.billing.request({
493
- session,
494
- plan: 'My plan',
495
- isTest: true,
496
- });
497
- return redirect(confirmationUrl);
498
- }
499
- ```
500
-
501
- Note that when calling `check`, apps can pass in one or more plans, and it will return true if any of them match. The `request` method creates a charge using the configuration of the given plan name.
502
-
503
- </div>
504
-
505
- ---
506
-
507
- ## Utility functions
508
-
509
- The previous `Shopify.Utils` object contained functions that relied on the global configuration object, but those have been refactored to use the instance-specific configuration.
510
- We also felt that the `Utils` object had some functions that belong to other parts of the library, so some of these functions have been moved to other sub-objects - keep an eye out for those changes in the list below!
511
-
512
- Here are all the specific changes that we made to the `Utils` object:
513
-
514
- 1. `Shopify.Utils.generateLocalHmac` was removed because it's only meant to be used internally by the library.
515
- 1. The `storeSession` method was removed since sessions shouldn't be stored using the library unless the library is doing it. Apps can still save data to their sessions as they please, as long as the data is properly exported to the library via the configured `SessionStorage`.
516
- 1. `validateHmac` is now `async`.
517
- <div>Before
518
-
519
- ```ts
520
- const isValid = Shopify.Utils.validateHmac(req.query);
521
- ```
522
-
523
- </div><div>After
524
-
525
- ```ts
526
- const isValid = await shopify.utils.validateHmac(req.query);
527
- ```
528
-
529
- </div>
530
-
531
- 1. `nonce`, `safeCompare`, and `getEmbeddedAppUrl` have moved to `shopify.auth`. `getEmbeddedAppUrl` is now `async` and takes in an object.
532
- <div>Before
533
-
534
- ```ts
535
- const nonce = Shopify.Utils.nonce();
536
- const match = Shopify.Utils.safeCompare(strA, strB);
537
- const redirectUrl = Shopify.Utils.getEmbeddedAppUrl(req, res);
538
- ```
539
-
540
- </div><div>:warning: After
541
-
542
- ```ts
543
- const nonce = shopify.auth.nonce();
544
- const match = shopify.auth.safeCompare(strA, strB);
545
- const redirectUrl = await shopify.auth.getEmbeddedAppUrl({
546
- rawRequest: req,
547
- rawResponse: res,
548
- });
549
- ```
550
-
551
- </div>
552
-
553
- 1. `Shopify.Context.LOG_FILE` was replaced with `shopify.config.logFunction` so it can work without file-system access.
554
- <div>Before
555
-
556
- ```ts
557
- Shopify.Context.initialize({LOG_FILE: 'path/to/file.log'});
558
- ```
559
-
560
- </div><div>After
561
-
562
- ```ts
563
- const shopify = new shopifyApi({
564
- logFunction: async (severity: string, message: string) => {
565
- fs.appendFile(
566
- 'path/to/file.log',
567
- `${new Date()} [${severity}]: ${message}`,
568
- );
569
- },
570
- });
571
- ```
572
-
573
- </div>
574
-
575
- 1. `Shopify.Utils.decodeSessionToken` is now `shopify.session.decodeSessionToken`, and it's `async`.
576
- <div>Before
577
-
578
- ```ts
579
- const payload = Shopify.Utils.decodeSessionToken(token);
580
- ```
581
-
582
- </div><div>After
583
-
584
- ```ts
585
- const payload = await shopify.session.decodeSessionToken(token);
586
- ```
587
-
588
- </div>
589
-
590
- 1. `Shopify.Utils.loadCurrentSession` is now `shopify.session.getCurrent`, it takes in an object, and the `isOnline` param is mandatory.
591
- <div>Before
592
-
593
- ```ts
594
- const session = await Shopify.Utils.loadCurrentSession(req, res);
595
- ```
596
-
597
- </div><div>:warning: After
598
-
599
- ```ts
600
- const session = await shopify.session.getCurrent({
601
- isOnline: true,
602
- rawRequest: req,
603
- rawResponse: res,
604
- });
605
- ```
606
-
607
- </div>
608
-
609
- 1. `Shopify.Utils.deleteCurrentSession` is now `shopify.session.deleteCurrent`, it takes in an object, and the `isOnline` param is mandatory.
610
- <div>Before
611
-
612
- ```ts
613
- const session = await Shopify.Utils.deleteCurrentSession(req, res);
614
- ```
615
-
616
- </div><div>:warning: After
617
-
618
- ```ts
619
- const session = await shopify.session.deleteCurrent({
620
- isOnline: true,
621
- rawRequest: req,
622
- rawResponse: res,
623
- });
624
- ```
625
-
626
- </div>
627
-
628
- 1. `Shopify.Utils.loadOfflineSession` is now `shopify.session.getOffline`, and it now takes an object. It still **_does not_** validate the given arguments and should only be used if you trust the source of the shop argument.
629
- <div>Before
630
-
631
- ```ts
632
- const session = await Shopify.Utils.loadOfflineSession(
633
- 'my-shop.myshopify.com',
634
- true,
635
- );
636
- ```
637
-
638
- </div><div>:warning: After
639
-
640
- ```ts
641
- const session = await shopify.session.getOffline({
642
- shop: 'my-shop.myshopify.com',
643
- includeExpired: true,
644
- });
645
- ```
646
-
647
- </div>
648
-
649
- 1. `Shopify.Utils.deleteOfflineSession` is now `shopify.session.deleteOffline`, and it now takes an object.
650
- <div>Before
651
-
652
- ```ts
653
- const success = await Shopify.Utils.deleteOfflineSession(
654
- 'my-shop.myshopify.com',
655
- );
656
- ```
657
-
658
- </div><div>:warning: After
659
-
660
- ```ts
661
- const success = await shopify.session.deleteOffline({
662
- shop: 'my-shop.myshopify.com',
663
- });
664
- ```
665
-
666
- </div>
667
-
668
- 1. `Shopify.Utils.withSession` is now `shopify.session.withSession`, and it no longer takes a `shop` argument, it will always authenticate the request to get the shop. The client type is now an enum to make it easier to see the available options.
669
- <div>Before
670
-
671
- ```ts
672
- const {client, session} = await Shopify.Utils.withSession({
673
- clientType: 'rest',
674
- isOnline: true,
675
- req,
676
- res,
677
- shop: 'my-shop.myshopify.com',
678
- });
679
- ```
680
-
681
- </div><div>After
682
-
683
- ```ts
684
- import {ClientType} from '@shopify/shopify-api';
685
-
686
- const {client, session} = await shopify.session.withSession({
687
- clientType: ClientType.Rest,
688
- isOnline: true,
689
- rawRequest: req,
690
- rawResponse: res,
691
- });
692
- ```
693
-
694
- </div>
695
-
696
- 1. `Shopify.Utils.graphqlProxy` is now `shopify.clients.graphqlProxy`, and it takes the body as an argument instead of parsing it from the request. This will make it easier for apps to use a body parser with this function.
697
- <div>Before
698
-
699
- ```ts
700
- const response = await Shopify.Utils.graphqlProxy(req, res);
701
- ```
702
-
703
- </div><div>:warning: After
704
-
705
- ```ts
706
- const response = await shopify.clients.graphqlProxy({
707
- rawBody: req.rawBody, // From my app
708
- rawRequest: req,
709
- rawResponse: res,
710
- });
711
- ```
712
-
713
- </div>
714
-
715
- ---
716
-
717
- ## Changes to webhook functions
718
-
719
- 1. `Shopify.Webhooks.Registry.addHandler` is now `shopify.webhooks.addHttpHandler`, and the parameters are now in a single object parameter. It also no longer takes a `path` in the parameter object.
720
- <div>Before
721
-
722
- ```ts
723
- Shopify.Webhooks.Registry.addHandler("PRODUCTS_CREATE", {
724
- path: "/webhooks",
725
- webhookHandler: handleWebhookRequest,
726
- });
727
- ```
728
-
729
- </div><div>:warning: After
730
-
731
- ```ts
732
- shopify.webhooks.addHttpHandler({
733
- topic: "PRODUCTS_CREATE",
734
- handler: handleWebhookRequest,
735
- });
736
- ```
737
-
738
- </div>
739
-
740
- 1. `Shopify.Webhooks.Registry.addHandlers` is now `shopify.webhooks.addHttpHandlers`, and now takes an array of `addHttpHandler` params.
741
- <div>Before
742
-
743
- ```ts
744
- Shopify.Webhooks.Registry.addHandlers({
745
- PRODUCTS_CREATE: {
746
- path: '/webhooks',
747
- webhookHandler: productCreateWebhookHandler,
748
- },
749
- PRODUCTS_DELETE: {
750
- path: '/webhooks',
751
- webhookHandler: productDeleteWebhookHandler},
752
- });
753
- ```
754
-
755
- </div><div>:warning: After
756
-
757
- ```ts
758
- shopify.webhooks.addHttpHandlers([
759
- {topic: 'PRODUCTS_CREATE', handler: productCreateWebhookHandler},
760
- {topic: 'PRODUCTS_DELETE', handler: productDeleteWebhookHandler},
761
- ]);
762
- ```
763
-
764
- </div>
765
-
766
- 1. `Shopify.Webhooks.Registry.register` is now `shopify.webhooks.register`.
767
- <div>Before
768
-
769
- ```ts
770
- const response = await Shopify.Webhooks.Registry.register({
771
- path: '/webhooks',
772
- topic: 'PRODUCTS_CREATE',
773
- accessToken: session.accessToken,
774
- shop: session.shop,
775
- });
776
- ```
777
-
778
- </div><div>After
779
-
780
- ```ts
781
- const response = await shopify.webhooks.register({
782
- path: '/webhooks',
783
- topic: 'PRODUCTS_CREATE',
784
- accessToken: session.accessToken,
785
- shop: session.shop,
786
- });
787
- ```
788
-
789
- </div>
790
-
791
- 1. `Shopify.Webhooks.Registry.registerAll` is now `shopify.webhooks.registerAllHttp`, and now accepts a `path` in its parameter object with which to register all topic handlers added to the HTTP registry.
792
- <div>Before
793
-
794
- ```ts
795
- const response = await Shopify.Webhooks.Registry.registerAll({
796
- accessToken: session.accessToken,
797
- shop: session.shop,
798
- });
799
- ```
800
-
801
- </div><div>:warning: After
802
-
803
- ```ts
804
- const response = await shopify.webhooks.registerAllHttp({
805
- path: '/webhooks',
806
- accessToken: session.accessToken,
807
- shop: session.shop,
808
- });
809
- ```
810
-
811
- </div>
812
-
813
- 1. `Shopify.Webhooks.Registry.isWebhookPath` has been deprecated.
814
-
815
- 1. `Shopify.Webhooks.Registry.process` is now `shopify.webhooks.process`, and it takes the body as an argument instead of parsing it from the request. This will make it easier for apps to use a body parser with this function.
816
- <div>Before
817
-
818
- ```ts
819
- app.post('/webhooks', async (req, res) => {
820
- try {
821
- await Shopify.Webhooks.Registry.process(req, res);
822
- } catch (error) {
823
- console.log(error.message);
824
- }
825
- });
826
- ```
827
-
828
- </div><div>:warning: After
829
-
830
- ```ts
831
- app.post('/webhooks', async (req, res) => {
832
- try {
833
- // Note: this example assumes that the raw content of the body of the request
834
- // has been read and is available at req.rawBody; this will likely differ
835
- // depending on which body parser is used.
836
- await shopify.webhooks.process({
837
- rawBody: (req as any).rawBody, // as a string
838
- rawRequest: req,
839
- rawResponse: res,
840
- });
841
- } catch (error) {
842
- console.log(error.message);
843
- }
844
- });
845
- ```
846
-
847
- </div>
848
-
849
- 1. `Shopify.Webhooks.Registry.getHandler` is now `shopify.webhooks.getHttpHandler`, and simply returns the handler function for the given topic.
850
- <div>Before
851
-
852
- ```ts
853
- Shopify.Webhooks.Registry.addHandler({
854
- topic: 'PRODUCTS',
855
- path: '/webhooks',
856
- webhookHandler: productsWebhookHandler,
857
- });
858
-
859
- const productsHandler = Shopify.Webhooks.Registry.getHandler('PRODUCTS');
860
- // productsHandler = {path: '/webhooks', webhookHandler: productsWebhookHandler}
861
- ```
862
-
863
- </div><div>:warning: After
864
-
865
- ```ts
866
- shopify.webhooks.addHttpHandler({
867
- topic: 'PRODUCTS',
868
- handler: productsWebhookHandler,
869
- });
870
-
871
- const productsHandler = shopify.webhooks.getHttpHandler('PRODUCTS');
872
- // productsHandler = productsWebhookHandler
873
- ```
874
-
875
- </div>
876
-
877
- 1. `Shopify.Webhooks.Registry.getTopics` is now `shopify.webhooks.getTopicsAdded`, to indicate that it returns the topics added using either `addHttpHandler` or `addHttpHandlers`.
878
- <div>Before
879
-
880
- ```ts
881
- Shopify.Webhooks.Registry.addHandlers({
882
- PRODUCTS_CREATE: {
883
- path: '/webhooks',
884
- webhookHandler: productCreateWebhookHandler,
885
- },
886
- PRODUCTS_DELETE: {
887
- path: '/webhooks',
888
- webhookHandler: productDeleteWebhookHandler},
889
- });
890
-
891
- const topics = Shopify.Webhooks.Registry.getTopics();
892
- // topics = ['PRODUCTS_CREATE', 'PRODUCTS_DELETE']
893
- ```
894
-
895
- </div><div>:warning: After
896
-
897
- ```ts
898
- shopify.webhooks.addHttpHandlers([
899
- {topic: 'PRODUCTS_CREATE', handler: productCreateWebhookHandler},
900
- {topic: 'PRODUCTS_DELETE', handler: productDeleteWebhookHandler},
901
- ]);
902
-
903
- const topics = shopify.webhooks.getTopicsAdded();
904
- // topics = ['PRODUCTS_CREATE', 'PRODUCTS_DELETE']
905
- ```
906
-
907
- </div>
908
-
909
- ---
910
-
911
- ## Changes to use of REST resources
912
-
913
- REST resources were added to version 3 of the API library and were accessed by importing directly from the `dist` folder of the `@shopify/shopify-api`.
914
-
915
- Starting with v6, they can now be accessed via the shopify API directly.
916
-
917
- <div>Before
918
-
919
- ```ts
920
- app.get("/api/products/count", async (req, res) => {
921
- const session = await Shopify.Utils.loadCurrentSession(req, res, false);
922
- const { Product } = await import(
923
- `@shopify/shopify-api/dist/rest-resources/${Shopify.Context.API_VERSION}/index.js`
924
- );
925
-
926
- const countData = await Product.count({ session });
927
- res.status(200).send(countData);
928
- });
929
- ```
930
-
931
- </div><div>:warning: After
932
-
933
- ```ts
934
- import {shopifyApi, ApiVersion} from "@shopify/shopify-api";
935
- import {restResources} from '@shopify/shopify-api/rest/admin/2022-10'; // must match apiVersion used for shopifyApi()
936
-
937
- const shopify = shopifyApi({
938
- // ...
939
- apiVersion: ApiVersion.October22,
940
- restResources,
941
- });
942
-
943
- // ...
944
-
945
- app.get("/api/products/count", async (req, res) => {
946
- const session = await shopify.session.getCurrent({
947
- isOnline: false,
948
- rawRequest: req,
949
- rawResponse: res,
950
- });
951
-
952
- const countData = await shopify.rest.Product.count({ session });
953
- res.status(200).send(countData);
954
- });
955
- ```
956
-
957
- See [using REST resources](usage/rest.md#using-rest-resources) for more details.