tuix-timesheets-api 0.15.0 → 0.17.0

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.
@@ -7,10 +7,13 @@ models/CompanyDTO.ts
7
7
  models/CreateSubscriptionDTO.ts
8
8
  models/EmailTemplates.ts
9
9
  models/EmployeeDTO.ts
10
+ models/EmployeeProjectDTO.ts
10
11
  models/ErrorDTO.ts
11
12
  models/PaginatedClients.ts
13
+ models/PaginatedEmployeeProjects.ts
12
14
  models/PaginatedEmployees.ts
13
15
  models/PaginatedProjects.ts
16
+ models/PaginatedTimesheets.ts
14
17
  models/PaginatedUsers.ts
15
18
  models/ProjectDTO.ts
16
19
  models/ProjectInputDTO.ts
@@ -22,6 +25,9 @@ models/Subscription.ts
22
25
  models/SubscriptionSentDto.ts
23
26
  models/SubscriptionsSentResponseDto.ts
24
27
  models/TeamUpdateDTO.ts
28
+ models/TimesheetDTO.ts
29
+ models/TimesheetEntryDTO.ts
30
+ models/TimesheetEntryUpdateDTO.ts
25
31
  models/UserDTOSc.ts
26
32
  models/UserEnrollDTO.ts
27
33
  models/index.ts
@@ -43,13 +43,41 @@ const index_1 = require("../models/index");
43
43
  *
44
44
  */
45
45
  class TuixTimesheetsClientApi extends runtime.BaseAPI {
46
+ /**
47
+ * Approve a timesheet
48
+ * Approve a timesheet
49
+ */
50
+ async approveTimesheetRaw(requestParameters, initOverrides) {
51
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
52
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling approveTimesheet.');
53
+ }
54
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
55
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling approveTimesheet.');
56
+ }
57
+ const queryParameters = {};
58
+ const headerParameters = {};
59
+ if (this.configuration && this.configuration.apiKey) {
60
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
61
+ }
62
+ const response = await this.request({
63
+ path: `/projects/{projectId}/timesheets/{timesheetId}/approve`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
64
+ method: 'PATCH',
65
+ headers: headerParameters,
66
+ query: queryParameters,
67
+ }, initOverrides);
68
+ return new runtime.VoidApiResponse(response);
69
+ }
70
+ /**
71
+ * Approve a timesheet
72
+ * Approve a timesheet
73
+ */
74
+ async approveTimesheet(requestParameters, initOverrides) {
75
+ await this.approveTimesheetRaw(requestParameters, initOverrides);
76
+ }
46
77
  /**
47
78
  * Create client
48
79
  */
49
80
  async createClientRaw(requestParameters, initOverrides) {
50
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
51
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling createClient.');
52
- }
53
81
  if (requestParameters.clientDTO === null || requestParameters.clientDTO === undefined) {
54
82
  throw new runtime.RequiredError('clientDTO', 'Required parameter requestParameters.clientDTO was null or undefined when calling createClient.');
55
83
  }
@@ -60,7 +88,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
60
88
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
61
89
  }
