Release Notes
Notable changes from each new release.
Version 1.0.0, 2024-05-30
React SDK Version 1.0 Release
The Prequel React SDK is evolving alongside our API with new features, updated functionality, and in some areas, more opinionated usage requirements.
One of the more opinionated changes Prequel has made in the new version of the API is simplifying the recommended usage of recipient_id vs. id_in_provider_system as the method to identify the Third Party. Historically, Prequel's API offered inconsistent support for recipient_id and id_in_provider_system across the API and React Hooks. For simplicity, we are deprecating the ability to use id_in_provider_system as the Recipient identifier in every endpoint except for:
- Create Recipient:
id_in_provider_systemis still required to create a new Recipient - Get Recipient:
id_in_provider_systemcan still be used to find an existing Recipient
This simplifies a number of confusing authentication and scoping questions that resulted from the options to use recipient_id vs. id_in_provider_system.
How this affects your integration
As a result, a breaking change in this version of the React SDK will be the usage of useGetDestinations and the required FetchAuthToken counterpart.
useGetDestinationsnow accepts aFetchAuthTokenfunction that does not take any input. Therecipient_idfor the request should be set on the token in your backend.useGetDestinationsForRecipienthas been deprecated in favor of the newuseGetDestinationsimplementation, with updated return types.
Other Changes
Alongside this higher-level logic change, the updated React SDK includes a number of breaking & non-breaking API shape changes:
React hook API shape changes
useDestinationFormnow accepts anoptionsparameter that allows you to set any number of the optional parameters without worrying about parameter order.- Options that were previously returned by default will now only appear if explicitly requested in the options parameter.
useDestinationVendorsnow returns a list of all available destination vendors for the deployment, complete with display names and logos. This hook should not be used to render a form.
This hook previously returned an earlier version of the form
Link to docs:useGetTransfersnow returns a list ofTransferobjects rather than the full API response object.
Link to docs:useModelConfigshas been deprecated in favor ofuseModels, with updated return types.useProductConfigshas been deprecated in favor ofuseProducts, with updated return types.
Renamed React hooks
FetchAuthTokenWithDestinationhas been renamed toFetchAuthTokenWithPreparedDestination
New React hook functionality
- The React hook return types have been simplified and consolidated (the shapes of the types have not changed, except where noted)
FormFieldtype has been expanded to includedivform elements andnumberinput types.
Backwards-compatible changes
- React hook API shape changes
useDestinationhook now supportsPartial<Destination>inputs so you don't need to wrapsetDestinationinsetDestinationFieldas suggested in the React Example app.
Updated 30 days ago