Resolver cache implementing Web Storage API.
Shared Consola instance.
Custom Fetch API implementation for making authenticated requests.
Path to this resource node as base URL followed by a list of curies.
Bookmark URL for this API. This is where the tree traversal begins. We also use this URL as a base for relative paths.
Resolver cache implementing Web Storage API.
Every resolved path will be stored here for future use. You can clear this cache by calling clear()
.
Consola instance. If you extend this class and add logging in your code, use this instead of native console.
Credentials storage implementing Web Storage API. Access tokens and other related info will be stored here. Clearing this storage will log you out.
Storage key for session data.
Polyfilled version of the built-in Headers
class. If you need to pass an instance of Headers
to .fetch()
,
use this class instead of the built-in one to avoid this issue.
Polyfilled version of the built-in Request
class. If you need to pass an instance of Request
to .fetch()
,
use this class instead of the built-in one to avoid this issue.
Polyfilled version of the built-in Response
class. If you need to check the return value of .fetch()
,
use this class instead of the built-in one to avoid this issue.
Validators for the method arguments in this class (internal).
Polyfilled version of the built-in fetch
function. If you need to call fetch() with poyfilled request, response or headers,
use this function instead of the built-in one to avoid this issue.
Resolves resource URL from a curie chain. The first element in the path must be a URL.
Resolved URL.
Resolves the URL of this node and sends a DELETE request, removing this resource.
Instance of {@link APIResponse} representing this resource.
Makes a raw and, if possible, authenticated request to the API. This method implements native Fetch API.
Fetch API arguments (url and request parameters).
Fetch API response.
Resource path builder. Calling this method instructs our SDK to find the provided curie in this resource's links and navigate to its location on request.
Curie to follow.
Instance of {@link APINode} representing the resource at curie location.
Resolves the URL of this node and sends a GET request using provided parameters.
Instance of {@link APIResponse} representing this resource.
Resolves the URL of this node and sends a GET request using provided parameters.
Query parameters such as zoom, fields etc.
Instance of {@link APIResponse} representing this resource.
Resolves the URL of this node and sends a PATCH request with provided properties, updating this resource.
Partial resource object.
Instance of {@link APIResponse} representing this resource.
Resolves the URL of this node and sends a POST request with provided properties, creating a resource or triggering an action.
Complete resource object.
Instance of {@link APIResponse} representing this resource.
Resolves the URL of this node and sends a PUT request with provided properties, replacing the existing resource.
Complete resource object.
Instance of {@link APIResponse} representing this resource.
Initiates password reset for a customer with the given email. If such customer exists, they will receive an email from Foxy with further instructions.
Password reset parameters.
Customer email.
Creates a Customer Portal session for a customer with the given credentials.
Incorrect email and password will trigger Core.API.AuthError
with code UNAUTHORIZED
.
Customer email and password (one-time code).
Destroys current session and clears local session data.
Generated using TypeDoc
Customer API for adding custom functionality to websites and web apps with our Customer Portal.
IMPORTANT: this client is not compatible with the beta version of Customer API. If you're still on beta, please consider updating your code to the latest stable version. You can use @foxy.io/sdk prior to 1.0.0-beta.15 or a custom API client until you transition.