rotacloud 1.0.40 → 1.0.43
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/dist/cjs/interfaces/index.d.ts +2 -0
- package/dist/cjs/interfaces/index.js +2 -0
- package/dist/cjs/interfaces/query-params/index.d.ts +2 -0
- package/dist/cjs/interfaces/query-params/index.js +2 -0
- package/dist/cjs/interfaces/query-params/toil-accruals-query-params.interface.d.ts +4 -0
- package/dist/cjs/interfaces/query-params/toil-accruals-query-params.interface.js +2 -0
- package/dist/cjs/interfaces/query-params/toil-allowance-query-params.interface.d.ts +3 -0
- package/dist/cjs/interfaces/query-params/toil-allowance-query-params.interface.js +2 -0
- package/dist/cjs/interfaces/toil-accrual.interface.d.ts +14 -0
- package/dist/cjs/interfaces/toil-accrual.interface.js +2 -0
- package/dist/cjs/interfaces/toil-allowance.interface.d.ts +7 -0
- package/dist/cjs/interfaces/toil-allowance.interface.js +2 -0
- package/dist/cjs/models/SDKError.model.d.ts +11 -0
- package/dist/cjs/models/SDKError.model.js +15 -0
- package/dist/cjs/models/index.d.ts +3 -1
- package/dist/cjs/models/index.js +3 -1
- package/dist/cjs/models/toil-accrual.model.d.ts +16 -0
- package/dist/cjs/models/toil-accrual.model.js +20 -0
- package/dist/cjs/models/toil-allowance.model.d.ts +9 -0
- package/dist/cjs/models/toil-allowance.model.js +13 -0
- package/dist/cjs/rotacloud.d.ts +3 -1
- package/dist/cjs/rotacloud.js +2 -0
- package/dist/cjs/services/accounts.service.js +3 -2
- package/dist/cjs/services/attendance.service.js +10 -5
- package/dist/cjs/services/auth.service.js +3 -2
- package/dist/cjs/services/availability.service.js +1 -2
- package/dist/cjs/services/daily-budgets.service.js +1 -2
- package/dist/cjs/services/daily-revenue.service.js +1 -2
- package/dist/cjs/services/day-notes.service.js +10 -5
- package/dist/cjs/services/days-off.service.js +2 -3
- package/dist/cjs/services/groups.service.js +10 -5
- package/dist/cjs/services/index.d.ts +2 -0
- package/dist/cjs/services/index.js +2 -0
- package/dist/cjs/services/leave-embargoes.service.js +10 -5
- package/dist/cjs/services/leave-request.service.js +14 -5
- package/dist/cjs/services/leave.service.js +10 -5
- package/dist/cjs/services/locations.service.js +10 -5
- package/dist/cjs/services/roles.service.js +10 -5
- package/dist/cjs/services/service.d.ts +3 -0
- package/dist/cjs/services/service.js +24 -2
- package/dist/cjs/services/settings.service.js +3 -2
- package/dist/cjs/services/shifts.service.d.ts +3 -3
- package/dist/cjs/services/shifts.service.js +21 -9
- package/dist/cjs/services/toil-accruals.service.d.ts +28 -0
- package/dist/cjs/services/toil-accruals.service.js +99 -0
- package/dist/cjs/services/toil-allowance.service.d.ts +10 -0
- package/dist/cjs/services/toil-allowance.service.js +84 -0
- package/dist/cjs/services/users.service.js +10 -5
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/index.d.ts +2 -0
- package/dist/mjs/interfaces/index.js +2 -0
- package/dist/mjs/interfaces/query-params/index.d.ts +2 -0
- package/dist/mjs/interfaces/query-params/index.js +2 -0
- package/dist/mjs/interfaces/query-params/toil-accruals-query-params.interface.d.ts +4 -0
- package/dist/mjs/interfaces/query-params/toil-accruals-query-params.interface.js +1 -0
- package/dist/mjs/interfaces/query-params/toil-allowance-query-params.interface.d.ts +3 -0
- package/dist/mjs/interfaces/query-params/toil-allowance-query-params.interface.js +1 -0
- package/dist/mjs/interfaces/toil-accrual.interface.d.ts +14 -0
- package/dist/mjs/interfaces/toil-accrual.interface.js +1 -0
- package/dist/mjs/interfaces/toil-allowance.interface.d.ts +7 -0
- package/dist/mjs/interfaces/toil-allowance.interface.js +1 -0
- package/dist/mjs/models/SDKError.model.d.ts +11 -0
- package/dist/mjs/models/SDKError.model.js +10 -0
- package/dist/mjs/models/index.d.ts +3 -1
- package/dist/mjs/models/index.js +3 -1
- package/dist/mjs/models/toil-accrual.model.d.ts +16 -0
- package/dist/mjs/models/toil-accrual.model.js +16 -0
- package/dist/mjs/models/toil-allowance.model.d.ts +9 -0
- package/dist/mjs/models/toil-allowance.model.js +9 -0
- package/dist/mjs/rotacloud.d.ts +3 -1
- package/dist/mjs/rotacloud.js +3 -1
- package/dist/mjs/services/accounts.service.js +3 -2
- package/dist/mjs/services/attendance.service.js +10 -5
- package/dist/mjs/services/auth.service.js +3 -2
- package/dist/mjs/services/availability.service.js +1 -2
- package/dist/mjs/services/daily-budgets.service.js +1 -2
- package/dist/mjs/services/daily-revenue.service.js +1 -2
- package/dist/mjs/services/day-notes.service.js +10 -5
- package/dist/mjs/services/days-off.service.js +2 -3
- package/dist/mjs/services/groups.service.js +10 -5
- package/dist/mjs/services/index.d.ts +2 -0
- package/dist/mjs/services/index.js +2 -0
- package/dist/mjs/services/leave-embargoes.service.js +10 -5
- package/dist/mjs/services/leave-request.service.js +14 -5
- package/dist/mjs/services/leave.service.js +10 -5
- package/dist/mjs/services/locations.service.js +10 -5
- package/dist/mjs/services/roles.service.js +10 -5
- package/dist/mjs/services/service.d.ts +3 -0
- package/dist/mjs/services/service.js +23 -1
- package/dist/mjs/services/settings.service.js +3 -2
- package/dist/mjs/services/shifts.service.d.ts +3 -3
- package/dist/mjs/services/shifts.service.js +21 -9
- package/dist/mjs/services/toil-accruals.service.d.ts +28 -0
- package/dist/mjs/services/toil-accruals.service.js +38 -0
- package/dist/mjs/services/toil-allowance.service.d.ts +10 -0
- package/dist/mjs/services/toil-allowance.service.js +23 -0
- package/dist/mjs/services/users.service.js +10 -5
- package/dist/mjs/version.js +1 -1
- package/package.json +1 -1
- package/src/interfaces/index.ts +2 -0
- package/src/interfaces/query-params/index.ts +2 -0
- package/src/interfaces/query-params/toil-accruals-query-params.interface.ts +4 -0
- package/src/interfaces/query-params/toil-allowance-query-params.interface.ts +3 -0
- package/src/interfaces/toil-accrual.interface.ts +14 -0
- package/src/interfaces/toil-allowance.interface.ts +7 -0
- package/src/models/SDKError.model.ts +20 -0
- package/src/models/index.ts +3 -1
- package/src/models/toil-accrual.model.ts +30 -0
- package/src/models/toil-allowance.model.ts +16 -0
- package/src/rotacloud.ts +4 -0
- package/src/services/accounts.service.ts +3 -5
- package/src/services/attendance.service.ts +10 -17
- package/src/services/auth.service.ts +3 -5
- package/src/services/availability.service.ts +1 -5
- package/src/services/daily-budgets.service.ts +1 -5
- package/src/services/daily-revenue.service.ts +1 -5
- package/src/services/day-notes.service.ts +10 -18
- package/src/services/days-off.service.ts +2 -10
- package/src/services/groups.service.ts +10 -18
- package/src/services/index.ts +2 -0
- package/src/services/leave-embargoes.service.ts +10 -17
- package/src/services/leave-request.service.ts +17 -17
- package/src/services/leave.service.ts +11 -17
- package/src/services/locations.service.ts +11 -17
- package/src/services/roles.service.ts +11 -17
- package/src/services/service.ts +31 -2
- package/src/services/settings.service.ts +4 -5
- package/src/services/shifts.service.ts +28 -34
- package/src/services/toil-accruals.service.ts +59 -0
- package/src/services/toil-allowance.service.ts +29 -0
- package/src/services/users.service.ts +11 -17
- package/src/version.ts +1 -1
- package/dist/cjs/models/error-response.model.d.ts +0 -8
- package/dist/cjs/models/error-response.model.js +0 -13
- package/dist/mjs/models/error-response.model.d.ts +0 -8
- package/dist/mjs/models/error-response.model.js +0 -8
- package/src/models/error-response.model.ts +0 -14
|
@@ -31,7 +31,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.LeaveService = void 0;
|
|
32
32
|
const index_js_1 = require("./index.js");
|
|
33
33
|
const leave_model_js_1 = require("../models/leave.model.js");
|
|
34
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
34
|
const leave_type_model_js_1 = require("../models/leave-type.model.js");
|
|
36
35
|
class LeaveService extends index_js_1.Service {
|
|
37
36
|
constructor() {
|
|
@@ -39,10 +38,14 @@ class LeaveService extends index_js_1.Service {
|
|
|
39
38
|
this.apiPath = '/leave';
|
|
40
39
|
}
|
|
41
40
|
create(data, options) {
|
|
42
|
-
return super
|
|
41
|
+
return super
|
|
42
|
+
.fetch({ url: this.apiPath, data, method: 'POST' }, options)
|
|
43
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : [...res.data.map((leave) => new leave_model_js_1.Leave(leave))]));
|
|
43
44
|
}
|
|
44
45
|
get(id, options) {
|
|
45
|
-
return super
|
|
46
|
+
return super
|
|
47
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
48
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new leave_model_js_1.Leave(res.data)));
|
|
46
49
|
}
|
|
47
50
|
list(query, options) {
|
|
48
51
|
const _super = Object.create(null, {
|
|
@@ -116,10 +119,12 @@ class LeaveService extends index_js_1.Service {
|
|
|
116
119
|
data,
|
|
117
120
|
method: 'POST',
|
|
118
121
|
})
|
|
119
|
-
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new leave_model_js_1.Leave(res.data))
|
|
122
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new leave_model_js_1.Leave(res.data)));
|
|
120
123
|
}
|
|
121
124
|
delete(id, options) {
|
|
122
|
-
return super
|
|
125
|
+
return super
|
|
126
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
127
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
123
128
|
}
|
|
124
129
|
}
|
|
125
130
|
exports.LeaveService = LeaveService;
|
|
@@ -31,17 +31,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.LocationsService = void 0;
|
|
32
32
|
const index_js_1 = require("./index.js");
|
|
33
33
|
const location_model_js_1 = require("../models/location.model.js");
|
|
34
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
34
|
class LocationsService extends index_js_1.Service {
|
|
36
35
|
constructor() {
|
|
37
36
|
super(...arguments);
|
|
38
37
|
this.apiPath = '/locations';
|
|
39
38
|
}
|
|
40
39
|
create(data, options) {
|
|
41
|
-
return super
|
|
40
|
+
return super
|
|
41
|
+
.fetch({ url: `${this.apiPath}`, data, method: 'POST' })
|
|
42
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new location_model_js_1.Location(res.data)));
|
|
42
43
|
}
|
|
43
44
|
get(id, options) {
|
|
44
|
-
return super
|
|
45
|
+
return super
|
|
46
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
47
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new location_model_js_1.Location(res.data)));
|
|
45
48
|
}
|
|
46
49
|
list(query, options) {
|
|
47
50
|
const _super = Object.create(null, {
|
|
@@ -94,10 +97,12 @@ class LocationsService extends index_js_1.Service {
|
|
|
94
97
|
data,
|
|
95
98
|
method: 'POST',
|
|
96
99
|
})
|
|
97
|
-
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new location_model_js_1.Location(res.data))
|
|
100
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new location_model_js_1.Location(res.data)));
|
|
98
101
|
}
|
|
99
102
|
delete(id, options) {
|
|
100
|
-
return super
|
|
103
|
+
return super
|
|
104
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
105
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
exports.LocationsService = LocationsService;
|
|
@@ -31,17 +31,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.RolesService = void 0;
|
|
32
32
|
const index_js_1 = require("./index.js");
|
|
33
33
|
const role_model_js_1 = require("../models/role.model.js");
|
|
34
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
34
|
class RolesService extends index_js_1.Service {
|
|
36
35
|
constructor() {
|
|
37
36
|
super(...arguments);
|
|
38
37
|
this.apiPath = '/roles';
|
|
39
38
|
}
|
|
40
39
|
create(data, options) {
|
|
41
|
-
return super
|
|
40
|
+
return super
|
|
41
|
+
.fetch({ url: this.apiPath, data, method: 'POST' })
|
|
42
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new role_model_js_1.Role(res.data)));
|
|
42
43
|
}
|
|
43
44
|
get(id, options) {
|
|
44
|
-
return super
|
|
45
|
+
return super
|
|
46
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
47
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new role_model_js_1.Role(res.data)));
|
|
45
48
|
}
|
|
46
49
|
list(query, options) {
|
|
47
50
|
const _super = Object.create(null, {
|
|
@@ -94,10 +97,12 @@ class RolesService extends index_js_1.Service {
|
|
|
94
97
|
data,
|
|
95
98
|
method: 'POST',
|
|
96
99
|
})
|
|
97
|
-
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new role_model_js_1.Role(res.data))
|
|
100
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new role_model_js_1.Role(res.data)));
|
|
98
101
|
}
|
|
99
102
|
delete(id, options) {
|
|
100
|
-
return super
|
|
103
|
+
return super
|
|
104
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
105
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
exports.RolesService = RolesService;
|
|
@@ -22,9 +22,12 @@ export interface Options {
|
|
|
22
22
|
expand?: string[];
|
|
23
23
|
fields?: string[];
|
|
24
24
|
limit?: number;
|
|
25
|
+
dryRun?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export declare abstract class Service<ApiResponse = any> {
|
|
27
28
|
protected client: AxiosInstance;
|
|
29
|
+
private initialiseAxios;
|
|
30
|
+
private parseClientError;
|
|
28
31
|
isLeaveRequest(endpoint?: string): boolean;
|
|
29
32
|
private buildQueryStr;
|
|
30
33
|
private parsePageLinkHeader;
|
|
@@ -32,6 +32,7 @@ const axios_1 = __importDefault(require("axios"));
|
|
|
32
32
|
const axios_retry_1 = __importDefault(require("axios-retry"));
|
|
33
33
|
const rotacloud_js_1 = require("../rotacloud.js");
|
|
34
34
|
const version_js_1 = require("../version.js");
|
|
35
|
+
const SDKError_model_js_1 = require("../models/SDKError.model.js");
|
|
35
36
|
var RetryStrategy;
|
|
36
37
|
(function (RetryStrategy) {
|
|
37
38
|
RetryStrategy["Exponential"] = "expo";
|
|
@@ -52,7 +53,28 @@ const DEFAULT_RETRY_STRATEGY_OPTIONS = {
|
|
|
52
53
|
};
|
|
53
54
|
class Service {
|
|
54
55
|
constructor() {
|
|
55
|
-
this.client =
|
|
56
|
+
this.client = this.initialiseAxios();
|
|
57
|
+
}
|
|
58
|
+
initialiseAxios() {
|
|
59
|
+
const client = axios_1.default.create();
|
|
60
|
+
client.interceptors.response.use((response) => response, (error) => {
|
|
61
|
+
const parsedError = this.parseClientError(error);
|
|
62
|
+
return Promise.reject(parsedError);
|
|
63
|
+
});
|
|
64
|
+
return client;
|
|
65
|
+
}
|
|
66
|
+
parseClientError(error) {
|
|
67
|
+
var _a;
|
|
68
|
+
if (!axios_1.default.isAxiosError(error))
|
|
69
|
+
return error;
|
|
70
|
+
const axiosErrorLocation = error.response || error.request;
|
|
71
|
+
const apiErrorMessage = (_a = axiosErrorLocation.data) === null || _a === void 0 ? void 0 : _a.error;
|
|
72
|
+
const sdkErrorParams = {
|
|
73
|
+
code: axiosErrorLocation.status,
|
|
74
|
+
message: apiErrorMessage || error.message,
|
|
75
|
+
data: axiosErrorLocation.data,
|
|
76
|
+
};
|
|
77
|
+
return new SDKError_model_js_1.SDKError(sdkErrorParams);
|
|
56
78
|
}
|
|
57
79
|
isLeaveRequest(endpoint) {
|
|
58
80
|
return endpoint === '/leave_requests';
|
|
@@ -100,7 +122,7 @@ class Service {
|
|
|
100
122
|
// need to convert user field in payload to a header for creating leave_requests when using an API key
|
|
101
123
|
this.isLeaveRequest(httpOptions.url) ? (headers.User = `${httpOptions.data.user}`) : undefined;
|
|
102
124
|
}
|
|
103
|
-
const reqObject = Object.assign(Object.assign({}, httpOptions), { baseURL: rotacloud_js_1.RotaCloud.config.baseUri, headers, params: Object.assign({ expand: options === null || options === void 0 ? void 0 : options.expand, fields: options === null || options === void 0 ? void 0 : options.fields, limit: options === null || options === void 0 ? void 0 : options.limit }, httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.params), paramsSerializer: this.buildQueryStr });
|
|
125
|
+
const reqObject = Object.assign(Object.assign({}, httpOptions), { baseURL: rotacloud_js_1.RotaCloud.config.baseUri, headers, params: Object.assign({ expand: options === null || options === void 0 ? void 0 : options.expand, fields: options === null || options === void 0 ? void 0 : options.fields, limit: options === null || options === void 0 ? void 0 : options.limit, dry_run: options === null || options === void 0 ? void 0 : options.dryRun }, httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.params), paramsSerializer: this.buildQueryStr });
|
|
104
126
|
if (rotacloud_js_1.RotaCloud.config.retry) {
|
|
105
127
|
const retryConfig = typeof rotacloud_js_1.RotaCloud.config.retry === 'string'
|
|
106
128
|
? DEFAULT_RETRY_STRATEGY_OPTIONS[rotacloud_js_1.RotaCloud.config.retry]
|
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsService = void 0;
|
|
4
4
|
const settings_model_js_1 = require("../models/settings.model.js");
|
|
5
5
|
const index_js_1 = require("./index.js");
|
|
6
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
7
6
|
class SettingsService extends index_js_1.Service {
|
|
8
7
|
constructor() {
|
|
9
8
|
super(...arguments);
|
|
10
9
|
this.apiPath = '/settings';
|
|
11
10
|
}
|
|
12
11
|
get(query, options) {
|
|
13
|
-
return super
|
|
12
|
+
return super
|
|
13
|
+
.fetch({ url: `${this.apiPath}`, params: query }, options)
|
|
14
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new settings_model_js_1.Settings(res.data)));
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
exports.SettingsService = SettingsService;
|
|
@@ -24,11 +24,11 @@ export declare class ShiftsService extends Service {
|
|
|
24
24
|
rawResponse: true;
|
|
25
25
|
} & Options): Promise<AxiosResponse<ApiShift, any>>;
|
|
26
26
|
update(id: number, data: Partial<ApiShift>, options: Options): Promise<Shift>;
|
|
27
|
-
delete(
|
|
28
|
-
delete(
|
|
27
|
+
delete(ids: number | number[]): Promise<number>;
|
|
28
|
+
delete(ids: number | number[], options: {
|
|
29
29
|
rawResponse: true;
|
|
30
30
|
} & Options): Promise<AxiosResponse<any, any>>;
|
|
31
|
-
delete(
|
|
31
|
+
delete(ids: number | number[], options: Options): Promise<number>;
|
|
32
32
|
acknowledge(data: number[]): Promise<number>;
|
|
33
33
|
acknowledge(data: number[], options: {
|
|
34
34
|
rawResponse: true;
|
|
@@ -31,17 +31,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.ShiftsService = void 0;
|
|
32
32
|
const index_js_1 = require("./index.js");
|
|
33
33
|
const shift_model_js_1 = require("../models/shift.model.js");
|
|
34
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
34
|
class ShiftsService extends index_js_1.Service {
|
|
36
35
|
constructor() {
|
|
37
36
|
super(...arguments);
|
|
38
37
|
this.apiPath = '/shifts';
|
|
39
38
|
}
|
|
40
39
|
create(data, options) {
|
|
41
|
-
return super
|
|
40
|
+
return super
|
|
41
|
+
.fetch({ url: this.apiPath, data, method: 'POST' })
|
|
42
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new shift_model_js_1.Shift(res.data)));
|
|
42
43
|
}
|
|
43
44
|
get(id, options) {
|
|
44
|
-
return super
|
|
45
|
+
return super
|
|
46
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
47
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new shift_model_js_1.Shift(res.data)));
|
|
45
48
|
}
|
|
46
49
|
list(query, options) {
|
|
47
50
|
const _super = Object.create(null, {
|
|
@@ -94,19 +97,28 @@ class ShiftsService extends index_js_1.Service {
|
|
|
94
97
|
data,
|
|
95
98
|
method: 'POST',
|
|
96
99
|
})
|
|
97
|
-
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new shift_model_js_1.Shift(res.data))
|
|
100
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new shift_model_js_1.Shift(res.data)));
|
|
98
101
|
}
|
|
99
|
-
delete(
|
|
100
|
-
|
|
102
|
+
delete(ids, options) {
|
|
103
|
+
const params = typeof ids !== 'number'
|
|
104
|
+
? { url: this.apiPath, data: ids, method: 'DELETE' }
|
|
105
|
+
: { url: `${this.apiPath}/${ids}`, method: 'DELETE' };
|
|
106
|
+
return super.fetch(params).then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
101
107
|
}
|
|
102
108
|
acknowledge(data, options) {
|
|
103
|
-
return super
|
|
109
|
+
return super
|
|
110
|
+
.fetch({ url: '/shifts_acknowledged', data, method: 'POST' })
|
|
111
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
104
112
|
}
|
|
105
113
|
publish(data, options) {
|
|
106
|
-
return super
|
|
114
|
+
return super
|
|
115
|
+
.fetch({ url: '/shifts_published', data, method: 'POST' })
|
|
116
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
107
117
|
}
|
|
108
118
|
unpublish(data, options) {
|
|
109
|
-
return super
|
|
119
|
+
return super
|
|
120
|
+
.fetch({ url: '/shifts_published', data, method: 'DELETE' })
|
|
121
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
110
122
|
}
|
|
111
123
|
}
|
|
112
124
|
exports.ShiftsService = ShiftsService;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { Options, RequirementsOf, Service } from './service';
|
|
3
|
+
import { ToilAccrualsQueryParams } from '../interfaces/query-params/toil-accruals-query-params.interface';
|
|
4
|
+
import { ToilAccrual } from '../models/toil-accrual.model';
|
|
5
|
+
import { ApiToilAccrual } from '../interfaces/toil-accrual.interface';
|
|
6
|
+
declare type RequiredProps = 'duration_hours' | 'date' | 'leave_year' | 'user_id';
|
|
7
|
+
export declare class ToilAccrualsService extends Service {
|
|
8
|
+
private apiPath;
|
|
9
|
+
create(data: RequirementsOf<ApiToilAccrual, RequiredProps>): Promise<ToilAccrual>;
|
|
10
|
+
create(data: RequirementsOf<ApiToilAccrual, RequiredProps>, options: {
|
|
11
|
+
rawResponse: true;
|
|
12
|
+
} & Options): Promise<AxiosResponse<ApiToilAccrual, any>>;
|
|
13
|
+
create(data: RequirementsOf<ApiToilAccrual, RequiredProps>, options: Options): Promise<ToilAccrual>;
|
|
14
|
+
get(id: number): Promise<ToilAccrual>;
|
|
15
|
+
get(id: number, options: {
|
|
16
|
+
rawResponse: true;
|
|
17
|
+
} & Options): Promise<AxiosResponse<ToilAccrual, any>>;
|
|
18
|
+
get(id: number, options: Options): Promise<ToilAccrual>;
|
|
19
|
+
list(query: ToilAccrualsQueryParams, options?: Options): AsyncGenerator<ToilAccrual, void, unknown>;
|
|
20
|
+
listAll(query: ToilAccrualsQueryParams, options?: Options): Promise<ToilAccrual[]>;
|
|
21
|
+
listByPage(query: ToilAccrualsQueryParams, options?: Options): AsyncGenerator<AxiosResponse<ApiToilAccrual[], any>, any, unknown>;
|
|
22
|
+
delete(id: number): Promise<number>;
|
|
23
|
+
delete(id: number, options: {
|
|
24
|
+
rawResponse: true;
|
|
25
|
+
} & Options): Promise<AxiosResponse<any, any>>;
|
|
26
|
+
delete(id: number, options: Options): Promise<number>;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
19
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
20
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
22
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
23
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
26
|
+
function fulfill(value) { resume("next", value); }
|
|
27
|
+
function reject(value) { resume("throw", value); }
|
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.ToilAccrualsService = void 0;
|
|
32
|
+
const service_1 = require("./service");
|
|
33
|
+
const toil_accrual_model_1 = require("../models/toil-accrual.model");
|
|
34
|
+
class ToilAccrualsService extends service_1.Service {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.apiPath = '/toil_accruals';
|
|
38
|
+
}
|
|
39
|
+
create(data, options) {
|
|
40
|
+
return super
|
|
41
|
+
.fetch({ url: this.apiPath, data, method: 'POST' })
|
|
42
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new toil_accrual_model_1.ToilAccrual(res.data)));
|
|
43
|
+
}
|
|
44
|
+
get(id, options) {
|
|
45
|
+
return super
|
|
46
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
47
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new toil_accrual_model_1.ToilAccrual(res.data)));
|
|
48
|
+
}
|
|
49
|
+
list(query, options) {
|
|
50
|
+
const _super = Object.create(null, {
|
|
51
|
+
iterator: { get: () => super.iterator }
|
|
52
|
+
});
|
|
53
|
+
return __asyncGenerator(this, arguments, function* list_1() {
|
|
54
|
+
var e_1, _a;
|
|
55
|
+
try {
|
|
56
|
+
for (var _b = __asyncValues(_super.iterator.call(this, { url: this.apiPath, params: query }, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
57
|
+
const res = _c.value;
|
|
58
|
+
yield yield __await(new toil_accrual_model_1.ToilAccrual(res));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
62
|
+
finally {
|
|
63
|
+
try {
|
|
64
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
65
|
+
}
|
|
66
|
+
finally { if (e_1) throw e_1.error; }
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
listAll(query, options) {
|
|
71
|
+
var e_2, _a;
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const toilAccruals = [];
|
|
74
|
+
try {
|
|
75
|
+
for (var _b = __asyncValues(this.list(query, options)), _c; _c = yield _b.next(), !_c.done;) {
|
|
76
|
+
const accrual = _c.value;
|
|
77
|
+
toilAccruals.push(accrual);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
84
|
+
}
|
|
85
|
+
finally { if (e_2) throw e_2.error; }
|
|
86
|
+
}
|
|
87
|
+
return toilAccruals;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
listByPage(query, options) {
|
|
91
|
+
return super.iterator({ url: this.apiPath, params: query }, options).byPage();
|
|
92
|
+
}
|
|
93
|
+
delete(id, options) {
|
|
94
|
+
return super
|
|
95
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
96
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.ToilAccrualsService = ToilAccrualsService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Options, Service } from './service';
|
|
2
|
+
import { ToilAllowanceQueryParams } from '../interfaces/query-params/toil-allowance-query-params.interface';
|
|
3
|
+
import { ApiToilAllowance } from '../interfaces/toil-allowance.interface';
|
|
4
|
+
import { ToilAllowance } from '../models/toil-allowance.model';
|
|
5
|
+
export declare class ToilAllowanceService extends Service {
|
|
6
|
+
private apiPath;
|
|
7
|
+
list(year: number, query: ToilAllowanceQueryParams, options?: Options): AsyncGenerator<ToilAllowance, void, unknown>;
|
|
8
|
+
listAll(year: number, query: ToilAllowanceQueryParams, options?: Options): Promise<ToilAllowance[]>;
|
|
9
|
+
listByPage(year: number, query: ToilAllowanceQueryParams, options?: Options): AsyncGenerator<import("axios").AxiosResponse<ApiToilAllowance[][], any>, any, unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
19
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
20
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
21
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
22
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
23
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
26
|
+
function fulfill(value) { resume("next", value); }
|
|
27
|
+
function reject(value) { resume("throw", value); }
|
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.ToilAllowanceService = void 0;
|
|
32
|
+
const service_1 = require("./service");
|
|
33
|
+
const toil_allowance_model_1 = require("../models/toil-allowance.model");
|
|
34
|
+
class ToilAllowanceService extends service_1.Service {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.apiPath = '/toil_allowance';
|
|
38
|
+
}
|
|
39
|
+
list(year, query, options) {
|
|
40
|
+
const _super = Object.create(null, {
|
|
41
|
+
iterator: { get: () => super.iterator }
|
|
42
|
+
});
|
|
43
|
+
return __asyncGenerator(this, arguments, function* list_1() {
|
|
44
|
+
var e_1, _a;
|
|
45
|
+
try {
|
|
46
|
+
for (var _b = __asyncValues(_super.iterator.call(this, { url: `${this.apiPath}/${year}`, params: query }, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
47
|
+
const res = _c.value;
|
|
48
|
+
yield yield __await(new toil_allowance_model_1.ToilAllowance(res));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
52
|
+
finally {
|
|
53
|
+
try {
|
|
54
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
55
|
+
}
|
|
56
|
+
finally { if (e_1) throw e_1.error; }
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
listAll(year, query, options) {
|
|
61
|
+
var e_2, _a;
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const toilAllowances = [];
|
|
64
|
+
try {
|
|
65
|
+
for (var _b = __asyncValues(this.list(year, query, options)), _c; _c = yield _b.next(), !_c.done;) {
|
|
66
|
+
const allowance = _c.value;
|
|
67
|
+
toilAllowances.push(allowance);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
71
|
+
finally {
|
|
72
|
+
try {
|
|
73
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
74
|
+
}
|
|
75
|
+
finally { if (e_2) throw e_2.error; }
|
|
76
|
+
}
|
|
77
|
+
return toilAllowances;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
listByPage(year, query, options) {
|
|
81
|
+
return super.iterator({ url: `${this.apiPath}/${year}`, params: query }, options).byPage();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.ToilAllowanceService = ToilAllowanceService;
|
|
@@ -31,17 +31,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.UsersService = void 0;
|
|
32
32
|
const index_js_1 = require("./index.js");
|
|
33
33
|
const user_model_js_1 = require("../models/user.model.js");
|
|
34
|
-
const error_response_model_js_1 = require("../models/error-response.model.js");
|
|
35
34
|
class UsersService extends index_js_1.Service {
|
|
36
35
|
constructor() {
|
|
37
36
|
super(...arguments);
|
|
38
37
|
this.apiPath = '/users';
|
|
39
38
|
}
|
|
40
39
|
create(data, options) {
|
|
41
|
-
return super
|
|
40
|
+
return super
|
|
41
|
+
.fetch({ url: this.apiPath, data, method: 'POST' })
|
|
42
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new user_model_js_1.User(res.data)));
|
|
42
43
|
}
|
|
43
44
|
get(id, options) {
|
|
44
|
-
return super
|
|
45
|
+
return super
|
|
46
|
+
.fetch({ url: `${this.apiPath}/${id}` }, options)
|
|
47
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new user_model_js_1.User(res.data)));
|
|
45
48
|
}
|
|
46
49
|
list(query, options) {
|
|
47
50
|
const _super = Object.create(null, {
|
|
@@ -94,10 +97,12 @@ class UsersService extends index_js_1.Service {
|
|
|
94
97
|
data,
|
|
95
98
|
method: 'POST',
|
|
96
99
|
})
|
|
97
|
-
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new user_model_js_1.User(res.data))
|
|
100
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : new user_model_js_1.User(res.data)));
|
|
98
101
|
}
|
|
99
102
|
delete(id, options) {
|
|
100
|
-
return super
|
|
103
|
+
return super
|
|
104
|
+
.fetch({ url: `${this.apiPath}/${id}`, method: 'DELETE' })
|
|
105
|
+
.then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.status));
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
exports.UsersService = UsersService;
|
package/dist/cjs/version.js
CHANGED
|
@@ -28,4 +28,6 @@ export * from './role.interface.js';
|
|
|
28
28
|
export * from './sdk-config.interface.js';
|
|
29
29
|
export * from './settings.interface.js';
|
|
30
30
|
export * from './shift.interface.js';
|
|
31
|
+
export * from './toil-accrual.interface.js';
|
|
32
|
+
export * from './toil-allowance.interface.js';
|
|
31
33
|
export * from './user.interface.js';
|
|
@@ -28,4 +28,6 @@ export * from './role.interface.js';
|
|
|
28
28
|
export * from './sdk-config.interface.js';
|
|
29
29
|
export * from './settings.interface.js';
|
|
30
30
|
export * from './shift.interface.js';
|
|
31
|
+
export * from './toil-accrual.interface.js';
|
|
32
|
+
export * from './toil-allowance.interface.js';
|
|
31
33
|
export * from './user.interface.js';
|
|
@@ -21,5 +21,7 @@ export * from './settings-query-params.interface.js';
|
|
|
21
21
|
export * from './shifts-query-params.interface.js';
|
|
22
22
|
export * from './swap-requests-query-params.interface.js';
|
|
23
23
|
export * from './terminals-query-params.interface.js';
|
|
24
|
+
export * from './toil-accruals-query-params.interface.js';
|
|
25
|
+
export * from './toil-allowance-query-params.interface.js';
|
|
24
26
|
export * from './unavailability-requests-query-params.interface.js';
|
|
25
27
|
export * from './users-query-params.interface.js';
|
|
@@ -21,5 +21,7 @@ export * from './settings-query-params.interface.js';
|
|
|
21
21
|
export * from './shifts-query-params.interface.js';
|
|
22
22
|
export * from './swap-requests-query-params.interface.js';
|
|
23
23
|
export * from './terminals-query-params.interface.js';
|
|
24
|
+
export * from './toil-accruals-query-params.interface.js';
|
|
25
|
+
export * from './toil-allowance-query-params.interface.js';
|
|
24
26
|
export * from './unavailability-requests-query-params.interface.js';
|
|
25
27
|
export * from './users-query-params.interface.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ApiToilAccrual {
|
|
2
|
+
comments: string;
|
|
3
|
+
created_at: number;
|
|
4
|
+
created_by: number | null;
|
|
5
|
+
date: string;
|
|
6
|
+
deleted: boolean;
|
|
7
|
+
deleted_at: string | null;
|
|
8
|
+
deleted_by: number | null;
|
|
9
|
+
duration_hours: number;
|
|
10
|
+
id: number;
|
|
11
|
+
leave_year: number;
|
|
12
|
+
location_id: number | null;
|
|
13
|
+
user_id: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|