@checkstack/integration-frontend 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,97 @@
1
1
  # @checkstack/integration-frontend
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 [f533141]
75
+ - @checkstack/common@0.2.0
76
+ - @checkstack/frontend-api@0.1.0
77
+ - @checkstack/integration-common@0.1.0
78
+ - @checkstack/ui@0.2.0
79
+ - @checkstack/signal-frontend@0.0.6
80
+
81
+ ## 0.0.5
82
+
83
+ ### Patch Changes
84
+
85
+ - 97c5a6b: Fix Radix UI accessibility warning in dialog components by adding visually hidden DialogDescription components
86
+ - Updated dependencies [8e43507]
87
+ - Updated dependencies [97c5a6b]
88
+ - Updated dependencies [8e43507]
89
+ - @checkstack/ui@0.1.0
90
+ - @checkstack/common@0.1.0
91
+ - @checkstack/frontend-api@0.0.4
92
+ - @checkstack/integration-common@0.0.4
93
+ - @checkstack/signal-frontend@0.0.5
94
+
3
95
  ## 0.0.4
4
96
 
5
97
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-frontend",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "src/index.tsx",
6
6
  "checkstack": {
@@ -4,6 +4,7 @@ import { Trash2, ScrollText } from "lucide-react";
4
4
  import {
5
5
  Dialog,
6
6
  DialogContent,
7
+ DialogDescription,
7
8
  DialogHeader,
8
9
  DialogTitle,
9
10
  DialogFooter,
@@ -371,6 +372,13 @@ export const SubscriptionDialog = ({
371
372
  selectedProvider?.displayName ?? "Subscription"
372
373
  }`}
373
374
  </DialogTitle>
375
+ <DialogDescription className="sr-only">
376
+ {isEditMode
377
+ ? "Edit the settings for this integration subscription"
378
+ : step === "provider"
379
+ ? "Choose a provider for your integration subscription"
380
+ : "Configure the subscription settings"}
381
+ </DialogDescription>
374
382
  </DialogHeader>
375
383
 
376
384
  {step === "provider" ? (
@@ -2,22 +2,19 @@ import { useNavigate } from "react-router-dom";
2
2
  import { Webhook } from "lucide-react";
3
3
  import { DropdownMenuItem } from "@checkstack/ui";
4
4
  import type { UserMenuItemsContext } from "@checkstack/frontend-api";
5
- import { qualifyPermissionId, resolveRoute } from "@checkstack/common";
5
+ import { resolveRoute } from "@checkstack/common";
6
6
  import {
7
7
  integrationRoutes,
8
- permissions,
8
+ integrationAccess,
9
9
  pluginMetadata,
10
10
  } from "@checkstack/integration-common";
11
11
  import React from "react";
12
12
 
13
13
  export const IntegrationMenuItem = ({
14
- permissions: userPerms,
14
+ accessRules: userPerms,
15
15
  }: UserMenuItemsContext) => {
16
16
  const navigate = useNavigate();
17
- const qualifiedId = qualifyPermissionId(
18
- pluginMetadata,
19
- permissions.integrationManage
20
- );
17
+ const qualifiedId = `${pluginMetadata.pluginId}.${integrationAccess.manage.id}`;
21
18
  const allowed = userPerms.includes("*") || userPerms.includes(qualifiedId);
22
19
 
23
20
  if (!allowed) {
package/src/index.tsx CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  integrationRoutes,
8
8
  pluginMetadata,
9
- permissions,
9
+ integrationAccess,
10
10
  } from "@checkstack/integration-common";
11
11
  import { IntegrationsPage } from "./pages/IntegrationsPage";
12
12
  import { DeliveryLogsPage } from "./pages/DeliveryLogsPage";
@@ -19,22 +19,22 @@ export const integrationPlugin = createFrontendPlugin({
19
19
  {
20
20
  route: integrationRoutes.routes.list,
21
21
  element: <IntegrationsPage />,
22
- permission: permissions.integrationManage,
22
+ accessRule: integrationAccess.manage,
23
23
  },
24
24
  {
25
25
  route: integrationRoutes.routes.logs,
26
26
  element: <DeliveryLogsPage />,
27
- permission: permissions.integrationManage,
27
+ accessRule: integrationAccess.manage,
28
28
  },
29
29
  {
30
30
  route: integrationRoutes.routes.deliveryLogs,
31
31
  element: <DeliveryLogsPage />,
32
- permission: permissions.integrationManage,
32
+ accessRule: integrationAccess.manage,
33
33
  },
34
34
  {
35
35
  route: integrationRoutes.routes.connections,
36
36
  element: <ProviderConnectionsPage />,
37
- permission: permissions.integrationManage,
37
+ accessRule: integrationAccess.manage,
38
38
  },
39
39
  ],
40
40
  extensions: [