@checkstack/integration-backend 0.0.4 → 0.1.1

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,95 @@
1
1
  # @checkstack/integration-backend
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9a27800]
8
+ - @checkstack/queue-api@0.0.6
9
+ - @checkstack/backend-api@0.3.1
10
+ - @checkstack/command-backend@0.1.1
11
+
12
+ ## 0.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 9faec1f: # Unified AccessRule Terminology Refactoring
17
+
18
+ This release completes a comprehensive terminology refactoring from "permission" to "accessRule" across the entire codebase, establishing a consistent and modern access control vocabulary.
19
+
20
+ ## Changes
21
+
22
+ ### Core Infrastructure (`@checkstack/common`)
23
+
24
+ - Introduced `AccessRule` interface as the primary access control type
25
+ - Added `accessPair()` helper for creating read/manage access rule pairs
26
+ - Added `access()` builder for individual access rules
27
+ - Replaced `Permission` type with `AccessRule` throughout
28
+
29
+ ### API Changes
30
+
31
+ - `env.registerPermissions()` → `env.registerAccessRules()`
32
+ - `meta.permissions` → `meta.access` in RPC contracts
33
+ - `usePermission()` → `useAccess()` in frontend hooks
34
+ - Route `permission:` field → `accessRule:` field
35
+
36
+ ### UI Changes
37
+
38
+ - "Roles & Permissions" tab → "Roles & Access Rules"
39
+ - "You don't have permission..." → "You don't have access..."
40
+ - All permission-related UI text updated
41
+
42
+ ### Documentation & Templates
43
+
44
+ - Updated 18 documentation files with AccessRule terminology
45
+ - Updated 7 scaffolding templates with `accessPair()` pattern
46
+ - All code examples use new AccessRule API
47
+
48
+ ## Migration Guide
49
+
50
+ ### Backend Plugins
51
+
52
+ ```diff
53
+ - import { permissionList } from "./permissions";
54
+ - env.registerPermissions(permissionList);
55
+ + import { accessRules } from "./access";
56
+ + env.registerAccessRules(accessRules);
57
+ ```
58
+
59
+ ### RPC Contracts
60
+
61
+ ```diff
62
+ - .meta({ userType: "user", permissions: [permissions.read.id] })
63
+ + .meta({ userType: "user", access: [access.read] })
64
+ ```
65
+
66
+ ### Frontend Hooks
67
+
68
+ ```diff
69
+ - const canRead = accessApi.usePermission(permissions.read.id);
70
+ + const canRead = accessApi.useAccess(access.read);
71
+ ```
72
+
73
+ ### Routes
74
+
75
+ ```diff
76
+ - permission: permissions.entityRead.id,
77
+ + accessRule: access.read,
78
+ ```
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [9faec1f]
83
+ - Updated dependencies [827b286]
84
+ - Updated dependencies [f533141]
85
+ - Updated dependencies [aa4a8ab]
86
+ - @checkstack/backend-api@0.3.0
87
+ - @checkstack/command-backend@0.1.0
88
+ - @checkstack/common@0.2.0
89
+ - @checkstack/integration-common@0.1.0
90
+ - @checkstack/signal-common@0.1.0
91
+ - @checkstack/queue-api@0.0.5
92
+
3
93
  ## 0.0.4
4
94
 
5
95
  ### 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.1",
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 {