Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Extension

Index

Constructors

constructor

Properties

channel

channel: Channel

container

container: Container

file

file: File

params

user

user: User

Methods

addTag

  • Add a tag to a container or file.

    Parameters

    • target: Container | File

      Container or file to add the tag to

    • tag: string

      Tag value to add

    Returns Promise<void>

close

  • close(): void
  • Signal to Flywheel that this application is ready to close, and terminate the message channel.

    Returns void

executeDataView

  • Execute an ad-hoc view, returning data in the preferred format.

    Parameters

    Returns Promise<DataViewResponse>

getArchiveMembers

  • Get information about the files within an archive file.

    since

    Flywheel 16.3.0

    Parameters

    • file: File

      Archive file instance

    Returns Promise<ArchiveMemberInfo>

  • deprecated

    container is not required as of Flywheel 16.3.0

    Parameters

    Returns Promise<ArchiveMemberInfo>

getChildContainers

  • Get a list of containers that are children of the given parent container, of a given type, and matching a query if provided.

    Parameters

    Returns Promise<Paginated<Container[]>>

    A pagination response with current and total items

getContainer

  • Get a container in the hierarchy.

    Parameters

    Returns Promise<Container>

getContainerPermissions

  • Get the set of permission actions that the user can take on a container.

    Parameters

    • container: Container

      Container in the hierarchy

    Returns Promise<Set<PermissionAction>>

getFile

  • getFile(fileId: string, options?: { version?: number }): Promise<File>
  • Get a file record by unique ID.

    since

    Flywheel 16.18.0

    Parameters

    • fileId: string

      file_id that identifies the file across the Flywheel site

    • Default value options: { version?: number } = {}

      Additional options, such as a specific version of the file

      • Optional version?: number

    Returns Promise<File>

    File record

getFileBlob

  • Get the contents of a file as a binary Blob.

    since

    Flywheel 16.3.0

    Parameters

    Returns Promise<Blob>

  • deprecated

    container is not required as of Flywheel 16.3.0

    Parameters

    Returns Promise<Blob>

getFileText

  • Get the contents of a file as a string.

    since

    Flywheel 16.3.0

    Parameters

    Returns Promise<string>

  • deprecated

    container is not required as of Flywheel 16.3.0

    Parameters

    Returns Promise<string>

getFileUrl

  • Get a parameterized URL to a file that will expire in a limited amount of time.

    since

    Flywheel 16.3.0

    Parameters

    Returns Promise<string>

  • deprecated

    container is not required as of Flywheel 16.3.0

    Parameters

    Returns Promise<string>

listContainers

  • Get a list of containers of a certain type, and matching a query if provided.

    Parameters

    Returns Promise<Paginated<Container[]>>

    A pagination response with current and total items

readSetting

  • readSetting(containerId?: ContainerID, settingKey: string): Promise<any>
  • Get a setting associated to a container in the hierarchy.

    Parameters

    • Default value containerId: ContainerID = "site"

      ID of the container. Defaults to 'site'

    • settingKey: string

      Key of the setting

    Returns Promise<any>

removeTag

  • removeTag(target: Container | File, tag: string): Promise<void>
  • Remove a tag from a container or file.

    Parameters

    • target: Container | File

      Container or file to remove the tag from

    • tag: string

      Tag value to remove

    Returns Promise<void>

updateContainerInfo

  • Update the custom info of a container.

    Parameters

    • container: Container

      Container instance

    • info: InfoUpdate

      Object specifying which info keys to set or delete, or a total replace object

    Returns Promise<void>

updateFileInfo

  • Update the custom info of a file.

    Parameters

    • file: File

      File instance

    • info: InfoUpdate

      Object specifying which info keys to set or delete, or a total replace object

    Returns Promise<void>

  • deprecated

    container is not required as of Flywheel 16.3.0

    Parameters

    Returns Promise<void>

updateViewport

  • updateViewport(viewport: { height?: number; width?: number }): void
  • Update the height and/or width of the extension frame.

    Parameters

    • viewport: { height?: number; width?: number }

      Viewport dimensions

      • Optional height?: number
      • Optional width?: number

    Returns void

uploadFile

  • Upload a file to a container. Upload progress is emitted as observable events. Use .toPromise() on the return value to get a Promise that resolves when the upload is complete.

    Parameters

    • container: Container

      Container that the file will be attached to

    • file: DOMFile

      File instance from an <input> element or FileList

    • Default value options: { filename?: string; preserveMetadata?: boolean } = {}
      • Optional filename?: string

        Override the name of the file, default to source filesystem name

      • Optional preserveMetadata?: boolean

        Copy info metadata from latest version to the new file version, if there is an existing version of the file. Available from Flywheel 16.8.0.

    Returns Observable<FileUploadEvent>

    Observable that emits upload progress events

waitForConnection

  • Wait for Flywheel to connect to this application.

    Returns Promise<Extension>

writeSetting

  • writeSetting(containerId?: ContainerID, settingKey: string, data: any): Promise<void>
  • Update a setting for the given container in the hierarchy.

    Parameters

    • Default value containerId: ContainerID = "site"

      ID of the container. Defaults to 'site'

    • settingKey: string

      Key of the setting

    • data: any

      Value of the setting

    Returns Promise<void>

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc