@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,2196 +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 NotificationScheme,
|
|
10
|
-
type PageBeanProject,
|
|
11
|
-
type Project,
|
|
12
|
-
registerCommonValidationSchemas,
|
|
13
|
-
} from "../models/common";
|
|
14
|
-
import {
|
|
15
|
-
type CreateProjectDetails,
|
|
16
|
-
type IssueTypeWithStatus,
|
|
17
|
-
type ProjectIdentifiers,
|
|
18
|
-
type ProjectIssueTypeHierarchy,
|
|
19
|
-
registerProjectsValidationSchemas,
|
|
20
|
-
type StringList,
|
|
21
|
-
type UpdateProjectDetails,
|
|
22
|
-
} from "../models/projects";
|
|
23
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
24
|
-
/**
|
|
25
|
-
* This resource represents projects. Use it to get, create, update, and delete
|
|
26
|
-
* projects. Also get statuses available to a project, a project's notification
|
|
27
|
-
* schemes, and update a project's type.
|
|
28
|
-
*/
|
|
29
|
-
export class ProjectsService extends CommonHttpService {
|
|
30
|
-
/**
|
|
31
|
-
* Archives a project. You can't delete a project if it's archived. To delete an
|
|
32
|
-
* archived project, restore the project and then delete it. To restore a project,
|
|
33
|
-
* use the Jira UI.
|
|
34
|
-
*
|
|
35
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
36
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
37
|
-
*
|
|
38
|
-
* @returns Returned if the request is successful.
|
|
39
|
-
* @path {POST} /rest/api/3/project/{projectIdOrKey}/archive
|
|
40
|
-
* @scopes-current manage:jira-project
|
|
41
|
-
* @scopes-beta write:project:jira
|
|
42
|
-
*/
|
|
43
|
-
archiveProject({
|
|
44
|
-
projectIdOrKey,
|
|
45
|
-
}: {
|
|
46
|
-
/** The project ID or project key (case sensitive). */
|
|
47
|
-
projectIdOrKey: string;
|
|
48
|
-
}): Promise<void> {
|
|
49
|
-
return this.getClientInstance()
|
|
50
|
-
.request({
|
|
51
|
-
path: "/rest/api/3/project/{projectIdOrKey}/archive",
|
|
52
|
-
method: "POST",
|
|
53
|
-
pathParams: {
|
|
54
|
-
projectIdOrKey,
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
.then(
|
|
58
|
-
this.getClientInstance().responseHandler({
|
|
59
|
-
204: {
|
|
60
|
-
"application/json": "json",
|
|
61
|
-
},
|
|
62
|
-
}),
|
|
63
|
-
)
|
|
64
|
-
.then(
|
|
65
|
-
commonHttpClient.castResponse<{
|
|
66
|
-
status: 204;
|
|
67
|
-
mediaType: "application/json";
|
|
68
|
-
body: void;
|
|
69
|
-
}>(),
|
|
70
|
-
)
|
|
71
|
-
.then(
|
|
72
|
-
validationSchemaStorage.validator(
|
|
73
|
-
"ProjectsService.archiveProject.response",
|
|
74
|
-
),
|
|
75
|
-
)
|
|
76
|
-
.then(commonHttpClient.getBody);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Creates a project based on a project type template, as shown in the following
|
|
80
|
-
* table:
|
|
81
|
-
*
|
|
82
|
-
* | Project Type Key | Project Template Key |
|
|
83
|
-
* |--|--|
|
|
84
|
-
* | `business` |
|
|
85
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`,
|
|
86
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`,
|
|
87
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`,
|
|
88
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`,
|
|
89
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`,
|
|
90
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`,
|
|
91
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`,
|
|
92
|
-
* `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` |
|
|
93
|
-
* | `service_desk` |
|
|
94
|
-
* `com.atlassian.servicedesk:simplified-it-service-management`,
|
|
95
|
-
* `com.atlassian.servicedesk:simplified-general-service-desk-it`,
|
|
96
|
-
* `com.atlassian.servicedesk:simplified-general-service-desk-business`,
|
|
97
|
-
* `com.atlassian.servicedesk:simplified-external-service-desk`,
|
|
98
|
-
* `com.atlassian.servicedesk:simplified-hr-service-desk`,
|
|
99
|
-
* `com.atlassian.servicedesk:simplified-facilities-service-desk`,
|
|
100
|
-
* `com.atlassian.servicedesk:simplified-legal-service-desk`,
|
|
101
|
-
* `com.atlassian.servicedesk:simplified-analytics-service-desk`,
|
|
102
|
-
* `com.atlassian.servicedesk:simplified-marketing-service-desk`,
|
|
103
|
-
* `com.atlassian.servicedesk:simplified-design-service-desk`,
|
|
104
|
-
* `com.atlassian.servicedesk:simplified-sales-service-desk`,
|
|
105
|
-
* `com.atlassian.servicedesk:simplified-blank-project-business`,
|
|
106
|
-
* `com.atlassian.servicedesk:simplified-blank-project-it`,
|
|
107
|
-
* `com.atlassian.servicedesk:simplified-finance-service-desk`,
|
|
108
|
-
* `com.atlassian.servicedesk:next-gen-it-service-desk`,
|
|
109
|
-
* `com.atlassian.servicedesk:next-gen-hr-service-desk`,
|
|
110
|
-
* `com.atlassian.servicedesk:next-gen-legal-service-desk`,
|
|
111
|
-
* `com.atlassian.servicedesk:next-gen-marketing-service-desk`,
|
|
112
|
-
* `com.atlassian.servicedesk:next-gen-facilities-service-desk`,
|
|
113
|
-
* `com.atlassian.servicedesk:next-gen-general-it-service-desk`,
|
|
114
|
-
* `com.atlassian.servicedesk:next-gen-general-business-service-desk`,
|
|
115
|
-
* `com.atlassian.servicedesk:next-gen-analytics-service-desk`,
|
|
116
|
-
* `com.atlassian.servicedesk:next-gen-finance-service-desk`,
|
|
117
|
-
* `com.atlassian.servicedesk:next-gen-design-service-desk`,
|
|
118
|
-
* `com.atlassian.servicedesk:next-gen-sales-service-desk` |
|
|
119
|
-
* | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`,
|
|
120
|
-
* `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`,
|
|
121
|
-
* `com.pyxis.greenhopper.jira:gh-simplified-basic`,
|
|
122
|
-
* `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`,
|
|
123
|
-
* `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` |
|
|
124
|
-
* The project types are available according to the installed Jira features as
|
|
125
|
-
* follows:
|
|
126
|
-
*
|
|
127
|
-
* * Jira Core, the default, enables `business` projects.
|
|
128
|
-
* * Jira Service Management enables `service_desk` projects.
|
|
129
|
-
* * Jira Software enables `software` projects.
|
|
130
|
-
*
|
|
131
|
-
* To determine which features are installed, go to **Jira settings** > **Apps** >
|
|
132
|
-
* **Manage apps** and review the System Apps list. To add Jira Software or Jira
|
|
133
|
-
* Service Management into a JIRA instance, use **Jira settings** > **Apps** >
|
|
134
|
-
* **Finding new apps**. For more information, see [ Managing
|
|
135
|
-
* add-ons](https://confluence.atlassian.com/x/S31NLg).
|
|
136
|
-
*
|
|
137
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
138
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
139
|
-
*
|
|
140
|
-
* @returns Returned if the project is created.
|
|
141
|
-
*
|
|
142
|
-
* example: {
|
|
143
|
-
* "id": 10010,
|
|
144
|
-
* "key": "EX",
|
|
145
|
-
* "self": "https://your-domain.atlassian.net/jira/rest/api/3/project/10042"
|
|
146
|
-
* }
|
|
147
|
-
* @path {POST} /rest/api/3/project
|
|
148
|
-
* @scopes-current manage:jira-configuration
|
|
149
|
-
* @scopes-beta write:project:jira, read:project:jira
|
|
150
|
-
*/
|
|
151
|
-
createProject({
|
|
152
|
-
createProjectDetails,
|
|
153
|
-
}: {
|
|
154
|
-
/**
|
|
155
|
-
* The JSON representation of the project being created.
|
|
156
|
-
*
|
|
157
|
-
* @example {
|
|
158
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
159
|
-
* "avatarId": 10200,
|
|
160
|
-
* "categoryId": 10120,
|
|
161
|
-
* "description": "Cloud migration initiative",
|
|
162
|
-
* "issueSecurityScheme": 10001,
|
|
163
|
-
* "key": "EX",
|
|
164
|
-
* "leadAccountId": "5b10a0effa615349cb016cd8",
|
|
165
|
-
* "name": "Example",
|
|
166
|
-
* "notificationScheme": 10021,
|
|
167
|
-
* "permissionScheme": 10011,
|
|
168
|
-
* "projectTemplateKey":
|
|
169
|
-
* "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control",
|
|
170
|
-
* "projectTypeKey": "business",
|
|
171
|
-
* "url": "http://atlassian.com"
|
|
172
|
-
* }
|
|
173
|
-
*/
|
|
174
|
-
createProjectDetails: CreateProjectDetails;
|
|
175
|
-
}): Promise<ProjectIdentifiers> {
|
|
176
|
-
return this.getClientInstance()
|
|
177
|
-
.request({
|
|
178
|
-
path: "/rest/api/3/project",
|
|
179
|
-
method: "POST",
|
|
180
|
-
headers: {
|
|
181
|
-
"Content-Type": "application/json",
|
|
182
|
-
},
|
|
183
|
-
body: createProjectDetails,
|
|
184
|
-
})
|
|
185
|
-
.then(
|
|
186
|
-
this.getClientInstance().responseHandler({
|
|
187
|
-
201: {
|
|
188
|
-
"application/json": "json",
|
|
189
|
-
},
|
|
190
|
-
}),
|
|
191
|
-
)
|
|
192
|
-
.then(
|
|
193
|
-
commonHttpClient.castResponse<{
|
|
194
|
-
status: 201;
|
|
195
|
-
mediaType: "application/json";
|
|
196
|
-
body: ProjectIdentifiers;
|
|
197
|
-
}>(),
|
|
198
|
-
)
|
|
199
|
-
.then(
|
|
200
|
-
validationSchemaStorage.validator(
|
|
201
|
-
"ProjectsService.createProject.response",
|
|
202
|
-
),
|
|
203
|
-
)
|
|
204
|
-
.then(commonHttpClient.getBody);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Deletes a project.
|
|
208
|
-
*
|
|
209
|
-
* You can't delete a project if it's archived. To delete an archived project,
|
|
210
|
-
* restore the project and then delete it. To restore a project, use the Jira UI.
|
|
211
|
-
*
|
|
212
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
213
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
214
|
-
*
|
|
215
|
-
* @path {DELETE} /rest/api/3/project/{projectIdOrKey}
|
|
216
|
-
* @scopes-current manage:jira-configuration
|
|
217
|
-
* @scopes-beta delete:project:jira
|
|
218
|
-
*/
|
|
219
|
-
deleteProject({
|
|
220
|
-
projectIdOrKey,
|
|
221
|
-
enableUndo,
|
|
222
|
-
}: {
|
|
223
|
-
/** The project ID or project key (case sensitive). */
|
|
224
|
-
projectIdOrKey: string;
|
|
225
|
-
/**
|
|
226
|
-
* Whether this project is placed in the Jira recycle bin where it will be
|
|
227
|
-
* available for restoration.
|
|
228
|
-
*/
|
|
229
|
-
enableUndo?: boolean;
|
|
230
|
-
}): Promise<void> {
|
|
231
|
-
return this.getClientInstance()
|
|
232
|
-
.request({
|
|
233
|
-
path: "/rest/api/3/project/{projectIdOrKey}",
|
|
234
|
-
method: "DELETE",
|
|
235
|
-
pathParams: {
|
|
236
|
-
projectIdOrKey,
|
|
237
|
-
},
|
|
238
|
-
query: {
|
|
239
|
-
enableUndo,
|
|
240
|
-
},
|
|
241
|
-
})
|
|
242
|
-
.then(commonHttpClient.discardResult);
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Deletes a project asynchronously.
|
|
246
|
-
*
|
|
247
|
-
* This operation is:
|
|
248
|
-
*
|
|
249
|
-
* * transactional, that is, if part of the delete fails the project is not
|
|
250
|
-
* deleted.
|
|
251
|
-
* * [asynchronous](#async). Follow the `location` link in the response to
|
|
252
|
-
* determine the status of the task and use [Get
|
|
253
|
-
* task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates.
|
|
254
|
-
*
|
|
255
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
256
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
257
|
-
*
|
|
258
|
-
* @path {POST} /rest/api/3/project/{projectIdOrKey}/delete
|
|
259
|
-
* @scopes-current manage:jira-configuration
|
|
260
|
-
* @scopes-beta write:project:jira, write:project.property:jira
|
|
261
|
-
*/
|
|
262
|
-
deleteProjectAsynchronously({
|
|
263
|
-
projectIdOrKey,
|
|
264
|
-
}: {
|
|
265
|
-
/** The project ID or project key (case sensitive). */
|
|
266
|
-
projectIdOrKey: string;
|
|
267
|
-
}): Promise<void> {
|
|
268
|
-
return this.getClientInstance()
|
|
269
|
-
.request({
|
|
270
|
-
path: "/rest/api/3/project/{projectIdOrKey}/delete",
|
|
271
|
-
method: "POST",
|
|
272
|
-
pathParams: {
|
|
273
|
-
projectIdOrKey,
|
|
274
|
-
},
|
|
275
|
-
})
|
|
276
|
-
.then(commonHttpClient.discardResult);
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Returns all projects visible to the user. Deprecated, use [ Get projects
|
|
280
|
-
* paginated](#api-rest-api-3-project-search-get) that supports search and
|
|
281
|
-
* pagination.
|
|
282
|
-
*
|
|
283
|
-
* This operation can be accessed anonymously.
|
|
284
|
-
*
|
|
285
|
-
* **[Permissions](#permissions) required:** Projects are returned only where the
|
|
286
|
-
* user has *Browse Projects* or *Administer projects* [project
|
|
287
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
288
|
-
*
|
|
289
|
-
* @deprecated
|
|
290
|
-
* @returns Returned if the request is successful.
|
|
291
|
-
*
|
|
292
|
-
* example: [
|
|
293
|
-
* {
|
|
294
|
-
* "avatarUrls": {
|
|
295
|
-
* "16x16":
|
|
296
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
297
|
-
* "24x24":
|
|
298
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
299
|
-
* "32x32":
|
|
300
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
301
|
-
* "48x48":
|
|
302
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
303
|
-
* },
|
|
304
|
-
* "id": "10000",
|
|
305
|
-
* "insight": {
|
|
306
|
-
* "lastIssueUpdateTime": 1619069825000,
|
|
307
|
-
* "totalIssueCount": 100
|
|
308
|
-
* },
|
|
309
|
-
* "key": "EX",
|
|
310
|
-
* "name": "Example",
|
|
311
|
-
* "projectCategory": {
|
|
312
|
-
* "description": "First Project Category",
|
|
313
|
-
* "id": "10000",
|
|
314
|
-
* "name": "FIRST",
|
|
315
|
-
* "self":
|
|
316
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
317
|
-
* },
|
|
318
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
319
|
-
* "simplified": false,
|
|
320
|
-
* "style": "CLASSIC"
|
|
321
|
-
* },
|
|
322
|
-
* {
|
|
323
|
-
* "avatarUrls": {
|
|
324
|
-
* "16x16":
|
|
325
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10001",
|
|
326
|
-
* "24x24":
|
|
327
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10001",
|
|
328
|
-
* "32x32":
|
|
329
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10001",
|
|
330
|
-
* "48x48":
|
|
331
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10001"
|
|
332
|
-
* },
|
|
333
|
-
* "id": "10001",
|
|
334
|
-
* "insight": {
|
|
335
|
-
* "lastIssueUpdateTime": 1619069825000,
|
|
336
|
-
* "totalIssueCount": 100
|
|
337
|
-
* },
|
|
338
|
-
* "key": "ABC",
|
|
339
|
-
* "name": "Alphabetical",
|
|
340
|
-
* "projectCategory": {
|
|
341
|
-
* "description": "First Project Category",
|
|
342
|
-
* "id": "10000",
|
|
343
|
-
* "name": "FIRST",
|
|
344
|
-
* "self":
|
|
345
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
346
|
-
* },
|
|
347
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/ABC",
|
|
348
|
-
* "simplified": false,
|
|
349
|
-
* "style": "CLASSIC"
|
|
350
|
-
* }
|
|
351
|
-
* ]
|
|
352
|
-
* @path {GET} /rest/api/3/project
|
|
353
|
-
* @scopes-current read:jira-work
|
|
354
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
355
|
-
* read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira,
|
|
356
|
-
* read:issue-type-hierarchy:jira, read:project-category:jira,
|
|
357
|
-
* read:project-version:jira, read:project.component:jira
|
|
358
|
-
*/
|
|
359
|
-
getAllProjects({
|
|
360
|
-
expand,
|
|
361
|
-
recent,
|
|
362
|
-
properties,
|
|
363
|
-
}: {
|
|
364
|
-
/**
|
|
365
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
366
|
-
* This parameter accepts a comma-separated list. Expanded options include:
|
|
367
|
-
*
|
|
368
|
-
* * `description` Returns the project description.
|
|
369
|
-
* * `issueTypes` Returns all issue types associated with the project.
|
|
370
|
-
* * `lead` Returns information about the project lead.
|
|
371
|
-
* * `projectKeys` Returns all project keys associated with the project.
|
|
372
|
-
*/
|
|
373
|
-
expand?: string;
|
|
374
|
-
/**
|
|
375
|
-
* Returns the user's most recently accessed projects. You may specify the number
|
|
376
|
-
* of results to return up to a maximum of 20. If access is anonymous, then the
|
|
377
|
-
* recently accessed projects are based on the current HTTP session.
|
|
378
|
-
*/
|
|
379
|
-
recent?: number;
|
|
380
|
-
/**
|
|
381
|
-
* A list of project properties to return for the project. This parameter accepts
|
|
382
|
-
* a comma-separated list.
|
|
383
|
-
*/
|
|
384
|
-
properties?: string[];
|
|
385
|
-
}): Promise<Project[]> {
|
|
386
|
-
return this.getClientInstance()
|
|
387
|
-
.request({
|
|
388
|
-
path: "/rest/api/3/project",
|
|
389
|
-
method: "GET",
|
|
390
|
-
query: {
|
|
391
|
-
expand,
|
|
392
|
-
recent,
|
|
393
|
-
properties,
|
|
394
|
-
},
|
|
395
|
-
})
|
|
396
|
-
.then(
|
|
397
|
-
this.getClientInstance().responseHandler({
|
|
398
|
-
200: {
|
|
399
|
-
"application/json": "json",
|
|
400
|
-
},
|
|
401
|
-
}),
|
|
402
|
-
)
|
|
403
|
-
.then(
|
|
404
|
-
commonHttpClient.castResponse<{
|
|
405
|
-
status: 200;
|
|
406
|
-
mediaType: "application/json";
|
|
407
|
-
body: Project[];
|
|
408
|
-
}>(),
|
|
409
|
-
)
|
|
410
|
-
.then(
|
|
411
|
-
validationSchemaStorage.validator(
|
|
412
|
-
"ProjectsService.getAllProjects.response",
|
|
413
|
-
),
|
|
414
|
-
)
|
|
415
|
-
.then(commonHttpClient.getBody);
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Returns the valid statuses for a project. The statuses are grouped by issue
|
|
419
|
-
* type, as each project has a set of valid issue types and each issue type has a
|
|
420
|
-
* set of valid statuses.
|
|
421
|
-
*
|
|
422
|
-
* This operation can be accessed anonymously.
|
|
423
|
-
*
|
|
424
|
-
* **[Permissions](#permissions) required:** *Browse Projects* [project
|
|
425
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
426
|
-
*
|
|
427
|
-
* @returns Returned if the request is successful.
|
|
428
|
-
*
|
|
429
|
-
* example: [
|
|
430
|
-
* {
|
|
431
|
-
* "id": "3",
|
|
432
|
-
* "name": "Task",
|
|
433
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
|
|
434
|
-
* "statuses": [
|
|
435
|
-
* {
|
|
436
|
-
* "description": "The issue is currently being worked on.",
|
|
437
|
-
* "iconUrl":
|
|
438
|
-
* "https://your-domain.atlassian.net/images/icons/progress.gif",
|
|
439
|
-
* "id": "10000",
|
|
440
|
-
* "name": "In Progress",
|
|
441
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/status/10000"
|
|
442
|
-
* },
|
|
443
|
-
* {
|
|
444
|
-
* "description": "The issue is closed.",
|
|
445
|
-
* "iconUrl": "https://your-domain.atlassian.net/images/icons/closed.gif",
|
|
446
|
-
* "id": "5",
|
|
447
|
-
* "name": "Closed",
|
|
448
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/status/5"
|
|
449
|
-
* }
|
|
450
|
-
* ],
|
|
451
|
-
* "subtask": false
|
|
452
|
-
* }
|
|
453
|
-
* ]
|
|
454
|
-
* @path {GET} /rest/api/3/project/{projectIdOrKey}/statuses
|
|
455
|
-
* @scopes-current read:jira-work
|
|
456
|
-
* @scopes-beta read:issue-status:jira, read:issue-type:jira, read:status:jira
|
|
457
|
-
*/
|
|
458
|
-
getAllStatuses({
|
|
459
|
-
projectIdOrKey,
|
|
460
|
-
}: {
|
|
461
|
-
/** The project ID or project key (case sensitive). */
|
|
462
|
-
projectIdOrKey: string;
|
|
463
|
-
}): Promise<IssueTypeWithStatus[]> {
|
|
464
|
-
return this.getClientInstance()
|
|
465
|
-
.request({
|
|
466
|
-
path: "/rest/api/3/project/{projectIdOrKey}/statuses",
|
|
467
|
-
method: "GET",
|
|
468
|
-
pathParams: {
|
|
469
|
-
projectIdOrKey,
|
|
470
|
-
},
|
|
471
|
-
})
|
|
472
|
-
.then(
|
|
473
|
-
this.getClientInstance().responseHandler({
|
|
474
|
-
200: {
|
|
475
|
-
"application/json": "json",
|
|
476
|
-
},
|
|
477
|
-
}),
|
|
478
|
-
)
|
|
479
|
-
.then(
|
|
480
|
-
commonHttpClient.castResponse<{
|
|
481
|
-
status: 200;
|
|
482
|
-
mediaType: "application/json";
|
|
483
|
-
body: IssueTypeWithStatus[];
|
|
484
|
-
}>(),
|
|
485
|
-
)
|
|
486
|
-
.then(
|
|
487
|
-
validationSchemaStorage.validator(
|
|
488
|
-
"ProjectsService.getAllStatuses.response",
|
|
489
|
-
),
|
|
490
|
-
)
|
|
491
|
-
.then(commonHttpClient.getBody);
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Get the issue type hierarchy for a next-gen project.
|
|
495
|
-
*
|
|
496
|
-
* The issue type hierarchy for a project consists of:
|
|
497
|
-
*
|
|
498
|
-
* * *Epic* at level 1 (optional).
|
|
499
|
-
* * One or more issue types at level 0 such as *Story*, *Task*, or *Bug*. Where
|
|
500
|
-
* the issue type *Epic* is defined, these issue types are used to break down the
|
|
501
|
-
* content of an epic.
|
|
502
|
-
* * *Subtask* at level -1 (optional). This issue type enables level 0 issue
|
|
503
|
-
* types to be broken down into components. Issues based on a level -1 issue type
|
|
504
|
-
* must have a parent issue.
|
|
505
|
-
*
|
|
506
|
-
* **[Permissions](#permissions) required:** *Browse projects* [project
|
|
507
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
508
|
-
*
|
|
509
|
-
* @returns Returned if the request is successful.
|
|
510
|
-
*
|
|
511
|
-
* example: {
|
|
512
|
-
* "hierarchy": [
|
|
513
|
-
* {
|
|
514
|
-
* "issueTypes": [
|
|
515
|
-
* {
|
|
516
|
-
* "avatarId": 10324,
|
|
517
|
-
* "entityId": "ce32639b-8911-4689-81da-65681f451516",
|
|
518
|
-
* "id": 10008,
|
|
519
|
-
* "name": "Story"
|
|
520
|
-
* },
|
|
521
|
-
* {
|
|
522
|
-
* "avatarId": 10324,
|
|
523
|
-
* "entityId": "ffdbced5-fbfc-4370-a848-94e2ce3751af",
|
|
524
|
-
* "id": 10001,
|
|
525
|
-
* "name": "Bug"
|
|
526
|
-
* }
|
|
527
|
-
* ],
|
|
528
|
-
* "level": 0,
|
|
529
|
-
* "name": "Base"
|
|
530
|
-
* },
|
|
531
|
-
* {
|
|
532
|
-
* "issueTypes": [
|
|
533
|
-
* {
|
|
534
|
-
* "avatarId": 10179,
|
|
535
|
-
* "entityId": "80f20d47-34dc-4680-8937-936b7e762a35",
|
|
536
|
-
* "id": 10007,
|
|
537
|
-
* "name": "Epic"
|
|
538
|
-
* }
|
|
539
|
-
* ],
|
|
540
|
-
* "level": 1,
|
|
541
|
-
* "name": "Epic"
|
|
542
|
-
* },
|
|
543
|
-
* {
|
|
544
|
-
* "issueTypes": [
|
|
545
|
-
* {
|
|
546
|
-
* "avatarId": 10573,
|
|
547
|
-
* "entityId": "210b4879-15cc-414c-9746-f8f6b6be0a72",
|
|
548
|
-
* "id": 10009,
|
|
549
|
-
* "name": "Subtask"
|
|
550
|
-
* }
|
|
551
|
-
* ],
|
|
552
|
-
* "level": -1,
|
|
553
|
-
* "name": "Subtask"
|
|
554
|
-
* }
|
|
555
|
-
* ],
|
|
556
|
-
* "projectId": 10030
|
|
557
|
-
* }
|
|
558
|
-
* @path {GET} /rest/api/3/project/{projectId}/hierarchy
|
|
559
|
-
* @scopes-current read:jira-work
|
|
560
|
-
* @scopes-beta read:issue-type:jira, read:issue-type-hierarchy:jira
|
|
561
|
-
*/
|
|
562
|
-
getHierarchy({
|
|
563
|
-
projectId,
|
|
564
|
-
}: {
|
|
565
|
-
/** The ID of the project. */
|
|
566
|
-
projectId: number;
|
|
567
|
-
}): Promise<ProjectIssueTypeHierarchy> {
|
|
568
|
-
return this.getClientInstance()
|
|
569
|
-
.request({
|
|
570
|
-
path: "/rest/api/3/project/{projectId}/hierarchy",
|
|
571
|
-
method: "GET",
|
|
572
|
-
pathParams: {
|
|
573
|
-
projectId,
|
|
574
|
-
},
|
|
575
|
-
})
|
|
576
|
-
.then(
|
|
577
|
-
this.getClientInstance().responseHandler({
|
|
578
|
-
200: {
|
|
579
|
-
"application/json": "json",
|
|
580
|
-
},
|
|
581
|
-
}),
|
|
582
|
-
)
|
|
583
|
-
.then(
|
|
584
|
-
commonHttpClient.castResponse<{
|
|
585
|
-
status: 200;
|
|
586
|
-
mediaType: "application/json";
|
|
587
|
-
body: ProjectIssueTypeHierarchy;
|
|
588
|
-
}>(),
|
|
589
|
-
)
|
|
590
|
-
.then(
|
|
591
|
-
validationSchemaStorage.validator(
|
|
592
|
-
"ProjectsService.getHierarchy.response",
|
|
593
|
-
),
|
|
594
|
-
)
|
|
595
|
-
.then(commonHttpClient.getBody);
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg)
|
|
599
|
-
* associated with the project.
|
|
600
|
-
*
|
|
601
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
602
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects*
|
|
603
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg).
|
|
604
|
-
*
|
|
605
|
-
* @returns Returned if the request is successful.
|
|
606
|
-
*
|
|
607
|
-
* example: {
|
|
608
|
-
* "description": "description",
|
|
609
|
-
* "expand": "notificationSchemeEvents,user,group,projectRole,field,all",
|
|
610
|
-
* "id": 10100,
|
|
611
|
-
* "name": "notification scheme name",
|
|
612
|
-
* "notificationSchemeEvents": [
|
|
613
|
-
* {
|
|
614
|
-
* "event": {
|
|
615
|
-
* "description": "Event published when an issue is created",
|
|
616
|
-
* "id": 1,
|
|
617
|
-
* "name": "Issue created"
|
|
618
|
-
* },
|
|
619
|
-
* "notifications": [
|
|
620
|
-
* {
|
|
621
|
-
* "expand": "group",
|
|
622
|
-
* "group": {
|
|
623
|
-
* "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
624
|
-
* "name": "jira-administrators",
|
|
625
|
-
* "self":
|
|
626
|
-
* "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
|
|
627
|
-
* },
|
|
628
|
-
* "id": 1,
|
|
629
|
-
* "notificationType": "Group",
|
|
630
|
-
* "parameter": "jira-administrators",
|
|
631
|
-
* "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
|
|
632
|
-
* },
|
|
633
|
-
* {
|
|
634
|
-
* "id": 2,
|
|
635
|
-
* "notificationType": "CurrentAssignee"
|
|
636
|
-
* },
|
|
637
|
-
* {
|
|
638
|
-
* "expand": "projectRole",
|
|
639
|
-
* "id": 3,
|
|
640
|
-
* "notificationType": "ProjectRole",
|
|
641
|
-
* "parameter": "10360",
|
|
642
|
-
* "projectRole": {
|
|
643
|
-
* "self":
|
|
644
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
|
|
645
|
-
* "name": "Developers",
|
|
646
|
-
* "id": 10360,
|
|
647
|
-
* "description": "A project role that represents developers in a
|
|
648
|
-
* project",
|
|
649
|
-
* "actors": [
|
|
650
|
-
* {
|
|
651
|
-
* "actorGroup": {
|
|
652
|
-
* "name": "jira-developers",
|
|
653
|
-
* "displayName": "jira-developers",
|
|
654
|
-
* "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
|
|
655
|
-
* },
|
|
656
|
-
* "displayName": "jira-developers",
|
|
657
|
-
* "id": 10240,
|
|
658
|
-
* "name": "jira-developers",
|
|
659
|
-
* "type": "atlassian-group-role-actor"
|
|
660
|
-
* },
|
|
661
|
-
* {
|
|
662
|
-
* "actorUser": {
|
|
663
|
-
* "accountId": "5b10a2844c20165700ede21g"
|
|
664
|
-
* },
|
|
665
|
-
* "displayName": "Mia Krystof",
|
|
666
|
-
* "id": 10241,
|
|
667
|
-
* "type": "atlassian-user-role-actor"
|
|
668
|
-
* }
|
|
669
|
-
* ],
|
|
670
|
-
* "scope": {
|
|
671
|
-
* "project": {
|
|
672
|
-
* "id": "10000",
|
|
673
|
-
* "key": "KEY",
|
|
674
|
-
* "name": "Next Gen Project"
|
|
675
|
-
* },
|
|
676
|
-
* "type": "PROJECT"
|
|
677
|
-
* }
|
|
678
|
-
* },
|
|
679
|
-
* "recipient": "10360"
|
|
680
|
-
* },
|
|
681
|
-
* {
|
|
682
|
-
* "emailAddress": "rest-developer@atlassian.com",
|
|
683
|
-
* "id": 4,
|
|
684
|
-
* "notificationType": "EmailAddress",
|
|
685
|
-
* "parameter": "rest-developer@atlassian.com",
|
|
686
|
-
* "recipient": "rest-developer@atlassian.com"
|
|
687
|
-
* },
|
|
688
|
-
* {
|
|
689
|
-
* "expand": "user",
|
|
690
|
-
* "id": 5,
|
|
691
|
-
* "notificationType": "User",
|
|
692
|
-
* "parameter": "5b10a2844c20165700ede21g",
|
|
693
|
-
* "recipient": "5b10a2844c20165700ede21g",
|
|
694
|
-
* "user": {
|
|
695
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
696
|
-
* "active": false,
|
|
697
|
-
* "displayName": "Mia Krystof",
|
|
698
|
-
* "self":
|
|
699
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
700
|
-
* }
|
|
701
|
-
* },
|
|
702
|
-
* {
|
|
703
|
-
* "expand": "field",
|
|
704
|
-
* "field": {
|
|
705
|
-
* "clauseNames": [
|
|
706
|
-
* "cf[10101]",
|
|
707
|
-
* "New custom field"
|
|
708
|
-
* ],
|
|
709
|
-
* "custom": true,
|
|
710
|
-
* "id": "customfield_10101",
|
|
711
|
-
* "key": "customfield_10101",
|
|
712
|
-
* "name": "New custom field",
|
|
713
|
-
* "navigable": true,
|
|
714
|
-
* "orderable": true,
|
|
715
|
-
* "schema": {
|
|
716
|
-
* "custom":
|
|
717
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:project",
|
|
718
|
-
* "customId": 10101,
|
|
719
|
-
* "type": "project"
|
|
720
|
-
* },
|
|
721
|
-
* "searchable": true,
|
|
722
|
-
* "untranslatedName": "New custom field"
|
|
723
|
-
* },
|
|
724
|
-
* "id": 6,
|
|
725
|
-
* "notificationType": "GroupCustomField",
|
|
726
|
-
* "parameter": "customfield_10101",
|
|
727
|
-
* "recipient": "customfield_10101"
|
|
728
|
-
* }
|
|
729
|
-
* ]
|
|
730
|
-
* },
|
|
731
|
-
* {
|
|
732
|
-
* "event": {
|
|
733
|
-
* "description": "Custom event that is published together with an issue
|
|
734
|
-
* created event",
|
|
735
|
-
* "id": 20,
|
|
736
|
-
* "name": "Custom event",
|
|
737
|
-
* "templateEvent": {
|
|
738
|
-
* "description": "Event published when an issue is created",
|
|
739
|
-
* "id": 1,
|
|
740
|
-
* "name": "Issue created"
|
|
741
|
-
* }
|
|
742
|
-
* },
|
|
743
|
-
* "notifications": [
|
|
744
|
-
* {
|
|
745
|
-
* "expand": "group",
|
|
746
|
-
* "group": {
|
|
747
|
-
* "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
|
|
748
|
-
* "name": "jira-administrators",
|
|
749
|
-
* "self":
|
|
750
|
-
* "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
|
|
751
|
-
* },
|
|
752
|
-
* "id": 1,
|
|
753
|
-
* "notificationType": "Group",
|
|
754
|
-
* "parameter": "jira-administrators",
|
|
755
|
-
* "recipient": "276f955c-63d7-42c8-9520-92d01dca0625"
|
|
756
|
-
* },
|
|
757
|
-
* {
|
|
758
|
-
* "id": 2,
|
|
759
|
-
* "notificationType": "CurrentAssignee"
|
|
760
|
-
* },
|
|
761
|
-
* {
|
|
762
|
-
* "expand": "projectRole",
|
|
763
|
-
* "id": 3,
|
|
764
|
-
* "notificationType": "ProjectRole",
|
|
765
|
-
* "parameter": "10360",
|
|
766
|
-
* "projectRole": {
|
|
767
|
-
* "self":
|
|
768
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
|
|
769
|
-
* "name": "Developers",
|
|
770
|
-
* "id": 10360,
|
|
771
|
-
* "description": "A project role that represents developers in a
|
|
772
|
-
* project",
|
|
773
|
-
* "actors": [
|
|
774
|
-
* {
|
|
775
|
-
* "actorGroup": {
|
|
776
|
-
* "name": "jira-developers",
|
|
777
|
-
* "displayName": "jira-developers",
|
|
778
|
-
* "groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
|
|
779
|
-
* },
|
|
780
|
-
* "displayName": "jira-developers",
|
|
781
|
-
* "id": 10240,
|
|
782
|
-
* "name": "jira-developers",
|
|
783
|
-
* "type": "atlassian-group-role-actor"
|
|
784
|
-
* },
|
|
785
|
-
* {
|
|
786
|
-
* "actorUser": {
|
|
787
|
-
* "accountId": "5b10a2844c20165700ede21g"
|
|
788
|
-
* },
|
|
789
|
-
* "displayName": "Mia Krystof",
|
|
790
|
-
* "id": 10241,
|
|
791
|
-
* "type": "atlassian-user-role-actor"
|
|
792
|
-
* }
|
|
793
|
-
* ],
|
|
794
|
-
* "scope": {
|
|
795
|
-
* "project": {
|
|
796
|
-
* "id": "10000",
|
|
797
|
-
* "key": "KEY",
|
|
798
|
-
* "name": "Next Gen Project"
|
|
799
|
-
* },
|
|
800
|
-
* "type": "PROJECT"
|
|
801
|
-
* }
|
|
802
|
-
* },
|
|
803
|
-
* "recipient": "10360"
|
|
804
|
-
* },
|
|
805
|
-
* {
|
|
806
|
-
* "emailAddress": "rest-developer@atlassian.com",
|
|
807
|
-
* "id": 4,
|
|
808
|
-
* "notificationType": "EmailAddress",
|
|
809
|
-
* "parameter": "rest-developer@atlassian.com",
|
|
810
|
-
* "recipient": "rest-developer@atlassian.com"
|
|
811
|
-
* },
|
|
812
|
-
* {
|
|
813
|
-
* "expand": "user",
|
|
814
|
-
* "id": 5,
|
|
815
|
-
* "notificationType": "User",
|
|
816
|
-
* "parameter": "5b10a2844c20165700ede21g",
|
|
817
|
-
* "recipient": "5b10a2844c20165700ede21g",
|
|
818
|
-
* "user": {
|
|
819
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
820
|
-
* "active": false,
|
|
821
|
-
* "displayName": "Mia Krystof",
|
|
822
|
-
* "self":
|
|
823
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
824
|
-
* }
|
|
825
|
-
* },
|
|
826
|
-
* {
|
|
827
|
-
* "expand": "field",
|
|
828
|
-
* "field": {
|
|
829
|
-
* "clauseNames": [
|
|
830
|
-
* "cf[10101]",
|
|
831
|
-
* "New custom field"
|
|
832
|
-
* ],
|
|
833
|
-
* "custom": true,
|
|
834
|
-
* "id": "customfield_10101",
|
|
835
|
-
* "key": "customfield_10101",
|
|
836
|
-
* "name": "New custom field",
|
|
837
|
-
* "navigable": true,
|
|
838
|
-
* "orderable": true,
|
|
839
|
-
* "schema": {
|
|
840
|
-
* "custom":
|
|
841
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:project",
|
|
842
|
-
* "customId": 10101,
|
|
843
|
-
* "type": "project"
|
|
844
|
-
* },
|
|
845
|
-
* "searchable": true,
|
|
846
|
-
* "untranslatedName": "New custom field"
|
|
847
|
-
* },
|
|
848
|
-
* "id": 6,
|
|
849
|
-
* "notificationType": "GroupCustomField",
|
|
850
|
-
* "parameter": "customfield_10101",
|
|
851
|
-
* "recipient": "customfield_10101"
|
|
852
|
-
* }
|
|
853
|
-
* ]
|
|
854
|
-
* }
|
|
855
|
-
* ],
|
|
856
|
-
* "projects": [
|
|
857
|
-
* 10001,
|
|
858
|
-
* 10002
|
|
859
|
-
* ],
|
|
860
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/notificationscheme"
|
|
861
|
-
* }
|
|
862
|
-
* @path {GET} /rest/api/3/project/{projectKeyOrId}/notificationscheme
|
|
863
|
-
* @scopes-current read:jira-work
|
|
864
|
-
* @scopes-beta read:project-category:jira, read:project-role:jira, read:project:jira,
|
|
865
|
-
* read:user:jira, read:group:jira, read:field:jira, read:avatar:jira,
|
|
866
|
-
* read:field-configuration:jira, read:notification-scheme:jira
|
|
867
|
-
*/
|
|
868
|
-
getNotificationSchemeForProject({
|
|
869
|
-
projectKeyOrId,
|
|
870
|
-
expand,
|
|
871
|
-
}: {
|
|
872
|
-
/** The project ID or project key (case sensitive). */
|
|
873
|
-
projectKeyOrId: string;
|
|
874
|
-
/**
|
|
875
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
876
|
-
* This parameter accepts a comma-separated list. Expand options include:
|
|
877
|
-
*
|
|
878
|
-
* * `all` Returns all expandable information
|
|
879
|
-
* * `field` Returns information about any custom fields assigned to receive an
|
|
880
|
-
* event
|
|
881
|
-
* * `group` Returns information about any groups assigned to receive an event
|
|
882
|
-
* * `notificationSchemeEvents` Returns a list of event associations. This list
|
|
883
|
-
* is returned for all expandable information
|
|
884
|
-
* * `projectRole` Returns information about any project roles assigned to
|
|
885
|
-
* receive an event
|
|
886
|
-
* * `user` Returns information about any users assigned to receive an event
|
|
887
|
-
*/
|
|
888
|
-
expand?: string;
|
|
889
|
-
}): Promise<NotificationScheme> {
|
|
890
|
-
return this.getClientInstance()
|
|
891
|
-
.request({
|
|
892
|
-
path: "/rest/api/3/project/{projectKeyOrId}/notificationscheme",
|
|
893
|
-
method: "GET",
|
|
894
|
-
pathParams: {
|
|
895
|
-
projectKeyOrId,
|
|
896
|
-
},
|
|
897
|
-
query: {
|
|
898
|
-
expand,
|
|
899
|
-
},
|
|
900
|
-
})
|
|
901
|
-
.then(
|
|
902
|
-
this.getClientInstance().responseHandler({
|
|
903
|
-
200: {
|
|
904
|
-
"application/json": "json",
|
|
905
|
-
},
|
|
906
|
-
}),
|
|
907
|
-
)
|
|
908
|
-
.then(
|
|
909
|
-
commonHttpClient.castResponse<{
|
|
910
|
-
status: 200;
|
|
911
|
-
mediaType: "application/json";
|
|
912
|
-
body: NotificationScheme;
|
|
913
|
-
}>(),
|
|
914
|
-
)
|
|
915
|
-
.then(
|
|
916
|
-
validationSchemaStorage.validator(
|
|
917
|
-
"ProjectsService.getNotificationSchemeForProject.response",
|
|
918
|
-
),
|
|
919
|
-
)
|
|
920
|
-
.then(commonHttpClient.getBody);
|
|
921
|
-
}
|
|
922
|
-
/**
|
|
923
|
-
* Returns the [project details](https://confluence.atlassian.com/x/ahLpNw) for a
|
|
924
|
-
* project.
|
|
925
|
-
*
|
|
926
|
-
* This operation can be accessed anonymously.
|
|
927
|
-
*
|
|
928
|
-
* **[Permissions](#permissions) required:** *Browse projects* [project
|
|
929
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
930
|
-
*
|
|
931
|
-
* @returns Returned if successful.
|
|
932
|
-
*
|
|
933
|
-
* example: {
|
|
934
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
935
|
-
* "avatarUrls": {
|
|
936
|
-
* "16x16":
|
|
937
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
938
|
-
* "24x24":
|
|
939
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
940
|
-
* "32x32":
|
|
941
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
942
|
-
* "48x48":
|
|
943
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
944
|
-
* },
|
|
945
|
-
* "components": [
|
|
946
|
-
* {
|
|
947
|
-
* "ari":
|
|
948
|
-
* "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
|
|
949
|
-
* "assignee": {
|
|
950
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
951
|
-
* "accountType": "atlassian",
|
|
952
|
-
* "active": false,
|
|
953
|
-
* "avatarUrls": {
|
|
954
|
-
* "16x16":
|
|
955
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
956
|
-
* "24x24":
|
|
957
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
958
|
-
* "32x32":
|
|
959
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
960
|
-
* "48x48":
|
|
961
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
962
|
-
* },
|
|
963
|
-
* "displayName": "Mia Krystof",
|
|
964
|
-
* "key": "",
|
|
965
|
-
* "name": "",
|
|
966
|
-
* "self":
|
|
967
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
968
|
-
* },
|
|
969
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
970
|
-
* "description": "This is a Jira component",
|
|
971
|
-
* "id": "10000",
|
|
972
|
-
* "isAssigneeTypeValid": false,
|
|
973
|
-
* "lead": {
|
|
974
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
975
|
-
* "accountType": "atlassian",
|
|
976
|
-
* "active": false,
|
|
977
|
-
* "avatarUrls": {
|
|
978
|
-
* "16x16":
|
|
979
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
980
|
-
* "24x24":
|
|
981
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
982
|
-
* "32x32":
|
|
983
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
984
|
-
* "48x48":
|
|
985
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
986
|
-
* },
|
|
987
|
-
* "displayName": "Mia Krystof",
|
|
988
|
-
* "key": "",
|
|
989
|
-
* "name": "",
|
|
990
|
-
* "self":
|
|
991
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
992
|
-
* },
|
|
993
|
-
* "metadata": {
|
|
994
|
-
* "icon": "https://www.example.com/icon.png"
|
|
995
|
-
* },
|
|
996
|
-
* "name": "Component 1",
|
|
997
|
-
* "project": "HSP",
|
|
998
|
-
* "projectId": 10000,
|
|
999
|
-
* "realAssignee": {
|
|
1000
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1001
|
-
* "accountType": "atlassian",
|
|
1002
|
-
* "active": false,
|
|
1003
|
-
* "avatarUrls": {
|
|
1004
|
-
* "16x16":
|
|
1005
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1006
|
-
* "24x24":
|
|
1007
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1008
|
-
* "32x32":
|
|
1009
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1010
|
-
* "48x48":
|
|
1011
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1012
|
-
* },
|
|
1013
|
-
* "displayName": "Mia Krystof",
|
|
1014
|
-
* "key": "",
|
|
1015
|
-
* "name": "",
|
|
1016
|
-
* "self":
|
|
1017
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1018
|
-
* },
|
|
1019
|
-
* "realAssigneeType": "PROJECT_LEAD",
|
|
1020
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
|
|
1021
|
-
* }
|
|
1022
|
-
* ],
|
|
1023
|
-
* "description": "This project was created as an example for REST.",
|
|
1024
|
-
* "email": "from-jira@example.com",
|
|
1025
|
-
* "id": "10000",
|
|
1026
|
-
* "insight": {
|
|
1027
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
1028
|
-
* "totalIssueCount": 100
|
|
1029
|
-
* },
|
|
1030
|
-
* "issueTypes": [
|
|
1031
|
-
* {
|
|
1032
|
-
* "avatarId": 1,
|
|
1033
|
-
* "description": "A task that needs to be done.",
|
|
1034
|
-
* "hierarchyLevel": 0,
|
|
1035
|
-
* "iconUrl":
|
|
1036
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype\",",
|
|
1037
|
-
* "id": "3",
|
|
1038
|
-
* "name": "Task",
|
|
1039
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
|
|
1040
|
-
* "subtask": false
|
|
1041
|
-
* },
|
|
1042
|
-
* {
|
|
1043
|
-
* "avatarId": 10002,
|
|
1044
|
-
* "description": "A problem with the software.",
|
|
1045
|
-
* "entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2",
|
|
1046
|
-
* "hierarchyLevel": 0,
|
|
1047
|
-
* "iconUrl":
|
|
1048
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype\",",
|
|
1049
|
-
* "id": "1",
|
|
1050
|
-
* "name": "Bug",
|
|
1051
|
-
* "scope": {
|
|
1052
|
-
* "project": {
|
|
1053
|
-
* "id": "10000"
|
|
1054
|
-
* },
|
|
1055
|
-
* "type": "PROJECT"
|
|
1056
|
-
* },
|
|
1057
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/1",
|
|
1058
|
-
* "subtask": false
|
|
1059
|
-
* }
|
|
1060
|
-
* ],
|
|
1061
|
-
* "key": "EX",
|
|
1062
|
-
* "lead": {
|
|
1063
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1064
|
-
* "accountType": "atlassian",
|
|
1065
|
-
* "active": false,
|
|
1066
|
-
* "avatarUrls": {
|
|
1067
|
-
* "16x16":
|
|
1068
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1069
|
-
* "24x24":
|
|
1070
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1071
|
-
* "32x32":
|
|
1072
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1073
|
-
* "48x48":
|
|
1074
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1075
|
-
* },
|
|
1076
|
-
* "displayName": "Mia Krystof",
|
|
1077
|
-
* "key": "",
|
|
1078
|
-
* "name": "",
|
|
1079
|
-
* "self":
|
|
1080
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1081
|
-
* },
|
|
1082
|
-
* "name": "Example",
|
|
1083
|
-
* "projectCategory": {
|
|
1084
|
-
* "description": "First Project Category",
|
|
1085
|
-
* "id": "10000",
|
|
1086
|
-
* "name": "FIRST",
|
|
1087
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1088
|
-
* },
|
|
1089
|
-
* "properties": {
|
|
1090
|
-
* "propertyKey": "propertyValue"
|
|
1091
|
-
* },
|
|
1092
|
-
* "roles": {
|
|
1093
|
-
* "Developers":
|
|
1094
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/EX/role/10000"
|
|
1095
|
-
* },
|
|
1096
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
1097
|
-
* "simplified": false,
|
|
1098
|
-
* "style": "classic",
|
|
1099
|
-
* "url": "https://www.example.com",
|
|
1100
|
-
* "versions": []
|
|
1101
|
-
* }
|
|
1102
|
-
* @path {GET} /rest/api/3/project/{projectIdOrKey}
|
|
1103
|
-
* @scopes-current read:jira-work
|
|
1104
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
1105
|
-
* read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira,
|
|
1106
|
-
* read:issue-type-hierarchy:jira, read:project-category:jira,
|
|
1107
|
-
* read:project-version:jira, read:project.component:jira
|
|
1108
|
-
*/
|
|
1109
|
-
getProject({
|
|
1110
|
-
projectIdOrKey,
|
|
1111
|
-
expand,
|
|
1112
|
-
properties,
|
|
1113
|
-
}: {
|
|
1114
|
-
/** The project ID or project key (case sensitive). */
|
|
1115
|
-
projectIdOrKey: string;
|
|
1116
|
-
/**
|
|
1117
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
1118
|
-
* This parameter accepts a comma-separated list. Note that the project
|
|
1119
|
-
* description, issue types, and project lead are included in all responses by
|
|
1120
|
-
* default. Expand options include:
|
|
1121
|
-
*
|
|
1122
|
-
* * `description` The project description.
|
|
1123
|
-
* * `issueTypes` The issue types associated with the project.
|
|
1124
|
-
* * `lead` The project lead.
|
|
1125
|
-
* * `projectKeys` All project keys associated with the project.
|
|
1126
|
-
* * `issueTypeHierarchy` The project issue type hierarchy.
|
|
1127
|
-
*/
|
|
1128
|
-
expand?: string;
|
|
1129
|
-
/**
|
|
1130
|
-
* A list of project properties to return for the project. This parameter accepts
|
|
1131
|
-
* a comma-separated list.
|
|
1132
|
-
*/
|
|
1133
|
-
properties?: string[];
|
|
1134
|
-
}): Promise<Project> {
|
|
1135
|
-
return this.getClientInstance()
|
|
1136
|
-
.request({
|
|
1137
|
-
path: "/rest/api/3/project/{projectIdOrKey}",
|
|
1138
|
-
method: "GET",
|
|
1139
|
-
pathParams: {
|
|
1140
|
-
projectIdOrKey,
|
|
1141
|
-
},
|
|
1142
|
-
query: {
|
|
1143
|
-
expand,
|
|
1144
|
-
properties,
|
|
1145
|
-
},
|
|
1146
|
-
})
|
|
1147
|
-
.then(
|
|
1148
|
-
this.getClientInstance().responseHandler({
|
|
1149
|
-
200: {
|
|
1150
|
-
"application/json": "json",
|
|
1151
|
-
},
|
|
1152
|
-
}),
|
|
1153
|
-
)
|
|
1154
|
-
.then(
|
|
1155
|
-
commonHttpClient.castResponse<{
|
|
1156
|
-
status: 200;
|
|
1157
|
-
mediaType: "application/json";
|
|
1158
|
-
body: Project;
|
|
1159
|
-
}>(),
|
|
1160
|
-
)
|
|
1161
|
-
.then(
|
|
1162
|
-
validationSchemaStorage.validator(
|
|
1163
|
-
"ProjectsService.getProject.response",
|
|
1164
|
-
),
|
|
1165
|
-
)
|
|
1166
|
-
.then(commonHttpClient.getBody);
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Returns a list of up to 20 projects recently viewed by the user that are still
|
|
1170
|
-
* visible to the user.
|
|
1171
|
-
*
|
|
1172
|
-
* This operation can be accessed anonymously.
|
|
1173
|
-
*
|
|
1174
|
-
* **[Permissions](#permissions) required:** Projects are returned only where the
|
|
1175
|
-
* user has one of:
|
|
1176
|
-
*
|
|
1177
|
-
* * *Browse Projects* [project
|
|
1178
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1179
|
-
* * *Administer Projects* [project
|
|
1180
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1181
|
-
* * *Administer Jira* [global
|
|
1182
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1183
|
-
*
|
|
1184
|
-
* @returns Returned if the request is successful.
|
|
1185
|
-
*
|
|
1186
|
-
* example: [
|
|
1187
|
-
* {
|
|
1188
|
-
* "avatarUrls": {
|
|
1189
|
-
* "16x16":
|
|
1190
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
1191
|
-
* "24x24":
|
|
1192
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
1193
|
-
* "32x32":
|
|
1194
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
1195
|
-
* "48x48":
|
|
1196
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
1197
|
-
* },
|
|
1198
|
-
* "id": "10000",
|
|
1199
|
-
* "insight": {
|
|
1200
|
-
* "lastIssueUpdateTime": 1619069825000,
|
|
1201
|
-
* "totalIssueCount": 100
|
|
1202
|
-
* },
|
|
1203
|
-
* "key": "EX",
|
|
1204
|
-
* "name": "Example",
|
|
1205
|
-
* "projectCategory": {
|
|
1206
|
-
* "description": "First Project Category",
|
|
1207
|
-
* "id": "10000",
|
|
1208
|
-
* "name": "FIRST",
|
|
1209
|
-
* "self":
|
|
1210
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1211
|
-
* },
|
|
1212
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
1213
|
-
* "simplified": false,
|
|
1214
|
-
* "style": "CLASSIC"
|
|
1215
|
-
* },
|
|
1216
|
-
* {
|
|
1217
|
-
* "avatarUrls": {
|
|
1218
|
-
* "16x16":
|
|
1219
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10001",
|
|
1220
|
-
* "24x24":
|
|
1221
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10001",
|
|
1222
|
-
* "32x32":
|
|
1223
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10001",
|
|
1224
|
-
* "48x48":
|
|
1225
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10001"
|
|
1226
|
-
* },
|
|
1227
|
-
* "id": "10001",
|
|
1228
|
-
* "insight": {
|
|
1229
|
-
* "lastIssueUpdateTime": 1619069825000,
|
|
1230
|
-
* "totalIssueCount": 100
|
|
1231
|
-
* },
|
|
1232
|
-
* "key": "ABC",
|
|
1233
|
-
* "name": "Alphabetical",
|
|
1234
|
-
* "projectCategory": {
|
|
1235
|
-
* "description": "First Project Category",
|
|
1236
|
-
* "id": "10000",
|
|
1237
|
-
* "name": "FIRST",
|
|
1238
|
-
* "self":
|
|
1239
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1240
|
-
* },
|
|
1241
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/ABC",
|
|
1242
|
-
* "simplified": false,
|
|
1243
|
-
* "style": "CLASSIC"
|
|
1244
|
-
* }
|
|
1245
|
-
* ]
|
|
1246
|
-
* @path {GET} /rest/api/3/project/recent
|
|
1247
|
-
* @scopes-current read:jira-work
|
|
1248
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
1249
|
-
* read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira,
|
|
1250
|
-
* read:issue-type-hierarchy:jira, read:project-category:jira,
|
|
1251
|
-
* read:project-version:jira, read:project.component:jira
|
|
1252
|
-
*/
|
|
1253
|
-
getRecent({
|
|
1254
|
-
expand,
|
|
1255
|
-
properties,
|
|
1256
|
-
}: {
|
|
1257
|
-
/**
|
|
1258
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
1259
|
-
* This parameter accepts a comma-separated list. Expanded options include:
|
|
1260
|
-
*
|
|
1261
|
-
* * `description` Returns the project description.
|
|
1262
|
-
* * `projectKeys` Returns all project keys associated with a project.
|
|
1263
|
-
* * `lead` Returns information about the project lead.
|
|
1264
|
-
* * `issueTypes` Returns all issue types associated with the project.
|
|
1265
|
-
* * `url` Returns the URL associated with the project.
|
|
1266
|
-
* * `permissions` Returns the permissions associated with the project.
|
|
1267
|
-
* * `insight` EXPERIMENTAL. Returns the insight details of total issue count
|
|
1268
|
-
* and last issue update time for the project.
|
|
1269
|
-
* * `*` Returns the project with all available expand options.
|
|
1270
|
-
*/
|
|
1271
|
-
expand?: string;
|
|
1272
|
-
/**
|
|
1273
|
-
* EXPERIMENTAL. A list of project properties to return for the project. This
|
|
1274
|
-
* parameter accepts a comma-separated list. Invalid property names are ignored.
|
|
1275
|
-
*/
|
|
1276
|
-
properties?: StringList[];
|
|
1277
|
-
}): Promise<Project[]> {
|
|
1278
|
-
return this.getClientInstance()
|
|
1279
|
-
.request({
|
|
1280
|
-
path: "/rest/api/3/project/recent",
|
|
1281
|
-
method: "GET",
|
|
1282
|
-
query: {
|
|
1283
|
-
expand,
|
|
1284
|
-
properties,
|
|
1285
|
-
},
|
|
1286
|
-
})
|
|
1287
|
-
.then(
|
|
1288
|
-
this.getClientInstance().responseHandler({
|
|
1289
|
-
200: {
|
|
1290
|
-
"application/json": "json",
|
|
1291
|
-
},
|
|
1292
|
-
}),
|
|
1293
|
-
)
|
|
1294
|
-
.then(
|
|
1295
|
-
commonHttpClient.castResponse<{
|
|
1296
|
-
status: 200;
|
|
1297
|
-
mediaType: "application/json";
|
|
1298
|
-
body: Project[];
|
|
1299
|
-
}>(),
|
|
1300
|
-
)
|
|
1301
|
-
.then(
|
|
1302
|
-
validationSchemaStorage.validator("ProjectsService.getRecent.response"),
|
|
1303
|
-
)
|
|
1304
|
-
.then(commonHttpClient.getBody);
|
|
1305
|
-
}
|
|
1306
|
-
/**
|
|
1307
|
-
* Restores a project that has been archived or placed in the Jira recycle bin.
|
|
1308
|
-
*
|
|
1309
|
-
* **[Permissions](#permissions) required:**
|
|
1310
|
-
*
|
|
1311
|
-
* * *Administer Jira* [global
|
|
1312
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg)for Company managed
|
|
1313
|
-
* projects.
|
|
1314
|
-
* * *Administer Jira* [global
|
|
1315
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects*
|
|
1316
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
1317
|
-
* for Team managed projects.
|
|
1318
|
-
*
|
|
1319
|
-
* @returns Returned if the request is successful.
|
|
1320
|
-
*
|
|
1321
|
-
* example: {
|
|
1322
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
1323
|
-
* "avatarUrls": {
|
|
1324
|
-
* "16x16":
|
|
1325
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
1326
|
-
* "24x24":
|
|
1327
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
1328
|
-
* "32x32":
|
|
1329
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
1330
|
-
* "48x48":
|
|
1331
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
1332
|
-
* },
|
|
1333
|
-
* "components": [
|
|
1334
|
-
* {
|
|
1335
|
-
* "ari":
|
|
1336
|
-
* "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
|
|
1337
|
-
* "assignee": {
|
|
1338
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1339
|
-
* "accountType": "atlassian",
|
|
1340
|
-
* "active": false,
|
|
1341
|
-
* "avatarUrls": {
|
|
1342
|
-
* "16x16":
|
|
1343
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1344
|
-
* "24x24":
|
|
1345
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1346
|
-
* "32x32":
|
|
1347
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1348
|
-
* "48x48":
|
|
1349
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1350
|
-
* },
|
|
1351
|
-
* "displayName": "Mia Krystof",
|
|
1352
|
-
* "key": "",
|
|
1353
|
-
* "name": "",
|
|
1354
|
-
* "self":
|
|
1355
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1356
|
-
* },
|
|
1357
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
1358
|
-
* "description": "This is a Jira component",
|
|
1359
|
-
* "id": "10000",
|
|
1360
|
-
* "isAssigneeTypeValid": false,
|
|
1361
|
-
* "lead": {
|
|
1362
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1363
|
-
* "accountType": "atlassian",
|
|
1364
|
-
* "active": false,
|
|
1365
|
-
* "avatarUrls": {
|
|
1366
|
-
* "16x16":
|
|
1367
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1368
|
-
* "24x24":
|
|
1369
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1370
|
-
* "32x32":
|
|
1371
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1372
|
-
* "48x48":
|
|
1373
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1374
|
-
* },
|
|
1375
|
-
* "displayName": "Mia Krystof",
|
|
1376
|
-
* "key": "",
|
|
1377
|
-
* "name": "",
|
|
1378
|
-
* "self":
|
|
1379
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1380
|
-
* },
|
|
1381
|
-
* "metadata": {
|
|
1382
|
-
* "icon": "https://www.example.com/icon.png"
|
|
1383
|
-
* },
|
|
1384
|
-
* "name": "Component 1",
|
|
1385
|
-
* "project": "HSP",
|
|
1386
|
-
* "projectId": 10000,
|
|
1387
|
-
* "realAssignee": {
|
|
1388
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1389
|
-
* "accountType": "atlassian",
|
|
1390
|
-
* "active": false,
|
|
1391
|
-
* "avatarUrls": {
|
|
1392
|
-
* "16x16":
|
|
1393
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1394
|
-
* "24x24":
|
|
1395
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1396
|
-
* "32x32":
|
|
1397
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1398
|
-
* "48x48":
|
|
1399
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1400
|
-
* },
|
|
1401
|
-
* "displayName": "Mia Krystof",
|
|
1402
|
-
* "key": "",
|
|
1403
|
-
* "name": "",
|
|
1404
|
-
* "self":
|
|
1405
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1406
|
-
* },
|
|
1407
|
-
* "realAssigneeType": "PROJECT_LEAD",
|
|
1408
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
|
|
1409
|
-
* }
|
|
1410
|
-
* ],
|
|
1411
|
-
* "description": "This project was created as an example for REST.",
|
|
1412
|
-
* "email": "from-jira@example.com",
|
|
1413
|
-
* "id": "10000",
|
|
1414
|
-
* "insight": {
|
|
1415
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
1416
|
-
* "totalIssueCount": 100
|
|
1417
|
-
* },
|
|
1418
|
-
* "issueTypes": [
|
|
1419
|
-
* {
|
|
1420
|
-
* "avatarId": 1,
|
|
1421
|
-
* "description": "A task that needs to be done.",
|
|
1422
|
-
* "hierarchyLevel": 0,
|
|
1423
|
-
* "iconUrl":
|
|
1424
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype\",",
|
|
1425
|
-
* "id": "3",
|
|
1426
|
-
* "name": "Task",
|
|
1427
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
|
|
1428
|
-
* "subtask": false
|
|
1429
|
-
* },
|
|
1430
|
-
* {
|
|
1431
|
-
* "avatarId": 10002,
|
|
1432
|
-
* "description": "A problem with the software.",
|
|
1433
|
-
* "entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2",
|
|
1434
|
-
* "hierarchyLevel": 0,
|
|
1435
|
-
* "iconUrl":
|
|
1436
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype\",",
|
|
1437
|
-
* "id": "1",
|
|
1438
|
-
* "name": "Bug",
|
|
1439
|
-
* "scope": {
|
|
1440
|
-
* "project": {
|
|
1441
|
-
* "id": "10000"
|
|
1442
|
-
* },
|
|
1443
|
-
* "type": "PROJECT"
|
|
1444
|
-
* },
|
|
1445
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/1",
|
|
1446
|
-
* "subtask": false
|
|
1447
|
-
* }
|
|
1448
|
-
* ],
|
|
1449
|
-
* "key": "EX",
|
|
1450
|
-
* "lead": {
|
|
1451
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1452
|
-
* "accountType": "atlassian",
|
|
1453
|
-
* "active": false,
|
|
1454
|
-
* "avatarUrls": {
|
|
1455
|
-
* "16x16":
|
|
1456
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1457
|
-
* "24x24":
|
|
1458
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1459
|
-
* "32x32":
|
|
1460
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1461
|
-
* "48x48":
|
|
1462
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1463
|
-
* },
|
|
1464
|
-
* "displayName": "Mia Krystof",
|
|
1465
|
-
* "key": "",
|
|
1466
|
-
* "name": "",
|
|
1467
|
-
* "self":
|
|
1468
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1469
|
-
* },
|
|
1470
|
-
* "name": "Example",
|
|
1471
|
-
* "projectCategory": {
|
|
1472
|
-
* "description": "First Project Category",
|
|
1473
|
-
* "id": "10000",
|
|
1474
|
-
* "name": "FIRST",
|
|
1475
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1476
|
-
* },
|
|
1477
|
-
* "properties": {
|
|
1478
|
-
* "propertyKey": "propertyValue"
|
|
1479
|
-
* },
|
|
1480
|
-
* "roles": {
|
|
1481
|
-
* "Developers":
|
|
1482
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/EX/role/10000"
|
|
1483
|
-
* },
|
|
1484
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
1485
|
-
* "simplified": false,
|
|
1486
|
-
* "style": "classic",
|
|
1487
|
-
* "url": "https://www.example.com",
|
|
1488
|
-
* "versions": []
|
|
1489
|
-
* }
|
|
1490
|
-
* @path {POST} /rest/api/3/project/{projectIdOrKey}/restore
|
|
1491
|
-
* @scopes-current manage:jira-configuration
|
|
1492
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
1493
|
-
* read:user:jira, write:project:jira, read:application-role:jira,
|
|
1494
|
-
* read:avatar:jira, read:group:jira, read:issue-type-hierarchy:jira,
|
|
1495
|
-
* read:project-category:jira, read:project-version:jira,
|
|
1496
|
-
* read:project.component:jira
|
|
1497
|
-
*/
|
|
1498
|
-
restore({
|
|
1499
|
-
projectIdOrKey,
|
|
1500
|
-
}: {
|
|
1501
|
-
/** The project ID or project key (case sensitive). */
|
|
1502
|
-
projectIdOrKey: string;
|
|
1503
|
-
}): Promise<Project> {
|
|
1504
|
-
return this.getClientInstance()
|
|
1505
|
-
.request({
|
|
1506
|
-
path: "/rest/api/3/project/{projectIdOrKey}/restore",
|
|
1507
|
-
method: "POST",
|
|
1508
|
-
pathParams: {
|
|
1509
|
-
projectIdOrKey,
|
|
1510
|
-
},
|
|
1511
|
-
})
|
|
1512
|
-
.then(
|
|
1513
|
-
this.getClientInstance().responseHandler({
|
|
1514
|
-
200: {
|
|
1515
|
-
"application/json": "json",
|
|
1516
|
-
},
|
|
1517
|
-
}),
|
|
1518
|
-
)
|
|
1519
|
-
.then(
|
|
1520
|
-
commonHttpClient.castResponse<{
|
|
1521
|
-
status: 200;
|
|
1522
|
-
mediaType: "application/json";
|
|
1523
|
-
body: Project;
|
|
1524
|
-
}>(),
|
|
1525
|
-
)
|
|
1526
|
-
.then(
|
|
1527
|
-
validationSchemaStorage.validator("ProjectsService.restore.response"),
|
|
1528
|
-
)
|
|
1529
|
-
.then(commonHttpClient.getBody);
|
|
1530
|
-
}
|
|
1531
|
-
/**
|
|
1532
|
-
* Returns a [paginated](#pagination) list of projects visible to the user.
|
|
1533
|
-
*
|
|
1534
|
-
* This operation can be accessed anonymously.
|
|
1535
|
-
*
|
|
1536
|
-
* **[Permissions](#permissions) required:** Projects are returned only where the
|
|
1537
|
-
* user has one of:
|
|
1538
|
-
*
|
|
1539
|
-
* * *Browse Projects* [project
|
|
1540
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1541
|
-
* * *Administer Projects* [project
|
|
1542
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1543
|
-
* * *Administer Jira* [global
|
|
1544
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1545
|
-
*
|
|
1546
|
-
* @returns Returned if the request is successful.
|
|
1547
|
-
*
|
|
1548
|
-
* example: {
|
|
1549
|
-
* "isLast": false,
|
|
1550
|
-
* "maxResults": 2,
|
|
1551
|
-
* "nextPage":
|
|
1552
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/search?startAt=2&maxResults=2",
|
|
1553
|
-
* "self":
|
|
1554
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/search?startAt=0&maxResults=2",
|
|
1555
|
-
* "startAt": 0,
|
|
1556
|
-
* "total": 7,
|
|
1557
|
-
* "values": [
|
|
1558
|
-
* {
|
|
1559
|
-
* "avatarUrls": {
|
|
1560
|
-
* "16x16":
|
|
1561
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
1562
|
-
* "24x24":
|
|
1563
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
1564
|
-
* "32x32":
|
|
1565
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
1566
|
-
* "48x48":
|
|
1567
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
1568
|
-
* },
|
|
1569
|
-
* "id": "10000",
|
|
1570
|
-
* "insight": {
|
|
1571
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
1572
|
-
* "totalIssueCount": 100
|
|
1573
|
-
* },
|
|
1574
|
-
* "key": "EX",
|
|
1575
|
-
* "name": "Example",
|
|
1576
|
-
* "projectCategory": {
|
|
1577
|
-
* "description": "First Project Category",
|
|
1578
|
-
* "id": "10000",
|
|
1579
|
-
* "name": "FIRST",
|
|
1580
|
-
* "self":
|
|
1581
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1582
|
-
* },
|
|
1583
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
1584
|
-
* "simplified": false,
|
|
1585
|
-
* "style": "classic"
|
|
1586
|
-
* },
|
|
1587
|
-
* {
|
|
1588
|
-
* "avatarUrls": {
|
|
1589
|
-
* "16x16":
|
|
1590
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10001",
|
|
1591
|
-
* "24x24":
|
|
1592
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10001",
|
|
1593
|
-
* "32x32":
|
|
1594
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10001",
|
|
1595
|
-
* "48x48":
|
|
1596
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10001"
|
|
1597
|
-
* },
|
|
1598
|
-
* "id": "10001",
|
|
1599
|
-
* "insight": {
|
|
1600
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
1601
|
-
* "totalIssueCount": 100
|
|
1602
|
-
* },
|
|
1603
|
-
* "key": "ABC",
|
|
1604
|
-
* "name": "Alphabetical",
|
|
1605
|
-
* "projectCategory": {
|
|
1606
|
-
* "description": "First Project Category",
|
|
1607
|
-
* "id": "10000",
|
|
1608
|
-
* "name": "FIRST",
|
|
1609
|
-
* "self":
|
|
1610
|
-
* "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1611
|
-
* },
|
|
1612
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/ABC",
|
|
1613
|
-
* "simplified": false,
|
|
1614
|
-
* "style": "classic"
|
|
1615
|
-
* }
|
|
1616
|
-
* ]
|
|
1617
|
-
* }
|
|
1618
|
-
* @path {GET} /rest/api/3/project/search
|
|
1619
|
-
* @scopes-current read:jira-work
|
|
1620
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
1621
|
-
* read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira,
|
|
1622
|
-
* read:issue-type-hierarchy:jira, read:project-category:jira,
|
|
1623
|
-
* read:project-version:jira, read:project.component:jira
|
|
1624
|
-
*/
|
|
1625
|
-
searchProjects({
|
|
1626
|
-
startAt,
|
|
1627
|
-
maxResults,
|
|
1628
|
-
orderBy,
|
|
1629
|
-
id,
|
|
1630
|
-
keys,
|
|
1631
|
-
query,
|
|
1632
|
-
typeKey,
|
|
1633
|
-
categoryId,
|
|
1634
|
-
action,
|
|
1635
|
-
expand,
|
|
1636
|
-
status,
|
|
1637
|
-
properties,
|
|
1638
|
-
propertyQuery,
|
|
1639
|
-
}: {
|
|
1640
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
1641
|
-
startAt?: number;
|
|
1642
|
-
/** The maximum number of items to return per page. */
|
|
1643
|
-
maxResults?: number;
|
|
1644
|
-
/**
|
|
1645
|
-
* [Order](#ordering) the results by a field.
|
|
1646
|
-
*
|
|
1647
|
-
* * `category` Sorts by project category. A complete list of category IDs is
|
|
1648
|
-
* found using [Get all project categories](#api-rest-api-3-projectCategory-get).
|
|
1649
|
-
* * `issueCount` Sorts by the total number of issues in each project.
|
|
1650
|
-
* * `key` Sorts by project key.
|
|
1651
|
-
* * `lastIssueUpdatedTime` Sorts by the last issue update time.
|
|
1652
|
-
* * `name` Sorts by project name.
|
|
1653
|
-
* * `owner` Sorts by project lead.
|
|
1654
|
-
* * `archivedDate` EXPERIMENTAL. Sorts by project archived date.
|
|
1655
|
-
* * `deletedDate` EXPERIMENTAL. Sorts by project deleted date.
|
|
1656
|
-
*/
|
|
1657
|
-
orderBy?:
|
|
1658
|
-
| "category"
|
|
1659
|
-
| "-category"
|
|
1660
|
-
| "+category"
|
|
1661
|
-
| "key"
|
|
1662
|
-
| "-key"
|
|
1663
|
-
| "+key"
|
|
1664
|
-
| "name"
|
|
1665
|
-
| "-name"
|
|
1666
|
-
| "+name"
|
|
1667
|
-
| "owner"
|
|
1668
|
-
| "-owner"
|
|
1669
|
-
| "+owner"
|
|
1670
|
-
| "issueCount"
|
|
1671
|
-
| "-issueCount"
|
|
1672
|
-
| "+issueCount"
|
|
1673
|
-
| "lastIssueUpdatedDate"
|
|
1674
|
-
| "-lastIssueUpdatedDate"
|
|
1675
|
-
| "+lastIssueUpdatedDate"
|
|
1676
|
-
| "archivedDate"
|
|
1677
|
-
| "+archivedDate"
|
|
1678
|
-
| "-archivedDate"
|
|
1679
|
-
| "deletedDate"
|
|
1680
|
-
| "+deletedDate"
|
|
1681
|
-
| "-deletedDate";
|
|
1682
|
-
/**
|
|
1683
|
-
* The project IDs to filter the results by. To include multiple IDs, provide an
|
|
1684
|
-
* ampersand-separated list. For example, `id=10000&id=10001`. Up to 50 project
|
|
1685
|
-
* IDs can be provided.
|
|
1686
|
-
*/
|
|
1687
|
-
id?: number[];
|
|
1688
|
-
/**
|
|
1689
|
-
* The project keys to filter the results by. To include multiple keys, provide an
|
|
1690
|
-
* ampersand-separated list. For example, `keys=PA&keys=PB`. Up to 50 project keys
|
|
1691
|
-
* can be provided.
|
|
1692
|
-
*/
|
|
1693
|
-
keys?: string[];
|
|
1694
|
-
/**
|
|
1695
|
-
* Filter the results using a literal string. Projects with a matching `key` or
|
|
1696
|
-
* `name` are returned (case insensitive).
|
|
1697
|
-
*/
|
|
1698
|
-
query?: string;
|
|
1699
|
-
/**
|
|
1700
|
-
* Orders results by the [project
|
|
1701
|
-
* type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes).
|
|
1702
|
-
* This parameter accepts a comma-separated list. Valid values are `business`,
|
|
1703
|
-
* `service_desk`, and `software`.
|
|
1704
|
-
*/
|
|
1705
|
-
typeKey?: string;
|
|
1706
|
-
/**
|
|
1707
|
-
* The ID of the project's category. A complete list of category IDs is found
|
|
1708
|
-
* using the [Get all project categories](#api-rest-api-3-projectCategory-get)
|
|
1709
|
-
* operation.
|
|
1710
|
-
*/
|
|
1711
|
-
categoryId?: number;
|
|
1712
|
-
/**
|
|
1713
|
-
* Filter results by projects for which the user can:
|
|
1714
|
-
*
|
|
1715
|
-
* * `view` the project, meaning that they have one of the following permissions:
|
|
1716
|
-
*
|
|
1717
|
-
* * *Browse projects* [project
|
|
1718
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1719
|
-
* * *Administer projects* [project
|
|
1720
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1721
|
-
* * *Administer Jira* [global
|
|
1722
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1723
|
-
* * `browse` the project, meaning that they have the *Browse projects* [project
|
|
1724
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1725
|
-
* * `edit` the project, meaning that they have one of the following permissions:
|
|
1726
|
-
*
|
|
1727
|
-
* * *Administer projects* [project
|
|
1728
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
1729
|
-
* * *Administer Jira* [global
|
|
1730
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1731
|
-
* * `create` the project, meaning that they have the *Create issues* [project
|
|
1732
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project in which
|
|
1733
|
-
* the issue is created.
|
|
1734
|
-
*/
|
|
1735
|
-
action?: "view" | "browse" | "edit" | "create";
|
|
1736
|
-
/**
|
|
1737
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
1738
|
-
* This parameter accepts a comma-separated list. Expanded options include:
|
|
1739
|
-
*
|
|
1740
|
-
* * `description` Returns the project description.
|
|
1741
|
-
* * `projectKeys` Returns all project keys associated with a project.
|
|
1742
|
-
* * `lead` Returns information about the project lead.
|
|
1743
|
-
* * `issueTypes` Returns all issue types associated with the project.
|
|
1744
|
-
* * `url` Returns the URL associated with the project.
|
|
1745
|
-
* * `insight` EXPERIMENTAL. Returns the insight details of total issue count
|
|
1746
|
-
* and last issue update time for the project.
|
|
1747
|
-
*/
|
|
1748
|
-
expand?: string;
|
|
1749
|
-
/**
|
|
1750
|
-
* EXPERIMENTAL. Filter results by project status:
|
|
1751
|
-
*
|
|
1752
|
-
* * `live` Search live projects.
|
|
1753
|
-
* * `archived` Search archived projects.
|
|
1754
|
-
* * `deleted` Search deleted projects, those in the recycle bin.
|
|
1755
|
-
*/
|
|
1756
|
-
status?: ("live" | "archived" | "deleted")[];
|
|
1757
|
-
/**
|
|
1758
|
-
* EXPERIMENTAL. A list of project properties to return for the project. This
|
|
1759
|
-
* parameter accepts a comma-separated list.
|
|
1760
|
-
*/
|
|
1761
|
-
properties?: StringList[];
|
|
1762
|
-
/**
|
|
1763
|
-
* EXPERIMENTAL. A query string used to search properties. The query string cannot
|
|
1764
|
-
* be specified using a JSON object. For example, to search for the value of
|
|
1765
|
-
* `nested` from `{"something":{"nested":1,"other":2}}` use
|
|
1766
|
-
* `[thepropertykey].something.nested=1`. Note that the propertyQuery key is
|
|
1767
|
-
* enclosed in square brackets to enable searching where the propertyQuery key
|
|
1768
|
-
* includes dot (.) or equals (=) characters. Note that `thepropertykey` is only
|
|
1769
|
-
* returned when included in `properties`.
|
|
1770
|
-
*/
|
|
1771
|
-
propertyQuery?: string;
|
|
1772
|
-
}): Promise<PageBeanProject> {
|
|
1773
|
-
return this.getClientInstance()
|
|
1774
|
-
.request({
|
|
1775
|
-
path: "/rest/api/3/project/search",
|
|
1776
|
-
method: "GET",
|
|
1777
|
-
query: {
|
|
1778
|
-
startAt,
|
|
1779
|
-
maxResults,
|
|
1780
|
-
orderBy,
|
|
1781
|
-
id,
|
|
1782
|
-
keys,
|
|
1783
|
-
query,
|
|
1784
|
-
typeKey,
|
|
1785
|
-
categoryId,
|
|
1786
|
-
action,
|
|
1787
|
-
expand,
|
|
1788
|
-
status,
|
|
1789
|
-
properties,
|
|
1790
|
-
propertyQuery,
|
|
1791
|
-
},
|
|
1792
|
-
})
|
|
1793
|
-
.then(
|
|
1794
|
-
this.getClientInstance().responseHandler({
|
|
1795
|
-
200: {
|
|
1796
|
-
"application/json": "json",
|
|
1797
|
-
},
|
|
1798
|
-
}),
|
|
1799
|
-
)
|
|
1800
|
-
.then(
|
|
1801
|
-
commonHttpClient.castResponse<{
|
|
1802
|
-
status: 200;
|
|
1803
|
-
mediaType: "application/json";
|
|
1804
|
-
body: PageBeanProject;
|
|
1805
|
-
}>(),
|
|
1806
|
-
)
|
|
1807
|
-
.then(
|
|
1808
|
-
validationSchemaStorage.validator(
|
|
1809
|
-
"ProjectsService.searchProjects.response",
|
|
1810
|
-
),
|
|
1811
|
-
)
|
|
1812
|
-
.then(commonHttpClient.getBody);
|
|
1813
|
-
}
|
|
1814
|
-
/**
|
|
1815
|
-
* Updates the [project details](https://confluence.atlassian.com/x/ahLpNw) of a
|
|
1816
|
-
* project.
|
|
1817
|
-
*
|
|
1818
|
-
* All parameters are optional in the body of the request. Schemes will only be
|
|
1819
|
-
* updated if they are included in the request, any omitted schemes will be left
|
|
1820
|
-
* unchanged.
|
|
1821
|
-
*
|
|
1822
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
1823
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg). is only needed when
|
|
1824
|
-
* changing the schemes or project key. Otherwise you will only need *Administer
|
|
1825
|
-
* Projects* [project permission](https://confluence.atlassian.com/x/yodKLg)
|
|
1826
|
-
*
|
|
1827
|
-
* @returns Returned if the project is updated.
|
|
1828
|
-
*
|
|
1829
|
-
* example: {
|
|
1830
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
1831
|
-
* "avatarUrls": {
|
|
1832
|
-
* "16x16":
|
|
1833
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
|
|
1834
|
-
* "24x24":
|
|
1835
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
|
|
1836
|
-
* "32x32":
|
|
1837
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
|
|
1838
|
-
* "48x48":
|
|
1839
|
-
* "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
|
|
1840
|
-
* },
|
|
1841
|
-
* "components": [
|
|
1842
|
-
* {
|
|
1843
|
-
* "ari":
|
|
1844
|
-
* "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
|
|
1845
|
-
* "assignee": {
|
|
1846
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1847
|
-
* "accountType": "atlassian",
|
|
1848
|
-
* "active": false,
|
|
1849
|
-
* "avatarUrls": {
|
|
1850
|
-
* "16x16":
|
|
1851
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1852
|
-
* "24x24":
|
|
1853
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1854
|
-
* "32x32":
|
|
1855
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1856
|
-
* "48x48":
|
|
1857
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1858
|
-
* },
|
|
1859
|
-
* "displayName": "Mia Krystof",
|
|
1860
|
-
* "key": "",
|
|
1861
|
-
* "name": "",
|
|
1862
|
-
* "self":
|
|
1863
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1864
|
-
* },
|
|
1865
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
1866
|
-
* "description": "This is a Jira component",
|
|
1867
|
-
* "id": "10000",
|
|
1868
|
-
* "isAssigneeTypeValid": false,
|
|
1869
|
-
* "lead": {
|
|
1870
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1871
|
-
* "accountType": "atlassian",
|
|
1872
|
-
* "active": false,
|
|
1873
|
-
* "avatarUrls": {
|
|
1874
|
-
* "16x16":
|
|
1875
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1876
|
-
* "24x24":
|
|
1877
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1878
|
-
* "32x32":
|
|
1879
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1880
|
-
* "48x48":
|
|
1881
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1882
|
-
* },
|
|
1883
|
-
* "displayName": "Mia Krystof",
|
|
1884
|
-
* "key": "",
|
|
1885
|
-
* "name": "",
|
|
1886
|
-
* "self":
|
|
1887
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1888
|
-
* },
|
|
1889
|
-
* "metadata": {
|
|
1890
|
-
* "icon": "https://www.example.com/icon.png"
|
|
1891
|
-
* },
|
|
1892
|
-
* "name": "Component 1",
|
|
1893
|
-
* "project": "HSP",
|
|
1894
|
-
* "projectId": 10000,
|
|
1895
|
-
* "realAssignee": {
|
|
1896
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1897
|
-
* "accountType": "atlassian",
|
|
1898
|
-
* "active": false,
|
|
1899
|
-
* "avatarUrls": {
|
|
1900
|
-
* "16x16":
|
|
1901
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1902
|
-
* "24x24":
|
|
1903
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1904
|
-
* "32x32":
|
|
1905
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1906
|
-
* "48x48":
|
|
1907
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1908
|
-
* },
|
|
1909
|
-
* "displayName": "Mia Krystof",
|
|
1910
|
-
* "key": "",
|
|
1911
|
-
* "name": "",
|
|
1912
|
-
* "self":
|
|
1913
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1914
|
-
* },
|
|
1915
|
-
* "realAssigneeType": "PROJECT_LEAD",
|
|
1916
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
|
|
1917
|
-
* }
|
|
1918
|
-
* ],
|
|
1919
|
-
* "description": "This project was created as an example for REST.",
|
|
1920
|
-
* "email": "from-jira@example.com",
|
|
1921
|
-
* "id": "10000",
|
|
1922
|
-
* "insight": {
|
|
1923
|
-
* "lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
|
|
1924
|
-
* "totalIssueCount": 100
|
|
1925
|
-
* },
|
|
1926
|
-
* "issueTypes": [
|
|
1927
|
-
* {
|
|
1928
|
-
* "avatarId": 1,
|
|
1929
|
-
* "description": "A task that needs to be done.",
|
|
1930
|
-
* "hierarchyLevel": 0,
|
|
1931
|
-
* "iconUrl":
|
|
1932
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype\",",
|
|
1933
|
-
* "id": "3",
|
|
1934
|
-
* "name": "Task",
|
|
1935
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
|
|
1936
|
-
* "subtask": false
|
|
1937
|
-
* },
|
|
1938
|
-
* {
|
|
1939
|
-
* "avatarId": 10002,
|
|
1940
|
-
* "description": "A problem with the software.",
|
|
1941
|
-
* "entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2",
|
|
1942
|
-
* "hierarchyLevel": 0,
|
|
1943
|
-
* "iconUrl":
|
|
1944
|
-
* "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype\",",
|
|
1945
|
-
* "id": "1",
|
|
1946
|
-
* "name": "Bug",
|
|
1947
|
-
* "scope": {
|
|
1948
|
-
* "project": {
|
|
1949
|
-
* "id": "10000"
|
|
1950
|
-
* },
|
|
1951
|
-
* "type": "PROJECT"
|
|
1952
|
-
* },
|
|
1953
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/issueType/1",
|
|
1954
|
-
* "subtask": false
|
|
1955
|
-
* }
|
|
1956
|
-
* ],
|
|
1957
|
-
* "key": "EX",
|
|
1958
|
-
* "lead": {
|
|
1959
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
1960
|
-
* "accountType": "atlassian",
|
|
1961
|
-
* "active": false,
|
|
1962
|
-
* "avatarUrls": {
|
|
1963
|
-
* "16x16":
|
|
1964
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
1965
|
-
* "24x24":
|
|
1966
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
1967
|
-
* "32x32":
|
|
1968
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
1969
|
-
* "48x48":
|
|
1970
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
1971
|
-
* },
|
|
1972
|
-
* "displayName": "Mia Krystof",
|
|
1973
|
-
* "key": "",
|
|
1974
|
-
* "name": "",
|
|
1975
|
-
* "self":
|
|
1976
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
|
|
1977
|
-
* },
|
|
1978
|
-
* "name": "Example",
|
|
1979
|
-
* "projectCategory": {
|
|
1980
|
-
* "description": "First Project Category",
|
|
1981
|
-
* "id": "10000",
|
|
1982
|
-
* "name": "FIRST",
|
|
1983
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
|
|
1984
|
-
* },
|
|
1985
|
-
* "properties": {
|
|
1986
|
-
* "propertyKey": "propertyValue"
|
|
1987
|
-
* },
|
|
1988
|
-
* "roles": {
|
|
1989
|
-
* "Developers":
|
|
1990
|
-
* "https://your-domain.atlassian.net/rest/api/3/project/EX/role/10000"
|
|
1991
|
-
* },
|
|
1992
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
|
|
1993
|
-
* "simplified": false,
|
|
1994
|
-
* "style": "classic",
|
|
1995
|
-
* "url": "https://www.example.com",
|
|
1996
|
-
* "versions": []
|
|
1997
|
-
* }
|
|
1998
|
-
* @path {PUT} /rest/api/3/project/{projectIdOrKey}
|
|
1999
|
-
* @scopes-current manage:jira-project
|
|
2000
|
-
* @scopes-beta read:issue-type:jira, read:project:jira, read:project.property:jira,
|
|
2001
|
-
* read:user:jira, write:project:jira, write:project.avatar:jira,
|
|
2002
|
-
* read:application-role:jira, read:avatar:jira, read:group:jira,
|
|
2003
|
-
* read:issue-type-hierarchy:jira, read:project-category:jira,
|
|
2004
|
-
* read:project-version:jira, read:project.component:jira
|
|
2005
|
-
*/
|
|
2006
|
-
updateProject({
|
|
2007
|
-
projectIdOrKey,
|
|
2008
|
-
expand,
|
|
2009
|
-
updateProjectDetails,
|
|
2010
|
-
}: {
|
|
2011
|
-
/** The project ID or project key (case sensitive). */
|
|
2012
|
-
projectIdOrKey: string;
|
|
2013
|
-
/**
|
|
2014
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
2015
|
-
* This parameter accepts a comma-separated list. Note that the project
|
|
2016
|
-
* description, issue types, and project lead are included in all responses by
|
|
2017
|
-
* default. Expand options include:
|
|
2018
|
-
*
|
|
2019
|
-
* * `description` The project description.
|
|
2020
|
-
* * `issueTypes` The issue types associated with the project.
|
|
2021
|
-
* * `lead` The project lead.
|
|
2022
|
-
* * `projectKeys` All project keys associated with the project.
|
|
2023
|
-
*/
|
|
2024
|
-
expand?: string;
|
|
2025
|
-
/**
|
|
2026
|
-
* The project details to be updated.
|
|
2027
|
-
*
|
|
2028
|
-
* @example {
|
|
2029
|
-
* "assigneeType": "PROJECT_LEAD",
|
|
2030
|
-
* "avatarId": 10200,
|
|
2031
|
-
* "categoryId": 10120,
|
|
2032
|
-
* "description": "Cloud migration initiative",
|
|
2033
|
-
* "issueSecurityScheme": 10001,
|
|
2034
|
-
* "key": "EX",
|
|
2035
|
-
* "leadAccountId": "5b10a0effa615349cb016cd8",
|
|
2036
|
-
* "name": "Example",
|
|
2037
|
-
* "notificationScheme": 10021,
|
|
2038
|
-
* "permissionScheme": 10011,
|
|
2039
|
-
* "url": "http://atlassian.com"
|
|
2040
|
-
* }
|
|
2041
|
-
*/
|
|
2042
|
-
updateProjectDetails: UpdateProjectDetails;
|
|
2043
|
-
}): Promise<Project> {
|
|
2044
|
-
return this.getClientInstance()
|
|
2045
|
-
.request({
|
|
2046
|
-
path: "/rest/api/3/project/{projectIdOrKey}",
|
|
2047
|
-
method: "PUT",
|
|
2048
|
-
pathParams: {
|
|
2049
|
-
projectIdOrKey,
|
|
2050
|
-
},
|
|
2051
|
-
query: {
|
|
2052
|
-
expand,
|
|
2053
|
-
},
|
|
2054
|
-
headers: {
|
|
2055
|
-
"Content-Type": "application/json",
|
|
2056
|
-
},
|
|
2057
|
-
body: updateProjectDetails,
|
|
2058
|
-
})
|
|
2059
|
-
.then(
|
|
2060
|
-
this.getClientInstance().responseHandler({
|
|
2061
|
-
200: {
|
|
2062
|
-
"application/json": "json",
|
|
2063
|
-
},
|
|
2064
|
-
}),
|
|
2065
|
-
)
|
|
2066
|
-
.then(
|
|
2067
|
-
commonHttpClient.castResponse<{
|
|
2068
|
-
status: 200;
|
|
2069
|
-
mediaType: "application/json";
|
|
2070
|
-
body: Project;
|
|
2071
|
-
}>(),
|
|
2072
|
-
)
|
|
2073
|
-
.then(
|
|
2074
|
-
validationSchemaStorage.validator(
|
|
2075
|
-
"ProjectsService.updateProject.response",
|
|
2076
|
-
),
|
|
2077
|
-
)
|
|
2078
|
-
.then(commonHttpClient.getBody);
|
|
2079
|
-
}
|
|
2080
|
-
static initialize() {
|
|
2081
|
-
validationSchemaStorage.registerExtensible(
|
|
2082
|
-
"ProjectsService.getAllProjects.response",
|
|
2083
|
-
z
|
|
2084
|
-
.object({
|
|
2085
|
-
status: z.literal(200),
|
|
2086
|
-
mediaType: z.literal("application/json"),
|
|
2087
|
-
body: z.array(validationSchemaStorage.lazy("Project")),
|
|
2088
|
-
})
|
|
2089
|
-
.describe("ProjectsService.getAllProjects.response"),
|
|
2090
|
-
);
|
|
2091
|
-
validationSchemaStorage.registerExtensible(
|
|
2092
|
-
"ProjectsService.createProject.response",
|
|
2093
|
-
z
|
|
2094
|
-
.object({
|
|
2095
|
-
status: z.literal(201),
|
|
2096
|
-
mediaType: z.literal("application/json"),
|
|
2097
|
-
body: validationSchemaStorage.lazy("ProjectIdentifiers"),
|
|
2098
|
-
})
|
|
2099
|
-
.describe("ProjectsService.createProject.response"),
|
|
2100
|
-
);
|
|
2101
|
-
validationSchemaStorage.registerExtensible(
|
|
2102
|
-
"ProjectsService.getHierarchy.response",
|
|
2103
|
-
z
|
|
2104
|
-
.object({
|
|
2105
|
-
status: z.literal(200),
|
|
2106
|
-
mediaType: z.literal("application/json"),
|
|
2107
|
-
body: validationSchemaStorage.lazy("ProjectIssueTypeHierarchy"),
|
|
2108
|
-
})
|
|
2109
|
-
.describe("ProjectsService.getHierarchy.response"),
|
|
2110
|
-
);
|
|
2111
|
-
validationSchemaStorage.registerExtensible(
|
|
2112
|
-
"ProjectsService.getProject.response",
|
|
2113
|
-
z
|
|
2114
|
-
.object({
|
|
2115
|
-
status: z.literal(200),
|
|
2116
|
-
mediaType: z.literal("application/json"),
|
|
2117
|
-
body: validationSchemaStorage.lazy("Project"),
|
|
2118
|
-
})
|
|
2119
|
-
.describe("ProjectsService.getProject.response"),
|
|
2120
|
-
);
|
|
2121
|
-
validationSchemaStorage.registerExtensible(
|
|
2122
|
-
"ProjectsService.updateProject.response",
|
|
2123
|
-
z
|
|
2124
|
-
.object({
|
|
2125
|
-
status: z.literal(200),
|
|
2126
|
-
mediaType: z.literal("application/json"),
|
|
2127
|
-
body: validationSchemaStorage.lazy("Project"),
|
|
2128
|
-
})
|
|
2129
|
-
.describe("ProjectsService.updateProject.response"),
|
|
2130
|
-
);
|
|
2131
|
-
validationSchemaStorage.registerExtensible(
|
|
2132
|
-
"ProjectsService.archiveProject.response",
|
|
2133
|
-
z
|
|
2134
|
-
.object({
|
|
2135
|
-
status: z.literal(204),
|
|
2136
|
-
mediaType: z.literal("application/json"),
|
|
2137
|
-
body: z.unknown(),
|
|
2138
|
-
})
|
|
2139
|
-
.describe("ProjectsService.archiveProject.response"),
|
|
2140
|
-
);
|
|
2141
|
-
validationSchemaStorage.registerExtensible(
|
|
2142
|
-
"ProjectsService.restore.response",
|
|
2143
|
-
z
|
|
2144
|
-
.object({
|
|
2145
|
-
status: z.literal(200),
|
|
2146
|
-
mediaType: z.literal("application/json"),
|
|
2147
|
-
body: validationSchemaStorage.lazy("Project"),
|
|
2148
|
-
})
|
|
2149
|
-
.describe("ProjectsService.restore.response"),
|
|
2150
|
-
);
|
|
2151
|
-
validationSchemaStorage.registerExtensible(
|
|
2152
|
-
"ProjectsService.getAllStatuses.response",
|
|
2153
|
-
z
|
|
2154
|
-
.object({
|
|
2155
|
-
status: z.literal(200),
|
|
2156
|
-
mediaType: z.literal("application/json"),
|
|
2157
|
-
body: z.array(validationSchemaStorage.lazy("IssueTypeWithStatus")),
|
|
2158
|
-
})
|
|
2159
|
-
.describe("ProjectsService.getAllStatuses.response"),
|
|
2160
|
-
);
|
|
2161
|
-
validationSchemaStorage.registerExtensible(
|
|
2162
|
-
"ProjectsService.getNotificationSchemeForProject.response",
|
|
2163
|
-
z
|
|
2164
|
-
.object({
|
|
2165
|
-
status: z.literal(200),
|
|
2166
|
-
mediaType: z.literal("application/json"),
|
|
2167
|
-
body: validationSchemaStorage.lazy("NotificationScheme"),
|
|
2168
|
-
})
|
|
2169
|
-
.describe("ProjectsService.getNotificationSchemeForProject.response"),
|
|
2170
|
-
);
|
|
2171
|
-
validationSchemaStorage.registerExtensible(
|
|
2172
|
-
"ProjectsService.getRecent.response",
|
|
2173
|
-
z
|
|
2174
|
-
.object({
|
|
2175
|
-
status: z.literal(200),
|
|
2176
|
-
mediaType: z.literal("application/json"),
|
|
2177
|
-
body: z.array(validationSchemaStorage.lazy("Project")),
|
|
2178
|
-
})
|
|
2179
|
-
.describe("ProjectsService.getRecent.response"),
|
|
2180
|
-
);
|
|
2181
|
-
validationSchemaStorage.registerExtensible(
|
|
2182
|
-
"ProjectsService.searchProjects.response",
|
|
2183
|
-
z
|
|
2184
|
-
.object({
|
|
2185
|
-
status: z.literal(200),
|
|
2186
|
-
mediaType: z.literal("application/json"),
|
|
2187
|
-
body: validationSchemaStorage.lazy("PageBeanProject"),
|
|
2188
|
-
})
|
|
2189
|
-
.describe("ProjectsService.searchProjects.response"),
|
|
2190
|
-
);
|
|
2191
|
-
validationSchemaStorage.registerOnce([
|
|
2192
|
-
registerCommonValidationSchemas,
|
|
2193
|
-
registerProjectsValidationSchemas,
|
|
2194
|
-
]);
|
|
2195
|
-
}
|
|
2196
|
-
}
|