The VariableController is responsible for all communication regarding the variables. Methods inside this controller can be called by window.SDK.variable.{method-name}

Hierarchy

  • VariableController

Methods

  • This method aggregates the provided variables into a new group

    Returns

    group id

    Parameters

    • name: string

      name of the new group

    • ids: string[]

      list of variable ids to group together

    Returns Promise<EditorResponse<string>>

  • This method moves a variable's position

    Returns

    Parameters

    • order: number

      new order of variable

    • id: string

      id of the variable

    • parentId: string

      parent id of the created variable

    Returns Promise<EditorResponse<null>>

  • This method changes positions of variables

    Returns

    Parameters

    • order: number

      new order of variable

    • ids: string[]

      Array of the variable IDs

    • parentId: string

      parent id of the variables

    Returns Promise<EditorResponse<null>>

  • This method sets the image variable connector. Setting a connector will automatically remove the assetId linked to the connector if present. If a connector was the source of the variable, it will be unregistered.

    Returns

    The new id of the connector

    Parameters

    • id: string

      The id of the image variable to update

    • registration: ConnectorRegistration

      registration object containing all details about the connector

    Returns Promise<EditorResponse<string>>

  • This method sets the items of the list variable

    The items need to be unique and are not case sensitive.

    Returns

    Parameters

    • id: string

      the id of the list variable

    • items: string[]

      the items of the list

    Returns Promise<EditorResponse<null>>

  • This method sets a new value for a variable

    Returns

    Parameters

    • id: string

      the id of the variable

    • value: null | string | boolean

      the new value of the variable

    Returns Promise<EditorResponse<null>>

Generated using TypeDoc