@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.
Files changed (201) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +10 -3
  3. package/.eslintrc.js +0 -3
  4. package/config/api-typescript-generator.config.ts +0 -91
  5. package/config/compare-schemas.ts +0 -307
  6. package/src/index.ts +0 -47
  7. package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
  8. package/src/openapi/platform/core/common-http-client.ts +0 -723
  9. package/src/openapi/platform/core/common-http-service.ts +0 -22
  10. package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
  11. package/src/openapi/platform/models/announcement-banner.ts +0 -59
  12. package/src/openapi/platform/models/app-data-policies.ts +0 -79
  13. package/src/openapi/platform/models/app-migration.ts +0 -172
  14. package/src/openapi/platform/models/app-properties.ts +0 -32
  15. package/src/openapi/platform/models/audit-records.ts +0 -140
  16. package/src/openapi/platform/models/avatars.ts +0 -48
  17. package/src/openapi/platform/models/classification-levels.ts +0 -58
  18. package/src/openapi/platform/models/common.ts +0 -2669
  19. package/src/openapi/platform/models/dashboards.ts +0 -849
  20. package/src/openapi/platform/models/dynamic-modules.ts +0 -121
  21. package/src/openapi/platform/models/filter-sharing.ts +0 -103
  22. package/src/openapi/platform/models/filters.ts +0 -319
  23. package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
  24. package/src/openapi/platform/models/groups.ts +0 -247
  25. package/src/openapi/platform/models/issue-attachments.ts +0 -290
  26. package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
  27. package/src/openapi/platform/models/issue-comments.ts +0 -91
  28. package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
  29. package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
  30. package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
  31. package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
  32. package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
  33. package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
  34. package/src/openapi/platform/models/issue-fields.ts +0 -392
  35. package/src/openapi/platform/models/issue-link-types.ts +0 -28
  36. package/src/openapi/platform/models/issue-links.ts +0 -185
  37. package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
  38. package/src/openapi/platform/models/issue-priorities.ts +0 -196
  39. package/src/openapi/platform/models/issue-properties.ts +0 -259
  40. package/src/openapi/platform/models/issue-remote-links.ts +0 -207
  41. package/src/openapi/platform/models/issue-resolutions.ts +0 -180
  42. package/src/openapi/platform/models/issue-search.ts +0 -367
  43. package/src/openapi/platform/models/issue-security-level.ts +0 -76
  44. package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
  45. package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
  46. package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
  47. package/src/openapi/platform/models/issue-types.ts +0 -66
  48. package/src/openapi/platform/models/issue-votes.ts +0 -38
  49. package/src/openapi/platform/models/issue-watchers.ts +0 -67
  50. package/src/openapi/platform/models/issue-worklogs.ts +0 -190
  51. package/src/openapi/platform/models/issues.ts +0 -1268
  52. package/src/openapi/platform/models/jira-expressions.ts +0 -578
  53. package/src/openapi/platform/models/jira-settings.ts +0 -118
  54. package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
  55. package/src/openapi/platform/models/jql.ts +0 -783
  56. package/src/openapi/platform/models/labels.ts +0 -42
  57. package/src/openapi/platform/models/license-metrics.ts +0 -68
  58. package/src/openapi/platform/models/myself.ts +0 -29
  59. package/src/openapi/platform/models/permission-schemes.ts +0 -89
  60. package/src/openapi/platform/models/permissions.ts +0 -308
  61. package/src/openapi/platform/models/priority-schemes.ts +0 -527
  62. package/src/openapi/platform/models/project-avatars.ts +0 -29
  63. package/src/openapi/platform/models/project-classification-levels.ts +0 -24
  64. package/src/openapi/platform/models/project-components.ts +0 -231
  65. package/src/openapi/platform/models/project-email.ts +0 -27
  66. package/src/openapi/platform/models/project-features.ts +0 -78
  67. package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
  68. package/src/openapi/platform/models/project-role-actors.ts +0 -107
  69. package/src/openapi/platform/models/project-roles.ts +0 -76
  70. package/src/openapi/platform/models/project-types.ts +0 -36
  71. package/src/openapi/platform/models/project-versions.ts +0 -216
  72. package/src/openapi/platform/models/projects.ts +0 -429
  73. package/src/openapi/platform/models/screen-schemes.ts +0 -192
  74. package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
  75. package/src/openapi/platform/models/screens.ts +0 -171
  76. package/src/openapi/platform/models/server-info.ts +0 -100
  77. package/src/openapi/platform/models/service-registry.ts +0 -68
  78. package/src/openapi/platform/models/status.ts +0 -229
  79. package/src/openapi/platform/models/time-tracking.ts +0 -38
  80. package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
  81. package/src/openapi/platform/models/user-search.ts +0 -69
  82. package/src/openapi/platform/models/users.ts +0 -121
  83. package/src/openapi/platform/models/webhooks.ts +0 -307
  84. package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
  85. package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
  86. package/src/openapi/platform/models/workflow-schemes.ts +0 -545
  87. package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
  88. package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
  89. package/src/openapi/platform/models/workflows.ts +0 -1943
  90. package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
  91. package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
  92. package/src/openapi/platform/services/app-migration-service.ts +0 -289
  93. package/src/openapi/platform/services/app-properties-service.ts +0 -441
  94. package/src/openapi/platform/services/application-roles-service.ts +0 -247
  95. package/src/openapi/platform/services/audit-records-service.ts +0 -164
  96. package/src/openapi/platform/services/avatars-service.ts +0 -769
  97. package/src/openapi/platform/services/classification-levels-service.ts +0 -131
  98. package/src/openapi/platform/services/dashboards-service.ts +0 -1721
  99. package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
  100. package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
  101. package/src/openapi/platform/services/filters-service.ts +0 -1901
  102. package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
  103. package/src/openapi/platform/services/groups-service.ts +0 -751
  104. package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
  105. package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
  106. package/src/openapi/platform/services/issue-comments-service.ts +0 -812
  107. package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
  108. package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
  109. package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
  110. package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
  111. package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
  112. package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
  113. package/src/openapi/platform/services/issue-fields-service.ts +0 -837
  114. package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
  115. package/src/openapi/platform/services/issue-links-service.ts +0 -345
  116. package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
  117. package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
  118. package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
  119. package/src/openapi/platform/services/issue-properties-service.ts +0 -606
  120. package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
  121. package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
  122. package/src/openapi/platform/services/issue-search-service.ts +0 -1139
  123. package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
  124. package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
  125. package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
  126. package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
  127. package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
  128. package/src/openapi/platform/services/issue-types-service.ts +0 -679
  129. package/src/openapi/platform/services/issue-votes-service.ts +0 -221
  130. package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
  131. package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
  132. package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
  133. package/src/openapi/platform/services/issues-service.ts +0 -3346
  134. package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
  135. package/src/openapi/platform/services/jira-settings-service.ts +0 -415
  136. package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
  137. package/src/openapi/platform/services/jql-service.ts +0 -896
  138. package/src/openapi/platform/services/labels-service.ts +0 -89
  139. package/src/openapi/platform/services/license-metrics-service.ts +0 -216
  140. package/src/openapi/platform/services/myself-service.ts +0 -520
  141. package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
  142. package/src/openapi/platform/services/permissions-service.ts +0 -407
  143. package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
  144. package/src/openapi/platform/services/project-avatars-service.ts +0 -341
  145. package/src/openapi/platform/services/project-categories-service.ts +0 -318
  146. package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
  147. package/src/openapi/platform/services/project-components-service.ts +0 -1332
  148. package/src/openapi/platform/services/project-email-service.ts +0 -161
  149. package/src/openapi/platform/services/project-features-service.ts +0 -207
  150. package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
  151. package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
  152. package/src/openapi/platform/services/project-properties-service.ts +0 -320
  153. package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
  154. package/src/openapi/platform/services/project-roles-service.ts +0 -867
  155. package/src/openapi/platform/services/project-types-service.ts +0 -297
  156. package/src/openapi/platform/services/project-versions-service.ts +0 -1287
  157. package/src/openapi/platform/services/projects-service.ts +0 -2196
  158. package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
  159. package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
  160. package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
  161. package/src/openapi/platform/services/screens-service.ts +0 -528
  162. package/src/openapi/platform/services/server-info-service.ts +0 -88
  163. package/src/openapi/platform/services/service-registry-service.ts +0 -89
  164. package/src/openapi/platform/services/status-service.ts +0 -498
  165. package/src/openapi/platform/services/tasks-service.ts +0 -159
  166. package/src/openapi/platform/services/time-tracking-service.ts +0 -386
  167. package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
  168. package/src/openapi/platform/services/user-properties-service.ts +0 -413
  169. package/src/openapi/platform/services/user-search-service.ts +0 -1214
  170. package/src/openapi/platform/services/users-service.ts +0 -1108
  171. package/src/openapi/platform/services/webhooks-service.ts +0 -458
  172. package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
  173. package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
  174. package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
  175. package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
  176. package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
  177. package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
  178. package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
  179. package/src/openapi/platform/services/workflows-service.ts +0 -3477
  180. package/src/openapi/platform/validation-schema-storage.ts +0 -186
  181. package/src/openapi/software/base-jira-software-api-client.ts +0 -447
  182. package/src/openapi/software/core/common-http-client.ts +0 -723
  183. package/src/openapi/software/core/common-http-service.ts +0 -22
  184. package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
  185. package/src/openapi/software/models/board.ts +0 -918
  186. package/src/openapi/software/services/backlog-service.ts +0 -160
  187. package/src/openapi/software/services/board-service.ts +0 -4189
  188. package/src/openapi/software/services/builds-service.ts +0 -571
  189. package/src/openapi/software/services/deployments-service.ts +0 -403
  190. package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
  191. package/src/openapi/software/services/development-information-service.ts +0 -2357
  192. package/src/openapi/software/services/epic-service.ts +0 -854
  193. package/src/openapi/software/services/feature-flags-service.ts +0 -303
  194. package/src/openapi/software/services/issue-service.ts +0 -529
  195. package/src/openapi/software/services/operations-service.ts +0 -741
  196. package/src/openapi/software/services/remote-links-service.ts +0 -653
  197. package/src/openapi/software/services/security-information-service.ts +0 -495
  198. package/src/openapi/software/services/sprint-service.ts +0 -969
  199. package/src/openapi/software/validation-schema-storage.ts +0 -186
  200. package/tsconfig.build.json +0 -7
  201. package/tsconfig.json +0 -4
