Resolver cache implementing Web Storage API.
Shared Consola instance.
Custom Fetch API implementation for making authenticated requests.
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.
When logged in with a temporary password, this property getter will return true
.
Will return false
if password reset is not required or if the session has not been
initiated, or if the session was initiated before the introduction of this feature.
Password reset requirement.
When logged in with a temporary password, this property getter will return true
.
Will return false
if password reset is not required or if the session has not been
initiated, or if the session was initiated before the introduction of this feature.
Password reset requirement.
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.
The date this resource was created.
The date this resource was last modified.
The customer's email address. This is used as the login to the FoxyCart checkout for this customer.
The customer's given name.
The FoxyCart customer id, useful for Single Sign On integrations.
The date of the last time this customer authenticated with the FoxyCart checkout.
The customer's surname.
A tax identification number for this customer.
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.
The date this resource was created.
The date this resource was last modified.
The customer's email address. This is used as the login to the FoxyCart checkout for this customer.
The customer's given name.
The FoxyCart customer id, useful for Single Sign On integrations.
The date of the last time this customer authenticated with the FoxyCart checkout.
The customer's surname.
A tax identification number for this customer.
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.
Creates a new customer account with the given credentials.
If the email is already taken, Core.API.AuthError
with code UNAVAILABLE
will be thrown.
If customer registration is disabled, Core.API.AuthError
with code UNAUTHORIZED
will be thrown.
If the provided form data is invalid (e.g. captcha is expired), Core.API.AuthError
with code INVALID_FORM
will be thrown.
Customer information.
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.