tuix-timesheets-api 0.16.0 → 0.18.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,6 +43,37 @@ 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
  */
@@ -108,9 +139,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
108
139
  * Creates a new project
109
140
  */
110
141
  async createProjectRaw(requestParameters, initOverrides) {
111
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
112
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling createProject.');
113
- }
114
142
  if (requestParameters.projectInputDTO === null || requestParameters.projectInputDTO === undefined) {
115
143
  throw new runtime.RequiredError('projectInputDTO', 'Required parameter requestParameters.projectInputDTO was null or undefined when calling createProject.');
116
144
  }
@@ -121,7 +149,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
121
149
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
122
150
  }
123
151
  const response = await this.request({
124
- path: `/projects/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
152
+ path: `/projects`,
125
153
  method: 'POST',
126
154
  headers: headerParameters,
127
155
  query: queryParameters,
@@ -248,11 +276,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
248
276
  * Delete an employee
249
277
  */
250
278
  async deleteEmployeeRaw(requestParameters, initOverrides) {
251
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
252
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling deleteEmployee.');
253
- }
254
- if (requestParameters.id === null || requestParameters.id === undefined) {
255
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteEmployee.');
279
+ if (requestParameters.employeeId === null || requestParameters.employeeId === undefined) {
280
+ throw new runtime.RequiredError('employeeId', 'Required parameter requestParameters.employeeId was null or undefined when calling deleteEmployee.');
256
281
  }
257
282
  const queryParameters = {};
258
283
  const headerParameters = {};
@@ -260,7 +285,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
260
285
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
261
286
  }
262
287
  const response = await this.request({
263
- path: `/employees/{companyId}/{id}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
288
+ path: `/employees/{employeeId}`.replace(`{${"employeeId"}}`, encodeURIComponent(String(requestParameters.employeeId))),
264
289
  method: 'DELETE',
265
290
  headers: headerParameters,
266
291
  query: queryParameters,
@@ -279,11 +304,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
279
304
  * delete a project
280
305
  */
281
306
  async deleteProjectRaw(requestParameters, initOverrides) {
282
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
283
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling deleteProject.');
284
- }
285
- if (requestParameters.id === null || requestParameters.id === undefined) {
286
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling deleteProject.');
307
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
308
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteProject.');
287
309
  }
288
310
  const queryParameters = {};
289
311
  const headerParameters = {};
@@ -291,7 +313,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
291
313
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
292
314
  }
293
315
  const response = await this.request({
294
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
316
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
295
317
  method: 'DELETE',
296
318
  headers: headerParameters,
297
319
  query: queryParameters,
@@ -355,12 +377,9 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
355
377
  * Get employee info
356
378
  * Get employee info
357
379
  */
358
- async employeesCompanyIdIdGetRaw(requestParameters, initOverrides) {
359
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
360
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling employeesCompanyIdIdGet.');
361
- }
362
- if (requestParameters.id === null || requestParameters.id === undefined) {
363
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling employeesCompanyIdIdGet.');
380
+ async employeesEmployeeIdGetRaw(requestParameters, initOverrides) {
381
+ if (requestParameters.employeeId === null || requestParameters.employeeId === undefined) {
382
+ throw new runtime.RequiredError('employeeId', 'Required parameter requestParameters.employeeId was null or undefined when calling employeesEmployeeIdGet.');
364
383
  }
365
384
  const queryParameters = {};
366
385
  const headerParameters = {};
@@ -368,7 +387,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
368
387
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
369
388
  }
370
389
  const response = await this.request({
371
- path: `/employees/{companyId}/{id}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
390
+ path: `/employees/{employeeId}`.replace(`{${"employeeId"}}`, encodeURIComponent(String(requestParameters.employeeId))),
372
391
  method: 'GET',
373
392
  headers: headerParameters,
374
393
  query: queryParameters,
@@ -379,46 +398,10 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
379
398
  * Get employee info
380
399
  * Get employee info
381
400
  */
382
- async employeesCompanyIdIdGet(requestParameters, initOverrides) {
383
- const response = await this.employeesCompanyIdIdGetRaw(requestParameters, initOverrides);
401
+ async employeesEmployeeIdGet(requestParameters, initOverrides) {
402
+ const response = await this.employeesEmployeeIdGetRaw(requestParameters, initOverrides);
384
403
  return await response.value();
385
404
  }
386
- /**
387
- * Enroll a user to a project
388
- * Enroll a user to a project
389
- */
390
- async enrollUserRaw(requestParameters, initOverrides) {
391
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
392
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling enrollUser.');
393
- }
394
- if (requestParameters.id === null || requestParameters.id === undefined) {
395
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling enrollUser.');
396
- }
397
- if (requestParameters.userEnrollDTO === null || requestParameters.userEnrollDTO === undefined) {
398
- throw new runtime.RequiredError('userEnrollDTO', 'Required parameter requestParameters.userEnrollDTO was null or undefined when calling enrollUser.');
399
- }
400
- const queryParameters = {};
401
- const headerParameters = {};
402
- headerParameters['Content-Type'] = 'application/json';
403
- if (this.configuration && this.configuration.apiKey) {
404
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
405
- }
406
- const response = await this.request({
407
- path: `/projects/{clientId}/{id}/enroll`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
408
- method: 'POST',
409
- headers: headerParameters,
410
- query: queryParameters,
411
- body: (0, index_1.UserEnrollDTOToJSON)(requestParameters.userEnrollDTO),
412
- }, initOverrides);
413
- return new runtime.VoidApiResponse(response);
414
- }
415
- /**
416
- * Enroll a user to a project
417
- * Enroll a user to a project
418
- */
419
- async enrollUser(requestParameters, initOverrides) {
420
- await this.enrollUserRaw(requestParameters, initOverrides);
421
- }
422
405
  /**
423
406
  * Get client by id
424
407
  */
@@ -536,9 +519,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
536
519
  * List employees
537
520
  */
538
521
  async getEmployeesRaw(requestParameters, initOverrides) {
539
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
540
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling getEmployees.');
541
- }
542
522
  const queryParameters = {};
543
523
  if (requestParameters.page !== undefined) {
544
524
  queryParameters['page'] = requestParameters.page;
@@ -554,7 +534,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
554
534
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
555
535
  }
556
536
  const response = await this.request({
557
- path: `/employees/{companyId}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
537
+ path: `/employees`,
558
538
  method: 'GET',
559
539
  headers: headerParameters,
560
540
  query: queryParameters,
@@ -565,7 +545,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
565
545
  * List employees
566
546
  * List employees
567
547
  */
568
- async getEmployees(requestParameters, initOverrides) {
548
+ async getEmployees(requestParameters = {}, initOverrides) {
569
549
  const response = await this.getEmployeesRaw(requestParameters, initOverrides);
570
550
  return await response.value();
571
551
  }
@@ -574,11 +554,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
574
554
  * Get a project by ID
575
555
  */
576
556
  async getProjectByIdRaw(requestParameters, initOverrides) {
577
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
578
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getProjectById.');
579
- }
580
- if (requestParameters.id === null || requestParameters.id === undefined) {
581
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getProjectById.');
557
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
558
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getProjectById.');
582
559
  }
583
560
  const queryParameters = {};
584
561
  const headerParameters = {};
@@ -586,7 +563,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
586
563
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
587
564
  }
588
565
  const response = await this.request({
589
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
566
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
590
567
  method: 'GET',
591
568
  headers: headerParameters,
592
569
  query: queryParameters,
@@ -634,13 +611,10 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
634
611
  return await response.value();
635
612
  }
636
613
  /**
637
- * Get all projects a user belongs to
638
- * Get all projects a user belongs to
614
+ * Get all projects a employee has access to
615
+ * Get all projects a employee has access to
639
616
  */
640
- async getProjectsByClientRaw(requestParameters, initOverrides) {
641
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
642
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getProjectsByClient.');
643
- }
617
+ async getProjectsAsEmployeeRaw(requestParameters, initOverrides) {
644
618
  const queryParameters = {};
645
619
  if (requestParameters.page !== undefined) {
646
620
  queryParameters['page'] = requestParameters.page;
@@ -653,19 +627,19 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
653
627
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
654
628
  }
655
629
  const response = await this.request({
656
- path: `/projects/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))),
630
+ path: `/employee-projects`,
657
631
  method: 'GET',
658
632
  headers: headerParameters,
659
633
  query: queryParameters,
660
634
  }, initOverrides);
661
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedProjectsFromJSON)(jsonValue));
635
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEmployeeProjectsFromJSON)(jsonValue));
662
636
  }
663
637
  /**
664
- * Get all projects a user belongs to
665
- * Get all projects a user belongs to
638
+ * Get all projects a employee has access to
639
+ * Get all projects a employee has access to
666
640
  */
667
- async getProjectsByClient(requestParameters, initOverrides) {
668
- const response = await this.getProjectsByClientRaw(requestParameters, initOverrides);
641
+ async getProjectsAsEmployee(requestParameters = {}, initOverrides) {
642
+ const response = await this.getProjectsAsEmployeeRaw(requestParameters, initOverrides);
669
643
  return await response.value();
670
644
  }
671
645
  /**
@@ -694,19 +668,22 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
694
668
  * Get all users in a project
695
669
  */
696
670
  async getTeamRaw(requestParameters, initOverrides) {
697
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
698
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling getTeam.');
699
- }
700
- if (requestParameters.id === null || requestParameters.id === undefined) {
701
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getTeam.');
671
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
672
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTeam.');
702
673
  }
703
674
  const queryParameters = {};
675
+ if (requestParameters.page !== undefined) {
676
+ queryParameters['page'] = requestParameters.page;
677
+ }
678
+ if (requestParameters.pageSize !== undefined) {
679
+ queryParameters['pageSize'] = requestParameters.pageSize;
680
+ }
704
681
  const headerParameters = {};
705
682
  if (this.configuration && this.configuration.apiKey) {
706
683
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
707
684
  }
708
685
  const response = await this.request({
709
- path: `/projects/{clientId}/{id}/team`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
686
+ path: `/projects/{projectId}/team`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
710
687
  method: 'GET',
711
688
  headers: headerParameters,
712
689
  query: queryParameters,
@@ -816,14 +793,72 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
816
793
  const response = await this.getTestUsersRaw(initOverrides);
817
794
  return await response.value();
818
795
  }
796
+ /**
797
+ * Get a timesheet
798
+ * Get a timesheet
799
+ */
800
+ async getTimesheetRaw(requestParameters, initOverrides) {
801
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
802
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTimesheet.');
803
+ }
804
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
805
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling getTimesheet.');
806
+ }
807
+ const queryParameters = {};
808
+ const headerParameters = {};
809
+ if (this.configuration && this.configuration.apiKey) {
810
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
811
+ }
812
+ const response = await this.request({
813
+ path: `/projects/{projectId}/timesheets/{timesheetId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
814
+ method: 'GET',
815
+ headers: headerParameters,
816
+ query: queryParameters,
817
+ }, initOverrides);
818
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TimesheetDTOFromJSON)(jsonValue));
819
+ }
820
+ /**
821
+ * Get a timesheet
822
+ * Get a timesheet
823
+ */
824
+ async getTimesheet(requestParameters, initOverrides) {
825
+ const response = await this.getTimesheetRaw(requestParameters, initOverrides);
826
+ return await response.value();
827
+ }
828
+ /**
829
+ * Get all timesheets in a project
830
+ * Get all timesheets in a project
831
+ */
832
+ async getTimesheetsRaw(requestParameters, initOverrides) {
833
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
834
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTimesheets.');
835
+ }
836
+ const queryParameters = {};
837
+ const headerParameters = {};
838
+ if (this.configuration && this.configuration.apiKey) {
839
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
840
+ }
841
+ const response = await this.request({
842
+ path: `/projects/{projectId}/timesheets`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
843
+ method: 'GET',
844
+ headers: headerParameters,
845
+ query: queryParameters,
846
+ }, initOverrides);
847
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedTimesheetsFromJSON)(jsonValue));
848
+ }
849
+ /**
850
+ * Get all timesheets in a project
851
+ * Get all timesheets in a project
852
+ */
853
+ async getTimesheets(requestParameters, initOverrides) {
854
+ const response = await this.getTimesheetsRaw(requestParameters, initOverrides);
855
+ return await response.value();
856
+ }
819
857
  /**
820
858
  * Invite an employee to a company
821
859
  * Invite an employee to a company
822
860
  */
823
861
  async inviteEmployeeRaw(requestParameters, initOverrides) {
824
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
825
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling inviteEmployee.');
826
- }
827
862
  if (requestParameters.employeeDTO === null || requestParameters.employeeDTO === undefined) {
828
863
  throw new runtime.RequiredError('employeeDTO', 'Required parameter requestParameters.employeeDTO was null or undefined when calling inviteEmployee.');
829
864
  }
@@ -834,7 +869,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
834
869
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
835
870
  }
836
871
  const response = await this.request({
837
- path: `/employees/{companyId}/invite`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))),
872
+ path: `/employees/invite`,
838
873
  method: 'POST',
839
874
  headers: headerParameters,
840
875
  query: queryParameters,
@@ -971,6 +1006,37 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
971
1006
  const response = await this.sendNewsletterToSubscribersRaw(requestParameters, initOverrides);
972
1007
  return await response.value();
973
1008
  }
