@epilot/sdk 2.16.0 → 2.16.1

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.
Files changed (131) hide show
  1. package/definitions/calendar-runtime.json +1 -1
  2. package/definitions/calendar.json +1994 -148
  3. package/dist/apis/access-token.cjs +6 -6
  4. package/dist/apis/access-token.js +1 -1
  5. package/dist/apis/address-suggestions.cjs +6 -6
  6. package/dist/apis/address-suggestions.js +1 -1
  7. package/dist/apis/address.cjs +6 -6
  8. package/dist/apis/address.js +1 -1
  9. package/dist/apis/ai-agents.cjs +6 -6
  10. package/dist/apis/ai-agents.js +1 -1
  11. package/dist/apis/app.cjs +6 -6
  12. package/dist/apis/app.js +1 -1
  13. package/dist/apis/audit-logs.cjs +6 -6
  14. package/dist/apis/audit-logs.js +1 -1
  15. package/dist/apis/automation.cjs +6 -6
  16. package/dist/apis/automation.js +1 -1
  17. package/dist/apis/billing.cjs +6 -6
  18. package/dist/apis/billing.js +1 -1
  19. package/dist/apis/blueprint-manifest.cjs +6 -6
  20. package/dist/apis/blueprint-manifest.js +1 -1
  21. package/dist/apis/calendar.cjs +8 -8
  22. package/dist/apis/calendar.d.cts +2 -2
  23. package/dist/apis/calendar.d.ts +2 -2
  24. package/dist/apis/calendar.js +2 -2
  25. package/dist/apis/configuration-hub.cjs +6 -6
  26. package/dist/apis/configuration-hub.js +1 -1
  27. package/dist/apis/consent.cjs +6 -6
  28. package/dist/apis/consent.js +1 -1
  29. package/dist/apis/customer-portal.cjs +6 -6
  30. package/dist/apis/customer-portal.js +1 -1
  31. package/dist/apis/dashboard.cjs +6 -6
  32. package/dist/apis/dashboard.js +1 -1
  33. package/dist/apis/data-governance.cjs +6 -6
  34. package/dist/apis/data-governance.js +1 -1
  35. package/dist/apis/deduplication.cjs +6 -6
  36. package/dist/apis/deduplication.js +1 -1
  37. package/dist/apis/design.cjs +6 -6
  38. package/dist/apis/design.js +1 -1
  39. package/dist/apis/document.cjs +6 -6
  40. package/dist/apis/document.js +1 -1
  41. package/dist/apis/email-settings.cjs +6 -6
  42. package/dist/apis/email-settings.js +1 -1
  43. package/dist/apis/email-template.cjs +6 -6
  44. package/dist/apis/email-template.js +1 -1
  45. package/dist/apis/entity-mapping.cjs +6 -6
  46. package/dist/apis/entity-mapping.js +1 -1
  47. package/dist/apis/entity.cjs +6 -6
  48. package/dist/apis/entity.js +1 -1
  49. package/dist/apis/environments.cjs +6 -6
  50. package/dist/apis/environments.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/integration-toolkit.cjs +6 -6
  58. package/dist/apis/integration-toolkit.js +1 -1
  59. package/dist/apis/journey.cjs +6 -6
  60. package/dist/apis/journey.js +1 -1
  61. package/dist/apis/kanban.cjs +6 -6
  62. package/dist/apis/kanban.js +1 -1
  63. package/dist/apis/message.cjs +6 -6
  64. package/dist/apis/message.js +1 -1
  65. package/dist/apis/metering.cjs +6 -6
  66. package/dist/apis/metering.js +1 -1
  67. package/dist/apis/notes.cjs +6 -6
  68. package/dist/apis/notes.js +1 -1
  69. package/dist/apis/notification.cjs +6 -6
  70. package/dist/apis/notification.js +1 -1
  71. package/dist/apis/organization.cjs +6 -6
  72. package/dist/apis/organization.js +1 -1
  73. package/dist/apis/partner-directory.cjs +6 -6
  74. package/dist/apis/partner-directory.js +1 -1
  75. package/dist/apis/permissions.cjs +6 -6
  76. package/dist/apis/permissions.js +1 -1
  77. package/dist/apis/pricing-tier.cjs +6 -6
  78. package/dist/apis/pricing-tier.js +1 -1
  79. package/dist/apis/pricing.cjs +6 -6
  80. package/dist/apis/pricing.js +1 -1
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/query.cjs +6 -6
  84. package/dist/apis/query.js +1 -1
  85. package/dist/apis/sandbox.cjs +6 -6
  86. package/dist/apis/sandbox.js +1 -1
  87. package/dist/apis/sharing.cjs +6 -6
  88. package/dist/apis/sharing.js +1 -1
  89. package/dist/apis/snapshot.cjs +6 -6
  90. package/dist/apis/snapshot.js +1 -1
  91. package/dist/apis/submission.cjs +6 -6
  92. package/dist/apis/submission.js +1 -1
  93. package/dist/apis/target.cjs +6 -6
  94. package/dist/apis/target.js +1 -1
  95. package/dist/apis/targeting.cjs +6 -6
  96. package/dist/apis/targeting.js +1 -1
  97. package/dist/apis/template-variables.cjs +6 -6
  98. package/dist/apis/template-variables.js +1 -1
  99. package/dist/apis/user.cjs +6 -6
  100. package/dist/apis/user.js +1 -1
  101. package/dist/apis/validation-rules.cjs +6 -6
  102. package/dist/apis/validation-rules.js +1 -1
  103. package/dist/apis/webhooks.cjs +6 -6
  104. package/dist/apis/webhooks.js +1 -1
  105. package/dist/apis/workflow-definition.cjs +6 -6
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.js +1 -1
  109. package/dist/calendar-QAOHESA6.cjs +7 -0
  110. package/dist/calendar-ZKM3KI45.js +7 -0
  111. package/dist/{calendar-runtime-6CMMEQMG.js → calendar-runtime-25OCRSQL.js} +1 -1
  112. package/dist/{calendar-runtime-G4SN5PDY.cjs → calendar-runtime-IOURSAQT.cjs} +2 -2
  113. package/dist/calendar.d-DQaUSVGa.d.cts +2047 -0
  114. package/dist/calendar.d-DQaUSVGa.d.ts +2047 -0
  115. package/dist/chunk-EWGYF4WD.js +14 -0
  116. package/dist/chunk-IFELBEXN.cjs +14 -0
  117. package/dist/{chunk-X3MPAK4C.cjs → chunk-K7MOYBJB.cjs} +2 -2
  118. package/dist/{chunk-UCCKYJMU.js → chunk-KFR23DXN.js} +2 -2
  119. package/dist/index.cjs +10 -10
  120. package/dist/index.d.cts +1 -1
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.js +2 -2
  123. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  124. package/docs/calendar.md +1082 -70
  125. package/package.json +11 -12
  126. package/dist/calendar-2YDAYG7S.cjs +0 -7
  127. package/dist/calendar-ACFIHQ2N.js +0 -7
  128. package/dist/calendar.d-BEjLDagH.d.cts +0 -353
  129. package/dist/calendar.d-BEjLDagH.d.ts +0 -353
  130. package/dist/chunk-CKLEBO4K.cjs +0 -14
  131. package/dist/chunk-JNH37UUH.js +0 -14
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.listCalendars(...)
12
+ const { data } = await epilot.calendar.listUsersAbsence(...)
13
13
  ```
14
14
 
15
15
  ### Tree-shakeable import
@@ -19,24 +19,61 @@ import { getClient, authorize } from '@epilot/sdk/calendar'
19
19
 
20
20
  const calendarClient = getClient()
21
21
  authorize(calendarClient, () => '<token>')
22
- const { data } = await calendarClient.listCalendars(...)
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
+
27
38
  **Calendars**
28
39
  - [`listCalendars`](#listcalendars)
40
+ - [`createCalendar`](#createcalendar)
41
+ - [`addOutlookCalendar`](#addoutlookcalendar)
42
+ - [`listOutlookCalendars`](#listoutlookcalendars)
43
+ - [`deleteOutlookCalendar`](#deleteoutlookcalendar)
44
+ - [`outlookWebhook`](#outlookwebhook)
29
45
  - [`getCalendar`](#getcalendar)
46
+ - [`updateCalendar`](#updatecalendar)
47
+ - [`deleteCalendar`](#deletecalendar)
30
48
 
31
- **Events**
49
+ **Calendar Events**
32
50
  - [`listEvents`](#listevents)
51
+ - [`createEvent`](#createevent)
33
52
  - [`getEvent`](#getevent)
53
+ - [`updateEvent`](#updateevent)
54
+ - [`deleteEvent`](#deleteevent)
55
+ - [`shareEvent`](#shareevent)
56
+ - [`unshareEvent`](#unshareevent)
34
57
 
35
58
  **Schemas**
59
+ - [`AbsenceInterval`](#absenceinterval)
60
+ - [`AbsenceIntervalSource`](#absenceintervalsource)
61
+ - [`Error`](#error)
62
+ - [`SearchAbsenceBody`](#searchabsencebody)
63
+ - [`SearchNowAbsenceBody`](#searchnowabsencebody)
64
+ - [`AbsenceAdjustment`](#absenceadjustment)
65
+ - [`AbsenceStatus`](#absencestatus)
66
+ - [`AbsenceType`](#absencetype)
67
+ - [`CreateAbsenceAdjustmentBody`](#createabsenceadjustmentbody)
68
+ - [`PatchAbsenceAdjustmentBody`](#patchabsenceadjustmentbody)
69
+ - [`ExternalCalendar`](#externalcalendar)
36
70
  - [`Calendar`](#calendar)
37
71
  - [`CalendarSource`](#calendarsource)
38
72
  - [`Provider`](#provider)
39
- - [`Error`](#error)
73
+ - [`CalendarCreateBody`](#calendarcreatebody)
74
+ - [`AddOutlookCalendarRequest`](#addoutlookcalendarrequest)
75
+ - [`AvailableOutlookCalendar`](#availableoutlookcalendar)
76
+ - [`CalendarPatchBody`](#calendarpatchbody)
40
77
  - [`CalendarEvent`](#calendarevent)
41
78
  - [`EventType`](#eventtype)
42
79
  - [`EventStatus`](#eventstatus)
@@ -45,6 +82,362 @@ const { data } = await calendarClient.listCalendars(...)
45
82
  - [`ResponseStatus`](#responsestatus)
46
83
  - [`Attendee`](#attendee)
47
84
  - [`EventSource`](#eventsource)
85
+ - [`CalendarEventCreateBody`](#calendareventcreatebody)
86
+ - [`CalendarEventPatchBody`](#calendareventpatchbody)
87
+ - [`ShareEventBody`](#shareeventbody)
88
+
89
+ ### `listUsersAbsence`
90
+
91
+ List organization users with known absence metadata in the requested time window.
92
+
93
+ `GET /v1/calendar/absence/users`
94
+
95
+ ```ts
96
+ const { data } = await client.listUsersAbsence({
97
+ from: 'example',
98
+ to: 'example',
99
+ include_busy: true,
100
+ query: 'example',
101
+ limit: 1,
102
+ offset: 1,
103
+ })
104
+ ```
105
+
106
+ <details>
107
+ <summary>Response</summary>
108
+
109
+ ```json
110
+ {
111
+ "from": "1970-01-01T00:00:00.000Z",
112
+ "to": "1970-01-01T00:00:00.000Z",
113
+ "hits": 0,
114
+ "results": [
115
+ {
116
+ "absent": true,
117
+ "absence_intervals": [
118
+ {
119
+ "from": "1970-01-01T00:00:00.000Z",
120
+ "to": "1970-01-01T00:00:00.000Z",
121
+ "original_from": "1970-01-01T00:00:00.000Z",
122
+ "original_to": "1970-01-01T00:00:00.000Z",
123
+ "absent": true,
124
+ "source": "calendar_event",
125
+ "calendar_event_id": "string",
126
+ "absence_adjustment_id": "string",
127
+ "reason": "string"
128
+ }
129
+ ],
130
+ "user_id": "string",
131
+ "display_name": "string",
132
+ "email": "user@example.com",
133
+ "status": "string"
134
+ }
135
+ ]
136
+ }
137
+ ```
138
+
139
+ </details>
140
+
141
+ ---
142
+
143
+ ### `searchAbsence`
144
+
145
+ Search known absence for candidate users in the requested time window.
146
+
147
+ `POST /v1/calendar/absence:search`
148
+
149
+ ```ts
150
+ const { data } = await client.searchAbsence(
151
+ null,
152
+ {
153
+ from: '1970-01-01T00:00:00.000Z',
154
+ to: '1970-01-01T00:00:00.000Z',
155
+ user_ids: ['string'],
156
+ include_busy: false
157
+ },
158
+ )
159
+ ```
160
+
161
+ <details>
162
+ <summary>Response</summary>
163
+
164
+ ```json
165
+ {
166
+ "from": "1970-01-01T00:00:00.000Z",
167
+ "to": "1970-01-01T00:00:00.000Z",
168
+ "users": {}
169
+ }
170
+ ```
171
+
172
+ </details>
173
+
174
+ ---
175
+
176
+ ### `searchNowAbsence`
177
+
178
+ Search known absence for candidate users at the current server time.
179
+
180
+ `POST /v1/calendar/absence:search-now`
181
+
182
+ ```ts
183
+ const { data } = await client.searchNowAbsence(
184
+ null,
185
+ {
186
+ user_ids: ['string'],
187
+ include_busy: false
188
+ },
189
+ )
190
+ ```
191
+
192
+ <details>
193
+ <summary>Response</summary>
194
+
195
+ ```json
196
+ {
197
+ "from": "1970-01-01T00:00:00.000Z",
198
+ "to": "1970-01-01T00:00:00.000Z",
199
+ "users": {}
200
+ }
201
+ ```
202
+
203
+ </details>
204
+
205
+ ---
206
+
207
+ ### `listAbsenceAdjustments`
208
+
209
+ List absence adjustments for a user in a time window.
210
+
211
+ `GET /v1/calendar/absence/users/{user_id}/adjustments`
212
+
213
+ ```ts
214
+ const { data } = await client.listAbsenceAdjustments({
215
+ user_id: 'example',
216
+ from: 'example',
217
+ to: 'example',
218
+ })
219
+ ```
220
+
221
+ <details>
222
+ <summary>Response</summary>
223
+
224
+ ```json
225
+ {
226
+ "from": "1970-01-01T00:00:00.000Z",
227
+ "to": "1970-01-01T00:00:00.000Z",
228
+ "results": [
229
+ {
230
+ "from": "1970-01-01T00:00:00.000Z",
231
+ "to": "1970-01-01T00:00:00.000Z",
232
+ "absent": true,
233
+ "status": "busy",
234
+ "type": "string",
235
+ "reason": "string",
236
+ "adjustment_id": "string",
237
+ "user_id": "string",
238
+ "created_by": "string",
239
+ "created_at": "1970-01-01T00:00:00.000Z",
240
+ "updated_at": "1970-01-01T00:00:00.000Z"
241
+ }
242
+ ]
243
+ }
244
+ ```
245
+
246
+ </details>
247
+
248
+ ---
249
+
250
+ ### `createAbsenceAdjustment`
251
+
252
+ Create a time-bound absence adjustment for a user in the caller organization.
253
+
254
+ `POST /v1/calendar/absence/users/{user_id}/adjustments`
255
+
256
+ ```ts
257
+ const { data } = await client.createAbsenceAdjustment(
258
+ {
259
+ user_id: 'example',
260
+ },
261
+ {
262
+ from: '1970-01-01T00:00:00.000Z',
263
+ to: '1970-01-01T00:00:00.000Z',
264
+ absent: true,
265
+ status: 'busy',
266
+ type: 'string',
267
+ reason: 'string'
268
+ },
269
+ )
270
+ ```
271
+
272
+ <details>
273
+ <summary>Response</summary>
274
+
275
+ ```json
276
+ {
277
+ "from": "1970-01-01T00:00:00.000Z",
278
+ "to": "1970-01-01T00:00:00.000Z",
279
+ "absent": true,
280
+ "status": "busy",
281
+ "type": "string",
282
+ "reason": "string",
283
+ "adjustment_id": "string",
284
+ "user_id": "string",
285
+ "created_by": "string",
286
+ "created_at": "1970-01-01T00:00:00.000Z",
287
+ "updated_at": "1970-01-01T00:00:00.000Z"
288
+ }
289
+ ```
290
+
291
+ </details>
292
+
293
+ ---
294
+
295
+ ### `getAbsenceAdjustment`
296
+
297
+ Get an absence adjustment by ID.
298
+
299
+ `GET /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
300
+
301
+ ```ts
302
+ const { data } = await client.getAbsenceAdjustment({
303
+ user_id: 'example',
304
+ adjustment_id: 'example',
305
+ })
306
+ ```
307
+
308
+ <details>
309
+ <summary>Response</summary>
310
+
311
+ ```json
312
+ {
313
+ "from": "1970-01-01T00:00:00.000Z",
314
+ "to": "1970-01-01T00:00:00.000Z",
315
+ "absent": true,
316
+ "status": "busy",
317
+ "type": "string",
318
+ "reason": "string",
319
+ "adjustment_id": "string",
320
+ "user_id": "string",
321
+ "created_by": "string",
322
+ "created_at": "1970-01-01T00:00:00.000Z",
323
+ "updated_at": "1970-01-01T00:00:00.000Z"
324
+ }
325
+ ```
326
+
327
+ </details>
328
+
329
+ ---
330
+
331
+ ### `patchAbsenceAdjustment`
332
+
333
+ Update an absence adjustment in the caller organization.
334
+
335
+ `PATCH /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
336
+
337
+ ```ts
338
+ const { data } = await client.patchAbsenceAdjustment(
339
+ {
340
+ user_id: 'example',
341
+ adjustment_id: 'example',
342
+ },
343
+ {
344
+ from: '1970-01-01T00:00:00.000Z',
345
+ to: '1970-01-01T00:00:00.000Z',
346
+ absent: true,
347
+ status: 'busy',
348
+ type: 'string',
349
+ reason: 'string'
350
+ },
351
+ )
352
+ ```
353
+
354
+ <details>
355
+ <summary>Response</summary>
356
+
357
+ ```json
358
+ {
359
+ "from": "1970-01-01T00:00:00.000Z",
360
+ "to": "1970-01-01T00:00:00.000Z",
361
+ "absent": true,
362
+ "status": "busy",
363
+ "type": "string",
364
+ "reason": "string",
365
+ "adjustment_id": "string",
366
+ "user_id": "string",
367
+ "created_by": "string",
368
+ "created_at": "1970-01-01T00:00:00.000Z",
369
+ "updated_at": "1970-01-01T00:00:00.000Z"
370
+ }
371
+ ```
372
+
373
+ </details>
374
+
375
+ ---
376
+
377
+ ### `deleteAbsenceAdjustment`
378
+
379
+ Delete an absence adjustment.
380
+
381
+ `DELETE /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`
382
+
383
+ ```ts
384
+ const { data } = await client.deleteAbsenceAdjustment({
385
+ user_id: 'example',
386
+ adjustment_id: 'example',
387
+ })
388
+ ```
389
+
390
+ ---
391
+
392
+ ### `getUserAbsence`
393
+
394
+ Get known absence for a user in a time window. absent=false means no known absence, not guaranteed availability.
395
+
396
+ `GET /v1/calendar/absence/users/{user_id}`
397
+
398
+ ```ts
399
+ const { data } = await client.getUserAbsence({
400
+ user_id: 'example',
401
+ from: 'example',
402
+ to: 'example',
403
+ include_busy: true,
404
+ })
405
+ ```
406
+
407
+ <details>
408
+ <summary>Response</summary>
409
+
410
+ ```json
411
+ {
412
+ "absent": true,
413
+ "absence_intervals": [
414
+ {
415
+ "from": "1970-01-01T00:00:00.000Z",
416
+ "to": "1970-01-01T00:00:00.000Z",
417
+ "original_from": "1970-01-01T00:00:00.000Z",
418
+ "original_to": "1970-01-01T00:00:00.000Z",
419
+ "absent": true,
420
+ "source": "calendar_event",
421
+ "calendar_event_id": "string",
422
+ "absence_adjustment_id": "string",
423
+ "reason": "string"
424
+ }
425
+ ],
426
+ "from": "1970-01-01T00:00:00.000Z",
427
+ "to": "1970-01-01T00:00:00.000Z",
428
+ "user_id": "string",
429
+ "external_calendars": [
430
+ {
431
+ "provider": "outlook",
432
+ "last_synced_at": "1970-01-01T00:00:00.000Z"
433
+ }
434
+ ]
435
+ }
436
+ ```
437
+
438
+ </details>
439
+
440
+ ---
48
441
 
49
442
  ### `listCalendars`
50
443
 
@@ -94,6 +487,161 @@ const { data } = await client.listCalendars({
94
487
 
95
488
  ---
96
489
 
490
+ ### `createCalendar`
491
+
492
+ Create a native epilot calendar.
493
+
494
+ `POST /v1/calendar`
495
+
496
+ ```ts
497
+ const { data } = await client.createCalendar(
498
+ null,
499
+ {
500
+ name: 'string',
501
+ description: 'string',
502
+ color: 'string'
503
+ },
504
+ )
505
+ ```
506
+
507
+ <details>
508
+ <summary>Response</summary>
509
+
510
+ ```json
511
+ {
512
+ "_id": "string",
513
+ "_schema": "calendar",
514
+ "_org": "string",
515
+ "_title": "string",
516
+ "name": "string",
517
+ "description": "string",
518
+ "color": "string",
519
+ "is_default": true,
520
+ "read_only": true,
521
+ "owner_email": "user@example.com",
522
+ "source": {
523
+ "type": "native",
524
+ "provider": "outlook",
525
+ "provider_calendar_id": "string",
526
+ "last_synced_at": "1970-01-01T00:00:00.000Z"
527
+ },
528
+ "_created_at": "1970-01-01T00:00:00.000Z",
529
+ "_updated_at": "1970-01-01T00:00:00.000Z"
530
+ }
531
+ ```
532
+
533
+ </details>
534
+
535
+ ---
536
+
537
+ ### `addOutlookCalendar`
538
+
539
+ Registers one of the caller's Outlook calendars as an epilot calendar.
540
+
541
+ `POST /v1/calendar/sources/outlook`
542
+
543
+ ```ts
544
+ const { data } = await client.addOutlookCalendar(
545
+ null,
546
+ {
547
+ provider_calendar_id: 'string',
548
+ name: 'string'
549
+ },
550
+ )
551
+ ```
552
+
553
+ <details>
554
+ <summary>Response</summary>
555
+
556
+ ```json
557
+ {
558
+ "_id": "string",
559
+ "_schema": "calendar",
560
+ "_org": "string",
561
+ "_title": "string",
562
+ "name": "string",
563
+ "description": "string",
564
+ "color": "string",
565
+ "is_default": true,
566
+ "read_only": true,
567
+ "owner_email": "user@example.com",
568
+ "source": {
569
+ "type": "native",
570
+ "provider": "outlook",
571
+ "provider_calendar_id": "string",
572
+ "last_synced_at": "1970-01-01T00:00:00.000Z"
573
+ },
574
+ "_created_at": "1970-01-01T00:00:00.000Z",
575
+ "_updated_at": "1970-01-01T00:00:00.000Z"
576
+ }
577
+ ```
578
+
579
+ </details>
580
+
581
+ ---
582
+
583
+ ### `listOutlookCalendars`
584
+
585
+ Lists the calling user's Outlook calendars available to import as epilot calendars.
586
+
587
+ `GET /v1/calendar/sources/outlook/available`
588
+
589
+ ```ts
590
+ const { data } = await client.listOutlookCalendars()
591
+ ```
592
+
593
+ <details>
594
+ <summary>Response</summary>
595
+
596
+ ```json
597
+ {
598
+ "calendars": [
599
+ {
600
+ "provider_calendar_id": "string",
601
+ "name": "string",
602
+ "color": "string",
603
+ "is_default": true,
604
+ "can_edit": true,
605
+ "owner": "string"
606
+ }
607
+ ]
608
+ }
609
+ ```
610
+
611
+ </details>
612
+
613
+ ---
614
+
615
+ ### `deleteOutlookCalendar`
616
+
617
+ Disconnects a previously registered Outlook calendar.
618
+
619
+ `DELETE /v1/calendar/sources/outlook/{calendar_id}`
620
+
621
+ ```ts
622
+ const { data } = await client.deleteOutlookCalendar({
623
+ calendar_id: 'example',
624
+ })
625
+ ```
626
+
627
+ ---
628
+
629
+ ### `outlookWebhook`
630
+
631
+ Public Microsoft Graph webhook receiver for per-user Outlook calendar
632
+ subscriptions. Unauthenticated by design (API Gateway `Authorizer: NONE`):
633
+ Graph calls it with no epilot token.
634
+
635
+ `POST /v1/calendar/outlook/webhook`
636
+
637
+ ```ts
638
+ const { data } = await client.outlookWebhook({
639
+ validationToken: 'example',
640
+ })
641
+ ```
642
+
643
+ ---
644
+
97
645
  ### `getCalendar`
98
646
 
99
647
  Get a single calendar by its epilot ID.
@@ -124,8 +672,226 @@ const { data } = await client.getCalendar({
124
672
  "source": {
125
673
  "type": "native",
126
674
  "provider": "outlook",
127
- "provider_calendar_id": "string",
128
- "last_synced_at": "1970-01-01T00:00:00.000Z"
675
+ "provider_calendar_id": "string",
676
+ "last_synced_at": "1970-01-01T00:00:00.000Z"
677
+ },
678
+ "_created_at": "1970-01-01T00:00:00.000Z",
679
+ "_updated_at": "1970-01-01T00:00:00.000Z"
680
+ }
681
+ ```
682
+
683
+ </details>
684
+
685
+ ---
686
+
687
+ ### `updateCalendar`
688
+
689
+ Update fields on a calendar.
690
+
691
+ `PATCH /v1/calendar/{calendar_id}`
692
+
693
+ ```ts
694
+ const { data } = await client.updateCalendar(
695
+ {
696
+ calendar_id: 'example',
697
+ },
698
+ {
699
+ name: 'string',
700
+ description: 'string',
701
+ color: 'string'
702
+ },
703
+ )
704
+ ```
705
+
706
+ <details>
707
+ <summary>Response</summary>
708
+
709
+ ```json
710
+ {
711
+ "_id": "string",
712
+ "_schema": "calendar",
713
+ "_org": "string",
714
+ "_title": "string",
715
+ "name": "string",
716
+ "description": "string",
717
+ "color": "string",
718
+ "is_default": true,
719
+ "read_only": true,
720
+ "owner_email": "user@example.com",
721
+ "source": {
722
+ "type": "native",
723
+ "provider": "outlook",
724
+ "provider_calendar_id": "string",
725
+ "last_synced_at": "1970-01-01T00:00:00.000Z"
726
+ },
727
+ "_created_at": "1970-01-01T00:00:00.000Z",
728
+ "_updated_at": "1970-01-01T00:00:00.000Z"
729
+ }
730
+ ```
731
+
732
+ </details>
733
+
734
+ ---
735
+
736
+ ### `deleteCalendar`
737
+
738
+ Delete a native epilot calendar and its events.
739
+
740
+ `DELETE /v1/calendar/{calendar_id}`
741
+
742
+ ```ts
743
+ const { data } = await client.deleteCalendar({
744
+ calendar_id: 'example',
745
+ })
746
+ ```
747
+
748
+ ---
749
+
750
+ ### `listEvents`
751
+
752
+ List events in a time window. Recurring events are returned as expanded occurrences – each instance appears as its own event.
753
+
754
+ `GET /v1/calendar/events`
755
+
756
+ ```ts
757
+ const { data } = await client.listEvents({
758
+ from: 'example',
759
+ to: 'example',
760
+ calendar_id: 'example',
761
+ size: 1,
762
+ cursor: 'example',
763
+ })
764
+ ```
765
+
766
+ <details>
767
+ <summary>Response</summary>
768
+
769
+ ```json
770
+ {
771
+ "results": [
772
+ {
773
+ "_id": "string",
774
+ "_schema": "calendar_event",
775
+ "_org": "string",
776
+ "_title": "string",
777
+ "_tags": ["string"],
778
+ "calendar_id": "string",
779
+ "event_type": "singleInstance",
780
+ "description": "string",
781
+ "start_time": "1970-01-01T00:00:00.000Z",
782
+ "end_time": "1970-01-01T00:00:00.000Z",
783
+ "timezone": "string",
784
+ "is_all_day": true,
785
+ "location": "string",
786
+ "status": "free",
787
+ "busy": true,
788
+ "is_cancelled": true,
789
+ "sensitivity": "normal",
790
+ "importance": "low",
791
+ "is_online_meeting": true,
792
+ "online_meeting_url": "https://example.com/path",
793
+ "web_link": "https://example.com/path",
794
+ "response_status": "none",
795
+ "organizer_email": "user@example.com",
796
+ "attendees": [
797
+ {
798
+ "email": "user@example.com",
799
+ "name": "string",
800
+ "response": "none",
801
+ "type": "required"
802
+ }
803
+ ],
804
+ "is_recurring": true,
805
+ "series_master_id": "string",
806
+ "source": {
807
+ "type": "native",
808
+ "provider": "outlook",
809
+ "provider_event_id": "string",
810
+ "provider_event_url": "https://example.com/path",
811
+ "last_synced_at": "1970-01-01T00:00:00.000Z",
812
+ "etag": "string"
813
+ },
814
+ "_created_at": "1970-01-01T00:00:00.000Z",
815
+ "_updated_at": "1970-01-01T00:00:00.000Z"
816
+ }
817
+ ],
818
+ "next_cursor": "string"
819
+ }
820
+ ```
821
+
822
+ </details>
823
+
824
+ ---
825
+
826
+ ### `createEvent`
827
+
828
+ Create a native epilot calendar event.
829
+
830
+ `POST /v1/calendar/events`
831
+
832
+ ```ts
833
+ const { data } = await client.createEvent(
834
+ null,
835
+ {
836
+ calendar_id: 'string',
837
+ description: 'string',
838
+ start_time: '1970-01-01T00:00:00.000Z',
839
+ end_time: '1970-01-01T00:00:00.000Z',
840
+ timezone: 'string',
841
+ is_all_day: true,
842
+ location: 'string',
843
+ status: 'free',
844
+ sensitivity: 'normal',
845
+ _title: 'string'
846
+ },
847
+ )
848
+ ```
849
+
850
+ <details>
851
+ <summary>Response</summary>
852
+
853
+ ```json
854
+ {
855
+ "_id": "string",
856
+ "_schema": "calendar_event",
857
+ "_org": "string",
858
+ "_title": "string",
859
+ "_tags": ["string"],
860
+ "calendar_id": "string",
861
+ "event_type": "singleInstance",
862
+ "description": "string",
863
+ "start_time": "1970-01-01T00:00:00.000Z",
864
+ "end_time": "1970-01-01T00:00:00.000Z",
865
+ "timezone": "string",
866
+ "is_all_day": true,
867
+ "location": "string",
868
+ "status": "free",
869
+ "busy": true,
870
+ "is_cancelled": true,
871
+ "sensitivity": "normal",
872
+ "importance": "low",
873
+ "is_online_meeting": true,
874
+ "online_meeting_url": "https://example.com/path",
875
+ "web_link": "https://example.com/path",
876
+ "response_status": "none",
877
+ "organizer_email": "user@example.com",
878
+ "attendees": [
879
+ {
880
+ "email": "user@example.com",
881
+ "name": "string",
882
+ "response": "none",
883
+ "type": "required"
884
+ }
885
+ ],
886
+ "is_recurring": true,
887
+ "series_master_id": "string",
888
+ "source": {
889
+ "type": "native",
890
+ "provider": "outlook",
891
+ "provider_event_id": "string",
892
+ "provider_event_url": "https://example.com/path",
893
+ "last_synced_at": "1970-01-01T00:00:00.000Z",
894
+ "etag": "string"
129
895
  },
130
896
  "_created_at": "1970-01-01T00:00:00.000Z",
131
897
  "_updated_at": "1970-01-01T00:00:00.000Z"
@@ -136,19 +902,15 @@ const { data } = await client.getCalendar({
136
902
 
137
903
  ---
138
904
 
139
- ### `listEvents`
905
+ ### `getEvent`
140
906
 
141
- List events in a time window. Recurring events are returned as expanded occurrences – each instance appears as its own event.
907
+ Get a single event by its epilot ID.
142
908
 
143
- `GET /v1/calendar/events`
909
+ `GET /v1/calendar/events/{event_id}`
144
910
 
145
911
  ```ts
