@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,1089 +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 ChangedWorklogs,
|
|
10
|
-
type PageOfWorklogs,
|
|
11
|
-
registerIssueWorklogsValidationSchemas,
|
|
12
|
-
type Worklog,
|
|
13
|
-
type WorklogIdsRequestBean,
|
|
14
|
-
} from "../models/issue-worklogs";
|
|
15
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
16
|
-
/**
|
|
17
|
-
* This resource represents issue worklogs. Use it to:
|
|
18
|
-
*
|
|
19
|
-
* * get, create, update, and delete worklogs.
|
|
20
|
-
* * obtain lists of updated or deleted worklogs.
|
|
21
|
-
*/
|
|
22
|
-
export class IssueWorklogsService extends CommonHttpService {
|
|
23
|
-
/**
|
|
24
|
-
* Adds a worklog to an issue.
|
|
25
|
-
*
|
|
26
|
-
* Time tracking must be enabled in Jira, otherwise this operation returns an
|
|
27
|
-
* error. For more information, see [Configuring time
|
|
28
|
-
* tracking](https://confluence.atlassian.com/x/qoXKM).
|
|
29
|
-
*
|
|
30
|
-
* This operation can be accessed anonymously.
|
|
31
|
-
*
|
|
32
|
-
* **[Permissions](#permissions) required:**
|
|
33
|
-
*
|
|
34
|
-
* * *Browse projects* and *Work on issues* [project
|
|
35
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
36
|
-
* issue 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
|
-
* @path {POST} /rest/api/3/issue/{issueIdOrKey}/worklog
|
|
42
|
-
* @scopes-current write:jira-work
|
|
43
|
-
* @scopes-beta write:issue-worklog:jira, write:issue-worklog.property:jira, read:avatar:jira,
|
|
44
|
-
* read:group:jira, read:issue-worklog:jira, read:project-role:jira,
|
|
45
|
-
* read:user:jira, read:issue-worklog.property:jira
|
|
46
|
-
*/
|
|
47
|
-
addWorklog({
|
|
48
|
-
issueIdOrKey,
|
|
49
|
-
notifyUsers,
|
|
50
|
-
adjustEstimate,
|
|
51
|
-
newEstimate,
|
|
52
|
-
reduceBy,
|
|
53
|
-
expand,
|
|
54
|
-
overrideEditableFlag,
|
|
55
|
-
worklog,
|
|
56
|
-
}: {
|
|
57
|
-
/** The ID or key the issue. */
|
|
58
|
-
issueIdOrKey: string;
|
|
59
|
-
/** Whether users watching the issue are notified by email. */
|
|
60
|
-
notifyUsers?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Defines how to update the issue's time estimate, the options are:
|
|
63
|
-
*
|
|
64
|
-
* * `new` Sets the estimate to a specific value, defined in `newEstimate`.
|
|
65
|
-
* * `leave` Leaves the estimate unchanged.
|
|
66
|
-
* * `manual` Reduces the estimate by amount specified in `reduceBy`.
|
|
67
|
-
* * `auto` Reduces the estimate by the value of `timeSpent` in the worklog.
|
|
68
|
-
*/
|
|
69
|
-
adjustEstimate?: "new" | "leave" | "manual" | "auto";
|
|
70
|
-
/**
|
|
71
|
-
* The value to set as the issue's remaining time estimate, as days (\#d), hours
|
|
72
|
-
* (\#h), or minutes (\#m or \#). For example, *2d*. Required when
|
|
73
|
-
* `adjustEstimate` is `new`.
|
|
74
|
-
*/
|
|
75
|
-
newEstimate?: string;
|
|
76
|
-
/**
|
|
77
|
-
* The amount to reduce the issue's remaining estimate by, as days (\#d), hours
|
|
78
|
-
* (\#h), or minutes (\#m). For example, *2d*. Required when `adjustEstimate` is
|
|
79
|
-
* `manual`.
|
|
80
|
-
*/
|
|
81
|
-
reduceBy?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Use [expand](#expansion) to include additional information about work logs in
|
|
84
|
-
* the response. This parameter accepts `properties`, which returns worklog
|
|
85
|
-
* properties.
|
|
86
|
-
*/
|
|
87
|
-
expand?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Whether the worklog entry should be added to the issue even if the issue is not
|
|
90
|
-
* editable, because jira.issue.editable set to false or missing. For example, the
|
|
91
|
-
* issue is closed. Connect and Forge app users with *Administer Jira* [global
|
|
92
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) can use this flag.
|
|
93
|
-
*/
|
|
94
|
-
overrideEditableFlag?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* @example {
|
|
97
|
-
* "comment": {
|
|
98
|
-
* "content": [
|
|
99
|
-
* {
|
|
100
|
-
* "content": [
|
|
101
|
-
* {
|
|
102
|
-
* "text": "I did some work here.",
|
|
103
|
-
* "type": "text"
|
|
104
|
-
* }
|
|
105
|
-
* ],
|
|
106
|
-
* "type": "paragraph"
|
|
107
|
-
* }
|
|
108
|
-
* ],
|
|
109
|
-
* "type": "doc",
|
|
110
|
-
* "version": 1
|
|
111
|
-
* },
|
|
112
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
113
|
-
* "timeSpentSeconds": 12000,
|
|
114
|
-
* "visibility": {
|
|
115
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
116
|
-
* "type": "group"
|
|
117
|
-
* }
|
|
118
|
-
* }
|
|
119
|
-
*/
|
|
120
|
-
worklog: Worklog;
|
|
121
|
-
}): Promise<Worklog> {
|
|
122
|
-
return this.getClientInstance()
|
|
123
|
-
.request({
|
|
124
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/worklog",
|
|
125
|
-
method: "POST",
|
|
126
|
-
pathParams: {
|
|
127
|
-
issueIdOrKey,
|
|
128
|
-
},
|
|
129
|
-
query: {
|
|
130
|
-
notifyUsers,
|
|
131
|
-
adjustEstimate,
|
|
132
|
-
newEstimate,
|
|
133
|
-
reduceBy,
|
|
134
|
-
expand,
|
|
135
|
-
overrideEditableFlag,
|
|
136
|
-
},
|
|
137
|
-
headers: {
|
|
138
|
-
"Content-Type": "application/json",
|
|
139
|
-
},
|
|
140
|
-
body: worklog,
|
|
141
|
-
})
|
|
142
|
-
.then(
|
|
143
|
-
this.getClientInstance().responseHandler({
|
|
144
|
-
201: {
|
|
145
|
-
"application/json": "json",
|
|
146
|
-
},
|
|
147
|
-
}),
|
|
148
|
-
)
|
|
149
|
-
.then(
|
|
150
|
-
commonHttpClient.castResponse<{
|
|
151
|
-
status: 201;
|
|
152
|
-
mediaType: "application/json";
|
|
153
|
-
body: Worklog;
|
|
154
|
-
}>(),
|
|
155
|
-
)
|
|
156
|
-
.then(
|
|
157
|
-
validationSchemaStorage.validator(
|
|
158
|
-
"IssueWorklogsService.addWorklog.response",
|
|
159
|
-
),
|
|
160
|
-
)
|
|
161
|
-
.then(commonHttpClient.getBody);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Deletes a worklog from an issue.
|
|
165
|
-
*
|
|
166
|
-
* Time tracking must be enabled in Jira, otherwise this operation returns an
|
|
167
|
-
* error. For more information, see [Configuring time
|
|
168
|
-
* tracking](https://confluence.atlassian.com/x/qoXKM).
|
|
169
|
-
*
|
|
170
|
-
* This operation can be accessed anonymously.
|
|
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 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 worklogs*[ project
|
|
180
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog or
|
|
181
|
-
* *Delete own worklogs* to delete worklogs created by the user,
|
|
182
|
-
* * If the worklog has visibility restrictions, belongs to the group or has the
|
|
183
|
-
* role visibility is restricted to.
|
|
184
|
-
*
|
|
185
|
-
* @path {DELETE} /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
|
|
186
|
-
* @scopes-current write:jira-work
|
|
187
|
-
* @scopes-beta delete:issue-worklog:jira, delete:issue-worklog.property:jira,
|
|
188
|
-
* write:issue.time-tracking:jira
|
|
189
|
-
*/
|
|
190
|
-
deleteWorklog({
|
|
191
|
-
issueIdOrKey,
|
|
192
|
-
id,
|
|
193
|
-
notifyUsers,
|
|
194
|
-
adjustEstimate,
|
|
195
|
-
newEstimate,
|
|
196
|
-
increaseBy,
|
|
197
|
-
overrideEditableFlag,
|
|
198
|
-
}: {
|
|
199
|
-
/** The ID or key of the issue. */
|
|
200
|
-
issueIdOrKey: string;
|
|
201
|
-
/** The ID of the worklog. */
|
|
202
|
-
id: string;
|
|
203
|
-
/** Whether users watching the issue are notified by email. */
|
|
204
|
-
notifyUsers?: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* Defines how to update the issue's time estimate, the options are:
|
|
207
|
-
*
|
|
208
|
-
* * `new` Sets the estimate to a specific value, defined in `newEstimate`.
|
|
209
|
-
* * `leave` Leaves the estimate unchanged.
|
|
210
|
-
* * `manual` Increases the estimate by amount specified in `increaseBy`.
|
|
211
|
-
* * `auto` Reduces the estimate by the value of `timeSpent` in the worklog.
|
|
212
|
-
*/
|
|
213
|
-
adjustEstimate?: "new" | "leave" | "manual" | "auto";
|
|
214
|
-
/**
|
|
215
|
-
* The value to set as the issue's remaining time estimate, as days (\#d), hours
|
|
216
|
-
* (\#h), or minutes (\#m or \#). For example, *2d*. Required when
|
|
217
|
-
* `adjustEstimate` is `new`.
|
|
218
|
-
*/
|
|
219
|
-
newEstimate?: string;
|
|
220
|
-
/**
|
|
221
|
-
* The amount to increase the issue's remaining estimate by, as days (\#d), hours
|
|
222
|
-
* (\#h), or minutes (\#m or \#). For example, *2d*. Required when
|
|
223
|
-
* `adjustEstimate` is `manual`.
|
|
224
|
-
*/
|
|
225
|
-
increaseBy?: string;
|
|
226
|
-
/**
|
|
227
|
-
* Whether the work log entry should be added to the issue even if the issue is
|
|
228
|
-
* not editable, because jira.issue.editable set to false or missing. For example,
|
|
229
|
-
* the issue is closed. Connect and Forge app users with admin permission can use
|
|
230
|
-
* this flag.
|
|
231
|
-
*/
|
|
232
|
-
overrideEditableFlag?: boolean;
|
|
233
|
-
}): Promise<void> {
|
|
234
|
-
return this.getClientInstance()
|
|
235
|
-
.request({
|
|
236
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/worklog/{id}",
|
|
237
|
-
method: "DELETE",
|
|
238
|
-
pathParams: {
|
|
239
|
-
issueIdOrKey,
|
|
240
|
-
id,
|
|
241
|
-
},
|
|
242
|
-
query: {
|
|
243
|
-
notifyUsers,
|
|
244
|
-
adjustEstimate,
|
|
245
|
-
newEstimate,
|
|
246
|
-
increaseBy,
|
|
247
|
-
overrideEditableFlag,
|
|
248
|
-
},
|
|
249
|
-
})
|
|
250
|
-
.then(commonHttpClient.discardResult);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Returns a list of IDs and delete timestamps for worklogs deleted after a date
|
|
254
|
-
* and time.
|
|
255
|
-
*
|
|
256
|
-
* This resource is paginated, with a limit of 1000 worklogs per page. Each page
|
|
257
|
-
* lists worklogs from oldest to youngest. If the number of items in the date
|
|
258
|
-
* range exceeds 1000, `until` indicates the timestamp of the youngest item on the
|
|
259
|
-
* page. Also, `nextPage` provides the URL for the next page of worklogs. The
|
|
260
|
-
* `lastPage` parameter is set to true on the last page of worklogs.
|
|
261
|
-
*
|
|
262
|
-
* This resource does not return worklogs deleted during the minute preceding the
|
|
263
|
-
* request.
|
|
264
|
-
*
|
|
265
|
-
* **[Permissions](#permissions) required:** Permission to access Jira.
|
|
266
|
-
*
|
|
267
|
-
* @returns Returned if the request is successful.
|
|
268
|
-
*
|
|
269
|
-
* example: {
|
|
270
|
-
* "lastPage": true,
|
|
271
|
-
* "nextPage":
|
|
272
|
-
* "https://your-domain.atlassian.net/api/~ver~/worklog/deleted?since=1438013693136",
|
|
273
|
-
* "self":
|
|
274
|
-
* "https://your-domain.atlassian.net/api/~ver~/worklog/deleted?since=1438013671562",
|
|
275
|
-
* "since": 1438013671562,
|
|
276
|
-
* "until": 1438013693136,
|
|
277
|
-
* "values": [
|
|
278
|
-
* {
|
|
279
|
-
* "properties": [],
|
|
280
|
-
* "updatedTime": 1438013671562,
|
|
281
|
-
* "worklogId": 103
|
|
282
|
-
* },
|
|
283
|
-
* {
|
|
284
|
-
* "properties": [],
|
|
285
|
-
* "updatedTime": 1438013672165,
|
|
286
|
-
* "worklogId": 104
|
|
287
|
-
* },
|
|
288
|
-
* {
|
|
289
|
-
* "properties": [],
|
|
290
|
-
* "updatedTime": 1438013693136,
|
|
291
|
-
* "worklogId": 105
|
|
292
|
-
* }
|
|
293
|
-
* ]
|
|
294
|
-
* }
|
|
295
|
-
* @path {GET} /rest/api/3/worklog/deleted
|
|
296
|
-
* @scopes-current read:jira-work
|
|
297
|
-
* @scopes-beta read:issue-worklog:jira, read:issue-worklog.property:jira
|
|
298
|
-
*/
|
|
299
|
-
getIdsOfWorklogsDeletedSince({
|
|
300
|
-
since,
|
|
301
|
-
}: {
|
|
302
|
-
/**
|
|
303
|
-
* The date and time, as a UNIX timestamp in milliseconds, after which deleted
|
|
304
|
-
* worklogs are returned.
|
|
305
|
-
*/
|
|
306
|
-
since?: number;
|
|
307
|
-
}): Promise<ChangedWorklogs> {
|
|
308
|
-
return this.getClientInstance()
|
|
309
|
-
.request({
|
|
310
|
-
path: "/rest/api/3/worklog/deleted",
|
|
311
|
-
method: "GET",
|
|
312
|
-
query: {
|
|
313
|
-
since,
|
|
314
|
-
},
|
|
315
|
-
})
|
|
316
|
-
.then(
|
|
317
|
-
this.getClientInstance().responseHandler({
|
|
318
|
-
200: {
|
|
319
|
-
"application/json": "json",
|
|
320
|
-
},
|
|
321
|
-
}),
|
|
322
|
-
)
|
|
323
|
-
.then(
|
|
324
|
-
commonHttpClient.castResponse<{
|
|
325
|
-
status: 200;
|
|
326
|
-
mediaType: "application/json";
|
|
327
|
-
body: ChangedWorklogs;
|
|
328
|
-
}>(),
|
|
329
|
-
)
|
|
330
|
-
.then(
|
|
331
|
-
validationSchemaStorage.validator(
|
|
332
|
-
"IssueWorklogsService.getIdsOfWorklogsDeletedSince.response",
|
|
333
|
-
),
|
|
334
|
-
)
|
|
335
|
-
.then(commonHttpClient.getBody);
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Returns a list of IDs and update timestamps for worklogs updated after a date
|
|
339
|
-
* and time.
|
|
340
|
-
*
|
|
341
|
-
* This resource is paginated, with a limit of 1000 worklogs per page. Each page
|
|
342
|
-
* lists worklogs from oldest to youngest. If the number of items in the date
|
|
343
|
-
* range exceeds 1000, `until` indicates the timestamp of the youngest item on the
|
|
344
|
-
* page. Also, `nextPage` provides the URL for the next page of worklogs. The
|
|
345
|
-
* `lastPage` parameter is set to true on the last page of worklogs.
|
|
346
|
-
*
|
|
347
|
-
* This resource does not return worklogs updated during the minute preceding the
|
|
348
|
-
* request.
|
|
349
|
-
*
|
|
350
|
-
* **[Permissions](#permissions) required:** Permission to access Jira, however,
|
|
351
|
-
* worklogs are only returned where either of the following is true:
|
|
352
|
-
*
|
|
353
|
-
* * the worklog is set as *Viewable by All Users*.
|
|
354
|
-
* * the user is a member of a project role or group with permission to view the
|
|
355
|
-
* worklog.
|
|
356
|
-
*
|
|
357
|
-
* @returns Returned if the request is successful.
|
|
358
|
-
*
|
|
359
|
-
* example: {
|
|
360
|
-
* "lastPage": true,
|
|
361
|
-
* "nextPage":
|
|
362
|
-
* "https://your-domain.atlassian.net/api/~ver~/worklog/updated?since=1438013693136",
|
|
363
|
-
* "self":
|
|
364
|
-
* "https://your-domain.atlassian.net/api/~ver~/worklog/updated?since=1438013671562",
|
|
365
|
-
* "since": 1438013671562,
|
|
366
|
-
* "until": 1438013693136,
|
|
367
|
-
* "values": [
|
|
368
|
-
* {
|
|
369
|
-
* "properties": [],
|
|
370
|
-
* "updatedTime": 1438013671562,
|
|
371
|
-
* "worklogId": 103
|
|
372
|
-
* },
|
|
373
|
-
* {
|
|
374
|
-
* "properties": [],
|
|
375
|
-
* "updatedTime": 1438013672165,
|
|
376
|
-
* "worklogId": 104
|
|
377
|
-
* },
|
|
378
|
-
* {
|
|
379
|
-
* "properties": [],
|
|
380
|
-
* "updatedTime": 1438013693136,
|
|
381
|
-
* "worklogId": 105
|
|
382
|
-
* }
|
|
383
|
-
* ]
|
|
384
|
-
* }
|
|
385
|
-
* @path {GET} /rest/api/3/worklog/updated
|
|
386
|
-
* @scopes-current read:jira-work
|
|
387
|
-
* @scopes-beta read:issue-worklog:jira, read:issue-worklog.property:jira
|
|
388
|
-
*/
|
|
389
|
-
getIdsOfWorklogsModifiedSince({
|
|
390
|
-
since,
|
|
391
|
-
expand,
|
|
392
|
-
}: {
|
|
393
|
-
/**
|
|
394
|
-
* The date and time, as a UNIX timestamp in milliseconds, after which updated
|
|
395
|
-
* worklogs are returned.
|
|
396
|
-
*/
|
|
397
|
-
since?: number;
|
|
398
|
-
/**
|
|
399
|
-
* Use [expand](#expansion) to include additional information about worklogs in
|
|
400
|
-
* the response. This parameter accepts `properties` that returns the properties
|
|
401
|
-
* of each worklog.
|
|
402
|
-
*/
|
|
403
|
-
expand?: string;
|
|
404
|
-
}): Promise<ChangedWorklogs> {
|
|
405
|
-
return this.getClientInstance()
|
|
406
|
-
.request({
|
|
407
|
-
path: "/rest/api/3/worklog/updated",
|
|
408
|
-
method: "GET",
|
|
409
|
-
query: {
|
|
410
|
-
since,
|
|
411
|
-
expand,
|
|
412
|
-
},
|
|
413
|
-
})
|
|
414
|
-
.then(
|
|
415
|
-
this.getClientInstance().responseHandler({
|
|
416
|
-
200: {
|
|
417
|
-
"application/json": "json",
|
|
418
|
-
},
|
|
419
|
-
}),
|
|
420
|
-
)
|
|
421
|
-
.then(
|
|
422
|
-
commonHttpClient.castResponse<{
|
|
423
|
-
status: 200;
|
|
424
|
-
mediaType: "application/json";
|
|
425
|
-
body: ChangedWorklogs;
|
|
426
|
-
}>(),
|
|
427
|
-
)
|
|
428
|
-
.then(
|
|
429
|
-
validationSchemaStorage.validator(
|
|
430
|
-
"IssueWorklogsService.getIdsOfWorklogsModifiedSince.response",
|
|
431
|
-
),
|
|
432
|
-
)
|
|
433
|
-
.then(commonHttpClient.getBody);
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Returns worklogs for an issue, starting from the oldest worklog or from the
|
|
437
|
-
* worklog started on or after a date and time.
|
|
438
|
-
*
|
|
439
|
-
* Time tracking must be enabled in Jira, otherwise this operation returns an
|
|
440
|
-
* error. For more information, see [Configuring time
|
|
441
|
-
* tracking](https://confluence.atlassian.com/x/qoXKM).
|
|
442
|
-
*
|
|
443
|
-
* This operation can be accessed anonymously.
|
|
444
|
-
*
|
|
445
|
-
* **[Permissions](#permissions) required:** Workloads are only returned where the
|
|
446
|
-
* user has:
|
|
447
|
-
*
|
|
448
|
-
* * *Browse projects* [project
|
|
449
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
450
|
-
* issue is in.
|
|
451
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
452
|
-
* configured, issue-level security permission to view the issue.
|
|
453
|
-
* * If the worklog has visibility restrictions, belongs to the group or has the
|
|
454
|
-
* role visibility is restricted to.
|
|
455
|
-
*
|
|
456
|
-
* @returns Returned if the request is successful
|
|
457
|
-
*
|
|
458
|
-
* example: {
|
|
459
|
-
* "maxResults": 1,
|
|
460
|
-
* "startAt": 0,
|
|
461
|
-
* "total": 1,
|
|
462
|
-
* "worklogs": [
|
|
463
|
-
* {
|
|
464
|
-
* "author": {
|
|
465
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
466
|
-
* "active": false,
|
|
467
|
-
* "displayName": "Mia Krystof",
|
|
468
|
-
* "self":
|
|
469
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
470
|
-
* },
|
|
471
|
-
* "comment": {
|
|
472
|
-
* "type": "doc",
|
|
473
|
-
* "version": 1,
|
|
474
|
-
* "content": [
|
|
475
|
-
* {
|
|
476
|
-
* "type": "paragraph",
|
|
477
|
-
* "content": [
|
|
478
|
-
* {
|
|
479
|
-
* "type": "text",
|
|
480
|
-
* "text": "I did some work here."
|
|
481
|
-
* }
|
|
482
|
-
* ]
|
|
483
|
-
* }
|
|
484
|
-
* ]
|
|
485
|
-
* },
|
|
486
|
-
* "id": "100028",
|
|
487
|
-
* "issueId": "10002",
|
|
488
|
-
* "self":
|
|
489
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
490
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
491
|
-
* "timeSpent": "3h 20m",
|
|
492
|
-
* "timeSpentSeconds": 12000,
|
|
493
|
-
* "updateAuthor": {
|
|
494
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
495
|
-
* "active": false,
|
|
496
|
-
* "displayName": "Mia Krystof",
|
|
497
|
-
* "self":
|
|
498
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
499
|
-
* },
|
|
500
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
501
|
-
* "visibility": {
|
|
502
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
503
|
-
* "type": "group",
|
|
504
|
-
* "value": "jira-developers"
|
|
505
|
-
* }
|
|
506
|
-
* }
|
|
507
|
-
* ]
|
|
508
|
-
* }
|
|
509
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/worklog
|
|
510
|
-
* @scopes-current read:jira-work
|
|
511
|
-
* @scopes-beta read:group:jira, read:issue-worklog:jira, read:issue-worklog.property:jira,
|
|
512
|
-
* read:project-role:jira, read:user:jira, read:avatar:jira
|
|
513
|
-
*/
|
|
514
|
-
getIssueWorklog({
|
|
515
|
-
issueIdOrKey,
|
|
516
|
-
startAt,
|
|
517
|
-
maxResults,
|
|
518
|
-
startedAfter,
|
|
519
|
-
startedBefore,
|
|
520
|
-
expand,
|
|
521
|
-
}: {
|
|
522
|
-
/** The ID or key of the issue. */
|
|
523
|
-
issueIdOrKey: string;
|
|
524
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
525
|
-
startAt?: number;
|
|
526
|
-
/** The maximum number of items to return per page. */
|
|
527
|
-
maxResults?: number;
|
|
528
|
-
/**
|
|
529
|
-
* The worklog start date and time, as a UNIX timestamp in milliseconds, after
|
|
530
|
-
* which worklogs are returned.
|
|
531
|
-
*/
|
|
532
|
-
startedAfter?: number;
|
|
533
|
-
/**
|
|
534
|
-
* The worklog start date and time, as a UNIX timestamp in milliseconds, before
|
|
535
|
-
* which worklogs are returned.
|
|
536
|
-
*/
|
|
537
|
-
startedBefore?: number;
|
|
538
|
-
/**
|
|
539
|
-
* Use [expand](#expansion) to include additional information about worklogs in
|
|
540
|
-
* the response. This parameter accepts`properties`, which returns worklog
|
|
541
|
-
* properties.
|
|
542
|
-
*/
|
|
543
|
-
expand?: string;
|
|
544
|
-
}): Promise<PageOfWorklogs> {
|
|
545
|
-
return this.getClientInstance()
|
|
546
|
-
.request({
|
|
547
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/worklog",
|
|
548
|
-
method: "GET",
|
|
549
|
-
pathParams: {
|
|
550
|
-
issueIdOrKey,
|
|
551
|
-
},
|
|
552
|
-
query: {
|
|
553
|
-
startAt,
|
|
554
|
-
maxResults,
|
|
555
|
-
startedAfter,
|
|
556
|
-
startedBefore,
|
|
557
|
-
expand,
|
|
558
|
-
},
|
|
559
|
-
})
|
|
560
|
-
.then(
|
|
561
|
-
this.getClientInstance().responseHandler({
|
|
562
|
-
200: {
|
|
563
|
-
"application/json": "json",
|
|
564
|
-
},
|
|
565
|
-
}),
|
|
566
|
-
)
|
|
567
|
-
.then(
|
|
568
|
-
commonHttpClient.castResponse<{
|
|
569
|
-
status: 200;
|
|
570
|
-
mediaType: "application/json";
|
|
571
|
-
body: PageOfWorklogs;
|
|
572
|
-
}>(),
|
|
573
|
-
)
|
|
574
|
-
.then(
|
|
575
|
-
validationSchemaStorage.validator(
|
|
576
|
-
"IssueWorklogsService.getIssueWorklog.response",
|
|
577
|
-
),
|
|
578
|
-
)
|
|
579
|
-
.then(commonHttpClient.getBody);
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* Returns a worklog.
|
|
583
|
-
*
|
|
584
|
-
* Time tracking must be enabled in Jira, otherwise this operation returns an
|
|
585
|
-
* error. For more information, see [Configuring time
|
|
586
|
-
* tracking](https://confluence.atlassian.com/x/qoXKM).
|
|
587
|
-
*
|
|
588
|
-
* This operation can be accessed anonymously.
|
|
589
|
-
*
|
|
590
|
-
* **[Permissions](#permissions) required:**
|
|
591
|
-
*
|
|
592
|
-
* * *Browse projects* [project
|
|
593
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
594
|
-
* issue is in.
|
|
595
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
596
|
-
* configured, issue-level security permission to view the issue.
|
|
597
|
-
* * If the worklog has visibility restrictions, belongs to the group or has the
|
|
598
|
-
* role visibility is restricted to.
|
|
599
|
-
*
|
|
600
|
-
* @returns Returned if the request is successful.
|
|
601
|
-
*
|
|
602
|
-
* example: {
|
|
603
|
-
* "author": {
|
|
604
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
605
|
-
* "active": false,
|
|
606
|
-
* "displayName": "Mia Krystof",
|
|
607
|
-
* "self":
|
|
608
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
609
|
-
* },
|
|
610
|
-
* "comment": {
|
|
611
|
-
* "type": "doc",
|
|
612
|
-
* "version": 1,
|
|
613
|
-
* "content": [
|
|
614
|
-
* {
|
|
615
|
-
* "type": "paragraph",
|
|
616
|
-
* "content": [
|
|
617
|
-
* {
|
|
618
|
-
* "type": "text",
|
|
619
|
-
* "text": "I did some work here."
|
|
620
|
-
* }
|
|
621
|
-
* ]
|
|
622
|
-
* }
|
|
623
|
-
* ]
|
|
624
|
-
* },
|
|
625
|
-
* "id": "100028",
|
|
626
|
-
* "issueId": "10002",
|
|
627
|
-
* "self":
|
|
628
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
629
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
630
|
-
* "timeSpent": "3h 20m",
|
|
631
|
-
* "timeSpentSeconds": 12000,
|
|
632
|
-
* "updateAuthor": {
|
|
633
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
634
|
-
* "active": false,
|
|
635
|
-
* "displayName": "Mia Krystof",
|
|
636
|
-
* "self":
|
|
637
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
638
|
-
* },
|
|
639
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
640
|
-
* "visibility": {
|
|
641
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
642
|
-
* "type": "group",
|
|
643
|
-
* "value": "jira-developers"
|
|
644
|
-
* }
|
|
645
|
-
* }
|
|
646
|
-
* @path {GET} /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
|
|
647
|
-
* @scopes-current read:jira-work
|
|
648
|
-
* @scopes-beta read:comment:jira, read:group:jira, read:issue-worklog:jira,
|
|
649
|
-
* read:issue-worklog.property:jira, read:project-role:jira, read:user:jira,
|
|
650
|
-
* read:avatar:jira
|
|
651
|
-
*/
|
|
652
|
-
getWorklog({
|
|
653
|
-
issueIdOrKey,
|
|
654
|
-
id,
|
|
655
|
-
expand,
|
|
656
|
-
}: {
|
|
657
|
-
/** The ID or key of the issue. */
|
|
658
|
-
issueIdOrKey: string;
|
|
659
|
-
/** The ID of the worklog. */
|
|
660
|
-
id: string;
|
|
661
|
-
/**
|
|
662
|
-
* Use [expand](#expansion) to include additional information about work logs in
|
|
663
|
-
* the response. This parameter accepts
|
|
664
|
-
*
|
|
665
|
-
* `properties`, which returns worklog properties.
|
|
666
|
-
*/
|
|
667
|
-
expand?: string;
|
|
668
|
-
}): Promise<Worklog> {
|
|
669
|
-
return this.getClientInstance()
|
|
670
|
-
.request({
|
|
671
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/worklog/{id}",
|
|
672
|
-
method: "GET",
|
|
673
|
-
pathParams: {
|
|
674
|
-
issueIdOrKey,
|
|
675
|
-
id,
|
|
676
|
-
},
|
|
677
|
-
query: {
|
|
678
|
-
expand,
|
|
679
|
-
},
|
|
680
|
-
})
|
|
681
|
-
.then(
|
|
682
|
-
this.getClientInstance().responseHandler({
|
|
683
|
-
200: {
|
|
684
|
-
"application/json": "json",
|
|
685
|
-
},
|
|
686
|
-
}),
|
|
687
|
-
)
|
|
688
|
-
.then(
|
|
689
|
-
commonHttpClient.castResponse<{
|
|
690
|
-
status: 200;
|
|
691
|
-
mediaType: "application/json";
|
|
692
|
-
body: Worklog;
|
|
693
|
-
}>(),
|
|
694
|
-
)
|
|
695
|
-
.then(
|
|
696
|
-
validationSchemaStorage.validator(
|
|
697
|
-
"IssueWorklogsService.getWorklog.response",
|
|
698
|
-
),
|
|
699
|
-
)
|
|
700
|
-
.then(commonHttpClient.getBody);
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* Returns worklog details for a list of worklog IDs.
|
|
704
|
-
*
|
|
705
|
-
* The returned list of worklogs is limited to 1000 items.
|
|
706
|
-
*
|
|
707
|
-
* **[Permissions](#permissions) required:** Permission to access Jira, however,
|
|
708
|
-
* worklogs are only returned where either of the following is true:
|
|
709
|
-
*
|
|
710
|
-
* * the worklog is set as *Viewable by All Users*.
|
|
711
|
-
* * the user is a member of a project role or group with permission to view the
|
|
712
|
-
* worklog.
|
|
713
|
-
*
|
|
714
|
-
* @returns Returned if the request is successful.
|
|
715
|
-
*
|
|
716
|
-
* example: [
|
|
717
|
-
* {
|
|
718
|
-
* "author": {
|
|
719
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
720
|
-
* "active": false,
|
|
721
|
-
* "displayName": "Mia Krystof",
|
|
722
|
-
* "self":
|
|
723
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
724
|
-
* },
|
|
725
|
-
* "comment": {
|
|
726
|
-
* "type": "doc",
|
|
727
|
-
* "version": 1,
|
|
728
|
-
* "content": [
|
|
729
|
-
* {
|
|
730
|
-
* "type": "paragraph",
|
|
731
|
-
* "content": [
|
|
732
|
-
* {
|
|
733
|
-
* "type": "text",
|
|
734
|
-
* "text": "I did some work here."
|
|
735
|
-
* }
|
|
736
|
-
* ]
|
|
737
|
-
* }
|
|
738
|
-
* ]
|
|
739
|
-
* },
|
|
740
|
-
* "id": "100028",
|
|
741
|
-
* "issueId": "10002",
|
|
742
|
-
* "self":
|
|
743
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
744
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
745
|
-
* "timeSpent": "3h 20m",
|
|
746
|
-
* "timeSpentSeconds": 12000,
|
|
747
|
-
* "updateAuthor": {
|
|
748
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
749
|
-
* "active": false,
|
|
750
|
-
* "displayName": "Mia Krystof",
|
|
751
|
-
* "self":
|
|
752
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
753
|
-
* },
|
|
754
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
755
|
-
* "visibility": {
|
|
756
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
757
|
-
* "type": "group",
|
|
758
|
-
* "value": "jira-developers"
|
|
759
|
-
* }
|
|
760
|
-
* }
|
|
761
|
-
* ]
|
|
762
|
-
* @path {POST} /rest/api/3/worklog/list
|
|
763
|
-
* @scopes-current read:jira-work
|
|
764
|
-
* @scopes-beta read:comment:jira, read:group:jira, read:issue-worklog:jira,
|
|
765
|
-
* read:issue-worklog.property:jira, read:project-role:jira, read:user:jira,
|
|
766
|
-
* read:avatar:jira
|
|
767
|
-
*/
|
|
768
|
-
getWorklogsForIds({
|
|
769
|
-
expand,
|
|
770
|
-
worklogIdsRequestBean,
|
|
771
|
-
}: {
|
|
772
|
-
/**
|
|
773
|
-
* Use [expand](#expansion) to include additional information about worklogs in
|
|
774
|
-
* the response. This parameter accepts `properties` that returns the properties
|
|
775
|
-
* of each worklog.
|
|
776
|
-
*/
|
|
777
|
-
expand?: string;
|
|
778
|
-
/**
|
|
779
|
-
* A JSON object containing a list of worklog IDs.
|
|
780
|
-
*
|
|
781
|
-
* @example {
|
|
782
|
-
* "ids": [
|
|
783
|
-
* 1,
|
|
784
|
-
* 2,
|
|
785
|
-
* 5,
|
|
786
|
-
* 10
|
|
787
|
-
* ]
|
|
788
|
-
* }
|
|
789
|
-
*/
|
|
790
|
-
worklogIdsRequestBean: WorklogIdsRequestBean;
|
|
791
|
-
}): Promise<Worklog[]> {
|
|
792
|
-
return this.getClientInstance()
|
|
793
|
-
.request({
|
|
794
|
-
path: "/rest/api/3/worklog/list",
|
|
795
|
-
method: "POST",
|
|
796
|
-
query: {
|
|
797
|
-
expand,
|
|
798
|
-
},
|
|
799
|
-
headers: {
|
|
800
|
-
"Content-Type": "application/json",
|
|
801
|
-
},
|
|
802
|
-
body: worklogIdsRequestBean,
|
|
803
|
-
})
|
|
804
|
-
.then(
|
|
805
|
-
this.getClientInstance().responseHandler({
|
|
806
|
-
200: {
|
|
807
|
-
"application/json": "json",
|
|
808
|
-
},
|
|
809
|
-
}),
|
|
810
|
-
)
|
|
811
|
-
.then(
|
|
812
|
-
commonHttpClient.castResponse<{
|
|
813
|
-
status: 200;
|
|
814
|
-
mediaType: "application/json";
|
|
815
|
-
body: Worklog[];
|
|
816
|
-
}>(),
|
|
817
|
-
)
|
|
818
|
-
.then(
|
|
819
|
-
validationSchemaStorage.validator(
|
|
820
|
-
"IssueWorklogsService.getWorklogsForIds.response",
|
|
821
|
-
),
|
|
822
|
-
)
|
|
823
|
-
.then(commonHttpClient.getBody);
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Updates a worklog.
|
|
827
|
-
*
|
|
828
|
-
* Time tracking must be enabled in Jira, otherwise this operation returns an
|
|
829
|
-
* error. For more information, see [Configuring time
|
|
830
|
-
* tracking](https://confluence.atlassian.com/x/qoXKM).
|
|
831
|
-
*
|
|
832
|
-
* This operation can be accessed anonymously.
|
|
833
|
-
*
|
|
834
|
-
* **[Permissions](#permissions) required:**
|
|
835
|
-
*
|
|
836
|
-
* * *Browse projects* [project
|
|
837
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project that the
|
|
838
|
-
* issue is in.
|
|
839
|
-
* * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is
|
|
840
|
-
* configured, issue-level security permission to view the issue.
|
|
841
|
-
* * *Edit all worklogs*[ project
|
|
842
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) to update any worklog or
|
|
843
|
-
* *Edit own worklogs* to update worklogs created by the user.
|
|
844
|
-
* * If the worklog has visibility restrictions, belongs to the group or has the
|
|
845
|
-
* role visibility is restricted to.
|
|
846
|
-
*
|
|
847
|
-
* @returns Returned if the request is successful
|
|
848
|
-
*
|
|
849
|
-
* example: {
|
|
850
|
-
* "author": {
|
|
851
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
852
|
-
* "active": false,
|
|
853
|
-
* "displayName": "Mia Krystof",
|
|
854
|
-
* "self":
|
|
855
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
856
|
-
* },
|
|
857
|
-
* "comment": {
|
|
858
|
-
* "type": "doc",
|
|
859
|
-
* "version": 1,
|
|
860
|
-
* "content": [
|
|
861
|
-
* {
|
|
862
|
-
* "type": "paragraph",
|
|
863
|
-
* "content": [
|
|
864
|
-
* {
|
|
865
|
-
* "type": "text",
|
|
866
|
-
* "text": "I did some work here."
|
|
867
|
-
* }
|
|
868
|
-
* ]
|
|
869
|
-
* }
|
|
870
|
-
* ]
|
|
871
|
-
* },
|
|
872
|
-
* "id": "100028",
|
|
873
|
-
* "issueId": "10002",
|
|
874
|
-
* "self":
|
|
875
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/10010/worklog/10000",
|
|
876
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
877
|
-
* "timeSpent": "3h 20m",
|
|
878
|
-
* "timeSpentSeconds": 12000,
|
|
879
|
-
* "updateAuthor": {
|
|
880
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
881
|
-
* "active": false,
|
|
882
|
-
* "displayName": "Mia Krystof",
|
|
883
|
-
* "self":
|
|
884
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
885
|
-
* },
|
|
886
|
-
* "updated": "2021-01-18T23:45:00.000+0000",
|
|
887
|
-
* "visibility": {
|
|
888
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
889
|
-
* "type": "group",
|
|
890
|
-
* "value": "jira-developers"
|
|
891
|
-
* }
|
|
892
|
-
* }
|
|
893
|
-
* @path {PUT} /rest/api/3/issue/{issueIdOrKey}/worklog/{id}
|
|
894
|
-
* @scopes-current write:jira-work
|
|
895
|
-
* @scopes-beta read:comment:jira, read:group:jira, read:issue-worklog:jira,
|
|
896
|
-
* read:issue-worklog.property:jira, read:project-role:jira, read:user:jira,
|
|
897
|
-
* write:comment:jira, write:issue-worklog:jira,
|
|
898
|
-
* write:issue-worklog.property:jira, read:avatar:jira
|
|
899
|
-
*/
|
|
900
|
-
updateWorklog({
|
|
901
|
-
issueIdOrKey,
|
|
902
|
-
id,
|
|
903
|
-
notifyUsers,
|
|
904
|
-
adjustEstimate,
|
|
905
|
-
newEstimate,
|
|
906
|
-
expand,
|
|
907
|
-
overrideEditableFlag,
|
|
908
|
-
worklog,
|
|
909
|
-
}: {
|
|
910
|
-
/** The ID or key the issue. */
|
|
911
|
-
issueIdOrKey: string;
|
|
912
|
-
/** The ID of the worklog. */
|
|
913
|
-
id: string;
|
|
914
|
-
/** Whether users watching the issue are notified by email. */
|
|
915
|
-
notifyUsers?: boolean;
|
|
916
|
-
/**
|
|
917
|
-
* Defines how to update the issue's time estimate, the options are:
|
|
918
|
-
*
|
|
919
|
-
* * `new` Sets the estimate to a specific value, defined in `newEstimate`.
|
|
920
|
-
* * `leave` Leaves the estimate unchanged.
|
|
921
|
-
* * `auto` Updates the estimate by the difference between the original and
|
|
922
|
-
* updated value of `timeSpent` or `timeSpentSeconds`.
|
|
923
|
-
*/
|
|
924
|
-
adjustEstimate?: "new" | "leave" | "manual" | "auto";
|
|
925
|
-
/**
|
|
926
|
-
* The value to set as the issue's remaining time estimate, as days (\#d), hours
|
|
927
|
-
* (\#h), or minutes (\#m or \#). For example, *2d*. Required when
|
|
928
|
-
* `adjustEstimate` is `new`.
|
|
929
|
-
*/
|
|
930
|
-
newEstimate?: string;
|
|
931
|
-
/**
|
|
932
|
-
* Use [expand](#expansion) to include additional information about worklogs in
|
|
933
|
-
* the response. This parameter accepts `properties`, which returns worklog
|
|
934
|
-
* properties.
|
|
935
|
-
*/
|
|
936
|
-
expand?: string;
|
|
937
|
-
/**
|
|
938
|
-
* Whether the worklog should be added to the issue even if the issue is not
|
|
939
|
-
* editable. For example, because the issue is closed. Connect and Forge app users
|
|
940
|
-
* with *Administer Jira* [global
|
|
941
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) can use this flag.
|
|
942
|
-
*/
|
|
943
|
-
overrideEditableFlag?: boolean;
|
|
944
|
-
/**
|
|
945
|
-
* @example {
|
|
946
|
-
* "comment": {
|
|
947
|
-
* "content": [
|
|
948
|
-
* {
|
|
949
|
-
* "content": [
|
|
950
|
-
* {
|
|
951
|
-
* "text": "I did some work here.",
|
|
952
|
-
* "type": "text"
|
|
953
|
-
* }
|
|
954
|
-
* ],
|
|
955
|
-
* "type": "paragraph"
|
|
956
|
-
* }
|
|
957
|
-
* ],
|
|
958
|
-
* "type": "doc",
|
|
959
|
-
* "version": 1
|
|
960
|
-
* },
|
|
961
|
-
* "started": "2021-01-17T12:34:00.000+0000",
|
|
962
|
-
* "timeSpentSeconds": 12000,
|
|
963
|
-
* "visibility": {
|
|
964
|
-
* "identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
965
|
-
* "type": "group"
|
|
966
|
-
* }
|
|
967
|
-
* }
|
|
968
|
-
*/
|
|
969
|
-
worklog: Worklog;
|
|
970
|
-
}): Promise<Worklog> {
|
|
971
|
-
return this.getClientInstance()
|
|
972
|
-
.request({
|
|
973
|
-
path: "/rest/api/3/issue/{issueIdOrKey}/worklog/{id}",
|
|
974
|
-
method: "PUT",
|
|
975
|
-
pathParams: {
|
|
976
|
-
issueIdOrKey,
|
|
977
|
-
id,
|
|
978
|
-
},
|
|
979
|
-
query: {
|
|
980
|
-
notifyUsers,
|
|
981
|
-
adjustEstimate,
|
|
982
|
-
newEstimate,
|
|
983
|
-
expand,
|
|
984
|
-
overrideEditableFlag,
|
|
985
|
-
},
|
|
986
|
-
headers: {
|
|
987
|
-
"Content-Type": "application/json",
|
|
988
|
-
},
|
|
989
|
-
body: worklog,
|
|
990
|
-
})
|
|
991
|
-
.then(
|
|
992
|
-
this.getClientInstance().responseHandler({
|
|
993
|
-
200: {
|
|
994
|
-
"application/json": "json",
|
|
995
|
-
},
|
|
996
|
-
}),
|
|
997
|
-
)
|
|
998
|
-
.then(
|
|
999
|
-
commonHttpClient.castResponse<{
|
|
1000
|
-
status: 200;
|
|
1001
|
-
mediaType: "application/json";
|
|
1002
|
-
body: Worklog;
|
|
1003
|
-
}>(),
|
|
1004
|
-
)
|
|
1005
|
-
.then(
|
|
1006
|
-
validationSchemaStorage.validator(
|
|
1007
|
-
"IssueWorklogsService.updateWorklog.response",
|
|
1008
|
-
),
|
|
1009
|
-
)
|
|
1010
|
-
.then(commonHttpClient.getBody);
|
|
1011
|
-
}
|
|
1012
|
-
static initialize() {
|
|
1013
|
-
validationSchemaStorage.registerExtensible(
|
|
1014
|
-
"IssueWorklogsService.getIssueWorklog.response",
|
|
1015
|
-
z
|
|
1016
|
-
.object({
|
|
1017
|
-
status: z.literal(200),
|
|
1018
|
-
mediaType: z.literal("application/json"),
|
|
1019
|
-
body: validationSchemaStorage.lazy("PageOfWorklogs"),
|
|
1020
|
-
})
|
|
1021
|
-
.describe("IssueWorklogsService.getIssueWorklog.response"),
|
|
1022
|
-
);
|
|
1023
|
-
validationSchemaStorage.registerExtensible(
|
|
1024
|
-
"IssueWorklogsService.addWorklog.response",
|
|
1025
|
-
z
|
|
1026
|
-
.object({
|
|
1027
|
-
status: z.literal(201),
|
|
1028
|
-
mediaType: z.literal("application/json"),
|
|
1029
|
-
body: validationSchemaStorage.lazy("Worklog"),
|
|
1030
|
-
})
|
|
1031
|
-
.describe("IssueWorklogsService.addWorklog.response"),
|
|
1032
|
-
);
|
|
1033
|
-
validationSchemaStorage.registerExtensible(
|
|
1034
|
-
"IssueWorklogsService.getWorklog.response",
|
|
1035
|
-
z
|
|
1036
|
-
.object({
|
|
1037
|
-
status: z.literal(200),
|
|
1038
|
-
mediaType: z.literal("application/json"),
|
|
1039
|
-
body: validationSchemaStorage.lazy("Worklog"),
|
|
1040
|
-
})
|
|
1041
|
-
.describe("IssueWorklogsService.getWorklog.response"),
|
|
1042
|
-
);
|
|
1043
|
-
validationSchemaStorage.registerExtensible(
|
|
1044
|
-
"IssueWorklogsService.updateWorklog.response",
|
|
1045
|
-
z
|
|
1046
|
-
.object({
|
|
1047
|
-
status: z.literal(200),
|
|
1048
|
-
mediaType: z.literal("application/json"),
|
|
1049
|
-
body: validationSchemaStorage.lazy("Worklog"),
|
|
1050
|
-
})
|
|
1051
|
-
.describe("IssueWorklogsService.updateWorklog.response"),
|
|
1052
|
-
);
|
|
1053
|
-
validationSchemaStorage.registerExtensible(
|
|
1054
|
-
"IssueWorklogsService.getIdsOfWorklogsDeletedSince.response",
|
|
1055
|
-
z
|
|
1056
|
-
.object({
|
|
1057
|
-
status: z.literal(200),
|
|
1058
|
-
mediaType: z.literal("application/json"),
|
|
1059
|
-
body: validationSchemaStorage.lazy("ChangedWorklogs"),
|
|
1060
|
-
})
|
|
1061
|
-
.describe("IssueWorklogsService.getIdsOfWorklogsDeletedSince.response"),
|
|
1062
|
-
);
|
|
1063
|
-
validationSchemaStorage.registerExtensible(
|
|
1064
|
-
"IssueWorklogsService.getWorklogsForIds.response",
|
|
1065
|
-
z
|
|
1066
|
-
.object({
|
|
1067
|
-
status: z.literal(200),
|
|
1068
|
-
mediaType: z.literal("application/json"),
|
|
1069
|
-
body: z.array(validationSchemaStorage.lazy("Worklog")),
|
|
1070
|
-
})
|
|
1071
|
-
.describe("IssueWorklogsService.getWorklogsForIds.response"),
|
|
1072
|
-
);
|
|
1073
|
-
validationSchemaStorage.registerExtensible(
|
|
1074
|
-
"IssueWorklogsService.getIdsOfWorklogsModifiedSince.response",
|
|
1075
|
-
z
|
|
1076
|
-
.object({
|
|
1077
|
-
status: z.literal(200),
|
|
1078
|
-
mediaType: z.literal("application/json"),
|
|
1079
|
-
body: validationSchemaStorage.lazy("ChangedWorklogs"),
|
|
1080
|
-
})
|
|
1081
|
-
.describe(
|
|
1082
|
-
"IssueWorklogsService.getIdsOfWorklogsModifiedSince.response",
|
|
1083
|
-
),
|
|
1084
|
-
);
|
|
1085
|
-
validationSchemaStorage.registerOnce([
|
|
1086
|
-
registerIssueWorklogsValidationSchemas,
|
|
1087
|
-
]);
|
|
1088
|
-
}
|
|
1089
|
-
}
|