-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
personio, hibob (new) Connector contribution program [Maesn] #167
base: dev
Are you sure you want to change the base?
personio, hibob (new) Connector contribution program [Maesn] #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @lennart-sve, much appreciated! This looks very promising. I made some suggestions to bring the code style more in line with our codebase.
There might be some changes required further. Are you ok with us pushing into this PR? One example is GetEmployees
component. For a listing components we expect a standard set of outputTypes (object, first, array and file) but we haven't made these standards public yet. See example here.
@@ -0,0 +1,75 @@ | |||
'use strict'; | |||
const Promise = require('bluebird'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove bluebird
dependency.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove empty lines.
await Promise.map(diff, employee => { | ||
// TODO: Add logging here | ||
return context.sendJson({ employee }, 'out'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use native await Promise.all
and not bluebird's Promise.map
.
/** | ||
* Component which triggers whenever an employee is deleted. | ||
*/ | ||
class DeletedEmployee { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for defining a class and later exporting it? Can it be simplified instead like this?
class DeletedEmployee { | |
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this is simply that it was required for our logging framework, which I removed from the components as it would not be relevant to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file can be removed completely:
axios
->context.httpRequest
bluebird
-> node Promiserequest-promise
- not used
} catch (error) { | ||
// TODO: Add logging here | ||
throw error; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either add a more detailed logging (eg context.log
) or remove the try/catch
and Appmixer will handle the exception itself and do retries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename this to lib.js
.
@@ -0,0 +1,10 @@ | |||
{ | |||
"name": "maesn.hibob", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appmixer vendor is expected when the connector is in src/appmixer
folder.
"name": "maesn.hibob", | |
"name": "appmixer.hibob", |
@@ -0,0 +1,25 @@ | |||
{ | |||
"name": "maesn.hibob.employees.DeletedEmployee", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appmixer vendor is expected when the connector is in src/appmixer
folder.
"name": "maesn.hibob.employees.DeletedEmployee", | |
"name": "appmixer.hibob.employees.DeletedEmployee", |
"name": "maesn.personio", | ||
"label": "Personio", | ||
"category": "applications", | ||
"description": "Personio is an HR system ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "Personio is an HR system ", | |
"description": "Personio is an HR system.", |
No problem at all, feel free to make any changes you deem necessary. We would then wait for the appmixer version and branch them of with our changes. |
No description provided.