Options
All
  • Public
  • Public/Protected
  • All
Menu

Workspace

Represents a Workspace. Can be used to inquire and load workspaces and apply them using methods on the App object.

Example: Find and Load Workspace

// find workspace and load it in drafts list
let workspace = Workspace.find("Projects");
app.applyWorkspace(workspace);

Hierarchy

  • Workspace

Index

Properties

archiveIncludesFlagged

archiveIncludesFlagged: boolean

Should flagged drafts be included in archive.

inboxIncludesFlagged

inboxIncludesFlagged: boolean

Should flagged drafts be included in inbox.

name

name: string

The name of the workspace.

queryString

queryString: string

Search string to filter results.

showLastAction

showLastAction: boolean

Show last logged action for draft in list.

showPreview

showPreview: boolean

Show preview of draft body in list.

showTags

showTags: boolean

Show draft tags in list.

tagFilter

tagFilter: string

Comma-delimited list tag string like "blue, !green" using "!" to omit a tag.

tagFilterRequireAll

tagFilterRequireAll: boolean

If true, all (AND) tags in the tag filter must match, if false match any of the tags (OR)

Methods

query

  • query(filter: "inbox" | "archive" | "flagged" | "trash" | "all"): Draft[]
  • Query for a list of drafts contained in the workspace.

    Parameters

    • filter: "inbox" | "archive" | "flagged" | "trash" | "all"

    Returns Draft[]

setFlaggedSort

  • setFlaggedSort(sortBy: sortDirections, sortDescending: boolean, sortFlaggedToTop: boolean): void
  • setFlaggedSort(sortBy: sortDirections, sortDescending: boolean, sortFlaggedToTop: boolean): void
  • setFlaggedSort(sortBy: sortDirections, sortDescending: boolean, sortFlaggedToTop: boolean): void
  • Set sort order for flagged.

    Parameters

    • sortBy: sortDirections
    • sortDescending: boolean
    • sortFlaggedToTop: boolean

    Returns void

  • Set sort order for archive.

    Parameters

    • sortBy: sortDirections
    • sortDescending: boolean
    • sortFlaggedToTop: boolean

    Returns void

  • Set sort order for "all" drafts folder.

    Parameters

    • sortBy: sortDirections
    • sortDescending: boolean
    • sortFlaggedToTop: boolean

    Returns void

setInboxSort

update

  • update(): void
  • Save changes made to the workspace to the database. This must be called to save changes.

    Returns void

Static create

  • create a new workspace object. This is an in-memory object only, unless update() is called to save the it.

    Returns Workspace

Static find

  • Search for workspace matching the name passed and return it if found. Returns undefined if not found.

    Parameters

    • name: string

    Returns Workspace | undefined

Static getAll

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc