-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - lucca #16154
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
New Components - lucca #16154
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
085ed56
lucca init
luancazarine 0b8558e
[Components] lucca #16101
luancazarine d5350df
pnpm update
luancazarine d6cd96b
some adjusts
luancazarine 111bcfc
pnpm update
luancazarine 49244f5
Merge branch 'master' into issue-16101
luancazarine 323a89c
pnpm update
luancazarine 5ea4a38
pnpm update
luancazarine 034a886
some adjusts
luancazarine 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
43 changes: 43 additions & 0 deletions
43
components/lucca/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,43 @@ | ||
| import lucca from "../../lucca.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "lucca-approve-leave-request", | ||
| name: "Approve Or Deny Leave Request", | ||
| description: "Approve or Deny a pending leave request. [See the documentation](https://developers.lucca.fr/api-reference/legacy/timmi-absences/leave-requests/approve-or-deny-a-leave-request)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| lucca, | ||
| leaveRequestId: { | ||
| propDefinition: [ | ||
| lucca, | ||
| "leaveRequestId", | ||
| ], | ||
| }, | ||
| approved: { | ||
| type: "boolean", | ||
| label: "Approved", | ||
| description: "Whether the leave request should be approved.", | ||
| optional: true, | ||
| }, | ||
| comment: { | ||
| type: "string", | ||
| label: "Comment", | ||
| description: "Optional comment about the approval decision.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.lucca.approveLeaveRequest({ | ||
| $, | ||
| leaveRequestId: this.leaveRequestId, | ||
| data: { | ||
| approved: this.approved, | ||
| comment: this.comment, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Leave request ${this.leaveRequestId} was successfully processed.`); | ||
| return response; | ||
| }, | ||
| }; |
146 changes: 146 additions & 0 deletions
146
components/lucca/actions/update-user-info/update-user-info.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,146 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import lucca from "../../lucca.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "lucca-update-user-info", | ||
| name: "Update User Info", | ||
| description: "Update profile or HR information for an existing user. [See the documentation](https://developers.lucca.fr/api-reference/legacy/directory/update-a-user-by-id)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| lucca, | ||
| userId: { | ||
| propDefinition: [ | ||
| lucca, | ||
| "userId", | ||
| ], | ||
| }, | ||
| firstName: { | ||
| type: "string", | ||
| label: "First Name", | ||
| description: "The user's first name", | ||
| optional: true, | ||
| }, | ||
| lastName: { | ||
| type: "string", | ||
| label: "Last Name", | ||
| description: "The user's last name", | ||
| optional: true, | ||
| }, | ||
| mail: { | ||
| type: "string", | ||
| label: "Email", | ||
| description: "The user's email", | ||
| optional: true, | ||
| }, | ||
| login: { | ||
| type: "string", | ||
| label: "Login", | ||
| description: "The user's login", | ||
| optional: true, | ||
| }, | ||
| legalEntityId: { | ||
| propDefinition: [ | ||
| lucca, | ||
| "legalEntityId", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| calendarId: { | ||
| type: "integer", | ||
| label: "Calendar ID", | ||
| description: "The ID of the calendar", | ||
| optional: true, | ||
| }, | ||
| employeeNumber: { | ||
| type: "string", | ||
| label: "Employee Number", | ||
| description: "The employee number", | ||
| optional: true, | ||
| }, | ||
| birthDate: { | ||
| type: "string", | ||
| label: "Birth Date", | ||
| description: "The birth date of the user. Format: 'YYYY-MM-DD'.", | ||
| optional: true, | ||
| }, | ||
| address: { | ||
| type: "string", | ||
| label: "Address", | ||
| description: "The address of the user", | ||
| optional: true, | ||
| }, | ||
| bankName: { | ||
| type: "string", | ||
| label: "Bank Name", | ||
| description: "The name of the bank", | ||
| optional: true, | ||
| }, | ||
| directLine: { | ||
| type: "string", | ||
| label: "Direct Line", | ||
| description: "The direct line of the user", | ||
| optional: true, | ||
| }, | ||
| gender: { | ||
| type: "string", | ||
| label: "Gender", | ||
| description: "The gender of the user", | ||
| optional: true, | ||
| }, | ||
| nationality: { | ||
| propDefinition: [ | ||
| lucca, | ||
| "nationalityId", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| personalEmail: { | ||
| type: "string", | ||
| label: "Personal Email", | ||
| description: "The personal email of the user", | ||
| optional: true, | ||
| }, | ||
| personalMobile: { | ||
| type: "string", | ||
| label: "Personal Mobile", | ||
| description: "The personal mobile of the user", | ||
| optional: true, | ||
| }, | ||
| professionalMobile: { | ||
| type: "string", | ||
| label: "Professional Mobile", | ||
| description: "The professional mobile of the user", | ||
| optional: true, | ||
| }, | ||
| quote: { | ||
| type: "string", | ||
| label: "Quote", | ||
| description: "The quote of the user", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const { | ||
| lucca, | ||
| userId, | ||
| ...data | ||
| } = this; | ||
|
|
||
| const response = await lucca.updateUserProfile({ | ||
| $, | ||
| userId, | ||
| data, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully updated user with ID: ${this.userId}`); | ||
| return response; | ||
| } catch ({ message }) { | ||
| console.log("message: ", message); | ||
|
|
||
| const parsedError = JSON.parse(message); | ||
| throw new ConfigurationError(parsedError.Message || parsedError[0].message); | ||
| } | ||
| }, | ||
| }; | ||
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 @@ | ||
| export const LIMIT = 100; |
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.