-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsupport-shift-scheduler-output.schema.json
52 lines (50 loc) · 1.47 KB
/
support-shift-scheduler-output.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"agent_shift_list": {
"description": "A list of agent shifts",
"type": "array",
"items": {
"description": "An agent shift with all required metadata, like agent info and shift interval",
"type": "object",
"properties": {
"agent": {
"description": "Agent info in '@handle <email>' format",
"type": "string",
"pattern": "^@[a-zA-Z0-9_\\-+]+ <[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,4}>$"
},
"start": {
"description": "Shift start (UK time)",
"type": "number",
"minimum": 0,
"maximum": 54
},
"end": {
"description": "Shift end (UK time)",
"type": "number",
"minimum": 0,
"maximum": 54
}
},
"required": [ "agent", "start", "end" ]
}
}
},
"description": "Support shift scheduler output JSON schema",
"type": "array",
"items": {
"description": "An epoch schedule",
"type": "object",
"properties": {
"start_date": {
"description": "Day when the schedule starts in YYYY-MM-DD format",
"type": "string"
},
"shifts": {
"description": "The list of agent shifts that compose the schedule",
"$ref": "#/definitions/agent_shift_list"
}
},
"required": [ "start_date", "shifts" ]
}
}