@checkstack/integration-jira-common 0.1.13 → 0.1.15

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,40 @@
1
1
  # @checkstack/integration-jira-common
2
2
 
3
+ ## 0.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - a06b899: Template autocomplete on Jira template fields, plus a sweep of dead code across integration / notification plugins.
8
+
9
+ **FIXES**
10
+
11
+ - Jira subscription dialog now offers `{{ payload.* }}` autocomplete on its three template fields (`summaryTemplate`, `descriptionTemplate`, field-mapping `template`). Each was declared as `configString({})` with empty metadata, so `DynamicForm` fell through to a plain `<Input>` and the `templateProperties` chain that `CreateSubscriptionDialog` already pipes in from the event's payload schema bypassed them entirely. Tagged all three with `"x-editor-types": ["raw"]` so they now route through `MultiTypeEditorField` → `RawEditor` (the textarea with the `{{ … }}` popup) — the same path webhook templates already used.
12
+
13
+ **INTERNAL CLEANUP — dead code removed**
14
+
15
+ Every removal here was verified with a repo-wide `grep` for external consumers; nothing in this changeset alters a public surface that anyone actually imports.
16
+
17
+ - `@checkstack/integration-jira-common`:
18
+ - Deleted `src/rpc-contract.ts` entirely. The Jira-specific `jiraContract` / `JiraApi` (connection-CRUD endpoints — `listConnections`, `getConnection`, `createConnection`, `updateConnection`, `deleteConnection`, `testConnection`) was never registered with the backend router and had zero client consumers. All connection management goes through the generic `integrationContract` in `@checkstack/integration-common`.
19
+ - Removed seven dead Zod schemas + their inferred types from `src/schemas.ts`: `CreateJiraConnectionInputSchema`, `UpdateJiraConnectionInputSchema`, `JiraConnectionRedactedSchema`, `JiraFieldMappingSchema`, `JiraSubscriptionConfigSchema`, `JiraConnectionSchema`, plus their `…Input` / `…Redacted` / `…FieldMapping` / `…Config` / `…Connection` type aliases. The subscription config was duplicated against the canonical, metadata-tagged version in `jira-backend/src/provider.ts`; the connection schemas were marked `@deprecated` and only referenced by the now-removed RPC contract or the deprecated function below.
20
+ - Removed orphaned npm deps `@orpc/contract` and `@checkstack/integration-common` from the package's `dependencies` (they were only used by the deleted RPC contract).
21
+ - `@checkstack/integration-jira-backend`:
22
+ - Removed `createJiraClientFromConnection` from `src/jira-client.ts`. The function was marked `@deprecated` ("Use createJiraClientFromConfig with generic connection management") and had zero callers; removing it dropped the last consumer of `JiraConnection` / `JiraConnectionSchema`. The modern `createJiraClientFromConfig` (using `JiraConnectionConfig` with cloud/datacenter auth modes) is the canonical entry point.
23
+ - `@checkstack/integration-teams-backend` + `@checkstack/integration-webex-backend`:
24
+ - Removed the `// Re-export for testing` blocks from each plugin's `src/index.ts`. The Teams plugin re-exported `teamsProvider` / `TeamsConnectionSchema` / `TeamsSubscriptionSchema` / `buildAdaptiveCard`; the Webex plugin re-exported `webexProvider` / `WebexConnectionSchema` / `WebexSubscriptionSchema`. Both `provider.test.ts` files were retargeted from `./index` to `./provider`, eliminating the indirection and matching the convention used by the other backend-only integration plugins.
25
+ - `@checkstack/notification-telegram-backend`:
26
+ - Removed the broken `bundle` field from `package.json` that referenced `@checkstack/notification-telegram-common` and `@checkstack/notification-telegram-frontend` — neither package existed (the directories were empty leftovers with no `package.json`, so not even workspace members). The empty directories were deleted; `bun install` is clean afterwards. `bunx @checkstack/scripts plugin-pack` for this plugin would otherwise have tried to bundle non-existent packages.
27
+
28
+ No tests changed behaviour. 2040 tests pass, lint + typecheck clean.
29
+
30
+ ## 0.1.14
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [9016526]
35
+ - @checkstack/common@0.10.0
36
+ - @checkstack/integration-common@0.4.0
37
+
3
38
  ## 0.1.13
4
39
 
