tuix-timesheets-api 0.67.0 → 0.69.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.
- package/.openapi-generator/FILES +4 -8
- package/apis/TuixTimesheetsClientApi.js +37 -212
- package/apis/TuixTimesheetsClientApi.js.map +1 -1
- package/apis/TuixTimesheetsClientApi.ts +55 -305
- package/models/{CreateUserDto.js → CreateUserDTO.js} +15 -15
- package/models/CreateUserDTO.js.map +1 -0
- package/models/{CreateUserDto.ts → CreateUserDTO.ts} +16 -16
- package/models/ErrorDTO.js +2 -2
- package/models/ErrorDTO.js.map +1 -1
- package/models/ErrorDTO.ts +2 -3
- package/models/SlackAccountResponseDTO.js +51 -0
- package/models/SlackAccountResponseDTO.js.map +1 -0
- package/models/{SlackAccountReponseDto.ts → SlackAccountResponseDTO.ts} +9 -9
- package/models/SlackUserDTO.js +55 -0
- package/models/SlackUserDTO.js.map +1 -0
- package/models/{SlackUserDto.ts → SlackUserDTO.ts} +20 -23
- package/models/UpdateUserDTO.js +53 -0
- package/models/UpdateUserDTO.js.map +1 -0
- package/models/{UpdateUserDto.ts → UpdateUserDTO.ts} +17 -19
- package/models/index.js +4 -8
- package/models/index.js.map +1 -1
- package/models/index.ts +4 -8
- package/package.json +1 -1
- package/models/CreateGithubUserDTO.js +0 -60
- package/models/CreateGithubUserDTO.js.map +0 -1
- package/models/CreateGithubUserDTO.ts +0 -93
- package/models/CreateUserDto.js.map +0 -1
- package/models/GithubAccountDTO.js +0 -51
- package/models/GithubAccountDTO.js.map +0 -1
- package/models/GithubAccountDTO.ts +0 -65
- package/models/GithubCommitCountDTO.js +0 -54
- package/models/GithubCommitCountDTO.js.map +0 -1
- package/models/GithubCommitCountDTO.ts +0 -75
- package/models/GithubUserDTO.js +0 -70
- package/models/GithubUserDTO.js.map +0 -1
- package/models/GithubUserDTO.ts +0 -127
- package/models/SlackAccountReponseDto.js +0 -51
- package/models/SlackAccountReponseDto.js.map +0 -1
- package/models/SlackUserDto.js +0 -57
- package/models/SlackUserDto.js.map +0 -1
- package/models/UpdateUserDto.js +0 -54
- package/models/UpdateUserDto.js.map +0 -1
|
@@ -22,18 +22,14 @@ import type {
|
|
|
22
22
|
ClientDTO,
|
|
23
23
|
CompanyDTO,
|
|
24
24
|
CreateEmployeeInvoiceInputDTO,
|
|
25
|
-
CreateGithubUserDTO,
|
|
26
25
|
CreateJiraAccountDTO,
|
|
27
26
|
CreateJiraUserDTO,
|
|
28
27
|
CreateTokenResponseDTO,
|
|
29
|
-
|
|
28
|
+
CreateUserDTO,
|
|
30
29
|
EmployeeDTO,
|
|
31
30
|
EmployeeInvoiceDTO,
|
|
32
31
|
EmployeeUpdateDTO,
|
|
33
32
|
ErrorDTO,
|
|
34
|
-
GithubAccountDTO,
|
|
35
|
-
GithubCommitCountDTO,
|
|
36
|
-
GithubUserDTO,
|
|
37
33
|
GlobalTimesheetDTO,
|
|
38
34
|
GlobalTimesheetEntryDTO,
|
|
39
35
|
GlobalTimesheetEntryUpdateDTO,
|
|
@@ -59,15 +55,15 @@ import type {
|
|
|
59
55
|
ProjectInputDTO,
|
|
60
56
|
ProjectUpdateDTO,
|
|
61
57
|
RolePermissionsDTO,
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
SlackAccountResponseDTO,
|
|
59
|
+
SlackUserDTO,
|
|
64
60
|
TeamUpdateDTO,
|
|
65
61
|
TimesheetDTO,
|
|
66
62
|
TimesheetEntryUpdateDTO,
|
|
67
63
|
TokenDTO,
|
|
68
64
|
TokenInputDTO,
|
|
69
65
|
TokenValidationErrorDTO,
|
|
70
|
-
|
|
66
|
+
UpdateUserDTO,
|
|
71
67
|
} from '../models/index';
|
|
72
68
|
import {
|
|
73
69
|
AccountInfoDTOFromJSON,
|
|
@@ -84,16 +80,14 @@ import {
|
|
|
84
80
|
CompanyDTOToJSON,
|
|
85
81
|
CreateEmployeeInvoiceInputDTOFromJSON,
|
|
86
82
|
CreateEmployeeInvoiceInputDTOToJSON,
|
|
87
|
-
CreateGithubUserDTOFromJSON,
|
|
88
|
-
CreateGithubUserDTOToJSON,
|
|
89
83
|
CreateJiraAccountDTOFromJSON,
|
|
90
84
|
CreateJiraAccountDTOToJSON,
|
|
91
85
|
CreateJiraUserDTOFromJSON,
|
|
92
86
|
CreateJiraUserDTOToJSON,
|
|
93
87
|
CreateTokenResponseDTOFromJSON,
|
|
94
88
|
CreateTokenResponseDTOToJSON,
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
CreateUserDTOFromJSON,
|
|
90
|
+
CreateUserDTOToJSON,
|
|
97
91
|
EmployeeDTOFromJSON,
|
|
98
92
|
EmployeeDTOToJSON,
|
|
99
93
|
EmployeeInvoiceDTOFromJSON,
|
|
@@ -102,12 +96,6 @@ import {
|
|
|
102
96
|
EmployeeUpdateDTOToJSON,
|
|
103
97
|
ErrorDTOFromJSON,
|
|
104
98
|
ErrorDTOToJSON,
|
|
105
|
-
GithubAccountDTOFromJSON,
|
|
106
|
-
GithubAccountDTOToJSON,
|
|
107
|
-
GithubCommitCountDTOFromJSON,
|
|
108
|
-
GithubCommitCountDTOToJSON,
|
|
109
|
-
GithubUserDTOFromJSON,
|
|
110
|
-
GithubUserDTOToJSON,
|
|
111
99
|
GlobalTimesheetDTOFromJSON,
|
|
112
100
|
GlobalTimesheetDTOToJSON,
|
|
113
101
|
GlobalTimesheetEntryDTOFromJSON,
|
|
@@ -158,10 +146,10 @@ import {
|
|
|
158
146
|
ProjectUpdateDTOToJSON,
|
|
159
147
|
RolePermissionsDTOFromJSON,
|
|
160
148
|
RolePermissionsDTOToJSON,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
149
|
+
SlackAccountResponseDTOFromJSON,
|
|
150
|
+
SlackAccountResponseDTOToJSON,
|
|
151
|
+
SlackUserDTOFromJSON,
|
|
152
|
+
SlackUserDTOToJSON,
|
|
165
153
|
TeamUpdateDTOFromJSON,
|
|
166
154
|
TeamUpdateDTOToJSON,
|
|
167
155
|
TimesheetDTOFromJSON,
|
|
@@ -174,8 +162,8 @@ import {
|
|
|
174
162
|
TokenInputDTOToJSON,
|
|
175
163
|
TokenValidationErrorDTOFromJSON,
|
|
176
164
|
TokenValidationErrorDTOToJSON,
|
|
177
|
-
|
|
178
|
-
|
|
165
|
+
UpdateUserDTOFromJSON,
|
|
166
|
+
UpdateUserDTOToJSON,
|
|
179
167
|
} from '../models/index';
|
|
180
168
|
|
|
181
169
|
export interface AddJiraAccountRequest {
|
|
@@ -210,10 +198,6 @@ export interface CreateEmployeeInvoiceRequest {
|
|
|
210
198
|
createEmployeeInvoiceInputDTO: CreateEmployeeInvoiceInputDTO;
|
|
211
199
|
}
|
|
212
200
|
|
|
213
|
-
export interface CreateGithubUserRequest {
|
|
214
|
-
createGithubUserDTO: CreateGithubUserDTO;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
201
|
export interface CreateHolidayRequest {
|
|
218
202
|
holidayCreateDTO: HolidayCreateDTO;
|
|
219
203
|
}
|
|
@@ -227,7 +211,7 @@ export interface CreateProjectRequest {
|
|
|
227
211
|
}
|
|
228
212
|
|
|
229
213
|
export interface CreateSlackUserRequest {
|
|
230
|
-
|
|
214
|
+
createUserDTO: CreateUserDTO;
|
|
231
215
|
}
|
|
232
216
|
|
|
233
217
|
export interface CreateTokenRequest {
|
|
@@ -317,13 +301,6 @@ export interface GetClientsRequest {
|
|
|
317
301
|
search?: string;
|
|
318
302
|
}
|
|
319
303
|
|
|
320
|
-
export interface GetCommitsByUserIDRequest {
|
|
321
|
-
userId: string;
|
|
322
|
-
from: Date;
|
|
323
|
-
to: Date;
|
|
324
|
-
groupBy?: GetCommitsByUserIDGroupByEnum;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
304
|
export interface GetCompaniesRequest {
|
|
328
305
|
search?: string;
|
|
329
306
|
}
|
|
@@ -382,12 +359,6 @@ export interface GetHolidaysByEmployeeRequest {
|
|
|
382
359
|
search?: string;
|
|
383
360
|
}
|
|
384
361
|
|
|
385
|
-
export interface GetMyCommitsRequest {
|
|
386
|
-
from: Date;
|
|
387
|
-
to: Date;
|
|
388
|
-
groupBy?: GetMyCommitsGroupByEnum;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
362
|
export interface GetProjectByIdRequest {
|
|
392
363
|
projectId: string;
|
|
393
364
|
}
|
|
@@ -496,9 +467,9 @@ export interface UpdateProjectRequest {
|
|
|
496
467
|
projectUpdateDTO: ProjectUpdateDTO;
|
|
497
468
|
}
|
|
498
469
|
|
|
499
|
-
export interface
|
|
470
|
+
export interface UpdateSlackUserRequest {
|
|
500
471
|
userId: string;
|
|
501
|
-
|
|
472
|
+
updateUserDTO: UpdateUserDTO;
|
|
502
473
|
}
|
|
503
474
|
|
|
504
475
|
export interface UpdateTeamRequest {
|
|
@@ -793,45 +764,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
793
764
|
return await response.value();
|
|
794
765
|
}
|
|
795
766
|
|
|
796
|
-
/**
|
|
797
|
-
* Create a new GitHub user account
|
|
798
|
-
* Create GitHub user
|
|
799
|
-
*/
|
|
800
|
-
async createGithubUserRaw(requestParameters: CreateGithubUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GithubUserDTO>> {
|
|
801
|
-
if (requestParameters.createGithubUserDTO === null || requestParameters.createGithubUserDTO === undefined) {
|
|
802
|
-
throw new runtime.RequiredError('createGithubUserDTO','Required parameter requestParameters.createGithubUserDTO was null or undefined when calling createGithubUser.');
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
const queryParameters: any = {};
|
|
806
|
-
|
|
807
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
808
|
-
|
|
809
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
810
|
-
|
|
811
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
812
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
const response = await this.request({
|
|
816
|
-
path: `/github-users`,
|
|
817
|
-
method: 'POST',
|
|
818
|
-
headers: headerParameters,
|
|
819
|
-
query: queryParameters,
|
|
820
|
-
body: CreateGithubUserDTOToJSON(requestParameters.createGithubUserDTO),
|
|
821
|
-
}, initOverrides);
|
|
822
|
-
|
|
823
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GithubUserDTOFromJSON(jsonValue));
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* Create a new GitHub user account
|
|
828
|
-
* Create GitHub user
|
|
829
|
-
*/
|
|
830
|
-
async createGithubUser(requestParameters: CreateGithubUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GithubUserDTO> {
|
|
831
|
-
const response = await this.createGithubUserRaw(requestParameters, initOverrides);
|
|
832
|
-
return await response.value();
|
|
833
|
-
}
|
|
834
|
-
|
|
835
767
|
/**
|
|
836
768
|
* Allows a user to add a holiday
|
|
837
769
|
*/
|
|
@@ -948,11 +880,12 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
948
880
|
}
|
|
949
881
|
|
|
950
882
|
/**
|
|
951
|
-
*
|
|
883
|
+
* Create a new Slack user account
|
|
884
|
+
* Create Slack user
|
|
952
885
|
*/
|
|
953
|
-
async createSlackUserRaw(requestParameters: CreateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
954
|
-
if (requestParameters.
|
|
955
|
-
throw new runtime.RequiredError('
|
|
886
|
+
async createSlackUserRaw(requestParameters: CreateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SlackAccountResponseDTO>> {
|
|
887
|
+
if (requestParameters.createUserDTO === null || requestParameters.createUserDTO === undefined) {
|
|
888
|
+
throw new runtime.RequiredError('createUserDTO','Required parameter requestParameters.createUserDTO was null or undefined when calling createSlackUser.');
|
|
956
889
|
}
|
|
957
890
|
|
|
958
891
|
const queryParameters: any = {};
|
|
@@ -970,16 +903,17 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
970
903
|
method: 'POST',
|
|
971
904
|
headers: headerParameters,
|
|
972
905
|
query: queryParameters,
|
|
973
|
-
body:
|
|
906
|
+
body: CreateUserDTOToJSON(requestParameters.createUserDTO),
|
|
974
907
|
}, initOverrides);
|
|
975
908
|
|
|
976
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
909
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SlackAccountResponseDTOFromJSON(jsonValue));
|
|
977
910
|
}
|
|
978
911
|
|
|
979
912
|
/**
|
|
980
|
-
*
|
|
913
|
+
* Create a new Slack user account
|
|
914
|
+
* Create Slack user
|
|
981
915
|
*/
|
|
982
|
-
async createSlackUser(requestParameters: CreateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
916
|
+
async createSlackUser(requestParameters: CreateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SlackAccountResponseDTO> {
|
|
983
917
|
const response = await this.createSlackUserRaw(requestParameters, initOverrides);
|
|
984
918
|
return await response.value();
|
|
985
919
|
}
|
|
@@ -1167,37 +1101,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1167
1101
|
await this.deleteEmployeeInvoiceRaw(requestParameters, initOverrides);
|
|
1168
1102
|
}
|
|
1169
1103
|
|
|
1170
|
-
/**
|
|
1171
|
-
* Delete the authenticated user\'s GitHub account
|
|
1172
|
-
* Delete GitHub user
|
|
1173
|
-
*/
|
|
1174
|
-
async deleteGithubUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1175
|
-
const queryParameters: any = {};
|
|
1176
|
-
|
|
1177
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1178
|
-
|
|
1179
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1180
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
const response = await this.request({
|
|
1184
|
-
path: `/github-users`,
|
|
1185
|
-
method: 'DELETE',
|
|
1186
|
-
headers: headerParameters,
|
|
1187
|
-
query: queryParameters,
|
|
1188
|
-
}, initOverrides);
|
|
1189
|
-
|
|
1190
|
-
return new runtime.VoidApiResponse(response);
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* Delete the authenticated user\'s GitHub account
|
|
1195
|
-
* Delete GitHub user
|
|
1196
|
-
*/
|
|
1197
|
-
async deleteGithubUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1198
|
-
await this.deleteGithubUserRaw(initOverrides);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
1104
|
/**
|
|
1202
1105
|
* Delete a holiday
|
|
1203
1106
|
* Delete a holiday
|
|
@@ -1269,7 +1172,8 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1269
1172
|
}
|
|
1270
1173
|
|
|
1271
1174
|
/**
|
|
1272
|
-
*
|
|
1175
|
+
* Delete the authenticated user\'s Slack account
|
|
1176
|
+
* Delete Slack user
|
|
1273
1177
|
*/
|
|
1274
1178
|
async deleteSlackUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1275
1179
|
const queryParameters: any = {};
|
|
@@ -1291,7 +1195,8 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1291
1195
|
}
|
|
1292
1196
|
|
|
1293
1197
|
/**
|
|
1294
|
-
*
|
|
1198
|
+
* Delete the authenticated user\'s Slack account
|
|
1199
|
+
* Delete Slack user
|
|
1295
1200
|
*/
|
|
1296
1201
|
async deleteSlackUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1297
1202
|
await this.deleteSlackUserRaw(initOverrides);
|
|
@@ -1766,62 +1671,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1766
1671
|
return await response.value();
|
|
1767
1672
|
}
|
|
1768
1673
|
|
|
1769
|
-
/**
|
|
1770
|
-
* Get commit statistics for a specific user
|
|
1771
|
-
* Get commits by user ID
|
|
1772
|
-
*/
|
|
1773
|
-
async getCommitsByUserIDRaw(requestParameters: GetCommitsByUserIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GithubCommitCountDTO>>> {
|
|
1774
|
-
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
1775
|
-
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling getCommitsByUserID.');
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
if (requestParameters.from === null || requestParameters.from === undefined) {
|
|
1779
|
-
throw new runtime.RequiredError('from','Required parameter requestParameters.from was null or undefined when calling getCommitsByUserID.');
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
if (requestParameters.to === null || requestParameters.to === undefined) {
|
|
1783
|
-
throw new runtime.RequiredError('to','Required parameter requestParameters.to was null or undefined when calling getCommitsByUserID.');
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
const queryParameters: any = {};
|
|
1787
|
-
|
|
1788
|
-
if (requestParameters.from !== undefined) {
|
|
1789
|
-
queryParameters['from'] = (requestParameters.from as any).toISOString().substring(0,10);
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
if (requestParameters.to !== undefined) {
|
|
1793
|
-
queryParameters['to'] = (requestParameters.to as any).toISOString().substring(0,10);
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
if (requestParameters.groupBy !== undefined) {
|
|
1797
|
-
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1801
|
-
|
|
1802
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1803
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
const response = await this.request({
|
|
1807
|
-
path: `/employees/{userId}/commits`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
1808
|
-
method: 'GET',
|
|
1809
|
-
headers: headerParameters,
|
|
1810
|
-
query: queryParameters,
|
|
1811
|
-
}, initOverrides);
|
|
1812
|
-
|
|
1813
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GithubCommitCountDTOFromJSON));
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* Get commit statistics for a specific user
|
|
1818
|
-
* Get commits by user ID
|
|
1819
|
-
*/
|
|
1820
|
-
async getCommitsByUserID(requestParameters: GetCommitsByUserIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GithubCommitCountDTO>> {
|
|
1821
|
-
const response = await this.getCommitsByUserIDRaw(requestParameters, initOverrides);
|
|
1822
|
-
return await response.value();
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
1674
|
/**
|
|
1826
1675
|
* Get all companies a user belongs to
|
|
1827
1676
|
* Get all companies a user belongs to
|
|
@@ -2074,38 +1923,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2074
1923
|
return await response.value();
|
|
2075
1924
|
}
|
|
2076
1925
|
|
|
2077
|
-
/**
|
|
2078
|
-
* Get GitHub account for the authenticated user
|
|
2079
|
-
* Get GitHub account
|
|
2080
|
-
*/
|
|
2081
|
-
async getGithubAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GithubAccountDTO>> {
|
|
2082
|
-
const queryParameters: any = {};
|
|
2083
|
-
|
|
2084
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
2085
|
-
|
|
2086
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
2087
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
const response = await this.request({
|
|
2091
|
-
path: `/github-accounts`,
|
|
2092
|
-
method: 'GET',
|
|
2093
|
-
headers: headerParameters,
|
|
2094
|
-
query: queryParameters,
|
|
2095
|
-
}, initOverrides);
|
|
2096
|
-
|
|
2097
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GithubAccountDTOFromJSON(jsonValue));
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
/**
|
|
2101
|
-
* Get GitHub account for the authenticated user
|
|
2102
|
-
* Get GitHub account
|
|
2103
|
-
*/
|
|
2104
|
-
async getGithubAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GithubAccountDTO> {
|
|
2105
|
-
const response = await this.getGithubAccountRaw(initOverrides);
|
|
2106
|
-
return await response.value();
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
1926
|
/**
|
|
2110
1927
|
* Get a global timesheet
|
|
2111
1928
|
* Get a global timesheet
|
|
@@ -2378,58 +2195,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2378
2195
|
return await response.value();
|
|
2379
2196
|
}
|
|
2380
2197
|
|
|
2381
|
-
/**
|
|
2382
|
-
* Get commit statistics for the authenticated user
|
|
2383
|
-
* Get my commits
|
|
2384
|
-
*/
|
|
2385
|
-
async getMyCommitsRaw(requestParameters: GetMyCommitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GithubCommitCountDTO>>> {
|
|
2386
|
-
if (requestParameters.from === null || requestParameters.from === undefined) {
|
|
2387
|
-
throw new runtime.RequiredError('from','Required parameter requestParameters.from was null or undefined when calling getMyCommits.');
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
if (requestParameters.to === null || requestParameters.to === undefined) {
|
|
2391
|
-
throw new runtime.RequiredError('to','Required parameter requestParameters.to was null or undefined when calling getMyCommits.');
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
const queryParameters: any = {};
|
|
2395
|
-
|
|
2396
|
-
if (requestParameters.from !== undefined) {
|
|
2397
|
-
queryParameters['from'] = (requestParameters.from as any).toISOString().substring(0,10);
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
if (requestParameters.to !== undefined) {
|
|
2401
|
-
queryParameters['to'] = (requestParameters.to as any).toISOString().substring(0,10);
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
if (requestParameters.groupBy !== undefined) {
|
|
2405
|
-
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
2409
|
-
|
|
2410
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
2411
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
const response = await this.request({
|
|
2415
|
-
path: `/commits`,
|
|
2416
|
-
method: 'GET',
|
|
2417
|
-
headers: headerParameters,
|
|
2418
|
-
query: queryParameters,
|
|
2419
|
-
}, initOverrides);
|
|
2420
|
-
|
|
2421
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GithubCommitCountDTOFromJSON));
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
/**
|
|
2425
|
-
* Get commit statistics for the authenticated user
|
|
2426
|
-
* Get my commits
|
|
2427
|
-
*/
|
|
2428
|
-
async getMyCommits(requestParameters: GetMyCommitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GithubCommitCountDTO>> {
|
|
2429
|
-
const response = await this.getMyCommitsRaw(requestParameters, initOverrides);
|
|
2430
|
-
return await response.value();
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
2198
|
/**
|
|
2434
2199
|
* Get a project
|
|
2435
2200
|
* Get a project by ID
|
|
@@ -2555,9 +2320,10 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2555
2320
|
}
|
|
2556
2321
|
|
|
2557
2322
|
/**
|
|
2558
|
-
*
|
|
2323
|
+
* Get the Slack account for the authenticated user
|
|
2324
|
+
* Get Slack account
|
|
2559
2325
|
*/
|
|
2560
|
-
async getSlackAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
2326
|
+
async getSlackAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SlackAccountResponseDTO>> {
|
|
2561
2327
|
const queryParameters: any = {};
|
|
2562
2328
|
|
|
2563
2329
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -2573,13 +2339,14 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2573
2339
|
query: queryParameters,
|
|
2574
2340
|
}, initOverrides);
|
|
2575
2341
|
|
|
2576
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
2342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SlackAccountResponseDTOFromJSON(jsonValue));
|
|
2577
2343
|
}
|
|
2578
2344
|
|
|
2579
2345
|
/**
|
|
2580
|
-
*
|
|
2346
|
+
* Get the Slack account for the authenticated user
|
|
2347
|
+
* Get Slack account
|
|
2581
2348
|
*/
|
|
2582
|
-
async getSlackAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
2349
|
+
async getSlackAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SlackAccountResponseDTO> {
|
|
2583
2350
|
const response = await this.getSlackAccountRaw(initOverrides);
|
|
2584
2351
|
return await response.value();
|
|
2585
2352
|
}
|
|
@@ -2829,9 +2596,10 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2829
2596
|
}
|
|
2830
2597
|
|
|
2831
2598
|
/**
|
|
2832
|
-
*
|
|
2599
|
+
* Handle incoming Slack action from interactive components
|
|
2600
|
+
* Handle Slack action
|
|
2833
2601
|
*/
|
|
2834
|
-
async
|
|
2602
|
+
async handleSlackActionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2835
2603
|
const queryParameters: any = {};
|
|
2836
2604
|
|
|
2837
2605
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -2847,10 +2615,11 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2847
2615
|
}
|
|
2848
2616
|
|
|
2849
2617
|
/**
|
|
2850
|
-
*
|
|
2618
|
+
* Handle incoming Slack action from interactive components
|
|
2619
|
+
* Handle Slack action
|
|
2851
2620
|
*/
|
|
2852
|
-
async
|
|
2853
|
-
await this.
|
|
2621
|
+
async handleSlackAction(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2622
|
+
await this.handleSlackActionRaw(initOverrides);
|
|
2854
2623
|
}
|
|
2855
2624
|
|
|
2856
2625
|
/**
|
|
@@ -3370,15 +3139,16 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
3370
3139
|
}
|
|
3371
3140
|
|
|
3372
3141
|
/**
|
|
3373
|
-
*
|
|
3142
|
+
* Update user settings
|
|
3143
|
+
* Update Slack user
|
|
3374
3144
|
*/
|
|
3375
|
-
async
|
|
3145
|
+
async updateSlackUserRaw(requestParameters: UpdateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SlackUserDTO>> {
|
|
3376
3146
|
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
3377
|
-
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling
|
|
3147
|
+
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling updateSlackUser.');
|
|
3378
3148
|
}
|
|
3379
3149
|
|
|
3380
|
-
if (requestParameters.
|
|
3381
|
-
throw new runtime.RequiredError('
|
|
3150
|
+
if (requestParameters.updateUserDTO === null || requestParameters.updateUserDTO === undefined) {
|
|
3151
|
+
throw new runtime.RequiredError('updateUserDTO','Required parameter requestParameters.updateUserDTO was null or undefined when calling updateSlackUser.');
|
|
3382
3152
|
}
|
|
3383
3153
|
|
|
3384
3154
|
const queryParameters: any = {};
|
|
@@ -3396,17 +3166,18 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
3396
3166
|
method: 'PATCH',
|
|
3397
3167
|
headers: headerParameters,
|
|
3398
3168
|
query: queryParameters,
|
|
3399
|
-
body:
|
|
3169
|
+
body: UpdateUserDTOToJSON(requestParameters.updateUserDTO),
|
|
3400
3170
|
}, initOverrides);
|
|
3401
3171
|
|
|
3402
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
3172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SlackUserDTOFromJSON(jsonValue));
|
|
3403
3173
|
}
|
|
3404
3174
|
|
|
3405
3175
|
/**
|
|
3406
|
-
*
|
|
3176
|
+
* Update user settings
|
|
3177
|
+
* Update Slack user
|
|
3407
3178
|
*/
|
|
3408
|
-
async
|
|
3409
|
-
const response = await this.
|
|
3179
|
+
async updateSlackUser(requestParameters: UpdateSlackUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SlackUserDTO> {
|
|
3180
|
+
const response = await this.updateSlackUserRaw(requestParameters, initOverrides);
|
|
3410
3181
|
return await response.value();
|
|
3411
3182
|
}
|
|
3412
3183
|
|
|
@@ -3503,24 +3274,3 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
3503
3274
|
}
|
|
3504
3275
|
|
|
3505
3276
|
}
|
|
3506
|
-
|
|
3507
|
-
/**
|
|
3508
|
-
* @export
|
|
3509
|
-
*/
|
|
3510
|
-
export const GetCommitsByUserIDGroupByEnum = {
|
|
3511
|
-
HourOfDay: 'hourOfDay',
|
|
3512
|
-
Year: 'year',
|
|
3513
|
-
Month: 'month',
|
|
3514
|
-
Day: 'day'
|
|
3515
|
-
} as const;
|
|
3516
|
-
export type GetCommitsByUserIDGroupByEnum = typeof GetCommitsByUserIDGroupByEnum[keyof typeof GetCommitsByUserIDGroupByEnum];
|
|
3517
|
-
/**
|
|
3518
|
-
* @export
|
|
3519
|
-
*/
|
|
3520
|
-
export const GetMyCommitsGroupByEnum = {
|
|
3521
|
-
HourOfDay: 'hourOfDay',
|
|
3522
|
-
Year: 'year',
|
|
3523
|
-
Month: 'month',
|
|
3524
|
-
Day: 'day'
|
|
3525
|
-
} as const;
|
|
3526
|
-
export type GetMyCommitsGroupByEnum = typeof GetMyCommitsGroupByEnum[keyof typeof GetMyCommitsGroupByEnum];
|
|
@@ -13,34 +13,34 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.CreateUserDTOToJSON = exports.CreateUserDTOFromJSONTyped = exports.CreateUserDTOFromJSON = exports.instanceOfCreateUserDTO = void 0;
|
|
17
17
|
/**
|
|
18
|
-
* Check if a given object implements the
|
|
18
|
+
* Check if a given object implements the CreateUserDTO interface.
|
|
19
19
|
*/
|
|
20
|
-
function
|
|
20
|
+
function instanceOfCreateUserDTO(value) {
|
|
21
21
|
let isInstance = true;
|
|
22
|
-
isInstance = isInstance && "email" in value;
|
|
23
22
|
isInstance = isInstance && "code" in value;
|
|
23
|
+
isInstance = isInstance && "email" in value;
|
|
24
24
|
isInstance = isInstance && "redirectUri" in value;
|
|
25
25
|
return isInstance;
|
|
26
26
|
}
|
|
27
|
-
exports.
|
|
28
|
-
function
|
|
29
|
-
return
|
|
27
|
+
exports.instanceOfCreateUserDTO = instanceOfCreateUserDTO;
|
|
28
|
+
function CreateUserDTOFromJSON(json) {
|
|
29
|
+
return CreateUserDTOFromJSONTyped(json, false);
|
|
30
30
|
}
|
|
31
|
-
exports.
|
|
32
|
-
function
|
|
31
|
+
exports.CreateUserDTOFromJSON = CreateUserDTOFromJSON;
|
|
32
|
+
function CreateUserDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
33
|
if ((json === undefined) || (json === null)) {
|
|
34
34
|
return json;
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
|
-
'email': json['email'],
|
|
38
37
|
'code': json['code'],
|
|
38
|
+
'email': json['email'],
|
|
39
39
|
'redirectUri': json['redirectUri'],
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.
|
|
43
|
-
function
|
|
42
|
+
exports.CreateUserDTOFromJSONTyped = CreateUserDTOFromJSONTyped;
|
|
43
|
+
function CreateUserDTOToJSON(value) {
|
|
44
44
|
if (value === undefined) {
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
@@ -48,10 +48,10 @@ function CreateUserDtoToJSON(value) {
|
|
|
48
48
|
return null;
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
|
-
'email': value.email,
|
|
52
51
|
'code': value.code,
|
|
52
|
+
'email': value.email,
|
|
53
53
|
'redirectUri': value.redirectUri,
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
exports.
|
|
57
|
-
//# sourceMappingURL=
|
|
56
|
+
exports.CreateUserDTOToJSON = CreateUserDTOToJSON;
|
|
57
|
+
//# sourceMappingURL=CreateUserDTO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateUserDTO.js","sourceRoot":"","sources":["CreateUserDTO.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AA6BH;;GAEG;AACH,SAAgB,uBAAuB,CAAC,KAAa;IACjD,IAAI,UAAU,GAAG,IAAI,CAAC;IACtB,UAAU,GAAG,UAAU,IAAI,MAAM,IAAI,KAAK,CAAC;IAC3C,UAAU,GAAG,UAAU,IAAI,OAAO,IAAI,KAAK,CAAC;IAC5C,UAAU,GAAG,UAAU,IAAI,aAAa,IAAI,KAAK,CAAC;IAElD,OAAO,UAAU,CAAC;AACtB,CAAC;AAPD,0DAOC;AAED,SAAgB,qBAAqB,CAAC,IAAS;IAC3C,OAAO,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AAFD,sDAEC;AAED,SAAgB,0BAA0B,CAAC,IAAS,EAAE,mBAA4B;IAC9E,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QAEH,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;QACtB,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC;KACrC,CAAC;AACN,CAAC;AAVD,gEAUC;AAED,SAAgB,mBAAmB,CAAC,KAA4B;IAC5D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QAEH,MAAM,EAAE,KAAK,CAAC,IAAI;QAClB,OAAO,EAAE,KAAK,CAAC,KAAK;QACpB,aAAa,EAAE,KAAK,CAAC,WAAW;KACnC,CAAC;AACN,CAAC;AAbD,kDAaC"}
|