@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.
- package/CHANGELOG.md +2 -2
- package/README.md +20 -19
- package/adapters/__e2etests__/utils.d.ts.map +1 -1
- package/adapters/__e2etests__/utils.js +6 -3
- package/adapters/__e2etests__/utils.js.map +1 -1
- package/adapters/cf-worker/adapter.d.ts.map +1 -1
- package/adapters/cf-worker/adapter.js +3 -2
- package/adapters/cf-worker/adapter.js.map +1 -1
- package/adapters/cf-worker/index.js +0 -1
- package/adapters/cf-worker/index.js.map +1 -1
- package/adapters/mock/adapter.d.ts +0 -2
- package/adapters/mock/adapter.d.ts.map +1 -1
- package/adapters/mock/adapter.js +4 -6
- package/adapters/mock/adapter.js.map +1 -1
- package/adapters/mock/index.js +0 -1
- package/adapters/mock/index.js.map +1 -1
- package/adapters/node/adapter.d.ts +0 -2
- package/adapters/node/adapter.d.ts.map +1 -1
- package/adapters/node/adapter.js +3 -9
- package/adapters/node/adapter.js.map +1 -1
- package/adapters/node/index.js +0 -1
- package/adapters/node/index.js.map +1 -1
- package/lib/auth/oauth/oauth.d.ts.map +1 -1
- package/lib/auth/oauth/oauth.js +26 -11
- package/lib/auth/oauth/oauth.js.map +1 -1
- package/lib/base-types.d.ts +21 -9
- package/lib/base-types.d.ts.map +1 -1
- package/lib/base-types.js +1 -0
- package/lib/base-types.js.map +1 -1
- package/lib/billing/check.d.ts.map +1 -1
- package/lib/billing/check.js +1 -4
- package/lib/billing/check.js.map +1 -1
- package/lib/billing/request.d.ts.map +1 -1
- package/lib/billing/request.js +1 -4
- package/lib/billing/request.js.map +1 -1
- package/lib/billing/types.d.ts +3 -3
- package/lib/billing/types.d.ts.map +1 -1
- package/lib/clients/graphql/graphql_client.d.ts +16 -28
- package/lib/clients/graphql/graphql_client.d.ts.map +1 -1
- package/lib/clients/graphql/graphql_client.js +73 -57
- package/lib/clients/graphql/graphql_client.js.map +1 -1
- package/lib/clients/graphql/graphql_proxy.d.ts +1 -1
- package/lib/clients/graphql/graphql_proxy.d.ts.map +1 -1
- package/lib/clients/graphql/graphql_proxy.js +15 -25
- package/lib/clients/graphql/graphql_proxy.js.map +1 -1
- package/lib/clients/graphql/storefront_client.d.ts +12 -25
- package/lib/clients/graphql/storefront_client.d.ts.map +1 -1
- package/lib/clients/graphql/storefront_client.js +52 -18
- package/lib/clients/graphql/storefront_client.js.map +1 -1
- package/lib/clients/graphql/types.d.ts +10 -2
- package/lib/clients/graphql/types.d.ts.map +1 -1
- package/lib/clients/http_client/http_client.d.ts +32 -30
- package/lib/clients/http_client/http_client.d.ts.map +1 -1
- package/lib/clients/http_client/http_client.js +279 -248
- package/lib/clients/http_client/http_client.js.map +1 -1
- package/lib/clients/index.d.ts +10 -72
- package/lib/clients/index.d.ts.map +1 -1
- package/lib/clients/index.js +2 -1
- package/lib/clients/index.js.map +1 -1
- package/lib/clients/rest/rest_client.d.ts +17 -28
- package/lib/clients/rest/rest_client.d.ts.map +1 -1
- package/lib/clients/rest/rest_client.js +110 -102
- package/lib/clients/rest/rest_client.js.map +1 -1
- package/lib/clients/rest/types.d.ts +4 -0
- package/lib/clients/rest/types.d.ts.map +1 -1
- package/lib/config.d.ts +1 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +11 -10
- package/lib/config.js.map +1 -1
- package/lib/error.d.ts +2 -2
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +9 -9
- package/lib/error.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/logger/index.d.ts +10 -0
- package/lib/logger/index.d.ts.map +1 -0
- package/lib/logger/index.js +39 -0
- package/lib/logger/index.js.map +1 -0
- package/lib/logger/log.d.ts +6 -0
- package/lib/logger/log.d.ts.map +1 -0
- package/lib/logger/log.js +57 -0
- package/lib/logger/log.js.map +1 -0
- package/lib/logger/types.d.ts +6 -0
- package/lib/logger/types.d.ts.map +1 -0
- package/{runtime/session → lib/logger}/types.js +0 -0
- package/{runtime/session → lib/logger}/types.js.map +0 -0
- package/lib/session/classes.d.ts +0 -1
- package/lib/session/classes.d.ts.map +1 -1
- package/lib/session/classes.js +1 -3
- package/lib/session/classes.js.map +1 -1
- package/lib/session/index.d.ts +2 -5
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -10
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-utils.d.ts +2 -8
- package/lib/session/session-utils.d.ts.map +1 -1
- package/lib/session/session-utils.js +27 -124
- package/lib/session/session-utils.js.map +1 -1
- package/lib/session/session.d.ts +6 -2
- package/lib/session/session.d.ts.map +1 -1
- package/lib/session/session.js +121 -0
- package/lib/session/session.js.map +1 -1
- package/lib/session/types.d.ts +10 -26
- package/lib/session/types.d.ts.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/webhooks/index.d.ts +3 -5
- package/lib/webhooks/index.d.ts.map +1 -1
- package/lib/webhooks/index.js +8 -8
- package/lib/webhooks/index.js.map +1 -1
- package/lib/webhooks/process.d.ts +5 -0
- package/lib/webhooks/process.d.ts.map +1 -0
- package/lib/webhooks/process.js +180 -0
- package/lib/webhooks/process.js.map +1 -0
- package/lib/webhooks/query-template.d.ts +4 -0
- package/lib/webhooks/query-template.d.ts.map +1 -0
- package/lib/webhooks/query-template.js +14 -0
- package/lib/webhooks/query-template.js.map +1 -0
- package/lib/webhooks/register.d.ts +6 -0
- package/lib/webhooks/register.d.ts.map +1 -0
- package/lib/webhooks/register.js +428 -0
- package/lib/webhooks/register.js.map +1 -0
- package/lib/webhooks/registry.d.ts +8 -11
- package/lib/webhooks/registry.d.ts.map +1 -1
- package/lib/webhooks/registry.js +136 -333
- package/lib/webhooks/registry.js.map +1 -1
- package/lib/webhooks/types.d.ts +47 -26
- package/lib/webhooks/types.d.ts.map +1 -1
- package/lib/webhooks/types.js +7 -1
- package/lib/webhooks/types.js.map +1 -1
- package/package.json +8 -19
- package/rest/admin/2022-01/abandoned_checkout.d.ts +2 -2
- package/rest/admin/2022-01/abandoned_checkout.d.ts.map +1 -1
- package/rest/admin/2022-01/access_scope.d.ts +2 -2
- package/rest/admin/2022-01/access_scope.d.ts.map +1 -1
- package/rest/admin/2022-01/android_pay_key.d.ts +3 -3
- package/rest/admin/2022-01/android_pay_key.d.ts.map +1 -1
- package/rest/admin/2022-01/apple_pay_certificate.d.ts +4 -4
- package/rest/admin/2022-01/apple_pay_certificate.d.ts.map +1 -1
- package/rest/admin/2022-01/application_charge.d.ts +3 -3
- package/rest/admin/2022-01/application_charge.d.ts.map +1 -1
- package/rest/admin/2022-01/application_credit.d.ts +3 -3
- package/rest/admin/2022-01/application_credit.d.ts.map +1 -1
- package/rest/admin/2022-01/article.d.ts +7 -7
- package/rest/admin/2022-01/article.d.ts.map +1 -1
- package/rest/admin/2022-01/asset.d.ts +3 -3
- package/rest/admin/2022-01/asset.d.ts.map +1 -1
- package/rest/admin/2022-01/assigned_fulfillment_order.d.ts +2 -2
- package/rest/admin/2022-01/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-01/balance.d.ts +2 -2
- package/rest/admin/2022-01/balance.d.ts.map +1 -1
- package/rest/admin/2022-01/blog.d.ts +5 -5
- package/rest/admin/2022-01/blog.d.ts.map +1 -1
- package/rest/admin/2022-01/carrier_service.d.ts +4 -4
- package/rest/admin/2022-01/carrier_service.d.ts.map +1 -1
- package/rest/admin/2022-01/checkout.d.ts +3 -3
- package/rest/admin/2022-01/checkout.d.ts.map +1 -1
- package/rest/admin/2022-01/collect.d.ts +5 -5
- package/rest/admin/2022-01/collect.d.ts.map +1 -1
- package/rest/admin/2022-01/collection.d.ts +3 -3
- package/rest/admin/2022-01/collection.d.ts.map +1 -1
- package/rest/admin/2022-01/collection_listing.d.ts +5 -5
- package/rest/admin/2022-01/collection_listing.d.ts.map +1 -1
- package/rest/admin/2022-01/comment.d.ts +4 -4
- package/rest/admin/2022-01/comment.d.ts.map +1 -1
- package/rest/admin/2022-01/country.d.ts +5 -5
- package/rest/admin/2022-01/country.d.ts.map +1 -1
- package/rest/admin/2022-01/currency.d.ts +2 -2
- package/rest/admin/2022-01/currency.d.ts.map +1 -1
- package/rest/admin/2022-01/custom_collection.d.ts +5 -5
- package/rest/admin/2022-01/custom_collection.d.ts.map +1 -1
- package/rest/admin/2022-01/customer.d.ts +7 -7
- package/rest/admin/2022-01/customer.d.ts.map +1 -1
- package/rest/admin/2022-01/customer_address.d.ts +4 -4
- package/rest/admin/2022-01/customer_address.d.ts.map +1 -1
- package/rest/admin/2022-01/customer_saved_search.d.ts +6 -6
- package/rest/admin/2022-01/customer_saved_search.d.ts.map +1 -1
- package/rest/admin/2022-01/deprecated_api_call.d.ts +2 -2
- package/rest/admin/2022-01/deprecated_api_call.d.ts.map +1 -1
- package/rest/admin/2022-01/discount_code.d.ts +7 -7
- package/rest/admin/2022-01/discount_code.d.ts.map +1 -1
- package/rest/admin/2022-01/dispute.d.ts +3 -3
- package/rest/admin/2022-01/dispute.d.ts.map +1 -1
- package/rest/admin/2022-01/draft_order.d.ts +5 -5
- package/rest/admin/2022-01/draft_order.d.ts.map +1 -1
- package/rest/admin/2022-01/event.d.ts +4 -4
- package/rest/admin/2022-01/event.d.ts.map +1 -1
- package/rest/admin/2022-01/fulfillment.d.ts +4 -4
- package/rest/admin/2022-01/fulfillment.d.ts.map +1 -1
- package/rest/admin/2022-01/fulfillment_event.d.ts +4 -4
- package/rest/admin/2022-01/fulfillment_event.d.ts.map +1 -1
- package/rest/admin/2022-01/fulfillment_order.d.ts +3 -3
- package/rest/admin/2022-01/fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-01/fulfillment_service.d.ts +4 -4
- package/rest/admin/2022-01/fulfillment_service.d.ts.map +1 -1
- package/rest/admin/2022-01/gift_card.d.ts +5 -5
- package/rest/admin/2022-01/gift_card.d.ts.map +1 -1
- package/rest/admin/2022-01/gift_card_adjustment.d.ts +3 -3
- package/rest/admin/2022-01/gift_card_adjustment.d.ts.map +1 -1
- package/rest/admin/2022-01/image.d.ts +5 -5
- package/rest/admin/2022-01/image.d.ts.map +1 -1
- package/rest/admin/2022-01/inventory_item.d.ts +3 -3
- package/rest/admin/2022-01/inventory_item.d.ts.map +1 -1
- package/rest/admin/2022-01/inventory_level.d.ts +3 -3
- package/rest/admin/2022-01/inventory_level.d.ts.map +1 -1
- package/rest/admin/2022-01/location.d.ts +5 -5
- package/rest/admin/2022-01/location.d.ts.map +1 -1
- package/rest/admin/2022-01/locations_for_move.d.ts +2 -2
- package/rest/admin/2022-01/locations_for_move.d.ts.map +1 -1
- package/rest/admin/2022-01/marketing_event.d.ts +5 -5
- package/rest/admin/2022-01/marketing_event.d.ts.map +1 -1
- package/rest/admin/2022-01/metafield.d.ts +5 -5
- package/rest/admin/2022-01/metafield.d.ts.map +1 -1
- package/rest/admin/2022-01/mobile_platform_application.d.ts +4 -4
- package/rest/admin/2022-01/mobile_platform_application.d.ts.map +1 -1
- package/rest/admin/2022-01/order.d.ts +5 -5
- package/rest/admin/2022-01/order.d.ts.map +1 -1
- package/rest/admin/2022-01/order_risk.d.ts +4 -4
- package/rest/admin/2022-01/order_risk.d.ts.map +1 -1
- package/rest/admin/2022-01/page.d.ts +5 -5
- package/rest/admin/2022-01/page.d.ts.map +1 -1
- package/rest/admin/2022-01/payment.d.ts +4 -4
- package/rest/admin/2022-01/payment.d.ts.map +1 -1
- package/rest/admin/2022-01/payment_gateway.d.ts +4 -4
- package/rest/admin/2022-01/payment_gateway.d.ts.map +1 -1
- package/rest/admin/2022-01/payment_transaction.d.ts +2 -2
- package/rest/admin/2022-01/payment_transaction.d.ts.map +1 -1
- package/rest/admin/2022-01/payout.d.ts +3 -3
- package/rest/admin/2022-01/payout.d.ts.map +1 -1
- package/rest/admin/2022-01/policy.d.ts +2 -2
- package/rest/admin/2022-01/policy.d.ts.map +1 -1
- package/rest/admin/2022-01/price_rule.d.ts +5 -5
- package/rest/admin/2022-01/price_rule.d.ts.map +1 -1
- package/rest/admin/2022-01/product.d.ts +5 -5
- package/rest/admin/2022-01/product.d.ts.map +1 -1
- package/rest/admin/2022-01/product_listing.d.ts +6 -6
- package/rest/admin/2022-01/product_listing.d.ts.map +1 -1
- package/rest/admin/2022-01/product_resource_feedback.d.ts +2 -2
- package/rest/admin/2022-01/product_resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-01/province.d.ts +4 -4
- package/rest/admin/2022-01/province.d.ts.map +1 -1
- package/rest/admin/2022-01/recurring_application_charge.d.ts +4 -4
- package/rest/admin/2022-01/recurring_application_charge.d.ts.map +1 -1
- package/rest/admin/2022-01/redirect.d.ts +5 -5
- package/rest/admin/2022-01/redirect.d.ts.map +1 -1
- package/rest/admin/2022-01/refund.d.ts +3 -3
- package/rest/admin/2022-01/refund.d.ts.map +1 -1
- package/rest/admin/2022-01/report.d.ts +4 -4
- package/rest/admin/2022-01/report.d.ts.map +1 -1
- package/rest/admin/2022-01/resource_feedback.d.ts +2 -2
- package/rest/admin/2022-01/resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-01/script_tag.d.ts +5 -5
- package/rest/admin/2022-01/script_tag.d.ts.map +1 -1
- package/rest/admin/2022-01/shipping_zone.d.ts +2 -2
- package/rest/admin/2022-01/shipping_zone.d.ts.map +1 -1
- package/rest/admin/2022-01/shop.d.ts +2 -2
- package/rest/admin/2022-01/shop.d.ts.map +1 -1
- package/rest/admin/2022-01/smart_collection.d.ts +5 -5
- package/rest/admin/2022-01/smart_collection.d.ts.map +1 -1
- package/rest/admin/2022-01/storefront_access_token.d.ts +3 -3
- package/rest/admin/2022-01/storefront_access_token.d.ts.map +1 -1
- package/rest/admin/2022-01/tender_transaction.d.ts +2 -2
- package/rest/admin/2022-01/tender_transaction.d.ts.map +1 -1
- package/rest/admin/2022-01/theme.d.ts +4 -4
- package/rest/admin/2022-01/theme.d.ts.map +1 -1
- package/rest/admin/2022-01/transaction.d.ts +4 -4
- package/rest/admin/2022-01/transaction.d.ts.map +1 -1
- package/rest/admin/2022-01/usage_charge.d.ts +3 -3
- package/rest/admin/2022-01/usage_charge.d.ts.map +1 -1
- package/rest/admin/2022-01/user.d.ts +4 -4
- package/rest/admin/2022-01/user.d.ts.map +1 -1
- package/rest/admin/2022-01/variant.d.ts +5 -5
- package/rest/admin/2022-01/variant.d.ts.map +1 -1
- package/rest/admin/2022-01/webhook.d.ts +5 -5
- package/rest/admin/2022-01/webhook.d.ts.map +1 -1
- package/rest/admin/2022-04/abandoned_checkout.d.ts +2 -2
- package/rest/admin/2022-04/abandoned_checkout.d.ts.map +1 -1
- package/rest/admin/2022-04/access_scope.d.ts +2 -2
- package/rest/admin/2022-04/access_scope.d.ts.map +1 -1
- package/rest/admin/2022-04/android_pay_key.d.ts +3 -3
- package/rest/admin/2022-04/android_pay_key.d.ts.map +1 -1
- package/rest/admin/2022-04/apple_pay_certificate.d.ts +4 -4
- package/rest/admin/2022-04/apple_pay_certificate.d.ts.map +1 -1
- package/rest/admin/2022-04/application_charge.d.ts +3 -3
- package/rest/admin/2022-04/application_charge.d.ts.map +1 -1
- package/rest/admin/2022-04/application_credit.d.ts +3 -3
- package/rest/admin/2022-04/application_credit.d.ts.map +1 -1
- package/rest/admin/2022-04/article.d.ts +7 -7
- package/rest/admin/2022-04/article.d.ts.map +1 -1
- package/rest/admin/2022-04/asset.d.ts +3 -3
- package/rest/admin/2022-04/asset.d.ts.map +1 -1
- package/rest/admin/2022-04/assigned_fulfillment_order.d.ts +2 -2
- package/rest/admin/2022-04/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-04/balance.d.ts +2 -2
- package/rest/admin/2022-04/balance.d.ts.map +1 -1
- package/rest/admin/2022-04/blog.d.ts +5 -5
- package/rest/admin/2022-04/blog.d.ts.map +1 -1
- package/rest/admin/2022-04/carrier_service.d.ts +4 -4
- package/rest/admin/2022-04/carrier_service.d.ts.map +1 -1
- package/rest/admin/2022-04/checkout.d.ts +3 -3
- package/rest/admin/2022-04/checkout.d.ts.map +1 -1
- package/rest/admin/2022-04/collect.d.ts +5 -5
- package/rest/admin/2022-04/collect.d.ts.map +1 -1
- package/rest/admin/2022-04/collection.d.ts +3 -3
- package/rest/admin/2022-04/collection.d.ts.map +1 -1
- package/rest/admin/2022-04/collection_listing.d.ts +5 -5
- package/rest/admin/2022-04/collection_listing.d.ts.map +1 -1
- package/rest/admin/2022-04/comment.d.ts +4 -4
- package/rest/admin/2022-04/comment.d.ts.map +1 -1
- package/rest/admin/2022-04/country.d.ts +5 -5
- package/rest/admin/2022-04/country.d.ts.map +1 -1
- package/rest/admin/2022-04/currency.d.ts +2 -2
- package/rest/admin/2022-04/currency.d.ts.map +1 -1
- package/rest/admin/2022-04/custom_collection.d.ts +5 -5
- package/rest/admin/2022-04/custom_collection.d.ts.map +1 -1
- package/rest/admin/2022-04/customer.d.ts +7 -7
- package/rest/admin/2022-04/customer.d.ts.map +1 -1
- package/rest/admin/2022-04/customer_address.d.ts +4 -4
- package/rest/admin/2022-04/customer_address.d.ts.map +1 -1
- package/rest/admin/2022-04/customer_saved_search.d.ts +6 -6
- package/rest/admin/2022-04/customer_saved_search.d.ts.map +1 -1
- package/rest/admin/2022-04/deprecated_api_call.d.ts +2 -2
- package/rest/admin/2022-04/deprecated_api_call.d.ts.map +1 -1
- package/rest/admin/2022-04/discount_code.d.ts +7 -7
- package/rest/admin/2022-04/discount_code.d.ts.map +1 -1
- package/rest/admin/2022-04/dispute.d.ts +3 -3
- package/rest/admin/2022-04/dispute.d.ts.map +1 -1
- package/rest/admin/2022-04/draft_order.d.ts +5 -5
- package/rest/admin/2022-04/draft_order.d.ts.map +1 -1
- package/rest/admin/2022-04/event.d.ts +4 -4
- package/rest/admin/2022-04/event.d.ts.map +1 -1
- package/rest/admin/2022-04/fulfillment.d.ts +4 -4
- package/rest/admin/2022-04/fulfillment.d.ts.map +1 -1
- package/rest/admin/2022-04/fulfillment_event.d.ts +4 -4
- package/rest/admin/2022-04/fulfillment_event.d.ts.map +1 -1
- package/rest/admin/2022-04/fulfillment_order.d.ts +3 -3
- package/rest/admin/2022-04/fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-04/fulfillment_service.d.ts +4 -4
- package/rest/admin/2022-04/fulfillment_service.d.ts.map +1 -1
- package/rest/admin/2022-04/gift_card.d.ts +5 -5
- package/rest/admin/2022-04/gift_card.d.ts.map +1 -1
- package/rest/admin/2022-04/gift_card_adjustment.d.ts +3 -3
- package/rest/admin/2022-04/gift_card_adjustment.d.ts.map +1 -1
- package/rest/admin/2022-04/image.d.ts +5 -5
- package/rest/admin/2022-04/image.d.ts.map +1 -1
- package/rest/admin/2022-04/inventory_item.d.ts +3 -3
- package/rest/admin/2022-04/inventory_item.d.ts.map +1 -1
- package/rest/admin/2022-04/inventory_level.d.ts +3 -3
- package/rest/admin/2022-04/inventory_level.d.ts.map +1 -1
- package/rest/admin/2022-04/location.d.ts +5 -5
- package/rest/admin/2022-04/location.d.ts.map +1 -1
- package/rest/admin/2022-04/locations_for_move.d.ts +2 -2
- package/rest/admin/2022-04/locations_for_move.d.ts.map +1 -1
- package/rest/admin/2022-04/marketing_event.d.ts +5 -5
- package/rest/admin/2022-04/marketing_event.d.ts.map +1 -1
- package/rest/admin/2022-04/metafield.d.ts +5 -5
- package/rest/admin/2022-04/metafield.d.ts.map +1 -1
- package/rest/admin/2022-04/mobile_platform_application.d.ts +4 -4
- package/rest/admin/2022-04/mobile_platform_application.d.ts.map +1 -1
- package/rest/admin/2022-04/order.d.ts +5 -5
- package/rest/admin/2022-04/order.d.ts.map +1 -1
- package/rest/admin/2022-04/order_risk.d.ts +4 -4
- package/rest/admin/2022-04/order_risk.d.ts.map +1 -1
- package/rest/admin/2022-04/page.d.ts +5 -5
- package/rest/admin/2022-04/page.d.ts.map +1 -1
- package/rest/admin/2022-04/payment.d.ts +4 -4
- package/rest/admin/2022-04/payment.d.ts.map +1 -1
- package/rest/admin/2022-04/payment_gateway.d.ts +4 -4
- package/rest/admin/2022-04/payment_gateway.d.ts.map +1 -1
- package/rest/admin/2022-04/payment_transaction.d.ts +2 -2
- package/rest/admin/2022-04/payment_transaction.d.ts.map +1 -1
- package/rest/admin/2022-04/payout.d.ts +3 -3
- package/rest/admin/2022-04/payout.d.ts.map +1 -1
- package/rest/admin/2022-04/policy.d.ts +2 -2
- package/rest/admin/2022-04/policy.d.ts.map +1 -1
- package/rest/admin/2022-04/price_rule.d.ts +5 -5
- package/rest/admin/2022-04/price_rule.d.ts.map +1 -1
- package/rest/admin/2022-04/product.d.ts +5 -5
- package/rest/admin/2022-04/product.d.ts.map +1 -1
- package/rest/admin/2022-04/product_listing.d.ts +6 -6
- package/rest/admin/2022-04/product_listing.d.ts.map +1 -1
- package/rest/admin/2022-04/product_resource_feedback.d.ts +2 -2
- package/rest/admin/2022-04/product_resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-04/province.d.ts +4 -4
- package/rest/admin/2022-04/province.d.ts.map +1 -1
- package/rest/admin/2022-04/recurring_application_charge.d.ts +4 -4
- package/rest/admin/2022-04/recurring_application_charge.d.ts.map +1 -1
- package/rest/admin/2022-04/redirect.d.ts +5 -5
- package/rest/admin/2022-04/redirect.d.ts.map +1 -1
- package/rest/admin/2022-04/refund.d.ts +3 -3
- package/rest/admin/2022-04/refund.d.ts.map +1 -1
- package/rest/admin/2022-04/report.d.ts +4 -4
- package/rest/admin/2022-04/report.d.ts.map +1 -1
- package/rest/admin/2022-04/resource_feedback.d.ts +2 -2
- package/rest/admin/2022-04/resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-04/script_tag.d.ts +5 -5
- package/rest/admin/2022-04/script_tag.d.ts.map +1 -1
- package/rest/admin/2022-04/shipping_zone.d.ts +2 -2
- package/rest/admin/2022-04/shipping_zone.d.ts.map +1 -1
- package/rest/admin/2022-04/shop.d.ts +2 -2
- package/rest/admin/2022-04/shop.d.ts.map +1 -1
- package/rest/admin/2022-04/smart_collection.d.ts +5 -5
- package/rest/admin/2022-04/smart_collection.d.ts.map +1 -1
- package/rest/admin/2022-04/storefront_access_token.d.ts +3 -3
- package/rest/admin/2022-04/storefront_access_token.d.ts.map +1 -1
- package/rest/admin/2022-04/tender_transaction.d.ts +2 -2
- package/rest/admin/2022-04/tender_transaction.d.ts.map +1 -1
- package/rest/admin/2022-04/theme.d.ts +4 -4
- package/rest/admin/2022-04/theme.d.ts.map +1 -1
- package/rest/admin/2022-04/transaction.d.ts +4 -4
- package/rest/admin/2022-04/transaction.d.ts.map +1 -1
- package/rest/admin/2022-04/usage_charge.d.ts +3 -3
- package/rest/admin/2022-04/usage_charge.d.ts.map +1 -1
- package/rest/admin/2022-04/user.d.ts +4 -4
- package/rest/admin/2022-04/user.d.ts.map +1 -1
- package/rest/admin/2022-04/variant.d.ts +5 -5
- package/rest/admin/2022-04/variant.d.ts.map +1 -1
- package/rest/admin/2022-04/webhook.d.ts +5 -5
- package/rest/admin/2022-04/webhook.d.ts.map +1 -1
- package/rest/admin/2022-07/abandoned_checkout.d.ts +2 -2
- package/rest/admin/2022-07/abandoned_checkout.d.ts.map +1 -1
- package/rest/admin/2022-07/access_scope.d.ts +2 -2
- package/rest/admin/2022-07/access_scope.d.ts.map +1 -1
- package/rest/admin/2022-07/android_pay_key.d.ts +3 -3
- package/rest/admin/2022-07/android_pay_key.d.ts.map +1 -1
- package/rest/admin/2022-07/apple_pay_certificate.d.ts +4 -4
- package/rest/admin/2022-07/apple_pay_certificate.d.ts.map +1 -1
- package/rest/admin/2022-07/application_charge.d.ts +3 -3
- package/rest/admin/2022-07/application_charge.d.ts.map +1 -1
- package/rest/admin/2022-07/application_credit.d.ts +3 -3
- package/rest/admin/2022-07/application_credit.d.ts.map +1 -1
- package/rest/admin/2022-07/article.d.ts +7 -7
- package/rest/admin/2022-07/article.d.ts.map +1 -1
- package/rest/admin/2022-07/asset.d.ts +3 -3
- package/rest/admin/2022-07/asset.d.ts.map +1 -1
- package/rest/admin/2022-07/assigned_fulfillment_order.d.ts +2 -2
- package/rest/admin/2022-07/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-07/balance.d.ts +2 -2
- package/rest/admin/2022-07/balance.d.ts.map +1 -1
- package/rest/admin/2022-07/blog.d.ts +5 -5
- package/rest/admin/2022-07/blog.d.ts.map +1 -1
- package/rest/admin/2022-07/carrier_service.d.ts +4 -4
- package/rest/admin/2022-07/carrier_service.d.ts.map +1 -1
- package/rest/admin/2022-07/checkout.d.ts +3 -3
- package/rest/admin/2022-07/checkout.d.ts.map +1 -1
- package/rest/admin/2022-07/collect.d.ts +5 -5
- package/rest/admin/2022-07/collect.d.ts.map +1 -1
- package/rest/admin/2022-07/collection.d.ts +3 -3
- package/rest/admin/2022-07/collection.d.ts.map +1 -1
- package/rest/admin/2022-07/collection_listing.d.ts +5 -5
- package/rest/admin/2022-07/collection_listing.d.ts.map +1 -1
- package/rest/admin/2022-07/comment.d.ts +4 -4
- package/rest/admin/2022-07/comment.d.ts.map +1 -1
- package/rest/admin/2022-07/country.d.ts +5 -5
- package/rest/admin/2022-07/country.d.ts.map +1 -1
- package/rest/admin/2022-07/currency.d.ts +2 -2
- package/rest/admin/2022-07/currency.d.ts.map +1 -1
- package/rest/admin/2022-07/custom_collection.d.ts +5 -5
- package/rest/admin/2022-07/custom_collection.d.ts.map +1 -1
- package/rest/admin/2022-07/customer.d.ts +7 -7
- package/rest/admin/2022-07/customer.d.ts.map +1 -1
- package/rest/admin/2022-07/customer_address.d.ts +4 -4
- package/rest/admin/2022-07/customer_address.d.ts.map +1 -1
- package/rest/admin/2022-07/customer_saved_search.d.ts +6 -6
- package/rest/admin/2022-07/customer_saved_search.d.ts.map +1 -1
- package/rest/admin/2022-07/deprecated_api_call.d.ts +2 -2
- package/rest/admin/2022-07/deprecated_api_call.d.ts.map +1 -1
- package/rest/admin/2022-07/discount_code.d.ts +7 -7
- package/rest/admin/2022-07/discount_code.d.ts.map +1 -1
- package/rest/admin/2022-07/dispute.d.ts +3 -3
- package/rest/admin/2022-07/dispute.d.ts.map +1 -1
- package/rest/admin/2022-07/dispute_evidence.d.ts +2 -2
- package/rest/admin/2022-07/dispute_evidence.d.ts.map +1 -1
- package/rest/admin/2022-07/dispute_file_upload.d.ts +2 -2
- package/rest/admin/2022-07/dispute_file_upload.d.ts.map +1 -1
- package/rest/admin/2022-07/draft_order.d.ts +5 -5
- package/rest/admin/2022-07/draft_order.d.ts.map +1 -1
- package/rest/admin/2022-07/event.d.ts +4 -4
- package/rest/admin/2022-07/event.d.ts.map +1 -1
- package/rest/admin/2022-07/fulfillment.d.ts +4 -4
- package/rest/admin/2022-07/fulfillment.d.ts.map +1 -1
- package/rest/admin/2022-07/fulfillment_event.d.ts +4 -4
- package/rest/admin/2022-07/fulfillment_event.d.ts.map +1 -1
- package/rest/admin/2022-07/fulfillment_order.d.ts +3 -3
- package/rest/admin/2022-07/fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-07/fulfillment_service.d.ts +4 -4
- package/rest/admin/2022-07/fulfillment_service.d.ts.map +1 -1
- package/rest/admin/2022-07/gift_card.d.ts +5 -5
- package/rest/admin/2022-07/gift_card.d.ts.map +1 -1
- package/rest/admin/2022-07/gift_card_adjustment.d.ts +3 -3
- package/rest/admin/2022-07/gift_card_adjustment.d.ts.map +1 -1
- package/rest/admin/2022-07/image.d.ts +5 -5
- package/rest/admin/2022-07/image.d.ts.map +1 -1
- package/rest/admin/2022-07/inventory_item.d.ts +3 -3
- package/rest/admin/2022-07/inventory_item.d.ts.map +1 -1
- package/rest/admin/2022-07/inventory_level.d.ts +3 -3
- package/rest/admin/2022-07/inventory_level.d.ts.map +1 -1
- package/rest/admin/2022-07/location.d.ts +5 -5
- package/rest/admin/2022-07/location.d.ts.map +1 -1
- package/rest/admin/2022-07/locations_for_move.d.ts +2 -2
- package/rest/admin/2022-07/locations_for_move.d.ts.map +1 -1
- package/rest/admin/2022-07/marketing_event.d.ts +5 -5
- package/rest/admin/2022-07/marketing_event.d.ts.map +1 -1
- package/rest/admin/2022-07/metafield.d.ts +5 -5
- package/rest/admin/2022-07/metafield.d.ts.map +1 -1
- package/rest/admin/2022-07/mobile_platform_application.d.ts +4 -4
- package/rest/admin/2022-07/mobile_platform_application.d.ts.map +1 -1
- package/rest/admin/2022-07/order.d.ts +5 -5
- package/rest/admin/2022-07/order.d.ts.map +1 -1
- package/rest/admin/2022-07/order_risk.d.ts +4 -4
- package/rest/admin/2022-07/order_risk.d.ts.map +1 -1
- package/rest/admin/2022-07/page.d.ts +5 -5
- package/rest/admin/2022-07/page.d.ts.map +1 -1
- package/rest/admin/2022-07/payment.d.ts +4 -4
- package/rest/admin/2022-07/payment.d.ts.map +1 -1
- package/rest/admin/2022-07/payment_gateway.d.ts +4 -4
- package/rest/admin/2022-07/payment_gateway.d.ts.map +1 -1
- package/rest/admin/2022-07/payment_transaction.d.ts +2 -2
- package/rest/admin/2022-07/payment_transaction.d.ts.map +1 -1
- package/rest/admin/2022-07/payout.d.ts +3 -3
- package/rest/admin/2022-07/payout.d.ts.map +1 -1
- package/rest/admin/2022-07/policy.d.ts +2 -2
- package/rest/admin/2022-07/policy.d.ts.map +1 -1
- package/rest/admin/2022-07/price_rule.d.ts +5 -5
- package/rest/admin/2022-07/price_rule.d.ts.map +1 -1
- package/rest/admin/2022-07/product.d.ts +5 -5
- package/rest/admin/2022-07/product.d.ts.map +1 -1
- package/rest/admin/2022-07/product_listing.d.ts +6 -6
- package/rest/admin/2022-07/product_listing.d.ts.map +1 -1
- package/rest/admin/2022-07/product_resource_feedback.d.ts +2 -2
- package/rest/admin/2022-07/product_resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-07/province.d.ts +4 -4
- package/rest/admin/2022-07/province.d.ts.map +1 -1
- package/rest/admin/2022-07/recurring_application_charge.d.ts +4 -4
- package/rest/admin/2022-07/recurring_application_charge.d.ts.map +1 -1
- package/rest/admin/2022-07/redirect.d.ts +5 -5
- package/rest/admin/2022-07/redirect.d.ts.map +1 -1
- package/rest/admin/2022-07/refund.d.ts +3 -3
- package/rest/admin/2022-07/refund.d.ts.map +1 -1
- package/rest/admin/2022-07/report.d.ts +4 -4
- package/rest/admin/2022-07/report.d.ts.map +1 -1
- package/rest/admin/2022-07/resource_feedback.d.ts +2 -2
- package/rest/admin/2022-07/resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-07/script_tag.d.ts +5 -5
- package/rest/admin/2022-07/script_tag.d.ts.map +1 -1
- package/rest/admin/2022-07/shipping_zone.d.ts +2 -2
- package/rest/admin/2022-07/shipping_zone.d.ts.map +1 -1
- package/rest/admin/2022-07/shop.d.ts +2 -2
- package/rest/admin/2022-07/shop.d.ts.map +1 -1
- package/rest/admin/2022-07/smart_collection.d.ts +5 -5
- package/rest/admin/2022-07/smart_collection.d.ts.map +1 -1
- package/rest/admin/2022-07/storefront_access_token.d.ts +3 -3
- package/rest/admin/2022-07/storefront_access_token.d.ts.map +1 -1
- package/rest/admin/2022-07/tender_transaction.d.ts +2 -2
- package/rest/admin/2022-07/tender_transaction.d.ts.map +1 -1
- package/rest/admin/2022-07/theme.d.ts +4 -4
- package/rest/admin/2022-07/theme.d.ts.map +1 -1
- package/rest/admin/2022-07/transaction.d.ts +4 -4
- package/rest/admin/2022-07/transaction.d.ts.map +1 -1
- package/rest/admin/2022-07/usage_charge.d.ts +3 -3
- package/rest/admin/2022-07/usage_charge.d.ts.map +1 -1
- package/rest/admin/2022-07/user.d.ts +4 -4
- package/rest/admin/2022-07/user.d.ts.map +1 -1
- package/rest/admin/2022-07/variant.d.ts +5 -5
- package/rest/admin/2022-07/variant.d.ts.map +1 -1
- package/rest/admin/2022-07/webhook.d.ts +5 -5
- package/rest/admin/2022-07/webhook.d.ts.map +1 -1
- package/rest/admin/2022-10/abandoned_checkout.d.ts +2 -2
- package/rest/admin/2022-10/abandoned_checkout.d.ts.map +1 -1
- package/rest/admin/2022-10/access_scope.d.ts +2 -2
- package/rest/admin/2022-10/access_scope.d.ts.map +1 -1
- package/rest/admin/2022-10/android_pay_key.d.ts +3 -3
- package/rest/admin/2022-10/android_pay_key.d.ts.map +1 -1
- package/rest/admin/2022-10/apple_pay_certificate.d.ts +4 -4
- package/rest/admin/2022-10/apple_pay_certificate.d.ts.map +1 -1
- package/rest/admin/2022-10/application_charge.d.ts +3 -3
- package/rest/admin/2022-10/application_charge.d.ts.map +1 -1
- package/rest/admin/2022-10/application_credit.d.ts +3 -3
- package/rest/admin/2022-10/application_credit.d.ts.map +1 -1
- package/rest/admin/2022-10/article.d.ts +7 -7
- package/rest/admin/2022-10/article.d.ts.map +1 -1
- package/rest/admin/2022-10/asset.d.ts +3 -3
- package/rest/admin/2022-10/asset.d.ts.map +1 -1
- package/rest/admin/2022-10/assigned_fulfillment_order.d.ts +2 -2
- package/rest/admin/2022-10/assigned_fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-10/balance.d.ts +2 -2
- package/rest/admin/2022-10/balance.d.ts.map +1 -1
- package/rest/admin/2022-10/blog.d.ts +5 -5
- package/rest/admin/2022-10/blog.d.ts.map +1 -1
- package/rest/admin/2022-10/carrier_service.d.ts +4 -4
- package/rest/admin/2022-10/carrier_service.d.ts.map +1 -1
- package/rest/admin/2022-10/checkout.d.ts +3 -3
- package/rest/admin/2022-10/checkout.d.ts.map +1 -1
- package/rest/admin/2022-10/collect.d.ts +5 -5
- package/rest/admin/2022-10/collect.d.ts.map +1 -1
- package/rest/admin/2022-10/collection.d.ts +3 -3
- package/rest/admin/2022-10/collection.d.ts.map +1 -1
- package/rest/admin/2022-10/collection_listing.d.ts +5 -5
- package/rest/admin/2022-10/collection_listing.d.ts.map +1 -1
- package/rest/admin/2022-10/comment.d.ts +4 -4
- package/rest/admin/2022-10/comment.d.ts.map +1 -1
- package/rest/admin/2022-10/country.d.ts +5 -5
- package/rest/admin/2022-10/country.d.ts.map +1 -1
- package/rest/admin/2022-10/currency.d.ts +2 -2
- package/rest/admin/2022-10/currency.d.ts.map +1 -1
- package/rest/admin/2022-10/custom_collection.d.ts +5 -5
- package/rest/admin/2022-10/custom_collection.d.ts.map +1 -1
- package/rest/admin/2022-10/customer.d.ts +7 -7
- package/rest/admin/2022-10/customer.d.ts.map +1 -1
- package/rest/admin/2022-10/customer_address.d.ts +4 -4
- package/rest/admin/2022-10/customer_address.d.ts.map +1 -1
- package/rest/admin/2022-10/customer_saved_search.d.ts +6 -6
- package/rest/admin/2022-10/customer_saved_search.d.ts.map +1 -1
- package/rest/admin/2022-10/deprecated_api_call.d.ts +2 -2
- package/rest/admin/2022-10/deprecated_api_call.d.ts.map +1 -1
- package/rest/admin/2022-10/discount_code.d.ts +7 -7
- package/rest/admin/2022-10/discount_code.d.ts.map +1 -1
- package/rest/admin/2022-10/dispute.d.ts +3 -3
- package/rest/admin/2022-10/dispute.d.ts.map +1 -1
- package/rest/admin/2022-10/dispute_evidence.d.ts +2 -2
- package/rest/admin/2022-10/dispute_evidence.d.ts.map +1 -1
- package/rest/admin/2022-10/dispute_file_upload.d.ts +2 -2
- package/rest/admin/2022-10/dispute_file_upload.d.ts.map +1 -1
- package/rest/admin/2022-10/draft_order.d.ts +5 -5
- package/rest/admin/2022-10/draft_order.d.ts.map +1 -1
- package/rest/admin/2022-10/event.d.ts +4 -4
- package/rest/admin/2022-10/event.d.ts.map +1 -1
- package/rest/admin/2022-10/fulfillment.d.ts +4 -4
- package/rest/admin/2022-10/fulfillment.d.ts.map +1 -1
- package/rest/admin/2022-10/fulfillment_event.d.ts +4 -4
- package/rest/admin/2022-10/fulfillment_event.d.ts.map +1 -1
- package/rest/admin/2022-10/fulfillment_order.d.ts +3 -3
- package/rest/admin/2022-10/fulfillment_order.d.ts.map +1 -1
- package/rest/admin/2022-10/fulfillment_service.d.ts +4 -4
- package/rest/admin/2022-10/fulfillment_service.d.ts.map +1 -1
- package/rest/admin/2022-10/gift_card.d.ts +5 -5
- package/rest/admin/2022-10/gift_card.d.ts.map +1 -1
- package/rest/admin/2022-10/gift_card_adjustment.d.ts +3 -3
- package/rest/admin/2022-10/gift_card_adjustment.d.ts.map +1 -1
- package/rest/admin/2022-10/image.d.ts +5 -5
- package/rest/admin/2022-10/image.d.ts.map +1 -1
- package/rest/admin/2022-10/inventory_item.d.ts +3 -3
- package/rest/admin/2022-10/inventory_item.d.ts.map +1 -1
- package/rest/admin/2022-10/inventory_level.d.ts +3 -3
- package/rest/admin/2022-10/inventory_level.d.ts.map +1 -1
- package/rest/admin/2022-10/location.d.ts +5 -5
- package/rest/admin/2022-10/location.d.ts.map +1 -1
- package/rest/admin/2022-10/locations_for_move.d.ts +2 -2
- package/rest/admin/2022-10/locations_for_move.d.ts.map +1 -1
- package/rest/admin/2022-10/marketing_event.d.ts +5 -5
- package/rest/admin/2022-10/marketing_event.d.ts.map +1 -1
- package/rest/admin/2022-10/metafield.d.ts +5 -5
- package/rest/admin/2022-10/metafield.d.ts.map +1 -1
- package/rest/admin/2022-10/mobile_platform_application.d.ts +4 -4
- package/rest/admin/2022-10/mobile_platform_application.d.ts.map +1 -1
- package/rest/admin/2022-10/order.d.ts +5 -5
- package/rest/admin/2022-10/order.d.ts.map +1 -1
- package/rest/admin/2022-10/order_risk.d.ts +4 -4
- package/rest/admin/2022-10/order_risk.d.ts.map +1 -1
- package/rest/admin/2022-10/page.d.ts +5 -5
- package/rest/admin/2022-10/page.d.ts.map +1 -1
- package/rest/admin/2022-10/payment.d.ts +4 -4
- package/rest/admin/2022-10/payment.d.ts.map +1 -1
- package/rest/admin/2022-10/payment_gateway.d.ts +4 -4
- package/rest/admin/2022-10/payment_gateway.d.ts.map +1 -1
- package/rest/admin/2022-10/payment_transaction.d.ts +2 -2
- package/rest/admin/2022-10/payment_transaction.d.ts.map +1 -1
- package/rest/admin/2022-10/payout.d.ts +3 -3
- package/rest/admin/2022-10/payout.d.ts.map +1 -1
- package/rest/admin/2022-10/policy.d.ts +2 -2
- package/rest/admin/2022-10/policy.d.ts.map +1 -1
- package/rest/admin/2022-10/price_rule.d.ts +5 -5
- package/rest/admin/2022-10/price_rule.d.ts.map +1 -1
- package/rest/admin/2022-10/product.d.ts +5 -5
- package/rest/admin/2022-10/product.d.ts.map +1 -1
- package/rest/admin/2022-10/product_listing.d.ts +6 -6
- package/rest/admin/2022-10/product_listing.d.ts.map +1 -1
- package/rest/admin/2022-10/product_resource_feedback.d.ts +2 -2
- package/rest/admin/2022-10/product_resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-10/province.d.ts +4 -4
- package/rest/admin/2022-10/province.d.ts.map +1 -1
- package/rest/admin/2022-10/recurring_application_charge.d.ts +4 -4
- package/rest/admin/2022-10/recurring_application_charge.d.ts.map +1 -1
- package/rest/admin/2022-10/redirect.d.ts +5 -5
- package/rest/admin/2022-10/redirect.d.ts.map +1 -1
- package/rest/admin/2022-10/refund.d.ts +3 -3
- package/rest/admin/2022-10/refund.d.ts.map +1 -1
- package/rest/admin/2022-10/report.d.ts +4 -4
- package/rest/admin/2022-10/report.d.ts.map +1 -1
- package/rest/admin/2022-10/resource_feedback.d.ts +2 -2
- package/rest/admin/2022-10/resource_feedback.d.ts.map +1 -1
- package/rest/admin/2022-10/script_tag.d.ts +5 -5
- package/rest/admin/2022-10/script_tag.d.ts.map +1 -1
- package/rest/admin/2022-10/shipping_zone.d.ts +2 -2
- package/rest/admin/2022-10/shipping_zone.d.ts.map +1 -1
- package/rest/admin/2022-10/shop.d.ts +2 -2
- package/rest/admin/2022-10/shop.d.ts.map +1 -1
- package/rest/admin/2022-10/smart_collection.d.ts +5 -5
- package/rest/admin/2022-10/smart_collection.d.ts.map +1 -1
- package/rest/admin/2022-10/storefront_access_token.d.ts +3 -3
- package/rest/admin/2022-10/storefront_access_token.d.ts.map +1 -1
- package/rest/admin/2022-10/tender_transaction.d.ts +2 -2
- package/rest/admin/2022-10/tender_transaction.d.ts.map +1 -1
- package/rest/admin/2022-10/theme.d.ts +4 -4
- package/rest/admin/2022-10/theme.d.ts.map +1 -1
- package/rest/admin/2022-10/transaction.d.ts +4 -4
- package/rest/admin/2022-10/transaction.d.ts.map +1 -1
- package/rest/admin/2022-10/usage_charge.d.ts +3 -3
- package/rest/admin/2022-10/usage_charge.d.ts.map +1 -1
- package/rest/admin/2022-10/user.d.ts +4 -4
- package/rest/admin/2022-10/user.d.ts.map +1 -1
- package/rest/admin/2022-10/variant.d.ts +5 -5
- package/rest/admin/2022-10/variant.d.ts.map +1 -1
- package/rest/admin/2022-10/webhook.d.ts +5 -5
- package/rest/admin/2022-10/webhook.d.ts.map +1 -1
- package/rest/base.d.ts +8 -8
- package/rest/base.d.ts.map +1 -1
- package/rest/base.js +1 -4
- package/rest/base.js.map +1 -1
- package/rest/types.d.ts +2 -2
- package/rest/types.d.ts.map +1 -1
- package/runtime/index.d.ts +0 -1
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +0 -1
- package/runtime/index.js.map +1 -1
- package/runtime/types.d.ts +0 -1
- package/runtime/types.d.ts.map +1 -1
- package/runtime/types.js +0 -1
- package/runtime/types.js.map +1 -1
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -35
- package/.github/ISSUE_TEMPLATE/ENHANCEMENT.md +0 -25
- package/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -30
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -34
- package/.github/stale.yml +0 -42
- package/.github/workflows/ci.yml +0 -27
- package/.github/workflows/cla.yml +0 -22
- package/.github/workflows/markdown_link_check.yml +0 -12
- package/.github/workflows/markdown_link_checker_config.json +0 -4
- package/CODE_OF_CONDUCT.md +0 -46
- package/CONTRIBUTING.md +0 -39
- package/RELEASING.md +0 -77
- package/adapters/__e2etests__/.env.test +0 -1
- package/docs/issues.md +0 -25
- package/docs/migrating-to-v6.md +0 -957
- package/docs/usage/billing.md +0 -169
- package/docs/usage/customsessions.md +0 -154
- package/docs/usage/graphql.md +0 -132
- package/docs/usage/oauth.md +0 -171
- package/docs/usage/rest.md +0 -179
- package/docs/usage/runtimes.md +0 -54
- package/docs/usage/storefront.md +0 -72
- package/docs/usage/utils.md +0 -30
- package/docs/usage/webhooks.md +0 -215
- package/docs/usage/withsession.md +0 -74
- package/lib/clients/http_client/__tests__/test_logs.txt +0 -0
- package/lib/session/delete-current.d.ts +0 -4
- package/lib/session/delete-current.d.ts.map +0 -1
- package/lib/session/delete-current.js +0 -33
- package/lib/session/delete-current.js.map +0 -1
- package/lib/session/delete-offline.d.ts +0 -4
- package/lib/session/delete-offline.d.ts.map +0 -1
- package/lib/session/delete-offline.js +0 -22
- package/lib/session/delete-offline.js.map +0 -1
- package/lib/session/get-current.d.ts +0 -5
- package/lib/session/get-current.d.ts.map +0 -1
- package/lib/session/get-current.js +0 -32
- package/lib/session/get-current.js.map +0 -1
- package/lib/session/get-offline.d.ts +0 -4
- package/lib/session/get-offline.d.ts.map +0 -1
- package/lib/session/get-offline.js +0 -33
- package/lib/session/get-offline.js.map +0 -1
- package/lib/session/session_storage.d.ts +0 -41
- package/lib/session/session_storage.d.ts.map +0 -1
- package/lib/session/session_storage.js +0 -16
- package/lib/session/session_storage.js.map +0 -1
- package/lib/session/with-session.d.ts +0 -4
- package/lib/session/with-session.d.ts.map +0 -1
- package/lib/session/with-session.js +0 -54
- package/lib/session/with-session.js.map +0 -1
- package/runtime/crypto/__tests__/produce-node-base64.mjs +0 -18
- package/runtime/crypto/__tests__/produce-node-hmac.mjs +0 -27
- package/runtime/crypto/__tests__/random.mjs +0 -7
- package/runtime/session/index.d.ts +0 -5
- package/runtime/session/index.d.ts.map +0 -1
- package/runtime/session/index.js +0 -15
- package/runtime/session/index.js.map +0 -1
- package/runtime/session/types.d.ts +0 -3
- package/runtime/session/types.d.ts.map +0 -1
- package/session-storage/README.md +0 -211
- package/session-storage/__tests__/redis.conf +0 -1
- package/session-storage/custom.d.ts +0 -20
- package/session-storage/custom.d.ts.map +0 -1
- package/session-storage/custom.js +0 -156
- package/session-storage/custom.js.map +0 -1
- package/session-storage/kv.d.ts +0 -17
- package/session-storage/kv.d.ts.map +0 -1
- package/session-storage/kv.js +0 -184
- package/session-storage/kv.js.map +0 -1
- package/session-storage/memory.d.ts +0 -11
- package/session-storage/memory.d.ts.map +0 -1
- package/session-storage/memory.js +0 -61
- package/session-storage/memory.js.map +0 -1
- package/session-storage/mongodb.d.ts +0 -25
- package/session-storage/mongodb.d.ts.map +0 -1
- package/session-storage/mongodb.js +0 -190
- package/session-storage/mongodb.js.map +0 -1
- package/session-storage/mysql.d.ts +0 -24
- package/session-storage/mysql.d.ts.map +0 -1
- package/session-storage/mysql.js +0 -200
- package/session-storage/mysql.js.map +0 -1
- package/session-storage/postgresql.d.ts +0 -26
- package/session-storage/postgresql.d.ts.map +0 -1
- package/session-storage/postgresql.js +0 -218
- package/session-storage/postgresql.js.map +0 -1
- package/session-storage/redis.d.ts +0 -24
- package/session-storage/redis.d.ts.map +0 -1
- package/session-storage/redis.js +0 -178
- package/session-storage/redis.js.map +0 -1
- package/session-storage/sqlite.d.ts +0 -21
- package/session-storage/sqlite.d.ts.map +0 -1
- package/session-storage/sqlite.js +0 -175
- package/session-storage/sqlite.js.map +0 -1
package/docs/usage/rest.md
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# REST Admin API client
|
|
2
|
-
|
|
3
|
-
Once OAuth is complete, we can use this library to interact with the Admin REST API.
|
|
4
|
-
It can do that in two different ways:
|
|
5
|
-
|
|
6
|
-
1. [Using the client class](#using-the-client-class)
|
|
7
|
-
1. [Using REST resources](#using-rest-resources)
|
|
8
|
-
|
|
9
|
-
For detailed information on individual endpoints, please visit our [REST API reference](https://shopify.dev/api/admin-rest).
|
|
10
|
-
|
|
11
|
-
## Using the client class
|
|
12
|
-
|
|
13
|
-
The simplest way to interact with the API is using an instance of `shopify.clients.Rest`. To create a client, you'll need a session, for example:
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
// Requests to /my-endpoint must be made with authenticatedFetch for embedded apps
|
|
17
|
-
app.get('/my-endpoint', async (req, res) => {
|
|
18
|
-
const session = await shopify.session.getCurrent({
|
|
19
|
-
isOnline: true,
|
|
20
|
-
rawRequest: req,
|
|
21
|
-
rawResponse: res,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const client = new shopify.clients.Rest({
|
|
25
|
-
domain: session.shop,
|
|
26
|
-
accessToken: session.accessToken,
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Once you've constructed a client, you can use it to call API endpoints by their methods:
|
|
32
|
-
|
|
33
|
-
- `client.get`
|
|
34
|
-
- `client.post`
|
|
35
|
-
- `client.put`
|
|
36
|
-
- `client.delete`
|
|
37
|
-
|
|
38
|
-
For example, this is how you can make `GET` and `POST` requests to the `/products.json` endpoint using the client created above:
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
const response = await client.get({
|
|
42
|
-
path: 'products',
|
|
43
|
-
});
|
|
44
|
-
console.log(response.headers, response.body);
|
|
45
|
-
|
|
46
|
-
const response = await client.post({
|
|
47
|
-
path: 'products',
|
|
48
|
-
data: {
|
|
49
|
-
title: 'My product title',
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
console.log(response.headers, response.body);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Note that if you're using TypeScript, you can also pass in a type argument to cast the response body:
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
interface MyResponseBodyType {
|
|
59
|
-
products: {
|
|
60
|
-
/* ... */
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const response = await client.get<MyResponseBodyType>({
|
|
65
|
-
path: 'products',
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// response.body will be of type MyResponseBodyType
|
|
69
|
-
console.log(response.body.products);
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
The `get`, `post`, `put`, and `delete` methods accept the following arguments:
|
|
73
|
-
|
|
74
|
-
| Parameter | Type | Required? | Default Value | Notes |
|
|
75
|
-
| -------------- | ----------------------------------- | :-----------: | :-------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
76
|
-
| `path` | `string` | Yes | - | The requested API endpoint path. This can be one of two formats:<ul><li>The path starting after the `/admin/api/{version}/` prefix, such as `'products'`, which executes `/admin/api/{version}/products.json`</li><li>The full path, such as `/admin/oauth/access_scopes.json`</li></ul> |
|
|
77
|
-
| `data` | `Record<string, unknown> \| string` | `post`, `put` | - | The request payload |
|
|
78
|
-
| `query` | `Record<string, string \| number>` | No | - | An optional query argument object to append to the request URL |
|
|
79
|
-
| `extraHeaders` | `Record<string, string \| number>` | No | - | Add custom headers to the request |
|
|
80
|
-
| `type` | `DataType` | No | `DataType.JSON` | The `Content-Type` for the request (`JSON`, `GraphQL`, `URLEncoded`) |
|
|
81
|
-
| `tries` | `number` | No | `1` | The maximum number of times to retry the request _(must be >= 0)_ |
|
|
82
|
-
|
|
83
|
-
They will return an object containing the response `headers` and `body` from Shopify.
|
|
84
|
-
|
|
85
|
-
## Using REST resources
|
|
86
|
-
|
|
87
|
-
The Admin API has a lot of endpoints, and the differences between them can be subtle.
|
|
88
|
-
To make it easier to interact with the API, this library provides resource classes, which map these endpoints to OO code and can make API queries feel more natural.
|
|
89
|
-
|
|
90
|
-
**Note**: we provide auto-generated resources for all **_stable_** API versions, so your app must include the appropriate set (see [mounting REST resources](#mounting-rest-resources) below), matching your `apiVersion` configuration. The library will throw an error if the versions don't match.
|
|
91
|
-
|
|
92
|
-
Below is an example of how REST resources can make it easier to fetch the first product and update it:
|
|
93
|
-
|
|
94
|
-
<div>With a plain REST client:
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
// App must provide response types
|
|
98
|
-
interface ProductResponse {
|
|
99
|
-
product: {
|
|
100
|
-
id: number;
|
|
101
|
-
title: string;
|
|
102
|
-
// ...
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const session = await shopify.session.getCurrent({
|
|
107
|
-
rawRequest: req,
|
|
108
|
-
rawResponse: res,
|
|
109
|
-
});
|
|
110
|
-
const client = new shopify.clients.Rest({
|
|
111
|
-
domain: session.shop,
|
|
112
|
-
accessToken: session.accessToken,
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// The following line sends a HTTP GET request to this constructed URL:
|
|
116
|
-
// https://${session.shop}/admin/api/${shopify.config.api_version}/products.json?limit=1
|
|
117
|
-
const response = await client.get<ProductResponse>({
|
|
118
|
-
path: 'products',
|
|
119
|
-
query: {limit: 1},
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
// Apps needs to dig into the response body to find the object
|
|
123
|
-
response.body.product.title = 'A new title';
|
|
124
|
-
|
|
125
|
-
// The following sends a HTTP PUT request to this constructed URL...
|
|
126
|
-
// https://${session.shop}/admin/api/${shopify.config.api_version}/products/${response.body.product.id}.json
|
|
127
|
-
// ... with this body
|
|
128
|
-
// {"product":{"id":response.body.product.id,"title":"A new title"}}
|
|
129
|
-
await client.put({
|
|
130
|
-
path: `products/${response.body.product.id}`,
|
|
131
|
-
data: response.body.product,
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
</div><div>With REST resources:
|
|
136
|
-
|
|
137
|
-
```ts
|
|
138
|
-
const session = await shopify.session.getCurrent({
|
|
139
|
-
rawRequest: req,
|
|
140
|
-
rawResponse: res,
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// Has type Product[], an OO representation of API products
|
|
144
|
-
const products = await shopify.rest.Product.all({session, limit: 1});
|
|
145
|
-
|
|
146
|
-
products[0].title = 'A new title';
|
|
147
|
-
await products[0].save();
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
The resource classes provide representations of all endpoints for the API resource they cover. A few examples:
|
|
153
|
-
|
|
154
|
-
1. `GET /products.json` maps to `Product.all()`
|
|
155
|
-
1. `POST /products.json` maps to `product.save()` (as an instance method)
|
|
156
|
-
1. `GET /products/count.json` maps to `Product.count()`
|
|
157
|
-
|
|
158
|
-
Please visit our [REST API reference documentation](https://shopify.dev/api/admin-rest) for detailed instructions on how to call each of the endpoints.
|
|
159
|
-
|
|
160
|
-
### Mounting REST resources
|
|
161
|
-
|
|
162
|
-
The library doesn't include all available resources automatically to make loading it more efficient, since there are hundreds of resource classes.
|
|
163
|
-
To use REST resources, you can import the desired version and mount it onto your `shopify` object when creating it:
|
|
164
|
-
|
|
165
|
-
```ts
|
|
166
|
-
import {shopifyApi} from '@shopify/shopify-api';
|
|
167
|
-
import {restResources} from '@shopify/shopify-api/rest/admin/2022-07';
|
|
168
|
-
|
|
169
|
-
const shopify = shopifyApi({
|
|
170
|
-
...,
|
|
171
|
-
apiVersion: ApiVersion.July22,
|
|
172
|
-
restResources,
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
This will automatically load all REST resources onto `shopify.rest`, as per the example above.
|
|
177
|
-
From this point, you can start using the resources to interact with the API.
|
|
178
|
-
|
|
179
|
-
[Back to guide index](../../README.md#features)
|
package/docs/usage/runtimes.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Adding custom runtimes
|
|
2
|
-
|
|
3
|
-
This package provides support for a set of JavaScript runtimes, but it won't cover all possible use cases.
|
|
4
|
-
It's designed in a way that can support any runtime, as long as an adapter provides the implementations for runtime-specific functionality.
|
|
5
|
-
|
|
6
|
-
**Note**: this is an advanced feature, so using TypeScript and an IDE with intellisense is strongly recommended to help guide you through the implementation.
|
|
7
|
-
|
|
8
|
-
See the [available adapters](../../adapters/) for some implementation examples.
|
|
9
|
-
In general, an adapter needs to teach the library to convert the runtime's own request / response objects into the `NormalizedRequest` and `NormalizedResponse` objects used by the library, and to define some reasonable defaults for the runtime, like a session storage strategy.
|
|
10
|
-
|
|
11
|
-
To create an adapter, you'll need to import the runtime functions to provide implementations.
|
|
12
|
-
These are the functions you'll need to create:
|
|
13
|
-
|
|
14
|
-
- `setAbstractFetchFunc`
|
|
15
|
-
- `setAbstractConvertRequestFunc`
|
|
16
|
-
- `setAbstractConvertResponseFunc`
|
|
17
|
-
- `setAbstractConvertHeadersFunc`
|
|
18
|
-
- `setAbstractCreateDefaultStorage`
|
|
19
|
-
- `setAbstractRuntimeString`
|
|
20
|
-
- `setCrypto`
|
|
21
|
-
|
|
22
|
-
Below is a _very_ simplified example with some functions:
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import {
|
|
26
|
-
setAbstractConvertHeadersFunc,
|
|
27
|
-
setAbstractRuntimeString,
|
|
28
|
-
AbstractRuntimeStringFunc,
|
|
29
|
-
AbstractConvertHeadersFunc,
|
|
30
|
-
Headers,
|
|
31
|
-
AdapterArgs,
|
|
32
|
-
} from '@shopify/shopify-api/runtime';
|
|
33
|
-
|
|
34
|
-
type MyRequestType = any;
|
|
35
|
-
type MyResponseType = any;
|
|
36
|
-
|
|
37
|
-
interface MyRuntimeAdapterArgs extends AdapterArgs {
|
|
38
|
-
rawRequest: MyRequestType;
|
|
39
|
-
rawResponse?: MyResponseType;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const myRuntimeStringFunc: AbstractRuntimeStringFunc = () => {
|
|
43
|
-
return `My runtime adapter ${myAdapterVersion}`;
|
|
44
|
-
};
|
|
45
|
-
setAbstractRuntimeString(myRuntimeStringFunc);
|
|
46
|
-
|
|
47
|
-
const myRuntimeHeaderFunc: AbstractConvertHeadersFunc = async (
|
|
48
|
-
headers: Headers,
|
|
49
|
-
adapterArgs: MyRuntimeAdapterArgs,
|
|
50
|
-
) => {
|
|
51
|
-
return magicHeaderConversion(headers);
|
|
52
|
-
};
|
|
53
|
-
setAbstractConvertHeadersFunc(myRuntimeHeaderFunc);
|
|
54
|
-
```
|
package/docs/usage/storefront.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# GraphQL Storefront API client
|
|
2
|
-
|
|
3
|
-
The library also allows you to send GraphQL requests to the [Shopify Storefront API](https://shopify.dev/docs/storefront-api). To do that, you can use `shopify.clients.Storefront` with the current shop URL and a storefront-specific `accessToken`.
|
|
4
|
-
|
|
5
|
-
⚠️ This API limits request rates based on the IP address that calls it, which will be your server's address for all requests made by the library. The API uses a leaky bucket algorithm, with a default bucket size of 60 seconds of request processing time (minimum 0.5s per request), with a leak rate of 1/s. Learn more about [rate limits](https://shopify.dev/api/usage/rate-limits).
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
You can create Storefront API access tokens for both **private apps** and **sales channels**, but you **must use offline access tokens** for sales channels. Please read [our documentation](https://shopify.dev/docs/storefront-api/getting-started) to learn more about Storefront Access Tokens.
|
|
10
|
-
|
|
11
|
-
If you are building a private app, you can set a default Storefront Access Token for all `Storefront` client instances by setting the `config.privateAppStorefrontAccessToken` property.
|
|
12
|
-
|
|
13
|
-
## Creating and using tokens
|
|
14
|
-
|
|
15
|
-
The `Storefront` client extends the `Graphql` client, so it supports the same parameters. Please refer to the [Graphql client documentation](graphql.md) for details.
|
|
16
|
-
|
|
17
|
-
Below is a (simplified) example of how you may create a token (see [REST](https://shopify.dev/api/admin-rest/2022-07/resources/storefrontaccesstoken) or [GraphQL](https://shopify.dev/api/admin-graphql/2022-07/mutations/storefrontAccessTokenCreate) Admin API reference) and make a request:
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
app.get('/my-endpoint', async (req, res) => {
|
|
21
|
-
const session = await shopify.session.getCurrent({
|
|
22
|
-
isOnline: true,
|
|
23
|
-
rawRequest: req,
|
|
24
|
-
rawResponse: res,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// Create a new storefront access token using the REST Admin API (you can also use the GraphQL API)
|
|
28
|
-
const adminApiClient = new shopify.clients.Rest({
|
|
29
|
-
domain: session.shop,
|
|
30
|
-
accessToken: session.accessToken,
|
|
31
|
-
});
|
|
32
|
-
const storefrontTokenResponse = await adminApiClient.post({
|
|
33
|
-
path: 'storefront_access_tokens',
|
|
34
|
-
data: {
|
|
35
|
-
storefront_access_token: {
|
|
36
|
-
title: 'This is my test access token',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const storefrontAccessToken =
|
|
42
|
-
storefrontTokenResponse.body.storefront_access_token.access_token;
|
|
43
|
-
|
|
44
|
-
// For simplicity, this example creates a token every time it's called, but that is not ideal.
|
|
45
|
-
// You can fetch existing Storefront access tokens using the Admin API clients.
|
|
46
|
-
const storefrontClient = new shopify.clients.Storefront({
|
|
47
|
-
domain: session.shop,
|
|
48
|
-
accessToken: storefrontAccessToken,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const products = await client.query({
|
|
52
|
-
data: `{
|
|
53
|
-
products (first: 10) {
|
|
54
|
-
edges {
|
|
55
|
-
node {
|
|
56
|
-
id
|
|
57
|
-
title
|
|
58
|
-
descriptionHtml
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}`,
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// do something with the returned data
|
|
66
|
-
});
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Once you've created your access token, you can query the Storefront API based on the `unauthenticated_*` scopes your app requests.
|
|
70
|
-
See the [API reference documentation](https://shopify.dev/api/storefront) for detailed instructions on each component.
|
|
71
|
-
|
|
72
|
-
[Back to guide index](../../README.md#features)
|
package/docs/usage/utils.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# utils
|
|
2
|
-
|
|
3
|
-
## Get the application URL for embedded apps using `getEmbeddedAppUrl`
|
|
4
|
-
|
|
5
|
-
If you need to redirect a request to your embedded app URL you can use `getEmbeddedAppUrl`
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
const redirectURL = Shopify.Utils.getEmbeddedAppUrl(request);
|
|
9
|
-
res.redirect(redirectURL);
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Using this utility ensures that embedded app URL is properly constructed and brings the merchant to the right place. It is more reliable than using the shop param.
|
|
13
|
-
|
|
14
|
-
This utility relies on the host query param being a Base 64 encoded string. All requests from Shopify should include this param in the correct format.
|
|
15
|
-
|
|
16
|
-
## Sanitize a Shopify shop domain and host address
|
|
17
|
-
|
|
18
|
-
When receiving input from users, like in URL query arguments, you should always make sure to sanitize that data.
|
|
19
|
-
To make it easier to do that, this library provides the following methods:
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
const shop = Shopify.Utils.sanitizeShop(req.query.shop, true);
|
|
23
|
-
const host = Shopify.Utils.sanitizeHost(req.query.host, true);
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Both of these return the string itself if it's valid, or `null` otherwise.
|
|
27
|
-
You can also optionally set the method to throw an exception if the validation fails.
|
|
28
|
-
If you're using custom shop domains for testing, you can add them to the `config.customShopDomains` setting.
|
|
29
|
-
|
|
30
|
-
[Back to guide index](../../README.md#features)
|
package/docs/usage/webhooks.md
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
# Webhooks
|
|
2
|
-
|
|
3
|
-
If your application's functionality depends on knowing when events occur on a given shop, you need to register a webhook. You need an access token to register webhooks, so you must complete the OAuth process beforehand.
|
|
4
|
-
|
|
5
|
-
The Shopify library enables you to handle all webhooks in a single endpoint (see [Webhook processing](#webhook-processing)
|
|
6
|
-
) below), but you are not restricted to a single endpoint. You can only register each topic once per shop, but the library will ensure your handler is up to date if you call `register` more than once.
|
|
7
|
-
|
|
8
|
-
To subscribe to webhooks using this library, there are 3 main steps to take:
|
|
9
|
-
|
|
10
|
-
1. [Load your handlers](#load-your-handlers)
|
|
11
|
-
1. [Register webhooks with Shopify](#webhook-registration)
|
|
12
|
-
1. [Process incoming webhooks](#webhook-processing)
|
|
13
|
-
|
|
14
|
-
## Load your handlers
|
|
15
|
-
|
|
16
|
-
The first step to process webhooks in your app is telling the library how you expect to handle them. To do that, you can call the `shopify.webhooks.addHttpHandler` method to set the callback you want the library to trigger when a certain topic is received.
|
|
17
|
-
|
|
18
|
-
For example, you can load one or more handlers when setting up your app's `config` (or any other location, as long as it happens before the call to `shopify.webhooks.process`) by running:
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import {shopifyApi} from '@shopify/shopify-api';
|
|
22
|
-
const shopify = shopifyApi({ apiKey: '...', ... });
|
|
23
|
-
|
|
24
|
-
const handleWebhookRequest = async (topic: string, shop: string, webhookRequestBody: string) => {
|
|
25
|
-
// handler triggered when a webhook is sent by the Shopify platform to your application
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
shopify.webhooks.addHttpHandler({
|
|
29
|
-
topic: "PRODUCTS_CREATE",
|
|
30
|
-
handler: handleWebhookRequest,
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The parameters this method accepts are:
|
|
35
|
-
|
|
36
|
-
| Parameter | Type | Required? | Default Value | Notes |
|
|
37
|
-
| ----------| ------------------------ | :-------: | :-----------: | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
-
| `topic` | `string` | Yes | - | The topic to subscribe to, [see the full list](https://shopify.dev/api/admin-graphql/latest/enums/WebhookSubscriptionTopic). |
|
|
39
|
-
| `handler` | `WebhookHandlerFunction` | Yes | - | The `async` callback to call when a shop triggers a `topic` event. |
|
|
40
|
-
|
|
41
|
-
When a shop triggers an event you subscribed to, the `process` method [below](#webhook-processing) will call your handler with the following arguments:
|
|
42
|
-
|
|
43
|
-
| Parameter | Type | Notes |
|
|
44
|
-
| -------------------- | -------- | ------------------------------------------------ |
|
|
45
|
-
| `topic` | `string` | The webhook topic. |
|
|
46
|
-
| `shop` | `string` | The shop for which the webhook was triggered. |
|
|
47
|
-
| `webhookRequestBody` | `string` | The payload of the POST request made by Shopify. |
|
|
48
|
-
|
|
49
|
-
**Note**: You only need to add handlers for webhooks delivered to your app via HTTPS. For webhooks delivered to Amazon EventBridge or Google Cloud Pub/Sub, you don't add any handlers - you just call `register` (see [webhook registration](#webhook-registration) and [EventBridge and Pub/Sub webhooks](#eventbridge-and-pubsub-webhooks) for more details).
|
|
50
|
-
|
|
51
|
-
A similar `addHttpHandlers` method is also provided for convenience, which takes in an array of objects with `topic` and `handler` properties, e.g.,
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
shopify.webhooks.addHttpHandlers([
|
|
55
|
-
{topic: 'PRODUCTS_CREATE', handler: productCreateWebhookHandler},
|
|
56
|
-
{topic: 'PRODUCTS_DELETE', handler: productDeleteWebhookHandler},
|
|
57
|
-
]);
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Get HTTP webhook registry information
|
|
61
|
-
|
|
62
|
-
To see topics loaded in the HTTP registry, `shopify.webhooks.getTopicsAdded` returns an array of topics names, as strings, or an empty array if there are no topics and handlers loaded.
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
shopify.webhooks.addHttpHandlers([
|
|
66
|
-
{topic: 'PRODUCTS_CREATE', handler: productCreateWebhookHandler},
|
|
67
|
-
{topic: 'PRODUCTS_DELETE', handler: productDeleteWebhookHandler},
|
|
68
|
-
]);
|
|
69
|
-
const topics = shopify.webhooks.getTopicsAdded();
|
|
70
|
-
// topics = ['PRODUCTS_CREATE', 'PRODUCTS_DELETE']
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
To retrieve the handler information for a given topic, `shopify.webhooks.getHttpHandler()` takes a topic string as an argument and returns the handler or `null` if not found.
|
|
74
|
-
|
|
75
|
-
```typescript
|
|
76
|
-
shopify.webhooks.addHttpHandler({
|
|
77
|
-
topic: 'PRODUCTS',
|
|
78
|
-
handler: productsWebhookHandler,
|
|
79
|
-
});
|
|
80
|
-
const productsHandler = shopify.webhooks.getHttpHandler('PRODUCTS');
|
|
81
|
-
// productsHandler = productsWebhookHandler
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Webhook Registration
|
|
85
|
-
|
|
86
|
-
After loading your handlers, you need to register which topics you want your app to listen to with Shopify. This can only happen after the merchant has installed your app, so the best place to register webhooks is after OAuth completes.
|
|
87
|
-
|
|
88
|
-
In your OAuth callback action, you can use the `shopify.webhooks.register` method to subscribe to any topic allowed by your app's scopes. You can safely call this method multiple times for a shop, as it will add or update subscriptions as necessary.
|
|
89
|
-
|
|
90
|
-
The parameters this method accepts are:
|
|
91
|
-
|
|
92
|
-
| Parameter | Type | Required? | Default Value | Notes |
|
|
93
|
-
| :--------------- | :------- | :-------: | :-------------------: | :---------------------------------------------------------------------------- |
|
|
94
|
-
| `path` | `string` | Yes | - | The URL path for the callback for HTTPS delivery, EventBridge or Pub/Sub URLs |
|
|
95
|
-
| `topic` | `string` | Yes | - | The topic to subscribe to. |
|
|
96
|
-
| `shop` | `string` | Yes | - | The shop to use for requests. |
|
|
97
|
-
| `accessToken` | `string` | Yes | - | The access token to use for requests. |
|
|
98
|
-
| `deliveryMethod` | `string` | No | `DeliveryMethod.Http` | The delivery method for this webhook. |
|
|
99
|
-
|
|
100
|
-
This method will return a `RegisterReturn` object, which holds the following data:
|
|
101
|
-
|
|
102
|
-
| Method | Return type | Notes |
|
|
103
|
-
| --------- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
104
|
-
| `success` | `bool` | Whether the registration was successful. |
|
|
105
|
-
| `result` | `array` | The body from the Shopify request to register the webhook. May be null even when successful if no request was needed. |
|
|
106
|
-
|
|
107
|
-
> **Note**: If you want to register all your webhook topics, you can call the `shopify.webhooks.registerAllHttp({path, accessToken, shop})` method, which will iterate over your handlers and set them all up.
|
|
108
|
-
>
|
|
109
|
-
> `registerAllHttp()` accepts the following parameters:
|
|
110
|
-
>
|
|
111
|
-
> | Parameter | Type | Required? | Default Value | Notes |
|
|
112
|
-
> | :--------------- | :------- | :-------: | :-------------------: | :----------------------------------------------- |
|
|
113
|
-
> | `path` | `string` | Yes | - | The URL path for the callback for HTTPS delivery |
|
|
114
|
-
> | `shop` | `string` | Yes | - | The shop to use for requests. |
|
|
115
|
-
> | `accessToken` | `string` | Yes | - | The access token to use for requests. |
|
|
116
|
-
>
|
|
117
|
-
|
|
118
|
-
For example, to subscribe to the `PRODUCTS_CREATE` event, you can run this code in your OAuth callback action:
|
|
119
|
-
|
|
120
|
-
```ts
|
|
121
|
-
// Register webhooks after OAuth completes
|
|
122
|
-
app.get('/auth/callback', async (req, res) => {
|
|
123
|
-
try {
|
|
124
|
-
const callbackResponse = await shopify.auth.callback({
|
|
125
|
-
isOnline: true,
|
|
126
|
-
rawRequest: req,
|
|
127
|
-
rawResponse: res,
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
const response = await shopify.webhooks.register({
|
|
131
|
-
path: '/webhooks',
|
|
132
|
-
topic: 'PRODUCTS_CREATE',
|
|
133
|
-
accessToken: callbackResponse.session.accessToken,
|
|
134
|
-
shop: callbackResponse.session.shop,
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
if (!response['PRODUCTS_CREATE'].success) {
|
|
138
|
-
console.log(
|
|
139
|
-
`Failed to register PRODUCTS_CREATE webhook: ${response['PRODUCTS_CREATE'].result}`
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
} catch (error) {
|
|
143
|
-
console.error(error); // in practice these should be handled more gracefully
|
|
144
|
-
}
|
|
145
|
-
return res.redirect('/'); // or wherever you want your user to end up after OAuth completes
|
|
146
|
-
});
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### EventBridge and PubSub Webhooks
|
|
150
|
-
|
|
151
|
-
You can also register webhooks for delivery to Amazon EventBridge or Google Cloud Pub/Sub. In this case the `path` argument to `register` needs to be of a specific form.
|
|
152
|
-
|
|
153
|
-
For EventBridge, the `path` must be the [ARN of the partner event source](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_EventSource.html).
|
|
154
|
-
|
|
155
|
-
For Pub/Sub, the `path` must be of the form `pubsub://[PROJECT-ID]:[PUB-SUB-TOPIC-ID]`. For example, if you created a topic with id `red` in the project `blue`, then the value of `path` would be `pubsub://blue:red`.
|
|
156
|
-
|
|
157
|
-
## Webhook Processing
|
|
158
|
-
|
|
159
|
-
To process an HTTPS webhook, you need to listen on the route(s) you provided during the webhook registration process, then call the appropriate handler. The library provides a convenient method that acts as a middleware to handle webhooks. It takes care of validating the request, and calling the correct handler for registered webhook topics.
|
|
160
|
-
|
|
161
|
-
The `process` method will handle extracting the necessary information from your request and response objects, and triggering the appropriate handler with the parameters detailed above. If it can't find a handler for a topic, it will raise an error.
|
|
162
|
-
|
|
163
|
-
**Note**: In Node, the `process` method will always respond to Shopify, even if your call throws an error. You can catch and log errors, but you can't change the response.
|
|
164
|
-
|
|
165
|
-
```typescript
|
|
166
|
-
app.post('/webhooks', express.text({type: '*/*'}), async (req, res) => {
|
|
167
|
-
try {
|
|
168
|
-
// Note: the express.text() given above is an Express middleware that will read
|
|
169
|
-
// in the body as a string, and make it available at req.body, for this path only.
|
|
170
|
-
await shopify.webhooks.process({
|
|
171
|
-
rawBody: req.body, // is a string
|
|
172
|
-
rawRequest: req,
|
|
173
|
-
rawResponse: res,
|
|
174
|
-
});
|
|
175
|
-
} catch (error) {
|
|
176
|
-
console.log(error.message);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
**Note**: In a worker environment, e.g., CloudFlare Workers, the return value of the `process` method can be used to reply to Shopify. If the `process` call throws an error, the response will be contained in the thrown error, in `error.response`. This will enable the calling method in a worker environment to return a suitable response to Shopify.
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
let response;
|
|
185
|
-
|
|
186
|
-
try {
|
|
187
|
-
response = await shopify.webhooks.process({
|
|
188
|
-
rawBody: req.body,
|
|
189
|
-
rawRequest: req,
|
|
190
|
-
rawResponse: res,
|
|
191
|
-
});
|
|
192
|
-
} catch (error) {
|
|
193
|
-
console.log(error.message);
|
|
194
|
-
response = error.response;
|
|
195
|
-
}
|
|
196
|
-
return response;
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Note regarding use of body parsers
|
|
200
|
-
|
|
201
|
-
Unlike `v5` and earlier versions of this library, `shopify.webhooks.process()` now expects to receive the body content (in string format) as a parameter and no longer reads in the request body directly.
|
|
202
|
-
|
|
203
|
-
This allows for the use of body-parsers in your code.
|
|
204
|
-
|
|
205
|
-
To use Express as an example, if you wish to use the `express.json()` middleware in your app, the webhook processing can now occur after calling `app.use(express.json())`. For any path that's a webhooks path, `express.text({type: '*/*'})` should be used so that `req.body` is a string that `shopify.webhooks.process()` expects:
|
|
206
|
-
|
|
207
|
-
```typescript
|
|
208
|
-
await shopify.webhooks.process({
|
|
209
|
-
rawBody: req.body,
|
|
210
|
-
rawRequest: req,
|
|
211
|
-
rawResponse: res,
|
|
212
|
-
});
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
[Back to guide index](../../README.md#features)
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Create a Client using `withSession`
|
|
2
|
-
|
|
3
|
-
This library provides a utility method `withSession` that you can use to create either a REST or GraphQL client, with
|
|
4
|
-
either the current active online session, or a specific offline session. The method will return both the requested
|
|
5
|
-
client, and the session with which that client will be authenticated.
|
|
6
|
-
|
|
7
|
-
This method accepts a `withSessionParams` object as its argument, which accepts options for the fields: `clientType`,
|
|
8
|
-
`isOnline`, `req`, `res`, and `shop`.
|
|
9
|
-
|
|
10
|
-
| Parameter | Type | Notes |
|
|
11
|
-
| ------------ | ---------------------- | -------------------------------------------------------------------- |
|
|
12
|
-
| `clientType` | string | must be either `graphql` or `rest` |
|
|
13
|
-
| `isOnline` | boolean | optional parameters needed are based on the value of `isOnline` |
|
|
14
|
-
| `req` | `http.IncomingMessage` | required if `isOnline` |
|
|
15
|
-
| `res` | `http.ServerResponse` | required if `isOnline` |
|
|
16
|
-
| `shop` | string | required if `!isOnline` and should be passed without protocol prefix |
|
|
17
|
-
|
|
18
|
-
## Code Usage Examples
|
|
19
|
-
|
|
20
|
-
The following are specific examples of GraphQL/online session, and REST/offline session, but any combination of `clientType` and `isOnline` is valid.
|
|
21
|
-
|
|
22
|
-
<details>
|
|
23
|
-
<summary>Example: GraphQL Client with online Session</summary>
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
// create a `WithSessionParams` object with the necessary information to pass to `withSession`
|
|
27
|
-
const clientWithSessionParams: WithSessionParams = {
|
|
28
|
-
clientType: 'graphql',
|
|
29
|
-
isOnline: true,
|
|
30
|
-
req: request, // http.IncomingMessage object
|
|
31
|
-
res: response, // http.ServerResponse object
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const {client, session} = (await Shopify.Utils.withSession(
|
|
35
|
-
clientWithSessionParams,
|
|
36
|
-
)) as GraphqlWithSession;
|
|
37
|
-
|
|
38
|
-
// now you can make requests to the API using this client:
|
|
39
|
-
const shopName = await client.query({
|
|
40
|
-
data: `{
|
|
41
|
-
shop {
|
|
42
|
-
name
|
|
43
|
-
}
|
|
44
|
-
}`,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// you can also introspect on the returned Session, if you need to
|
|
48
|
-
const currentSessionUser = session.onlineAccessInfo.associated_user;
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
</details>
|
|
52
|
-
|
|
53
|
-
<details>
|
|
54
|
-
<summary>Example: REST Client with offline session</summary>
|
|
55
|
-
|
|
56
|
-
```ts
|
|
57
|
-
const clientWithSessionParams: WithSessionParams = {
|
|
58
|
-
clientType: 'rest',
|
|
59
|
-
isOnline: false,
|
|
60
|
-
shop: SHOP, // Shopify store url, without protocol, ie: "{shop}.myshopify.com"
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const {client, session} = (await Shopify.Utils.withSession(
|
|
64
|
-
clientWithSessionParams,
|
|
65
|
-
)) as RestWithSession;
|
|
66
|
-
|
|
67
|
-
const products = await client.get({path: 'products'});
|
|
68
|
-
|
|
69
|
-
const currentSessionScope = session.scope;
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
</details>
|
|
73
|
-
|
|
74
|
-
[Back to guide index](../../README.md#features)
|
|
File without changes
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ConfigInterface } from '../base-types';
|
|
2
|
-
import { SessionDeleteCurrentParams } from './types';
|
|
3
|
-
export declare function createDeleteCurrent(config: ConfigInterface): ({ isOnline, ...adapterArgs }: SessionDeleteCurrentParams) => Promise<boolean>;
|
|
4
|
-
//# sourceMappingURL=delete-current.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-current.d.ts","sourceRoot":"","sources":["delete-current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAI9C,OAAO,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAGnD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,kCAItD,0BAA0B,KAAG,QAAQ,OAAO,CAAC,CAYjD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDeleteCurrent = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var ShopifyErrors = tslib_1.__importStar(require("../error"));
|
|
6
|
-
var http_1 = require("../../runtime/http");
|
|
7
|
-
var session_utils_1 = require("./session-utils");
|
|
8
|
-
function createDeleteCurrent(config) {
|
|
9
|
-
var _this = this;
|
|
10
|
-
return function (_a) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
11
|
-
var request, sessionId;
|
|
12
|
-
var isOnline = _a.isOnline, adapterArgs = tslib_1.__rest(_a, ["isOnline"]);
|
|
13
|
-
return tslib_1.__generator(this, function (_b) {
|
|
14
|
-
switch (_b.label) {
|
|
15
|
-
case 0: return [4 /*yield*/, (0, http_1.abstractConvertRequest)(adapterArgs)];
|
|
16
|
-
case 1:
|
|
17
|
-
request = _b.sent();
|
|
18
|
-
return [4 /*yield*/, (0, session_utils_1.createGetCurrentSessionId)(config)({
|
|
19
|
-
request: request,
|
|
20
|
-
isOnline: isOnline,
|
|
21
|
-
})];
|
|
22
|
-
case 2:
|
|
23
|
-
sessionId = _b.sent();
|
|
24
|
-
if (!sessionId) {
|
|
25
|
-
throw new ShopifyErrors.SessionNotFound('No active session found.');
|
|
26
|
-
}
|
|
27
|
-
return [2 /*return*/, config.sessionStorage.deleteSession(sessionId)];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}); };
|
|
31
|
-
}
|
|
32
|
-
exports.createDeleteCurrent = createDeleteCurrent;
|
|
33
|
-
//# sourceMappingURL=delete-current.js.map
|