tuix-timesheets-api 0.6.32 → 0.6.34

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.
@@ -24,6 +24,7 @@ import type {
24
24
  PaginatedClients,
25
25
  PaginatedEmployees,
26
26
  PaginatedProjects,
27
+ PaginatedTimesheets,
27
28
  PaginatedUsers,
28
29
  PdfTemplateBuildDTO,
29
30
  PdfTemplateDTO,
@@ -36,8 +37,9 @@ import type {
36
37
  Subscription,
37
38
  SubscriptionsSentResponseDto,
38
39
  TeamUpdateDTO,
40
+ TimesheetDTO,
41
+ TimesheetEntryUpdateDTO,
39
42
  UserDTOSc,
40
- UserEnrollDTO,
41
43
  } from '../models/index';
42
44
  import {
43
45
  ClientDTOFromJSON,
@@ -58,6 +60,8 @@ import {
58
60
  PaginatedEmployeesToJSON,
59
61
  PaginatedProjectsFromJSON,
60
62
  PaginatedProjectsToJSON,
63
+ PaginatedTimesheetsFromJSON,
64
+ PaginatedTimesheetsToJSON,
61
65
  PaginatedUsersFromJSON,
62
66
  PaginatedUsersToJSON,
63
67
  PdfTemplateBuildDTOFromJSON,
@@ -82,10 +86,12 @@ import {
82
86
  SubscriptionsSentResponseDtoToJSON,
83
87
  TeamUpdateDTOFromJSON,
84
88
  TeamUpdateDTOToJSON,
89
+ TimesheetDTOFromJSON,
90
+ TimesheetDTOToJSON,
91
+ TimesheetEntryUpdateDTOFromJSON,
92
+ TimesheetEntryUpdateDTOToJSON,
85
93
  UserDTOScFromJSON,
86
94
  UserDTOScToJSON,
87
- UserEnrollDTOFromJSON,
88
- UserEnrollDTOToJSON,
89
95
  } from '../models/index';
90
96
 
91
97
  export interface BuildPdfRequest {
@@ -146,12 +152,6 @@ export interface EmployeesCompanyIdIdGetRequest {
146
152
  id: string;
147
153
  }
148
154
 
149
- export interface EnrollUserRequest {
150
- clientId: string;
151
- id: string;
152
- userEnrollDTO: UserEnrollDTO;
153
- }
154
-
155
155
  export interface GetClientByIdRequest {
156
156
  id: string;
157
157
  companyId: string;
@@ -197,6 +197,8 @@ export interface GetProjectsByClientRequest {
197
197
  export interface GetTeamRequest {
198
198
  clientId: string;
199
199
  id: string;
200
+ page?: number;
201
+ pageSize?: number;
200
202
  }
201
203
 
202
204
  export interface GetTemplateByIdRequest {
@@ -207,6 +209,17 @@ export interface GetTestUserByIdRequest {
207
209
  id: string;
208
210
  }
209
211
 
212
+ export interface GetTimesheetRequest {
213
+ clientId: string;
214
+ projectId: string;
215
+ timesheetId: string;
216
+ }
217
+
218
+ export interface GetTimesheetsRequest {
219
+ clientId: string;
220
+ projectId: string;
221
+ }
222
+
210
223
  export interface InviteEmployeeRequest {
211
224
  companyId: string;
212
225
  employeeDTO: EmployeeDTO;
@@ -264,6 +277,14 @@ export interface UpdateTestUserRequest {
264
277
  userDTOSc: UserDTOSc;
265
278
  }
266
279
 
280
+ export interface UpdateTimesheetEntryRequest {
281
+ clientId: string;
282
+ projectId: string;
283
+ timesheetId: string;
284
+ entryId: string;
285
+ timesheetEntryUpdateDTO: TimesheetEntryUpdateDTO;
286
+ }
287
+
267
288
  export interface UploadPdfTemplateRequest {
268
289
  file: Blob;
269
290
  name: string;
@@ -748,52 +769,6 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
748
769
  return await response.value();
749
770
  }
750
771
 
751
- /**
752
- * Enroll a user to a project
753
- * Enroll a user to a project
754
- */
755
- async enrollUserRaw(requestParameters: EnrollUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
756
- if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
757
- throw new runtime.RequiredError('clientId','Required parameter requestParameters.clientId was null or undefined when calling enrollUser.');
758
- }
759
-
760
- if (requestParameters.id === null || requestParameters.id === undefined) {
761
- throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling enrollUser.');
762
- }
763
-
764
- if (requestParameters.userEnrollDTO === null || requestParameters.userEnrollDTO === undefined) {
765
- throw new runtime.RequiredError('userEnrollDTO','Required parameter requestParameters.userEnrollDTO was null or undefined when calling enrollUser.');
766
- }
767
-
768
- const queryParameters: any = {};
769
-
770
- const headerParameters: runtime.HTTPHeaders = {};
771
-
772
- headerParameters['Content-Type'] = 'application/json';
773
-
774
- if (this.configuration && this.configuration.apiKey) {
775
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
776
- }
777
-
778
- const response = await this.request({
779
- path: `/projects/{clientId}/{id}/enroll`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
780
- method: 'POST',
781
- headers: headerParameters,
782
- query: queryParameters,
783
- body: UserEnrollDTOToJSON(requestParameters.userEnrollDTO),
784
- }, initOverrides);
785
-
786
- return new runtime.VoidApiResponse(response);
787
- }
788
-
789
- /**
790
- * Enroll a user to a project
791
- * Enroll a user to a project
792
- */
793
- async enrollUser(requestParameters: EnrollUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
794
- await this.enrollUserRaw(requestParameters, initOverrides);
795
- }
796
-
797
772
  /**
798
773
  * Get client by id
799
774
  */
@@ -1219,6 +1194,14 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
1219
1194
 
1220
1195
  const queryParameters: any = {};
1221
1196
 
1197
+ if (requestParameters.page !== undefined) {
1198
+ queryParameters['page'] = requestParameters.page;
1199
+ }
1200
+
1201
+ if (requestParameters.pageSize !== undefined) {
1202
+ queryParameters['pageSize'] = requestParameters.pageSize;
1203
+ }
1204
+
1222
1205
  const headerParameters: runtime.HTTPHeaders = {};
1223
1206
 
1224
1207
  if (this.configuration && this.configuration.apiKey) {
@@ -1360,6 +1343,90 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
1360
1343
  return await response.value();
1361
1344
  }
1362
1345
 
1346
+ /**
1347
+ * Get a timesheet
1348
+ * Get a timesheet
1349
+ */
1350
+ async getTimesheetRaw(requestParameters: GetTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimesheetDTO>> {
1351
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1352
+ throw new runtime.RequiredError('clientId','Required parameter requestParameters.clientId was null or undefined when calling getTimesheet.');
1353
+ }
1354
+
1355
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1356
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getTimesheet.');
1357
+ }
1358
+
1359
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1360
+ throw new runtime.RequiredError('timesheetId','Required parameter requestParameters.timesheetId was null or undefined when calling getTimesheet.');
1361
+ }
1362
+
1363
+ const queryParameters: any = {};
1364
+
1365
+ const headerParameters: runtime.HTTPHeaders = {};
1366
+
1367
+ if (this.configuration && this.configuration.apiKey) {
1368
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1369
+ }
1370
+
1371
+ const response = await this.request({
1372
+ path: `/projects/{clientId}/{projectId}/timesheets/{timesheetId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))),
1373
+ method: 'GET',
1374
+ headers: headerParameters,
1375
+ query: queryParameters,
1376
+ }, initOverrides);
1377
+
1378
+ return new runtime.JSONApiResponse(response, (jsonValue) => TimesheetDTOFromJSON(jsonValue));
1379
+ }
1380
+
1381
+ /**
1382
+ * Get a timesheet
1383
+ * Get a timesheet
1384
+ */
1385
+ async getTimesheet(requestParameters: GetTimesheetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimesheetDTO> {
1386
+ const response = await this.getTimesheetRaw(requestParameters, initOverrides);
1387
+ return await response.value();
1388
+ }
1389
+
1390
+ /**
1391
+ * Get all timesheets in a project
1392
+ * Get all timesheets in a project
1393
+ */
1394
+ async getTimesheetsRaw(requestParameters: GetTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTimesheets>> {
1395
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1396
+ throw new runtime.RequiredError('clientId','Required parameter requestParameters.clientId was null or undefined when calling getTimesheets.');
1397
+ }
1398
+
1399
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1400
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getTimesheets.');
1401
+ }
1402
+
1403
+ const queryParameters: any = {};
1404
+
1405
+ const headerParameters: runtime.HTTPHeaders = {};
1406
+
1407
+ if (this.configuration && this.configuration.apiKey) {
1408
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1409
+ }
1410
+
1411
+ const response = await this.request({
1412
+ path: `/projects/{clientId}/{projectId}/timesheets`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
1413
+ method: 'GET',
1414
+ headers: headerParameters,
1415
+ query: queryParameters,
1416
+ }, initOverrides);
1417
+
1418
+ return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTimesheetsFromJSON(jsonValue));
1419
+ }
1420
+
1421
+ /**
1422
+ * Get all timesheets in a project
1423
+ * Get all timesheets in a project
1424
+ */
1425
+ async getTimesheets(requestParameters: GetTimesheetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTimesheets> {
1426
+ const response = await this.getTimesheetsRaw(requestParameters, initOverrides);
1427
+ return await response.value();
1428
+ }
1429
+
1363
1430
  /**
1364
1431
  * Invite an employee to a company
1365
1432
  * Invite an employee to a company
@@ -1820,6 +1887,60 @@ export class TuixTimesheetsClientApi extends runtime.BaseAPI {
1820
1887
  return await response.value();
1821
1888
  }
1822
1889
 
1890
+ /**
1891
+ * Update a timesheet entry
1892
+ * Update a timesheet entry
1893
+ */
1894
+ async updateTimesheetEntryRaw(requestParameters: UpdateTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1895
+ if (requestParameters.clientId === null || requestParameters.clientId === undefined) {
1896
+ throw new runtime.RequiredError('clientId','Required parameter requestParameters.clientId was null or undefined when calling updateTimesheetEntry.');
1897
+ }
1898
+
1899
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
1900
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling updateTimesheetEntry.');
1901
+ }
1902
+
1903
+ if (requestParameters.timesheetId === null || requestParameters.timesheetId === undefined) {
1904
+ throw new runtime.RequiredError('timesheetId','Required parameter requestParameters.timesheetId was null or undefined when calling updateTimesheetEntry.');
1905
+ }
1906
+
1907
+ if (requestParameters.entryId === null || requestParameters.entryId === undefined) {
1908
+ throw new runtime.RequiredError('entryId','Required parameter requestParameters.entryId was null or undefined when calling updateTimesheetEntry.');
1909
+ }
1910
+
1911
+ if (requestParameters.timesheetEntryUpdateDTO === null || requestParameters.timesheetEntryUpdateDTO === undefined) {
1912
+ throw new runtime.RequiredError('timesheetEntryUpdateDTO','Required parameter requestParameters.timesheetEntryUpdateDTO was null or undefined when calling updateTimesheetEntry.');
1913
+ }
1914
+
1915
+ const queryParameters: any = {};
1916
+
1917
+ const headerParameters: runtime.HTTPHeaders = {};
1918
+
1919
+ headerParameters['Content-Type'] = 'application/json';
1920
+
1921
+ if (this.configuration && this.configuration.apiKey) {
1922
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // auth0Authorizer authentication
1923
+ }
1924
+
1925
+ const response = await this.request({
1926
+ path: `/projects/{clientId}/{projectId}/timesheets/{timesheetId}/entries/{entryId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters.clientId))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"timesheetId"}}`, encodeURIComponent(String(requestParameters.timesheetId))).replace(`{${"entryId"}}`, encodeURIComponent(String(requestParameters.entryId))),
1927
+ method: 'PATCH',
1928
+ headers: headerParameters,
1929
+ query: queryParameters,
1930
+ body: TimesheetEntryUpdateDTOToJSON(requestParameters.timesheetEntryUpdateDTO),
1931
+ }, initOverrides);
1932
+
1933
+ return new runtime.VoidApiResponse(response);
1934
+ }
1935
+
1936
+ /**
1937
+ * Update a timesheet entry
1938
+ * Update a timesheet entry
1939
+ */
1940
+ async updateTimesheetEntry(requestParameters: UpdateTimesheetEntryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1941
+ await this.updateTimesheetEntryRaw(requestParameters, initOverrides);
1942
+ }
1943
+
1823
1944
  /**
1824
1945
  * Upload template
1825
1946
  * Upload template
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Tuix Services
6
+ * Tuix Services API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PaginatedTimesheetsToJSON = exports.PaginatedTimesheetsFromJSONTyped = exports.PaginatedTimesheetsFromJSON = exports.instanceOfPaginatedTimesheets = void 0;
17
+ const TimesheetDTO_1 = require("./TimesheetDTO");
18
+ /**
19
+ * Check if a given object implements the PaginatedTimesheets interface.
20
+ */
21
+ function instanceOfPaginatedTimesheets(value) {
22
+ let isInstance = true;
23
+ isInstance = isInstance && "items" in value;
24
+ isInstance = isInstance && "page" in value;
25
+ isInstance = isInstance && "pageSize" in value;
26
+ isInstance = isInstance && "totalItems" in value;
27
+ isInstance = isInstance && "totalPages" in value;
28
+ return isInstance;
29
+ }
30
+ exports.instanceOfPaginatedTimesheets = instanceOfPaginatedTimesheets;
31
+ function PaginatedTimesheetsFromJSON(json) {
32
+ return PaginatedTimesheetsFromJSONTyped(json, false);
33
+ }
34
+ exports.PaginatedTimesheetsFromJSON = PaginatedTimesheetsFromJSON;
35
+ function PaginatedTimesheetsFromJSONTyped(json, ignoreDiscriminator) {
36
+ if ((json === undefined) || (json === null)) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'items': (json['items'].map(TimesheetDTO_1.TimesheetDTOFromJSON)),
41
+ 'page': json['page'],
42
+ 'pageSize': json['pageSize'],
43
+ 'totalItems': json['totalItems'],
44
+ 'totalPages': json['totalPages'],
45
+ };
46
+ }
47
+ exports.PaginatedTimesheetsFromJSONTyped = PaginatedTimesheetsFromJSONTyped;
48
+ function PaginatedTimesheetsToJSON(value) {
49
+ if (value === undefined) {
50
+ return undefined;
51
+ }
52
+ if (value === null) {
53
+ return null;
54
+ }
55
+ return {
56
+ 'items': (value.items.map(TimesheetDTO_1.TimesheetDTOToJSON)),
57
+ 'page': value.page,
58
+ 'pageSize': value.pageSize,
59
+ 'totalItems': value.totalItems,
60
+ 'totalPages': value.totalPages,
61
+ };
62
+ }
63
+ exports.PaginatedTimesheetsToJSON = PaginatedTimesheetsToJSON;
64
+ //# sourceMappingURL=PaginatedTimesheets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginatedTimesheets.js","sourceRoot":"","sources":["PaginatedTimesheets.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAIH,iDAIwB;AAwCxB;;GAEG;AACH,SAAgB,6BAA6B,CAAC,KAAa;IACvD,IAAI,UAAU,GAAG,IAAI,CAAC;IACtB,UAAU,GAAG,UAAU,IAAI,OAAO,IAAI,KAAK,CAAC;IAC5C,UAAU,GAAG,UAAU,IAAI,MAAM,IAAI,KAAK,CAAC;IAC3C,UAAU,GAAG,UAAU,IAAI,UAAU,IAAI,KAAK,CAAC;IAC/C,UAAU,GAAG,UAAU,IAAI,YAAY,IAAI,KAAK,CAAC;IACjD,UAAU,GAAG,U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Services API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { TimesheetDTO } from './TimesheetDTO';
17
+ import {
18
+ TimesheetDTOFromJSON,
19
+ TimesheetDTOFromJSONTyped,
20
+ TimesheetDTOToJSON,
21
+ } from './TimesheetDTO';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface PaginatedTimesheets
27
+ */
28
+ export interface PaginatedTimesheets {
29
+ /**
30
+ *
31
+ * @type {Array<TimesheetDTO>}
32
+ * @memberof PaginatedTimesheets
33
+ */
34
+ items: Array<TimesheetDTO>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof PaginatedTimesheets
39
+ */
40
+ page: number;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof PaginatedTimesheets
45
+ */
46
+ pageSize: number;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof PaginatedTimesheets
51
+ */
52
+ totalItems: number;
53
+ /**
54
+ *
55
+ * @type {number}
56
+ * @memberof PaginatedTimesheets
57
+ */
58
+ totalPages: number;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the PaginatedTimesheets interface.
63
+ */
64
+ export function instanceOfPaginatedTimesheets(value: object): boolean {
65
+ let isInstance = true;
66
+ isInstance = isInstance && "items" in value;
67
+ isInstance = isInstance && "page" in value;
68
+ isInstance = isInstance && "pageSize" in value;
69
+ isInstance = isInstance && "totalItems" in value;
70
+ isInstance = isInstance && "totalPages" in value;
71
+
72
+ return isInstance;
73
+ }
74
+
75
+ export function PaginatedTimesheetsFromJSON(json: any): PaginatedTimesheets {
76
+ return PaginatedTimesheetsFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function PaginatedTimesheetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTimesheets {
80
+ if ((json === undefined) || (json === null)) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'items': ((json['items'] as Array<any>).map(TimesheetDTOFromJSON)),
86
+ 'page': json['page'],
87
+ 'pageSize': json['pageSize'],
88
+ 'totalItems': json['totalItems'],
89
+ 'totalPages': json['totalPages'],
90
+ };
91
+ }
92
+
93
+ export function PaginatedTimesheetsToJSON(value?: PaginatedTimesheets | null): any {
94
+ if (value === undefined) {
95
+ return undefined;
96
+ }
97
+ if (value === null) {
98
+ return null;
99
+ }
100
+ return {
101
+
102
+ 'items': ((value.items as Array<any>).map(TimesheetDTOToJSON)),
103
+ 'page': value.page,
104
+ 'pageSize': value.pageSize,
105
+ 'totalItems': value.totalItems,
106
+ 'totalPages': value.totalPages,
107
+ };
108
+ }
109
+
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Tuix Services
6
+ * Tuix Services API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TimesheetDTOToJSON = exports.TimesheetDTOFromJSONTyped = exports.TimesheetDTOFromJSON = exports.instanceOfTimesheetDTO = void 0;
17
+ const runtime_1 = require("../runtime");
18
+ const TimesheetEntryDTO_1 = require("./TimesheetEntryDTO");
19
+ /**
20
+ * Check if a given object implements the TimesheetDTO interface.
21
+ */
22
+ function instanceOfTimesheetDTO(value) {
23
+ let isInstance = true;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfTimesheetDTO = instanceOfTimesheetDTO;
27
+ function TimesheetDTOFromJSON(json) {
28
+ return TimesheetDTOFromJSONTyped(json, false);
29
+ }
30
+ exports.TimesheetDTOFromJSON = TimesheetDTOFromJSON;
31
+ function TimesheetDTOFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'employeeID': !(0, runtime_1.exists)(json, 'employeeID') ? undefined : json['employeeID'],
37
+ 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
38
+ 'month': !(0, runtime_1.exists)(json, 'month') ? undefined : json['month'],
39
+ 'projectID': !(0, runtime_1.exists)(json, 'projectID') ? undefined : json['projectID'],
40
+ 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
41
+ 'timesheetEntries': !(0, runtime_1.exists)(json, 'timesheet_entries') ? undefined : (json['timesheet_entries'].map(TimesheetEntryDTO_1.TimesheetEntryDTOFromJSON)),
42
+ };
43
+ }
44
+ exports.TimesheetDTOFromJSONTyped = TimesheetDTOFromJSONTyped;
45
+ function TimesheetDTOToJSON(value) {
46
+ if (value === undefined) {
47
+ return undefined;
48
+ }
49
+ if (value === null) {
50
+ return null;
51
+ }
52
+ return {
53
+ 'employeeID': value.employeeID,
54
+ 'id': value.id,
55
+ 'month': value.month,
56
+ 'projectID': value.projectID,
57
+ 'status': value.status,
58
+ 'timesheet_entries': value.timesheetEntries === undefined ? undefined : (value.timesheetEntries.map(TimesheetEntryDTO_1.TimesheetEntryDTOToJSON)),
59
+ };
60
+ }
61
+ exports.TimesheetDTOToJSON = TimesheetDTOToJSON;
62
+ //# sourceMappingURL=TimesheetDTO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimesheetDTO.js","sourceRoot":"","sources":["TimesheetDTO.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAEH,wCAA+C;AAE/C,2DAI6B;AA8C7B;;GAEG;AACH,SAAgB,sBAAsB,CAAC,KAAa;IAChD,IAAI,UAAU,GAAG,IAAI,CAAC;IAEtB,OAAO,UAAU,CAAC;AACtB,CAAC;AAJD,wDAIC;AAED,SAAgB,oBAAoB,CAAC,IAAS;IAC1C,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CAAC;QACtB,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QAEH,YAAY,EAAE,KAAK,CAAC,UAAU;QAC9B,IAAI,EAAE,KAAK,CAAC,EAAE;QACd,OAAO,EAAE,KAAK,CAAC,KAAK;QACpB,WAAW,EAAE,KAAK,CAAC,SAAS;QAC5B,QAAQ,EAAE,KAAK,CAAC,MAAM;QACtB,mBAAmB,EAAE,KAAK,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,gBAA+B,CAAC,GAAG,CAAC,2CAAuB,CAAC,CAAC;KAChJ,CAAC;AACN,CAAC;AAhBD,gDAgBC"}
@@ -0,0 +1,112 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tuix Services
5
+ * Tuix Services API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { TimesheetEntryDTO } from './TimesheetEntryDTO';
17
+ import {
18
+ TimesheetEntryDTOFromJSON,
19
+ TimesheetEntryDTOFromJSONTyped,
20
+ TimesheetEntryDTOToJSON,
21
+ } from './TimesheetEntryDTO';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface TimesheetDTO
27
+ */
28
+ export interface TimesheetDTO {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof TimesheetDTO
33
+ */
34
+ employeeID?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof TimesheetDTO
39
+ */
40
+ id?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof TimesheetDTO
45
+ */
46
+ month?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof TimesheetDTO
51
+ */
52
+ projectID?: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof TimesheetDTO
57
+ */
58
+ status?: string;
59
+ /**
60
+ *
61
+ * @type {Array<TimesheetEntryDTO>}
62
+ * @memberof TimesheetDTO
63
+ */
64
+ timesheetEntries?: Array<TimesheetEntryDTO>;
65
+ }
66
+
67
+ /**
68
+ * Check if a given object implements the TimesheetDTO interface.
69
+ */
70
+ export function instanceOfTimesheetDTO(value: object): boolean {
71
+ let isInstance = true;
72
+
73
+ return isInstance;
74
+ }
75
+
76
+ export function TimesheetDTOFromJSON(json: any): TimesheetDTO {
77
+ return TimesheetDTOFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function TimesheetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimesheetDTO {
81
+ if ((json === undefined) || (json === null)) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'employeeID': !exists(json, 'employeeID') ? undefined : json['employeeID'],
87
+ 'id': !exists(json, 'id') ? undefined : json['id'],
88
+ 'month': !exists(json, 'month') ? undefined : json['month'],
89
+ 'projectID': !exists(json, 'projectID') ? undefined : json['projectID'],
90
+ 'status': !exists(json, 'status') ? undefined : json['status'],
91
+ 'timesheetEntries': !exists(json, 'timesheet_entries') ? undefined : ((json['timesheet_entries'] as Array<any>).map(TimesheetEntryDTOFromJSON)),
92
+ };
93
+ }
94
+
95
+ export function TimesheetDTOToJSON(value?: TimesheetDTO | null): any {
96
+ if (value === undefined) {
97
+ return undefined;
98
+ }
99
+ if (value === null) {
100
+ return null;
101
+ }
102
+ return {
103
+
104
+ 'employeeID': value.employeeID,
105
+ 'id': value.id,
106
+ 'month': value.month,
107
+ 'projectID': value.projectID,
108
+ 'status': value.status,
109
+ 'timesheet_entries': value.timesheetEntries === undefined ? undefined : ((value.timesheetEntries as Array<any>).map(TimesheetEntryDTOToJSON)),
110
+ };
111
+ }
112
+