Skip to content

Activity kanban ​

Internal

These endpoints are internal to Hailer and not part of the supported public API.

Kanban board views of activities.

Endpoints ​

EndpointArgumentsReturns
v3.activity.kanban.listprocessId: string, options?: { filter?: any, sort?: any, limit?: number }object
v3.activity.kanban.loadactivityId: stringobject

v3.activity.kanban.list ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (processId, required): workflowId

Argument 2 (object, optional):

FieldTypeRequiredDescription
filterobjectnoSee below.
searchstringnoDefault: null.
limitintegernoDefault: 20.
pageintegernoDefault: 1.
skipintegernoDefault: 1.
phaseObjectIdnoLimits query to one phase only.
includeUsersbooleannoInclude available user & field list. Default true Default: true.
includeTeamsbooleannoIncludes available team & account list. Default true. Default: true.

filter (object):

FieldTypeRequiredDescription
userobjectnoSee below.
accountObjectIdno
teamObjectIdno
datesobjectnoSee below.
ballHolderuserIdnoFilter by ball holder userId

filter.user (object):

FieldTypeRequiredDescription
uidObjectIdyes
fieldObjectIdyes

filter.dates (object):

FieldTypeRequiredDescription
fieldObjectIdyes
starttimestampyesTime (milliseconds since 1970-01-01 UTC)
endtimestampyesTime (milliseconds since 1970-01-01 UTC)

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.activity.kanban.list', [
  '507f1f77bcf86cd799439011', // processId (required)
  {
    filter: {
      user: { /* ... */ },
      account: '507f1f77bcf86cd799439011',
    },
    search: 'string',
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
mapRecord<string, object>noThe map contains phases grouped by phaseId containing activities and meta for phase
typescript
map: { [phaseId: string]: {
  activities: {
    _id: validObjectId.required(),
    followers: Joi.array().items(Joi.string().hex().length(24)),
    name: Joi.string(),
    fields: ,
    files: Joi.array().items(validObjectId),
    primaryDateField: JoiDate,
    priority: Joi.number(),
  }[]
  meta: {
    count: number,
    totalPrimaryNumericValue: number,
    primaryNumericFieldUnit: string \| null
  }
}
``` See below. |
| `meta` | object | no | See below. |

**`map.*`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `activities` | object[] | no | See below. |
| `meta` | object | no | See below. |

**`map.*.activities[]`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `_id` | ObjectId | yes |  |
| `followers` | ObjectId[] | no |  |
| `name` | string | no |  |
| `fields` | Record<string, object> | no | Fields of activity, format of items is dependent on the configuration of the process given in `process` field. See below. |
| `files` | ObjectId[] | no |  |
| `primaryDateField` | date | no | Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC) |
| `priority` | number | no |  |
| `linkedFromCount` | number | no |  |
| `ballHolder` | object | no | See below. |
| `discussion` | discussionId | no | discussionId |

**`map.*.activities[].fields.*`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | yes | One of: `activitylink`, `country`, `date`, `daterange`, `datetime`, `datetimerange`, `numeric`, `numericunit`, `teams`, `text`, `textarea`, `textunit`, `textpredefinedoptions`, `time`, `timerange`, `users`, `linkedfrom`, `subheader`. |
| `value` | any | no |  |

**`map.*.activities[].ballHolder`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `userId` | ObjectId | yes |  |
| `assignedAt` | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
| `assignedBy` | ObjectId | yes |  |

**`map.*.meta`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `_id` | string | no |  |
| `count` | number | yes |  |
| `totalPrimaryNumericValue` | number | no |  |
| `primaryNumericFieldUnit` | string | no |  |

**`meta`** (object):

| Field | Type | Required | Description |
|---|---|---|---|
| `users` | Record<string, ObjectId[]> | no | `[fieldId string]: userId[]` |
| `teams` | Record<string, number> | no | `[teamId: string]: accountId[]` |

**Auth:** requires an authenticated session.

**Errors:** on failure returns the standard Hailer error object `{ code, msg, details?, retryAfter?, debug? }`. `retryAfter` is a delay in milliseconds.

## `v3.activity.kanban.load`

**Description**

::: warning Undocumented
This endpoint has no description in the source yet.
:::

**Parameters**

**Argument 1 (`ObjectId`, required):** Activity id

**Example**

```javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.activity.kanban.load', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

FieldTypeRequiredDescription
activityobjectnoSee below.
processprocessIdnoworkflowId
phasephaseIdnophaseId (phase in a Workflow)

activity (object):

FieldTypeRequiredDescription
_idObjectIdyes
followersObjectId[]no
namestringno
fieldsRecord<string, object>noFields of activity, format of items is dependent on the configuration of the process given in process field. See below.
filesObjectId[]no
primaryDateFielddatenoDate (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC)
prioritynumberno
linkedFromCountnumberno
ballHolderobjectnoSee below.
discussiondiscussionIdnodiscussionId

activity.fields.* (object):

FieldTypeRequiredDescription
typestringyesOne of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader.
valueanyno

activity.ballHolder (object):

FieldTypeRequiredDescription
userIdObjectIdyes
assignedAttimestampyesTime (milliseconds since 1970-01-01 UTC)
assignedByObjectIdyes

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

Hailer Developer Documentation · v1.8.0