@epilot/sdk 2.16.0 → 2.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/calendar-runtime.json +1 -1
- package/definitions/calendar.json +2346 -131
- package/definitions/entity.json +22 -1
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +8 -8
- package/dist/apis/calendar.d.cts +2 -2
- package/dist/apis/calendar.d.ts +2 -2
- package/dist/apis/calendar.js +2 -2
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.d.cts +2 -2
- package/dist/apis/entity.d.ts +2 -2
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/calendar-GJ7UX6PX.cjs +7 -0
- package/dist/calendar-W42TSLFV.js +7 -0
- package/dist/{calendar-runtime-6CMMEQMG.js → calendar-runtime-KZPDEYT7.js} +1 -1
- package/dist/{calendar-runtime-G4SN5PDY.cjs → calendar-runtime-WMR6GL6I.cjs} +2 -2
- package/dist/calendar.d-Cinz1Vzo.d.cts +2357 -0
- package/dist/calendar.d-Cinz1Vzo.d.ts +2357 -0
- package/dist/chunk-HBJJOW2M.cjs +14 -0
- package/dist/{chunk-UCCKYJMU.js → chunk-MK6ZFMSY.js} +3 -3
- package/dist/{chunk-X3MPAK4C.cjs → chunk-NBEPUBSZ.cjs} +3 -3
- package/dist/chunk-QEAIJQTE.js +14 -0
- package/dist/entity-IZHQB3JX.js +7 -0
- package/dist/entity-MYDUQBEE.cjs +7 -0
- package/dist/{entity.d-CmQvgvyi.d.cts → entity.d-CaFNmDfj.d.cts} +33 -3
- package/dist/{entity.d-CmQvgvyi.d.ts → entity.d-CaFNmDfj.d.ts} +33 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/docs/calendar.md +1329 -9
- package/docs/entity.md +35 -0
- package/package.json +11 -12
- package/dist/calendar-2YDAYG7S.cjs +0 -7
- package/dist/calendar-ACFIHQ2N.js +0 -7
- package/dist/calendar.d-BEjLDagH.d.cts +0 -353
- package/dist/calendar.d-BEjLDagH.d.ts +0 -353
- package/dist/chunk-CKLEBO4K.cjs +0 -14
- package/dist/chunk-JNH37UUH.js +0 -14
- package/dist/entity-K5HYURU7.js +0 -7
- package/dist/entity-V5375UNT.cjs +0 -7
package/docs/calendar.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { epilot } from '@epilot/sdk'
|
|
10
10
|
|
|
11
11
|
epilot.authorize(() => '<token>')
|
|
12
|
-
const { data } = await epilot.calendar.
|
|
12
|
+
const { data } = await epilot.calendar.listUsersAbsence(...)
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Tree-shakeable import
|
|
@@ -19,24 +19,69 @@ import { getClient, authorize } from '@epilot/sdk/calendar'
|
|
|
19
19
|
|
|
20
20
|
const calendarClient = getClient()
|
|
21
21
|
authorize(calendarClient, () => '<token>')
|
|
22
|
-
const { data } = await calendarClient.
|
|
22
|
+
const { data } = await calendarClient.listUsersAbsence(...)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Operations
|
|
26
26
|
|
|
27
|
+
**Absence**
|
|
28
|
+
- [`listUsersAbsence`](#listusersabsence)
|
|
29
|
+
- [`searchAbsence`](#searchabsence)
|
|
30
|
+
- [`searchNowAbsence`](#searchnowabsence)
|
|
31
|
+
- [`listAbsenceAdjustments`](#listabsenceadjustments)
|
|
32
|
+
- [`createAbsenceAdjustment`](#createabsenceadjustment)
|
|
33
|
+
- [`getAbsenceAdjustment`](#getabsenceadjustment)
|
|
34
|
+
- [`patchAbsenceAdjustment`](#patchabsenceadjustment)
|
|
35
|
+
- [`deleteAbsenceAdjustment`](#deleteabsenceadjustment)
|
|
36
|
+
- [`getUserAbsence`](#getuserabsence)
|
|
37
|
+
|
|
38
|
+
**Working Hours**
|
|
39
|
+
- [`getWorkingHours`](#getworkinghours)
|
|
40
|
+
- [`putWorkingHours`](#putworkinghours)
|
|
41
|
+
- [`deleteWorkingHours`](#deleteworkinghours)
|
|
42
|
+
|
|
27
43
|
**Calendars**
|
|
28
44
|
- [`listCalendars`](#listcalendars)
|
|
45
|
+
- [`createCalendar`](#createcalendar)
|
|
46
|
+
- [`addOutlookCalendar`](#addoutlookcalendar)
|
|
47
|
+
- [`listOutlookCalendars`](#listoutlookcalendars)
|
|
48
|
+
- [`deleteOutlookCalendar`](#deleteoutlookcalendar)
|
|
49
|
+
- [`outlookWebhook`](#outlookwebhook)
|
|
29
50
|
- [`getCalendar`](#getcalendar)
|
|
51
|
+
- [`updateCalendar`](#updatecalendar)
|
|
52
|
+
- [`deleteCalendar`](#deletecalendar)
|
|
30
53
|
|
|
31
|
-
**Events**
|
|
54
|
+
**Calendar Events**
|
|
32
55
|
- [`listEvents`](#listevents)
|
|
56
|
+
- [`createEvent`](#createevent)
|
|
33
57
|
- [`getEvent`](#getevent)
|
|
58
|
+
- [`updateEvent`](#updateevent)
|
|
59
|
+
- [`deleteEvent`](#deleteevent)
|
|
60
|
+
- [`shareEvent`](#shareevent)
|
|
61
|
+
- [`unshareEvent`](#unshareevent)
|
|
34
62
|
|
|
35
63
|
**Schemas**
|
|
64
|
+
- [`AbsenceInterval`](#absenceinterval)
|
|
65
|
+
- [`AbsenceIntervalSource`](#absenceintervalsource)
|
|
66
|
+
- [`Error`](#error)
|
|
67
|
+
- [`SearchAbsenceBody`](#searchabsencebody)
|
|
68
|
+
- [`SearchNowAbsenceBody`](#searchnowabsencebody)
|
|
69
|
+
- [`AbsenceAdjustment`](#absenceadjustment)
|
|
70
|
+
- [`AbsenceStatus`](#absencestatus)
|
|
71
|
+
- [`AbsenceType`](#absencetype)
|
|
72
|
+
- [`CreateAbsenceAdjustmentBody`](#createabsenceadjustmentbody)
|
|
73
|
+
- [`PatchAbsenceAdjustmentBody`](#patchabsenceadjustmentbody)
|
|
74
|
+
- [`ExternalCalendar`](#externalcalendar)
|
|
75
|
+
- [`WorkingHours`](#workinghours)
|
|
76
|
+
- [`UpsertWorkingHoursBody`](#upsertworkinghoursbody)
|
|
77
|
+
- [`TimeWindow`](#timewindow)
|
|
36
78
|
- [`Calendar`](#calendar)
|
|
37
79
|
- [`CalendarSource`](#calendarsource)
|
|
38
80
|
- [`Provider`](#provider)
|
|
39
|
-
- [`
|
|
81
|
+
- [`CalendarCreateBody`](#calendarcreatebody)
|
|
82
|
+
- [`AddOutlookCalendarRequest`](#addoutlookcalendarrequest)
|
|
83
|
+
- [`AvailableOutlookCalendar`](#availableoutlookcalendar)
|
|
84
|
+
- [`CalendarPatchBody`](#calendarpatchbody)
|
|
40
85
|
- [`CalendarEvent`](#calendarevent)
|
|
41
86
|
- [`EventType`](#eventtype)
|
|
42
87
|
- [`EventStatus`](#eventstatus)
|
|
@@ -45,6 +90,569 @@ const { data } = await calendarClient.listCalendars(...)
|
|
|
45
90
|
- [`ResponseStatus`](#responsestatus)
|
|
46
91
|
- [`Attendee`](#attendee)
|
|
47
92
|
- [`EventSource`](#eventsource)
|
|
93
|
+
- [`CalendarEventCreateBody`](#calendareventcreatebody)
|
|
94
|
+
- [`CalendarEventPatchBody`](#calendareventpatchbody)
|
|
95
|
+
- [`ShareEventBody`](#shareeventbody)
|
|
96
|
+
|
|
97
|
+
### `listUsersAbsence`
|
|
98
|
+
|
|
99
|
+
List organization users with known absence metadata in the requested time window.
|
|
100
|
+
|
|
101
|
+
`GET /v1/calendar/absence/users`
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
const { data } = await client.listUsersAbsence({
|
|
105
|
+
from: 'example',
|
|
106
|
+
to: 'example',
|
|
107
|
+
include_busy: true,
|
|
108
|
+
working_hours_granularity: 'example',
|
|
109
|
+
query: 'example',
|
|
110
|
+
limit: 1,
|
|
111
|
+
offset: 1,
|
|
112
|
+
})
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary>Response</summary>
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
121
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
122
|
+
"hits": 0,
|
|
123
|
+
"results": [
|
|
124
|
+
{
|
|
125
|
+
"absent": true,
|
|
126
|
+
"absence_intervals": [
|
|
127
|
+
{
|
|
128
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
129
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
130
|
+
"original_from": "1970-01-01T00:00:00.000Z",
|
|
131
|
+
"original_to": "1970-01-01T00:00:00.000Z",
|
|
132
|
+
"absent": true,
|
|
133
|
+
"source": "calendar_event",
|
|
134
|
+
"calendar_event_id": "string",
|
|
135
|
+
"absence_adjustment_id": "string",
|
|
136
|
+
"reason": "string"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"user_id": "string",
|
|
140
|
+
"display_name": "string",
|
|
141
|
+
"email": "user@example.com",
|
|
142
|
+
"status": "string"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### `searchAbsence`
|
|
153
|
+
|
|
154
|
+
Search known absence for candidate users in the requested time window.
|
|
155
|
+
|
|
156
|
+
`POST /v1/calendar/absence:search`
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
const { data } = await client.searchAbsence(
|
|
160
|
+
null,
|
|
161
|
+
{
|
|
162
|
+
from: '1970-01-01T00:00:00.000Z',
|
|
163
|
+
to: '1970-01-01T00:00:00.000Z',
|
|
164
|
+
user_ids: ['string'],
|
|
165
|
+
include_busy: false,
|
|
166
|
+
working_hours_granularity: 'time'
|
|
167
|
+
},
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
<details>
|
|
172
|
+
<summary>Response</summary>
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
177
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
178
|
+
"users": {}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
</details>
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### `searchNowAbsence`
|
|
187
|
+
|
|
188
|
+
Search known absence for candidate users at the current server time.
|
|
189
|
+
|
|
190
|
+
`POST /v1/calendar/absence:search-now`
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
const { data } = await client.searchNowAbsence(
|
|
194
|
+
null,
|
|
195
|
+
{
|
|
196
|
+
user_ids: ['string'],
|
|
197
|
+
include_busy: false,
|
|
198
|
+
working_hours_granularity: 'time'
|
|
199
|
+
},
|
|
200
|
+
)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
<details>
|
|
204
|
+
<summary>Response</summary>
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
209
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
210
|
+
"users": {}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
</details>
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### `listAbsenceAdjustments`
|
|
219
|
+
|
|
220
|
+
List absence adjustments for a user in a time window.
|
|
221
|
+
|
|
222
|
+
`GET /v1/calendar/absence/users/{user_id}/adjustments`
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
const { data } = await client.listAbsenceAdjustments({
|
|
226
|
+
user_id: 'example',
|
|
227
|
+
from: 'example',
|
|
228
|
+
to: 'example',
|
|
229
|
+
})
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
<details>
|
|
233
|
+
<summary>Response</summary>
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
238
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
239
|
+
"results": [
|
|
240
|
+
{
|
|
241
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
242
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
243
|
+
"absent": true,
|
|
244
|
+
"status": "oof",
|
|
245
|
+
"type": "string",
|
|
246
|
+
"reason": "string",
|
|
247
|
+
"adjustment_id": "string",
|
|
248
|
+
"user_id": "string",
|
|
249
|
+
"created_by": "string",
|
|
250
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
251
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
</details>
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
### `createAbsenceAdjustment`
|
|
262
|
+
|
|
263
|
+
Create a time-bound absence adjustment for a user in the caller organization.
|
|
264
|
+
|
|
265
|
+
`POST /v1/calendar/absence/users/{user_id}/adjustments`
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
const { data } = await client.createAbsenceAdjustment(
|
|
269
|
+
{
|
|
270
|
+
user_id: 'example',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
from: '1970-01-01T00:00:00.000Z',
|
|
274
|
+
to: '1970-01-01T00:00:00.000Z',
|
|
275
|
+
absent: true,
|
|
276
|
+
status: 'oof',
|
|
277
|
+
type: 'string',
|
|
278
|
+
reason: 'string'
|
|
279
|
+
},
|
|
280
|
+
)
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
<details>
|
|
284
|
+
<summary>Response</summary>
|
|
285
|
+
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
289
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
290
|
+
"absent": true,
|
|
291
|
+
"status": "oof",
|
|
292
|
+
"type": "string",
|
|
293
|
+
"reason": "string",
|
|
294
|
+
"adjustment_id": "string",
|
|
295
|
+
"user_id": "string",
|
|
296
|
+
"created_by": "string",
|
|
297
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
298
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
</details>
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
### `getAbsenceAdjustment`
|
|
307
|
+
|
|
308
|
+
Get an absence adjustment by ID.
|
|
309
|
+
|
|
310
|
+
`GET /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
const { data } = await client.getAbsenceAdjustment({
|
|
314
|
+
user_id: 'example',
|
|
315
|
+
adjustment_id: 'example',
|
|
316
|
+
})
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
<details>
|
|
320
|
+
<summary>Response</summary>
|
|
321
|
+
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
325
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
326
|
+
"absent": true,
|
|
327
|
+
"status": "oof",
|
|
328
|
+
"type": "string",
|
|
329
|
+
"reason": "string",
|
|
330
|
+
"adjustment_id": "string",
|
|
331
|
+
"user_id": "string",
|
|
332
|
+
"created_by": "string",
|
|
333
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
334
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
</details>
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### `patchAbsenceAdjustment`
|
|
343
|
+
|
|
344
|
+
Update an absence adjustment in the caller organization.
|
|
345
|
+
|
|
346
|
+
`PATCH /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
const { data } = await client.patchAbsenceAdjustment(
|
|
350
|
+
{
|
|
351
|
+
user_id: 'example',
|
|
352
|
+
adjustment_id: 'example',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
from: '1970-01-01T00:00:00.000Z',
|
|
356
|
+
to: '1970-01-01T00:00:00.000Z',
|
|
357
|
+
absent: true,
|
|
358
|
+
status: 'oof',
|
|
359
|
+
type: 'string',
|
|
360
|
+
reason: 'string'
|
|
361
|
+
},
|
|
362
|
+
)
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
<details>
|
|
366
|
+
<summary>Response</summary>
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
371
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
372
|
+
"absent": true,
|
|
373
|
+
"status": "oof",
|
|
374
|
+
"type": "string",
|
|
375
|
+
"reason": "string",
|
|
376
|
+
"adjustment_id": "string",
|
|
377
|
+
"user_id": "string",
|
|
378
|
+
"created_by": "string",
|
|
379
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
380
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
</details>
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
### `deleteAbsenceAdjustment`
|
|
389
|
+
|
|
390
|
+
Delete an absence adjustment.
|
|
391
|
+
|
|
392
|
+
`DELETE /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
|
|
393
|
+
|
|
394
|
+
```ts
|
|
395
|
+
const { data } = await client.deleteAbsenceAdjustment({
|
|
396
|
+
user_id: 'example',
|
|
397
|
+
adjustment_id: 'example',
|
|
398
|
+
})
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
### `getUserAbsence`
|
|
404
|
+
|
|
405
|
+
Get known absence for a user in a time window. absent=false means no known absence, not guaranteed availability.
|
|
406
|
+
|
|
407
|
+
`GET /v1/calendar/absence/users/{user_id}`
|
|
408
|
+
|
|
409
|
+
```ts
|
|
410
|
+
const { data } = await client.getUserAbsence({
|
|
411
|
+
user_id: 'example',
|
|
412
|
+
from: 'example',
|
|
413
|
+
to: 'example',
|
|
414
|
+
include_busy: true,
|
|
415
|
+
working_hours_granularity: 'example',
|
|
416
|
+
})
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
<details>
|
|
420
|
+
<summary>Response</summary>
|
|
421
|
+
|
|
422
|
+
```json
|
|
423
|
+
{
|
|
424
|
+
"absent": true,
|
|
425
|
+
"absence_intervals": [
|
|
426
|
+
{
|
|
427
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
428
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
429
|
+
"original_from": "1970-01-01T00:00:00.000Z",
|
|
430
|
+
"original_to": "1970-01-01T00:00:00.000Z",
|
|
431
|
+
"absent": true,
|
|
432
|
+
"source": "calendar_event",
|
|
433
|
+
"calendar_event_id": "string",
|
|
434
|
+
"absence_adjustment_id": "string",
|
|
435
|
+
"reason": "string"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"from": "1970-01-01T00:00:00.000Z",
|
|
439
|
+
"to": "1970-01-01T00:00:00.000Z",
|
|
440
|
+
"user_id": "string",
|
|
441
|
+
"external_calendars": [
|
|
442
|
+
{
|
|
443
|
+
"provider": "outlook",
|
|
444
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z"
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
</details>
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### `getWorkingHours`
|
|
455
|
+
|
|
456
|
+
Get the recurring weekly working hours of a user. 404 means no record exists and the user is treated as always available.
|
|
457
|
+
|
|
458
|
+
`GET /v1/calendar/working-hours/users/{user_id}`
|
|
459
|
+
|
|
460
|
+
```ts
|
|
461
|
+
const { data } = await client.getWorkingHours({
|
|
462
|
+
user_id: 'example',
|
|
463
|
+
})
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
<details>
|
|
467
|
+
<summary>Response</summary>
|
|
468
|
+
|
|
469
|
+
```json
|
|
470
|
+
{
|
|
471
|
+
"monday": [
|
|
472
|
+
{
|
|
473
|
+
"start": "string",
|
|
474
|
+
"end": "string"
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
"tuesday": [
|
|
478
|
+
{
|
|
479
|
+
"start": "string",
|
|
480
|
+
"end": "string"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"wednesday": [
|
|
484
|
+
{
|
|
485
|
+
"start": "string",
|
|
486
|
+
"end": "string"
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"thursday": [
|
|
490
|
+
{
|
|
491
|
+
"start": "string",
|
|
492
|
+
"end": "string"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"friday": [
|
|
496
|
+
{
|
|
497
|
+
"start": "string",
|
|
498
|
+
"end": "string"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"saturday": [
|
|
502
|
+
{
|
|
503
|
+
"start": "string",
|
|
504
|
+
"end": "string"
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"sunday": [
|
|
508
|
+
{
|
|
509
|
+
"start": "string",
|
|
510
|
+
"end": "string"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"timezone": "string",
|
|
514
|
+
"user_id": "string",
|
|
515
|
+
"updated_by": "string",
|
|
516
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
517
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
</details>
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
### `putWorkingHours`
|
|
526
|
+
|
|
527
|
+
Create or fully replace the working hours of a user in the caller organization. This is a full replace, not a merge.
|
|
528
|
+
|
|
529
|
+
`PUT /v1/calendar/working-hours/users/{user_id}`
|
|
530
|
+
|
|
531
|
+
```ts
|
|
532
|
+
const { data } = await client.putWorkingHours(
|
|
533
|
+
{
|
|
534
|
+
user_id: 'example',
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
monday: [
|
|
538
|
+
{
|
|
539
|
+
start: 'string',
|
|
540
|
+
end: 'string'
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
tuesday: [
|
|
544
|
+
{
|
|
545
|
+
start: 'string',
|
|
546
|
+
end: 'string'
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
wednesday: [
|
|
550
|
+
{
|
|
551
|
+
start: 'string',
|
|
552
|
+
end: 'string'
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
thursday: [
|
|
556
|
+
{
|
|
557
|
+
start: 'string',
|
|
558
|
+
end: 'string'
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
friday: [
|
|
562
|
+
{
|
|
563
|
+
start: 'string',
|
|
564
|
+
end: 'string'
|
|
565
|
+
}
|
|
566
|
+
],
|
|
567
|
+
saturday: [
|
|
568
|
+
{
|
|
569
|
+
start: 'string',
|
|
570
|
+
end: 'string'
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
sunday: [
|
|
574
|
+
{
|
|
575
|
+
start: 'string',
|
|
576
|
+
end: 'string'
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
timezone: 'Europe/Berlin'
|
|
580
|
+
},
|
|
581
|
+
)
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
<details>
|
|
585
|
+
<summary>Response</summary>
|
|
586
|
+
|
|
587
|
+
```json
|
|
588
|
+
{
|
|
589
|
+
"monday": [
|
|
590
|
+
{
|
|
591
|
+
"start": "string",
|
|
592
|
+
"end": "string"
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"tuesday": [
|
|
596
|
+
{
|
|
597
|
+
"start": "string",
|
|
598
|
+
"end": "string"
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"wednesday": [
|
|
602
|
+
{
|
|
603
|
+
"start": "string",
|
|
604
|
+
"end": "string"
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
"thursday": [
|
|
608
|
+
{
|
|
609
|
+
"start": "string",
|
|
610
|
+
"end": "string"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"friday": [
|
|
614
|
+
{
|
|
615
|
+
"start": "string",
|
|
616
|
+
"end": "string"
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
"saturday": [
|
|
620
|
+
{
|
|
621
|
+
"start": "string",
|
|
622
|
+
"end": "string"
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"sunday": [
|
|
626
|
+
{
|
|
627
|
+
"start": "string",
|
|
628
|
+
"end": "string"
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
"timezone": "string",
|
|
632
|
+
"user_id": "string",
|
|
633
|
+
"updated_by": "string",
|
|
634
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
635
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
636
|
+
}
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
</details>
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
### `deleteWorkingHours`
|
|
644
|
+
|
|
645
|
+
Delete the working hours of a user. The user is then treated as always available again.
|
|
646
|
+
|
|
647
|
+
`DELETE /v1/calendar/working-hours/users/{user_id}`
|
|
648
|
+
|
|
649
|
+
```ts
|
|
650
|
+
const { data } = await client.deleteWorkingHours({
|
|
651
|
+
user_id: 'example',
|
|
652
|
+
})
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
---
|
|
48
656
|
|
|
49
657
|
### `listCalendars`
|
|
50
658
|
|
|
@@ -94,6 +702,161 @@ const { data } = await client.listCalendars({
|
|
|
94
702
|
|
|
95
703
|
---
|
|
96
704
|
|
|
705
|
+
### `createCalendar`
|
|
706
|
+
|
|
707
|
+
Create a native epilot calendar.
|
|
708
|
+
|
|
709
|
+
`POST /v1/calendar`
|
|
710
|
+
|
|
711
|
+
```ts
|
|
712
|
+
const { data } = await client.createCalendar(
|
|
713
|
+
null,
|
|
714
|
+
{
|
|
715
|
+
name: 'string',
|
|
716
|
+
description: 'string',
|
|
717
|
+
color: 'string'
|
|
718
|
+
},
|
|
719
|
+
)
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
<details>
|
|
723
|
+
<summary>Response</summary>
|
|
724
|
+
|
|
725
|
+
```json
|
|
726
|
+
{
|
|
727
|
+
"_id": "string",
|
|
728
|
+
"_schema": "calendar",
|
|
729
|
+
"_org": "string",
|
|
730
|
+
"_title": "string",
|
|
731
|
+
"name": "string",
|
|
732
|
+
"description": "string",
|
|
733
|
+
"color": "string",
|
|
734
|
+
"is_default": true,
|
|
735
|
+
"read_only": true,
|
|
736
|
+
"owner_email": "user@example.com",
|
|
737
|
+
"source": {
|
|
738
|
+
"type": "native",
|
|
739
|
+
"provider": "outlook",
|
|
740
|
+
"provider_calendar_id": "string",
|
|
741
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z"
|
|
742
|
+
},
|
|
743
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
744
|
+
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
</details>
|
|
749
|
+
|
|
750
|
+
---
|
|
751
|
+
|
|
752
|
+
### `addOutlookCalendar`
|
|
753
|
+
|
|
754
|
+
Registers one of the caller's Outlook calendars as an epilot calendar.
|
|
755
|
+
|
|
756
|
+
`POST /v1/calendar/sources/outlook`
|
|
757
|
+
|
|
758
|
+
```ts
|
|
759
|
+
const { data } = await client.addOutlookCalendar(
|
|
760
|
+
null,
|
|
761
|
+
{
|
|
762
|
+
provider_calendar_id: 'string',
|
|
763
|
+
name: 'string'
|
|
764
|
+
},
|
|
765
|
+
)
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
<details>
|
|
769
|
+
<summary>Response</summary>
|
|
770
|
+
|
|
771
|
+
```json
|
|
772
|
+
{
|
|
773
|
+
"_id": "string",
|
|
774
|
+
"_schema": "calendar",
|
|
775
|
+
"_org": "string",
|
|
776
|
+
"_title": "string",
|
|
777
|
+
"name": "string",
|
|
778
|
+
"description": "string",
|
|
779
|
+
"color": "string",
|
|
780
|
+
"is_default": true,
|
|
781
|
+
"read_only": true,
|
|
782
|
+
"owner_email": "user@example.com",
|
|
783
|
+
"source": {
|
|
784
|
+
"type": "native",
|
|
785
|
+
"provider": "outlook",
|
|
786
|
+
"provider_calendar_id": "string",
|
|
787
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z"
|
|
788
|
+
},
|
|
789
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
790
|
+
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
791
|
+
}
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
</details>
|
|
795
|
+
|
|
796
|
+
---
|
|
797
|
+
|
|
798
|
+
### `listOutlookCalendars`
|
|
799
|
+
|
|
800
|
+
Lists the calling user's Outlook calendars available to import as epilot calendars.
|
|
801
|
+
|
|
802
|
+
`GET /v1/calendar/sources/outlook/available`
|
|
803
|
+
|
|
804
|
+
```ts
|
|
805
|
+
const { data } = await client.listOutlookCalendars()
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
<details>
|
|
809
|
+
<summary>Response</summary>
|
|
810
|
+
|
|
811
|
+
```json
|
|
812
|
+
{
|
|
813
|
+
"calendars": [
|
|
814
|
+
{
|
|
815
|
+
"provider_calendar_id": "string",
|
|
816
|
+
"name": "string",
|
|
817
|
+
"color": "string",
|
|
818
|
+
"is_default": true,
|
|
819
|
+
"can_edit": true,
|
|
820
|
+
"owner": "string"
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
</details>
|
|
827
|
+
|
|
828
|
+
---
|
|
829
|
+
|
|
830
|
+
### `deleteOutlookCalendar`
|
|
831
|
+
|
|
832
|
+
Disconnects a previously registered Outlook calendar.
|
|
833
|
+
|
|
834
|
+
`DELETE /v1/calendar/sources/outlook/{calendar_id}`
|
|
835
|
+
|
|
836
|
+
```ts
|
|
837
|
+
const { data } = await client.deleteOutlookCalendar({
|
|
838
|
+
calendar_id: 'example',
|
|
839
|
+
})
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
### `outlookWebhook`
|
|
845
|
+
|
|
846
|
+
Public Microsoft Graph webhook receiver for per-user Outlook calendar
|
|
847
|
+
subscriptions. Unauthenticated by design (API Gateway `Authorizer: NONE`):
|
|
848
|
+
Graph calls it with no epilot token.
|
|
849
|
+
|
|
850
|
+
`POST /v1/calendar/outlook/webhook`
|
|
851
|
+
|
|
852
|
+
```ts
|
|
853
|
+
const { data } = await client.outlookWebhook({
|
|
854
|
+
validationToken: 'example',
|
|
855
|
+
})
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
---
|
|
859
|
+
|
|
97
860
|
### `getCalendar`
|
|
98
861
|
|
|
99
862
|
Get a single calendar by its epilot ID.
|
|
@@ -136,6 +899,69 @@ const { data } = await client.getCalendar({
|
|
|
136
899
|
|
|
137
900
|
---
|
|
138
901
|
|
|
902
|
+
### `updateCalendar`
|
|
903
|
+
|
|
904
|
+
Update fields on a calendar.
|
|
905
|
+
|
|
906
|
+
`PATCH /v1/calendar/{calendar_id}`
|
|
907
|
+
|
|
908
|
+
```ts
|
|
909
|
+
const { data } = await client.updateCalendar(
|
|
910
|
+
{
|
|
911
|
+
calendar_id: 'example',
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: 'string',
|
|
915
|
+
description: 'string',
|
|
916
|
+
color: 'string'
|
|
917
|
+
},
|
|
918
|
+
)
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
<details>
|
|
922
|
+
<summary>Response</summary>
|
|
923
|
+
|
|
924
|
+
```json
|
|
925
|
+
{
|
|
926
|
+
"_id": "string",
|
|
927
|
+
"_schema": "calendar",
|
|
928
|
+
"_org": "string",
|
|
929
|
+
"_title": "string",
|
|
930
|
+
"name": "string",
|
|
931
|
+
"description": "string",
|
|
932
|
+
"color": "string",
|
|
933
|
+
"is_default": true,
|
|
934
|
+
"read_only": true,
|
|
935
|
+
"owner_email": "user@example.com",
|
|
936
|
+
"source": {
|
|
937
|
+
"type": "native",
|
|
938
|
+
"provider": "outlook",
|
|
939
|
+
"provider_calendar_id": "string",
|
|
940
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z"
|
|
941
|
+
},
|
|
942
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
943
|
+
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
944
|
+
}
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
</details>
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
### `deleteCalendar`
|
|
952
|
+
|
|
953
|
+
Delete a native epilot calendar and its events.
|
|
954
|
+
|
|
955
|
+
`DELETE /v1/calendar/{calendar_id}`
|
|
956
|
+
|
|
957
|
+
```ts
|
|
958
|
+
const { data } = await client.deleteCalendar({
|
|
959
|
+
calendar_id: 'example',
|
|
960
|
+
})
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
---
|
|
964
|
+
|
|
139
965
|
### `listEvents`
|
|
140
966
|
|
|
141
967
|
List events in a time window. Recurring events are returned as expanded occurrences – each instance appears as its own event.
|
|
@@ -204,7 +1030,86 @@ const { data } = await client.listEvents({
|
|
|
204
1030
|
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
205
1031
|
}
|
|
206
1032
|
],
|
|
207
|
-
"next_cursor": "string"
|
|
1033
|
+
"next_cursor": "string"
|
|
1034
|
+
}
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
</details>
|
|
1038
|
+
|
|
1039
|
+
---
|
|
1040
|
+
|
|
1041
|
+
### `createEvent`
|
|
1042
|
+
|
|
1043
|
+
Create a native epilot calendar event.
|
|
1044
|
+
|
|
1045
|
+
`POST /v1/calendar/events`
|
|
1046
|
+
|
|
1047
|
+
```ts
|
|
1048
|
+
const { data } = await client.createEvent(
|
|
1049
|
+
null,
|
|
1050
|
+
{
|
|
1051
|
+
calendar_id: 'string',
|
|
1052
|
+
description: 'string',
|
|
1053
|
+
start_time: '1970-01-01T00:00:00.000Z',
|
|
1054
|
+
end_time: '1970-01-01T00:00:00.000Z',
|
|
1055
|
+
timezone: 'string',
|
|
1056
|
+
is_all_day: true,
|
|
1057
|
+
location: 'string',
|
|
1058
|
+
status: 'free',
|
|
1059
|
+
sensitivity: 'normal',
|
|
1060
|
+
_title: 'string'
|
|
1061
|
+
},
|
|
1062
|
+
)
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
<details>
|
|
1066
|
+
<summary>Response</summary>
|
|
1067
|
+
|
|
1068
|
+
```json
|
|
1069
|
+
{
|
|
1070
|
+
"_id": "string",
|
|
1071
|
+
"_schema": "calendar_event",
|
|
1072
|
+
"_org": "string",
|
|
1073
|
+
"_title": "string",
|
|
1074
|
+
"_tags": ["string"],
|
|
1075
|
+
"calendar_id": "string",
|
|
1076
|
+
"event_type": "singleInstance",
|
|
1077
|
+
"description": "string",
|
|
1078
|
+
"start_time": "1970-01-01T00:00:00.000Z",
|
|
1079
|
+
"end_time": "1970-01-01T00:00:00.000Z",
|
|
1080
|
+
"timezone": "string",
|
|
1081
|
+
"is_all_day": true,
|
|
1082
|
+
"location": "string",
|
|
1083
|
+
"status": "free",
|
|
1084
|
+
"busy": true,
|
|
1085
|
+
"is_cancelled": true,
|
|
1086
|
+
"sensitivity": "normal",
|
|
1087
|
+
"importance": "low",
|
|
1088
|
+
"is_online_meeting": true,
|
|
1089
|
+
"online_meeting_url": "https://example.com/path",
|
|
1090
|
+
"web_link": "https://example.com/path",
|
|
1091
|
+
"response_status": "none",
|
|
1092
|
+
"organizer_email": "user@example.com",
|
|
1093
|
+
"attendees": [
|
|
1094
|
+
{
|
|
1095
|
+
"email": "user@example.com",
|
|
1096
|
+
"name": "string",
|
|
1097
|
+
"response": "none",
|
|
1098
|
+
"type": "required"
|
|
1099
|
+
}
|
|
1100
|
+
],
|
|
1101
|
+
"is_recurring": true,
|
|
1102
|
+
"series_master_id": "string",
|
|
1103
|
+
"source": {
|
|
1104
|
+
"type": "native",
|
|
1105
|
+
"provider": "outlook",
|
|
1106
|
+
"provider_event_id": "string",
|
|
1107
|
+
"provider_event_url": "https://example.com/path",
|
|
1108
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z",
|
|
1109
|
+
"etag": "string"
|
|
1110
|
+
},
|
|
1111
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
1112
|
+
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
208
1113
|
}
|
|
209
1114
|
```
|
|
210
1115
|
|
|
@@ -279,8 +1184,349 @@ const { data } = await client.getEvent({
|
|
|
279
1184
|
|
|
280
1185
|
---
|
|
281
1186
|
|
|
1187
|
+
### `updateEvent`
|
|
1188
|
+
|
|
1189
|
+
Update a native epilot calendar event.
|
|
1190
|
+
|
|
1191
|
+
`PATCH /v1/calendar/events/{event_id}`
|
|
1192
|
+
|
|
1193
|
+
```ts
|
|
1194
|
+
const { data } = await client.updateEvent(
|
|
1195
|
+
{
|
|
1196
|
+
event_id: 'example',
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
description: 'string',
|
|
1200
|
+
start_time: '1970-01-01T00:00:00.000Z',
|
|
1201
|
+
end_time: '1970-01-01T00:00:00.000Z',
|
|
1202
|
+
timezone: 'string',
|
|
1203
|
+
is_all_day: true,
|
|
1204
|
+
location: 'string',
|
|
1205
|
+
status: 'free',
|
|
1206
|
+
sensitivity: 'normal',
|
|
1207
|
+
_title: 'string'
|
|
1208
|
+
},
|
|
1209
|
+
)
|
|
1210
|
+
```
|
|
1211
|
+
|
|
1212
|
+
<details>
|
|
1213
|
+
<summary>Response</summary>
|
|
1214
|
+
|
|
1215
|
+
```json
|
|
1216
|
+
{
|
|
1217
|
+
"_id": "string",
|
|
1218
|
+
"_schema": "calendar_event",
|
|
1219
|
+
"_org": "string",
|
|
1220
|
+
"_title": "string",
|
|
1221
|
+
"_tags": ["string"],
|
|
1222
|
+
"calendar_id": "string",
|
|
1223
|
+
"event_type": "singleInstance",
|
|
1224
|
+
"description": "string",
|
|
1225
|
+
"start_time": "1970-01-01T00:00:00.000Z",
|
|
1226
|
+
"end_time": "1970-01-01T00:00:00.000Z",
|
|
1227
|
+
"timezone": "string",
|
|
1228
|
+
"is_all_day": true,
|
|
1229
|
+
"location": "string",
|
|
1230
|
+
"status": "free",
|
|
1231
|
+
"busy": true,
|
|
1232
|
+
"is_cancelled": true,
|
|
1233
|
+
"sensitivity": "normal",
|
|
1234
|
+
"importance": "low",
|
|
1235
|
+
"is_online_meeting": true,
|
|
1236
|
+
"online_meeting_url": "https://example.com/path",
|
|
1237
|
+
"web_link": "https://example.com/path",
|
|
1238
|
+
"response_status": "none",
|
|
1239
|
+
"organizer_email": "user@example.com",
|
|
1240
|
+
"attendees": [
|
|
1241
|
+
{
|
|
1242
|
+
"email": "user@example.com",
|
|
1243
|
+
"name": "string",
|
|
1244
|
+
"response": "none",
|
|
1245
|
+
"type": "required"
|
|
1246
|
+
}
|
|
1247
|
+
],
|
|
1248
|
+
"is_recurring": true,
|
|
1249
|
+
"series_master_id": "string",
|
|
1250
|
+
"source": {
|
|
1251
|
+
"type": "native",
|
|
1252
|
+
"provider": "outlook",
|
|
1253
|
+
"provider_event_id": "string",
|
|
1254
|
+
"provider_event_url": "https://example.com/path",
|
|
1255
|
+
"last_synced_at": "1970-01-01T00:00:00.000Z",
|
|
1256
|
+
"etag": "string"
|
|
1257
|
+
},
|
|
1258
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
1259
|
+
"_updated_at": "1970-01-01T00:00:00.000Z"
|
|
1260
|
+
}
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
</details>
|
|
1264
|
+
|
|
1265
|
+
---
|
|
1266
|
+
|
|
1267
|
+
### `deleteEvent`
|
|
1268
|
+
|
|
1269
|
+
Delete a native epilot calendar event.
|
|
1270
|
+
|
|
1271
|
+
`DELETE /v1/calendar/events/{event_id}`
|
|
1272
|
+
|
|
1273
|
+
```ts
|
|
1274
|
+
const { data } = await client.deleteEvent({
|
|
1275
|
+
event_id: 'example',
|
|
1276
|
+
})
|
|
1277
|
+
```
|
|
1278
|
+
|
|
1279
|
+
---
|
|
1280
|
+
|
|
1281
|
+
### `shareEvent`
|
|
1282
|
+
|
|
1283
|
+
Share a calendar event with another user of the same organization, view-only. Owner-only: recipients of a share cannot re-share. Sharing an already-shared event is a no-op.
|
|
1284
|
+
|
|
1285
|
+
`POST /v1/calendar/events/{event_id}/share`
|
|
1286
|
+
|
|
1287
|
+
```ts
|
|
1288
|
+
const { data } = await client.shareEvent(
|
|
1289
|
+
{
|
|
1290
|
+
event_id: 'example',
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
user_id: 'string'
|
|
1294
|
+
},
|
|
1295
|
+
)
|
|
1296
|
+
```
|
|
1297
|
+
|
|
1298
|
+
---
|
|
1299
|
+
|
|
1300
|
+
### `unshareEvent`
|
|
1301
|
+
|
|
1302
|
+
Revoke a per-event share. The recipient loses access immediately. Owner-only.
|
|
1303
|
+
|
|
1304
|
+
`DELETE /v1/calendar/events/{event_id}/share/{user_id}`
|
|
1305
|
+
|
|
1306
|
+
```ts
|
|
1307
|
+
const { data } = await client.unshareEvent({
|
|
1308
|
+
event_id: 'example',
|
|
1309
|
+
user_id: 'example',
|
|
1310
|
+
})
|
|
1311
|
+
```
|
|
1312
|
+
|
|
1313
|
+
---
|
|
1314
|
+
|
|
282
1315
|
## Schemas
|
|
283
1316
|
|
|
1317
|
+
### `AbsenceInterval`
|
|
1318
|
+
|
|
1319
|
+
```ts
|
|
1320
|
+
type AbsenceInterval = {
|
|
1321
|
+
from: string // date-time
|
|
1322
|
+
to: string // date-time
|
|
1323
|
+
original_from: string // date-time
|
|
1324
|
+
original_to: string // date-time
|
|
1325
|
+
absent: boolean
|
|
1326
|
+
source: "calendar_event" | "absence_adjustment" | "working_hours"
|
|
1327
|
+
calendar_event_id?: string
|
|
1328
|
+
absence_adjustment_id?: string
|
|
1329
|
+
reason?: string
|
|
1330
|
+
}
|
|
1331
|
+
```
|
|
1332
|
+
|
|
1333
|
+
### `AbsenceIntervalSource`
|
|
1334
|
+
|
|
1335
|
+
```ts
|
|
1336
|
+
type AbsenceIntervalSource = "calendar_event" | "absence_adjustment" | "working_hours"
|
|
1337
|
+
```
|
|
1338
|
+
|
|
1339
|
+
### `Error`
|
|
1340
|
+
|
|
1341
|
+
```ts
|
|
1342
|
+
type Error = {
|
|
1343
|
+
status: number
|
|
1344
|
+
error: string | unknown[]
|
|
1345
|
+
}
|
|
1346
|
+
```
|
|
1347
|
+
|
|
1348
|
+
### `SearchAbsenceBody`
|
|
1349
|
+
|
|
1350
|
+
```ts
|
|
1351
|
+
type SearchAbsenceBody = {
|
|
1352
|
+
from: string // date-time
|
|
1353
|
+
to: string // date-time
|
|
1354
|
+
user_ids: string[]
|
|
1355
|
+
include_busy?: boolean
|
|
1356
|
+
working_hours_granularity?: "time" | "day"
|
|
1357
|
+
}
|
|
1358
|
+
```
|
|
1359
|
+
|
|
1360
|
+
### `SearchNowAbsenceBody`
|
|
1361
|
+
|
|
1362
|
+
```ts
|
|
1363
|
+
type SearchNowAbsenceBody = {
|
|
1364
|
+
user_ids: string[]
|
|
1365
|
+
include_busy?: boolean
|
|
1366
|
+
working_hours_granularity?: "time" | "day"
|
|
1367
|
+
}
|
|
1368
|
+
```
|
|
1369
|
+
|
|
1370
|
+
### `AbsenceAdjustment`
|
|
1371
|
+
|
|
1372
|
+
```ts
|
|
1373
|
+
type AbsenceAdjustment = {
|
|
1374
|
+
from: string // date-time
|
|
1375
|
+
to: string // date-time
|
|
1376
|
+
absent: boolean
|
|
1377
|
+
status: "oof" | "busy"
|
|
1378
|
+
type?: string
|
|
1379
|
+
reason?: string
|
|
1380
|
+
adjustment_id: string
|
|
1381
|
+
user_id: string
|
|
1382
|
+
created_by: string
|
|
1383
|
+
created_at: string // date-time
|
|
1384
|
+
updated_at: string // date-time
|
|
1385
|
+
}
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
### `AbsenceStatus`
|
|
1389
|
+
|
|
1390
|
+
Calendar status targeted by the absence adjustment.
|
|
1391
|
+
|
|
1392
|
+
```ts
|
|
1393
|
+
type AbsenceStatus = "oof" | "busy"
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
### `AbsenceType`
|
|
1397
|
+
|
|
1398
|
+
Optional producer-defined reference stored with an absence adjustment.
|
|
1399
|
+
|
|
1400
|
+
```ts
|
|
1401
|
+
type AbsenceType = string
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
### `CreateAbsenceAdjustmentBody`
|
|
1405
|
+
|
|
1406
|
+
```ts
|
|
1407
|
+
type CreateAbsenceAdjustmentBody = {
|
|
1408
|
+
from: string // date-time
|
|
1409
|
+
to: string // date-time
|
|
1410
|
+
absent: boolean
|
|
1411
|
+
status: "oof" | "busy"
|
|
1412
|
+
type?: string
|
|
1413
|
+
reason?: string
|
|
1414
|
+
}
|
|
1415
|
+
```
|
|
1416
|
+
|
|
1417
|
+
### `PatchAbsenceAdjustmentBody`
|
|
1418
|
+
|
|
1419
|
+
```ts
|
|
1420
|
+
type PatchAbsenceAdjustmentBody = {
|
|
1421
|
+
from?: string // date-time
|
|
1422
|
+
to?: string // date-time
|
|
1423
|
+
absent?: boolean
|
|
1424
|
+
status?: "oof" | "busy"
|
|
1425
|
+
type?: string
|
|
1426
|
+
reason?: string
|
|
1427
|
+
}
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
### `ExternalCalendar`
|
|
1431
|
+
|
|
1432
|
+
```ts
|
|
1433
|
+
type ExternalCalendar = {
|
|
1434
|
+
provider: "outlook" | "google"
|
|
1435
|
+
last_synced_at: string // date-time
|
|
1436
|
+
}
|
|
1437
|
+
```
|
|
1438
|
+
|
|
1439
|
+
### `WorkingHours`
|
|
1440
|
+
|
|
1441
|
+
Recurring weekly working hours of a user. The absence of a record means the user is treated as always available.
|
|
1442
|
+
|
|
1443
|
+
```ts
|
|
1444
|
+
type WorkingHours = {
|
|
1445
|
+
monday: Array<{
|
|
1446
|
+
start: string
|
|
1447
|
+
end: string
|
|
1448
|
+
}>
|
|
1449
|
+
tuesday: Array<{
|
|
1450
|
+
start: string
|
|
1451
|
+
end: string
|
|
1452
|
+
}>
|
|
1453
|
+
wednesday: Array<{
|
|
1454
|
+
start: string
|
|
1455
|
+
end: string
|
|
1456
|
+
}>
|
|
1457
|
+
thursday: Array<{
|
|
1458
|
+
start: string
|
|
1459
|
+
end: string
|
|
1460
|
+
}>
|
|
1461
|
+
friday: Array<{
|
|
1462
|
+
start: string
|
|
1463
|
+
end: string
|
|
1464
|
+
}>
|
|
1465
|
+
saturday: Array<{
|
|
1466
|
+
start: string
|
|
1467
|
+
end: string
|
|
1468
|
+
}>
|
|
1469
|
+
sunday: Array<{
|
|
1470
|
+
start: string
|
|
1471
|
+
end: string
|
|
1472
|
+
}>
|
|
1473
|
+
timezone: string
|
|
1474
|
+
user_id: string
|
|
1475
|
+
updated_by: string
|
|
1476
|
+
created_at: string // date-time
|
|
1477
|
+
updated_at: string // date-time
|
|
1478
|
+
}
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
### `UpsertWorkingHoursBody`
|
|
1482
|
+
|
|
1483
|
+
Full replacement of the working-hours record. All weekdays are required; an empty array means a day off. Users without a working-hours record are treated as always available.
|
|
1484
|
+
|
|
1485
|
+
```ts
|
|
1486
|
+
type UpsertWorkingHoursBody = {
|
|
1487
|
+
monday: Array<{
|
|
1488
|
+
start: string
|
|
1489
|
+
end: string
|
|
1490
|
+
}>
|
|
1491
|
+
tuesday: Array<{
|
|
1492
|
+
start: string
|
|
1493
|
+
end: string
|
|
1494
|
+
}>
|
|
1495
|
+
wednesday: Array<{
|
|
1496
|
+
start: string
|
|
1497
|
+
end: string
|
|
1498
|
+
}>
|
|
1499
|
+
thursday: Array<{
|
|
1500
|
+
start: string
|
|
1501
|
+
end: string
|
|
1502
|
+
}>
|
|
1503
|
+
friday: Array<{
|
|
1504
|
+
start: string
|
|
1505
|
+
end: string
|
|
1506
|
+
}>
|
|
1507
|
+
saturday: Array<{
|
|
1508
|
+
start: string
|
|
1509
|
+
end: string
|
|
1510
|
+
}>
|
|
1511
|
+
sunday: Array<{
|
|
1512
|
+
start: string
|
|
1513
|
+
end: string
|
|
1514
|
+
}>
|
|
1515
|
+
timezone?: string
|
|
1516
|
+
}
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1519
|
+
### `TimeWindow`
|
|
1520
|
+
|
|
1521
|
+
A wall-clock working window within a single day.
|
|
1522
|
+
|
|
1523
|
+
```ts
|
|
1524
|
+
type TimeWindow = {
|
|
1525
|
+
start: string
|
|
1526
|
+
end: string
|
|
1527
|
+
}
|
|
1528
|
+
```
|
|
1529
|
+
|
|
284
1530
|
### `Calendar`
|
|
285
1531
|
|
|
286
1532
|
```ts
|
|
@@ -325,12 +1571,45 @@ Null for native epilot calendars
|
|
|
325
1571
|
type Provider = "outlook" | "google" | null
|
|
326
1572
|
```
|
|
327
1573
|
|
|
328
|
-
### `
|
|
1574
|
+
### `CalendarCreateBody`
|
|
329
1575
|
|
|
330
1576
|
```ts
|
|
331
|
-
type
|
|
332
|
-
|
|
333
|
-
|
|
1577
|
+
type CalendarCreateBody = {
|
|
1578
|
+
name: string
|
|
1579
|
+
description?: string
|
|
1580
|
+
color?: string
|
|
1581
|
+
}
|
|
1582
|
+
```
|
|
1583
|
+
|
|
1584
|
+
### `AddOutlookCalendarRequest`
|
|
1585
|
+
|
|
1586
|
+
```ts
|
|
1587
|
+
type AddOutlookCalendarRequest = {
|
|
1588
|
+
provider_calendar_id: string
|
|
1589
|
+
name?: string
|
|
1590
|
+
}
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
### `AvailableOutlookCalendar`
|
|
1594
|
+
|
|
1595
|
+
```ts
|
|
1596
|
+
type AvailableOutlookCalendar = {
|
|
1597
|
+
provider_calendar_id: string
|
|
1598
|
+
name: string
|
|
1599
|
+
color?: string
|
|
1600
|
+
is_default?: boolean
|
|
1601
|
+
can_edit?: boolean
|
|
1602
|
+
owner?: string
|
|
1603
|
+
}
|
|
1604
|
+
```
|
|
1605
|
+
|
|
1606
|
+
### `CalendarPatchBody`
|
|
1607
|
+
|
|
1608
|
+
```ts
|
|
1609
|
+
type CalendarPatchBody = {
|
|
1610
|
+
name?: string
|
|
1611
|
+
description?: string
|
|
1612
|
+
color?: string
|
|
334
1613
|
}
|
|
335
1614
|
```
|
|
336
1615
|
|
|
@@ -439,3 +1718,44 @@ type EventSource = {
|
|
|
439
1718
|
etag?: string
|
|
440
1719
|
}
|
|
441
1720
|
```
|
|
1721
|
+
|
|
1722
|
+
### `CalendarEventCreateBody`
|
|
1723
|
+
|
|
1724
|
+
```ts
|
|
1725
|
+
type CalendarEventCreateBody = {
|
|
1726
|
+
calendar_id: string
|
|
1727
|
+
description?: string
|
|
1728
|
+
start_time: string // date-time
|
|
1729
|
+
end_time: string // date-time
|
|
1730
|
+
timezone: string
|
|
1731
|
+
is_all_day: boolean
|
|
1732
|
+
location?: string
|
|
1733
|
+
status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"
|
|
1734
|
+
sensitivity: "normal" | "personal" | "private" | "confidential"
|
|
1735
|
+
_title: string
|
|
1736
|
+
}
|
|
1737
|
+
```
|
|
1738
|
+
|
|
1739
|
+
### `CalendarEventPatchBody`
|
|
1740
|
+
|
|
1741
|
+
```ts
|
|
1742
|
+
type CalendarEventPatchBody = {
|
|
1743
|
+
description?: string
|
|
1744
|
+
start_time?: string // date-time
|
|
1745
|
+
end_time?: string // date-time
|
|
1746
|
+
timezone?: string
|
|
1747
|
+
is_all_day?: boolean
|
|
1748
|
+
location?: string
|
|
1749
|
+
status?: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"
|
|
1750
|
+
sensitivity?: "normal" | "personal" | "private" | "confidential"
|
|
1751
|
+
_title?: string
|
|
1752
|
+
}
|
|
1753
|
+
```
|
|
1754
|
+
|
|
1755
|
+
### `ShareEventBody`
|
|
1756
|
+
|
|
1757
|
+
```ts
|
|
1758
|
+
type ShareEventBody = {
|
|
1759
|
+
user_id: string
|
|
1760
|
+
}
|
|
1761
|
+
```
|