@digital8/task-dashboard-ts-sdk 0.0.3 → 0.0.5
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 +2 -0
- package/README.md +2 -2
- package/dist/apis/AllocationsApi.d.ts +13 -1
- package/dist/apis/AllocationsApi.js +39 -0
- package/dist/apis/TimeOffApi.d.ts +13 -1
- package/dist/apis/TimeOffApi.js +39 -0
- package/dist/esm/apis/AllocationsApi.d.ts +13 -1
- package/dist/esm/apis/AllocationsApi.js +40 -1
- package/dist/esm/apis/TimeOffApi.d.ts +13 -1
- package/dist/esm/apis/TimeOffApi.js +40 -1
- package/dist/esm/models/ShiftAllocationRequest.d.ts +38 -0
- package/dist/esm/models/ShiftAllocationRequest.js +45 -0
- package/dist/esm/models/ShiftTimeOffRequest.d.ts +32 -0
- package/dist/esm/models/ShiftTimeOffRequest.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/ShiftAllocationRequest.d.ts +38 -0
- package/dist/models/ShiftAllocationRequest.js +52 -0
- package/dist/models/ShiftTimeOffRequest.d.ts +32 -0
- package/dist/models/ShiftTimeOffRequest.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/AllocationsApi.ts +56 -0
- package/src/apis/TimeOffApi.ts +56 -0
- package/src/models/ShiftAllocationRequest.ts +74 -0
- package/src/models/ShiftTimeOffRequest.ts +66 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -151,6 +151,8 @@ src/models/SearchTimeOffRequest.ts
|
|
|
151
151
|
src/models/SendForgotPasswordLinkRequest.ts
|
|
152
152
|
src/models/SettingsResource.ts
|
|
153
153
|
src/models/SettingsResourceArrayResponse.ts
|
|
154
|
+
src/models/ShiftAllocationRequest.ts
|
|
155
|
+
src/models/ShiftTimeOffRequest.ts
|
|
154
156
|
src/models/TaskListResource.ts
|
|
155
157
|
src/models/TaskListResourceArrayResponse.ts
|
|
156
158
|
src/models/TaskLiteResource.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @digital8/task-dashboard-ts-sdk@0.0.
|
|
1
|
+
## @digital8/task-dashboard-ts-sdk@0.0.5
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @digital8/task-dashboard-ts-sdk@0.0.
|
|
39
|
+
npm install @digital8/task-dashboard-ts-sdk@0.0.5 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AllocationLiteResourceArrayResponse, AllocationResource, CreateAllocationRequest, GenericResponse, PaginatedAllocationListResourceResponse, SearchAllAllocationsRequest, SearchAllocationsRequest, UpdateAllocationRequest } from '../models/index';
|
|
13
|
+
import type { AllocationLiteResourceArrayResponse, AllocationResource, CreateAllocationRequest, GenericResponse, PaginatedAllocationListResourceResponse, SearchAllAllocationsRequest, SearchAllocationsRequest, ShiftAllocationRequest, UpdateAllocationRequest } from '../models/index';
|
|
14
14
|
export interface AllAllocationRequest {
|
|
15
15
|
searchAllAllocationsRequest?: SearchAllAllocationsRequest;
|
|
16
16
|
}
|
|
@@ -20,6 +20,10 @@ export interface DestroyAllocationRequest {
|
|
|
20
20
|
export interface IndexAllocationRequest {
|
|
21
21
|
searchAllocationsRequest?: SearchAllocationsRequest;
|
|
22
22
|
}
|
|
23
|
+
export interface ShiftAllocationOperationRequest {
|
|
24
|
+
allocation: number;
|
|
25
|
+
shiftAllocationRequest?: ShiftAllocationRequest;
|
|
26
|
+
}
|
|
23
27
|
export interface ShowAllocationRequest {
|
|
24
28
|
allocation: number;
|
|
25
29
|
}
|
|
@@ -58,6 +62,14 @@ export declare class AllocationsApi extends runtime.BaseAPI {
|
|
|
58
62
|
* Auto-generated: indexAllocation
|
|
59
63
|
*/
|
|
60
64
|
indexAllocation(requestParameters?: IndexAllocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAllocationListResourceResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Auto-generated: shiftAllocation
|
|
67
|
+
*/
|
|
68
|
+
shiftAllocationRaw(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AllocationResource>>;
|
|
69
|
+
/**
|
|
70
|
+
* Auto-generated: shiftAllocation
|
|
71
|
+
*/
|
|
72
|
+
shiftAllocation(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AllocationResource>;
|
|
61
73
|
/**
|
|
62
74
|
* Auto-generated: showAllocation
|
|
63
75
|
*/
|
|
@@ -136,6 +136,45 @@ class AllocationsApi extends runtime.BaseAPI {
|
|
|
136
136
|
return yield response.value();
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Auto-generated: shiftAllocation
|
|
141
|
+
*/
|
|
142
|
+
shiftAllocationRaw(requestParameters, initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
if (requestParameters['allocation'] == null) {
|
|
145
|
+
throw new runtime.RequiredError('allocation', 'Required parameter "allocation" was null or undefined when calling shiftAllocation().');
|
|
146
|
+
}
|
|
147
|
+
const queryParameters = {};
|
|
148
|
+
const headerParameters = {};
|
|
149
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
150
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
151
|
+
const token = this.configuration.accessToken;
|
|
152
|
+
const tokenString = yield token("bearerAuth", []);
|
|
153
|
+
if (tokenString) {
|
|
154
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
let urlPath = `/api/allocations/{allocation}/shift`;
|
|
158
|
+
urlPath = urlPath.replace(`{${"allocation"}}`, encodeURIComponent(String(requestParameters['allocation'])));
|
|
159
|
+
const response = yield this.request({
|
|
160
|
+
path: urlPath,
|
|
161
|
+
method: 'POST',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
body: (0, index_1.ShiftAllocationRequestToJSON)(requestParameters['shiftAllocationRequest']),
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AllocationResourceFromJSON)(jsonValue));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Auto-generated: shiftAllocation
|
|
171
|
+
*/
|
|
172
|
+
shiftAllocation(requestParameters, initOverrides) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
const response = yield this.shiftAllocationRaw(requestParameters, initOverrides);
|
|
175
|
+
return yield response.value();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
139
178
|
/**
|
|
140
179
|
* Auto-generated: showAllocation
|
|
141
180
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateTimeOffRequest, GenericResponse, PaginatedTimeOffListResourceResponse, SearchAllTimeOffRequest, SearchTimeOffRequest, TimeOffLiteResourceArrayResponse, TimeOffResource, UpdateTimeOffRequest } from '../models/index';
|
|
13
|
+
import type { CreateTimeOffRequest, GenericResponse, PaginatedTimeOffListResourceResponse, SearchAllTimeOffRequest, SearchTimeOffRequest, ShiftTimeOffRequest, TimeOffLiteResourceArrayResponse, TimeOffResource, UpdateTimeOffRequest } from '../models/index';
|
|
14
14
|
export interface AllTimeOffRequest {
|
|
15
15
|
searchAllTimeOffRequest?: SearchAllTimeOffRequest;
|
|
16
16
|
}
|
|
@@ -20,6 +20,10 @@ export interface DestroyTimeOffRequest {
|
|
|
20
20
|
export interface IndexTimeOffRequest {
|
|
21
21
|
searchTimeOffRequest?: SearchTimeOffRequest;
|
|
22
22
|
}
|
|
23
|
+
export interface ShiftTimeOffOperationRequest {
|
|
24
|
+
timeOff: number;
|
|
25
|
+
shiftTimeOffRequest?: ShiftTimeOffRequest;
|
|
26
|
+
}
|
|
23
27
|
export interface ShowTimeOffRequest {
|
|
24
28
|
timeOff: number;
|
|
25
29
|
}
|
|
@@ -58,6 +62,14 @@ export declare class TimeOffApi extends runtime.BaseAPI {
|
|
|
58
62
|
* Auto-generated: indexTimeOff
|
|
59
63
|
*/
|
|
60
64
|
indexTimeOff(requestParameters?: IndexTimeOffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTimeOffListResourceResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Auto-generated: shiftTimeOff
|
|
67
|
+
*/
|
|
68
|
+
shiftTimeOffRaw(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimeOffResource>>;
|
|
69
|
+
/**
|
|
70
|
+
* Auto-generated: shiftTimeOff
|
|
71
|
+
*/
|
|
72
|
+
shiftTimeOff(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimeOffResource>;
|
|
61
73
|
/**
|
|
62
74
|
* Auto-generated: showTimeOff
|
|
63
75
|
*/
|
package/dist/apis/TimeOffApi.js
CHANGED
|
@@ -136,6 +136,45 @@ class TimeOffApi extends runtime.BaseAPI {
|
|
|
136
136
|
return yield response.value();
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Auto-generated: shiftTimeOff
|
|
141
|
+
*/
|
|
142
|
+
shiftTimeOffRaw(requestParameters, initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
if (requestParameters['timeOff'] == null) {
|
|
145
|
+
throw new runtime.RequiredError('timeOff', 'Required parameter "timeOff" was null or undefined when calling shiftTimeOff().');
|
|
146
|
+
}
|
|
147
|
+
const queryParameters = {};
|
|
148
|
+
const headerParameters = {};
|
|
149
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
150
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
151
|
+
const token = this.configuration.accessToken;
|
|
152
|
+
const tokenString = yield token("bearerAuth", []);
|
|
153
|
+
if (tokenString) {
|
|
154
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
let urlPath = `/api/time-off/{timeOff}/shift`;
|
|
158
|
+
urlPath = urlPath.replace(`{${"timeOff"}}`, encodeURIComponent(String(requestParameters['timeOff'])));
|
|
159
|
+
const response = yield this.request({
|
|
160
|
+
path: urlPath,
|
|
161
|
+
method: 'POST',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
body: (0, index_1.ShiftTimeOffRequestToJSON)(requestParameters['shiftTimeOffRequest']),
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TimeOffResourceFromJSON)(jsonValue));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Auto-generated: shiftTimeOff
|
|
171
|
+
*/
|
|
172
|
+
shiftTimeOff(requestParameters, initOverrides) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
const response = yield this.shiftTimeOffRaw(requestParameters, initOverrides);
|
|
175
|
+
return yield response.value();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
139
178
|
/**
|
|
140
179
|
* Auto-generated: showTimeOff
|
|
141
180
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AllocationLiteResourceArrayResponse, AllocationResource, CreateAllocationRequest, GenericResponse, PaginatedAllocationListResourceResponse, SearchAllAllocationsRequest, SearchAllocationsRequest, UpdateAllocationRequest } from '../models/index';
|
|
13
|
+
import type { AllocationLiteResourceArrayResponse, AllocationResource, CreateAllocationRequest, GenericResponse, PaginatedAllocationListResourceResponse, SearchAllAllocationsRequest, SearchAllocationsRequest, ShiftAllocationRequest, UpdateAllocationRequest } from '../models/index';
|
|
14
14
|
export interface AllAllocationRequest {
|
|
15
15
|
searchAllAllocationsRequest?: SearchAllAllocationsRequest;
|
|
16
16
|
}
|
|
@@ -20,6 +20,10 @@ export interface DestroyAllocationRequest {
|
|
|
20
20
|
export interface IndexAllocationRequest {
|
|
21
21
|
searchAllocationsRequest?: SearchAllocationsRequest;
|
|
22
22
|
}
|
|
23
|
+
export interface ShiftAllocationOperationRequest {
|
|
24
|
+
allocation: number;
|
|
25
|
+
shiftAllocationRequest?: ShiftAllocationRequest;
|
|
26
|
+
}
|
|
23
27
|
export interface ShowAllocationRequest {
|
|
24
28
|
allocation: number;
|
|
25
29
|
}
|
|
@@ -58,6 +62,14 @@ export declare class AllocationsApi extends runtime.BaseAPI {
|
|
|
58
62
|
* Auto-generated: indexAllocation
|
|
59
63
|
*/
|
|
60
64
|
indexAllocation(requestParameters?: IndexAllocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedAllocationListResourceResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Auto-generated: shiftAllocation
|
|
67
|
+
*/
|
|
68
|
+
shiftAllocationRaw(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AllocationResource>>;
|
|
69
|
+
/**
|
|
70
|
+
* Auto-generated: shiftAllocation
|
|
71
|
+
*/
|
|
72
|
+
shiftAllocation(requestParameters: ShiftAllocationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AllocationResource>;
|
|
61
73
|
/**
|
|
62
74
|
* Auto-generated: showAllocation
|
|
63
75
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AllocationLiteResourceArrayResponseFromJSON, AllocationResourceFromJSON, CreateAllocationRequestToJSON, GenericResponseFromJSON, PaginatedAllocationListResourceResponseFromJSON, SearchAllAllocationsRequestToJSON, SearchAllocationsRequestToJSON, UpdateAllocationRequestToJSON, } from '../models/index';
|
|
24
|
+
import { AllocationLiteResourceArrayResponseFromJSON, AllocationResourceFromJSON, CreateAllocationRequestToJSON, GenericResponseFromJSON, PaginatedAllocationListResourceResponseFromJSON, SearchAllAllocationsRequestToJSON, SearchAllocationsRequestToJSON, ShiftAllocationRequestToJSON, UpdateAllocationRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -133,6 +133,45 @@ export class AllocationsApi extends runtime.BaseAPI {
|
|
|
133
133
|
return yield response.value();
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Auto-generated: shiftAllocation
|
|
138
|
+
*/
|
|
139
|
+
shiftAllocationRaw(requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
if (requestParameters['allocation'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('allocation', 'Required parameter "allocation" was null or undefined when calling shiftAllocation().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
147
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
148
|
+
const token = this.configuration.accessToken;
|
|
149
|
+
const tokenString = yield token("bearerAuth", []);
|
|
150
|
+
if (tokenString) {
|
|
151
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
let urlPath = `/api/allocations/{allocation}/shift`;
|
|
155
|
+
urlPath = urlPath.replace(`{${"allocation"}}`, encodeURIComponent(String(requestParameters['allocation'])));
|
|
156
|
+
const response = yield this.request({
|
|
157
|
+
path: urlPath,
|
|
158
|
+
method: 'POST',
|
|
159
|
+
headers: headerParameters,
|
|
160
|
+
query: queryParameters,
|
|
161
|
+
body: ShiftAllocationRequestToJSON(requestParameters['shiftAllocationRequest']),
|
|
162
|
+
}, initOverrides);
|
|
163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AllocationResourceFromJSON(jsonValue));
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Auto-generated: shiftAllocation
|
|
168
|
+
*/
|
|
169
|
+
shiftAllocation(requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const response = yield this.shiftAllocationRaw(requestParameters, initOverrides);
|
|
172
|
+
return yield response.value();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
136
175
|
/**
|
|
137
176
|
* Auto-generated: showAllocation
|
|
138
177
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateTimeOffRequest, GenericResponse, PaginatedTimeOffListResourceResponse, SearchAllTimeOffRequest, SearchTimeOffRequest, TimeOffLiteResourceArrayResponse, TimeOffResource, UpdateTimeOffRequest } from '../models/index';
|
|
13
|
+
import type { CreateTimeOffRequest, GenericResponse, PaginatedTimeOffListResourceResponse, SearchAllTimeOffRequest, SearchTimeOffRequest, ShiftTimeOffRequest, TimeOffLiteResourceArrayResponse, TimeOffResource, UpdateTimeOffRequest } from '../models/index';
|
|
14
14
|
export interface AllTimeOffRequest {
|
|
15
15
|
searchAllTimeOffRequest?: SearchAllTimeOffRequest;
|
|
16
16
|
}
|
|
@@ -20,6 +20,10 @@ export interface DestroyTimeOffRequest {
|
|
|
20
20
|
export interface IndexTimeOffRequest {
|
|
21
21
|
searchTimeOffRequest?: SearchTimeOffRequest;
|
|
22
22
|
}
|
|
23
|
+
export interface ShiftTimeOffOperationRequest {
|
|
24
|
+
timeOff: number;
|
|
25
|
+
shiftTimeOffRequest?: ShiftTimeOffRequest;
|
|
26
|
+
}
|
|
23
27
|
export interface ShowTimeOffRequest {
|
|
24
28
|
timeOff: number;
|
|
25
29
|
}
|
|
@@ -58,6 +62,14 @@ export declare class TimeOffApi extends runtime.BaseAPI {
|
|
|
58
62
|
* Auto-generated: indexTimeOff
|
|
59
63
|
*/
|
|
60
64
|
indexTimeOff(requestParameters?: IndexTimeOffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTimeOffListResourceResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Auto-generated: shiftTimeOff
|
|
67
|
+
*/
|
|
68
|
+
shiftTimeOffRaw(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TimeOffResource>>;
|
|
69
|
+
/**
|
|
70
|
+
* Auto-generated: shiftTimeOff
|
|
71
|
+
*/
|
|
72
|
+
shiftTimeOff(requestParameters: ShiftTimeOffOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TimeOffResource>;
|
|
61
73
|
/**
|
|
62
74
|
* Auto-generated: showTimeOff
|
|
63
75
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateTimeOffRequestToJSON, GenericResponseFromJSON, PaginatedTimeOffListResourceResponseFromJSON, SearchAllTimeOffRequestToJSON, SearchTimeOffRequestToJSON, TimeOffLiteResourceArrayResponseFromJSON, TimeOffResourceFromJSON, UpdateTimeOffRequestToJSON, } from '../models/index';
|
|
24
|
+
import { CreateTimeOffRequestToJSON, GenericResponseFromJSON, PaginatedTimeOffListResourceResponseFromJSON, SearchAllTimeOffRequestToJSON, SearchTimeOffRequestToJSON, ShiftTimeOffRequestToJSON, TimeOffLiteResourceArrayResponseFromJSON, TimeOffResourceFromJSON, UpdateTimeOffRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -133,6 +133,45 @@ export class TimeOffApi extends runtime.BaseAPI {
|
|
|
133
133
|
return yield response.value();
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Auto-generated: shiftTimeOff
|
|
138
|
+
*/
|
|
139
|
+
shiftTimeOffRaw(requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
if (requestParameters['timeOff'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('timeOff', 'Required parameter "timeOff" was null or undefined when calling shiftTimeOff().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
147
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
148
|
+
const token = this.configuration.accessToken;
|
|
149
|
+
const tokenString = yield token("bearerAuth", []);
|
|
150
|
+
if (tokenString) {
|
|
151
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
let urlPath = `/api/time-off/{timeOff}/shift`;
|
|
155
|
+
urlPath = urlPath.replace(`{${"timeOff"}}`, encodeURIComponent(String(requestParameters['timeOff'])));
|
|
156
|
+
const response = yield this.request({
|
|
157
|
+
path: urlPath,
|
|
158
|
+
method: 'POST',
|
|
159
|
+
headers: headerParameters,
|
|
160
|
+
query: queryParameters,
|
|
161
|
+
body: ShiftTimeOffRequestToJSON(requestParameters['shiftTimeOffRequest']),
|
|
162
|
+
}, initOverrides);
|
|
163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TimeOffResourceFromJSON(jsonValue));
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Auto-generated: shiftTimeOff
|
|
168
|
+
*/
|
|
169
|
+
shiftTimeOff(requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const response = yield this.shiftTimeOffRaw(requestParameters, initOverrides);
|
|
172
|
+
return yield response.value();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
136
175
|
/**
|
|
137
176
|
* Auto-generated: showTimeOff
|
|
138
177
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laravel API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ShiftAllocationRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ShiftAllocationRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ShiftAllocationRequest
|
|
22
|
+
*/
|
|
23
|
+
days: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ShiftAllocationRequest
|
|
28
|
+
*/
|
|
29
|
+
personId?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ShiftAllocationRequest interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfShiftAllocationRequest(value: object): value is ShiftAllocationRequest;
|
|
35
|
+
export declare function ShiftAllocationRequestFromJSON(json: any): ShiftAllocationRequest;
|
|
36
|
+
export declare function ShiftAllocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftAllocationRequest;
|
|
37
|
+
export declare function ShiftAllocationRequestToJSON(json: any): ShiftAllocationRequest;
|
|
38
|
+
export declare function ShiftAllocationRequestToJSONTyped(value?: ShiftAllocationRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* Check if a given object implements the ShiftAllocationRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfShiftAllocationRequest(value) {
|
|
18
|
+
if (!('days' in value) || value['days'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function ShiftAllocationRequestFromJSON(json) {
|
|
23
|
+
return ShiftAllocationRequestFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ShiftAllocationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'days': json['days'],
|
|
31
|
+
'personId': json['person_id'] == null ? undefined : json['person_id'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function ShiftAllocationRequestToJSON(json) {
|
|
35
|
+
return ShiftAllocationRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function ShiftAllocationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'days': value['days'],
|
|
43
|
+
'person_id': value['personId'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laravel API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ShiftTimeOffRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ShiftTimeOffRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ShiftTimeOffRequest
|
|
22
|
+
*/
|
|
23
|
+
days: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ShiftTimeOffRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfShiftTimeOffRequest(value: object): value is ShiftTimeOffRequest;
|
|
29
|
+
export declare function ShiftTimeOffRequestFromJSON(json: any): ShiftTimeOffRequest;
|
|
30
|
+
export declare function ShiftTimeOffRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftTimeOffRequest;
|
|
31
|
+
export declare function ShiftTimeOffRequestToJSON(json: any): ShiftTimeOffRequest;
|
|
32
|
+
export declare function ShiftTimeOffRequestToJSONTyped(value?: ShiftTimeOffRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* Check if a given object implements the ShiftTimeOffRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfShiftTimeOffRequest(value) {
|
|
18
|
+
if (!('days' in value) || value['days'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function ShiftTimeOffRequestFromJSON(json) {
|
|
23
|
+
return ShiftTimeOffRequestFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function ShiftTimeOffRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'days': json['days'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function ShiftTimeOffRequestToJSON(json) {
|
|
34
|
+
return ShiftTimeOffRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function ShiftTimeOffRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'days': value['days'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -128,6 +128,8 @@ export * from './SearchTimeOffRequest';
|
|
|
128
128
|
export * from './SendForgotPasswordLinkRequest';
|
|
129
129
|
export * from './SettingsResource';
|
|
130
130
|
export * from './SettingsResourceArrayResponse';
|
|
131
|
+
export * from './ShiftAllocationRequest';
|
|
132
|
+
export * from './ShiftTimeOffRequest';
|
|
131
133
|
export * from './TaskListResource';
|
|
132
134
|
export * from './TaskListResourceArrayResponse';
|
|
133
135
|
export * from './TaskLiteResource';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -130,6 +130,8 @@ export * from './SearchTimeOffRequest';
|
|
|
130
130
|
export * from './SendForgotPasswordLinkRequest';
|
|
131
131
|
export * from './SettingsResource';
|
|
132
132
|
export * from './SettingsResourceArrayResponse';
|
|
133
|
+
export * from './ShiftAllocationRequest';
|
|
134
|
+
export * from './ShiftTimeOffRequest';
|
|
133
135
|
export * from './TaskListResource';
|
|
134
136
|
export * from './TaskListResourceArrayResponse';
|
|
135
137
|
export * from './TaskLiteResource';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laravel API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ShiftAllocationRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ShiftAllocationRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ShiftAllocationRequest
|
|
22
|
+
*/
|
|
23
|
+
days: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ShiftAllocationRequest
|
|
28
|
+
*/
|
|
29
|
+
personId?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ShiftAllocationRequest interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfShiftAllocationRequest(value: object): value is ShiftAllocationRequest;
|
|
35
|
+
export declare function ShiftAllocationRequestFromJSON(json: any): ShiftAllocationRequest;
|
|
36
|
+
export declare function ShiftAllocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftAllocationRequest;
|
|
37
|
+
export declare function ShiftAllocationRequestToJSON(json: any): ShiftAllocationRequest;
|
|
38
|
+
export declare function ShiftAllocationRequestToJSONTyped(value?: ShiftAllocationRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Laravel API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
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.instanceOfShiftAllocationRequest = instanceOfShiftAllocationRequest;
|
|
17
|
+
exports.ShiftAllocationRequestFromJSON = ShiftAllocationRequestFromJSON;
|
|
18
|
+
exports.ShiftAllocationRequestFromJSONTyped = ShiftAllocationRequestFromJSONTyped;
|
|
19
|
+
exports.ShiftAllocationRequestToJSON = ShiftAllocationRequestToJSON;
|
|
20
|
+
exports.ShiftAllocationRequestToJSONTyped = ShiftAllocationRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ShiftAllocationRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfShiftAllocationRequest(value) {
|
|
25
|
+
if (!('days' in value) || value['days'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ShiftAllocationRequestFromJSON(json) {
|
|
30
|
+
return ShiftAllocationRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ShiftAllocationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'days': json['days'],
|
|
38
|
+
'personId': json['person_id'] == null ? undefined : json['person_id'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ShiftAllocationRequestToJSON(json) {
|
|
42
|
+
return ShiftAllocationRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ShiftAllocationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'days': value['days'],
|
|
50
|
+
'person_id': value['personId'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Laravel API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ShiftTimeOffRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ShiftTimeOffRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ShiftTimeOffRequest
|
|
22
|
+
*/
|
|
23
|
+
days: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ShiftTimeOffRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfShiftTimeOffRequest(value: object): value is ShiftTimeOffRequest;
|
|
29
|
+
export declare function ShiftTimeOffRequestFromJSON(json: any): ShiftTimeOffRequest;
|
|
30
|
+
export declare function ShiftTimeOffRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftTimeOffRequest;
|
|
31
|
+
export declare function ShiftTimeOffRequestToJSON(json: any): ShiftTimeOffRequest;
|
|
32
|
+
export declare function ShiftTimeOffRequestToJSONTyped(value?: ShiftTimeOffRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Laravel API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
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.instanceOfShiftTimeOffRequest = instanceOfShiftTimeOffRequest;
|
|
17
|
+
exports.ShiftTimeOffRequestFromJSON = ShiftTimeOffRequestFromJSON;
|
|
18
|
+
exports.ShiftTimeOffRequestFromJSONTyped = ShiftTimeOffRequestFromJSONTyped;
|
|
19
|
+
exports.ShiftTimeOffRequestToJSON = ShiftTimeOffRequestToJSON;
|
|
20
|
+
exports.ShiftTimeOffRequestToJSONTyped = ShiftTimeOffRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ShiftTimeOffRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfShiftTimeOffRequest(value) {
|
|
25
|
+
if (!('days' in value) || value['days'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ShiftTimeOffRequestFromJSON(json) {
|
|
30
|
+
return ShiftTimeOffRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ShiftTimeOffRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'days': json['days'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ShiftTimeOffRequestToJSON(json) {
|
|
41
|
+
return ShiftTimeOffRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ShiftTimeOffRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'days': value['days'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ export * from './SearchTimeOffRequest';
|
|
|
128
128
|
export * from './SendForgotPasswordLinkRequest';
|
|
129
129
|
export * from './SettingsResource';
|
|
130
130
|
export * from './SettingsResourceArrayResponse';
|
|
131
|
+
export * from './ShiftAllocationRequest';
|
|
132
|
+
export * from './ShiftTimeOffRequest';
|
|
131
133
|
export * from './TaskListResource';
|
|
132
134
|
export * from './TaskListResourceArrayResponse';
|
|
133
135
|
export * from './TaskLiteResource';
|
package/dist/models/index.js
CHANGED
|
@@ -146,6 +146,8 @@ __exportStar(require("./SearchTimeOffRequest"), exports);
|
|
|
146
146
|
__exportStar(require("./SendForgotPasswordLinkRequest"), exports);
|
|
147
147
|
__exportStar(require("./SettingsResource"), exports);
|
|
148
148
|
__exportStar(require("./SettingsResourceArrayResponse"), exports);
|
|
149
|
+
__exportStar(require("./ShiftAllocationRequest"), exports);
|
|
150
|
+
__exportStar(require("./ShiftTimeOffRequest"), exports);
|
|
149
151
|
__exportStar(require("./TaskListResource"), exports);
|
|
150
152
|
__exportStar(require("./TaskListResourceArrayResponse"), exports);
|
|
151
153
|
__exportStar(require("./TaskLiteResource"), exports);
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
PaginatedAllocationListResourceResponse,
|
|
23
23
|
SearchAllAllocationsRequest,
|
|
24
24
|
SearchAllocationsRequest,
|
|
25
|
+
ShiftAllocationRequest,
|
|
25
26
|
UpdateAllocationRequest,
|
|
26
27
|
} from '../models/index';
|
|
27
28
|
import {
|
|
@@ -39,6 +40,8 @@ import {
|
|
|
39
40
|
SearchAllAllocationsRequestToJSON,
|
|
40
41
|
SearchAllocationsRequestFromJSON,
|
|
41
42
|
SearchAllocationsRequestToJSON,
|
|
43
|
+
ShiftAllocationRequestFromJSON,
|
|
44
|
+
ShiftAllocationRequestToJSON,
|
|
42
45
|
UpdateAllocationRequestFromJSON,
|
|
43
46
|
UpdateAllocationRequestToJSON,
|
|
44
47
|
} from '../models/index';
|
|
@@ -55,6 +58,11 @@ export interface IndexAllocationRequest {
|
|
|
55
58
|
searchAllocationsRequest?: SearchAllocationsRequest;
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
export interface ShiftAllocationOperationRequest {
|
|
62
|
+
allocation: number;
|
|
63
|
+
shiftAllocationRequest?: ShiftAllocationRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
export interface ShowAllocationRequest {
|
|
59
67
|
allocation: number;
|
|
60
68
|
}
|
|
@@ -198,6 +206,54 @@ export class AllocationsApi extends runtime.BaseAPI {
|
|
|
198
206
|
return await response.value();
|
|
199
207
|
}
|
|
200
208
|
|
|
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
|
+
|
|
201
257
|
/**
|
|
202
258
|
* Auto-generated: showAllocation
|
|
203
259
|
*/
|
package/src/apis/TimeOffApi.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
PaginatedTimeOffListResourceResponse,
|
|
21
21
|
SearchAllTimeOffRequest,
|
|
22
22
|
SearchTimeOffRequest,
|
|
23
|
+
ShiftTimeOffRequest,
|
|
23
24
|
TimeOffLiteResourceArrayResponse,
|
|
24
25
|
TimeOffResource,
|
|
25
26
|
UpdateTimeOffRequest,
|
|
@@ -35,6 +36,8 @@ import {
|
|
|
35
36
|
SearchAllTimeOffRequestToJSON,
|
|
36
37
|
SearchTimeOffRequestFromJSON,
|
|
37
38
|
SearchTimeOffRequestToJSON,
|
|
39
|
+
ShiftTimeOffRequestFromJSON,
|
|
40
|
+
ShiftTimeOffRequestToJSON,
|
|
38
41
|
TimeOffLiteResourceArrayResponseFromJSON,
|
|
39
42
|
TimeOffLiteResourceArrayResponseToJSON,
|
|
40
43
|
TimeOffResourceFromJSON,
|
|
@@ -55,6 +58,11 @@ export interface IndexTimeOffRequest {
|
|
|
55
58
|
searchTimeOffRequest?: SearchTimeOffRequest;
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
export interface ShiftTimeOffOperationRequest {
|
|
62
|
+
timeOff: number;
|
|
63
|
+
shiftTimeOffRequest?: ShiftTimeOffRequest;
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
export interface ShowTimeOffRequest {
|
|
59
67
|
timeOff: number;
|
|
60
68
|
}
|
|
@@ -198,6 +206,54 @@ export class TimeOffApi extends runtime.BaseAPI {
|
|
|
198
206
|
return await response.value();
|
|
199
207
|
}
|
|
200
208
|
|
|
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
|
+
|
|
201
257
|
/**
|
|
202
258
|
* Auto-generated: showTimeOff
|
|
203
259
|
*/
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ShiftAllocationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ShiftAllocationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ShiftAllocationRequest
|
|
26
|
+
*/
|
|
27
|
+
days: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ShiftAllocationRequest
|
|
32
|
+
*/
|
|
33
|
+
personId?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ShiftAllocationRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfShiftAllocationRequest(value: object): value is ShiftAllocationRequest {
|
|
40
|
+
if (!('days' in value) || value['days'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ShiftAllocationRequestFromJSON(json: any): ShiftAllocationRequest {
|
|
45
|
+
return ShiftAllocationRequestFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ShiftAllocationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftAllocationRequest {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'days': json['days'],
|
|
55
|
+
'personId': json['person_id'] == null ? undefined : json['person_id'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ShiftAllocationRequestToJSON(json: any): ShiftAllocationRequest {
|
|
60
|
+
return ShiftAllocationRequestToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ShiftAllocationRequestToJSONTyped(value?: ShiftAllocationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'days': value['days'],
|
|
71
|
+
'person_id': value['personId'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ShiftTimeOffRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ShiftTimeOffRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ShiftTimeOffRequest
|
|
26
|
+
*/
|
|
27
|
+
days: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ShiftTimeOffRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfShiftTimeOffRequest(value: object): value is ShiftTimeOffRequest {
|
|
34
|
+
if (!('days' in value) || value['days'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ShiftTimeOffRequestFromJSON(json: any): ShiftTimeOffRequest {
|
|
39
|
+
return ShiftTimeOffRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ShiftTimeOffRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShiftTimeOffRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'days': json['days'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ShiftTimeOffRequestToJSON(json: any): ShiftTimeOffRequest {
|
|
53
|
+
return ShiftTimeOffRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ShiftTimeOffRequestToJSONTyped(value?: ShiftTimeOffRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'days': value['days'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -130,6 +130,8 @@ export * from './SearchTimeOffRequest';
|
|
|
130
130
|
export * from './SendForgotPasswordLinkRequest';
|
|
131
131
|
export * from './SettingsResource';
|
|
132
132
|
export * from './SettingsResourceArrayResponse';
|
|
133
|
+
export * from './ShiftAllocationRequest';
|
|
134
|
+
export * from './ShiftTimeOffRequest';
|
|
133
135
|
export * from './TaskListResource';
|
|
134
136
|
export * from './TaskListResourceArrayResponse';
|
|
135
137
|
export * from './TaskLiteResource';
|