@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,495 +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 { validationSchemaStorage } from "../validation-schema-storage";
|
|
9
|
-
/**
|
|
10
|
-
* Send security information to Jira Software and enable your teams to turn
|
|
11
|
-
* unplanned vulnerabilities into planned and tracked work.
|
|
12
|
-
*
|
|
13
|
-
* Security is everyone's responsibility, and the security feature in Jira lets
|
|
14
|
-
* you triage and track relevant vulnerabilities as a team. Discuss and prioritise
|
|
15
|
-
* issues, minimise errors and duplication, and plan security work to complete in
|
|
16
|
-
* your sprints.
|
|
17
|
-
*
|
|
18
|
-
* APIs related to integrating Security information with Jira Software are
|
|
19
|
-
* available to Atlassian Connect apps. To use these APIs you must have the
|
|
20
|
-
* Security module in your app's descriptor. Read more about Jira Software modules
|
|
21
|
-
* [here](https://developer.atlassian.com/cloud/jira/software/about-jira-modules/).
|
|
22
|
-
*/
|
|
23
|
-
export class SecurityInformationService extends CommonHttpService {
|
|
24
|
-
/**
|
|
25
|
-
* Bulk delete all linked Security Workspaces that match the given request.
|
|
26
|
-
*
|
|
27
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
28
|
-
* this resource.
|
|
29
|
-
* This resource requires the 'DELETE' scope for Connect apps.
|
|
30
|
-
*
|
|
31
|
-
* e.g. DELETE /bulk?workspaceIds=111-222-333,444-555-666
|
|
32
|
-
*
|
|
33
|
-
* @path {DELETE} /rest/security/1.0/linkedWorkspaces/bulk
|
|
34
|
-
*/
|
|
35
|
-
deleteLinkedWorkspaces({
|
|
36
|
-
authorization,
|
|
37
|
-
}: {
|
|
38
|
-
/**
|
|
39
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
40
|
-
* Provider app installed in Jira.
|
|
41
|
-
*
|
|
42
|
-
* If the JWT token corresponds to an app that does not define the Security
|
|
43
|
-
* Information module it will be rejected with a 403.
|
|
44
|
-
*
|
|
45
|
-
* Read [understanding
|
|
46
|
-
* jwt](https://developer.atlassian.com/blog/2015/01/understanding-jwt/) for more
|
|
47
|
-
* details.
|
|
48
|
-
*/
|
|
49
|
-
authorization: string;
|
|
50
|
-
}): Promise<void> {
|
|
51
|
-
return this.getClientInstance()
|
|
52
|
-
.request({
|
|
53
|
-
path: "/rest/security/1.0/linkedWorkspaces/bulk",
|
|
54
|
-
method: "DELETE",
|
|
55
|
-
headers: {
|
|
56
|
-
Authorization: authorization,
|
|
57
|
-
},
|
|
58
|
-
})
|
|
59
|
-
.then(commonHttpClient.discardResult);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Bulk delete all Vulnerabilities that match the given request.
|
|
63
|
-
*
|
|
64
|
-
* One or more query params must be supplied to specify Properties to delete by.
|
|
65
|
-
* If more than one Property is provided, data will be deleted that matches ALL of
|
|
66
|
-
* the Properties (e.g. treated as an AND).
|
|
67
|
-
* Read the POST bulk endpoint documentation for more details.
|
|
68
|
-
*
|
|
69
|
-
* e.g. DELETE /bulkByProperties?accountId=account-123&createdBy=user-456
|
|
70
|
-
*
|
|
71
|
-
* Deletion is performed asynchronously. The GET vulnerability endpoint can be
|
|
72
|
-
* used to confirm that data has been deleted successfully (if needed).
|
|
73
|
-
*
|
|
74
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
75
|
-
* this resource.
|
|
76
|
-
* This resource requires the 'DELETE' scope for Connect apps.
|
|
77
|
-
*
|
|
78
|
-
* @path {DELETE} /rest/security/1.0/bulkByProperties
|
|
79
|
-
*/
|
|
80
|
-
deleteVulnerabilitiesByProperty({
|
|
81
|
-
authorization,
|
|
82
|
-
}: {
|
|
83
|
-
/**
|
|
84
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
85
|
-
* Provider app installed in Jira.
|
|
86
|
-
*
|
|
87
|
-
* If the JWT token corresponds to an app that does not define Security
|
|
88
|
-
* Information module it will be rejected with a 403.
|
|
89
|
-
*
|
|
90
|
-
* Read more about JWT
|
|
91
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
92
|
-
*/
|
|
93
|
-
authorization: string;
|
|
94
|
-
}): Promise<void> {
|
|
95
|
-
return this.getClientInstance()
|
|
96
|
-
.request({
|
|
97
|
-
path: "/rest/security/1.0/bulkByProperties",
|
|
98
|
-
method: "DELETE",
|
|
99
|
-
headers: {
|
|
100
|
-
Authorization: authorization,
|
|
101
|
-
},
|
|
102
|
-
})
|
|
103
|
-
.then(commonHttpClient.discardResult);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Delete the Vulnerability data currently stored for the given ID.
|
|
107
|
-
*
|
|
108
|
-
* Deletion is performed asynchronously. The GET vulnerability endpoint can be
|
|
109
|
-
* used to confirm that data has been deleted successfully (if needed).
|
|
110
|
-
*
|
|
111
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
112
|
-
* this resource.
|
|
113
|
-
* This resource requires the 'DELETE' scope for Connect apps.
|
|
114
|
-
*
|
|
115
|
-
* @path {DELETE} /rest/security/1.0/vulnerability/{vulnerabilityId}
|
|
116
|
-
*/
|
|
117
|
-
deleteVulnerabilityById({
|
|
118
|
-
vulnerabilityId,
|
|
119
|
-
authorization,
|
|
120
|
-
}: {
|
|
121
|
-
/** The ID of the Vulnerability to delete. */
|
|
122
|
-
vulnerabilityId: string;
|
|
123
|
-
/**
|
|
124
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
125
|
-
* Provider app installed in Jira.
|
|
126
|
-
*
|
|
127
|
-
* If the JWT token corresponds to an app that does not define Security
|
|
128
|
-
* Information module it will be rejected with a 403.
|
|
129
|
-
*
|
|
130
|
-
* Read more about JWT
|
|
131
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
132
|
-
*/
|
|
133
|
-
authorization: string;
|
|
134
|
-
}): Promise<void> {
|
|
135
|
-
return this.getClientInstance()
|
|
136
|
-
.request({
|
|
137
|
-
path: "/rest/security/1.0/vulnerability/{vulnerabilityId}",
|
|
138
|
-
method: "DELETE",
|
|
139
|
-
pathParams: {
|
|
140
|
-
vulnerabilityId,
|
|
141
|
-
},
|
|
142
|
-
headers: {
|
|
143
|
-
Authorization: authorization,
|
|
144
|
-
},
|
|
145
|
-
})
|
|
146
|
-
.then(commonHttpClient.discardResult);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Retrieve a specific Security Workspace linked to the Jira site for the given
|
|
150
|
-
* workspace ID.
|
|
151
|
-
*
|
|
152
|
-
* The result will be what is currently stored, ignoring any pending updates or
|
|
153
|
-
* deletes.
|
|
154
|
-
*
|
|
155
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
156
|
-
* this resource.
|
|
157
|
-
* This resource requires the 'READ' scope for Connect apps.
|
|
158
|
-
*
|
|
159
|
-
* @returns The Security Workspace information stored for the given ID.
|
|
160
|
-
* @path {GET} /rest/security/1.0/linkedWorkspaces/{workspaceId}
|
|
161
|
-
*/
|
|
162
|
-
getLinkedWorkspaceById({
|
|
163
|
-
workspaceId,
|
|
164
|
-
authorization,
|
|
165
|
-
}: {
|
|
166
|
-
/** The ID of the workspace to fetch. */
|
|
167
|
-
workspaceId: string;
|
|
168
|
-
/**
|
|
169
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
170
|
-
* Provider app installed in Jira.
|
|
171
|
-
*
|
|
172
|
-
* If the JWT token corresponds to an app that does not define the Security
|
|
173
|
-
* Information module it will be rejected with a 403.
|
|
174
|
-
*
|
|
175
|
-
* Read more about JWT
|
|
176
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
177
|
-
*/
|
|
178
|
-
authorization: string;
|
|
179
|
-
}): Promise<unknown> {
|
|
180
|
-
return this.getClientInstance()
|
|
181
|
-
.request({
|
|
182
|
-
path: "/rest/security/1.0/linkedWorkspaces/{workspaceId}",
|
|
183
|
-
method: "GET",
|
|
184
|
-
pathParams: {
|
|
185
|
-
workspaceId,
|
|
186
|
-
},
|
|
187
|
-
headers: {
|
|
188
|
-
Authorization: authorization,
|
|
189
|
-
},
|
|
190
|
-
})
|
|
191
|
-
.then(
|
|
192
|
-
this.getClientInstance().responseHandler({
|
|
193
|
-
200: {
|
|
194
|
-
"application/json": "json",
|
|
195
|
-
},
|
|
196
|
-
}),
|
|
197
|
-
)
|
|
198
|
-
.then(
|
|
199
|
-
commonHttpClient.castResponse<{
|
|
200
|
-
status: 200;
|
|
201
|
-
mediaType: "application/json";
|
|
202
|
-
body: unknown;
|
|
203
|
-
}>(),
|
|
204
|
-
)
|
|
205
|
-
.then(
|
|
206
|
-
validationSchemaStorage.validator(
|
|
207
|
-
"SecurityInformationService.getLinkedWorkspaceById.response",
|
|
208
|
-
),
|
|
209
|
-
)
|
|
210
|
-
.then(commonHttpClient.getBody);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Retrieve all Security Workspaces linked with the Jira site.
|
|
214
|
-
*
|
|
215
|
-
* The result will be what is currently stored, ignoring any pending updates or
|
|
216
|
-
* deletes.
|
|
217
|
-
*
|
|
218
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
219
|
-
* this resource.
|
|
220
|
-
* This resource requires the 'READ' scope for Connect apps.
|
|
221
|
-
*
|
|
222
|
-
* @returns A list of all stored workspace IDs.
|
|
223
|
-
* @path {GET} /rest/security/1.0/linkedWorkspaces
|
|
224
|
-
*/
|
|
225
|
-
getLinkedWorkspaces({
|
|
226
|
-
authorization,
|
|
227
|
-
}: {
|
|
228
|
-
/**
|
|
229
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
230
|
-
* Provider app installed in Jira.
|
|
231
|
-
*
|
|
232
|
-
* If the JWT token corresponds to an app that does not define the Security
|
|
233
|
-
* Information module it will be rejected with a 403.
|
|
234
|
-
*
|
|
235
|
-
* Read more about JWT
|
|
236
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
237
|
-
*/
|
|
238
|
-
authorization: string;
|
|
239
|
-
}): Promise<unknown> {
|
|
240
|
-
return this.getClientInstance()
|
|
241
|
-
.request({
|
|
242
|
-
path: "/rest/security/1.0/linkedWorkspaces",
|
|
243
|
-
method: "GET",
|
|
244
|
-
headers: {
|
|
245
|
-
Authorization: authorization,
|
|
246
|
-
},
|
|
247
|
-
})
|
|
248
|
-
.then(
|
|
249
|
-
this.getClientInstance().responseHandler({
|
|
250
|
-
200: {
|
|
251
|
-
"application/json": "json",
|
|
252
|
-
},
|
|
253
|
-
}),
|
|
254
|
-
)
|
|
255
|
-
.then(
|
|
256
|
-
commonHttpClient.castResponse<{
|
|
257
|
-
status: 200;
|
|
258
|
-
mediaType: "application/json";
|
|
259
|
-
body: unknown;
|
|
260
|
-
}>(),
|
|
261
|
-
)
|
|
262
|
-
.then(
|
|
263
|
-
validationSchemaStorage.validator(
|
|
264
|
-
"SecurityInformationService.getLinkedWorkspaces.response",
|
|
265
|
-
),
|
|
266
|
-
)
|
|
267
|
-
.then(commonHttpClient.getBody);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Retrieve the currently stored Vulnerability data for the given ID.
|
|
271
|
-
*
|
|
272
|
-
* The result will be what is currently stored, ignoring any pending updates or
|
|
273
|
-
* deletes.
|
|
274
|
-
*
|
|
275
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
276
|
-
* this resource.
|
|
277
|
-
* This resource requires the 'READ' scope for Connect apps.
|
|
278
|
-
*
|
|
279
|
-
* @returns The Vulnerability data currently stored for the given ID.
|
|
280
|
-
* @path {GET} /rest/security/1.0/vulnerability/{vulnerabilityId}
|
|
281
|
-
*/
|
|
282
|
-
getVulnerabilityById({
|
|
283
|
-
vulnerabilityId,
|
|
284
|
-
authorization,
|
|
285
|
-
}: {
|
|
286
|
-
/** The ID of the Vulnerability to fetch. */
|
|
287
|
-
vulnerabilityId: string;
|
|
288
|
-
/**
|
|
289
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
290
|
-
* Provider app installed in Jira.
|
|
291
|
-
*
|
|
292
|
-
* If the JWT token corresponds to an app that does not define Security
|
|
293
|
-
* Information module it will be rejected with a 403.
|
|
294
|
-
*
|
|
295
|
-
* Read more about JWT
|
|
296
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
297
|
-
*/
|
|
298
|
-
authorization: string;
|
|
299
|
-
}): Promise<unknown> {
|
|
300
|
-
return this.getClientInstance()
|
|
301
|
-
.request({
|
|
302
|
-
path: "/rest/security/1.0/vulnerability/{vulnerabilityId}",
|
|
303
|
-
method: "GET",
|
|
304
|
-
pathParams: {
|
|
305
|
-
vulnerabilityId,
|
|
306
|
-
},
|
|
307
|
-
headers: {
|
|
308
|
-
Authorization: authorization,
|
|
309
|
-
},
|
|
310
|
-
})
|
|
311
|
-
.then(
|
|
312
|
-
this.getClientInstance().responseHandler({
|
|
313
|
-
200: {
|
|
314
|
-
"application/json": "json",
|
|
315
|
-
},
|
|
316
|
-
}),
|
|
317
|
-
)
|
|
318
|
-
.then(
|
|
319
|
-
commonHttpClient.castResponse<{
|
|
320
|
-
status: 200;
|
|
321
|
-
mediaType: "application/json";
|
|
322
|
-
body: unknown;
|
|
323
|
-
}>(),
|
|
324
|
-
)
|
|
325
|
-
.then(
|
|
326
|
-
validationSchemaStorage.validator(
|
|
327
|
-
"SecurityInformationService.getVulnerabilityById.response",
|
|
328
|
-
),
|
|
329
|
-
)
|
|
330
|
-
.then(commonHttpClient.getBody);
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Update / Insert Vulnerability data.
|
|
334
|
-
*
|
|
335
|
-
* Vulnerabilities are identified by their ID, any existing Vulnerability data
|
|
336
|
-
* with the same ID will be replaced if it exists and the updateSequenceNumber of
|
|
337
|
-
* the existing data is less than the incoming data.
|
|
338
|
-
*
|
|
339
|
-
* Submissions are performed asynchronously. Most updates are available within a
|
|
340
|
-
* short period of time but may take some time during peak load and/or maintenance
|
|
341
|
-
* times. The GET vulnerability endpoint can be used to confirm that data has been
|
|
342
|
-
* stored successfully (if needed).
|
|
343
|
-
*
|
|
344
|
-
* In the case of multiple Vulnerabilities being submitted in one request, each is
|
|
345
|
-
* validated individually prior to submission. Details of Vulnerabilities that
|
|
346
|
-
* failed submission (if any) are available in the response object.
|
|
347
|
-
*
|
|
348
|
-
* A maximum of 1000 vulnerabilities can be submitted in one request.
|
|
349
|
-
*
|
|
350
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
351
|
-
* this resource.
|
|
352
|
-
* This resource requires the 'WRITE' scope for Connect apps.
|
|
353
|
-
*
|
|
354
|
-
* @returns Submission accepted. Each Vulnerability submitted in a valid format will
|
|
355
|
-
* eventually be available in Jira.
|
|
356
|
-
*
|
|
357
|
-
* Details of any Vulnerabilities that were submitted but failed submission (due
|
|
358
|
-
* to data format problems, etc.) are available in the response object.
|
|
359
|
-
* @path {POST} /rest/security/1.0/bulk
|
|
360
|
-
*/
|
|
361
|
-
submitVulnerabilities({
|
|
362
|
-
authorization,
|
|
363
|
-
requestBody,
|
|
364
|
-
}: {
|
|
365
|
-
/**
|
|
366
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
367
|
-
* Provider app installed in Jira.
|
|
368
|
-
*
|
|
369
|
-
* If the JWT token corresponds to an app that does not define the Security
|
|
370
|
-
* Information module it will be rejected with a 403.
|
|
371
|
-
*
|
|
372
|
-
* Read more about JWT
|
|
373
|
-
* [here](https://developer.atlassian.com/blog/2015/01/understanding-jwt/).
|
|
374
|
-
*/
|
|
375
|
-
authorization: string;
|
|
376
|
-
/** Vulnerability data to submit. */
|
|
377
|
-
requestBody: unknown;
|
|
378
|
-
}): Promise<unknown> {
|
|
379
|
-
return this.getClientInstance()
|
|
380
|
-
.request({
|
|
381
|
-
path: "/rest/security/1.0/bulk",
|
|
382
|
-
method: "POST",
|
|
383
|
-
headers: {
|
|
384
|
-
Authorization: authorization,
|
|
385
|
-
"Content-Type": "application/json",
|
|
386
|
-
},
|
|
387
|
-
body: requestBody,
|
|
388
|
-
})
|
|
389
|
-
.then(
|
|
390
|
-
this.getClientInstance().responseHandler({
|
|
391
|
-
202: {
|
|
392
|
-
"application/json": "json",
|
|
393
|
-
},
|
|
394
|
-
}),
|
|
395
|
-
)
|
|
396
|
-
.then(
|
|
397
|
-
commonHttpClient.castResponse<{
|
|
398
|
-
status: 202;
|
|
399
|
-
mediaType: "application/json";
|
|
400
|
-
body: unknown;
|
|
401
|
-
}>(),
|
|
402
|
-
)
|
|
403
|
-
.then(
|
|
404
|
-
validationSchemaStorage.validator(
|
|
405
|
-
"SecurityInformationService.submitVulnerabilities.response",
|
|
406
|
-
),
|
|
407
|
-
)
|
|
408
|
-
.then(commonHttpClient.getBody);
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Insert Security Workspace IDs to establish a relationship between them and the
|
|
412
|
-
* Jira site the app is installed on. If a relationship between the workspace ID
|
|
413
|
-
* and Jira already exists then the workspace ID will be ignored and Jira will
|
|
414
|
-
* process the rest of the entries.
|
|
415
|
-
*
|
|
416
|
-
* Only Connect apps that define the `jiraSecurityInfoProvider` module can access
|
|
417
|
-
* this resource.
|
|
418
|
-
* This resource requires the 'WRITE' scope for Connect apps.
|
|
419
|
-
*
|
|
420
|
-
* @path {POST} /rest/security/1.0/linkedWorkspaces/bulk
|
|
421
|
-
*/
|
|
422
|
-
submitWorkspaces({
|
|
423
|
-
authorization,
|
|
424
|
-
requestBody,
|
|
425
|
-
}: {
|
|
426
|
-
/**
|
|
427
|
-
* All requests must be signed with a Connect JWT token that corresponds to the
|
|
428
|
-
* Provider app installed in Jira.
|
|
429
|
-
*
|
|
430
|
-
* If the JWT token corresponds to an app that does not define the Security
|
|
431
|
-
* Information module it will be rejected with a 403.
|
|
432
|
-
*
|
|
433
|
-
* Read [understanding
|
|
434
|
-
* jwt](https://developer.atlassian.com/blog/2015/01/understanding-jwt/) for more
|
|
435
|
-
* details.
|
|
436
|
-
*/
|
|
437
|
-
authorization: string;
|
|
438
|
-
/** Security Workspace IDs to submit. */
|
|
439
|
-
requestBody: unknown;
|
|
440
|
-
}): Promise<void> {
|
|
441
|
-
return this.getClientInstance()
|
|
442
|
-
.request({
|
|
443
|
-
path: "/rest/security/1.0/linkedWorkspaces/bulk",
|
|
444
|
-
method: "POST",
|
|
445
|
-
headers: {
|
|
446
|
-
Authorization: authorization,
|
|
447
|
-
"Content-Type": "application/json",
|
|
448
|
-
},
|
|
449
|
-
body: requestBody,
|
|
450
|
-
})
|
|
451
|
-
.then(commonHttpClient.discardResult);
|
|
452
|
-
}
|
|
453
|
-
static initialize() {
|
|
454
|
-
validationSchemaStorage.registerExtensible(
|
|
455
|
-
"SecurityInformationService.submitVulnerabilities.response",
|
|
456
|
-
z
|
|
457
|
-
.object({
|
|
458
|
-
status: z.literal(202),
|
|
459
|
-
mediaType: z.literal("application/json"),
|
|
460
|
-
body: z.unknown(),
|
|
461
|
-
})
|
|
462
|
-
.describe("SecurityInformationService.submitVulnerabilities.response"),
|
|
463
|
-
);
|
|
464
|
-
validationSchemaStorage.registerExtensible(
|
|
465
|
-
"SecurityInformationService.getLinkedWorkspaces.response",
|
|
466
|
-
z
|
|
467
|
-
.object({
|
|
468
|
-
status: z.literal(200),
|
|
469
|
-
mediaType: z.literal("application/json"),
|
|
470
|
-
body: z.unknown(),
|
|
471
|
-
})
|
|
472
|
-
.describe("SecurityInformationService.getLinkedWorkspaces.response"),
|
|
473
|
-
);
|
|
474
|
-
validationSchemaStorage.registerExtensible(
|
|
475
|
-
"SecurityInformationService.getLinkedWorkspaceById.response",
|
|
476
|
-
z
|
|
477
|
-
.object({
|
|
478
|
-
status: z.literal(200),
|
|
479
|
-
mediaType: z.literal("application/json"),
|
|
480
|
-
body: z.unknown(),
|
|
481
|
-
})
|
|
482
|
-
.describe("SecurityInformationService.getLinkedWorkspaceById.response"),
|
|
483
|
-
);
|
|
484
|
-
validationSchemaStorage.registerExtensible(
|
|
485
|
-
"SecurityInformationService.getVulnerabilityById.response",
|
|
486
|
-
z
|
|
487
|
-
.object({
|
|
488
|
-
status: z.literal(200),
|
|
489
|
-
mediaType: z.literal("application/json"),
|
|
490
|
-
body: z.unknown(),
|
|
491
|
-
})
|
|
492
|
-
.describe("SecurityInformationService.getVulnerabilityById.response"),
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
}
|