Access to the collections API
BetamonetizationAccess to the monetization API
Access to the permissions API
Access to the social API
Gets a collection interface (API access to the specified collection)
The name of the collection to create the interface for.
OptionalcollectionOptions: CollectionOptionsAn optional object for specifying an onCreate hook. The onCreate hook sets up a collection when it is created (e.g., to set up permissions)
Checks if the user is logged in. i.e. if an access token is in local storage.
Opens a pop-up window to perform OAuth login.
Will fallback to redirect login if pop-up fails to open, if options.type is not popup (meaning an app has explicitly opted out of falling back to redirect login)
Optionaloptions: { type?: LoginType }Logs out a user. Deletes the access token from local storage and reloads the page.
Sets a callback function an app can run when it connects or re-connects to the API.
Sets a callback function an app can run when an API disconnection occurs.
e.g. Invalid access token
Sets a callback function an app can run when a user has successfully logged in.
e.g. Set state, redirect, etc.
Sets a callback function an app can run a login error occurs.
e.g. Authorization code is invalid
The primary class of the Bazaar JS SDK to help you more easily build web apps with Bazaar.