-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Workday API #18842
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
Open
Lokeshchand33
wants to merge
20
commits into
PipedreamHQ:master
Choose a base branch
from
Lokeshchand33:Workday-API
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,329
−9
Open
Workday API #18842
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3473117
Workday API
Lokeshchand33 653fda0
Version bumped
Lokeshchand33 5537759
lint issue fixed
Lokeshchand33 899677d
fixes
Lokeshchand33 a00a355
fixes
Lokeshchand33 972de83
Update components/workday/actions/get-home-contact-information-change…
michelle0927 8175f00
Update components/workday/actions/get-home-contact-information-change…
michelle0927 35134f5
Merging pull request #18825
jcortes a78b196
Merging pull request #18415
lcaresia 6f9e603
Adding app scaffolding for ashby
danhsiung d956cd7
Notion improvements - use notion-helper (#18797)
michelle0927 77f64ec
Adding app scaffolding for dasha_ai
danhsiung eb27b30
Add README for Slack v2 app with usage instructions and examples (#18…
js07 caa98c3
Adding app scaffolding for exa
danhsiung b8dd91f
interviewId
Lokeshchand33 8978c7c
Merge branch 'master' into Workday-API
Lokeshchand33 61047ea
added interviewId to async options
Lokeshchand33 91833f6
fixes
Lokeshchand33 d87e92f
fixes
Lokeshchand33 137016c
updated
Lokeshchand33 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
78 changes: 78 additions & 0 deletions
78
components/workday/actions/close-mentorship/close-mentorship.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,78 @@ | ||
| import workday from "../../workday.app.mjs"; | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| key: "workday-close-mentorship", | ||
| name: "Close Mentorship", | ||
| description: "End a mentorship for a given ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/post-/mentorships/-ID-/close)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
|
|
||
| type: "action", | ||
| props: { | ||
| workday, | ||
| mentorshipId: { | ||
| propDefinition: [ | ||
| workday, | ||
| "mentorshipId", | ||
| ], | ||
| }, | ||
| comment: { | ||
| type: "string", | ||
| label: "Comment", | ||
| description: "Last event comment (optional). Example: `Lorem ipsum dolor sit amet, ...`", | ||
| optional: true, | ||
| }, | ||
| startDate: { | ||
| type: "string", | ||
| label: "Start Date", | ||
| description: "Start date for the mentorship (ISO 8601). Example: `2025-10-18T07:00:00.000Z`", | ||
| }, | ||
| endDate: { | ||
| type: "string", | ||
| label: "End Date", | ||
| description: "End date for the mentorship (ISO 8601). Example: `2025-10-18T07:00:00.000Z`", | ||
| }, | ||
| closeMentorshipReason: { | ||
| type: "object", | ||
| label: "Close Mentorship Reason", | ||
| description: "Example: `{ \"id\": \"00000000000000000000000000000000\" }`", | ||
| }, | ||
| descriptor: { | ||
| type: "string", | ||
| label: "Descriptor", | ||
| description: "Display name. Example: `Lorem ipsum dolor sit ame`", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| if ( | ||
| !this.closeMentorshipReason || | ||
| typeof this.closeMentorshipReason !== "object" || | ||
| !this.closeMentorshipReason.id || | ||
| !this.closeMentorshipReason.id.trim() | ||
| ) { | ||
| throw new ConfigurationError("closeMentorshipReason is required and must be an object with a non-empty id property."); | ||
| } | ||
|
|
||
| const data = { | ||
| closeMentorshipReason: this.closeMentorshipReason, | ||
| startDate: this.startDate, | ||
| endDate: this.endDate, | ||
| }; | ||
| if (this.comment) data.comment = this.comment; | ||
| if (this.descriptor) data.descriptor = this.descriptor; | ||
|
|
||
| const response = await this.workday.closeMentorship({ | ||
| id: this.mentorshipId, | ||
| data, | ||
| $, | ||
| }); | ||
| $.export("$summary", `Mentorship ${this.mentorshipId} closed`); | ||
| return response; | ||
| }, | ||
| }; | ||
91 changes: 91 additions & 0 deletions
91
components/workday/actions/create-digital-course/create-digital-course.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,91 @@ | ||
| import workday from "../../workday.app.mjs"; | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import utils from "../../sources/common/utils.mjs"; | ||
|
|
||
| export default { | ||
| key: "workday-create-digital-course", | ||
| name: "Create Digital Course", | ||
| description: "Create a digital learning course. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#learning/v1/post-/manageDigitalCourses)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| workday, | ||
| topics: { | ||
| type: "string[]", | ||
| label: "Topics", | ||
| description: "The topics of the learning course event. Example: `[ { \"descriptor\": \"Leadership\", \"id\": \"topic-id-1\" } ]`", | ||
| }, | ||
| title: { | ||
| type: "string", | ||
| label: "Title", | ||
| description: "Course title. Example: `Digital Leadership 101`", | ||
| }, | ||
| availabilityStatus: { | ||
| type: "object", | ||
| label: "Availability Status", | ||
| description: "The status of the learning course event. Example: `{ \"id\": \"status-id-1\" }`", | ||
| }, | ||
| lessons: { | ||
| type: "string[]", | ||
| label: "Lessons", | ||
| description: "The course lessons of the learning course event. Example: `[ { \"title\": \"Lesson 1\", \"type\": { \"id\": \"type-id\" }, \"order\": 1, \"url\": \"https://...\", \"required\": true } ]`", | ||
| }, | ||
| description: { | ||
| type: "string", | ||
| label: "Description", | ||
| description: "Course description. Example: `Learn digital leadership strategies for remote teams.`", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const parsedTopics = utils.parseJsonInput(this.topics); | ||
| const parsedLessons = utils.parseJsonInput(this.lessons); | ||
|
|
||
| if (!Array.isArray(parsedTopics) || parsedTopics.length === 0) { | ||
| throw new ConfigurationError("`topics` must be a non-empty array."); | ||
| } | ||
| for (const t of parsedTopics) { | ||
| if (!t.id || !t.descriptor) { | ||
| throw new ConfigurationError("Each topic must have both `id` and `descriptor`."); | ||
| } | ||
| } | ||
|
|
||
| if (!Array.isArray(parsedLessons) || parsedLessons.length === 0) { | ||
| throw new ConfigurationError("`lessons` must be a non-empty array."); | ||
| } | ||
| for (const l of parsedLessons) { | ||
| if (!l.title || !l.type?.id || typeof l.order !== "number" || !l.url) { | ||
| throw new ConfigurationError("Each lesson must include `title`, `type` (object with id), `order` (integer), and `url`."); | ||
| } | ||
| } | ||
|
|
||
| if (!this.title || !this.title.trim()) { | ||
| throw new ConfigurationError("`title` is required."); | ||
| } | ||
| if (!this.availabilityStatus || typeof this.availabilityStatus !== "object" || !this.availabilityStatus.id) { | ||
| throw new ConfigurationError("`availabilityStatus` is required and must be an object with a non-empty 'id'."); | ||
| } | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if (!this.description || !this.description.trim()) { | ||
| throw new ConfigurationError("`description` is required."); | ||
| } | ||
|
|
||
| const data = { | ||
| topics: parsedTopics, | ||
| title: this.title, | ||
| availabilityStatus: utils.parseObject(this.availabilityStatus), | ||
| lessons: parsedLessons, | ||
| description: this.description, | ||
| }; | ||
|
|
||
| const response = await this.workday.createDigitalCourse({ | ||
| $, | ||
| data, | ||
| }); | ||
| $.export("$summary", "Digital course created"); | ||
| return response; | ||
| }, | ||
| }; | ||
36 changes: 36 additions & 0 deletions
36
...actions/create-home-contact-information-change/create-home-contact-information-change.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,36 @@ | ||
| import workday from "../../workday.app.mjs"; | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| key: "workday-create-home-contact-information-change", | ||
| name: "create Home Contact Information Change", | ||
| description: "creates a home contact change for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/)", | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| workday, | ||
| workerId: { | ||
| propDefinition: [ | ||
| workday, | ||
| "workerId", | ||
| ], | ||
| }, | ||
| }, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| async run({ $ }) { | ||
| if (!this.workerId || !this.workerId.trim()) { | ||
| throw new ConfigurationError("Worker ID is required."); | ||
| } | ||
| const response = await this.workday.createHomeContactInformationChange({ | ||
| workerId: this.workerId, | ||
| data: {}, | ||
| $, | ||
| }); | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $.export("$summary", `Home contact change event created for worker ID ${this.workerId}`); | ||
| return response; | ||
| }, | ||
| }; | ||
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
87 changes: 87 additions & 0 deletions
87
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.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,87 @@ | ||
| import workday from "../../workday.app.mjs"; | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| key: "workday-create-mentorship-for-me", | ||
| name: "Create Mentorship For Current User", | ||
| description: "Creates a mentorship for the current user. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/post-/createMentorshipForMe)", | ||
| version: "0.0.1", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| type: "action", | ||
| props: { | ||
| workday, | ||
| endDate: { | ||
| type: "string", | ||
| label: "End Date", | ||
| description: "Proposed end date (ISO 8601 format). Example: '2025-10-18T07:00:00.000Z'", | ||
| }, | ||
| startDate: { | ||
| type: "string", | ||
| label: "Start Date", | ||
| description: "Proposed start date (ISO 8601 format). Example: '2025-10-18T07:00:00.000Z'", | ||
| }, | ||
| purpose: { | ||
| type: "string", | ||
| label: "Purpose", | ||
| description: "Purpose of the mentorship.", | ||
| }, | ||
| mentor: { | ||
| propDefinition: [ | ||
| workday, | ||
| "workerId", | ||
| ], | ||
| }, | ||
| comment: { | ||
| type: "string", | ||
| label: "Comment", | ||
| description: "Optional. Comment field for notes or special requests.", | ||
| optional: true, | ||
| }, | ||
| mentorType: { | ||
| type: "object", | ||
| label: "Mentor Type", | ||
| description: `Object containing at least an \`id\` property. Example: \`{"id": "00000000000000000000000000000000"}\`. | ||
|
|
||
| **Note:** These values are configured within your Workday tenant and can typically be retrieved using a **Workday Report-as-a-Service (RaaS)** or **SOAP API** integration. Please contact your Workday administrator to obtain the valid mentor type IDs available in your environment.`, | ||
| }, | ||
| descriptor: { | ||
| type: "string", | ||
| label: "Descriptor", | ||
| description: "Optional. Display name of the mentorship.", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| if (!this.endDate || !this.endDate.trim()) throw new ConfigurationError("End Date is required and cannot be empty."); | ||
| if (!this.startDate || !this.startDate.trim()) throw new ConfigurationError("Start Date is required and cannot be empty."); | ||
| if (!this.purpose || !this.purpose.trim()) throw new ConfigurationError("Purpose is required and cannot be empty."); | ||
| if (this.mentorType !== undefined) { | ||
| if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) { | ||
| throw new ConfigurationError("mentorType must be an object with a non-empty id property."); | ||
| } | ||
| } | ||
|
|
||
| const data = { | ||
| endDate: this.endDate, | ||
| startDate: this.startDate, | ||
| purpose: this.purpose, | ||
| mentor: { | ||
| id: this.mentor, | ||
| }, | ||
| }; | ||
| if (this.comment) data.comment = this.comment; | ||
| if (this.mentorType) data.mentorType = this.mentorType; | ||
| if (this.descriptor) data.descriptor = this.descriptor; | ||
|
|
||
| const response = await this.workday.createMentorshipForMe({ | ||
| $, | ||
| data, | ||
| }); | ||
| $.export("$summary", "Mentorship created for current user"); | ||
| 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.