rotacloud 1.0.48 → 1.0.51

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.
Files changed (102) hide show
  1. package/dist/cjs/interfaces/index.d.ts +4 -0
  2. package/dist/cjs/interfaces/index.js +4 -0
  3. package/dist/cjs/interfaces/logbook-category.interface.d.ts +1 -0
  4. package/dist/cjs/interfaces/pin.interface.d.ts +3 -0
  5. package/dist/cjs/interfaces/pin.interface.js +2 -0
  6. package/dist/cjs/interfaces/terminal.interface.d.ts +20 -0
  7. package/dist/cjs/interfaces/terminal.interface.js +2 -0
  8. package/dist/cjs/interfaces/user.interface.d.ts +8 -1
  9. package/dist/cjs/interfaces/users-clocked-in.interface.d.ts +13 -0
  10. package/dist/cjs/interfaces/users-clocked-in.interface.js +2 -0
  11. package/dist/cjs/interfaces/users-clocked-out.interface.d.ts +26 -0
  12. package/dist/cjs/interfaces/users-clocked-out.interface.js +2 -0
  13. package/dist/cjs/models/attendance.model.d.ts +5 -5
  14. package/dist/cjs/models/availability-pattern.model.js +12 -0
  15. package/dist/cjs/models/daily-revenue.model.js +3 -0
  16. package/dist/cjs/models/index.d.ts +2 -0
  17. package/dist/cjs/models/index.js +2 -0
  18. package/dist/cjs/models/logbook-category.model.d.ts +1 -1
  19. package/dist/cjs/models/logbook-category.model.js +2 -0
  20. package/dist/cjs/models/terminal.model.d.ts +7 -6
  21. package/dist/cjs/models/terminal.model.js +14 -0
  22. package/dist/cjs/models/users-clocked-in.model.d.ts +14 -0
  23. package/dist/cjs/models/users-clocked-in.model.js +19 -0
  24. package/dist/cjs/models/users-clocked-out.model.d.ts +27 -0
  25. package/dist/cjs/models/users-clocked-out.model.js +31 -0
  26. package/dist/cjs/rotacloud.d.ts +7 -4
  27. package/dist/cjs/rotacloud.js +7 -4
  28. package/dist/cjs/services/index.d.ts +6 -1
  29. package/dist/cjs/services/index.js +6 -1
  30. package/dist/cjs/services/pins.service.d.ts +11 -0
  31. package/dist/cjs/services/pins.service.js +16 -0
  32. package/dist/cjs/services/terminals-active.service.d.ts +35 -0
  33. package/dist/cjs/services/terminals-active.service.js +103 -0
  34. package/dist/cjs/services/terminals.service.d.ts +32 -0
  35. package/dist/cjs/services/terminals.service.js +108 -0
  36. package/dist/cjs/services/users-clock-in.service.d.ts +62 -0
  37. package/dist/cjs/services/users-clock-in.service.js +118 -0
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/mjs/interfaces/index.d.ts +4 -0
  40. package/dist/mjs/interfaces/index.js +4 -0
  41. package/dist/mjs/interfaces/logbook-category.interface.d.ts +1 -0
  42. package/dist/mjs/interfaces/pin.interface.d.ts +3 -0
  43. package/dist/mjs/interfaces/pin.interface.js +1 -0
  44. package/dist/mjs/interfaces/terminal.interface.d.ts +20 -0
  45. package/dist/mjs/interfaces/terminal.interface.js +1 -0
  46. package/dist/mjs/interfaces/user.interface.d.ts +8 -1
  47. package/dist/mjs/interfaces/users-clocked-in.interface.d.ts +13 -0
  48. package/dist/mjs/interfaces/users-clocked-in.interface.js +1 -0
  49. package/dist/mjs/interfaces/users-clocked-out.interface.d.ts +26 -0
  50. package/dist/mjs/interfaces/users-clocked-out.interface.js +1 -0
  51. package/dist/mjs/models/attendance.model.d.ts +5 -5
  52. package/dist/mjs/models/availability-pattern.model.js +12 -0
  53. package/dist/mjs/models/daily-revenue.model.js +3 -0
  54. package/dist/mjs/models/index.d.ts +2 -0
  55. package/dist/mjs/models/index.js +2 -0
  56. package/dist/mjs/models/logbook-category.model.d.ts +1 -1
  57. package/dist/mjs/models/logbook-category.model.js +1 -0
  58. package/dist/mjs/models/terminal.model.d.ts +7 -6
  59. package/dist/mjs/models/terminal.model.js +14 -0
  60. package/dist/mjs/models/users-clocked-in.model.d.ts +14 -0
  61. package/dist/mjs/models/users-clocked-in.model.js +14 -0
  62. package/dist/mjs/models/users-clocked-out.model.d.ts +27 -0
  63. package/dist/mjs/models/users-clocked-out.model.js +26 -0
  64. package/dist/mjs/rotacloud.d.ts +7 -4
  65. package/dist/mjs/rotacloud.js +7 -4
  66. package/dist/mjs/services/index.d.ts +6 -1
  67. package/dist/mjs/services/index.js +6 -1
  68. package/dist/mjs/services/pins.service.d.ts +11 -0
  69. package/dist/mjs/services/pins.service.js +12 -0
  70. package/dist/mjs/services/terminals-active.service.d.ts +35 -0
  71. package/dist/mjs/services/terminals-active.service.js +43 -0
  72. package/dist/mjs/services/terminals.service.d.ts +32 -0
  73. package/dist/mjs/services/terminals.service.js +48 -0
  74. package/dist/mjs/services/users-clock-in.service.d.ts +62 -0
  75. package/dist/mjs/services/users-clock-in.service.js +57 -0
  76. package/dist/mjs/version.js +1 -1
  77. package/package.json +2 -2
  78. package/src/interfaces/index.ts +4 -0
  79. package/src/interfaces/logbook-category.interface.ts +1 -0
  80. package/src/interfaces/pin.interface.ts +16 -0
  81. package/src/interfaces/terminal.interface.ts +21 -0
  82. package/src/interfaces/user.interface.ts +9 -1
  83. package/src/interfaces/users-clocked-in.interface.ts +14 -0
  84. package/src/interfaces/users-clocked-out.interface.ts +27 -0
  85. package/src/models/attendance.model.ts +5 -5
  86. package/src/models/availability-pattern.model.ts +12 -0
  87. package/src/models/daily-revenue.model.ts +3 -0
  88. package/src/models/days-off.model.ts +1 -0
  89. package/src/models/index.ts +2 -0
  90. package/src/models/logbook-category.model.ts +2 -1
  91. package/src/models/terminal.model.ts +21 -6
  92. package/src/models/toil-accrual.model.ts +1 -0
  93. package/src/models/toil-allowance.model.ts +1 -0
  94. package/src/models/users-clocked-in.model.ts +27 -0
  95. package/src/models/users-clocked-out.model.ts +52 -0
  96. package/src/rotacloud.ts +11 -3
  97. package/src/services/index.ts +6 -1
  98. package/src/services/pins.service.ts +16 -0
  99. package/src/services/terminals-active.service.ts +75 -0
  100. package/src/services/terminals.service.ts +78 -0
  101. package/src/services/users-clock-in.service.ts +125 -0
  102. package/src/version.ts +1 -1
