Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Releases: Foxy/foxy-node-api

1.0.0-beta.9 (2020-10-12)

12 Oct 18:51
a4355fe
Compare
Choose a tag to compare
Pre-release

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 a fx: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 the Resolver#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 upcoming allowNextDateModification schema changes.

Updated resolution algorithm for attributes and IDs:

  1. Paths ending with fx:attributes are always resolved as [parent]/attributes;
  2. 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]

1.0.0-beta.8 (2020-08-21)

10 Sep 13:22
6cc9024
Compare
Choose a tag to compare
Pre-release

A quick update fixing a compiler warning about missing URL and URLSearchParams definitions, adding more readable hAPI errors and tidying up a few things in code.

Bug Fixes

  • add missing imports for URL module (#3)

Features

  • improve hAPI errors (#4)

1.0.0-beta.7 (2020-07-03)

10 Sep 13:21
Compare
Choose a tag to compare
Pre-release

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)

10 Sep 13:21
04369bc
Compare
Choose a tag to compare
Pre-release

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)

07 Apr 10:47
3e4af10
Compare
Choose a tag to compare
Pre-release

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 and Follower instances created by Api
  • make sure no extra params are passed from fetch() to fetchRaw()
  • 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 via FoxyApi#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.