Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Biota

Biota takes at least a secret key to auth your requests.

Basic usage example:

 const db = new Biota({ secret: <your-secret> })
 // which then exposes the whole API
 db.query(...)

Hierarchy

  • Biota

Index

Constructors

constructor

  • new Biota(options: BiotaOptions): Biota

Properties

Private _context

_context: FactoryContextDefinition

Private _secret

_secret: string

client

client: Client

collection

collection: (name?: FaunaString) => FrameworkCollectionApi

Type declaration

    • (name?: FaunaString): FrameworkCollectionApi
    • Parameters

      • Optional name: FaunaString

      Returns FrameworkCollectionApi

collections

collections: FrameworkCollectionsApi

credential

credential: (idOrRefOrInstance?: FaunaId | FaunaRef) => FrameworkCredentialsApi

Type declaration

    • (idOrRefOrInstance?: FaunaId | FaunaRef): FrameworkCredentialsApi
    • Parameters

      • Optional idOrRefOrInstance: FaunaId | FaunaRef

      Returns FrameworkCredentialsApi

credentials

credentials: FrameworkCredentialsApi

database

database: (name?: FaunaString) => FrameworkDatabaseApi

Type declaration

    • (name?: FaunaString): FrameworkDatabaseApi
    • Parameters

      • Optional name: FaunaString

      Returns FrameworkDatabaseApi

databases

databases: FrameworkDatabasesApi

defaults

defaults: any

document

document: (collectionOrRef?: FaunaString | FaunaRef, id?: FaunaString) => FrameworkDocumentApi

Type declaration

    • (collectionOrRef?: FaunaString | FaunaRef, id?: FaunaString): FrameworkDocumentApi
    • Parameters

      • Optional collectionOrRef: FaunaString | FaunaRef
      • Optional id: FaunaString

      Returns FrameworkDocumentApi

Private documentOptions

documentOptions: BiotaOptionsDocument

documents

documents: (collectionOrRef?: FaunaString | FaunaRef) => FrameworkDocumentsApi

Type declaration

    • (collectionOrRef?: FaunaString | FaunaRef): FrameworkDocumentsApi
    • Parameters

      • Optional collectionOrRef: FaunaString | FaunaRef

      Returns FrameworkDocumentsApi

foundation

foundation: FrameworkFoundation

index

index: (name: string) => FrameworkIndexApi

Type declaration

    • (name: string): FrameworkIndexApi
    • Parameters

      • name: string

      Returns FrameworkIndexApi

indexes

indexes: FrameworkIndexesApi

key

key: (idOrRef: FaunaId | FaunaRef) => FrameworkKeyApi

Type declaration

    • (idOrRef: FaunaId | FaunaRef): FrameworkKeyApi
    • Parameters

      • idOrRef: FaunaId | FaunaRef

      Returns FrameworkKeyApi

keys

keys: FrameworkKeysApi

paginate

paginate: (paginateQuery: Expr, paginateOptions?: object) => AsyncGenerator<any, any, any>

Type declaration

    • (paginateQuery: Expr, paginateOptions?: object): AsyncGenerator<any, any, any>
    • Parameters

      • paginateQuery: Expr
      • Optional paginateOptions: object

      Returns AsyncGenerator<any, any, any>

privateKey

privateKey: (private_key: string) => Promise<any>

Type declaration

    • (private_key: string): Promise<any>
    • Parameters

      • private_key: string

      Returns Promise<any>

query

query: (fqlQuery: Expr) => any

Type declaration

    • (fqlQuery: Expr): any
    • Parameters

      • fqlQuery: Expr

      Returns any

role

role: (name?: FaunaString) => FrameworkRoleApi

Type declaration

    • (name?: FaunaString): FrameworkRoleApi
    • Parameters

      • Optional name: FaunaString

      Returns FrameworkRoleApi

roles

roles: FrameworkRolesApi

session

session: (idOrRef: FaunaId | FaunaRef) => FactorySessionApi

Type declaration

    • (idOrRef: FaunaId | FaunaRef): FactorySessionApi
    • Parameters

      • idOrRef: FaunaId | FaunaRef

      Returns FactorySessionApi

sessions

sessions: FrameworkSessionsApi

token

token: (idOrRefOrInstance?: FaunaId | FaunaRef) => FactoryTokenApi

Type declaration

    • (idOrRefOrInstance?: FaunaId | FaunaRef): FactoryTokenApi
    • Parameters

      • Optional idOrRefOrInstance: FaunaId | FaunaRef

      Returns FactoryTokenApi

tokens

tokens: FrameworkTokensApi

udfunction

udfunction: (name: string) => FrameworkUDFunctionApi

Type declaration

    • (name: string): FrameworkUDFunctionApi
    • Parameters

      • name: string

      Returns FrameworkUDFunctionApi

udfunctions

udfunctions: FrameworkUDFunctionsApi

user

user: (idOrRef?: FaunaId | FaunaRef) => FrameworkUserApi

Type declaration

    • (idOrRef?: FaunaId | FaunaRef): FrameworkUserApi
    • Parameters

      • Optional idOrRef: FaunaId | FaunaRef

      Returns FrameworkUserApi

users

users: (collectionName?: string) => FrameworkUsersApi

Type declaration

    • (collectionName?: string): FrameworkUsersApi
    • Parameters

      • Optional collectionName: string

      Returns FrameworkUsersApi

Accessors

context

  • get context(): FactoryContextDefinition

Generated using TypeDoc