@@ -23,11 +23,15 @@ export * from './location.interface.js';
23
23
  export * from './logbook-category.interface.js';
24
24
  export * from './logbook-event.interface.js';
25
25
  export * from './pay-period.interface.js';
26
+ export * from './pin.interface.js';
26
27
  export * from './role-rate.interface.js';
27
28
  export * from './role.interface.js';
28
29
  export * from './sdk-config.interface.js';
29
30
  export * from './settings.interface.js';
30
31
  export * from './shift.interface.js';
32
+ export * from './terminal.interface.js';
31
33
  export * from './toil-accrual.interface.js';
32
34
  export * from './toil-allowance.interface.js';
33
35
  export * from './user.interface.js';
36
+ export * from './users-clocked-in.interface.js';
37
+ export * from './users-clocked-out.interface.js';
@@ -35,11 +35,15 @@ __exportStar(require("./location.interface.js"), exports);
35
35
  __exportStar(require("./logbook-category.interface.js"), exports);
36
36
  __exportStar(require("./logbook-event.interface.js"), exports);
37
37
  __exportStar(require("./pay-period.interface.js"), exports);
38
+ __exportStar(require("./pin.interface.js"), exports);
38
39
  __exportStar(require("./role-rate.interface.js"), exports);
39
40
  __exportStar(require("./role.interface.js"), exports);
