tuix-projects-service-client 0.0.1

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 (222) hide show
  1. package/.openapi-generator/FILES +107 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +48 -0
  5. package/apis/ClientApi.js +2854 -0
  6. package/apis/ClientApi.js.map +1 -0
  7. package/apis/ClientApi.ts +4331 -0
  8. package/apis/index.js +20 -0
  9. package/apis/index.js.map +1 -0
  10. package/apis/index.ts +3 -0
  11. package/docs/AccountInfoDTO.md +36 -0
  12. package/docs/AdjustedTimesheetDTO.md +48 -0
  13. package/docs/AdjustedTimesheetEmployeeInfo.md +36 -0
  14. package/docs/AdjustedTimesheetEntryDTO.md +48 -0
  15. package/docs/AdjustedTimesheetUpdateEntryDTO.md +40 -0
  16. package/docs/ClientApi.md +5220 -0
  17. package/docs/ClientDTO.md +50 -0
  18. package/docs/ClientGithubAccountDTO.md +34 -0
  19. package/docs/ClientGithubCommitCountDTO.md +36 -0
  20. package/docs/ClientGithubUserDTO.md +46 -0
  21. package/docs/ClientInvoiceDTO.md +46 -0
  22. package/docs/ClientJiraAccountDTO.md +38 -0
  23. package/docs/ClientJiraUserDTO.md +48 -0
  24. package/docs/CompanyDTO.md +70 -0
  25. package/docs/CreateEmployeeInvoiceInputDTO.md +40 -0
  26. package/docs/CreateGithubUserRequestDTO.md +40 -0
  27. package/docs/CreateJiraAccountDTO.md +40 -0
  28. package/docs/CreateJiraUserRequestDTO.md +38 -0
  29. package/docs/EmployeeDTO.md +82 -0
  30. package/docs/EmployeeInvoiceDTO.md +44 -0
  31. package/docs/EmployeeProjectDTO.md +46 -0
  32. package/docs/EmployeeUpdateDTO.md +78 -0
  33. package/docs/ErrorDTO.md +34 -0
  34. package/docs/GlobalTimesheetDTO.md +42 -0
  35. package/docs/GlobalTimesheetEntryDTO.md +40 -0
  36. package/docs/GlobalTimesheetEntryUpdateDTO.md +36 -0
  37. package/docs/HolidayCreateDTO.md +34 -0
  38. package/docs/HolidayDTO.md +38 -0
  39. package/docs/MarkEmployeeInvoicePaidDTO.md +34 -0
  40. package/docs/MarkInvoicePaidDTO.md +34 -0
  41. package/docs/PaginatedAdjustedTimesheets.md +42 -0
  42. package/docs/PaginatedClientInvoices.md +42 -0
  43. package/docs/PaginatedClients.md +42 -0
  44. package/docs/PaginatedEmployeeInvoices.md +42 -0
  45. package/docs/PaginatedEmployeeProjects.md +42 -0
  46. package/docs/PaginatedEmployees.md +42 -0
  47. package/docs/PaginatedGlobalTimesheets.md +42 -0
  48. package/docs/PaginatedHolidaysDTO.md +42 -0
  49. package/docs/PaginatedProjects.md +42 -0
  50. package/docs/PaginatedTimesheets.md +42 -0
  51. package/docs/PaginatedUsers.md +42 -0
  52. package/docs/ProjectDTO.md +78 -0
  53. package/docs/ProjectInputDTO.md +72 -0
  54. package/docs/ProjectUpdateDTO.md +72 -0
  55. package/docs/TeamUpdateDTO.md +34 -0
  56. package/docs/TimesheetDTO.md +48 -0
  57. package/docs/TimesheetEmployeeInfo.md +36 -0
  58. package/docs/TimesheetEntryDTO.md +48 -0
  59. package/docs/TimesheetEntryUpdateDTO.md +40 -0
  60. package/docs/UserEnrollDTO.md +38 -0
  61. package/docs/UserProjectReport.md +52 -0
  62. package/index.js +22 -0
  63. package/index.js.map +1 -0
  64. package/index.ts +5 -0
  65. package/models/AccountInfoDTO.js +51 -0
  66. package/models/AccountInfoDTO.js.map +1 -0
  67. package/models/AccountInfoDTO.ts +73 -0
  68. package/models/AdjustedTimesheetDTO.js +75 -0
  69. package/models/AdjustedTimesheetDTO.js.map +1 -0
  70. package/models/AdjustedTimesheetDTO.ts +141 -0
  71. package/models/AdjustedTimesheetEmployeeInfo.js +51 -0
  72. package/models/AdjustedTimesheetEmployeeInfo.js.map +1 -0
  73. package/models/AdjustedTimesheetEmployeeInfo.ts +73 -0
  74. package/models/AdjustedTimesheetEntryDTO.js +63 -0
  75. package/models/AdjustedTimesheetEntryDTO.js.map +1 -0
  76. package/models/AdjustedTimesheetEntryDTO.ts +121 -0
  77. package/models/AdjustedTimesheetUpdateEntryDTO.js +55 -0
  78. package/models/AdjustedTimesheetUpdateEntryDTO.js.map +1 -0
  79. package/models/AdjustedTimesheetUpdateEntryDTO.ts +89 -0
  80. package/models/ClientDTO.js +65 -0
  81. package/models/ClientDTO.js.map +1 -0
  82. package/models/ClientDTO.ts +129 -0
  83. package/models/ClientGithubAccountDTO.js +49 -0
  84. package/models/ClientGithubAccountDTO.js.map +1 -0
  85. package/models/ClientGithubAccountDTO.ts +65 -0
  86. package/models/ClientGithubCommitCountDTO.js +51 -0
  87. package/models/ClientGithubCommitCountDTO.js.map +1 -0
  88. package/models/ClientGithubCommitCountDTO.ts +73 -0
  89. package/models/ClientGithubUserDTO.js +62 -0
  90. package/models/ClientGithubUserDTO.js.map +1 -0
  91. package/models/ClientGithubUserDTO.ts +121 -0
  92. package/models/ClientInvoiceDTO.js +61 -0
  93. package/models/ClientInvoiceDTO.js.map +1 -0
  94. package/models/ClientInvoiceDTO.ts +113 -0
  95. package/models/ClientJiraAccountDTO.js +53 -0
  96. package/models/ClientJiraAccountDTO.js.map +1 -0
  97. package/models/ClientJiraAccountDTO.ts +81 -0
  98. package/models/ClientJiraUserDTO.js +63 -0
  99. package/models/ClientJiraUserDTO.js.map +1 -0
  100. package/models/ClientJiraUserDTO.ts +121 -0
  101. package/models/CompanyDTO.js +85 -0
  102. package/models/CompanyDTO.js.map +1 -0
  103. package/models/CompanyDTO.ts +209 -0
  104. package/models/CreateEmployeeInvoiceInputDTO.js +61 -0
  105. package/models/CreateEmployeeInvoiceInputDTO.js.map +1 -0
  106. package/models/CreateEmployeeInvoiceInputDTO.ts +92 -0
  107. package/models/CreateGithubUserRequestDTO.js +63 -0
  108. package/models/CreateGithubUserRequestDTO.js.map +1 -0
  109. package/models/CreateGithubUserRequestDTO.ts +93 -0
  110. package/models/CreateJiraAccountDTO.js +55 -0
  111. package/models/CreateJiraAccountDTO.js.map +1 -0
  112. package/models/CreateJiraAccountDTO.ts +89 -0
  113. package/models/CreateJiraUserRequestDTO.js +53 -0
  114. package/models/CreateJiraUserRequestDTO.js.map +1 -0
  115. package/models/CreateJiraUserRequestDTO.ts +81 -0
  116. package/models/EmployeeDTO.js +97 -0
  117. package/models/EmployeeDTO.js.map +1 -0
  118. package/models/EmployeeDTO.ts +257 -0
  119. package/models/EmployeeInvoiceDTO.js +69 -0
  120. package/models/EmployeeInvoiceDTO.js.map +1 -0
  121. package/models/EmployeeInvoiceDTO.ts +110 -0
  122. package/models/EmployeeProjectDTO.js +61 -0
  123. package/models/EmployeeProjectDTO.js.map +1 -0
  124. package/models/EmployeeProjectDTO.ts +113 -0
  125. package/models/EmployeeUpdateDTO.js +93 -0
  126. package/models/EmployeeUpdateDTO.js.map +1 -0
  127. package/models/EmployeeUpdateDTO.ts +241 -0
  128. package/models/ErrorDTO.js +49 -0
  129. package/models/ErrorDTO.js.map +1 -0
  130. package/models/ErrorDTO.ts +65 -0
  131. package/models/GlobalTimesheetDTO.js +58 -0
  132. package/models/GlobalTimesheetDTO.js.map +1 -0
  133. package/models/GlobalTimesheetDTO.ts +105 -0
  134. package/models/GlobalTimesheetEntryDTO.js +63 -0
  135. package/models/GlobalTimesheetEntryDTO.js.map +1 -0
  136. package/models/GlobalTimesheetEntryDTO.ts +93 -0
  137. package/models/GlobalTimesheetEntryUpdateDTO.js +51 -0
  138. package/models/GlobalTimesheetEntryUpdateDTO.js.map +1 -0
  139. package/models/GlobalTimesheetEntryUpdateDTO.ts +73 -0
  140. package/models/HolidayCreateDTO.js +51 -0
  141. package/models/HolidayCreateDTO.js.map +1 -0
  142. package/models/HolidayCreateDTO.ts +66 -0
  143. package/models/HolidayDTO.js +53 -0
  144. package/models/HolidayDTO.js.map +1 -0
  145. package/models/HolidayDTO.ts +81 -0
  146. package/models/MarkEmployeeInvoicePaidDTO.js +51 -0
  147. package/models/MarkEmployeeInvoicePaidDTO.js.map +1 -0
  148. package/models/MarkEmployeeInvoicePaidDTO.ts +66 -0
  149. package/models/MarkInvoicePaidDTO.js +51 -0
  150. package/models/MarkInvoicePaidDTO.js.map +1 -0
  151. package/models/MarkInvoicePaidDTO.ts +66 -0
  152. package/models/PaginatedAdjustedTimesheets.js +68 -0
  153. package/models/PaginatedAdjustedTimesheets.js.map +1 -0
  154. package/models/PaginatedAdjustedTimesheets.ts +110 -0
  155. package/models/PaginatedClientInvoices.js +68 -0
  156. package/models/PaginatedClientInvoices.js.map +1 -0
  157. package/models/PaginatedClientInvoices.ts +110 -0
  158. package/models/PaginatedClients.js +68 -0
  159. package/models/PaginatedClients.js.map +1 -0
  160. package/models/PaginatedClients.ts +110 -0
  161. package/models/PaginatedEmployeeInvoices.js +68 -0
  162. package/models/PaginatedEmployeeInvoices.js.map +1 -0
  163. package/models/PaginatedEmployeeInvoices.ts +110 -0
  164. package/models/PaginatedEmployeeProjects.js +68 -0
  165. package/models/PaginatedEmployeeProjects.js.map +1 -0
  166. package/models/PaginatedEmployeeProjects.ts +110 -0
  167. package/models/PaginatedEmployees.js +68 -0
  168. package/models/PaginatedEmployees.js.map +1 -0
  169. package/models/PaginatedEmployees.ts +110 -0
  170. package/models/PaginatedGlobalTimesheets.js +68 -0
  171. package/models/PaginatedGlobalTimesheets.js.map +1 -0
  172. package/models/PaginatedGlobalTimesheets.ts +110 -0
  173. package/models/PaginatedHolidaysDTO.js +68 -0
  174. package/models/PaginatedHolidaysDTO.js.map +1 -0
  175. package/models/PaginatedHolidaysDTO.ts +110 -0
  176. package/models/PaginatedProjects.js +68 -0
  177. package/models/PaginatedProjects.js.map +1 -0
  178. package/models/PaginatedProjects.ts +110 -0
  179. package/models/PaginatedTimesheets.js +68 -0
  180. package/models/PaginatedTimesheets.js.map +1 -0
  181. package/models/PaginatedTimesheets.ts +110 -0
  182. package/models/PaginatedUsers.js +68 -0
  183. package/models/PaginatedUsers.js.map +1 -0
  184. package/models/PaginatedUsers.ts +110 -0
  185. package/models/ProjectDTO.js +129 -0
  186. package/models/ProjectDTO.js.map +1 -0
  187. package/models/ProjectDTO.ts +259 -0
  188. package/models/ProjectInputDTO.js +123 -0
  189. package/models/ProjectInputDTO.js.map +1 -0
  190. package/models/ProjectInputDTO.ts +235 -0
  191. package/models/ProjectUpdateDTO.js +93 -0
  192. package/models/ProjectUpdateDTO.js.map +1 -0
  193. package/models/ProjectUpdateDTO.ts +220 -0
  194. package/models/TeamUpdateDTO.js +50 -0
  195. package/models/TeamUpdateDTO.js.map +1 -0
  196. package/models/TeamUpdateDTO.ts +73 -0
  197. package/models/TimesheetDTO.js +65 -0
  198. package/models/TimesheetDTO.js.map +1 -0
  199. package/models/TimesheetDTO.ts +136 -0
  200. package/models/TimesheetEmployeeInfo.js +51 -0
  201. package/models/TimesheetEmployeeInfo.js.map +1 -0
  202. package/models/TimesheetEmployeeInfo.ts +73 -0
  203. package/models/TimesheetEntryDTO.js +63 -0
  204. package/models/TimesheetEntryDTO.js.map +1 -0
  205. package/models/TimesheetEntryDTO.ts +121 -0
  206. package/models/TimesheetEntryUpdateDTO.js +55 -0
  207. package/models/TimesheetEntryUpdateDTO.js.map +1 -0
  208. package/models/TimesheetEntryUpdateDTO.ts +89 -0
  209. package/models/UserEnrollDTO.js +53 -0
  210. package/models/UserEnrollDTO.js.map +1 -0
  211. package/models/UserEnrollDTO.ts +81 -0
  212. package/models/UserProjectReport.js +67 -0
  213. package/models/UserProjectReport.js.map +1 -0
  214. package/models/UserProjectReport.ts +137 -0
  215. package/models/index.js +69 -0
  216. package/models/index.js.map +1 -0
  217. package/models/index.ts +52 -0
  218. package/package.json +17 -0
  219. package/runtime.js +345 -0
  220. package/runtime.js.map +1 -0
  221. package/runtime.ts +449 -0
  222. package/tsconfig.build.tsbuildinfo +1 -0
