Appearance
Activity kanban
Internal
These endpoints are internal to Hailer and not part of the supported public API.
Kanban board views of activities.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.activity.kanban.list | processId: string, options?: { filter?: any, sort?: any, limit?: number } | object |
v3.activity.kanban.load | activityId: string | object |
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):
| Field | Type | Required | Description |
|---|---|---|---|
filter | object | no | See below. |
search | string | no | Default: null. |
limit | integer | no | Default: 20. |
page | integer | no | Default: 1. |
skip | integer | no | Default: 1. |
phase | ObjectId | no | Limits query to one phase only. |
includeUsers | boolean | no | Include available user & field list. Default true Default: true. |
includeTeams | boolean | no | Includes available team & account list. Default true. Default: true. |
filter (object):
| Field | Type | Required | Description |
|---|---|---|---|
user | object | no | See below. |
account | ObjectId | no | |
team | ObjectId | no | |
dates | object | no | See below. |
ballHolder | userId | no | Filter by ball holder userId |
filter.user (object):
| Field | Type | Required | Description |
|---|---|---|---|
uid | ObjectId | yes | |
field | ObjectId | yes |
filter.dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
field | ObjectId | yes | |
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
end | timestamp | yes | Time (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
| Field | Type | Required | Description |
|---|---|---|---|
map | Record<string, object> | no | The 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
| Field | Type | Required | Description |
|---|---|---|---|
activity | object | no | See below. |
process | processId | no | workflowId |
phase | phaseId | no | phaseId (phase in a Workflow) |
activity (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 |
activity.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 |
activity.ballHolder (object):
| Field | Type | Required | Description |
|---|---|---|---|
userId | ObjectId | yes | |
assignedAt | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
assignedBy | ObjectId | yes |
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.