40
41
  __exportStar(require("./sdk-config.interface.js"), exports);
41
42
  __exportStar(require("./settings.interface.js"), exports);
42
43
  __exportStar(require("./shift.interface.js"), exports);
44
+ __exportStar(require("./terminal.interface.js"), exports);
43
45
  __exportStar(require("./toil-accrual.interface.js"), exports);
44
46
  __exportStar(require("./toil-allowance.interface.js"), exports);
45
47
  __exportStar(require("./user.interface.js"), exports);
48
+ __exportStar(require("./users-clocked-in.interface.js"), exports);
49
+ __exportStar(require("./users-clocked-out.interface.js"), exports);
@@ -1,4 +1,5 @@
1
1
  export interface ApiLogbookCategory {
2
2
  id: number;
3
3
  name: string;
4
+ deleted?: boolean | null;
4
5
  }
@@ -0,0 +1,3 @@
1
+ import { ApiUser } from './index.js';
2
+ export interface ApiPin extends Omit<ApiUser, 'created_at' | 'created_by' | 'deleted_at' | 'deleted_by' | 'middle_name' | 'preferred_name' | 'two_factor_enabled' | 'has_account' | 'invite_sent' | 'pin'> {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ export interface ApiTerminal {
2
+ id: number;
3
+ deleted: boolean;
4
+ name: string;
5
+ active: boolean;
6
+ platform: string | null;
7
+ device: string | null;
8
+ version: string | null;
9
+ ip: string | null;
10
+ location: any | null;
11
+ timezone: number;
12
+ require_photo: boolean;
13
+ require_photo_breaks: boolean;
14
+ debug: boolean;
15
+ }
16
+ export interface ApiTerminalLocation {
17
+ lat: number;
18
+ lng: number;
19
+ accuracy: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { ApiLeaveRate, ApiRoleRate } from './index.js';
1
+ import { ApiLeaveRate, ApiRoleRate, ApiTerminalLocation } from './index.js';
2
2
  export interface ApiUser {
3
3
  id: number;
4
4
  created_at: number;
@@ -35,4 +35,11 @@ export interface ApiUser {
35
35
  leave_rates_unit: string;
36
36
  leave_rates_type: string;
37
37
  notes: string | null;
38
+ pin: string | null;
39
+ }
40
+ export interface ApiUserBreak {
41
+ start_time: number;
42
+ start_location: ApiTerminalLocation;
43
+ end_time?: number;
44
+ end_location?: ApiTerminalLocation;
38
45
  }
@@ -0,0 +1,13 @@
1
+ import { ApiShift, ApiTerminalLocation } from '../interfaces/index.js';
2
+ export interface ApiUserClockedIn {
3
+ user: number;
4
+ location: number;
5
+ role: number;
6
+ in_time: number;
7
+ minutes_late: number;
8
+ shift: Pick<ApiShift, 'id' | 'start_time' | 'end_time' | 'minutes_break' | 'location' | 'role'>;
9
+ in_method: string;
10
+ in_location: ApiTerminalLocation;
11
+ in_device: string | null;
12
+ in_terminal: number | null;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { ApiShift, ApiTerminalLocation } from './index.js';
2
+ export interface ApiUserClockedOut {
3
+ id: number;
4
+ deleted: boolean;
5
+ approved: boolean;
6
+ user: number;
7
+ location: number;
8
+ role: number;
9
+ in_time: number;
10
+ out_time: number;
11
+ minutes_break: number;
12
+ minutes_late: number;
13
+ hours: number;
14
+ hours_auto: number;
15
+ hours_is_auto: boolean;
16
+ notes: string | null;
17
+ shift: Pick<ApiShift, 'id' | 'start_time' | 'end_time' | 'minutes_break' | 'location' | 'role'>;
18
+ in_method: string;
19
+ in_location: ApiTerminalLocation;
20
+ in_device: string | null;
21
+ in_terminal: number | null;
22
+ out_method: string;
23
+ out_location: ApiTerminalLocation;
24
+ out_device: string | null;
25
+ out_terminal: number | null;
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { ApiAttendance, ApiAttendanceLocation, ApiShift } from '../interfaces/index.js';
1
+ import { ApiAttendance, ApiTerminalLocation, ApiShift } from '../interfaces/index.js';
2
2
  export declare class Attendance {
3
3
  id: number;
4
4
  deleted: boolean;
@@ -17,11 +17,11 @@ export declare class Attendance {
17
17
  shift: ApiShift | null;
18
18
  in_method: string;
19
19
  out_method: string;
20
- in_location: ApiAttendanceLocation;
21
- out_location: ApiAttendanceLocation;
20
+ in_location: ApiTerminalLocation;
21
+ out_location: ApiTerminalLocation;
22
22
  in_device: number;
23
23
  out_device: number;
24
- in_terminal: null;
25
- out_terminal: null;
24
+ in_terminal: number | null;
25
+ out_terminal: number | null;
26
26
  constructor(attendance: ApiAttendance);
27
27
  }
@@ -4,6 +4,18 @@ exports.AvailabilityPattern = void 0;
4
4
  class AvailabilityPattern {
5
5
  constructor(apiAvailabilityPatterns) {
6
6
  this.id = apiAvailabilityPatterns.id;
7
+ this.user = apiAvailabilityPatterns.user;
8
+ this.name = apiAvailabilityPatterns.name;
9
+ this.start_date = apiAvailabilityPatterns.start_date;
10
+ this.end_date = apiAvailabilityPatterns.end_date;
11
+ this.repeat_weeks = apiAvailabilityPatterns.repeat_weeks;
12
+ this.mon = apiAvailabilityPatterns.mon;
13
+ this.tue = apiAvailabilityPatterns.tue;
14
+ this.wed = apiAvailabilityPatterns.wed;
15
+ this.thu = apiAvailabilityPatterns.thu;
16
+ this.fri = apiAvailabilityPatterns.fri;
17
+ this.sat = apiAvailabilityPatterns.sat;
18
+ this.sun = apiAvailabilityPatterns.sun;
7
19
  }
8
20
  }
9
21
  exports.AvailabilityPattern = AvailabilityPattern;
@@ -5,6 +5,9 @@ class DailyRevenue {
5
5
  constructor(dailyRevenue) {
6
6
  this.date = dailyRevenue.date;
7
7
  this.location = dailyRevenue.location;
8
+ this.labour_percentage = dailyRevenue.labour_percentage;
9
+ this.revenue_target = dailyRevenue.revenue_target;
10
+ this.revenue_actual = dailyRevenue.revenue_actual;
8
11
  }
9
12
  }
10
13
  exports.DailyRevenue = DailyRevenue;
@@ -29,3 +29,5 @@ export * from './terminal.model.js';
29
29
  export * from './toil-accrual.model.js';
30
30
  export * from './toil-allowance.model.js';
31
31
  export * from './user.model.js';
32
+ export * from './users-clocked-in.model.js';
33
+ export * from './users-clocked-out.model.js';
@@ -41,3 +41,5 @@ __exportStar(require("./terminal.model.js"), exports);
41
41
  __exportStar(require("./toil-accrual.model.js"), exports);
42
42
  __exportStar(require("./toil-allowance.model.js"), exports);
43
43
  __exportStar(require("./user.model.js"), exports);
44
+ __exportStar(require("./users-clocked-in.model.js"), exports);
45
+ __exportStar(require("./users-clocked-out.model.js"), exports);
@@ -2,6 +2,6 @@ import { ApiLogbookCategory } from '../interfaces/index.js';
2
2
  export declare class LogbookCategory {
3
3
  id: number;
4
4
  name: string;
5
- deleted: boolean;
5
+ deleted: boolean | null;
6
6
  constructor(logbookCategory: ApiLogbookCategory);
7
7
  }
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LogbookCategory = void 0;
4
4
  class LogbookCategory {
5
5
  constructor(logbookCategory) {
6
+ var _a;
6
7
  this.id = logbookCategory.id;
7
8
  this.name = logbookCategory.name;
9
+ this.deleted = (_a = logbookCategory.deleted) !== null && _a !== void 0 ? _a : null;
8
10
  }
9
11
  }
10
12
  exports.LogbookCategory = LogbookCategory;
@@ -1,15 +1,16 @@
1
- import { ApiLocationCoordinate } from '../interfaces/index.js';
1
+ import { ApiLocationCoordinate, ApiTerminal } from '../interfaces/index.js';
2
2
  export declare class Terminal {
3
3
  id: number;
4
4
  deleted: boolean;
5
5
  name: string;
6
6
  active: boolean;
7
- type: string;
8
- device: string;
9
- version: string;
10
- ip: string;
11
- location: ApiLocationCoordinate;
7
+ platform: string | null;
8
+ device: string | null;
9
+ version: string | null;
10
+ ip: string | null;
11
+ location: ApiLocationCoordinate | null;
12
12
  timezone: number;
13
13
  require_photo: boolean;
14
14
  require_photo_breaks: boolean;
15
+ constructor(terminal: ApiTerminal);
15
16
  }
@@ -2,5 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Terminal = void 0;
4
4
  class Terminal {
5
+ constructor(terminal) {
6
+ this.id = terminal.id;
7
+ this.deleted = terminal.deleted;
8
+ this.name = terminal.name;
9
+ this.active = terminal.active;
10
+ this.platform = terminal.platform;
11
+ this.device = terminal.device;
12
+ this.version = terminal.version;
13
+ this.ip = terminal.ip;
14
+ this.location = terminal.location;
15
+ this.timezone = terminal.timezone;
16
+ this.require_photo = terminal.require_photo;
17
+ this.require_photo_breaks = terminal.require_photo_breaks;
18
+ }
5
19
  }
6
20
  exports.Terminal = Terminal;
@@ -0,0 +1,14 @@
1
+ import { ApiUserClockedIn, ApiShift, ApiTerminalLocation } from '../interfaces/index.js';
2
+ export declare class UserClockedIn {
3
+ user: number;
4
+ location: unknown;
5
+ role: number;
6
+ in_time: number;
7
+ minutes_late: number;
8
+ shift: Pick<ApiShift, 'id' | 'start_time' | 'end_time' | 'minutes_break' | 'location' | 'role'>;
9
+ in_method: string;
10
+ in_location: ApiTerminalLocation;
11
+ in_device: string | null;
12
+ in_terminal: number | null;
13
+ constructor(apiUserClockedIn: ApiUserClockedIn);
14
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserClockedIn = void 0;
4
+ class UserClockedIn {
5
+ constructor(apiUserClockedIn) {
6
+ var _a, _b;
7
+ this.user = apiUserClockedIn.user;
8
+ this.location = apiUserClockedIn.location;
9
+ this.role = apiUserClockedIn.role;
10
+ this.in_time = apiUserClockedIn.in_time;
11
+ this.minutes_late = apiUserClockedIn.minutes_late;
12
+ this.shift = apiUserClockedIn.shift;
13
+ this.in_method = apiUserClockedIn.in_method;
14
+ this.in_location = apiUserClockedIn.in_location;
15
+ this.in_device = (_a = apiUserClockedIn.in_device) !== null && _a !== void 0 ? _a : null;
16
+ this.in_terminal = (_b = apiUserClockedIn.in_terminal) !== null && _b !== void 0 ? _b : null;
17
+ }
18
+ }
19
+ exports.UserClockedIn = UserClockedIn;
@@ -0,0 +1,27 @@
1
+ import { ApiShift, ApiTerminalLocation, ApiUserClockedOut } from '../interfaces/index.js';
2
+ export declare class UserClockedOut {
3
+ id: number;
4
+ deleted: boolean;
5
+ approved: boolean;
6
+ user: number;
7
+ location: unknown;
8
+ role: number;
9
+ in_time: number;
10
+ out_time: number;
11
+ minutes_break: number;
12
+ minutes_late: number;
13
+ hours: number;
14
+ hours_auto: number;
15
+ hours_is_auto: number;
16
+ notes: string | null;
17
+ shift: Pick<ApiShift, 'id' | 'start_time' | 'end_time' | 'minutes_break' | 'location' | 'role'>;
18
+ in_method: string;
19
+ in_location: ApiTerminalLocation;
20
+ in_device: string | null;
21
+ in_terminal: number | null;
22
+ out_method: string;
23
+ out_location: ApiTerminalLocation;
24
+ out_device: string | null;
25
+ out_terminal: number | null;
26
+ constructor(apiUserClockedOut: ApiUserClockedOut);
27
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserClockedOut = void 0;
4
+ class UserClockedOut {
5
+ constructor(apiUserClockedOut) {
6
+ var _a, _b, _c, _d, _e;
7
+ this.id = apiUserClockedOut.id;
8
+ this.deleted = apiUserClockedOut.deleted;
9
+ this.approved = apiUserClockedOut.approved;
10
+ this.user = apiUserClockedOut.user;
11
+ this.location = apiUserClockedOut.location;
12
+ this.role = apiUserClockedOut.role;
13
+ this.in_time = apiUserClockedOut.in_time;
14
+ this.out_time = apiUserClockedOut.out_time;
15
+ this.minutes_break = apiUserClockedOut.minutes_break;
16
+ this.minutes_late = apiUserClockedOut.minutes_late;
17
+ this.hours = apiUserClockedOut.hours;
18
+ this.hours_auto = apiUserClockedOut.hours_auto;
19
+ this.notes = (_a = apiUserClockedOut.notes) !== null && _a !== void 0 ? _a : null;
20
+ this.shift = apiUserClockedOut.shift;
21
+ this.in_method = apiUserClockedOut.in_method;
22
+ this.in_location = apiUserClockedOut.in_location;
23
+ this.in_device = (_b = apiUserClockedOut.in_device) !== null && _b !== void 0 ? _b : null;
24
+ this.in_terminal = (_c = apiUserClockedOut.in_terminal) !== null && _c !== void 0 ? _c : null;
25
+ this.out_method = apiUserClockedOut.out_method;
26
+ this.out_location = apiUserClockedOut.out_location;
27
+ this.out_device = (_d = apiUserClockedOut.out_device) !== null && _d !== void 0 ? _d : null;
28
+ this.out_terminal = (_e = apiUserClockedOut.out_terminal) !== null && _e !== void 0 ? _e : null;
29
+ }
30
+ }
31
+ exports.UserClockedOut = UserClockedOut;
@@ -1,7 +1,6 @@
1
- import { AccountsService, AttendanceService, AuthService, AvailabilityService, DailyBudgetsService, DailyRevenueService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveService, LocationsService, RolesService, SettingsService, ShiftsService, ToilAccrualsService, ToilAllowanceService, UsersService } from './services/index.js';
1
+ import { AccountsService, AttendanceService, AuthService, AvailabilityService, DailyBudgetsService, DailyRevenueService, DayNotesService, DaysOffService, GroupsService, LeaveEmbargoesService, LeaveRequestService, LeaveTypesService, LeaveService, LocationsService, RolesService, SettingsService, ShiftsService, TerminalsService, TerminalsActiveService, ToilAccrualsService, ToilAllowanceService, UsersService, UsersClockInService } from './services/index.js';
2
2
  import { SDKConfig } from './interfaces/index.js';
3
- import { DayNotesService } from './services/day-notes.service.js';
4
- import { LeaveTypesService } from './services/leave-types.service.js';
3
+ import { PinsService } from './services/pins.service.js';
5
4
  export declare class RotaCloud {
6
5
  static config: SDKConfig;
7
6
  defaultAPIURI: string | undefined;
@@ -16,14 +15,18 @@ export declare class RotaCloud {
16
15
  group: GroupsService;
17
16
  leaveEmbargoes: LeaveEmbargoesService;
18
17
  leaveRequests: LeaveRequestService;
19
- leave: LeaveService;
20
18
  leaveTypes: LeaveTypesService;
19
+ leave: LeaveService;
21
20
  locations: LocationsService;
21
+ pins: PinsService;
22
22
  roles: RolesService;
23
23
  settings: SettingsService;
24
24
  shifts: ShiftsService;
25
+ terminals: TerminalsService;
26
+ terminalsActive: TerminalsActiveService;
25
27
  toilAccruals: ToilAccrualsService;
26
28
  toilAllowance: ToilAllowanceService;
29
+ usersClockInService: UsersClockInService;
27
30
  users: UsersService;
28
31
  constructor(config: SDKConfig);
29
32
  get config(): SDKConfig;
@@ -12,8 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.RetryStrategy = exports.RotaCloud = void 0;
14
14
  const index_js_1 = require("./services/index.js");
15
- const day_notes_service_js_1 = require("./services/day-notes.service.js");
16
- const leave_types_service_js_1 = require("./services/leave-types.service.js");
15
+ const pins_service_js_1 = require("./services/pins.service.js");
17
16
  const DEFAULT_CONFIG = {
18
17
  baseUri: 'https://api.rotacloud.com/v1',
19
18
  retry: index_js_1.RetryStrategy.Exponential,
@@ -27,19 +26,23 @@ class RotaCloud {
27
26
  this.availability = new index_js_1.AvailabilityService();
28
27
  this.dailyBudgets = new index_js_1.DailyBudgetsService();
29
28
  this.dailyRevenue = new index_js_1.DailyRevenueService();
30
- this.dayNotes = new day_notes_service_js_1.DayNotesService();
29
+ this.dayNotes = new index_js_1.DayNotesService();
31
30
  this.daysOff = new index_js_1.DaysOffService();
32
31
  this.group = new index_js_1.GroupsService();
33
32
  this.leaveEmbargoes = new index_js_1.LeaveEmbargoesService();
34
33
  this.leaveRequests = new index_js_1.LeaveRequestService();
34
+ this.leaveTypes = new index_js_1.LeaveTypesService();
35
35
  this.leave = new index_js_1.LeaveService();
36
- this.leaveTypes = new leave_types_service_js_1.LeaveTypesService();
37
36
  this.locations = new index_js_1.LocationsService();
37
+ this.pins = new pins_service_js_1.PinsService();
38
38
  this.roles = new index_js_1.RolesService();
39
39
  this.settings = new index_js_1.SettingsService();
40
40
  this.shifts = new index_js_1.ShiftsService();
41
+ this.terminals = new index_js_1.TerminalsService();
42
+ this.terminalsActive = new index_js_1.TerminalsActiveService();
41
43
  this.toilAccruals = new index_js_1.ToilAccrualsService();
42
44
  this.toilAllowance = new index_js_1.ToilAllowanceService();
45
+ this.usersClockInService = new index_js_1.UsersClockInService();
43
46
  this.users = new index_js_1.UsersService();
44
47
  this.config = Object.assign(Object.assign({}, DEFAULT_CONFIG), config);
45
48
  }
@@ -5,15 +5,20 @@ export * from './auth.service.js';
5
5
  export * from './availability.service.js';
6
6
  export * from './daily-budgets.service.js';
7
7
  export * from './daily-revenue.service.js';
8
+ export * from './day-notes.service.js';
8
9
  export * from './days-off.service.js';
9
10
  export * from './groups.service.js';
10
- export * from './leave-request.service.js';
11
11
  export * from './leave-embargoes.service.js';
12
+ export * from './leave-request.service.js';
13
+ export * from './leave-types.service.js';
12
14
  export * from './leave.service.js';
13
15
  export * from './locations.service.js';
14
16
  export * from './roles.service.js';
15
17
  export * from './settings.service.js';
16
18
  export * from './shifts.service.js';
19
+ export * from './terminals.service.js';
20
+ export * from './terminals-active.service.js';
17
21
  export * from './toil-accruals.service.js';
18
22
  export * from './toil-allowance.service.js';
23
+ export * from './users-clock-in.service.js';
19
24
  export * from './users.service.js';
@@ -17,15 +17,20 @@ __exportStar(require("./auth.service.js"), exports);
17
17
  __exportStar(require("./availability.service.js"), exports);
18
18
  __exportStar(require("./daily-budgets.service.js"), exports);
19
19
  __exportStar(require("./daily-revenue.service.js"), exports);
20
+ __exportStar(require("./day-notes.service.js"), exports);
20
21
  __exportStar(require("./days-off.service.js"), exports);
21
22
  __exportStar(require("./groups.service.js"), exports);
22
- __exportStar(require("./leave-request.service.js"), exports);
23
23
  __exportStar(require("./leave-embargoes.service.js"), exports);
24
+ __exportStar(require("./leave-request.service.js"), exports);
25
+ __exportStar(require("./leave-types.service.js"), exports);
24
26
  __exportStar(require("./leave.service.js"), exports);
25
27
  __exportStar(require("./locations.service.js"), exports);
26
28
  __exportStar(require("./roles.service.js"), exports);
27
29
  __exportStar(require("./settings.service.js"), exports);
28
30
  __exportStar(require("./shifts.service.js"), exports);
31
+ __exportStar(require("./terminals.service.js"), exports);
32
+ __exportStar(require("./terminals-active.service.js"), exports);
29
33
  __exportStar(require("./toil-accruals.service.js"), exports);
30
34
  __exportStar(require("./toil-allowance.service.js"), exports);
35
+ __exportStar(require("./users-clock-in.service.js"), exports);
31
36
  __exportStar(require("./users.service.js"), exports);
@@ -0,0 +1,11 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { ApiPin } from '../interfaces/index.js';
3
+ import { Service, Options } from './index.js';
4
+ export declare class PinsService extends Service {
5
+ private apiPath;
6
+ get(id: string): Promise<ApiPin>;
7
+ get(id: string, options?: {
8
+ rawResponse: true;
9
+ } & Options): Promise<AxiosResponse<ApiPin, any>>;
10
+ get(id: string, options?: Options): Promise<ApiPin>;
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PinsService = void 0;
4
+ const index_js_1 = require("./index.js");
5
+ class PinsService extends index_js_1.Service {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.apiPath = '/pins';
9
+ }
10
+ get(id, options) {
11
+ return super
12
+ .fetch({ url: `${this.apiPath}/${id}` }, options)
13
+ .then((res) => Promise.resolve((options === null || options === void 0 ? void 0 : options.rawResponse) ? res : res.data));
14
+ }
15
+ }
16
+ exports.PinsService = PinsService;
@@ -0,0 +1,35 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { ApiTerminal, ApiTerminalLocation } from '../interfaces/index.js';
3
+ import { Service, Options } from './index.js';
4
+ import { Terminal } from '../models/terminal.model.js';
5
+ interface LaunchTerminal {
6
+ terminal: number;
7
+ device: string;
8
+ location?: ApiTerminalLocation;
9
+ }
10
+ interface PingTerminal {
11
+ action: string;
12
+ device: string;
13
+ }
14
+ declare class TerminalsActiveService extends Service {
15
+ private apiPath;
16
+ launchTerminal(data: LaunchTerminal): Promise<Terminal>;
17
+ launchTerminal(data: LaunchTerminal, options: {
18
+ rawResponse: true;
19
+ } & Options): Promise<AxiosResponse<any, any>>;
20
+ launchTerminal(data: LaunchTerminal, options: Options): Promise<Terminal>;
21
+ pingTerminal(id: number, data: PingTerminal): Promise<number>;
22
+ pingTerminal(id: number, data: PingTerminal, options: {
23
+ rawResponse: true;
24
+ } & Options): Promise<AxiosResponse<any, any>>;
25
+ pingTerminal(id: number, data: PingTerminal, options: Options): Promise<number>;
26
+ list(options?: Options): AsyncGenerator<Terminal, void, unknown>;
27
+ listAll(options?: Options): Promise<Terminal[]>;
28
+ listByPage(options?: Options): AsyncGenerator<AxiosResponse<ApiTerminal[], any>, any, unknown>;
29
+ closeTerminal(id: number): Promise<number>;
30
+ closeTerminal(id: number, options: {
31
+ rawResponse: true;
32
+ } & Options): Promise<AxiosResponse<any, any>>;
33
+ closeTerminal(id: number, options: Options): Promise<number>;
34
+ }
35
+ export { TerminalsActiveService };