Namespace: Tasks

Member Of Module: clb-automator

Description

Document a list of available tasks.

Function: createCollab

Create a collab defined by the given options.

createCollab(descriptor, descriptor.name, descriptor.description[, descriptor.privacy][, after])
Arguments:
  • descriptor (object) – Parameters to create the collab
  • descriptor.name (string) – Name of the collab
  • descriptor.description (string) – Description in less than 140 characters of the collab
  • descriptor.privacy (string) – ‘private’ or ‘public’. Notes that only HBP Members can create private collab
  • after (Array) – descriptor of subtasks
Return Promise:
  • promise of a collab

Function: createNavItem

Create a new nav item.

createNavItem(descriptor, descriptor.name, descriptor.collabId, descriptor.app[, context][, context.collab])
Arguments:
  • descriptor (object) – a descriptor description
  • descriptor.name (string) – name of the nav item
  • descriptor.collabId (Collab) – collab in which to add the item in.
  • descriptor.app (string) – app name linked to the nav item
  • context (object) – the current run context
  • context.collab (object) – a collab instance created previously
Return Promise:

promise of a NavItem instance

Function: overview

Set the content of the overview page. If an ‘entity’ is specified, it will use the content of that storage file If an ‘app’ name is specified, it will use that app for the overview page

The collab is indicated either by an id in descriptor.collab or a collab object in context.collab.

overview(descriptor[, descriptor.collab][, descriptor.entity][, descriptor.app], context[, context.collab][, context.entities])
Arguments:
  • descriptor (object) – the task configuration
  • descriptor.collab (object) – id of the collab
  • descriptor.entity (string) – either a label that can be found in context.entities or a FileEntity UUID
  • descriptor.app (string) – the name of an application
  • context (object) – the current task context
  • context.collab (object) – the collab in which entities will be copied
  • context.entities (object) – a list of entities to lookup in for descriptor.entiry value
Return object:

created entities where keys are the same as provided in config.storage

Function: storage

Copy files and folders to the destination collab storage.

storage(descriptor, descriptor.storage, [descriptor.collab, ]context[, context.collab])
Arguments:
  • descriptor (object) – the task configuration
  • descriptor.storage (object) – a object where keys are the file path in the new collab and value are the UUID of the entity to copy at this path.
  • descriptor.collab (object) – id of the collab
  • context (object) – the current task context
  • context.collab (object) – the collab in which entities will be copied
Return object:

created entities where keys are the same as provided in config.storage