Skip to content

personio, hibob (new) Connector contribution program [Maesn]#167

Draft
lennart-sve wants to merge 6 commits intoAppmixer-ai:devfrom
lennart-sve:maesn_connector_contribution
Draft

personio, hibob (new) Connector contribution program [Maesn]#167
lennart-sve wants to merge 6 commits intoAppmixer-ai:devfrom
lennart-sve:maesn_connector_contribution

Conversation

@lennart-sve
Copy link

No description provided.

Copy link
Contributor

@jirihofman jirihofman left a 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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove bluebird dependency.

Comment on lines +10 to +11


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove empty lines.

Comment on lines +57 to +60
await Promise.map(diff, employee => {
// TODO: Add logging here
return context.sendJson({ employee }, 'out');
});
Copy link
Contributor

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 {
Copy link
Contributor

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?

Suggested change
class DeletedEmployee {
module.exports = {

Copy link
Author

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

Copy link
Contributor

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 Promise
  • request-promise - not used

Comment on lines +55 to +58
} catch (error) {
// TODO: Add logging here
throw error;
}
Copy link
Contributor

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.

Copy link
Contributor

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",
Copy link
Contributor

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.

Suggested change
"name": "maesn.hibob",
"name": "appmixer.hibob",

@@ -0,0 +1,25 @@
{
"name": "maesn.hibob.employees.DeletedEmployee",
Copy link
Contributor

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.

Suggested change
"name": "maesn.hibob.employees.DeletedEmployee",
"name": "appmixer.hibob.employees.DeletedEmployee",

"name": "maesn.personio",
"label": "Personio",
"category": "applications",
"description": "Personio is an HR system ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Personio is an HR system ",
"description": "Personio is an HR system.",

@lennart-sve
Copy link
Author

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.

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.

@vtalas vtalas self-assigned this Sep 16, 2024
@DavidDurman DavidDurman changed the title Maesn connector contribution: Personio & Hibob personio, hibob (new) Connector contribution program [Maesn] Sep 27, 2024
@vtalas vtalas added POC TBR and removed POC labels Sep 30, 2024
@vtalas vtalas marked this pull request as draft October 15, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments