- New: bump supported OTP and Elixir ver
- New: bump deps
- Refactor:
post_install
topost_login
, this hook is actually not triggered on install but shop login! We have kept the original post_install config optin but it is now deprecated and will be removed sometime in the future. - New: fire
post_login
hook on User based authentication.
- Fix: REST pagination broken
- Fix: UserTokenServer.delete wasn't using the correct key in to the :ets table
- New: UserTokenServer.delete_for_shop/1 to delete all the tokens for a shop
- New: Shop helper functions to translate from slug <> myshopify domain, and new to_uri helper function.
- New: Shopify admin URI helper
- Fix: UserTokens were not being validated on fetch, they are now. Add redirect OAuth URL if invalid
- Refactor: OAuth URL generation, moved from App module to root ShopifyAPI module
- Fix: The dev proxy wasn't authing requests correctly or reading the passed in app_name.
- New: Online Token generation/auth, this allows per merchant admin login tokens. Check out the Plug.AuthShopSessionToken on how to enable it.
- Fix: ecto_sql dependency declaration, marked as optional instead of dev and test only
- Add AuthTokenServer.delete/2
- New: ShopifyId struct adds convenience around shopify ids
- Fix: typo in
REST.UsageCharges.all/4
- BREAKING: fixed hmac validation of Plug.AdminAuthenticator, now only authenticates when hmac is present
- Added the ability to set a default app name for the Plug.AdminAuthenticator
- AdminAuthenticator plug passes through if there is no hmac
- Relax telemetry requirement to still include 0.4
- Take advantage of increased admin API rate limits for plus shops https://shopify.dev/changelog/increased-admin-api-rate-limits-for-shopify-plus
- Remove usage of session and session rehydration from AdminAuthenticator plug.
- Add ShopServer.delete/1
- Add 401 unauthorized response to Webhook plug
- Call webhook handler even when the shop is not in the ShopServer
- New Bulk.Query.async_exec!/2 returns bulk_query_id, useful for when using the bulk query completed webhook.
- Add
Bulk.process_stream_from_id!/2
- intended for use after receiving a
bulk_operations/finish
webhook
- intended for use after receiving a
- Fix: app_name setting for webhook plug was not passed through on initialization
- Fix: adjust pattern match on Shopify's bulk operation in progress error
- Fix: Hardcoded App Name in Authentication Plug
- New: Moved to erlang 25 and dropping Erlang 23 and Elixir 1.11 from testing matrix
- Fix/New: Forward to the Shopify Shop's admin for the app on successful install as the final step in the AuthToken fetch.
- Fix: Call ShopServer.set/2 with shop and persist true when Shop install happens.
- New PutShopifyContentHeaders plug for Shop Admin iframe serving.
This is one of the bigger updates in a while, there are breaking changes with the new Webhook plug, please read the new documentation and examples closely.
- Refactor: removed AdminAuthenticator's use of ConnHelpers
- Refactor: removed the Router's use of ConnHelpers
- Fix: Don't persist Shop on ShopServer init
- Admin Authenication Plug now redirects to install if shop is not found
- New ShopServer.get_by_client_id/1
- New AuthShopSessionToken plug for Shop Admin authentication with the Shopify JWT.
- BREAKING: remove old
EventPipe.Event
as it is not used any more. - BREAKING: Replace
ShopifyAPI.Plugs.Webhook
with new implementation.- This version does not use the
Event
struct, and is configured differently. Please see the docs forShopifyAPI.Plugs.Webhook
for more details.
- This version does not use the
- Dependency updates: telemetry, ex_doc, plug_cowboy, gen_stage
- Elixir 1.12 compatibility
- Fix: Nonce check on install when Shopify does not pass a nonce to the endpoint.
- Fix: Allow options to be passed to HTTPoison when making GET requests through
ShopifyAPI.REST
. - Fix: Also handle 401s when raising custom bulk fetch errors
- Fix: also handle 403s when raising custom bulk fetch errors
- Fix: properly handle both 402 and 423s when raising custom bulk fetch errors
- BREAKING: Remove
ShopifyAPI.REST.Tag
and associated tests - BREAKING: Noted spelling fix of persistance to persistence in v 0.10.0
- Fix: match on status code instead of error string when raising custom bulk fetch errors
- BREAKING: removed Elixir 1.9 and OTP 21 support
- Switch
ShopifyAPI.JSONSerializer
to be configured at compile-time, not runtime. - BREAKING: Rename Shopify API environment variable from
http_timeout
torest_recv_timeout
- Add the ability to pass a list of HTTPoison options to
Rest.post
andRest.put
- Add 4th param to ShopifyAPI.REST.Fulfillment.create/4
- Add a REST checkout endpoint
- Fix: return on success for AuthTokenServer.set/1
- Add specs to AuthTokenServer, AppServer, and ShopServer public functions
- Add: REST.Redirect - thanks @tres
- Fix: Broken path for REST.AccessScopes.get/1
- BREAKING:
AppServer
,ShopServer
,AuthTokenServer
configuration had spelling mistake which was corrected, persistance became persistence. - BREAKING: Rename
ShopifyAPI.CacheSupervisor
toShopifyAPI.Supervisor
. - Upgrade
AppServer
,ShopServer
, andAuthTokenServer
to use ets-backed caching. - Change default Shopify API version to
2020-10
. - BREAKING: Remove GraphQL App/Shop/AuthToken servers.
- If you want this/use this, grab it out of the git history and import in to your project.
- Fix a pattern match bug in REST.RecurringApplicationCharge.create/2
- "/install" route now handles app name in path - thanks @tres
- Throw ShopNotFoundError and ShopUnavailableError in Bulk.Query.exec/3
- Fix: Bulk Telemetry event name is now correct.
- Add new ShopifyAPI.Bulk error types
- Add ShopifyAPI.Bulk :telemetry events
- Fix: Bulk.process_stream!/2 now correctly handles bulk operations returning 0 objects
- Add HTTP fetch streaming in Bulk.Query with stream_fetch/1
- BREAKING: Bulk.process_stream/2 is now Bulk.process_stream!/2 and no longer returns errors in a list.
- Now streams HTTP body.
- Fix:
Bulk.Cancel.poll/5
uses the correct arguments while recursing.
- Added max poll count configuration option to GraphQL Bulk Query.
- Fix:
all/3
for smart_collection and custom_collection works. - BREAKING: moved the bulk query functionality namespaces from
ShopifyAPI.GraphQL.BulkFetch
toShopifyAPI.Bulk
- Add throttling for GraphQL.
- Add GraphQL bulk fetch query method.
- Switch default version of GraphQL API to 2019-10 (was 2019-07).
- Fix: Remove call to
String.to_existing_atom
from param serialization. This could previously result in an unexpected error from the caller.
- BREAKING: Switch default version of REST API to 2020-01 (was 2019-04).
- BREAKING: Add ability to specify pagination options for GET on collection resources, defaults to blocking until all results returned.
- BREAKING: Removed top-level wrappers of Shopify REST response values.
- Return values that were
{:ok, %{"orders" => [%{}, ...]}}
are now{:ok, [%{}, ...]}
- Return values that were
- BREAKING: Removed
Exq
dependency, EventPipe.EventQueue & EventPipe.ModuleNameWorker & surrounding modules.
- Fixes an incorrect arity bug in
GraphQL.Response.handle
- Refactor caching servers startup, no longer started by ShopifyAPI.Application WARNING this is a breaking change, it will require the addition of the cache supervisor to the applications children.
- Fix nested tuple returns on things like Shopify timeouts.
WARNING This is a breaking change, errors returned as
{:error, {:error, any()}}
will be{:error, any()}
now. - Increased minimum supported version of Elixir to "1.9"
- Add internal GraphQL interface to Shopify's GraphQL API
- Add Customer Authentication Plug [ch51782]
- Move to Jason as default json encoder, no longer has deps for Poison.
AuthTokenServer.get
spec has been changed. It will return{:error, any()}
if it can't find an AuthToken.- Configurable json serialization.
- Refactor
ShopifyAPI.REST.Request
, extract underlyingget
/post
/put
/delete
toShopifyAPI.REST
. - Correct examples for
ShopifyAPI.REST.Collect
. - Refactor ThrottlingServer -> AvailabilityTracker
- Add :telemetry events
- Add support for serializing
%ShopifyAPI.EventPipe.Event{}
structs with Jason.
- Add BackgroundJobBehaviour to allow configure the job runner
- Add Credo and compile warnings to CI
- Fix for ApplicationCredit
- Support API versioning
- Coerce events from the queue into %Events{}
- Change Events in EventQueue to use string destinations and actions
- Changed Event.t() typespec to be strings for destination and action.
- Added new endpoint for customer search
- Added new endpoints for draft orders
- Added the ShopifyAPI namespace prefix to the GraphQL modules
- Fixed dialyzer, thank you @baradoy!
- Type for Event work
- Make exq optional (turning it off for test runs), if Exq isn't running work will be run inline.
- Add new Plug.AdminAuthenticator for easy Shop admin panel authentication
- Refactor Plug.Webhook
- Bump Exq ver and use Jason encoding for jobs
- Add REST.Asset and REST.Theme
- Added filter params to REST.Metafield.all/2&3
- REST.Metafield.all/1 fix
- Fix bug in server initialization params, make AuthTokenServers init match the other servers
- Initialization and persistance hooks added to ShopServer and AppServer (following the AuthTokenServer example)
- HTTPoison upgrade to 1.5.0