@kana-ai/edgar-ext-github 0.0.0-stage → 0.1.0

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 (136) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +469 -2
  3. package/agents/dismiss/agent.toml +4 -0
  4. package/agents/dismiss/instructions.md +25 -0
  5. package/dist/src/api/app.d.ts +16 -0
  6. package/dist/src/api/app.js +32 -0
  7. package/dist/src/api/client.d.ts +26 -0
  8. package/dist/src/api/client.js +103 -0
  9. package/dist/src/api/failures.d.ts +8 -0
  10. package/dist/src/api/failures.js +31 -0
  11. package/dist/src/feed/alerts.d.ts +26 -0
  12. package/dist/src/feed/alerts.js +117 -0
  13. package/dist/src/feed/cards.d.ts +32 -0
  14. package/dist/src/feed/cards.js +164 -0
  15. package/dist/src/feed/service.d.ts +28 -0
  16. package/dist/src/feed/service.js +163 -0
  17. package/dist/src/index.d.ts +490 -0
  18. package/dist/src/index.js +62 -0
  19. package/dist/src/schemas/config.d.ts +57 -0
  20. package/dist/src/schemas/config.js +89 -0
  21. package/dist/src/schemas/github.d.ts +417 -0
  22. package/dist/src/schemas/github.js +216 -0
  23. package/dist/src/schemas/tools.d.ts +620 -0
  24. package/dist/src/schemas/tools.js +501 -0
  25. package/dist/src/tools/alerts.d.ts +45 -0
  26. package/dist/src/tools/alerts.js +100 -0
  27. package/dist/src/tools/branch.d.ts +9 -0
  28. package/dist/src/tools/branch.js +48 -0
  29. package/dist/src/tools/checks.d.ts +118 -0
  30. package/dist/src/tools/checks.js +223 -0
  31. package/dist/src/tools/discussion.d.ts +41 -0
  32. package/dist/src/tools/discussion.js +66 -0
  33. package/dist/src/tools/pull-request.d.ts +195 -0
  34. package/dist/src/tools/pull-request.js +537 -0
  35. package/dist/src/tools/repository.d.ts +53 -0
  36. package/dist/src/tools/repository.js +134 -0
  37. package/dist/src/tools/screenshot.d.ts +21 -0
  38. package/dist/src/tools/screenshot.js +99 -0
  39. package/dist/src/tracker/assignee.d.ts +15 -0
  40. package/dist/src/tracker/assignee.js +65 -0
  41. package/dist/src/tracker/cards.d.ts +41 -0
  42. package/dist/src/tracker/cards.js +361 -0
  43. package/dist/src/tracker/comments.d.ts +9 -0
  44. package/dist/src/tracker/comments.js +68 -0
  45. package/dist/src/tracker/description.d.ts +19 -0
  46. package/dist/src/tracker/description.js +55 -0
  47. package/dist/src/tracker/hand-back.d.ts +8 -0
  48. package/dist/src/tracker/hand-back.js +60 -0
  49. package/dist/src/tracker/port.d.ts +2 -0
  50. package/dist/src/tracker/port.js +42 -0
  51. package/dist/src/tracker/states.d.ts +77 -0
  52. package/dist/src/tracker/states.js +189 -0
  53. package/dist/src/tracker/tools.d.ts +143 -0
  54. package/dist/src/tracker/tools.js +131 -0
  55. package/dist/src/tracker/transitions.d.ts +12 -0
  56. package/dist/src/tracker/transitions.js +101 -0
  57. package/edgar-extension.json +507 -0
  58. package/package.json +43 -3
  59. package/schemas/assign.in.json +15 -0
  60. package/schemas/assign.out.json +14 -0
  61. package/schemas/attach_screenshot.in.json +44 -0
  62. package/schemas/attach_screenshot.out.json +31 -0
  63. package/schemas/batch_cards.in.json +27 -0
  64. package/schemas/batch_cards.out.json +37 -0
  65. package/schemas/branch_protection.in.json +15 -0
  66. package/schemas/branch_protection.out.json +67 -0
  67. package/schemas/ci_run.in.json +12 -0
  68. package/schemas/ci_run.out.json +109 -0
  69. package/schemas/close.in.json +14 -0
  70. package/schemas/close.out.json +10 -0
  71. package/schemas/close_pull_request.in.json +21 -0
  72. package/schemas/close_pull_request.out.json +14 -0
  73. package/schemas/comment.in.json +19 -0
  74. package/schemas/comment.out.json +10 -0
  75. package/schemas/config.json +202 -0
  76. package/schemas/count_sighting.in.json +17 -0
  77. package/schemas/count_sighting.out.json +10 -0
  78. package/schemas/create_card.in.json +108 -0
  79. package/schemas/create_card.out.json +13 -0
  80. package/schemas/dependabot_alerts.in.json +49 -0
  81. package/schemas/dependabot_alerts.out.json +75 -0
  82. package/schemas/dismiss_dependabot_alert.in.json +26 -0
  83. package/schemas/dismiss_dependabot_alert.out.json +27 -0
  84. package/schemas/find_assignee.in.json +15 -0
  85. package/schemas/find_assignee.out.json +10 -0
  86. package/schemas/find_cards.in.json +18 -0
  87. package/schemas/find_cards.out.json +33 -0
  88. package/schemas/find_dependabot_dismissal.in.json +12 -0
  89. package/schemas/find_dependabot_dismissal.out.json +27 -0
  90. package/schemas/find_description.in.json +15 -0
  91. package/schemas/find_description.out.json +10 -0
  92. package/schemas/find_pull_request.in.json +25 -0
  93. package/schemas/find_pull_request.out.json +14 -0
  94. package/schemas/hand_back.in.json +11 -0
  95. package/schemas/hand_back.out.json +18 -0
  96. package/schemas/linked_pull_requests.in.json +15 -0
  97. package/schemas/linked_pull_requests.out.json +44 -0
  98. package/schemas/list_pull_requests.in.json +26 -0
  99. package/schemas/list_pull_requests.out.json +42 -0
  100. package/schemas/merge_pull_request.in.json +22 -0
  101. package/schemas/merge_pull_request.out.json +16 -0
  102. package/schemas/move.in.json +15 -0
  103. package/schemas/move.out.json +10 -0
  104. package/schemas/note_pull_request.in.json +15 -0
  105. package/schemas/note_pull_request.out.json +10 -0
  106. package/schemas/open_pull_request.in.json +113 -0
  107. package/schemas/open_pull_request.out.json +15 -0
  108. package/schemas/pull_request_checks.in.json +11 -0
  109. package/schemas/pull_request_checks.out.json +72 -0
  110. package/schemas/pull_request_discussion.in.json +11 -0
  111. package/schemas/pull_request_discussion.out.json +107 -0
  112. package/schemas/pull_request_state.in.json +11 -0
  113. package/schemas/pull_request_state.out.json +52 -0
  114. package/schemas/push_branch.in.json +21 -0
  115. package/schemas/push_branch.out.json +13 -0
  116. package/schemas/release_follow_ups.in.json +15 -0
  117. package/schemas/release_follow_ups.out.json +13 -0
  118. package/schemas/reopen_dependabot_alert.in.json +33 -0
  119. package/schemas/reopen_dependabot_alert.out.json +22 -0
  120. package/schemas/restore_assignee.in.json +20 -0
  121. package/schemas/restore_assignee.out.json +10 -0
  122. package/schemas/restore_description.in.json +20 -0
  123. package/schemas/restore_description.out.json +10 -0
  124. package/schemas/update_description.in.json +15 -0
  125. package/schemas/update_description.out.json +14 -0
  126. package/schemas/update_pull_request.in.json +81 -0
  127. package/schemas/update_pull_request.out.json +10 -0
  128. package/schemas/wait_for_checks.in.json +11 -0
  129. package/schemas/wait_for_checks.out.json +72 -0
  130. package/schemas/wait_for_merge.in.json +11 -0
  131. package/schemas/wait_for_merge.out.json +17 -0
  132. package/schemas/wait_for_passed_checks.in.json +11 -0
  133. package/schemas/wait_for_passed_checks.out.json +72 -0
  134. package/schemas/wait_for_review.in.json +11 -0
  135. package/schemas/wait_for_review.out.json +52 -0
  136. package/workflows/resume.toml +17 -0
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "batch": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 256,
9
+ "description": "the `decided.batch` of the card you work on, such as its repository"
10
+ },
11
+ "except": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "description": "the card you work on; it is left out"
15
+ },
16
+ "only": {
17
+ "description": "only these card ids, each kept only while it is an open card of the batch",
18
+ "maxItems": 20,
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ }
24
+ }
25
+ },
26
+ "required": ["batch", "except"]
27
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "cards": {
6
+ "maxItems": 20,
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "id": {
12
+ "type": "string"
13
+ },
14
+ "title": {
15
+ "type": "string"
16
+ },
17
+ "url": {
18
+ "type": "string"
19
+ },
20
+ "description": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": ["id", "title", "url", "description"]
25
+ }
26
+ },
27
+ "skipped": {
28
+ "description": "the ids of `only` that are not open cards of the batch; absent when none is",
29
+ "maxItems": 20,
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string"
33
+ }
34
+ }
35
+ },
36
+ "required": ["cards"]
37
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "repo": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "branch": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ }
13
+ },
14
+ "required": ["repo", "branch"]
15
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "branch": {
6
+ "type": "string"
7
+ },
8
+ "protected": {
9
+ "type": "boolean"
10
+ },
11
+ "pull_request_required": {
12
+ "type": ["boolean", "null"]
13
+ },
14
+ "required_approvals": {
15
+ "anyOf": [
16
+ {
17
+ "type": "integer",
18
+ "minimum": -9007199254740991,
19
+ "maximum": 9007199254740991
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ },
26
+ "required_checks": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "rules": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "properties": {
37
+ "type": {
38
+ "type": "string"
39
+ },
40
+ "ruleset_id": {
41
+ "type": "integer",
42
+ "minimum": -9007199254740991,
43
+ "maximum": 9007199254740991
44
+ },
45
+ "source": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "required": ["type", "ruleset_id", "source"]
50
+ }
51
+ },
52
+ "classic": {
53
+ "type": "string",
54
+ "enum": ["read", "none", "unreadable"],
55
+ "description": "unreadable: the classic rule needs an admin token, so the nulls are unknown"
56
+ }
57
+ },
58
+ "required": [
59
+ "branch",
60
+ "protected",
61
+ "pull_request_required",
62
+ "required_approvals",
63
+ "required_checks",
64
+ "rules",
65
+ "classic"
66
+ ]
67
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "url": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "description": "https://github.com/<owner>/<name>/actions/runs/<id>, with /job/<id> to read that job's log"
9
+ }
10
+ },
11
+ "required": ["url"]
12
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "url": {
6
+ "type": "string"
7
+ },
8
+ "workflow": {
9
+ "type": ["string", "null"]
10
+ },
11
+ "status": {
12
+ "type": ["string", "null"]
13
+ },
14
+ "conclusion": {
15
+ "type": ["string", "null"]
16
+ },
17
+ "commit": {
18
+ "type": "string"
19
+ },
20
+ "branch": {
21
+ "type": ["string", "null"]
22
+ },
23
+ "attempt": {
24
+ "type": "integer",
25
+ "minimum": -9007199254740991,
26
+ "maximum": 9007199254740991
27
+ },
28
+ "jobs": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "properties": {
33
+ "id": {
34
+ "type": "integer",
35
+ "minimum": -9007199254740991,
36
+ "maximum": 9007199254740991
37
+ },
38
+ "name": {
39
+ "type": "string"
40
+ },
41
+ "status": {
42
+ "type": "string"
43
+ },
44
+ "conclusion": {
45
+ "type": ["string", "null"]
46
+ },
47
+ "failed_steps": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ "required": ["id", "name", "status", "conclusion", "failed_steps"]
55
+ }
56
+ },
57
+ "logs": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "object",
61
+ "properties": {
62
+ "job": {
63
+ "type": "integer",
64
+ "minimum": -9007199254740991,
65
+ "maximum": 9007199254740991
66
+ },
67
+ "name": {
68
+ "type": "string"
69
+ },
70
+ "gone": {
71
+ "type": "boolean",
72
+ "description": "true when GitHub no longer keeps the log"
73
+ },
74
+ "errors": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "string"
78
+ }
79
+ },
80
+ "excerpt": {
81
+ "type": "string"
82
+ }
83
+ },
84
+ "required": ["job", "name", "gone", "errors", "excerpt"]
85
+ }
86
+ },
87
+ "unread": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "integer",
91
+ "minimum": -9007199254740991,
92
+ "maximum": 9007199254740991
93
+ },
94
+ "description": "failed jobs past the log limit, read with /job/<id>"
95
+ }
96
+ },
97
+ "required": [
98
+ "url",
99
+ "workflow",
100
+ "status",
101
+ "conclusion",
102
+ "commit",
103
+ "branch",
104
+ "attempt",
105
+ "jobs",
106
+ "logs",
107
+ "unread"
108
+ ]
109
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "reason": {
10
+ "type": "string"
11
+ }
12
+ },
13
+ "required": ["card", "reason"]
14
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "state": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["state"]
10
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "stage_output": {
6
+ "type": "object",
7
+ "properties": {
8
+ "url": {
9
+ "type": "string",
10
+ "minLength": 1
11
+ }
12
+ },
13
+ "required": ["url"]
14
+ },
15
+ "text": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ }
19
+ },
20
+ "required": ["stage_output"]
21
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "url": {
6
+ "type": "string"
7
+ },
8
+ "state": {
9
+ "type": "string",
10
+ "enum": ["open", "merged", "closed"]
11
+ }
12
+ },
13
+ "required": ["url", "state"]
14
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "text": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "link": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ }
17
+ },
18
+ "required": ["card", "text"]
19
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["id"]
10
+ }
@@ -0,0 +1,202 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "default_base": {
6
+ "default": "main",
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "app": {
11
+ "description": "sign in as this GitHub App installation; GITHUB_TOKEN then holds the App's private key",
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "anyOf": [
16
+ {
17
+ "type": "integer",
18
+ "exclusiveMinimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ {
22
+ "type": "string",
23
+ "minLength": 1
24
+ }
25
+ ]
26
+ },
27
+ "installation": {
28
+ "type": "integer",
29
+ "exclusiveMinimum": 0,
30
+ "maximum": 9007199254740991
31
+ }
32
+ },
33
+ "required": ["id", "installation"],
34
+ "additionalProperties": false
35
+ },
36
+ "watch": {
37
+ "description": "the service reads each repository every every_seconds and opens a card for a review asked of EDGAR, a red default branch, and red checks on EDGAR's own pull request",
38
+ "type": "object",
39
+ "properties": {
40
+ "services": {
41
+ "type": "object",
42
+ "propertyNames": {
43
+ "type": "string",
44
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
45
+ },
46
+ "additionalProperties": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "description": "each service of the project to watch, with its repository as owner/name"
51
+ },
52
+ "login": {
53
+ "description": "the GitHub login EDGAR works as; the default is the login of GITHUB_TOKEN, and an App needs it, such as edgar[bot]",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "every_seconds": {
58
+ "default": 60,
59
+ "type": "integer",
60
+ "minimum": 30,
61
+ "maximum": 3600
62
+ },
63
+ "card_column": {
64
+ "default": "intake",
65
+ "type": "string",
66
+ "minLength": 1
67
+ }
68
+ },
69
+ "required": ["services"],
70
+ "additionalProperties": false
71
+ },
72
+ "dependabot": {
73
+ "description": "the service reads the open Dependabot alerts of each repository every every_seconds and opens one card for each advisory of a package",
74
+ "type": "object",
75
+ "properties": {
76
+ "services": {
77
+ "type": "object",
78
+ "propertyNames": {
79
+ "type": "string",
80
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
81
+ },
82
+ "additionalProperties": {
83
+ "type": "string",
84
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
85
+ },
86
+ "description": "each repository to read, as owner/name, with the service of the project that its cards name"
87
+ },
88
+ "every_seconds": {
89
+ "default": 300,
90
+ "type": "integer",
91
+ "minimum": 60,
92
+ "maximum": 86400
93
+ },
94
+ "severity_min": {
95
+ "default": "low",
96
+ "description": "an alert under this severity opens no card",
97
+ "type": "string",
98
+ "enum": ["low", "medium", "high", "critical"]
99
+ },
100
+ "max_per_run": {
101
+ "default": 10,
102
+ "description": "the most cards one sweep opens, the worst first; the rest wait",
103
+ "type": "integer",
104
+ "minimum": 1,
105
+ "maximum": 100
106
+ },
107
+ "card_column": {
108
+ "default": "intake",
109
+ "type": "string",
110
+ "minLength": 1
111
+ }
112
+ },
113
+ "required": ["services"],
114
+ "additionalProperties": false
115
+ },
116
+ "columns": {
117
+ "description": "the issue label of each open engine state; with tracker, it makes GitHub Issues a tracker of the project; done closes an issue as completed, and cancelled closes it as not planned",
118
+ "type": "object",
119
+ "properties": {
120
+ "intake": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ },
124
+ "ready": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "working": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "in_review": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "waiting_on_person": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "in_testing": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ }
144
+ },
145
+ "required": ["intake", "ready", "working", "in_review", "waiting_on_person", "in_testing"],
146
+ "additionalProperties": false
147
+ },
148
+ "tracker": {
149
+ "description": "GitHub Issues as a tracker of the project, with columns",
150
+ "type": "object",
151
+ "properties": {
152
+ "repos": {
153
+ "type": "object",
154
+ "propertyNames": {
155
+ "type": "string",
156
+ "pattern": "^[A-Z][A-Z0-9]{0,9}$"
157
+ },
158
+ "additionalProperties": {
159
+ "type": "object",
160
+ "properties": {
161
+ "repo": {
162
+ "type": "string",
163
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
164
+ },
165
+ "service": {
166
+ "type": "string",
167
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
168
+ }
169
+ },
170
+ "required": ["repo", "service"],
171
+ "additionalProperties": false
172
+ },
173
+ "description": "each repository whose issues are cards, by the key of its card ids (API makes API-123), with its repository as owner/name and the service its cards name"
174
+ },
175
+ "title_prefix": {
176
+ "type": "string",
177
+ "minLength": 1
178
+ },
179
+ "labels": {
180
+ "type": "array",
181
+ "items": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ }
185
+ },
186
+ "assignee": {
187
+ "description": "the GitHub login of `assignee_only`; the default is the login of GITHUB_TOKEN, and an App needs it, such as edgar[bot]",
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "assignee_only": {
192
+ "default": false,
193
+ "description": "true: an issue is in scope only while it is assigned to `assignee` or labelled edgar:waiting, and EDGAR assigns each issue it files to `assignee`",
194
+ "type": "boolean"
195
+ }
196
+ },
197
+ "required": ["repos"],
198
+ "additionalProperties": false
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "seen_at": {
10
+ "description": "when the fault was seen again; a retry with the same time counts nothing",
11
+ "type": "string",
12
+ "format": "date-time",
13
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
14
+ }
15
+ },
16
+ "required": ["card"]
17
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["id"]
10
+ }