SDK for interacting with collections in AppDB.

Example Usage

import { AppDBClient } from '@domoinc/toolkit';

const collections = await (new AppDBClient.CollectionsClient()).getCollections();
// do something with the collections
console.table(collections);

Hierarchy

  • CollectionsClient

Constructors

  • Parameters

    • Optional reCaptchaToken: string

    Returns CollectionsClient

Properties

reCaptchaHeader: {
    X-DOMO-Ryuu-Recaptcha?: string;
}

Type declaration

  • Optional X-DOMO-Ryuu-Recaptcha?: string
transportClient: TransportClientClass

Methods

  • A helper method for creating a new collection.

    Parameters

    • newCollection: AppDBCollectionDefinition

      Properties for new collection

      Example Usage

      collectionsClient.createCollection({
      name: 'newCollection',
      schema: [
      {
      name: 'name',
      type: 'STRING'
      },
      {
      name: 'age',
      type: 'LONG'
      },
      ],
      syncEnabled: true,
      });

    Returns Promise<Response<AppDBCollection>>

  • A helper method for deleting a collection.

    Parameters

    • collectionId: string

      ID of target collection to delete

      Example Usage

      collectionsClient.deleteCollection('753e53a0-f054-11e9-81b4-2a2ae2dbcce4');
      

    Returns Promise<Response<void>>

  • A helper method for retrieving a full list of collections.

    Returns Promise<Response<AppDBCollection[]>>

  • A helper method for forcing the collections to be sync'd with their respective datasets in Domo.

    Returns Promise<Response>

  • A helper method for updating a collection.

    Parameters

    • collectionId: string

      ID of target collection to update

    • updatedConfig: AppDBCollectionDefinition

      Partial object representing the new values of the collection

      Example Usage

      collectionsClient.updateCollection(
      '753e53a0-f054-11e9-81b4-2a2ae2dbcce4',
      {
      schema: [
      {
      name: 'name',
      type: 'STRING'
      },
      {
      name: 'created',
      type: 'DATETIME'
      },
      ],
      }
      );

    Returns Promise<Response<AppDBCollection>>

Generated using TypeDoc