5
40
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/integration-jira-common",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,16 +14,14 @@
14
14
  "pack": "bunx @checkstack/scripts plugin-pack"
15
15
  },
16
16
  "dependencies": {
17
- "@checkstack/common": "0.8.0",
18
- "@checkstack/integration-common": "0.3.1",
19
- "@orpc/contract": "^1.13.14",
17
+ "@checkstack/common": "0.10.0",
20
18
  "zod": "^4.2.1"
21
19
  },
22
20
  "devDependencies": {
23
21
  "@types/bun": "^1.0.0",
24
22
  "typescript": "^5.0.0",
25
23
  "@checkstack/tsconfig": "0.0.7",
26
- "@checkstack/scripts": "0.3.0"
24
+ "@checkstack/scripts": "0.3.2"
27
25
  },
28
26
  "description": "Checkstack integration-jira-common plugin",
29
27
  "author": {
package/src/index.ts CHANGED
@@ -1,30 +1,19 @@
1
1
  // Plugin Metadata
2
2
  export { pluginMetadata } from "./plugin-metadata";
3
3
 
4
- // Schemas
4
+ // API response schemas
5
5
  export {
6
- // Legacy connection schemas (deprecated - use generic connection management)
7
- JiraConnectionSchema,
8
- type JiraConnection,
9
- CreateJiraConnectionInputSchema,
10
- type CreateJiraConnectionInput,
11
- UpdateJiraConnectionInputSchema,
12
- type UpdateJiraConnectionInput,
13
- JiraConnectionRedactedSchema,
14
- type JiraConnectionRedacted,
15
- // API response schemas
16
6
  JiraProjectSchema,
17
7
  type JiraProject,
18
8
  JiraIssueTypeSchema,
19
9
  type JiraIssueType,
20
10
  JiraFieldSchema,
21
11
  type JiraField,
22
- // Subscription config schemas
23
- JiraFieldMappingSchema,
24
- type JiraFieldMapping,
25
- JiraSubscriptionConfigSchema,
26
- type JiraSubscriptionConfig,
27
12
  } from "./schemas";
28
13
 
29
- // RPC Contract
30
- export { jiraContract, JiraApi, type JiraContract } from "./rpc-contract";
14
+ // Note: a Jira-specific RPC contract (`jiraContract` / `JiraApi`) used
15
+ // to live here for connection-CRUD endpoints, but it was never
16
+ // registered with the backend router and had zero client consumers.
17
+ // Connection management goes through the generic integration contract
18
+ // in `@checkstack/integration-common`; nothing Jira-specific is
19
+ // served over RPC today.
package/src/schemas.ts CHANGED
@@ -1,77 +1,5 @@
1
1
  import { z } from "zod";
2
2
 
3
- // =============================================================================
4
- // Jira Connection (Site-wide Configuration) - DEPRECATED
5
- // Use the generic connection management system instead.
6
- // =============================================================================
7
-
8
- /**
9
- * Schema for a Jira Cloud connection configuration.
10
- * @deprecated Use generic connection management with JiraConnectionConfigSchema from jira-backend.
11
- */
12
- export const JiraConnectionSchema = z.object({
13
- /** Unique identifier for this connection */
14
- id: z.string(),
15
- /** User-friendly name for the connection */
16
- name: z.string().min(1).max(100).describe("Connection name"),
17
- /** Jira Cloud base URL (e.g., https://yourcompany.atlassian.net) */
18
- baseUrl: z.string().url().describe("Jira Cloud base URL"),
19
- /** Email address for authentication */
20
- email: z.string().email().describe("Jira user email"),
21
- /** API token - will be marked as secret in backend */
22
- apiToken: z.string().min(1).describe("Jira API token"),
23
- /** Created timestamp */
24
- createdAt: z.coerce.date(),
25
- /** Updated timestamp */
26
- updatedAt: z.coerce.date(),
27
- });
28
-
29
- export type JiraConnection = z.infer<typeof JiraConnectionSchema>;
30
-
31
- /**
32
- * Input for creating a new Jira connection.
33
- */
34
- export const CreateJiraConnectionInputSchema = z.object({
35
- name: z.string().min(1).max(100),
36
- baseUrl: z.string().url(),
37
- email: z.string().email(),
38
- apiToken: z.string().min(1),
39
- });
40
-
41
- export type CreateJiraConnectionInput = z.infer<
42
- typeof CreateJiraConnectionInputSchema
43
- >;
44
-
45
- /**
46
- * Input for updating a Jira connection.
47
- * API token is optional - if not provided, existing token is preserved.
48
- */
49
- export const UpdateJiraConnectionInputSchema = z.object({
50
- id: z.string(),
51
- updates: z.object({
52
- name: z.string().min(1).max(100).optional(),
53
- baseUrl: z.string().url().optional(),
54
- email: z.string().email().optional(),
55
- /** If provided, replaces the existing token */
56
- apiToken: z.string().min(1).optional(),
57
- }),
58
- });
59
-
60
- export type UpdateJiraConnectionInput = z.infer<
61
- typeof UpdateJiraConnectionInputSchema
62
- >;
63
-
64
- /**
65
- * Redacted connection for frontend display (no API token).
66
- */
67
- export const JiraConnectionRedactedSchema = JiraConnectionSchema.omit({
68
- apiToken: true,
69
- });
70
-
71
- export type JiraConnectionRedacted = z.infer<
72
- typeof JiraConnectionRedactedSchema
73
- >;
74
-
75
3
  // =============================================================================
76
4
  // Jira API Response Types
77
5
  // =============================================================================
@@ -129,48 +57,10 @@ export const JiraFieldSchema = z.object({
129
57
 
130
58
  export type JiraField = z.infer<typeof JiraFieldSchema>;
131
59
 
132
- // =============================================================================
133
- // Jira Subscription Configuration (Per-subscription)
134
- // =============================================================================
135
-
136
- /**
137
- * Field mapping for template-based value population.
138
- */
139
- export const JiraFieldMappingSchema = z.object({
140
- /** Jira field key */
141
- fieldKey: z.string(),
142
- /** Template string with {{payload.property}} placeholders */
143
- template: z.string(),
144
- });
145
-
146
- export type JiraFieldMapping = z.infer<typeof JiraFieldMappingSchema>;
147
-
148
- /**
149
- * Provider configuration for Jira subscriptions.
150
- */
151
- export const JiraSubscriptionConfigSchema = z.object({
152
- /** ID of the site-wide Jira connection to use */
153
- connectionId: z.string().describe("Jira connection to use"),
154
- /** Jira project key to create issues in */
155
- projectKey: z.string().describe("Project key"),
156
- /** Issue type ID for created issues */
157
- issueTypeId: z.string().describe("Issue type"),
158
- /** Summary template (required - uses {{payload.field}} syntax) */
159
- summaryTemplate: z.string().min(1).describe("Issue summary template"),
160
- /** Description template (optional) */
161
- descriptionTemplate: z
162
- .string()
163
- .optional()
164
- .describe("Issue description template"),
165
- /** Priority ID (optional) */
166
- priorityId: z.string().optional().describe("Priority"),
167
- /** Additional field mappings */
168
- fieldMappings: z
169
- .array(JiraFieldMappingSchema)
170
- .optional()
171
- .describe("Additional field mappings"),
172
- });
173
-
174
- export type JiraSubscriptionConfig = z.infer<
175
- typeof JiraSubscriptionConfigSchema
176
- >;
60
+ // Note: the per-subscription `JiraSubscriptionConfigSchema` /
61
+ // `JiraFieldMappingSchema` (with their inferred types) used to live
62
+ // here too, but they were duplicated in `jira-backend/src/provider.ts`
63
+ // (which has the canonical, metadata-tagged version actually
64
+ // registered with the provider system). A repo-wide audit found zero
65
+ // external consumers of the common copies, so they were removed to
66
+ // eliminate the drift risk.
package/tsconfig.json CHANGED
@@ -6,9 +6,6 @@
6
6
  "references": [
7
7
  {
8
8
  "path": "../../core/common"
9
- },
10
- {
11
- "path": "../../core/integration-common"
12
9
  }
13
10
  ]
14
11
  }
@@ -1,144 +0,0 @@
1
- import { z } from "zod";
2
- import { pluginMetadata } from "./plugin-metadata";
3
- import { createClientDefinition, proc } from "@checkstack/common";
4
- import { integrationAccess } from "@checkstack/integration-common";
5
- import {
6
- JiraConnectionRedactedSchema,
7
- CreateJiraConnectionInputSchema,
8
- UpdateJiraConnectionInputSchema,
9
- JiraProjectSchema,
10
- JiraIssueTypeSchema,
11
- JiraFieldSchema,
12
- } from "./schemas";
13
-
14
- /**
15
- * RPC contract for Jira-specific operations.
16
- * These endpoints are in addition to the generic integration endpoints.
17
- */
18
- export const jiraContract = {
19
- // ==========================================================================
20
- // CONNECTION MANAGEMENT (Site-wide Jira configurations)
21
- // ==========================================================================
22
-
23
- /** List all Jira connections (redacted - no API tokens) */
24
- listConnections: proc({
25
- operationType: "query",
26
- userType: "user",
27
- access: [integrationAccess.manage],
28
- }).output(z.array(JiraConnectionRedactedSchema)),
29
-
30
- /** Get a single connection (redacted) */
31
- getConnection: proc({
32
- operationType: "query",
33
- userType: "user",
34
- access: [integrationAccess.manage],
35
- })
36
- .input(z.object({ id: z.string() }))
37
- .output(JiraConnectionRedactedSchema),
38
-
39
- /** Create a new Jira connection */
40
- createConnection: proc({
41
- operationType: "mutation",
42
- userType: "user",
43
- access: [integrationAccess.manage],
44
- })
45
- .input(CreateJiraConnectionInputSchema)
46
- .output(JiraConnectionRedactedSchema),
47
-
48
- /** Update a Jira connection */
49
- updateConnection: proc({
50
- operationType: "mutation",
51
- userType: "user",
52
- access: [integrationAccess.manage],
53
- })
54
- .input(UpdateJiraConnectionInputSchema)
55
- .output(JiraConnectionRedactedSchema),
56
-
57
- /** Delete a Jira connection */
58
- deleteConnection: proc({
59
- operationType: "mutation",
60
- userType: "user",
61
- access: [integrationAccess.manage],
62
- })
63
- .input(z.object({ id: z.string() }))
64
- .output(z.object({ success: z.boolean() })),
65
-
66
- /** Test a Jira connection */
67
- testConnection: proc({
68
- operationType: "mutation",
69
- userType: "user",
70
- access: [integrationAccess.manage],
71
- })
72
- .input(z.object({ id: z.string() }))
73
- .output(
74
- z.object({
75
- success: z.boolean(),
76
- message: z.string().optional(),
77
- }),
78
- ),
79
-
80
- // ==========================================================================
81
- // JIRA API PROXIES (Fetch data from Jira using a connection)
82
- // ==========================================================================
83
-
84
- /** Get projects available in a Jira connection */
85
- getProjects: proc({
86
- operationType: "query",
87
- userType: "user",
88
- access: [integrationAccess.manage],
89
- })
90
- .input(z.object({ connectionId: z.string() }))
91
- .output(z.array(JiraProjectSchema)),
92
-
93
- /** Get issue types available for a project */
94
- getIssueTypes: proc({
95
- operationType: "query",
96
- userType: "user",
97
- access: [integrationAccess.manage],
98
- })
99
- .input(
100
- z.object({
101
- connectionId: z.string(),
102
- projectKey: z.string(),
103
- }),
104
- )
105
- .output(z.array(JiraIssueTypeSchema)),
106
-
107
- /** Get fields available for a project and issue type */
108
- getFields: proc({
109
- operationType: "query",
110
- userType: "user",
111
- access: [integrationAccess.manage],
112
- })
113
- .input(
114
- z.object({
115
- connectionId: z.string(),
116
- projectKey: z.string(),
117
- issueTypeId: z.string(),
118
- }),
119
- )
120
- .output(z.array(JiraFieldSchema)),
121
-
122
- /** Get priorities available in Jira */
123
- getPriorities: proc({
124
- operationType: "query",
125
- userType: "user",
126
- access: [integrationAccess.manage],
127
- })
128
- .input(z.object({ connectionId: z.string() }))
129
- .output(
130
- z.array(
131
- z.object({
132
- id: z.string(),
133
- name: z.string(),
134
- iconUrl: z.string().optional(),
135
- }),
136
- ),
137
- ),
138
- };
139
-
140
- // Export contract type
141
- export type JiraContract = typeof jiraContract;
142
-
143
- // Export client definition for type-safe forPlugin usage
144
- export const JiraApi = createClientDefinition(jiraContract, pluginMetadata);