146
- const { data } = await client.listEvents({
147
- from: 'example',
148
- to: 'example',
149
- calendar_id: 'example',
150
- size: 1,
151
- cursor: 'example',
912
+ const { data } = await client.getEvent({
913
+ event_id: 'example',
152
914
  })
153
915
  ```
154
916
 
@@ -157,54 +919,49 @@ const { data } = await client.listEvents({
157
919
 
158
920
  ```json
159
921
  {
160
- "results": [
922
+ "_id": "string",
923
+ "_schema": "calendar_event",
924
+ "_org": "string",
925
+ "_title": "string",
926
+ "_tags": ["string"],
927
+ "calendar_id": "string",
928
+ "event_type": "singleInstance",
929
+ "description": "string",
930
+ "start_time": "1970-01-01T00:00:00.000Z",
931
+ "end_time": "1970-01-01T00:00:00.000Z",
932
+ "timezone": "string",
933
+ "is_all_day": true,
934
+ "location": "string",
935
+ "status": "free",
936
+ "busy": true,
937
+ "is_cancelled": true,
938
+ "sensitivity": "normal",
939
+ "importance": "low",
940
+ "is_online_meeting": true,
941
+ "online_meeting_url": "https://example.com/path",
942
+ "web_link": "https://example.com/path",
943
+ "response_status": "none",
944
+ "organizer_email": "user@example.com",
945
+ "attendees": [
161
946
  {
162
- "_id": "string",
163
- "_schema": "calendar_event",
164
- "_org": "string",
165
- "_title": "string",
166
- "_tags": ["string"],
167
- "calendar_id": "string",
168
- "event_type": "singleInstance",
169
- "description": "string",
170
- "start_time": "1970-01-01T00:00:00.000Z",
171
- "end_time": "1970-01-01T00:00:00.000Z",
172
- "timezone": "string",
173
- "is_all_day": true,
174
- "location": "string",
175
- "status": "free",
176
- "busy": true,
177
- "is_cancelled": true,
178
- "sensitivity": "normal",
179
- "importance": "low",
180
- "is_online_meeting": true,
181
- "online_meeting_url": "https://example.com/path",
182
- "web_link": "https://example.com/path",
183
- "response_status": "none",
184
- "organizer_email": "user@example.com",
185
- "attendees": [
186
- {
187
- "email": "user@example.com",
188
- "name": "string",
189
- "response": "none",
190
- "type": "required"
191
- }
192
- ],
193
- "is_recurring": true,
194
- "series_master_id": "string",
195
- "source": {
196
- "type": "native",
197
- "provider": "outlook",
198
- "provider_event_id": "string",
199
- "provider_event_url": "https://example.com/path",
200
- "last_synced_at": "1970-01-01T00:00:00.000Z",
201
- "etag": "string"
202
- },
203
- "_created_at": "1970-01-01T00:00:00.000Z",
204
- "_updated_at": "1970-01-01T00:00:00.000Z"
947
+ "email": "user@example.com",
948
+ "name": "string",
949
+ "response": "none",
950
+ "type": "required"
205
951
  }
206
952
  ],
207
- "next_cursor": "string"
953
+ "is_recurring": true,
954
+ "series_master_id": "string",
955
+ "source": {
956
+ "type": "native",
957
+ "provider": "outlook",
958
+ "provider_event_id": "string",
959
+ "provider_event_url": "https://example.com/path",
960
+ "last_synced_at": "1970-01-01T00:00:00.000Z",
961
+ "etag": "string"
962
+ },
963
+ "_created_at": "1970-01-01T00:00:00.000Z",
964
+ "_updated_at": "1970-01-01T00:00:00.000Z"
208
965
  }
209
966
  ```
210
967
 
@@ -212,16 +969,29 @@ const { data } = await client.listEvents({
212
969
 
213
970
  ---
214
971
 
215
- ### `getEvent`
972
+ ### `updateEvent`
216
973
 
217
- Get a single event by its epilot ID.
974
+ Update a native epilot calendar event.
218
975
 
219
- `GET /v1/calendar/events/{event_id}`
976
+ `PATCH /v1/calendar/events/{event_id}`
220
977
 
221
978
  ```ts
222
- const { data } = await client.getEvent({
223
- event_id: 'example',
224
- })
979
+ const { data } = await client.updateEvent(
980
+ {
981
+ event_id: 'example',
982
+ },
983
+ {
984
+ description: 'string',
985
+ start_time: '1970-01-01T00:00:00.000Z',
986
+ end_time: '1970-01-01T00:00:00.000Z',
987
+ timezone: 'string',
988
+ is_all_day: true,
989
+ location: 'string',
990
+ status: 'free',
991
+ sensitivity: 'normal',
992
+ _title: 'string'
993
+ },
994
+ )
225
995
  ```
226
996
 
227
997
  <details>
@@ -279,8 +1049,176 @@ const { data } = await client.getEvent({
279
1049
 
280
1050
  ---
281
1051
 
1052
+ ### `deleteEvent`
1053
+
1054
+ Delete a native epilot calendar event.
1055
+
1056
+ `DELETE /v1/calendar/events/{event_id}`
1057
+
1058
+ ```ts
1059
+ const { data } = await client.deleteEvent({
1060
+ event_id: 'example',
1061
+ })
1062
+ ```
1063
+
1064
+ ---
1065
+
1066
+ ### `shareEvent`
1067
+
1068
+ 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.
1069
+
1070
+ `POST /v1/calendar/events/{event_id}/share`
1071
+
1072
+ ```ts
1073
+ const { data } = await client.shareEvent(
1074
+ {
1075
+ event_id: 'example',
1076
+ },
1077
+ {
1078
+ user_id: 'string'
1079
+ },
1080
+ )
1081
+ ```
1082
+
1083
+ ---
1084
+
1085
+ ### `unshareEvent`
1086
+
1087
+ Revoke a per-event share. The recipient loses access immediately. Owner-only.
1088
+
1089
+ `DELETE /v1/calendar/events/{event_id}/share/{user_id}`
1090
+
1091
+ ```ts
1092
+ const { data } = await client.unshareEvent({
1093
+ event_id: 'example',
1094
+ user_id: 'example',
1095
+ })
1096
+ ```
1097
+
1098
+ ---
1099
+
282
1100
  ## Schemas
283
1101
 
1102
+ ### `AbsenceInterval`
1103
+
1104
+ ```ts
1105
+ type AbsenceInterval = {
1106
+ from: string // date-time
1107
+ to: string // date-time
1108
+ original_from: string // date-time
1109
+ original_to: string // date-time
1110
+ absent: boolean
1111
+ source: "calendar_event" | "absence_adjustment"
1112
+ calendar_event_id?: string
1113
+ absence_adjustment_id?: string
1114
+ reason?: string
1115
+ }
1116
+ ```
1117
+
1118
+ ### `AbsenceIntervalSource`
1119
+
1120
+ ```ts
1121
+ type AbsenceIntervalSource = "calendar_event" | "absence_adjustment"
1122
+ ```
1123
+
1124
+ ### `Error`
1125
+
1126
+ ```ts
1127
+ type Error = {
1128
+ status: number
1129
+ error: string | unknown[]
1130
+ }
1131
+ ```
1132
+
1133
+ ### `SearchAbsenceBody`
1134
+
1135
+ ```ts
1136
+ type SearchAbsenceBody = {
1137
+ from: string // date-time
1138
+ to: string // date-time
1139
+ user_ids: string[]
1140
+ include_busy?: boolean
1141
+ }
1142
+ ```
1143
+
1144
+ ### `SearchNowAbsenceBody`
1145
+
1146
+ ```ts
1147
+ type SearchNowAbsenceBody = {
1148
+ user_ids: string[]
1149
+ include_busy?: boolean
1150
+ }
1151
+ ```
1152
+
1153
+ ### `AbsenceAdjustment`
1154
+
1155
+ ```ts
1156
+ type AbsenceAdjustment = {
1157
+ from: string // date-time
1158
+ to: string // date-time
1159
+ absent: boolean
1160
+ status: "busy" | "oof"
1161
+ type?: string
1162
+ reason?: string
1163
+ adjustment_id: string
1164
+ user_id: string
1165
+ created_by: string
1166
+ created_at: string // date-time
1167
+ updated_at: string // date-time
1168
+ }
1169
+ ```
1170
+
1171
+ ### `AbsenceStatus`
1172
+
1173
+ Calendar status targeted by the absence adjustment.
1174
+
1175
+ ```ts
1176
+ type AbsenceStatus = "busy" | "oof"
1177
+ ```
1178
+
1179
+ ### `AbsenceType`
1180
+
1181
+ Optional producer-defined reference stored with an absence adjustment.
1182
+
1183
+ ```ts
1184
+ type AbsenceType = string
1185
+ ```
1186
+
1187
+ ### `CreateAbsenceAdjustmentBody`
1188
+
1189
+ ```ts
1190
+ type CreateAbsenceAdjustmentBody = {
1191
+ from: string // date-time
1192
+ to: string // date-time
1193
+ absent: boolean
1194
+ status: "busy" | "oof"
1195
+ type?: string
1196
+ reason?: string
1197
+ }
1198
+ ```
1199
+
1200
+ ### `PatchAbsenceAdjustmentBody`
1201
+
1202
+ ```ts
1203
+ type PatchAbsenceAdjustmentBody = {
1204
+ from?: string // date-time
1205
+ to?: string // date-time
1206
+ absent?: boolean
1207
+ status?: "busy" | "oof"
1208
+ type?: string
1209
+ reason?: string
1210
+ }
1211
+ ```
1212
+
1213
+ ### `ExternalCalendar`
1214
+
1215
+ ```ts
1216
+ type ExternalCalendar = {
1217
+ provider: "outlook" | "google"
1218
+ last_synced_at: string // date-time
1219
+ }
1220
+ ```
1221
+
284
1222
  ### `Calendar`
285
1223
 
286
1224
  ```ts
@@ -325,12 +1263,45 @@ Null for native epilot calendars
325
1263
  type Provider = "outlook" | "google" | null
326
1264
  ```
327
1265
 
328
- ### `Error`
1266
+ ### `CalendarCreateBody`
329
1267
 
330
1268
  ```ts
331
- type Error = {
332
- message: string
333
- code?: string
1269
+ type CalendarCreateBody = {
1270
+ name: string
1271
+ description?: string
1272
+ color?: string
1273
+ }
1274
+ ```
1275
+
1276
+ ### `AddOutlookCalendarRequest`
1277
+
1278
+ ```ts
1279
+ type AddOutlookCalendarRequest = {
1280
+ provider_calendar_id: string
1281
+ name?: string
1282
+ }
1283
+ ```
1284
+
1285
+ ### `AvailableOutlookCalendar`
1286
+
1287
+ ```ts
1288
+ type AvailableOutlookCalendar = {
1289
+ provider_calendar_id: string
1290
+ name: string
1291
+ color?: string
1292
+ is_default?: boolean
1293
+ can_edit?: boolean
1294
+ owner?: string
1295
+ }
1296
+ ```
1297
+
1298
+ ### `CalendarPatchBody`
1299
+
1300
+ ```ts
1301
+ type CalendarPatchBody = {
1302
+ name?: string
1303
+ description?: string
1304
+ color?: string
334
1305
  }
335
1306
  ```
336
1307
 
@@ -439,3 +1410,44 @@ type EventSource = {
439
1410
  etag?: string
440
1411
  }
441
1412
  ```
1413
+
1414
+ ### `CalendarEventCreateBody`
1415
+
1416
+ ```ts
1417
+ type CalendarEventCreateBody = {
1418
+ calendar_id: string
1419
+ description?: string
1420
+ start_time: string // date-time
1421
+ end_time: string // date-time
1422
+ timezone: string
1423
+ is_all_day: boolean
1424
+ location?: string
1425
+ status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"
1426
+ sensitivity: "normal" | "personal" | "private" | "confidential"
1427
+ _title: string
1428
+ }
1429
+ ```
1430
+
1431
+ ### `CalendarEventPatchBody`
1432
+
1433
+ ```ts
1434
+ type CalendarEventPatchBody = {
1435
+ description?: string
1436
+ start_time?: string // date-time
1437
+ end_time?: string // date-time
1438
+ timezone?: string
1439
+ is_all_day?: boolean
1440
+ location?: string
1441
+ status?: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"
1442
+ sensitivity?: "normal" | "personal" | "private" | "confidential"
1443
+ _title?: string
1444
+ }
1445
+ ```
1446
+
1447
+ ### `ShareEventBody`
1448
+
1449
+ ```ts
1450
+ type ShareEventBody = {
1451
+ user_id: string
1452
+ }
1453
+ ```