@@ -0,0 +1,4331 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tuix Project Service
5
+ * Service to manage Tuix projects
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import * as runtime from '../runtime';
16
+ import {
17
+ type AccountInfoDTO,
18
+ AccountInfoDTOFromJSON,
19
+ AccountInfoDTOToJSON,
20
+ } from '../models/AccountInfoDTO';
21
+ import {
22
+ type AdjustedTimesheetDTO,
23
+ AdjustedTimesheetDTOFromJSON,
24
+ AdjustedTimesheetDTOToJSON,
25
+ } from '../models/AdjustedTimesheetDTO';
26
+ import {
27
+ type AdjustedTimesheetEntryDTO,
28
+ AdjustedTimesheetEntryDTOFromJSON,
29
+ AdjustedTimesheetEntryDTOToJSON,
30
+ } from '../models/AdjustedTimesheetEntryDTO';
31
+ import {
32
+ type AdjustedTimesheetUpdateEntryDTO,
33
+ AdjustedTimesheetUpdateEntryDTOFromJSON,
34
+ AdjustedTimesheetUpdateEntryDTOToJSON,
35
+ } from '../models/AdjustedTimesheetUpdateEntryDTO';
36
+ import {
37
+ type ClientDTO,
38
+ ClientDTOFromJSON,
39
+ ClientDTOToJSON,
40
+ } from '../models/ClientDTO';
41
+ import {
42
+ type ClientGithubAccountDTO,
43
+ ClientGithubAccountDTOFromJSON,
44
+ ClientGithubAccountDTOToJSON,
45
+ } from '../models/ClientGithubAccountDTO';
46
+ import {
47
+ type ClientGithubCommitCountDTO,
48
+ ClientGithubCommitCountDTOFromJSON,
49
+ ClientGithubCommitCountDTOToJSON,
50
+ } from '../models/ClientGithubCommitCountDTO';
51
+ import {
52
+ type ClientGithubUserDTO,
53
+ ClientGithubUserDTOFromJSON,
54
+ ClientGithubUserDTOToJSON,
55
+ } from '../models/ClientGithubUserDTO';
56
+ import {
57
+ type ClientJiraAccountDTO,
58
+ ClientJiraAccountDTOFromJSON,
59
+ ClientJiraAccountDTOToJSON,
60
+ } from '../models/ClientJiraAccountDTO';
61
+ import {
62
+ type ClientJiraUserDTO,
63
+ ClientJiraUserDTOFromJSON,
64
+ ClientJiraUserDTOToJSON,
65
+ } from '../models/ClientJiraUserDTO';
66
+ import {
67
+ type CompanyDTO,
68
+ CompanyDTOFromJSON,
69
+ CompanyDTOToJSON,
70
+ } from '../models/CompanyDTO';
71
+ import {
72
+ type CreateEmployeeInvoiceInputDTO,
73
+ CreateEmployeeInvoiceInputDTOFromJSON,
74
+ CreateEmployeeInvoiceInputDTOToJSON,
75
+ } from '../models/CreateEmployeeInvoiceInputDTO';
76
+ import {
77
+ type CreateGithubUserRequestDTO,
78
+ CreateGithubUserRequestDTOFromJSON,
79
+ CreateGithubUserRequestDTOToJSON,
80
+ } from '../models/CreateGithubUserRequestDTO';
81
+ import {
82
+ type CreateJiraAccountDTO,
83
+ CreateJiraAccountDTOFromJSON,
84
+ CreateJiraAccountDTOToJSON,
85
+ } from '../models/CreateJiraAccountDTO';
86
+ import {
87
+ type CreateJiraUserRequestDTO,
88
+ CreateJiraUserRequestDTOFromJSON,
89
+ CreateJiraUserRequestDTOToJSON,
90
+ } from '../models/CreateJiraUserRequestDTO';
91
+ import {
92
+ type EmployeeDTO,
93
+ EmployeeDTOFromJSON,
94
+ EmployeeDTOToJSON,
95
+ } from '../models/EmployeeDTO';
96
+ import {
97
+ type EmployeeInvoiceDTO,
98
+ EmployeeInvoiceDTOFromJSON,
99
+ EmployeeInvoiceDTOToJSON,
100
+ } from '../models/EmployeeInvoiceDTO';
101
+ import {
102
+ type EmployeeUpdateDTO,
103
+ EmployeeUpdateDTOFromJSON,
104
+ EmployeeUpdateDTOToJSON,
105
+ } from '../models/EmployeeUpdateDTO';
106
+ import {
107
+ type ErrorDTO,
108
+ ErrorDTOFromJSON,
109
+ ErrorDTOToJSON,
110
+ } from '../models/ErrorDTO';
111
+ import {
112
+ type GlobalTimesheetDTO,
113
+ GlobalTimesheetDTOFromJSON,
114
+ GlobalTimesheetDTOToJSON,
115
+ } from '../models/GlobalTimesheetDTO';
116
+ import {
117
+ type GlobalTimesheetEntryDTO,
118
+ GlobalTimesheetEntryDTOFromJSON,
119
+ GlobalTimesheetEntryDTOToJSON,
120
+ } from '../models/GlobalTimesheetEntryDTO';
121
+ import {
122
+ type GlobalTimesheetEntryUpdateDTO,
123
+ GlobalTimesheetEntryUpdateDTOFromJSON,
124
+ GlobalTimesheetEntryUpdateDTOToJSON,
125
+ } from '../models/GlobalTimesheetEntryUpdateDTO';
126
+ import {
127
+ type HolidayCreateDTO,
128
+ HolidayCreateDTOFromJSON,
129
+ HolidayCreateDTOToJSON,
130
+ } from '../models/HolidayCreateDTO';
131
+ import {
132
+ type HolidayDTO,
133
+ HolidayDTOFromJSON,
134
+ HolidayDTOToJSON,
135
+ } from '../models/HolidayDTO';
136
+ import {
137
+ type MarkEmployeeInvoicePaidDTO,
138
+ MarkEmployeeInvoicePaidDTOFromJSON,
139
+ MarkEmployeeInvoicePaidDTOToJSON,
140
+ } from '../models/MarkEmployeeInvoicePaidDTO';
141
+ import {
142
+ type MarkInvoicePaidDTO,
143
+ MarkInvoicePaidDTOFromJSON,
144
+ MarkInvoicePaidDTOToJSON,
145
+ } from '../models/MarkInvoicePaidDTO';
146
+ import {
147
+ type PaginatedAdjustedTimesheets,
148
+ PaginatedAdjustedTimesheetsFromJSON,
149
+ PaginatedAdjustedTimesheetsToJSON,
150
+ } from '../models/PaginatedAdjustedTimesheets';
151
+ import {
152
+ type PaginatedClientInvoices,
153
+ PaginatedClientInvoicesFromJSON,
154
+ PaginatedClientInvoicesToJSON,
155
+ } from '../models/PaginatedClientInvoices';
156
+ import {
157
+ type PaginatedClients,
158
+ PaginatedClientsFromJSON,
159
+ PaginatedClientsToJSON,
160
+ } from '../models/PaginatedClients';
161
+ import {
162
+ type PaginatedEmployeeInvoices,
163
+ PaginatedEmployeeInvoicesFromJSON,
164
+ PaginatedEmployeeInvoicesToJSON,
165
+ } from '../models/PaginatedEmployeeInvoices';
166
+ import {
167
+ type PaginatedEmployeeProjects,
168
+ PaginatedEmployeeProjectsFromJSON,
169
+ PaginatedEmployeeProjectsToJSON,
170
+ } from '../models/PaginatedEmployeeProjects';
171
+ import {
172
+ type PaginatedEmployees,
173
+ PaginatedEmployeesFromJSON,
174
+ PaginatedEmployeesToJSON,
175
+ } from '../models/PaginatedEmployees';
176
+ import {
177
+ type PaginatedGlobalTimesheets,
178
+ PaginatedGlobalTimesheetsFromJSON,
179
+ PaginatedGlobalTimesheetsToJSON,
180
+ } from '../models/PaginatedGlobalTimesheets';
181
+ import {
182
+ type PaginatedHolidaysDTO,
183
+ PaginatedHolidaysDTOFromJSON,
184
+ PaginatedHolidaysDTOToJSON,
185
+ } from '../models/PaginatedHolidaysDTO';
186
+ import {
187
+ type PaginatedProjects,
188
+ PaginatedProjectsFromJSON,
189
+ PaginatedProjectsToJSON,
190
+ } from '../models/PaginatedProjects';
191
+ import {
192
+ type PaginatedTimesheets,
193
+ PaginatedTimesheetsFromJSON,
194
+ PaginatedTimesheetsToJSON,
195
+ } from '../models/PaginatedTimesheets';
196
+ import {
197
+ type PaginatedUsers,
198
+ PaginatedUsersFromJSON,
199
+ PaginatedUsersToJSON,
200
+ } from '../models/PaginatedUsers';
201
+ import {
202
+ type ProjectDTO,
203
+ ProjectDTOFromJSON,
204
+ ProjectDTOToJSON,
205
+ } from '../models/ProjectDTO';
206
+ import {
207
+ type ProjectInputDTO,
208
+ ProjectInputDTOFromJSON,
209
+ ProjectInputDTOToJSON,
210
+ } from '../models/ProjectInputDTO';
211
+ import {
212
+ type ProjectUpdateDTO,
213
+ ProjectUpdateDTOFromJSON,
214
+ ProjectUpdateDTOToJSON,
215
+ } from '../models/ProjectUpdateDTO';
216
+ import {
217
+ type TeamUpdateDTO,
218
+ TeamUpdateDTOFromJSON,
219
+ TeamUpdateDTOToJSON,
220
+ } from '../models/TeamUpdateDTO';
221
+ import {
222
+ type TimesheetDTO,
223
+ TimesheetDTOFromJSON,
224
+ TimesheetDTOToJSON,
225
+ } from '../models/TimesheetDTO';
226
+ import {
227
+ type TimesheetEntryUpdateDTO,
228
+ TimesheetEntryUpdateDTOFromJSON,
229
+ TimesheetEntryUpdateDTOToJSON,
230
+ } from '../models/TimesheetEntryUpdateDTO';
231
+ import {
232
+ type UserProjectReport,
233
+ UserProjectReportFromJSON,
234
+ UserProjectReportToJSON,
235
+ } from '../models/UserProjectReport';
236
+
237
+ export interface AddJiraAccountRequest {
238
+ createJiraAccountDTO: CreateJiraAccountDTO;
239
+ }
240
+
241
+ export interface ApproveAdjustedTimesheetRequest {
242
+ projectId: string;
243
+ timesheetId: string;
244
+ }
245
+
246
+ export interface ApproveGlobalTimesheetRequest {
247
+ projectId: string;
248
+ timesheetId: string;
249
+ }
250
+
251
+ export interface ApproveTimesheetRequest {
252
+ projectId: string;
253
+ timesheetId: string;
254
+ }
255
+
256
+ export interface CreateClientRequest {
257
+ clientDTO: ClientDTO;
258
+ }
259
+
260
+ export interface CreateCompanyRequest {
261
+ companyDTO: CompanyDTO;
262
+ }
263
+
264
+ export interface CreateEmployeeInvoiceRequest {
265
+ userId: string;
266
+ createEmployeeInvoiceInputDTO: CreateEmployeeInvoiceInputDTO;
267
+ }
268
+
269
+ export interface CreateGithubUserRequest {
270
+ createGithubUserRequestDTO: CreateGithubUserRequestDTO;
271
+ }
272
+
273
+ export interface CreateHolidayRequest {
274
+ holidayCreateDTO: HolidayCreateDTO;
275
+ }
276
+
277
+ export interface CreateJiraUserRequest {
278
+ createJiraUserRequestDTO: CreateJiraUserRequestDTO;
279
+ }
280
+
281
+ export interface CreateProjectRequest {
282
+ projectInputDTO: ProjectInputDTO;
283
+ }
284
+
285
+ export interface DeleteClientRequest {
286
+ clientId: string;
287
+ }
288
+
289
+ export interface DeleteCompanyRequest {
290
+ companyId: string;
291
+ }
292
+
293
+ export interface DeleteEmployeeRequest {
294
+ userId: string;
295
+ }
296
+
297
+ export interface DeleteEmployeeInvoiceRequest {
298
+ userId: string;
299
+ employeeInvoiceId: string;
300
+ }
301
+
302
+ export interface DeleteHolidayRequest {
303
+ holidayId: string;
304
+ }
305
+
306
+ export interface DeleteProjectRequest {
307
+ projectId: string;
308
+ }
309
+
310
+ export interface DownloadAdjustedTimesheetPdfRequest {
311
+ projectId: string;
312
+ timesheetId: string;
313
+ }
314
+
315
+ export interface DownloadClientInvoicePdfRequest {
316
+ invoiceId: string;
317
+ clientId: string;
318
+ }
319
+
320
+ export interface DownloadEmployeeInvoicePdfRequest {
321
+ userId: string;
322
+ employeeInvoiceId: string;
323
+ }
324
+
325
+ export interface DownloadGlobalTimesheetPdfRequest {
326
+ projectId: string;
327
+ timesheetId: string;
328
+ }
329
+
330
+ export interface DownloadTimesheetPdfRequest {
331
+ projectId: string;
332
+ timesheetId: string;
333
+ }
334
+
335
+ export interface GetAdjustedTimesheetRequest {
336
+ projectId: string;
337
+ timesheetId: string;
338
+ }
339
+
340
+ export interface GetAdjustedTimesheetsRequest {
341
+ projectId: string;
342
+ page?: number;
343
+ pageSize?: number;
344
+ search?: string;
345
+ }
346
+
347
+ export interface GetClientByIdRequest {
348
+ clientId: string;
349
+ }
350
+
351
+ export interface GetClientInvoicesRequest {
352
+ clientId: string;
353
+ page?: number;
354
+ pageSize?: number;
355
+ search?: string;
356
+ }
357
+
358
+ export interface GetClientsRequest {
359
+ page?: number;
360
+ pageSize?: number;
361
+ search?: string;
362
+ }
363
+
364
+ export interface GetCommitsByUserIDRequest {
365
+ userId: string;
366
+ from: Date;
367
+ to: Date;
368
+ groupBy?: GetCommitsByUserIDGroupByEnum;
369
+ }
370
+
371
+ export interface GetCompaniesRequest {
372
+ search?: string;
373
+ }
374
+
375
+ export interface GetCompanyRequest {
376
+ companyId: string;
377
+ }
378
+
379
+ export interface GetEmployeeRequest {
380
+ userId: string;
381
+ }
382
+
383
+ export interface GetEmployeeInvoicesRequest {
384
+ userId: string;
385
+ page?: number;
386
+ pageSize?: number;
387
+ search?: string;
388
+ }
389
+
390
+ export interface GetEmployeeTimesheetsRequest {
391
+ projectId: string;
392
+ page?: number;
393
+ pageSize?: number;
394
+ search?: string;
395
+ }
396
+
397
+ export interface GetEmployeesRequest {
398
+ page?: number;
399
+ pageSize?: number;
400
+ activated?: boolean;
401
+ search?: string;
402
+ }
403
+
404
+ export interface GetGlobalTimesheetRequest {
405
+ projectId: string;
406
+ timesheetId: string;
407
+ }
408
+
409
+ export interface GetGlobalTimesheetsRequest {
410
+ projectId: string;
411
+ page?: number;
412
+ pageSize?: number;
413
+ search?: string;
414
+ }
415
+
416
+ export interface GetHolidaysRequest {
417
+ page?: number;
418
+ pageSize?: number;
419
+ search?: string;
420
+ }
421
+
422
+ export interface GetHolidaysByEmployeeRequest {
423
+ userId: string;
424
+ page?: number;
425
+ pageSize?: number;
426
+ search?: string;
427
+ }
428
+
429
+ export interface GetMyCommitsRequest {
430
+ from: Date;
431
+ to: Date;
432
+ groupBy?: GetMyCommitsGroupByEnum;
433
+ }
434
+
435
+ export interface GetProjectByIdRequest {
436
+ projectId: string;
437
+ }
438
+
439
+ export interface GetProjectReportByUserRequest {
440
+ userId: string;
441
+ startDate: Date;
442
+ endDate: Date;
443
+ }
444
+
445
+ export interface GetProjectsRequest {
446
+ page?: number;
447
+ pageSize?: number;
448
+ search?: string;
449
+ }
450
+
451
+ export interface GetProjectsAsEmployeeRequest {
452
+ page?: number;
453
+ pageSize?: number;
454
+ search?: string;
455
+ }
456
+
457
+ export interface GetTeamRequest {
458
+ projectId: string;
459
+ page?: number;
460
+ pageSize?: number;
461
+ search?: string;
462
+ }
463
+
464
+ export interface GetTimesheetRequest {
465
+ projectId: string;
466
+ timesheetId: string;
467
+ }
468
+
469
+ export interface GetTimesheetsRequest {
470
+ projectId: string;
471
+ page?: number;
472
+ pageSize?: number;
473
+ search?: string;
474
+ }
475
+
476
+ export interface InviteEmployeeRequest {
477
+ employeeDTO: EmployeeDTO;
478
+ }
479
+
480
+ export interface MarkEmployeeInvoiceAsPaidRequest {
481
+ userId: string;
482
+ employeeInvoiceId: string;
483
+ markEmployeeInvoicePaidDTO: MarkEmployeeInvoicePaidDTO;
484
+ }
485
+
486
+ export interface MarkInvoiceAsPaidRequest {
487
+ clientId: string;
488
+ invoiceId: string;
489
+ markInvoicePaidDTO: MarkInvoicePaidDTO;
490
+ }
491
+
492
+ export interface OpenSentTimesheetRequest {
493
+ projectId: string;
494
+ timesheetId: string;
495
+ }
496
+
497
+ export interface RemoveJiraAccountRequest {
498
+ jiraAccountId: string;
499
+ }
500
+
501
+ export interface SendTimesheetRequest {
502
+ projectId: string;
503
+ timesheetId: string;
504
+ }
505
+
506
+ export interface UpdateAdjustedEntryRequest {
507
+ projectId: string;
508
+ timesheetId: string;
509
+ entryId: string;
510
+ adjustedTimesheetUpdateEntryDTO: AdjustedTimesheetUpdateEntryDTO;
511
+ }
512
+
513
+ export interface UpdateClientRequest {
514
+ clientId: string;
515
+ clientDTO: ClientDTO;
516
+ }
517
+
518
+ export interface UpdateCompanyRequest {
519
+ companyId: string;
520
+ companyDTO: CompanyDTO;
521
+ }
522
+
523
+ export interface UpdateEmployeeDataRequest {
524
+ userId: string;
525
+ employeeUpdateDTO: EmployeeUpdateDTO;
526
+ }
527
+
528
+ export interface UpdateGlobalTimesheetEntryRequest {
529
+ projectId: string;
530
+ timesheetId: string;
531
+ entryId: string;
532
+ globalTimesheetEntryUpdateDTO: GlobalTimesheetEntryUpdateDTO;
533
+ }
534
+
535
+ export interface UpdateProjectRequest {
536
+ projectId: string;
537
+ projectUpdateDTO: ProjectUpdateDTO;
538
+ }
539
+
540
+ export interface UpdateTeamRequest {
541
+ projectId: string;
542
+ teamUpdateDTO: TeamUpdateDTO;
543
+ }
544
+
545
+ export interface UpdateTimesheetEntryRequest {
546
+ projectId: string;
547
+ timesheetId: string;
548
+ entryId: string;
549
+ timesheetEntryUpdateDTO: TimesheetEntryUpdateDTO;
550
+ }
551
+
552
+ /**
553
+ *
554
+ */
555
+ export class ClientApi extends runtime.BaseAPI {
556
+
557
+ /**
558
+ * Creates request options for addJiraAccount without sending the request
559
+ */
560
+ async addJiraAccountRequestOpts(requestParameters: AddJiraAccountRequest): Promise<runtime.RequestOpts> {
561
+ if (requestParameters['createJiraAccountDTO'] == null) {
562
+ throw new runtime.RequiredError(
563
+ 'createJiraAccountDTO',
564
+ 'Required parameter "createJiraAccountDTO" was null or undefined when calling addJiraAccount().'
565
+ );
566
+ }
567
+
568
+ const queryParameters: any = {};
569
+
570
+ const headerParameters: runtime.HTTPHeaders = {};
571
+
572
+ headerParameters['Content-Type'] = 'application/json';
573
+
574
+ if (this.configuration && this.configuration.apiKey) {
575
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
576
+ }
577
+
578
+
579
+ let urlPath = `/jira-users/jira-accounts`;
580
+
581
+ return {
582
+ path: urlPath,
583
+ method: 'POST',
584
+ headers: headerParameters,
585
+ query: queryParameters,
586
+ body: CreateJiraAccountDTOToJSON(requestParameters['createJiraAccountDTO']),
587
+ };
588
+ }
589
+
590
+ /**
591
+ * Add a new Jira account for the authenticated user
592
+ * Add Jira account
593
+ */
594
+ async addJiraAccountRaw(requestParameters: AddJiraAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
595
+ const requestOptions = await this.addJiraAccountRequestOpts(requestParameters);
596
+ const response = await this.request(requestOptions, initOverrides);
597
+
598
+ return new runtime.JSONApiResponse<any>(response);
599
+ }
600
+
601
+ /**
602
+ * Add a new Jira account for the authenticated user
603
+ * Add Jira account
604
+ */
605
+ async addJiraAccount(requestParameters: AddJiraAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
606
+ const response = await this.addJiraAccountRaw(requestParameters, initOverrides);
607
+ return await response.value();
608
+ }
609
+
610
+ /**
611
+ * Creates request options for approveAdjustedTimesheet without sending the request
612
+ */
613
+ async approveAdjustedTimesheetRequestOpts(requestParameters: ApproveAdjustedTimesheetRequest): Promise<runtime.RequestOpts> {
614
+ if (requestParameters['projectId'] == null) {
615
+ throw new runtime.RequiredError(
616
+ 'projectId',
617
+ 'Required parameter "projectId" was null or undefined when calling approveAdjustedTimesheet().'
618
+ );
619
+ }
620
+
621
+ if (requestParameters['timesheetId'] == null) {
622
+ throw new runtime.RequiredError(
623
+ 'timesheetId',
624
+ 'Required parameter "timesheetId" was null or undefined when calling approveAdjustedTimesheet().'
625
+ );
626
+ }
627
+
628
+ const queryParameters: any = {};
629
+
630
+ const headerParameters: runtime.HTTPHeaders = {};
631
+
632
+ if (this.configuration && this.configuration.apiKey) {
633
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
634
+ }
635
+
636
+
637
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/approve`;
638
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
639
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
640
+
641
+ return {
642
+ path: urlPath,
643
+ method: 'PATCH',
644
+ headers: headerParameters,
645
+ query: queryParameters,
646
+ };
647
+ }
648
+
649
+ /**
650
+ * Approve an adjustedTimesheet in a project
651
+ * Approve an adjustedTimesheet in a project
652
+ */
653
+ async approveAdjustedTimesheetRaw(requestParameters: ApproveAdjustedTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
654
+ const requestOptions = await this.approveAdjustedTimesheetRequestOpts(requestParameters);
655
+ const response = await this.request(requestOptions, initOverrides);
656
+
657
+ return new runtime.VoidApiResponse(response);
658
+ }
659
+
660
+ /**
661
+ * Approve an adjustedTimesheet in a project
662
+ * Approve an adjustedTimesheet in a project
663
+ */
664
+ async approveAdjustedTimesheet(requestParameters: ApproveAdjustedTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
665
+ await this.approveAdjustedTimesheetRaw(requestParameters, initOverrides);
666
+ }
667
+
668
+ /**
669
+ * Creates request options for approveGlobalTimesheet without sending the request
670
+ */
671
+ async approveGlobalTimesheetRequestOpts(requestParameters: ApproveGlobalTimesheetRequest): Promise<runtime.RequestOpts> {
672
+ if (requestParameters['projectId'] == null) {
673
+ throw new runtime.RequiredError(
674
+ 'projectId',
675
+ 'Required parameter "projectId" was null or undefined when calling approveGlobalTimesheet().'
676
+ );
677
+ }
678
+
679
+ if (requestParameters['timesheetId'] == null) {
680
+ throw new runtime.RequiredError(
681
+ 'timesheetId',
682
+ 'Required parameter "timesheetId" was null or undefined when calling approveGlobalTimesheet().'
683
+ );
684
+ }
685
+
686
+ const queryParameters: any = {};
687
+
688
+ const headerParameters: runtime.HTTPHeaders = {};
689
+
690
+ if (this.configuration && this.configuration.apiKey) {
691
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
692
+ }
693
+
694
+
695
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/approve`;
696
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
697
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
698
+
699
+ return {
700
+ path: urlPath,
701
+ method: 'PATCH',
702
+ headers: headerParameters,
703
+ query: queryParameters,
704
+ };
705
+ }
706
+
707
+ /**
708
+ * Approve a global timesheet
709
+ * Approve a global timesheet
710
+ */
711
+ async approveGlobalTimesheetRaw(requestParameters: ApproveGlobalTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
712
+ const requestOptions = await this.approveGlobalTimesheetRequestOpts(requestParameters);
713
+ const response = await this.request(requestOptions, initOverrides);
714
+
715
+ return new runtime.VoidApiResponse(response);
716
+ }
717
+
718
+ /**
719
+ * Approve a global timesheet
720
+ * Approve a global timesheet
721
+ */
722
+ async approveGlobalTimesheet(requestParameters: ApproveGlobalTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
723
+ await this.approveGlobalTimesheetRaw(requestParameters, initOverrides);
724
+ }
725
+
726
+ /**
727
+ * Creates request options for approveTimesheet without sending the request
728
+ */
729
+ async approveTimesheetRequestOpts(requestParameters: ApproveTimesheetRequest): Promise<runtime.RequestOpts> {
730
+ if (requestParameters['projectId'] == null) {
731
+ throw new runtime.RequiredError(
732
+ 'projectId',
733
+ 'Required parameter "projectId" was null or undefined when calling approveTimesheet().'
734
+ );
735
+ }
736
+
737
+ if (requestParameters['timesheetId'] == null) {
738
+ throw new runtime.RequiredError(
739
+ 'timesheetId',
740
+ 'Required parameter "timesheetId" was null or undefined when calling approveTimesheet().'
741
+ );
742
+ }
743
+
744
+ const queryParameters: any = {};
745
+
746
+ const headerParameters: runtime.HTTPHeaders = {};
747
+
748
+ if (this.configuration && this.configuration.apiKey) {
749
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
750
+ }
751
+
752
+
753
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/approve`;
754
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
755
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
756
+
757
+ return {
758
+ path: urlPath,
759
+ method: 'PATCH',
760
+ headers: headerParameters,
761
+ query: queryParameters,
762
+ };
763
+ }
764
+
765
+ /**
766
+ * Approve a timesheet
767
+ * Approve a timesheet
768
+ */
769
+ async approveTimesheetRaw(requestParameters: ApproveTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
770
+ const requestOptions = await this.approveTimesheetRequestOpts(requestParameters);
771
+ const response = await this.request(requestOptions, initOverrides);
772
+
773
+ return new runtime.VoidApiResponse(response);
774
+ }
775
+
776
+ /**
777
+ * Approve a timesheet
778
+ * Approve a timesheet
779
+ */
780
+ async approveTimesheet(requestParameters: ApproveTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
781
+ await this.approveTimesheetRaw(requestParameters, initOverrides);
782
+ }
783
+
784
+ /**
785
+ * Creates request options for createClient without sending the request
786
+ */
787
+ async createClientRequestOpts(requestParameters: CreateClientRequest): Promise<runtime.RequestOpts> {
788
+ if (requestParameters['clientDTO'] == null) {
789
+ throw new runtime.RequiredError(
790
+ 'clientDTO',
791
+ 'Required parameter "clientDTO" was null or undefined when calling createClient().'
792
+ );
793
+ }
794
+
795
+ const queryParameters: any = {};
796
+
797
+ const headerParameters: runtime.HTTPHeaders = {};
798
+
799
+ headerParameters['Content-Type'] = 'application/json';
800
+
801
+ if (this.configuration && this.configuration.apiKey) {
802
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
803
+ }
804
+
805
+
806
+ let urlPath = `/clients`;
807
+
808
+ return {
809
+ path: urlPath,
810
+ method: 'POST',
811
+ headers: headerParameters,
812
+ query: queryParameters,
813
+ body: ClientDTOToJSON(requestParameters['clientDTO']),
814
+ };
815
+ }
816
+
817
+ /**
818
+ * Create client
819
+ */
820
+ async createClientRaw(requestParameters: CreateClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientDTO>> {
821
+ const requestOptions = await this.createClientRequestOpts(requestParameters);
822
+ const response = await this.request(requestOptions, initOverrides);
823
+
824
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientDTOFromJSON(jsonValue));
825
+ }
826
+
827
+ /**
828
+ * Create client
829
+ */
830
+ async createClient(requestParameters: CreateClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientDTO> {
831
+ const response = await this.createClientRaw(requestParameters, initOverrides);
832
+ return await response.value();
833
+ }
834
+
835
+ /**
836
+ * Creates request options for createCompany without sending the request
837
+ */
838
+ async createCompanyRequestOpts(requestParameters: CreateCompanyRequest): Promise<runtime.RequestOpts> {
839
+ if (requestParameters['companyDTO'] == null) {
840
+ throw new runtime.RequiredError(
841
+ 'companyDTO',
842
+ 'Required parameter "companyDTO" was null or undefined when calling createCompany().'
843
+ );
844
+ }
845
+
846
+ const queryParameters: any = {};
847
+
848
+ const headerParameters: runtime.HTTPHeaders = {};
849
+
850
+ headerParameters['Content-Type'] = 'application/json';
851
+
852
+ if (this.configuration && this.configuration.apiKey) {
853
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
854
+ }
855
+
856
+
857
+ let urlPath = `/companies`;
858
+
859
+ return {
860
+ path: urlPath,
861
+ method: 'POST',
862
+ headers: headerParameters,
863
+ query: queryParameters,
864
+ body: CompanyDTOToJSON(requestParameters['companyDTO']),
865
+ };
866
+ }
867
+
868
+ /**
869
+ * Create a company
870
+ * Creates a new company
871
+ */
872
+ async createCompanyRaw(requestParameters: CreateCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompanyDTO>> {
873
+ const requestOptions = await this.createCompanyRequestOpts(requestParameters);
874
+ const response = await this.request(requestOptions, initOverrides);
875
+
876
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompanyDTOFromJSON(jsonValue));
877
+ }
878
+
879
+ /**
880
+ * Create a company
881
+ * Creates a new company
882
+ */
883
+ async createCompany(requestParameters: CreateCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompanyDTO> {
884
+ const response = await this.createCompanyRaw(requestParameters, initOverrides);
885
+ return await response.value();
886
+ }
887
+
888
+ /**
889
+ * Creates request options for createEmployeeInvoice without sending the request
890
+ */
891
+ async createEmployeeInvoiceRequestOpts(requestParameters: CreateEmployeeInvoiceRequest): Promise<runtime.RequestOpts> {
892
+ if (requestParameters['userId'] == null) {
893
+ throw new runtime.RequiredError(
894
+ 'userId',
895
+ 'Required parameter "userId" was null or undefined when calling createEmployeeInvoice().'
896
+ );
897
+ }
898
+
899
+ if (requestParameters['createEmployeeInvoiceInputDTO'] == null) {
900
+ throw new runtime.RequiredError(
901
+ 'createEmployeeInvoiceInputDTO',
902
+ 'Required parameter "createEmployeeInvoiceInputDTO" was null or undefined when calling createEmployeeInvoice().'
903
+ );
904
+ }
905
+
906
+ const queryParameters: any = {};
907
+
908
+ const headerParameters: runtime.HTTPHeaders = {};
909
+
910
+ headerParameters['Content-Type'] = 'application/json';
911
+
912
+ if (this.configuration && this.configuration.apiKey) {
913
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
914
+ }
915
+
916
+
917
+ let urlPath = `/employees/{userId}/invoices`;
918
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
919
+
920
+ return {
921
+ path: urlPath,
922
+ method: 'POST',
923
+ headers: headerParameters,
924
+ query: queryParameters,
925
+ body: CreateEmployeeInvoiceInputDTOToJSON(requestParameters['createEmployeeInvoiceInputDTO']),
926
+ };
927
+ }
928
+
929
+ /**
930
+ * Create an employee invoice
931
+ * Create an employee invoice
932
+ */
933
+ async createEmployeeInvoiceRaw(requestParameters: CreateEmployeeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmployeeInvoiceDTO>> {
934
+ const requestOptions = await this.createEmployeeInvoiceRequestOpts(requestParameters);
935
+ const response = await this.request(requestOptions, initOverrides);
936
+
937
+ return new runtime.JSONApiResponse(response, (jsonValue) => EmployeeInvoiceDTOFromJSON(jsonValue));
938
+ }
939
+
940
+ /**
941
+ * Create an employee invoice
942
+ * Create an employee invoice
943
+ */
944
+ async createEmployeeInvoice(requestParameters: CreateEmployeeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmployeeInvoiceDTO> {
945
+ const response = await this.createEmployeeInvoiceRaw(requestParameters, initOverrides);
946
+ return await response.value();
947
+ }
948
+
949
+ /**
950
+ * Creates request options for createGithubUser without sending the request
951
+ */
952
+ async createGithubUserRequestOpts(requestParameters: CreateGithubUserRequest): Promise<runtime.RequestOpts> {
953
+ if (requestParameters['createGithubUserRequestDTO'] == null) {
954
+ throw new runtime.RequiredError(
955
+ 'createGithubUserRequestDTO',
956
+ 'Required parameter "createGithubUserRequestDTO" was null or undefined when calling createGithubUser().'
957
+ );
958
+ }
959
+
960
+ const queryParameters: any = {};
961
+
962
+ const headerParameters: runtime.HTTPHeaders = {};
963
+
964
+ headerParameters['Content-Type'] = 'application/json';
965
+
966
+ if (this.configuration && this.configuration.apiKey) {
967
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
968
+ }
969
+
970
+
971
+ let urlPath = `/github-users`;
972
+
973
+ return {
974
+ path: urlPath,
975
+ method: 'POST',
976
+ headers: headerParameters,
977
+ query: queryParameters,
978
+ body: CreateGithubUserRequestDTOToJSON(requestParameters['createGithubUserRequestDTO']),
979
+ };
980
+ }
981
+
982
+ /**
983
+ * Create a new GitHub user account
984
+ * Create GitHub user
985
+ */
986
+ async createGithubUserRaw(requestParameters: CreateGithubUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientGithubUserDTO>> {
987
+ const requestOptions = await this.createGithubUserRequestOpts(requestParameters);
988
+ const response = await this.request(requestOptions, initOverrides);
989
+
990
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientGithubUserDTOFromJSON(jsonValue));
991
+ }
992
+
993
+ /**
994
+ * Create a new GitHub user account
995
+ * Create GitHub user
996
+ */
997
+ async createGithubUser(requestParameters: CreateGithubUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientGithubUserDTO> {
998
+ const response = await this.createGithubUserRaw(requestParameters, initOverrides);
999
+ return await response.value();
1000
+ }
1001
+
1002
+ /**
1003
+ * Creates request options for createHoliday without sending the request
1004
+ */
1005
+ async createHolidayRequestOpts(requestParameters: CreateHolidayRequest): Promise<runtime.RequestOpts> {
1006
+ if (requestParameters['holidayCreateDTO'] == null) {
1007
+ throw new runtime.RequiredError(
1008
+ 'holidayCreateDTO',
1009
+ 'Required parameter "holidayCreateDTO" was null or undefined when calling createHoliday().'
1010
+ );
1011
+ }
1012
+
1013
+ const queryParameters: any = {};
1014
+
1015
+ const headerParameters: runtime.HTTPHeaders = {};
1016
+
1017
+ headerParameters['Content-Type'] = 'application/json';
1018
+
1019
+ if (this.configuration && this.configuration.apiKey) {
1020
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1021
+ }
1022
+
1023
+
1024
+ let urlPath = `/holidays`;
1025
+
1026
+ return {
1027
+ path: urlPath,
1028
+ method: 'POST',
1029
+ headers: headerParameters,
1030
+ query: queryParameters,
1031
+ body: HolidayCreateDTOToJSON(requestParameters['holidayCreateDTO']),
1032
+ };
1033
+ }
1034
+
1035
+ /**
1036
+ * Allows a user to add a holiday
1037
+ */
1038
+ async createHolidayRaw(requestParameters: CreateHolidayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HolidayDTO>> {
1039
+ const requestOptions = await this.createHolidayRequestOpts(requestParameters);
1040
+ const response = await this.request(requestOptions, initOverrides);
1041
+
1042
+ return new runtime.JSONApiResponse(response, (jsonValue) => HolidayDTOFromJSON(jsonValue));
1043
+ }
1044
+
1045
+ /**
1046
+ * Allows a user to add a holiday
1047
+ */
1048
+ async createHoliday(requestParameters: CreateHolidayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HolidayDTO> {
1049
+ const response = await this.createHolidayRaw(requestParameters, initOverrides);
1050
+ return await response.value();
1051
+ }
1052
+
1053
+ /**
1054
+ * Creates request options for createJiraUser without sending the request
1055
+ */
1056
+ async createJiraUserRequestOpts(requestParameters: CreateJiraUserRequest): Promise<runtime.RequestOpts> {
1057
+ if (requestParameters['createJiraUserRequestDTO'] == null) {
1058
+ throw new runtime.RequiredError(
1059
+ 'createJiraUserRequestDTO',
1060
+ 'Required parameter "createJiraUserRequestDTO" was null or undefined when calling createJiraUser().'
1061
+ );
1062
+ }
1063
+
1064
+ const queryParameters: any = {};
1065
+
1066
+ const headerParameters: runtime.HTTPHeaders = {};
1067
+
1068
+ headerParameters['Content-Type'] = 'application/json';
1069
+
1070
+ if (this.configuration && this.configuration.apiKey) {
1071
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1072
+ }
1073
+
1074
+
1075
+ let urlPath = `/jira-users`;
1076
+
1077
+ return {
1078
+ path: urlPath,
1079
+ method: 'POST',
1080
+ headers: headerParameters,
1081
+ query: queryParameters,
1082
+ body: CreateJiraUserRequestDTOToJSON(requestParameters['createJiraUserRequestDTO']),
1083
+ };
1084
+ }
1085
+
1086
+ /**
1087
+ * Create a new Jira user
1088
+ * Create Jira user
1089
+ */
1090
+ async createJiraUserRaw(requestParameters: CreateJiraUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientJiraUserDTO>> {
1091
+ const requestOptions = await this.createJiraUserRequestOpts(requestParameters);
1092
+ const response = await this.request(requestOptions, initOverrides);
1093
+
1094
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientJiraUserDTOFromJSON(jsonValue));
1095
+ }
1096
+
1097
+ /**
1098
+ * Create a new Jira user
1099
+ * Create Jira user
1100
+ */
1101
+ async createJiraUser(requestParameters: CreateJiraUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientJiraUserDTO> {
1102
+ const response = await this.createJiraUserRaw(requestParameters, initOverrides);
1103
+ return await response.value();
1104
+ }
1105
+
1106
+ /**
1107
+ * Creates request options for createProject without sending the request
1108
+ */
1109
+ async createProjectRequestOpts(requestParameters: CreateProjectRequest): Promise<runtime.RequestOpts> {
1110
+ if (requestParameters['projectInputDTO'] == null) {
1111
+ throw new runtime.RequiredError(
1112
+ 'projectInputDTO',
1113
+ 'Required parameter "projectInputDTO" was null or undefined when calling createProject().'
1114
+ );
1115
+ }
1116
+
1117
+ const queryParameters: any = {};
1118
+
1119
+ const headerParameters: runtime.HTTPHeaders = {};
1120
+
1121
+ headerParameters['Content-Type'] = 'application/json';
1122
+
1123
+ if (this.configuration && this.configuration.apiKey) {
1124
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1125
+ }
1126
+
1127
+
1128
+ let urlPath = `/projects`;
1129
+
1130
+ return {
1131
+ path: urlPath,
1132
+ method: 'POST',
1133
+ headers: headerParameters,
1134
+ query: queryParameters,
1135
+ body: ProjectInputDTOToJSON(requestParameters['projectInputDTO']),
1136
+ };
1137
+ }
1138
+
1139
+ /**
1140
+ * Create a project
1141
+ * Creates a new project
1142
+ */
1143
+ async createProjectRaw(requestParameters: CreateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectDTO>> {
1144
+ const requestOptions = await this.createProjectRequestOpts(requestParameters);
1145
+ const response = await this.request(requestOptions, initOverrides);
1146
+
1147
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProjectDTOFromJSON(jsonValue));
1148
+ }
1149
+
1150
+ /**
1151
+ * Create a project
1152
+ * Creates a new project
1153
+ */
1154
+ async createProject(requestParameters: CreateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectDTO> {
1155
+ const response = await this.createProjectRaw(requestParameters, initOverrides);
1156
+ return await response.value();
1157
+ }
1158
+
1159
+ /**
1160
+ * Creates request options for deleteClient without sending the request
1161
+ */
1162
+ async deleteClientRequestOpts(requestParameters: DeleteClientRequest): Promise<runtime.RequestOpts> {
1163
+ if (requestParameters['clientId'] == null) {
1164
+ throw new runtime.RequiredError(
1165
+ 'clientId',
1166
+ 'Required parameter "clientId" was null or undefined when calling deleteClient().'
1167
+ );
1168
+ }
1169
+
1170
+ const queryParameters: any = {};
1171
+
1172
+ const headerParameters: runtime.HTTPHeaders = {};
1173
+
1174
+ if (this.configuration && this.configuration.apiKey) {
1175
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1176
+ }
1177
+
1178
+
1179
+ let urlPath = `/clients/{clientId}`;
1180
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
1181
+
1182
+ return {
1183
+ path: urlPath,
1184
+ method: 'DELETE',
1185
+ headers: headerParameters,
1186
+ query: queryParameters,
1187
+ };
1188
+ }
1189
+
1190
+ /**
1191
+ * Delete client
1192
+ * Delete client
1193
+ */
1194
+ async deleteClientRaw(requestParameters: DeleteClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1195
+ const requestOptions = await this.deleteClientRequestOpts(requestParameters);
1196
+ const response = await this.request(requestOptions, initOverrides);
1197
+
1198
+ return new runtime.VoidApiResponse(response);
1199
+ }
1200
+
1201
+ /**
1202
+ * Delete client
1203
+ * Delete client
1204
+ */
1205
+ async deleteClient(requestParameters: DeleteClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1206
+ await this.deleteClientRaw(requestParameters, initOverrides);
1207
+ }
1208
+
1209
+ /**
1210
+ * Creates request options for deleteCompany without sending the request
1211
+ */
1212
+ async deleteCompanyRequestOpts(requestParameters: DeleteCompanyRequest): Promise<runtime.RequestOpts> {
1213
+ if (requestParameters['companyId'] == null) {
1214
+ throw new runtime.RequiredError(
1215
+ 'companyId',
1216
+ 'Required parameter "companyId" was null or undefined when calling deleteCompany().'
1217
+ );
1218
+ }
1219
+
1220
+ const queryParameters: any = {};
1221
+
1222
+ const headerParameters: runtime.HTTPHeaders = {};
1223
+
1224
+ if (this.configuration && this.configuration.apiKey) {
1225
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1226
+ }
1227
+
1228
+
1229
+ let urlPath = `/companies/{companyId}`;
1230
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
1231
+
1232
+ return {
1233
+ path: urlPath,
1234
+ method: 'DELETE',
1235
+ headers: headerParameters,
1236
+ query: queryParameters,
1237
+ };
1238
+ }
1239
+
1240
+ /**
1241
+ * Delete a company
1242
+ * Delete a company
1243
+ */
1244
+ async deleteCompanyRaw(requestParameters: DeleteCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1245
+ const requestOptions = await this.deleteCompanyRequestOpts(requestParameters);
1246
+ const response = await this.request(requestOptions, initOverrides);
1247
+
1248
+ return new runtime.VoidApiResponse(response);
1249
+ }
1250
+
1251
+ /**
1252
+ * Delete a company
1253
+ * Delete a company
1254
+ */
1255
+ async deleteCompany(requestParameters: DeleteCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1256
+ await this.deleteCompanyRaw(requestParameters, initOverrides);
1257
+ }
1258
+
1259
+ /**
1260
+ * Creates request options for deleteEmployee without sending the request
1261
+ */
1262
+ async deleteEmployeeRequestOpts(requestParameters: DeleteEmployeeRequest): Promise<runtime.RequestOpts> {
1263
+ if (requestParameters['userId'] == null) {
1264
+ throw new runtime.RequiredError(
1265
+ 'userId',
1266
+ 'Required parameter "userId" was null or undefined when calling deleteEmployee().'
1267
+ );
1268
+ }
1269
+
1270
+ const queryParameters: any = {};
1271
+
1272
+ const headerParameters: runtime.HTTPHeaders = {};
1273
+
1274
+ if (this.configuration && this.configuration.apiKey) {
1275
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1276
+ }
1277
+
1278
+
1279
+ let urlPath = `/employees/{userId}`;
1280
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1281
+
1282
+ return {
1283
+ path: urlPath,
1284
+ method: 'DELETE',
1285
+ headers: headerParameters,
1286
+ query: queryParameters,
1287
+ };
1288
+ }
1289
+
1290
+ /**
1291
+ * Delete an employee
1292
+ * Delete an employee
1293
+ */
1294
+ async deleteEmployeeRaw(requestParameters: DeleteEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1295
+ const requestOptions = await this.deleteEmployeeRequestOpts(requestParameters);
1296
+ const response = await this.request(requestOptions, initOverrides);
1297
+
1298
+ return new runtime.VoidApiResponse(response);
1299
+ }
1300
+
1301
+ /**
1302
+ * Delete an employee
1303
+ * Delete an employee
1304
+ */
1305
+ async deleteEmployee(requestParameters: DeleteEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1306
+ await this.deleteEmployeeRaw(requestParameters, initOverrides);
1307
+ }
1308
+
1309
+ /**
1310
+ * Creates request options for deleteEmployeeInvoice without sending the request
1311
+ */
1312
+ async deleteEmployeeInvoiceRequestOpts(requestParameters: DeleteEmployeeInvoiceRequest): Promise<runtime.RequestOpts> {
1313
+ if (requestParameters['userId'] == null) {
1314
+ throw new runtime.RequiredError(
1315
+ 'userId',
1316
+ 'Required parameter "userId" was null or undefined when calling deleteEmployeeInvoice().'
1317
+ );
1318
+ }
1319
+
1320
+ if (requestParameters['employeeInvoiceId'] == null) {
1321
+ throw new runtime.RequiredError(
1322
+ 'employeeInvoiceId',
1323
+ 'Required parameter "employeeInvoiceId" was null or undefined when calling deleteEmployeeInvoice().'
1324
+ );
1325
+ }
1326
+
1327
+ const queryParameters: any = {};
1328
+
1329
+ const headerParameters: runtime.HTTPHeaders = {};
1330
+
1331
+ if (this.configuration && this.configuration.apiKey) {
1332
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1333
+ }
1334
+
1335
+
1336
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}`;
1337
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1338
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
1339
+
1340
+ return {
1341
+ path: urlPath,
1342
+ method: 'DELETE',
1343
+ headers: headerParameters,
1344
+ query: queryParameters,
1345
+ };
1346
+ }
1347
+
1348
+ /**
1349
+ * Delete an employee invoice
1350
+ * Delete an employee invoice
1351
+ */
1352
+ async deleteEmployeeInvoiceRaw(requestParameters: DeleteEmployeeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1353
+ const requestOptions = await this.deleteEmployeeInvoiceRequestOpts(requestParameters);
1354
+ const response = await this.request(requestOptions, initOverrides);
1355
+
1356
+ return new runtime.VoidApiResponse(response);
1357
+ }
1358
+
1359
+ /**
1360
+ * Delete an employee invoice
1361
+ * Delete an employee invoice
1362
+ */
1363
+ async deleteEmployeeInvoice(requestParameters: DeleteEmployeeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1364
+ await this.deleteEmployeeInvoiceRaw(requestParameters, initOverrides);
1365
+ }
1366
+
1367
+ /**
1368
+ * Creates request options for deleteGithubUser without sending the request
1369
+ */
1370
+ async deleteGithubUserRequestOpts(): Promise<runtime.RequestOpts> {
1371
+ const queryParameters: any = {};
1372
+
1373
+ const headerParameters: runtime.HTTPHeaders = {};
1374
+
1375
+ if (this.configuration && this.configuration.apiKey) {
1376
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1377
+ }
1378
+
1379
+
1380
+ let urlPath = `/github-users`;
1381
+
1382
+ return {
1383
+ path: urlPath,
1384
+ method: 'DELETE',
1385
+ headers: headerParameters,
1386
+ query: queryParameters,
1387
+ };
1388
+ }
1389
+
1390
+ /**
1391
+ * Delete the authenticated user\'s GitHub account
1392
+ * Delete GitHub user
1393
+ */
1394
+ async deleteGithubUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1395
+ const requestOptions = await this.deleteGithubUserRequestOpts();
1396
+ const response = await this.request(requestOptions, initOverrides);
1397
+
1398
+ return new runtime.VoidApiResponse(response);
1399
+ }
1400
+
1401
+ /**
1402
+ * Delete the authenticated user\'s GitHub account
1403
+ * Delete GitHub user
1404
+ */
1405
+ async deleteGithubUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1406
+ await this.deleteGithubUserRaw(initOverrides);
1407
+ }
1408
+
1409
+ /**
1410
+ * Creates request options for deleteHoliday without sending the request
1411
+ */
1412
+ async deleteHolidayRequestOpts(requestParameters: DeleteHolidayRequest): Promise<runtime.RequestOpts> {
1413
+ if (requestParameters['holidayId'] == null) {
1414
+ throw new runtime.RequiredError(
1415
+ 'holidayId',
1416
+ 'Required parameter "holidayId" was null or undefined when calling deleteHoliday().'
1417
+ );
1418
+ }
1419
+
1420
+ const queryParameters: any = {};
1421
+
1422
+ const headerParameters: runtime.HTTPHeaders = {};
1423
+
1424
+ if (this.configuration && this.configuration.apiKey) {
1425
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1426
+ }
1427
+
1428
+
1429
+ let urlPath = `/holidays/{holidayId}`;
1430
+ urlPath = urlPath.replace('{holidayId}', encodeURIComponent(String(requestParameters['holidayId'])));
1431
+
1432
+ return {
1433
+ path: urlPath,
1434
+ method: 'DELETE',
1435
+ headers: headerParameters,
1436
+ query: queryParameters,
1437
+ };
1438
+ }
1439
+
1440
+ /**
1441
+ * Delete a holiday
1442
+ * Delete a holiday
1443
+ */
1444
+ async deleteHolidayRaw(requestParameters: DeleteHolidayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1445
+ const requestOptions = await this.deleteHolidayRequestOpts(requestParameters);
1446
+ const response = await this.request(requestOptions, initOverrides);
1447
+
1448
+ return new runtime.VoidApiResponse(response);
1449
+ }
1450
+
1451
+ /**
1452
+ * Delete a holiday
1453
+ * Delete a holiday
1454
+ */
1455
+ async deleteHoliday(requestParameters: DeleteHolidayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1456
+ await this.deleteHolidayRaw(requestParameters, initOverrides);
1457
+ }
1458
+
1459
+ /**
1460
+ * Creates request options for deleteProject without sending the request
1461
+ */
1462
+ async deleteProjectRequestOpts(requestParameters: DeleteProjectRequest): Promise<runtime.RequestOpts> {
1463
+ if (requestParameters['projectId'] == null) {
1464
+ throw new runtime.RequiredError(
1465
+ 'projectId',
1466
+ 'Required parameter "projectId" was null or undefined when calling deleteProject().'
1467
+ );
1468
+ }
1469
+
1470
+ const queryParameters: any = {};
1471
+
1472
+ const headerParameters: runtime.HTTPHeaders = {};
1473
+
1474
+ if (this.configuration && this.configuration.apiKey) {
1475
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1476
+ }
1477
+
1478
+
1479
+ let urlPath = `/projects/{projectId}`;
1480
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1481
+
1482
+ return {
1483
+ path: urlPath,
1484
+ method: 'DELETE',
1485
+ headers: headerParameters,
1486
+ query: queryParameters,
1487
+ };
1488
+ }
1489
+
1490
+ /**
1491
+ * Delete a project
1492
+ * Delete a project
1493
+ */
1494
+ async deleteProjectRaw(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1495
+ const requestOptions = await this.deleteProjectRequestOpts(requestParameters);
1496
+ const response = await this.request(requestOptions, initOverrides);
1497
+
1498
+ return new runtime.VoidApiResponse(response);
1499
+ }
1500
+
1501
+ /**
1502
+ * Delete a project
1503
+ * Delete a project
1504
+ */
1505
+ async deleteProject(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1506
+ await this.deleteProjectRaw(requestParameters, initOverrides);
1507
+ }
1508
+
1509
+ /**
1510
+ * Creates request options for downloadAdjustedTimesheetPdf without sending the request
1511
+ */
1512
+ async downloadAdjustedTimesheetPdfRequestOpts(requestParameters: DownloadAdjustedTimesheetPdfRequest): Promise<runtime.RequestOpts> {
1513
+ if (requestParameters['projectId'] == null) {
1514
+ throw new runtime.RequiredError(
1515
+ 'projectId',
1516
+ 'Required parameter "projectId" was null or undefined when calling downloadAdjustedTimesheetPdf().'
1517
+ );
1518
+ }
1519
+
1520
+ if (requestParameters['timesheetId'] == null) {
1521
+ throw new runtime.RequiredError(
1522
+ 'timesheetId',
1523
+ 'Required parameter "timesheetId" was null or undefined when calling downloadAdjustedTimesheetPdf().'
1524
+ );
1525
+ }
1526
+
1527
+ const queryParameters: any = {};
1528
+
1529
+ const headerParameters: runtime.HTTPHeaders = {};
1530
+
1531
+ if (this.configuration && this.configuration.apiKey) {
1532
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1533
+ }
1534
+
1535
+
1536
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/download`;
1537
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1538
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1539
+
1540
+ return {
1541
+ path: urlPath,
1542
+ method: 'GET',
1543
+ headers: headerParameters,
1544
+ query: queryParameters,
1545
+ };
1546
+ }
1547
+
1548
+ /**
1549
+ * Download an AdjustedTimesheet report in PDF format
1550
+ * Download an AdjustedTimesheet report in PDF format
1551
+ */
1552
+ async downloadAdjustedTimesheetPdfRaw(requestParameters: DownloadAdjustedTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
1553
+ const requestOptions = await this.downloadAdjustedTimesheetPdfRequestOpts(requestParameters);
1554
+ const response = await this.request(requestOptions, initOverrides);
1555
+
1556
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1557
+ return new runtime.JSONApiResponse<string>(response);
1558
+ } else {
1559
+ return new runtime.TextApiResponse(response) as any;
1560
+ }
1561
+ }
1562
+
1563
+ /**
1564
+ * Download an AdjustedTimesheet report in PDF format
1565
+ * Download an AdjustedTimesheet report in PDF format
1566
+ */
1567
+ async downloadAdjustedTimesheetPdf(requestParameters: DownloadAdjustedTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
1568
+ const response = await this.downloadAdjustedTimesheetPdfRaw(requestParameters, initOverrides);
1569
+ return await response.value();
1570
+ }
1571
+
1572
+ /**
1573
+ * Creates request options for downloadClientInvoicePdf without sending the request
1574
+ */
1575
+ async downloadClientInvoicePdfRequestOpts(requestParameters: DownloadClientInvoicePdfRequest): Promise<runtime.RequestOpts> {
1576
+ if (requestParameters['invoiceId'] == null) {
1577
+ throw new runtime.RequiredError(
1578
+ 'invoiceId',
1579
+ 'Required parameter "invoiceId" was null or undefined when calling downloadClientInvoicePdf().'
1580
+ );
1581
+ }
1582
+
1583
+ if (requestParameters['clientId'] == null) {
1584
+ throw new runtime.RequiredError(
1585
+ 'clientId',
1586
+ 'Required parameter "clientId" was null or undefined when calling downloadClientInvoicePdf().'
1587
+ );
1588
+ }
1589
+
1590
+ const queryParameters: any = {};
1591
+
1592
+ const headerParameters: runtime.HTTPHeaders = {};
1593
+
1594
+ if (this.configuration && this.configuration.apiKey) {
1595
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1596
+ }
1597
+
1598
+
1599
+ let urlPath = `/clients/{clientId}/invoices/{invoiceId}/download`;
1600
+ urlPath = urlPath.replace('{invoiceId}', encodeURIComponent(String(requestParameters['invoiceId'])));
1601
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
1602
+
1603
+ return {
1604
+ path: urlPath,
1605
+ method: 'GET',
1606
+ headers: headerParameters,
1607
+ query: queryParameters,
1608
+ };
1609
+ }
1610
+
1611
+ /**
1612
+ * Download client invoice pdf
1613
+ * Download client invoice pdf
1614
+ */
1615
+ async downloadClientInvoicePdfRaw(requestParameters: DownloadClientInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
1616
+ const requestOptions = await this.downloadClientInvoicePdfRequestOpts(requestParameters);
1617
+ const response = await this.request(requestOptions, initOverrides);
1618
+
1619
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1620
+ return new runtime.JSONApiResponse<string>(response);
1621
+ } else {
1622
+ return new runtime.TextApiResponse(response) as any;
1623
+ }
1624
+ }
1625
+
1626
+ /**
1627
+ * Download client invoice pdf
1628
+ * Download client invoice pdf
1629
+ */
1630
+ async downloadClientInvoicePdf(requestParameters: DownloadClientInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
1631
+ const response = await this.downloadClientInvoicePdfRaw(requestParameters, initOverrides);
1632
+ return await response.value();
1633
+ }
1634
+
1635
+ /**
1636
+ * Creates request options for downloadEmployeeInvoicePdf without sending the request
1637
+ */
1638
+ async downloadEmployeeInvoicePdfRequestOpts(requestParameters: DownloadEmployeeInvoicePdfRequest): Promise<runtime.RequestOpts> {
1639
+ if (requestParameters['userId'] == null) {
1640
+ throw new runtime.RequiredError(
1641
+ 'userId',
1642
+ 'Required parameter "userId" was null or undefined when calling downloadEmployeeInvoicePdf().'
1643
+ );
1644
+ }
1645
+
1646
+ if (requestParameters['employeeInvoiceId'] == null) {
1647
+ throw new runtime.RequiredError(
1648
+ 'employeeInvoiceId',
1649
+ 'Required parameter "employeeInvoiceId" was null or undefined when calling downloadEmployeeInvoicePdf().'
1650
+ );
1651
+ }
1652
+
1653
+ const queryParameters: any = {};
1654
+
1655
+ const headerParameters: runtime.HTTPHeaders = {};
1656
+
1657
+ if (this.configuration && this.configuration.apiKey) {
1658
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1659
+ }
1660
+
1661
+
1662
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}/download`;
1663
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1664
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
1665
+
1666
+ return {
1667
+ path: urlPath,
1668
+ method: 'GET',
1669
+ headers: headerParameters,
1670
+ query: queryParameters,
1671
+ };
1672
+ }
1673
+
1674
+ /**
1675
+ * Download the employee invoice report in PDF format
1676
+ * Download the employee invoice report in PDF format
1677
+ */
1678
+ async downloadEmployeeInvoicePdfRaw(requestParameters: DownloadEmployeeInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
1679
+ const requestOptions = await this.downloadEmployeeInvoicePdfRequestOpts(requestParameters);
1680
+ const response = await this.request(requestOptions, initOverrides);
1681
+
1682
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1683
+ return new runtime.JSONApiResponse<string>(response);
1684
+ } else {
1685
+ return new runtime.TextApiResponse(response) as any;
1686
+ }
1687
+ }
1688
+
1689
+ /**
1690
+ * Download the employee invoice report in PDF format
1691
+ * Download the employee invoice report in PDF format
1692
+ */
1693
+ async downloadEmployeeInvoicePdf(requestParameters: DownloadEmployeeInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
1694
+ const response = await this.downloadEmployeeInvoicePdfRaw(requestParameters, initOverrides);
1695
+ return await response.value();
1696
+ }
1697
+
1698
+ /**
1699
+ * Creates request options for downloadGlobalTimesheetPdf without sending the request
1700
+ */
1701
+ async downloadGlobalTimesheetPdfRequestOpts(requestParameters: DownloadGlobalTimesheetPdfRequest): Promise<runtime.RequestOpts> {
1702
+ if (requestParameters['projectId'] == null) {
1703
+ throw new runtime.RequiredError(
1704
+ 'projectId',
1705
+ 'Required parameter "projectId" was null or undefined when calling downloadGlobalTimesheetPdf().'
1706
+ );
1707
+ }
1708
+
1709
+ if (requestParameters['timesheetId'] == null) {
1710
+ throw new runtime.RequiredError(
1711
+ 'timesheetId',
1712
+ 'Required parameter "timesheetId" was null or undefined when calling downloadGlobalTimesheetPdf().'
1713
+ );
1714
+ }
1715
+
1716
+ const queryParameters: any = {};
1717
+
1718
+ const headerParameters: runtime.HTTPHeaders = {};
1719
+
1720
+ if (this.configuration && this.configuration.apiKey) {
1721
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1722
+ }
1723
+
1724
+
1725
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/download`;
1726
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1727
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1728
+
1729
+ return {
1730
+ path: urlPath,
1731
+ method: 'GET',
1732
+ headers: headerParameters,
1733
+ query: queryParameters,
1734
+ };
1735
+ }
1736
+
1737
+ /**
1738
+ * Download a global timesheet report in PDF format
1739
+ * Download a global timesheet report in PDF format
1740
+ */
1741
+ async downloadGlobalTimesheetPdfRaw(requestParameters: DownloadGlobalTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
1742
+ const requestOptions = await this.downloadGlobalTimesheetPdfRequestOpts(requestParameters);
1743
+ const response = await this.request(requestOptions, initOverrides);
1744
+
1745
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1746
+ return new runtime.JSONApiResponse<string>(response);
1747
+ } else {
1748
+ return new runtime.TextApiResponse(response) as any;
1749
+ }
1750
+ }
1751
+
1752
+ /**
1753
+ * Download a global timesheet report in PDF format
1754
+ * Download a global timesheet report in PDF format
1755
+ */
1756
+ async downloadGlobalTimesheetPdf(requestParameters: DownloadGlobalTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
1757
+ const response = await this.downloadGlobalTimesheetPdfRaw(requestParameters, initOverrides);
1758
+ return await response.value();
1759
+ }
1760
+
1761
+ /**
1762
+ * Creates request options for downloadTimesheetPdf without sending the request
1763
+ */
1764
+ async downloadTimesheetPdfRequestOpts(requestParameters: DownloadTimesheetPdfRequest): Promise<runtime.RequestOpts> {
1765
+ if (requestParameters['projectId'] == null) {
1766
+ throw new runtime.RequiredError(
1767
+ 'projectId',
1768
+ 'Required parameter "projectId" was null or undefined when calling downloadTimesheetPdf().'
1769
+ );
1770
+ }
1771
+
1772
+ if (requestParameters['timesheetId'] == null) {
1773
+ throw new runtime.RequiredError(
1774
+ 'timesheetId',
1775
+ 'Required parameter "timesheetId" was null or undefined when calling downloadTimesheetPdf().'
1776
+ );
1777
+ }
1778
+
1779
+ const queryParameters: any = {};
1780
+
1781
+ const headerParameters: runtime.HTTPHeaders = {};
1782
+
1783
+ if (this.configuration && this.configuration.apiKey) {
1784
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1785
+ }
1786
+
1787
+
1788
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/download`;
1789
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1790
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1791
+
1792
+ return {
1793
+ path: urlPath,
1794
+ method: 'GET',
1795
+ headers: headerParameters,
1796
+ query: queryParameters,
1797
+ };
1798
+ }
1799
+
1800
+ /**
1801
+ * Download a timesheet report in PDF format
1802
+ * Download a timesheet report in PDF format
1803
+ */
1804
+ async downloadTimesheetPdfRaw(requestParameters: DownloadTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
1805
+ const requestOptions = await this.downloadTimesheetPdfRequestOpts(requestParameters);
1806
+ const response = await this.request(requestOptions, initOverrides);
1807
+
1808
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1809
+ return new runtime.JSONApiResponse<string>(response);
1810
+ } else {
1811
+ return new runtime.TextApiResponse(response) as any;
1812
+ }
1813
+ }
1814
+
1815
+ /**
1816
+ * Download a timesheet report in PDF format
1817
+ * Download a timesheet report in PDF format
1818
+ */
1819
+ async downloadTimesheetPdf(requestParameters: DownloadTimesheetPdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
1820
+ const response = await this.downloadTimesheetPdfRaw(requestParameters, initOverrides);
1821
+ return await response.value();
1822
+ }
1823
+
1824
+ /**
1825
+ * Creates request options for getAdjustedTimesheet without sending the request
1826
+ */
1827
+ async getAdjustedTimesheetRequestOpts(requestParameters: GetAdjustedTimesheetRequest): Promise<runtime.RequestOpts> {
1828
+ if (requestParameters['projectId'] == null) {
1829
+ throw new runtime.RequiredError(
1830
+ 'projectId',
1831
+ 'Required parameter "projectId" was null or undefined when calling getAdjustedTimesheet().'
1832
+ );
1833
+ }
1834
+
1835
+ if (requestParameters['timesheetId'] == null) {
1836
+ throw new runtime.RequiredError(
1837
+ 'timesheetId',
1838
+ 'Required parameter "timesheetId" was null or undefined when calling getAdjustedTimesheet().'
1839
+ );
1840
+ }
1841
+
1842
+ const queryParameters: any = {};
1843
+
1844
+ const headerParameters: runtime.HTTPHeaders = {};
1845
+
1846
+ if (this.configuration && this.configuration.apiKey) {
1847
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1848
+ }
1849
+
1850
+
1851
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}`;
1852
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1853
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1854
+
1855
+ return {
1856
+ path: urlPath,
1857
+ method: 'GET',
1858
+ headers: headerParameters,
1859
+ query: queryParameters,
1860
+ };
1861
+ }
1862
+
1863
+ /**
1864
+ * Get an adjustedTimesheet
1865
+ * Get an adjustedTimesheet
1866
+ */
1867
+ async getAdjustedTimesheetRaw(requestParameters: GetAdjustedTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdjustedTimesheetDTO>> {
1868
+ const requestOptions = await this.getAdjustedTimesheetRequestOpts(requestParameters);
1869
+ const response = await this.request(requestOptions, initOverrides);
1870
+
1871
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdjustedTimesheetDTOFromJSON(jsonValue));
1872
+ }
1873
+
1874
+ /**
1875
+ * Get an adjustedTimesheet
1876
+ * Get an adjustedTimesheet
1877
+ */
1878
+ async getAdjustedTimesheet(requestParameters: GetAdjustedTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustedTimesheetDTO> {
1879
+ const response = await this.getAdjustedTimesheetRaw(requestParameters, initOverrides);
1880
+ return await response.value();
1881
+ }
1882
+
1883
+ /**
1884
+ * Creates request options for getAdjustedTimesheets without sending the request
1885
+ */
1886
+ async getAdjustedTimesheetsRequestOpts(requestParameters: GetAdjustedTimesheetsRequest): Promise<runtime.RequestOpts> {
1887
+ if (requestParameters['projectId'] == null) {
1888
+ throw new runtime.RequiredError(
1889
+ 'projectId',
1890
+ 'Required parameter "projectId" was null or undefined when calling getAdjustedTimesheets().'
1891
+ );
1892
+ }
1893
+
1894
+ const queryParameters: any = {};
1895
+
1896
+ if (requestParameters['page'] != null) {
1897
+ queryParameters['page'] = requestParameters['page'];
1898
+ }
1899
+
1900
+ if (requestParameters['pageSize'] != null) {
1901
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1902
+ }
1903
+
1904
+ if (requestParameters['search'] != null) {
1905
+ queryParameters['search'] = requestParameters['search'];
1906
+ }
1907
+
1908
+ const headerParameters: runtime.HTTPHeaders = {};
1909
+
1910
+ if (this.configuration && this.configuration.apiKey) {
1911
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1912
+ }
1913
+
1914
+
1915
+ let urlPath = `/projects/{projectId}/adjusted-timesheets`;
1916
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1917
+
1918
+ return {
1919
+ path: urlPath,
1920
+ method: 'GET',
1921
+ headers: headerParameters,
1922
+ query: queryParameters,
1923
+ };
1924
+ }
1925
+
1926
+ /**
1927
+ * Get all adjustedTimesheets in a project
1928
+ * Get all adjustedTimesheets in a project
1929
+ */
1930
+ async getAdjustedTimesheetsRaw(requestParameters: GetAdjustedTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedAdjustedTimesheets>> {
1931
+ const requestOptions = await this.getAdjustedTimesheetsRequestOpts(requestParameters);
1932
+ const response = await this.request(requestOptions, initOverrides);
1933
+
1934
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedAdjustedTimesheetsFromJSON(jsonValue));
1935
+ }
1936
+
1937
+ /**
1938
+ * Get all adjustedTimesheets in a project
1939
+ * Get all adjustedTimesheets in a project
1940
+ */
1941
+ async getAdjustedTimesheets(requestParameters: GetAdjustedTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAdjustedTimesheets> {
1942
+ const response = await this.getAdjustedTimesheetsRaw(requestParameters, initOverrides);
1943
+ return await response.value();
1944
+ }
1945
+
1946
+ /**
1947
+ * Creates request options for getClientById without sending the request
1948
+ */
1949
+ async getClientByIdRequestOpts(requestParameters: GetClientByIdRequest): Promise<runtime.RequestOpts> {
1950
+ if (requestParameters['clientId'] == null) {
1951
+ throw new runtime.RequiredError(
1952
+ 'clientId',
1953
+ 'Required parameter "clientId" was null or undefined when calling getClientById().'
1954
+ );
1955
+ }
1956
+
1957
+ const queryParameters: any = {};
1958
+
1959
+ const headerParameters: runtime.HTTPHeaders = {};
1960
+
1961
+ if (this.configuration && this.configuration.apiKey) {
1962
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1963
+ }
1964
+
1965
+
1966
+ let urlPath = `/clients/{clientId}`;
1967
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
1968
+
1969
+ return {
1970
+ path: urlPath,
1971
+ method: 'GET',
1972
+ headers: headerParameters,
1973
+ query: queryParameters,
1974
+ };
1975
+ }
1976
+
1977
+ /**
1978
+ * Get client by id
1979
+ */
1980
+ async getClientByIdRaw(requestParameters: GetClientByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientDTO>> {
1981
+ const requestOptions = await this.getClientByIdRequestOpts(requestParameters);
1982
+ const response = await this.request(requestOptions, initOverrides);
1983
+
1984
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientDTOFromJSON(jsonValue));
1985
+ }
1986
+
1987
+ /**
1988
+ * Get client by id
1989
+ */
1990
+ async getClientById(requestParameters: GetClientByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientDTO> {
1991
+ const response = await this.getClientByIdRaw(requestParameters, initOverrides);
1992
+ return await response.value();
1993
+ }
1994
+
1995
+ /**
1996
+ * Creates request options for getClientInvoices without sending the request
1997
+ */
1998
+ async getClientInvoicesRequestOpts(requestParameters: GetClientInvoicesRequest): Promise<runtime.RequestOpts> {
1999
+ if (requestParameters['clientId'] == null) {
2000
+ throw new runtime.RequiredError(
2001
+ 'clientId',
2002
+ 'Required parameter "clientId" was null or undefined when calling getClientInvoices().'
2003
+ );
2004
+ }
2005
+
2006
+ const queryParameters: any = {};
2007
+
2008
+ if (requestParameters['page'] != null) {
2009
+ queryParameters['page'] = requestParameters['page'];
2010
+ }
2011
+
2012
+ if (requestParameters['pageSize'] != null) {
2013
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2014
+ }
2015
+
2016
+ if (requestParameters['search'] != null) {
2017
+ queryParameters['search'] = requestParameters['search'];
2018
+ }
2019
+
2020
+ const headerParameters: runtime.HTTPHeaders = {};
2021
+
2022
+ if (this.configuration && this.configuration.apiKey) {
2023
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2024
+ }
2025
+
2026
+
2027
+ let urlPath = `/clients/{clientId}/invoices`;
2028
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
2029
+
2030
+ return {
2031
+ path: urlPath,
2032
+ method: 'GET',
2033
+ headers: headerParameters,
2034
+ query: queryParameters,
2035
+ };
2036
+ }
2037
+
2038
+ /**
2039
+ * Get all invoices from client
2040
+ * Get all invoices from client
2041
+ */
2042
+ async getClientInvoicesRaw(requestParameters: GetClientInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedClientInvoices>> {
2043
+ const requestOptions = await this.getClientInvoicesRequestOpts(requestParameters);
2044
+ const response = await this.request(requestOptions, initOverrides);
2045
+
2046
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedClientInvoicesFromJSON(jsonValue));
2047
+ }
2048
+
2049
+ /**
2050
+ * Get all invoices from client
2051
+ * Get all invoices from client
2052
+ */
2053
+ async getClientInvoices(requestParameters: GetClientInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedClientInvoices> {
2054
+ const response = await this.getClientInvoicesRaw(requestParameters, initOverrides);
2055
+ return await response.value();
2056
+ }
2057
+
2058
+ /**
2059
+ * Creates request options for getClients without sending the request
2060
+ */
2061
+ async getClientsRequestOpts(requestParameters: GetClientsRequest): Promise<runtime.RequestOpts> {
2062
+ const queryParameters: any = {};
2063
+
2064
+ if (requestParameters['page'] != null) {
2065
+ queryParameters['page'] = requestParameters['page'];
2066
+ }
2067
+
2068
+ if (requestParameters['pageSize'] != null) {
2069
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2070
+ }
2071
+
2072
+ if (requestParameters['search'] != null) {
2073
+ queryParameters['search'] = requestParameters['search'];
2074
+ }
2075
+
2076
+ const headerParameters: runtime.HTTPHeaders = {};
2077
+
2078
+ if (this.configuration && this.configuration.apiKey) {
2079
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2080
+ }
2081
+
2082
+
2083
+ let urlPath = `/clients`;
2084
+
2085
+ return {
2086
+ path: urlPath,
2087
+ method: 'GET',
2088
+ headers: headerParameters,
2089
+ query: queryParameters,
2090
+ };
2091
+ }
2092
+
2093
+ /**
2094
+ * Get all clients from company
2095
+ * Get all clients from company
2096
+ */
2097
+ async getClientsRaw(requestParameters: GetClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedClients>> {
2098
+ const requestOptions = await this.getClientsRequestOpts(requestParameters);
2099
+ const response = await this.request(requestOptions, initOverrides);
2100
+
2101
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedClientsFromJSON(jsonValue));
2102
+ }
2103
+
2104
+ /**
2105
+ * Get all clients from company
2106
+ * Get all clients from company
2107
+ */
2108
+ async getClients(requestParameters: GetClientsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedClients> {
2109
+ const response = await this.getClientsRaw(requestParameters, initOverrides);
2110
+ return await response.value();
2111
+ }
2112
+
2113
+ /**
2114
+ * Creates request options for getCommitsByUserID without sending the request
2115
+ */
2116
+ async getCommitsByUserIDRequestOpts(requestParameters: GetCommitsByUserIDRequest): Promise<runtime.RequestOpts> {
2117
+ if (requestParameters['userId'] == null) {
2118
+ throw new runtime.RequiredError(
2119
+ 'userId',
2120
+ 'Required parameter "userId" was null or undefined when calling getCommitsByUserID().'
2121
+ );
2122
+ }
2123
+
2124
+ if (requestParameters['from'] == null) {
2125
+ throw new runtime.RequiredError(
2126
+ 'from',
2127
+ 'Required parameter "from" was null or undefined when calling getCommitsByUserID().'
2128
+ );
2129
+ }
2130
+
2131
+ if (requestParameters['to'] == null) {
2132
+ throw new runtime.RequiredError(
2133
+ 'to',
2134
+ 'Required parameter "to" was null or undefined when calling getCommitsByUserID().'
2135
+ );
2136
+ }
2137
+
2138
+ const queryParameters: any = {};
2139
+
2140
+ if (requestParameters['from'] != null) {
2141
+ queryParameters['from'] = (requestParameters['from'] as any).toISOString().substring(0,10);
2142
+ }
2143
+
2144
+ if (requestParameters['to'] != null) {
2145
+ queryParameters['to'] = (requestParameters['to'] as any).toISOString().substring(0,10);
2146
+ }
2147
+
2148
+ if (requestParameters['groupBy'] != null) {
2149
+ queryParameters['groupBy'] = requestParameters['groupBy'];
2150
+ }
2151
+
2152
+ const headerParameters: runtime.HTTPHeaders = {};
2153
+
2154
+ if (this.configuration && this.configuration.apiKey) {
2155
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2156
+ }
2157
+
2158
+
2159
+ let urlPath = `/employees/{userId}/commits`;
2160
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2161
+
2162
+ return {
2163
+ path: urlPath,
2164
+ method: 'GET',
2165
+ headers: headerParameters,
2166
+ query: queryParameters,
2167
+ };
2168
+ }
2169
+
2170
+ /**
2171
+ * Get commit statistics for a specific user
2172
+ * Get commits by user ID
2173
+ */
2174
+ async getCommitsByUserIDRaw(requestParameters: GetCommitsByUserIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ClientGithubCommitCountDTO>>> {
2175
+ const requestOptions = await this.getCommitsByUserIDRequestOpts(requestParameters);
2176
+ const response = await this.request(requestOptions, initOverrides);
2177
+
2178
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientGithubCommitCountDTOFromJSON));
2179
+ }
2180
+
2181
+ /**
2182
+ * Get commit statistics for a specific user
2183
+ * Get commits by user ID
2184
+ */
2185
+ async getCommitsByUserID(requestParameters: GetCommitsByUserIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ClientGithubCommitCountDTO>> {
2186
+ const response = await this.getCommitsByUserIDRaw(requestParameters, initOverrides);
2187
+ return await response.value();
2188
+ }
2189
+
2190
+ /**
2191
+ * Creates request options for getCompanies without sending the request
2192
+ */
2193
+ async getCompaniesRequestOpts(requestParameters: GetCompaniesRequest): Promise<runtime.RequestOpts> {
2194
+ const queryParameters: any = {};
2195
+
2196
+ if (requestParameters['search'] != null) {
2197
+ queryParameters['search'] = requestParameters['search'];
2198
+ }
2199
+
2200
+ const headerParameters: runtime.HTTPHeaders = {};
2201
+
2202
+ if (this.configuration && this.configuration.apiKey) {
2203
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2204
+ }
2205
+
2206
+
2207
+ let urlPath = `/companies`;
2208
+
2209
+ return {
2210
+ path: urlPath,
2211
+ method: 'GET',
2212
+ headers: headerParameters,
2213
+ query: queryParameters,
2214
+ };
2215
+ }
2216
+
2217
+ /**
2218
+ * Get all companies a user belongs to
2219
+ * Get all companies a user belongs to
2220
+ */
2221
+ async getCompaniesRaw(requestParameters: GetCompaniesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CompanyDTO>>> {
2222
+ const requestOptions = await this.getCompaniesRequestOpts(requestParameters);
2223
+ const response = await this.request(requestOptions, initOverrides);
2224
+
2225
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CompanyDTOFromJSON));
2226
+ }
2227
+
2228
+ /**
2229
+ * Get all companies a user belongs to
2230
+ * Get all companies a user belongs to
2231
+ */
2232
+ async getCompanies(requestParameters: GetCompaniesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CompanyDTO>> {
2233
+ const response = await this.getCompaniesRaw(requestParameters, initOverrides);
2234
+ return await response.value();
2235
+ }
2236
+
2237
+ /**
2238
+ * Creates request options for getCompany without sending the request
2239
+ */
2240
+ async getCompanyRequestOpts(requestParameters: GetCompanyRequest): Promise<runtime.RequestOpts> {
2241
+ if (requestParameters['companyId'] == null) {
2242
+ throw new runtime.RequiredError(
2243
+ 'companyId',
2244
+ 'Required parameter "companyId" was null or undefined when calling getCompany().'
2245
+ );
2246
+ }
2247
+
2248
+ const queryParameters: any = {};
2249
+
2250
+ const headerParameters: runtime.HTTPHeaders = {};
2251
+
2252
+ if (this.configuration && this.configuration.apiKey) {
2253
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2254
+ }
2255
+
2256
+
2257
+ let urlPath = `/companies/{companyId}`;
2258
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
2259
+
2260
+ return {
2261
+ path: urlPath,
2262
+ method: 'GET',
2263
+ headers: headerParameters,
2264
+ query: queryParameters,
2265
+ };
2266
+ }
2267
+
2268
+ /**
2269
+ * Get a company
2270
+ * Get a company by ID
2271
+ */
2272
+ async getCompanyRaw(requestParameters: GetCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompanyDTO>> {
2273
+ const requestOptions = await this.getCompanyRequestOpts(requestParameters);
2274
+ const response = await this.request(requestOptions, initOverrides);
2275
+
2276
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompanyDTOFromJSON(jsonValue));
2277
+ }
2278
+
2279
+ /**
2280
+ * Get a company
2281
+ * Get a company by ID
2282
+ */
2283
+ async getCompany(requestParameters: GetCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompanyDTO> {
2284
+ const response = await this.getCompanyRaw(requestParameters, initOverrides);
2285
+ return await response.value();
2286
+ }
2287
+
2288
+ /**
2289
+ * Creates request options for getEmployee without sending the request
2290
+ */
2291
+ async getEmployeeRequestOpts(requestParameters: GetEmployeeRequest): Promise<runtime.RequestOpts> {
2292
+ if (requestParameters['userId'] == null) {
2293
+ throw new runtime.RequiredError(
2294
+ 'userId',
2295
+ 'Required parameter "userId" was null or undefined when calling getEmployee().'
2296
+ );
2297
+ }
2298
+
2299
+ const queryParameters: any = {};
2300
+
2301
+ const headerParameters: runtime.HTTPHeaders = {};
2302
+
2303
+ if (this.configuration && this.configuration.apiKey) {
2304
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2305
+ }
2306
+
2307
+
2308
+ let urlPath = `/employees/{userId}`;
2309
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2310
+
2311
+ return {
2312
+ path: urlPath,
2313
+ method: 'GET',
2314
+ headers: headerParameters,
2315
+ query: queryParameters,
2316
+ };
2317
+ }
2318
+
2319
+ /**
2320
+ * Get employee info
2321
+ * Get employee info
2322
+ */
2323
+ async getEmployeeRaw(requestParameters: GetEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmployeeDTO>> {
2324
+ const requestOptions = await this.getEmployeeRequestOpts(requestParameters);
2325
+ const response = await this.request(requestOptions, initOverrides);
2326
+
2327
+ return new runtime.JSONApiResponse(response, (jsonValue) => EmployeeDTOFromJSON(jsonValue));
2328
+ }
2329
+
2330
+ /**
2331
+ * Get employee info
2332
+ * Get employee info
2333
+ */
2334
+ async getEmployee(requestParameters: GetEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmployeeDTO> {
2335
+ const response = await this.getEmployeeRaw(requestParameters, initOverrides);
2336
+ return await response.value();
2337
+ }
2338
+
2339
+ /**
2340
+ * Creates request options for getEmployeeInvoices without sending the request
2341
+ */
2342
+ async getEmployeeInvoicesRequestOpts(requestParameters: GetEmployeeInvoicesRequest): Promise<runtime.RequestOpts> {
2343
+ if (requestParameters['userId'] == null) {
2344
+ throw new runtime.RequiredError(
2345
+ 'userId',
2346
+ 'Required parameter "userId" was null or undefined when calling getEmployeeInvoices().'
2347
+ );
2348
+ }
2349
+
2350
+ const queryParameters: any = {};
2351
+
2352
+ if (requestParameters['page'] != null) {
2353
+ queryParameters['page'] = requestParameters['page'];
2354
+ }
2355
+
2356
+ if (requestParameters['pageSize'] != null) {
2357
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2358
+ }
2359
+
2360
+ if (requestParameters['search'] != null) {
2361
+ queryParameters['search'] = requestParameters['search'];
2362
+ }
2363
+
2364
+ const headerParameters: runtime.HTTPHeaders = {};
2365
+
2366
+ if (this.configuration && this.configuration.apiKey) {
2367
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2368
+ }
2369
+
2370
+
2371
+ let urlPath = `/employees/{userId}/invoices`;
2372
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2373
+
2374
+ return {
2375
+ path: urlPath,
2376
+ method: 'GET',
2377
+ headers: headerParameters,
2378
+ query: queryParameters,
2379
+ };
2380
+ }
2381
+
2382
+ /**
2383
+ * Get all employee invoices
2384
+ * Get all employee invoices
2385
+ */
2386
+ async getEmployeeInvoicesRaw(requestParameters: GetEmployeeInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedEmployeeInvoices>> {
2387
+ const requestOptions = await this.getEmployeeInvoicesRequestOpts(requestParameters);
2388
+ const response = await this.request(requestOptions, initOverrides);
2389
+
2390
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmployeeInvoicesFromJSON(jsonValue));
2391
+ }
2392
+
2393
+ /**
2394
+ * Get all employee invoices
2395
+ * Get all employee invoices
2396
+ */
2397
+ async getEmployeeInvoices(requestParameters: GetEmployeeInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedEmployeeInvoices> {
2398
+ const response = await this.getEmployeeInvoicesRaw(requestParameters, initOverrides);
2399
+ return await response.value();
2400
+ }
2401
+
2402
+ /**
2403
+ * Creates request options for getEmployeeTimesheets without sending the request
2404
+ */
2405
+ async getEmployeeTimesheetsRequestOpts(requestParameters: GetEmployeeTimesheetsRequest): Promise<runtime.RequestOpts> {
2406
+ if (requestParameters['projectId'] == null) {
2407
+ throw new runtime.RequiredError(
2408
+ 'projectId',
2409
+ 'Required parameter "projectId" was null or undefined when calling getEmployeeTimesheets().'
2410
+ );
2411
+ }
2412
+
2413
+ const queryParameters: any = {};
2414
+
2415
+ if (requestParameters['page'] != null) {
2416
+ queryParameters['page'] = requestParameters['page'];
2417
+ }
2418
+
2419
+ if (requestParameters['pageSize'] != null) {
2420
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2421
+ }
2422
+
2423
+ if (requestParameters['search'] != null) {
2424
+ queryParameters['search'] = requestParameters['search'];
2425
+ }
2426
+
2427
+ const headerParameters: runtime.HTTPHeaders = {};
2428
+
2429
+ if (this.configuration && this.configuration.apiKey) {
2430
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2431
+ }
2432
+
2433
+
2434
+ let urlPath = `/projects/{projectId}/employee-timesheets`;
2435
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2436
+
2437
+ return {
2438
+ path: urlPath,
2439
+ method: 'GET',
2440
+ headers: headerParameters,
2441
+ query: queryParameters,
2442
+ };
2443
+ }
2444
+
2445
+ /**
2446
+ * Get all timesheets of an employee in a project
2447
+ * Get all timesheets of an employee in a project
2448
+ */
2449
+ async getEmployeeTimesheetsRaw(requestParameters: GetEmployeeTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTimesheets>> {
2450
+ const requestOptions = await this.getEmployeeTimesheetsRequestOpts(requestParameters);
2451
+ const response = await this.request(requestOptions, initOverrides);
2452
+
2453
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTimesheetsFromJSON(jsonValue));
2454
+ }
2455
+
2456
+ /**
2457
+ * Get all timesheets of an employee in a project
2458
+ * Get all timesheets of an employee in a project
2459
+ */
2460
+ async getEmployeeTimesheets(requestParameters: GetEmployeeTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTimesheets> {
2461
+ const response = await this.getEmployeeTimesheetsRaw(requestParameters, initOverrides);
2462
+ return await response.value();
2463
+ }
2464
+
2465
+ /**
2466
+ * Creates request options for getEmployees without sending the request
2467
+ */
2468
+ async getEmployeesRequestOpts(requestParameters: GetEmployeesRequest): Promise<runtime.RequestOpts> {
2469
+ const queryParameters: any = {};
2470
+
2471
+ if (requestParameters['page'] != null) {
2472
+ queryParameters['page'] = requestParameters['page'];
2473
+ }
2474
+
2475
+ if (requestParameters['pageSize'] != null) {
2476
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2477
+ }
2478
+
2479
+ if (requestParameters['activated'] != null) {
2480
+ queryParameters['activated'] = requestParameters['activated'];
2481
+ }
2482
+
2483
+ if (requestParameters['search'] != null) {
2484
+ queryParameters['search'] = requestParameters['search'];
2485
+ }
2486
+
2487
+ const headerParameters: runtime.HTTPHeaders = {};
2488
+
2489
+ if (this.configuration && this.configuration.apiKey) {
2490
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2491
+ }
2492
+
2493
+
2494
+ let urlPath = `/employees`;
2495
+
2496
+ return {
2497
+ path: urlPath,
2498
+ method: 'GET',
2499
+ headers: headerParameters,
2500
+ query: queryParameters,
2501
+ };
2502
+ }
2503
+
2504
+ /**
2505
+ * List employees
2506
+ * List employees
2507
+ */
2508
+ async getEmployeesRaw(requestParameters: GetEmployeesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedEmployees>> {
2509
+ const requestOptions = await this.getEmployeesRequestOpts(requestParameters);
2510
+ const response = await this.request(requestOptions, initOverrides);
2511
+
2512
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmployeesFromJSON(jsonValue));
2513
+ }
2514
+
2515
+ /**
2516
+ * List employees
2517
+ * List employees
2518
+ */
2519
+ async getEmployees(requestParameters: GetEmployeesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedEmployees> {
2520
+ const response = await this.getEmployeesRaw(requestParameters, initOverrides);
2521
+ return await response.value();
2522
+ }
2523
+
2524
+ /**
2525
+ * Creates request options for getGithubAccount without sending the request
2526
+ */
2527
+ async getGithubAccountRequestOpts(): Promise<runtime.RequestOpts> {
2528
+ const queryParameters: any = {};
2529
+
2530
+ const headerParameters: runtime.HTTPHeaders = {};
2531
+
2532
+ if (this.configuration && this.configuration.apiKey) {
2533
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2534
+ }
2535
+
2536
+
2537
+ let urlPath = `/github-accounts`;
2538
+
2539
+ return {
2540
+ path: urlPath,
2541
+ method: 'GET',
2542
+ headers: headerParameters,
2543
+ query: queryParameters,
2544
+ };
2545
+ }
2546
+
2547
+ /**
2548
+ * Get GitHub account for the authenticated user
2549
+ * Get GitHub account
2550
+ */
2551
+ async getGithubAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientGithubAccountDTO>> {
2552
+ const requestOptions = await this.getGithubAccountRequestOpts();
2553
+ const response = await this.request(requestOptions, initOverrides);
2554
+
2555
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientGithubAccountDTOFromJSON(jsonValue));
2556
+ }
2557
+
2558
+ /**
2559
+ * Get GitHub account for the authenticated user
2560
+ * Get GitHub account
2561
+ */
2562
+ async getGithubAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientGithubAccountDTO> {
2563
+ const response = await this.getGithubAccountRaw(initOverrides);
2564
+ return await response.value();
2565
+ }
2566
+
2567
+ /**
2568
+ * Creates request options for getGlobalTimesheet without sending the request
2569
+ */
2570
+ async getGlobalTimesheetRequestOpts(requestParameters: GetGlobalTimesheetRequest): Promise<runtime.RequestOpts> {
2571
+ if (requestParameters['projectId'] == null) {
2572
+ throw new runtime.RequiredError(
2573
+ 'projectId',
2574
+ 'Required parameter "projectId" was null or undefined when calling getGlobalTimesheet().'
2575
+ );
2576
+ }
2577
+
2578
+ if (requestParameters['timesheetId'] == null) {
2579
+ throw new runtime.RequiredError(
2580
+ 'timesheetId',
2581
+ 'Required parameter "timesheetId" was null or undefined when calling getGlobalTimesheet().'
2582
+ );
2583
+ }
2584
+
2585
+ const queryParameters: any = {};
2586
+
2587
+ const headerParameters: runtime.HTTPHeaders = {};
2588
+
2589
+ if (this.configuration && this.configuration.apiKey) {
2590
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2591
+ }
2592
+
2593
+
2594
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}`;
2595
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2596
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2597
+
2598
+ return {
2599
+ path: urlPath,
2600
+ method: 'GET',
2601
+ headers: headerParameters,
2602
+ query: queryParameters,
2603
+ };
2604
+ }
2605
+
2606
+ /**
2607
+ * Get a global timesheet
2608
+ * Get a global timesheet
2609
+ */
2610
+ async getGlobalTimesheetRaw(requestParameters: GetGlobalTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlobalTimesheetDTO>> {
2611
+ const requestOptions = await this.getGlobalTimesheetRequestOpts(requestParameters);
2612
+ const response = await this.request(requestOptions, initOverrides);
2613
+
2614
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlobalTimesheetDTOFromJSON(jsonValue));
2615
+ }
2616
+
2617
+ /**
2618
+ * Get a global timesheet
2619
+ * Get a global timesheet
2620
+ */
2621
+ async getGlobalTimesheet(requestParameters: GetGlobalTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlobalTimesheetDTO> {
2622
+ const response = await this.getGlobalTimesheetRaw(requestParameters, initOverrides);
2623
+ return await response.value();
2624
+ }
2625
+
2626
+ /**
2627
+ * Creates request options for getGlobalTimesheets without sending the request
2628
+ */
2629
+ async getGlobalTimesheetsRequestOpts(requestParameters: GetGlobalTimesheetsRequest): Promise<runtime.RequestOpts> {
2630
+ if (requestParameters['projectId'] == null) {
2631
+ throw new runtime.RequiredError(
2632
+ 'projectId',
2633
+ 'Required parameter "projectId" was null or undefined when calling getGlobalTimesheets().'
2634
+ );
2635
+ }
2636
+
2637
+ const queryParameters: any = {};
2638
+
2639
+ if (requestParameters['page'] != null) {
2640
+ queryParameters['page'] = requestParameters['page'];
2641
+ }
2642
+
2643
+ if (requestParameters['pageSize'] != null) {
2644
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2645
+ }
2646
+
2647
+ if (requestParameters['search'] != null) {
2648
+ queryParameters['search'] = requestParameters['search'];
2649
+ }
2650
+
2651
+ const headerParameters: runtime.HTTPHeaders = {};
2652
+
2653
+ if (this.configuration && this.configuration.apiKey) {
2654
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2655
+ }
2656
+
2657
+
2658
+ let urlPath = `/projects/{projectId}/global-timesheets`;
2659
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2660
+
2661
+ return {
2662
+ path: urlPath,
2663
+ method: 'GET',
2664
+ headers: headerParameters,
2665
+ query: queryParameters,
2666
+ };
2667
+ }
2668
+
2669
+ /**
2670
+ * Get all global timesheets in a project
2671
+ * Get all global timesheets in a project
2672
+ */
2673
+ async getGlobalTimesheetsRaw(requestParameters: GetGlobalTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedGlobalTimesheets>> {
2674
+ const requestOptions = await this.getGlobalTimesheetsRequestOpts(requestParameters);
2675
+ const response = await this.request(requestOptions, initOverrides);
2676
+
2677
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedGlobalTimesheetsFromJSON(jsonValue));
2678
+ }
2679
+
2680
+ /**
2681
+ * Get all global timesheets in a project
2682
+ * Get all global timesheets in a project
2683
+ */
2684
+ async getGlobalTimesheets(requestParameters: GetGlobalTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedGlobalTimesheets> {
2685
+ const response = await this.getGlobalTimesheetsRaw(requestParameters, initOverrides);
2686
+ return await response.value();
2687
+ }
2688
+
2689
+ /**
2690
+ * Creates request options for getHolidays without sending the request
2691
+ */
2692
+ async getHolidaysRequestOpts(requestParameters: GetHolidaysRequest): Promise<runtime.RequestOpts> {
2693
+ const queryParameters: any = {};
2694
+
2695
+ if (requestParameters['page'] != null) {
2696
+ queryParameters['page'] = requestParameters['page'];
2697
+ }
2698
+
2699
+ if (requestParameters['pageSize'] != null) {
2700
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2701
+ }
2702
+
2703
+ if (requestParameters['search'] != null) {
2704
+ queryParameters['search'] = requestParameters['search'];
2705
+ }
2706
+
2707
+ const headerParameters: runtime.HTTPHeaders = {};
2708
+
2709
+ if (this.configuration && this.configuration.apiKey) {
2710
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2711
+ }
2712
+
2713
+
2714
+ let urlPath = `/holidays`;
2715
+
2716
+ return {
2717
+ path: urlPath,
2718
+ method: 'GET',
2719
+ headers: headerParameters,
2720
+ query: queryParameters,
2721
+ };
2722
+ }
2723
+
2724
+ /**
2725
+ * Returns a paginated list of a user\'s holidays
2726
+ */
2727
+ async getHolidaysRaw(requestParameters: GetHolidaysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedHolidaysDTO>> {
2728
+ const requestOptions = await this.getHolidaysRequestOpts(requestParameters);
2729
+ const response = await this.request(requestOptions, initOverrides);
2730
+
2731
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedHolidaysDTOFromJSON(jsonValue));
2732
+ }
2733
+
2734
+ /**
2735
+ * Returns a paginated list of a user\'s holidays
2736
+ */
2737
+ async getHolidays(requestParameters: GetHolidaysRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedHolidaysDTO> {
2738
+ const response = await this.getHolidaysRaw(requestParameters, initOverrides);
2739
+ return await response.value();
2740
+ }
2741
+
2742
+ /**
2743
+ * Creates request options for getHolidaysByEmployee without sending the request
2744
+ */
2745
+ async getHolidaysByEmployeeRequestOpts(requestParameters: GetHolidaysByEmployeeRequest): Promise<runtime.RequestOpts> {
2746
+ if (requestParameters['userId'] == null) {
2747
+ throw new runtime.RequiredError(
2748
+ 'userId',
2749
+ 'Required parameter "userId" was null or undefined when calling getHolidaysByEmployee().'
2750
+ );
2751
+ }
2752
+
2753
+ const queryParameters: any = {};
2754
+
2755
+ if (requestParameters['page'] != null) {
2756
+ queryParameters['page'] = requestParameters['page'];
2757
+ }
2758
+
2759
+ if (requestParameters['pageSize'] != null) {
2760
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2761
+ }
2762
+
2763
+ if (requestParameters['search'] != null) {
2764
+ queryParameters['search'] = requestParameters['search'];
2765
+ }
2766
+
2767
+ const headerParameters: runtime.HTTPHeaders = {};
2768
+
2769
+ if (this.configuration && this.configuration.apiKey) {
2770
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2771
+ }
2772
+
2773
+
2774
+ let urlPath = `/employees/{userId}/holidays`;
2775
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2776
+
2777
+ return {
2778
+ path: urlPath,
2779
+ method: 'GET',
2780
+ headers: headerParameters,
2781
+ query: queryParameters,
2782
+ };
2783
+ }
2784
+
2785
+ /**
2786
+ * returns a paginated list of a user\'s holidays
2787
+ */
2788
+ async getHolidaysByEmployeeRaw(requestParameters: GetHolidaysByEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedHolidaysDTO>> {
2789
+ const requestOptions = await this.getHolidaysByEmployeeRequestOpts(requestParameters);
2790
+ const response = await this.request(requestOptions, initOverrides);
2791
+
2792
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedHolidaysDTOFromJSON(jsonValue));
2793
+ }
2794
+
2795
+ /**
2796
+ * returns a paginated list of a user\'s holidays
2797
+ */
2798
+ async getHolidaysByEmployee(requestParameters: GetHolidaysByEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedHolidaysDTO> {
2799
+ const response = await this.getHolidaysByEmployeeRaw(requestParameters, initOverrides);
2800
+ return await response.value();
2801
+ }
2802
+
2803
+ /**
2804
+ * Creates request options for getJiraAccount without sending the request
2805
+ */
2806
+ async getJiraAccountRequestOpts(): Promise<runtime.RequestOpts> {
2807
+ const queryParameters: any = {};
2808
+
2809
+ const headerParameters: runtime.HTTPHeaders = {};
2810
+
2811
+ if (this.configuration && this.configuration.apiKey) {
2812
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2813
+ }
2814
+
2815
+
2816
+ let urlPath = `/jira-users/jira-accounts`;
2817
+
2818
+ return {
2819
+ path: urlPath,
2820
+ method: 'GET',
2821
+ headers: headerParameters,
2822
+ query: queryParameters,
2823
+ };
2824
+ }
2825
+
2826
+ /**
2827
+ * Get Jira account for the authenticated user
2828
+ * Get Jira account
2829
+ */
2830
+ async getJiraAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ClientJiraAccountDTO>>> {
2831
+ const requestOptions = await this.getJiraAccountRequestOpts();
2832
+ const response = await this.request(requestOptions, initOverrides);
2833
+
2834
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientJiraAccountDTOFromJSON));
2835
+ }
2836
+
2837
+ /**
2838
+ * Get Jira account for the authenticated user
2839
+ * Get Jira account
2840
+ */
2841
+ async getJiraAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ClientJiraAccountDTO>> {
2842
+ const response = await this.getJiraAccountRaw(initOverrides);
2843
+ return await response.value();
2844
+ }
2845
+
2846
+ /**
2847
+ * Creates request options for getJiraUser without sending the request
2848
+ */
2849
+ async getJiraUserRequestOpts(): Promise<runtime.RequestOpts> {
2850
+ const queryParameters: any = {};
2851
+
2852
+ const headerParameters: runtime.HTTPHeaders = {};
2853
+
2854
+ if (this.configuration && this.configuration.apiKey) {
2855
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2856
+ }
2857
+
2858
+
2859
+ let urlPath = `/jira-users`;
2860
+
2861
+ return {
2862
+ path: urlPath,
2863
+ method: 'GET',
2864
+ headers: headerParameters,
2865
+ query: queryParameters,
2866
+ };
2867
+ }
2868
+
2869
+ /**
2870
+ * Get Jira user information for the authenticated user
2871
+ * Get Jira user
2872
+ */
2873
+ async getJiraUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientJiraUserDTO>> {
2874
+ const requestOptions = await this.getJiraUserRequestOpts();
2875
+ const response = await this.request(requestOptions, initOverrides);
2876
+
2877
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientJiraUserDTOFromJSON(jsonValue));
2878
+ }
2879
+
2880
+ /**
2881
+ * Get Jira user information for the authenticated user
2882
+ * Get Jira user
2883
+ */
2884
+ async getJiraUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientJiraUserDTO> {
2885
+ const response = await this.getJiraUserRaw(initOverrides);
2886
+ return await response.value();
2887
+ }
2888
+
2889
+ /**
2890
+ * Creates request options for getMyAccount without sending the request
2891
+ */
2892
+ async getMyAccountRequestOpts(): Promise<runtime.RequestOpts> {
2893
+ const queryParameters: any = {};
2894
+
2895
+ const headerParameters: runtime.HTTPHeaders = {};
2896
+
2897
+ if (this.configuration && this.configuration.apiKey) {
2898
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2899
+ }
2900
+
2901
+
2902
+ let urlPath = `/me`;
2903
+
2904
+ return {
2905
+ path: urlPath,
2906
+ method: 'GET',
2907
+ headers: headerParameters,
2908
+ query: queryParameters,
2909
+ };
2910
+ }
2911
+
2912
+ /**
2913
+ * Get my account info
2914
+ * Get my account info
2915
+ */
2916
+ async getMyAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountInfoDTO>> {
2917
+ const requestOptions = await this.getMyAccountRequestOpts();
2918
+ const response = await this.request(requestOptions, initOverrides);
2919
+
2920
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountInfoDTOFromJSON(jsonValue));
2921
+ }
2922
+
2923
+ /**
2924
+ * Get my account info
2925
+ * Get my account info
2926
+ */
2927
+ async getMyAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountInfoDTO> {
2928
+ const response = await this.getMyAccountRaw(initOverrides);
2929
+ return await response.value();
2930
+ }
2931
+
2932
+ /**
2933
+ * Creates request options for getMyCommits without sending the request
2934
+ */
2935
+ async getMyCommitsRequestOpts(requestParameters: GetMyCommitsRequest): Promise<runtime.RequestOpts> {
2936
+ if (requestParameters['from'] == null) {
2937
+ throw new runtime.RequiredError(
2938
+ 'from',
2939
+ 'Required parameter "from" was null or undefined when calling getMyCommits().'
2940
+ );
2941
+ }
2942
+
2943
+ if (requestParameters['to'] == null) {
2944
+ throw new runtime.RequiredError(
2945
+ 'to',
2946
+ 'Required parameter "to" was null or undefined when calling getMyCommits().'
2947
+ );
2948
+ }
2949
+
2950
+ const queryParameters: any = {};
2951
+
2952
+ if (requestParameters['from'] != null) {
2953
+ queryParameters['from'] = (requestParameters['from'] as any).toISOString().substring(0,10);
2954
+ }
2955
+
2956
+ if (requestParameters['to'] != null) {
2957
+ queryParameters['to'] = (requestParameters['to'] as any).toISOString().substring(0,10);
2958
+ }
2959
+
2960
+ if (requestParameters['groupBy'] != null) {
2961
+ queryParameters['groupBy'] = requestParameters['groupBy'];
2962
+ }
2963
+
2964
+ const headerParameters: runtime.HTTPHeaders = {};
2965
+
2966
+ if (this.configuration && this.configuration.apiKey) {
2967
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2968
+ }
2969
+
2970
+
2971
+ let urlPath = `/commits`;
2972
+
2973
+ return {
2974
+ path: urlPath,
2975
+ method: 'GET',
2976
+ headers: headerParameters,
2977
+ query: queryParameters,
2978
+ };
2979
+ }
2980
+
2981
+ /**
2982
+ * Get commit statistics for the authenticated user
2983
+ * Get my commits
2984
+ */
2985
+ async getMyCommitsRaw(requestParameters: GetMyCommitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ClientGithubCommitCountDTO>>> {
2986
+ const requestOptions = await this.getMyCommitsRequestOpts(requestParameters);
2987
+ const response = await this.request(requestOptions, initOverrides);
2988
+
2989
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientGithubCommitCountDTOFromJSON));
2990
+ }
2991
+
2992
+ /**
2993
+ * Get commit statistics for the authenticated user
2994
+ * Get my commits
2995
+ */
2996
+ async getMyCommits(requestParameters: GetMyCommitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ClientGithubCommitCountDTO>> {
2997
+ const response = await this.getMyCommitsRaw(requestParameters, initOverrides);
2998
+ return await response.value();
2999
+ }
3000
+
3001
+ /**
3002
+ * Creates request options for getProjectById without sending the request
3003
+ */
3004
+ async getProjectByIdRequestOpts(requestParameters: GetProjectByIdRequest): Promise<runtime.RequestOpts> {
3005
+ if (requestParameters['projectId'] == null) {
3006
+ throw new runtime.RequiredError(
3007
+ 'projectId',
3008
+ 'Required parameter "projectId" was null or undefined when calling getProjectById().'
3009
+ );
3010
+ }
3011
+
3012
+ const queryParameters: any = {};
3013
+
3014
+ const headerParameters: runtime.HTTPHeaders = {};
3015
+
3016
+ if (this.configuration && this.configuration.apiKey) {
3017
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3018
+ }
3019
+
3020
+
3021
+ let urlPath = `/projects/{projectId}`;
3022
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3023
+
3024
+ return {
3025
+ path: urlPath,
3026
+ method: 'GET',
3027
+ headers: headerParameters,
3028
+ query: queryParameters,
3029
+ };
3030
+ }
3031
+
3032
+ /**
3033
+ * Get a project
3034
+ * Get a project by ID
3035
+ */
3036
+ async getProjectByIdRaw(requestParameters: GetProjectByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectDTO>> {
3037
+ const requestOptions = await this.getProjectByIdRequestOpts(requestParameters);
3038
+ const response = await this.request(requestOptions, initOverrides);
3039
+
3040
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProjectDTOFromJSON(jsonValue));
3041
+ }
3042
+
3043
+ /**
3044
+ * Get a project
3045
+ * Get a project by ID
3046
+ */
3047
+ async getProjectById(requestParameters: GetProjectByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectDTO> {
3048
+ const response = await this.getProjectByIdRaw(requestParameters, initOverrides);
3049
+ return await response.value();
3050
+ }
3051
+
3052
+ /**
3053
+ * Creates request options for getProjectReportByUser without sending the request
3054
+ */
3055
+ async getProjectReportByUserRequestOpts(requestParameters: GetProjectReportByUserRequest): Promise<runtime.RequestOpts> {
3056
+ if (requestParameters['userId'] == null) {
3057
+ throw new runtime.RequiredError(
3058
+ 'userId',
3059
+ 'Required parameter "userId" was null or undefined when calling getProjectReportByUser().'
3060
+ );
3061
+ }
3062
+
3063
+ if (requestParameters['startDate'] == null) {
3064
+ throw new runtime.RequiredError(
3065
+ 'startDate',
3066
+ 'Required parameter "startDate" was null or undefined when calling getProjectReportByUser().'
3067
+ );
3068
+ }
3069
+
3070
+ if (requestParameters['endDate'] == null) {
3071
+ throw new runtime.RequiredError(
3072
+ 'endDate',
3073
+ 'Required parameter "endDate" was null or undefined when calling getProjectReportByUser().'
3074
+ );
3075
+ }
3076
+
3077
+ const queryParameters: any = {};
3078
+
3079
+ if (requestParameters['userId'] != null) {
3080
+ queryParameters['userId'] = requestParameters['userId'];
3081
+ }
3082
+
3083
+ if (requestParameters['startDate'] != null) {
3084
+ queryParameters['startDate'] = (requestParameters['startDate'] as any).toISOString();
3085
+ }
3086
+
3087
+ if (requestParameters['endDate'] != null) {
3088
+ queryParameters['endDate'] = (requestParameters['endDate'] as any).toISOString();
3089
+ }
3090
+
3091
+ const headerParameters: runtime.HTTPHeaders = {};
3092
+
3093
+ if (this.configuration && this.configuration.apiKey) {
3094
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // api_key authentication
3095
+ }
3096
+
3097
+
3098
+ let urlPath = `/api/projects/report-by-user`;
3099
+
3100
+ return {
3101
+ path: urlPath,
3102
+ method: 'GET',
3103
+ headers: headerParameters,
3104
+ query: queryParameters,
3105
+ };
3106
+ }
3107
+
3108
+ /**
3109
+ * Get all projects an employee has access to
3110
+ * Get all projects an employee has access to
3111
+ */
3112
+ async getProjectReportByUserRaw(requestParameters: GetProjectReportByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserProjectReport>> {
3113
+ const requestOptions = await this.getProjectReportByUserRequestOpts(requestParameters);
3114
+ const response = await this.request(requestOptions, initOverrides);
3115
+
3116
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserProjectReportFromJSON(jsonValue));
3117
+ }
3118
+
3119
+ /**
3120
+ * Get all projects an employee has access to
3121
+ * Get all projects an employee has access to
3122
+ */
3123
+ async getProjectReportByUser(requestParameters: GetProjectReportByUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserProjectReport> {
3124
+ const response = await this.getProjectReportByUserRaw(requestParameters, initOverrides);
3125
+ return await response.value();
3126
+ }
3127
+
3128
+ /**
3129
+ * Creates request options for getProjects without sending the request
3130
+ */
3131
+ async getProjectsRequestOpts(requestParameters: GetProjectsRequest): Promise<runtime.RequestOpts> {
3132
+ const queryParameters: any = {};
3133
+
3134
+ if (requestParameters['page'] != null) {
3135
+ queryParameters['page'] = requestParameters['page'];
3136
+ }
3137
+
3138
+ if (requestParameters['pageSize'] != null) {
3139
+ queryParameters['pageSize'] = requestParameters['pageSize'];
3140
+ }
3141
+
3142
+ if (requestParameters['search'] != null) {
3143
+ queryParameters['search'] = requestParameters['search'];
3144
+ }
3145
+
3146
+ const headerParameters: runtime.HTTPHeaders = {};
3147
+
3148
+ if (this.configuration && this.configuration.apiKey) {
3149
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3150
+ }
3151
+
3152
+
3153
+ let urlPath = `/projects`;
3154
+
3155
+ return {
3156
+ path: urlPath,
3157
+ method: 'GET',
3158
+ headers: headerParameters,
3159
+ query: queryParameters,
3160
+ };
3161
+ }
3162
+
3163
+ /**
3164
+ * Get all projects a user or employee has access to
3165
+ * Get all projects a user or employee has access to
3166
+ */
3167
+ async getProjectsRaw(requestParameters: GetProjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedProjects>> {
3168
+ const requestOptions = await this.getProjectsRequestOpts(requestParameters);
3169
+ const response = await this.request(requestOptions, initOverrides);
3170
+
3171
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedProjectsFromJSON(jsonValue));
3172
+ }
3173
+
3174
+ /**
3175
+ * Get all projects a user or employee has access to
3176
+ * Get all projects a user or employee has access to
3177
+ */
3178
+ async getProjects(requestParameters: GetProjectsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedProjects> {
3179
+ const response = await this.getProjectsRaw(requestParameters, initOverrides);
3180
+ return await response.value();
3181
+ }
3182
+
3183
+ /**
3184
+ * Creates request options for getProjectsAsEmployee without sending the request
3185
+ */
3186
+ async getProjectsAsEmployeeRequestOpts(requestParameters: GetProjectsAsEmployeeRequest): Promise<runtime.RequestOpts> {
3187
+ const queryParameters: any = {};
3188
+
3189
+ if (requestParameters['page'] != null) {
3190
+ queryParameters['page'] = requestParameters['page'];
3191
+ }
3192
+
3193
+ if (requestParameters['pageSize'] != null) {
3194
+ queryParameters['pageSize'] = requestParameters['pageSize'];
3195
+ }
3196
+
3197
+ if (requestParameters['search'] != null) {
3198
+ queryParameters['search'] = requestParameters['search'];
3199
+ }
3200
+
3201
+ const headerParameters: runtime.HTTPHeaders = {};
3202
+
3203
+ if (this.configuration && this.configuration.apiKey) {
3204
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3205
+ }
3206
+
3207
+
3208
+ let urlPath = `/employee-projects`;
3209
+
3210
+ return {
3211
+ path: urlPath,
3212
+ method: 'GET',
3213
+ headers: headerParameters,
3214
+ query: queryParameters,
3215
+ };
3216
+ }
3217
+
3218
+ /**
3219
+ * Get all projects an employee has access to
3220
+ * Get all projects an employee has access to
3221
+ */
3222
+ async getProjectsAsEmployeeRaw(requestParameters: GetProjectsAsEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedEmployeeProjects>> {
3223
+ const requestOptions = await this.getProjectsAsEmployeeRequestOpts(requestParameters);
3224
+ const response = await this.request(requestOptions, initOverrides);
3225
+
3226
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEmployeeProjectsFromJSON(jsonValue));
3227
+ }
3228
+
3229
+ /**
3230
+ * Get all projects an employee has access to
3231
+ * Get all projects an employee has access to
3232
+ */
3233
+ async getProjectsAsEmployee(requestParameters: GetProjectsAsEmployeeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedEmployeeProjects> {
3234
+ const response = await this.getProjectsAsEmployeeRaw(requestParameters, initOverrides);
3235
+ return await response.value();
3236
+ }
3237
+
3238
+ /**
3239
+ * Creates request options for getTeam without sending the request
3240
+ */
3241
+ async getTeamRequestOpts(requestParameters: GetTeamRequest): Promise<runtime.RequestOpts> {
3242
+ if (requestParameters['projectId'] == null) {
3243
+ throw new runtime.RequiredError(
3244
+ 'projectId',
3245
+ 'Required parameter "projectId" was null or undefined when calling getTeam().'
3246
+ );
3247
+ }
3248
+
3249
+ const queryParameters: any = {};
3250
+
3251
+ if (requestParameters['page'] != null) {
3252
+ queryParameters['page'] = requestParameters['page'];
3253
+ }
3254
+
3255
+ if (requestParameters['pageSize'] != null) {
3256
+ queryParameters['pageSize'] = requestParameters['pageSize'];
3257
+ }
3258
+
3259
+ if (requestParameters['search'] != null) {
3260
+ queryParameters['search'] = requestParameters['search'];
3261
+ }
3262
+
3263
+ const headerParameters: runtime.HTTPHeaders = {};
3264
+
3265
+ if (this.configuration && this.configuration.apiKey) {
3266
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3267
+ }
3268
+
3269
+
3270
+ let urlPath = `/projects/{projectId}/team`;
3271
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3272
+
3273
+ return {
3274
+ path: urlPath,
3275
+ method: 'GET',
3276
+ headers: headerParameters,
3277
+ query: queryParameters,
3278
+ };
3279
+ }
3280
+
3281
+ /**
3282
+ * Get all users in a project
3283
+ * Get all users in a project
3284
+ */
3285
+ async getTeamRaw(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUsers>> {
3286
+ const requestOptions = await this.getTeamRequestOpts(requestParameters);
3287
+ const response = await this.request(requestOptions, initOverrides);
3288
+
3289
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedUsersFromJSON(jsonValue));
3290
+ }
3291
+
3292
+ /**
3293
+ * Get all users in a project
3294
+ * Get all users in a project
3295
+ */
3296
+ async getTeam(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUsers> {
3297
+ const response = await this.getTeamRaw(requestParameters, initOverrides);
3298
+ return await response.value();
3299
+ }
3300
+
3301
+ /**
3302
+ * Creates request options for getTimesheet without sending the request
3303
+ */
3304
+ async getTimesheetRequestOpts(requestParameters: GetTimesheetRequest): Promise<runtime.RequestOpts> {
3305
+ if (requestParameters['projectId'] == null) {
3306
+ throw new runtime.RequiredError(
3307
+ 'projectId',
3308
+ 'Required parameter "projectId" was null or undefined when calling getTimesheet().'
3309
+ );
3310
+ }
3311
+
3312
+ if (requestParameters['timesheetId'] == null) {
3313
+ throw new runtime.RequiredError(
3314
+ 'timesheetId',
3315
+ 'Required parameter "timesheetId" was null or undefined when calling getTimesheet().'
3316
+ );
3317
+ }
3318
+
3319
+ const queryParameters: any = {};
3320
+
3321
+ const headerParameters: runtime.HTTPHeaders = {};
3322
+
3323
+ if (this.configuration && this.configuration.apiKey) {
3324
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3325
+ }
3326
+
3327
+
3328
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}`;
3329
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3330
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3331
+
3332
+ return {
3333
+ path: urlPath,
3334
+ method: 'GET',
3335
+ headers: headerParameters,
3336
+ query: queryParameters,
3337
+ };
3338
+ }
3339
+
3340
+ /**
3341
+ * Get a timesheet
3342
+ * Get a timesheet
3343
+ */
3344
+ async getTimesheetRaw(requestParameters: GetTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimesheetDTO>> {
3345
+ const requestOptions = await this.getTimesheetRequestOpts(requestParameters);
3346
+ const response = await this.request(requestOptions, initOverrides);
3347
+
3348
+ return new runtime.JSONApiResponse(response, (jsonValue) => TimesheetDTOFromJSON(jsonValue));
3349
+ }
3350
+
3351
+ /**
3352
+ * Get a timesheet
3353
+ * Get a timesheet
3354
+ */
3355
+ async getTimesheet(requestParameters: GetTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimesheetDTO> {
3356
+ const response = await this.getTimesheetRaw(requestParameters, initOverrides);
3357
+ return await response.value();
3358
+ }
3359
+
3360
+ /**
3361
+ * Creates request options for getTimesheets without sending the request
3362
+ */
3363
+ async getTimesheetsRequestOpts(requestParameters: GetTimesheetsRequest): Promise<runtime.RequestOpts> {
3364
+ if (requestParameters['projectId'] == null) {
3365
+ throw new runtime.RequiredError(
3366
+ 'projectId',
3367
+ 'Required parameter "projectId" was null or undefined when calling getTimesheets().'
3368
+ );
3369
+ }
3370
+
3371
+ const queryParameters: any = {};
3372
+
3373
+ if (requestParameters['page'] != null) {
3374
+ queryParameters['page'] = requestParameters['page'];
3375
+ }
3376
+
3377
+ if (requestParameters['pageSize'] != null) {
3378
+ queryParameters['pageSize'] = requestParameters['pageSize'];
3379
+ }
3380
+
3381
+ if (requestParameters['search'] != null) {
3382
+ queryParameters['search'] = requestParameters['search'];
3383
+ }
3384
+
3385
+ const headerParameters: runtime.HTTPHeaders = {};
3386
+
3387
+ if (this.configuration && this.configuration.apiKey) {
3388
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3389
+ }
3390
+
3391
+
3392
+ let urlPath = `/projects/{projectId}/timesheets`;
3393
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3394
+
3395
+ return {
3396
+ path: urlPath,
3397
+ method: 'GET',
3398
+ headers: headerParameters,
3399
+ query: queryParameters,
3400
+ };
3401
+ }
3402
+
3403
+ /**
3404
+ * Get all timesheets in a project without timesheet entries.
3405
+ * Get all timesheets in a project without timesheet entries.
3406
+ */
3407
+ async getTimesheetsRaw(requestParameters: GetTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTimesheets>> {
3408
+ const requestOptions = await this.getTimesheetsRequestOpts(requestParameters);
3409
+ const response = await this.request(requestOptions, initOverrides);
3410
+
3411
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTimesheetsFromJSON(jsonValue));
3412
+ }
3413
+
3414
+ /**
3415
+ * Get all timesheets in a project without timesheet entries.
3416
+ * Get all timesheets in a project without timesheet entries.
3417
+ */
3418
+ async getTimesheets(requestParameters: GetTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTimesheets> {
3419
+ const response = await this.getTimesheetsRaw(requestParameters, initOverrides);
3420
+ return await response.value();
3421
+ }
3422
+
3423
+ /**
3424
+ * Creates request options for inviteEmployee without sending the request
3425
+ */
3426
+ async inviteEmployeeRequestOpts(requestParameters: InviteEmployeeRequest): Promise<runtime.RequestOpts> {
3427
+ if (requestParameters['employeeDTO'] == null) {
3428
+ throw new runtime.RequiredError(
3429
+ 'employeeDTO',
3430
+ 'Required parameter "employeeDTO" was null or undefined when calling inviteEmployee().'
3431
+ );
3432
+ }
3433
+
3434
+ const queryParameters: any = {};
3435
+
3436
+ const headerParameters: runtime.HTTPHeaders = {};
3437
+
3438
+ headerParameters['Content-Type'] = 'application/json';
3439
+
3440
+ if (this.configuration && this.configuration.apiKey) {
3441
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3442
+ }
3443
+
3444
+
3445
+ let urlPath = `/employees/invite`;
3446
+
3447
+ return {
3448
+ path: urlPath,
3449
+ method: 'POST',
3450
+ headers: headerParameters,
3451
+ query: queryParameters,
3452
+ body: EmployeeDTOToJSON(requestParameters['employeeDTO']),
3453
+ };
3454
+ }
3455
+
3456
+ /**
3457
+ * Invite an employee to a company
3458
+ * Invite an employee to a company
3459
+ */
3460
+ async inviteEmployeeRaw(requestParameters: InviteEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmployeeDTO>> {
3461
+ const requestOptions = await this.inviteEmployeeRequestOpts(requestParameters);
3462
+ const response = await this.request(requestOptions, initOverrides);
3463
+
3464
+ return new runtime.JSONApiResponse(response, (jsonValue) => EmployeeDTOFromJSON(jsonValue));
3465
+ }
3466
+
3467
+ /**
3468
+ * Invite an employee to a company
3469
+ * Invite an employee to a company
3470
+ */
3471
+ async inviteEmployee(requestParameters: InviteEmployeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmployeeDTO> {
3472
+ const response = await this.inviteEmployeeRaw(requestParameters, initOverrides);
3473
+ return await response.value();
3474
+ }
3475
+
3476
+ /**
3477
+ * Creates request options for markEmployeeInvoiceAsPaid without sending the request
3478
+ */
3479
+ async markEmployeeInvoiceAsPaidRequestOpts(requestParameters: MarkEmployeeInvoiceAsPaidRequest): Promise<runtime.RequestOpts> {
3480
+ if (requestParameters['userId'] == null) {
3481
+ throw new runtime.RequiredError(
3482
+ 'userId',
3483
+ 'Required parameter "userId" was null or undefined when calling markEmployeeInvoiceAsPaid().'
3484
+ );
3485
+ }
3486
+
3487
+ if (requestParameters['employeeInvoiceId'] == null) {
3488
+ throw new runtime.RequiredError(
3489
+ 'employeeInvoiceId',
3490
+ 'Required parameter "employeeInvoiceId" was null or undefined when calling markEmployeeInvoiceAsPaid().'
3491
+ );
3492
+ }
3493
+
3494
+ if (requestParameters['markEmployeeInvoicePaidDTO'] == null) {
3495
+ throw new runtime.RequiredError(
3496
+ 'markEmployeeInvoicePaidDTO',
3497
+ 'Required parameter "markEmployeeInvoicePaidDTO" was null or undefined when calling markEmployeeInvoiceAsPaid().'
3498
+ );
3499
+ }
3500
+
3501
+ const queryParameters: any = {};
3502
+
3503
+ const headerParameters: runtime.HTTPHeaders = {};
3504
+
3505
+ headerParameters['Content-Type'] = 'application/json';
3506
+
3507
+ if (this.configuration && this.configuration.apiKey) {
3508
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3509
+ }
3510
+
3511
+
3512
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}/mark-paid`;
3513
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
3514
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
3515
+
3516
+ return {
3517
+ path: urlPath,
3518
+ method: 'POST',
3519
+ headers: headerParameters,
3520
+ query: queryParameters,
3521
+ body: MarkEmployeeInvoicePaidDTOToJSON(requestParameters['markEmployeeInvoicePaidDTO']),
3522
+ };
3523
+ }
3524
+
3525
+ /**
3526
+ * Mark an employee invoice as paid
3527
+ * Mark an employee invoice as paid
3528
+ */
3529
+ async markEmployeeInvoiceAsPaidRaw(requestParameters: MarkEmployeeInvoiceAsPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3530
+ const requestOptions = await this.markEmployeeInvoiceAsPaidRequestOpts(requestParameters);
3531
+ const response = await this.request(requestOptions, initOverrides);
3532
+
3533
+ return new runtime.VoidApiResponse(response);
3534
+ }
3535
+
3536
+ /**
3537
+ * Mark an employee invoice as paid
3538
+ * Mark an employee invoice as paid
3539
+ */
3540
+ async markEmployeeInvoiceAsPaid(requestParameters: MarkEmployeeInvoiceAsPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3541
+ await this.markEmployeeInvoiceAsPaidRaw(requestParameters, initOverrides);
3542
+ }
3543
+
3544
+ /**
3545
+ * Creates request options for markInvoiceAsPaid without sending the request
3546
+ */
3547
+ async markInvoiceAsPaidRequestOpts(requestParameters: MarkInvoiceAsPaidRequest): Promise<runtime.RequestOpts> {
3548
+ if (requestParameters['clientId'] == null) {
3549
+ throw new runtime.RequiredError(
3550
+ 'clientId',
3551
+ 'Required parameter "clientId" was null or undefined when calling markInvoiceAsPaid().'
3552
+ );
3553
+ }
3554
+
3555
+ if (requestParameters['invoiceId'] == null) {
3556
+ throw new runtime.RequiredError(
3557
+ 'invoiceId',
3558
+ 'Required parameter "invoiceId" was null or undefined when calling markInvoiceAsPaid().'
3559
+ );
3560
+ }
3561
+
3562
+ if (requestParameters['markInvoicePaidDTO'] == null) {
3563
+ throw new runtime.RequiredError(
3564
+ 'markInvoicePaidDTO',
3565
+ 'Required parameter "markInvoicePaidDTO" was null or undefined when calling markInvoiceAsPaid().'
3566
+ );
3567
+ }
3568
+
3569
+ const queryParameters: any = {};
3570
+
3571
+ const headerParameters: runtime.HTTPHeaders = {};
3572
+
3573
+ headerParameters['Content-Type'] = 'application/json';
3574
+
3575
+ if (this.configuration && this.configuration.apiKey) {
3576
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3577
+ }
3578
+
3579
+
3580
+ let urlPath = `/clients/{clientId}/invoices/{invoiceId}/mark-paid`;
3581
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
3582
+ urlPath = urlPath.replace('{invoiceId}', encodeURIComponent(String(requestParameters['invoiceId'])));
3583
+
3584
+ return {
3585
+ path: urlPath,
3586
+ method: 'POST',
3587
+ headers: headerParameters,
3588
+ query: queryParameters,
3589
+ body: MarkInvoicePaidDTOToJSON(requestParameters['markInvoicePaidDTO']),
3590
+ };
3591
+ }
3592
+
3593
+ /**
3594
+ * Mark a client invoice as paid
3595
+ * Mark a client invoice as paid with the specified date and time
3596
+ */
3597
+ async markInvoiceAsPaidRaw(requestParameters: MarkInvoiceAsPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3598
+ const requestOptions = await this.markInvoiceAsPaidRequestOpts(requestParameters);
3599
+ const response = await this.request(requestOptions, initOverrides);
3600
+
3601
+ return new runtime.VoidApiResponse(response);
3602
+ }
3603
+
3604
+ /**
3605
+ * Mark a client invoice as paid
3606
+ * Mark a client invoice as paid with the specified date and time
3607
+ */
3608
+ async markInvoiceAsPaid(requestParameters: MarkInvoiceAsPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3609
+ await this.markInvoiceAsPaidRaw(requestParameters, initOverrides);
3610
+ }
3611
+
3612
+ /**
3613
+ * Creates request options for openSentTimesheet without sending the request
3614
+ */
3615
+ async openSentTimesheetRequestOpts(requestParameters: OpenSentTimesheetRequest): Promise<runtime.RequestOpts> {
3616
+ if (requestParameters['projectId'] == null) {
3617
+ throw new runtime.RequiredError(
3618
+ 'projectId',
3619
+ 'Required parameter "projectId" was null or undefined when calling openSentTimesheet().'
3620
+ );
3621
+ }
3622
+
3623
+ if (requestParameters['timesheetId'] == null) {
3624
+ throw new runtime.RequiredError(
3625
+ 'timesheetId',
3626
+ 'Required parameter "timesheetId" was null or undefined when calling openSentTimesheet().'
3627
+ );
3628
+ }
3629
+
3630
+ const queryParameters: any = {};
3631
+
3632
+ const headerParameters: runtime.HTTPHeaders = {};
3633
+
3634
+ if (this.configuration && this.configuration.apiKey) {
3635
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3636
+ }
3637
+
3638
+
3639
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/open`;
3640
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3641
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3642
+
3643
+ return {
3644
+ path: urlPath,
3645
+ method: 'PATCH',
3646
+ headers: headerParameters,
3647
+ query: queryParameters,
3648
+ };
3649
+ }
3650
+
3651
+ /**
3652
+ * Open a sent timesheet
3653
+ * Open a sent timesheet
3654
+ */
3655
+ async openSentTimesheetRaw(requestParameters: OpenSentTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3656
+ const requestOptions = await this.openSentTimesheetRequestOpts(requestParameters);
3657
+ const response = await this.request(requestOptions, initOverrides);
3658
+
3659
+ return new runtime.VoidApiResponse(response);
3660
+ }
3661
+
3662
+ /**
3663
+ * Open a sent timesheet
3664
+ * Open a sent timesheet
3665
+ */
3666
+ async openSentTimesheet(requestParameters: OpenSentTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3667
+ await this.openSentTimesheetRaw(requestParameters, initOverrides);
3668
+ }
3669
+
3670
+ /**
3671
+ * Creates request options for removeJiraAccount without sending the request
3672
+ */
3673
+ async removeJiraAccountRequestOpts(requestParameters: RemoveJiraAccountRequest): Promise<runtime.RequestOpts> {
3674
+ if (requestParameters['jiraAccountId'] == null) {
3675
+ throw new runtime.RequiredError(
3676
+ 'jiraAccountId',
3677
+ 'Required parameter "jiraAccountId" was null or undefined when calling removeJiraAccount().'
3678
+ );
3679
+ }
3680
+
3681
+ const queryParameters: any = {};
3682
+
3683
+ const headerParameters: runtime.HTTPHeaders = {};
3684
+
3685
+ if (this.configuration && this.configuration.apiKey) {
3686
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3687
+ }
3688
+
3689
+
3690
+ let urlPath = `/jira-users/jira-accounts/{jiraAccountId}`;
3691
+ urlPath = urlPath.replace('{jiraAccountId}', encodeURIComponent(String(requestParameters['jiraAccountId'])));
3692
+
3693
+ return {
3694
+ path: urlPath,
3695
+ method: 'DELETE',
3696
+ headers: headerParameters,
3697
+ query: queryParameters,
3698
+ };
3699
+ }
3700
+
3701
+ /**
3702
+ * Remove specific jira account for the current user
3703
+ * Remove jira account
3704
+ */
3705
+ async removeJiraAccountRaw(requestParameters: RemoveJiraAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3706
+ const requestOptions = await this.removeJiraAccountRequestOpts(requestParameters);
3707
+ const response = await this.request(requestOptions, initOverrides);
3708
+
3709
+ return new runtime.VoidApiResponse(response);
3710
+ }
3711
+
3712
+ /**
3713
+ * Remove specific jira account for the current user
3714
+ * Remove jira account
3715
+ */
3716
+ async removeJiraAccount(requestParameters: RemoveJiraAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3717
+ await this.removeJiraAccountRaw(requestParameters, initOverrides);
3718
+ }
3719
+
3720
+ /**
3721
+ * Creates request options for sendTimesheet without sending the request
3722
+ */
3723
+ async sendTimesheetRequestOpts(requestParameters: SendTimesheetRequest): Promise<runtime.RequestOpts> {
3724
+ if (requestParameters['projectId'] == null) {
3725
+ throw new runtime.RequiredError(
3726
+ 'projectId',
3727
+ 'Required parameter "projectId" was null or undefined when calling sendTimesheet().'
3728
+ );
3729
+ }
3730
+
3731
+ if (requestParameters['timesheetId'] == null) {
3732
+ throw new runtime.RequiredError(
3733
+ 'timesheetId',
3734
+ 'Required parameter "timesheetId" was null or undefined when calling sendTimesheet().'
3735
+ );
3736
+ }
3737
+
3738
+ const queryParameters: any = {};
3739
+
3740
+ const headerParameters: runtime.HTTPHeaders = {};
3741
+
3742
+ if (this.configuration && this.configuration.apiKey) {
3743
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3744
+ }
3745
+
3746
+
3747
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/send`;
3748
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3749
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3750
+
3751
+ return {
3752
+ path: urlPath,
3753
+ method: 'PATCH',
3754
+ headers: headerParameters,
3755
+ query: queryParameters,
3756
+ };
3757
+ }
3758
+
3759
+ /**
3760
+ * Send a timesheet
3761
+ * Send a timesheet
3762
+ */
3763
+ async sendTimesheetRaw(requestParameters: SendTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3764
+ const requestOptions = await this.sendTimesheetRequestOpts(requestParameters);
3765
+ const response = await this.request(requestOptions, initOverrides);
3766
+
3767
+ return new runtime.VoidApiResponse(response);
3768
+ }
3769
+
3770
+ /**
3771
+ * Send a timesheet
3772
+ * Send a timesheet
3773
+ */
3774
+ async sendTimesheet(requestParameters: SendTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3775
+ await this.sendTimesheetRaw(requestParameters, initOverrides);
3776
+ }
3777
+
3778
+ /**
3779
+ * Creates request options for updateAdjustedEntry without sending the request
3780
+ */
3781
+ async updateAdjustedEntryRequestOpts(requestParameters: UpdateAdjustedEntryRequest): Promise<runtime.RequestOpts> {
3782
+ if (requestParameters['projectId'] == null) {
3783
+ throw new runtime.RequiredError(
3784
+ 'projectId',
3785
+ 'Required parameter "projectId" was null or undefined when calling updateAdjustedEntry().'
3786
+ );
3787
+ }
3788
+
3789
+ if (requestParameters['timesheetId'] == null) {
3790
+ throw new runtime.RequiredError(
3791
+ 'timesheetId',
3792
+ 'Required parameter "timesheetId" was null or undefined when calling updateAdjustedEntry().'
3793
+ );
3794
+ }
3795
+
3796
+ if (requestParameters['entryId'] == null) {
3797
+ throw new runtime.RequiredError(
3798
+ 'entryId',
3799
+ 'Required parameter "entryId" was null or undefined when calling updateAdjustedEntry().'
3800
+ );
3801
+ }
3802
+
3803
+ if (requestParameters['adjustedTimesheetUpdateEntryDTO'] == null) {
3804
+ throw new runtime.RequiredError(
3805
+ 'adjustedTimesheetUpdateEntryDTO',
3806
+ 'Required parameter "adjustedTimesheetUpdateEntryDTO" was null or undefined when calling updateAdjustedEntry().'
3807
+ );
3808
+ }
3809
+
3810
+ const queryParameters: any = {};
3811
+
3812
+ const headerParameters: runtime.HTTPHeaders = {};
3813
+
3814
+ headerParameters['Content-Type'] = 'application/json';
3815
+
3816
+ if (this.configuration && this.configuration.apiKey) {
3817
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3818
+ }
3819
+
3820
+
3821
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/entries/{entryId}`;
3822
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
3823
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
3824
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
3825
+
3826
+ return {
3827
+ path: urlPath,
3828
+ method: 'PATCH',
3829
+ headers: headerParameters,
3830
+ query: queryParameters,
3831
+ body: AdjustedTimesheetUpdateEntryDTOToJSON(requestParameters['adjustedTimesheetUpdateEntryDTO']),
3832
+ };
3833
+ }
3834
+
3835
+ /**
3836
+ * Update an adjusted timesheet entry
3837
+ * Update an adjusted timesheet entry
3838
+ */
3839
+ async updateAdjustedEntryRaw(requestParameters: UpdateAdjustedEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdjustedTimesheetEntryDTO>> {
3840
+ const requestOptions = await this.updateAdjustedEntryRequestOpts(requestParameters);
3841
+ const response = await this.request(requestOptions, initOverrides);
3842
+
3843
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdjustedTimesheetEntryDTOFromJSON(jsonValue));
3844
+ }
3845
+
3846
+ /**
3847
+ * Update an adjusted timesheet entry
3848
+ * Update an adjusted timesheet entry
3849
+ */
3850
+ async updateAdjustedEntry(requestParameters: UpdateAdjustedEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdjustedTimesheetEntryDTO> {
3851
+ const response = await this.updateAdjustedEntryRaw(requestParameters, initOverrides);
3852
+ return await response.value();
3853
+ }
3854
+
3855
+ /**
3856
+ * Creates request options for updateClient without sending the request
3857
+ */
3858
+ async updateClientRequestOpts(requestParameters: UpdateClientRequest): Promise<runtime.RequestOpts> {
3859
+ if (requestParameters['clientId'] == null) {
3860
+ throw new runtime.RequiredError(
3861
+ 'clientId',
3862
+ 'Required parameter "clientId" was null or undefined when calling updateClient().'
3863
+ );
3864
+ }
3865
+
3866
+ if (requestParameters['clientDTO'] == null) {
3867
+ throw new runtime.RequiredError(
3868
+ 'clientDTO',
3869
+ 'Required parameter "clientDTO" was null or undefined when calling updateClient().'
3870
+ );
3871
+ }
3872
+
3873
+ const queryParameters: any = {};
3874
+
3875
+ const headerParameters: runtime.HTTPHeaders = {};
3876
+
3877
+ headerParameters['Content-Type'] = 'application/json';
3878
+
3879
+ if (this.configuration && this.configuration.apiKey) {
3880
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3881
+ }
3882
+
3883
+
3884
+ let urlPath = `/clients/{clientId}`;
3885
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
3886
+
3887
+ return {
3888
+ path: urlPath,
3889
+ method: 'PATCH',
3890
+ headers: headerParameters,
3891
+ query: queryParameters,
3892
+ body: ClientDTOToJSON(requestParameters['clientDTO']),
3893
+ };
3894
+ }
3895
+
3896
+ /**
3897
+ * Update client
3898
+ */
3899
+ async updateClientRaw(requestParameters: UpdateClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClientDTO>> {
3900
+ const requestOptions = await this.updateClientRequestOpts(requestParameters);
3901
+ const response = await this.request(requestOptions, initOverrides);
3902
+
3903
+ return new runtime.JSONApiResponse(response, (jsonValue) => ClientDTOFromJSON(jsonValue));
3904
+ }
3905
+
3906
+ /**
3907
+ * Update client
3908
+ */
3909
+ async updateClient(requestParameters: UpdateClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClientDTO> {
3910
+ const response = await this.updateClientRaw(requestParameters, initOverrides);
3911
+ return await response.value();
3912
+ }
3913
+
3914
+ /**
3915
+ * Creates request options for updateCompany without sending the request
3916
+ */
3917
+ async updateCompanyRequestOpts(requestParameters: UpdateCompanyRequest): Promise<runtime.RequestOpts> {
3918
+ if (requestParameters['companyId'] == null) {
3919
+ throw new runtime.RequiredError(
3920
+ 'companyId',
3921
+ 'Required parameter "companyId" was null or undefined when calling updateCompany().'
3922
+ );
3923
+ }
3924
+
3925
+ if (requestParameters['companyDTO'] == null) {
3926
+ throw new runtime.RequiredError(
3927
+ 'companyDTO',
3928
+ 'Required parameter "companyDTO" was null or undefined when calling updateCompany().'
3929
+ );
3930
+ }
3931
+
3932
+ const queryParameters: any = {};
3933
+
3934
+ const headerParameters: runtime.HTTPHeaders = {};
3935
+
3936
+ headerParameters['Content-Type'] = 'application/json';
3937
+
3938
+ if (this.configuration && this.configuration.apiKey) {
3939
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
3940
+ }
3941
+
3942
+
3943
+ let urlPath = `/companies/{companyId}`;
3944
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
3945
+
3946
+ return {
3947
+ path: urlPath,
3948
+ method: 'PATCH',
3949
+ headers: headerParameters,
3950
+ query: queryParameters,
3951
+ body: CompanyDTOToJSON(requestParameters['companyDTO']),
3952
+ };
3953
+ }
3954
+
3955
+ /**
3956
+ * Update a company
3957
+ * Update a company by ID
3958
+ */
3959
+ async updateCompanyRaw(requestParameters: UpdateCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompanyDTO>> {
3960
+ const requestOptions = await this.updateCompanyRequestOpts(requestParameters);
3961
+ const response = await this.request(requestOptions, initOverrides);
3962
+
3963
+ return new runtime.JSONApiResponse(response, (jsonValue) => CompanyDTOFromJSON(jsonValue));
3964
+ }
3965
+
3966
+ /**
3967
+ * Update a company
3968
+ * Update a company by ID
3969
+ */
3970
+ async updateCompany(requestParameters: UpdateCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompanyDTO> {
3971
+ const response = await this.updateCompanyRaw(requestParameters, initOverrides);
3972
+ return await response.value();
3973
+ }
3974
+
3975
+ /**
3976
+ * Creates request options for updateEmployeeData without sending the request
3977
+ */
3978
+ async updateEmployeeDataRequestOpts(requestParameters: UpdateEmployeeDataRequest): Promise<runtime.RequestOpts> {
3979
+ if (requestParameters['userId'] == null) {
3980
+ throw new runtime.RequiredError(
3981
+ 'userId',
3982
+ 'Required parameter "userId" was null or undefined when calling updateEmployeeData().'
3983
+ );
3984
+ }
3985
+
3986
+ if (requestParameters['employeeUpdateDTO'] == null) {
3987
+ throw new runtime.RequiredError(
3988
+ 'employeeUpdateDTO',
3989
+ 'Required parameter "employeeUpdateDTO" was null or undefined when calling updateEmployeeData().'
3990
+ );
3991
+ }
3992
+
3993
+ const queryParameters: any = {};
3994
+
3995
+ const headerParameters: runtime.HTTPHeaders = {};
3996
+
3997
+ headerParameters['Content-Type'] = 'application/json';
3998
+
3999
+ if (this.configuration && this.configuration.apiKey) {
4000
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
4001
+ }
4002
+
4003
+
4004
+ let urlPath = `/employees/{userId}`;
4005
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
4006
+
4007
+ return {
4008
+ path: urlPath,
4009
+ method: 'PATCH',
4010
+ headers: headerParameters,
4011
+ query: queryParameters,
4012
+ body: EmployeeUpdateDTOToJSON(requestParameters['employeeUpdateDTO']),
4013
+ };
4014
+ }
4015
+
4016
+ /**
4017
+ * Update an employee
4018
+ * Update an employee
4019
+ */
4020
+ async updateEmployeeDataRaw(requestParameters: UpdateEmployeeDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmployeeDTO>> {
4021
+ const requestOptions = await this.updateEmployeeDataRequestOpts(requestParameters);
4022
+ const response = await this.request(requestOptions, initOverrides);
4023
+
4024
+ return new runtime.JSONApiResponse(response, (jsonValue) => EmployeeDTOFromJSON(jsonValue));
4025
+ }
4026
+
4027
+ /**
4028
+ * Update an employee
4029
+ * Update an employee
4030
+ */
4031
+ async updateEmployeeData(requestParameters: UpdateEmployeeDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmployeeDTO> {
4032
+ const response = await this.updateEmployeeDataRaw(requestParameters, initOverrides);
4033
+ return await response.value();
4034
+ }
4035
+
4036
+ /**
4037
+ * Creates request options for updateGlobalTimesheetEntry without sending the request
4038
+ */
4039
+ async updateGlobalTimesheetEntryRequestOpts(requestParameters: UpdateGlobalTimesheetEntryRequest): Promise<runtime.RequestOpts> {
4040
+ if (requestParameters['projectId'] == null) {
4041
+ throw new runtime.RequiredError(
4042
+ 'projectId',
4043
+ 'Required parameter "projectId" was null or undefined when calling updateGlobalTimesheetEntry().'
4044
+ );
4045
+ }
4046
+
4047
+ if (requestParameters['timesheetId'] == null) {
4048
+ throw new runtime.RequiredError(
4049
+ 'timesheetId',
4050
+ 'Required parameter "timesheetId" was null or undefined when calling updateGlobalTimesheetEntry().'
4051
+ );
4052
+ }
4053
+
4054
+ if (requestParameters['entryId'] == null) {
4055
+ throw new runtime.RequiredError(
4056
+ 'entryId',
4057
+ 'Required parameter "entryId" was null or undefined when calling updateGlobalTimesheetEntry().'
4058
+ );
4059
+ }
4060
+
4061
+ if (requestParameters['globalTimesheetEntryUpdateDTO'] == null) {
4062
+ throw new runtime.RequiredError(
4063
+ 'globalTimesheetEntryUpdateDTO',
4064
+ 'Required parameter "globalTimesheetEntryUpdateDTO" was null or undefined when calling updateGlobalTimesheetEntry().'
4065
+ );
4066
+ }
4067
+
4068
+ const queryParameters: any = {};
4069
+
4070
+ const headerParameters: runtime.HTTPHeaders = {};
4071
+
4072
+ headerParameters['Content-Type'] = 'application/json';
4073
+
4074
+ if (this.configuration && this.configuration.apiKey) {
4075
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
4076
+ }
4077
+
4078
+
4079
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/entries/{entryId}`;
4080
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
4081
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
4082
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
4083
+
4084
+ return {
4085
+ path: urlPath,
4086
+ method: 'PATCH',
4087
+ headers: headerParameters,
4088
+ query: queryParameters,
4089
+ body: GlobalTimesheetEntryUpdateDTOToJSON(requestParameters['globalTimesheetEntryUpdateDTO']),
4090
+ };
4091
+ }
4092
+
4093
+ /**
4094
+ * Update a global timesheet entry
4095
+ * Update a global timesheet entry
4096
+ */
4097
+ async updateGlobalTimesheetEntryRaw(requestParameters: UpdateGlobalTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GlobalTimesheetEntryDTO>> {
4098
+ const requestOptions = await this.updateGlobalTimesheetEntryRequestOpts(requestParameters);
4099
+ const response = await this.request(requestOptions, initOverrides);
4100
+
4101
+ return new runtime.JSONApiResponse(response, (jsonValue) => GlobalTimesheetEntryDTOFromJSON(jsonValue));
4102
+ }
4103
+
4104
+ /**
4105
+ * Update a global timesheet entry
4106
+ * Update a global timesheet entry
4107
+ */
4108
+ async updateGlobalTimesheetEntry(requestParameters: UpdateGlobalTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GlobalTimesheetEntryDTO> {
4109
+ const response = await this.updateGlobalTimesheetEntryRaw(requestParameters, initOverrides);
4110
+ return await response.value();
4111
+ }
4112
+
4113
+ /**
4114
+ * Creates request options for updateProject without sending the request
4115
+ */
4116
+ async updateProjectRequestOpts(requestParameters: UpdateProjectRequest): Promise<runtime.RequestOpts> {
4117
+ if (requestParameters['projectId'] == null) {
4118
+ throw new runtime.RequiredError(
4119
+ 'projectId',
4120
+ 'Required parameter "projectId" was null or undefined when calling updateProject().'
4121
+ );
4122
+ }
4123
+
4124
+ if (requestParameters['projectUpdateDTO'] == null) {
4125
+ throw new runtime.RequiredError(
4126
+ 'projectUpdateDTO',
4127
+ 'Required parameter "projectUpdateDTO" was null or undefined when calling updateProject().'
4128
+ );
4129
+ }
4130
+
4131
+ const queryParameters: any = {};
4132
+
4133
+ const headerParameters: runtime.HTTPHeaders = {};
4134
+
4135
+ headerParameters['Content-Type'] = 'application/json';
4136
+
4137
+ if (this.configuration && this.configuration.apiKey) {
4138
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
4139
+ }
4140
+
4141
+
4142
+ let urlPath = `/projects/{projectId}`;
4143
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
4144
+
4145
+ return {
4146
+ path: urlPath,
4147
+ method: 'PATCH',
4148
+ headers: headerParameters,
4149
+ query: queryParameters,
4150
+ body: ProjectUpdateDTOToJSON(requestParameters['projectUpdateDTO']),
4151
+ };
4152
+ }
4153
+
4154
+ /**
4155
+ * Update a project
4156
+ * Update a project by ID
4157
+ */
4158
+ async updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectDTO>> {
4159
+ const requestOptions = await this.updateProjectRequestOpts(requestParameters);
4160
+ const response = await this.request(requestOptions, initOverrides);
4161
+
4162
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProjectDTOFromJSON(jsonValue));
4163
+ }
4164
+
4165
+ /**
4166
+ * Update a project
4167
+ * Update a project by ID
4168
+ */
4169
+ async updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectDTO> {
4170
+ const response = await this.updateProjectRaw(requestParameters, initOverrides);
4171
+ return await response.value();
4172
+ }
4173
+
4174
+ /**
4175
+ * Creates request options for updateTeam without sending the request
4176
+ */
4177
+ async updateTeamRequestOpts(requestParameters: UpdateTeamRequest): Promise<runtime.RequestOpts> {
4178
+ if (requestParameters['projectId'] == null) {
4179
+ throw new runtime.RequiredError(
4180
+ 'projectId',
4181
+ 'Required parameter "projectId" was null or undefined when calling updateTeam().'
4182
+ );
4183
+ }
4184
+
4185
+ if (requestParameters['teamUpdateDTO'] == null) {
4186
+ throw new runtime.RequiredError(
4187
+ 'teamUpdateDTO',
4188
+ 'Required parameter "teamUpdateDTO" was null or undefined when calling updateTeam().'
4189
+ );
4190
+ }
4191
+
4192
+ const queryParameters: any = {};
4193
+
4194
+ const headerParameters: runtime.HTTPHeaders = {};
4195
+
4196
+ headerParameters['Content-Type'] = 'application/json';
4197
+
4198
+ if (this.configuration && this.configuration.apiKey) {
4199
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
4200
+ }
4201
+
4202
+
4203
+ let urlPath = `/projects/{projectId}/team`;
4204
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
4205
+
4206
+ return {
4207
+ path: urlPath,
4208
+ method: 'PATCH',
4209
+ headers: headerParameters,
4210
+ query: queryParameters,
4211
+ body: TeamUpdateDTOToJSON(requestParameters['teamUpdateDTO']),
4212
+ };
4213
+ }
4214
+
4215
+ /**
4216
+ * Update a project team
4217
+ * Update a project team
4218
+ */
4219
+ async updateTeamRaw(requestParameters: UpdateTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
4220
+ const requestOptions = await this.updateTeamRequestOpts(requestParameters);
4221
+ const response = await this.request(requestOptions, initOverrides);
4222
+
4223
+ return new runtime.VoidApiResponse(response);
4224
+ }
4225
+
4226
+ /**
4227
+ * Update a project team
4228
+ * Update a project team
4229
+ */
4230
+ async updateTeam(requestParameters: UpdateTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
4231
+ await this.updateTeamRaw(requestParameters, initOverrides);
4232
+ }
4233
+
4234
+ /**
4235
+ * Creates request options for updateTimesheetEntry without sending the request
4236
+ */
4237
+ async updateTimesheetEntryRequestOpts(requestParameters: UpdateTimesheetEntryRequest): Promise<runtime.RequestOpts> {
4238
+ if (requestParameters['projectId'] == null) {
4239
+ throw new runtime.RequiredError(
4240
+ 'projectId',
4241
+ 'Required parameter "projectId" was null or undefined when calling updateTimesheetEntry().'
4242
+ );
4243
+ }
4244
+
4245
+ if (requestParameters['timesheetId'] == null) {
4246
+ throw new runtime.RequiredError(
4247
+ 'timesheetId',
4248
+ 'Required parameter "timesheetId" was null or undefined when calling updateTimesheetEntry().'
4249
+ );
4250
+ }
4251
+
4252
+ if (requestParameters['entryId'] == null) {
4253
+ throw new runtime.RequiredError(
4254
+ 'entryId',
4255
+ 'Required parameter "entryId" was null or undefined when calling updateTimesheetEntry().'
4256
+ );
4257
+ }
4258
+
4259
+ if (requestParameters['timesheetEntryUpdateDTO'] == null) {
4260
+ throw new runtime.RequiredError(
4261
+ 'timesheetEntryUpdateDTO',
4262
+ 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling updateTimesheetEntry().'
4263
+ );
4264
+ }
4265
+
4266
+ const queryParameters: any = {};
4267
+
4268
+ const headerParameters: runtime.HTTPHeaders = {};
4269
+
4270
+ headerParameters['Content-Type'] = 'application/json';
4271
+
4272
+ if (this.configuration && this.configuration.apiKey) {
4273
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
4274
+ }
4275
+
4276
+
4277
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/entries/{entryId}`;
4278
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
4279
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
4280
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
4281
+
4282
+ return {
4283
+ path: urlPath,
4284
+ method: 'PATCH',
4285
+ headers: headerParameters,
4286
+ query: queryParameters,
4287
+ body: TimesheetEntryUpdateDTOToJSON(requestParameters['timesheetEntryUpdateDTO']),
4288
+ };
4289
+ }
4290
+
4291
+ /**
4292
+ * Update a timesheet entry
4293
+ * Update a timesheet entry
4294
+ */
4295
+ async updateTimesheetEntryRaw(requestParameters: UpdateTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
4296
+ const requestOptions = await this.updateTimesheetEntryRequestOpts(requestParameters);
4297
+ const response = await this.request(requestOptions, initOverrides);
4298
+
4299
+ return new runtime.VoidApiResponse(response);
4300
+ }
4301
+
4302
+ /**
4303
+ * Update a timesheet entry
4304
+ * Update a timesheet entry
4305
+ */
4306
+ async updateTimesheetEntry(requestParameters: UpdateTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
4307
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
4308
+ }
4309
+
4310
+ }
4311
+
4312
+ /**
4313
+ * @export
4314
+ */
4315
+ export const GetCommitsByUserIDGroupByEnum = {
4316
+ HourOfDay: 'hourOfDay',
4317
+ Year: 'year',
4318
+ Month: 'month',
4319
+ Day: 'day'
4320
+ } as const;
4321
+ export type GetCommitsByUserIDGroupByEnum = typeof GetCommitsByUserIDGroupByEnum[keyof typeof GetCommitsByUserIDGroupByEnum];
4322
+ /**
4323
+ * @export
4324
+ */
4325
+ export const GetMyCommitsGroupByEnum = {
4326
+ HourOfDay: 'hourOfDay',
4327
+ Year: 'year',
4328
+ Month: 'month',
4329
+ Day: 'day'
4330
+ } as const;
4331
+ export type GetMyCommitsGroupByEnum = typeof GetMyCommitsGroupByEnum[keyof typeof GetMyCommitsGroupByEnum];