1009
+ /**
1010
+ * Send a timesheet
1011
+ * Send a timesheet
1012
+ */
1013
+ async sendTimesheetRaw(requestParameters, initOverrides) {
1014
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1015
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling sendTimesheet.');
1016
+ }
1017
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1018
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling sendTimesheet.');
1019
+ }
1020
+ const queryParameters = {};
1021
+ const headerParameters = {};
1022
+ if (this.configuration && this.configuration.apiKey) {
1023
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1024
+ }
1025
+ const response = await this.request({
1026
+ path: `/projects/{projectId}/timesheets/{timesheetId}/send`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
1027
+ method: 'PATCH',
1028
+ headers: headerParameters,
1029
+ query: queryParameters,
1030
+ }, initOverrides);
1031
+ return new runtime.VoidApiResponse(response);
1032
+ }
1033
+ /**
1034
+ * Send a timesheet
1035
+ * Send a timesheet
1036
+ */
1037
+ async sendTimesheet(requestParameters, initOverrides) {
1038
+ await this.sendTimesheetRaw(requestParameters, initOverrides);
1039
+ }
974
1040
  /**
975
1041
  * Update client
976
1042
  */
@@ -1042,11 +1108,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1042
1108
  * Update an employee
1043
1109
  */
1044
1110
  async updateEmployeeDataRaw(requestParameters, initOverrides) {
1045
- if (requestParameters.companyId === null || requestParameters.companyId === undefined) {
1046
- throw new runtime.RequiredError('companyId', 'Required parameter requestParameters.companyId was null or undefined when calling updateEmployeeData.');
1047
- }
1048
- if (requestParameters.id === null || requestParameters.id === undefined) {
1049
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateEmployeeData.');
1111
+ if (requestParameters.employeeId === null || requestParameters.employeeId === undefined) {
1112
+ throw new runtime.RequiredError('employeeId', 'Required parameter requestParameters.employeeId was null or undefined when calling updateEmployeeData.');
1050
1113
  }
1051
1114
  if (requestParameters.employeeDTO === null || requestParameters.employeeDTO === undefined) {
1052
1115
  throw new runtime.RequiredError('employeeDTO', 'Required parameter requestParameters.employeeDTO was null or undefined when calling updateEmployeeData.');
@@ -1058,7 +1121,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1058
1121
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1059
1122
  }
1060
1123
  const response = await this.request({
1061
- path: `/employees/{companyId}/{id}`.replace(`{${"companyId"}}`, encodeURIComponent(String(requestParameters.companyId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1124
+ path: `/employees/{employeeId}`.replace(`{${"employeeId"}}`, encodeURIComponent(String(requestParameters.employeeId))),
1062
1125
  method: 'PATCH',
1063
1126
  headers: headerParameters,
1064
1127
  query: queryParameters,
@@ -1079,11 +1142,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1079
1142
  * Update a project by ID
1080
1143
  */
1081
1144
  async updateProjectRaw(requestParameters, initOverrides) {
1082
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1083
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling updateProject.');
1084
- }
1085
- if (requestParameters.id === null || requestParameters.id === undefined) {
1086
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateProject.');
1145
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1146
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateProject.');
1087
1147
  }
1088
1148
  if (requestParameters.projectUpdateDTO === null || requestParameters.projectUpdateDTO === undefined) {
1089
1149
  throw new runtime.RequiredError('projectUpdateDTO', 'Required parameter requestParameters.projectUpdateDTO was null or undefined when calling updateProject.');
@@ -1095,7 +1155,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1095
1155
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1096
1156
  }
1097
1157
  const response = await this.request({
1098
- path: `/projects/{clientId}/{id}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1158
+ path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
1099
1159
  method: 'PATCH',
1100
1160
  headers: headerParameters,
1101
1161
  query: queryParameters,
@@ -1116,11 +1176,8 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1116
1176
  * Update a project team
1117
1177
  */
1118
1178
  async updateTeamRaw(requestParameters, initOverrides) {
1119
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1120
- throw new runtime.RequiredError('clientId', 'Required parameter requestParameters.clientId was null or undefined when calling updateTeam.');
1121
- }
1122
- if (requestParameters.id === null || requestParameters.id === undefined) {
1123
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateTeam.');
1179
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1180
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateTeam.');
1124
1181
  }
1125
1182
  if (requestParameters.teamUpdateDTO === null || requestParameters.teamUpdateDTO === undefined) {
1126
1183
  throw new runtime.RequiredError('teamUpdateDTO', 'Required parameter requestParameters.teamUpdateDTO was null or undefined when calling updateTeam.');
@@ -1132,7 +1189,7 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1132
1189
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1133
1190
  }
1134
1191
  const response = await this.request({
1135
- path: `/projects/{clientId}/{id}/team`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1192
+ path: `/projects/{projectId}/team`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
1136
1193
  method: 'PATCH',
1137
1194
  headers: headerParameters,
1138
1195
  query: queryParameters,
@@ -1176,6 +1233,45 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
1176
1233
  const response = await this.updateTestUserRaw(requestParameters, initOverrides);
1177
1234
  return await response.value();
1178
1235
  }
1236
+ /**
1237
+ * Update a timesheet entry
1238
+ * Update a timesheet entry
1239
+ */
1240
+ async updateTimesheetEntryRaw(requestParameters, initOverrides) {
1241
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1242
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateTimesheetEntry.');
1243
+ }
1244
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1245
+ throw new runtime.RequiredError('timesheetId', 'Required parameter requestParameters.timesheetId was null or undefined when calling updateTimesheetEntry.');
1246
+ }
1247
+ if (requestParameters.entryId === null || requestParameters.entryId === undefined) {
1248
+ throw new runtime.RequiredError('entryId', 'Required parameter requestParameters.entryId was null or undefined when calling updateTimesheetEntry.');
1249
+ }
1250
+ if (requestParameters.timesheetEntryUpdateDTO === null || requestParameters.timesheetEntryUpdateDTO === undefined) {
1251
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO', 'Required parameter requestParameters.timesheetEntryUpdateDTO was null or undefined when calling updateTimesheetEntry.');
1252
+ }
1253
+ const queryParameters = {};
1254
+ const headerParameters = {};
1255
+ headerParameters['Content-Type'] = 'application/json';
1256
+ if (this.configuration && this.configuration.apiKey) {
1257
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1258
+ }
1259
+ const response = await this.request({
1260
+ 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))),
1261
+ method: 'PATCH',
1262
+ headers: headerParameters,
1263
+ query: queryParameters,
1264
+ body: (0, index_1.TimesheetEntryUpdateDTOToJSON)(requestParameters.timesheetEntryUpdateDTO),
1265
+ }, initOverrides);
1266
+ return new runtime.VoidApiResponse(response);
1267
+ }
1268
+ /**
1269
+ * Update a timesheet entry
1270
+ * Update a timesheet entry
1271
+ */
1272
+ async updateTimesheetEntry(requestParameters, initOverrides) {
1273
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
1274
+ }
1179
1275
  /**
1180
1276
  *
1181
1277
  */