@checkstack/integration-jira-common 0.0.3 → 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,87 @@
1
1
  # @checkstack/integration-jira-common
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/integration-common@0.1.0
77
+
78
+ ## 0.0.4
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [8e43507]
83
+ - @checkstack/common@0.1.0
84
+
3
85
  ## 0.0.3
4
86
 
5
87
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-jira-common",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@checkstack/common": "workspace:*",
13
+ "@checkstack/integration-common": "workspace:*",
13
14
  "@orpc/contract": "^1.13.2",
14
15
  "zod": "^4.2.1"
15
16
  },
@@ -5,6 +5,7 @@ import {
5
5
  createClientDefinition,
6
6
  type ProcedureMetadata,
7
7
  } from "@checkstack/common";
8
+ import { integrationAccess } from "@checkstack/integration-common";
8
9
  import {
9
10
  JiraConnectionRedactedSchema,
10
11
  CreateJiraConnectionInputSchema,
@@ -30,7 +31,7 @@ export const jiraContract = {
30
31
  listConnections: _base
31
32
  .meta({
32
33
  userType: "user",
33
- permissions: ["integration.manage"],
34
+ access: [integrationAccess.manage],
34
35
  })
35
36
  .output(z.array(JiraConnectionRedactedSchema)),
36
37
 
@@ -38,7 +39,7 @@ export const jiraContract = {
38
39
  getConnection: _base
39
40
  .meta({
40
41
  userType: "user",
41
- permissions: ["integration.manage"],
42
+ access: [integrationAccess.manage],
42
43
  })
43
44
  .input(z.object({ id: z.string() }))
44
45
  .output(JiraConnectionRedactedSchema),
@@ -47,7 +48,7 @@ export const jiraContract = {
47
48
  createConnection: _base
48
49
  .meta({
49
50
  userType: "user",
50
- permissions: ["integration.manage"],
51
+ access: [integrationAccess.manage],
51
52
  })
52
53
  .input(CreateJiraConnectionInputSchema)
53
54
  .output(JiraConnectionRedactedSchema),
@@ -56,7 +57,7 @@ export const jiraContract = {
56
57
  updateConnection: _base
57
58
  .meta({
58
59
  userType: "user",
59
- permissions: ["integration.manage"],
60
+ access: [integrationAccess.manage],
60
61
  })
61
62
  .input(UpdateJiraConnectionInputSchema)
62
63
  .output(JiraConnectionRedactedSchema),
@@ -65,7 +66,7 @@ export const jiraContract = {
65
66
  deleteConnection: _base
66
67
  .meta({
67
68
  userType: "user",
68
- permissions: ["integration.manage"],
69
+ access: [integrationAccess.manage],
69
70
  })
70
71
  .input(z.object({ id: z.string() }))
71
72
  .output(z.object({ success: z.boolean() })),
@@ -74,7 +75,7 @@ export const jiraContract = {
74
75
  testConnection: _base
75
76
  .meta({
76
77
  userType: "user",
77
- permissions: ["integration.manage"],
78
+ access: [integrationAccess.manage],
78
79
  })
79
80
  .input(z.object({ id: z.string() }))
80
81
  .output(
@@ -92,7 +93,7 @@ export const jiraContract = {
92
93
  getProjects: _base
93
94
  .meta({
94
95
  userType: "user",
95
- permissions: ["integration.manage"],
96
+ access: [integrationAccess.manage],
96
97
  })
97
98
  .input(z.object({ connectionId: z.string() }))
98
99
  .output(z.array(JiraProjectSchema)),
@@ -101,7 +102,7 @@ export const jiraContract = {
101
102
  getIssueTypes: _base
102
103
  .meta({
103
104
  userType: "user",
104
- permissions: ["integration.manage"],
105
+ access: [integrationAccess.manage],
105
106
  })
106
107
  .input(
107
108
  z.object({
@@ -115,7 +116,7 @@ export const jiraContract = {
115
116
  getFields: _base
116
117
  .meta({
117
118
  userType: "user",
118
- permissions: ["integration.manage"],
119
+ access: [integrationAccess.manage],
119
120
  })
120
121
  .input(
121
122
  z.object({
@@ -130,7 +131,7 @@ export const jiraContract = {
130
131
  getPriorities: _base
131
132
  .meta({
132
133
  userType: "user",
133
- permissions: ["integration.manage"],
134
+ access: [integrationAccess.manage],
134
135
  })
135
136
  .input(z.object({ connectionId: z.string() }))
136
137
  .output(