@khanglvm/jira-mcp 1.3.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/client.d.ts +287 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +235 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/config-fetcher.d.ts +30 -0
  8. package/dist/config-fetcher.d.ts.map +1 -0
  9. package/dist/config-fetcher.js +279 -0
  10. package/dist/config-fetcher.js.map +1 -0
  11. package/dist/config.d.ts +54 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/config.js +66 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/index.d.ts +12 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +228 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/mcp-registry.d.ts +106 -0
  20. package/dist/mcp-registry.d.ts.map +1 -0
  21. package/dist/mcp-registry.js +168 -0
  22. package/dist/mcp-registry.js.map +1 -0
  23. package/dist/setup.d.ts +41 -0
  24. package/dist/setup.d.ts.map +1 -0
  25. package/dist/setup.js +263 -0
  26. package/dist/setup.js.map +1 -0
  27. package/dist/tools/index.d.ts +10 -0
  28. package/dist/tools/index.d.ts.map +1 -0
  29. package/dist/tools/index.js +10 -0
  30. package/dist/tools/index.js.map +1 -0
  31. package/dist/tools/issues.d.ts +364 -0
  32. package/dist/tools/issues.d.ts.map +1 -0
  33. package/dist/tools/issues.js +392 -0
  34. package/dist/tools/issues.js.map +1 -0
  35. package/dist/tools/projects.d.ts +70 -0
  36. package/dist/tools/projects.d.ts.map +1 -0
  37. package/dist/tools/projects.js +101 -0
  38. package/dist/tools/projects.js.map +1 -0
  39. package/dist/tools/search.d.ts +76 -0
  40. package/dist/tools/search.d.ts.map +1 -0
  41. package/dist/tools/search.js +111 -0
  42. package/dist/tools/search.js.map +1 -0
  43. package/dist/tools/transitions.d.ts +99 -0
  44. package/dist/tools/transitions.d.ts.map +1 -0
  45. package/dist/tools/transitions.js +121 -0
  46. package/dist/tools/transitions.js.map +1 -0
  47. package/dist/tools/users.d.ts +70 -0
  48. package/dist/tools/users.d.ts.map +1 -0
  49. package/dist/tools/users.js +96 -0
  50. package/dist/tools/users.js.map +1 -0
  51. package/dist/types/mcp-config.d.ts +154 -0
  52. package/dist/types/mcp-config.d.ts.map +1 -0
  53. package/dist/types/mcp-config.js +7 -0
  54. package/dist/types/mcp-config.js.map +1 -0
  55. package/dist/utils/path-resolver.d.ts +16 -0
  56. package/dist/utils/path-resolver.d.ts.map +1 -0
  57. package/dist/utils/path-resolver.js +37 -0
  58. package/dist/utils/path-resolver.js.map +1 -0
  59. package/package.json +61 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 khanglvm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # @khanglvm/jira-mcp
