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,2854 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Tuix Project Service
6
+ * Service to manage Tuix projects
7
+ *
8
+ * The version of the OpenAPI document: 0.0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.GetMyCommitsGroupByEnum = exports.GetCommitsByUserIDGroupByEnum = exports.ClientApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const AccountInfoDTO_1 = require("../models/AccountInfoDTO");
52
+ const AdjustedTimesheetDTO_1 = require("../models/AdjustedTimesheetDTO");
53
+ const AdjustedTimesheetEntryDTO_1 = require("../models/AdjustedTimesheetEntryDTO");
54
+ const AdjustedTimesheetUpdateEntryDTO_1 = require("../models/AdjustedTimesheetUpdateEntryDTO");
55
+ const ClientDTO_1 = require("../models/ClientDTO");
56
+ const ClientGithubAccountDTO_1 = require("../models/ClientGithubAccountDTO");
57
+ const ClientGithubCommitCountDTO_1 = require("../models/ClientGithubCommitCountDTO");
58
+ const ClientGithubUserDTO_1 = require("../models/ClientGithubUserDTO");
59
+ const ClientJiraAccountDTO_1 = require("../models/ClientJiraAccountDTO");
60
+ const ClientJiraUserDTO_1 = require("../models/ClientJiraUserDTO");
61
+ const CompanyDTO_1 = require("../models/CompanyDTO");
62
+ const CreateEmployeeInvoiceInputDTO_1 = require("../models/CreateEmployeeInvoiceInputDTO");
63
+ const CreateGithubUserRequestDTO_1 = require("../models/CreateGithubUserRequestDTO");
64
+ const CreateJiraAccountDTO_1 = require("../models/CreateJiraAccountDTO");
65
+ const CreateJiraUserRequestDTO_1 = require("../models/CreateJiraUserRequestDTO");
66
+ const EmployeeDTO_1 = require("../models/EmployeeDTO");
67
+ const EmployeeInvoiceDTO_1 = require("../models/EmployeeInvoiceDTO");
68
+ const EmployeeUpdateDTO_1 = require("../models/EmployeeUpdateDTO");
69
+ const GlobalTimesheetDTO_1 = require("../models/GlobalTimesheetDTO");
70
+ const GlobalTimesheetEntryDTO_1 = require("../models/GlobalTimesheetEntryDTO");
71
+ const GlobalTimesheetEntryUpdateDTO_1 = require("../models/GlobalTimesheetEntryUpdateDTO");
72
+ const HolidayCreateDTO_1 = require("../models/HolidayCreateDTO");
73
+ const HolidayDTO_1 = require("../models/HolidayDTO");
74
+ const MarkEmployeeInvoicePaidDTO_1 = require("../models/MarkEmployeeInvoicePaidDTO");
75
+ const MarkInvoicePaidDTO_1 = require("../models/MarkInvoicePaidDTO");
76
+ const PaginatedAdjustedTimesheets_1 = require("../models/PaginatedAdjustedTimesheets");
77
+ const PaginatedClientInvoices_1 = require("../models/PaginatedClientInvoices");
78
+ const PaginatedClients_1 = require("../models/PaginatedClients");
79
+ const PaginatedEmployeeInvoices_1 = require("../models/PaginatedEmployeeInvoices");
80
+ const PaginatedEmployeeProjects_1 = require("../models/PaginatedEmployeeProjects");
81
+ const PaginatedEmployees_1 = require("../models/PaginatedEmployees");
82
+ const PaginatedGlobalTimesheets_1 = require("../models/PaginatedGlobalTimesheets");
83
+ const PaginatedHolidaysDTO_1 = require("../models/PaginatedHolidaysDTO");
84
+ const PaginatedProjects_1 = require("../models/PaginatedProjects");
85
+ const PaginatedTimesheets_1 = require("../models/PaginatedTimesheets");
86
+ const PaginatedUsers_1 = require("../models/PaginatedUsers");
87
+ const ProjectDTO_1 = require("../models/ProjectDTO");
88
+ const ProjectInputDTO_1 = require("../models/ProjectInputDTO");
89
+ const ProjectUpdateDTO_1 = require("../models/ProjectUpdateDTO");
90
+ const TeamUpdateDTO_1 = require("../models/TeamUpdateDTO");
91
+ const TimesheetDTO_1 = require("../models/TimesheetDTO");
92
+ const TimesheetEntryUpdateDTO_1 = require("../models/TimesheetEntryUpdateDTO");
93
+ const UserProjectReport_1 = require("../models/UserProjectReport");
94
+ /**
95
+ *
96
+ */
97
+ class ClientApi extends runtime.BaseAPI {
98
+ /**
99
+ * Creates request options for addJiraAccount without sending the request
100
+ */
101
+ async addJiraAccountRequestOpts(requestParameters) {
102
+ if (requestParameters['createJiraAccountDTO'] == null) {
103
+ throw new runtime.RequiredError('createJiraAccountDTO', 'Required parameter "createJiraAccountDTO" was null or undefined when calling addJiraAccount().');
104
+ }
105
+ const queryParameters = {};
106
+ const headerParameters = {};
107
+ headerParameters['Content-Type'] = 'application/json';
108
+ if (this.configuration && this.configuration.apiKey) {
109
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
110
+ }
111
+ let urlPath = `/jira-users/jira-accounts`;
112
+ return {
113
+ path: urlPath,
114
+ method: 'POST',
115
+ headers: headerParameters,
116
+ query: queryParameters,
117
+ body: (0, CreateJiraAccountDTO_1.CreateJiraAccountDTOToJSON)(requestParameters['createJiraAccountDTO']),
118
+ };
119
+ }
120
+ /**
121
+ * Add a new Jira account for the authenticated user
122
+ * Add Jira account
123
+ */
124
+ async addJiraAccountRaw(requestParameters, initOverrides) {
125
+ const requestOptions = await this.addJiraAccountRequestOpts(requestParameters);
126
+ const response = await this.request(requestOptions, initOverrides);
127
+ return new runtime.JSONApiResponse(response);
128
+ }
129
+ /**
130
+ * Add a new Jira account for the authenticated user
131
+ * Add Jira account
132
+ */
133
+ async addJiraAccount(requestParameters, initOverrides) {
134
+ const response = await this.addJiraAccountRaw(requestParameters, initOverrides);
135
+ return await response.value();
136
+ }
137
+ /**
138
+ * Creates request options for approveAdjustedTimesheet without sending the request
139
+ */
140
+ async approveAdjustedTimesheetRequestOpts(requestParameters) {
141
+ if (requestParameters['projectId'] == null) {
142
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling approveAdjustedTimesheet().');
143
+ }
144
+ if (requestParameters['timesheetId'] == null) {
145
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling approveAdjustedTimesheet().');
146
+ }
147
+ const queryParameters = {};
148
+ const headerParameters = {};
149
+ if (this.configuration && this.configuration.apiKey) {
150
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
151
+ }
152
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/approve`;
153
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
154
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
155
+ return {
156
+ path: urlPath,
157
+ method: 'PATCH',
158
+ headers: headerParameters,
159
+ query: queryParameters,
160
+ };
161
+ }
162
+ /**
163
+ * Approve an adjustedTimesheet in a project
164
+ * Approve an adjustedTimesheet in a project
165
+ */
166
+ async approveAdjustedTimesheetRaw(requestParameters, initOverrides) {
167
+ const requestOptions = await this.approveAdjustedTimesheetRequestOpts(requestParameters);
168
+ const response = await this.request(requestOptions, initOverrides);
169
+ return new runtime.VoidApiResponse(response);
170
+ }
171
+ /**
172
+ * Approve an adjustedTimesheet in a project
173
+ * Approve an adjustedTimesheet in a project
174
+ */
175
+ async approveAdjustedTimesheet(requestParameters, initOverrides) {
176
+ await this.approveAdjustedTimesheetRaw(requestParameters, initOverrides);
177
+ }
178
+ /**
179
+ * Creates request options for approveGlobalTimesheet without sending the request
180
+ */
181
+ async approveGlobalTimesheetRequestOpts(requestParameters) {
182
+ if (requestParameters['projectId'] == null) {
183
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling approveGlobalTimesheet().');
184
+ }
185
+ if (requestParameters['timesheetId'] == null) {
186
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling approveGlobalTimesheet().');
187
+ }
188
+ const queryParameters = {};
189
+ const headerParameters = {};
190
+ if (this.configuration && this.configuration.apiKey) {
191
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
192
+ }
193
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/approve`;
194
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
195
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
196
+ return {
197
+ path: urlPath,
198
+ method: 'PATCH',
199
+ headers: headerParameters,
200
+ query: queryParameters,
201
+ };
202
+ }
203
+ /**
204
+ * Approve a global timesheet
205
+ * Approve a global timesheet
206
+ */
207
+ async approveGlobalTimesheetRaw(requestParameters, initOverrides) {
208
+ const requestOptions = await this.approveGlobalTimesheetRequestOpts(requestParameters);
209
+ const response = await this.request(requestOptions, initOverrides);
210
+ return new runtime.VoidApiResponse(response);
211
+ }
212
+ /**
213
+ * Approve a global timesheet
214
+ * Approve a global timesheet
215
+ */
216
+ async approveGlobalTimesheet(requestParameters, initOverrides) {
217
+ await this.approveGlobalTimesheetRaw(requestParameters, initOverrides);
218
+ }
219
+ /**
220
+ * Creates request options for approveTimesheet without sending the request
221
+ */
222
+ async approveTimesheetRequestOpts(requestParameters) {
223
+ if (requestParameters['projectId'] == null) {
224
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling approveTimesheet().');
225
+ }
226
+ if (requestParameters['timesheetId'] == null) {
227
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling approveTimesheet().');
228
+ }
229
+ const queryParameters = {};
230
+ const headerParameters = {};
231
+ if (this.configuration && this.configuration.apiKey) {
232
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
233
+ }
234
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/approve`;
235
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
236
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
237
+ return {
238
+ path: urlPath,
239
+ method: 'PATCH',
240
+ headers: headerParameters,
241
+ query: queryParameters,
242
+ };
243
+ }
244
+ /**
245
+ * Approve a timesheet
246
+ * Approve a timesheet
247
+ */
248
+ async approveTimesheetRaw(requestParameters, initOverrides) {
249
+ const requestOptions = await this.approveTimesheetRequestOpts(requestParameters);
250
+ const response = await this.request(requestOptions, initOverrides);
251
+ return new runtime.VoidApiResponse(response);
252
+ }
253
+ /**
254
+ * Approve a timesheet
255
+ * Approve a timesheet
256
+ */
257
+ async approveTimesheet(requestParameters, initOverrides) {
258
+ await this.approveTimesheetRaw(requestParameters, initOverrides);
259
+ }
260
+ /**
261
+ * Creates request options for createClient without sending the request
262
+ */
263
+ async createClientRequestOpts(requestParameters) {
264
+ if (requestParameters['clientDTO'] == null) {
265
+ throw new runtime.RequiredError('clientDTO', 'Required parameter "clientDTO" was null or undefined when calling createClient().');
266
+ }
267
+ const queryParameters = {};
268
+ const headerParameters = {};
269
+ headerParameters['Content-Type'] = 'application/json';
270
+ if (this.configuration && this.configuration.apiKey) {
271
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
272
+ }
273
+ let urlPath = `/clients`;
274
+ return {
275
+ path: urlPath,
276
+ method: 'POST',
277
+ headers: headerParameters,
278
+ query: queryParameters,
279
+ body: (0, ClientDTO_1.ClientDTOToJSON)(requestParameters['clientDTO']),
280
+ };
281
+ }
282
+ /**
283
+ * Create client
284
+ */
285
+ async createClientRaw(requestParameters, initOverrides) {
286
+ const requestOptions = await this.createClientRequestOpts(requestParameters);
287
+ const response = await this.request(requestOptions, initOverrides);
288
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientDTO_1.ClientDTOFromJSON)(jsonValue));
289
+ }
290
+ /**
291
+ * Create client
292
+ */
293
+ async createClient(requestParameters, initOverrides) {
294
+ const response = await this.createClientRaw(requestParameters, initOverrides);
295
+ return await response.value();
296
+ }
297
+ /**
298
+ * Creates request options for createCompany without sending the request
299
+ */
300
+ async createCompanyRequestOpts(requestParameters) {
301
+ if (requestParameters['companyDTO'] == null) {
302
+ throw new runtime.RequiredError('companyDTO', 'Required parameter "companyDTO" was null or undefined when calling createCompany().');
303
+ }
304
+ const queryParameters = {};
305
+ const headerParameters = {};
306
+ headerParameters['Content-Type'] = 'application/json';
307
+ if (this.configuration && this.configuration.apiKey) {
308
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
309
+ }
310
+ let urlPath = `/companies`;
311
+ return {
312
+ path: urlPath,
313
+ method: 'POST',
314
+ headers: headerParameters,
315
+ query: queryParameters,
316
+ body: (0, CompanyDTO_1.CompanyDTOToJSON)(requestParameters['companyDTO']),
317
+ };
318
+ }
319
+ /**
320
+ * Create a company
321
+ * Creates a new company
322
+ */
323
+ async createCompanyRaw(requestParameters, initOverrides) {
324
+ const requestOptions = await this.createCompanyRequestOpts(requestParameters);
325
+ const response = await this.request(requestOptions, initOverrides);
326
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CompanyDTO_1.CompanyDTOFromJSON)(jsonValue));
327
+ }
328
+ /**
329
+ * Create a company
330
+ * Creates a new company
331
+ */
332
+ async createCompany(requestParameters, initOverrides) {
333
+ const response = await this.createCompanyRaw(requestParameters, initOverrides);
334
+ return await response.value();
335
+ }
336
+ /**
337
+ * Creates request options for createEmployeeInvoice without sending the request
338
+ */
339
+ async createEmployeeInvoiceRequestOpts(requestParameters) {
340
+ if (requestParameters['userId'] == null) {
341
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createEmployeeInvoice().');
342
+ }
343
+ if (requestParameters['createEmployeeInvoiceInputDTO'] == null) {
344
+ throw new runtime.RequiredError('createEmployeeInvoiceInputDTO', 'Required parameter "createEmployeeInvoiceInputDTO" was null or undefined when calling createEmployeeInvoice().');
345
+ }
346
+ const queryParameters = {};
347
+ const headerParameters = {};
348
+ headerParameters['Content-Type'] = 'application/json';
349
+ if (this.configuration && this.configuration.apiKey) {
350
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
351
+ }
352
+ let urlPath = `/employees/{userId}/invoices`;
353
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
354
+ return {
355
+ path: urlPath,
356
+ method: 'POST',
357
+ headers: headerParameters,
358
+ query: queryParameters,
359
+ body: (0, CreateEmployeeInvoiceInputDTO_1.CreateEmployeeInvoiceInputDTOToJSON)(requestParameters['createEmployeeInvoiceInputDTO']),
360
+ };
361
+ }
362
+ /**
363
+ * Create an employee invoice
364
+ * Create an employee invoice
365
+ */
366
+ async createEmployeeInvoiceRaw(requestParameters, initOverrides) {
367
+ const requestOptions = await this.createEmployeeInvoiceRequestOpts(requestParameters);
368
+ const response = await this.request(requestOptions, initOverrides);
369
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmployeeInvoiceDTO_1.EmployeeInvoiceDTOFromJSON)(jsonValue));
370
+ }
371
+ /**
372
+ * Create an employee invoice
373
+ * Create an employee invoice
374
+ */
375
+ async createEmployeeInvoice(requestParameters, initOverrides) {
376
+ const response = await this.createEmployeeInvoiceRaw(requestParameters, initOverrides);
377
+ return await response.value();
378
+ }
379
+ /**
380
+ * Creates request options for createGithubUser without sending the request
381
+ */
382
+ async createGithubUserRequestOpts(requestParameters) {
383
+ if (requestParameters['createGithubUserRequestDTO'] == null) {
384
+ throw new runtime.RequiredError('createGithubUserRequestDTO', 'Required parameter "createGithubUserRequestDTO" was null or undefined when calling createGithubUser().');
385
+ }
386
+ const queryParameters = {};
387
+ const headerParameters = {};
388
+ headerParameters['Content-Type'] = 'application/json';
389
+ if (this.configuration && this.configuration.apiKey) {
390
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
391
+ }
392
+ let urlPath = `/github-users`;
393
+ return {
394
+ path: urlPath,
395
+ method: 'POST',
396
+ headers: headerParameters,
397
+ query: queryParameters,
398
+ body: (0, CreateGithubUserRequestDTO_1.CreateGithubUserRequestDTOToJSON)(requestParameters['createGithubUserRequestDTO']),
399
+ };
400
+ }
401
+ /**
402
+ * Create a new GitHub user account
403
+ * Create GitHub user
404
+ */
405
+ async createGithubUserRaw(requestParameters, initOverrides) {
406
+ const requestOptions = await this.createGithubUserRequestOpts(requestParameters);
407
+ const response = await this.request(requestOptions, initOverrides);
408
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientGithubUserDTO_1.ClientGithubUserDTOFromJSON)(jsonValue));
409
+ }
410
+ /**
411
+ * Create a new GitHub user account
412
+ * Create GitHub user
413
+ */
414
+ async createGithubUser(requestParameters, initOverrides) {
415
+ const response = await this.createGithubUserRaw(requestParameters, initOverrides);
416
+ return await response.value();
417
+ }
418
+ /**
419
+ * Creates request options for createHoliday without sending the request
420
+ */
421
+ async createHolidayRequestOpts(requestParameters) {
422
+ if (requestParameters['holidayCreateDTO'] == null) {
423
+ throw new runtime.RequiredError('holidayCreateDTO', 'Required parameter "holidayCreateDTO" was null or undefined when calling createHoliday().');
424
+ }
425
+ const queryParameters = {};
426
+ const headerParameters = {};
427
+ headerParameters['Content-Type'] = 'application/json';
428
+ if (this.configuration && this.configuration.apiKey) {
429
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
430
+ }
431
+ let urlPath = `/holidays`;
432
+ return {
433
+ path: urlPath,
434
+ method: 'POST',
435
+ headers: headerParameters,
436
+ query: queryParameters,
437
+ body: (0, HolidayCreateDTO_1.HolidayCreateDTOToJSON)(requestParameters['holidayCreateDTO']),
438
+ };
439
+ }
440
+ /**
441
+ * Allows a user to add a holiday
442
+ */
443
+ async createHolidayRaw(requestParameters, initOverrides) {
444
+ const requestOptions = await this.createHolidayRequestOpts(requestParameters);
445
+ const response = await this.request(requestOptions, initOverrides);
446
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, HolidayDTO_1.HolidayDTOFromJSON)(jsonValue));
447
+ }
448
+ /**
449
+ * Allows a user to add a holiday
450
+ */
451
+ async createHoliday(requestParameters, initOverrides) {
452
+ const response = await this.createHolidayRaw(requestParameters, initOverrides);
453
+ return await response.value();
454
+ }
455
+ /**
456
+ * Creates request options for createJiraUser without sending the request
457
+ */
458
+ async createJiraUserRequestOpts(requestParameters) {
459
+ if (requestParameters['createJiraUserRequestDTO'] == null) {
460
+ throw new runtime.RequiredError('createJiraUserRequestDTO', 'Required parameter "createJiraUserRequestDTO" was null or undefined when calling createJiraUser().');
461
+ }
462
+ const queryParameters = {};
463
+ const headerParameters = {};
464
+ headerParameters['Content-Type'] = 'application/json';
465
+ if (this.configuration && this.configuration.apiKey) {
466
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
467
+ }
468
+ let urlPath = `/jira-users`;
469
+ return {
470
+ path: urlPath,
471
+ method: 'POST',
472
+ headers: headerParameters,
473
+ query: queryParameters,
474
+ body: (0, CreateJiraUserRequestDTO_1.CreateJiraUserRequestDTOToJSON)(requestParameters['createJiraUserRequestDTO']),
475
+ };
476
+ }
477
+ /**
478
+ * Create a new Jira user
479
+ * Create Jira user
480
+ */
481
+ async createJiraUserRaw(requestParameters, initOverrides) {
482
+ const requestOptions = await this.createJiraUserRequestOpts(requestParameters);
483
+ const response = await this.request(requestOptions, initOverrides);
484
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientJiraUserDTO_1.ClientJiraUserDTOFromJSON)(jsonValue));
485
+ }
486
+ /**
487
+ * Create a new Jira user
488
+ * Create Jira user
489
+ */
490
+ async createJiraUser(requestParameters, initOverrides) {
491
+ const response = await this.createJiraUserRaw(requestParameters, initOverrides);
492
+ return await response.value();
493
+ }
494
+ /**
495
+ * Creates request options for createProject without sending the request
496
+ */
497
+ async createProjectRequestOpts(requestParameters) {
498
+ if (requestParameters['projectInputDTO'] == null) {
499
+ throw new runtime.RequiredError('projectInputDTO', 'Required parameter "projectInputDTO" was null or undefined when calling createProject().');
500
+ }
501
+ const queryParameters = {};
502
+ const headerParameters = {};
503
+ headerParameters['Content-Type'] = 'application/json';
504
+ if (this.configuration && this.configuration.apiKey) {
505
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
506
+ }
507
+ let urlPath = `/projects`;
508
+ return {
509
+ path: urlPath,
510
+ method: 'POST',
511
+ headers: headerParameters,
512
+ query: queryParameters,
513
+ body: (0, ProjectInputDTO_1.ProjectInputDTOToJSON)(requestParameters['projectInputDTO']),
514
+ };
515
+ }
516
+ /**
517
+ * Create a project
518
+ * Creates a new project
519
+ */
520
+ async createProjectRaw(requestParameters, initOverrides) {
521
+ const requestOptions = await this.createProjectRequestOpts(requestParameters);
522
+ const response = await this.request(requestOptions, initOverrides);
523
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ProjectDTO_1.ProjectDTOFromJSON)(jsonValue));
524
+ }
525
+ /**
526
+ * Create a project
527
+ * Creates a new project
528
+ */
529
+ async createProject(requestParameters, initOverrides) {
530
+ const response = await this.createProjectRaw(requestParameters, initOverrides);
531
+ return await response.value();
532
+ }
533
+ /**
534
+ * Creates request options for deleteClient without sending the request
535
+ */
536
+ async deleteClientRequestOpts(requestParameters) {
537
+ if (requestParameters['clientId'] == null) {
538
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling deleteClient().');
539
+ }
540
+ const queryParameters = {};
541
+ const headerParameters = {};
542
+ if (this.configuration && this.configuration.apiKey) {
543
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
544
+ }
545
+ let urlPath = `/clients/{clientId}`;
546
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
547
+ return {
548
+ path: urlPath,
549
+ method: 'DELETE',
550
+ headers: headerParameters,
551
+ query: queryParameters,
552
+ };
553
+ }
554
+ /**
555
+ * Delete client
556
+ * Delete client
557
+ */
558
+ async deleteClientRaw(requestParameters, initOverrides) {
559
+ const requestOptions = await this.deleteClientRequestOpts(requestParameters);
560
+ const response = await this.request(requestOptions, initOverrides);
561
+ return new runtime.VoidApiResponse(response);
562
+ }
563
+ /**
564
+ * Delete client
565
+ * Delete client
566
+ */
567
+ async deleteClient(requestParameters, initOverrides) {
568
+ await this.deleteClientRaw(requestParameters, initOverrides);
569
+ }
570
+ /**
571
+ * Creates request options for deleteCompany without sending the request
572
+ */
573
+ async deleteCompanyRequestOpts(requestParameters) {
574
+ if (requestParameters['companyId'] == null) {
575
+ throw new runtime.RequiredError('companyId', 'Required parameter "companyId" was null or undefined when calling deleteCompany().');
576
+ }
577
+ const queryParameters = {};
578
+ const headerParameters = {};
579
+ if (this.configuration && this.configuration.apiKey) {
580
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
581
+ }
582
+ let urlPath = `/companies/{companyId}`;
583
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
584
+ return {
585
+ path: urlPath,
586
+ method: 'DELETE',
587
+ headers: headerParameters,
588
+ query: queryParameters,
589
+ };
590
+ }
591
+ /**
592
+ * Delete a company
593
+ * Delete a company
594
+ */
595
+ async deleteCompanyRaw(requestParameters, initOverrides) {
596
+ const requestOptions = await this.deleteCompanyRequestOpts(requestParameters);
597
+ const response = await this.request(requestOptions, initOverrides);
598
+ return new runtime.VoidApiResponse(response);
599
+ }
600
+ /**
601
+ * Delete a company
602
+ * Delete a company
603
+ */
604
+ async deleteCompany(requestParameters, initOverrides) {
605
+ await this.deleteCompanyRaw(requestParameters, initOverrides);
606
+ }
607
+ /**
608
+ * Creates request options for deleteEmployee without sending the request
609
+ */
610
+ async deleteEmployeeRequestOpts(requestParameters) {
611
+ if (requestParameters['userId'] == null) {
612
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteEmployee().');
613
+ }
614
+ const queryParameters = {};
615
+ const headerParameters = {};
616
+ if (this.configuration && this.configuration.apiKey) {
617
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
618
+ }
619
+ let urlPath = `/employees/{userId}`;
620
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
621
+ return {
622
+ path: urlPath,
623
+ method: 'DELETE',
624
+ headers: headerParameters,
625
+ query: queryParameters,
626
+ };
627
+ }
628
+ /**
629
+ * Delete an employee
630
+ * Delete an employee
631
+ */
632
+ async deleteEmployeeRaw(requestParameters, initOverrides) {
633
+ const requestOptions = await this.deleteEmployeeRequestOpts(requestParameters);
634
+ const response = await this.request(requestOptions, initOverrides);
635
+ return new runtime.VoidApiResponse(response);
636
+ }
637
+ /**
638
+ * Delete an employee
639
+ * Delete an employee
640
+ */
641
+ async deleteEmployee(requestParameters, initOverrides) {
642
+ await this.deleteEmployeeRaw(requestParameters, initOverrides);
643
+ }
644
+ /**
645
+ * Creates request options for deleteEmployeeInvoice without sending the request
646
+ */
647
+ async deleteEmployeeInvoiceRequestOpts(requestParameters) {
648
+ if (requestParameters['userId'] == null) {
649
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteEmployeeInvoice().');
650
+ }
651
+ if (requestParameters['employeeInvoiceId'] == null) {
652
+ throw new runtime.RequiredError('employeeInvoiceId', 'Required parameter "employeeInvoiceId" was null or undefined when calling deleteEmployeeInvoice().');
653
+ }
654
+ const queryParameters = {};
655
+ const headerParameters = {};
656
+ if (this.configuration && this.configuration.apiKey) {
657
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
658
+ }
659
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}`;
660
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
661
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
662
+ return {
663
+ path: urlPath,
664
+ method: 'DELETE',
665
+ headers: headerParameters,
666
+ query: queryParameters,
667
+ };
668
+ }
669
+ /**
670
+ * Delete an employee invoice
671
+ * Delete an employee invoice
672
+ */
673
+ async deleteEmployeeInvoiceRaw(requestParameters, initOverrides) {
674
+ const requestOptions = await this.deleteEmployeeInvoiceRequestOpts(requestParameters);
675
+ const response = await this.request(requestOptions, initOverrides);
676
+ return new runtime.VoidApiResponse(response);
677
+ }
678
+ /**
679
+ * Delete an employee invoice
680
+ * Delete an employee invoice
681
+ */
682
+ async deleteEmployeeInvoice(requestParameters, initOverrides) {
683
+ await this.deleteEmployeeInvoiceRaw(requestParameters, initOverrides);
684
+ }
685
+ /**
686
+ * Creates request options for deleteGithubUser without sending the request
687
+ */
688
+ async deleteGithubUserRequestOpts() {
689
+ const queryParameters = {};
690
+ const headerParameters = {};
691
+ if (this.configuration && this.configuration.apiKey) {
692
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
693
+ }
694
+ let urlPath = `/github-users`;
695
+ return {
696
+ path: urlPath,
697
+ method: 'DELETE',
698
+ headers: headerParameters,
699
+ query: queryParameters,
700
+ };
701
+ }
702
+ /**
703
+ * Delete the authenticated user\'s GitHub account
704
+ * Delete GitHub user
705
+ */
706
+ async deleteGithubUserRaw(initOverrides) {
707
+ const requestOptions = await this.deleteGithubUserRequestOpts();
708
+ const response = await this.request(requestOptions, initOverrides);
709
+ return new runtime.VoidApiResponse(response);
710
+ }
711
+ /**
712
+ * Delete the authenticated user\'s GitHub account
713
+ * Delete GitHub user
714
+ */
715
+ async deleteGithubUser(initOverrides) {
716
+ await this.deleteGithubUserRaw(initOverrides);
717
+ }
718
+ /**
719
+ * Creates request options for deleteHoliday without sending the request
720
+ */
721
+ async deleteHolidayRequestOpts(requestParameters) {
722
+ if (requestParameters['holidayId'] == null) {
723
+ throw new runtime.RequiredError('holidayId', 'Required parameter "holidayId" was null or undefined when calling deleteHoliday().');
724
+ }
725
+ const queryParameters = {};
726
+ const headerParameters = {};
727
+ if (this.configuration && this.configuration.apiKey) {
728
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
729
+ }
730
+ let urlPath = `/holidays/{holidayId}`;
731
+ urlPath = urlPath.replace('{holidayId}', encodeURIComponent(String(requestParameters['holidayId'])));
732
+ return {
733
+ path: urlPath,
734
+ method: 'DELETE',
735
+ headers: headerParameters,
736
+ query: queryParameters,
737
+ };
738
+ }
739
+ /**
740
+ * Delete a holiday
741
+ * Delete a holiday
742
+ */
743
+ async deleteHolidayRaw(requestParameters, initOverrides) {
744
+ const requestOptions = await this.deleteHolidayRequestOpts(requestParameters);
745
+ const response = await this.request(requestOptions, initOverrides);
746
+ return new runtime.VoidApiResponse(response);
747
+ }
748
+ /**
749
+ * Delete a holiday
750
+ * Delete a holiday
751
+ */
752
+ async deleteHoliday(requestParameters, initOverrides) {
753
+ await this.deleteHolidayRaw(requestParameters, initOverrides);
754
+ }
755
+ /**
756
+ * Creates request options for deleteProject without sending the request
757
+ */
758
+ async deleteProjectRequestOpts(requestParameters) {
759
+ if (requestParameters['projectId'] == null) {
760
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling deleteProject().');
761
+ }
762
+ const queryParameters = {};
763
+ const headerParameters = {};
764
+ if (this.configuration && this.configuration.apiKey) {
765
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
766
+ }
767
+ let urlPath = `/projects/{projectId}`;
768
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
769
+ return {
770
+ path: urlPath,
771
+ method: 'DELETE',
772
+ headers: headerParameters,
773
+ query: queryParameters,
774
+ };
775
+ }
776
+ /**
777
+ * Delete a project
778
+ * Delete a project
779
+ */
780
+ async deleteProjectRaw(requestParameters, initOverrides) {
781
+ const requestOptions = await this.deleteProjectRequestOpts(requestParameters);
782
+ const response = await this.request(requestOptions, initOverrides);
783
+ return new runtime.VoidApiResponse(response);
784
+ }
785
+ /**
786
+ * Delete a project
787
+ * Delete a project
788
+ */
789
+ async deleteProject(requestParameters, initOverrides) {
790
+ await this.deleteProjectRaw(requestParameters, initOverrides);
791
+ }
792
+ /**
793
+ * Creates request options for downloadAdjustedTimesheetPdf without sending the request
794
+ */
795
+ async downloadAdjustedTimesheetPdfRequestOpts(requestParameters) {
796
+ if (requestParameters['projectId'] == null) {
797
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling downloadAdjustedTimesheetPdf().');
798
+ }
799
+ if (requestParameters['timesheetId'] == null) {
800
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling downloadAdjustedTimesheetPdf().');
801
+ }
802
+ const queryParameters = {};
803
+ const headerParameters = {};
804
+ if (this.configuration && this.configuration.apiKey) {
805
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
806
+ }
807
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/download`;
808
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
809
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
810
+ return {
811
+ path: urlPath,
812
+ method: 'GET',
813
+ headers: headerParameters,
814
+ query: queryParameters,
815
+ };
816
+ }
817
+ /**
818
+ * Download an AdjustedTimesheet report in PDF format
819
+ * Download an AdjustedTimesheet report in PDF format
820
+ */
821
+ async downloadAdjustedTimesheetPdfRaw(requestParameters, initOverrides) {
822
+ const requestOptions = await this.downloadAdjustedTimesheetPdfRequestOpts(requestParameters);
823
+ const response = await this.request(requestOptions, initOverrides);
824
+ if (this.isJsonMime(response.headers.get('content-type'))) {
825
+ return new runtime.JSONApiResponse(response);
826
+ }
827
+ else {
828
+ return new runtime.TextApiResponse(response);
829
+ }
830
+ }
831
+ /**
832
+ * Download an AdjustedTimesheet report in PDF format
833
+ * Download an AdjustedTimesheet report in PDF format
834
+ */
835
+ async downloadAdjustedTimesheetPdf(requestParameters, initOverrides) {
836
+ const response = await this.downloadAdjustedTimesheetPdfRaw(requestParameters, initOverrides);
837
+ return await response.value();
838
+ }
839
+ /**
840
+ * Creates request options for downloadClientInvoicePdf without sending the request
841
+ */
842
+ async downloadClientInvoicePdfRequestOpts(requestParameters) {
843
+ if (requestParameters['invoiceId'] == null) {
844
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling downloadClientInvoicePdf().');
845
+ }
846
+ if (requestParameters['clientId'] == null) {
847
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling downloadClientInvoicePdf().');
848
+ }
849
+ const queryParameters = {};
850
+ const headerParameters = {};
851
+ if (this.configuration && this.configuration.apiKey) {
852
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
853
+ }
854
+ let urlPath = `/clients/{clientId}/invoices/{invoiceId}/download`;
855
+ urlPath = urlPath.replace('{invoiceId}', encodeURIComponent(String(requestParameters['invoiceId'])));
856
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
857
+ return {
858
+ path: urlPath,
859
+ method: 'GET',
860
+ headers: headerParameters,
861
+ query: queryParameters,
862
+ };
863
+ }
864
+ /**
865
+ * Download client invoice pdf
866
+ * Download client invoice pdf
867
+ */
868
+ async downloadClientInvoicePdfRaw(requestParameters, initOverrides) {
869
+ const requestOptions = await this.downloadClientInvoicePdfRequestOpts(requestParameters);
870
+ const response = await this.request(requestOptions, initOverrides);
871
+ if (this.isJsonMime(response.headers.get('content-type'))) {
872
+ return new runtime.JSONApiResponse(response);
873
+ }
874
+ else {
875
+ return new runtime.TextApiResponse(response);
876
+ }
877
+ }
878
+ /**
879
+ * Download client invoice pdf
880
+ * Download client invoice pdf
881
+ */
882
+ async downloadClientInvoicePdf(requestParameters, initOverrides) {
883
+ const response = await this.downloadClientInvoicePdfRaw(requestParameters, initOverrides);
884
+ return await response.value();
885
+ }
886
+ /**
887
+ * Creates request options for downloadEmployeeInvoicePdf without sending the request
888
+ */
889
+ async downloadEmployeeInvoicePdfRequestOpts(requestParameters) {
890
+ if (requestParameters['userId'] == null) {
891
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling downloadEmployeeInvoicePdf().');
892
+ }
893
+ if (requestParameters['employeeInvoiceId'] == null) {
894
+ throw new runtime.RequiredError('employeeInvoiceId', 'Required parameter "employeeInvoiceId" was null or undefined when calling downloadEmployeeInvoicePdf().');
895
+ }
896
+ const queryParameters = {};
897
+ const headerParameters = {};
898
+ if (this.configuration && this.configuration.apiKey) {
899
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
900
+ }
901
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}/download`;
902
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
903
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
904
+ return {
905
+ path: urlPath,
906
+ method: 'GET',
907
+ headers: headerParameters,
908
+ query: queryParameters,
909
+ };
910
+ }
911
+ /**
912
+ * Download the employee invoice report in PDF format
913
+ * Download the employee invoice report in PDF format
914
+ */
915
+ async downloadEmployeeInvoicePdfRaw(requestParameters, initOverrides) {
916
+ const requestOptions = await this.downloadEmployeeInvoicePdfRequestOpts(requestParameters);
917
+ const response = await this.request(requestOptions, initOverrides);
918
+ if (this.isJsonMime(response.headers.get('content-type'))) {
919
+ return new runtime.JSONApiResponse(response);
920
+ }
921
+ else {
922
+ return new runtime.TextApiResponse(response);
923
+ }
924
+ }
925
+ /**
926
+ * Download the employee invoice report in PDF format
927
+ * Download the employee invoice report in PDF format
928
+ */
929
+ async downloadEmployeeInvoicePdf(requestParameters, initOverrides) {
930
+ const response = await this.downloadEmployeeInvoicePdfRaw(requestParameters, initOverrides);
931
+ return await response.value();
932
+ }
933
+ /**
934
+ * Creates request options for downloadGlobalTimesheetPdf without sending the request
935
+ */
936
+ async downloadGlobalTimesheetPdfRequestOpts(requestParameters) {
937
+ if (requestParameters['projectId'] == null) {
938
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling downloadGlobalTimesheetPdf().');
939
+ }
940
+ if (requestParameters['timesheetId'] == null) {
941
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling downloadGlobalTimesheetPdf().');
942
+ }
943
+ const queryParameters = {};
944
+ const headerParameters = {};
945
+ if (this.configuration && this.configuration.apiKey) {
946
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
947
+ }
948
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/download`;
949
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
950
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
951
+ return {
952
+ path: urlPath,
953
+ method: 'GET',
954
+ headers: headerParameters,
955
+ query: queryParameters,
956
+ };
957
+ }
958
+ /**
959
+ * Download a global timesheet report in PDF format
960
+ * Download a global timesheet report in PDF format
961
+ */
962
+ async downloadGlobalTimesheetPdfRaw(requestParameters, initOverrides) {
963
+ const requestOptions = await this.downloadGlobalTimesheetPdfRequestOpts(requestParameters);
964
+ const response = await this.request(requestOptions, initOverrides);
965
+ if (this.isJsonMime(response.headers.get('content-type'))) {
966
+ return new runtime.JSONApiResponse(response);
967
+ }
968
+ else {
969
+ return new runtime.TextApiResponse(response);
970
+ }
971
+ }
972
+ /**
973
+ * Download a global timesheet report in PDF format
974
+ * Download a global timesheet report in PDF format
975
+ */
976
+ async downloadGlobalTimesheetPdf(requestParameters, initOverrides) {
977
+ const response = await this.downloadGlobalTimesheetPdfRaw(requestParameters, initOverrides);
978
+ return await response.value();
979
+ }
980
+ /**
981
+ * Creates request options for downloadTimesheetPdf without sending the request
982
+ */
983
+ async downloadTimesheetPdfRequestOpts(requestParameters) {
984
+ if (requestParameters['projectId'] == null) {
985
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling downloadTimesheetPdf().');
986
+ }
987
+ if (requestParameters['timesheetId'] == null) {
988
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling downloadTimesheetPdf().');
989
+ }
990
+ const queryParameters = {};
991
+ const headerParameters = {};
992
+ if (this.configuration && this.configuration.apiKey) {
993
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
994
+ }
995
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/download`;
996
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
997
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
998
+ return {
999
+ path: urlPath,
1000
+ method: 'GET',
1001
+ headers: headerParameters,
1002
+ query: queryParameters,
1003
+ };
1004
+ }
1005
+ /**
1006
+ * Download a timesheet report in PDF format
1007
+ * Download a timesheet report in PDF format
1008
+ */
1009
+ async downloadTimesheetPdfRaw(requestParameters, initOverrides) {
1010
+ const requestOptions = await this.downloadTimesheetPdfRequestOpts(requestParameters);
1011
+ const response = await this.request(requestOptions, initOverrides);
1012
+ if (this.isJsonMime(response.headers.get('content-type'))) {
1013
+ return new runtime.JSONApiResponse(response);
1014
+ }
1015
+ else {
1016
+ return new runtime.TextApiResponse(response);
1017
+ }
1018
+ }
1019
+ /**
1020
+ * Download a timesheet report in PDF format
1021
+ * Download a timesheet report in PDF format
1022
+ */
1023
+ async downloadTimesheetPdf(requestParameters, initOverrides) {
1024
+ const response = await this.downloadTimesheetPdfRaw(requestParameters, initOverrides);
1025
+ return await response.value();
1026
+ }
1027
+ /**
1028
+ * Creates request options for getAdjustedTimesheet without sending the request
1029
+ */
1030
+ async getAdjustedTimesheetRequestOpts(requestParameters) {
1031
+ if (requestParameters['projectId'] == null) {
1032
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getAdjustedTimesheet().');
1033
+ }
1034
+ if (requestParameters['timesheetId'] == null) {
1035
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling getAdjustedTimesheet().');
1036
+ }
1037
+ const queryParameters = {};
1038
+ const headerParameters = {};
1039
+ if (this.configuration && this.configuration.apiKey) {
1040
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1041
+ }
1042
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}`;
1043
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1044
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1045
+ return {
1046
+ path: urlPath,
1047
+ method: 'GET',
1048
+ headers: headerParameters,
1049
+ query: queryParameters,
1050
+ };
1051
+ }
1052
+ /**
1053
+ * Get an adjustedTimesheet
1054
+ * Get an adjustedTimesheet
1055
+ */
1056
+ async getAdjustedTimesheetRaw(requestParameters, initOverrides) {
1057
+ const requestOptions = await this.getAdjustedTimesheetRequestOpts(requestParameters);
1058
+ const response = await this.request(requestOptions, initOverrides);
1059
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, AdjustedTimesheetDTO_1.AdjustedTimesheetDTOFromJSON)(jsonValue));
1060
+ }
1061
+ /**
1062
+ * Get an adjustedTimesheet
1063
+ * Get an adjustedTimesheet
1064
+ */
1065
+ async getAdjustedTimesheet(requestParameters, initOverrides) {
1066
+ const response = await this.getAdjustedTimesheetRaw(requestParameters, initOverrides);
1067
+ return await response.value();
1068
+ }
1069
+ /**
1070
+ * Creates request options for getAdjustedTimesheets without sending the request
1071
+ */
1072
+ async getAdjustedTimesheetsRequestOpts(requestParameters) {
1073
+ if (requestParameters['projectId'] == null) {
1074
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getAdjustedTimesheets().');
1075
+ }
1076
+ const queryParameters = {};
1077
+ if (requestParameters['page'] != null) {
1078
+ queryParameters['page'] = requestParameters['page'];
1079
+ }
1080
+ if (requestParameters['pageSize'] != null) {
1081
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1082
+ }
1083
+ if (requestParameters['search'] != null) {
1084
+ queryParameters['search'] = requestParameters['search'];
1085
+ }
1086
+ const headerParameters = {};
1087
+ if (this.configuration && this.configuration.apiKey) {
1088
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1089
+ }
1090
+ let urlPath = `/projects/{projectId}/adjusted-timesheets`;
1091
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1092
+ return {
1093
+ path: urlPath,
1094
+ method: 'GET',
1095
+ headers: headerParameters,
1096
+ query: queryParameters,
1097
+ };
1098
+ }
1099
+ /**
1100
+ * Get all adjustedTimesheets in a project
1101
+ * Get all adjustedTimesheets in a project
1102
+ */
1103
+ async getAdjustedTimesheetsRaw(requestParameters, initOverrides) {
1104
+ const requestOptions = await this.getAdjustedTimesheetsRequestOpts(requestParameters);
1105
+ const response = await this.request(requestOptions, initOverrides);
1106
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedAdjustedTimesheets_1.PaginatedAdjustedTimesheetsFromJSON)(jsonValue));
1107
+ }
1108
+ /**
1109
+ * Get all adjustedTimesheets in a project
1110
+ * Get all adjustedTimesheets in a project
1111
+ */
1112
+ async getAdjustedTimesheets(requestParameters, initOverrides) {
1113
+ const response = await this.getAdjustedTimesheetsRaw(requestParameters, initOverrides);
1114
+ return await response.value();
1115
+ }
1116
+ /**
1117
+ * Creates request options for getClientById without sending the request
1118
+ */
1119
+ async getClientByIdRequestOpts(requestParameters) {
1120
+ if (requestParameters['clientId'] == null) {
1121
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling getClientById().');
1122
+ }
1123
+ const queryParameters = {};
1124
+ const headerParameters = {};
1125
+ if (this.configuration && this.configuration.apiKey) {
1126
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1127
+ }
1128
+ let urlPath = `/clients/{clientId}`;
1129
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
1130
+ return {
1131
+ path: urlPath,
1132
+ method: 'GET',
1133
+ headers: headerParameters,
1134
+ query: queryParameters,
1135
+ };
1136
+ }
1137
+ /**
1138
+ * Get client by id
1139
+ */
1140
+ async getClientByIdRaw(requestParameters, initOverrides) {
1141
+ const requestOptions = await this.getClientByIdRequestOpts(requestParameters);
1142
+ const response = await this.request(requestOptions, initOverrides);
1143
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientDTO_1.ClientDTOFromJSON)(jsonValue));
1144
+ }
1145
+ /**
1146
+ * Get client by id
1147
+ */
1148
+ async getClientById(requestParameters, initOverrides) {
1149
+ const response = await this.getClientByIdRaw(requestParameters, initOverrides);
1150
+ return await response.value();
1151
+ }
1152
+ /**
1153
+ * Creates request options for getClientInvoices without sending the request
1154
+ */
1155
+ async getClientInvoicesRequestOpts(requestParameters) {
1156
+ if (requestParameters['clientId'] == null) {
1157
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling getClientInvoices().');
1158
+ }
1159
+ const queryParameters = {};
1160
+ if (requestParameters['page'] != null) {
1161
+ queryParameters['page'] = requestParameters['page'];
1162
+ }
1163
+ if (requestParameters['pageSize'] != null) {
1164
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1165
+ }
1166
+ if (requestParameters['search'] != null) {
1167
+ queryParameters['search'] = requestParameters['search'];
1168
+ }
1169
+ const headerParameters = {};
1170
+ if (this.configuration && this.configuration.apiKey) {
1171
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1172
+ }
1173
+ let urlPath = `/clients/{clientId}/invoices`;
1174
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
1175
+ return {
1176
+ path: urlPath,
1177
+ method: 'GET',
1178
+ headers: headerParameters,
1179
+ query: queryParameters,
1180
+ };
1181
+ }
1182
+ /**
1183
+ * Get all invoices from client
1184
+ * Get all invoices from client
1185
+ */
1186
+ async getClientInvoicesRaw(requestParameters, initOverrides) {
1187
+ const requestOptions = await this.getClientInvoicesRequestOpts(requestParameters);
1188
+ const response = await this.request(requestOptions, initOverrides);
1189
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedClientInvoices_1.PaginatedClientInvoicesFromJSON)(jsonValue));
1190
+ }
1191
+ /**
1192
+ * Get all invoices from client
1193
+ * Get all invoices from client
1194
+ */
1195
+ async getClientInvoices(requestParameters, initOverrides) {
1196
+ const response = await this.getClientInvoicesRaw(requestParameters, initOverrides);
1197
+ return await response.value();
1198
+ }
1199
+ /**
1200
+ * Creates request options for getClients without sending the request
1201
+ */
1202
+ async getClientsRequestOpts(requestParameters) {
1203
+ const queryParameters = {};
1204
+ if (requestParameters['page'] != null) {
1205
+ queryParameters['page'] = requestParameters['page'];
1206
+ }
1207
+ if (requestParameters['pageSize'] != null) {
1208
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1209
+ }
1210
+ if (requestParameters['search'] != null) {
1211
+ queryParameters['search'] = requestParameters['search'];
1212
+ }
1213
+ const headerParameters = {};
1214
+ if (this.configuration && this.configuration.apiKey) {
1215
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1216
+ }
1217
+ let urlPath = `/clients`;
1218
+ return {
1219
+ path: urlPath,
1220
+ method: 'GET',
1221
+ headers: headerParameters,
1222
+ query: queryParameters,
1223
+ };
1224
+ }
1225
+ /**
1226
+ * Get all clients from company
1227
+ * Get all clients from company
1228
+ */
1229
+ async getClientsRaw(requestParameters, initOverrides) {
1230
+ const requestOptions = await this.getClientsRequestOpts(requestParameters);
1231
+ const response = await this.request(requestOptions, initOverrides);
1232
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedClients_1.PaginatedClientsFromJSON)(jsonValue));
1233
+ }
1234
+ /**
1235
+ * Get all clients from company
1236
+ * Get all clients from company
1237
+ */
1238
+ async getClients(requestParameters = {}, initOverrides) {
1239
+ const response = await this.getClientsRaw(requestParameters, initOverrides);
1240
+ return await response.value();
1241
+ }
1242
+ /**
1243
+ * Creates request options for getCommitsByUserID without sending the request
1244
+ */
1245
+ async getCommitsByUserIDRequestOpts(requestParameters) {
1246
+ if (requestParameters['userId'] == null) {
1247
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getCommitsByUserID().');
1248
+ }
1249
+ if (requestParameters['from'] == null) {
1250
+ throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling getCommitsByUserID().');
1251
+ }
1252
+ if (requestParameters['to'] == null) {
1253
+ throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling getCommitsByUserID().');
1254
+ }
1255
+ const queryParameters = {};
1256
+ if (requestParameters['from'] != null) {
1257
+ queryParameters['from'] = requestParameters['from'].toISOString().substring(0, 10);
1258
+ }
1259
+ if (requestParameters['to'] != null) {
1260
+ queryParameters['to'] = requestParameters['to'].toISOString().substring(0, 10);
1261
+ }
1262
+ if (requestParameters['groupBy'] != null) {
1263
+ queryParameters['groupBy'] = requestParameters['groupBy'];
1264
+ }
1265
+ const headerParameters = {};
1266
+ if (this.configuration && this.configuration.apiKey) {
1267
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1268
+ }
1269
+ let urlPath = `/employees/{userId}/commits`;
1270
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1271
+ return {
1272
+ path: urlPath,
1273
+ method: 'GET',
1274
+ headers: headerParameters,
1275
+ query: queryParameters,
1276
+ };
1277
+ }
1278
+ /**
1279
+ * Get commit statistics for a specific user
1280
+ * Get commits by user ID
1281
+ */
1282
+ async getCommitsByUserIDRaw(requestParameters, initOverrides) {
1283
+ const requestOptions = await this.getCommitsByUserIDRequestOpts(requestParameters);
1284
+ const response = await this.request(requestOptions, initOverrides);
1285
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientGithubCommitCountDTO_1.ClientGithubCommitCountDTOFromJSON));
1286
+ }
1287
+ /**
1288
+ * Get commit statistics for a specific user
1289
+ * Get commits by user ID
1290
+ */
1291
+ async getCommitsByUserID(requestParameters, initOverrides) {
1292
+ const response = await this.getCommitsByUserIDRaw(requestParameters, initOverrides);
1293
+ return await response.value();
1294
+ }
1295
+ /**
1296
+ * Creates request options for getCompanies without sending the request
1297
+ */
1298
+ async getCompaniesRequestOpts(requestParameters) {
1299
+ const queryParameters = {};
1300
+ if (requestParameters['search'] != null) {
1301
+ queryParameters['search'] = requestParameters['search'];
1302
+ }
1303
+ const headerParameters = {};
1304
+ if (this.configuration && this.configuration.apiKey) {
1305
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1306
+ }
1307
+ let urlPath = `/companies`;
1308
+ return {
1309
+ path: urlPath,
1310
+ method: 'GET',
1311
+ headers: headerParameters,
1312
+ query: queryParameters,
1313
+ };
1314
+ }
1315
+ /**
1316
+ * Get all companies a user belongs to
1317
+ * Get all companies a user belongs to
1318
+ */
1319
+ async getCompaniesRaw(requestParameters, initOverrides) {
1320
+ const requestOptions = await this.getCompaniesRequestOpts(requestParameters);
1321
+ const response = await this.request(requestOptions, initOverrides);
1322
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CompanyDTO_1.CompanyDTOFromJSON));
1323
+ }
1324
+ /**
1325
+ * Get all companies a user belongs to
1326
+ * Get all companies a user belongs to
1327
+ */
1328
+ async getCompanies(requestParameters = {}, initOverrides) {
1329
+ const response = await this.getCompaniesRaw(requestParameters, initOverrides);
1330
+ return await response.value();
1331
+ }
1332
+ /**
1333
+ * Creates request options for getCompany without sending the request
1334
+ */
1335
+ async getCompanyRequestOpts(requestParameters) {
1336
+ if (requestParameters['companyId'] == null) {
1337
+ throw new runtime.RequiredError('companyId', 'Required parameter "companyId" was null or undefined when calling getCompany().');
1338
+ }
1339
+ const queryParameters = {};
1340
+ const headerParameters = {};
1341
+ if (this.configuration && this.configuration.apiKey) {
1342
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1343
+ }
1344
+ let urlPath = `/companies/{companyId}`;
1345
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
1346
+ return {
1347
+ path: urlPath,
1348
+ method: 'GET',
1349
+ headers: headerParameters,
1350
+ query: queryParameters,
1351
+ };
1352
+ }
1353
+ /**
1354
+ * Get a company
1355
+ * Get a company by ID
1356
+ */
1357
+ async getCompanyRaw(requestParameters, initOverrides) {
1358
+ const requestOptions = await this.getCompanyRequestOpts(requestParameters);
1359
+ const response = await this.request(requestOptions, initOverrides);
1360
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CompanyDTO_1.CompanyDTOFromJSON)(jsonValue));
1361
+ }
1362
+ /**
1363
+ * Get a company
1364
+ * Get a company by ID
1365
+ */
1366
+ async getCompany(requestParameters, initOverrides) {
1367
+ const response = await this.getCompanyRaw(requestParameters, initOverrides);
1368
+ return await response.value();
1369
+ }
1370
+ /**
1371
+ * Creates request options for getEmployee without sending the request
1372
+ */
1373
+ async getEmployeeRequestOpts(requestParameters) {
1374
+ if (requestParameters['userId'] == null) {
1375
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getEmployee().');
1376
+ }
1377
+ const queryParameters = {};
1378
+ const headerParameters = {};
1379
+ if (this.configuration && this.configuration.apiKey) {
1380
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1381
+ }
1382
+ let urlPath = `/employees/{userId}`;
1383
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1384
+ return {
1385
+ path: urlPath,
1386
+ method: 'GET',
1387
+ headers: headerParameters,
1388
+ query: queryParameters,
1389
+ };
1390
+ }
1391
+ /**
1392
+ * Get employee info
1393
+ * Get employee info
1394
+ */
1395
+ async getEmployeeRaw(requestParameters, initOverrides) {
1396
+ const requestOptions = await this.getEmployeeRequestOpts(requestParameters);
1397
+ const response = await this.request(requestOptions, initOverrides);
1398
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmployeeDTO_1.EmployeeDTOFromJSON)(jsonValue));
1399
+ }
1400
+ /**
1401
+ * Get employee info
1402
+ * Get employee info
1403
+ */
1404
+ async getEmployee(requestParameters, initOverrides) {
1405
+ const response = await this.getEmployeeRaw(requestParameters, initOverrides);
1406
+ return await response.value();
1407
+ }
1408
+ /**
1409
+ * Creates request options for getEmployeeInvoices without sending the request
1410
+ */
1411
+ async getEmployeeInvoicesRequestOpts(requestParameters) {
1412
+ if (requestParameters['userId'] == null) {
1413
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getEmployeeInvoices().');
1414
+ }
1415
+ const queryParameters = {};
1416
+ if (requestParameters['page'] != null) {
1417
+ queryParameters['page'] = requestParameters['page'];
1418
+ }
1419
+ if (requestParameters['pageSize'] != null) {
1420
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1421
+ }
1422
+ if (requestParameters['search'] != null) {
1423
+ queryParameters['search'] = requestParameters['search'];
1424
+ }
1425
+ const headerParameters = {};
1426
+ if (this.configuration && this.configuration.apiKey) {
1427
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1428
+ }
1429
+ let urlPath = `/employees/{userId}/invoices`;
1430
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1431
+ return {
1432
+ path: urlPath,
1433
+ method: 'GET',
1434
+ headers: headerParameters,
1435
+ query: queryParameters,
1436
+ };
1437
+ }
1438
+ /**
1439
+ * Get all employee invoices
1440
+ * Get all employee invoices
1441
+ */
1442
+ async getEmployeeInvoicesRaw(requestParameters, initOverrides) {
1443
+ const requestOptions = await this.getEmployeeInvoicesRequestOpts(requestParameters);
1444
+ const response = await this.request(requestOptions, initOverrides);
1445
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedEmployeeInvoices_1.PaginatedEmployeeInvoicesFromJSON)(jsonValue));
1446
+ }
1447
+ /**
1448
+ * Get all employee invoices
1449
+ * Get all employee invoices
1450
+ */
1451
+ async getEmployeeInvoices(requestParameters, initOverrides) {
1452
+ const response = await this.getEmployeeInvoicesRaw(requestParameters, initOverrides);
1453
+ return await response.value();
1454
+ }
1455
+ /**
1456
+ * Creates request options for getEmployeeTimesheets without sending the request
1457
+ */
1458
+ async getEmployeeTimesheetsRequestOpts(requestParameters) {
1459
+ if (requestParameters['projectId'] == null) {
1460
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getEmployeeTimesheets().');
1461
+ }
1462
+ const queryParameters = {};
1463
+ if (requestParameters['page'] != null) {
1464
+ queryParameters['page'] = requestParameters['page'];
1465
+ }
1466
+ if (requestParameters['pageSize'] != null) {
1467
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1468
+ }
1469
+ if (requestParameters['search'] != null) {
1470
+ queryParameters['search'] = requestParameters['search'];
1471
+ }
1472
+ const headerParameters = {};
1473
+ if (this.configuration && this.configuration.apiKey) {
1474
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1475
+ }
1476
+ let urlPath = `/projects/{projectId}/employee-timesheets`;
1477
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1478
+ return {
1479
+ path: urlPath,
1480
+ method: 'GET',
1481
+ headers: headerParameters,
1482
+ query: queryParameters,
1483
+ };
1484
+ }
1485
+ /**
1486
+ * Get all timesheets of an employee in a project
1487
+ * Get all timesheets of an employee in a project
1488
+ */
1489
+ async getEmployeeTimesheetsRaw(requestParameters, initOverrides) {
1490
+ const requestOptions = await this.getEmployeeTimesheetsRequestOpts(requestParameters);
1491
+ const response = await this.request(requestOptions, initOverrides);
1492
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedTimesheets_1.PaginatedTimesheetsFromJSON)(jsonValue));
1493
+ }
1494
+ /**
1495
+ * Get all timesheets of an employee in a project
1496
+ * Get all timesheets of an employee in a project
1497
+ */
1498
+ async getEmployeeTimesheets(requestParameters, initOverrides) {
1499
+ const response = await this.getEmployeeTimesheetsRaw(requestParameters, initOverrides);
1500
+ return await response.value();
1501
+ }
1502
+ /**
1503
+ * Creates request options for getEmployees without sending the request
1504
+ */
1505
+ async getEmployeesRequestOpts(requestParameters) {
1506
+ const queryParameters = {};
1507
+ if (requestParameters['page'] != null) {
1508
+ queryParameters['page'] = requestParameters['page'];
1509
+ }
1510
+ if (requestParameters['pageSize'] != null) {
1511
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1512
+ }
1513
+ if (requestParameters['activated'] != null) {
1514
+ queryParameters['activated'] = requestParameters['activated'];
1515
+ }
1516
+ if (requestParameters['search'] != null) {
1517
+ queryParameters['search'] = requestParameters['search'];
1518
+ }
1519
+ const headerParameters = {};
1520
+ if (this.configuration && this.configuration.apiKey) {
1521
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1522
+ }
1523
+ let urlPath = `/employees`;
1524
+ return {
1525
+ path: urlPath,
1526
+ method: 'GET',
1527
+ headers: headerParameters,
1528
+ query: queryParameters,
1529
+ };
1530
+ }
1531
+ /**
1532
+ * List employees
1533
+ * List employees
1534
+ */
1535
+ async getEmployeesRaw(requestParameters, initOverrides) {
1536
+ const requestOptions = await this.getEmployeesRequestOpts(requestParameters);
1537
+ const response = await this.request(requestOptions, initOverrides);
1538
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedEmployees_1.PaginatedEmployeesFromJSON)(jsonValue));
1539
+ }
1540
+ /**
1541
+ * List employees
1542
+ * List employees
1543
+ */
1544
+ async getEmployees(requestParameters = {}, initOverrides) {
1545
+ const response = await this.getEmployeesRaw(requestParameters, initOverrides);
1546
+ return await response.value();
1547
+ }
1548
+ /**
1549
+ * Creates request options for getGithubAccount without sending the request
1550
+ */
1551
+ async getGithubAccountRequestOpts() {
1552
+ const queryParameters = {};
1553
+ const headerParameters = {};
1554
+ if (this.configuration && this.configuration.apiKey) {
1555
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1556
+ }
1557
+ let urlPath = `/github-accounts`;
1558
+ return {
1559
+ path: urlPath,
1560
+ method: 'GET',
1561
+ headers: headerParameters,
1562
+ query: queryParameters,
1563
+ };
1564
+ }
1565
+ /**
1566
+ * Get GitHub account for the authenticated user
1567
+ * Get GitHub account
1568
+ */
1569
+ async getGithubAccountRaw(initOverrides) {
1570
+ const requestOptions = await this.getGithubAccountRequestOpts();
1571
+ const response = await this.request(requestOptions, initOverrides);
1572
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientGithubAccountDTO_1.ClientGithubAccountDTOFromJSON)(jsonValue));
1573
+ }
1574
+ /**
1575
+ * Get GitHub account for the authenticated user
1576
+ * Get GitHub account
1577
+ */
1578
+ async getGithubAccount(initOverrides) {
1579
+ const response = await this.getGithubAccountRaw(initOverrides);
1580
+ return await response.value();
1581
+ }
1582
+ /**
1583
+ * Creates request options for getGlobalTimesheet without sending the request
1584
+ */
1585
+ async getGlobalTimesheetRequestOpts(requestParameters) {
1586
+ if (requestParameters['projectId'] == null) {
1587
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getGlobalTimesheet().');
1588
+ }
1589
+ if (requestParameters['timesheetId'] == null) {
1590
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling getGlobalTimesheet().');
1591
+ }
1592
+ const queryParameters = {};
1593
+ const headerParameters = {};
1594
+ if (this.configuration && this.configuration.apiKey) {
1595
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1596
+ }
1597
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}`;
1598
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1599
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
1600
+ return {
1601
+ path: urlPath,
1602
+ method: 'GET',
1603
+ headers: headerParameters,
1604
+ query: queryParameters,
1605
+ };
1606
+ }
1607
+ /**
1608
+ * Get a global timesheet
1609
+ * Get a global timesheet
1610
+ */
1611
+ async getGlobalTimesheetRaw(requestParameters, initOverrides) {
1612
+ const requestOptions = await this.getGlobalTimesheetRequestOpts(requestParameters);
1613
+ const response = await this.request(requestOptions, initOverrides);
1614
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GlobalTimesheetDTO_1.GlobalTimesheetDTOFromJSON)(jsonValue));
1615
+ }
1616
+ /**
1617
+ * Get a global timesheet
1618
+ * Get a global timesheet
1619
+ */
1620
+ async getGlobalTimesheet(requestParameters, initOverrides) {
1621
+ const response = await this.getGlobalTimesheetRaw(requestParameters, initOverrides);
1622
+ return await response.value();
1623
+ }
1624
+ /**
1625
+ * Creates request options for getGlobalTimesheets without sending the request
1626
+ */
1627
+ async getGlobalTimesheetsRequestOpts(requestParameters) {
1628
+ if (requestParameters['projectId'] == null) {
1629
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getGlobalTimesheets().');
1630
+ }
1631
+ const queryParameters = {};
1632
+ if (requestParameters['page'] != null) {
1633
+ queryParameters['page'] = requestParameters['page'];
1634
+ }
1635
+ if (requestParameters['pageSize'] != null) {
1636
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1637
+ }
1638
+ if (requestParameters['search'] != null) {
1639
+ queryParameters['search'] = requestParameters['search'];
1640
+ }
1641
+ const headerParameters = {};
1642
+ if (this.configuration && this.configuration.apiKey) {
1643
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1644
+ }
1645
+ let urlPath = `/projects/{projectId}/global-timesheets`;
1646
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1647
+ return {
1648
+ path: urlPath,
1649
+ method: 'GET',
1650
+ headers: headerParameters,
1651
+ query: queryParameters,
1652
+ };
1653
+ }
1654
+ /**
1655
+ * Get all global timesheets in a project
1656
+ * Get all global timesheets in a project
1657
+ */
1658
+ async getGlobalTimesheetsRaw(requestParameters, initOverrides) {
1659
+ const requestOptions = await this.getGlobalTimesheetsRequestOpts(requestParameters);
1660
+ const response = await this.request(requestOptions, initOverrides);
1661
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedGlobalTimesheets_1.PaginatedGlobalTimesheetsFromJSON)(jsonValue));
1662
+ }
1663
+ /**
1664
+ * Get all global timesheets in a project
1665
+ * Get all global timesheets in a project
1666
+ */
1667
+ async getGlobalTimesheets(requestParameters, initOverrides) {
1668
+ const response = await this.getGlobalTimesheetsRaw(requestParameters, initOverrides);
1669
+ return await response.value();
1670
+ }
1671
+ /**
1672
+ * Creates request options for getHolidays without sending the request
1673
+ */
1674
+ async getHolidaysRequestOpts(requestParameters) {
1675
+ const queryParameters = {};
1676
+ if (requestParameters['page'] != null) {
1677
+ queryParameters['page'] = requestParameters['page'];
1678
+ }
1679
+ if (requestParameters['pageSize'] != null) {
1680
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1681
+ }
1682
+ if (requestParameters['search'] != null) {
1683
+ queryParameters['search'] = requestParameters['search'];
1684
+ }
1685
+ const headerParameters = {};
1686
+ if (this.configuration && this.configuration.apiKey) {
1687
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1688
+ }
1689
+ let urlPath = `/holidays`;
1690
+ return {
1691
+ path: urlPath,
1692
+ method: 'GET',
1693
+ headers: headerParameters,
1694
+ query: queryParameters,
1695
+ };
1696
+ }
1697
+ /**
1698
+ * Returns a paginated list of a user\'s holidays
1699
+ */
1700
+ async getHolidaysRaw(requestParameters, initOverrides) {
1701
+ const requestOptions = await this.getHolidaysRequestOpts(requestParameters);
1702
+ const response = await this.request(requestOptions, initOverrides);
1703
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedHolidaysDTO_1.PaginatedHolidaysDTOFromJSON)(jsonValue));
1704
+ }
1705
+ /**
1706
+ * Returns a paginated list of a user\'s holidays
1707
+ */
1708
+ async getHolidays(requestParameters = {}, initOverrides) {
1709
+ const response = await this.getHolidaysRaw(requestParameters, initOverrides);
1710
+ return await response.value();
1711
+ }
1712
+ /**
1713
+ * Creates request options for getHolidaysByEmployee without sending the request
1714
+ */
1715
+ async getHolidaysByEmployeeRequestOpts(requestParameters) {
1716
+ if (requestParameters['userId'] == null) {
1717
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getHolidaysByEmployee().');
1718
+ }
1719
+ const queryParameters = {};
1720
+ if (requestParameters['page'] != null) {
1721
+ queryParameters['page'] = requestParameters['page'];
1722
+ }
1723
+ if (requestParameters['pageSize'] != null) {
1724
+ queryParameters['pageSize'] = requestParameters['pageSize'];
1725
+ }
1726
+ if (requestParameters['search'] != null) {
1727
+ queryParameters['search'] = requestParameters['search'];
1728
+ }
1729
+ const headerParameters = {};
1730
+ if (this.configuration && this.configuration.apiKey) {
1731
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1732
+ }
1733
+ let urlPath = `/employees/{userId}/holidays`;
1734
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1735
+ return {
1736
+ path: urlPath,
1737
+ method: 'GET',
1738
+ headers: headerParameters,
1739
+ query: queryParameters,
1740
+ };
1741
+ }
1742
+ /**
1743
+ * returns a paginated list of a user\'s holidays
1744
+ */
1745
+ async getHolidaysByEmployeeRaw(requestParameters, initOverrides) {
1746
+ const requestOptions = await this.getHolidaysByEmployeeRequestOpts(requestParameters);
1747
+ const response = await this.request(requestOptions, initOverrides);
1748
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedHolidaysDTO_1.PaginatedHolidaysDTOFromJSON)(jsonValue));
1749
+ }
1750
+ /**
1751
+ * returns a paginated list of a user\'s holidays
1752
+ */
1753
+ async getHolidaysByEmployee(requestParameters, initOverrides) {
1754
+ const response = await this.getHolidaysByEmployeeRaw(requestParameters, initOverrides);
1755
+ return await response.value();
1756
+ }
1757
+ /**
1758
+ * Creates request options for getJiraAccount without sending the request
1759
+ */
1760
+ async getJiraAccountRequestOpts() {
1761
+ const queryParameters = {};
1762
+ const headerParameters = {};
1763
+ if (this.configuration && this.configuration.apiKey) {
1764
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1765
+ }
1766
+ let urlPath = `/jira-users/jira-accounts`;
1767
+ return {
1768
+ path: urlPath,
1769
+ method: 'GET',
1770
+ headers: headerParameters,
1771
+ query: queryParameters,
1772
+ };
1773
+ }
1774
+ /**
1775
+ * Get Jira account for the authenticated user
1776
+ * Get Jira account
1777
+ */
1778
+ async getJiraAccountRaw(initOverrides) {
1779
+ const requestOptions = await this.getJiraAccountRequestOpts();
1780
+ const response = await this.request(requestOptions, initOverrides);
1781
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientJiraAccountDTO_1.ClientJiraAccountDTOFromJSON));
1782
+ }
1783
+ /**
1784
+ * Get Jira account for the authenticated user
1785
+ * Get Jira account
1786
+ */
1787
+ async getJiraAccount(initOverrides) {
1788
+ const response = await this.getJiraAccountRaw(initOverrides);
1789
+ return await response.value();
1790
+ }
1791
+ /**
1792
+ * Creates request options for getJiraUser without sending the request
1793
+ */
1794
+ async getJiraUserRequestOpts() {
1795
+ const queryParameters = {};
1796
+ const headerParameters = {};
1797
+ if (this.configuration && this.configuration.apiKey) {
1798
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1799
+ }
1800
+ let urlPath = `/jira-users`;
1801
+ return {
1802
+ path: urlPath,
1803
+ method: 'GET',
1804
+ headers: headerParameters,
1805
+ query: queryParameters,
1806
+ };
1807
+ }
1808
+ /**
1809
+ * Get Jira user information for the authenticated user
1810
+ * Get Jira user
1811
+ */
1812
+ async getJiraUserRaw(initOverrides) {
1813
+ const requestOptions = await this.getJiraUserRequestOpts();
1814
+ const response = await this.request(requestOptions, initOverrides);
1815
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientJiraUserDTO_1.ClientJiraUserDTOFromJSON)(jsonValue));
1816
+ }
1817
+ /**
1818
+ * Get Jira user information for the authenticated user
1819
+ * Get Jira user
1820
+ */
1821
+ async getJiraUser(initOverrides) {
1822
+ const response = await this.getJiraUserRaw(initOverrides);
1823
+ return await response.value();
1824
+ }
1825
+ /**
1826
+ * Creates request options for getMyAccount without sending the request
1827
+ */
1828
+ async getMyAccountRequestOpts() {
1829
+ const queryParameters = {};
1830
+ const headerParameters = {};
1831
+ if (this.configuration && this.configuration.apiKey) {
1832
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1833
+ }
1834
+ let urlPath = `/me`;
1835
+ return {
1836
+ path: urlPath,
1837
+ method: 'GET',
1838
+ headers: headerParameters,
1839
+ query: queryParameters,
1840
+ };
1841
+ }
1842
+ /**
1843
+ * Get my account info
1844
+ * Get my account info
1845
+ */
1846
+ async getMyAccountRaw(initOverrides) {
1847
+ const requestOptions = await this.getMyAccountRequestOpts();
1848
+ const response = await this.request(requestOptions, initOverrides);
1849
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, AccountInfoDTO_1.AccountInfoDTOFromJSON)(jsonValue));
1850
+ }
1851
+ /**
1852
+ * Get my account info
1853
+ * Get my account info
1854
+ */
1855
+ async getMyAccount(initOverrides) {
1856
+ const response = await this.getMyAccountRaw(initOverrides);
1857
+ return await response.value();
1858
+ }
1859
+ /**
1860
+ * Creates request options for getMyCommits without sending the request
1861
+ */
1862
+ async getMyCommitsRequestOpts(requestParameters) {
1863
+ if (requestParameters['from'] == null) {
1864
+ throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling getMyCommits().');
1865
+ }
1866
+ if (requestParameters['to'] == null) {
1867
+ throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling getMyCommits().');
1868
+ }
1869
+ const queryParameters = {};
1870
+ if (requestParameters['from'] != null) {
1871
+ queryParameters['from'] = requestParameters['from'].toISOString().substring(0, 10);
1872
+ }
1873
+ if (requestParameters['to'] != null) {
1874
+ queryParameters['to'] = requestParameters['to'].toISOString().substring(0, 10);
1875
+ }
1876
+ if (requestParameters['groupBy'] != null) {
1877
+ queryParameters['groupBy'] = requestParameters['groupBy'];
1878
+ }
1879
+ const headerParameters = {};
1880
+ if (this.configuration && this.configuration.apiKey) {
1881
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1882
+ }
1883
+ let urlPath = `/commits`;
1884
+ return {
1885
+ path: urlPath,
1886
+ method: 'GET',
1887
+ headers: headerParameters,
1888
+ query: queryParameters,
1889
+ };
1890
+ }
1891
+ /**
1892
+ * Get commit statistics for the authenticated user
1893
+ * Get my commits
1894
+ */
1895
+ async getMyCommitsRaw(requestParameters, initOverrides) {
1896
+ const requestOptions = await this.getMyCommitsRequestOpts(requestParameters);
1897
+ const response = await this.request(requestOptions, initOverrides);
1898
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClientGithubCommitCountDTO_1.ClientGithubCommitCountDTOFromJSON));
1899
+ }
1900
+ /**
1901
+ * Get commit statistics for the authenticated user
1902
+ * Get my commits
1903
+ */
1904
+ async getMyCommits(requestParameters, initOverrides) {
1905
+ const response = await this.getMyCommitsRaw(requestParameters, initOverrides);
1906
+ return await response.value();
1907
+ }
1908
+ /**
1909
+ * Creates request options for getProjectById without sending the request
1910
+ */
1911
+ async getProjectByIdRequestOpts(requestParameters) {
1912
+ if (requestParameters['projectId'] == null) {
1913
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getProjectById().');
1914
+ }
1915
+ const queryParameters = {};
1916
+ const headerParameters = {};
1917
+ if (this.configuration && this.configuration.apiKey) {
1918
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
1919
+ }
1920
+ let urlPath = `/projects/{projectId}`;
1921
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1922
+ return {
1923
+ path: urlPath,
1924
+ method: 'GET',
1925
+ headers: headerParameters,
1926
+ query: queryParameters,
1927
+ };
1928
+ }
1929
+ /**
1930
+ * Get a project
1931
+ * Get a project by ID
1932
+ */
1933
+ async getProjectByIdRaw(requestParameters, initOverrides) {
1934
+ const requestOptions = await this.getProjectByIdRequestOpts(requestParameters);
1935
+ const response = await this.request(requestOptions, initOverrides);
1936
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ProjectDTO_1.ProjectDTOFromJSON)(jsonValue));
1937
+ }
1938
+ /**
1939
+ * Get a project
1940
+ * Get a project by ID
1941
+ */
1942
+ async getProjectById(requestParameters, initOverrides) {
1943
+ const response = await this.getProjectByIdRaw(requestParameters, initOverrides);
1944
+ return await response.value();
1945
+ }
1946
+ /**
1947
+ * Creates request options for getProjectReportByUser without sending the request
1948
+ */
1949
+ async getProjectReportByUserRequestOpts(requestParameters) {
1950
+ if (requestParameters['userId'] == null) {
1951
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getProjectReportByUser().');
1952
+ }
1953
+ if (requestParameters['startDate'] == null) {
1954
+ throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling getProjectReportByUser().');
1955
+ }
1956
+ if (requestParameters['endDate'] == null) {
1957
+ throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling getProjectReportByUser().');
1958
+ }
1959
+ const queryParameters = {};
1960
+ if (requestParameters['userId'] != null) {
1961
+ queryParameters['userId'] = requestParameters['userId'];
1962
+ }
1963
+ if (requestParameters['startDate'] != null) {
1964
+ queryParameters['startDate'] = requestParameters['startDate'].toISOString();
1965
+ }
1966
+ if (requestParameters['endDate'] != null) {
1967
+ queryParameters['endDate'] = requestParameters['endDate'].toISOString();
1968
+ }
1969
+ const headerParameters = {};
1970
+ if (this.configuration && this.configuration.apiKey) {
1971
+ headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // api_key authentication
1972
+ }
1973
+ let urlPath = `/api/projects/report-by-user`;
1974
+ return {
1975
+ path: urlPath,
1976
+ method: 'GET',
1977
+ headers: headerParameters,
1978
+ query: queryParameters,
1979
+ };
1980
+ }
1981
+ /**
1982
+ * Get all projects an employee has access to
1983
+ * Get all projects an employee has access to
1984
+ */
1985
+ async getProjectReportByUserRaw(requestParameters, initOverrides) {
1986
+ const requestOptions = await this.getProjectReportByUserRequestOpts(requestParameters);
1987
+ const response = await this.request(requestOptions, initOverrides);
1988
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, UserProjectReport_1.UserProjectReportFromJSON)(jsonValue));
1989
+ }
1990
+ /**
1991
+ * Get all projects an employee has access to
1992
+ * Get all projects an employee has access to
1993
+ */
1994
+ async getProjectReportByUser(requestParameters, initOverrides) {
1995
+ const response = await this.getProjectReportByUserRaw(requestParameters, initOverrides);
1996
+ return await response.value();
1997
+ }
1998
+ /**
1999
+ * Creates request options for getProjects without sending the request
2000
+ */
2001
+ async getProjectsRequestOpts(requestParameters) {
2002
+ const queryParameters = {};
2003
+ if (requestParameters['page'] != null) {
2004
+ queryParameters['page'] = requestParameters['page'];
2005
+ }
2006
+ if (requestParameters['pageSize'] != null) {
2007
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2008
+ }
2009
+ if (requestParameters['search'] != null) {
2010
+ queryParameters['search'] = requestParameters['search'];
2011
+ }
2012
+ const headerParameters = {};
2013
+ if (this.configuration && this.configuration.apiKey) {
2014
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2015
+ }
2016
+ let urlPath = `/projects`;
2017
+ return {
2018
+ path: urlPath,
2019
+ method: 'GET',
2020
+ headers: headerParameters,
2021
+ query: queryParameters,
2022
+ };
2023
+ }
2024
+ /**
2025
+ * Get all projects a user or employee has access to
2026
+ * Get all projects a user or employee has access to
2027
+ */
2028
+ async getProjectsRaw(requestParameters, initOverrides) {
2029
+ const requestOptions = await this.getProjectsRequestOpts(requestParameters);
2030
+ const response = await this.request(requestOptions, initOverrides);
2031
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedProjects_1.PaginatedProjectsFromJSON)(jsonValue));
2032
+ }
2033
+ /**
2034
+ * Get all projects a user or employee has access to
2035
+ * Get all projects a user or employee has access to
2036
+ */
2037
+ async getProjects(requestParameters = {}, initOverrides) {
2038
+ const response = await this.getProjectsRaw(requestParameters, initOverrides);
2039
+ return await response.value();
2040
+ }
2041
+ /**
2042
+ * Creates request options for getProjectsAsEmployee without sending the request
2043
+ */
2044
+ async getProjectsAsEmployeeRequestOpts(requestParameters) {
2045
+ const queryParameters = {};
2046
+ if (requestParameters['page'] != null) {
2047
+ queryParameters['page'] = requestParameters['page'];
2048
+ }
2049
+ if (requestParameters['pageSize'] != null) {
2050
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2051
+ }
2052
+ if (requestParameters['search'] != null) {
2053
+ queryParameters['search'] = requestParameters['search'];
2054
+ }
2055
+ const headerParameters = {};
2056
+ if (this.configuration && this.configuration.apiKey) {
2057
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2058
+ }
2059
+ let urlPath = `/employee-projects`;
2060
+ return {
2061
+ path: urlPath,
2062
+ method: 'GET',
2063
+ headers: headerParameters,
2064
+ query: queryParameters,
2065
+ };
2066
+ }
2067
+ /**
2068
+ * Get all projects an employee has access to
2069
+ * Get all projects an employee has access to
2070
+ */
2071
+ async getProjectsAsEmployeeRaw(requestParameters, initOverrides) {
2072
+ const requestOptions = await this.getProjectsAsEmployeeRequestOpts(requestParameters);
2073
+ const response = await this.request(requestOptions, initOverrides);
2074
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedEmployeeProjects_1.PaginatedEmployeeProjectsFromJSON)(jsonValue));
2075
+ }
2076
+ /**
2077
+ * Get all projects an employee has access to
2078
+ * Get all projects an employee has access to
2079
+ */
2080
+ async getProjectsAsEmployee(requestParameters = {}, initOverrides) {
2081
+ const response = await this.getProjectsAsEmployeeRaw(requestParameters, initOverrides);
2082
+ return await response.value();
2083
+ }
2084
+ /**
2085
+ * Creates request options for getTeam without sending the request
2086
+ */
2087
+ async getTeamRequestOpts(requestParameters) {
2088
+ if (requestParameters['projectId'] == null) {
2089
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getTeam().');
2090
+ }
2091
+ const queryParameters = {};
2092
+ if (requestParameters['page'] != null) {
2093
+ queryParameters['page'] = requestParameters['page'];
2094
+ }
2095
+ if (requestParameters['pageSize'] != null) {
2096
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2097
+ }
2098
+ if (requestParameters['search'] != null) {
2099
+ queryParameters['search'] = requestParameters['search'];
2100
+ }
2101
+ const headerParameters = {};
2102
+ if (this.configuration && this.configuration.apiKey) {
2103
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2104
+ }
2105
+ let urlPath = `/projects/{projectId}/team`;
2106
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2107
+ return {
2108
+ path: urlPath,
2109
+ method: 'GET',
2110
+ headers: headerParameters,
2111
+ query: queryParameters,
2112
+ };
2113
+ }
2114
+ /**
2115
+ * Get all users in a project
2116
+ * Get all users in a project
2117
+ */
2118
+ async getTeamRaw(requestParameters, initOverrides) {
2119
+ const requestOptions = await this.getTeamRequestOpts(requestParameters);
2120
+ const response = await this.request(requestOptions, initOverrides);
2121
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedUsers_1.PaginatedUsersFromJSON)(jsonValue));
2122
+ }
2123
+ /**
2124
+ * Get all users in a project
2125
+ * Get all users in a project
2126
+ */
2127
+ async getTeam(requestParameters, initOverrides) {
2128
+ const response = await this.getTeamRaw(requestParameters, initOverrides);
2129
+ return await response.value();
2130
+ }
2131
+ /**
2132
+ * Creates request options for getTimesheet without sending the request
2133
+ */
2134
+ async getTimesheetRequestOpts(requestParameters) {
2135
+ if (requestParameters['projectId'] == null) {
2136
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getTimesheet().');
2137
+ }
2138
+ if (requestParameters['timesheetId'] == null) {
2139
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling getTimesheet().');
2140
+ }
2141
+ const queryParameters = {};
2142
+ const headerParameters = {};
2143
+ if (this.configuration && this.configuration.apiKey) {
2144
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2145
+ }
2146
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}`;
2147
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2148
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2149
+ return {
2150
+ path: urlPath,
2151
+ method: 'GET',
2152
+ headers: headerParameters,
2153
+ query: queryParameters,
2154
+ };
2155
+ }
2156
+ /**
2157
+ * Get a timesheet
2158
+ * Get a timesheet
2159
+ */
2160
+ async getTimesheetRaw(requestParameters, initOverrides) {
2161
+ const requestOptions = await this.getTimesheetRequestOpts(requestParameters);
2162
+ const response = await this.request(requestOptions, initOverrides);
2163
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, TimesheetDTO_1.TimesheetDTOFromJSON)(jsonValue));
2164
+ }
2165
+ /**
2166
+ * Get a timesheet
2167
+ * Get a timesheet
2168
+ */
2169
+ async getTimesheet(requestParameters, initOverrides) {
2170
+ const response = await this.getTimesheetRaw(requestParameters, initOverrides);
2171
+ return await response.value();
2172
+ }
2173
+ /**
2174
+ * Creates request options for getTimesheets without sending the request
2175
+ */
2176
+ async getTimesheetsRequestOpts(requestParameters) {
2177
+ if (requestParameters['projectId'] == null) {
2178
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getTimesheets().');
2179
+ }
2180
+ const queryParameters = {};
2181
+ if (requestParameters['page'] != null) {
2182
+ queryParameters['page'] = requestParameters['page'];
2183
+ }
2184
+ if (requestParameters['pageSize'] != null) {
2185
+ queryParameters['pageSize'] = requestParameters['pageSize'];
2186
+ }
2187
+ if (requestParameters['search'] != null) {
2188
+ queryParameters['search'] = requestParameters['search'];
2189
+ }
2190
+ const headerParameters = {};
2191
+ if (this.configuration && this.configuration.apiKey) {
2192
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2193
+ }
2194
+ let urlPath = `/projects/{projectId}/timesheets`;
2195
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2196
+ return {
2197
+ path: urlPath,
2198
+ method: 'GET',
2199
+ headers: headerParameters,
2200
+ query: queryParameters,
2201
+ };
2202
+ }
2203
+ /**
2204
+ * Get all timesheets in a project without timesheet entries.
2205
+ * Get all timesheets in a project without timesheet entries.
2206
+ */
2207
+ async getTimesheetsRaw(requestParameters, initOverrides) {
2208
+ const requestOptions = await this.getTimesheetsRequestOpts(requestParameters);
2209
+ const response = await this.request(requestOptions, initOverrides);
2210
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedTimesheets_1.PaginatedTimesheetsFromJSON)(jsonValue));
2211
+ }
2212
+ /**
2213
+ * Get all timesheets in a project without timesheet entries.
2214
+ * Get all timesheets in a project without timesheet entries.
2215
+ */
2216
+ async getTimesheets(requestParameters, initOverrides) {
2217
+ const response = await this.getTimesheetsRaw(requestParameters, initOverrides);
2218
+ return await response.value();
2219
+ }
2220
+ /**
2221
+ * Creates request options for inviteEmployee without sending the request
2222
+ */
2223
+ async inviteEmployeeRequestOpts(requestParameters) {
2224
+ if (requestParameters['employeeDTO'] == null) {
2225
+ throw new runtime.RequiredError('employeeDTO', 'Required parameter "employeeDTO" was null or undefined when calling inviteEmployee().');
2226
+ }
2227
+ const queryParameters = {};
2228
+ const headerParameters = {};
2229
+ headerParameters['Content-Type'] = 'application/json';
2230
+ if (this.configuration && this.configuration.apiKey) {
2231
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2232
+ }
2233
+ let urlPath = `/employees/invite`;
2234
+ return {
2235
+ path: urlPath,
2236
+ method: 'POST',
2237
+ headers: headerParameters,
2238
+ query: queryParameters,
2239
+ body: (0, EmployeeDTO_1.EmployeeDTOToJSON)(requestParameters['employeeDTO']),
2240
+ };
2241
+ }
2242
+ /**
2243
+ * Invite an employee to a company
2244
+ * Invite an employee to a company
2245
+ */
2246
+ async inviteEmployeeRaw(requestParameters, initOverrides) {
2247
+ const requestOptions = await this.inviteEmployeeRequestOpts(requestParameters);
2248
+ const response = await this.request(requestOptions, initOverrides);
2249
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmployeeDTO_1.EmployeeDTOFromJSON)(jsonValue));
2250
+ }
2251
+ /**
2252
+ * Invite an employee to a company
2253
+ * Invite an employee to a company
2254
+ */
2255
+ async inviteEmployee(requestParameters, initOverrides) {
2256
+ const response = await this.inviteEmployeeRaw(requestParameters, initOverrides);
2257
+ return await response.value();
2258
+ }
2259
+ /**
2260
+ * Creates request options for markEmployeeInvoiceAsPaid without sending the request
2261
+ */
2262
+ async markEmployeeInvoiceAsPaidRequestOpts(requestParameters) {
2263
+ if (requestParameters['userId'] == null) {
2264
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling markEmployeeInvoiceAsPaid().');
2265
+ }
2266
+ if (requestParameters['employeeInvoiceId'] == null) {
2267
+ throw new runtime.RequiredError('employeeInvoiceId', 'Required parameter "employeeInvoiceId" was null or undefined when calling markEmployeeInvoiceAsPaid().');
2268
+ }
2269
+ if (requestParameters['markEmployeeInvoicePaidDTO'] == null) {
2270
+ throw new runtime.RequiredError('markEmployeeInvoicePaidDTO', 'Required parameter "markEmployeeInvoicePaidDTO" was null or undefined when calling markEmployeeInvoiceAsPaid().');
2271
+ }
2272
+ const queryParameters = {};
2273
+ const headerParameters = {};
2274
+ headerParameters['Content-Type'] = 'application/json';
2275
+ if (this.configuration && this.configuration.apiKey) {
2276
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2277
+ }
2278
+ let urlPath = `/employees/{userId}/invoices/{employeeInvoiceId}/mark-paid`;
2279
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2280
+ urlPath = urlPath.replace('{employeeInvoiceId}', encodeURIComponent(String(requestParameters['employeeInvoiceId'])));
2281
+ return {
2282
+ path: urlPath,
2283
+ method: 'POST',
2284
+ headers: headerParameters,
2285
+ query: queryParameters,
2286
+ body: (0, MarkEmployeeInvoicePaidDTO_1.MarkEmployeeInvoicePaidDTOToJSON)(requestParameters['markEmployeeInvoicePaidDTO']),
2287
+ };
2288
+ }
2289
+ /**
2290
+ * Mark an employee invoice as paid
2291
+ * Mark an employee invoice as paid
2292
+ */
2293
+ async markEmployeeInvoiceAsPaidRaw(requestParameters, initOverrides) {
2294
+ const requestOptions = await this.markEmployeeInvoiceAsPaidRequestOpts(requestParameters);
2295
+ const response = await this.request(requestOptions, initOverrides);
2296
+ return new runtime.VoidApiResponse(response);
2297
+ }
2298
+ /**
2299
+ * Mark an employee invoice as paid
2300
+ * Mark an employee invoice as paid
2301
+ */
2302
+ async markEmployeeInvoiceAsPaid(requestParameters, initOverrides) {
2303
+ await this.markEmployeeInvoiceAsPaidRaw(requestParameters, initOverrides);
2304
+ }
2305
+ /**
2306
+ * Creates request options for markInvoiceAsPaid without sending the request
2307
+ */
2308
+ async markInvoiceAsPaidRequestOpts(requestParameters) {
2309
+ if (requestParameters['clientId'] == null) {
2310
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling markInvoiceAsPaid().');
2311
+ }
2312
+ if (requestParameters['invoiceId'] == null) {
2313
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling markInvoiceAsPaid().');
2314
+ }
2315
+ if (requestParameters['markInvoicePaidDTO'] == null) {
2316
+ throw new runtime.RequiredError('markInvoicePaidDTO', 'Required parameter "markInvoicePaidDTO" was null or undefined when calling markInvoiceAsPaid().');
2317
+ }
2318
+ const queryParameters = {};
2319
+ const headerParameters = {};
2320
+ headerParameters['Content-Type'] = 'application/json';
2321
+ if (this.configuration && this.configuration.apiKey) {
2322
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2323
+ }
2324
+ let urlPath = `/clients/{clientId}/invoices/{invoiceId}/mark-paid`;
2325
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
2326
+ urlPath = urlPath.replace('{invoiceId}', encodeURIComponent(String(requestParameters['invoiceId'])));
2327
+ return {
2328
+ path: urlPath,
2329
+ method: 'POST',
2330
+ headers: headerParameters,
2331
+ query: queryParameters,
2332
+ body: (0, MarkInvoicePaidDTO_1.MarkInvoicePaidDTOToJSON)(requestParameters['markInvoicePaidDTO']),
2333
+ };
2334
+ }
2335
+ /**
2336
+ * Mark a client invoice as paid
2337
+ * Mark a client invoice as paid with the specified date and time
2338
+ */
2339
+ async markInvoiceAsPaidRaw(requestParameters, initOverrides) {
2340
+ const requestOptions = await this.markInvoiceAsPaidRequestOpts(requestParameters);
2341
+ const response = await this.request(requestOptions, initOverrides);
2342
+ return new runtime.VoidApiResponse(response);
2343
+ }
2344
+ /**
2345
+ * Mark a client invoice as paid
2346
+ * Mark a client invoice as paid with the specified date and time
2347
+ */
2348
+ async markInvoiceAsPaid(requestParameters, initOverrides) {
2349
+ await this.markInvoiceAsPaidRaw(requestParameters, initOverrides);
2350
+ }
2351
+ /**
2352
+ * Creates request options for openSentTimesheet without sending the request
2353
+ */
2354
+ async openSentTimesheetRequestOpts(requestParameters) {
2355
+ if (requestParameters['projectId'] == null) {
2356
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling openSentTimesheet().');
2357
+ }
2358
+ if (requestParameters['timesheetId'] == null) {
2359
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling openSentTimesheet().');
2360
+ }
2361
+ const queryParameters = {};
2362
+ const headerParameters = {};
2363
+ if (this.configuration && this.configuration.apiKey) {
2364
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2365
+ }
2366
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/open`;
2367
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2368
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2369
+ return {
2370
+ path: urlPath,
2371
+ method: 'PATCH',
2372
+ headers: headerParameters,
2373
+ query: queryParameters,
2374
+ };
2375
+ }
2376
+ /**
2377
+ * Open a sent timesheet
2378
+ * Open a sent timesheet
2379
+ */
2380
+ async openSentTimesheetRaw(requestParameters, initOverrides) {
2381
+ const requestOptions = await this.openSentTimesheetRequestOpts(requestParameters);
2382
+ const response = await this.request(requestOptions, initOverrides);
2383
+ return new runtime.VoidApiResponse(response);
2384
+ }
2385
+ /**
2386
+ * Open a sent timesheet
2387
+ * Open a sent timesheet
2388
+ */
2389
+ async openSentTimesheet(requestParameters, initOverrides) {
2390
+ await this.openSentTimesheetRaw(requestParameters, initOverrides);
2391
+ }
2392
+ /**
2393
+ * Creates request options for removeJiraAccount without sending the request
2394
+ */
2395
+ async removeJiraAccountRequestOpts(requestParameters) {
2396
+ if (requestParameters['jiraAccountId'] == null) {
2397
+ throw new runtime.RequiredError('jiraAccountId', 'Required parameter "jiraAccountId" was null or undefined when calling removeJiraAccount().');
2398
+ }
2399
+ const queryParameters = {};
2400
+ const headerParameters = {};
2401
+ if (this.configuration && this.configuration.apiKey) {
2402
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2403
+ }
2404
+ let urlPath = `/jira-users/jira-accounts/{jiraAccountId}`;
2405
+ urlPath = urlPath.replace('{jiraAccountId}', encodeURIComponent(String(requestParameters['jiraAccountId'])));
2406
+ return {
2407
+ path: urlPath,
2408
+ method: 'DELETE',
2409
+ headers: headerParameters,
2410
+ query: queryParameters,
2411
+ };
2412
+ }
2413
+ /**
2414
+ * Remove specific jira account for the current user
2415
+ * Remove jira account
2416
+ */
2417
+ async removeJiraAccountRaw(requestParameters, initOverrides) {
2418
+ const requestOptions = await this.removeJiraAccountRequestOpts(requestParameters);
2419
+ const response = await this.request(requestOptions, initOverrides);
2420
+ return new runtime.VoidApiResponse(response);
2421
+ }
2422
+ /**
2423
+ * Remove specific jira account for the current user
2424
+ * Remove jira account
2425
+ */
2426
+ async removeJiraAccount(requestParameters, initOverrides) {
2427
+ await this.removeJiraAccountRaw(requestParameters, initOverrides);
2428
+ }
2429
+ /**
2430
+ * Creates request options for sendTimesheet without sending the request
2431
+ */
2432
+ async sendTimesheetRequestOpts(requestParameters) {
2433
+ if (requestParameters['projectId'] == null) {
2434
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling sendTimesheet().');
2435
+ }
2436
+ if (requestParameters['timesheetId'] == null) {
2437
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling sendTimesheet().');
2438
+ }
2439
+ const queryParameters = {};
2440
+ const headerParameters = {};
2441
+ if (this.configuration && this.configuration.apiKey) {
2442
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2443
+ }
2444
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/send`;
2445
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2446
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2447
+ return {
2448
+ path: urlPath,
2449
+ method: 'PATCH',
2450
+ headers: headerParameters,
2451
+ query: queryParameters,
2452
+ };
2453
+ }
2454
+ /**
2455
+ * Send a timesheet
2456
+ * Send a timesheet
2457
+ */
2458
+ async sendTimesheetRaw(requestParameters, initOverrides) {
2459
+ const requestOptions = await this.sendTimesheetRequestOpts(requestParameters);
2460
+ const response = await this.request(requestOptions, initOverrides);
2461
+ return new runtime.VoidApiResponse(response);
2462
+ }
2463
+ /**
2464
+ * Send a timesheet
2465
+ * Send a timesheet
2466
+ */
2467
+ async sendTimesheet(requestParameters, initOverrides) {
2468
+ await this.sendTimesheetRaw(requestParameters, initOverrides);
2469
+ }
2470
+ /**
2471
+ * Creates request options for updateAdjustedEntry without sending the request
2472
+ */
2473
+ async updateAdjustedEntryRequestOpts(requestParameters) {
2474
+ if (requestParameters['projectId'] == null) {
2475
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateAdjustedEntry().');
2476
+ }
2477
+ if (requestParameters['timesheetId'] == null) {
2478
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateAdjustedEntry().');
2479
+ }
2480
+ if (requestParameters['entryId'] == null) {
2481
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateAdjustedEntry().');
2482
+ }
2483
+ if (requestParameters['adjustedTimesheetUpdateEntryDTO'] == null) {
2484
+ throw new runtime.RequiredError('adjustedTimesheetUpdateEntryDTO', 'Required parameter "adjustedTimesheetUpdateEntryDTO" was null or undefined when calling updateAdjustedEntry().');
2485
+ }
2486
+ const queryParameters = {};
2487
+ const headerParameters = {};
2488
+ headerParameters['Content-Type'] = 'application/json';
2489
+ if (this.configuration && this.configuration.apiKey) {
2490
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2491
+ }
2492
+ let urlPath = `/projects/{projectId}/adjusted-timesheets/{timesheetId}/entries/{entryId}`;
2493
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2494
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2495
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
2496
+ return {
2497
+ path: urlPath,
2498
+ method: 'PATCH',
2499
+ headers: headerParameters,
2500
+ query: queryParameters,
2501
+ body: (0, AdjustedTimesheetUpdateEntryDTO_1.AdjustedTimesheetUpdateEntryDTOToJSON)(requestParameters['adjustedTimesheetUpdateEntryDTO']),
2502
+ };
2503
+ }
2504
+ /**
2505
+ * Update an adjusted timesheet entry
2506
+ * Update an adjusted timesheet entry
2507
+ */
2508
+ async updateAdjustedEntryRaw(requestParameters, initOverrides) {
2509
+ const requestOptions = await this.updateAdjustedEntryRequestOpts(requestParameters);
2510
+ const response = await this.request(requestOptions, initOverrides);
2511
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, AdjustedTimesheetEntryDTO_1.AdjustedTimesheetEntryDTOFromJSON)(jsonValue));
2512
+ }
2513
+ /**
2514
+ * Update an adjusted timesheet entry
2515
+ * Update an adjusted timesheet entry
2516
+ */
2517
+ async updateAdjustedEntry(requestParameters, initOverrides) {
2518
+ const response = await this.updateAdjustedEntryRaw(requestParameters, initOverrides);
2519
+ return await response.value();
2520
+ }
2521
+ /**
2522
+ * Creates request options for updateClient without sending the request
2523
+ */
2524
+ async updateClientRequestOpts(requestParameters) {
2525
+ if (requestParameters['clientId'] == null) {
2526
+ throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling updateClient().');
2527
+ }
2528
+ if (requestParameters['clientDTO'] == null) {
2529
+ throw new runtime.RequiredError('clientDTO', 'Required parameter "clientDTO" was null or undefined when calling updateClient().');
2530
+ }
2531
+ const queryParameters = {};
2532
+ const headerParameters = {};
2533
+ headerParameters['Content-Type'] = 'application/json';
2534
+ if (this.configuration && this.configuration.apiKey) {
2535
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2536
+ }
2537
+ let urlPath = `/clients/{clientId}`;
2538
+ urlPath = urlPath.replace('{clientId}', encodeURIComponent(String(requestParameters['clientId'])));
2539
+ return {
2540
+ path: urlPath,
2541
+ method: 'PATCH',
2542
+ headers: headerParameters,
2543
+ query: queryParameters,
2544
+ body: (0, ClientDTO_1.ClientDTOToJSON)(requestParameters['clientDTO']),
2545
+ };
2546
+ }
2547
+ /**
2548
+ * Update client
2549
+ */
2550
+ async updateClientRaw(requestParameters, initOverrides) {
2551
+ const requestOptions = await this.updateClientRequestOpts(requestParameters);
2552
+ const response = await this.request(requestOptions, initOverrides);
2553
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ClientDTO_1.ClientDTOFromJSON)(jsonValue));
2554
+ }
2555
+ /**
2556
+ * Update client
2557
+ */
2558
+ async updateClient(requestParameters, initOverrides) {
2559
+ const response = await this.updateClientRaw(requestParameters, initOverrides);
2560
+ return await response.value();
2561
+ }
2562
+ /**
2563
+ * Creates request options for updateCompany without sending the request
2564
+ */
2565
+ async updateCompanyRequestOpts(requestParameters) {
2566
+ if (requestParameters['companyId'] == null) {
2567
+ throw new runtime.RequiredError('companyId', 'Required parameter "companyId" was null or undefined when calling updateCompany().');
2568
+ }
2569
+ if (requestParameters['companyDTO'] == null) {
2570
+ throw new runtime.RequiredError('companyDTO', 'Required parameter "companyDTO" was null or undefined when calling updateCompany().');
2571
+ }
2572
+ const queryParameters = {};
2573
+ const headerParameters = {};
2574
+ headerParameters['Content-Type'] = 'application/json';
2575
+ if (this.configuration && this.configuration.apiKey) {
2576
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2577
+ }
2578
+ let urlPath = `/companies/{companyId}`;
2579
+ urlPath = urlPath.replace('{companyId}', encodeURIComponent(String(requestParameters['companyId'])));
2580
+ return {
2581
+ path: urlPath,
2582
+ method: 'PATCH',
2583
+ headers: headerParameters,
2584
+ query: queryParameters,
2585
+ body: (0, CompanyDTO_1.CompanyDTOToJSON)(requestParameters['companyDTO']),
2586
+ };
2587
+ }
2588
+ /**
2589
+ * Update a company
2590
+ * Update a company by ID
2591
+ */
2592
+ async updateCompanyRaw(requestParameters, initOverrides) {
2593
+ const requestOptions = await this.updateCompanyRequestOpts(requestParameters);
2594
+ const response = await this.request(requestOptions, initOverrides);
2595
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CompanyDTO_1.CompanyDTOFromJSON)(jsonValue));
2596
+ }
2597
+ /**
2598
+ * Update a company
2599
+ * Update a company by ID
2600
+ */
2601
+ async updateCompany(requestParameters, initOverrides) {
2602
+ const response = await this.updateCompanyRaw(requestParameters, initOverrides);
2603
+ return await response.value();
2604
+ }
2605
+ /**
2606
+ * Creates request options for updateEmployeeData without sending the request
2607
+ */
2608
+ async updateEmployeeDataRequestOpts(requestParameters) {
2609
+ if (requestParameters['userId'] == null) {
2610
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling updateEmployeeData().');
2611
+ }
2612
+ if (requestParameters['employeeUpdateDTO'] == null) {
2613
+ throw new runtime.RequiredError('employeeUpdateDTO', 'Required parameter "employeeUpdateDTO" was null or undefined when calling updateEmployeeData().');
2614
+ }
2615
+ const queryParameters = {};
2616
+ const headerParameters = {};
2617
+ headerParameters['Content-Type'] = 'application/json';
2618
+ if (this.configuration && this.configuration.apiKey) {
2619
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2620
+ }
2621
+ let urlPath = `/employees/{userId}`;
2622
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
2623
+ return {
2624
+ path: urlPath,
2625
+ method: 'PATCH',
2626
+ headers: headerParameters,
2627
+ query: queryParameters,
2628
+ body: (0, EmployeeUpdateDTO_1.EmployeeUpdateDTOToJSON)(requestParameters['employeeUpdateDTO']),
2629
+ };
2630
+ }
2631
+ /**
2632
+ * Update an employee
2633
+ * Update an employee
2634
+ */
2635
+ async updateEmployeeDataRaw(requestParameters, initOverrides) {
2636
+ const requestOptions = await this.updateEmployeeDataRequestOpts(requestParameters);
2637
+ const response = await this.request(requestOptions, initOverrides);
2638
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmployeeDTO_1.EmployeeDTOFromJSON)(jsonValue));
2639
+ }
2640
+ /**
2641
+ * Update an employee
2642
+ * Update an employee
2643
+ */
2644
+ async updateEmployeeData(requestParameters, initOverrides) {
2645
+ const response = await this.updateEmployeeDataRaw(requestParameters, initOverrides);
2646
+ return await response.value();
2647
+ }
2648
+ /**
2649
+ * Creates request options for updateGlobalTimesheetEntry without sending the request
2650
+ */
2651
+ async updateGlobalTimesheetEntryRequestOpts(requestParameters) {
2652
+ if (requestParameters['projectId'] == null) {
2653
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateGlobalTimesheetEntry().');
2654
+ }
2655
+ if (requestParameters['timesheetId'] == null) {
2656
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateGlobalTimesheetEntry().');
2657
+ }
2658
+ if (requestParameters['entryId'] == null) {
2659
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateGlobalTimesheetEntry().');
2660
+ }
2661
+ if (requestParameters['globalTimesheetEntryUpdateDTO'] == null) {
2662
+ throw new runtime.RequiredError('globalTimesheetEntryUpdateDTO', 'Required parameter "globalTimesheetEntryUpdateDTO" was null or undefined when calling updateGlobalTimesheetEntry().');
2663
+ }
2664
+ const queryParameters = {};
2665
+ const headerParameters = {};
2666
+ headerParameters['Content-Type'] = 'application/json';
2667
+ if (this.configuration && this.configuration.apiKey) {
2668
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2669
+ }
2670
+ let urlPath = `/projects/{projectId}/global-timesheets/{timesheetId}/entries/{entryId}`;
2671
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2672
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2673
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
2674
+ return {
2675
+ path: urlPath,
2676
+ method: 'PATCH',
2677
+ headers: headerParameters,
2678
+ query: queryParameters,
2679
+ body: (0, GlobalTimesheetEntryUpdateDTO_1.GlobalTimesheetEntryUpdateDTOToJSON)(requestParameters['globalTimesheetEntryUpdateDTO']),
2680
+ };
2681
+ }
2682
+ /**
2683
+ * Update a global timesheet entry
2684
+ * Update a global timesheet entry
2685
+ */
2686
+ async updateGlobalTimesheetEntryRaw(requestParameters, initOverrides) {
2687
+ const requestOptions = await this.updateGlobalTimesheetEntryRequestOpts(requestParameters);
2688
+ const response = await this.request(requestOptions, initOverrides);
2689
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GlobalTimesheetEntryDTO_1.GlobalTimesheetEntryDTOFromJSON)(jsonValue));
2690
+ }
2691
+ /**
2692
+ * Update a global timesheet entry
2693
+ * Update a global timesheet entry
2694
+ */
2695
+ async updateGlobalTimesheetEntry(requestParameters, initOverrides) {
2696
+ const response = await this.updateGlobalTimesheetEntryRaw(requestParameters, initOverrides);
2697
+ return await response.value();
2698
+ }
2699
+ /**
2700
+ * Creates request options for updateProject without sending the request
2701
+ */
2702
+ async updateProjectRequestOpts(requestParameters) {
2703
+ if (requestParameters['projectId'] == null) {
2704
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateProject().');
2705
+ }
2706
+ if (requestParameters['projectUpdateDTO'] == null) {
2707
+ throw new runtime.RequiredError('projectUpdateDTO', 'Required parameter "projectUpdateDTO" was null or undefined when calling updateProject().');
2708
+ }
2709
+ const queryParameters = {};
2710
+ const headerParameters = {};
2711
+ headerParameters['Content-Type'] = 'application/json';
2712
+ if (this.configuration && this.configuration.apiKey) {
2713
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2714
+ }
2715
+ let urlPath = `/projects/{projectId}`;
2716
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2717
+ return {
2718
+ path: urlPath,
2719
+ method: 'PATCH',
2720
+ headers: headerParameters,
2721
+ query: queryParameters,
2722
+ body: (0, ProjectUpdateDTO_1.ProjectUpdateDTOToJSON)(requestParameters['projectUpdateDTO']),
2723
+ };
2724
+ }
2725
+ /**
2726
+ * Update a project
2727
+ * Update a project by ID
2728
+ */
2729
+ async updateProjectRaw(requestParameters, initOverrides) {
2730
+ const requestOptions = await this.updateProjectRequestOpts(requestParameters);
2731
+ const response = await this.request(requestOptions, initOverrides);
2732
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ProjectDTO_1.ProjectDTOFromJSON)(jsonValue));
2733
+ }
2734
+ /**
2735
+ * Update a project
2736
+ * Update a project by ID
2737
+ */
2738
+ async updateProject(requestParameters, initOverrides) {
2739
+ const response = await this.updateProjectRaw(requestParameters, initOverrides);
2740
+ return await response.value();
2741
+ }
2742
+ /**
2743
+ * Creates request options for updateTeam without sending the request
2744
+ */
2745
+ async updateTeamRequestOpts(requestParameters) {
2746
+ if (requestParameters['projectId'] == null) {
2747
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateTeam().');
2748
+ }
2749
+ if (requestParameters['teamUpdateDTO'] == null) {
2750
+ throw new runtime.RequiredError('teamUpdateDTO', 'Required parameter "teamUpdateDTO" was null or undefined when calling updateTeam().');
2751
+ }
2752
+ const queryParameters = {};
2753
+ const headerParameters = {};
2754
+ headerParameters['Content-Type'] = 'application/json';
2755
+ if (this.configuration && this.configuration.apiKey) {
2756
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2757
+ }
2758
+ let urlPath = `/projects/{projectId}/team`;
2759
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2760
+ return {
2761
+ path: urlPath,
2762
+ method: 'PATCH',
2763
+ headers: headerParameters,
2764
+ query: queryParameters,
2765
+ body: (0, TeamUpdateDTO_1.TeamUpdateDTOToJSON)(requestParameters['teamUpdateDTO']),
2766
+ };
2767
+ }
2768
+ /**
2769
+ * Update a project team
2770
+ * Update a project team
2771
+ */
2772
+ async updateTeamRaw(requestParameters, initOverrides) {
2773
+ const requestOptions = await this.updateTeamRequestOpts(requestParameters);
2774
+ const response = await this.request(requestOptions, initOverrides);
2775
+ return new runtime.VoidApiResponse(response);
2776
+ }
2777
+ /**
2778
+ * Update a project team
2779
+ * Update a project team
2780
+ */
2781
+ async updateTeam(requestParameters, initOverrides) {
2782
+ await this.updateTeamRaw(requestParameters, initOverrides);
2783
+ }
2784
+ /**
2785
+ * Creates request options for updateTimesheetEntry without sending the request
2786
+ */
2787
+ async updateTimesheetEntryRequestOpts(requestParameters) {
2788
+ if (requestParameters['projectId'] == null) {
2789
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling updateTimesheetEntry().');
2790
+ }
2791
+ if (requestParameters['timesheetId'] == null) {
2792
+ throw new runtime.RequiredError('timesheetId', 'Required parameter "timesheetId" was null or undefined when calling updateTimesheetEntry().');
2793
+ }
2794
+ if (requestParameters['entryId'] == null) {
2795
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling updateTimesheetEntry().');
2796
+ }
2797
+ if (requestParameters['timesheetEntryUpdateDTO'] == null) {
2798
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter "timesheetEntryUpdateDTO" was null or undefined when calling updateTimesheetEntry().');
2799
+ }
2800
+ const queryParameters = {};
2801
+ const headerParameters = {};
2802
+ headerParameters['Content-Type'] = 'application/json';
2803
+ if (this.configuration && this.configuration.apiKey) {
2804
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // auth0JWT authentication
2805
+ }
2806
+ let urlPath = `/projects/{projectId}/timesheets/{timesheetId}/entries/{entryId}`;
2807
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
2808
+ urlPath = urlPath.replace('{timesheetId}', encodeURIComponent(String(requestParameters['timesheetId'])));
2809
+ urlPath = urlPath.replace('{entryId}', encodeURIComponent(String(requestParameters['entryId'])));
2810
+ return {
2811
+ path: urlPath,
2812
+ method: 'PATCH',
2813
+ headers: headerParameters,
2814
+ query: queryParameters,
2815
+ body: (0, TimesheetEntryUpdateDTO_1.TimesheetEntryUpdateDTOToJSON)(requestParameters['timesheetEntryUpdateDTO']),
2816
+ };
2817
+ }
2818
+ /**
2819
+ * Update a timesheet entry
2820
+ * Update a timesheet entry
2821
+ */
2822
+ async updateTimesheetEntryRaw(requestParameters, initOverrides) {
2823
+ const requestOptions = await this.updateTimesheetEntryRequestOpts(requestParameters);
2824
+ const response = await this.request(requestOptions, initOverrides);
2825
+ return new runtime.VoidApiResponse(response);
2826
+ }
2827
+ /**
2828
+ * Update a timesheet entry
2829
+ * Update a timesheet entry
2830
+ */
2831
+ async updateTimesheetEntry(requestParameters, initOverrides) {
2832
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
2833
+ }
2834
+ }
2835
+ exports.ClientApi = ClientApi;
2836
+ /**
2837
+ * @export
2838
+ */
2839
+ exports.GetCommitsByUserIDGroupByEnum = {
2840
+ HourOfDay: 'hourOfDay',
2841
+ Year: 'year',
2842
+ Month: 'month',
2843
+ Day: 'day'
2844
+ };
2845
+ /**
2846
+ * @export
2847
+ */
2848
+ exports.GetMyCommitsGroupByEnum = {
2849
+ HourOfDay: 'hourOfDay',
2850
+ Year: 'year',
2851
+ Month: 'month',
2852
+ Day: 'day'
2853
+ };
2854
+ //# sourceMappingURL=ClientApi.js.map