@cobaltio/cobalt-js
    Preparing search index...

    Class Cobalt

    Index

    Constructors

    • Cobalt Frontend SDK

      Parameters

      • options: CobaltOptions = {}

        The options to configure the Cobalt SDK.

        • OptionalbaseUrl?: string

          The base URL of the Cobalt API. You don't need to set this.

        • Optionaltoken?: string

          The session token.

      Returns Cobalt

    Properties

    token: string

    Methods

    • Returns the specified config, or creates one if it doesn't exist.

      Parameters

      Returns Promise<any>

      The specified config.

    • Connect the specified application, optionally with the auth data that user provides.

      Parameters

      • slug: string

        The application slug.

      • Optionalpayload: Record<string, string>

        The key value pairs of auth data.

      Returns Promise<boolean>

      Whether the connection was successful.

    • Create a public workflow for the linked account.

      Parameters

      • params: PublicWorkflowPayload

        The payload for creating a public workflow for the linked account.

        • Optionaldescription?: string

          The workflow description.

        • name: string

          The workflow name.

        • Optionalslug?: string

          The application slug in which this workflow should be created.

      Returns Promise<PublicWorkflow>

      The created public workflow.

    • Delete the specified config.

      Parameters

      • slug: string

        The application slug.

      • OptionalconfigId: string

        The unique ID of the config.

      Returns Promise<unknown>

    • Delete the specified config field value.

      Parameters

      • slug: string

        The application slug.

      • fieldId: string

        The unique ID of the field.

      • OptionalworkflowId: string

        The unique ID of the workflow.

      Returns Promise<unknown>

    • Disconnect the specified application and remove any associated data from Cobalt.

      Parameters

      • slug: string

        The application slug.

      Returns Promise<void>

    • Returns the list of enabled applications and their details.

      Returns Promise<Application[]>

      The list of applications.

    • Returns the application details for the specified application, provided the application is enabled in Cobalt.

      Parameters

      • slug: string

        The application slug.

      Returns Promise<Application>

      The application details.

    • Returns the specified config.

      Parameters

      • slug: string

        The application slug.

      • OptionalconfigId: string

        The unique ID of the config.

      Returns Promise<any>

      The specified config.

    • Returns the specified field of the config.

      Parameters

      • slug: string

        The application slug.

      • fieldId: string

        The unique ID of the field.

      • OptionalworkflowId: string

        The unique ID of the workflow.

      Returns Promise<any>

      The specified config field.

    • Returns the options for the specified field.

      Parameters

      • lhs: string

        The selected value of the lhs field.

      • slug: string

        The application slug.

      • fieldId: string

        The unique ID of the field.

      • OptionalworkflowId: string

        The unique ID of the workflow, if this is a workflow field.

      Returns Promise<RuleOptions>

      The specified rule field's options.

    • Update the specified config field value.

      Parameters

      • slug: string

        The application slug.

      • fieldId: string

        The unique ID of the field.

      • value: null | string | number | boolean

        The new value for the field.

      • OptionalworkflowId: string

        The unique ID of the workflow.

      Returns Promise<any>

      The updated config field.