62
90
  const response = await this.request({
63
- path: `/clients/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
91
+ path: `/clients`,
64
92
  method: 'POST',
65
93
  headers: headerParameters,
66
94
  query: queryParameters,
@@ -111,9 +139,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
111
139
  * Creates a new project
112
140
  */
113
141
  async createProjectRaw(requestParameters, initOverrides) {
114
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
115
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling createProject.');
116
- }
117
142
  if (requestParameters.projectInputDTO === null || requestParameters.projectInputDTO === undefined) {
118
143
  throw new runtime.RequiredError('projectInputDTO', 'Required parameter requestParameters.projectInputDTO was null or undefined when calling createProject.');
119
144
  }
@@ -124,7 +149,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
124
149
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
125
150
  }
126
151
  const response = await this.request({
127
- path: `/projects/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
152
+ path: `/projects`,
128
153
  method: 'POST',
129
154
  headers: headerParameters,
130
155
  query: queryParameters,
@@ -196,11 +221,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
196
221
  * Delete client
197
222
  */
198
223
  async deleteClientRaw(requestParameters, initOverrides) {
199
- if (requestParameters.id === null || requestParameters.id === undefined) {
200
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteClient.');
201
- }
202
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
203
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling deleteClient.');
224
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
225
+ throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling deleteClient.');
204
226
  }
205
227
  const queryParameters = {};
206
228
  const headerParameters = {};
@@ -208,7 +230,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
208
230
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
209
231
  }
210
232
  const response = await this.request({
211
- path: `/clients/{companyId}/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
233
+ path: `/clients/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
212
234
  method: 'DELETE',
213
235
  headers: headerParameters,
214
236
  query: queryParameters,
@@ -285,11 +307,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
285
307
  * delete a project
286
308
  */
287
309
  async deleteProjectRaw(requestParameters, initOverrides) {
288
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
289
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling deleteProject.');
290
- }
291
- if (requestParameters.id === null || requestParameters.id === undefined) {
292
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteProject.');
310
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
311
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteProject.');
293
312
  }
294
313
  const queryParameters = {};
295
314
  const headerParameters = {};
@@ -297,7 +316,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
297
316
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
298
317
  }
299
318
  const response = await this.request({
300
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
319
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
301
320
  method: 'DELETE',
302
321
  headers: headerParameters,
303
322
  query: queryParameters,
@@ -389,51 +408,12 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
389
408
  const response = await this.employeesCompanyIdIdGetRaw(requestParameters, initOverrides);
390
409
  return await response.value();
391
410
  }
392
- /**
393
- * Enroll a user to a project
394
- * Enroll a user to a project
395
- */
396
- async enrollUserRaw(requestParameters, initOverrides) {
397
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
398
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling enrollUser.');
399
- }
400
- if (requestParameters.id === null || requestParameters.id === undefined) {
401
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling enrollUser.');
402
- }
403
- if (requestParameters.userEnrollDTO === null || requestParameters.userEnrollDTO === undefined) {
404
- throw new runtime.RequiredError('userEnrollDTO', 'Required parameter requestParameters.userEnrollDTO was null or undefined when calling enrollUser.');
405
- }
406
- const queryParameters = {};
407
- const headerParameters = {};
408
- headerParameters['Content-Type'] = 'application/json';
409
- if (this.configuration && this.configuration.apiKey) {
410
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
411
- }
412
- const response = await this.request({
413
- path: `/projects/{clientId}/{id}/enroll`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
414
- method: 'POST',
415
- headers: headerParameters,
416
- query: queryParameters,
417
- body: (0, index_1.UserEnrollDTOToJSON)(requestParameters.userEnrollDTO),
418
- }, initOverrides);
419
- return new runtime.VoidApiResponse(response);
420
- }
421
- /**
422
- * Enroll a user to a project
423
- * Enroll a user to a project
424
- */
425
- async enrollUser(requestParameters, initOverrides) {
426
- await this.enrollUserRaw(requestParameters, initOverrides);
427
- }
428
411
  /**
429
412
  * Get client by id
430
413
  */
431
414
  async getClientByIdRaw(requestParameters, initOverrides) {
432
- if (requestParameters.id === null || requestParameters.id === undefined) {
433
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getClientById.');
434
- }
435
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
436
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling getClientById.');
415
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
416
+ throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getClientById.');
437
417
  }
438
418
  const queryParameters = {};
439
419
  const headerParameters = {};
@@ -441,7 +421,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
441
421
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
442
422
  }
443
423
  const response = await this.request({
444
- path: `/clients/{companyId}/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
424
+ path: `/clients/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
445
425
  method: 'GET',
446
426
  headers: headerParameters,
447
427
  query: queryParameters,
@@ -459,9 +439,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
459
439
  * Get all clients from company
460
440
  */
461
441
  async getClientsRaw(requestParameters, initOverrides) {
462
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
463
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling getClients.');
464
- }
465
442
  const queryParameters = {};
466
443
  if (requestParameters.page !== undefined) {
467
444
  queryParameters['page'] = requestParameters.page;
@@ -474,7 +451,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
474
451
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
475
452
  }
476
453
  const response = await this.request({
477
- path: `/clients/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
454
+ path: `/clients`,
478
455
  method: 'GET',
479
456
  headers: headerParameters,
480
457
  query: queryParameters,
@@ -484,7 +461,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
484
461
  /**
485
462
  * Get all clients from company
486
463
  */
487
- async getClients(requestParameters, initOverrides) {
464
+ async getClients(requestParameters = {}, initOverrides) {
488
465
  const response = await this.getClientsRaw(requestParameters, initOverrides);
489
466
  return await response.value();
490
467
  }
@@ -586,11 +563,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
586
563
  * Get a project by ID
587
564
  */
588
565
  async getProjectByIdRaw(requestParameters, initOverrides) {
589
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
590
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getProjectById.');
591
- }
592
- if (requestParameters.id === null || requestParameters.id === undefined) {
593
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getProjectById.');
566
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
567
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getProjectById.');
594
568
  }
595
569
  const queryParameters = {};
596
570
  const headerParameters = {};
@@ -598,7 +572,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
598
572
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
599
573
  }
600
574
  const response = await this.request({
601
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
575
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
602
576
  method: 'GET',
603
577
  headers: headerParameters,
604
578
  query: queryParameters,
@@ -646,13 +620,10 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
646
620
  return await response.value();
647
621
  }
648
622
  /**
649
- * Get all projects a user belongs to
650
- * Get all projects a user belongs to
623
+ * Get all projects a employee has access to
624
+ * Get all projects a employee has access to
651
625
  */
652
- async getProjectsByClientRaw(requestParameters, initOverrides) {
653
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
654
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getProjectsByClient.');
655
- }
626
+ async getProjectsAsEmployeeRaw(requestParameters, initOverrides) {
656
627
  const queryParameters = {};
657
628
  if (requestParameters.page !== undefined) {
658
629
  queryParameters['page'] = requestParameters.page;
@@ -665,19 +636,19 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
665
636
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
666
637
  }
667
638
  const response = await this.request({
668
- path: `/projects/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
639
+ path: `/employee-projects`,
669
640
  method: 'GET',
670
641
  headers: headerParameters,
671
642
  query: queryParameters,
672
643
  }, initOverrides);
673
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedProjectsFromJSON)(jsonValue));
644
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEmployeeProjectsFromJSON)(jsonValue));
674
645
  }
