@checkstack/catalog-backend 0.0.2 → 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.
- package/CHANGELOG.md +51 -0
- package/package.json +1 -1
- package/src/router.ts +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @checkstack/catalog-backend
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8e43507: BREAKING: `getSystems` now returns `{ systems: [...] }` instead of plain array
|
|
8
|
+
|
|
9
|
+
This change enables resource-level access control filtering for the catalog plugin. The middleware needs a consistent object format with named keys to perform post-execution filtering on list endpoints.
|
|
10
|
+
|
|
11
|
+
## Breaking Changes
|
|
12
|
+
|
|
13
|
+
- `getSystems()` now returns `{ systems: System[] }` instead of `System[]`
|
|
14
|
+
- All call sites must update to destructure: `const { systems } = await api.getSystems()`
|
|
15
|
+
|
|
16
|
+
## New Features
|
|
17
|
+
|
|
18
|
+
- Added `resourceAccess` metadata to catalog endpoints:
|
|
19
|
+
- `getSystems`: List filtering by team access
|
|
20
|
+
- `getSystem`: Single resource pre-check by team access
|
|
21
|
+
- `getEntities`: List filtering for systems by team access
|
|
22
|
+
|
|
23
|
+
## Migration
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
- const systems = await catalogApi.getSystems();
|
|
27
|
+
+ const { systems } = await catalogApi.getSystems();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [97c5a6b]
|
|
33
|
+
- Updated dependencies [8e43507]
|
|
34
|
+
- Updated dependencies [8e43507]
|
|
35
|
+
- @checkstack/backend-api@0.2.0
|
|
36
|
+
- @checkstack/catalog-common@1.0.0
|
|
37
|
+
- @checkstack/common@0.1.0
|
|
38
|
+
- @checkstack/command-backend@0.0.4
|
|
39
|
+
- @checkstack/notification-common@0.0.4
|
|
40
|
+
|
|
41
|
+
## 0.0.3
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [f5b1f49]
|
|
46
|
+
- Updated dependencies [f5b1f49]
|
|
47
|
+
- Updated dependencies [f5b1f49]
|
|
48
|
+
- @checkstack/backend-api@0.1.0
|
|
49
|
+
- @checkstack/common@0.0.3
|
|
50
|
+
- @checkstack/command-backend@0.0.3
|
|
51
|
+
- @checkstack/catalog-common@0.0.3
|
|
52
|
+
- @checkstack/notification-common@0.0.3
|
|
53
|
+
|
|
3
54
|
## 0.0.2
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { implement, ORPCError } from "@orpc/server";
|
|
2
|
-
import {
|
|
3
|
-
autoAuthMiddleware,
|
|
4
|
-
type RpcContext,
|
|
5
|
-
} from "@checkstack/backend-api";
|
|
2
|
+
import { autoAuthMiddleware, type RpcContext } from "@checkstack/backend-api";
|
|
6
3
|
import { catalogContract } from "@checkstack/catalog-common";
|
|
7
4
|
import { EntityService } from "./services/entity-service";
|
|
8
5
|
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
|
|
@@ -95,9 +92,11 @@ export const createCatalogRouter = ({
|
|
|
95
92
|
|
|
96
93
|
const getSystems = os.getSystems.handler(async () => {
|
|
97
94
|
const systems = await entityService.getSystems();
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
return {
|
|
96
|
+
systems: systems as unknown as Array<
|
|
97
|
+
(typeof systems)[number] & { metadata: Record<string, unknown> | null }
|
|
98
|
+
>,
|
|
99
|
+
};
|
|
101
100
|
});
|
|
102
101
|
|
|
103
102
|
const getSystem = os.getSystem.handler(async ({ input }) => {
|