@gongrzhe/server-jira 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/README.md +374 -0
- package/dist/common/context.d.ts +15 -0
- package/dist/common/context.d.ts.map +1 -0
- package/dist/common/context.js +33 -0
- package/dist/common/context.js.map +1 -0
- package/dist/common/errors.d.ts +26 -0
- package/dist/common/errors.d.ts.map +1 -0
- package/dist/common/errors.js +71 -0
- package/dist/common/errors.js.map +1 -0
- package/dist/common/token-parser.d.ts +53 -0
- package/dist/common/token-parser.d.ts.map +1 -0
- package/dist/common/token-parser.js +117 -0
- package/dist/common/token-parser.js.map +1 -0
- package/dist/common/types.d.ts +151 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/types.js +2 -0
- package/dist/common/types.js.map +1 -0
- package/dist/common/utils.d.ts +9 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +116 -0
- package/dist/common/utils.js.map +1 -0
- package/dist/common/version.d.ts +2 -0
- package/dist/common/version.d.ts.map +1 -0
- package/dist/common/version.js +3 -0
- package/dist/common/version.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +505 -0
- package/dist/index.js.map +1 -0
- package/dist/operations/atlassian.d.ts +27 -0
- package/dist/operations/atlassian.d.ts.map +1 -0
- package/dist/operations/atlassian.js +27 -0
- package/dist/operations/atlassian.js.map +1 -0
- package/dist/operations/comments.d.ts +117 -0
- package/dist/operations/comments.d.ts.map +1 -0
- package/dist/operations/comments.js +153 -0
- package/dist/operations/comments.js.map +1 -0
- package/dist/operations/issues.d.ts +146 -0
- package/dist/operations/issues.d.ts.map +1 -0
- package/dist/operations/issues.js +250 -0
- package/dist/operations/issues.js.map +1 -0
- package/dist/operations/metadata.d.ts +176 -0
- package/dist/operations/metadata.d.ts.map +1 -0
- package/dist/operations/metadata.js +143 -0
- package/dist/operations/metadata.js.map +1 -0
- package/dist/operations/projects.d.ts +159 -0
- package/dist/operations/projects.d.ts.map +1 -0
- package/dist/operations/projects.js +175 -0
- package/dist/operations/projects.js.map +1 -0
- package/dist/operations/users.d.ts +130 -0
- package/dist/operations/users.d.ts.map +1 -0
- package/dist/operations/users.js +214 -0
- package/dist/operations/users.js.map +1 -0
- package/dist/operations/workflow.d.ts +110 -0
- package/dist/operations/workflow.d.ts.map +1 -0
- package/dist/operations/workflow.js +203 -0
- package/dist/operations/workflow.js.map +1 -0
- package/dist/operations/worklog.d.ts +175 -0
- package/dist/operations/worklog.d.ts.map +1 -0
- package/dist/operations/worklog.js +322 -0
- package/dist/operations/worklog.js.map +1 -0
- package/dist/test-token-discovery.d.ts +6 -0
- package/dist/test-token-discovery.d.ts.map +1 -0
- package/dist/test-token-discovery.js +26 -0
- package/dist/test-token-discovery.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JiraComment } from '../common/types.js';
|
|
3
|
+
export declare const GetCommentsSchema: z.ZodObject<{
|
|
4
|
+
issueKey: z.ZodString;
|
|
5
|
+
startAt: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
orderBy: z.ZodDefault<z.ZodEnum<["+created", "-created", "+updated", "-updated"]>>;
|
|
8
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
issueKey: string;
|
|
11
|
+
startAt: number;
|
|
12
|
+
maxResults: number;
|
|
13
|
+
orderBy: "+created" | "-created" | "+updated" | "-updated";
|
|
14
|
+
expand?: string[] | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
issueKey: string;
|
|
17
|
+
expand?: string[] | undefined;
|
|
18
|
+
startAt?: number | undefined;
|
|
19
|
+
maxResults?: number | undefined;
|
|
20
|
+
orderBy?: "+created" | "-created" | "+updated" | "-updated" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const AddCommentSchema: z.ZodObject<{
|
|
23
|
+
issueKey: z.ZodString;
|
|
24
|
+
body: z.ZodString;
|
|
25
|
+
visibility: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
type: z.ZodEnum<["group", "role"]>;
|
|
27
|
+
value: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
value: string;
|
|
30
|
+
type: "group" | "role";
|
|
31
|
+
}, {
|
|
32
|
+
value: string;
|
|
33
|
+
type: "group" | "role";
|
|
34
|
+
}>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
issueKey: string;
|
|
37
|
+
body: string;
|
|
38
|
+
visibility?: {
|
|
39
|
+
value: string;
|
|
40
|
+
type: "group" | "role";
|
|
41
|
+
} | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
issueKey: string;
|
|
44
|
+
body: string;
|
|
45
|
+
visibility?: {
|
|
46
|
+
value: string;
|
|
47
|
+
type: "group" | "role";
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const UpdateCommentSchema: z.ZodObject<{
|
|
51
|
+
issueKey: z.ZodString;
|
|
52
|
+
commentId: z.ZodString;
|
|
53
|
+
body: z.ZodString;
|
|
54
|
+
visibility: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
type: z.ZodEnum<["group", "role"]>;
|
|
56
|
+
value: z.ZodString;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
value: string;
|
|
59
|
+
type: "group" | "role";
|
|
60
|
+
}, {
|
|
61
|
+
value: string;
|
|
62
|
+
type: "group" | "role";
|
|
63
|
+
}>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
issueKey: string;
|
|
66
|
+
body: string;
|
|
67
|
+
commentId: string;
|
|
68
|
+
visibility?: {
|
|
69
|
+
value: string;
|
|
70
|
+
type: "group" | "role";
|
|
71
|
+
} | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
issueKey: string;
|
|
74
|
+
body: string;
|
|
75
|
+
commentId: string;
|
|
76
|
+
visibility?: {
|
|
77
|
+
value: string;
|
|
78
|
+
type: "group" | "role";
|
|
79
|
+
} | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
export declare const DeleteCommentSchema: z.ZodObject<{
|
|
82
|
+
issueKey: z.ZodString;
|
|
83
|
+
commentId: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
issueKey: string;
|
|
86
|
+
commentId: string;
|
|
87
|
+
}, {
|
|
88
|
+
issueKey: string;
|
|
89
|
+
commentId: string;
|
|
90
|
+
}>;
|
|
91
|
+
export declare const GetCommentSchema: z.ZodObject<{
|
|
92
|
+
issueKey: z.ZodString;
|
|
93
|
+
commentId: z.ZodString;
|
|
94
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
issueKey: string;
|
|
97
|
+
commentId: string;
|
|
98
|
+
expand?: string[] | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
issueKey: string;
|
|
101
|
+
commentId: string;
|
|
102
|
+
expand?: string[] | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export declare function getComments(params: z.infer<typeof GetCommentsSchema>): Promise<{
|
|
105
|
+
startAt: number;
|
|
106
|
+
maxResults: number;
|
|
107
|
+
total: number;
|
|
108
|
+
comments: JiraComment[];
|
|
109
|
+
}>;
|
|
110
|
+
export declare function addComment(params: z.infer<typeof AddCommentSchema>): Promise<JiraComment>;
|
|
111
|
+
export declare function updateComment(params: z.infer<typeof UpdateCommentSchema>): Promise<JiraComment>;
|
|
112
|
+
export declare function deleteComment(params: z.infer<typeof DeleteCommentSchema>): Promise<{
|
|
113
|
+
success: boolean;
|
|
114
|
+
message: string;
|
|
115
|
+
}>;
|
|
116
|
+
export declare function getComment(params: z.infer<typeof GetCommentSchema>): Promise<JiraComment>;
|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CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAqB/F"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { jiraRequest, validateIssueKey } from '../common/utils.js';
|
|
3
|
+
import { JiraValidationError, JiraResourceNotFoundError } from '../common/errors.js';
|
|
4
|
+
// Schema definitions
|
|
5
|
+
export const GetCommentsSchema = z.object({
|
|
6
|
+
issueKey: z.string().describe("The issue key to get comments from"),
|
|
7
|
+
startAt: z.number().default(0).describe("Starting index for pagination"),
|
|
8
|
+
maxResults: z.number().default(50).describe("Maximum number of comments to return"),
|
|
9
|
+
orderBy: z.enum(['+created', '-created', '+updated', '-updated']).default('+created').describe("Sort order"),
|
|
10
|
+
expand: z.array(z.string()).optional().describe("Fields to expand"),
|
|
11
|
+
});
|
|
12
|
+
export const AddCommentSchema = z.object({
|
|
13
|
+
issueKey: z.string().describe("The issue key to add comment to"),
|
|
14
|
+
body: z.string().describe("The comment text content"),
|
|
15
|
+
visibility: z.object({
|
|
16
|
+
type: z.enum(['group', 'role']).describe("Visibility type"),
|
|
17
|
+
value: z.string().describe("Group name or role name"),
|
|
18
|
+
}).optional().describe("Comment visibility settings"),
|
|
19
|
+
});
|
|
20
|
+
export const UpdateCommentSchema = z.object({
|
|
21
|
+
issueKey: z.string().describe("The issue key"),
|
|
22
|
+
commentId: z.string().describe("The comment ID to update"),
|
|
23
|
+
body: z.string().describe("The updated comment text content"),
|
|
24
|
+
visibility: z.object({
|
|
25
|
+
type: z.enum(['group', 'role']).describe("Visibility type"),
|
|
26
|
+
value: z.string().describe("Group name or role name"),
|
|
27
|
+
}).optional().describe("Comment visibility settings"),
|
|
28
|
+
});
|
|
29
|
+
export const DeleteCommentSchema = z.object({
|
|
30
|
+
issueKey: z.string().describe("The issue key"),
|
|
31
|
+
commentId: z.string().describe("The comment ID to delete"),
|
|
32
|
+
});
|
|
33
|
+
export const GetCommentSchema = z.object({
|
|
34
|
+
issueKey: z.string().describe("The issue key"),
|
|
35
|
+
commentId: z.string().describe("The comment ID to retrieve"),
|
|
36
|
+
expand: z.array(z.string()).optional().describe("Fields to expand"),
|
|
37
|
+
});
|
|
38
|
+
// Implementation functions
|
|
39
|
+
export async function getComments(params) {
|
|
40
|
+
const { issueKey, startAt, maxResults, orderBy, expand } = params;
|
|
41
|
+
if (!validateIssueKey(issueKey)) {
|
|
42
|
+
throw new JiraValidationError(`Invalid issue key format: ${issueKey}`);
|
|
43
|
+
}
|
|
44
|
+
const query = new URLSearchParams({
|
|
45
|
+
startAt: startAt.toString(),
|
|
46
|
+
maxResults: Math.min(maxResults, 1000).toString(),
|
|
47
|
+
orderBy,
|
|
48
|
+
});
|
|
49
|
+
if (expand && expand.length > 0) {
|
|
50
|
+
query.set('expand', expand.join(','));
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const result = await jiraRequest(`issue/${issueKey}/comment?${query.toString()}`);
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (error.statusCode === 404) {
|
|
58
|
+
throw new JiraResourceNotFoundError('Issue', issueKey);
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export async function addComment(params) {
|
|
64
|
+
const { issueKey, body, visibility } = params;
|
|
65
|
+
if (!validateIssueKey(issueKey)) {
|
|
66
|
+
throw new JiraValidationError(`Invalid issue key format: ${issueKey}`);
|
|
67
|
+
}
|
|
68
|
+
const commentData = { body };
|
|
69
|
+
if (visibility) {
|
|
70
|
+
commentData.visibility = visibility;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const comment = await jiraRequest(`issue/${issueKey}/comment`, {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
body: JSON.stringify(commentData),
|
|
76
|
+
});
|
|
77
|
+
return comment;
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
if (error.statusCode === 404) {
|
|
81
|
+
throw new JiraResourceNotFoundError('Issue', issueKey);
|
|
82
|
+
}
|
|
83
|
+
if (error.statusCode === 400) {
|
|
84
|
+
throw new JiraValidationError('Failed to add comment: Invalid request data');
|
|
85
|
+
}
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export async function updateComment(params) {
|
|
90
|
+
const { issueKey, commentId, body, visibility } = params;
|
|
91
|
+
if (!validateIssueKey(issueKey)) {
|
|
92
|
+
throw new JiraValidationError(`Invalid issue key format: ${issueKey}`);
|
|
93
|
+
}
|
|
94
|
+
const commentData = { body };
|
|
95
|
+
if (visibility) {
|
|
96
|
+
commentData.visibility = visibility;
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
const comment = await jiraRequest(`issue/${issueKey}/comment/${commentId}`, {
|
|
100
|
+
method: 'PUT',
|
|
101
|
+
body: JSON.stringify(commentData),
|
|
102
|
+
});
|
|
103
|
+
return comment;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error.statusCode === 404) {
|
|
107
|
+
throw new JiraResourceNotFoundError('Comment', `${issueKey}/${commentId}`);
|
|
108
|
+
}
|
|
109
|
+
if (error.statusCode === 400) {
|
|
110
|
+
throw new JiraValidationError('Failed to update comment: Invalid request data');
|
|
111
|
+
}
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
export async function deleteComment(params) {
|
|
116
|
+
const { issueKey, commentId } = params;
|
|
117
|
+
if (!validateIssueKey(issueKey)) {
|
|
118
|
+
throw new JiraValidationError(`Invalid issue key format: ${issueKey}`);
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
await jiraRequest(`issue/${issueKey}/comment/${commentId}`, {
|
|
122
|
+
method: 'DELETE',
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
success: true,
|
|
126
|
+
message: `Comment ${commentId} deleted successfully from issue ${issueKey}`,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
if (error.statusCode === 404) {
|
|
131
|
+
throw new JiraResourceNotFoundError('Comment', `${issueKey}/${commentId}`);
|
|
132
|
+
}
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
export async function getComment(params) {
|
|
137
|
+
const { issueKey, commentId, expand } = params;
|
|
138
|
+
if (!validateIssueKey(issueKey)) {
|
|
139
|
+
throw new JiraValidationError(`Invalid issue key format: ${issueKey}`);
|
|
140
|
+
}
|
|
141
|
+
const expandParam = expand && expand.length > 0 ? `?expand=${expand.join(',')}` : '';
|
|
142
|
+
try {
|
|
143
|
+
const comment = await jiraRequest(`issue/${issueKey}/comment/${commentId}${expandParam}`);
|
|
144
|
+
return comment;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (error.statusCode === 404) {
|
|
148
|
+
throw new JiraResourceNotFoundError('Comment', `${issueKey}/${commentId}`);
|
|
149
|
+
}
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../operations/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGrF,qBAAqB;AACrB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACnE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CA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CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAErF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,WAAW,CAC/B,SAAS,QAAQ,YAAY,SAAS,GAAG,WAAW,EAAE,CACvD,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;YAC7B,MAAM,IAAI,yBAAyB,CAAC,SAAS,EAAE,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JiraIssue, JiraSearchResults } from '../common/types.js';
|
|
3
|
+
export declare const GetIssueSchema: z.ZodObject<{
|
|
4
|
+
issueKey: z.ZodString;
|
|
5
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
issueKey: string;
|
|
8
|
+
expand?: string[] | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
issueKey: string;
|
|
11
|
+
expand?: string[] | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const SearchIssuesSchema: z.ZodObject<{
|
|
14
|
+
jql: z.ZodString;
|
|
15
|
+
startAt: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
jql: string;
|
|
21
|
+
startAt: number;
|
|
22
|
+
maxResults: number;
|
|
23
|
+
expand?: string[] | undefined;
|
|
24
|
+
fields?: string[] | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
jql: string;
|
|
27
|
+
expand?: string[] | undefined;
|
|
28
|
+
startAt?: number | undefined;
|
|
29
|
+
maxResults?: number | undefined;
|
|
30
|
+
fields?: string[] | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const CreateIssueSchema: z.ZodObject<{
|
|
33
|
+
project: z.ZodString;
|
|
34
|
+
issueType: z.ZodString;
|
|
35
|
+
summary: z.ZodString;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
priority: z.ZodOptional<z.ZodString>;
|
|
38
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
39
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
40
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
41
|
+
fixVersions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
+
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
summary: string;
|
|
45
|
+
project: string;
|
|
46
|
+
issueType: string;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
priority?: string | undefined;
|
|
49
|
+
assignee?: string | undefined;
|
|
50
|
+
labels?: string[] | undefined;
|
|
51
|
+
components?: string[] | undefined;
|
|
52
|
+
fixVersions?: string[] | undefined;
|
|
53
|
+
customFields?: Record<string, any> | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
summary: string;
|
|
56
|
+
project: string;
|
|
57
|
+
issueType: string;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
priority?: string | undefined;
|
|
60
|
+
assignee?: string | undefined;
|
|
61
|
+
labels?: string[] | undefined;
|
|
62
|
+
components?: string[] | undefined;
|
|
63
|
+
fixVersions?: string[] | undefined;
|
|
64
|
+
customFields?: Record<string, any> | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const UpdateIssueSchema: z.ZodObject<{
|
|
67
|
+
issueKey: z.ZodString;
|
|
68
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
69
|
+
description: z.ZodOptional<z.ZodString>;
|
|
70
|
+
priority: z.ZodOptional<z.ZodString>;
|
|
71
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
72
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
|
+
fixVersions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
issueKey: string;
|
|
78
|
+
summary?: string | undefined;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
priority?: string | undefined;
|
|
81
|
+
assignee?: string | undefined;
|
|
82
|
+
labels?: string[] | undefined;
|
|
83
|
+
components?: string[] | undefined;
|
|
84
|
+
fixVersions?: string[] | undefined;
|
|
85
|
+
customFields?: Record<string, any> | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
issueKey: string;
|
|
88
|
+
summary?: string | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
priority?: string | undefined;
|
|
91
|
+
assignee?: string | undefined;
|
|
92
|
+
labels?: string[] | undefined;
|
|
93
|
+
components?: string[] | undefined;
|
|
94
|
+
fixVersions?: string[] | undefined;
|
|
95
|
+
customFields?: Record<string, any> | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
export declare const DeleteIssueSchema: z.ZodObject<{
|
|
98
|
+
issueKey: z.ZodString;
|
|
99
|
+
deleteSubtasks: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
issueKey: string;
|
|
102
|
+
deleteSubtasks: boolean;
|
|
103
|
+
}, {
|
|
104
|
+
issueKey: string;
|
|
105
|
+
deleteSubtasks?: boolean | undefined;
|
|
106
|
+
}>;
|
|
107
|
+
export declare const AssignIssueSchema: z.ZodObject<{
|
|
108
|
+
issueKey: z.ZodString;
|
|
109
|
+
assignee: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
assignee: string;
|
|
112
|
+
issueKey: string;
|
|
113
|
+
}, {
|
|
114
|
+
assignee: string;
|
|
115
|
+
issueKey: string;
|
|
116
|
+
}>;
|
|
117
|
+
export declare const LinkIssuesSchema: z.ZodObject<{
|
|
118
|
+
outwardIssue: z.ZodString;
|
|
119
|
+
inwardIssue: z.ZodString;
|
|
120
|
+
linkType: z.ZodString;
|
|
121
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
outwardIssue: string;
|
|
124
|
+
inwardIssue: string;
|
|
125
|
+
linkType: string;
|
|
126
|
+
comment?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
outwardIssue: string;
|
|
129
|
+
inwardIssue: string;
|
|
130
|
+
linkType: string;
|
|
131
|
+
comment?: string | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
export declare function getIssue(params: z.infer<typeof GetIssueSchema>): Promise<JiraIssue>;
|
|
134
|
+
export declare function searchIssues(params: z.infer<typeof SearchIssuesSchema>): Promise<JiraSearchResults>;
|
|
135
|
+
export declare function createIssue(params: z.infer<typeof CreateIssueSchema>): Promise<JiraIssue>;
|
|
136
|
+
export declare function updateIssue(params: z.infer<typeof UpdateIssueSchema>): Promise<JiraIssue>;
|
|
137
|
+
export declare function deleteIssue(params: z.infer<typeof DeleteIssueSchema>): Promise<{
|
|
138
|
+
success: boolean;
|
|
139
|
+
message: string;
|
|
140
|
+
}>;
|
|
141
|
+
export declare function assignIssue(params: z.infer<typeof AssignIssueSchema>): Promise<JiraIssue>;
|
|
142
|
+
export declare function linkIssues(params: z.infer<typeof LinkIssuesSchema>): Promise<{
|
|
143
|
+
success: boolean;
|
|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