675
646
  /**
676
- * Get all projects a user belongs to
677
- * Get all projects a user belongs to
647
+ * Get all projects a employee has access to
648
+ * Get all projects a employee has access to
678
649
  */
679
- async getProjectsByClient(requestParameters, initOverrides) {
680
- const response = await this.getProjectsByClientRaw(requestParameters, initOverrides);
650
+ async getProjectsAsEmployee(requestParameters = {}, initOverrides) {
651
+ const response = await this.getProjectsAsEmployeeRaw(requestParameters, initOverrides);
681
652
  return await response.value();
682
653
  }
683
654
  /**
@@ -706,19 +677,22 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
706
677
  * Get all users in a project
707
678
  */
708
679
  async getTeamRaw(requestParameters, initOverrides) {
709
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
710
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getTeam.');
711
- }
712
- if (requestParameters.id === null || requestParameters.id === undefined) {
713
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getTeam.');
680
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
681
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTeam.');
714
682
  }
715
683
  const queryParameters = {};
684
+ if (requestParameters.page !== undefined) {
685
+ queryParameters['page'] = requestParameters.page;
686
+ }
687
+ if (requestParameters.pageSize !== undefined) {
688
+ queryParameters['pageSize'] = requestParameters.pageSize;
689
+ }
716
690
  const headerParameters = {};
717
691
  if (this.configuration && this.configuration.apiKey) {
718
692
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
719
693
  }
720
694
  const response = await this.request({
721
- path: `/projects/{clientId}/{id}/team`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
695
+ path: `/projects/{projectId}/team`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
722
696
  method: 'GET',
723
697
  headers: headerParameters,
724
698
  query: queryParameters,
@@ -828,6 +802,67 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
828
802
  const response = await this.getTestUsersRaw(initOverrides);
829
803
  return await response.value();
830
804
  }
805
+ /**
806
+ * Get a timesheet
807
+ * Get a timesheet
808
+ */
809
+ async getTimesheetRaw(requestParameters, initOverrides) {
810
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
811
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTimesheet.');
812
+ }
813
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
814
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling getTimesheet.');
815
+ }
816
+ const queryParameters = {};
817
+ const headerParameters = {};
818
+ if (this.configuration && this.configuration.apiKey) {
819
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
820
+ }
821
+ const response = await this.request({
822
+ path: `/projects/{projectId}/timesheets/{timesheetId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
823
+ method: 'GET',
824
+ headers: headerParameters,
825
+ query: queryParameters,
826
+ }, initOverrides);
827
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TimesheetDTOFromJSON)(jsonValue));
828
+ }
829
+ /**
830
+ * Get a timesheet
831
+ * Get a timesheet
832
+ */
833
+ async getTimesheet(requestParameters, initOverrides) {
834
+ const response = await this.getTimesheetRaw(requestParameters, initOverrides);
835
+ return await response.value();
836
+ }
837
+ /**
838
+ * Get all timesheets in a project
839
+ * Get all timesheets in a project
840
+ */
841
+ async getTimesheetsRaw(requestParameters, initOverrides) {
842
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
843
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTimesheets.');
844
+ }
845
+ const queryParameters = {};
846
+ const headerParameters = {};
847
+ if (this.configuration && this.configuration.apiKey) {
848
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
849
+ }
850
+ const response = await this.request({
851
+ path: `/projects/{projectId}/timesheets`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
852
+ method: 'GET',
853
+ headers: headerParameters,
854
+ query: queryParameters,
855
+ }, initOverrides);
856
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedTimesheetsFromJSON)(jsonValue));
857
+ }
858
+ /**
859
+ * Get all timesheets in a project
860
+ * Get all timesheets in a project
861
+ */
862
+ async getTimesheets(requestParameters, initOverrides) {
863
+ const response = await this.getTimesheetsRaw(requestParameters, initOverrides);
864
+ return await response.value();
865
+ }
831
866
  /**
832
867
  * Invite an employee to a company
833
868
  * Invite an employee to a company
@@ -983,15 +1018,43 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
983
1018
  const response = await this.sendNewsletterToSubscribersRaw(requestParameters, initOverrides);
984
1019
  return await response.value();
985
1020
  }
1021
+ /**
1022
+ * Send a timesheet
1023
+ * Send a timesheet
1024
+ */
1025
+ async sendTimesheetRaw(requestParameters, initOverrides) {
1026
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1027
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling sendTimesheet.');
1028
+ }
1029
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1030
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling sendTimesheet.');
1031
+ }
1032
+ const queryParameters = {};
1033
+ const headerParameters = {};
1034
+ if (this.configuration && this.configuration.apiKey) {
1035
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1036
+ }
1037
+ const response = await this.request({
1038
+ path: `/projects/{projectId}/timesheets/{timesheetId}/send`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
1039
+ method: 'PATCH',
1040
+ headers: headerParameters,
1041
+ query: queryParameters,
1042
+ }, initOverrides);
1043
+ return new runtime.VoidApiResponse(response);
1044
+ }
1045
+ /**
1046
+ * Send a timesheet
1047
+ * Send a timesheet
1048
+ */
1049
+ async sendTimesheet(requestParameters, initOverrides) {
1050
+ await this.sendTimesheetRaw(requestParameters, initOverrides);
1051
+ }
986
1052
  /**
987
1053
  * Update client
988
1054
  */
989
1055
  async updateClientRaw(requestParameters, initOverrides) {
990
- if (requestParameters.id === null || requestParameters.id === undefined) {
991
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateClient.');
992
- }
993
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
994
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling updateClient.');
1056
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1057
+ throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling updateClient.');
995
1058
  }
996
1059
  if (requestParameters.clientDTO === null || requestParameters.clientDTO === undefined) {
997
1060
  throw new runtime.RequiredError('clientDTO', 'Required parameter requestParameters.clientDTO was null or undefined when calling updateClient.');
@@ -1003,7 +1066,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1003
1066
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1004
1067
  }
1005
1068
  const response = await this.request({
1006
- path: `/clients/{companyId}/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
1069
+ path: `/clients/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
1007
1070
  method: 'PATCH',
1008
1071
  headers: headerParameters,
1009
1072
  query: queryParameters,
@@ -1094,11 +1157,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1094
1157
  * Update a project by ID
1095
1158
  */
1096
1159
  async updateProjectRaw(requestParameters, initOverrides) {
1097
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1098
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling updateProject.');
1099
- }
1100
- if (requestParameters.id === null || requestParameters.id === undefined) {
1101
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateProject.');
1160
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1161
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateProject.');
1102
1162
  }
1103
1163
  if (requestParameters.projectUpdateDTO === null || requestParameters.projectUpdateDTO === undefined) {
1104
1164
  throw new runtime.RequiredError('projectUpdateDTO', 'Required parameter requestParameters.projectUpdateDTO was null or undefined when calling updateProject.');
@@ -1110,7 +1170,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1110
1170
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1111
1171
  }
1112
1172
  const response = await this.request({
1113
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1173
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
1114
1174
  method: 'PATCH',
1115
1175
  headers: headerParameters,
1116
1176
  query: queryParameters,
@@ -1131,11 +1191,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1131
1191
  * Update a project team
1132
1192
  */
1133
1193
  async updateTeamRaw(requestParameters, initOverrides) {
1134
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1135
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling updateTeam.');
1136
- }
1137
- if (requestParameters.id === null || requestParameters.id === undefined) {
1138
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateTeam.');
1194
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1195
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateTeam.');
1139
1196
  }
1140
1197
  if (requestParameters.teamUpdateDTO === null || requestParameters.teamUpdateDTO === undefined) {
1141
1198
  throw new runtime.RequiredError('teamUpdateDTO', 'Required parameter requestParameters.teamUpdateDTO was null or undefined when calling updateTeam.');
@@ -1147,7 +1204,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1147
1204
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1148
1205
  }
1149
1206
  const response = await this.request({
1150
- path: `/projects/{clientId}/{id}/team`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1207
+ path: `/projects/{projectId}/team`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
1151
1208
  method: 'PATCH',
1152
1209
  headers: headerParameters,
1153
1210
  query: queryParameters,
@@ -1191,6 +1248,45 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1191
1248
  const response = await this.updateTestUserRaw(requestParameters, initOverrides);
1192
1249
  return await response.value();
1193
1250
  }
1251
+ /**
1252
+ * Update a timesheet entry
1253
+ * Update a timesheet entry
1254
+ */
1255
+ async updateTimesheetEntryRaw(requestParameters, initOverrides) {
1256
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1257
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateTimesheetEntry.');
1258
+ }
1259
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1260
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling updateTimesheetEntry.');
1261
+ }
1262
+ if (requestParameters.entryId === null || requestParameters.entryId === undefined) {
1263
+ throw new runtime.RequiredError('entryId', 'Required parameter requestParameters.entryId was null or undefined when calling updateTimesheetEntry.');
1264
+ }
1265
+ if (requestParameters.timesheetEntryUpdateDTO === null || requestParameters.timesheetEntryUpdateDTO === undefined) {
1266
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter requestParameters.timesheetEntryUpdateDTO was null or undefined when calling updateTimesheetEntry.');
1267
+ }
1268
+ const queryParameters = {};
1269
+ const headerParameters = {};
1270
+ headerParameters['Content-Type'] = 'application/json';
1271
+ if (this.configuration && this.configuration.apiKey) {
1272
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1273
+ }
1274
+ const response = await this.request({
1275
+ path: `/projects/{projectId}/timesheets/{timesheetId}/entries/{entryId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))).replace(`{${"entryId"}}`, encodeURIComponent(String(requestParameters.entryId))),
1276
+ method: 'PATCH',
1277
+ headers: headerParameters,
1278
+ query: queryParameters,
1279
+ body: (0, index_1.TimesheetEntryUpdateDTOToJSON)(requestParameters.timesheetEntryUpdateDTO),
1280
+ }, initOverrides);
1281
+ return new runtime.VoidApiResponse(response);
1282
+ }
1283
+ /**
1284
+ * Update a timesheet entry
1285
+ * Update a timesheet entry
1286
+ */
1287
+ async updateTimesheetEntry(requestParameters, initOverrides) {
1288
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
1289
+ }
1194
1290
  /**
1195
1291
  *
1196
1292
  */