@resolution/jira-api-client 0.1.0 → 0.1.2
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 +22 -0
- package/package.json +10 -3
- package/.eslintrc.js +0 -3
- package/config/api-typescript-generator.config.ts +0 -91
- package/config/compare-schemas.ts +0 -307
- package/src/index.ts +0 -47
- package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
- package/src/openapi/platform/core/common-http-client.ts +0 -723
- package/src/openapi/platform/core/common-http-service.ts +0 -22
- package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/platform/models/announcement-banner.ts +0 -59
- package/src/openapi/platform/models/app-data-policies.ts +0 -79
- package/src/openapi/platform/models/app-migration.ts +0 -172
- package/src/openapi/platform/models/app-properties.ts +0 -32
- package/src/openapi/platform/models/audit-records.ts +0 -140
- package/src/openapi/platform/models/avatars.ts +0 -48
- package/src/openapi/platform/models/classification-levels.ts +0 -58
- package/src/openapi/platform/models/common.ts +0 -2669
- package/src/openapi/platform/models/dashboards.ts +0 -849
- package/src/openapi/platform/models/dynamic-modules.ts +0 -121
- package/src/openapi/platform/models/filter-sharing.ts +0 -103
- package/src/openapi/platform/models/filters.ts +0 -319
- package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
- package/src/openapi/platform/models/groups.ts +0 -247
- package/src/openapi/platform/models/issue-attachments.ts +0 -290
- package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
- package/src/openapi/platform/models/issue-comments.ts +0 -91
- package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
- package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
- package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
- package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
- package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
- package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
- package/src/openapi/platform/models/issue-fields.ts +0 -392
- package/src/openapi/platform/models/issue-link-types.ts +0 -28
- package/src/openapi/platform/models/issue-links.ts +0 -185
- package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
- package/src/openapi/platform/models/issue-priorities.ts +0 -196
- package/src/openapi/platform/models/issue-properties.ts +0 -259
- package/src/openapi/platform/models/issue-remote-links.ts +0 -207
- package/src/openapi/platform/models/issue-resolutions.ts +0 -180
- package/src/openapi/platform/models/issue-search.ts +0 -367
- package/src/openapi/platform/models/issue-security-level.ts +0 -76
- package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
- package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
- package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
- package/src/openapi/platform/models/issue-types.ts +0 -66
- package/src/openapi/platform/models/issue-votes.ts +0 -38
- package/src/openapi/platform/models/issue-watchers.ts +0 -67
- package/src/openapi/platform/models/issue-worklogs.ts +0 -190
- package/src/openapi/platform/models/issues.ts +0 -1268
- package/src/openapi/platform/models/jira-expressions.ts +0 -578
- package/src/openapi/platform/models/jira-settings.ts +0 -118
- package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
- package/src/openapi/platform/models/jql.ts +0 -783
- package/src/openapi/platform/models/labels.ts +0 -42
- package/src/openapi/platform/models/license-metrics.ts +0 -68
- package/src/openapi/platform/models/myself.ts +0 -29
- package/src/openapi/platform/models/permission-schemes.ts +0 -89
- package/src/openapi/platform/models/permissions.ts +0 -308
- package/src/openapi/platform/models/priority-schemes.ts +0 -527
- package/src/openapi/platform/models/project-avatars.ts +0 -29
- package/src/openapi/platform/models/project-classification-levels.ts +0 -24
- package/src/openapi/platform/models/project-components.ts +0 -231
- package/src/openapi/platform/models/project-email.ts +0 -27
- package/src/openapi/platform/models/project-features.ts +0 -78
- package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
- package/src/openapi/platform/models/project-role-actors.ts +0 -107
- package/src/openapi/platform/models/project-roles.ts +0 -76
- package/src/openapi/platform/models/project-types.ts +0 -36
- package/src/openapi/platform/models/project-versions.ts +0 -216
- package/src/openapi/platform/models/projects.ts +0 -429
- package/src/openapi/platform/models/screen-schemes.ts +0 -192
- package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
- package/src/openapi/platform/models/screens.ts +0 -171
- package/src/openapi/platform/models/server-info.ts +0 -100
- package/src/openapi/platform/models/service-registry.ts +0 -68
- package/src/openapi/platform/models/status.ts +0 -229
- package/src/openapi/platform/models/time-tracking.ts +0 -38
- package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
- package/src/openapi/platform/models/user-search.ts +0 -69
- package/src/openapi/platform/models/users.ts +0 -121
- package/src/openapi/platform/models/webhooks.ts +0 -307
- package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
- package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
- package/src/openapi/platform/models/workflow-schemes.ts +0 -545
- package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
- package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
- package/src/openapi/platform/models/workflows.ts +0 -1943
- package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
- package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
- package/src/openapi/platform/services/app-migration-service.ts +0 -289
- package/src/openapi/platform/services/app-properties-service.ts +0 -441
- package/src/openapi/platform/services/application-roles-service.ts +0 -247
- package/src/openapi/platform/services/audit-records-service.ts +0 -164
- package/src/openapi/platform/services/avatars-service.ts +0 -769
- package/src/openapi/platform/services/classification-levels-service.ts +0 -131
- package/src/openapi/platform/services/dashboards-service.ts +0 -1721
- package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
- package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
- package/src/openapi/platform/services/filters-service.ts +0 -1901
- package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
- package/src/openapi/platform/services/groups-service.ts +0 -751
- package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
- package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
- package/src/openapi/platform/services/issue-comments-service.ts +0 -812
- package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
- package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
- package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
- package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
- package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
- package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
- package/src/openapi/platform/services/issue-fields-service.ts +0 -837
- package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
- package/src/openapi/platform/services/issue-links-service.ts +0 -345
- package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
- package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
- package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
- package/src/openapi/platform/services/issue-properties-service.ts +0 -606
- package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
- package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
- package/src/openapi/platform/services/issue-search-service.ts +0 -1139
- package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
- package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
- package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
- package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
- package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
- package/src/openapi/platform/services/issue-types-service.ts +0 -679
- package/src/openapi/platform/services/issue-votes-service.ts +0 -221
- package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
- package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
- package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
- package/src/openapi/platform/services/issues-service.ts +0 -3346
- package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
- package/src/openapi/platform/services/jira-settings-service.ts +0 -415
- package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
- package/src/openapi/platform/services/jql-service.ts +0 -896
- package/src/openapi/platform/services/labels-service.ts +0 -89
- package/src/openapi/platform/services/license-metrics-service.ts +0 -216
- package/src/openapi/platform/services/myself-service.ts +0 -520
- package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
- package/src/openapi/platform/services/permissions-service.ts +0 -407
- package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
- package/src/openapi/platform/services/project-avatars-service.ts +0 -341
- package/src/openapi/platform/services/project-categories-service.ts +0 -318
- package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
- package/src/openapi/platform/services/project-components-service.ts +0 -1332
- package/src/openapi/platform/services/project-email-service.ts +0 -161
- package/src/openapi/platform/services/project-features-service.ts +0 -207
- package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
- package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
- package/src/openapi/platform/services/project-properties-service.ts +0 -320
- package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
- package/src/openapi/platform/services/project-roles-service.ts +0 -867
- package/src/openapi/platform/services/project-types-service.ts +0 -297
- package/src/openapi/platform/services/project-versions-service.ts +0 -1287
- package/src/openapi/platform/services/projects-service.ts +0 -2196
- package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
- package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
- package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
- package/src/openapi/platform/services/screens-service.ts +0 -528
- package/src/openapi/platform/services/server-info-service.ts +0 -88
- package/src/openapi/platform/services/service-registry-service.ts +0 -89
- package/src/openapi/platform/services/status-service.ts +0 -498
- package/src/openapi/platform/services/tasks-service.ts +0 -159
- package/src/openapi/platform/services/time-tracking-service.ts +0 -386
- package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
- package/src/openapi/platform/services/user-properties-service.ts +0 -413
- package/src/openapi/platform/services/user-search-service.ts +0 -1214
- package/src/openapi/platform/services/users-service.ts +0 -1108
- package/src/openapi/platform/services/webhooks-service.ts +0 -458
- package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
- package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
- package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
- package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
- package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
- package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
- package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
- package/src/openapi/platform/services/workflows-service.ts +0 -3477
- package/src/openapi/platform/validation-schema-storage.ts +0 -186
- package/src/openapi/software/base-jira-software-api-client.ts +0 -447
- package/src/openapi/software/core/common-http-client.ts +0 -723
- package/src/openapi/software/core/common-http-service.ts +0 -22
- package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/software/models/board.ts +0 -918
- package/src/openapi/software/services/backlog-service.ts +0 -160
- package/src/openapi/software/services/board-service.ts +0 -4189
- package/src/openapi/software/services/builds-service.ts +0 -571
- package/src/openapi/software/services/deployments-service.ts +0 -403
- package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
- package/src/openapi/software/services/development-information-service.ts +0 -2357
- package/src/openapi/software/services/epic-service.ts +0 -854
- package/src/openapi/software/services/feature-flags-service.ts +0 -303
- package/src/openapi/software/services/issue-service.ts +0 -529
- package/src/openapi/software/services/operations-service.ts +0 -741
- package/src/openapi/software/services/remote-links-service.ts +0 -653
- package/src/openapi/software/services/security-information-service.ts +0 -495
- package/src/openapi/software/services/sprint-service.ts +0 -969
- package/src/openapi/software/validation-schema-storage.ts +0 -186
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -4
|
@@ -1,812 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import {
|
|
9
|
-
type Comment,
|
|
10
|
-
registerCommonValidationSchemas,
|
|
11
|
-
} from "../models/common";
|
|
12
|
-
import {
|
|
13
|
-
type IssueCommentListRequestBean,
|
|
14
|
-
type PageBeanComment,
|
|
15
|
-
type PageOfComments,
|
|
16
|
-
registerIssueCommentsValidationSchemas,
|
|
17
|
-
} from "../models/issue-comments";
|
|
18
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
19
|
-
/**
|
|
20
|
-
* This resource represents issue comments. Use it to:
|
|
21
|
-
*
|
|
22
|
-
* * get, create, update, and delete a comment from an issue.
|
|
23
|
-
* * get all comments from issue.
|
|
24
|
-
* * get a list of comments by comment ID.
|
|
25
|
-
*/
|
|
26
|
-
export class IssueCommentsService extends CommonHttpService {
|
|
27
|
-
/**
|
|
28
|
-
* Adds a comment to an issue.
|
|
29
|
-
*
|
|
30
|
-
* This operation can be accessed anonymously.
|
|
31
|
-
*
|
|
32
|
-
* **[Permissions](#permissions) required:**
|
|
33
|
-
*
|
|
34
|
-
* * *Browse projects* and *Add comments* [ project
|
|
35
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
36
|
-
* issue containing the comment is in.
|
|
37
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
38
|
-
* configured, issue-level security permission to view the issue.
|
|
39
|
-
*
|
|
40
|
-
* @returns Returned if the request is successful.
|
|
41
|
-
*
|
|
42
|
-
* example: {
|
|
43
|
-
* "author": {
|
|
44
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
45
|
-
* "active": false,
|
|
46
|
-
* "displayName": "Mia Krystof",
|
|
47
|
-
* "self":
|
|
48
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
49
|
-
* },
|
|
50
|
-
* "body": {
|
|
51
|
-
* "type": "doc",
|
|
52
|
-
* "version": 1,
|
|
53
|
-
* "content": [
|
|
54
|
-
* {
|
|
55
|
-
* "type": "paragraph",
|
|
56
|
-
* "content": [
|
|
57
|
-
* {
|
|
58
|
-
* "type": "text",
|
|
59
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
60
|
-
* Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum.
|
|
61
|
-
* Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
62
|
-
* }
|
|
63
|
-
* ]
|
|
64
|
-
* }
|
|
65
|
-
* ]
|
|
66
|
-
* },
|
|
67
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
68
|
-
* "id": "10000",
|
|
69
|
-
* "self":
|
|
70
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
71
|
-
* "updateAuthor": {
|
|
72
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
73
|
-
* "active": false,
|
|
74
|
-
* "displayName": "Mia Krystof",
|
|
75
|
-
* "self":
|
|
76
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
77
|
-
* },
|
|
78
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
79
|
-
* "visibility": {
|
|
80
|
-
* "identifier": "Administrators",
|
|
81
|
-
* "type": "role",
|
|
82
|
-
* "value": "Administrators"
|
|
83
|
-
* }
|
|
84
|
-
* }
|
|
85
|
-
* @path {POST} /rest/api/3/issue/{issueIdOrKey}/comment
|
|
86
|
-
* @scopes-current write:jira-work
|
|
87
|
-
* @scopes-beta read:comment:jira, read:comment.property:jira, read:group:jira,
|
|
88
|
-
* read:project:jira, read:project-role:jira, read:user:jira, write:comment:jira,
|
|
89
|
-
* read:avatar:jira
|
|
90
|
-
*/
|
|
91
|
-
addComment({
|
|
92
|
-
issueIdOrKey,
|
|
93
|
-
expand,
|
|
94
|
-
comment,
|
|
95
|
-
}: {
|
|
96
|
-
/** The ID or key of the issue. */
|
|
97
|
-
issueIdOrKey: string;
|
|
98
|
-
/**
|
|
99
|
-
* Use [expand](#expansion) to include additional information about comments in
|
|
100
|
-
* the response. This parameter accepts `renderedBody`, which returns the comment
|
|
101
|
-
* body rendered in HTML.
|
|
102
|
-
*/
|
|
103
|
-
expand?: string;
|
|
104
|
-
/**
|
|
105
|
-
* @example {
|
|
106
|
-
* "body": {
|
|
107
|
-
* "content": [
|
|
108
|
-
* {
|
|
109
|
-
* "content": [
|
|
110
|
-
* {
|
|
111
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur
|
|
112
|
-
* adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
|
|
113
|
-
* iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
|
|
114
|
-
* semper.",
|
|
115
|
-
* "type": "text"
|
|
116
|
-
* }
|
|
117
|
-
* ],
|
|
118
|
-
* "type": "paragraph"
|
|
119
|
-
* }
|
|
120
|
-
* ],
|
|
121
|
-
* "type": "doc",
|
|
122
|
-
* "version": 1
|
|
123
|
-
* },
|
|
124
|
-
* "visibility": {
|
|
125
|
-
* "identifier": "Administrators",
|
|
126
|
-
* "type": "role",
|
|
127
|
-
* "value": "Administrators"
|
|
128
|
-
* }
|
|
129
|
-
* }
|
|
130
|
-
*/
|
|
131
|
-
comment: Comment;
|
|
132
|
-
}): Promise<Comment> {
|
|
133
|
-
return this.getClientInstance()
|
|
134
|
-
.request({
|
|
135
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/comment",
|
|
136
|
-
method: "POST",
|
|
137
|
-
pathParams: {
|
|
138
|
-
issueIdOrKey,
|
|
139
|
-
},
|
|
140
|
-
query: {
|
|
141
|
-
expand,
|
|
142
|
-
},
|
|
143
|
-
headers: {
|
|
144
|
-
"Content-Type": "application/json",
|
|
145
|
-
},
|
|
146
|
-
body: comment,
|
|
147
|
-
})
|
|
148
|
-
.then(
|
|
149
|
-
this.getClientInstance().responseHandler({
|
|
150
|
-
201: {
|
|
151
|
-
"application/json": "json",
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
)
|
|
155
|
-
.then(
|
|
156
|
-
commonHttpClient.castResponse<{
|
|
157
|
-
status: 201;
|
|
158
|
-
mediaType: "application/json";
|
|
159
|
-
body: Comment;
|
|
160
|
-
}>(),
|
|
161
|
-
)
|
|
162
|
-
.then(
|
|
163
|
-
validationSchemaStorage.validator(
|
|
164
|
-
"IssueCommentsService.addComment.response",
|
|
165
|
-
),
|
|
166
|
-
)
|
|
167
|
-
.then(commonHttpClient.getBody);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Deletes a comment.
|
|
171
|
-
*
|
|
172
|
-
* **[Permissions](#permissions) required:**
|
|
173
|
-
*
|
|
174
|
-
* * *Browse projects* [project
|
|
175
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
176
|
-
* issue containing the comment is in.
|
|
177
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
178
|
-
* configured, issue-level security permission to view the issue.
|
|
179
|
-
* * *Delete all comments*[ project
|
|
180
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) to delete any comment or
|
|
181
|
-
* *Delete own comments* to delete comment created by the user,
|
|
182
|
-
* * If the comment has visibility restrictions, the user belongs to the group
|
|
183
|
-
* or has the role visibility is restricted to.
|
|
184
|
-
*
|
|
185
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/comment/{id}
|
|
186
|
-
* @scopes-current write:jira-work
|
|
187
|
-
* @scopes-beta delete:comment:jira, delete:comment.property:jira
|
|
188
|
-
*/
|
|
189
|
-
deleteComment({
|
|
190
|
-
issueIdOrKey,
|
|
191
|
-
id,
|
|
192
|
-
}: {
|
|
193
|
-
/** The ID or key of the issue. */
|
|
194
|
-
issueIdOrKey: string;
|
|
195
|
-
/** The ID of the comment. */
|
|
196
|
-
id: string;
|
|
197
|
-
}): Promise<void> {
|
|
198
|
-
return this.getClientInstance()
|
|
199
|
-
.request({
|
|
200
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/comment/{id}",
|
|
201
|
-
method: "DELETE",
|
|
202
|
-
pathParams: {
|
|
203
|
-
issueIdOrKey,
|
|
204
|
-
id,
|
|
205
|
-
},
|
|
206
|
-
})
|
|
207
|
-
.then(commonHttpClient.discardResult);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Returns a comment.
|
|
211
|
-
*
|
|
212
|
-
* This operation can be accessed anonymously.
|
|
213
|
-
*
|
|
214
|
-
* **[Permissions](#permissions) required:**
|
|
215
|
-
*
|
|
216
|
-
* * *Browse projects* [project
|
|
217
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
218
|
-
* containing the comment.
|
|
219
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
220
|
-
* configured, issue-level security permission to view the issue.
|
|
221
|
-
* * If the comment has visibility restrictions, the user belongs to the group
|
|
222
|
-
* or has the role visibility is restricted to.
|
|
223
|
-
*
|
|
224
|
-
* @returns Returned if the request is successful.
|
|
225
|
-
*
|
|
226
|
-
* example: {
|
|
227
|
-
* "author": {
|
|
228
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
229
|
-
* "active": false,
|
|
230
|
-
* "displayName": "Mia Krystof",
|
|
231
|
-
* "self":
|
|
232
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
233
|
-
* },
|
|
234
|
-
* "body": {
|
|
235
|
-
* "type": "doc",
|
|
236
|
-
* "version": 1,
|
|
237
|
-
* "content": [
|
|
238
|
-
* {
|
|
239
|
-
* "type": "paragraph",
|
|
240
|
-
* "content": [
|
|
241
|
-
* {
|
|
242
|
-
* "type": "text",
|
|
243
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
244
|
-
* Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum.
|
|
245
|
-
* Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
246
|
-
* }
|
|
247
|
-
* ]
|
|
248
|
-
* }
|
|
249
|
-
* ]
|
|
250
|
-
* },
|
|
251
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
252
|
-
* "id": "10000",
|
|
253
|
-
* "self":
|
|
254
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
255
|
-
* "updateAuthor": {
|
|
256
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
257
|
-
* "active": false,
|
|
258
|
-
* "displayName": "Mia Krystof",
|
|
259
|
-
* "self":
|
|
260
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
261
|
-
* },
|
|
262
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
263
|
-
* "visibility": {
|
|
264
|
-
* "identifier": "Administrators",
|
|
265
|
-
* "type": "role",
|
|
266
|
-
* "value": "Administrators"
|
|
267
|
-
* }
|
|
268
|
-
* }
|
|
269
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/comment/{id}
|
|
270
|
-
* @scopes-current read:jira-work
|
|
271
|
-
* @scopes-beta read:comment:jira, read:comment.property:jira, read:group:jira,
|
|
272
|
-
* read:project:jira, read:project-role:jira, read:user:jira, read:avatar:jira
|
|
273
|
-
*/
|
|
274
|
-
getComment({
|
|
275
|
-
issueIdOrKey,
|
|
276
|
-
id,
|
|
277
|
-
expand,
|
|
278
|
-
}: {
|
|
279
|
-
/** The ID or key of the issue. */
|
|
280
|
-
issueIdOrKey: string;
|
|
281
|
-
/** The ID of the comment. */
|
|
282
|
-
id: string;
|
|
283
|
-
/**
|
|
284
|
-
* Use [expand](#expansion) to include additional information about comments in
|
|
285
|
-
* the response. This parameter accepts `renderedBody`, which returns the comment
|
|
286
|
-
* body rendered in HTML.
|
|
287
|
-
*/
|
|
288
|
-
expand?: string;
|
|
289
|
-
}): Promise<Comment> {
|
|
290
|
-
return this.getClientInstance()
|
|
291
|
-
.request({
|
|
292
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/comment/{id}",
|
|
293
|
-
method: "GET",
|
|
294
|
-
pathParams: {
|
|
295
|
-
issueIdOrKey,
|
|
296
|
-
id,
|
|
297
|
-
},
|
|
298
|
-
query: {
|
|
299
|
-
expand,
|
|
300
|
-
},
|
|
301
|
-
})
|
|
302
|
-
.then(
|
|
303
|
-
this.getClientInstance().responseHandler({
|
|
304
|
-
200: {
|
|
305
|
-
"application/json": "json",
|
|
306
|
-
},
|
|
307
|
-
}),
|
|
308
|
-
)
|
|
309
|
-
.then(
|
|
310
|
-
commonHttpClient.castResponse<{
|
|
311
|
-
status: 200;
|
|
312
|
-
mediaType: "application/json";
|
|
313
|
-
body: Comment;
|
|
314
|
-
}>(),
|
|
315
|
-
)
|
|
316
|
-
.then(
|
|
317
|
-
validationSchemaStorage.validator(
|
|
318
|
-
"IssueCommentsService.getComment.response",
|
|
319
|
-
),
|
|
320
|
-
)
|
|
321
|
-
.then(commonHttpClient.getBody);
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Returns all comments for an issue.
|
|
325
|
-
*
|
|
326
|
-
* This operation can be accessed anonymously.
|
|
327
|
-
*
|
|
328
|
-
* **[Permissions](#permissions) required:** Comments are included in the response
|
|
329
|
-
* where the user has:
|
|
330
|
-
*
|
|
331
|
-
* * *Browse projects* [project
|
|
332
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
333
|
-
* containing the comment.
|
|
334
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
335
|
-
* configured, issue-level security permission to view the issue.
|
|
336
|
-
* * If the comment has visibility restrictions, belongs to the group or has the
|
|
337
|
-
* role visibility is role visibility is restricted to.
|
|
338
|
-
*
|
|
339
|
-
* @returns Returned if the request is successful.
|
|
340
|
-
*
|
|
341
|
-
* example: {
|
|
342
|
-
* "comments": [
|
|
343
|
-
* {
|
|
344
|
-
* "author": {
|
|
345
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
346
|
-
* "active": false,
|
|
347
|
-
* "displayName": "Mia Krystof",
|
|
348
|
-
* "self":
|
|
349
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
350
|
-
* },
|
|
351
|
-
* "body": {
|
|
352
|
-
* "type": "doc",
|
|
353
|
-
* "version": 1,
|
|
354
|
-
* "content": [
|
|
355
|
-
* {
|
|
356
|
-
* "type": "paragraph",
|
|
357
|
-
* "content": [
|
|
358
|
-
* {
|
|
359
|
-
* "type": "text",
|
|
360
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
361
|
-
* elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis
|
|
362
|
-
* fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
363
|
-
* }
|
|
364
|
-
* ]
|
|
365
|
-
* }
|
|
366
|
-
* ]
|
|
367
|
-
* },
|
|
368
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
369
|
-
* "id": "10000",
|
|
370
|
-
* "self":
|
|
371
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
372
|
-
* "updateAuthor": {
|
|
373
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
374
|
-
* "active": false,
|
|
375
|
-
* "displayName": "Mia Krystof",
|
|
376
|
-
* "self":
|
|
377
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
378
|
-
* },
|
|
379
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
380
|
-
* "visibility": {
|
|
381
|
-
* "identifier": "Administrators",
|
|
382
|
-
* "type": "role",
|
|
383
|
-
* "value": "Administrators"
|
|
384
|
-
* }
|
|
385
|
-
* }
|
|
386
|
-
* ],
|
|
387
|
-
* "maxResults": 1,
|
|
388
|
-
* "startAt": 0,
|
|
389
|
-
* "total": 1
|
|
390
|
-
* }
|
|
391
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/comment
|
|
392
|
-
* @scopes-current read:jira-work
|
|
393
|
-
* @scopes-beta read:comment:jira, read:comment.property:jira, read:group:jira,
|
|
394
|
-
* read:project:jira, read:project-role:jira, read:user:jira, read:avatar:jira
|
|
395
|
-
*/
|
|
396
|
-
getComments({
|
|
397
|
-
issueIdOrKey,
|
|
398
|
-
startAt,
|
|
399
|
-
maxResults,
|
|
400
|
-
orderBy,
|
|
401
|
-
expand,
|
|
402
|
-
}: {
|
|
403
|
-
/** The ID or key of the issue. */
|
|
404
|
-
issueIdOrKey: string;
|
|
405
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
406
|
-
startAt?: number;
|
|
407
|
-
/** The maximum number of items to return per page. */
|
|
408
|
-
maxResults?: number;
|
|
409
|
-
/**
|
|
410
|
-
* [Order](#ordering) the results by a field. Accepts *created* to sort comments
|
|
411
|
-
* by their created date.
|
|
412
|
-
*/
|
|
413
|
-
orderBy?: "created" | "-created" | "+created";
|
|
414
|
-
/**
|
|
415
|
-
* Use [expand](#expansion) to include additional information about comments in
|
|
416
|
-
* the response. This parameter accepts `renderedBody`, which returns the comment
|
|
417
|
-
* body rendered in HTML.
|
|
418
|
-
*/
|
|
419
|
-
expand?: string;
|
|
420
|
-
}): Promise<PageOfComments> {
|
|
421
|
-
return this.getClientInstance()
|
|
422
|
-
.request({
|
|
423
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/comment",
|
|
424
|
-
method: "GET",
|
|
425
|
-
pathParams: {
|
|
426
|
-
issueIdOrKey,
|
|
427
|
-
},
|
|
428
|
-
query: {
|
|
429
|
-
startAt,
|
|
430
|
-
maxResults,
|
|
431
|
-
orderBy,
|
|
432
|
-
expand,
|
|
433
|
-
},
|
|
434
|
-
})
|
|
435
|
-
.then(
|
|
436
|
-
this.getClientInstance().responseHandler({
|
|
437
|
-
200: {
|
|
438
|
-
"application/json": "json",
|
|
439
|
-
},
|
|
440
|
-
}),
|
|
441
|
-
)
|
|
442
|
-
.then(
|
|
443
|
-
commonHttpClient.castResponse<{
|
|
444
|
-
status: 200;
|
|
445
|
-
mediaType: "application/json";
|
|
446
|
-
body: PageOfComments;
|
|
447
|
-
}>(),
|
|
448
|
-
)
|
|
449
|
-
.then(
|
|
450
|
-
validationSchemaStorage.validator(
|
|
451
|
-
"IssueCommentsService.getComments.response",
|
|
452
|
-
),
|
|
453
|
-
)
|
|
454
|
-
.then(commonHttpClient.getBody);
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Returns a [paginated](#pagination) list of comments specified by a list of
|
|
458
|
-
* comment IDs.
|
|
459
|
-
*
|
|
460
|
-
* This operation can be accessed anonymously.
|
|
461
|
-
*
|
|
462
|
-
* **[Permissions](#permissions) required:** Comments are returned where the user:
|
|
463
|
-
*
|
|
464
|
-
* * has *Browse projects* [project
|
|
465
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
466
|
-
* containing the comment.
|
|
467
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
468
|
-
* configured, issue-level security permission to view the issue.
|
|
469
|
-
* * If the comment has visibility restrictions, belongs to the group or has the
|
|
470
|
-
* role visibility is restricted to.
|
|
471
|
-
*
|
|
472
|
-
* @returns Returned if the request is successful.
|
|
473
|
-
*
|
|
474
|
-
* example: {
|
|
475
|
-
* "isLast": true,
|
|
476
|
-
* "maxResults": 1048576,
|
|
477
|
-
* "startAt": 0,
|
|
478
|
-
* "total": 1,
|
|
479
|
-
* "values": [
|
|
480
|
-
* {
|
|
481
|
-
* "author": {
|
|
482
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
483
|
-
* "active": false,
|
|
484
|
-
* "displayName": "Mia Krystof",
|
|
485
|
-
* "self":
|
|
486
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
487
|
-
* },
|
|
488
|
-
* "body": {
|
|
489
|
-
* "type": "doc",
|
|
490
|
-
* "version": 1,
|
|
491
|
-
* "content": [
|
|
492
|
-
* {
|
|
493
|
-
* "type": "paragraph",
|
|
494
|
-
* "content": [
|
|
495
|
-
* {
|
|
496
|
-
* "type": "text",
|
|
497
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing
|
|
498
|
-
* elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis
|
|
499
|
-
* fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
500
|
-
* }
|
|
501
|
-
* ]
|
|
502
|
-
* }
|
|
503
|
-
* ]
|
|
504
|
-
* },
|
|
505
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
506
|
-
* "id": "10000",
|
|
507
|
-
* "self":
|
|
508
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
509
|
-
* "updateAuthor": {
|
|
510
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
511
|
-
* "active": false,
|
|
512
|
-
* "displayName": "Mia Krystof",
|
|
513
|
-
* "self":
|
|
514
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
515
|
-
* },
|
|
516
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
517
|
-
* "visibility": {
|
|
518
|
-
* "identifier": "Administrators",
|
|
519
|
-
* "type": "role",
|
|
520
|
-
* "value": "Administrators"
|
|
521
|
-
* }
|
|
522
|
-
* }
|
|
523
|
-
* ]
|
|
524
|
-
* }
|
|
525
|
-
* @path {POST} /rest/api/3/comment/list
|
|
526
|
-
* @scopes-current read:jira-work
|
|
527
|
-
* @scopes-beta delete:comment.property:jira, read:avatar:jira, read:comment:jira,
|
|
528
|
-
* read:group:jira, read:project-role:jira, read:user:jira,
|
|
529
|
-
* read:comment.property:jira, read:project:jira
|
|
530
|
-
*/
|
|
531
|
-
getCommentsByIds({
|
|
532
|
-
expand,
|
|
533
|
-
issueCommentListRequestBean,
|
|
534
|
-
}: {
|
|
535
|
-
/**
|
|
536
|
-
* Use [expand](#expansion) to include additional information about comments in
|
|
537
|
-
* the response. This parameter accepts a comma-separated list. Expand options
|
|
538
|
-
* include:
|
|
539
|
-
*
|
|
540
|
-
* * `renderedBody` Returns the comment body rendered in HTML.
|
|
541
|
-
* * `properties` Returns the comment's properties.
|
|
542
|
-
*/
|
|
543
|
-
expand?: string;
|
|
544
|
-
/**
|
|
545
|
-
* The list of comment IDs.
|
|
546
|
-
*
|
|
547
|
-
* @example {
|
|
548
|
-
* "ids": [
|
|
549
|
-
* 1,
|
|
550
|
-
* 2,
|
|
551
|
-
* 5,
|
|
552
|
-
* 10
|
|
553
|
-
* ]
|
|
554
|
-
* }
|
|
555
|
-
*/
|
|
556
|
-
issueCommentListRequestBean: IssueCommentListRequestBean;
|
|
557
|
-
}): Promise<PageBeanComment> {
|
|
558
|
-
return this.getClientInstance()
|
|
559
|
-
.request({
|
|
560
|
-
path: "/rest/api/3/comment/list",
|
|
561
|
-
method: "POST",
|
|
562
|
-
query: {
|
|
563
|
-
expand,
|
|
564
|
-
},
|
|
565
|
-
headers: {
|
|
566
|
-
"Content-Type": "application/json",
|
|
567
|
-
},
|
|
568
|
-
body: issueCommentListRequestBean,
|
|
569
|
-
})
|
|
570
|
-
.then(
|
|
571
|
-
this.getClientInstance().responseHandler({
|
|
572
|
-
200: {
|
|
573
|
-
"application/json": "json",
|
|
574
|
-
},
|
|
575
|
-
}),
|
|
576
|
-
)
|
|
577
|
-
.then(
|
|
578
|
-
commonHttpClient.castResponse<{
|
|
579
|
-
status: 200;
|
|
580
|
-
mediaType: "application/json";
|
|
581
|
-
body: PageBeanComment;
|
|
582
|
-
}>(),
|
|
583
|
-
)
|
|
584
|
-
.then(
|
|
585
|
-
validationSchemaStorage.validator(
|
|
586
|
-
"IssueCommentsService.getCommentsByIds.response",
|
|
587
|
-
),
|
|
588
|
-
)
|
|
589
|
-
.then(commonHttpClient.getBody);
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* Updates a comment.
|
|
593
|
-
*
|
|
594
|
-
* This operation can be accessed anonymously.
|
|
595
|
-
*
|
|
596
|
-
* **[Permissions](#permissions) required:**
|
|
597
|
-
*
|
|
598
|
-
* * *Browse projects* [project
|
|
599
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
600
|
-
* issue containing the comment is in.
|
|
601
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
602
|
-
* configured, issue-level security permission to view the issue.
|
|
603
|
-
* * *Edit all comments*[ project
|
|
604
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) to update any comment or
|
|
605
|
-
* *Edit own comments* to update comment created by the user.
|
|
606
|
-
* * If the comment has visibility restrictions, the user belongs to the group
|
|
607
|
-
* or has the role visibility is restricted to.
|
|
608
|
-
*
|
|
609
|
-
* @returns Returned if the request is successful.
|
|
610
|
-
*
|
|
611
|
-
* example: {
|
|
612
|
-
* "author": {
|
|
613
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
614
|
-
* "active": false,
|
|
615
|
-
* "displayName": "Mia Krystof",
|
|
616
|
-
* "self":
|
|
617
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
618
|
-
* },
|
|
619
|
-
* "body": {
|
|
620
|
-
* "type": "doc",
|
|
621
|
-
* "version": 1,
|
|
622
|
-
* "content": [
|
|
623
|
-
* {
|
|
624
|
-
* "type": "paragraph",
|
|
625
|
-
* "content": [
|
|
626
|
-
* {
|
|
627
|
-
* "type": "text",
|
|
628
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
629
|
-
* Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum.
|
|
630
|
-
* Sed semper quam laoreet nisi egestas at posuere augue semper."
|
|
631
|
-
* }
|
|
632
|
-
* ]
|
|
633
|
-
* }
|
|
634
|
-
* ]
|
|
635
|
-
* },
|
|
636
|
-
* "created": "2021-01-17T12:34:00.000+0000",
|
|
637
|
-
* "id": "10000",
|
|
638
|
-
* "self":
|
|
639
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/comment/10000",
|
|
640
|
-
* "updateAuthor": {
|
|
641
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
642
|
-
* "active": false,
|
|
643
|
-
* "displayName": "Mia Krystof",
|
|
644
|
-
* "self":
|
|
645
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
646
|
-
* },
|
|
647
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
648
|
-
* "visibility": {
|
|
649
|
-
* "identifier": "Administrators",
|
|
650
|
-
* "type": "role",
|
|
651
|
-
* "value": "Administrators"
|
|
652
|
-
* }
|
|
653
|
-
* }
|
|
654
|
-
* @path {PUT} /rest/api/3/issue/{issueIdOrKey}/comment/{id}
|
|
655
|
-
* @scopes-current write:jira-work
|
|
656
|
-
* @scopes-beta read:comment:jira, read:comment.property:jira, read:group:jira,
|
|
657
|
-
* read:project:jira, read:project-role:jira, read:user:jira, write:comment:jira,
|
|
658
|
-
* read:avatar:jira
|
|
659
|
-
*/
|
|
660
|
-
updateComment({
|
|
661
|
-
issueIdOrKey,
|
|
662
|
-
id,
|
|
663
|
-
notifyUsers,
|
|
664
|
-
overrideEditableFlag,
|
|
665
|
-
expand,
|
|
666
|
-
comment,
|
|
667
|
-
}: {
|
|
668
|
-
/** The ID or key of the issue. */
|
|
669
|
-
issueIdOrKey: string;
|
|
670
|
-
/** The ID of the comment. */
|
|
671
|
-
id: string;
|
|
672
|
-
/** Whether users are notified when a comment is updated. */
|
|
673
|
-
notifyUsers?: boolean;
|
|
674
|
-
/**
|
|
675
|
-
* Whether screen security is overridden to enable uneditable fields to be edited.
|
|
676
|
-
* Available to Connect app users with the *Administer Jira* [global
|
|
677
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) and Forge apps acting on
|
|
678
|
-
* behalf of users with *Administer Jira* [global
|
|
679
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
680
|
-
*/
|
|
681
|
-
overrideEditableFlag?: boolean;
|
|
682
|
-
/**
|
|
683
|
-
* Use [expand](#expansion) to include additional information about comments in
|
|
684
|
-
* the response. This parameter accepts `renderedBody`, which returns the comment
|
|
685
|
-
* body rendered in HTML.
|
|
686
|
-
*/
|
|
687
|
-
expand?: string;
|
|
688
|
-
/**
|
|
689
|
-
* @example {
|
|
690
|
-
* "body": {
|
|
691
|
-
* "content": [
|
|
692
|
-
* {
|
|
693
|
-
* "content": [
|
|
694
|
-
* {
|
|
695
|
-
* "text": "Lorem ipsum dolor sit amet, consectetur
|
|
696
|
-
* adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue
|
|
697
|
-
* iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue
|
|
698
|
-
* semper.",
|
|
699
|
-
* "type": "text"
|
|
700
|
-
* }
|
|
701
|
-
* ],
|
|
702
|
-
* "type": "paragraph"
|
|
703
|
-
* }
|
|
704
|
-
* ],
|
|
705
|
-
* "type": "doc",
|
|
706
|
-
* "version": 1
|
|
707
|
-
* },
|
|
708
|
-
* "visibility": {
|
|
709
|
-
* "identifier": "Administrators",
|
|
710
|
-
* "type": "role",
|
|
711
|
-
* "value": "Administrators"
|
|
712
|
-
* }
|
|
713
|
-
* }
|
|
714
|
-
*/
|
|
715
|
-
comment: Comment;
|
|
716
|
-
}): Promise<Comment> {
|
|
717
|
-
return this.getClientInstance()
|
|
718
|
-
.request({
|
|
719
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/comment/{id}",
|
|
720
|
-
method: "PUT",
|
|
721
|
-
pathParams: {
|
|
722
|
-
issueIdOrKey,
|
|
723
|
-
id,
|
|
724
|
-
},
|
|
725
|
-
query: {
|
|
726
|
-
notifyUsers,
|
|
727
|
-
overrideEditableFlag,
|
|
728
|
-
expand,
|
|
729
|
-
},
|
|
730
|
-
headers: {
|
|
731
|
-
"Content-Type": "application/json",
|
|
732
|
-
},
|
|
733
|
-
body: comment,
|
|
734
|
-
})
|
|
735
|
-
.then(
|
|
736
|
-
this.getClientInstance().responseHandler({
|
|
737
|
-
200: {
|
|
738
|
-
"application/json": "json",
|
|
739
|
-
},
|
|
740
|
-
}),
|
|
741
|
-
)
|
|
742
|
-
.then(
|
|
743
|
-
commonHttpClient.castResponse<{
|
|
744
|
-
status: 200;
|
|
745
|
-
mediaType: "application/json";
|
|
746
|
-
body: Comment;
|
|
747
|
-
}>(),
|
|
748
|
-
)
|
|
749
|
-
.then(
|
|
750
|
-
validationSchemaStorage.validator(
|
|
751
|
-
"IssueCommentsService.updateComment.response",
|
|
752
|
-
),
|
|
753
|
-
)
|
|
754
|
-
.then(commonHttpClient.getBody);
|
|
755
|
-
}
|
|
756
|
-
static initialize() {
|
|
757
|
-
validationSchemaStorage.registerExtensible(
|
|
758
|
-
"IssueCommentsService.getCommentsByIds.response",
|
|
759
|
-
z
|
|
760
|
-
.object({
|
|
761
|
-
status: z.literal(200),
|
|
762
|
-
mediaType: z.literal("application/json"),
|
|
763
|
-
body: validationSchemaStorage.lazy("PageBeanComment"),
|
|
764
|
-
})
|
|
765
|
-
.describe("IssueCommentsService.getCommentsByIds.response"),
|
|
766
|
-
);
|
|
767
|
-
validationSchemaStorage.registerExtensible(
|
|
768
|
-
"IssueCommentsService.getComments.response",
|
|
769
|
-
z
|
|
770
|
-
.object({
|
|
771
|
-
status: z.literal(200),
|
|
772
|
-
mediaType: z.literal("application/json"),
|
|
773
|
-
body: validationSchemaStorage.lazy("PageOfComments"),
|
|
774
|
-
})
|
|
775
|
-
.describe("IssueCommentsService.getComments.response"),
|
|
776
|
-
);
|
|
777
|
-
validationSchemaStorage.registerExtensible(
|
|
778
|
-
"IssueCommentsService.addComment.response",
|
|
779
|
-
z
|
|
780
|
-
.object({
|
|
781
|
-
status: z.literal(201),
|
|
782
|
-
mediaType: z.literal("application/json"),
|
|
783
|
-
body: validationSchemaStorage.lazy("Comment"),
|
|
784
|
-
})
|
|
785
|
-
.describe("IssueCommentsService.addComment.response"),
|
|
786
|
-
);
|
|
787
|
-
validationSchemaStorage.registerExtensible(
|
|
788
|
-
"IssueCommentsService.getComment.response",
|
|
789
|
-
z
|
|
790
|
-
.object({
|
|
791
|
-
status: z.literal(200),
|
|
792
|
-
mediaType: z.literal("application/json"),
|
|
793
|
-
body: validationSchemaStorage.lazy("Comment"),
|
|
794
|
-
})
|
|
795
|
-
.describe("IssueCommentsService.getComment.response"),
|
|
796
|
-
);
|
|
797
|
-
validationSchemaStorage.registerExtensible(
|
|
798
|
-
"IssueCommentsService.updateComment.response",
|
|
799
|
-
z
|
|
800
|
-
.object({
|
|
801
|
-
status: z.literal(200),
|
|
802
|
-
mediaType: z.literal("application/json"),
|
|
803
|
-
body: validationSchemaStorage.lazy("Comment"),
|
|
804
|
-
})
|
|
805
|
-
.describe("IssueCommentsService.updateComment.response"),
|
|
806
|
-
);
|
|
807
|
-
validationSchemaStorage.registerOnce([
|
|
808
|
-
registerIssueCommentsValidationSchemas,
|
|
809
|
-
registerCommonValidationSchemas,
|
|
810
|
-
]);
|
|
811
|
-
}
|
|
812
|
-
}
|