@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,386 +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
- registerCommonValidationSchemas,
10
- type TimeTrackingConfiguration,
11
- } from "../models/common";
12
- import {
13
- registerTimeTrackingValidationSchemas,
14
- type TimeTrackingProvider,
15
- } from "../models/time-tracking";
16
- import { validationSchemaStorage } from "../validation-schema-storage";
17
- /**
18
- * This resource represents time tracking and time tracking providers. Use it to
19
- * get and set the time tracking provider, get and set the time tracking options,
20
- * and disable time tracking.
21
- */
22
- export class TimeTrackingService extends CommonHttpService {
23
- /**
24
- * Returns all time tracking providers. By default, Jira only has one time
25
- * tracking provider: *JIRA provided time tracking*. However, you can install
26
- * other time tracking providers via apps from the Atlassian Marketplace. For more
27
- * information on time tracking providers, see the documentation for the [ Time
28
- * Tracking
29
- * Provider](https://developer.atlassian.com/cloud/jira/platform/modules/time-tracking-provider/)
30
- * module.
31
- *
32
- * **[Permissions](#permissions) required:** *Administer Jira* [global
33
- * permission](https://confluence.atlassian.com/x/x4dKLg).
34
- *
35
- * @returns Returned if the request is successful.
36
- *
37
- * example: [
38
- * {
39
- * "key": "Jira",
40
- * "name": "JIRA provided time tracking",
41
- * "url": "/example/config/url"
42
- * }
43
- * ]
44
- * @path {GET} /rest/api/3/configuration/timetracking/list
45
- * @scopes-current manage:jira-configuration
46
- * @scopes-beta read:issue.time-tracking:jira
47
- */
48
- getAvailableTimeTrackingImplementations(): Promise<TimeTrackingProvider[]> {
49
- return this.getClientInstance()
50
- .request({
51
- path: "/rest/api/3/configuration/timetracking/list",
52
- method: "GET",
53
- })
54
- .then(
55
- this.getClientInstance().responseHandler({
56
- 200: {
57
- "application/json": "json",
58
- },
59
- }),
60
- )
61
- .then(
62
- commonHttpClient.castResponse<{
63
- status: 200;
64
- mediaType: "application/json";
65
- body: TimeTrackingProvider[];
66
- }>(),
67
- )
68
- .then(
69
- validationSchemaStorage.validator(
70
- "TimeTrackingService.getAvailableTimeTrackingImplementations.response",
71
- ),
72
- )
73
- .then(commonHttpClient.getBody);
74
- }
75
- /**
76
- * Returns the time tracking provider that is currently selected. Note that if
77
- * time tracking is disabled, then a successful but empty response is returned.
78
- *
79
- * **[Permissions](#permissions) required:** *Administer Jira* [global
80
- * permission](https://confluence.atlassian.com/x/x4dKLg).
81
- *
82
- * @returns * status: 200, mediaType: application/json
83
- *
84
- * Returned if the request is successful and time tracking is enabled.
85
- *
86
- * example: {
87
- * "key": "Jira",
88
- * "name": "JIRA provided time tracking",
89
- * "url": "/example/config/url"
90
- * }
91
- *
92
- * * status: 204, mediaType: application/json
93
- *
94
- * Returned if the request is successful but time tracking is disabled.
95
- * @path {GET} /rest/api/3/configuration/timetracking
96
- * @scopes-current manage:jira-configuration
97
- * @scopes-beta read:issue.time-tracking:jira
98
- */
99
- getSelectedTimeTrackingImplementation(): Promise<
100
- commonHttpClient.WithResponse<
101
- | {
102
- status: 200;
103
- mediaType: "application/json";
104
- body: TimeTrackingProvider;
105
- }
106
- | {
107
- status: 204;
108
- mediaType: "application/json";
109
- body: void;
110
- }
111
- >
112
- > {
113
- return this.getClientInstance()
114
- .request({
115
- path: "/rest/api/3/configuration/timetracking",
116
- method: "GET",
117
- })
118
- .then(
119
- this.getClientInstance().responseHandler({
120
- 200: {
121
- "application/json": "json",
122
- },
123
- 204: {
124
- "application/json": "json",
125
- },
126
- }),
127
- )
128
- .then(
129
- commonHttpClient.castResponse<
130
- | {
131
- status: 200;
132
- mediaType: "application/json";
133
- body: TimeTrackingProvider;
134
- }
135
- | {
136
- status: 204;
137
- mediaType: "application/json";
138
- body: void;
139
- }
140
- >(),
141
- )
142
- .then(
143
- validationSchemaStorage.validator(
144
- "TimeTrackingService.getSelectedTimeTrackingImplementation.response",
145
- ),
146
- );
147
- }
148
- /**
149
- * Returns the time tracking settings. This includes settings such as the time
150
- * format, default time unit, and others. For more information, see [Configuring
151
- * time tracking](https://confluence.atlassian.com/x/qoXKM).
152
- *
153
- * **[Permissions](#permissions) required:** *Administer Jira* [global
154
- * permission](https://confluence.atlassian.com/x/x4dKLg).
155
- *
156
- * @returns Returned if the request is successful.
157
- *
158
- * example: {
159
- * "defaultUnit": "hour",
160
- * "timeFormat": "pretty",
161
- * "workingDaysPerWeek": 5.5,
162
- * "workingHoursPerDay": 7.6
163
- * }
164
- * @path {GET} /rest/api/3/configuration/timetracking/options
165
- * @scopes-current manage:jira-configuration
166
- * @scopes-beta read:issue.time-tracking:jira
167
- */
168
- getSharedTimeTrackingConfiguration(): Promise<TimeTrackingConfiguration> {
169
- return this.getClientInstance()
170
- .request({
171
- path: "/rest/api/3/configuration/timetracking/options",
172
- method: "GET",
173
- })
174
- .then(
175
- this.getClientInstance().responseHandler({
176
- 200: {
177
- "application/json": "json",
178
- },
179
- }),
180
- )
181
- .then(
182
- commonHttpClient.castResponse<{
183
- status: 200;
184
- mediaType: "application/json";
185
- body: TimeTrackingConfiguration;
186
- }>(),
187
- )
188
- .then(
189
- validationSchemaStorage.validator(
190
- "TimeTrackingService.getSharedTimeTrackingConfiguration.response",
191
- ),
192
- )
193
- .then(commonHttpClient.getBody);
194
- }
195
- /**
196
- * Selects a time tracking provider.
197
- *
198
- * **[Permissions](#permissions) required:** *Administer Jira* [global
199
- * permission](https://confluence.atlassian.com/x/x4dKLg).
200
- *
201
- * @returns Returned if the request is successful.
202
- * @path {PUT} /rest/api/3/configuration/timetracking
203
- * @scopes-current manage:jira-configuration
204
- * @scopes-beta write:issue.time-tracking:jira
205
- */
206
- selectTimeTrackingImplementation({
207
- timeTrackingProvider,
208
- }: {
209
- /**
210
- * @example {
211
- * "key": "Jira"
212
- * }
213
- */
214
- timeTrackingProvider: TimeTrackingProvider;
215
- }): Promise<void> {
216
- return this.getClientInstance()
217
- .request({
218
- path: "/rest/api/3/configuration/timetracking",
219
- method: "PUT",
220
- headers: {
221
- "Content-Type": "application/json",
222
- },
223
- body: timeTrackingProvider,
224
- })
225
- .then(
226
- this.getClientInstance().responseHandler({
227
- 204: {
228
- "application/json": "json",
229
- },
230
- }),
231
- )
232
- .then(
233
- commonHttpClient.castResponse<{
234
- status: 204;
235
- mediaType: "application/json";
236
- body: void;
237
- }>(),
238
- )
239
- .then(
240
- validationSchemaStorage.validator(
241
- "TimeTrackingService.selectTimeTrackingImplementation.response",
242
- ),
243
- )
244
- .then(commonHttpClient.getBody);
245
- }
246
- /**
247
- * Sets the time tracking settings.
248
- *
249
- * **[Permissions](#permissions) required:** *Administer Jira* [global
250
- * permission](https://confluence.atlassian.com/x/x4dKLg).
251
- *
252
- * @returns Returned if the request is successful.
253
- *
254
- * example: {
255
- * "defaultUnit": "hour",
256
- * "timeFormat": "pretty",
257
- * "workingDaysPerWeek": 5.5,
258
- * "workingHoursPerDay": 7.6
259
- * }
260
- * @path {PUT} /rest/api/3/configuration/timetracking/options
261
- * @scopes-current manage:jira-configuration
262
- * @scopes-beta write:issue.time-tracking:jira, read:issue.time-tracking:jira
263
- */
264
- setSharedTimeTrackingConfiguration({
265
- timeTrackingConfiguration,
266
- }: {
267
- /**
268
- * @example {
269
- * "defaultUnit": "hour",
270
- * "timeFormat": "pretty",
271
- * "workingDaysPerWeek": 5.5,
272
- * "workingHoursPerDay": 7.6
273
- * }
274
- */
275
- timeTrackingConfiguration: TimeTrackingConfiguration;
276
- }): Promise<TimeTrackingConfiguration> {
277
- return this.getClientInstance()
278
- .request({
279
- path: "/rest/api/3/configuration/timetracking/options",
280
- method: "PUT",
281
- headers: {
282
- "Content-Type": "application/json",
283
- },
284
- body: timeTrackingConfiguration,
285
- })
286
- .then(
287
- this.getClientInstance().responseHandler({
288
- 200: {
289
- "application/json": "json",
290
- },
291
- }),
292
- )
293
- .then(
294
- commonHttpClient.castResponse<{
295
- status: 200;
296
- mediaType: "application/json";
297
- body: TimeTrackingConfiguration;
298
- }>(),
299
- )
300
- .then(
301
- validationSchemaStorage.validator(
302
- "TimeTrackingService.setSharedTimeTrackingConfiguration.response",
303
- ),
304
- )
305
- .then(commonHttpClient.getBody);
306
- }
307
- static initialize() {
308
- validationSchemaStorage.registerExtensible(
309
- "TimeTrackingService.getSelectedTimeTrackingImplementation.response",
310
- z
311
- .object({
312
- status: z.number(),
313
- mediaType: z.string(),
314
- body: z.unknown(),
315
- })
316
- .superRefine(({ status: status, body: body }, ctx) => {
317
- if (status === 200) {
318
- validationSchemaStorage.lazy("TimeTrackingProvider").parse(body);
319
- } else if (status === 204) {
320
- z.unknown().parse(body);
321
- } else {
322
- ctx.addIssue({
323
- code: z.ZodIssueCode.custom,
324
- path: ["status"],
325
- message: `Unexpected status code: ${status}`,
326
- });
327
- }
328
- })
329
- .describe(
330
- "TimeTrackingService.getSelectedTimeTrackingImplementation.response",
331
- ),
332
- );
333
- validationSchemaStorage.registerExtensible(
334
- "TimeTrackingService.selectTimeTrackingImplementation.response",
335
- z
336
- .object({
337
- status: z.literal(204),
338
- mediaType: z.literal("application/json"),
339
- body: z.unknown(),
340
- })
341
- .describe(
342
- "TimeTrackingService.selectTimeTrackingImplementation.response",
343
- ),
344
- );
345
- validationSchemaStorage.registerExtensible(
346
- "TimeTrackingService.getAvailableTimeTrackingImplementations.response",
347
- z
348
- .object({
349
- status: z.literal(200),
350
- mediaType: z.literal("application/json"),
351
- body: z.array(validationSchemaStorage.lazy("TimeTrackingProvider")),
352
- })
353
- .describe(
354
- "TimeTrackingService.getAvailableTimeTrackingImplementations.response",
355
- ),
356
- );
357
- validationSchemaStorage.registerExtensible(
358
- "TimeTrackingService.getSharedTimeTrackingConfiguration.response",
359
- z
360
- .object({
361
- status: z.literal(200),
362
- mediaType: z.literal("application/json"),
363
- body: validationSchemaStorage.lazy("TimeTrackingConfiguration"),
364
- })
365
- .describe(
366
- "TimeTrackingService.getSharedTimeTrackingConfiguration.response",
367
- ),
368
- );
369
- validationSchemaStorage.registerExtensible(
370
- "TimeTrackingService.setSharedTimeTrackingConfiguration.response",
371
- z
372
- .object({
373
- status: z.literal(200),
374
- mediaType: z.literal("application/json"),
375
- body: validationSchemaStorage.lazy("TimeTrackingConfiguration"),
376
- })
377
- .describe(
378
- "TimeTrackingService.setSharedTimeTrackingConfiguration.response",
379
- ),
380
- );
381
- validationSchemaStorage.registerOnce([
382
- registerTimeTrackingValidationSchemas,
383
- registerCommonValidationSchemas,
384
- ]);
385
- }
386
- }