@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,161 +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 ProjectEmailAddress,
10
- registerProjectEmailValidationSchemas,
11
- } from "../models/project-email";
12
- import { validationSchemaStorage } from "../validation-schema-storage";
13
- /**
14
- * This resource represents the email address used to send a project's
15
- * notifications. Use it to get and set the [project's sender email
16
- * address](https://confluence.atlassian.com/x/dolKLg).
17
- */
18
- export class ProjectEmailService extends CommonHttpService {
19
- /**
20
- * Returns the [project's sender email
21
- * address](https://confluence.atlassian.com/x/dolKLg).
22
- *
23
- * **[Permissions](#permissions) required:** *Browse projects* [project
24
- * permission](https://confluence.atlassian.com/x/yodKLg) for the project.
25
- *
26
- * @returns Returned if the request is successful.
27
- *
28
- * example: {
29
- * "emailAddress": "jira@example.customdomain.com",
30
- * "emailAddressStatus": [
31
- * "Email address or domain not verified."
32
- * ]
33
- * }
34
- * @path {GET} /rest/api/3/project/{projectId}/email
35
- * @scopes-current manage:jira-project
36
- * @scopes-beta read:project.email:jira
37
- */
38
- getProjectEmail({
39
- projectId,
40
- }: {
41
- /** The project ID. */
42
- projectId: number;
43
- }): Promise<ProjectEmailAddress> {
44
- return this.getClientInstance()
45
- .request({
46
- path: "/rest/api/3/project/{projectId}/email",
47
- method: "GET",
48
- pathParams: {
49
- projectId,
50
- },
51
- })
52
- .then(
53
- this.getClientInstance().responseHandler({
54
- 200: {
55
- "application/json": "json",
56
- },
57
- }),
58
- )
59
- .then(
60
- commonHttpClient.castResponse<{
61
- status: 200;
62
- mediaType: "application/json";
63
- body: ProjectEmailAddress;
64
- }>(),
65
- )
66
- .then(
67
- validationSchemaStorage.validator(
68
- "ProjectEmailService.getProjectEmail.response",
69
- ),
70
- )
71
- .then(commonHttpClient.getBody);
72
- }
73
- /**
74
- * Sets the [project's sender email
75
- * address](https://confluence.atlassian.com/x/dolKLg).
76
- *
77
- * If `emailAddress` is an empty string, the default email address is restored.
78
- *
79
- * **[Permissions](#permissions) required:** *Administer Jira* [global
80
- * permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects*
81
- * [project permission.](https://confluence.atlassian.com/x/yodKLg)
82
- *
83
- * @returns Returned if the project's sender email address is successfully set.
84
- * @path {PUT} /rest/api/3/project/{projectId}/email
85
- * @scopes-current manage:jira-project
86
- * @scopes-beta write:project.email:jira
87
- */
88
- updateProjectEmail({
89
- projectId,
90
- projectEmailAddress,
91
- }: {
92
- /** The project ID. */
93
- projectId: number;
94
- /**
95
- * The project's sender email address to be set.
96
- *
97
- * @example {
98
- * "emailAddress": "jira@example.atlassian.net"
99
- * }
100
- */
101
- projectEmailAddress: ProjectEmailAddress;
102
- }): Promise<void> {
103
- return this.getClientInstance()
104
- .request({
105
- path: "/rest/api/3/project/{projectId}/email",
106
- method: "PUT",
107
- pathParams: {
108
- projectId,
109
- },
110
- headers: {
111
- "Content-Type": "application/json",
112
- },
113
- body: projectEmailAddress,
114
- })
115
- .then(
116
- this.getClientInstance().responseHandler({
117
- 204: {
118
- "application/json": "json",
119
- },
120
- }),
121
- )
122
- .then(
123
- commonHttpClient.castResponse<{
124
- status: 204;
125
- mediaType: "application/json";
126
- body: void;
127
- }>(),
128
- )
129
- .then(
130
- validationSchemaStorage.validator(
131
- "ProjectEmailService.updateProjectEmail.response",
132
- ),
133
- )
134
- .then(commonHttpClient.getBody);
135
- }
136
- static initialize() {
137
- validationSchemaStorage.registerExtensible(
138
- "ProjectEmailService.getProjectEmail.response",
139
- z
140
- .object({
141
- status: z.literal(200),
142
- mediaType: z.literal("application/json"),
143
- body: validationSchemaStorage.lazy("ProjectEmailAddress"),
144
- })
145
- .describe("ProjectEmailService.getProjectEmail.response"),
146
- );
147
- validationSchemaStorage.registerExtensible(
148
- "ProjectEmailService.updateProjectEmail.response",
149
- z
150
- .object({
151
- status: z.literal(204),
152
- mediaType: z.literal("application/json"),
153
- body: z.unknown(),
154
- })
155
- .describe("ProjectEmailService.updateProjectEmail.response"),
156
- );
157
- validationSchemaStorage.registerOnce([
158
- registerProjectEmailValidationSchemas,
159
- ]);
160
- }
161
- }
@@ -1,207 +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 ContainerForProjectFeatures,
10
- type ProjectFeatureState,
11
- registerProjectFeaturesValidationSchemas,
12
- } from "../models/project-features";
13
- import { validationSchemaStorage } from "../validation-schema-storage";
14
- /**
15
- * This resource represents project features. Use it to get the list of features
16
- * for a project and modify the state of a feature. The project feature endpoint
17
- * is available only for Jira Software, both for team- and company-managed
18
- * projects.
19
- */
20
- export class ProjectFeaturesService extends CommonHttpService {
21
- /**
22
- * Returns the list of features for a project.
23
- *
24
- * @returns Returned if the request is successful.
25
- *
26
- * example: {
27
- * "features": [
28
- * {
29
- * "feature": "jsw.classic.roadmap",
30
- * "imageUri":
31
- * "https://jira.atlassian.com/s/sb53l8/b/3/ab8a7691e4738b4f147e293f0864adfd5b8d3c85/_/download/resources/com.atlassian.jira.rest:classic-project-features/simple-roadmap-feature.svg",
32
- * "localisedDescription": "Your roadmap is an optimized location to create
33
- * and manage your epics.",
34
- * "localisedName": "Roadmap",
35
- * "prerequisites": [],
36
- * "projectId": 10001,
37
- * "state": "ENABLED",
38
- * "toggleLocked": true
39
- * },
40
- * {
41
- * "feature": "jsw.classic.backlog",
42
- * "imageUri":
43
- * "https://jira.atlassian.com/s/sb53l8/b/3/ab8a7691e4738b4f147e293f0864adfd5b8d3c85/_/download/resources/com.atlassian.jira.rest:classic-project-features/simple-backlog-feature.svg",
44
- * "localisedDescription": "Plan and prioritize work in a dedicated space.
45
- * To enable and configure the backlog for each board, go to board settings.",
46
- * "localisedName": "Backlog",
47
- * "prerequisites": [],
48
- * "projectId": 10001,
49
- * "state": "ENABLED",
50
- * "toggleLocked": true
51
- * }
52
- * ]
53
- * }
54
- * @path {GET} /rest/api/3/project/{projectIdOrKey}/features
55
- * @scopes-current read:jira-work
56
- * @scopes-beta read:project.feature:jira
57
- */
58
- getFeaturesForProject({
59
- projectIdOrKey,
60
- }: {
61
- /** The ID or (case-sensitive) key of the project. */
62
- projectIdOrKey: string;
63
- }): Promise<ContainerForProjectFeatures> {
64
- return this.getClientInstance()
65
- .request({
66
- path: "/rest/api/3/project/{projectIdOrKey}/features",
67
- method: "GET",
68
- pathParams: {
69
- projectIdOrKey,
70
- },
71
- })
72
- .then(
73
- this.getClientInstance().responseHandler({
74
- 200: {
75
- "application/json": "json",
76
- },
77
- }),
78
- )
79
- .then(
80
- commonHttpClient.castResponse<{
81
- status: 200;
82
- mediaType: "application/json";
83
- body: ContainerForProjectFeatures;
84
- }>(),
85
- )
86
- .then(
87
- validationSchemaStorage.validator(
88
- "ProjectFeaturesService.getFeaturesForProject.response",
89
- ),
90
- )
91
- .then(commonHttpClient.getBody);
92
- }
93
- /**
94
- * Sets the state of a project feature.
95
- *
96
- * @returns Returned if the request is successful.
97
- *
98
- * example: {
99
- * "features": [
100
- * {
101
- * "feature": "jsw.classic.roadmap",
102
- * "imageUri":
103
- * "https://jira.atlassian.com/s/sb53l8/b/3/ab8a7691e4738b4f147e293f0864adfd5b8d3c85/_/download/resources/com.atlassian.jira.rest:classic-project-features/simple-roadmap-feature.svg",
104
- * "localisedDescription": "Your roadmap is an optimized location to create
105
- * and manage your epics.",
106
- * "localisedName": "Roadmap",
107
- * "prerequisites": [],
108
- * "projectId": 10001,
109
- * "state": "ENABLED",
110
- * "toggleLocked": true
111
- * },
112
- * {
113
- * "feature": "jsw.classic.backlog",
114
- * "imageUri":
115
- * "https://jira.atlassian.com/s/sb53l8/b/3/ab8a7691e4738b4f147e293f0864adfd5b8d3c85/_/download/resources/com.atlassian.jira.rest:classic-project-features/simple-backlog-feature.svg",
116
- * "localisedDescription": "Plan and prioritize work in a dedicated space.
117
- * To enable and configure the backlog for each board, go to board settings.",
118
- * "localisedName": "Backlog",
119
- * "prerequisites": [],
120
- * "projectId": 10001,
121
- * "state": "ENABLED",
122
- * "toggleLocked": true
123
- * }
124
- * ]
125
- * }
126
- * @path {PUT} /rest/api/3/project/{projectIdOrKey}/features/{featureKey}
127
- * @scopes-current manage:jira-project
128
- * @scopes-beta write:project.feature:jira, read:project.feature:jira
129
- */
130
- toggleFeatureForProject({
131
- projectIdOrKey,
132
- featureKey,
133
- projectFeatureState,
134
- }: {
135
- /** The ID or (case-sensitive) key of the project. */
136
- projectIdOrKey: string;
137
- /** The key of the feature. */
138
- featureKey: string;
139
- /**
140
- * Details of the feature state change.
141
- *
142
- * @example {
143
- * "state": "ENABLED"
144
- * }
145
- */
146
- projectFeatureState: ProjectFeatureState;
147
- }): Promise<ContainerForProjectFeatures> {
148
- return this.getClientInstance()
149
- .request({
150
- path: "/rest/api/3/project/{projectIdOrKey}/features/{featureKey}",
151
- method: "PUT",
152
- pathParams: {
153
- projectIdOrKey,
154
- featureKey,
155
- },
156
- headers: {
157
- "Content-Type": "application/json",
158
- },
159
- body: projectFeatureState,
160
- })
161
- .then(
162
- this.getClientInstance().responseHandler({
163
- 200: {
164
- "application/json": "json",
165
- },
166
- }),
167
- )
168
- .then(
169
- commonHttpClient.castResponse<{
170
- status: 200;
171
- mediaType: "application/json";
172
- body: ContainerForProjectFeatures;
173
- }>(),
174
- )
175
- .then(
176
- validationSchemaStorage.validator(
177
- "ProjectFeaturesService.toggleFeatureForProject.response",
178
- ),
179
- )
180
- .then(commonHttpClient.getBody);
181
- }
182
- static initialize() {
183
- validationSchemaStorage.registerExtensible(
184
- "ProjectFeaturesService.getFeaturesForProject.response",
185
- z
186
- .object({
187
- status: z.literal(200),
188
- mediaType: z.literal("application/json"),
189
- body: validationSchemaStorage.lazy("ContainerForProjectFeatures"),
190
- })
191
- .describe("ProjectFeaturesService.getFeaturesForProject.response"),
192
- );
193
- validationSchemaStorage.registerExtensible(
194
- "ProjectFeaturesService.toggleFeatureForProject.response",
195
- z
196
- .object({
197
- status: z.literal(200),
198
- mediaType: z.literal("application/json"),
199
- body: validationSchemaStorage.lazy("ContainerForProjectFeatures"),
200
- })
201
- .describe("ProjectFeaturesService.toggleFeatureForProject.response"),
202
- );
203
- validationSchemaStorage.registerOnce([
204
- registerProjectFeaturesValidationSchemas,
205
- ]);
206
- }
207
- }
@@ -1,200 +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 ErrorCollection,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import { validationSchemaStorage } from "../validation-schema-storage";
13
- /** This resource provides validation for project keys and names. */
14
- export class ProjectKeyAndNameValidationService extends CommonHttpService {
15
- /**
16
- * Validates a project key and, if the key is invalid or in use, generates a valid
17
- * random string for the project key.
18
- *
19
- * **[Permissions](#permissions) required:** None.
20
- *
21
- * @returns Returned if the request is successful.
22
- *
23
- * example: "VPNE"
24
- * @path {GET} /rest/api/3/projectvalidate/validProjectKey
25
- */
26
- getValidProjectKey({
27
- key,
28
- }: {
29
- /** The project key. */
30
- key?: string;
31
- }): Promise<string> {
32
- return this.getClientInstance()
33
- .request({
34
- path: "/rest/api/3/projectvalidate/validProjectKey",
35
- method: "GET",
36
- query: {
37
- key,
38
- },
39
- })
40
- .then(
41
- this.getClientInstance().responseHandler({
42
- 200: {
43
- "application/json": "json",
44
- },
45
- }),
46
- )
47
- .then(
48
- commonHttpClient.castResponse<{
49
- status: 200;
50
- mediaType: "application/json";
51
- body: string;
52
- }>(),
53
- )
54
- .then(
55
- validationSchemaStorage.validator(
56
- "ProjectKeyAndNameValidationService.getValidProjectKey.response",
57
- ),
58
- )
59
- .then(commonHttpClient.getBody);
60
- }
61
- /**
62
- * Checks that a project name isn't in use. If the name isn't in use, the passed
63
- * string is returned. If the name is in use, this operation attempts to generate
64
- * a valid project name based on the one supplied, usually by adding a sequence
65
- * number. If a valid project name cannot be generated, a 404 response is returned.
66
- *
67
- * **[Permissions](#permissions) required:** None.
68
- *
69
- * @returns Returned if the request is successful.
70
- *
71
- * example: "Valid Project Name Example"
72
- * @path {GET} /rest/api/3/projectvalidate/validProjectName
73
- */
74
- getValidProjectName({
75
- name,
76
- }: {
77
- /** The project name. */
78
- name: string;
79
- }): Promise<string> {
80
- return this.getClientInstance()
81
- .request({
82
- path: "/rest/api/3/projectvalidate/validProjectName",
83
- method: "GET",
84
- query: {
85
- name,
86
- },
87
- })
88
- .then(
89
- this.getClientInstance().responseHandler({
90
- 200: {
91
- "application/json": "json",
92
- },
93
- }),
94
- )
95
- .then(
96
- commonHttpClient.castResponse<{
97
- status: 200;
98
- mediaType: "application/json";
99
- body: string;
100
- }>(),
101
- )
102
- .then(
103
- validationSchemaStorage.validator(
104
- "ProjectKeyAndNameValidationService.getValidProjectName.response",
105
- ),
106
- )
107
- .then(commonHttpClient.getBody);
108
- }
109
- /**
110
- * Validates a project key by confirming the key is a valid string and not in use.
111
- *
112
- * **[Permissions](#permissions) required:** None.
113
- *
114
- * @returns Returned if the request is successful.
115
- *
116
- * example: {
117
- * "errorMessages": [],
118
- * "errors": {
119
- * "projectKey": "A project with that project key already exists."
120
- * }
121
- * }
122
- * @path {GET} /rest/api/3/projectvalidate/key
123
- * @scopes-current read:jira-work
124
- * @scopes-beta read:project:jira
125
- */
126
- validateProjectKey({
127
- key,
128
- }: {
129
- /** The project key. */
130
- key?: string;
131
- }): Promise<ErrorCollection> {
132
- return this.getClientInstance()
133
- .request({
134
- path: "/rest/api/3/projectvalidate/key",
135
- method: "GET",
136
- query: {
137
- key,
138
- },
139
- })
140
- .then(
141
- this.getClientInstance().responseHandler({
142
- 200: {
143
- "application/json": "json",
144
- },
145
- }),
146
- )
147
- .then(
148
- commonHttpClient.castResponse<{
149
- status: 200;
150
- mediaType: "application/json";
151
- body: ErrorCollection;
152
- }>(),
153
- )
154
- .then(
155
- validationSchemaStorage.validator(
156
- "ProjectKeyAndNameValidationService.validateProjectKey.response",
157
- ),
158
- )
159
- .then(commonHttpClient.getBody);
160
- }
161
- static initialize() {
162
- validationSchemaStorage.registerExtensible(
163
- "ProjectKeyAndNameValidationService.validateProjectKey.response",
164
- z
165
- .object({
166
- status: z.literal(200),
167
- mediaType: z.literal("application/json"),
168
- body: validationSchemaStorage.lazy("ErrorCollection"),
169
- })
170
- .describe(
171
- "ProjectKeyAndNameValidationService.validateProjectKey.response",
172
- ),
173
- );
174
- validationSchemaStorage.registerExtensible(
175
- "ProjectKeyAndNameValidationService.getValidProjectKey.response",
176
- z
177
- .object({
178
- status: z.literal(200),
179
- mediaType: z.literal("application/json"),
180
- body: z.string(),
181
- })
182
- .describe(
183
- "ProjectKeyAndNameValidationService.getValidProjectKey.response",
184
- ),
185
- );
186
- validationSchemaStorage.registerExtensible(
187
- "ProjectKeyAndNameValidationService.getValidProjectName.response",
188
- z
189
- .object({
190
- status: z.literal(200),
191
- mediaType: z.literal("application/json"),
192
- body: z.string(),
193
- })
194
- .describe(
195
- "ProjectKeyAndNameValidationService.getValidProjectName.response",
196
- ),
197
- );
198
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
199
- }
200
- }