@checkstack/integration-backend 0.0.4 → 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 CHANGED
@@ -1,5 +1,86 @@
1
1
  # @checkstack/integration-backend
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9faec1f: # Unified AccessRule Terminology Refactoring
8
+
9
+ This release completes a comprehensive terminology refactoring from "permission" to "accessRule" across the entire codebase, establishing a consistent and modern access control vocabulary.
10
+
11
+ ## Changes
12
+
13
+ ### Core Infrastructure (`@checkstack/common`)
14
+
15
+ - Introduced `AccessRule` interface as the primary access control type
16
+ - Added `accessPair()` helper for creating read/manage access rule pairs
17
+ - Added `access()` builder for individual access rules
18
+ - Replaced `Permission` type with `AccessRule` throughout
19
+
20
+ ### API Changes
21
+
22
+ - `env.registerPermissions()` → `env.registerAccessRules()`
23
+ - `meta.permissions` → `meta.access` in RPC contracts
24
+ - `usePermission()` → `useAccess()` in frontend hooks
25
+ - Route `permission:` field → `accessRule:` field
26
+
27
+ ### UI Changes
28
+
29
+ - "Roles & Permissions" tab → "Roles & Access Rules"
30
+ - "You don't have permission..." → "You don't have access..."
31
+ - All permission-related UI text updated
32
+
33
+ ### Documentation & Templates
34
+
35
+ - Updated 18 documentation files with AccessRule terminology
36
+ - Updated 7 scaffolding templates with `accessPair()` pattern
37
+ - All code examples use new AccessRule API
38
+
39
+ ## Migration Guide
40
+
41
+ ### Backend Plugins
42
+
43
+ ```diff
44
+ - import { permissionList } from "./permissions";
45
+ - env.registerPermissions(permissionList);
46
+ + import { accessRules } from "./access";
47
+ + env.registerAccessRules(accessRules);
48
+ ```
49
+
50
+ ### RPC Contracts
51
+
52
+ ```diff
53
+ - .meta({ userType: "user", permissions: [permissions.read.id] })
54
+ + .meta({ userType: "user", access: [access.read] })
55
+ ```
56
+
57
+ ### Frontend Hooks
58
+
59
+ ```diff
60
+ - const canRead = accessApi.usePermission(permissions.read.id);
61
+ + const canRead = accessApi.useAccess(access.read);
62
+ ```
63
+
64
+ ### Routes
65
+
66
+ ```diff
67
+ - permission: permissions.entityRead.id,
68
+ + accessRule: access.read,
69
+ ```
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [9faec1f]
74
+ - Updated dependencies [827b286]
75
+ - Updated dependencies [f533141]
76
+ - Updated dependencies [aa4a8ab]
77
+ - @checkstack/backend-api@0.3.0
78
+ - @checkstack/command-backend@0.1.0
79
+ - @checkstack/common@0.2.0
80
+ - @checkstack/integration-common@0.1.0
81
+ - @checkstack/signal-common@0.1.0
82
+ - @checkstack/queue-api@0.0.5
83
+
3
84
  ## 0.0.4
4
85
 
5
86
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-backend",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
package/src/index.ts CHANGED
@@ -5,11 +5,11 @@ import {
5
5
  createServiceRef,
6
6
  } from "@checkstack/backend-api";
7
7
  import {
8
- permissionList,
8
+ integrationAccessRules,
9
+ integrationAccess,
9
10
  pluginMetadata,
10
11
  integrationContract,
11
12
  integrationRoutes,
12
- permissions,
13
13
  } from "@checkstack/integration-common";
14
14
  import { resolveRoute } from "@checkstack/common";
15
15
  import type { PluginMetadata } from "@checkstack/common";
@@ -106,8 +106,8 @@ export default createBackendPlugin({
106
106
  const eventRegistry = createIntegrationEventRegistry();
107
107
  const providerRegistry = createIntegrationProviderRegistry();
108
108
 
109
- // Register static permissions
110
- env.registerPermissions(permissionList);
109
+ // Register static access rules
110
+ env.registerAccessRules(integrationAccessRules);
111
111
 
112
112
  // Register the event extension point
113
113
  env.registerExtensionPoint(integrationEventExtensionPoint, {
@@ -221,7 +221,7 @@ export default createBackendPlugin({
221
221
  iconName: "Webhook",
222
222
  route:
223
223
  resolveRoute(integrationRoutes.routes.list) + "?action=create",
224
- requiredPermissions: [permissions.integrationManage],
224
+ requiredAccessRules: [integrationAccess.manage],
225
225
  },
226
226
  {
227
227
  id: "manage",
@@ -230,7 +230,7 @@ export default createBackendPlugin({
230
230
  iconName: "Webhook",
231
231
  shortcuts: ["meta+shift+g", "ctrl+shift+g"],
232
232
  route: resolveRoute(integrationRoutes.routes.list),
233
- requiredPermissions: [permissions.integrationManage],
233
+ requiredAccessRules: [integrationAccess.manage],
234
234
  },
235
235
  {
236
236
  id: "logs",
@@ -238,7 +238,7 @@ export default createBackendPlugin({
238
238
  subtitle: "View integration delivery logs",
239
239
  iconName: "FileText",
240
240
  route: resolveRoute(integrationRoutes.routes.logs),
241
- requiredPermissions: [permissions.integrationManage],
241
+ requiredAccessRules: [integrationAccess.manage],
242
242
  },
243
243
  ],
244
244
  });
package/src/router.ts CHANGED
@@ -108,8 +108,8 @@ interface RouterDeps {
108
108
  /**
109
109
  * Creates the integration router using contract-based implementation.
110
110
  *
111
- * Auth and permissions are automatically enforced via autoAuthMiddleware
112
- * based on the contract's meta.userType and meta.permissions.
111
+ * Auth and access rules are automatically enforced via autoAuthMiddleware
112
+ * based on the contract's meta.userType and meta.access.
113
113
  */
114
114
  export function createIntegrationRouter(deps: RouterDeps) {
115
115
  const {