@orchesty/connector-personio 1.0.0 → 1.0.1
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/package.json +4 -1
- package/package.json +4 -1
- package/CHANGELOG.md +0 -7
- package/coverage/clover.xml +0 -102
- package/coverage/coverage-final.json +0 -5
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Batch/PersonioGetProjectsBatch.ts.html +0 -232
- package/coverage/lcov-report/src/Batch/PersonioListEmployeesBatch.ts.html +0 -1108
- package/coverage/lcov-report/src/Batch/index.html +0 -131
- package/coverage/lcov-report/src/PersonioApplication.ts.html +0 -367
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/test/dataProvider.ts.html +0 -187
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov.info +0 -149
- package/jest.config.js +0 -13
- package/src/Batch/PersonioGetProjectsBatch.ts +0 -49
- package/src/Batch/PersonioListEmployeesBatch.ts +0 -341
- package/src/Batch/__tests__/Data/PersonioGetProjectsBatch/input.json +0 -6
- package/src/Batch/__tests__/Data/PersonioGetProjectsBatch/mock.json +0 -10
- package/src/Batch/__tests__/Data/PersonioGetProjectsBatch/mock1.json +0 -19
- package/src/Batch/__tests__/Data/PersonioGetProjectsBatch/output.json +0 -11
- package/src/Batch/__tests__/Data/PersonioListEmployeesBatch/input.json +0 -6
- package/src/Batch/__tests__/Data/PersonioListEmployeesBatch/mock.json +0 -10
- package/src/Batch/__tests__/Data/PersonioListEmployeesBatch/mock1.json +0 -308
- package/src/Batch/__tests__/Data/PersonioListEmployeesBatch/output.json +0 -11
- package/src/Batch/__tests__/PersonioGetProjectsBatch.ts +0 -17
- package/src/Batch/__tests__/PersonioListEmployeesBatch.ts +0 -17
- package/src/PersonioApplication.ts +0 -94
- package/test/dataProvider.ts +0 -34
- package/tsconfig.json +0 -8
- package/tsconfig.prod.json +0 -13
- package/tsconfig.prod.tsbuildinfo +0 -1
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
4
|
-
|
|
5
|
-
export const NAME = 'personio-list-employees-batch';
|
|
6
|
-
|
|
7
|
-
export default class PersonioListEmployeesBatch extends ABatchNode {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return NAME;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
14
|
-
const offset = dto.getBatchCursor('0');
|
|
15
|
-
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
16
|
-
const req = await this.getApplication().getRequestDto(
|
|
17
|
-
dto,
|
|
18
|
-
appInstall,
|
|
19
|
-
HttpMethods.GET,
|
|
20
|
-
`employees?limit=200&offset=${offset}`,
|
|
21
|
-
);
|
|
22
|
-
const resp = await this.getSender().send<IResponse>(req, [200]);
|
|
23
|
-
const response = resp.getJsonBody();
|
|
24
|
-
|
|
25
|
-
dto.setItemList(response.data ?? []);
|
|
26
|
-
if (response.metadata.current_page < response.metadata.total_pages) {
|
|
27
|
-
dto.setBatchCursor((Number(offset) + 1).toString());
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return dto;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
36
|
-
export interface IResponse {
|
|
37
|
-
success: boolean;
|
|
38
|
-
metadata: {
|
|
39
|
-
total_elements: number;
|
|
40
|
-
current_page: number;
|
|
41
|
-
total_pages: number;
|
|
42
|
-
};
|
|
43
|
-
offset: number;
|
|
44
|
-
limit: number;
|
|
45
|
-
data: IOutput[];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface IOutput {
|
|
49
|
-
type: string;
|
|
50
|
-
attributes: {
|
|
51
|
-
id: {
|
|
52
|
-
label: string;
|
|
53
|
-
value: number;
|
|
54
|
-
type: string;
|
|
55
|
-
universal_id: string;
|
|
56
|
-
};
|
|
57
|
-
first_name: {
|
|
58
|
-
label: string;
|
|
59
|
-
value: string;
|
|
60
|
-
type: string;
|
|
61
|
-
universal_id: string;
|
|
62
|
-
};
|
|
63
|
-
last_name: {
|
|
64
|
-
label: string;
|
|
65
|
-
value: string;
|
|
66
|
-
type: string;
|
|
67
|
-
universal_id: string;
|
|
68
|
-
};
|
|
69
|
-
email: {
|
|
70
|
-
label: string;
|
|
71
|
-
value: string;
|
|
72
|
-
type: string;
|
|
73
|
-
universal_id: string;
|
|
74
|
-
};
|
|
75
|
-
gender: {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
type: string;
|
|
79
|
-
universal_id: string;
|
|
80
|
-
};
|
|
81
|
-
status: {
|
|
82
|
-
label: string;
|
|
83
|
-
value: string;
|
|
84
|
-
type: string;
|
|
85
|
-
universal_id: string;
|
|
86
|
-
};
|
|
87
|
-
position: {
|
|
88
|
-
label: string;
|
|
89
|
-
value: string;
|
|
90
|
-
type: string;
|
|
91
|
-
universal_id: string;
|
|
92
|
-
};
|
|
93
|
-
supervisor: {
|
|
94
|
-
label: string;
|
|
95
|
-
value: {
|
|
96
|
-
type: string;
|
|
97
|
-
attributes: {
|
|
98
|
-
id: {
|
|
99
|
-
label: string;
|
|
100
|
-
value: number;
|
|
101
|
-
type: string;
|
|
102
|
-
universal_id: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
type: string;
|
|
107
|
-
universal_id: string;
|
|
108
|
-
};
|
|
109
|
-
employment_type: {
|
|
110
|
-
label: string;
|
|
111
|
-
value: string;
|
|
112
|
-
type: string;
|
|
113
|
-
universal_id: string;
|
|
114
|
-
};
|
|
115
|
-
weekly_working_hours: {
|
|
116
|
-
label: string;
|
|
117
|
-
value: string;
|
|
118
|
-
type: string;
|
|
119
|
-
universal_id: string;
|
|
120
|
-
};
|
|
121
|
-
hire_date: {
|
|
122
|
-
label: string;
|
|
123
|
-
value: string;
|
|
124
|
-
type: string;
|
|
125
|
-
universal_id: string;
|
|
126
|
-
};
|
|
127
|
-
contract_end_date: {
|
|
128
|
-
label: string;
|
|
129
|
-
value: null;
|
|
130
|
-
type: string;
|
|
131
|
-
universal_id: string;
|
|
132
|
-
};
|
|
133
|
-
termination_date: {
|
|
134
|
-
label: string;
|
|
135
|
-
value: null;
|
|
136
|
-
type: string;
|
|
137
|
-
universal_id: string;
|
|
138
|
-
};
|
|
139
|
-
termination_type: {
|
|
140
|
-
label: string;
|
|
141
|
-
value: null;
|
|
142
|
-
type: string;
|
|
143
|
-
universal_id: string;
|
|
144
|
-
};
|
|
145
|
-
termination_reason: {
|
|
146
|
-
label: string;
|
|
147
|
-
value: null;
|
|
148
|
-
type: string;
|
|
149
|
-
universal_id: string;
|
|
150
|
-
};
|
|
151
|
-
probation_period_end: {
|
|
152
|
-
label: string;
|
|
153
|
-
value: null;
|
|
154
|
-
type: string;
|
|
155
|
-
universal_id: string;
|
|
156
|
-
};
|
|
157
|
-
created_at: {
|
|
158
|
-
label: string;
|
|
159
|
-
value: string;
|
|
160
|
-
type: string;
|
|
161
|
-
universal_id: string;
|
|
162
|
-
};
|
|
163
|
-
last_modified_at: {
|
|
164
|
-
label: string;
|
|
165
|
-
value: string;
|
|
166
|
-
type: string;
|
|
167
|
-
universal_id: string;
|
|
168
|
-
};
|
|
169
|
-
subcompany: {
|
|
170
|
-
label: string;
|
|
171
|
-
value: {
|
|
172
|
-
type: string;
|
|
173
|
-
attributes: {
|
|
174
|
-
id: number;
|
|
175
|
-
name: string;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
type: string;
|
|
179
|
-
universal_id: string;
|
|
180
|
-
};
|
|
181
|
-
office: {
|
|
182
|
-
label: string;
|
|
183
|
-
value: {
|
|
184
|
-
type: string;
|
|
185
|
-
attributes: {
|
|
186
|
-
id: number;
|
|
187
|
-
name: string;
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
type: string;
|
|
191
|
-
universal_id: string;
|
|
192
|
-
};
|
|
193
|
-
department: {
|
|
194
|
-
label: string;
|
|
195
|
-
value: {
|
|
196
|
-
type: string;
|
|
197
|
-
attributes: {
|
|
198
|
-
id: number;
|
|
199
|
-
name: string;
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
type: string;
|
|
203
|
-
universal_id: string;
|
|
204
|
-
};
|
|
205
|
-
cost_centers: {
|
|
206
|
-
label: string;
|
|
207
|
-
value: [
|
|
208
|
-
{
|
|
209
|
-
type: string;
|
|
210
|
-
attributes: {
|
|
211
|
-
id: number;
|
|
212
|
-
name: string;
|
|
213
|
-
percentage: number;
|
|
214
|
-
};
|
|
215
|
-
},
|
|
216
|
-
];
|
|
217
|
-
type: string;
|
|
218
|
-
universal_id: string;
|
|
219
|
-
};
|
|
220
|
-
holiday_calendar: {
|
|
221
|
-
label: string;
|
|
222
|
-
value: {
|
|
223
|
-
type: string;
|
|
224
|
-
attributes: {
|
|
225
|
-
id: number;
|
|
226
|
-
name: string;
|
|
227
|
-
country: string;
|
|
228
|
-
state: string;
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
type: string;
|
|
232
|
-
universal_id: string;
|
|
233
|
-
};
|
|
234
|
-
absence_entitlement: {
|
|
235
|
-
label: string;
|
|
236
|
-
value: [
|
|
237
|
-
{
|
|
238
|
-
type: string;
|
|
239
|
-
attributes: {
|
|
240
|
-
id: number;
|
|
241
|
-
name: string;
|
|
242
|
-
category: string;
|
|
243
|
-
entitlement: number;
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
];
|
|
247
|
-
type: string;
|
|
248
|
-
universal_id: string;
|
|
249
|
-
};
|
|
250
|
-
work_schedule: {
|
|
251
|
-
label: string;
|
|
252
|
-
value: {
|
|
253
|
-
type: string;
|
|
254
|
-
attributes: {
|
|
255
|
-
id: number;
|
|
256
|
-
name: string;
|
|
257
|
-
valid_from: null;
|
|
258
|
-
monday: string;
|
|
259
|
-
tuesday: string;
|
|
260
|
-
wednesday: string;
|
|
261
|
-
thursday: string;
|
|
262
|
-
friday: string;
|
|
263
|
-
saturday: string;
|
|
264
|
-
sunday: string;
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
type: string;
|
|
268
|
-
universal_id: string;
|
|
269
|
-
};
|
|
270
|
-
fix_salary: {
|
|
271
|
-
label: string;
|
|
272
|
-
value: number;
|
|
273
|
-
type: string;
|
|
274
|
-
universal_id: string;
|
|
275
|
-
currency: string;
|
|
276
|
-
};
|
|
277
|
-
fix_salary_interval: {
|
|
278
|
-
label: string;
|
|
279
|
-
value: string;
|
|
280
|
-
type: string;
|
|
281
|
-
universal_id: string;
|
|
282
|
-
};
|
|
283
|
-
hourly_salary: {
|
|
284
|
-
label: string;
|
|
285
|
-
value: number;
|
|
286
|
-
type: string;
|
|
287
|
-
universal_id: string;
|
|
288
|
-
currency: string;
|
|
289
|
-
};
|
|
290
|
-
vacation_day_balance: {
|
|
291
|
-
label: string;
|
|
292
|
-
value: number;
|
|
293
|
-
type: string;
|
|
294
|
-
universal_id: string;
|
|
295
|
-
};
|
|
296
|
-
last_working_day: {
|
|
297
|
-
label: string;
|
|
298
|
-
value: null;
|
|
299
|
-
type: string;
|
|
300
|
-
universal_id: string;
|
|
301
|
-
};
|
|
302
|
-
profile_picture: {
|
|
303
|
-
label: string;
|
|
304
|
-
value: string;
|
|
305
|
-
type: string;
|
|
306
|
-
universal_id: string;
|
|
307
|
-
};
|
|
308
|
-
team: {
|
|
309
|
-
label: string;
|
|
310
|
-
value: {
|
|
311
|
-
type: string;
|
|
312
|
-
attributes: {
|
|
313
|
-
id: number;
|
|
314
|
-
name: string;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
type: string;
|
|
318
|
-
universal_id: string;
|
|
319
|
-
};
|
|
320
|
-
dynamic_24407: {
|
|
321
|
-
label: string;
|
|
322
|
-
value: string;
|
|
323
|
-
universal_id: null;
|
|
324
|
-
type: string;
|
|
325
|
-
};
|
|
326
|
-
dynamic_21827: {
|
|
327
|
-
label: string;
|
|
328
|
-
value: string;
|
|
329
|
-
universal_id: string;
|
|
330
|
-
type: string;
|
|
331
|
-
};
|
|
332
|
-
dynamic_33400: {
|
|
333
|
-
label: string;
|
|
334
|
-
value: string;
|
|
335
|
-
universal_id: null;
|
|
336
|
-
type: string;
|
|
337
|
-
};
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://api.personio.de/v1/auth?client_id=client_id&client_secret=client_secret",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"success": true,
|
|
6
|
-
"data": {
|
|
7
|
-
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXBpLmRldi5wZXJzb25pby5kZTozMDAwMS92MS9hdXRoIiwiaWF0IjoxNDg5MDkxMzA2LCJleHAiOjE0ODkxNzc3MDYsIm5iZiI6MTQ4OTA5MTMwNiwianRpIjoiZmU1ZjkxOGY2MDZjOWI4OGMwMzM0ZmJkZjkyYzkwMzgiLCJzdWIiOiJPR014TVdRd1kySmxZbVF6Tm1RNVpqQmxOell6WmpsaSJ9.QZZCdlDjmL-LYdoDx2XLUfhwTdcjDgm9h4t-6JoACiM"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://api.personio.de/v1/company/attendances/projects",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"success": true,
|
|
6
|
-
"data": [
|
|
7
|
-
{
|
|
8
|
-
"id": 1,
|
|
9
|
-
"type": "Project",
|
|
10
|
-
"attributes": {
|
|
11
|
-
"name": "Project name",
|
|
12
|
-
"active": true,
|
|
13
|
-
"created_at": "2022-02-01T12:00:00+0100",
|
|
14
|
-
"updated_at": "2022-02-01T12:00:00+0100"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": [
|
|
6
|
-
{
|
|
7
|
-
"body": "{\"id\":1,\"type\":\"Project\",\"attributes\":{\"name\":\"Project name\",\"active\":true,\"created_at\":\"2022-02-01T12:00:00+0100\",\"updated_at\":\"2022-02-01T12:00:00+0100\"}}",
|
|
8
|
-
"headers": {}
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://api.personio.de/v1/auth?client_id=client_id&client_secret=client_secret",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"success": true,
|
|
6
|
-
"data": {
|
|
7
|
-
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXBpLmRldi5wZXJzb25pby5kZTozMDAwMS92MS9hdXRoIiwiaWF0IjoxNDg5MDkxMzA2LCJleHAiOjE0ODkxNzc3MDYsIm5iZiI6MTQ4OTA5MTMwNiwianRpIjoiZmU1ZjkxOGY2MDZjOWI4OGMwMzM0ZmJkZjkyYzkwMzgiLCJzdWIiOiJPR014TVdRd1kySmxZbVF6Tm1RNVpqQmxOell6WmpsaSJ9.QZZCdlDjmL-LYdoDx2XLUfhwTdcjDgm9h4t-6JoACiM"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|