Appearance
Calendar
Calendars and events: create, update and load calendars and events, invites, repeat series, and iCal links.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
calendar.calendar_permission | options | object |
calendar.create_calendar | options | unknown |
calendar.create_event | options | any[] |
calendar.create_own_ical | - | object |
calendar.generate_ical_link | ObjectId | object |
calendar.invite_respond | Event , ObjectId | object[] |
calendar.list_all | options | object |
calendar.list_ical_links | - | object |
calendar.load_calendars | - | any[] |
calendar.load_event | unknown | any | any[] |
calendar.load_events | options | any[] |
calendar.load_repeat_series | ObjectId | object |
calendar.remove_calendar | ObjectId | boolean |
calendar.remove_event | ObjectId, options | HailerResult |
calendar.remove_ical_link | ObjectId, unknown | boolean |
calendar.remove_invite | ObjectId, userId | boolean |
calendar.remove_own_ical | - | boolean |
calendar.save_selected_calendars | unknown | boolean |
calendar.upcoming_events | unknown | any[] |
calendar.update_calendar | options | unknown |
calendar.update_event | options, options | any | Record<string, boolean> |
calendar.calendar_permission
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
calendar_id | ObjectId | yes | calendarId |
cid | WorkspaceId | yes | workspaceId (former networkId) |
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('calendar.calendar_permission', [
{
calendar_id: '507f1f77bcf86cd799439011', // calendarId
cid: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
users | Record<string, boolean> | yes | |
teams | Record<string, object> | yes | ```javascript |
| { teams: { |
[teamId: string]: {
name: string,
users: { [userId: string]: true } } }
See
| `public` | boolean | yes | |
**`teams.*`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | no | Team name |
| `users` | Record<string, boolean> | 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.
## `calendar.create_calendar`
**Description**
::: warning Undocumented
This endpoint has no description in the source yet.
:::
**Parameters**
**Argument 1 (object, required):**
| Field | Type | Required | Description |
|---|---|---|---|
| `color` | string | yes | |
| `desc` | string | no | |
| `name` | string | yes | |
| `timezone` | string | no | Timezone for correctly determining daylight saving times for repeating events One of 597 values, e.g. `Africa/Abidjan`, `Africa/Accra`, `Africa/Addis_Ababa`, `Africa/Algiers`, `Africa/Asmara`. |
**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('calendar.create_calendar', [
{
color: 'string',
name: 'string',
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
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.
calendar.create_event
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
cid | ObjectId | no | |
allDay | boolean | no | |
attendees | Record<string, boolean> | no | |
calendar_id | ObjectId | yes | |
end | number | yes | |
location | string | no | |
notes | string | no | |
repeating | boolean | no | |
repeat | any | no | |
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
title | string | yes |
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('calendar.create_event', [
{
calendar_id: '507f1f77bcf86cd799439011',
end: 0,
start: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
title: 'string',
},
]);
console.log(result);Returns
Array of any.
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.
calendar.create_own_ical
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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('calendar.create_own_ical', []);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
uid | userId | yes | userId |
url | string | yes | |
created | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
personalICal | boolean | no |
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.
calendar.generate_ical_link
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): calendarId
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('calendar.generate_ical_link', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
uid | userId | yes | userId |
cid | WorkspaceId | yes | workspaceId (former networkId) |
url | string | yes | |
calendar | ObjectId | yes | calendarId |
personalICal | boolean | yes | |
created | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
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.
calendar.invite_respond
Description
Change attending status for event
Parameters
Argument 1 (Record<string, boolean>, required): Event { [event: string]: boolean \| null }
Argument 2 (ObjectId, optional): UserId, defaults to userId from current session
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('calendar.invite_respond', [
{
'507f1f77bcf86cd799439012': false, // fieldId: value
},
'507f1f77bcf86cd799439011', // ObjectId
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
result | boolean | yes | |
event | any | no |
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.
calendar.list_all
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
calendar_id | ObjectId | no | calendarId |
cid | WorkspaceId | no | workspaceId (former networkId) |
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('calendar.list_all', [
{
calendar_id: '507f1f77bcf86cd799439011', // calendarId
cid: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
},
]);
console.log(result);Returns
Record<string, any>
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.
calendar.list_ical_links
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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('calendar.list_ical_links', []);
console.log(result);Returns
Record<string, any>
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.
calendar.load_calendars
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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('calendar.load_calendars', []);
console.log(result);Returns
Array of any.
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.
calendar.load_event
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId \| ObjectId[], required):
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('calendar.load_event', [
'507f1f77bcf86cd799439011', // argument 1 (required)
]);
console.log(result);Returns
any \| any[]
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.
calendar.load_events
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
calendars | ObjectId[] | yes | |
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
end | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
user | ObjectId[] | no | |
showUnassigned | boolean | no | |
eventIds | ObjectId[] | no |
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('calendar.load_events', [
{
calendars: ['507f1f77bcf86cd799439011'],
start: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
end: Date.now(), // Time (milliseconds since 1970-01-01 UTC)
},
]);
console.log(result);Returns
Array of any.
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.
calendar.load_repeat_series
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
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('calendar.load_repeat_series', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
Record<string, any>
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.
calendar.remove_calendar
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
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('calendar.remove_calendar', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
boolean
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.
calendar.remove_event
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
repeat_id | ObjectId | no | |
remove | future | all | single | no |
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('calendar.remove_event', [
'507f1f77bcf86cd799439011', // ObjectId (required)
{
repeat_id: '507f1f77bcf86cd799439011',
remove: 'future',
},
]);
console.log(result);Returns
HailerResult
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.
calendar.remove_ical_link
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (string, required):
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('calendar.remove_ical_link', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'string', // argument 2 (required)
]);
console.log(result);Returns
boolean
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.
calendar.remove_invite
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): Event id
Argument 2 (userId, required): User 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('calendar.remove_invite', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'507f1f77bcf86cd799439011', // userId (required)
]);
console.log(result);Returns
boolean
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.
calendar.remove_own_ical
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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('calendar.remove_own_ical', []);
console.log(result);Returns
boolean
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.
calendar.save_selected_calendars
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId[], required):
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('calendar.save_selected_calendars', [
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
boolean
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.
calendar.upcoming_events
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId \| ObjectId[], optional):
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('calendar.upcoming_events', [
'507f1f77bcf86cd799439011', // argument 1
]);
console.log(result);Returns
Array of any.
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.
calendar.update_calendar
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
name | string | yes | |
description | string | no | |
color | string | yes | |
timezone | string | no | One of 597 values, e.g. Africa/Abidjan, Africa/Accra, Africa/Addis_Ababa, Africa/Algiers, Africa/Asmara. |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
allowGuests | boolean | no |
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('calendar.update_calendar', [
{
_id: '507f1f77bcf86cd799439011',
name: 'string',
color: 'string',
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
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.
calendar.update_event
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
allDay | boolean | no | |
attendees | Record<string, boolean> | no | |
calendar_id | ObjectId | yes | |
end | number | timestamp | yes | |
location | string | no | |
notes | string | no | |
repeat_id | ObjectId | no | |
start | number | timestamp | yes | |
title | string | yes | |
cid | ObjectId | no |
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
repeat_id | ObjectId | no | |
update | future | all | single | no |
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('calendar.update_event', [
{
_id: '507f1f77bcf86cd799439011',
calendar_id: '507f1f77bcf86cd799439011',
end: 0,
start: 0,
title: 'string',
},
{
repeat_id: '507f1f77bcf86cd799439011',
update: 'future',
},
]);
console.log(result);Returns
any \| Record<string, boolean>
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.