@checkstack/catalog-common 2.0.1 → 2.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.
- package/CHANGELOG.md +42 -0
- package/package.json +7 -7
- package/src/rpc-contract.ts +38 -0
- package/src/types.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @checkstack/catalog-common
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1ef2e79: feat: hotlinks on incidents/maintenances and additional links on systems
|
|
8
|
+
|
|
9
|
+
Users with `manage` access on an incident, maintenance, or system can now
|
|
10
|
+
attach free-form URL "hotlinks" — Jira tickets, runbooks, dashboards, ticket
|
|
11
|
+
tools, etc. — alongside the existing fields.
|
|
12
|
+
|
|
13
|
+
- **Incidents** & **maintenances**: links live on the entity itself and are
|
|
14
|
+
surfaced both in the editor dialog and on the public detail page. Two new
|
|
15
|
+
RPC procedures per plugin (`addLink`, `removeLink`) gated behind the
|
|
16
|
+
existing `manage` access rule. Links are returned as part of
|
|
17
|
+
`getIncident` / `getMaintenance` and cache-invalidated on every link
|
|
18
|
+
mutation.
|
|
19
|
+
- **Systems**: a parallel `system_links` table with `getSystemLinks`,
|
|
20
|
+
`addSystemLink`, `removeSystemLink` procedures. Surfaced inside the
|
|
21
|
+
system editor (next to contacts) and on the read-only system detail
|
|
22
|
+
sidebar. Cache-scoped per-system so list endpoints remain hot.
|
|
23
|
+
- **Shared UI**: a `LinksEditor` component in `@checkstack/ui` does the
|
|
24
|
+
presentation; the three plugins each own their own RPC wiring.
|
|
25
|
+
|
|
26
|
+
Database changes ship as additive migrations (new `incident_links`,
|
|
27
|
+
`maintenance_links`, `system_links` tables, all FK-cascaded on parent
|
|
28
|
+
delete). No existing columns or rows are touched.
|
|
29
|
+
|
|
30
|
+
The system incident and maintenance history pages now sort by relevance:
|
|
31
|
+
active entries (non-`resolved` incidents, `scheduled` or `in_progress`
|
|
32
|
+
maintenances) appear at the top, with creation date descending as the
|
|
33
|
+
tiebreaker.
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [42abfff]
|
|
38
|
+
- Updated dependencies [aa89bc5]
|
|
39
|
+
- Updated dependencies [950d6ec]
|
|
40
|
+
- @checkstack/common@0.9.0
|
|
41
|
+
- @checkstack/frontend-api@0.5.0
|
|
42
|
+
- @checkstack/auth-common@0.6.6
|
|
43
|
+
- @checkstack/notification-common@1.0.2
|
|
44
|
+
|
|
3
45
|
## 2.0.1
|
|
4
46
|
|
|
5
47
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/catalog-common",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@checkstack/common": "0.
|
|
13
|
-
"@checkstack/auth-common": "0.6.
|
|
14
|
-
"@checkstack/frontend-api": "0.4.
|
|
15
|
-
"@checkstack/notification-common": "1.0.
|
|
12
|
+
"@checkstack/common": "0.8.0",
|
|
13
|
+
"@checkstack/auth-common": "0.6.5",
|
|
14
|
+
"@checkstack/frontend-api": "0.4.2",
|
|
15
|
+
"@checkstack/notification-common": "1.0.1",
|
|
16
16
|
"@orpc/contract": "^1.13.14",
|
|
17
17
|
"zod": "^4.2.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"typescript": "^5.7.2",
|
|
21
|
-
"@checkstack/tsconfig": "0.0.
|
|
22
|
-
"@checkstack/scripts": "0.
|
|
21
|
+
"@checkstack/tsconfig": "0.0.7",
|
|
22
|
+
"@checkstack/scripts": "0.3.0"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"typecheck": "tsgo -b",
|
package/src/rpc-contract.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ViewSchema,
|
|
8
8
|
SystemContactSchema,
|
|
9
9
|
ContactTypeSchema,
|
|
10
|
+
SystemLinkSchema,
|
|
10
11
|
} from "./types";
|
|
11
12
|
import { catalogAccess } from "./access";
|
|
12
13
|
|
|
@@ -164,6 +165,43 @@ export const catalogContract = {
|
|
|
164
165
|
.input(z.string())
|
|
165
166
|
.output(z.object({ success: z.boolean() })),
|
|
166
167
|
|
|
168
|
+
// ==========================================================================
|
|
169
|
+
// SYSTEM LINKS MANAGEMENT
|
|
170
|
+
// Free-form URLs (Jira boards, dashboards, runbooks) attached to a system.
|
|
171
|
+
// ==========================================================================
|
|
172
|
+
|
|
173
|
+
getSystemLinks: proc({
|
|
174
|
+
operationType: "query",
|
|
175
|
+
userType: "public",
|
|
176
|
+
access: [catalogAccess.system.read],
|
|
177
|
+
instanceAccess: { idParam: "systemId" },
|
|
178
|
+
})
|
|
179
|
+
.input(z.object({ systemId: z.string() }))
|
|
180
|
+
.output(z.array(SystemLinkSchema)),
|
|
181
|
+
|
|
182
|
+
addSystemLink: proc({
|
|
183
|
+
operationType: "mutation",
|
|
184
|
+
userType: "authenticated",
|
|
185
|
+
access: [catalogAccess.system.manage],
|
|
186
|
+
instanceAccess: { idParam: "systemId" },
|
|
187
|
+
})
|
|
188
|
+
.input(
|
|
189
|
+
z.object({
|
|
190
|
+
systemId: z.string(),
|
|
191
|
+
label: z.string().max(120).optional(),
|
|
192
|
+
url: z.string().url("Must be a valid URL"),
|
|
193
|
+
}),
|
|
194
|
+
)
|
|
195
|
+
.output(SystemLinkSchema),
|
|
196
|
+
|
|
197
|
+
removeSystemLink: proc({
|
|
198
|
+
operationType: "mutation",
|
|
199
|
+
userType: "authenticated",
|
|
200
|
+
access: [catalogAccess.system.manage],
|
|
201
|
+
})
|
|
202
|
+
.input(z.string())
|
|
203
|
+
.output(z.object({ success: z.boolean() })),
|
|
204
|
+
|
|
167
205
|
// ==========================================================================
|
|
168
206
|
// GROUP MANAGEMENT (userType: "authenticated" with manage access)
|
|
169
207
|
// ==========================================================================
|
package/src/types.ts
CHANGED
|
@@ -46,6 +46,16 @@ export const SystemContactSchema = z.discriminatedUnion("type", [
|
|
|
46
46
|
]);
|
|
47
47
|
export type SystemContact = z.infer<typeof SystemContactSchema>;
|
|
48
48
|
|
|
49
|
+
// System Links — free-form hotlinks attached to a system (Jira board, dashboards, etc.)
|
|
50
|
+
export const SystemLinkSchema = z.object({
|
|
51
|
+
id: z.string(),
|
|
52
|
+
systemId: z.string(),
|
|
53
|
+
label: z.string().nullable(),
|
|
54
|
+
url: z.string(),
|
|
55
|
+
createdAt: z.date(),
|
|
56
|
+
});
|
|
57
|
+
export type SystemLink = z.infer<typeof SystemLinkSchema>;
|
|
58
|
+
|
|
49
59
|
export const GroupSchema = z.object({
|
|
50
60
|
id: z.string(),
|
|
51
61
|
name: z.string(),
|