@epilot/cli 0.1.91 → 0.1.93
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/README.md +1 -1
- package/definitions/calendar.json +2346 -131
- package/definitions/entity.json +22 -1
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-MDWPNAOH.js → chunk-SOTT5WKJ.js} +31 -2
- package/dist/{completion-5ZPLEFT7.js → completion-IGVIBAFM.js} +1 -1
- package/dist/{upgrade-S7WKPMSU.js → upgrade-EMXIHRN3.js} +1 -1
- package/package.json +1 -1
|
@@ -3,16 +3,24 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Calendar API",
|
|
5
5
|
"version": "0.1.0",
|
|
6
|
-
"description": "epilot's calendar API.\n\nExposes calendars and events as first-class epilot resources
|
|
6
|
+
"description": "epilot's calendar API.\n\nExposes calendars and events as first-class epilot resources."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Absence",
|
|
11
|
+
"description": "User absence from calendar events and absence adjustments"
|
|
12
|
+
},
|
|
9
13
|
{
|
|
10
14
|
"name": "Calendars",
|
|
11
15
|
"description": "User and organization calendars"
|
|
12
16
|
},
|
|
13
17
|
{
|
|
14
|
-
"name": "Events",
|
|
18
|
+
"name": "Calendar Events",
|
|
15
19
|
"description": "Calendar events"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Working Hours",
|
|
23
|
+
"description": "Recurring weekly working hours of users"
|
|
16
24
|
}
|
|
17
25
|
],
|
|
18
26
|
"servers": [
|
|
@@ -29,94 +37,326 @@
|
|
|
29
37
|
}
|
|
30
38
|
],
|
|
31
39
|
"paths": {
|
|
32
|
-
"/v1/calendar": {
|
|
40
|
+
"/v1/calendar/absence/users": {
|
|
33
41
|
"get": {
|
|
34
|
-
"operationId": "
|
|
35
|
-
"summary": "
|
|
36
|
-
"description": "List
|
|
42
|
+
"operationId": "listUsersAbsence",
|
|
43
|
+
"summary": "listUsersAbsence",
|
|
44
|
+
"description": "List organization users with known absence metadata in the requested time window.",
|
|
37
45
|
"tags": [
|
|
38
|
-
"
|
|
46
|
+
"Absence"
|
|
39
47
|
],
|
|
40
48
|
"parameters": [
|
|
41
49
|
{
|
|
42
50
|
"in": "query",
|
|
43
|
-
"name": "
|
|
51
|
+
"name": "from",
|
|
52
|
+
"description": "Start of the time window (inclusive). Maximum window: 31 days.",
|
|
53
|
+
"schema": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"format": "date-time",
|
|
56
|
+
"description": "Start of the time window (inclusive). Maximum window: 31 days."
|
|
57
|
+
},
|
|
58
|
+
"required": true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"in": "query",
|
|
62
|
+
"name": "to",
|
|
63
|
+
"description": "End of the time window (exclusive). Must be after from.",
|
|
64
|
+
"schema": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": "date-time",
|
|
67
|
+
"description": "End of the time window (exclusive). Must be after from."
|
|
68
|
+
},
|
|
69
|
+
"required": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"in": "query",
|
|
73
|
+
"name": "include_busy",
|
|
74
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
75
|
+
"schema": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
78
|
+
"default": false
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"in": "query",
|
|
83
|
+
"name": "working_hours_granularity",
|
|
84
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
85
|
+
"schema": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": [
|
|
88
|
+
"time",
|
|
89
|
+
"day"
|
|
90
|
+
],
|
|
91
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
92
|
+
"default": "time"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"in": "query",
|
|
97
|
+
"name": "query",
|
|
98
|
+
"description": "Optional user directory search query.",
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Optional user directory search query."
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"in": "query",
|
|
106
|
+
"name": "limit",
|
|
107
|
+
"description": "Maximum users to return.",
|
|
44
108
|
"schema": {
|
|
45
109
|
"type": "integer",
|
|
46
110
|
"minimum": 1,
|
|
47
|
-
"maximum":
|
|
111
|
+
"maximum": 100,
|
|
112
|
+
"description": "Maximum users to return."
|
|
48
113
|
}
|
|
49
114
|
},
|
|
50
115
|
{
|
|
51
116
|
"in": "query",
|
|
52
|
-
"name": "
|
|
53
|
-
"description": "
|
|
117
|
+
"name": "offset",
|
|
118
|
+
"description": "User directory offset.",
|
|
54
119
|
"schema": {
|
|
55
|
-
"type": "
|
|
56
|
-
"
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"minimum": 0,
|
|
122
|
+
"description": "User directory offset."
|
|
57
123
|
}
|
|
58
124
|
}
|
|
59
125
|
],
|
|
60
126
|
"responses": {
|
|
61
127
|
"200": {
|
|
62
|
-
"description": "
|
|
128
|
+
"description": "Organization users absence",
|
|
63
129
|
"content": {
|
|
64
130
|
"application/json": {
|
|
65
131
|
"schema": {
|
|
66
132
|
"type": "object",
|
|
67
133
|
"properties": {
|
|
134
|
+
"from": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"format": "date-time"
|
|
137
|
+
},
|
|
138
|
+
"to": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"format": "date-time"
|
|
141
|
+
},
|
|
142
|
+
"hits": {
|
|
143
|
+
"type": "integer",
|
|
144
|
+
"minimum": 0
|
|
145
|
+
},
|
|
68
146
|
"results": {
|
|
69
147
|
"type": "array",
|
|
70
148
|
"items": {
|
|
71
|
-
"
|
|
149
|
+
"type": "object",
|
|
150
|
+
"properties": {
|
|
151
|
+
"absent": {
|
|
152
|
+
"type": "boolean"
|
|
153
|
+
},
|
|
154
|
+
"absence_intervals": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"$ref": "#/components/schemas/AbsenceInterval"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"user_id": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
"display_name": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"nullable": true
|
|
166
|
+
},
|
|
167
|
+
"email": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"nullable": true,
|
|
170
|
+
"format": "email"
|
|
171
|
+
},
|
|
172
|
+
"status": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"nullable": true
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"absent",
|
|
179
|
+
"absence_intervals",
|
|
180
|
+
"user_id"
|
|
181
|
+
]
|
|
72
182
|
}
|
|
73
|
-
},
|
|
74
|
-
"next_cursor": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"nullable": true
|
|
77
183
|
}
|
|
78
184
|
},
|
|
79
185
|
"required": [
|
|
186
|
+
"from",
|
|
187
|
+
"to",
|
|
188
|
+
"hits",
|
|
80
189
|
"results"
|
|
81
190
|
]
|
|
82
191
|
}
|
|
83
192
|
}
|
|
84
193
|
}
|
|
194
|
+
},
|
|
195
|
+
"400": {
|
|
196
|
+
"description": "Invalid request",
|
|
197
|
+
"content": {
|
|
198
|
+
"application/json": {
|
|
199
|
+
"schema": {
|
|
200
|
+
"$ref": "#/components/schemas/Error"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
85
204
|
}
|
|
86
205
|
}
|
|
87
206
|
}
|
|
88
207
|
},
|
|
89
|
-
"/v1/calendar/
|
|
90
|
-
"
|
|
91
|
-
"operationId": "
|
|
92
|
-
"summary": "
|
|
93
|
-
"description": "
|
|
208
|
+
"/v1/calendar/absence:search": {
|
|
209
|
+
"post": {
|
|
210
|
+
"operationId": "searchAbsence",
|
|
211
|
+
"summary": "searchAbsence",
|
|
212
|
+
"description": "Search known absence for candidate users in the requested time window.",
|
|
94
213
|
"tags": [
|
|
95
|
-
"
|
|
214
|
+
"Absence"
|
|
96
215
|
],
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
216
|
+
"requestBody": {
|
|
217
|
+
"required": true,
|
|
218
|
+
"content": {
|
|
219
|
+
"application/json": {
|
|
220
|
+
"schema": {
|
|
221
|
+
"$ref": "#/components/schemas/SearchAbsenceBody"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"responses": {
|
|
227
|
+
"200": {
|
|
228
|
+
"description": "Users absence",
|
|
229
|
+
"content": {
|
|
230
|
+
"application/json": {
|
|
231
|
+
"schema": {
|
|
232
|
+
"type": "object",
|
|
233
|
+
"properties": {
|
|
234
|
+
"from": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"format": "date-time"
|
|
237
|
+
},
|
|
238
|
+
"to": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"format": "date-time"
|
|
241
|
+
},
|
|
242
|
+
"users": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"absent": {
|
|
248
|
+
"type": "boolean"
|
|
249
|
+
},
|
|
250
|
+
"absence_intervals": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"$ref": "#/components/schemas/AbsenceInterval"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": [
|
|
258
|
+
"absent",
|
|
259
|
+
"absence_intervals"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": [
|
|
265
|
+
"from",
|
|
266
|
+
"to",
|
|
267
|
+
"users"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"400": {
|
|
274
|
+
"description": "Invalid request body",
|
|
275
|
+
"content": {
|
|
276
|
+
"application/json": {
|
|
277
|
+
"schema": {
|
|
278
|
+
"$ref": "#/components/schemas/Error"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
105
282
|
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"/v1/calendar/absence:search-now": {
|
|
287
|
+
"post": {
|
|
288
|
+
"operationId": "searchNowAbsence",
|
|
289
|
+
"summary": "searchNowAbsence",
|
|
290
|
+
"description": "Search known absence for candidate users at the current server time.",
|
|
291
|
+
"tags": [
|
|
292
|
+
"Absence"
|
|
106
293
|
],
|
|
294
|
+
"requestBody": {
|
|
295
|
+
"required": true,
|
|
296
|
+
"content": {
|
|
297
|
+
"application/json": {
|
|
298
|
+
"schema": {
|
|
299
|
+
"$ref": "#/components/schemas/SearchNowAbsenceBody"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
107
304
|
"responses": {
|
|
108
305
|
"200": {
|
|
109
|
-
"description": "
|
|
306
|
+
"description": "Users current absence",
|
|
110
307
|
"content": {
|
|
111
308
|
"application/json": {
|
|
112
309
|
"schema": {
|
|
113
|
-
"
|
|
310
|
+
"type": "object",
|
|
311
|
+
"properties": {
|
|
312
|
+
"from": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"format": "date-time"
|
|
315
|
+
},
|
|
316
|
+
"to": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"format": "date-time"
|
|
319
|
+
},
|
|
320
|
+
"users": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"additionalProperties": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"properties": {
|
|
325
|
+
"absent": {
|
|
326
|
+
"type": "boolean"
|
|
327
|
+
},
|
|
328
|
+
"absence_intervals": {
|
|
329
|
+
"type": "array",
|
|
330
|
+
"items": {
|
|
331
|
+
"$ref": "#/components/schemas/AbsenceInterval"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"absent_until": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"nullable": true,
|
|
337
|
+
"format": "date-time",
|
|
338
|
+
"description": "End of the currently active absence interval, or null when the user is not absent."
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": [
|
|
342
|
+
"absent",
|
|
343
|
+
"absence_intervals",
|
|
344
|
+
"absent_until"
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"required": [
|
|
350
|
+
"from",
|
|
351
|
+
"to",
|
|
352
|
+
"users"
|
|
353
|
+
]
|
|
114
354
|
}
|
|
115
355
|
}
|
|
116
356
|
}
|
|
117
357
|
},
|
|
118
|
-
"
|
|
119
|
-
"description": "
|
|
358
|
+
"400": {
|
|
359
|
+
"description": "Invalid request body",
|
|
120
360
|
"content": {
|
|
121
361
|
"application/json": {
|
|
122
362
|
"schema": {
|
|
@@ -128,83 +368,73 @@
|
|
|
128
368
|
}
|
|
129
369
|
}
|
|
130
370
|
},
|
|
131
|
-
"/v1/calendar/
|
|
371
|
+
"/v1/calendar/absence/users/{user_id}/adjustments": {
|
|
132
372
|
"get": {
|
|
133
|
-
"operationId": "
|
|
134
|
-
"summary": "
|
|
135
|
-
"description": "List
|
|
373
|
+
"operationId": "listAbsenceAdjustments",
|
|
374
|
+
"summary": "listAbsenceAdjustments",
|
|
375
|
+
"description": "List absence adjustments for a user in a time window.",
|
|
136
376
|
"tags": [
|
|
137
|
-
"
|
|
377
|
+
"Absence"
|
|
138
378
|
],
|
|
139
379
|
"parameters": [
|
|
140
380
|
{
|
|
141
|
-
"in": "
|
|
142
|
-
"name": "
|
|
143
|
-
"description": "Start of the time window (inclusive)",
|
|
381
|
+
"in": "path",
|
|
382
|
+
"name": "user_id",
|
|
144
383
|
"schema": {
|
|
145
384
|
"type": "string",
|
|
146
|
-
"
|
|
147
|
-
"description": "Start of the time window (inclusive)"
|
|
385
|
+
"minLength": 1
|
|
148
386
|
},
|
|
149
387
|
"required": true
|
|
150
388
|
},
|
|
151
389
|
{
|
|
152
390
|
"in": "query",
|
|
153
|
-
"name": "
|
|
154
|
-
"description": "
|
|
391
|
+
"name": "from",
|
|
392
|
+
"description": "Start of the time window (inclusive). Maximum window: 90 days.",
|
|
155
393
|
"schema": {
|
|
156
394
|
"type": "string",
|
|
157
395
|
"format": "date-time",
|
|
158
|
-
"description": "
|
|
396
|
+
"description": "Start of the time window (inclusive). Maximum window: 90 days."
|
|
159
397
|
},
|
|
160
398
|
"required": true
|
|
161
399
|
},
|
|
162
400
|
{
|
|
163
401
|
"in": "query",
|
|
164
|
-
"name": "
|
|
165
|
-
"description": "
|
|
402
|
+
"name": "to",
|
|
403
|
+
"description": "End of the time window (exclusive). Must be after from.",
|
|
166
404
|
"schema": {
|
|
167
405
|
"type": "string",
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"in": "query",
|
|
173
|
-
"name": "size",
|
|
174
|
-
"schema": {
|
|
175
|
-
"type": "integer",
|
|
176
|
-
"minimum": 1,
|
|
177
|
-
"maximum": 250
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"in": "query",
|
|
182
|
-
"name": "cursor",
|
|
183
|
-
"schema": {
|
|
184
|
-
"type": "string"
|
|
185
|
-
}
|
|
406
|
+
"format": "date-time",
|
|
407
|
+
"description": "End of the time window (exclusive). Must be after from."
|
|
408
|
+
},
|
|
409
|
+
"required": true
|
|
186
410
|
}
|
|
187
411
|
],
|
|
188
412
|
"responses": {
|
|
189
413
|
"200": {
|
|
190
|
-
"description": "
|
|
414
|
+
"description": "Absence adjustments",
|
|
191
415
|
"content": {
|
|
192
416
|
"application/json": {
|
|
193
417
|
"schema": {
|
|
194
418
|
"type": "object",
|
|
195
419
|
"properties": {
|
|
420
|
+
"from": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"format": "date-time"
|
|
423
|
+
},
|
|
424
|
+
"to": {
|
|
425
|
+
"type": "string",
|
|
426
|
+
"format": "date-time"
|
|
427
|
+
},
|
|
196
428
|
"results": {
|
|
197
429
|
"type": "array",
|
|
198
430
|
"items": {
|
|
199
|
-
"$ref": "#/components/schemas/
|
|
431
|
+
"$ref": "#/components/schemas/AbsenceAdjustment"
|
|
200
432
|
}
|
|
201
|
-
},
|
|
202
|
-
"next_cursor": {
|
|
203
|
-
"type": "string",
|
|
204
|
-
"nullable": true
|
|
205
433
|
}
|
|
206
434
|
},
|
|
207
435
|
"required": [
|
|
436
|
+
"from",
|
|
437
|
+
"to",
|
|
208
438
|
"results"
|
|
209
439
|
]
|
|
210
440
|
}
|
|
@@ -222,66 +452,1861 @@
|
|
|
222
452
|
}
|
|
223
453
|
}
|
|
224
454
|
}
|
|
455
|
+
},
|
|
456
|
+
"post": {
|
|
457
|
+
"operationId": "createAbsenceAdjustment",
|
|
458
|
+
"summary": "createAbsenceAdjustment",
|
|
459
|
+
"description": "Create a time-bound absence adjustment for a user in the caller organization.",
|
|
460
|
+
"tags": [
|
|
461
|
+
"Absence"
|
|
462
|
+
],
|
|
463
|
+
"parameters": [
|
|
464
|
+
{
|
|
465
|
+
"in": "path",
|
|
466
|
+
"name": "user_id",
|
|
467
|
+
"schema": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"minLength": 1
|
|
470
|
+
},
|
|
471
|
+
"required": true
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
"requestBody": {
|
|
475
|
+
"required": true,
|
|
476
|
+
"content": {
|
|
477
|
+
"application/json": {
|
|
478
|
+
"schema": {
|
|
479
|
+
"$ref": "#/components/schemas/CreateAbsenceAdjustmentBody"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"responses": {
|
|
485
|
+
"201": {
|
|
486
|
+
"description": "Created absence adjustment",
|
|
487
|
+
"content": {
|
|
488
|
+
"application/json": {
|
|
489
|
+
"schema": {
|
|
490
|
+
"$ref": "#/components/schemas/AbsenceAdjustment"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"400": {
|
|
496
|
+
"description": "Invalid request body",
|
|
497
|
+
"content": {
|
|
498
|
+
"application/json": {
|
|
499
|
+
"schema": {
|
|
500
|
+
"$ref": "#/components/schemas/Error"
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
225
506
|
}
|
|
226
507
|
},
|
|
227
|
-
"/v1/calendar/
|
|
508
|
+
"/v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}": {
|
|
228
509
|
"get": {
|
|
229
|
-
"operationId": "
|
|
230
|
-
"summary": "
|
|
231
|
-
"description": "Get
|
|
510
|
+
"operationId": "getAbsenceAdjustment",
|
|
511
|
+
"summary": "getAbsenceAdjustment",
|
|
512
|
+
"description": "Get an absence adjustment by ID.",
|
|
232
513
|
"tags": [
|
|
233
|
-
"
|
|
514
|
+
"Absence"
|
|
515
|
+
],
|
|
516
|
+
"parameters": [
|
|
517
|
+
{
|
|
518
|
+
"in": "path",
|
|
519
|
+
"name": "user_id",
|
|
520
|
+
"schema": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"minLength": 1
|
|
523
|
+
},
|
|
524
|
+
"required": true
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"in": "path",
|
|
528
|
+
"name": "adjustment_id",
|
|
529
|
+
"schema": {
|
|
530
|
+
"type": "string",
|
|
531
|
+
"minLength": 1
|
|
532
|
+
},
|
|
533
|
+
"required": true
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
"responses": {
|
|
537
|
+
"200": {
|
|
538
|
+
"description": "Absence adjustment",
|
|
539
|
+
"content": {
|
|
540
|
+
"application/json": {
|
|
541
|
+
"schema": {
|
|
542
|
+
"$ref": "#/components/schemas/AbsenceAdjustment"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"404": {
|
|
548
|
+
"description": "Not found",
|
|
549
|
+
"content": {
|
|
550
|
+
"application/json": {
|
|
551
|
+
"schema": {
|
|
552
|
+
"$ref": "#/components/schemas/Error"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"patch": {
|
|
560
|
+
"operationId": "patchAbsenceAdjustment",
|
|
561
|
+
"summary": "patchAbsenceAdjustment",
|
|
562
|
+
"description": "Update an absence adjustment in the caller organization.",
|
|
563
|
+
"tags": [
|
|
564
|
+
"Absence"
|
|
565
|
+
],
|
|
566
|
+
"parameters": [
|
|
567
|
+
{
|
|
568
|
+
"in": "path",
|
|
569
|
+
"name": "user_id",
|
|
570
|
+
"schema": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"minLength": 1
|
|
573
|
+
},
|
|
574
|
+
"required": true
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"in": "path",
|
|
578
|
+
"name": "adjustment_id",
|
|
579
|
+
"schema": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"minLength": 1
|
|
582
|
+
},
|
|
583
|
+
"required": true
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
"requestBody": {
|
|
587
|
+
"required": true,
|
|
588
|
+
"content": {
|
|
589
|
+
"application/json": {
|
|
590
|
+
"schema": {
|
|
591
|
+
"$ref": "#/components/schemas/PatchAbsenceAdjustmentBody"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
"responses": {
|
|
597
|
+
"200": {
|
|
598
|
+
"description": "Updated absence adjustment",
|
|
599
|
+
"content": {
|
|
600
|
+
"application/json": {
|
|
601
|
+
"schema": {
|
|
602
|
+
"$ref": "#/components/schemas/AbsenceAdjustment"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
"400": {
|
|
608
|
+
"description": "Invalid request body",
|
|
609
|
+
"content": {
|
|
610
|
+
"application/json": {
|
|
611
|
+
"schema": {
|
|
612
|
+
"$ref": "#/components/schemas/Error"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"404": {
|
|
618
|
+
"description": "Not found",
|
|
619
|
+
"content": {
|
|
620
|
+
"application/json": {
|
|
621
|
+
"schema": {
|
|
622
|
+
"$ref": "#/components/schemas/Error"
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"delete": {
|
|
630
|
+
"operationId": "deleteAbsenceAdjustment",
|
|
631
|
+
"summary": "deleteAbsenceAdjustment",
|
|
632
|
+
"description": "Delete an absence adjustment.",
|
|
633
|
+
"tags": [
|
|
634
|
+
"Absence"
|
|
635
|
+
],
|
|
636
|
+
"parameters": [
|
|
637
|
+
{
|
|
638
|
+
"in": "path",
|
|
639
|
+
"name": "user_id",
|
|
640
|
+
"schema": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"minLength": 1
|
|
643
|
+
},
|
|
644
|
+
"required": true
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"in": "path",
|
|
648
|
+
"name": "adjustment_id",
|
|
649
|
+
"schema": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"minLength": 1
|
|
652
|
+
},
|
|
653
|
+
"required": true
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"responses": {
|
|
657
|
+
"204": {
|
|
658
|
+
"description": "Absence adjustment deleted"
|
|
659
|
+
},
|
|
660
|
+
"404": {
|
|
661
|
+
"description": "Not found",
|
|
662
|
+
"content": {
|
|
663
|
+
"application/json": {
|
|
664
|
+
"schema": {
|
|
665
|
+
"$ref": "#/components/schemas/Error"
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"/v1/calendar/absence/users/{user_id}": {
|
|
674
|
+
"get": {
|
|
675
|
+
"operationId": "getUserAbsence",
|
|
676
|
+
"summary": "getUserAbsence",
|
|
677
|
+
"description": "Get known absence for a user in a time window. absent=false means no known absence, not guaranteed availability.",
|
|
678
|
+
"tags": [
|
|
679
|
+
"Absence"
|
|
680
|
+
],
|
|
681
|
+
"parameters": [
|
|
682
|
+
{
|
|
683
|
+
"in": "path",
|
|
684
|
+
"name": "user_id",
|
|
685
|
+
"schema": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"minLength": 1
|
|
688
|
+
},
|
|
689
|
+
"required": true
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"in": "query",
|
|
693
|
+
"name": "from",
|
|
694
|
+
"description": "Start of the time window (inclusive). Maximum window: 31 days.",
|
|
695
|
+
"schema": {
|
|
696
|
+
"type": "string",
|
|
697
|
+
"format": "date-time",
|
|
698
|
+
"description": "Start of the time window (inclusive). Maximum window: 31 days."
|
|
699
|
+
},
|
|
700
|
+
"required": true
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"in": "query",
|
|
704
|
+
"name": "to",
|
|
705
|
+
"description": "End of the time window (exclusive). Must be after from.",
|
|
706
|
+
"schema": {
|
|
707
|
+
"type": "string",
|
|
708
|
+
"format": "date-time",
|
|
709
|
+
"description": "End of the time window (exclusive). Must be after from."
|
|
710
|
+
},
|
|
711
|
+
"required": true
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"in": "query",
|
|
715
|
+
"name": "include_busy",
|
|
716
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
717
|
+
"schema": {
|
|
718
|
+
"type": "boolean",
|
|
719
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
720
|
+
"default": false
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"in": "query",
|
|
725
|
+
"name": "working_hours_granularity",
|
|
726
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
727
|
+
"schema": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"enum": [
|
|
730
|
+
"time",
|
|
731
|
+
"day"
|
|
732
|
+
],
|
|
733
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
734
|
+
"default": "time"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
"responses": {
|
|
739
|
+
"200": {
|
|
740
|
+
"description": "User absence",
|
|
741
|
+
"content": {
|
|
742
|
+
"application/json": {
|
|
743
|
+
"schema": {
|
|
744
|
+
"type": "object",
|
|
745
|
+
"properties": {
|
|
746
|
+
"absent": {
|
|
747
|
+
"type": "boolean"
|
|
748
|
+
},
|
|
749
|
+
"absence_intervals": {
|
|
750
|
+
"type": "array",
|
|
751
|
+
"items": {
|
|
752
|
+
"$ref": "#/components/schemas/AbsenceInterval"
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"from": {
|
|
756
|
+
"type": "string",
|
|
757
|
+
"format": "date-time"
|
|
758
|
+
},
|
|
759
|
+
"to": {
|
|
760
|
+
"type": "string",
|
|
761
|
+
"format": "date-time"
|
|
762
|
+
},
|
|
763
|
+
"user_id": {
|
|
764
|
+
"type": "string"
|
|
765
|
+
},
|
|
766
|
+
"external_calendars": {
|
|
767
|
+
"type": "array",
|
|
768
|
+
"items": {
|
|
769
|
+
"$ref": "#/components/schemas/ExternalCalendar"
|
|
770
|
+
},
|
|
771
|
+
"description": "The user's connected external calendars (Outlook/Google), if any."
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"required": [
|
|
775
|
+
"absent",
|
|
776
|
+
"absence_intervals",
|
|
777
|
+
"from",
|
|
778
|
+
"to",
|
|
779
|
+
"user_id"
|
|
780
|
+
]
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"400": {
|
|
786
|
+
"description": "Invalid request",
|
|
787
|
+
"content": {
|
|
788
|
+
"application/json": {
|
|
789
|
+
"schema": {
|
|
790
|
+
"$ref": "#/components/schemas/Error"
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
"/v1/calendar/working-hours/users/{user_id}": {
|
|
799
|
+
"get": {
|
|
800
|
+
"operationId": "getWorkingHours",
|
|
801
|
+
"summary": "getWorkingHours",
|
|
802
|
+
"description": "Get the recurring weekly working hours of a user. 404 means no record exists and the user is treated as always available.",
|
|
803
|
+
"tags": [
|
|
804
|
+
"Working Hours"
|
|
805
|
+
],
|
|
806
|
+
"parameters": [
|
|
807
|
+
{
|
|
808
|
+
"in": "path",
|
|
809
|
+
"name": "user_id",
|
|
810
|
+
"schema": {
|
|
811
|
+
"type": "string",
|
|
812
|
+
"minLength": 1
|
|
813
|
+
},
|
|
814
|
+
"required": true
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"responses": {
|
|
818
|
+
"200": {
|
|
819
|
+
"description": "Working hours",
|
|
820
|
+
"content": {
|
|
821
|
+
"application/json": {
|
|
822
|
+
"schema": {
|
|
823
|
+
"$ref": "#/components/schemas/WorkingHours"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"404": {
|
|
829
|
+
"description": "Not found",
|
|
830
|
+
"content": {
|
|
831
|
+
"application/json": {
|
|
832
|
+
"schema": {
|
|
833
|
+
"$ref": "#/components/schemas/Error"
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
"put": {
|
|
841
|
+
"operationId": "putWorkingHours",
|
|
842
|
+
"summary": "putWorkingHours",
|
|
843
|
+
"description": "Create or fully replace the working hours of a user in the caller organization. This is a full replace, not a merge.",
|
|
844
|
+
"tags": [
|
|
845
|
+
"Working Hours"
|
|
846
|
+
],
|
|
847
|
+
"parameters": [
|
|
848
|
+
{
|
|
849
|
+
"in": "path",
|
|
850
|
+
"name": "user_id",
|
|
851
|
+
"schema": {
|
|
852
|
+
"type": "string",
|
|
853
|
+
"minLength": 1
|
|
854
|
+
},
|
|
855
|
+
"required": true
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
"requestBody": {
|
|
859
|
+
"required": true,
|
|
860
|
+
"content": {
|
|
861
|
+
"application/json": {
|
|
862
|
+
"schema": {
|
|
863
|
+
"$ref": "#/components/schemas/UpsertWorkingHoursBody"
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
"responses": {
|
|
869
|
+
"200": {
|
|
870
|
+
"description": "Stored working hours",
|
|
871
|
+
"content": {
|
|
872
|
+
"application/json": {
|
|
873
|
+
"schema": {
|
|
874
|
+
"$ref": "#/components/schemas/WorkingHours"
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"400": {
|
|
880
|
+
"description": "Invalid request body",
|
|
881
|
+
"content": {
|
|
882
|
+
"application/json": {
|
|
883
|
+
"schema": {
|
|
884
|
+
"$ref": "#/components/schemas/Error"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
"delete": {
|
|
892
|
+
"operationId": "deleteWorkingHours",
|
|
893
|
+
"summary": "deleteWorkingHours",
|
|
894
|
+
"description": "Delete the working hours of a user. The user is then treated as always available again.",
|
|
895
|
+
"tags": [
|
|
896
|
+
"Working Hours"
|
|
897
|
+
],
|
|
898
|
+
"parameters": [
|
|
899
|
+
{
|
|
900
|
+
"in": "path",
|
|
901
|
+
"name": "user_id",
|
|
902
|
+
"schema": {
|
|
903
|
+
"type": "string",
|
|
904
|
+
"minLength": 1
|
|
905
|
+
},
|
|
906
|
+
"required": true
|
|
907
|
+
}
|
|
908
|
+
],
|
|
909
|
+
"responses": {
|
|
910
|
+
"204": {
|
|
911
|
+
"description": "Working hours deleted"
|
|
912
|
+
},
|
|
913
|
+
"404": {
|
|
914
|
+
"description": "Not found",
|
|
915
|
+
"content": {
|
|
916
|
+
"application/json": {
|
|
917
|
+
"schema": {
|
|
918
|
+
"$ref": "#/components/schemas/Error"
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"/v1/calendar": {
|
|
927
|
+
"get": {
|
|
928
|
+
"operationId": "listCalendars",
|
|
929
|
+
"summary": "listCalendars",
|
|
930
|
+
"description": "List calendars visible to the caller.",
|
|
931
|
+
"tags": [
|
|
932
|
+
"Calendars"
|
|
933
|
+
],
|
|
934
|
+
"parameters": [
|
|
935
|
+
{
|
|
936
|
+
"in": "query",
|
|
937
|
+
"name": "size",
|
|
938
|
+
"schema": {
|
|
939
|
+
"type": "integer",
|
|
940
|
+
"minimum": 1,
|
|
941
|
+
"maximum": 250
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"in": "query",
|
|
946
|
+
"name": "cursor",
|
|
947
|
+
"description": "Opaque cursor from a previous response",
|
|
948
|
+
"schema": {
|
|
949
|
+
"type": "string",
|
|
950
|
+
"description": "Opaque cursor from a previous response"
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
"responses": {
|
|
955
|
+
"200": {
|
|
956
|
+
"description": "List of calendars",
|
|
957
|
+
"content": {
|
|
958
|
+
"application/json": {
|
|
959
|
+
"schema": {
|
|
960
|
+
"type": "object",
|
|
961
|
+
"properties": {
|
|
962
|
+
"results": {
|
|
963
|
+
"type": "array",
|
|
964
|
+
"items": {
|
|
965
|
+
"$ref": "#/components/schemas/Calendar"
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"next_cursor": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"nullable": true
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"required": [
|
|
974
|
+
"results"
|
|
975
|
+
]
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"post": {
|
|
983
|
+
"operationId": "createCalendar",
|
|
984
|
+
"summary": "createCalendar",
|
|
985
|
+
"description": "Create a native epilot calendar.",
|
|
986
|
+
"tags": [
|
|
987
|
+
"Calendars"
|
|
988
|
+
],
|
|
989
|
+
"requestBody": {
|
|
990
|
+
"required": true,
|
|
991
|
+
"content": {
|
|
992
|
+
"application/json": {
|
|
993
|
+
"schema": {
|
|
994
|
+
"$ref": "#/components/schemas/CalendarCreateBody"
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
},
|
|
999
|
+
"responses": {
|
|
1000
|
+
"201": {
|
|
1001
|
+
"description": "Calendar created",
|
|
1002
|
+
"content": {
|
|
1003
|
+
"application/json": {
|
|
1004
|
+
"schema": {
|
|
1005
|
+
"$ref": "#/components/schemas/Calendar"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
"400": {
|
|
1011
|
+
"description": "Invalid request body",
|
|
1012
|
+
"content": {
|
|
1013
|
+
"application/json": {
|
|
1014
|
+
"schema": {
|
|
1015
|
+
"$ref": "#/components/schemas/Error"
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
"/v1/calendar/sources/outlook": {
|
|
1024
|
+
"post": {
|
|
1025
|
+
"operationId": "addOutlookCalendar",
|
|
1026
|
+
"summary": "addOutlookCalendar",
|
|
1027
|
+
"description": "Registers one of the caller's Outlook calendars as an epilot calendar.\n\nThe returned calendar resource carries `source.provider=outlook` and the\nprovider calendar id, so subsequent reads through `GET /v1/calendar` /\n`GET /v1/calendar/events` route through the sync provider.",
|
|
1028
|
+
"tags": [
|
|
1029
|
+
"Calendars"
|
|
1030
|
+
],
|
|
1031
|
+
"requestBody": {
|
|
1032
|
+
"required": true,
|
|
1033
|
+
"content": {
|
|
1034
|
+
"application/json": {
|
|
1035
|
+
"schema": {
|
|
1036
|
+
"$ref": "#/components/schemas/AddOutlookCalendarRequest"
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
"responses": {
|
|
1042
|
+
"201": {
|
|
1043
|
+
"description": "Calendar created",
|
|
1044
|
+
"content": {
|
|
1045
|
+
"application/json": {
|
|
1046
|
+
"schema": {
|
|
1047
|
+
"$ref": "#/components/schemas/Calendar"
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"400": {
|
|
1053
|
+
"description": "Invalid request body",
|
|
1054
|
+
"content": {
|
|
1055
|
+
"application/json": {
|
|
1056
|
+
"schema": {
|
|
1057
|
+
"$ref": "#/components/schemas/Error"
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
"404": {
|
|
1063
|
+
"description": "Caller has not connected their personal Outlook calendar yet",
|
|
1064
|
+
"content": {
|
|
1065
|
+
"application/json": {
|
|
1066
|
+
"schema": {
|
|
1067
|
+
"$ref": "#/components/schemas/Error"
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
"/v1/calendar/sources/outlook/available": {
|
|
1076
|
+
"get": {
|
|
1077
|
+
"operationId": "listOutlookCalendars",
|
|
1078
|
+
"summary": "listOutlookCalendars",
|
|
1079
|
+
"description": "Lists the calling user's Outlook calendars available to import as epilot calendars.\n\nRequires the caller to have a personal Outlook calendar connection (created via the\nOAuth flow on email-settings: `POST /v2/outlook/connect { \"calendar\": true }`).",
|
|
1080
|
+
"tags": [
|
|
1081
|
+
"Calendars"
|
|
1082
|
+
],
|
|
1083
|
+
"responses": {
|
|
1084
|
+
"200": {
|
|
1085
|
+
"description": "List of available Outlook calendars",
|
|
1086
|
+
"content": {
|
|
1087
|
+
"application/json": {
|
|
1088
|
+
"schema": {
|
|
1089
|
+
"type": "object",
|
|
1090
|
+
"properties": {
|
|
1091
|
+
"calendars": {
|
|
1092
|
+
"type": "array",
|
|
1093
|
+
"items": {
|
|
1094
|
+
"$ref": "#/components/schemas/AvailableOutlookCalendar"
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"required": [
|
|
1099
|
+
"calendars"
|
|
1100
|
+
]
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
"404": {
|
|
1106
|
+
"description": "Caller has not connected their personal Outlook calendar yet",
|
|
1107
|
+
"content": {
|
|
1108
|
+
"application/json": {
|
|
1109
|
+
"schema": {
|
|
1110
|
+
"$ref": "#/components/schemas/Error"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
"/v1/calendar/sources/outlook/{calendar_id}": {
|
|
1119
|
+
"delete": {
|
|
1120
|
+
"operationId": "deleteOutlookCalendar",
|
|
1121
|
+
"summary": "deleteOutlookCalendar",
|
|
1122
|
+
"description": "Disconnects a previously registered Outlook calendar.\n\nDeletes the Microsoft Graph subscription, removes the backing `calendar`\nentity, and drops the local subscription record. Idempotent: a 404 from\nGraph (subscription already gone) is treated as success.",
|
|
1123
|
+
"tags": [
|
|
1124
|
+
"Calendars"
|
|
1125
|
+
],
|
|
1126
|
+
"parameters": [
|
|
1127
|
+
{
|
|
1128
|
+
"in": "path",
|
|
1129
|
+
"name": "calendar_id",
|
|
1130
|
+
"schema": {
|
|
1131
|
+
"type": "string"
|
|
1132
|
+
},
|
|
1133
|
+
"required": true
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
"responses": {
|
|
1137
|
+
"204": {
|
|
1138
|
+
"description": "Outlook calendar disconnected"
|
|
1139
|
+
},
|
|
1140
|
+
"404": {
|
|
1141
|
+
"description": "No Outlook calendar registration found for this id",
|
|
1142
|
+
"content": {
|
|
1143
|
+
"application/json": {
|
|
1144
|
+
"schema": {
|
|
1145
|
+
"$ref": "#/components/schemas/Error"
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
"502": {
|
|
1151
|
+
"description": "Microsoft Graph subscription deletion failed",
|
|
1152
|
+
"content": {
|
|
1153
|
+
"application/json": {
|
|
1154
|
+
"schema": {
|
|
1155
|
+
"$ref": "#/components/schemas/Error"
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
"/v1/calendar/outlook/webhook": {
|
|
1164
|
+
"post": {
|
|
1165
|
+
"operationId": "outlookWebhook",
|
|
1166
|
+
"summary": "outlookWebhook",
|
|
1167
|
+
"description": "Public Microsoft Graph webhook receiver for per-user Outlook calendar\nsubscriptions. Unauthenticated by design (API Gateway `Authorizer: NONE`):\nGraph calls it with no epilot token.\n\nHandles both the subscription-validation handshake (echoes the\n`validationToken` query param as `text/plain`) and change notifications.\nEach notification is trusted only after its HMAC-signed `clientState` is\nverified and matched against the stored subscription – identity is never\nread from the request body.",
|
|
1168
|
+
"tags": [
|
|
1169
|
+
"Calendars"
|
|
1170
|
+
],
|
|
1171
|
+
"security": [],
|
|
1172
|
+
"parameters": [
|
|
1173
|
+
{
|
|
1174
|
+
"in": "query",
|
|
1175
|
+
"name": "validationToken",
|
|
1176
|
+
"description": "Set by Graph on the subscription-validation handshake; echoed back verbatim.",
|
|
1177
|
+
"schema": {
|
|
1178
|
+
"type": "string",
|
|
1179
|
+
"description": "Set by Graph on the subscription-validation handshake; echoed back verbatim."
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
],
|
|
1183
|
+
"responses": {
|
|
1184
|
+
"200": {
|
|
1185
|
+
"description": "Validation handshake echo (text/plain)",
|
|
1186
|
+
"content": {
|
|
1187
|
+
"text/plain": {
|
|
1188
|
+
"schema": {
|
|
1189
|
+
"type": "string"
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
"202": {
|
|
1195
|
+
"description": "Notification batch accepted"
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
"/v1/calendar/{calendar_id}": {
|
|
1201
|
+
"get": {
|
|
1202
|
+
"operationId": "getCalendar",
|
|
1203
|
+
"summary": "getCalendar",
|
|
1204
|
+
"description": "Get a single calendar by its epilot ID.",
|
|
1205
|
+
"tags": [
|
|
1206
|
+
"Calendars"
|
|
1207
|
+
],
|
|
1208
|
+
"parameters": [
|
|
1209
|
+
{
|
|
1210
|
+
"in": "path",
|
|
1211
|
+
"name": "calendar_id",
|
|
1212
|
+
"schema": {
|
|
1213
|
+
"type": "string"
|
|
1214
|
+
},
|
|
1215
|
+
"required": true
|
|
1216
|
+
}
|
|
1217
|
+
],
|
|
1218
|
+
"responses": {
|
|
1219
|
+
"200": {
|
|
1220
|
+
"description": "Calendar",
|
|
1221
|
+
"content": {
|
|
1222
|
+
"application/json": {
|
|
1223
|
+
"schema": {
|
|
1224
|
+
"$ref": "#/components/schemas/Calendar"
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
"404": {
|
|
1230
|
+
"description": "Resource not found",
|
|
1231
|
+
"content": {
|
|
1232
|
+
"application/json": {
|
|
1233
|
+
"schema": {
|
|
1234
|
+
"$ref": "#/components/schemas/Error"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
"patch": {
|
|
1242
|
+
"operationId": "updateCalendar",
|
|
1243
|
+
"summary": "updateCalendar",
|
|
1244
|
+
"description": "Update fields on a calendar.",
|
|
1245
|
+
"tags": [
|
|
1246
|
+
"Calendars"
|
|
1247
|
+
],
|
|
1248
|
+
"parameters": [
|
|
1249
|
+
{
|
|
1250
|
+
"in": "path",
|
|
1251
|
+
"name": "calendar_id",
|
|
1252
|
+
"schema": {
|
|
1253
|
+
"type": "string"
|
|
1254
|
+
},
|
|
1255
|
+
"required": true
|
|
1256
|
+
}
|
|
1257
|
+
],
|
|
1258
|
+
"requestBody": {
|
|
1259
|
+
"required": true,
|
|
1260
|
+
"content": {
|
|
1261
|
+
"application/json": {
|
|
1262
|
+
"schema": {
|
|
1263
|
+
"$ref": "#/components/schemas/CalendarPatchBody"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
"responses": {
|
|
1269
|
+
"200": {
|
|
1270
|
+
"description": "Calendar updated",
|
|
1271
|
+
"content": {
|
|
1272
|
+
"application/json": {
|
|
1273
|
+
"schema": {
|
|
1274
|
+
"$ref": "#/components/schemas/Calendar"
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
"400": {
|
|
1280
|
+
"description": "Invalid request body",
|
|
1281
|
+
"content": {
|
|
1282
|
+
"application/json": {
|
|
1283
|
+
"schema": {
|
|
1284
|
+
"$ref": "#/components/schemas/Error"
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
"403": {
|
|
1290
|
+
"description": "Calendar is read-only",
|
|
1291
|
+
"content": {
|
|
1292
|
+
"application/json": {
|
|
1293
|
+
"schema": {
|
|
1294
|
+
"$ref": "#/components/schemas/Error"
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
"404": {
|
|
1300
|
+
"description": "Resource not found",
|
|
1301
|
+
"content": {
|
|
1302
|
+
"application/json": {
|
|
1303
|
+
"schema": {
|
|
1304
|
+
"$ref": "#/components/schemas/Error"
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
"delete": {
|
|
1312
|
+
"operationId": "deleteCalendar",
|
|
1313
|
+
"summary": "deleteCalendar",
|
|
1314
|
+
"description": "Delete a native epilot calendar and its events.",
|
|
1315
|
+
"tags": [
|
|
1316
|
+
"Calendars"
|
|
1317
|
+
],
|
|
1318
|
+
"parameters": [
|
|
1319
|
+
{
|
|
1320
|
+
"in": "path",
|
|
1321
|
+
"name": "calendar_id",
|
|
1322
|
+
"schema": {
|
|
1323
|
+
"type": "string"
|
|
1324
|
+
},
|
|
1325
|
+
"required": true
|
|
1326
|
+
}
|
|
1327
|
+
],
|
|
1328
|
+
"responses": {
|
|
1329
|
+
"204": {
|
|
1330
|
+
"description": "Calendar deleted"
|
|
1331
|
+
},
|
|
1332
|
+
"403": {
|
|
1333
|
+
"description": "Calendar is read-only",
|
|
1334
|
+
"content": {
|
|
1335
|
+
"application/json": {
|
|
1336
|
+
"schema": {
|
|
1337
|
+
"$ref": "#/components/schemas/Error"
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
"404": {
|
|
1343
|
+
"description": "Resource not found",
|
|
1344
|
+
"content": {
|
|
1345
|
+
"application/json": {
|
|
1346
|
+
"schema": {
|
|
1347
|
+
"$ref": "#/components/schemas/Error"
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"/v1/calendar/events": {
|
|
1356
|
+
"get": {
|
|
1357
|
+
"operationId": "listEvents",
|
|
1358
|
+
"summary": "listEvents",
|
|
1359
|
+
"description": "List events in a time window. Recurring events are returned as expanded occurrences – each instance appears as its own event.",
|
|
1360
|
+
"tags": [
|
|
1361
|
+
"Calendar Events"
|
|
1362
|
+
],
|
|
1363
|
+
"parameters": [
|
|
1364
|
+
{
|
|
1365
|
+
"in": "query",
|
|
1366
|
+
"name": "from",
|
|
1367
|
+
"description": "Start of the time window (inclusive)",
|
|
1368
|
+
"schema": {
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
"format": "date-time",
|
|
1371
|
+
"description": "Start of the time window (inclusive)"
|
|
1372
|
+
},
|
|
1373
|
+
"required": true
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"in": "query",
|
|
1377
|
+
"name": "to",
|
|
1378
|
+
"description": "End of the time window (exclusive)",
|
|
1379
|
+
"schema": {
|
|
1380
|
+
"type": "string",
|
|
1381
|
+
"format": "date-time",
|
|
1382
|
+
"description": "End of the time window (exclusive)"
|
|
1383
|
+
},
|
|
1384
|
+
"required": true
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"in": "query",
|
|
1388
|
+
"name": "calendar_id",
|
|
1389
|
+
"description": "Filter to a single calendar. Omit to query across all accessible calendars.",
|
|
1390
|
+
"schema": {
|
|
1391
|
+
"type": "string",
|
|
1392
|
+
"description": "Filter to a single calendar. Omit to query across all accessible calendars."
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"in": "query",
|
|
1397
|
+
"name": "size",
|
|
1398
|
+
"schema": {
|
|
1399
|
+
"type": "integer",
|
|
1400
|
+
"minimum": 1,
|
|
1401
|
+
"maximum": 250
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"in": "query",
|
|
1406
|
+
"name": "cursor",
|
|
1407
|
+
"schema": {
|
|
1408
|
+
"type": "string"
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
],
|
|
1412
|
+
"responses": {
|
|
1413
|
+
"200": {
|
|
1414
|
+
"description": "List of events",
|
|
1415
|
+
"content": {
|
|
1416
|
+
"application/json": {
|
|
1417
|
+
"schema": {
|
|
1418
|
+
"type": "object",
|
|
1419
|
+
"properties": {
|
|
1420
|
+
"results": {
|
|
1421
|
+
"type": "array",
|
|
1422
|
+
"items": {
|
|
1423
|
+
"$ref": "#/components/schemas/CalendarEvent"
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
"next_cursor": {
|
|
1427
|
+
"type": "string",
|
|
1428
|
+
"nullable": true
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
"required": [
|
|
1432
|
+
"results"
|
|
1433
|
+
]
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
"400": {
|
|
1439
|
+
"description": "Invalid request",
|
|
1440
|
+
"content": {
|
|
1441
|
+
"application/json": {
|
|
1442
|
+
"schema": {
|
|
1443
|
+
"$ref": "#/components/schemas/Error"
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
},
|
|
1450
|
+
"post": {
|
|
1451
|
+
"operationId": "createEvent",
|
|
1452
|
+
"summary": "createEvent",
|
|
1453
|
+
"description": "Create a native epilot calendar event.",
|
|
1454
|
+
"tags": [
|
|
1455
|
+
"Calendar Events"
|
|
1456
|
+
],
|
|
1457
|
+
"requestBody": {
|
|
1458
|
+
"required": true,
|
|
1459
|
+
"content": {
|
|
1460
|
+
"application/json": {
|
|
1461
|
+
"schema": {
|
|
1462
|
+
"$ref": "#/components/schemas/CalendarEventCreateBody"
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
"responses": {
|
|
1468
|
+
"201": {
|
|
1469
|
+
"description": "Event created",
|
|
1470
|
+
"content": {
|
|
1471
|
+
"application/json": {
|
|
1472
|
+
"schema": {
|
|
1473
|
+
"$ref": "#/components/schemas/CalendarEvent"
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"400": {
|
|
1479
|
+
"description": "Invalid request body",
|
|
1480
|
+
"content": {
|
|
1481
|
+
"application/json": {
|
|
1482
|
+
"schema": {
|
|
1483
|
+
"$ref": "#/components/schemas/Error"
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
"403": {
|
|
1489
|
+
"description": "Calendar is read-only",
|
|
1490
|
+
"content": {
|
|
1491
|
+
"application/json": {
|
|
1492
|
+
"schema": {
|
|
1493
|
+
"$ref": "#/components/schemas/Error"
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
"404": {
|
|
1499
|
+
"description": "Calendar not found",
|
|
1500
|
+
"content": {
|
|
1501
|
+
"application/json": {
|
|
1502
|
+
"schema": {
|
|
1503
|
+
"$ref": "#/components/schemas/Error"
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
"/v1/calendar/events/{event_id}": {
|
|
1512
|
+
"get": {
|
|
1513
|
+
"operationId": "getEvent",
|
|
1514
|
+
"summary": "getEvent",
|
|
1515
|
+
"description": "Get a single event by its epilot ID.",
|
|
1516
|
+
"tags": [
|
|
1517
|
+
"Calendar Events"
|
|
1518
|
+
],
|
|
1519
|
+
"parameters": [
|
|
1520
|
+
{
|
|
1521
|
+
"in": "path",
|
|
1522
|
+
"name": "event_id",
|
|
1523
|
+
"schema": {
|
|
1524
|
+
"type": "string"
|
|
1525
|
+
},
|
|
1526
|
+
"required": true
|
|
1527
|
+
}
|
|
1528
|
+
],
|
|
1529
|
+
"responses": {
|
|
1530
|
+
"200": {
|
|
1531
|
+
"description": "Event",
|
|
1532
|
+
"content": {
|
|
1533
|
+
"application/json": {
|
|
1534
|
+
"schema": {
|
|
1535
|
+
"$ref": "#/components/schemas/CalendarEvent"
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
"404": {
|
|
1541
|
+
"description": "Resource not found",
|
|
1542
|
+
"content": {
|
|
1543
|
+
"application/json": {
|
|
1544
|
+
"schema": {
|
|
1545
|
+
"$ref": "#/components/schemas/Error"
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1552
|
+
"patch": {
|
|
1553
|
+
"operationId": "updateEvent",
|
|
1554
|
+
"summary": "updateEvent",
|
|
1555
|
+
"description": "Update a native epilot calendar event.",
|
|
1556
|
+
"tags": [
|
|
1557
|
+
"Calendar Events"
|
|
1558
|
+
],
|
|
1559
|
+
"parameters": [
|
|
1560
|
+
{
|
|
1561
|
+
"in": "path",
|
|
1562
|
+
"name": "event_id",
|
|
1563
|
+
"schema": {
|
|
1564
|
+
"type": "string"
|
|
1565
|
+
},
|
|
1566
|
+
"required": true
|
|
1567
|
+
}
|
|
1568
|
+
],
|
|
1569
|
+
"requestBody": {
|
|
1570
|
+
"required": true,
|
|
1571
|
+
"content": {
|
|
1572
|
+
"application/json": {
|
|
1573
|
+
"schema": {
|
|
1574
|
+
"$ref": "#/components/schemas/CalendarEventPatchBody"
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
"responses": {
|
|
1580
|
+
"200": {
|
|
1581
|
+
"description": "Event updated",
|
|
1582
|
+
"content": {
|
|
1583
|
+
"application/json": {
|
|
1584
|
+
"schema": {
|
|
1585
|
+
"$ref": "#/components/schemas/CalendarEvent"
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
"400": {
|
|
1591
|
+
"description": "Invalid request body",
|
|
1592
|
+
"content": {
|
|
1593
|
+
"application/json": {
|
|
1594
|
+
"schema": {
|
|
1595
|
+
"$ref": "#/components/schemas/Error"
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
},
|
|
1600
|
+
"403": {
|
|
1601
|
+
"description": "Event or calendar is read-only",
|
|
1602
|
+
"content": {
|
|
1603
|
+
"application/json": {
|
|
1604
|
+
"schema": {
|
|
1605
|
+
"$ref": "#/components/schemas/Error"
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
"404": {
|
|
1611
|
+
"description": "Resource not found",
|
|
1612
|
+
"content": {
|
|
1613
|
+
"application/json": {
|
|
1614
|
+
"schema": {
|
|
1615
|
+
"$ref": "#/components/schemas/Error"
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
"delete": {
|
|
1623
|
+
"operationId": "deleteEvent",
|
|
1624
|
+
"summary": "deleteEvent",
|
|
1625
|
+
"description": "Delete a native epilot calendar event.",
|
|
1626
|
+
"tags": [
|
|
1627
|
+
"Calendar Events"
|
|
1628
|
+
],
|
|
1629
|
+
"parameters": [
|
|
1630
|
+
{
|
|
1631
|
+
"in": "path",
|
|
1632
|
+
"name": "event_id",
|
|
1633
|
+
"schema": {
|
|
1634
|
+
"type": "string"
|
|
1635
|
+
},
|
|
1636
|
+
"required": true
|
|
1637
|
+
}
|
|
1638
|
+
],
|
|
1639
|
+
"responses": {
|
|
1640
|
+
"204": {
|
|
1641
|
+
"description": "Event deleted"
|
|
1642
|
+
},
|
|
1643
|
+
"403": {
|
|
1644
|
+
"description": "Event or calendar is read-only",
|
|
1645
|
+
"content": {
|
|
1646
|
+
"application/json": {
|
|
1647
|
+
"schema": {
|
|
1648
|
+
"$ref": "#/components/schemas/Error"
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
"404": {
|
|
1654
|
+
"description": "Resource not found",
|
|
1655
|
+
"content": {
|
|
1656
|
+
"application/json": {
|
|
1657
|
+
"schema": {
|
|
1658
|
+
"$ref": "#/components/schemas/Error"
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
"/v1/calendar/events/{event_id}/share": {
|
|
1667
|
+
"post": {
|
|
1668
|
+
"operationId": "shareEvent",
|
|
1669
|
+
"summary": "shareEvent",
|
|
1670
|
+
"description": "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.",
|
|
1671
|
+
"tags": [
|
|
1672
|
+
"Calendar Events"
|
|
1673
|
+
],
|
|
1674
|
+
"parameters": [
|
|
1675
|
+
{
|
|
1676
|
+
"in": "path",
|
|
1677
|
+
"name": "event_id",
|
|
1678
|
+
"schema": {
|
|
1679
|
+
"type": "string"
|
|
1680
|
+
},
|
|
1681
|
+
"required": true
|
|
1682
|
+
}
|
|
1683
|
+
],
|
|
1684
|
+
"requestBody": {
|
|
1685
|
+
"required": true,
|
|
1686
|
+
"content": {
|
|
1687
|
+
"application/json": {
|
|
1688
|
+
"schema": {
|
|
1689
|
+
"$ref": "#/components/schemas/ShareEventBody"
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
"responses": {
|
|
1695
|
+
"204": {
|
|
1696
|
+
"description": "Event shared"
|
|
1697
|
+
},
|
|
1698
|
+
"400": {
|
|
1699
|
+
"description": "Invalid request body",
|
|
1700
|
+
"content": {
|
|
1701
|
+
"application/json": {
|
|
1702
|
+
"schema": {
|
|
1703
|
+
"$ref": "#/components/schemas/Error"
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
},
|
|
1708
|
+
"403": {
|
|
1709
|
+
"description": "Caller is not the event owner",
|
|
1710
|
+
"content": {
|
|
1711
|
+
"application/json": {
|
|
1712
|
+
"schema": {
|
|
1713
|
+
"$ref": "#/components/schemas/Error"
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
"404": {
|
|
1719
|
+
"description": "Event or recipient not found",
|
|
1720
|
+
"content": {
|
|
1721
|
+
"application/json": {
|
|
1722
|
+
"schema": {
|
|
1723
|
+
"$ref": "#/components/schemas/Error"
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"/v1/calendar/events/{event_id}/share/{user_id}": {
|
|
1732
|
+
"delete": {
|
|
1733
|
+
"operationId": "unshareEvent",
|
|
1734
|
+
"summary": "unshareEvent",
|
|
1735
|
+
"description": "Revoke a per-event share. The recipient loses access immediately. Owner-only.",
|
|
1736
|
+
"tags": [
|
|
1737
|
+
"Calendar Events"
|
|
1738
|
+
],
|
|
1739
|
+
"parameters": [
|
|
1740
|
+
{
|
|
1741
|
+
"in": "path",
|
|
1742
|
+
"name": "event_id",
|
|
1743
|
+
"schema": {
|
|
1744
|
+
"type": "string"
|
|
1745
|
+
},
|
|
1746
|
+
"required": true
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"in": "path",
|
|
1750
|
+
"name": "user_id",
|
|
1751
|
+
"schema": {
|
|
1752
|
+
"type": "string"
|
|
1753
|
+
},
|
|
1754
|
+
"required": true
|
|
1755
|
+
}
|
|
1756
|
+
],
|
|
1757
|
+
"responses": {
|
|
1758
|
+
"204": {
|
|
1759
|
+
"description": "Share revoked (or was not present)"
|
|
1760
|
+
},
|
|
1761
|
+
"403": {
|
|
1762
|
+
"description": "Caller is not the event owner",
|
|
1763
|
+
"content": {
|
|
1764
|
+
"application/json": {
|
|
1765
|
+
"schema": {
|
|
1766
|
+
"$ref": "#/components/schemas/Error"
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
"404": {
|
|
1772
|
+
"description": "Event not found",
|
|
1773
|
+
"content": {
|
|
1774
|
+
"application/json": {
|
|
1775
|
+
"schema": {
|
|
1776
|
+
"$ref": "#/components/schemas/Error"
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
},
|
|
1785
|
+
"components": {
|
|
1786
|
+
"securitySchemes": {
|
|
1787
|
+
"EpilotAuth": {
|
|
1788
|
+
"type": "http",
|
|
1789
|
+
"scheme": "bearer",
|
|
1790
|
+
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
1791
|
+
"bearerFormat": "JWT"
|
|
1792
|
+
},
|
|
1793
|
+
"EpilotOrg": {
|
|
1794
|
+
"type": "apiKey",
|
|
1795
|
+
"in": "header",
|
|
1796
|
+
"name": "x-epilot-org-id"
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"schemas": {
|
|
1800
|
+
"AbsenceInterval": {
|
|
1801
|
+
"type": "object",
|
|
1802
|
+
"properties": {
|
|
1803
|
+
"from": {
|
|
1804
|
+
"type": "string",
|
|
1805
|
+
"format": "date-time",
|
|
1806
|
+
"description": "Absence interval start clipped to the requested window."
|
|
1807
|
+
},
|
|
1808
|
+
"to": {
|
|
1809
|
+
"type": "string",
|
|
1810
|
+
"format": "date-time",
|
|
1811
|
+
"description": "Absence interval end clipped to the requested window."
|
|
1812
|
+
},
|
|
1813
|
+
"original_from": {
|
|
1814
|
+
"type": "string",
|
|
1815
|
+
"format": "date-time",
|
|
1816
|
+
"description": "Original absence interval start before clipping."
|
|
1817
|
+
},
|
|
1818
|
+
"original_to": {
|
|
1819
|
+
"type": "string",
|
|
1820
|
+
"format": "date-time",
|
|
1821
|
+
"description": "Original absence interval end before clipping."
|
|
1822
|
+
},
|
|
1823
|
+
"absent": {
|
|
1824
|
+
"type": "boolean",
|
|
1825
|
+
"description": "Effective absence state for this interval."
|
|
1826
|
+
},
|
|
1827
|
+
"source": {
|
|
1828
|
+
"$ref": "#/components/schemas/AbsenceIntervalSource"
|
|
1829
|
+
},
|
|
1830
|
+
"calendar_event_id": {
|
|
1831
|
+
"type": "string",
|
|
1832
|
+
"description": "calendar_event ID for calendar-derived intervals."
|
|
1833
|
+
},
|
|
1834
|
+
"absence_adjustment_id": {
|
|
1835
|
+
"type": "string",
|
|
1836
|
+
"description": "absence adjustment ID for manual intervals."
|
|
1837
|
+
},
|
|
1838
|
+
"reason": {
|
|
1839
|
+
"type": "string",
|
|
1840
|
+
"nullable": true
|
|
1841
|
+
}
|
|
1842
|
+
},
|
|
1843
|
+
"required": [
|
|
1844
|
+
"from",
|
|
1845
|
+
"to",
|
|
1846
|
+
"original_from",
|
|
1847
|
+
"original_to",
|
|
1848
|
+
"absent",
|
|
1849
|
+
"source"
|
|
1850
|
+
]
|
|
1851
|
+
},
|
|
1852
|
+
"AbsenceIntervalSource": {
|
|
1853
|
+
"type": "string",
|
|
1854
|
+
"enum": [
|
|
1855
|
+
"calendar_event",
|
|
1856
|
+
"absence_adjustment",
|
|
1857
|
+
"working_hours"
|
|
1858
|
+
]
|
|
1859
|
+
},
|
|
1860
|
+
"Error": {
|
|
1861
|
+
"type": "object",
|
|
1862
|
+
"properties": {
|
|
1863
|
+
"status": {
|
|
1864
|
+
"type": "integer"
|
|
1865
|
+
},
|
|
1866
|
+
"error": {
|
|
1867
|
+
"anyOf": [
|
|
1868
|
+
{
|
|
1869
|
+
"type": "string"
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
"type": "array",
|
|
1873
|
+
"items": {}
|
|
1874
|
+
}
|
|
1875
|
+
]
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
"required": [
|
|
1879
|
+
"status",
|
|
1880
|
+
"error"
|
|
1881
|
+
]
|
|
1882
|
+
},
|
|
1883
|
+
"SearchAbsenceBody": {
|
|
1884
|
+
"type": "object",
|
|
1885
|
+
"properties": {
|
|
1886
|
+
"from": {
|
|
1887
|
+
"type": "string",
|
|
1888
|
+
"format": "date-time",
|
|
1889
|
+
"description": "Start of the time window (inclusive). Maximum window: 31 days."
|
|
1890
|
+
},
|
|
1891
|
+
"to": {
|
|
1892
|
+
"type": "string",
|
|
1893
|
+
"format": "date-time",
|
|
1894
|
+
"description": "End of the time window (exclusive). Must be after from."
|
|
1895
|
+
},
|
|
1896
|
+
"user_ids": {
|
|
1897
|
+
"type": "array",
|
|
1898
|
+
"items": {
|
|
1899
|
+
"type": "string",
|
|
1900
|
+
"minLength": 1
|
|
1901
|
+
},
|
|
1902
|
+
"minItems": 1,
|
|
1903
|
+
"maxItems": 300,
|
|
1904
|
+
"description": "Candidate users to check for absence inside the caller organization."
|
|
1905
|
+
},
|
|
1906
|
+
"include_busy": {
|
|
1907
|
+
"type": "boolean",
|
|
1908
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
1909
|
+
"default": false
|
|
1910
|
+
},
|
|
1911
|
+
"working_hours_granularity": {
|
|
1912
|
+
"type": "string",
|
|
1913
|
+
"enum": [
|
|
1914
|
+
"time",
|
|
1915
|
+
"day"
|
|
1916
|
+
],
|
|
1917
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
1918
|
+
"default": "time"
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
"required": [
|
|
1922
|
+
"from",
|
|
1923
|
+
"to",
|
|
1924
|
+
"user_ids"
|
|
1925
|
+
]
|
|
1926
|
+
},
|
|
1927
|
+
"SearchNowAbsenceBody": {
|
|
1928
|
+
"type": "object",
|
|
1929
|
+
"properties": {
|
|
1930
|
+
"user_ids": {
|
|
1931
|
+
"type": "array",
|
|
1932
|
+
"items": {
|
|
1933
|
+
"type": "string",
|
|
1934
|
+
"minLength": 1
|
|
1935
|
+
},
|
|
1936
|
+
"minItems": 1,
|
|
1937
|
+
"maxItems": 300,
|
|
1938
|
+
"description": "Candidate users to check for absence at the current server time inside the caller organization."
|
|
1939
|
+
},
|
|
1940
|
+
"include_busy": {
|
|
1941
|
+
"type": "boolean",
|
|
1942
|
+
"description": "Include busy inputs in addition to out-of-office absence. Defaults to false.",
|
|
1943
|
+
"default": false
|
|
1944
|
+
},
|
|
1945
|
+
"working_hours_granularity": {
|
|
1946
|
+
"type": "string",
|
|
1947
|
+
"enum": [
|
|
1948
|
+
"time",
|
|
1949
|
+
"day"
|
|
1950
|
+
],
|
|
1951
|
+
"description": "At what granularity working hours contribute to absence. \"time\" (default): all time outside a user's working windows counts as absent. \"day\": only full days with no working windows count as absent (whole-day granularity, used by thread assignment). Users without a working-hours record never produce working-hours intervals.",
|
|
1952
|
+
"default": "time"
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
"required": [
|
|
1956
|
+
"user_ids"
|
|
1957
|
+
]
|
|
1958
|
+
},
|
|
1959
|
+
"AbsenceAdjustment": {
|
|
1960
|
+
"type": "object",
|
|
1961
|
+
"properties": {
|
|
1962
|
+
"from": {
|
|
1963
|
+
"type": "string",
|
|
1964
|
+
"format": "date-time",
|
|
1965
|
+
"description": "Adjustment start. Maximum adjustment duration: 7 days."
|
|
1966
|
+
},
|
|
1967
|
+
"to": {
|
|
1968
|
+
"type": "string",
|
|
1969
|
+
"format": "date-time",
|
|
1970
|
+
"description": "Adjustment end. Must be after from."
|
|
1971
|
+
},
|
|
1972
|
+
"absent": {
|
|
1973
|
+
"type": "boolean",
|
|
1974
|
+
"description": "Manual override state: true means absent, false means not absent."
|
|
1975
|
+
},
|
|
1976
|
+
"status": {
|
|
1977
|
+
"$ref": "#/components/schemas/AbsenceStatus"
|
|
1978
|
+
},
|
|
1979
|
+
"type": {
|
|
1980
|
+
"$ref": "#/components/schemas/AbsenceType"
|
|
1981
|
+
},
|
|
1982
|
+
"reason": {
|
|
1983
|
+
"type": "string",
|
|
1984
|
+
"nullable": true,
|
|
1985
|
+
"maxLength": 500
|
|
1986
|
+
},
|
|
1987
|
+
"adjustment_id": {
|
|
1988
|
+
"type": "string"
|
|
1989
|
+
},
|
|
1990
|
+
"user_id": {
|
|
1991
|
+
"type": "string"
|
|
1992
|
+
},
|
|
1993
|
+
"created_by": {
|
|
1994
|
+
"type": "string"
|
|
1995
|
+
},
|
|
1996
|
+
"created_at": {
|
|
1997
|
+
"type": "string",
|
|
1998
|
+
"format": "date-time"
|
|
1999
|
+
},
|
|
2000
|
+
"updated_at": {
|
|
2001
|
+
"type": "string",
|
|
2002
|
+
"format": "date-time"
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
"required": [
|
|
2006
|
+
"from",
|
|
2007
|
+
"to",
|
|
2008
|
+
"absent",
|
|
2009
|
+
"status",
|
|
2010
|
+
"adjustment_id",
|
|
2011
|
+
"user_id",
|
|
2012
|
+
"created_by",
|
|
2013
|
+
"created_at",
|
|
2014
|
+
"updated_at"
|
|
2015
|
+
]
|
|
2016
|
+
},
|
|
2017
|
+
"AbsenceStatus": {
|
|
2018
|
+
"type": "string",
|
|
2019
|
+
"enum": [
|
|
2020
|
+
"oof",
|
|
2021
|
+
"busy"
|
|
2022
|
+
],
|
|
2023
|
+
"description": "Calendar status targeted by the absence adjustment."
|
|
2024
|
+
},
|
|
2025
|
+
"AbsenceType": {
|
|
2026
|
+
"type": "string",
|
|
2027
|
+
"minLength": 1,
|
|
2028
|
+
"maxLength": 128,
|
|
2029
|
+
"description": "Optional producer-defined reference stored with an absence adjustment."
|
|
2030
|
+
},
|
|
2031
|
+
"CreateAbsenceAdjustmentBody": {
|
|
2032
|
+
"type": "object",
|
|
2033
|
+
"properties": {
|
|
2034
|
+
"from": {
|
|
2035
|
+
"type": "string",
|
|
2036
|
+
"format": "date-time",
|
|
2037
|
+
"description": "Adjustment start. Maximum adjustment duration: 7 days."
|
|
2038
|
+
},
|
|
2039
|
+
"to": {
|
|
2040
|
+
"type": "string",
|
|
2041
|
+
"format": "date-time",
|
|
2042
|
+
"description": "Adjustment end. Must be after from."
|
|
2043
|
+
},
|
|
2044
|
+
"absent": {
|
|
2045
|
+
"type": "boolean",
|
|
2046
|
+
"description": "Manual override state: true means absent, false means not absent."
|
|
2047
|
+
},
|
|
2048
|
+
"status": {
|
|
2049
|
+
"$ref": "#/components/schemas/AbsenceStatus"
|
|
2050
|
+
},
|
|
2051
|
+
"type": {
|
|
2052
|
+
"$ref": "#/components/schemas/AbsenceType"
|
|
2053
|
+
},
|
|
2054
|
+
"reason": {
|
|
2055
|
+
"type": "string",
|
|
2056
|
+
"nullable": true,
|
|
2057
|
+
"maxLength": 500
|
|
2058
|
+
}
|
|
2059
|
+
},
|
|
2060
|
+
"required": [
|
|
2061
|
+
"from",
|
|
2062
|
+
"to",
|
|
2063
|
+
"absent",
|
|
2064
|
+
"status"
|
|
2065
|
+
]
|
|
2066
|
+
},
|
|
2067
|
+
"PatchAbsenceAdjustmentBody": {
|
|
2068
|
+
"type": "object",
|
|
2069
|
+
"properties": {
|
|
2070
|
+
"from": {
|
|
2071
|
+
"type": "string",
|
|
2072
|
+
"format": "date-time",
|
|
2073
|
+
"description": "Adjustment start. Maximum adjustment duration: 7 days."
|
|
2074
|
+
},
|
|
2075
|
+
"to": {
|
|
2076
|
+
"type": "string",
|
|
2077
|
+
"format": "date-time",
|
|
2078
|
+
"description": "Adjustment end. Must be after from."
|
|
2079
|
+
},
|
|
2080
|
+
"absent": {
|
|
2081
|
+
"type": "boolean",
|
|
2082
|
+
"description": "Manual override state: true means absent, false means not absent."
|
|
2083
|
+
},
|
|
2084
|
+
"status": {
|
|
2085
|
+
"$ref": "#/components/schemas/AbsenceStatus"
|
|
2086
|
+
},
|
|
2087
|
+
"type": {
|
|
2088
|
+
"$ref": "#/components/schemas/AbsenceType"
|
|
2089
|
+
},
|
|
2090
|
+
"reason": {
|
|
2091
|
+
"type": "string",
|
|
2092
|
+
"nullable": true,
|
|
2093
|
+
"maxLength": 500
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
},
|
|
2097
|
+
"ExternalCalendar": {
|
|
2098
|
+
"type": "object",
|
|
2099
|
+
"properties": {
|
|
2100
|
+
"provider": {
|
|
2101
|
+
"type": "string",
|
|
2102
|
+
"enum": [
|
|
2103
|
+
"outlook",
|
|
2104
|
+
"google"
|
|
2105
|
+
],
|
|
2106
|
+
"description": "External calendar provider."
|
|
2107
|
+
},
|
|
2108
|
+
"last_synced_at": {
|
|
2109
|
+
"type": "string",
|
|
2110
|
+
"nullable": true,
|
|
2111
|
+
"format": "date-time",
|
|
2112
|
+
"description": "Last successful sync of this provider calendar, if any."
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
"required": [
|
|
2116
|
+
"provider",
|
|
2117
|
+
"last_synced_at"
|
|
2118
|
+
]
|
|
2119
|
+
},
|
|
2120
|
+
"WorkingHours": {
|
|
2121
|
+
"type": "object",
|
|
2122
|
+
"properties": {
|
|
2123
|
+
"monday": {
|
|
2124
|
+
"type": "array",
|
|
2125
|
+
"items": {
|
|
2126
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2127
|
+
},
|
|
2128
|
+
"maxItems": 6,
|
|
2129
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2130
|
+
},
|
|
2131
|
+
"tuesday": {
|
|
2132
|
+
"type": "array",
|
|
2133
|
+
"items": {
|
|
2134
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2135
|
+
},
|
|
2136
|
+
"maxItems": 6,
|
|
2137
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2138
|
+
},
|
|
2139
|
+
"wednesday": {
|
|
2140
|
+
"type": "array",
|
|
2141
|
+
"items": {
|
|
2142
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2143
|
+
},
|
|
2144
|
+
"maxItems": 6,
|
|
2145
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2146
|
+
},
|
|
2147
|
+
"thursday": {
|
|
2148
|
+
"type": "array",
|
|
2149
|
+
"items": {
|
|
2150
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2151
|
+
},
|
|
2152
|
+
"maxItems": 6,
|
|
2153
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2154
|
+
},
|
|
2155
|
+
"friday": {
|
|
2156
|
+
"type": "array",
|
|
2157
|
+
"items": {
|
|
2158
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2159
|
+
},
|
|
2160
|
+
"maxItems": 6,
|
|
2161
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2162
|
+
},
|
|
2163
|
+
"saturday": {
|
|
2164
|
+
"type": "array",
|
|
2165
|
+
"items": {
|
|
2166
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2167
|
+
},
|
|
2168
|
+
"maxItems": 6,
|
|
2169
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2170
|
+
},
|
|
2171
|
+
"sunday": {
|
|
2172
|
+
"type": "array",
|
|
2173
|
+
"items": {
|
|
2174
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2175
|
+
},
|
|
2176
|
+
"maxItems": 6,
|
|
2177
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2178
|
+
},
|
|
2179
|
+
"timezone": {
|
|
2180
|
+
"type": "string",
|
|
2181
|
+
"description": "IANA timezone the working windows are expressed in."
|
|
2182
|
+
},
|
|
2183
|
+
"user_id": {
|
|
2184
|
+
"type": "string"
|
|
2185
|
+
},
|
|
2186
|
+
"updated_by": {
|
|
2187
|
+
"type": "string"
|
|
2188
|
+
},
|
|
2189
|
+
"created_at": {
|
|
2190
|
+
"type": "string",
|
|
2191
|
+
"format": "date-time"
|
|
2192
|
+
},
|
|
2193
|
+
"updated_at": {
|
|
2194
|
+
"type": "string",
|
|
2195
|
+
"format": "date-time"
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
2198
|
+
"required": [
|
|
2199
|
+
"monday",
|
|
2200
|
+
"tuesday",
|
|
2201
|
+
"wednesday",
|
|
2202
|
+
"thursday",
|
|
2203
|
+
"friday",
|
|
2204
|
+
"saturday",
|
|
2205
|
+
"sunday",
|
|
2206
|
+
"timezone",
|
|
2207
|
+
"user_id",
|
|
2208
|
+
"updated_by",
|
|
2209
|
+
"created_at",
|
|
2210
|
+
"updated_at"
|
|
234
2211
|
],
|
|
235
|
-
"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
2212
|
+
"description": "Recurring weekly working hours of a user. The absence of a record means the user is treated as always available."
|
|
2213
|
+
},
|
|
2214
|
+
"UpsertWorkingHoursBody": {
|
|
2215
|
+
"type": "object",
|
|
2216
|
+
"properties": {
|
|
2217
|
+
"monday": {
|
|
2218
|
+
"type": "array",
|
|
2219
|
+
"items": {
|
|
2220
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
241
2221
|
},
|
|
242
|
-
"
|
|
2222
|
+
"maxItems": 6,
|
|
2223
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2224
|
+
},
|
|
2225
|
+
"tuesday": {
|
|
2226
|
+
"type": "array",
|
|
2227
|
+
"items": {
|
|
2228
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2229
|
+
},
|
|
2230
|
+
"maxItems": 6,
|
|
2231
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2232
|
+
},
|
|
2233
|
+
"wednesday": {
|
|
2234
|
+
"type": "array",
|
|
2235
|
+
"items": {
|
|
2236
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2237
|
+
},
|
|
2238
|
+
"maxItems": 6,
|
|
2239
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2240
|
+
},
|
|
2241
|
+
"thursday": {
|
|
2242
|
+
"type": "array",
|
|
2243
|
+
"items": {
|
|
2244
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2245
|
+
},
|
|
2246
|
+
"maxItems": 6,
|
|
2247
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2248
|
+
},
|
|
2249
|
+
"friday": {
|
|
2250
|
+
"type": "array",
|
|
2251
|
+
"items": {
|
|
2252
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2253
|
+
},
|
|
2254
|
+
"maxItems": 6,
|
|
2255
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2256
|
+
},
|
|
2257
|
+
"saturday": {
|
|
2258
|
+
"type": "array",
|
|
2259
|
+
"items": {
|
|
2260
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2261
|
+
},
|
|
2262
|
+
"maxItems": 6,
|
|
2263
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2264
|
+
},
|
|
2265
|
+
"sunday": {
|
|
2266
|
+
"type": "array",
|
|
2267
|
+
"items": {
|
|
2268
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2269
|
+
},
|
|
2270
|
+
"maxItems": 6,
|
|
2271
|
+
"description": "Working windows for a day, sorted and non-overlapping. An empty array means a day off."
|
|
2272
|
+
},
|
|
2273
|
+
"timezone": {
|
|
2274
|
+
"type": "string",
|
|
2275
|
+
"description": "IANA timezone the working windows are expressed in. Defaults to Europe/Berlin.",
|
|
2276
|
+
"default": "Europe/Berlin"
|
|
243
2277
|
}
|
|
2278
|
+
},
|
|
2279
|
+
"required": [
|
|
2280
|
+
"monday",
|
|
2281
|
+
"tuesday",
|
|
2282
|
+
"wednesday",
|
|
2283
|
+
"thursday",
|
|
2284
|
+
"friday",
|
|
2285
|
+
"saturday",
|
|
2286
|
+
"sunday"
|
|
244
2287
|
],
|
|
245
|
-
"
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
2288
|
+
"description": "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."
|
|
2289
|
+
},
|
|
2290
|
+
"TimeWindow": {
|
|
2291
|
+
"type": "object",
|
|
2292
|
+
"properties": {
|
|
2293
|
+
"start": {
|
|
2294
|
+
"type": "string",
|
|
2295
|
+
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
|
|
2296
|
+
"description": "24h wall-clock time (\"HH:mm\") in the timezone of the working-hours record."
|
|
255
2297
|
},
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
|
|
260
|
-
"schema": {
|
|
261
|
-
"$ref": "#/components/schemas/Error"
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
2298
|
+
"end": {
|
|
2299
|
+
"type": "string",
|
|
2300
|
+
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
|
|
2301
|
+
"description": "24h wall-clock time (\"HH:mm\") in the timezone of the working-hours record."
|
|
265
2302
|
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
"EpilotAuth": {
|
|
273
|
-
"type": "http",
|
|
274
|
-
"scheme": "bearer",
|
|
275
|
-
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
276
|
-
"bearerFormat": "JWT"
|
|
2303
|
+
},
|
|
2304
|
+
"required": [
|
|
2305
|
+
"start",
|
|
2306
|
+
"end"
|
|
2307
|
+
],
|
|
2308
|
+
"description": "A wall-clock working window within a single day."
|
|
277
2309
|
},
|
|
278
|
-
"EpilotOrg": {
|
|
279
|
-
"type": "apiKey",
|
|
280
|
-
"in": "header",
|
|
281
|
-
"name": "x-epilot-org-id"
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
"schemas": {
|
|
285
2310
|
"Calendar": {
|
|
286
2311
|
"type": "object",
|
|
287
2312
|
"properties": {
|
|
@@ -304,7 +2329,8 @@
|
|
|
304
2329
|
"description": "Computed display title"
|
|
305
2330
|
},
|
|
306
2331
|
"name": {
|
|
307
|
-
"type": "string"
|
|
2332
|
+
"type": "string",
|
|
2333
|
+
"minLength": 1
|
|
308
2334
|
},
|
|
309
2335
|
"description": {
|
|
310
2336
|
"type": "string",
|
|
@@ -388,20 +2414,93 @@
|
|
|
388
2414
|
],
|
|
389
2415
|
"description": "Null for native epilot calendars"
|
|
390
2416
|
},
|
|
391
|
-
"
|
|
2417
|
+
"CalendarCreateBody": {
|
|
392
2418
|
"type": "object",
|
|
393
2419
|
"properties": {
|
|
394
|
-
"
|
|
395
|
-
"type": "string"
|
|
2420
|
+
"name": {
|
|
2421
|
+
"type": "string",
|
|
2422
|
+
"minLength": 1
|
|
396
2423
|
},
|
|
397
|
-
"
|
|
2424
|
+
"description": {
|
|
2425
|
+
"type": "string",
|
|
2426
|
+
"nullable": true
|
|
2427
|
+
},
|
|
2428
|
+
"color": {
|
|
2429
|
+
"type": "string",
|
|
2430
|
+
"nullable": true,
|
|
2431
|
+
"description": "Hex color (e.g. \"#3b82f6\") or provider-defined named color"
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2434
|
+
"required": [
|
|
2435
|
+
"name"
|
|
2436
|
+
]
|
|
2437
|
+
},
|
|
2438
|
+
"AddOutlookCalendarRequest": {
|
|
2439
|
+
"type": "object",
|
|
2440
|
+
"properties": {
|
|
2441
|
+
"provider_calendar_id": {
|
|
2442
|
+
"type": "string",
|
|
2443
|
+
"minLength": 1
|
|
2444
|
+
},
|
|
2445
|
+
"name": {
|
|
2446
|
+
"type": "string",
|
|
2447
|
+
"minLength": 1,
|
|
2448
|
+
"description": "Optional override; defaults to the provider calendar name."
|
|
2449
|
+
}
|
|
2450
|
+
},
|
|
2451
|
+
"required": [
|
|
2452
|
+
"provider_calendar_id"
|
|
2453
|
+
]
|
|
2454
|
+
},
|
|
2455
|
+
"AvailableOutlookCalendar": {
|
|
2456
|
+
"type": "object",
|
|
2457
|
+
"properties": {
|
|
2458
|
+
"provider_calendar_id": {
|
|
2459
|
+
"type": "string",
|
|
2460
|
+
"description": "Microsoft Graph calendar id (immutable, e.g. base64-encoded)"
|
|
2461
|
+
},
|
|
2462
|
+
"name": {
|
|
398
2463
|
"type": "string"
|
|
2464
|
+
},
|
|
2465
|
+
"color": {
|
|
2466
|
+
"type": "string",
|
|
2467
|
+
"nullable": true
|
|
2468
|
+
},
|
|
2469
|
+
"is_default": {
|
|
2470
|
+
"type": "boolean"
|
|
2471
|
+
},
|
|
2472
|
+
"can_edit": {
|
|
2473
|
+
"type": "boolean"
|
|
2474
|
+
},
|
|
2475
|
+
"owner": {
|
|
2476
|
+
"type": "string",
|
|
2477
|
+
"nullable": true,
|
|
2478
|
+
"description": "Owner email address on the Microsoft side"
|
|
399
2479
|
}
|
|
400
2480
|
},
|
|
401
2481
|
"required": [
|
|
402
|
-
"
|
|
2482
|
+
"provider_calendar_id",
|
|
2483
|
+
"name"
|
|
403
2484
|
]
|
|
404
2485
|
},
|
|
2486
|
+
"CalendarPatchBody": {
|
|
2487
|
+
"type": "object",
|
|
2488
|
+
"properties": {
|
|
2489
|
+
"name": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"minLength": 1
|
|
2492
|
+
},
|
|
2493
|
+
"description": {
|
|
2494
|
+
"type": "string",
|
|
2495
|
+
"nullable": true
|
|
2496
|
+
},
|
|
2497
|
+
"color": {
|
|
2498
|
+
"type": "string",
|
|
2499
|
+
"nullable": true,
|
|
2500
|
+
"description": "Hex color (e.g. \"#3b82f6\") or provider-defined named color"
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
405
2504
|
"CalendarEvent": {
|
|
406
2505
|
"type": "object",
|
|
407
2506
|
"properties": {
|
|
@@ -432,6 +2531,7 @@
|
|
|
432
2531
|
},
|
|
433
2532
|
"calendar_id": {
|
|
434
2533
|
"type": "string",
|
|
2534
|
+
"minLength": 1,
|
|
435
2535
|
"description": "epilot calendar this event belongs to"
|
|
436
2536
|
},
|
|
437
2537
|
"event_type": {
|
|
@@ -455,6 +2555,7 @@
|
|
|
455
2555
|
},
|
|
456
2556
|
"timezone": {
|
|
457
2557
|
"type": "string",
|
|
2558
|
+
"minLength": 1,
|
|
458
2559
|
"description": "IANA timezone of the original event (for display)"
|
|
459
2560
|
},
|
|
460
2561
|
"is_all_day": {
|
|
@@ -669,6 +2770,120 @@
|
|
|
669
2770
|
"required": [
|
|
670
2771
|
"type"
|
|
671
2772
|
]
|
|
2773
|
+
},
|
|
2774
|
+
"CalendarEventCreateBody": {
|
|
2775
|
+
"type": "object",
|
|
2776
|
+
"properties": {
|
|
2777
|
+
"calendar_id": {
|
|
2778
|
+
"type": "string",
|
|
2779
|
+
"minLength": 1,
|
|
2780
|
+
"description": "epilot calendar this event belongs to"
|
|
2781
|
+
},
|
|
2782
|
+
"description": {
|
|
2783
|
+
"type": "string",
|
|
2784
|
+
"nullable": true,
|
|
2785
|
+
"description": "Preview of the event body, truncated to 255 chars",
|
|
2786
|
+
"maxLength": 255
|
|
2787
|
+
},
|
|
2788
|
+
"start_time": {
|
|
2789
|
+
"type": "string",
|
|
2790
|
+
"format": "date-time",
|
|
2791
|
+
"description": "Event start in UTC"
|
|
2792
|
+
},
|
|
2793
|
+
"end_time": {
|
|
2794
|
+
"type": "string",
|
|
2795
|
+
"format": "date-time",
|
|
2796
|
+
"description": "Event end in UTC"
|
|
2797
|
+
},
|
|
2798
|
+
"timezone": {
|
|
2799
|
+
"type": "string",
|
|
2800
|
+
"minLength": 1,
|
|
2801
|
+
"description": "IANA timezone of the original event (for display)"
|
|
2802
|
+
},
|
|
2803
|
+
"is_all_day": {
|
|
2804
|
+
"type": "boolean"
|
|
2805
|
+
},
|
|
2806
|
+
"location": {
|
|
2807
|
+
"type": "string",
|
|
2808
|
+
"nullable": true
|
|
2809
|
+
},
|
|
2810
|
+
"status": {
|
|
2811
|
+
"$ref": "#/components/schemas/EventStatus"
|
|
2812
|
+
},
|
|
2813
|
+
"sensitivity": {
|
|
2814
|
+
"$ref": "#/components/schemas/Sensitivity"
|
|
2815
|
+
},
|
|
2816
|
+
"_title": {
|
|
2817
|
+
"type": "string",
|
|
2818
|
+
"minLength": 1
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
"required": [
|
|
2822
|
+
"calendar_id",
|
|
2823
|
+
"start_time",
|
|
2824
|
+
"end_time",
|
|
2825
|
+
"timezone",
|
|
2826
|
+
"is_all_day",
|
|
2827
|
+
"status",
|
|
2828
|
+
"sensitivity",
|
|
2829
|
+
"_title"
|
|
2830
|
+
]
|
|
2831
|
+
},
|
|
2832
|
+
"CalendarEventPatchBody": {
|
|
2833
|
+
"type": "object",
|
|
2834
|
+
"properties": {
|
|
2835
|
+
"description": {
|
|
2836
|
+
"type": "string",
|
|
2837
|
+
"nullable": true,
|
|
2838
|
+
"description": "Preview of the event body, truncated to 255 chars",
|
|
2839
|
+
"maxLength": 255
|
|
2840
|
+
},
|
|
2841
|
+
"start_time": {
|
|
2842
|
+
"type": "string",
|
|
2843
|
+
"format": "date-time",
|
|
2844
|
+
"description": "Event start in UTC"
|
|
2845
|
+
},
|
|
2846
|
+
"end_time": {
|
|
2847
|
+
"type": "string",
|
|
2848
|
+
"format": "date-time",
|
|
2849
|
+
"description": "Event end in UTC"
|
|
2850
|
+
},
|
|
2851
|
+
"timezone": {
|
|
2852
|
+
"type": "string",
|
|
2853
|
+
"minLength": 1,
|
|
2854
|
+
"description": "IANA timezone of the original event (for display)"
|
|
2855
|
+
},
|
|
2856
|
+
"is_all_day": {
|
|
2857
|
+
"type": "boolean"
|
|
2858
|
+
},
|
|
2859
|
+
"location": {
|
|
2860
|
+
"type": "string",
|
|
2861
|
+
"nullable": true
|
|
2862
|
+
},
|
|
2863
|
+
"status": {
|
|
2864
|
+
"$ref": "#/components/schemas/EventStatus"
|
|
2865
|
+
},
|
|
2866
|
+
"sensitivity": {
|
|
2867
|
+
"$ref": "#/components/schemas/Sensitivity"
|
|
2868
|
+
},
|
|
2869
|
+
"_title": {
|
|
2870
|
+
"type": "string",
|
|
2871
|
+
"minLength": 1
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
},
|
|
2875
|
+
"ShareEventBody": {
|
|
2876
|
+
"type": "object",
|
|
2877
|
+
"properties": {
|
|
2878
|
+
"user_id": {
|
|
2879
|
+
"type": "string",
|
|
2880
|
+
"minLength": 1,
|
|
2881
|
+
"description": "epilot user id (same organization) to grant view-only access to this event"
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
"required": [
|
|
2885
|
+
"user_id"
|
|
2886
|
+
]
|
|
672
2887
|
}
|
|
673
2888
|
}
|
|
674
2889
|
}
|