2
+
3
+ MCP server for **legacy Jira Server** (v7.x) with Basic Authentication. Works with any MCP-compatible AI tool.
4
+
5
+ > **🔔 Using Jira Cloud or Data Center 8.14+?** Use [mcp-atlassian](https://github.com/sooperset/mcp-atlassian) instead for OAuth/PAT support.
6
+
7
+ ---
8
+
9
+ ## 📋 Prerequisites
10
+
11
+ **Node.js** (v18+) is required for MCP servers and the installer to work.
12
+
13
+ **macOS / Linux:**
14
+ ```bash
15
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
16
+ ```
17
+
18
+ **Windows (PowerShell):**
19
+ ```powershell
20
+ winget install -e --id OpenJS.NodeJS.LTS
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 🚀 Quick Install
26
+
27
+ Run this single command to interactively configure Jira MCP for your AI tool:
28
+
29
+ ```bash
30
+ bash <(curl -fsSL https://raw.githubusercontent.com/khanglvm/jira-mcp/main/scripts/install.sh)
31
+ ```
32
+
33
+ The installer auto-detects installed tools, supports multi-select, safely merges config, and creates backups.
34
+
35
+ ---
36
+
37
+ ## 📦 Configuration Formats
38
+
39
+ ### JSON (camelCase) - Claude Desktop, Claude Code, Antigravity, Cursor
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "jira": {
45
+ "command": "npx",
46
+ "args": ["-y", "@khanglvm/jira-mcp"],
47
+ "env": {
48
+ "JIRA_BASE_URL": "http://jira.example.com:8080",
49
+ "JIRA_USERNAME": "your-username",
50
+ "JIRA_PASSWORD": "your-password"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### JSON (dash-case) - VS Code, GitHub Copilot
58
+
59
+ ```json
60
+ {
61
+ "servers": {
62
+ "jira": {
63
+ "type": "stdio",
64
+ "command": "npx",
65
+ "args": ["-y", "@khanglvm/jira-mcp"],
66
+ "env": {
67
+ "JIRA_BASE_URL": "http://jira.example.com:8080",
68
+ "JIRA_USERNAME": "your-username",
69
+ "JIRA_PASSWORD": "your-password"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ### YAML (Codex)
77
+
78
+ ```yaml
79
+ mcp_servers:
80
+ jira:
81
+ command: npx
82
+ args:
83
+ - -y
84
+ - "@khanglvm/jira-mcp"
85
+ env:
86
+ JIRA_BASE_URL: http://jira.example.com:8080
87
+ JIRA_USERNAME: your-username
88
+ JIRA_PASSWORD: your-password
89
+ ```
90
+
91
+ ---
92
+
93
+ ## 🔧 Available Tools
94
+
95
+ | Tool | Description |
96
+ |------|-------------|
97
+ | `jira_get_issue` | Get issue details by key |
98
+ | `jira_create_issue` | Create a new issue |
99
+ | `jira_update_issue` | Update issue fields |
100
+ | `jira_delete_issue` | Delete an issue |
101
+ | `jira_add_comment` | Add comment to issue |
102
+ | `jira_get_comments` | Get issue comments |
103
+ | `jira_search` | Search issues using JQL |
104
+ | `jira_list_projects` | List all accessible projects |
105
+ | `jira_get_project` | Get project details |
106
+ | `jira_get_transitions` | Get available transitions |
107
+ | `jira_transition_issue` | Transition issue to new status |
108
+ | `jira_get_current_user` | Get authenticated user info |
109
+ | `jira_get_user` | Get user by username |
110
+
111
+ ---
112
+
113
+ ## ⚙️ Environment Variables
114
+
115
+ | Variable | Required | Description |
116
+ |----------|----------|-------------|
117
+ | `JIRA_BASE_URL` | ✅ | Jira instance URL |
118
+ | `JIRA_USERNAME` | ✅ | Username |
119
+ | `JIRA_PASSWORD` | ✅ | Password |
120
+ | `JIRA_API_VERSION` | ❌ | API version (default: `2`) |
121
+
122
+ ---
123
+
124
+ ## License
125
+
126
+ MIT
@@ -0,0 +1,287 @@
1
+ /**
2
+ * @file client.ts
3
+ * @description Jira REST API client with HTTP Basic Authentication.
4
+ * Provides typed methods for interacting with Jira Server v7.x API.
5
+ */
6
+ import { JiraConfig } from './config.js';
7
+ /**
8
+ * Error thrown when Jira API requests fail.
9
+ */
10
+ export declare class JiraApiError extends Error {
11
+ readonly statusCode: number;
12
+ readonly body?: unknown | undefined;
13
+ constructor(message: string, statusCode: number, body?: unknown | undefined);
14
+ }
15
+ /**
16
+ * Jira REST API client with basic authentication.
17
+ */
18
+ export declare class JiraClient {
19
+ private readonly config;
20
+ private readonly apiBaseUrl;
21
+ private readonly authBaseUrl;
22
+ private readonly authHeader;
23
+ /**
24
+ * Creates a new Jira client instance.
25
+ * @param config - Validated Jira configuration
26
+ */
27
+ constructor(config: JiraConfig);
28
+ /**
29
+ * Makes an authenticated request to the Jira API.
30
+ * @param method - HTTP method
31
+ * @param path - API path (relative to base URL)
32
+ * @param body - Optional request body
33
+ * @param useAuthEndpoint - Whether to use auth endpoint instead of api endpoint
34
+ * @returns Parsed JSON response
35
+ */
36
+ private request;
37
+ /**
38
+ * Gets current authenticated user session info.
39
+ * @returns Current user session data
40
+ */
41
+ getCurrentSession(): Promise<JiraSession>;
42
+ /**
43
+ * Gets an issue by key or ID.
44
+ * @param issueIdOrKey - Issue key (e.g., "PROJ-123") or ID
45
+ * @param fields - Optional comma-separated list of fields to return
46
+ * @param expand - Optional fields to expand
47
+ * @returns Issue data
48
+ */
49
+ getIssue(issueIdOrKey: string, fields?: string, expand?: string): Promise<JiraIssue>;
50
+ /**
51
+ * Creates a new issue.
52
+ * @param data - Issue creation data
53
+ * @returns Created issue reference
54
+ */
55
+ createIssue(data: CreateIssueInput): Promise<CreatedIssue>;
56
+ /**
57
+ * Updates an existing issue.
58
+ * @param issueIdOrKey - Issue key or ID
59
+ * @param data - Fields to update
60
+ */
61
+ updateIssue(issueIdOrKey: string, data: UpdateIssueInput): Promise<void>;
62
+ /**
63
+ * Deletes an issue.
64
+ * @param issueIdOrKey - Issue key or ID
65
+ * @param deleteSubtasks - Whether to delete subtasks
66
+ */
67
+ deleteIssue(issueIdOrKey: string, deleteSubtasks?: boolean): Promise<void>;
68
+ /**
69
+ * Gets comments on an issue.
70
+ * @param issueIdOrKey - Issue key or ID
71
+ * @returns Comments data
72
+ */
73
+ getComments(issueIdOrKey: string): Promise<CommentsResponse>;
74
+ /**
75
+ * Adds a comment to an issue.
76
+ * @param issueIdOrKey - Issue key or ID
77
+ * @param body - Comment body text
78
+ * @returns Created comment
79
+ */
80
+ addComment(issueIdOrKey: string, body: string): Promise<JiraComment>;
81
+ /**
82
+ * Gets available transitions for an issue.
83
+ * @param issueIdOrKey - Issue key or ID
84
+ * @returns Available transitions
85
+ */
86
+ getTransitions(issueIdOrKey: string): Promise<TransitionsResponse>;
87
+ /**
88
+ * Transitions an issue to a new status.
89
+ * @param issueIdOrKey - Issue key or ID
90
+ * @param transitionId - ID of the transition to execute
91
+ * @param comment - Optional comment to add
92
+ */
93
+ transitionIssue(issueIdOrKey: string, transitionId: string, comment?: string): Promise<void>;
94
+ /**
95
+ * Searches for issues using JQL.
96
+ * @param jql - JQL query string
97
+ * @param maxResults - Maximum results to return (default 50)
98
+ * @param startAt - Starting index for pagination
99
+ * @param fields - Fields to include in results
100
+ * @returns Search results
101
+ */
102
+ search(jql: string, maxResults?: number, startAt?: number, fields?: string[]): Promise<SearchResponse>;
103
+ /**
104
+ * Gets all accessible projects.
105
+ * @returns List of projects
106
+ */
107
+ getProjects(): Promise<JiraProject[]>;
108
+ /**
109
+ * Gets a project by key or ID.
110
+ * @param projectIdOrKey - Project key or ID
111
+ * @returns Project data
112
+ */
113
+ getProject(projectIdOrKey: string): Promise<JiraProject>;
114
+ /**
115
+ * Gets the currently authenticated user.
116
+ * @returns Current user data
117
+ */
118
+ getCurrentUser(): Promise<JiraUser>;
119
+ /**
120
+ * Gets a user by username.
121
+ * @param username - Username to look up
122
+ * @returns User data
123
+ */
124
+ getUser(username: string): Promise<JiraUser>;
125
+ }
126
+ /** Session information from auth endpoint */
127
+ export interface JiraSession {
128
+ self: string;
129
+ name: string;
130
+ loginInfo: {
131
+ failedLoginCount: number;
132
+ loginCount: number;
133
+ lastFailedLoginTime?: string;
134
+ previousLoginTime?: string;
135
+ };
136
+ }
137
+ /** Jira issue structure */
138
+ export interface JiraIssue {
139
+ id: string;
140
+ key: string;
141
+ self: string;
142
+ fields: {
143
+ summary: string;
144
+ description?: string;
145
+ status: {
146
+ name: string;
147
+ id: string;
148
+ };
149
+ priority?: {
150
+ name: string;
151
+ id: string;
152
+ };
153
+ assignee?: {
154
+ displayName: string;
155
+ name: string;
156
+ emailAddress?: string;
157
+ };
158
+ reporter?: {
159
+ displayName: string;
160
+ name: string;
161
+ };
162
+ issuetype: {
163
+ name: string;
164
+ id: string;
165
+ };
166
+ project: {
167
+ key: string;
168
+ name: string;
169
+ };
170
+ created: string;
171
+ updated: string;
172
+ labels?: string[];
173
+ [key: string]: unknown;
174
+ };
175
+ }
176
+ /** Input for creating an issue */
177
+ export interface CreateIssueInput {
178
+ project: {
179
+ key: string;
180
+ } | {
181
+ id: string;
182
+ };
183
+ summary: string;
184
+ issuetype: {
185
+ name: string;
186
+ } | {
187
+ id: string;
188
+ };
189
+ description?: string;
190
+ assignee?: {
191
+ name: string;
192
+ };
193
+ priority?: {
194
+ name: string;
195
+ } | {
196
+ id: string;
197
+ };
198
+ labels?: string[];
199
+ [key: string]: unknown;
200
+ }
201
+ /** Response when creating an issue */
202
+ export interface CreatedIssue {
203
+ id: string;
204
+ key: string;
205
+ self: string;
206
+ }
207
+ /** Input for updating an issue */
208
+ export interface UpdateIssueInput {
209
+ summary?: string;
210
+ description?: string;
211
+ assignee?: {
212
+ name: string;
213
+ } | null;
214
+ priority?: {
215
+ name: string;
216
+ } | {
217
+ id: string;
218
+ };
219
+ labels?: string[];
220
+ [key: string]: unknown;
221
+ }
222
+ /** Jira comment structure */
223
+ export interface JiraComment {
224
+ id: string;
225
+ self: string;
226
+ author: {
227
+ displayName: string;
228
+ name: string;
229
+ };
230
+ body: string;
231
+ created: string;
232
+ updated: string;
233
+ }
234
+ /** Response containing comments */
235
+ export interface CommentsResponse {
236
+ startAt: number;
237
+ maxResults: number;
238
+ total: number;
239
+ comments: JiraComment[];
240
+ }
241
+ /** Transition information */
242
+ export interface JiraTransition {
243
+ id: string;
244
+ name: string;
245
+ to: {
246
+ id: string;
247
+ name: string;
248
+ statusCategory: {
249
+ name: string;
250
+ };
251
+ };
252
+ }
253
+ /** Response containing transitions */
254
+ export interface TransitionsResponse {
255
+ transitions: JiraTransition[];
256
+ }
257
+ /** Search response structure */
258
+ export interface SearchResponse {
259
+ startAt: number;
260
+ maxResults: number;
261
+ total: number;
262
+ issues: JiraIssue[];
263
+ }
264
+ /** Jira project structure */
265
+ export interface JiraProject {
266
+ id: string;
267
+ key: string;
268
+ name: string;
269
+ self: string;
270
+ projectTypeKey?: string;
271
+ lead?: {
272
+ displayName: string;
273
+ name: string;
274
+ };
275
+ description?: string;
276
+ }
277
+ /** Jira user structure */
278
+ export interface JiraUser {
279
+ self: string;
280
+ key: string;
281
+ name: string;
282
+ displayName: string;
283
+ emailAddress?: string;
284
+ active: boolean;
285
+ timeZone?: string;
286
+ }
287
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAiC,MAAM,aAAa,CAAC;AAExE;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;aAGf,UAAU,EAAE,MAAM;aAClB,IAAI,CAAC,EAAE,OAAO;gBAF9B,OAAO,EAAE,MAAM,EACC,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,OAAO,YAAA;CAKrC;AAOD;;GAEG;AACH,qBAAa,UAAU;IASP,OAAO,CAAC,QAAQ,CAAC,MAAM;IARnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC;;;OAGG;gBAC0B,MAAM,EAAE,UAAU;IAS/C;;;;;;;OAOG;YACW,OAAO;IA2DrB;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC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CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0BAA0B;AAC1B,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/dist/client.js ADDED
@@ -0,0 +1,235 @@
1
+ /**
2
+ * @file client.ts
3
+ * @description Jira REST API client with HTTP Basic Authentication.
4
+ * Provides typed methods for interacting with Jira Server v7.x API.
5
+ */
6
+ import { getApiBaseUrl, getAuthBaseUrl } from './config.js';
7
+ /**
8
+ * Error thrown when Jira API requests fail.
9
+ */
10
+ export class JiraApiError extends Error {
11
+ statusCode;
12
+ body;
13
+ constructor(message, statusCode, body) {
14
+ super(message);
15
+ this.statusCode = statusCode;
16
+ this.body = body;
17
+ this.name = 'JiraApiError';
18
+ }
19
+ }
20
+ /**
21
+ * Jira REST API client with basic authentication.
22
+ */
23
+ export class JiraClient {
24
+ config;
25
+ apiBaseUrl;
26
+ authBaseUrl;
27
+ authHeader;
28
+ /**
29
+ * Creates a new Jira client instance.
30
+ * @param config - Validated Jira configuration
31
+ */
32
+ constructor(config) {
33
+ this.config = config;
34
+ this.apiBaseUrl = getApiBaseUrl(config);
35
+ this.authBaseUrl = getAuthBaseUrl(config);
36
+ // Generate Basic auth header: base64(username:password)
37
+ this.authHeader = `Basic ${Buffer.from(`${config.JIRA_USERNAME}:${config.JIRA_PASSWORD}`).toString('base64')}`;
38
+ }
39
+ /**
40
+ * Makes an authenticated request to the Jira API.
41
+ * @param method - HTTP method
42
+ * @param path - API path (relative to base URL)
43
+ * @param body - Optional request body
44
+ * @param useAuthEndpoint - Whether to use auth endpoint instead of api endpoint
45
+ * @returns Parsed JSON response
46
+ */
47
+ async request(method, path, body, useAuthEndpoint = false) {
48
+ const baseUrl = useAuthEndpoint ? this.authBaseUrl : this.apiBaseUrl;
49
+ const url = `${baseUrl}${path}`;
50
+ const headers = {
51
+ Authorization: this.authHeader,
52
+ Accept: 'application/json',
53
+ };
54
+ if (body) {
55
+ headers['Content-Type'] = 'application/json';
56
+ }
57
+ const response = await fetch(url, {
58
+ method,
59
+ headers,
60
+ body: body ? JSON.stringify(body) : undefined,
61
+ });
62
+ // Handle empty responses (e.g., 204 No Content)
63
+ if (response.status === 204 || response.headers.get('content-length') === '0') {
64
+ return {};
65
+ }
66
+ const responseBody = await response.text();
67
+ let parsedBody;
68
+ try {
69
+ parsedBody = responseBody ? JSON.parse(responseBody) : {};
70
+ }
71
+ catch {
72
+ parsedBody = responseBody;
73
+ }
74
+ if (!response.ok) {
75
+ let errorMessage = `Request failed with status ${response.status}`;
76
+ if (typeof parsedBody === 'object' && parsedBody !== null) {
77
+ const bodyRecord = parsedBody;
78
+ const errorMessages = bodyRecord.errorMessages;
79
+ if (Array.isArray(errorMessages) && errorMessages.length > 0) {
80
+ errorMessage = String(errorMessages[0]);
81
+ }
82
+ else if (typeof bodyRecord.message === 'string') {
83
+ errorMessage = bodyRecord.message;
84
+ }
85
+ }
86
+ throw new JiraApiError(errorMessage, response.status, parsedBody);
87
+ }
88
+ return parsedBody;
89
+ }
90
+ // ============ Session/Auth Methods ============
91
+ /**
92
+ * Gets current authenticated user session info.
93
+ * @returns Current user session data
94
+ */
95
+ async getCurrentSession() {
96
+ return this.request('GET', '/session', undefined, true);
97
+ }
98
+ // ============ Issue Methods ============
99
+ /**
100
+ * Gets an issue by key or ID.
101
+ * @param issueIdOrKey - Issue key (e.g., "PROJ-123") or ID
102
+ * @param fields - Optional comma-separated list of fields to return
103
+ * @param expand - Optional fields to expand
104
+ * @returns Issue data
105
+ */
106
+ async getIssue(issueIdOrKey, fields, expand) {
107
+ const params = new URLSearchParams();
108
+ if (fields)
109
+ params.set('fields', fields);
110
+ if (expand)
111
+ params.set('expand', expand);
112
+ const query = params.toString() ? `?${params.toString()}` : '';
113
+ return this.request('GET', `/issue/${issueIdOrKey}${query}`);
114
+ }
115
+ /**
116
+ * Creates a new issue.
117
+ * @param data - Issue creation data
118
+ * @returns Created issue reference
119
+ */
120
+ async createIssue(data) {
121
+ return this.request('POST', '/issue', { fields: data });
122
+ }
123
+ /**
124
+ * Updates an existing issue.
125
+ * @param issueIdOrKey - Issue key or ID
126
+ * @param data - Fields to update
127
+ */
128
+ async updateIssue(issueIdOrKey, data) {
129
+ await this.request('PUT', `/issue/${issueIdOrKey}`, { fields: data });
130
+ }
131
+ /**
132
+ * Deletes an issue.
133
+ * @param issueIdOrKey - Issue key or ID
134
+ * @param deleteSubtasks - Whether to delete subtasks
135
+ */
136
+ async deleteIssue(issueIdOrKey, deleteSubtasks = false) {
137
+ const query = deleteSubtasks ? '?deleteSubtasks=true' : '';
138
+ await this.request('DELETE', `/issue/${issueIdOrKey}${query}`);
139
+ }
140
+ /**
141
+ * Gets comments on an issue.
142
+ * @param issueIdOrKey - Issue key or ID
143
+ * @returns Comments data
144
+ */
145
+ async getComments(issueIdOrKey) {
146
+ return this.request('GET', `/issue/${issueIdOrKey}/comment`);
147
+ }
148
+ /**
149
+ * Adds a comment to an issue.
150
+ * @param issueIdOrKey - Issue key or ID
151
+ * @param body - Comment body text
152
+ * @returns Created comment
153
+ */
154
+ async addComment(issueIdOrKey, body) {
155
+ return this.request('POST', `/issue/${issueIdOrKey}/comment`, {
156
+ body,
157
+ });
158
+ }
159
+ // ============ Transition Methods ============
160
+ /**
161
+ * Gets available transitions for an issue.
162
+ * @param issueIdOrKey - Issue key or ID
163
+ * @returns Available transitions
164
+ */
165
+ async getTransitions(issueIdOrKey) {
166
+ return this.request('GET', `/issue/${issueIdOrKey}/transitions`);
167
+ }
168
+ /**
169
+ * Transitions an issue to a new status.
170
+ * @param issueIdOrKey - Issue key or ID
171
+ * @param transitionId - ID of the transition to execute
172
+ * @param comment - Optional comment to add
173
+ */
174
+ async transitionIssue(issueIdOrKey, transitionId, comment) {
175
+ const body = {
176
+ transition: { id: transitionId },
177
+ };
178
+ if (comment) {
179
+ body.update = {
180
+ comment: [{ add: { body: comment } }],
181
+ };
182
+ }
183
+ await this.request('POST', `/issue/${issueIdOrKey}/transitions`, body);
184
+ }
185
+ // ============ Search Methods ============
186
+ /**
187
+ * Searches for issues using JQL.
188
+ * @param jql - JQL query string
189
+ * @param maxResults - Maximum results to return (default 50)
190
+ * @param startAt - Starting index for pagination
191
+ * @param fields - Fields to include in results
192
+ * @returns Search results
193
+ */
194
+ async search(jql, maxResults = 50, startAt = 0, fields) {
195
+ return this.request('POST', '/search', {
196
+ jql,
197
+ maxResults,
198
+ startAt,
199
+ fields: fields ?? ['summary', 'status', 'assignee', 'priority', 'issuetype'],
200
+ });
201
+ }
202
+ // ============ Project Methods ============
203
+ /**
204
+ * Gets all accessible projects.
205
+ * @returns List of projects
206
+ */
207
+ async getProjects() {
208
+ return this.request('GET', '/project');
209
+ }
210
+ /**
211
+ * Gets a project by key or ID.
212
+ * @param projectIdOrKey - Project key or ID
213
+ * @returns Project data
214
+ */
215
+ async getProject(projectIdOrKey) {
216
+ return this.request('GET', `/project/${projectIdOrKey}`);
217
+ }
218
+ // ============ User Methods ============
219
+ /**
220
+ * Gets the currently authenticated user.
221
+ * @returns Current user data
222
+ */
223
+ async getCurrentUser() {
224
+ return this.request('GET', '/myself');
225
+ }
226
+ /**
227
+ * Gets a user by username.
228
+ * @param username - Username to look up
229
+ * @returns User data
230
+ */
231
+ async getUser(username) {
232
+ return this.request('GET', `/user?username=${encodeURIComponent(username)}`);
233
+ }
234
+ }
235
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAc,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExE;;GAEG;AACH,MAAM,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