@@ -1,1332 +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 ProjectComponent,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import {
13
- type ComponentIssuesCount,
14
- type PageBean2ComponentJsonBean,
15
- type PageBeanComponentWithIssueCount,
16
- registerProjectComponentsValidationSchemas,
17
- } from "../models/project-components";
18
- import { validationSchemaStorage } from "../validation-schema-storage";
19
- /**
20
- * This resource represents project components. Use it to get, create, update, and
21
- * delete project components. Also get components for project and get a count of
22
- * issues by component.
23
- */
24
- export class ProjectComponentsService extends CommonHttpService {
25
- /**
26
- * Creates a component. Use components to provide containers for issues within a
27
- * project. Use components to provide containers for issues within a project.
28
- *
29
- * This operation can be accessed anonymously.
30
- *
31
- * **[Permissions](#permissions) required:** *Administer projects* [project
32
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project in which
33
- * the component is created or *Administer Jira* [global
34
- * permission](https://confluence.atlassian.com/x/x4dKLg).
35
- *
36
- * @returns Returned if the request is successful.
37
- *
38
- * example: {
39
- * "ari":
40
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
41
- * "assignee": {
42
- * "accountId": "5b10a2844c20165700ede21g",
43
- * "accountType": "atlassian",
44
- * "active": false,
45
- * "avatarUrls": {
46
- * "16x16":
47
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
48
- * "24x24":
49
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
50
- * "32x32":
51
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
52
- * "48x48":
53
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
54
- * },
55
- * "displayName": "Mia Krystof",
56
- * "key": "",
57
- * "name": "",
58
- * "self":
59
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
60
- * },
61
- * "assigneeType": "PROJECT_LEAD",
62
- * "description": "This is a Jira component",
63
- * "id": "10000",
64
- * "isAssigneeTypeValid": false,
65
- * "lead": {
66
- * "accountId": "5b10a2844c20165700ede21g",
67
- * "accountType": "atlassian",
68
- * "active": false,
69
- * "avatarUrls": {
70
- * "16x16":
71
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
72
- * "24x24":
73
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
74
- * "32x32":
75
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
76
- * "48x48":
77
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
78
- * },
79
- * "displayName": "Mia Krystof",
80
- * "key": "",
81
- * "name": "",
82
- * "self":
83
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
84
- * },
85
- * "metadata": {
86
- * "icon": "https://www.example.com/icon.png"
87
- * },
88
- * "name": "Component 1",
89
- * "project": "HSP",
90
- * "projectId": 10000,
91
- * "realAssignee": {
92
- * "accountId": "5b10a2844c20165700ede21g",
93
- * "accountType": "atlassian",
94
- * "active": false,
95
- * "avatarUrls": {
96
- * "16x16":
97
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
98
- * "24x24":
99
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
100
- * "32x32":
101
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
102
- * "48x48":
103
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
104
- * },
105
- * "displayName": "Mia Krystof",
106
- * "key": "",
107
- * "name": "",
108
- * "self":
109
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
110
- * },
111
- * "realAssigneeType": "PROJECT_LEAD",
112
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
113
- * }
114
- * @path {POST} /rest/api/3/component
115
- * @scopes-current manage:jira-project
116
- * @scopes-beta read:project:jira, read:user:jira, write:project.component:jira,
117
- * read:application-role:jira, read:avatar:jira, read:group:jira,
118
- * read:project.component:jira
119
- */
120
- createComponent({
121
- projectComponent,
122
- }: {
123
- /**
124
- * @example {
125
- * "assigneeType": "PROJECT_LEAD",
126
- * "description": "This is a Jira component",
127
- * "isAssigneeTypeValid": false,
128
- * "leadAccountId": "5b10a2844c20165700ede21g",
129
- * "name": "Component 1",
130
- * "project": "HSP"
131
- * }
132
- */
133
- projectComponent: ProjectComponent;
134
- }): Promise<ProjectComponent> {
135
- return this.getClientInstance()
136
- .request({
137
- path: "/rest/api/3/component",
138
- method: "POST",
139
- headers: {
140
- "Content-Type": "application/json",
141
- },
142
- body: projectComponent,
143
- })
144
- .then(
145
- this.getClientInstance().responseHandler({
146
- 201: {
147
- "application/json": "json",
148
- },
149
- }),
150
- )
151
- .then(
152
- commonHttpClient.castResponse<{
153
- status: 201;
154
- mediaType: "application/json";
155
- body: ProjectComponent;
156
- }>(),
157
- )
158
- .then(
159
- validationSchemaStorage.validator(
160
- "ProjectComponentsService.createComponent.response",
161
- ),
162
- )
163
- .then(commonHttpClient.getBody);
164
- }
165
- /**
166
- * Deletes a component.
167
- *
168
- * This operation can be accessed anonymously.
169
- *
170
- * **[Permissions](#permissions) required:** *Administer projects* [project
171
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project
172
- * containing the component or *Administer Jira* [global
173
- * permission](https://confluence.atlassian.com/x/x4dKLg).
174
- *
175
- * @path {DELETE} /rest/api/3/component/{id}
176
- * @scopes-current manage:jira-project
177
- * @scopes-beta delete:project.component:jira
178
- */
179
- deleteComponent({
180
- id,
181
- moveIssuesTo,
182
- }: {
183
- /** The ID of the component. */
184
- id: string;
185
- /**
186
- * The ID of the component to replace the deleted component. If this value is null
187
- * no replacement is made.
188
- */
189
- moveIssuesTo?: string;
190
- }): Promise<void> {
191
- return this.getClientInstance()
192
- .request({
193
- path: "/rest/api/3/component/{id}",
194
- method: "DELETE",
195
- pathParams: {
196
- id,
197
- },
198
- query: {
199
- moveIssuesTo,
200
- },
201
- })
202
- .then(commonHttpClient.discardResult);
203
- }
204
- /**
205
- * Returns a [paginated](#pagination) list of all components in a project,
206
- * including global (Compass) components when applicable.
207
- *
208
- * This operation can be accessed anonymously.
209
- *
210
- * **[Permissions](#permissions) required:** *Browse Projects* [project
211
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project.
212
- *
213
- * @returns Returned if the request is successful.
214
- *
215
- * example:
216
- * com.atlassian.jira.issue.fields.rest.json.beans.ComponentJsonBean#PAGED_EXAMPLE}
217
- * }
218
- * @path {GET} /rest/api/3/component
219
- * @scopes-current read:jira-work
220
- * @scopes-beta read:project:jira, read:project.component:jira, read:user:jira,
221
- * read:application-role:jira, read:avatar:jira, read:group:jira
222
- */
223
- findComponentsForProjects({
224
- projectIdsOrKeys,
225
- startAt,
226
- maxResults,
227
- orderBy,
228
- query,
229
- }: {
230
- /** The project IDs and/or project keys (case sensitive). */
231
- projectIdsOrKeys?: string[];
232
- /** The index of the first item to return in a page of results (page offset). */
233
- startAt?: number;
234
- /** The maximum number of items to return per page. */
235
- maxResults?: number;
236
- /**
237
- * [Order](#ordering) the results by a field:
238
- *
239
- * * `description` Sorts by the component description.
240
- * * `name` Sorts by component name.
241
- */
242
- orderBy?:
243
- | "description"
244
- | "-description"
245
- | "+description"
246
- | "name"
247
- | "-name"
248
- | "+name";
249
- /**
250
- * Filter the results using a literal string. Components with a matching `name` or
251
- * `description` are returned (case insensitive).
252
- */
253
- query?: string;
254
- }): Promise<PageBean2ComponentJsonBean> {
255
- return this.getClientInstance()
256
- .request({
257
- path: "/rest/api/3/component",
258
- method: "GET",
259
- query: {
260
- projectIdsOrKeys,
261
- startAt,
262
- maxResults,
263
- orderBy,
264
- query,
265
- },
266
- })
267
- .then(
268
- this.getClientInstance().responseHandler({
269
- 200: {
270
- "application/json": "json",
271
- },
272
- }),
273
- )
274
- .then(
275
- commonHttpClient.castResponse<{
276
- status: 200;
277
- mediaType: "application/json";
278
- body: PageBean2ComponentJsonBean;
279
- }>(),
280
- )
281
- .then(
282
- validationSchemaStorage.validator(
283
- "ProjectComponentsService.findComponentsForProjects.response",
284
- ),
285
- )
286
- .then(commonHttpClient.getBody);
287
- }
288
- /**
289
- * Returns a component.
290
- *
291
- * This operation can be accessed anonymously.
292
- *
293
- * **[Permissions](#permissions) required:** *Browse projects* [project
294
- * permission](https://confluence.atlassian.com/x/yodKLg) for project containing
295
- * the component.
296
- *
297
- * @returns Returned if the request is successful.
298
- *
299
- * example: {
300
- * "ari":
301
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
302
- * "assignee": {
303
- * "accountId": "5b10a2844c20165700ede21g",
304
- * "accountType": "atlassian",
305
- * "active": false,
306
- * "avatarUrls": {
307
- * "16x16":
308
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
309
- * "24x24":
310
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
311
- * "32x32":
312
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
313
- * "48x48":
314
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
315
- * },
316
- * "displayName": "Mia Krystof",
317
- * "key": "",
318
- * "name": "",
319
- * "self":
320
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
321
- * },
322
- * "assigneeType": "PROJECT_LEAD",
323
- * "description": "This is a Jira component",
324
- * "id": "10000",
325
- * "isAssigneeTypeValid": false,
326
- * "lead": {
327
- * "accountId": "5b10a2844c20165700ede21g",
328
- * "accountType": "atlassian",
329
- * "active": false,
330
- * "avatarUrls": {
331
- * "16x16":
332
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
333
- * "24x24":
334
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
335
- * "32x32":
336
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
337
- * "48x48":
338
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
339
- * },
340
- * "displayName": "Mia Krystof",
341
- * "key": "",
342
- * "name": "",
343
- * "self":
344
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
345
- * },
346
- * "metadata": {
347
- * "icon": "https://www.example.com/icon.png"
348
- * },
349
- * "name": "Component 1",
350
- * "project": "HSP",
351
- * "projectId": 10000,
352
- * "realAssignee": {
353
- * "accountId": "5b10a2844c20165700ede21g",
354
- * "accountType": "atlassian",
355
- * "active": false,
356
- * "avatarUrls": {
357
- * "16x16":
358
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
359
- * "24x24":
360
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
361
- * "32x32":
362
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
363
- * "48x48":
364
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
365
- * },
366
- * "displayName": "Mia Krystof",
367
- * "key": "",
368
- * "name": "",
369
- * "self":
370
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
371
- * },
372
- * "realAssigneeType": "PROJECT_LEAD",
373
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
374
- * }
375
- * @path {GET} /rest/api/3/component/{id}
376
- * @scopes-current read:jira-work
377
- * @scopes-beta read:project:jira, read:project.component:jira, read:user:jira,
378
- * read:application-role:jira, read:avatar:jira, read:group:jira
379
- */
380
- getComponent({
381
- id,
382
- }: {
383
- /** The ID of the component. */
384
- id: string;
385
- }): Promise<ProjectComponent> {
386
- return this.getClientInstance()
387
- .request({
388
- path: "/rest/api/3/component/{id}",
389
- method: "GET",
390
- pathParams: {
391
- id,
392
- },
393
- })
394
- .then(
395
- this.getClientInstance().responseHandler({
396
- 200: {
397
- "application/json": "json",
398
- },
399
- }),
400
- )
401
- .then(
402
- commonHttpClient.castResponse<{
403
- status: 200;
404
- mediaType: "application/json";
405
- body: ProjectComponent;
406
- }>(),
407
- )
408
- .then(
409
- validationSchemaStorage.validator(
410
- "ProjectComponentsService.getComponent.response",
411
- ),
412
- )
413
- .then(commonHttpClient.getBody);
414
- }
415
- /**
416
- * Returns the counts of issues assigned to the component.
417
- *
418
- * This operation can be accessed anonymously.
419
- *
420
- * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June
421
- * 15, 2024.
422
- *
423
- * * **Classic**: `read:jira-work`
424
- * * **Granular**: `read:field:jira`, `read:project.component:jira`
425
- *
426
- * **[Permissions](#permissions) required:** None.
427
- *
428
- * @returns Returned if the request is successful.
429
- *
430
- * example: {
431
- * "issueCount": 23,
432
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
433
- * }
434
- * @path {GET} /rest/api/3/component/{id}/relatedIssueCounts
435
- * @scopes-current read:jira-work
436
- * @scopes-beta
437
- */
438
- getComponentRelatedIssues({
439
- id,
440
- }: {
441
- /** The ID of the component. */
442
- id: string;
443
- }): Promise<ComponentIssuesCount> {
444
- return this.getClientInstance()
445
- .request({
446
- path: "/rest/api/3/component/{id}/relatedIssueCounts",
447
- method: "GET",
448
- pathParams: {
449
- id,
450
- },
451
- })
452
- .then(
453
- this.getClientInstance().responseHandler({
454
- 200: {
455
- "application/json": "json",
456
- },
457
- }),
458
- )
459
- .then(
460
- commonHttpClient.castResponse<{
461
- status: 200;
462
- mediaType: "application/json";
463
- body: ComponentIssuesCount;
464
- }>(),
465
- )
466
- .then(
467
- validationSchemaStorage.validator(
468
- "ProjectComponentsService.getComponentRelatedIssues.response",
469
- ),
470
- )
471
- .then(commonHttpClient.getBody);
472
- }
473
- /**
474
- * Returns all components in a project. See the [Get project components
475
- * paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if
476
- * you want to get a full list of components with pagination.
477
- *
478
- * If your project uses Compass components, this API will return a paginated list
479
- * of Compass components that are linked to issues in that project.
480
- *
481
- * This operation can be accessed anonymously.
482
- *
483
- * **[Permissions](#permissions) required:** *Browse Projects* [project
484
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project.
485
- *
486
- * @returns Returned if the request is successful.
487
- *
488
- * example: [
489
- * {
490
- * "ari":
491
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
492
- * "assignee": {
493
- * "accountId": "5b10a2844c20165700ede21g",
494
- * "accountType": "atlassian",
495
- * "active": false,
496
- * "avatarUrls": {
497
- * "16x16":
498
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
499
- * "24x24":
500
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
501
- * "32x32":
502
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
503
- * "48x48":
504
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
505
- * },
506
- * "displayName": "Mia Krystof",
507
- * "key": "",
508
- * "name": "",
509
- * "self":
510
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
511
- * },
512
- * "assigneeType": "PROJECT_LEAD",
513
- * "description": "This is a Jira component",
514
- * "id": "10000",
515
- * "isAssigneeTypeValid": false,
516
- * "lead": {
517
- * "accountId": "5b10a2844c20165700ede21g",
518
- * "accountType": "atlassian",
519
- * "active": false,
520
- * "avatarUrls": {
521
- * "16x16":
522
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
523
- * "24x24":
524
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
525
- * "32x32":
526
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
527
- * "48x48":
528
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
529
- * },
530
- * "displayName": "Mia Krystof",
531
- * "key": "",
532
- * "name": "",
533
- * "self":
534
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
535
- * },
536
- * "metadata": {
537
- * "icon": "https://www.example.com/icon.png"
538
- * },
539
- * "name": "Component 1",
540
- * "project": "HSP",
541
- * "projectId": 10000,
542
- * "realAssignee": {
543
- * "accountId": "5b10a2844c20165700ede21g",
544
- * "accountType": "atlassian",
545
- * "active": false,
546
- * "avatarUrls": {
547
- * "16x16":
548
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
549
- * "24x24":
550
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
551
- * "32x32":
552
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
553
- * "48x48":
554
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
555
- * },
556
- * "displayName": "Mia Krystof",
557
- * "key": "",
558
- * "name": "",
559
- * "self":
560
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
561
- * },
562
- * "realAssigneeType": "PROJECT_LEAD",
563
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
564
- * },
565
- * {
566
- * "ari":
567
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-11ee-4e70-be56-0242ac120002/fdb3fdec-4e70-11ee-be56-0242ac120002",
568
- * "assignee": {
569
- * "accountId": "5b10a2844c20165700ede21g",
570
- * "accountType": "atlassian",
571
- * "active": false,
572
- * "avatarUrls": {
573
- * "16x16":
574
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
575
- * "24x24":
576
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
577
- * "32x32":
578
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
579
- * "48x48":
580
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
581
- * },
582
- * "displayName": "Mia Krystof",
583
- * "key": "",
584
- * "name": "",
585
- * "self":
586
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
587
- * },
588
- * "assigneeType": "PROJECT_LEAD",
589
- * "description": "This is a another Jira component",
590
- * "id": "10050",
591
- * "isAssigneeTypeValid": false,
592
- * "lead": {
593
- * "accountId": "5b10a2844c20165700ede21g",
594
- * "accountType": "atlassian",
595
- * "active": false,
596
- * "avatarUrls": {
597
- * "16x16":
598
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
599
- * "24x24":
600
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
601
- * "32x32":
602
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
603
- * "48x48":
604
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
605
- * },
606
- * "displayName": "Mia Krystof",
607
- * "key": "",
608
- * "name": "",
609
- * "self":
610
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
611
- * },
612
- * "metadata": {
613
- * "icon": "https://www.example.com/icon.png"
614
- * },
615
- * "name": "PXA",
616
- * "project": "PROJECTKEY",
617
- * "projectId": 10000,
618
- * "realAssignee": {
619
- * "accountId": "5b10a2844c20165700ede21g",
620
- * "accountType": "atlassian",
621
- * "active": false,
622
- * "avatarUrls": {
623
- * "16x16":
624
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
625
- * "24x24":
626
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
627
- * "32x32":
628
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
629
- * "48x48":
630
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
631
- * },
632
- * "displayName": "Mia Krystof",
633
- * "key": "",
634
- * "name": "",
635
- * "self":
636
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
637
- * },
638
- * "realAssigneeType": "PROJECT_LEAD",
639
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
640
- * }
641
- * ]
642
- * @path {GET} /rest/api/3/project/{projectIdOrKey}/components
643
- * @scopes-current read:jira-work
644
- * @scopes-beta read:project:jira, read:project.component:jira, read:user:jira,
645
- * read:application-role:jira, read:avatar:jira, read:group:jira
646
- */
647
- getProjectComponents({
648
- projectIdOrKey,
649
- componentSource,
650
- }: {
651
- /** The project ID or project key (case sensitive). */
652
- projectIdOrKey: string;
653
- /**
654
- * The source of the components to return. Can be `jira` (default), `compass` or
655
- * `auto`. When `auto` is specified, the API will return connected Compass
656
- * components if the project is opted into Compass, otherwise it will return Jira
657
- * components. Defaults to `jira`.
658
- */
659
- componentSource?: "jira" | "compass" | "auto";
660
- }): Promise<ProjectComponent[]> {
661
- return this.getClientInstance()
662
- .request({
663
- path: "/rest/api/3/project/{projectIdOrKey}/components",
664
- method: "GET",
665
- pathParams: {
666
- projectIdOrKey,
667
- },
668
- query: {
669
- componentSource,
670
- },
671
- })
672
- .then(
673
- this.getClientInstance().responseHandler({
674
- 200: {
675
- "application/json": "json",
676
- },
677
- }),
678
- )
679
- .then(
680
- commonHttpClient.castResponse<{
681
- status: 200;
682
- mediaType: "application/json";
683
- body: ProjectComponent[];
684
- }>(),
685
- )
686
- .then(
687
- validationSchemaStorage.validator(
688
- "ProjectComponentsService.getProjectComponents.response",
689
- ),
690
- )
691
- .then(commonHttpClient.getBody);
692
- }
693
- /**
694
- * Returns a [paginated](#pagination) list of all components in a project. See the
695
- * [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get)
696
- * resource if you want to get a full list of versions without pagination.
697
- *
698
- * If your project uses Compass components, this API will return a list of Compass
699
- * components that are linked to issues in that project.
700
- *
701
- * This operation can be accessed anonymously.
702
- *
703
- * **[Permissions](#permissions) required:** *Browse Projects* [project
704
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project.
705
- *
706
- * @returns Returned if the request is successful.
707
- *
708
- * example: {
709
- * "isLast": false,
710
- * "maxResults": 2,
711
- * "nextPage":
712
- * "https://your-domain.atlassian.net/rest/api/3/project/PR/component?startAt=2&maxResults=2",
713
- * "self":
714
- * "https://your-domain.atlassian.net/rest/api/3/project/PR/component?startAt=0&maxResults=2",
715
- * "startAt": 0,
716
- * "total": 7,
717
- * "values": [
718
- * {
719
- * "assignee": {
720
- * "accountId": "5b10a2844c20165700ede21g",
721
- * "accountType": "atlassian",
722
- * "active": false,
723
- * "avatarUrls": {
724
- * "16x16":
725
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
726
- * "24x24":
727
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
728
- * "32x32":
729
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
730
- * "48x48":
731
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
732
- * },
733
- * "displayName": "Mia Krystof",
734
- * "key": "",
735
- * "name": "",
736
- * "self":
737
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
738
- * },
739
- * "assigneeType": "PROJECT_LEAD",
740
- * "componentBean": {
741
- * "ari":
742
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
743
- * "assignee": {
744
- * "accountId": "5b10a2844c20165700ede21g",
745
- * "accountType": "atlassian",
746
- * "active": false,
747
- * "avatarUrls": {
748
- * "16x16":
749
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
750
- * "24x24":
751
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
752
- * "32x32":
753
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
754
- * "48x48":
755
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
756
- * },
757
- * "displayName": "Mia Krystof",
758
- * "key": "",
759
- * "name": "",
760
- * "self":
761
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
762
- * },
763
- * "assigneeType": "PROJECT_LEAD",
764
- * "description": "This is a Jira component",
765
- * "id": "10000",
766
- * "isAssigneeTypeValid": false,
767
- * "lead": {
768
- * "accountId": "5b10a2844c20165700ede21g",
769
- * "accountType": "atlassian",
770
- * "active": false,
771
- * "avatarUrls": {
772
- * "16x16":
773
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
774
- * "24x24":
775
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
776
- * "32x32":
777
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
778
- * "48x48":
779
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
780
- * },
781
- * "displayName": "Mia Krystof",
782
- * "key": "",
783
- * "name": "",
784
- * "self":
785
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
786
- * },
787
- * "metadata": {
788
- * "icon": "https://www.example.com/icon.png"
789
- * },
790
- * "name": "Component 1",
791
- * "project": "HSP",
792
- * "projectId": 10000,
793
- * "realAssignee": {
794
- * "accountId": "5b10a2844c20165700ede21g",
795
- * "accountType": "atlassian",
796
- * "active": false,
797
- * "avatarUrls": {
798
- * "16x16":
799
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
800
- * "24x24":
801
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
802
- * "32x32":
803
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
804
- * "48x48":
805
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
806
- * },
807
- * "displayName": "Mia Krystof",
808
- * "key": "",
809
- * "name": "",
810
- * "self":
811
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
812
- * },
813
- * "realAssigneeType": "PROJECT_LEAD",
814
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
815
- * },
816
- * "description": "This is a Jira component",
817
- * "id": "10000",
818
- * "isAssigneeTypeValid": false,
819
- * "issueCount": 1,
820
- * "lead": {
821
- * "accountId": "5b10a2844c20165700ede21g",
822
- * "accountType": "atlassian",
823
- * "active": false,
824
- * "avatarUrls": {
825
- * "16x16":
826
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
827
- * "24x24":
828
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
829
- * "32x32":
830
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
831
- * "48x48":
832
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
833
- * },
834
- * "displayName": "Mia Krystof",
835
- * "key": "",
836
- * "name": "",
837
- * "self":
838
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
839
- * },
840
- * "name": "Component 1",
841
- * "project": "HSP",
842
- * "projectId": 10000,
843
- * "realAssignee": {
844
- * "accountId": "5b10a2844c20165700ede21g",
845
- * "accountType": "atlassian",
846
- * "active": false,
847
- * "avatarUrls": {
848
- * "16x16":
849
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
850
- * "24x24":
851
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
852
- * "32x32":
853
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
854
- * "48x48":
855
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
856
- * },
857
- * "displayName": "Mia Krystof",
858
- * "key": "",
859
- * "name": "",
860
- * "self":
861
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
862
- * },
863
- * "realAssigneeType": "PROJECT_LEAD",
864
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
865
- * },
866
- * {
867
- * "assignee": {
868
- * "accountId": "5b10a2844c20165700ede21g",
869
- * "accountType": "atlassian",
870
- * "active": false,
871
- * "avatarUrls": {
872
- * "16x16":
873
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
874
- * "24x24":
875
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
876
- * "32x32":
877
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
878
- * "48x48":
879
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
880
- * },
881
- * "displayName": "Mia Krystof",
882
- * "key": "",
883
- * "name": "",
884
- * "self":
885
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
886
- * },
887
- * "assigneeType": "PROJECT_LEAD",
888
- * "componentBean": {
889
- * "ari":
890
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-11ee-4e70-be56-0242ac120002/fdb3fdec-4e70-11ee-be56-0242ac120002",
891
- * "assignee": {
892
- * "accountId": "5b10a2844c20165700ede21g",
893
- * "accountType": "atlassian",
894
- * "active": false,
895
- * "avatarUrls": {
896
- * "16x16":
897
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
898
- * "24x24":
899
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
900
- * "32x32":
901
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
902
- * "48x48":
903
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
904
- * },
905
- * "displayName": "Mia Krystof",
906
- * "key": "",
907
- * "name": "",
908
- * "self":
909
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
910
- * },
911
- * "assigneeType": "PROJECT_LEAD",
912
- * "description": "This is a another Jira component",
913
- * "id": "10050",
914
- * "isAssigneeTypeValid": false,
915
- * "lead": {
916
- * "accountId": "5b10a2844c20165700ede21g",
917
- * "accountType": "atlassian",
918
- * "active": false,
919
- * "avatarUrls": {
920
- * "16x16":
921
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
922
- * "24x24":
923
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
924
- * "32x32":
925
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
926
- * "48x48":
927
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
928
- * },
929
- * "displayName": "Mia Krystof",
930
- * "key": "",
931
- * "name": "",
932
- * "self":
933
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
934
- * },
935
- * "metadata": {
936
- * "icon": "https://www.example.com/icon.png"
937
- * },
938
- * "name": "PXA",
939
- * "project": "PROJECTKEY",
940
- * "projectId": 10000,
941
- * "realAssignee": {
942
- * "accountId": "5b10a2844c20165700ede21g",
943
- * "accountType": "atlassian",
944
- * "active": false,
945
- * "avatarUrls": {
946
- * "16x16":
947
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
948
- * "24x24":
949
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
950
- * "32x32":
951
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
952
- * "48x48":
953
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
954
- * },
955
- * "displayName": "Mia Krystof",
956
- * "key": "",
957
- * "name": "",
958
- * "self":
959
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
960
- * },
961
- * "realAssigneeType": "PROJECT_LEAD",
962
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
963
- * },
964
- * "description": "This is a another Jira component",
965
- * "id": "10050",
966
- * "isAssigneeTypeValid": false,
967
- * "issueCount": 5,
968
- * "lead": {
969
- * "accountId": "5b10a2844c20165700ede21g",
970
- * "accountType": "atlassian",
971
- * "active": false,
972
- * "avatarUrls": {
973
- * "16x16":
974
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
975
- * "24x24":
976
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
977
- * "32x32":
978
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
979
- * "48x48":
980
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
981
- * },
982
- * "displayName": "Mia Krystof",
983
- * "key": "",
984
- * "name": "",
985
- * "self":
986
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
987
- * },
988
- * "name": "PXA",
989
- * "project": "PROJECTKEY",
990
- * "projectId": 10000,
991
- * "realAssignee": {
992
- * "accountId": "5b10a2844c20165700ede21g",
993
- * "accountType": "atlassian",
994
- * "active": false,
995
- * "avatarUrls": {
996
- * "16x16":
997
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
998
- * "24x24":
999
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
1000
- * "32x32":
1001
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
1002
- * "48x48":
1003
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
1004
- * },
1005
- * "displayName": "Mia Krystof",
1006
- * "key": "",
1007
- * "name": "",
1008
- * "self":
1009
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
1010
- * },
1011
- * "realAssigneeType": "PROJECT_LEAD",
1012
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
1013
- * }
1014
- * ]
1015
- * }
1016
- * @path {GET} /rest/api/3/project/{projectIdOrKey}/component
1017
- * @scopes-current read:jira-work
1018
- * @scopes-beta read:project:jira, read:project.component:jira, read:user:jira,
1019
- * read:application-role:jira, read:avatar:jira, read:group:jira
1020
- */
1021
- getProjectComponentsPaginated({
1022
- projectIdOrKey,
1023
- startAt,
1024
- maxResults,
1025
- orderBy,
1026
- componentSource,
1027
- query,
1028
- }: {
1029
- /** The project ID or project key (case sensitive). */
1030
- projectIdOrKey: string;
1031
- /** The index of the first item to return in a page of results (page offset). */
1032
- startAt?: number;
1033
- /** The maximum number of items to return per page. */
1034
- maxResults?: number;
1035
- /**
1036
- * [Order](#ordering) the results by a field:
1037
- *
1038
- * * `description` Sorts by the component description.
1039
- * * `issueCount` Sorts by the count of issues associated with the component.
1040
- * * `lead` Sorts by the user key of the component's project lead.
1041
- * * `name` Sorts by component name.
1042
- */
1043
- orderBy?:
1044
- | "description"
1045
- | "-description"
1046
- | "+description"
1047
- | "issueCount"
1048
- | "-issueCount"
1049
- | "+issueCount"
1050
- | "lead"
1051
- | "-lead"
1052
- | "+lead"
1053
- | "name"
1054
- | "-name"
1055
- | "+name";
1056
- /**
1057
- * The source of the components to return. Can be `jira` (default), `compass` or
1058
- * `auto`. When `auto` is specified, the API will return connected Compass
1059
- * components if the project is opted into Compass, otherwise it will return Jira
1060
- * components. Defaults to `jira`.
1061
- */
1062
- componentSource?: "jira" | "compass" | "auto";
1063
- /**
1064
- * Filter the results using a literal string. Components with a matching `name` or
1065
- * `description` are returned (case insensitive).
1066
- */
1067
- query?: string;
1068
- }): Promise<PageBeanComponentWithIssueCount> {
1069
- return this.getClientInstance()
1070
- .request({
1071
- path: "/rest/api/3/project/{projectIdOrKey}/component",
1072
- method: "GET",
1073
- pathParams: {
1074
- projectIdOrKey,
1075
- },
1076
- query: {
1077
- startAt,
1078
- maxResults,
1079
- orderBy,
1080
- componentSource,
1081
- query,
1082
- },
1083
- })
1084
- .then(
1085
- this.getClientInstance().responseHandler({
1086
- 200: {
1087
- "application/json": "json",
1088
- },
1089
- }),
1090
- )
1091
- .then(
1092
- commonHttpClient.castResponse<{
1093
- status: 200;
1094
- mediaType: "application/json";
1095
- body: PageBeanComponentWithIssueCount;
1096
- }>(),
1097
- )
1098
- .then(
1099
- validationSchemaStorage.validator(
1100
- "ProjectComponentsService.getProjectComponentsPaginated.response",
1101
- ),
1102
- )
1103
- .then(commonHttpClient.getBody);
1104
- }
1105
- /**
1106
- * Updates a component. Any fields included in the request are overwritten. If
1107
- * `leadAccountId` is an empty string ("") the component lead is removed.
1108
- *
1109
- * This operation can be accessed anonymously.
1110
- *
1111
- * **[Permissions](#permissions) required:** *Administer projects* [project
1112
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project
1113
- * containing the component or *Administer Jira* [global
1114
- * permission](https://confluence.atlassian.com/x/x4dKLg).
1115
- *
1116
- * @returns Returned if the request is successful.
1117
- *
1118
- * example: {
1119
- * "ari":
1120
- * "ari:cloud:compass:fdb3fdec-4e70-be56-11ee-0242ac120002:component/fdb3fdec-4e70-11ee-be56-0242ac120002/fdb3fdec-11ee-4e70-be56-0242ac120002",
1121
- * "assignee": {
1122
- * "accountId": "5b10a2844c20165700ede21g",
1123
- * "accountType": "atlassian",
1124
- * "active": false,
1125
- * "avatarUrls": {
1126
- * "16x16":
1127
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
1128
- * "24x24":
1129
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
1130
- * "32x32":
1131
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
1132
- * "48x48":
1133
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
1134
- * },
1135
- * "displayName": "Mia Krystof",
1136
- * "key": "",
1137
- * "name": "",
1138
- * "self":
1139
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
1140
- * },
1141
- * "assigneeType": "PROJECT_LEAD",
1142
- * "description": "This is a Jira component",
1143
- * "id": "10000",
1144
- * "isAssigneeTypeValid": false,
1145
- * "lead": {
1146
- * "accountId": "5b10a2844c20165700ede21g",
1147
- * "accountType": "atlassian",
1148
- * "active": false,
1149
- * "avatarUrls": {
1150
- * "16x16":
1151
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
1152
- * "24x24":
1153
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
1154
- * "32x32":
1155
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
1156
- * "48x48":
1157
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
1158
- * },
1159
- * "displayName": "Mia Krystof",
1160
- * "key": "",
1161
- * "name": "",
1162
- * "self":
1163
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
1164
- * },
1165
- * "metadata": {
1166
- * "icon": "https://www.example.com/icon.png"
1167
- * },
1168
- * "name": "Component 1",
1169
- * "project": "HSP",
1170
- * "projectId": 10000,
1171
- * "realAssignee": {
1172
- * "accountId": "5b10a2844c20165700ede21g",
1173
- * "accountType": "atlassian",
1174
- * "active": false,
1175
- * "avatarUrls": {
1176
- * "16x16":
1177
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
1178
- * "24x24":
1179
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
1180
- * "32x32":
1181
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
1182
- * "48x48":
1183
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
1184
- * },
1185
- * "displayName": "Mia Krystof",
1186
- * "key": "",
1187
- * "name": "",
1188
- * "self":
1189
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
1190
- * },
1191
- * "realAssigneeType": "PROJECT_LEAD",
1192
- * "self": "https://your-domain.atlassian.net/rest/api/3/component/10000"
1193
- * }
1194
- * @path {PUT} /rest/api/3/component/{id}
1195
- * @scopes-current manage:jira-project
1196
- * @scopes-beta read:project:jira, read:user:jira, write:project.component:jira,
1197
- * read:application-role:jira, read:avatar:jira, read:group:jira,
1198
- * read:project.component:jira
1199
- */
1200
- updateComponent({
1201
- id,
1202
- projectComponent,
1203
- }: {
1204
- /** The ID of the component. */
1205
- id: string;
1206
- /**
1207
- * @example {
1208
- * "assigneeType": "PROJECT_LEAD",
1209
- * "description": "This is a Jira component",
1210
- * "isAssigneeTypeValid": false,
1211
- * "leadAccountId": "5b10a2844c20165700ede21g",
1212
- * "name": "Component 1"
1213
- * }
1214
- */
1215
- projectComponent: ProjectComponent;
1216
- }): Promise<ProjectComponent> {
1217
- return this.getClientInstance()
1218
- .request({
1219
- path: "/rest/api/3/component/{id}",
1220
- method: "PUT",
1221
- pathParams: {
1222
- id,
1223
- },
1224
- headers: {
1225
- "Content-Type": "application/json",
1226
- },
1227
- body: projectComponent,
1228
- })
1229
- .then(
1230
- this.getClientInstance().responseHandler({
1231
- 200: {
1232
- "application/json": "json",
1233
- },
1234
- }),
1235
- )
1236
- .then(
1237
- commonHttpClient.castResponse<{
1238
- status: 200;
1239
- mediaType: "application/json";
1240
- body: ProjectComponent;
1241
- }>(),
1242
- )
1243
- .then(
1244
- validationSchemaStorage.validator(
1245
- "ProjectComponentsService.updateComponent.response",
1246
- ),
1247
- )
1248
- .then(commonHttpClient.getBody);
1249
- }
1250
- static initialize() {
1251
- validationSchemaStorage.registerExtensible(
1252
- "ProjectComponentsService.findComponentsForProjects.response",
1253
- z
1254
- .object({
1255
- status: z.literal(200),
1256
- mediaType: z.literal("application/json"),
1257
- body: validationSchemaStorage.lazy("PageBean2ComponentJsonBean"),
1258
- })
1259
- .describe(
1260
- "ProjectComponentsService.findComponentsForProjects.response",
1261
- ),
1262
- );
1263
- validationSchemaStorage.registerExtensible(
1264
- "ProjectComponentsService.createComponent.response",
1265
- z
1266
- .object({
1267
- status: z.literal(201),
1268
- mediaType: z.literal("application/json"),
1269
- body: validationSchemaStorage.lazy("ProjectComponent"),
1270
- })
1271
- .describe("ProjectComponentsService.createComponent.response"),
1272
- );
1273
- validationSchemaStorage.registerExtensible(
1274
- "ProjectComponentsService.getComponent.response",
1275
- z
1276
- .object({
1277
- status: z.literal(200),
1278
- mediaType: z.literal("application/json"),
1279
- body: validationSchemaStorage.lazy("ProjectComponent"),
1280
- })
1281
- .describe("ProjectComponentsService.getComponent.response"),
1282
- );
1283
- validationSchemaStorage.registerExtensible(
1284
- "ProjectComponentsService.updateComponent.response",
1285
- z
1286
- .object({
1287
- status: z.literal(200),
1288
- mediaType: z.literal("application/json"),
1289
- body: validationSchemaStorage.lazy("ProjectComponent"),
1290
- })
1291
- .describe("ProjectComponentsService.updateComponent.response"),
1292
- );
1293
- validationSchemaStorage.registerExtensible(
1294
- "ProjectComponentsService.getComponentRelatedIssues.response",
1295
- z
1296
- .object({
1297
- status: z.literal(200),
1298
- mediaType: z.literal("application/json"),
1299
- body: validationSchemaStorage.lazy("ComponentIssuesCount"),
1300
- })
1301
- .describe(
1302
- "ProjectComponentsService.getComponentRelatedIssues.response",
1303
- ),
1304
- );
1305
- validationSchemaStorage.registerExtensible(
1306
- "ProjectComponentsService.getProjectComponentsPaginated.response",
1307
- z
1308
- .object({
1309
- status: z.literal(200),
1310
- mediaType: z.literal("application/json"),
1311
- body: validationSchemaStorage.lazy("PageBeanComponentWithIssueCount"),
1312
- })
1313
- .describe(
1314
- "ProjectComponentsService.getProjectComponentsPaginated.response",
1315
- ),
1316
- );
1317
- validationSchemaStorage.registerExtensible(
1318
- "ProjectComponentsService.getProjectComponents.response",
1319
- z
1320
- .object({
1321
- status: z.literal(200),
1322
- mediaType: z.literal("application/json"),
1323
- body: z.array(validationSchemaStorage.lazy("ProjectComponent")),
1324
- })
1325
- .describe("ProjectComponentsService.getProjectComponents.response"),
1326
- );
1327
- validationSchemaStorage.registerOnce([
1328
- registerProjectComponentsValidationSchemas,
1329
- registerCommonValidationSchemas,
1330
- ]);
1331
- }
1332
- }