-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add HR Cloud components #15815
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
Merged
Merged
Add HR Cloud components #15815
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
091eb60
Add HR Cloud components
dannyroosevelt c6d2354
Update pnpm-lock.yaml
dannyroosevelt 44f0dfb
Update package.json
dannyroosevelt 119e9e5
Update README.md
dannyroosevelt e74215a
Fix: Replace compound name prop with separate firstName and lastName …
dannyroosevelt 75d5b65
Fix API endpoint structure and add version flexibility to HR Cloud co…
dannyroosevelt a5c5ea0
Update HR Cloud API URL structure to match documentation
dannyroosevelt 5e31294
create-employee updates
michelle0927 fd33ab0
Merge remote-tracking branch 'origin/master' into add-hr-cloud-compon…
michelle0927 32653e3
pnpm-lock.yaml
michelle0927 151e265
remove console.log
michelle0927 b17db49
update actions
michelle0927 f263c59
sources updates
michelle0927 6c60df1
package.json
michelle0927 b3e218a
pnpm-lock.yaml
michelle0927 40f7816
pnpm-lock.yaml
michelle0927 d10b085
fix key
michelle0927 0e64952
update package.json version
michelle0927 d75019d
fix employeeNumber prop
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Overview | ||
|
|
||
| HR Cloud is a human resources management system (HRMS) that helps businesses manage their employee data, payroll, benefits, time tracking, and more. This integration enables you to automate your HR workflows by connecting HR Cloud with thousands of other apps on Pipedream. | ||
|
|
||
| # Getting Started | ||
|
|
||
| To use this integration, you'll need an HR Cloud account and an API key. To get started, | ||
|
|
||
| 1. Log in to your HR Cloud account | ||
| 2. Navigate to Settings > API Settings | ||
| 3. Create a new API key or use an existing one | ||
|
|
35 changes: 35 additions & 0 deletions
35
components/hr_cloud/actions/approve-leave-request/approve-leave-request.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import hrCloud from "../../hr_cloud.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hr_cloud-approve-leave-request", | ||
| name: "Approve Leave Request", | ||
| description: "Approve a pending employee leave request. [See the documentation](https://help.hrcloud.com/api/#/introduction#top)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hrCloud, | ||
| leaveRequestId: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "leaveRequestId", | ||
| ], | ||
| }, | ||
| approvalNote: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "approvalNote", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hrCloud.approveLeaveRequest(this.leaveRequestId, { | ||
| $, | ||
| data: { | ||
| note: this.approvalNote, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully approved leave request (ID: ${this.leaveRequestId})`); | ||
| return response; | ||
| }, | ||
| }; |
64 changes: 64 additions & 0 deletions
64
components/hr_cloud/actions/create-employee/create-employee.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| import hrCloud from "../../hr_cloud.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hr_cloud-create-employee", | ||
| name: "Create Employee", | ||
| description: "Create a new employee record in the system. [See the documentation](https://help.hrcloud.com/api/#/introduction#top)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hrCloud, | ||
| firstName: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "firstName", | ||
| ], | ||
| }, | ||
| lastName: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "lastName", | ||
| ], | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "email", | ||
| ], | ||
| }, | ||
| jobTitle: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "jobTitle", | ||
| ], | ||
| }, | ||
| departmentId: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "departmentId", | ||
| ], | ||
| }, | ||
| startDate: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "startDate", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hrCloud.createEmployee({ | ||
| $, | ||
| data: { | ||
| first_name: this.firstName, | ||
| last_name: this.lastName, | ||
| email: this.email, | ||
| job_title_id: this.jobTitle, | ||
| department_id: this.departmentId, | ||
| start_date: this.startDate, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created employee: ${this.firstName} ${this.lastName}`); | ||
| return response; | ||
| }, | ||
| }; |
62 changes: 62 additions & 0 deletions
62
components/hr_cloud/actions/log-timesheet-entry/log-timesheet-entry.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import hrCloud from "../../hr_cloud.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "hr_cloud-log-timesheet-entry", | ||
| name: "Log Timesheet Entry", | ||
| description: "Log a new timesheet entry for an employee. [See the documentation](https://help.hrcloud.com/api/#/introduction#top)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| hrCloud, | ||
| employeeId: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "employeeId", | ||
| ], | ||
| }, | ||
| hours: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "hours", | ||
| ], | ||
| }, | ||
| date: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "date", | ||
| ], | ||
| }, | ||
| projectId: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "projectId", | ||
| ], | ||
| }, | ||
| notes: { | ||
| propDefinition: [ | ||
| hrCloud, | ||
| "notes", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.hrCloud.createTimesheetEntry({ | ||
| $, | ||
| data: { | ||
| employee_id: this.employeeId, | ||
| hours: this.hours, | ||
| date: this.date, | ||
| project_id: this.projectId, | ||
| notes: this.notes, | ||
| }, | ||
| }); | ||
|
|
||
| const employee = await this.hrCloud.getEmployee(this.employeeId, { | ||
| $, | ||
| }); | ||
| const employeeName = `${employee.first_name} ${employee.last_name}`; | ||
|
|
||
| $.export("$summary", `Successfully logged ${this.hours} hours for ${employeeName}`); | ||
| return response; | ||
| }, | ||
| }; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.