@digital8/task-dashboard-ts-sdk 0.0.8 → 0.0.10
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 +3 -4
- package/README.md +2 -2
- package/dist/apis/AllocationDaysApi.d.ts +1 -24
- package/dist/apis/AllocationDaysApi.js +0 -76
- package/dist/apis/AllocationsApi.d.ts +2 -13
- package/dist/apis/AllocationsApi.js +2 -39
- package/dist/apis/TimeOffApi.d.ts +2 -13
- package/dist/apis/TimeOffApi.js +2 -39
- package/dist/apis/TimeOffDaysApi.d.ts +1 -24
- package/dist/apis/TimeOffDaysApi.js +0 -76
- package/dist/esm/apis/AllocationDaysApi.d.ts +1 -24
- package/dist/esm/apis/AllocationDaysApi.js +1 -77
- package/dist/esm/apis/AllocationsApi.d.ts +2 -13
- package/dist/esm/apis/AllocationsApi.js +3 -40
- package/dist/esm/apis/TimeOffApi.d.ts +2 -13
- package/dist/esm/apis/TimeOffApi.js +3 -40
- package/dist/esm/apis/TimeOffDaysApi.d.ts +1 -24
- package/dist/esm/apis/TimeOffDaysApi.js +1 -77
- package/dist/esm/models/DeleteAllocationRequest.d.ts +39 -0
- package/dist/esm/models/{UpdateTimeOffDayRequest.js → DeleteAllocationRequest.js} +13 -10
- package/dist/esm/models/DeleteTimeOffRequest.d.ts +39 -0
- package/dist/esm/models/DeleteTimeOffRequest.js +46 -0
- package/dist/esm/models/ScheduleScope.d.ts +26 -0
- package/dist/esm/models/ScheduleScope.js +44 -0
- package/dist/esm/models/UpdateAllocationRequest.d.ts +13 -0
- package/dist/esm/models/UpdateAllocationRequest.js +7 -0
- package/dist/esm/models/UpdateTimeOffRequest.d.ts +13 -0
- package/dist/esm/models/UpdateTimeOffRequest.js +7 -0
- package/dist/esm/models/index.d.ts +3 -4
- package/dist/esm/models/index.js +3 -4
- package/dist/models/DeleteAllocationRequest.d.ts +39 -0
- package/dist/models/DeleteAllocationRequest.js +53 -0
- package/dist/models/DeleteTimeOffRequest.d.ts +39 -0
- package/dist/models/DeleteTimeOffRequest.js +53 -0
- package/dist/models/ScheduleScope.d.ts +26 -0
- package/dist/models/ScheduleScope.js +52 -0
- package/dist/models/UpdateAllocationRequest.d.ts +13 -0
- package/dist/models/UpdateAllocationRequest.js +7 -0
- package/dist/models/UpdateTimeOffRequest.d.ts +13 -0
- package/dist/models/UpdateTimeOffRequest.js +7 -0
- package/dist/models/index.d.ts +3 -4
- package/dist/models/index.js +3 -4
- package/package.json +1 -1
- package/src/apis/AllocationDaysApi.ts +0 -111
- package/src/apis/AllocationsApi.ts +7 -56
- package/src/apis/TimeOffApi.ts +7 -56
- package/src/apis/TimeOffDaysApi.ts +0 -111
- package/src/models/DeleteAllocationRequest.ts +84 -0
- package/src/models/DeleteTimeOffRequest.ts +84 -0
- package/src/models/ScheduleScope.ts +54 -0
- package/src/models/UpdateAllocationRequest.ts +27 -0
- package/src/models/UpdateTimeOffRequest.ts +24 -0
- package/src/models/index.ts +3 -4
- package/dist/esm/models/ShiftAllocationRequest.d.ts +0 -38
- package/dist/esm/models/ShiftAllocationRequest.js +0 -45
- package/dist/esm/models/ShiftTimeOffRequest.d.ts +0 -32
- package/dist/esm/models/ShiftTimeOffRequest.js +0 -43
- package/dist/esm/models/UpdateAllocationDayRequest.d.ts +0 -50
- package/dist/esm/models/UpdateAllocationDayRequest.js +0 -47
- package/dist/esm/models/UpdateTimeOffDayRequest.d.ts +0 -38
- package/dist/models/ShiftAllocationRequest.d.ts +0 -38
- package/dist/models/ShiftAllocationRequest.js +0 -52
- package/dist/models/ShiftTimeOffRequest.d.ts +0 -32
- package/dist/models/ShiftTimeOffRequest.js +0 -50
- package/dist/models/UpdateAllocationDayRequest.d.ts +0 -50
- package/dist/models/UpdateAllocationDayRequest.js +0 -54
- package/dist/models/UpdateTimeOffDayRequest.d.ts +0 -38
- package/dist/models/UpdateTimeOffDayRequest.js +0 -50
- package/src/models/ShiftAllocationRequest.ts +0 -74
- package/src/models/ShiftTimeOffRequest.ts +0 -66
- package/src/models/UpdateAllocationDayRequest.ts +0 -89
- package/src/models/UpdateTimeOffDayRequest.ts +0 -73
package/dist/models/index.js
CHANGED
|
@@ -63,6 +63,8 @@ __exportStar(require("./CreateTimeEntryRequest"), exports);
|
|
|
63
63
|
__exportStar(require("./CreateTimeOffRequest"), exports);
|
|
64
64
|
__exportStar(require("./CurrentUserResource"), exports);
|
|
65
65
|
__exportStar(require("./CurrentUserResourceArrayResponse"), exports);
|
|
66
|
+
__exportStar(require("./DeleteAllocationRequest"), exports);
|
|
67
|
+
__exportStar(require("./DeleteTimeOffRequest"), exports);
|
|
66
68
|
__exportStar(require("./DetachBudgetEntriesFromProjectJobRequest"), exports);
|
|
67
69
|
__exportStar(require("./DetachBudgetEntriesFromProjectRequest"), exports);
|
|
68
70
|
__exportStar(require("./DetachClickupListsFromProjectRequest"), exports);
|
|
@@ -120,6 +122,7 @@ __exportStar(require("./PublicHolidayResource"), exports);
|
|
|
120
122
|
__exportStar(require("./PublicHolidayResourceArrayResponse"), exports);
|
|
121
123
|
__exportStar(require("./RateSource"), exports);
|
|
122
124
|
__exportStar(require("./ResetPasswordRequest"), exports);
|
|
125
|
+
__exportStar(require("./ScheduleScope"), exports);
|
|
123
126
|
__exportStar(require("./SearchAllAllocationDaysRequest"), exports);
|
|
124
127
|
__exportStar(require("./SearchAllAllocationsRequest"), exports);
|
|
125
128
|
__exportStar(require("./SearchAllBudgetEntriesRequest"), exports);
|
|
@@ -146,8 +149,6 @@ __exportStar(require("./SearchTimeOffRequest"), exports);
|
|
|
146
149
|
__exportStar(require("./SendForgotPasswordLinkRequest"), exports);
|
|
147
150
|
__exportStar(require("./SettingsResource"), exports);
|
|
148
151
|
__exportStar(require("./SettingsResourceArrayResponse"), exports);
|
|
149
|
-
__exportStar(require("./ShiftAllocationRequest"), exports);
|
|
150
|
-
__exportStar(require("./ShiftTimeOffRequest"), exports);
|
|
151
152
|
__exportStar(require("./TaskListResource"), exports);
|
|
152
153
|
__exportStar(require("./TaskListResourceArrayResponse"), exports);
|
|
153
154
|
__exportStar(require("./TaskLiteResource"), exports);
|
|
@@ -169,7 +170,6 @@ __exportStar(require("./TimeOffLiteResourceArrayResponse"), exports);
|
|
|
169
170
|
__exportStar(require("./TimeOffResource"), exports);
|
|
170
171
|
__exportStar(require("./TimeOffResourceArrayResponse"), exports);
|
|
171
172
|
__exportStar(require("./TimeOffType"), exports);
|
|
172
|
-
__exportStar(require("./UpdateAllocationDayRequest"), exports);
|
|
173
173
|
__exportStar(require("./UpdateAllocationRequest"), exports);
|
|
174
174
|
__exportStar(require("./UpdateClientRequest"), exports);
|
|
175
175
|
__exportStar(require("./UpdatePersonRequest"), exports);
|
|
@@ -182,7 +182,6 @@ __exportStar(require("./UpdateProjectTaskRateRequest"), exports);
|
|
|
182
182
|
__exportStar(require("./UpdateSettingsRequest"), exports);
|
|
183
183
|
__exportStar(require("./UpdateTaskRequest"), exports);
|
|
184
184
|
__exportStar(require("./UpdateTimeEntryRequest"), exports);
|
|
185
|
-
__exportStar(require("./UpdateTimeOffDayRequest"), exports);
|
|
186
185
|
__exportStar(require("./UpdateTimeOffRequest"), exports);
|
|
187
186
|
__exportStar(require("./UserAuthTokenResource"), exports);
|
|
188
187
|
__exportStar(require("./UserAuthTokenResourceArrayResponse"), exports);
|
package/package.json
CHANGED
|
@@ -16,47 +16,29 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AllocationDayResourceArrayResponse,
|
|
19
|
-
AllocationResource,
|
|
20
|
-
GenericResponse,
|
|
21
19
|
PaginatedAllocationDayResourceResponse,
|
|
22
20
|
SearchAllAllocationDaysRequest,
|
|
23
21
|
SearchAllocationDaysRequest,
|
|
24
|
-
UpdateAllocationDayRequest,
|
|
25
22
|
} from '../models/index';
|
|
26
23
|
import {
|
|
27
24
|
AllocationDayResourceArrayResponseFromJSON,
|
|
28
25
|
AllocationDayResourceArrayResponseToJSON,
|
|
29
|
-
AllocationResourceFromJSON,
|
|
30
|
-
AllocationResourceToJSON,
|
|
31
|
-
GenericResponseFromJSON,
|
|
32
|
-
GenericResponseToJSON,
|
|
33
26
|
PaginatedAllocationDayResourceResponseFromJSON,
|
|
34
27
|
PaginatedAllocationDayResourceResponseToJSON,
|
|
35
28
|
SearchAllAllocationDaysRequestFromJSON,
|
|
36
29
|
SearchAllAllocationDaysRequestToJSON,
|
|
37
30
|
SearchAllocationDaysRequestFromJSON,
|
|
38
31
|
SearchAllocationDaysRequestToJSON,
|
|
39
|
-
UpdateAllocationDayRequestFromJSON,
|
|
40
|
-
UpdateAllocationDayRequestToJSON,
|
|
41
32
|
} from '../models/index';
|
|
42
33
|
|
|
43
34
|
export interface AllAllocationDayRequest {
|
|
44
35
|
searchAllAllocationDaysRequest?: SearchAllAllocationDaysRequest;
|
|
45
36
|
}
|
|
46
37
|
|
|
47
|
-
export interface DestroyAllocationDayRequest {
|
|
48
|
-
allocationDay: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
38
|
export interface IndexAllocationDayRequest {
|
|
52
39
|
searchAllocationDaysRequest?: SearchAllocationDaysRequest;
|
|
53
40
|
}
|
|
54
41
|
|
|
55
|
-
export interface UpdateAllocationDayOperationRequest {
|
|
56
|
-
allocationDay: number;
|
|
57
|
-
updateAllocationDayRequest?: UpdateAllocationDayRequest;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
42
|
/**
|
|
61
43
|
*
|
|
62
44
|
*/
|
|
@@ -102,51 +84,6 @@ export class AllocationDaysApi extends runtime.BaseAPI {
|
|
|
102
84
|
return await response.value();
|
|
103
85
|
}
|
|
104
86
|
|
|
105
|
-
/**
|
|
106
|
-
* Auto-generated: destroyAllocationDay
|
|
107
|
-
*/
|
|
108
|
-
async destroyAllocationDayRaw(requestParameters: DestroyAllocationDayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
109
|
-
if (requestParameters['allocationDay'] == null) {
|
|
110
|
-
throw new runtime.RequiredError(
|
|
111
|
-
'allocationDay',
|
|
112
|
-
'Required parameter "allocationDay" was null or undefined when calling destroyAllocationDay().'
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const queryParameters: any = {};
|
|
117
|
-
|
|
118
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
119
|
-
|
|
120
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
121
|
-
const token = this.configuration.accessToken;
|
|
122
|
-
const tokenString = await token("bearerAuth", []);
|
|
123
|
-
|
|
124
|
-
if (tokenString) {
|
|
125
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
let urlPath = `/api/allocation-days/{allocationDay}/delete`;
|
|
130
|
-
urlPath = urlPath.replace(`{${"allocationDay"}}`, encodeURIComponent(String(requestParameters['allocationDay'])));
|
|
131
|
-
|
|
132
|
-
const response = await this.request({
|
|
133
|
-
path: urlPath,
|
|
134
|
-
method: 'POST',
|
|
135
|
-
headers: headerParameters,
|
|
136
|
-
query: queryParameters,
|
|
137
|
-
}, initOverrides);
|
|
138
|
-
|
|
139
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Auto-generated: destroyAllocationDay
|
|
144
|
-
*/
|
|
145
|
-
async destroyAllocationDay(requestParameters: DestroyAllocationDayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
146
|
-
const response = await this.destroyAllocationDayRaw(requestParameters, initOverrides);
|
|
147
|
-
return await response.value();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
87
|
/**
|
|
151
88
|
* Auto-generated: indexAllocationDay
|
|
152
89
|
*/
|
|
@@ -187,52 +124,4 @@ export class AllocationDaysApi extends runtime.BaseAPI {
|
|
|
187
124
|
return await response.value();
|
|
188
125
|
}
|
|
189
126
|
|
|
190
|
-
/**
|
|
191
|
-
* Auto-generated: updateAllocationDay
|
|
192
|
-
*/
|
|
193
|
-
async updateAllocationDayRaw(requestParameters: UpdateAllocationDayOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AllocationResource>> {
|
|
194
|
-
if (requestParameters['allocationDay'] == null) {
|
|
195
|
-
throw new runtime.RequiredError(
|
|
196
|
-
'allocationDay',
|
|
197
|
-
'Required parameter "allocationDay" was null or undefined when calling updateAllocationDay().'
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
const queryParameters: any = {};
|
|
202
|
-
|
|
203
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
|
-
|
|
205
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
206
|
-
|
|
207
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
208
|
-
const token = this.configuration.accessToken;
|
|
209
|
-
const tokenString = await token("bearerAuth", []);
|
|
210
|
-
|
|
211
|
-
if (tokenString) {
|
|
212
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
let urlPath = `/api/allocation-days/{allocationDay}/update`;
|
|
217
|
-
urlPath = urlPath.replace(`{${"allocationDay"}}`, encodeURIComponent(String(requestParameters['allocationDay'])));
|
|
218
|
-
|
|
219
|
-
const response = await this.request({
|
|
220
|
-
path: urlPath,
|
|
221
|
-
method: 'POST',
|
|
222
|
-
headers: headerParameters,
|
|
223
|
-
query: queryParameters,
|
|
224
|
-
body: UpdateAllocationDayRequestToJSON(requestParameters['updateAllocationDayRequest']),
|
|
225
|
-
}, initOverrides);
|
|
226
|
-
|
|
227
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AllocationResourceFromJSON(jsonValue));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Auto-generated: updateAllocationDay
|
|
232
|
-
*/
|
|
233
|
-
async updateAllocationDay(requestParameters: UpdateAllocationDayOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AllocationResource> {
|
|
234
|
-
const response = await this.updateAllocationDayRaw(requestParameters, initOverrides);
|
|
235
|
-
return await response.value();
|
|
236
|
-
}
|
|
237
|
-
|
|
238
127
|
}
|
|
@@ -18,11 +18,11 @@ import type {
|
|
|
18
18
|
AllocationLiteResourceArrayResponse,
|
|
19
19
|
AllocationResource,
|
|
20
20
|
CreateAllocationRequest,
|
|
21
|
+
DeleteAllocationRequest,
|
|
21
22
|
GenericResponse,
|
|
22
23
|
PaginatedAllocationListResourceResponse,
|
|
23
24
|
SearchAllAllocationsRequest,
|
|
24
25
|
SearchAllocationsRequest,
|
|
25
|
-
ShiftAllocationRequest,
|
|
26
26
|
UpdateAllocationRequest,
|
|
27
27
|
} from '../models/index';
|
|
28
28
|
import {
|
|
@@ -32,6 +32,8 @@ import {
|
|
|
32
32
|
AllocationResourceToJSON,
|
|
33
33
|
CreateAllocationRequestFromJSON,
|
|
34
34
|
CreateAllocationRequestToJSON,
|
|
35
|
+
DeleteAllocationRequestFromJSON,
|
|
36
|
+
DeleteAllocationRequestToJSON,
|
|
35
37
|
GenericResponseFromJSON,
|
|
36
38
|
GenericResponseToJSON,
|
|
37
39
|
PaginatedAllocationListResourceResponseFromJSON,
|
|
@@ -40,8 +42,6 @@ import {
|
|
|
40
42
|
SearchAllAllocationsRequestToJSON,
|
|
41
43
|
SearchAllocationsRequestFromJSON,
|
|
42
44
|
SearchAllocationsRequestToJSON,
|
|
43
|
-
ShiftAllocationRequestFromJSON,
|
|
44
|
-
ShiftAllocationRequestToJSON,
|
|
45
45
|
UpdateAllocationRequestFromJSON,
|
|
46
46
|
UpdateAllocationRequestToJSON,
|
|
47
47
|
} from '../models/index';
|
|
@@ -52,17 +52,13 @@ export interface AllAllocationRequest {
|
|
|
52
52
|
|
|
53
53
|
export interface DestroyAllocationRequest {
|
|
54
54
|
allocation: number;
|
|
55
|
+
deleteAllocationRequest?: DeleteAllocationRequest;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
export interface IndexAllocationRequest {
|
|
58
59
|
searchAllocationsRequest?: SearchAllocationsRequest;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export interface ShiftAllocationOperationRequest {
|
|
62
|
-
allocation: number;
|
|
63
|
-
shiftAllocationRequest?: ShiftAllocationRequest;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
62
|
export interface ShowAllocationRequest {
|
|
67
63
|
allocation: number;
|
|
68
64
|
}
|
|
@@ -136,6 +132,8 @@ export class AllocationsApi extends runtime.BaseAPI {
|
|
|
136
132
|
|
|
137
133
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
138
134
|
|
|
135
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
136
|
+
|
|
139
137
|
if (this.configuration && this.configuration.accessToken) {
|
|
140
138
|
const token = this.configuration.accessToken;
|
|
141
139
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -153,6 +151,7 @@ export class AllocationsApi extends runtime.BaseAPI {
|
|
|
153
151
|
method: 'POST',
|
|
154
152
|
headers: headerParameters,
|
|
155
153
|
query: queryParameters,
|
|
154
|
+
body: DeleteAllocationRequestToJSON(requestParameters['deleteAllocationRequest']),
|
|
156
155
|
}, initOverrides);
|
|
157
156
|
|
|
158
157
|
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
@@ -206,54 +205,6 @@ export class AllocationsApi extends runtime.BaseAPI {
|
|
|
206
205
|
return await response.value();
|
|
207
206
|
}
|
|
208
207
|
|
|
209
|
-
/**
|
|
210
|
-
* Auto-generated: shiftAllocation
|
|
211
|
-
*/
|
|
212
|
-
async shiftAllocationRaw(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AllocationResource>> {
|
|
213
|
-
if (requestParameters['allocation'] == null) {
|
|
214
|
-
throw new runtime.RequiredError(
|
|
215
|
-
'allocation',
|
|
216
|
-
'Required parameter "allocation" was null or undefined when calling shiftAllocation().'
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const queryParameters: any = {};
|
|
221
|
-
|
|
222
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
223
|
-
|
|
224
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
225
|
-
|
|
226
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
227
|
-
const token = this.configuration.accessToken;
|
|
228
|
-
const tokenString = await token("bearerAuth", []);
|
|
229
|
-
|
|
230
|
-
if (tokenString) {
|
|
231
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
let urlPath = `/api/allocations/{allocation}/shift`;
|
|
236
|
-
urlPath = urlPath.replace(`{${"allocation"}}`, encodeURIComponent(String(requestParameters['allocation'])));
|
|
237
|
-
|
|
238
|
-
const response = await this.request({
|
|
239
|
-
path: urlPath,
|
|
240
|
-
method: 'POST',
|
|
241
|
-
headers: headerParameters,
|
|
242
|
-
query: queryParameters,
|
|
243
|
-
body: ShiftAllocationRequestToJSON(requestParameters['shiftAllocationRequest']),
|
|
244
|
-
}, initOverrides);
|
|
245
|
-
|
|
246
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AllocationResourceFromJSON(jsonValue));
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Auto-generated: shiftAllocation
|
|
251
|
-
*/
|
|
252
|
-
async shiftAllocation(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AllocationResource> {
|
|
253
|
-
const response = await this.shiftAllocationRaw(requestParameters, initOverrides);
|
|
254
|
-
return await response.value();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
208
|
/**
|
|
258
209
|
* Auto-generated: showAllocation
|
|
259
210
|
*/
|
package/src/apis/TimeOffApi.ts
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateTimeOffRequest,
|
|
19
|
+
DeleteTimeOffRequest,
|
|
19
20
|
GenericResponse,
|
|
20
21
|
PaginatedTimeOffListResourceResponse,
|
|
21
22
|
SearchAllTimeOffRequest,
|
|
22
23
|
SearchTimeOffRequest,
|
|
23
|
-
ShiftTimeOffRequest,
|
|
24
24
|
TimeOffLiteResourceArrayResponse,
|
|
25
25
|
TimeOffResource,
|
|
26
26
|
UpdateTimeOffRequest,
|
|
@@ -28,6 +28,8 @@ import type {
|
|
|
28
28
|
import {
|
|
29
29
|
CreateTimeOffRequestFromJSON,
|
|
30
30
|
CreateTimeOffRequestToJSON,
|
|
31
|
+
DeleteTimeOffRequestFromJSON,
|
|
32
|
+
DeleteTimeOffRequestToJSON,
|
|
31
33
|
GenericResponseFromJSON,
|
|
32
34
|
GenericResponseToJSON,
|
|
33
35
|
PaginatedTimeOffListResourceResponseFromJSON,
|
|
@@ -36,8 +38,6 @@ import {
|
|
|
36
38
|
SearchAllTimeOffRequestToJSON,
|
|
37
39
|
SearchTimeOffRequestFromJSON,
|
|
38
40
|
SearchTimeOffRequestToJSON,
|
|
39
|
-
ShiftTimeOffRequestFromJSON,
|
|
40
|
-
ShiftTimeOffRequestToJSON,
|
|
41
41
|
TimeOffLiteResourceArrayResponseFromJSON,
|
|
42
42
|
TimeOffLiteResourceArrayResponseToJSON,
|
|
43
43
|
TimeOffResourceFromJSON,
|
|
@@ -52,17 +52,13 @@ export interface AllTimeOffRequest {
|
|
|
52
52
|
|
|
53
53
|
export interface DestroyTimeOffRequest {
|
|
54
54
|
timeOff: number;
|
|
55
|
+
deleteTimeOffRequest?: DeleteTimeOffRequest;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
export interface IndexTimeOffRequest {
|
|
58
59
|
searchTimeOffRequest?: SearchTimeOffRequest;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
export interface ShiftTimeOffOperationRequest {
|
|
62
|
-
timeOff: number;
|
|
63
|
-
shiftTimeOffRequest?: ShiftTimeOffRequest;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
62
|
export interface ShowTimeOffRequest {
|
|
67
63
|
timeOff: number;
|
|
68
64
|
}
|
|
@@ -136,6 +132,8 @@ export class TimeOffApi extends runtime.BaseAPI {
|
|
|
136
132
|
|
|
137
133
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
138
134
|
|
|
135
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
136
|
+
|
|
139
137
|
if (this.configuration && this.configuration.accessToken) {
|
|
140
138
|
const token = this.configuration.accessToken;
|
|
141
139
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -153,6 +151,7 @@ export class TimeOffApi extends runtime.BaseAPI {
|
|
|
153
151
|
method: 'POST',
|
|
154
152
|
headers: headerParameters,
|
|
155
153
|
query: queryParameters,
|
|
154
|
+
body: DeleteTimeOffRequestToJSON(requestParameters['deleteTimeOffRequest']),
|
|
156
155
|
}, initOverrides);
|
|
157
156
|
|
|
158
157
|
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
@@ -206,54 +205,6 @@ export class TimeOffApi extends runtime.BaseAPI {
|
|
|
206
205
|
return await response.value();
|
|
207
206
|
}
|
|
208
207
|
|
|
209
|
-
/**
|
|
210
|
-
* Auto-generated: shiftTimeOff
|
|
211
|
-
*/
|
|
212
|
-
async shiftTimeOffRaw(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimeOffResource>> {
|
|
213
|
-
if (requestParameters['timeOff'] == null) {
|
|
214
|
-
throw new runtime.RequiredError(
|
|
215
|
-
'timeOff',
|
|
216
|
-
'Required parameter "timeOff" was null or undefined when calling shiftTimeOff().'
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const queryParameters: any = {};
|
|
221
|
-
|
|
222
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
223
|
-
|
|
224
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
225
|
-
|
|
226
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
227
|
-
const token = this.configuration.accessToken;
|
|
228
|
-
const tokenString = await token("bearerAuth", []);
|
|
229
|
-
|
|
230
|
-
if (tokenString) {
|
|
231
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
let urlPath = `/api/time-off/{timeOff}/shift`;
|
|
236
|
-
urlPath = urlPath.replace(`{${"timeOff"}}`, encodeURIComponent(String(requestParameters['timeOff'])));
|
|
237
|
-
|
|
238
|
-
const response = await this.request({
|
|
239
|
-
path: urlPath,
|
|
240
|
-
method: 'POST',
|
|
241
|
-
headers: headerParameters,
|
|
242
|
-
query: queryParameters,
|
|
243
|
-
body: ShiftTimeOffRequestToJSON(requestParameters['shiftTimeOffRequest']),
|
|
244
|
-
}, initOverrides);
|
|
245
|
-
|
|
246
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => TimeOffResourceFromJSON(jsonValue));
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Auto-generated: shiftTimeOff
|
|
251
|
-
*/
|
|
252
|
-
async shiftTimeOff(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimeOffResource> {
|
|
253
|
-
const response = await this.shiftTimeOffRaw(requestParameters, initOverrides);
|
|
254
|
-
return await response.value();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
208
|
/**
|
|
258
209
|
* Auto-generated: showTimeOff
|
|
259
210
|
*/
|
|
@@ -15,17 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
GenericResponse,
|
|
19
18
|
PaginatedTimeOffDayResourceResponse,
|
|
20
19
|
SearchAllTimeOffDaysRequest,
|
|
21
20
|
SearchTimeOffDaysRequest,
|
|
22
21
|
TimeOffDayResourceArrayResponse,
|
|
23
|
-
TimeOffResource,
|
|
24
|
-
UpdateTimeOffDayRequest,
|
|
25
22
|
} from '../models/index';
|
|
26
23
|
import {
|
|
27
|
-
GenericResponseFromJSON,
|
|
28
|
-
GenericResponseToJSON,
|
|
29
24
|
PaginatedTimeOffDayResourceResponseFromJSON,
|
|
30
25
|
PaginatedTimeOffDayResourceResponseToJSON,
|
|
31
26
|
SearchAllTimeOffDaysRequestFromJSON,
|
|
@@ -34,29 +29,16 @@ import {
|
|
|
34
29
|
SearchTimeOffDaysRequestToJSON,
|
|
35
30
|
TimeOffDayResourceArrayResponseFromJSON,
|
|
36
31
|
TimeOffDayResourceArrayResponseToJSON,
|
|
37
|
-
TimeOffResourceFromJSON,
|
|
38
|
-
TimeOffResourceToJSON,
|
|
39
|
-
UpdateTimeOffDayRequestFromJSON,
|
|
40
|
-
UpdateTimeOffDayRequestToJSON,
|
|
41
32
|
} from '../models/index';
|
|
42
33
|
|
|
43
34
|
export interface AllTimeOffDayRequest {
|
|
44
35
|
searchAllTimeOffDaysRequest?: SearchAllTimeOffDaysRequest;
|
|
45
36
|
}
|
|
46
37
|
|
|
47
|
-
export interface DestroyTimeOffDayRequest {
|
|
48
|
-
timeOffDay: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
38
|
export interface IndexTimeOffDayRequest {
|
|
52
39
|
searchTimeOffDaysRequest?: SearchTimeOffDaysRequest;
|
|
53
40
|
}
|
|
54
41
|
|
|
55
|
-
export interface UpdateTimeOffDayOperationRequest {
|
|
56
|
-
timeOffDay: number;
|
|
57
|
-
updateTimeOffDayRequest?: UpdateTimeOffDayRequest;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
42
|
/**
|
|
61
43
|
*
|
|
62
44
|
*/
|
|
@@ -102,51 +84,6 @@ export class TimeOffDaysApi extends runtime.BaseAPI {
|
|
|
102
84
|
return await response.value();
|
|
103
85
|
}
|
|
104
86
|
|
|
105
|
-
/**
|
|
106
|
-
* Auto-generated: destroyTimeOffDay
|
|
107
|
-
*/
|
|
108
|
-
async destroyTimeOffDayRaw(requestParameters: DestroyTimeOffDayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenericResponse>> {
|
|
109
|
-
if (requestParameters['timeOffDay'] == null) {
|
|
110
|
-
throw new runtime.RequiredError(
|
|
111
|
-
'timeOffDay',
|
|
112
|
-
'Required parameter "timeOffDay" was null or undefined when calling destroyTimeOffDay().'
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const queryParameters: any = {};
|
|
117
|
-
|
|
118
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
119
|
-
|
|
120
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
121
|
-
const token = this.configuration.accessToken;
|
|
122
|
-
const tokenString = await token("bearerAuth", []);
|
|
123
|
-
|
|
124
|
-
if (tokenString) {
|
|
125
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
let urlPath = `/api/time-off-days/{timeOffDay}/delete`;
|
|
130
|
-
urlPath = urlPath.replace(`{${"timeOffDay"}}`, encodeURIComponent(String(requestParameters['timeOffDay'])));
|
|
131
|
-
|
|
132
|
-
const response = await this.request({
|
|
133
|
-
path: urlPath,
|
|
134
|
-
method: 'POST',
|
|
135
|
-
headers: headerParameters,
|
|
136
|
-
query: queryParameters,
|
|
137
|
-
}, initOverrides);
|
|
138
|
-
|
|
139
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => GenericResponseFromJSON(jsonValue));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Auto-generated: destroyTimeOffDay
|
|
144
|
-
*/
|
|
145
|
-
async destroyTimeOffDay(requestParameters: DestroyTimeOffDayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse> {
|
|
146
|
-
const response = await this.destroyTimeOffDayRaw(requestParameters, initOverrides);
|
|
147
|
-
return await response.value();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
87
|
/**
|
|
151
88
|
* Auto-generated: indexTimeOffDay
|
|
152
89
|
*/
|
|
@@ -187,52 +124,4 @@ export class TimeOffDaysApi extends runtime.BaseAPI {
|
|
|
187
124
|
return await response.value();
|
|
188
125
|
}
|
|
189
126
|
|
|
190
|
-
/**
|
|
191
|
-
* Auto-generated: updateTimeOffDay
|
|
192
|
-
*/
|
|
193
|
-
async updateTimeOffDayRaw(requestParameters: UpdateTimeOffDayOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimeOffResource>> {
|
|
194
|
-
if (requestParameters['timeOffDay'] == null) {
|
|
195
|
-
throw new runtime.RequiredError(
|
|
196
|
-
'timeOffDay',
|
|
197
|
-
'Required parameter "timeOffDay" was null or undefined when calling updateTimeOffDay().'
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
const queryParameters: any = {};
|
|
202
|
-
|
|
203
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
|
-
|
|
205
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
206
|
-
|
|
207
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
208
|
-
const token = this.configuration.accessToken;
|
|
209
|
-
const tokenString = await token("bearerAuth", []);
|
|
210
|
-
|
|
211
|
-
if (tokenString) {
|
|
212
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
let urlPath = `/api/time-off-days/{timeOffDay}/update`;
|
|
217
|
-
urlPath = urlPath.replace(`{${"timeOffDay"}}`, encodeURIComponent(String(requestParameters['timeOffDay'])));
|
|
218
|
-
|
|
219
|
-
const response = await this.request({
|
|
220
|
-
path: urlPath,
|
|
221
|
-
method: 'POST',
|
|
222
|
-
headers: headerParameters,
|
|
223
|
-
query: queryParameters,
|
|
224
|
-
body: UpdateTimeOffDayRequestToJSON(requestParameters['updateTimeOffDayRequest']),
|
|
225
|
-
}, initOverrides);
|
|
226
|
-
|
|
227
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => TimeOffResourceFromJSON(jsonValue));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Auto-generated: updateTimeOffDay
|
|
232
|
-
*/
|
|
233
|
-
async updateTimeOffDay(requestParameters: UpdateTimeOffDayOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimeOffResource> {
|
|
234
|
-
const response = await this.updateTimeOffDayRaw(requestParameters, initOverrides);
|
|
235
|
-
return await response.value();
|
|
236
|
-
}
|
|
237
|
-
|
|
238
127
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Laravel API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
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 { mapValues } from '../runtime';
|
|
16
|
+
import type { ScheduleScope } from './ScheduleScope';
|
|
17
|
+
import {
|
|
18
|
+
ScheduleScopeFromJSON,
|
|
19
|
+
ScheduleScopeFromJSONTyped,
|
|
20
|
+
ScheduleScopeToJSON,
|
|
21
|
+
ScheduleScopeToJSONTyped,
|
|
22
|
+
} from './ScheduleScope';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface DeleteAllocationRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface DeleteAllocationRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ScheduleScope}
|
|
33
|
+
* @memberof DeleteAllocationRequest
|
|
34
|
+
*/
|
|
35
|
+
scope: ScheduleScope;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof DeleteAllocationRequest
|
|
40
|
+
*/
|
|
41
|
+
date?: Date;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the DeleteAllocationRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfDeleteAllocationRequest(value: object): value is DeleteAllocationRequest {
|
|
50
|
+
if (!('scope' in value) || value['scope'] === undefined) return false;
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function DeleteAllocationRequestFromJSON(json: any): DeleteAllocationRequest {
|
|
55
|
+
return DeleteAllocationRequestFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DeleteAllocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteAllocationRequest {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'scope': ScheduleScopeFromJSON(json['scope']),
|
|
65
|
+
'date': json['date'] == null ? undefined : (new Date(json['date'])),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function DeleteAllocationRequestToJSON(json: any): DeleteAllocationRequest {
|
|
70
|
+
return DeleteAllocationRequestToJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function DeleteAllocationRequestToJSONTyped(value?: DeleteAllocationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'scope': ScheduleScopeToJSON(value['scope']),
|
|
81
|
+
'date': value['date'] == null ? undefined : ((value['date']).toISOString().substring(0,10)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|