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