@checkstack/integration-jira-common 0.1.0 → 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,13 @@
1
1
  # @checkstack/integration-jira-common
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7a23261]
8
+ - @checkstack/common@0.3.0
9
+ - @checkstack/integration-common@0.2.0
10
+
3
11
  ## 0.1.0
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-jira-common",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -1,10 +1,6 @@
1
- import { oc } from "@orpc/contract";
2
1
  import { z } from "zod";
3
2
  import { pluginMetadata } from "./plugin-metadata";
4
- import {
5
- createClientDefinition,
6
- type ProcedureMetadata,
7
- } from "@checkstack/common";
3
+ import { createClientDefinition, proc } from "@checkstack/common";
8
4
  import { integrationAccess } from "@checkstack/integration-common";
9
5
  import {
10
6
  JiraConnectionRedactedSchema,
@@ -15,9 +11,6 @@ import {
15
11
  JiraFieldSchema,
16
12
  } from "./schemas";
17
13
 
18
- // Base builder with full metadata support
19
- const _base = oc.$meta<ProcedureMetadata>({});
20
-
21
14
  /**
22
15
  * RPC contract for Jira-specific operations.
23
16
  * These endpoints are in addition to the generic integration endpoints.
@@ -28,55 +21,54 @@ export const jiraContract = {
28
21
  // ==========================================================================
29
22
 
30
23
  /** List all Jira connections (redacted - no API tokens) */
31
- listConnections: _base
32
- .meta({
33
- userType: "user",
34
- access: [integrationAccess.manage],
35
- })
36
- .output(z.array(JiraConnectionRedactedSchema)),
24
+ listConnections: proc({
25
+ operationType: "query",
26
+ userType: "user",
27
+ access: [integrationAccess.manage],
28
+ }).output(z.array(JiraConnectionRedactedSchema)),
37
29
 
38
30
  /** Get a single connection (redacted) */
39
- getConnection: _base
40
- .meta({
41
- userType: "user",
42
- access: [integrationAccess.manage],
43
- })
31
+ getConnection: proc({
32
+ operationType: "query",
33
+ userType: "user",
34
+ access: [integrationAccess.manage],
35
+ })
44
36
  .input(z.object({ id: z.string() }))
45
37
  .output(JiraConnectionRedactedSchema),
46
38
 
47
39
  /** Create a new Jira connection */
48
- createConnection: _base
49
- .meta({
50
- userType: "user",
51
- access: [integrationAccess.manage],
52
- })
40
+ createConnection: proc({
41
+ operationType: "mutation",
42
+ userType: "user",
43
+ access: [integrationAccess.manage],
44
+ })
53
45
  .input(CreateJiraConnectionInputSchema)
54
46
  .output(JiraConnectionRedactedSchema),
55
47
 
56
48
  /** Update a Jira connection */
57
- updateConnection: _base
58
- .meta({
59
- userType: "user",
60
- access: [integrationAccess.manage],
61
- })
49
+ updateConnection: proc({
50
+ operationType: "mutation",
51
+ userType: "user",
52
+ access: [integrationAccess.manage],
53
+ })
62
54
  .input(UpdateJiraConnectionInputSchema)
63
55
  .output(JiraConnectionRedactedSchema),
64
56
 
65
57
  /** Delete a Jira connection */
66
- deleteConnection: _base
67
- .meta({
68
- userType: "user",
69
- access: [integrationAccess.manage],
70
- })
58
+ deleteConnection: proc({
59
+ operationType: "mutation",
60
+ userType: "user",
61
+ access: [integrationAccess.manage],
62
+ })
71
63
  .input(z.object({ id: z.string() }))
72
64
  .output(z.object({ success: z.boolean() })),
73
65
 
74
66
  /** Test a Jira connection */
75
- testConnection: _base
76
- .meta({
77
- userType: "user",
78
- access: [integrationAccess.manage],
79
- })
67
+ testConnection: proc({
68
+ operationType: "mutation",
69
+ userType: "user",
70
+ access: [integrationAccess.manage],
71
+ })
80
72
  .input(z.object({ id: z.string() }))
81
73
  .output(
82
74
  z.object({
@@ -90,20 +82,20 @@ export const jiraContract = {
90
82
  // ==========================================================================
91
83
 
92
84
  /** Get projects available in a Jira connection */
93
- getProjects: _base
94
- .meta({
95
- userType: "user",
96
- access: [integrationAccess.manage],
97
- })
85
+ getProjects: proc({
86
+ operationType: "query",
87
+ userType: "user",
88
+ access: [integrationAccess.manage],
89
+ })
98
90
  .input(z.object({ connectionId: z.string() }))
99
91
  .output(z.array(JiraProjectSchema)),
100
92
 
101
93
  /** Get issue types available for a project */
102
- getIssueTypes: _base
103
- .meta({
104
- userType: "user",
105
- access: [integrationAccess.manage],
106
- })
94
+ getIssueTypes: proc({
95
+ operationType: "query",
96
+ userType: "user",
97
+ access: [integrationAccess.manage],
98
+ })
107
99
  .input(
108
100
  z.object({
109
101
  connectionId: z.string(),
@@ -113,11 +105,11 @@ export const jiraContract = {
113
105
  .output(z.array(JiraIssueTypeSchema)),
114
106
 
115
107
  /** Get fields available for a project and issue type */
116
- getFields: _base
117
- .meta({
118
- userType: "user",
119
- access: [integrationAccess.manage],
120
- })
108
+ getFields: proc({
109
+ operationType: "query",
110
+ userType: "user",
111
+ access: [integrationAccess.manage],
112
+ })
121
113
  .input(
122
114
  z.object({
123
115
  connectionId: z.string(),
@@ -128,11 +120,11 @@ export const jiraContract = {
128
120
  .output(z.array(JiraFieldSchema)),
129
121
 
130
122
  /** Get priorities available in Jira */
131
- getPriorities: _base
132
- .meta({
133
- userType: "user",
134
- access: [integrationAccess.manage],
135
- })
123
+ getPriorities: proc({
124
+ operationType: "query",
125
+ userType: "user",
126
+ access: [integrationAccess.manage],
127
+ })
136
128
  .input(z.object({ connectionId: z.string() }))
137
129
  .output(
138
130
  z.array(