Constructors

Properties

channel: Channel
container: Container
file: File
text: {
    autoFormat?: boolean;
    fileName?: string;
    fileType?: string;
    readOnly?: boolean;
    value: string;
}

Type declaration

  • Optional autoFormat?: boolean
  • Optional fileName?: string
  • Optional fileType?: string
  • Optional readOnly?: boolean
  • value: string
user: User

Methods

  • Add a tag to a container or file.

    Parameters

    • target: File | Container

      Container or file to add the tag to

    • tag: string

      Tag value to add

    Returns Promise<void>

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

    Returns void

  • 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

  • Get a file record by unique ID.

    Parameters

    • fileId: string

      file_id that identifies the file across the Flywheel site

    • options: {
          version?: number;
      } = {}

      Additional options, such as a specific version of the file

      • Optional version?: number

    Returns Promise<File>

    File record

    Since

    Flywheel 16.18.0

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

    Parameters

    Returns Promise<Blob>

    Since

    Flywheel 16.3.0

  • Parameters

    Returns Promise<Blob>

    Deprecated

    container is not required as of Flywheel 16.3.0

  • Get the contents of a file as a string.

    Parameters

    Returns Promise<string>

    Since

    Flywheel 16.3.0

  • Parameters

    Returns Promise<string>

    Deprecated

    container is not required as of Flywheel 16.3.0

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

    Parameters

    Returns Promise<string>

    Since

    Flywheel 16.3.0

  • Parameters

    Returns Promise<string>

    Deprecated

    container is not required as of Flywheel 16.3.0

  • Get a setting associated to a container in the hierarchy.

    Parameters

    • containerId: string = 'site'

      ID of the container. Defaults to 'site'

    • settingKey: string

      Key of the setting

    Returns Promise<any>

  • Remove a tag from a container or file.

    Parameters

    • target: File | Container

      Container or file to remove the tag from

    • tag: string

      Tag value to remove

    Returns Promise<void>

  • 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>

  • 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>

  • Parameters

    Returns Promise<void>

    Deprecated

    container is not required as of Flywheel 16.3.0

  • 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

  • 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: File

      File instance from an <input> element or FileList

    • 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

  • Upload a string back to the component which instantiated this extension. Used for editing strings in place without an associated file.

    Parameters

    • text: string

      String contents to be passed back to Flywheel Available from Flywheel 17.4.0

    Returns Promise<void>

    Promise signaling completion of upload

  • Update a setting for the given container in the hierarchy.

    Parameters

    • containerId: string = 'site'

      ID of the container. Defaults to 'site'

    • settingKey: string

      Key of the setting

    • data: any

      Value of the setting

    Returns Promise<void>