@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,597 +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
|
-
registerIssueRemoteLinksValidationSchemas,
|
|
10
|
-
type RemoteIssueLink,
|
|
11
|
-
type RemoteIssueLinkIdentifies,
|
|
12
|
-
type RemoteIssueLinkRequest,
|
|
13
|
-
} from "../models/issue-remote-links";
|
|
14
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
15
|
-
/**
|
|
16
|
-
* This resource represents remote issue links, a way of linking Jira to
|
|
17
|
-
* information in other systems. Use it to get, create, update, and delete remote
|
|
18
|
-
* issue links either by ID or global ID. The global ID provides a way of
|
|
19
|
-
* accessing remote issue links using information about the item's remote system
|
|
20
|
-
* host and remote system identifier.
|
|
21
|
-
*/
|
|
22
|
-
export class IssueRemoteLinksService extends CommonHttpService {
|
|
23
|
-
/**
|
|
24
|
-
* Creates or updates a remote issue link for an issue.
|
|
25
|
-
*
|
|
26
|
-
* If a `globalId` is provided and a remote issue link with that global ID is
|
|
27
|
-
* found it is updated. Any fields without values in the request are set to null.
|
|
28
|
-
* Otherwise, the remote issue link is created.
|
|
29
|
-
*
|
|
30
|
-
* This operation requires [issue linking to be
|
|
31
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
32
|
-
*
|
|
33
|
-
* This operation can be accessed anonymously.
|
|
34
|
-
*
|
|
35
|
-
* **[Permissions](#permissions) required:**
|
|
36
|
-
*
|
|
37
|
-
* * *Browse projects* and *Link issues* [project
|
|
38
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
39
|
-
* issue is in.
|
|
40
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
41
|
-
* configured, issue-level security permission to view the issue.
|
|
42
|
-
*
|
|
43
|
-
* @returns * status: 200, mediaType: application/json
|
|
44
|
-
*
|
|
45
|
-
* Returned if the remote issue link is updated.
|
|
46
|
-
*
|
|
47
|
-
* example: {
|
|
48
|
-
* "id": 10000,
|
|
49
|
-
* "self":
|
|
50
|
-
* "https://your-domain.atlassian.net/rest/api/issue/MKY-1/remotelink/10000"
|
|
51
|
-
* }
|
|
52
|
-
*
|
|
53
|
-
* * status: 201, mediaType: application/json
|
|
54
|
-
*
|
|
55
|
-
* Returned if the remote issue link is created.
|
|
56
|
-
*
|
|
57
|
-
* example: {
|
|
58
|
-
* "id": 10000,
|
|
59
|
-
* "self":
|
|
60
|
-
* "https://your-domain.atlassian.net/rest/api/issue/MKY-1/remotelink/10000"
|
|
61
|
-
* }
|
|
62
|
-
* @path {POST} /rest/api/3/issue/{issueIdOrKey}/remotelink
|
|
63
|
-
* @scopes-current write:jira-work
|
|
64
|
-
* @scopes-beta write:issue:jira, write:issue.remote-link:jira, read:issue.remote-link:jira
|
|
65
|
-
*/
|
|
66
|
-
createOrUpdateRemoteIssueLink({
|
|
67
|
-
issueIdOrKey,
|
|
68
|
-
remoteIssueLinkRequest,
|
|
69
|
-
}: {
|
|
70
|
-
/** The ID or key of the issue. */
|
|
71
|
-
issueIdOrKey: string;
|
|
72
|
-
/**
|
|
73
|
-
* @example {
|
|
74
|
-
* "application": {
|
|
75
|
-
* "name": "My Acme Tracker",
|
|
76
|
-
* "type": "com.acme.tracker"
|
|
77
|
-
* },
|
|
78
|
-
* "globalId": "system=http://www.mycompany.com/support&id=1",
|
|
79
|
-
* "object": {
|
|
80
|
-
* "icon": {
|
|
81
|
-
* "title": "Support Ticket",
|
|
82
|
-
* "url16x16": "http://www.mycompany.com/support/ticket.png"
|
|
83
|
-
* },
|
|
84
|
-
* "status": {
|
|
85
|
-
* "icon": {
|
|
86
|
-
* "link": "http://www.mycompany.com/support?id=1&details=closed",
|
|
87
|
-
* "title": "Case Closed",
|
|
88
|
-
* "url16x16": "http://www.mycompany.com/support/resolved.png"
|
|
89
|
-
* },
|
|
90
|
-
* "resolved": true
|
|
91
|
-
* },
|
|
92
|
-
* "summary": "Customer support issue",
|
|
93
|
-
* "title": "TSTSUP-111",
|
|
94
|
-
* "url": "http://www.mycompany.com/support?id=1"
|
|
95
|
-
* },
|
|
96
|
-
* "relationship": "causes"
|
|
97
|
-
* }
|
|
98
|
-
*/
|
|
99
|
-
remoteIssueLinkRequest: RemoteIssueLinkRequest;
|
|
100
|
-
}): Promise<{
|
|
101
|
-
created: boolean;
|
|
102
|
-
remoteIssueLinkIdentifies: RemoteIssueLinkIdentifies;
|
|
103
|
-
}> {
|
|
104
|
-
return this.getClientInstance()
|
|
105
|
-
.request({
|
|
106
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink",
|
|
107
|
-
method: "POST",
|
|
108
|
-
pathParams: {
|
|
109
|
-
issueIdOrKey,
|
|
110
|
-
},
|
|
111
|
-
headers: {
|
|
112
|
-
"Content-Type": "application/json",
|
|
113
|
-
},
|
|
114
|
-
body: remoteIssueLinkRequest,
|
|
115
|
-
})
|
|
116
|
-
.then(
|
|
117
|
-
this.getClientInstance().responseHandler({
|
|
118
|
-
200: {
|
|
119
|
-
"application/json": "json",
|
|
120
|
-
},
|
|
121
|
-
201: {
|
|
122
|
-
"application/json": "json",
|
|
123
|
-
},
|
|
124
|
-
}),
|
|
125
|
-
)
|
|
126
|
-
.then(
|
|
127
|
-
commonHttpClient.castResponse<{
|
|
128
|
-
status: 200 | 201;
|
|
129
|
-
mediaType: "application/json";
|
|
130
|
-
body: RemoteIssueLinkIdentifies;
|
|
131
|
-
}>(),
|
|
132
|
-
)
|
|
133
|
-
.then(
|
|
134
|
-
validationSchemaStorage.validator(
|
|
135
|
-
"IssueRemoteLinksService.createOrUpdateRemoteIssueLink.response",
|
|
136
|
-
),
|
|
137
|
-
)
|
|
138
|
-
.then(commonHttpClient.asCreatedResponse("remoteIssueLinkIdentifies"));
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Deletes the remote issue link from the issue using the link's global ID. Where
|
|
142
|
-
* the global ID includes reserved URL characters these must be escaped in the
|
|
143
|
-
* request. For example, pass `system=http://www.mycompany.com/support&id=1` as
|
|
144
|
-
* `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`.
|
|
145
|
-
*
|
|
146
|
-
* This operation requires [issue linking to be
|
|
147
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
148
|
-
*
|
|
149
|
-
* This operation can be accessed anonymously.
|
|
150
|
-
*
|
|
151
|
-
* **[Permissions](#permissions) required:**
|
|
152
|
-
*
|
|
153
|
-
* * *Browse projects* and *Link issues* [project
|
|
154
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
155
|
-
* issue is in.
|
|
156
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
157
|
-
* implemented, issue-level security permission to view the issue.
|
|
158
|
-
*
|
|
159
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/remotelink
|
|
160
|
-
* @scopes-current write:jira-work
|
|
161
|
-
* @scopes-beta delete:issue.remote-link:jira, write:issue:jira
|
|
162
|
-
*/
|
|
163
|
-
deleteRemoteIssueLinkByGlobalId({
|
|
164
|
-
issueIdOrKey,
|
|
165
|
-
globalId,
|
|
166
|
-
}: {
|
|
167
|
-
/** The ID or key of the issue. */
|
|
168
|
-
issueIdOrKey: string;
|
|
169
|
-
/** The global ID of a remote issue link. */
|
|
170
|
-
globalId: string;
|
|
171
|
-
}): Promise<void> {
|
|
172
|
-
return this.getClientInstance()
|
|
173
|
-
.request({
|
|
174
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink",
|
|
175
|
-
method: "DELETE",
|
|
176
|
-
pathParams: {
|
|
177
|
-
issueIdOrKey,
|
|
178
|
-
},
|
|
179
|
-
query: {
|
|
180
|
-
globalId,
|
|
181
|
-
},
|
|
182
|
-
})
|
|
183
|
-
.then(commonHttpClient.discardResult);
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Deletes a remote issue link from an issue.
|
|
187
|
-
*
|
|
188
|
-
* This operation requires [issue linking to be
|
|
189
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
190
|
-
*
|
|
191
|
-
* This operation can be accessed anonymously.
|
|
192
|
-
*
|
|
193
|
-
* **[Permissions](#permissions) required:**
|
|
194
|
-
*
|
|
195
|
-
* * *Browse projects*, *Edit issues*, and *Link issues* [project
|
|
196
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
197
|
-
* issue is in.
|
|
198
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
199
|
-
* configured, issue-level security permission to view the issue.
|
|
200
|
-
*
|
|
201
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}
|
|
202
|
-
* @scopes-current write:jira-work
|
|
203
|
-
* @scopes-beta delete:issue.remote-link:jira, write:issue:jira
|
|
204
|
-
*/
|
|
205
|
-
deleteRemoteIssueLinkById({
|
|
206
|
-
issueIdOrKey,
|
|
207
|
-
linkId,
|
|
208
|
-
}: {
|
|
209
|
-
/** The ID or key of the issue. */
|
|
210
|
-
issueIdOrKey: string;
|
|
211
|
-
/** The ID of a remote issue link. */
|
|
212
|
-
linkId: string;
|
|
213
|
-
}): Promise<void> {
|
|
214
|
-
return this.getClientInstance()
|
|
215
|
-
.request({
|
|
216
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}",
|
|
217
|
-
method: "DELETE",
|
|
218
|
-
pathParams: {
|
|
219
|
-
issueIdOrKey,
|
|
220
|
-
linkId,
|
|
221
|
-
},
|
|
222
|
-
})
|
|
223
|
-
.then(commonHttpClient.discardResult);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Returns a remote issue link for an issue.
|
|
227
|
-
*
|
|
228
|
-
* This operation requires [issue linking to be
|
|
229
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
230
|
-
*
|
|
231
|
-
* This operation can be accessed anonymously.
|
|
232
|
-
*
|
|
233
|
-
* **[Permissions](#permissions) required:**
|
|
234
|
-
*
|
|
235
|
-
* * *Browse projects* [project
|
|
236
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
237
|
-
* issue is in.
|
|
238
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
239
|
-
* configured, issue-level security permission to view the issue.
|
|
240
|
-
*
|
|
241
|
-
* @returns Returned if the request is successful.
|
|
242
|
-
*
|
|
243
|
-
* example: {
|
|
244
|
-
* "application": {
|
|
245
|
-
* "name": "My Acme Tracker",
|
|
246
|
-
* "type": "com.acme.tracker"
|
|
247
|
-
* },
|
|
248
|
-
* "globalId": "system=http://www.mycompany.com/support&id=1",
|
|
249
|
-
* "id": 10000,
|
|
250
|
-
* "object": {
|
|
251
|
-
* "icon": {
|
|
252
|
-
* "title": "Support Ticket",
|
|
253
|
-
* "url16x16": "http://www.mycompany.com/support/ticket.png"
|
|
254
|
-
* },
|
|
255
|
-
* "status": {
|
|
256
|
-
* "icon": {
|
|
257
|
-
* "link": "http://www.mycompany.com/support?id=1&details=closed",
|
|
258
|
-
* "title": "Case Closed",
|
|
259
|
-
* "url16x16": "http://www.mycompany.com/support/resolved.png"
|
|
260
|
-
* },
|
|
261
|
-
* "resolved": true
|
|
262
|
-
* },
|
|
263
|
-
* "summary": "Customer support issue",
|
|
264
|
-
* "title": "TSTSUP-111",
|
|
265
|
-
* "url": "http://www.mycompany.com/support?id=1"
|
|
266
|
-
* },
|
|
267
|
-
* "relationship": "causes",
|
|
268
|
-
* "self":
|
|
269
|
-
* "https://your-domain.atlassian.net/rest/api/issue/MKY-1/remotelink/10000"
|
|
270
|
-
* }
|
|
271
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}
|
|
272
|
-
* @scopes-current read:jira-work
|
|
273
|
-
* @scopes-beta read:issue.remote-link:jira, read:status:jira
|
|
274
|
-
*/
|
|
275
|
-
getRemoteIssueLinkById({
|
|
276
|
-
issueIdOrKey,
|
|
277
|
-
linkId,
|
|
278
|
-
}: {
|
|
279
|
-
/** The ID or key of the issue. */
|
|
280
|
-
issueIdOrKey: string;
|
|
281
|
-
/** The ID of the remote issue link. */
|
|
282
|
-
linkId: string;
|
|
283
|
-
}): Promise<RemoteIssueLink> {
|
|
284
|
-
return this.getClientInstance()
|
|
285
|
-
.request({
|
|
286
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}",
|
|
287
|
-
method: "GET",
|
|
288
|
-
pathParams: {
|
|
289
|
-
issueIdOrKey,
|
|
290
|
-
linkId,
|
|
291
|
-
},
|
|
292
|
-
})
|
|
293
|
-
.then(
|
|
294
|
-
this.getClientInstance().responseHandler({
|
|
295
|
-
200: {
|
|
296
|
-
"application/json": "json",
|
|
297
|
-
},
|
|
298
|
-
}),
|
|
299
|
-
)
|
|
300
|
-
.then(
|
|
301
|
-
commonHttpClient.castResponse<{
|
|
302
|
-
status: 200;
|
|
303
|
-
mediaType: "application/json";
|
|
304
|
-
body: RemoteIssueLink;
|
|
305
|
-
}>(),
|
|
306
|
-
)
|
|
307
|
-
.then(
|
|
308
|
-
validationSchemaStorage.validator(
|
|
309
|
-
"IssueRemoteLinksService.getRemoteIssueLinkById.response",
|
|
310
|
-
),
|
|
311
|
-
)
|
|
312
|
-
.then(commonHttpClient.getBody);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Returns the remote issue links for an issue. When a remote issue link global ID
|
|
316
|
-
* is provided the record with that global ID is returned, otherwise all remote
|
|
317
|
-
* issue links are returned. Where a global ID includes reserved URL characters
|
|
318
|
-
* these must be escaped in the request. For example, pass
|
|
319
|
-
* `system=http://www.mycompany.com/support&id=1` as
|
|
320
|
-
* `system%3Dhttp%3A%2F%2Fwww.mycompany.com%2Fsupport%26id%3D1`.
|
|
321
|
-
*
|
|
322
|
-
* This operation requires [issue linking to be
|
|
323
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
324
|
-
*
|
|
325
|
-
* This operation can be accessed anonymously.
|
|
326
|
-
*
|
|
327
|
-
* **[Permissions](#permissions) required:**
|
|
328
|
-
*
|
|
329
|
-
* * *Browse projects* [project
|
|
330
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
331
|
-
* issue is in.
|
|
332
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
333
|
-
* configured, issue-level security permission to view the issue.
|
|
334
|
-
*
|
|
335
|
-
* @returns Returned if the request is successful.
|
|
336
|
-
*
|
|
337
|
-
* example: [
|
|
338
|
-
* {
|
|
339
|
-
* "application": {
|
|
340
|
-
* "name": "My Acme Tracker",
|
|
341
|
-
* "type": "com.acme.tracker"
|
|
342
|
-
* },
|
|
343
|
-
* "globalId": "system=http://www.mycompany.com/support&id=1",
|
|
344
|
-
* "id": 10000,
|
|
345
|
-
* "object": {
|
|
346
|
-
* "icon": {
|
|
347
|
-
* "title": "Support Ticket",
|
|
348
|
-
* "url16x16": "http://www.mycompany.com/support/ticket.png"
|
|
349
|
-
* },
|
|
350
|
-
* "status": {
|
|
351
|
-
* "icon": {
|
|
352
|
-
* "link": "http://www.mycompany.com/support?id=1&details=closed",
|
|
353
|
-
* "title": "Case Closed",
|
|
354
|
-
* "url16x16": "http://www.mycompany.com/support/resolved.png"
|
|
355
|
-
* },
|
|
356
|
-
* "resolved": true
|
|
357
|
-
* },
|
|
358
|
-
* "summary": "Customer support issue",
|
|
359
|
-
* "title": "TSTSUP-111",
|
|
360
|
-
* "url": "http://www.mycompany.com/support?id=1"
|
|
361
|
-
* },
|
|
362
|
-
* "relationship": "causes",
|
|
363
|
-
* "self":
|
|
364
|
-
* "https://your-domain.atlassian.net/rest/api/issue/MKY-1/remotelink/10000"
|
|
365
|
-
* },
|
|
366
|
-
* {
|
|
367
|
-
* "application": {
|
|
368
|
-
* "name": "My Acme Tester",
|
|
369
|
-
* "type": "com.acme.tester"
|
|
370
|
-
* },
|
|
371
|
-
* "globalId": "system=http://www.anothercompany.com/tester&id=1234",
|
|
372
|
-
* "id": 10001,
|
|
373
|
-
* "object": {
|
|
374
|
-
* "icon": {
|
|
375
|
-
* "title": "Test Case",
|
|
376
|
-
* "url16x16": "http://www.anothercompany.com/tester/images/testcase.gif"
|
|
377
|
-
* },
|
|
378
|
-
* "status": {
|
|
379
|
-
* "icon": {
|
|
380
|
-
* "link":
|
|
381
|
-
* "http://www.anothercompany.com/tester/person?accountId=5b10a2844c20165700ede21g",
|
|
382
|
-
* "title": "Tested by Mia Krystof",
|
|
383
|
-
* "url16x16":
|
|
384
|
-
* "http://www.anothercompany.com/tester/images/person/mia.gif"
|
|
385
|
-
* },
|
|
386
|
-
* "resolved": false
|
|
387
|
-
* },
|
|
388
|
-
* "summary": "Test that the submit button saves the item",
|
|
389
|
-
* "title": "Test Case #1234",
|
|
390
|
-
* "url": "http://www.anothercompany.com/tester/testcase/1234"
|
|
391
|
-
* },
|
|
392
|
-
* "relationship": "is tested by",
|
|
393
|
-
* "self":
|
|
394
|
-
* "https://your-domain.atlassian.net/rest/api/issue/MKY-1/remotelink/10001"
|
|
395
|
-
* }
|
|
396
|
-
* ]
|
|
397
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/remotelink
|
|
398
|
-
* @scopes-current read:jira-work
|
|
399
|
-
* @scopes-beta read:issue.remote-link:jira, read:status:jira
|
|
400
|
-
*/
|
|
401
|
-
getRemoteIssueLinks({
|
|
402
|
-
issueIdOrKey,
|
|
403
|
-
globalId,
|
|
404
|
-
}: {
|
|
405
|
-
/** The ID or key of the issue. */
|
|
406
|
-
issueIdOrKey: string;
|
|
407
|
-
/** The global ID of the remote issue link. */
|
|
408
|
-
globalId?: string;
|
|
409
|
-
}): Promise<RemoteIssueLink> {
|
|
410
|
-
return this.getClientInstance()
|
|
411
|
-
.request({
|
|
412
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink",
|
|
413
|
-
method: "GET",
|
|
414
|
-
pathParams: {
|
|
415
|
-
issueIdOrKey,
|
|
416
|
-
},
|
|
417
|
-
query: {
|
|
418
|
-
globalId,
|
|
419
|
-
},
|
|
420
|
-
})
|
|
421
|
-
.then(
|
|
422
|
-
this.getClientInstance().responseHandler({
|
|
423
|
-
200: {
|
|
424
|
-
"application/json": "json",
|
|
425
|
-
},
|
|
426
|
-
}),
|
|
427
|
-
)
|
|
428
|
-
.then(
|
|
429
|
-
commonHttpClient.castResponse<{
|
|
430
|
-
status: 200;
|
|
431
|
-
mediaType: "application/json";
|
|
432
|
-
body: RemoteIssueLink;
|
|
433
|
-
}>(),
|
|
434
|
-
)
|
|
435
|
-
.then(
|
|
436
|
-
validationSchemaStorage.validator(
|
|
437
|
-
"IssueRemoteLinksService.getRemoteIssueLinks.response",
|
|
438
|
-
),
|
|
439
|
-
)
|
|
440
|
-
.then(commonHttpClient.getBody);
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Updates a remote issue link for an issue.
|
|
444
|
-
*
|
|
445
|
-
* Note: Fields without values in the request are set to null.
|
|
446
|
-
*
|
|
447
|
-
* This operation requires [issue linking to be
|
|
448
|
-
* active](https://confluence.atlassian.com/x/yoXKM).
|
|
449
|
-
*
|
|
450
|
-
* This operation can be accessed anonymously.
|
|
451
|
-
*
|
|
452
|
-
* **[Permissions](#permissions) required:**
|
|
453
|
-
*
|
|
454
|
-
* * *Browse projects* and *Link issues* [project
|
|
455
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
456
|
-
* issue is in.
|
|
457
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
458
|
-
* configured, issue-level security permission to view the issue.
|
|
459
|
-
*
|
|
460
|
-
* @returns Returned if the request is successful.
|
|
461
|
-
* @path {PUT} /rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}
|
|
462
|
-
* @scopes-current write:jira-work
|
|
463
|
-
* @scopes-beta write:issue:jira, write:issue.remote-link:jira
|
|
464
|
-
*/
|
|
465
|
-
updateRemoteIssueLink({
|
|
466
|
-
issueIdOrKey,
|
|
467
|
-
linkId,
|
|
468
|
-
remoteIssueLinkRequest,
|
|
469
|
-
}: {
|
|
470
|
-
/** The ID or key of the issue. */
|
|
471
|
-
issueIdOrKey: string;
|
|
472
|
-
/** The ID of the remote issue link. */
|
|
473
|
-
linkId: string;
|
|
474
|
-
/**
|
|
475
|
-
* @example {
|
|
476
|
-
* "application": {
|
|
477
|
-
* "name": "My Acme Tracker",
|
|
478
|
-
* "type": "com.acme.tracker"
|
|
479
|
-
* },
|
|
480
|
-
* "globalId": "system=http://www.mycompany.com/support&id=1",
|
|
481
|
-
* "object": {
|
|
482
|
-
* "icon": {
|
|
483
|
-
* "title": "Support Ticket",
|
|
484
|
-
* "url16x16": "http://www.mycompany.com/support/ticket.png"
|
|
485
|
-
* },
|
|
486
|
-
* "status": {
|
|
487
|
-
* "icon": {
|
|
488
|
-
* "link": "http://www.mycompany.com/support?id=1&details=closed",
|
|
489
|
-
* "title": "Case Closed",
|
|
490
|
-
* "url16x16": "http://www.mycompany.com/support/resolved.png"
|
|
491
|
-
* },
|
|
492
|
-
* "resolved": true
|
|
493
|
-
* },
|
|
494
|
-
* "summary": "Customer support issue",
|
|
495
|
-
* "title": "TSTSUP-111",
|
|
496
|
-
* "url": "http://www.mycompany.com/support?id=1"
|
|
497
|
-
* },
|
|
498
|
-
* "relationship": "causes"
|
|
499
|
-
* }
|
|
500
|
-
*/
|
|
501
|
-
remoteIssueLinkRequest: RemoteIssueLinkRequest;
|
|
502
|
-
}): Promise<void> {
|
|
503
|
-
return this.getClientInstance()
|
|
504
|
-
.request({
|
|
505
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/remotelink/{linkId}",
|
|
506
|
-
method: "PUT",
|
|
507
|
-
pathParams: {
|
|
508
|
-
issueIdOrKey,
|
|
509
|
-
linkId,
|
|
510
|
-
},
|
|
511
|
-
headers: {
|
|
512
|
-
"Content-Type": "application/json",
|
|
513
|
-
},
|
|
514
|
-
body: remoteIssueLinkRequest,
|
|
515
|
-
})
|
|
516
|
-
.then(
|
|
517
|
-
this.getClientInstance().responseHandler({
|
|
518
|
-
204: {
|
|
519
|
-
"application/json": "json",
|
|
520
|
-
},
|
|
521
|
-
}),
|
|
522
|
-
)
|
|
523
|
-
.then(
|
|
524
|
-
commonHttpClient.castResponse<{
|
|
525
|
-
status: 204;
|
|
526
|
-
mediaType: "application/json";
|
|
527
|
-
body: void;
|
|
528
|
-
}>(),
|
|
529
|
-
)
|
|
530
|
-
.then(
|
|
531
|
-
validationSchemaStorage.validator(
|
|
532
|
-
"IssueRemoteLinksService.updateRemoteIssueLink.response",
|
|
533
|
-
),
|
|
534
|
-
)
|
|
535
|
-
.then(commonHttpClient.getBody);
|
|
536
|
-
}
|
|
537
|
-
static initialize() {
|
|
538
|
-
validationSchemaStorage.registerExtensible(
|
|
539
|
-
"IssueRemoteLinksService.getRemoteIssueLinks.response",
|
|
540
|
-
z
|
|
541
|
-
.object({
|
|
542
|
-
status: z.literal(200),
|
|
543
|
-
mediaType: z.literal("application/json"),
|
|
544
|
-
body: validationSchemaStorage.lazy("RemoteIssueLink"),
|
|
545
|
-
})
|
|
546
|
-
.describe("IssueRemoteLinksService.getRemoteIssueLinks.response"),
|
|
547
|
-
);
|
|
548
|
-
validationSchemaStorage.registerExtensible(
|
|
549
|
-
"IssueRemoteLinksService.createOrUpdateRemoteIssueLink.response",
|
|
550
|
-
z
|
|
551
|
-
.object({
|
|
552
|
-
status: z.number(),
|
|
553
|
-
mediaType: z.string(),
|
|
554
|
-
body: z.unknown(),
|
|
555
|
-
})
|
|
556
|
-
.superRefine(({ status: status, body: body }, ctx) => {
|
|
557
|
-
if (status === 200 || status === 201) {
|
|
558
|
-
validationSchemaStorage
|
|
559
|
-
.lazy("RemoteIssueLinkIdentifies")
|
|
560
|
-
.parse(body);
|
|
561
|
-
} else {
|
|
562
|
-
ctx.addIssue({
|
|
563
|
-
code: z.ZodIssueCode.custom,
|
|
564
|
-
path: ["status"],
|
|
565
|
-
message: `Unexpected status code: ${status}`,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
})
|
|
569
|
-
.describe(
|
|
570
|
-
"IssueRemoteLinksService.createOrUpdateRemoteIssueLink.response",
|
|
571
|
-
),
|
|
572
|
-
);
|
|
573
|
-
validationSchemaStorage.registerExtensible(
|
|
574
|
-
"IssueRemoteLinksService.getRemoteIssueLinkById.response",
|
|
575
|
-
z
|
|
576
|
-
.object({
|
|
577
|
-
status: z.literal(200),
|
|
578
|
-
mediaType: z.literal("application/json"),
|
|
579
|
-
body: validationSchemaStorage.lazy("RemoteIssueLink"),
|
|
580
|
-
})
|
|
581
|
-
.describe("IssueRemoteLinksService.getRemoteIssueLinkById.response"),
|
|
582
|
-
);
|
|
583
|
-
validationSchemaStorage.registerExtensible(
|
|
584
|
-
"IssueRemoteLinksService.updateRemoteIssueLink.response",
|
|
585
|
-
z
|
|
586
|
-
.object({
|
|
587
|
-
status: z.literal(204),
|
|
588
|
-
mediaType: z.literal("application/json"),
|
|
589
|
-
body: z.unknown(),
|
|
590
|
-
})
|
|
591
|
-
.describe("IssueRemoteLinksService.updateRemoteIssueLink.response"),
|
|
592
|
-
);
|
|
593
|
-
validationSchemaStorage.registerOnce([
|
|
594
|
-
registerIssueRemoteLinksValidationSchemas,
|
|
595
|
-
]);
|
|
596
|
-
}
|
|
597
|
-
}
|