rotacloud 1.0.39 → 1.0.40
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/query-params/leave-requests-query-params.interface.d.ts +1 -2
- package/dist/cjs/interfaces/shift.interface.d.ts +1 -1
- package/dist/cjs/models/index.d.ts +29 -0
- package/dist/cjs/models/index.js +41 -0
- package/dist/cjs/models/location.model.d.ts +2 -7
- package/dist/cjs/models/location.model.js +1 -4
- package/dist/cjs/models/shift.model.d.ts +1 -1
- package/dist/cjs/models/terminal.model.d.ts +2 -6
- package/dist/cjs/models/terminal.model.js +1 -4
- package/dist/cjs/rotacloud.d.ts +1 -0
- package/dist/cjs/rotacloud.js +1 -0
- package/dist/cjs/services/leave-request.service.d.ts +4 -4
- package/dist/cjs/version.js +1 -1
- package/dist/mjs/interfaces/query-params/leave-requests-query-params.interface.d.ts +1 -2
- package/dist/mjs/interfaces/shift.interface.d.ts +1 -1
- package/dist/mjs/models/index.d.ts +29 -0
- package/dist/mjs/models/index.js +29 -0
- package/dist/mjs/models/location.model.d.ts +2 -7
- package/dist/mjs/models/location.model.js +0 -2
- package/dist/mjs/models/shift.model.d.ts +1 -1
- package/dist/mjs/models/terminal.model.d.ts +2 -6
- package/dist/mjs/models/terminal.model.js +0 -2
- package/dist/mjs/rotacloud.d.ts +1 -0
- package/dist/mjs/rotacloud.js +1 -0
- package/dist/mjs/services/leave-request.service.d.ts +4 -4
- package/dist/mjs/version.js +1 -1
- package/package.json +2 -3
- package/src/interfaces/query-params/leave-requests-query-params.interface.ts +1 -2
- package/src/interfaces/shift.interface.ts +1 -1
- package/src/models/index.ts +29 -0
- package/src/models/location.model.ts +2 -8
- package/src/models/shift.model.ts +1 -1
- package/src/models/terminal.model.ts +2 -6
- package/src/rotacloud.ts +1 -0
- package/src/services/leave-request.service.ts +5 -5
- package/src/version.ts +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './account.model.js';
|
|
2
|
+
export * from './attendance.model.js';
|
|
3
|
+
export * from './auth.model.js';
|
|
4
|
+
export * from './availability-pattern.model.js';
|
|
5
|
+
export * from './availability.model.js';
|
|
6
|
+
export * from './daily-budgets.model.js';
|
|
7
|
+
export * from './daily-revenue.model.js';
|
|
8
|
+
export * from './day-note.model.js';
|
|
9
|
+
export * from './days-off-pattern.model.js';
|
|
10
|
+
export * from './days-off.model.js';
|
|
11
|
+
export * from './document.model.js';
|
|
12
|
+
export * from './error-response.model.js';
|
|
13
|
+
export * from './group.model.js';
|
|
14
|
+
export * from './holiday-allowance-custom.model.js';
|
|
15
|
+
export * from './holiday-allowance.model.js';
|
|
16
|
+
export * from './leave-embargo.model.js';
|
|
17
|
+
export * from './leave-request.model.js';
|
|
18
|
+
export * from './leave-type.model.js';
|
|
19
|
+
export * from './leave.model.js';
|
|
20
|
+
export * from './location.model.js';
|
|
21
|
+
export * from './logbook-category.model.js';
|
|
22
|
+
export * from './logbook-event.model.js';
|
|
23
|
+
export * from './memo.model.js';
|
|
24
|
+
export * from './pay-period.model.js';
|
|
25
|
+
export * from './role.model.js';
|
|
26
|
+
export * from './settings.model.js';
|
|
27
|
+
export * from './shift.model.js';
|
|
28
|
+
export * from './terminal.model.js';
|
|
29
|
+
export * from './user.model.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./account.model.js"), exports);
|
|
14
|
+
__exportStar(require("./attendance.model.js"), exports);
|
|
15
|
+
__exportStar(require("./auth.model.js"), exports);
|
|
16
|
+
__exportStar(require("./availability-pattern.model.js"), exports);
|
|
17
|
+
__exportStar(require("./availability.model.js"), exports);
|
|
18
|
+
__exportStar(require("./daily-budgets.model.js"), exports);
|
|
19
|
+
__exportStar(require("./daily-revenue.model.js"), exports);
|
|
20
|
+
__exportStar(require("./day-note.model.js"), exports);
|
|
21
|
+
__exportStar(require("./days-off-pattern.model.js"), exports);
|
|
22
|
+
__exportStar(require("./days-off.model.js"), exports);
|
|
23
|
+
__exportStar(require("./document.model.js"), exports);
|
|
24
|
+
__exportStar(require("./error-response.model.js"), exports);
|
|
25
|
+
__exportStar(require("./group.model.js"), exports);
|
|
26
|
+
__exportStar(require("./holiday-allowance-custom.model.js"), exports);
|
|
27
|
+
__exportStar(require("./holiday-allowance.model.js"), exports);
|
|
28
|
+
__exportStar(require("./leave-embargo.model.js"), exports);
|
|
29
|
+
__exportStar(require("./leave-request.model.js"), exports);
|
|
30
|
+
__exportStar(require("./leave-type.model.js"), exports);
|
|
31
|
+
__exportStar(require("./leave.model.js"), exports);
|
|
32
|
+
__exportStar(require("./location.model.js"), exports);
|
|
33
|
+
__exportStar(require("./logbook-category.model.js"), exports);
|
|
34
|
+
__exportStar(require("./logbook-event.model.js"), exports);
|
|
35
|
+
__exportStar(require("./memo.model.js"), exports);
|
|
36
|
+
__exportStar(require("./pay-period.model.js"), exports);
|
|
37
|
+
__exportStar(require("./role.model.js"), exports);
|
|
38
|
+
__exportStar(require("./settings.model.js"), exports);
|
|
39
|
+
__exportStar(require("./shift.model.js"), exports);
|
|
40
|
+
__exportStar(require("./terminal.model.js"), exports);
|
|
41
|
+
__exportStar(require("./user.model.js"), exports);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { ApiLocation } from '../interfaces/index.js';
|
|
2
|
-
export declare class LatLngObject {
|
|
3
|
-
lat: number;
|
|
4
|
-
lng: number;
|
|
5
|
-
radius: number;
|
|
6
|
-
}
|
|
1
|
+
import { ApiLocation, ApiLocationCoordinate } from '../interfaces/index.js';
|
|
7
2
|
export declare class Location {
|
|
8
3
|
id: number;
|
|
9
4
|
name: string;
|
|
10
5
|
deleted: boolean;
|
|
11
6
|
address: string;
|
|
12
|
-
location:
|
|
7
|
+
location: ApiLocationCoordinate;
|
|
13
8
|
timezone: number;
|
|
14
9
|
users: number[];
|
|
15
10
|
managers: number[];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Location =
|
|
4
|
-
class LatLngObject {
|
|
5
|
-
}
|
|
6
|
-
exports.LatLngObject = LatLngObject;
|
|
3
|
+
exports.Location = void 0;
|
|
7
4
|
class Location {
|
|
8
5
|
constructor(location) {
|
|
9
6
|
this.id = location.id;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
lat: number;
|
|
3
|
-
lng: number;
|
|
4
|
-
radius: number;
|
|
5
|
-
}
|
|
1
|
+
import { ApiLocationCoordinate } from '../interfaces/index.js';
|
|
6
2
|
export declare class Terminal {
|
|
7
3
|
id: number;
|
|
8
4
|
deleted: boolean;
|
|
@@ -12,7 +8,7 @@ export declare class Terminal {
|
|
|
12
8
|
device: string;
|
|
13
9
|
version: string;
|
|
14
10
|
ip: string;
|
|
15
|
-
location:
|
|
11
|
+
location: ApiLocationCoordinate;
|
|
16
12
|
timezone: number;
|
|
17
13
|
require_photo: boolean;
|
|
18
14
|
require_photo_breaks: boolean;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Terminal =
|
|
4
|
-
class LatLngObject {
|
|
5
|
-
}
|
|
6
|
-
exports.LatLngObject = LatLngObject;
|
|
3
|
+
exports.Terminal = void 0;
|
|
7
4
|
class Terminal {
|
|
8
5
|
}
|
|
9
6
|
exports.Terminal = Terminal;
|
package/dist/cjs/rotacloud.d.ts
CHANGED
package/dist/cjs/rotacloud.js
CHANGED
|
@@ -51,3 +51,4 @@ var service_js_1 = require("./services/service.js");
|
|
|
51
51
|
Object.defineProperty(exports, "RetryStrategy", { enumerable: true, get: function () { return service_js_1.RetryStrategy; } });
|
|
52
52
|
__exportStar(require("./interfaces/index.js"), exports);
|
|
53
53
|
__exportStar(require("./interfaces/query-params/index.js"), exports);
|
|
54
|
+
__exportStar(require("./models/index.js"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { ApiLeaveRequest } from '../interfaces/index.js';
|
|
3
3
|
import { Service, Options, RequirementsOf } from './index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { LeaveRequestsQueryParams } from '../interfaces/query-params/leave-requests-query-params.interface.js';
|
|
5
5
|
import { LeaveRequest } from '../models/leave-request.model.js';
|
|
6
6
|
declare type RequiredProps = 'start_date' | 'end_date' | 'type' | 'user';
|
|
7
7
|
export declare class LeaveRequestService extends Service {
|
|
@@ -16,9 +16,9 @@ export declare class LeaveRequestService extends Service {
|
|
|
16
16
|
rawResponse: true;
|
|
17
17
|
}): Promise<AxiosResponse<ApiLeaveRequest, any>>;
|
|
18
18
|
get(id: number, options: Options): Promise<LeaveRequest>;
|
|
19
|
-
list(query?:
|
|
20
|
-
listAll(query?:
|
|
21
|
-
listByPage(query?:
|
|
19
|
+
list(query?: LeaveRequestsQueryParams, options?: Options): AsyncGenerator<LeaveRequest, void, unknown>;
|
|
20
|
+
listAll(query?: LeaveRequestsQueryParams, options?: Options): Promise<LeaveRequest[]>;
|
|
21
|
+
listByPage(query?: LeaveRequestsQueryParams, options?: Options): AsyncGenerator<AxiosResponse<ApiLeaveRequest[], any>, any, unknown>;
|
|
22
22
|
update(id: number, data: Partial<ApiLeaveRequest>): Promise<LeaveRequest>;
|
|
23
23
|
update(id: number, data: Partial<ApiLeaveRequest>, options: {
|
|
24
24
|
rawResponse: true;
|
package/dist/cjs/version.js
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './account.model.js';
|
|
2
|
+
export * from './attendance.model.js';
|
|
3
|
+
export * from './auth.model.js';
|
|
4
|
+
export * from './availability-pattern.model.js';
|
|
5
|
+
export * from './availability.model.js';
|
|
6
|
+
export * from './daily-budgets.model.js';
|
|
7
|
+
export * from './daily-revenue.model.js';
|
|
8
|
+
export * from './day-note.model.js';
|
|
9
|
+
export * from './days-off-pattern.model.js';
|
|
10
|
+
export * from './days-off.model.js';
|
|
11
|
+
export * from './document.model.js';
|
|
12
|
+
export * from './error-response.model.js';
|
|
13
|
+
export * from './group.model.js';
|
|
14
|
+
export * from './holiday-allowance-custom.model.js';
|
|
15
|
+
export * from './holiday-allowance.model.js';
|
|
16
|
+
export * from './leave-embargo.model.js';
|
|
17
|
+
export * from './leave-request.model.js';
|
|
18
|
+
export * from './leave-type.model.js';
|
|
19
|
+
export * from './leave.model.js';
|
|
20
|
+
export * from './location.model.js';
|
|
21
|
+
export * from './logbook-category.model.js';
|
|
22
|
+
export * from './logbook-event.model.js';
|
|
23
|
+
export * from './memo.model.js';
|
|
24
|
+
export * from './pay-period.model.js';
|
|
25
|
+
export * from './role.model.js';
|
|
26
|
+
export * from './settings.model.js';
|
|
27
|
+
export * from './shift.model.js';
|
|
28
|
+
export * from './terminal.model.js';
|
|
29
|
+
export * from './user.model.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './account.model.js';
|
|
2
|
+
export * from './attendance.model.js';
|
|
3
|
+
export * from './auth.model.js';
|
|
4
|
+
export * from './availability-pattern.model.js';
|
|
5
|
+
export * from './availability.model.js';
|
|
6
|
+
export * from './daily-budgets.model.js';
|
|
7
|
+
export * from './daily-revenue.model.js';
|
|
8
|
+
export * from './day-note.model.js';
|
|
9
|
+
export * from './days-off-pattern.model.js';
|
|
10
|
+
export * from './days-off.model.js';
|
|
11
|
+
export * from './document.model.js';
|
|
12
|
+
export * from './error-response.model.js';
|
|
13
|
+
export * from './group.model.js';
|
|
14
|
+
export * from './holiday-allowance-custom.model.js';
|
|
15
|
+
export * from './holiday-allowance.model.js';
|
|
16
|
+
export * from './leave-embargo.model.js';
|
|
17
|
+
export * from './leave-request.model.js';
|
|
18
|
+
export * from './leave-type.model.js';
|
|
19
|
+
export * from './leave.model.js';
|
|
20
|
+
export * from './location.model.js';
|
|
21
|
+
export * from './logbook-category.model.js';
|
|
22
|
+
export * from './logbook-event.model.js';
|
|
23
|
+
export * from './memo.model.js';
|
|
24
|
+
export * from './pay-period.model.js';
|
|
25
|
+
export * from './role.model.js';
|
|
26
|
+
export * from './settings.model.js';
|
|
27
|
+
export * from './shift.model.js';
|
|
28
|
+
export * from './terminal.model.js';
|
|
29
|
+
export * from './user.model.js';
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { ApiLocation } from '../interfaces/index.js';
|
|
2
|
-
export declare class LatLngObject {
|
|
3
|
-
lat: number;
|
|
4
|
-
lng: number;
|
|
5
|
-
radius: number;
|
|
6
|
-
}
|
|
1
|
+
import { ApiLocation, ApiLocationCoordinate } from '../interfaces/index.js';
|
|
7
2
|
export declare class Location {
|
|
8
3
|
id: number;
|
|
9
4
|
name: string;
|
|
10
5
|
deleted: boolean;
|
|
11
6
|
address: string;
|
|
12
|
-
location:
|
|
7
|
+
location: ApiLocationCoordinate;
|
|
13
8
|
timezone: number;
|
|
14
9
|
users: number[];
|
|
15
10
|
managers: number[];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
lat: number;
|
|
3
|
-
lng: number;
|
|
4
|
-
radius: number;
|
|
5
|
-
}
|
|
1
|
+
import { ApiLocationCoordinate } from '../interfaces/index.js';
|
|
6
2
|
export declare class Terminal {
|
|
7
3
|
id: number;
|
|
8
4
|
deleted: boolean;
|
|
@@ -12,7 +8,7 @@ export declare class Terminal {
|
|
|
12
8
|
device: string;
|
|
13
9
|
version: string;
|
|
14
10
|
ip: string;
|
|
15
|
-
location:
|
|
11
|
+
location: ApiLocationCoordinate;
|
|
16
12
|
timezone: number;
|
|
17
13
|
require_photo: boolean;
|
|
18
14
|
require_photo_breaks: boolean;
|
package/dist/mjs/rotacloud.d.ts
CHANGED
package/dist/mjs/rotacloud.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { ApiLeaveRequest } from '../interfaces/index.js';
|
|
3
3
|
import { Service, Options, RequirementsOf } from './index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { LeaveRequestsQueryParams } from '../interfaces/query-params/leave-requests-query-params.interface.js';
|
|
5
5
|
import { LeaveRequest } from '../models/leave-request.model.js';
|
|
6
6
|
declare type RequiredProps = 'start_date' | 'end_date' | 'type' | 'user';
|
|
7
7
|
export declare class LeaveRequestService extends Service {
|
|
@@ -16,9 +16,9 @@ export declare class LeaveRequestService extends Service {
|
|
|
16
16
|
rawResponse: true;
|
|
17
17
|
}): Promise<AxiosResponse<ApiLeaveRequest, any>>;
|
|
18
18
|
get(id: number, options: Options): Promise<LeaveRequest>;
|
|
19
|
-
list(query?:
|
|
20
|
-
listAll(query?:
|
|
21
|
-
listByPage(query?:
|
|
19
|
+
list(query?: LeaveRequestsQueryParams, options?: Options): AsyncGenerator<LeaveRequest, void, unknown>;
|
|
20
|
+
listAll(query?: LeaveRequestsQueryParams, options?: Options): Promise<LeaveRequest[]>;
|
|
21
|
+
listByPage(query?: LeaveRequestsQueryParams, options?: Options): AsyncGenerator<AxiosResponse<ApiLeaveRequest[], any>, any, unknown>;
|
|
22
22
|
update(id: number, data: Partial<ApiLeaveRequest>): Promise<LeaveRequest>;
|
|
23
23
|
update(id: number, data: Partial<ApiLeaveRequest>, options: {
|
|
24
24
|
rawResponse: true;
|
package/dist/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.40' };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rotacloud",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "The RotaCloud SDK for the RotaCloud API",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.17.0"
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@types/node": "^16.11.6",
|
|
49
49
|
"axios": "^0.23.0",
|
|
50
|
-
"axios-retry": "^3.3.1"
|
|
51
|
-
"cross-var": "^1.1.0"
|
|
50
|
+
"axios-retry": "^3.3.1"
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './account.model.js';
|
|
2
|
+
export * from './attendance.model.js';
|
|
3
|
+
export * from './auth.model.js';
|
|
4
|
+
export * from './availability-pattern.model.js';
|
|
5
|
+
export * from './availability.model.js';
|
|
6
|
+
export * from './daily-budgets.model.js';
|
|
7
|
+
export * from './daily-revenue.model.js';
|
|
8
|
+
export * from './day-note.model.js';
|
|
9
|
+
export * from './days-off-pattern.model.js';
|
|
10
|
+
export * from './days-off.model.js';
|
|
11
|
+
export * from './document.model.js';
|
|
12
|
+
export * from './error-response.model.js';
|
|
13
|
+
export * from './group.model.js';
|
|
14
|
+
export * from './holiday-allowance-custom.model.js';
|
|
15
|
+
export * from './holiday-allowance.model.js';
|
|
16
|
+
export * from './leave-embargo.model.js';
|
|
17
|
+
export * from './leave-request.model.js';
|
|
18
|
+
export * from './leave-type.model.js';
|
|
19
|
+
export * from './leave.model.js';
|
|
20
|
+
export * from './location.model.js';
|
|
21
|
+
export * from './logbook-category.model.js';
|
|
22
|
+
export * from './logbook-event.model.js';
|
|
23
|
+
export * from './memo.model.js';
|
|
24
|
+
export * from './pay-period.model.js';
|
|
25
|
+
export * from './role.model.js';
|
|
26
|
+
export * from './settings.model.js';
|
|
27
|
+
export * from './shift.model.js';
|
|
28
|
+
export * from './terminal.model.js';
|
|
29
|
+
export * from './user.model.js';
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { ApiLocation } from '../interfaces/index.js';
|
|
2
|
-
|
|
3
|
-
export class LatLngObject {
|
|
4
|
-
public lat: number;
|
|
5
|
-
public lng: number;
|
|
6
|
-
public radius: number;
|
|
7
|
-
}
|
|
1
|
+
import { ApiLocation, ApiLocationCoordinate } from '../interfaces/index.js';
|
|
8
2
|
|
|
9
3
|
export class Location {
|
|
10
4
|
public id: number;
|
|
11
5
|
public name: string;
|
|
12
6
|
public deleted: boolean;
|
|
13
7
|
public address: string;
|
|
14
|
-
public location:
|
|
8
|
+
public location: ApiLocationCoordinate;
|
|
15
9
|
public timezone: number;
|
|
16
10
|
public users: number[];
|
|
17
11
|
public managers: number[];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
public lat: number;
|
|
3
|
-
public lng: number;
|
|
4
|
-
public radius: number;
|
|
5
|
-
}
|
|
1
|
+
import { ApiLocationCoordinate } from '../interfaces/index.js';
|
|
6
2
|
|
|
7
3
|
export class Terminal {
|
|
8
4
|
public id: number;
|
|
@@ -13,7 +9,7 @@ export class Terminal {
|
|
|
13
9
|
public device: string;
|
|
14
10
|
public version: string;
|
|
15
11
|
public ip: string;
|
|
16
|
-
public location:
|
|
12
|
+
public location: ApiLocationCoordinate;
|
|
17
13
|
public timezone: number;
|
|
18
14
|
public require_photo: boolean;
|
|
19
15
|
public require_photo_breaks: boolean;
|
package/src/rotacloud.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ApiLeaveRequest } from '../interfaces/index.js';
|
|
|
3
3
|
import { Service, Options, RequirementsOf } from './index.js';
|
|
4
4
|
|
|
5
5
|
import { ErrorResponse } from '../models/error-response.model.js';
|
|
6
|
-
import {
|
|
6
|
+
import { LeaveRequestsQueryParams } from '../interfaces/query-params/leave-requests-query-params.interface.js';
|
|
7
7
|
|
|
8
8
|
import { LeaveRequest } from '../models/leave-request.model.js';
|
|
9
9
|
|
|
@@ -35,14 +35,14 @@ export class LeaveRequestService extends Service {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
async *list(query?:
|
|
38
|
+
async *list(query?: LeaveRequestsQueryParams, options?: Options) {
|
|
39
39
|
for await (const res of super.iterator<ApiLeaveRequest>({ url: this.apiPath, params: query }, options)) {
|
|
40
40
|
yield new LeaveRequest(res);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
listAll(query?:
|
|
45
|
-
async listAll(query:
|
|
44
|
+
listAll(query?: LeaveRequestsQueryParams, options?: Options): Promise<LeaveRequest[]>;
|
|
45
|
+
async listAll(query: LeaveRequestsQueryParams, options?: Options) {
|
|
46
46
|
const leave = [] as LeaveRequest[];
|
|
47
47
|
for await (const leaveRequestRecord of this.list(query, options)) {
|
|
48
48
|
leave.push(leaveRequestRecord);
|
|
@@ -50,7 +50,7 @@ export class LeaveRequestService extends Service {
|
|
|
50
50
|
return leave;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
listByPage(query?:
|
|
53
|
+
listByPage(query?: LeaveRequestsQueryParams, options?: Options) {
|
|
54
54
|
return super.iterator<ApiLeaveRequest>({ url: `${this.apiPath}`, params: query }, options).byPage();
|
|
55
55
|
}
|
|
56
56
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const Version = { version: '1.0.
|
|
1
|
+
export const Version = { version: '1.0.40' };
|