Class BazaarContext

The primary class of the Bazaar JS SDK to help you more easily build web apps with Bazaar.

Constructors

Properties

api: API
collections: CollectionsAPI

Access to the collections API

contextOptions: ContextOptions
permissions: PermissionsAPI

Access to the permissions API

Methods

  • Gets a collection interface (API access to the specified collection)

    Type Parameters

    Parameters

    • collectionName: string

      The name of the collection to create the interface for.

    • Optional collectionOptions: CollectionOptions

      An optional object for specifying an onCreate hook. The onCreate hook sets up a collection when it is created (e.g., to set up permissions)

    Returns CollectionAPI<T>