rotacloud 2.1.2 → 2.1.4
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/endpoint.d.ts +2 -1
- package/dist/interfaces/day-note.interface.d.ts +18 -0
- package/dist/interfaces/document.interface.d.ts +1 -1
- package/dist/main.d.ts +7 -0
- package/dist/service.d.ts +7 -0
- package/dist/service.js +7 -0
- package/package.json +1 -1
- package/src/endpoint.ts +7 -0
- package/src/interfaces/day-note.interface.ts +19 -0
- package/src/interfaces/document.interface.ts +1 -1
- package/src/service.ts +7 -0
package/dist/endpoint.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, Attendance, Auth, Availability, DailyBudgets, DailyRevenue, DayNote, DaysOff, Group, Leave, Role, Shift, TimeZone, Document, LeaveEmbargo, LeaveRequest, LeaveType, Location, Pin, Terminal, ToilAccrual, ToilAllowance, UserClockedIn, User, Settings, LogbookCategory } from './interfaces/index.js';
|
|
1
|
+
import { Account, Attendance, Auth, Availability, DailyBudgets, DailyRevenue, DayNote, DaysOff, Group, Leave, Role, Shift, TimeZone, Document, LeaveEmbargo, LeaveRequest, LeaveType, Location, Pin, Terminal, ToilAccrual, ToilAllowance, UserClockedIn, User, Settings, LogbookCategory, DayNoteV2, DayNoteV2QueryParameters } from './interfaces/index.js';
|
|
2
2
|
import { LogbookEntry, LogbookQueryParameters } from './interfaces/logbook.interface.js';
|
|
3
3
|
import { AttendanceQueryParams, AvailabilityQueryParams, DailyBudgetsQueryParams, DailyRevenueQueryParams, DayNotesQueryParams, DaysOffQueryParams, DocumentsQueryParams, GroupsQueryParams, LeaveEmbargoesQueryParams, LeaveQueryParams, LeaveRequestsQueryParams, LocationsQueryParams, RolesQueryParams, SettingsQueryParams, ShiftsQueryParams, TerminalsQueryParams, ToilAccrualsQueryParams, ToilAllowanceQueryParams, UsersQueryParams } from './interfaces/query-params/index.js';
|
|
4
4
|
import { RequirementsOf } from './utils.js';
|
|
@@ -50,6 +50,7 @@ export interface EndpointEntityMap extends Record<EndpointVersion, Record<string
|
|
|
50
50
|
/** Type mappings for v2 endpoints */
|
|
51
51
|
v2: {
|
|
52
52
|
logbook: Endpoint<LogbookEntry, LogbookQueryParameters, 'name' | 'description' | 'date' | 'userId'>;
|
|
53
|
+
dayNotes: Endpoint<DayNoteV2, DayNoteV2QueryParameters, 'title' | 'message' | 'startDate' | 'endDate' | 'locations' | 'visibleToEmployees'>;
|
|
53
54
|
'logbook/categories': Endpoint<LogbookCategory, undefined, Pick<LogbookCategory, 'name'>>;
|
|
54
55
|
};
|
|
55
56
|
}
|
|
@@ -7,3 +7,21 @@ export interface DayNote {
|
|
|
7
7
|
message: string;
|
|
8
8
|
visible_employees: boolean;
|
|
9
9
|
}
|
|
10
|
+
export interface DayNoteV2 {
|
|
11
|
+
addedAt: string;
|
|
12
|
+
addedBy: number;
|
|
13
|
+
endDate: string;
|
|
14
|
+
id: number;
|
|
15
|
+
locations: number[];
|
|
16
|
+
message: string;
|
|
17
|
+
startDate: string;
|
|
18
|
+
title: string;
|
|
19
|
+
updatedAt: string | null;
|
|
20
|
+
updatedBy: number | null;
|
|
21
|
+
visibleToEmployees: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface DayNoteV2QueryParameters {
|
|
24
|
+
location: number;
|
|
25
|
+
start: string;
|
|
26
|
+
end: string;
|
|
27
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -52,6 +52,13 @@ export declare const createRotaCloudClient: (config: import("./interfaces/sdk-co
|
|
|
52
52
|
endpoint: "day_notes";
|
|
53
53
|
endpointVersion: "v1";
|
|
54
54
|
operations: ("get" | "delete" | "list" | "listAll" | "create" | "update")[];
|
|
55
|
+
subService: {
|
|
56
|
+
v2: {
|
|
57
|
+
endpoint: "dayNotes";
|
|
58
|
+
endpointVersion: "v2";
|
|
59
|
+
operations: ("get" | "delete" | "list" | "listAll" | "create" | "update")[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
55
62
|
};
|
|
56
63
|
dayOff: {
|
|
57
64
|
endpoint: "days_off";
|
package/dist/service.d.ts
CHANGED
|
@@ -93,6 +93,13 @@ export declare const SERVICES: {
|
|
|
93
93
|
endpoint: "day_notes";
|
|
94
94
|
endpointVersion: "v1";
|
|
95
95
|
operations: ("get" | "delete" | "list" | "listAll" | "create" | "update")[];
|
|
96
|
+
subService: {
|
|
97
|
+
v2: {
|
|
98
|
+
endpoint: "dayNotes";
|
|
99
|
+
endpointVersion: "v2";
|
|
100
|
+
operations: ("get" | "delete" | "list" | "listAll" | "create" | "update")[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
96
103
|
};
|
|
97
104
|
dayOff: {
|
|
98
105
|
endpoint: "days_off";
|
package/dist/service.js
CHANGED
|
@@ -83,6 +83,13 @@ export const SERVICES = {
|
|
|
83
83
|
endpoint: 'day_notes',
|
|
84
84
|
endpointVersion: 'v1',
|
|
85
85
|
operations: ['get', 'create', 'list', 'listAll', 'update', 'delete'],
|
|
86
|
+
subService: {
|
|
87
|
+
v2: {
|
|
88
|
+
endpoint: 'dayNotes',
|
|
89
|
+
endpointVersion: 'v2',
|
|
90
|
+
operations: ['get', 'create', 'list', 'listAll', 'update', 'delete'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
86
93
|
},
|
|
87
94
|
dayOff: {
|
|
88
95
|
endpoint: 'days_off',
|
package/package.json
CHANGED
package/src/endpoint.ts
CHANGED
|
@@ -25,6 +25,8 @@ import {
|
|
|
25
25
|
User,
|
|
26
26
|
Settings,
|
|
27
27
|
LogbookCategory,
|
|
28
|
+
DayNoteV2,
|
|
29
|
+
DayNoteV2QueryParameters,
|
|
28
30
|
} from './interfaces/index.js';
|
|
29
31
|
import { LogbookEntry, LogbookQueryParameters } from './interfaces/logbook.interface.js';
|
|
30
32
|
import {
|
|
@@ -109,6 +111,11 @@ export interface EndpointEntityMap extends Record<EndpointVersion, Record<string
|
|
|
109
111
|
/** Type mappings for v2 endpoints */
|
|
110
112
|
v2: {
|
|
111
113
|
logbook: Endpoint<LogbookEntry, LogbookQueryParameters, 'name' | 'description' | 'date' | 'userId'>;
|
|
114
|
+
dayNotes: Endpoint<
|
|
115
|
+
DayNoteV2,
|
|
116
|
+
DayNoteV2QueryParameters,
|
|
117
|
+
'title' | 'message' | 'startDate' | 'endDate' | 'locations' | 'visibleToEmployees'
|
|
118
|
+
>;
|
|
112
119
|
'logbook/categories': Endpoint<LogbookCategory, undefined, Pick<LogbookCategory, 'name'>>;
|
|
113
120
|
};
|
|
114
121
|
}
|
|
@@ -7,3 +7,22 @@ export interface DayNote {
|
|
|
7
7
|
message: string;
|
|
8
8
|
visible_employees: boolean;
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
export interface DayNoteV2 {
|
|
12
|
+
addedAt: string;
|
|
13
|
+
addedBy: number;
|
|
14
|
+
endDate: string;
|
|
15
|
+
id: number;
|
|
16
|
+
locations: number[];
|
|
17
|
+
message: string;
|
|
18
|
+
startDate: string;
|
|
19
|
+
title: string;
|
|
20
|
+
updatedAt: string | null;
|
|
21
|
+
updatedBy: number | null;
|
|
22
|
+
visibleToEmployees: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DayNoteV2QueryParameters {
|
|
25
|
+
location: number;
|
|
26
|
+
start: string;
|
|
27
|
+
end: string;
|
|
28
|
+
}
|
package/src/service.ts
CHANGED
|
@@ -153,6 +153,13 @@ export const SERVICES = {
|
|
|
153
153
|
endpoint: 'day_notes',
|
|
154
154
|
endpointVersion: 'v1',
|
|
155
155
|
operations: ['get', 'create', 'list', 'listAll', 'update', 'delete'],
|
|
156
|
+
subService: {
|
|
157
|
+
v2: {
|
|
158
|
+
endpoint: 'dayNotes',
|
|
159
|
+
endpointVersion: 'v2',
|
|
160
|
+
operations: ['get', 'create', 'list', 'listAll', 'update', 'delete'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
156
163
|
},
|
|
157
164
|
dayOff: {
|
|
158
165
|
endpoint: 'days_off',
|