@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,221 +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
|
-
registerIssueVotesValidationSchemas,
|
|
10
|
-
type Votes,
|
|
11
|
-
} from "../models/issue-votes";
|
|
12
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
13
|
-
/**
|
|
14
|
-
* This resource represents votes cast by users on an issue. Use it to get details
|
|
15
|
-
* of votes on an issue as well as cast and withdrawal votes.
|
|
16
|
-
*/
|
|
17
|
-
export class IssueVotesService extends CommonHttpService {
|
|
18
|
-
/**
|
|
19
|
-
* Adds the user's vote to an issue. This is the equivalent of the user clicking
|
|
20
|
-
* *Vote* on an issue in Jira.
|
|
21
|
-
*
|
|
22
|
-
* This operation requires the **Allow users to vote on issues** option to be
|
|
23
|
-
* *ON*. This option is set in General configuration for Jira. See [Configuring
|
|
24
|
-
* Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
25
|
-
*
|
|
26
|
-
* **[Permissions](#permissions) required:**
|
|
27
|
-
*
|
|
28
|
-
* * *Browse projects* [project
|
|
29
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
30
|
-
* issue is in.
|
|
31
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
32
|
-
* configured, issue-level security permission to view the issue.
|
|
33
|
-
*
|
|
34
|
-
* @returns Returned if the request is successful.
|
|
35
|
-
* @path {POST} /rest/api/3/issue/{issueIdOrKey}/votes
|
|
36
|
-
* @scopes-current write:jira-work
|
|
37
|
-
* @scopes-beta write:issue.vote:jira
|
|
38
|
-
*/
|
|
39
|
-
addVote({
|
|
40
|
-
issueIdOrKey,
|
|
41
|
-
}: {
|
|
42
|
-
/** The ID or key of the issue. */
|
|
43
|
-
issueIdOrKey: string;
|
|
44
|
-
}): Promise<void> {
|
|
45
|
-
return this.getClientInstance()
|
|
46
|
-
.request({
|
|
47
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/votes",
|
|
48
|
-
method: "POST",
|
|
49
|
-
pathParams: {
|
|
50
|
-
issueIdOrKey,
|
|
51
|
-
},
|
|
52
|
-
})
|
|
53
|
-
.then(
|
|
54
|
-
this.getClientInstance().responseHandler({
|
|
55
|
-
204: {
|
|
56
|
-
"application/json": "json",
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
)
|
|
60
|
-
.then(
|
|
61
|
-
commonHttpClient.castResponse<{
|
|
62
|
-
status: 204;
|
|
63
|
-
mediaType: "application/json";
|
|
64
|
-
body: void;
|
|
65
|
-
}>(),
|
|
66
|
-
)
|
|
67
|
-
.then(
|
|
68
|
-
validationSchemaStorage.validator("IssueVotesService.addVote.response"),
|
|
69
|
-
)
|
|
70
|
-
.then(commonHttpClient.getBody);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Returns details about the votes on an issue.
|
|
74
|
-
*
|
|
75
|
-
* This operation requires the **Allow users to vote on issues** option to be
|
|
76
|
-
* *ON*. This option is set in General configuration for Jira. See [Configuring
|
|
77
|
-
* Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
78
|
-
*
|
|
79
|
-
* This operation can be accessed anonymously.
|
|
80
|
-
*
|
|
81
|
-
* **[Permissions](#permissions) required:**
|
|
82
|
-
*
|
|
83
|
-
* * *Browse projects* [project
|
|
84
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
85
|
-
* issue is ini
|
|
86
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
87
|
-
* configured, issue-level security permission to view the issue.
|
|
88
|
-
*
|
|
89
|
-
* Note that users with the necessary permissions for this operation but without
|
|
90
|
-
* the *View voters and watchers* project permissions are not returned details in
|
|
91
|
-
* the `voters` field.
|
|
92
|
-
*
|
|
93
|
-
* @returns Returned if the request is successful.
|
|
94
|
-
*
|
|
95
|
-
* example: {
|
|
96
|
-
* "hasVoted": true,
|
|
97
|
-
* "self": "https://your-domain.atlassian.net/rest/api/issue/MKY-1/votes",
|
|
98
|
-
* "voters": [
|
|
99
|
-
* {
|
|
100
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
101
|
-
* "accountType": "atlassian",
|
|
102
|
-
* "active": false,
|
|
103
|
-
* "avatarUrls": {
|
|
104
|
-
* "16x16":
|
|
105
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
106
|
-
* "24x24":
|
|
107
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
108
|
-
* "32x32":
|
|
109
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
110
|
-
* "48x48":
|
|
111
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
112
|
-
* },
|
|
113
|
-
* "displayName": "Mia Krystof",
|
|
114
|
-
* "key": "",
|
|
115
|
-
* "name": "",
|
|
116
|
-
* "self":
|
|
117
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
118
|
-
* }
|
|
119
|
-
* ],
|
|
120
|
-
* "votes": 24
|
|
121
|
-
* }
|
|
122
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/votes
|
|
123
|
-
* @scopes-current read:jira-work
|
|
124
|
-
* @scopes-beta read:issue.vote:jira, read:user:jira, read:application-role:jira,
|
|
125
|
-
* read:avatar:jira, read:group:jira
|
|
126
|
-
*/
|
|
127
|
-
getVotes({
|
|
128
|
-
issueIdOrKey,
|
|
129
|
-
}: {
|
|
130
|
-
/** The ID or key of the issue. */
|
|
131
|
-
issueIdOrKey: string;
|
|
132
|
-
}): Promise<Votes> {
|
|
133
|
-
return this.getClientInstance()
|
|
134
|
-
.request({
|
|
135
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/votes",
|
|
136
|
-
method: "GET",
|
|
137
|
-
pathParams: {
|
|
138
|
-
issueIdOrKey,
|
|
139
|
-
},
|
|
140
|
-
})
|
|
141
|
-
.then(
|
|
142
|
-
this.getClientInstance().responseHandler({
|
|
143
|
-
200: {
|
|
144
|
-
"application/json": "json",
|
|
145
|
-
},
|
|
146
|
-
}),
|
|
147
|
-
)
|
|
148
|
-
.then(
|
|
149
|
-
commonHttpClient.castResponse<{
|
|
150
|
-
status: 200;
|
|
151
|
-
mediaType: "application/json";
|
|
152
|
-
body: Votes;
|
|
153
|
-
}>(),
|
|
154
|
-
)
|
|
155
|
-
.then(
|
|
156
|
-
validationSchemaStorage.validator(
|
|
157
|
-
"IssueVotesService.getVotes.response",
|
|
158
|
-
),
|
|
159
|
-
)
|
|
160
|
-
.then(commonHttpClient.getBody);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Deletes a user's vote from an issue. This is the equivalent of the user
|
|
164
|
-
* clicking *Unvote* on an issue in Jira.
|
|
165
|
-
*
|
|
166
|
-
* This operation requires the **Allow users to vote on issues** option to be
|
|
167
|
-
* *ON*. This option is set in General configuration for Jira. See [Configuring
|
|
168
|
-
* Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
169
|
-
*
|
|
170
|
-
* **[Permissions](#permissions) required:**
|
|
171
|
-
*
|
|
172
|
-
* * *Browse projects* [project
|
|
173
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
174
|
-
* issue is in.
|
|
175
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
176
|
-
* configured, issue-level security permission to view the issue.
|
|
177
|
-
*
|
|
178
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/votes
|
|
179
|
-
* @scopes-current write:jira-work
|
|
180
|
-
* @scopes-beta write:issue.vote:jira
|
|
181
|
-
*/
|
|
182
|
-
removeVote({
|
|
183
|
-
issueIdOrKey,
|
|
184
|
-
}: {
|
|
185
|
-
/** The ID or key of the issue. */
|
|
186
|
-
issueIdOrKey: string;
|
|
187
|
-
}): Promise<void> {
|
|
188
|
-
return this.getClientInstance()
|
|
189
|
-
.request({
|
|
190
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/votes",
|
|
191
|
-
method: "DELETE",
|
|
192
|
-
pathParams: {
|
|
193
|
-
issueIdOrKey,
|
|
194
|
-
},
|
|
195
|
-
})
|
|
196
|
-
.then(commonHttpClient.discardResult);
|
|
197
|
-
}
|
|
198
|
-
static initialize() {
|
|
199
|
-
validationSchemaStorage.registerExtensible(
|
|
200
|
-
"IssueVotesService.getVotes.response",
|
|
201
|
-
z
|
|
202
|
-
.object({
|
|
203
|
-
status: z.literal(200),
|
|
204
|
-
mediaType: z.literal("application/json"),
|
|
205
|
-
body: validationSchemaStorage.lazy("Votes"),
|
|
206
|
-
})
|
|
207
|
-
.describe("IssueVotesService.getVotes.response"),
|
|
208
|
-
);
|
|
209
|
-
validationSchemaStorage.registerExtensible(
|
|
210
|
-
"IssueVotesService.addVote.response",
|
|
211
|
-
z
|
|
212
|
-
.object({
|
|
213
|
-
status: z.literal(204),
|
|
214
|
-
mediaType: z.literal("application/json"),
|
|
215
|
-
body: z.unknown(),
|
|
216
|
-
})
|
|
217
|
-
.describe("IssueVotesService.addVote.response"),
|
|
218
|
-
);
|
|
219
|
-
validationSchemaStorage.registerOnce([registerIssueVotesValidationSchemas]);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
@@ -1,331 +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 BulkIssueIsWatching,
|
|
10
|
-
type IssueList,
|
|
11
|
-
registerIssueWatchersValidationSchemas,
|
|
12
|
-
type Watchers,
|
|
13
|
-
} from "../models/issue-watchers";
|
|
14
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
15
|
-
/**
|
|
16
|
-
* This resource represents users watching an issue. Use it to get details of
|
|
17
|
-
* users watching an issue as well as start and stop a user watching an issue.
|
|
18
|
-
*/
|
|
19
|
-
export class IssueWatchersService extends CommonHttpService {
|
|
20
|
-
/**
|
|
21
|
-
* Adds a user as a watcher of an issue by passing the account ID of the user. For
|
|
22
|
-
* example, `"5b10ac8d82e05b22cc7d4ef5"`. If no user is specified the calling user
|
|
23
|
-
* is added.
|
|
24
|
-
*
|
|
25
|
-
* This operation requires the **Allow users to watch issues** option to be *ON*.
|
|
26
|
-
* This option is set in General configuration for Jira. See [Configuring Jira
|
|
27
|
-
* application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
28
|
-
*
|
|
29
|
-
* **[Permissions](#permissions) required:**
|
|
30
|
-
*
|
|
31
|
-
* * *Browse projects* [project
|
|
32
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
33
|
-
* issue is in.
|
|
34
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
35
|
-
* configured, issue-level security permission to view the issue.
|
|
36
|
-
* * To add users other than themselves to the watchlist, *Manage watcher list*
|
|
37
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
38
|
-
* that the issue is in.
|
|
39
|
-
*
|
|
40
|
-
* @returns Returned if the request is successful.
|
|
41
|
-
* @path {POST} /rest/api/3/issue/{issueIdOrKey}/watchers
|
|
42
|
-
* @scopes-current write:jira-work
|
|
43
|
-
* @scopes-beta write:issue.watcher:jira
|
|
44
|
-
*/
|
|
45
|
-
addWatcher({
|
|
46
|
-
issueIdOrKey,
|
|
47
|
-
requestBody,
|
|
48
|
-
}: {
|
|
49
|
-
/** The ID or key of the issue. */
|
|
50
|
-
issueIdOrKey: string;
|
|
51
|
-
/**
|
|
52
|
-
* The account ID of the user. Note that username cannot be used due to privacy
|
|
53
|
-
* changes.
|
|
54
|
-
*/
|
|
55
|
-
requestBody: string;
|
|
56
|
-
}): Promise<void> {
|
|
57
|
-
return this.getClientInstance()
|
|
58
|
-
.request({
|
|
59
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/watchers",
|
|
60
|
-
method: "POST",
|
|
61
|
-
pathParams: {
|
|
62
|
-
issueIdOrKey,
|
|
63
|
-
},
|
|
64
|
-
headers: {
|
|
65
|
-
"Content-Type": "application/json",
|
|
66
|
-
},
|
|
67
|
-
body: requestBody,
|
|
68
|
-
})
|
|
69
|
-
.then(
|
|
70
|
-
this.getClientInstance().responseHandler({
|
|
71
|
-
204: {
|
|
72
|
-
"application/json": "json",
|
|
73
|
-
},
|
|
74
|
-
}),
|
|
75
|
-
)
|
|
76
|
-
.then(
|
|
77
|
-
commonHttpClient.castResponse<{
|
|
78
|
-
status: 204;
|
|
79
|
-
mediaType: "application/json";
|
|
80
|
-
body: void;
|
|
81
|
-
}>(),
|
|
82
|
-
)
|
|
83
|
-
.then(
|
|
84
|
-
validationSchemaStorage.validator(
|
|
85
|
-
"IssueWatchersService.addWatcher.response",
|
|
86
|
-
),
|
|
87
|
-
)
|
|
88
|
-
.then(commonHttpClient.getBody);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Returns the watchers for an issue.
|
|
92
|
-
*
|
|
93
|
-
* This operation requires the **Allow users to watch issues** option to be *ON*.
|
|
94
|
-
* This option is set in General configuration for Jira. See [Configuring Jira
|
|
95
|
-
* application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
96
|
-
*
|
|
97
|
-
* This operation can be accessed anonymously.
|
|
98
|
-
*
|
|
99
|
-
* **[Permissions](#permissions) required:**
|
|
100
|
-
*
|
|
101
|
-
* * *Browse projects* [project
|
|
102
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
103
|
-
* issue is ini
|
|
104
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
105
|
-
* configured, issue-level security permission to view the issue.
|
|
106
|
-
* * To see details of users on the watchlist other than themselves, *View
|
|
107
|
-
* voters and watchers* [project
|
|
108
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
109
|
-
* issue is in.
|
|
110
|
-
*
|
|
111
|
-
* @returns Returned if the request is successful
|
|
112
|
-
*
|
|
113
|
-
* example: {
|
|
114
|
-
* "isWatching": false,
|
|
115
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issue/EX-1/watchers",
|
|
116
|
-
* "watchCount": 1,
|
|
117
|
-
* "watchers": [
|
|
118
|
-
* {
|
|
119
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
120
|
-
* "active": false,
|
|
121
|
-
* "displayName": "Mia Krystof",
|
|
122
|
-
* "self":
|
|
123
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
124
|
-
* }
|
|
125
|
-
* ]
|
|
126
|
-
* }
|
|
127
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/watchers
|
|
128
|
-
* @scopes-current read:jira-work
|
|
129
|
-
* @scopes-beta read:issue.watcher:jira, read:user:jira, read:avatar:jira
|
|
130
|
-
*/
|
|
131
|
-
getIssueWatchers({
|
|
132
|
-
issueIdOrKey,
|
|
133
|
-
}: {
|
|
134
|
-
/** The ID or key of the issue. */
|
|
135
|
-
issueIdOrKey: string;
|
|
136
|
-
}): Promise<Watchers> {
|
|
137
|
-
return this.getClientInstance()
|
|
138
|
-
.request({
|
|
139
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/watchers",
|
|
140
|
-
method: "GET",
|
|
141
|
-
pathParams: {
|
|
142
|
-
issueIdOrKey,
|
|
143
|
-
},
|
|
144
|
-
})
|
|
145
|
-
.then(
|
|
146
|
-
this.getClientInstance().responseHandler({
|
|
147
|
-
200: {
|
|
148
|
-
"application/json": "json",
|
|
149
|
-
},
|
|
150
|
-
}),
|
|
151
|
-
)
|
|
152
|
-
.then(
|
|
153
|
-
commonHttpClient.castResponse<{
|
|
154
|
-
status: 200;
|
|
155
|
-
mediaType: "application/json";
|
|
156
|
-
body: Watchers;
|
|
157
|
-
}>(),
|
|
158
|
-
)
|
|
159
|
-
.then(
|
|
160
|
-
validationSchemaStorage.validator(
|
|
161
|
-
"IssueWatchersService.getIssueWatchers.response",
|
|
162
|
-
),
|
|
163
|
-
)
|
|
164
|
-
.then(commonHttpClient.getBody);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Returns, for the user, details of the watched status of issues from a list. If
|
|
168
|
-
* an issue ID is invalid, the returned watched status is `false`.
|
|
169
|
-
*
|
|
170
|
-
* This operation requires the **Allow users to watch issues** option to be *ON*.
|
|
171
|
-
* This option is set in General configuration for Jira. See [Configuring Jira
|
|
172
|
-
* application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
173
|
-
*
|
|
174
|
-
* **[Permissions](#permissions) required:**
|
|
175
|
-
*
|
|
176
|
-
* * *Browse projects* [project
|
|
177
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
178
|
-
* issue is in
|
|
179
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
180
|
-
* configured, issue-level security permission to view the issue.
|
|
181
|
-
*
|
|
182
|
-
* @returns Returned if the request is successful
|
|
183
|
-
*
|
|
184
|
-
* example: {
|
|
185
|
-
* "issuesIsWatching": {
|
|
186
|
-
* "10001": true,
|
|
187
|
-
* "10002": false,
|
|
188
|
-
* "10005": true
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
* @path {POST} /rest/api/3/issue/watching
|
|
192
|
-
* @scopes-current read:jira-work
|
|
193
|
-
* @scopes-beta read:issue.watcher:jira, read:user:jira
|
|
194
|
-
*/
|
|
195
|
-
getIsWatchingIssueBulk({
|
|
196
|
-
issueList,
|
|
197
|
-
}: {
|
|
198
|
-
/**
|
|
199
|
-
* A list of issue IDs.
|
|
200
|
-
*
|
|
201
|
-
* @example {
|
|
202
|
-
* "issueIds": [
|
|
203
|
-
* "10001",
|
|
204
|
-
* "10002",
|
|
205
|
-
* "10005"
|
|
206
|
-
* ]
|
|
207
|
-
* }
|
|
208
|
-
*/
|
|
209
|
-
issueList: IssueList;
|
|
210
|
-
}): Promise<BulkIssueIsWatching> {
|
|
211
|
-
return this.getClientInstance()
|
|
212
|
-
.request({
|
|
213
|
-
path: "/rest/api/3/issue/watching",
|
|
214
|
-
method: "POST",
|
|
215
|
-
headers: {
|
|
216
|
-
"Content-Type": "application/json",
|
|
217
|
-
},
|
|
218
|
-
body: issueList,
|
|
219
|
-
})
|
|
220
|
-
.then(
|
|
221
|
-
this.getClientInstance().responseHandler({
|
|
222
|
-
200: {
|
|
223
|
-
"application/json": "json",
|
|
224
|
-
},
|
|
225
|
-
}),
|
|
226
|
-
)
|
|
227
|
-
.then(
|
|
228
|
-
commonHttpClient.castResponse<{
|
|
229
|
-
status: 200;
|
|
230
|
-
mediaType: "application/json";
|
|
231
|
-
body: BulkIssueIsWatching;
|
|
232
|
-
}>(),
|
|
233
|
-
)
|
|
234
|
-
.then(
|
|
235
|
-
validationSchemaStorage.validator(
|
|
236
|
-
"IssueWatchersService.getIsWatchingIssueBulk.response",
|
|
237
|
-
),
|
|
238
|
-
)
|
|
239
|
-
.then(commonHttpClient.getBody);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Deletes a user as a watcher of an issue.
|
|
243
|
-
*
|
|
244
|
-
* This operation requires the **Allow users to watch issues** option to be *ON*.
|
|
245
|
-
* This option is set in General configuration for Jira. See [Configuring Jira
|
|
246
|
-
* application options](https://confluence.atlassian.com/x/uYXKM) for details.
|
|
247
|
-
*
|
|
248
|
-
* **[Permissions](#permissions) required:**
|
|
249
|
-
*
|
|
250
|
-
* * *Browse projects* [project
|
|
251
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
252
|
-
* issue is in.
|
|
253
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
254
|
-
* configured, issue-level security permission to view the issue.
|
|
255
|
-
* * To remove users other than themselves from the watchlist, *Manage watcher
|
|
256
|
-
* list* [project permission](https://confluence.atlassian.com/x/yodKLg) for the
|
|
257
|
-
* project that the issue is in.
|
|
258
|
-
*
|
|
259
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/watchers
|
|
260
|
-
* @scopes-current write:jira-work
|
|
261
|
-
* @scopes-beta write:issue.watcher:jira
|
|
262
|
-
*/
|
|
263
|
-
removeWatcher({
|
|
264
|
-
issueIdOrKey,
|
|
265
|
-
username,
|
|
266
|
-
accountId,
|
|
267
|
-
}: {
|
|
268
|
-
/** The ID or key of the issue. */
|
|
269
|
-
issueIdOrKey: string;
|
|
270
|
-
/**
|
|
271
|
-
* This parameter is no longer available. See the [deprecation
|
|
272
|
-
* notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
|
|
273
|
-
* for details.
|
|
274
|
-
*/
|
|
275
|
-
username?: string;
|
|
276
|
-
/**
|
|
277
|
-
* The account ID of the user, which uniquely identifies the user across all
|
|
278
|
-
* Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Required.
|
|
279
|
-
*/
|
|
280
|
-
accountId?: string;
|
|
281
|
-
}): Promise<void> {
|
|
282
|
-
return this.getClientInstance()
|
|
283
|
-
.request({
|
|
284
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/watchers",
|
|
285
|
-
method: "DELETE",
|
|
286
|
-
pathParams: {
|
|
287
|
-
issueIdOrKey,
|
|
288
|
-
},
|
|
289
|
-
query: {
|
|
290
|
-
username,
|
|
291
|
-
accountId,
|
|
292
|
-
},
|
|
293
|
-
})
|
|
294
|
-
.then(commonHttpClient.discardResult);
|
|
295
|
-
}
|
|
296
|
-
static initialize() {
|
|
297
|
-
validationSchemaStorage.registerExtensible(
|
|
298
|
-
"IssueWatchersService.getIssueWatchers.response",
|
|
299
|
-
z
|
|
300
|
-
.object({
|
|
301
|
-
status: z.literal(200),
|
|
302
|
-
mediaType: z.literal("application/json"),
|
|
303
|
-
body: validationSchemaStorage.lazy("Watchers"),
|
|
304
|
-
})
|
|
305
|
-
.describe("IssueWatchersService.getIssueWatchers.response"),
|
|
306
|
-
);
|
|
307
|
-
validationSchemaStorage.registerExtensible(
|
|
308
|
-
"IssueWatchersService.addWatcher.response",
|
|
309
|
-
z
|
|
310
|
-
.object({
|
|
311
|
-
status: z.literal(204),
|
|
312
|
-
mediaType: z.literal("application/json"),
|
|
313
|
-
body: z.unknown(),
|
|
314
|
-
})
|
|
315
|
-
.describe("IssueWatchersService.addWatcher.response"),
|
|
316
|
-
);
|
|
317
|
-
validationSchemaStorage.registerExtensible(
|
|
318
|
-
"IssueWatchersService.getIsWatchingIssueBulk.response",
|
|
319
|
-
z
|
|
320
|
-
.object({
|
|
321
|
-
status: z.literal(200),
|
|
322
|
-
mediaType: z.literal("application/json"),
|
|
323
|
-
body: validationSchemaStorage.lazy("BulkIssueIsWatching"),
|
|
324
|
-
})
|
|
325
|
-
.describe("IssueWatchersService.getIsWatchingIssueBulk.response"),
|
|
326
|
-
);
|
|
327
|
-
validationSchemaStorage.registerOnce([
|
|
328
|
-
registerIssueWatchersValidationSchemas,
|
|
329
|
-
]);
|
|
330
|
-
}
|
|
331
|
-
}
|