Class Category

A Category represents a category within a project. It has various configuration settings. It also has a list of fields for that category.

Constructors

Properties

allFieldsFieldMask: ItemFieldMask
category: string
project: Project

Methods

  • Construct a search mask from chosen options

    Parameters

    • options: IFieldMaskOptions

    Returns ItemsFieldMask

    an ItemsFieldMask object

  • An ItemFieldMask allows you to specify which fields out of the Category fields of an Item should be considered valid.

    Parameters

    • Optional fieldIds: number[]

      If specified, a valid set of field ids for this Category. Otherwise, the returned ItemFieldMask expresses that all fields in the Item are to be considered valid.

    Returns ItemFieldMask

    an ItemFieldMask.

    Throws

    throws an Error if any of the field ids specified in fieldIds do not exist in the Category.

  • Return field ids from the Category which match the given label. These labels are searched in a case-insensitive way.

    Parameters

    • label: string

    Returns number[]

    a non-empty array of field ids if the label is present in the Category.

  • Get all of the items of this Category.

    Parameters

    • Optional options: ICategoryItemOptions

      An optional ICategoryItemOptions describing search options.

    Returns Promise<Item[]>

    An array of Items of this Category, configured according to the options given.

Generated using TypeDoc