This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
Releases: Foxy/foxy-node-api
Releases · Foxy/foxy-node-api
1.0.0-beta.9 (2020-10-12)
This update brings a couple of fixes and improvements to the URL resolver and sanitization utilities.
Bug fixes
- removePrivateAttributes: make sure only embeds are sanitized
In previous versions this method would fail to process response objects that had afx:attributes
entry under_links
. This is no longer the case. - resolver: fix
.follow(ID)
calls
We've recently discovered that when a numeric ID was passed to theResolver#follow
method, the URL resolution algorithm was almost always returning a wrong path even if the smart resolution option was turned off. Beta 9 fixes this issue, adding new resolution rules outlined below.
Features
- add support for
fx:customer_portal_settings
(types and static resolver) and upcomingallowNextDateModification
schema changes.
Updated resolution algorithm for attributes and IDs:
- Paths ending with
fx:attributes
are always resolved as[parent]/attributes
; - Paths ending with a number are resolved as follows:
- If parent curie is
fx:attributes
, take the closest string value up the chain, convert it to an attribute collection relation name and resolve to[root]/[attribute_collection]/[ID]
; - Otherwise convert the parent curie name to a relation name and resolve to
[root]/[rel]/[ID]
; - In rare cases when the above fails, simply append the ID to the path:
[parent]/[ID]
- If parent curie is
1.0.0-beta.8 (2020-08-21)
1.0.0-beta.7 (2020-07-03)
This pre-release update adds new functionality to the package.
Features
- add hmac validation and signing utilities
The HMAC validation is recommended to prevent a malicious user from tampering with your add-to-cart links and forms. Though you could also use the Foxy's webhooks (both the pre-payment and the post-payment webhooks) to validate orders, using our hmac link/form signing is recommend where possible. Refer to HMAC Product Verification: Locking Down your Add-To-Cart Links and Forms for technical details.
1.0.0-beta.6 (2020-05-14)
This is a cumulative update on the way to the 1.0 release focused primarily on type-hinting and autocompletion improvements.
Bug Fixes
- make sure partial resources work with zoom
- remove embeds if fields param is present
Features
- add basic embed types
- add support for zoom query param
- add support for pagination params
- add support for order param
1.0.0-beta.5 (2020-04-06)
This is a cumulative update on the way to the 1.0 release that packs a bunch of bug fixes and improvements over the last version.
Bug Fixes
- infer API endpoint from the base URL where applicable
- share API endpoint with the
Sender
andFollower
instances created byApi
- make sure no extra params are passed from
fetch()
tofetchRaw()
- fix the
fx:token
resource type
Features
- 99% test coverage
- lots of new JSDoc comments for the public class members and exported utils
- new section in README on local dev + fixed a typo in logger params description
- API endpoint is now configurable via the
FoxyApi
constructor params
BREAKING CHANGES
Auth#getAccessToken
(exposed viaFoxyApi#getAccessToken
) will no longer accept arguments in this version. This is an old feature from back when it was a utility function and it doesn't make much sense now that it's a class member.