tuix-timesheets-api 0.6.163 → 0.6.165
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.
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
36
36
|
return result;
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.TuixTimesheetsClientApi = void 0;
|
|
39
|
+
exports.GetMyCommitsGroupByEnum = exports.GetCommitsByUserIDGroupByEnum = exports.TuixTimesheetsClientApi = void 0;
|
|
40
40
|
const runtime = __importStar(require("../runtime"));
|
|
41
41
|
const index_1 = require("../models/index");
|
|
42
42
|
/**
|
|
@@ -165,38 +165,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
165
165
|
async approveTimesheet(requestParameters, initOverrides) {
|
|
166
166
|
await this.approveTimesheetRaw(requestParameters, initOverrides);
|
|
167
167
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Get commit statistics for the authenticated user
|
|
170
|
-
* Get my commits
|
|
171
|
-
*/
|
|
172
|
-
async commitsGetRaw(requestParameters, initOverrides) {
|
|
173
|
-
const queryParameters = {};
|
|
174
|
-
if (requestParameters.from !== undefined) {
|
|
175
|
-
queryParameters['from'] = requestParameters.from;
|
|
176
|
-
}
|
|
177
|
-
if (requestParameters.to !== undefined) {
|
|
178
|
-
queryParameters['to'] = requestParameters.to;
|
|
179
|
-
}
|
|
180
|
-
if (requestParameters.groupBy !== undefined) {
|
|
181
|
-
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
182
|
-
}
|
|
183
|
-
const headerParameters = {};
|
|
184
|
-
const response = await this.request({
|
|
185
|
-
path: `/commits`,
|
|
186
|
-
method: 'GET',
|
|
187
|
-
headers: headerParameters,
|
|
188
|
-
query: queryParameters,
|
|
189
|
-
}, initOverrides);
|
|
190
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GithubCommitCountDTOFromJSON));
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Get commit statistics for the authenticated user
|
|
194
|
-
* Get my commits
|
|
195
|
-
*/
|
|
196
|
-
async commitsGet(requestParameters = {}, initOverrides) {
|
|
197
|
-
const response = await this.commitsGetRaw(requestParameters, initOverrides);
|
|
198
|
-
return await response.value();
|
|
199
|
-
}
|
|
200
168
|
/**
|
|
201
169
|
* Create client
|
|
202
170
|
*/
|
|
@@ -291,6 +259,37 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
291
259
|
const response = await this.createEmployeeInvoiceRaw(requestParameters, initOverrides);
|
|
292
260
|
return await response.value();
|
|
293
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Create a new GitHub user account
|
|
264
|
+
* Create GitHub user
|
|
265
|
+
*/
|
|
266
|
+
async createGithubUserRaw(requestParameters, initOverrides) {
|
|
267
|
+
if (requestParameters.createGithubUserDTO === null || requestParameters.createGithubUserDTO === undefined) {
|
|
268
|
+
throw new runtime.RequiredError('createGithubUserDTO', 'Required parameter requestParameters.createGithubUserDTO was null or undefined when calling createGithubUser.');
|
|
269
|
+
}
|
|
270
|
+
const queryParameters = {};
|
|
271
|
+
const headerParameters = {};
|
|
272
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
273
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
274
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
275
|
+
}
|
|
276
|
+
const response = await this.request({
|
|
277
|
+
path: `/github-users`,
|
|
278
|
+
method: 'POST',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
body: (0, index_1.CreateGithubUserDTOToJSON)(requestParameters.createGithubUserDTO),
|
|
282
|
+
}, initOverrides);
|
|
283
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GithubUserDTOFromJSON)(jsonValue));
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Create a new GitHub user account
|
|
287
|
+
* Create GitHub user
|
|
288
|
+
*/
|
|
289
|
+
async createGithubUser(requestParameters, initOverrides) {
|
|
290
|
+
const response = await this.createGithubUserRaw(requestParameters, initOverrides);
|
|
291
|
+
return await response.value();
|
|
292
|
+
}
|
|
294
293
|
/**
|
|
295
294
|
* Allows a user to add a holiday
|
|
296
295
|
*/
|
|
@@ -583,6 +582,31 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
583
582
|
async deleteEmployeeInvoice(requestParameters, initOverrides) {
|
|
584
583
|
await this.deleteEmployeeInvoiceRaw(requestParameters, initOverrides);
|
|
585
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Delete the authenticated user\'s GitHub account
|
|
587
|
+
* Delete GitHub user
|
|
588
|
+
*/
|
|
589
|
+
async deleteGithubUserRaw(initOverrides) {
|
|
590
|
+
const queryParameters = {};
|
|
591
|
+
const headerParameters = {};
|
|
592
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
593
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
594
|
+
}
|
|
595
|
+
const response = await this.request({
|
|
596
|
+
path: `/github-users`,
|
|
597
|
+
method: 'DELETE',
|
|
598
|
+
headers: headerParameters,
|
|
599
|
+
query: queryParameters,
|
|
600
|
+
}, initOverrides);
|
|
601
|
+
return new runtime.VoidApiResponse(response);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Delete the authenticated user\'s GitHub account
|
|
605
|
+
* Delete GitHub user
|
|
606
|
+
*/
|
|
607
|
+
async deleteGithubUser(initOverrides) {
|
|
608
|
+
await this.deleteGithubUserRaw(initOverrides);
|
|
609
|
+
}
|
|
586
610
|
/**
|
|
587
611
|
* Delete a holiday
|
|
588
612
|
* Delete a holiday
|
|
@@ -900,41 +924,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
900
924
|
const response = await this.downloadTimesheetPdfRaw(requestParameters, initOverrides);
|
|
901
925
|
return await response.value();
|
|
902
926
|
}
|
|
903
|
-
/**
|
|
904
|
-
* Get commit statistics for a specific user
|
|
905
|
-
* Get commits by user ID
|
|
906
|
-
*/
|
|
907
|
-
async employeesUserIdCommitsGetRaw(requestParameters, initOverrides) {
|
|
908
|
-
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
909
|
-
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling employeesUserIdCommitsGet.');
|
|
910
|
-
}
|
|
911
|
-
const queryParameters = {};
|
|
912
|
-
if (requestParameters.from !== undefined) {
|
|
913
|
-
queryParameters['from'] = requestParameters.from;
|
|
914
|
-
}
|
|
915
|
-
if (requestParameters.to !== undefined) {
|
|
916
|
-
queryParameters['to'] = requestParameters.to;
|
|
917
|
-
}
|
|
918
|
-
if (requestParameters.groupBy !== undefined) {
|
|
919
|
-
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
920
|
-
}
|
|
921
|
-
const headerParameters = {};
|
|
922
|
-
const response = await this.request({
|
|
923
|
-
path: `/employees/{userId}/commits`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
924
|
-
method: 'GET',
|
|
925
|
-
headers: headerParameters,
|
|
926
|
-
query: queryParameters,
|
|
927
|
-
}, initOverrides);
|
|
928
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GithubCommitCountDTOFromJSON));
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* Get commit statistics for a specific user
|
|
932
|
-
* Get commits by user ID
|
|
933
|
-
*/
|
|
934
|
-
async employeesUserIdCommitsGet(requestParameters, initOverrides) {
|
|
935
|
-
const response = await this.employeesUserIdCommitsGetRaw(requestParameters, initOverrides);
|
|
936
|
-
return await response.value();
|
|
937
|
-
}
|
|
938
927
|
/**
|
|
939
928
|
* Get an adjustedTimesheet
|
|
940
929
|
* Get an adjustedTimesheet
|
|
@@ -1102,6 +1091,50 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1102
1091
|
const response = await this.getClientsRaw(requestParameters, initOverrides);
|
|
1103
1092
|
return await response.value();
|
|
1104
1093
|
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Get commit statistics for a specific user
|
|
1096
|
+
* Get commits by user ID
|
|
1097
|
+
*/
|
|
1098
|
+
async getCommitsByUserIDRaw(requestParameters, initOverrides) {
|
|
1099
|
+
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
1100
|
+
throw new runtime.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling getCommitsByUserID.');
|
|
1101
|
+
}
|
|
1102
|
+
if (requestParameters.from === null || requestParameters.from === undefined) {
|
|
1103
|
+
throw new runtime.RequiredError('from', 'Required parameter requestParameters.from was null or undefined when calling getCommitsByUserID.');
|
|
1104
|
+
}
|
|
1105
|
+
if (requestParameters.to === null || requestParameters.to === undefined) {
|
|
1106
|
+
throw new runtime.RequiredError('to', 'Required parameter requestParameters.to was null or undefined when calling getCommitsByUserID.');
|
|
1107
|
+
}
|
|
1108
|
+
const queryParameters = {};
|
|
1109
|
+
if (requestParameters.from !== undefined) {
|
|
1110
|
+
queryParameters['from'] = requestParameters.from.toISOString().substring(0, 10);
|
|
1111
|
+
}
|
|
1112
|
+
if (requestParameters.to !== undefined) {
|
|
1113
|
+
queryParameters['to'] = requestParameters.to.toISOString().substring(0, 10);
|
|
1114
|
+
}
|
|
1115
|
+
if (requestParameters.groupBy !== undefined) {
|
|
1116
|
+
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
1117
|
+
}
|
|
1118
|
+
const headerParameters = {};
|
|
1119
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1120
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
1121
|
+
}
|
|
1122
|
+
const response = await this.request({
|
|
1123
|
+
path: `/employees/{userId}/commits`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
1124
|
+
method: 'GET',
|
|
1125
|
+
headers: headerParameters,
|
|
1126
|
+
query: queryParameters,
|
|
1127
|
+
}, initOverrides);
|
|
1128
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GithubCommitCountDTOFromJSON));
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Get commit statistics for a specific user
|
|
1132
|
+
* Get commits by user ID
|
|
1133
|
+
*/
|
|
1134
|
+
async getCommitsByUserID(requestParameters, initOverrides) {
|
|
1135
|
+
const response = await this.getCommitsByUserIDRaw(requestParameters, initOverrides);
|
|
1136
|
+
return await response.value();
|
|
1137
|
+
}
|
|
1105
1138
|
/**
|
|
1106
1139
|
* Get all companies a user belongs to
|
|
1107
1140
|
* Get all companies a user belongs to
|
|
@@ -1294,6 +1327,32 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1294
1327
|
const response = await this.getEmployeesRaw(requestParameters, initOverrides);
|
|
1295
1328
|
return await response.value();
|
|
1296
1329
|
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Get GitHub account for the authenticated user
|
|
1332
|
+
* Get GitHub account
|
|
1333
|
+
*/
|
|
1334
|
+
async getGithubAccountRaw(initOverrides) {
|
|
1335
|
+
const queryParameters = {};
|
|
1336
|
+
const headerParameters = {};
|
|
1337
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1338
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
1339
|
+
}
|
|
1340
|
+
const response = await this.request({
|
|
1341
|
+
path: `/github-accounts`,
|
|
1342
|
+
method: 'GET',
|
|
1343
|
+
headers: headerParameters,
|
|
1344
|
+
query: queryParameters,
|
|
1345
|
+
}, initOverrides);
|
|
1346
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GithubAccountDTOFromJSON)(jsonValue));
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Get GitHub account for the authenticated user
|
|
1350
|
+
* Get GitHub account
|
|
1351
|
+
*/
|
|
1352
|
+
async getGithubAccount(initOverrides) {
|
|
1353
|
+
const response = await this.getGithubAccountRaw(initOverrides);
|
|
1354
|
+
return await response.value();
|
|
1355
|
+
}
|
|
1297
1356
|
/**
|
|
1298
1357
|
* Get a global timesheet
|
|
1299
1358
|
* Get a global timesheet
|
|
@@ -1501,6 +1560,47 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1501
1560
|
const response = await this.getMyAccountRaw(initOverrides);
|
|
1502
1561
|
return await response.value();
|
|
1503
1562
|
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Get commit statistics for the authenticated user
|
|
1565
|
+
* Get my commits
|
|
1566
|
+
*/
|
|
1567
|
+
async getMyCommitsRaw(requestParameters, initOverrides) {
|
|
1568
|
+
if (requestParameters.from === null || requestParameters.from === undefined) {
|
|
1569
|
+
throw new runtime.RequiredError('from', 'Required parameter requestParameters.from was null or undefined when calling getMyCommits.');
|
|
1570
|
+
}
|
|
1571
|
+
if (requestParameters.to === null || requestParameters.to === undefined) {
|
|
1572
|
+
throw new runtime.RequiredError('to', 'Required parameter requestParameters.to was null or undefined when calling getMyCommits.');
|
|
1573
|
+
}
|
|
1574
|
+
const queryParameters = {};
|
|
1575
|
+
if (requestParameters.from !== undefined) {
|
|
1576
|
+
queryParameters['from'] = requestParameters.from.toISOString().substring(0, 10);
|
|
1577
|
+
}
|
|
1578
|
+
if (requestParameters.to !== undefined) {
|
|
1579
|
+
queryParameters['to'] = requestParameters.to.toISOString().substring(0, 10);
|
|
1580
|
+
}
|
|
1581
|
+
if (requestParameters.groupBy !== undefined) {
|
|
1582
|
+
queryParameters['groupBy'] = requestParameters.groupBy;
|
|
1583
|
+
}
|
|
1584
|
+
const headerParameters = {};
|
|
1585
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1586
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
|
|
1587
|
+
}
|
|
1588
|
+
const response = await this.request({
|
|
1589
|
+
path: `/commits`,
|
|
1590
|
+
method: 'GET',
|
|
1591
|
+
headers: headerParameters,
|
|
1592
|
+
query: queryParameters,
|
|
1593
|
+
}, initOverrides);
|
|
1594
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GithubCommitCountDTOFromJSON));
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Get commit statistics for the authenticated user
|
|
1598
|
+
* Get my commits
|
|
1599
|
+
*/
|
|
1600
|
+
async getMyCommits(requestParameters, initOverrides) {
|
|
1601
|
+
const response = await this.getMyCommitsRaw(requestParameters, initOverrides);
|
|
1602
|
+
return await response.value();
|
|
1603
|
+
}
|
|
1504
1604
|
/**
|
|
1505
1605
|
* Get template by id
|
|
1506
1606
|
* Get template by id
|
|
@@ -1965,79 +2065,6 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
1965
2065
|
const response = await this.getUserTokensRaw(requestParameters, initOverrides);
|
|
1966
2066
|
return await response.value();
|
|
1967
2067
|
}
|
|
1968
|
-
/**
|
|
1969
|
-
* Get GitHub account for the authenticated user
|
|
1970
|
-
* Get GitHub account
|
|
1971
|
-
*/
|
|
1972
|
-
async githubAccountsGetRaw(initOverrides) {
|
|
1973
|
-
const queryParameters = {};
|
|
1974
|
-
const headerParameters = {};
|
|
1975
|
-
const response = await this.request({
|
|
1976
|
-
path: `/github-accounts`,
|
|
1977
|
-
method: 'GET',
|
|
1978
|
-
headers: headerParameters,
|
|
1979
|
-
query: queryParameters,
|
|
1980
|
-
}, initOverrides);
|
|
1981
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GithubAccountDTOFromJSON)(jsonValue));
|
|
1982
|
-
}
|
|
1983
|
-
/**
|
|
1984
|
-
* Get GitHub account for the authenticated user
|
|
1985
|
-
* Get GitHub account
|
|
1986
|
-
*/
|
|
1987
|
-
async githubAccountsGet(initOverrides) {
|
|
1988
|
-
const response = await this.githubAccountsGetRaw(initOverrides);
|
|
1989
|
-
return await response.value();
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* Delete the authenticated user\'s GitHub account
|
|
1993
|
-
* Delete GitHub user
|
|
1994
|
-
*/
|
|
1995
|
-
async githubUsersDeleteRaw(initOverrides) {
|
|
1996
|
-
const queryParameters = {};
|
|
1997
|
-
const headerParameters = {};
|
|
1998
|
-
const response = await this.request({
|
|
1999
|
-
path: `/github-users`,
|
|
2000
|
-
method: 'DELETE',
|
|
2001
|
-
headers: headerParameters,
|
|
2002
|
-
query: queryParameters,
|
|
2003
|
-
}, initOverrides);
|
|
2004
|
-
return new runtime.VoidApiResponse(response);
|
|
2005
|
-
}
|
|
2006
|
-
/**
|
|
2007
|
-
* Delete the authenticated user\'s GitHub account
|
|
2008
|
-
* Delete GitHub user
|
|
2009
|
-
*/
|
|
2010
|
-
async githubUsersDelete(initOverrides) {
|
|
2011
|
-
await this.githubUsersDeleteRaw(initOverrides);
|
|
2012
|
-
}
|
|
2013
|
-
/**
|
|
2014
|
-
* Create a new GitHub user account
|
|
2015
|
-
* Create GitHub user
|
|
2016
|
-
*/
|
|
2017
|
-
async githubUsersPostRaw(requestParameters, initOverrides) {
|
|
2018
|
-
if (requestParameters.createGithubUserDTO === null || requestParameters.createGithubUserDTO === undefined) {
|
|
2019
|
-
throw new runtime.RequiredError('createGithubUserDTO', 'Required parameter requestParameters.createGithubUserDTO was null or undefined when calling githubUsersPost.');
|
|
2020
|
-
}
|
|
2021
|
-
const queryParameters = {};
|
|
2022
|
-
const headerParameters = {};
|
|
2023
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
2024
|
-
const response = await this.request({
|
|
2025
|
-
path: `/github-users`,
|
|
2026
|
-
method: 'POST',
|
|
2027
|
-
headers: headerParameters,
|
|
2028
|
-
query: queryParameters,
|
|
2029
|
-
body: (0, index_1.CreateGithubUserDTOToJSON)(requestParameters.createGithubUserDTO),
|
|
2030
|
-
}, initOverrides);
|
|
2031
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GithubUserDTOFromJSON)(jsonValue));
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* Create a new GitHub user account
|
|
2035
|
-
* Create GitHub user
|
|
2036
|
-
*/
|
|
2037
|
-
async githubUsersPost(requestParameters, initOverrides) {
|
|
2038
|
-
const response = await this.githubUsersPostRaw(requestParameters, initOverrides);
|
|
2039
|
-
return await response.value();
|
|
2040
|
-
}
|
|
2041
2068
|
/**
|
|
2042
2069
|
*
|
|
2043
2070
|
*/
|
|
@@ -2776,4 +2803,22 @@ class TuixTimesheetsClientApi extends runtime.BaseAPI {
|
|
|
2776
2803
|
}
|
|
2777
2804
|
}
|
|
2778
2805
|
exports.TuixTimesheetsClientApi = TuixTimesheetsClientApi;
|
|
2806
|
+
/**
|
|
2807
|
+
* @export
|
|
2808
|
+
*/
|
|
2809
|
+
exports.GetCommitsByUserIDGroupByEnum = {
|
|
2810
|
+
HourOfDay: 'hourOfDay',
|
|
2811
|
+
Year: 'year',
|
|
2812
|
+
Month: 'month',
|
|
2813
|
+
Day: 'day'
|
|
2814
|
+
};
|
|
2815
|
+
/**
|
|
2816
|
+
* @export
|
|
2817
|
+
*/
|
|
2818
|
+
exports.GetMyCommitsGroupByEnum = {
|
|
2819
|
+
HourOfDay: 'hourOfDay',
|
|
2820
|
+
Year: 'year',
|
|
2821
|
+
Month: 'month',
|
|
2822
|
+
Day: 'day'
|
|
2823
|
+
};
|
|
2779
2824
|
//# sourceMappingURL=TuixTimesheetsClientApi.js.map
|