From 347311714f49d0afc0ac52b9b27a05cd50e70742 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Thu, 23 Oct 2025 06:21:23 +0530 Subject: [PATCH 01/19] Workday API --- .../close-mentorship/close-mentorship.mjs | 78 ++ .../create-digital-course.mjs | 91 ++ .../create-distribution-request.mjs | 80 ++ ...create-home-contact-information-change.mjs | 36 + .../create-mentorship-for-me.mjs | 86 ++ .../create-mentorship-for-worker.mjs | 94 ++ .../create-org-assignment-change.mjs | 80 ++ .../create-payroll-input.mjs | 57 ++ .../create-prospect/create-prospect.mjs | 46 + .../create-succession-plan.mjs | 70 ++ .../create-tax-rate/create-tax-rate.mjs | 92 ++ ...create-work-contact-information-change.mjs | 36 + .../delete-payroll-input.mjs | 32 + .../get-content-details.mjs | 31 + .../get-feedback-badge-details.mjs | 31 + ...-give-requested-feedback-event-details.mjs | 31 + .../get-home-contact-information-change.mjs | 32 + .../get-interview-details.mjs | 29 + .../get-job-change-details.mjs | 31 + .../get-job-details/get-job-details.mjs | 30 + .../get-job-family-details.mjs | 30 + .../get-job-pay-group/get-job-pay-group.mjs | 31 + .../get-job-posting/get-job-posting.mjs | 31 + .../get-job-profile-details.mjs | 30 + .../get-mentorship-details.mjs | 31 + .../get-minimum-wage-rate-details.mjs | 31 + .../get-org-assignment-change-details.mjs | 32 + .../get-pay-group-detail.mjs | 31 + .../actions/get-pay-group/get-pay-group.mjs | 31 + .../get-payroll-input-details.mjs | 31 + .../get-person-photo/get-person-photo.mjs | 32 + .../workday/actions/get-person/get-person.mjs | 32 + .../get-prospect-details.mjs | 30 + .../get-succession-plan-details.mjs | 31 + .../get-supervisory-org-details.mjs | 32 + .../get-supervisory-org-members.mjs | 32 + .../get-work-contact-information-change.mjs | 29 + .../get-worker-anytime-feedback-events.mjs | 31 + .../get-worker-goals/get-worker-goals.mjs | 31 + .../actions/list-content/list-content.mjs | 24 + .../list-feedback-badges.mjs | 24 + .../list-give-requested-feedback-events.mjs | 24 + .../list-holiday-events.mjs | 24 + .../list-home-contact-information-changes.mjs | 24 + .../list-interviews/list-interviews.mjs | 23 + .../list-job-changes/list-job-changes.mjs | 24 + .../list-job-families/list-job-families.mjs | 23 + .../list-job-postings/list-job-postings.mjs | 24 + .../list-job-profiles/list-job-profiles.mjs | 23 + .../workday/actions/list-jobs/list-jobs.mjs | 23 + .../list-mentorships/list-mentorships.mjs | 24 + .../list-minimum-wage-rates.mjs | 24 + .../list-org-assignment-changes.mjs | 25 + .../list-pay-group-details.mjs | 24 + .../list-pay-groups/list-pay-groups.mjs | 24 + .../list-payroll-inputs.mjs | 24 + .../actions/list-people/list-people.mjs | 40 + .../actions/list-prospects/list-prospects.mjs | 24 + .../list-succession-plans.mjs | 24 + .../actions/list-tax-rates/list-tax-rates.mjs | 24 + .../list-work-contact-information-changes.mjs | 23 + .../actions/list-workers/list-workers.mjs | 25 + .../update-mentorship/update-mentorship.mjs | 72 ++ .../update-payroll-input.mjs | 65 ++ ...update-work-contact-information-change.mjs | 68 ++ .../validate-phone-number.mjs | 32 + components/workday/sources/common/utils.mjs | 36 + components/workday/workday.app.mjs | 863 ++++++++++++++++++ 68 files changed, 3383 insertions(+) create mode 100644 components/workday/actions/close-mentorship/close-mentorship.mjs create mode 100644 components/workday/actions/create-digital-course/create-digital-course.mjs create mode 100644 components/workday/actions/create-distribution-request/create-distribution-request.mjs create mode 100644 components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs create mode 100644 components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs create mode 100644 components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs create mode 100644 components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs create mode 100644 components/workday/actions/create-payroll-input/create-payroll-input.mjs create mode 100644 components/workday/actions/create-prospect/create-prospect.mjs create mode 100644 components/workday/actions/create-succession-plan/create-succession-plan.mjs create mode 100644 components/workday/actions/create-tax-rate/create-tax-rate.mjs create mode 100644 components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs create mode 100644 components/workday/actions/delete-payroll-input/delete-payroll-input.mjs create mode 100644 components/workday/actions/get-content-details/get-content-details.mjs create mode 100644 components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs create mode 100644 components/workday/actions/get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs create mode 100644 components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs create mode 100644 components/workday/actions/get-interview-details/get-interview-details.mjs create mode 100644 components/workday/actions/get-job-change-details/get-job-change-details.mjs create mode 100644 components/workday/actions/get-job-details/get-job-details.mjs create mode 100644 components/workday/actions/get-job-family-details/get-job-family-details.mjs create mode 100644 components/workday/actions/get-job-pay-group/get-job-pay-group.mjs create mode 100644 components/workday/actions/get-job-posting/get-job-posting.mjs create mode 100644 components/workday/actions/get-job-profile-details/get-job-profile-details.mjs create mode 100644 components/workday/actions/get-mentorship-details/get-mentorship-details.mjs create mode 100644 components/workday/actions/get-minimum-wage-rate-details/get-minimum-wage-rate-details.mjs create mode 100644 components/workday/actions/get-org-assignment-change-details/get-org-assignment-change-details.mjs create mode 100644 components/workday/actions/get-pay-group-detail/get-pay-group-detail.mjs create mode 100644 components/workday/actions/get-pay-group/get-pay-group.mjs create mode 100644 components/workday/actions/get-payroll-input-details/get-payroll-input-details.mjs create mode 100644 components/workday/actions/get-person-photo/get-person-photo.mjs create mode 100644 components/workday/actions/get-person/get-person.mjs create mode 100644 components/workday/actions/get-prospect-details/get-prospect-details.mjs create mode 100644 components/workday/actions/get-succession-plan-details/get-succession-plan-details.mjs create mode 100644 components/workday/actions/get-supervisory-org-details/get-supervisory-org-details.mjs create mode 100644 components/workday/actions/get-supervisory-org-members/get-supervisory-org-members.mjs create mode 100644 components/workday/actions/get-work-contact-information-change/get-work-contact-information-change.mjs create mode 100644 components/workday/actions/get-worker-anytime-feedback-events/get-worker-anytime-feedback-events.mjs create mode 100644 components/workday/actions/get-worker-goals/get-worker-goals.mjs create mode 100644 components/workday/actions/list-content/list-content.mjs create mode 100644 components/workday/actions/list-feedback-badges/list-feedback-badges.mjs create mode 100644 components/workday/actions/list-give-requested-feedback-events/list-give-requested-feedback-events.mjs create mode 100644 components/workday/actions/list-holiday-events/list-holiday-events.mjs create mode 100644 components/workday/actions/list-home-contact-information-changes/list-home-contact-information-changes.mjs create mode 100644 components/workday/actions/list-interviews/list-interviews.mjs create mode 100644 components/workday/actions/list-job-changes/list-job-changes.mjs create mode 100644 components/workday/actions/list-job-families/list-job-families.mjs create mode 100644 components/workday/actions/list-job-postings/list-job-postings.mjs create mode 100644 components/workday/actions/list-job-profiles/list-job-profiles.mjs create mode 100644 components/workday/actions/list-jobs/list-jobs.mjs create mode 100644 components/workday/actions/list-mentorships/list-mentorships.mjs create mode 100644 components/workday/actions/list-minimum-wage-rates/list-minimum-wage-rates.mjs create mode 100644 components/workday/actions/list-org-assignment-changes/list-org-assignment-changes.mjs create mode 100644 components/workday/actions/list-pay-group-details/list-pay-group-details.mjs create mode 100644 components/workday/actions/list-pay-groups/list-pay-groups.mjs create mode 100644 components/workday/actions/list-payroll-inputs/list-payroll-inputs.mjs create mode 100644 components/workday/actions/list-people/list-people.mjs create mode 100644 components/workday/actions/list-prospects/list-prospects.mjs create mode 100644 components/workday/actions/list-succession-plans/list-succession-plans.mjs create mode 100644 components/workday/actions/list-tax-rates/list-tax-rates.mjs create mode 100644 components/workday/actions/list-work-contact-information-changes/list-work-contact-information-changes.mjs create mode 100644 components/workday/actions/list-workers/list-workers.mjs create mode 100644 components/workday/actions/update-mentorship/update-mentorship.mjs create mode 100644 components/workday/actions/update-payroll-input/update-payroll-input.mjs create mode 100644 components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs create mode 100644 components/workday/actions/validate-phone-number/validate-phone-number.mjs create mode 100644 components/workday/sources/common/utils.mjs diff --git a/components/workday/actions/close-mentorship/close-mentorship.mjs b/components/workday/actions/close-mentorship/close-mentorship.mjs new file mode 100644 index 0000000000000..e813cc6779ec3 --- /dev/null +++ b/components/workday/actions/close-mentorship/close-mentorship.mjs @@ -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; + }, +}; diff --git a/components/workday/actions/create-digital-course/create-digital-course.mjs b/components/workday/actions/create-digital-course/create-digital-course.mjs new file mode 100644 index 0000000000000..6d46ab0b4e5c3 --- /dev/null +++ b/components/workday/actions/create-digital-course/create-digital-course.mjs @@ -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'."); + } + if (!this.description || !this.description.trim()) { + throw new ConfigurationError("`description` is required."); + } + + const data = { + topics: parsedTopics, + title: this.title, + availabilityStatus: this.availabilityStatus, + lessons: parsedLessons, + description: this.description, + }; + + const response = await this.workday.createDigitalCourse({ + $, + data, + }); + $.export("$summary", "Digital course created"); + return response; + }, +}; diff --git a/components/workday/actions/create-distribution-request/create-distribution-request.mjs b/components/workday/actions/create-distribution-request/create-distribution-request.mjs new file mode 100644 index 0000000000000..ad044ff87cb37 --- /dev/null +++ b/components/workday/actions/create-distribution-request/create-distribution-request.mjs @@ -0,0 +1,80 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-distribution-request", + name: "Create Distribution Request", + description: "Create a new distribution request. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#journeys/v1/post-/distributionRequests)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + builder: { + type: "object", + label: "Builder", + description: "A journey builder object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + category: { + type: "object", + label: "Category", + description: "A journey category object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + discoverableBuilder: { + type: "object", + label: "Discoverable Builder", + description: "A discoverable journey builder object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + includePreviousRecipients: { + type: "boolean", + label: "Include Previous Recipients", + description: "Whether to include previous recipients. Example: `true`", + optional: true, + }, + relatedRole: { + type: "object", + label: "Related Role", + description: "Related role object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Display name for the instance. Example: `Distribution Request for Training`", + optional: true, + }, + }, + async run({ $ }) { + if (!this.builder || typeof this.builder !== "object" || !this.builder.id || !this.builder.id.trim()) { + throw new ConfigurationError("Builder is required and must be an object with a non-empty id property."); + } + if (!this.category || typeof this.category !== "object" || !this.category.id || !this.category.id.trim()) { + throw new ConfigurationError("Category is required and must be an object with a non-empty id property."); + } + if (this.discoverableBuilder && (typeof this.discoverableBuilder !== "object" || !this.discoverableBuilder.id || !this.discoverableBuilder.id.trim())) { + throw new ConfigurationError("Discoverable Builder (if provided) must be an object with a non-empty id property."); + } + if (this.relatedRole && (typeof this.relatedRole !== "object" || !this.relatedRole.id || !this.relatedRole.id.trim())) { + throw new ConfigurationError("Related Role (if provided) must be an object with a non-empty id property."); + } + + const data = { + builder: this.builder, + category: this.category, + }; + if (this.discoverableBuilder) data.discoverableBuilder = this.discoverableBuilder; + if (typeof this.includePreviousRecipients === "boolean") data.includePreviousRecipients = this.includePreviousRecipients; + if (this.relatedRole) data.relatedRole = this.relatedRole; + if (this.descriptor) data.descriptor = this.descriptor; + + const response = await this.workday.createDistributionRequest({ + $, + data, + }); + $.export("$summary", "Distribution request created"); + return response; + }, +}; diff --git a/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs b/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs new file mode 100644 index 0000000000000..32fbe394d7bf4 --- /dev/null +++ b/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs @@ -0,0 +1,36 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-initiate-home-contact-information-change", + name: "Initiate Home Contact Information Change", + description: "Initiates a home contact change for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + }, + 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: {}, + $, + }); + $.export("$summary", `Home contact change event initiated for worker ID ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs b/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs new file mode 100644 index 0000000000000..852b3bda0f907 --- /dev/null +++ b/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs @@ -0,0 +1,86 @@ +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: { + type: "object", + label: "Mentor", + description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`", + }, + comment: { + type: "string", + label: "Comment", + description: "Optional. Comment field for notes or special requests.", + optional: true, + }, + mentorType: { + type: "object", + label: "Mentor Type", + description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`", + optional: true, + }, + 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.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) { + throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property."); + } + if (this.mentorType !== undefined) { + if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) { + throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property."); + } + } + + const data = { + endDate: this.endDate, + startDate: this.startDate, + purpose: this.purpose, + mentor: 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; + }, +}; diff --git a/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs b/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs new file mode 100644 index 0000000000000..ca336cb85bfa4 --- /dev/null +++ b/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs @@ -0,0 +1,94 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-mentorship-for-worker", + name: "Create Mentorship For Worker", + description: "Create a mentorship for a specific worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/post-/createMentorshipForWorker)", + 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: { + type: "object", + label: "Mentor", + description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`", + }, + comment: { + type: "string", + label: "Comment", + description: "Comment for notes (optional).", + optional: true, + }, + mentorType: { + type: "object", + label: "Mentor Type", + description: "Object with at least an `id` property. Example payload: `{\"id\": \"00000000000000000000000000000000\"}`", + }, + mentee: { + type: "object", + label: "Mentee", + description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`", + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Display name of the mentorship (optional).", + 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.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) { + throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property."); + } + if (!this.mentee || typeof this.mentee !== "object" || !this.mentee.id || !this.mentee.id.trim()) { + throw new ConfigurationError("Mentee is required and must be an object with a non-empty id property."); + } + if (this.mentorType !== undefined) { + if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) { + throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property."); + } + } + + const data = { + endDate: this.endDate, + startDate: this.startDate, + purpose: this.purpose, + mentor: this.mentor, + mentee: this.mentee, + mentorType: this.mentorType, + }; + if (this.comment) data.comment = this.comment; + if (this.descriptor) data.descriptor = this.descriptor; + + const response = await this.workday.createMentorshipForWorker({ + $, + data, + }); + $.export("$summary", "Mentorship created for worker"); + return response; + }, +}; diff --git a/components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs b/components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs new file mode 100644 index 0000000000000..088a70aa39c12 --- /dev/null +++ b/components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs @@ -0,0 +1,80 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-organization-assignment-change", + name: "Create Organization Assignment Change", + description: "Create a new organization assignment change compliant with Workday API structure.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/post-/organizationAssignmentChanges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + position: { + type: "object", + label: "Position", + description: "Position with at least an `id` property. Example: `{ id: \"00000000000000000000000000000000\"}`", + }, + date: { + type: "string", + label: "Date", + description: "Example: `2025-10-18T07:00:00.000Z`", + }, + massActionWorksheet: { + type: "object", + label: "Mass Action Worksheet", + description: "Mass Action Worksheet with at least an `id` property if supplied. Example: `{ id: \"00000000000000000000000000000000\"}`", + optional: true, + }, + massActionHeader: { + type: "object", + label: "Mass Action Header", + description: "Mass Action Header with at least an `id` property if supplied. Example: `{ id: \"00000000000000000000000000000000\"}`", + optional: true, + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Display name for the change.", + optional: true, + }, + }, + async run({ $ }) { + if (!this.position || typeof this.position !== "object" || !this.position.id || !this.position.id.trim()) { + throw new ConfigurationError("Position object is required, with a non-empty id property."); + } + if (!this.date || !this.date.trim()) { + throw new ConfigurationError("Date is required and cannot be empty."); + } + if (this.massActionWorksheet !== undefined) { + if (typeof this.massActionWorksheet !== "object" || !this.massActionWorksheet.id || !this.massActionWorksheet.id.trim()) { + throw new ConfigurationError("If provided, Mass Action Worksheet must be an object with a non-empty id property."); + } + } + if (this.massActionHeader !== undefined) { + if (typeof this.massActionHeader !== "object" || !this.massActionHeader.id || !this.massActionHeader.id.trim()) { + throw new ConfigurationError("If provided, Mass Action Header must be an object with a non-empty id property."); + } + } + + // Build payload + const data = { + position: this.position, + date: this.date, + }; + if (this.massActionWorksheet) data.massActionWorksheet = this.massActionWorksheet; + if (this.massActionHeader) data.massActionHeader = this.massActionHeader; + if (this.descriptor) data.descriptor = this.descriptor; + + const response = await this.workday.createOrganizationAssignmentChange({ + $, + data, + }); + $.export("$summary", "Created organization assignment change"); + return response; + }, +}; diff --git a/components/workday/actions/create-payroll-input/create-payroll-input.mjs b/components/workday/actions/create-payroll-input/create-payroll-input.mjs new file mode 100644 index 0000000000000..b77b9b4a16a44 --- /dev/null +++ b/components/workday/actions/create-payroll-input/create-payroll-input.mjs @@ -0,0 +1,57 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-payroll-input", + name: "Create Payroll Input", + description: "Creates a payroll input instance. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/post-/payrollInputs)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + worker: { + type: "object", + label: "Worker", + description: "The worker for this payroll input. Example: `{ \"id\": \"worker-id\", \"descriptor\": \"Worker Name\" }`", + }, + payComponent: { + type: "object", + label: "Pay Component", + description: "The pay component for this payroll input. Example: `{ \"id\": \"component-id\", \"descriptor\": \"Comp Name\", \"code\": \"COMP01\" }`", + }, + startDate: { + type: "string", + label: "Start Date", + description: "Effective start date. Example: `2012-01-01T08:00:00.000Z`", + }, + }, + async run({ $ }) { + if (!this.worker || typeof this.worker !== "object" || !this.worker.id) { + throw new ConfigurationError("worker (object with non-empty id) is required."); + } + if (!this.payComponent || typeof this.payComponent !== "object" || !this.payComponent.id) { + throw new ConfigurationError("payComponent (object with non-empty id) is required."); + } + if (!this.startDate || !this.startDate.trim()) { + throw new ConfigurationError("startDate is required and cannot be empty."); + } + + const data = { + worker: this.worker, + payComponent: this.payComponent, + startDate: this.startDate, + }; + + const response = await this.workday.createPayrollInput({ + $, + data, + }); + $.export("$summary", "Payroll input Successfully created"); + return response; + }, +}; diff --git a/components/workday/actions/create-prospect/create-prospect.mjs b/components/workday/actions/create-prospect/create-prospect.mjs new file mode 100644 index 0000000000000..a0276430084a2 --- /dev/null +++ b/components/workday/actions/create-prospect/create-prospect.mjs @@ -0,0 +1,46 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-prospect", + name: "Create Prospect (Required Only)", + description: "Create a new prospect. [See documentation] (https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/post-/prospects)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + candidate: { + type: "object", + label: "Candidate", + description: "The candidate object. Must include `name.country.id`. Example: { \"name\": { \"country\": { \"id\": \"USA\" } } }", + }, + }, + async run({ $ }) { + if ( + !this.candidate || + typeof this.candidate !== "object" || + !this.candidate.name || + typeof this.candidate.name !== "object" || + !this.candidate.name.country || + typeof this.candidate.name.country !== "object" || + !this.candidate.name.country.id || + !this.candidate.name.country.id.trim() + ) { + throw new ConfigurationError("candidate.name.country.id is required."); + } + const data = { + candidate: this.candidate, + }; + const response = await this.workday.createProspect({ + data, + $, + }); + $.export("$summary", "Prospect created"); + return response; + }, +}; diff --git a/components/workday/actions/create-succession-plan/create-succession-plan.mjs b/components/workday/actions/create-succession-plan/create-succession-plan.mjs new file mode 100644 index 0000000000000..83e858e89a17d --- /dev/null +++ b/components/workday/actions/create-succession-plan/create-succession-plan.mjs @@ -0,0 +1,70 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-succession-plan", + name: "Create Succession Plan", + description: "Create a new succession plan. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/post-/successionPlans)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + position: { + type: "object", + label: "Position", + description: "The position associated with the succession plan. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + supervisoryOrg: { + type: "object", + label: "Supervisory Organization", + description: "The organization associated with the succession plan. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + successionPlan: { + type: "object", + label: "Succession Plan", + description: "The reference to the succession plan instance. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Display name of the instance.", + optional: true, + }, + }, + async run({ $ }) { + if ( + !this.position || typeof this.position !== "object" || !this.position.id || !this.position.id.trim() + ) { + throw new ConfigurationError("Position is required and must be an object with a non-empty id property."); + } + if ( + !this.supervisoryOrg || typeof this.supervisoryOrg !== "object" || !this.supervisoryOrg.id || !this.supervisoryOrg.id.trim() + ) { + throw new ConfigurationError("Supervisory Organization is required and must be an object with a non-empty id property."); + } + if ( + !this.successionPlan || typeof this.successionPlan !== "object" || !this.successionPlan.id || !this.successionPlan.id.trim() + ) { + throw new ConfigurationError("Succession Plan is required and must be an object with a non-empty id property."); + } + + const data = { + position: this.position, + supervisoryOrg: this.supervisoryOrg, + successionPlan: this.successionPlan, + }; + if (this.descriptor) data.descriptor = this.descriptor; + + const response = await this.workday.createSuccessionPlan({ + $, + data, + }); + $.export("$summary", "Succession plan created"); + return response; + }, +}; diff --git a/components/workday/actions/create-tax-rate/create-tax-rate.mjs b/components/workday/actions/create-tax-rate/create-tax-rate.mjs new file mode 100644 index 0000000000000..d158bdabd709d --- /dev/null +++ b/components/workday/actions/create-tax-rate/create-tax-rate.mjs @@ -0,0 +1,92 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-create-tax-rate", + name: "Create Tax Rate", + description: "Create a company tax rate. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/post-/taxRates)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + ein: { + type: "string", + label: "EIN", + description: "Tax authority EIN field. Example: `664-8144-7`", + optional: true, + }, + taxCode: { + type: "string", + label: "Tax Code", + description: "Tax deduction code. Example: `WL_SUIER`", + }, + applicableRate: { + type: "string", + label: "Applicable Rate", + description: "Tax rate override. Example: `9.9`", + optional: true, + }, + endDate: { + type: "string", + label: "End Date", + description: "End date for company tax reporting. Example: `2018-12-31T08:00:00.000Z`", + optional: true, + }, + stateInstance: { + type: "object", + label: "State Instance", + description: "Payroll tax authority object. Example: `{ \"id\": \"state-id\" }`", + }, + companyInstance: { + type: "object", + label: "Company Instance", + description: "Company object for tax reporting. Example: `{ \"id\": \"company-id\" }`", + optional: true, + }, + exempt: { + type: "boolean", + label: "Exempt", + description: "True if SUI rate is exempt. Example: `true`", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Start date for company tax reporting. Example: `2008-01-01T08:00:00.000Z`", + }, + }, + async run({ $ }) { + if (this.stateInstance && (typeof this.stateInstance !== "object" || !this.stateInstance.id || !this.stateInstance.id.trim())) { + throw new ConfigurationError("stateInstance is required to have a non-empty id property."); + } + if (!this.taxCode || !this.taxCode.trim()) { + throw new ConfigurationError("Tax Code is required."); + } + if (!this.startDate || !this.startDate.trim()) { + throw new ConfigurationError("Start Date is required."); + } + + const data = { + stateInstance: this.stateInstance, + taxCode: this.taxCode, + startDate: this.startDate, + }; + if (this.applicableRate) data.applicableRate = this.applicableRate; + if (this.endDate) data.endDate = this.endDate; + if (this.ein) data.ein = this.ein; + if (this.companyInstance) data.companyInstance = this.companyInstance; + if (typeof this.exempt === "boolean") data.exempt = this.exempt; + + const response = await this.workday.createTaxRate({ + $, + data, + }); + $.export("$summary", "Tax rate created"); + return response; + }, +}; diff --git a/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs b/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs new file mode 100644 index 0000000000000..dc51a5c50286e --- /dev/null +++ b/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs @@ -0,0 +1,36 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-initiate-work-contact-information-change", + name: "Initiate Work Contact Information Change", + description: "Initiate a work contact change event for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + }, + async run({ $ }) { + if (!this.workerId || !this.workerId.trim()) { + throw new ConfigurationError("Worker ID is required."); + } + const response = await this.workday.createWorkContactInformationChange({ + workerId: this.workerId, + data: {}, + $, + }); + $.export("$summary", `Work contact change event initiated for worker ID ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs b/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs new file mode 100644 index 0000000000000..17a833789d25f --- /dev/null +++ b/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-delete-payroll-input", + name: "Delete Payroll Input", + description: "Delete a payroll input by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/delete-/payrollInputs/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: true, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + payrollInputId: { + propDefinition: [workday, "payrollInputId"], + }, + }, + async run({ $ }) { + if (!this.payrollInputId || !this.payrollInputId.trim()) { + throw new ConfigurationError("Payroll Input ID is required."); + } + const response = await this.workday.deletePayrollInput({ + id: this.payrollInputId, + $, + }); + $.export("$summary", `Payroll input ${this.payrollInputId} deleted`); + return response; + }, +}; diff --git a/components/workday/actions/get-content-details/get-content-details.mjs b/components/workday/actions/get-content-details/get-content-details.mjs new file mode 100644 index 0000000000000..d9e05197f7610 --- /dev/null +++ b/components/workday/actions/get-content-details/get-content-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-content-details", + name: "Get Content Details", + description: "Get details of a learning content item by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#learning/v1/get-/content/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + contentId: { + propDefinition: [ + workday, + "contentId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getContent({ + id: this.contentId, + $, + }); + $.export("$summary", `Fetched details for content ID ${this.contentId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs b/components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs new file mode 100644 index 0000000000000..245b49598a262 --- /dev/null +++ b/components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-feedback-badge-details", + name: "Get Feedback Badge Details", + description: "Get details of a feedback badge by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/feedbackBadges/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + feedbackBadgeId: { + propDefinition: [ + workday, + "feedbackBadgeId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getFeedbackBadge({ + id: this.feedbackBadgeId, + $, + }); + $.export("$summary", `Fetched details for feedback badge ID ${this.feedbackBadgeId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs b/components/workday/actions/get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs new file mode 100644 index 0000000000000..e937f3678eb29 --- /dev/null +++ b/components/workday/actions/get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-give-requested-feedback-event-details", + name: "Get Give Requested Feedback Event Details", + description: "Get details of a requested feedback event by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/giveRequestedFeedbackEvents/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + giveRequestedFeedbackEventId: { + propDefinition: [ + workday, + "giveRequestedFeedbackEventId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getGiveRequestedFeedbackEvent({ + id: this.giveRequestedFeedbackEventId, + $, + }); + $.export("$summary", `Fetched details for feedback event ID ${this.giveRequestedFeedbackEventId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs new file mode 100644 index 0000000000000..0adc990a88e44 --- /dev/null +++ b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-home-contact-information-change", + name: "Get Home Contact Information Change", + description: "Get a specific home contact information change by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/homeContactInformationChanges-get)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + workday, + homeContactInformationChangeId: { + propDefinition: [ + workday, + "homeContactInformationChangeId", + ], + }, + } + , + async run({ $ }) { + const response = await this.workday.getHomeContactInformationChange({ + homeContactInformationChangeId: this.homeContactInformationChangeId, + $, + }); + $.export("$summary", `Successfully fetched home contact information change with ID ${this.id}`); + return response; + }, +}; diff --git a/components/workday/actions/get-interview-details/get-interview-details.mjs b/components/workday/actions/get-interview-details/get-interview-details.mjs new file mode 100644 index 0000000000000..6b5df31fc4316 --- /dev/null +++ b/components/workday/actions/get-interview-details/get-interview-details.mjs @@ -0,0 +1,29 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-interview-details", + name: "Get Interview Details", + description: "Get details for a specific interview. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/interviews/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + interviewId: { + type: "string", + label: "Interview ID", + description: "The unique identifier for the interview.", + }, + }, + async run({ $ }) { + const response = await this.workday.getInterview({ + id: this.interviewId, + $, + }); + $.export("$summary", `Fetched details for interview ID ${this.interviewId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-change-details/get-job-change-details.mjs b/components/workday/actions/get-job-change-details/get-job-change-details.mjs new file mode 100644 index 0000000000000..a41f3e29b4613 --- /dev/null +++ b/components/workday/actions/get-job-change-details/get-job-change-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-job-change-details", + name: "Get Job Change Details", + description: "Retrieve details for a specific job change by its ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobChanges/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobChangeId: { + propDefinition: [ + workday, + "jobChangeId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJobChangeDetails({ + id: this.jobChangeId, + $, + }); + $.export("$summary", `Fetched job change details for ID ${this.jobChangeId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-details/get-job-details.mjs b/components/workday/actions/get-job-details/get-job-details.mjs new file mode 100644 index 0000000000000..4c034d03630aa --- /dev/null +++ b/components/workday/actions/get-job-details/get-job-details.mjs @@ -0,0 +1,30 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-job-details", + name: "Get Job Details", + description: "Get job details by ID.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobs/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobId: { + propDefinition: [ + workday, + "jobId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJob({ + id: this.jobId, + $, + }); + $.export("$summary", `Fetched job ${this.jobId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-family-details/get-job-family-details.mjs b/components/workday/actions/get-job-family-details/get-job-family-details.mjs new file mode 100644 index 0000000000000..8e41daf315f17 --- /dev/null +++ b/components/workday/actions/get-job-family-details/get-job-family-details.mjs @@ -0,0 +1,30 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-job-family-details", + name: "Get Job Family Details", + description: "Get job family details by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobProfiles/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobFamilyId: { + propDefinition: [ + workday, + "jobFamilyId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJobFamily({ + id: this.jobFamilyId, + $, + }); + $.export("$summary", `Fetched job family ${this.jobFamilyId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-pay-group/get-job-pay-group.mjs b/components/workday/actions/get-job-pay-group/get-job-pay-group.mjs new file mode 100644 index 0000000000000..90afabf35ec9e --- /dev/null +++ b/components/workday/actions/get-job-pay-group/get-job-pay-group.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-job-pay-group", + name: "Get Job Pay Group", + description: "Get the payroll job's pay group by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/jobs/-ID-/payGroup)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobId: { + propDefinition: [ + workday, + "jobId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJobPayGroup({ + id: this.jobId, + $, + }); + $.export("$summary", `Fetched pay group for job ID ${this.jobId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-posting/get-job-posting.mjs b/components/workday/actions/get-job-posting/get-job-posting.mjs new file mode 100644 index 0000000000000..a4ccf991578a1 --- /dev/null +++ b/components/workday/actions/get-job-posting/get-job-posting.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-job-posting-details", + name: "Get Job Posting Details", + description: "Get details for a job posting by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/jobPostings/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobPostingId: { + propDefinition: [ + workday, + "jobPostingId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJobPosting({ + id: this.jobPostingId, + $, + }); + $.export("$summary", `Fetched details for job posting ID ${this.jobPostingId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-job-profile-details/get-job-profile-details.mjs b/components/workday/actions/get-job-profile-details/get-job-profile-details.mjs new file mode 100644 index 0000000000000..e1a1e966c20a2 --- /dev/null +++ b/components/workday/actions/get-job-profile-details/get-job-profile-details.mjs @@ -0,0 +1,30 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-job-profile-details", + name: "Get Job Profile Details", + description: "Get job profile details by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobProfiles/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + jobProfileId: { + propDefinition: [ + workday, + "jobProfileId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getJobProfile({ + id: this.jobProfileId, + $, + }); + $.export("$summary", `Fetched job profile ${this.jobProfileId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-mentorship-details/get-mentorship-details.mjs b/components/workday/actions/get-mentorship-details/get-mentorship-details.mjs new file mode 100644 index 0000000000000..ab3a27246e4e9 --- /dev/null +++ b/components/workday/actions/get-mentorship-details/get-mentorship-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-mentorship-details", + name: "Get Mentorship Details", + description: "Get details of a mentorship by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/get-/mentorships/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + mentorshipId: { + propDefinition: [ + workday, + "mentorshipId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getMentorship({ + id: this.mentorshipId, + $, + }); + $.export("$summary", `Fetched details for mentorship ID ${this.mentorshipId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-minimum-wage-rate-details/get-minimum-wage-rate-details.mjs b/components/workday/actions/get-minimum-wage-rate-details/get-minimum-wage-rate-details.mjs new file mode 100644 index 0000000000000..7713687b5ce88 --- /dev/null +++ b/components/workday/actions/get-minimum-wage-rate-details/get-minimum-wage-rate-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-minimum-wage-rate-details", + name: "Get Minimum Wage Rate Details", + description: "Get details of a minimum wage rate by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/minimumWageRates/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + minimumWageRateId: { + propDefinition: [ + workday, + "minimumWageRateId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getMinimumWageRate({ + id: this.minimumWageRateId, + $, + }); + $.export("$summary", `Fetched details for minimum wage rate ID ${this.minimumWageRateId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-org-assignment-change-details/get-org-assignment-change-details.mjs b/components/workday/actions/get-org-assignment-change-details/get-org-assignment-change-details.mjs new file mode 100644 index 0000000000000..acc40f25679bd --- /dev/null +++ b/components/workday/actions/get-org-assignment-change-details/get-org-assignment-change-details.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-org-assignment-change-details", + name: "Get Organization Assignment Change Details", + description: "Get details for an organization assignment change.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/organizationAssignmentChanges/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + organizationAssignmentChangeId: { + propDefinition: [ + workday, + "organizationAssignmentChangeId", + ], + }, + }, + + async run({ $ }) { + const response = await this.workday.getOrganizationAssignmentChange({ + id: this.organizationAssignmentChangeId, + $, + }); + $.export("$summary", `Fetched organization assignment change ${this.organizationAssignmentChangeId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-pay-group-detail/get-pay-group-detail.mjs b/components/workday/actions/get-pay-group-detail/get-pay-group-detail.mjs new file mode 100644 index 0000000000000..2030cab130439 --- /dev/null +++ b/components/workday/actions/get-pay-group-detail/get-pay-group-detail.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-pay-group-detail", + name: "Get Pay Group Detail", + description: "Get pay group detail by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payGroupDetails/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + payGroupDetailId: { + propDefinition: [ + workday, + "payGroupDetailId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getPayGroupDetail({ + id: this.payGroupDetailId, + $, + }); + $.export("$summary", `Fetched pay group detail ID ${this.payGroupDetailId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-pay-group/get-pay-group.mjs b/components/workday/actions/get-pay-group/get-pay-group.mjs new file mode 100644 index 0000000000000..2d8b06767748a --- /dev/null +++ b/components/workday/actions/get-pay-group/get-pay-group.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-pay-group", + name: "Get Pay Group", + description: "Get pay group by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payGroups/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + payGroupId: { + propDefinition: [ + workday, + "payGroupId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getPayGroup({ + id: this.payGroupId, + $, + }); + $.export("$summary", `Fetched pay group for ID ${this.payGroupId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-payroll-input-details/get-payroll-input-details.mjs b/components/workday/actions/get-payroll-input-details/get-payroll-input-details.mjs new file mode 100644 index 0000000000000..537ad8feb095b --- /dev/null +++ b/components/workday/actions/get-payroll-input-details/get-payroll-input-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-payroll-input-details", + name: "Get Payroll Input Details", + description: "Get details of a payroll input by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payrollInputs/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + payrollInputId: { + propDefinition: [ + workday, + "payrollInputId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getPayrollInput({ + id: this.payrollInputId, + $, + }); + $.export("$summary", `Fetched details for payroll input ID ${this.payrollInputId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-person-photo/get-person-photo.mjs b/components/workday/actions/get-person-photo/get-person-photo.mjs new file mode 100644 index 0000000000000..93a13858fac6f --- /dev/null +++ b/components/workday/actions/get-person-photo/get-person-photo.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-person-photo", + name: "Get Person Photo", + description: "Get photo for a person by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/get-/people/-ID-/photos)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + personId: { + propDefinition: [ + workday, + "personId", + ], + description: "The ID of the person whose photo to retrieve.", + }, + }, + async run({ $ }) { + const response = await this.workday.getPersonPhoto({ + id: this.personId, + $, + }); + $.export("$summary", `Successfully fetched photo for person ID ${this.personId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-person/get-person.mjs b/components/workday/actions/get-person/get-person.mjs new file mode 100644 index 0000000000000..1844f6cc8215d --- /dev/null +++ b/components/workday/actions/get-person/get-person.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-person", + name: "Get Person Details", + description: "Get details for a specific person by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/get-/people/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + personId: { + propDefinition: [ + workday, + "personId", + ], + description: "The ID of the person to retrieve.", + }, + }, + async run({ $ }) { + const response = await this.workday.getPerson({ + id: this.personId, + $, + }); + $.export("$summary", `Successfully fetched person details for ID ${this.personId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-prospect-details/get-prospect-details.mjs b/components/workday/actions/get-prospect-details/get-prospect-details.mjs new file mode 100644 index 0000000000000..0ff13cd7f055f --- /dev/null +++ b/components/workday/actions/get-prospect-details/get-prospect-details.mjs @@ -0,0 +1,30 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-prospect-details", + name: "Get Prospect Details", + description: "Get details for a specific prospect by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/prospects/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + prospectId: { + propDefinition: [ + workday, + "prospectId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getProspect({ + id: this.prospectId, + $, + }); + $.export("$summary", `Fetched details for prospect ID ${this.prospectId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-succession-plan-details/get-succession-plan-details.mjs b/components/workday/actions/get-succession-plan-details/get-succession-plan-details.mjs new file mode 100644 index 0000000000000..8e93f30ff5a6a --- /dev/null +++ b/components/workday/actions/get-succession-plan-details/get-succession-plan-details.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-succession-plan-details", + name: "Get Succession Plan Details", + description: "Get details of a succession plan by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/get-/successionPlans/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + successionPlanId: { + propDefinition: [ + workday, + "successionPlanId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getSuccessionPlan({ + id: this.successionPlanId, + $, + }); + $.export("$summary", `Fetched details for succession plan ID ${this.successionPlanId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-supervisory-org-details/get-supervisory-org-details.mjs b/components/workday/actions/get-supervisory-org-details/get-supervisory-org-details.mjs new file mode 100644 index 0000000000000..c9fd3d605d44e --- /dev/null +++ b/components/workday/actions/get-supervisory-org-details/get-supervisory-org-details.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-supervisory-org-details", + name: "Get Supervisory Organization Details", + description: "Get details for a supervisory organization.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/supervisoryOrganizations/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + supervisoryOrganizationId: { + propDefinition: [ + workday, + "supervisoryOrganizationId", + ], + }, + }, + + async run({ $ }) { + const response = await this.workday.getSupervisoryOrganization({ + id: this.supervisoryOrganizationId, + $, + }); + $.export("$summary", `Fetched supervisory organization ${this.supervisoryOrganizationId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-supervisory-org-members/get-supervisory-org-members.mjs b/components/workday/actions/get-supervisory-org-members/get-supervisory-org-members.mjs new file mode 100644 index 0000000000000..a64bd373dd648 --- /dev/null +++ b/components/workday/actions/get-supervisory-org-members/get-supervisory-org-members.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-supervisory-org-members", + name: "Get Supervisory Organization Members", + description: "Get members of a supervisory organization.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/supervisoryOrganizations/-ID-/members)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + supervisoryOrganizationId: { + propDefinition: [ + workday, + "supervisoryOrganizationId", + ], + }, + }, + + async run({ $ }) { + const response = await this.workday.getSupervisoryOrganizationMembers({ + id: this.supervisoryOrganizationId, + $, + }); + $.export("$summary", `Fetched members in supervisory organization ${this.supervisoryOrganizationId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-work-contact-information-change/get-work-contact-information-change.mjs b/components/workday/actions/get-work-contact-information-change/get-work-contact-information-change.mjs new file mode 100644 index 0000000000000..a6623aa44463f --- /dev/null +++ b/components/workday/actions/get-work-contact-information-change/get-work-contact-information-change.mjs @@ -0,0 +1,29 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-get-work-contact-information-change", + name: "Get Work Contact Information Change", + description: "Get specific work contact information change by ID. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/get-/workContactInformationChanges/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + workContactInformationChangeId: { + type: "string", + label: "Work Contact Information Change ID", + description: "The ID of the work contact information change.", + }, + }, + async run({ $ }) { + const response = await this.workday.getWorkContactInformationChange({ + id: this.workContactInformationChangeId, + $, + }); + $.export("$summary", `Fetched change ${this.workContactInformationChangeId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-worker-anytime-feedback-events/get-worker-anytime-feedback-events.mjs b/components/workday/actions/get-worker-anytime-feedback-events/get-worker-anytime-feedback-events.mjs new file mode 100644 index 0000000000000..eefea14ab1893 --- /dev/null +++ b/components/workday/actions/get-worker-anytime-feedback-events/get-worker-anytime-feedback-events.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-worker-anytime-feedback-events", + name: "Get Worker Anytime Feedback Events", + description: "Retrieve anytime feedback events for a worker by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/workers/-ID-/anytimeFeedbackEvents)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getWorkerAnytimeFeedbackEvents({ + id: this.workerId, + $, + }); + $.export("$summary", `Fetched anytime feedback events for worker ID ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/get-worker-goals/get-worker-goals.mjs b/components/workday/actions/get-worker-goals/get-worker-goals.mjs new file mode 100644 index 0000000000000..403e2e2923026 --- /dev/null +++ b/components/workday/actions/get-worker-goals/get-worker-goals.mjs @@ -0,0 +1,31 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-get-worker-goals", + name: "Get Worker Goals", + description: "Retrieve a worker's goals by worker ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/workers/-ID-/goals)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + workerId: { + propDefinition: [ + workday, + "workerId", + ], + }, + }, + async run({ $ }) { + const response = await this.workday.getWorkerGoals({ + id: this.workerId, + $, + }); + $.export("$summary", `Fetched goals for worker ID ${this.workerId}`); + return response; + }, +}; diff --git a/components/workday/actions/list-content/list-content.mjs b/components/workday/actions/list-content/list-content.mjs new file mode 100644 index 0000000000000..0897f7f8f9db9 --- /dev/null +++ b/components/workday/actions/list-content/list-content.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-content", + name: "List Content", + description: "List all learning content. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#learning/v1/get-/content)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listContent({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} content items`); + return response; + }, +}; diff --git a/components/workday/actions/list-feedback-badges/list-feedback-badges.mjs b/components/workday/actions/list-feedback-badges/list-feedback-badges.mjs new file mode 100644 index 0000000000000..ea74009af7f7e --- /dev/null +++ b/components/workday/actions/list-feedback-badges/list-feedback-badges.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-feedback-badges", + name: "List Feedback Badges", + description: "List all feedback badges. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/feedbackBadges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listFeedbackBadges({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} feedback badges`); + return response; + }, +}; diff --git a/components/workday/actions/list-give-requested-feedback-events/list-give-requested-feedback-events.mjs b/components/workday/actions/list-give-requested-feedback-events/list-give-requested-feedback-events.mjs new file mode 100644 index 0000000000000..737a7b51280dc --- /dev/null +++ b/components/workday/actions/list-give-requested-feedback-events/list-give-requested-feedback-events.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-give-requested-feedback-events", + name: "List Give Requested Feedback Events", + description: "List all requested feedback events. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#performanceEnablement/v5/get-/giveRequestedFeedbackEvents)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listGiveRequestedFeedbackEvents({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} feedback events`); + return response; + }, +}; diff --git a/components/workday/actions/list-holiday-events/list-holiday-events.mjs b/components/workday/actions/list-holiday-events/list-holiday-events.mjs new file mode 100644 index 0000000000000..f19f3cc5c1eda --- /dev/null +++ b/components/workday/actions/list-holiday-events/list-holiday-events.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-holiday-events", + name: "List Holiday Events", + description: "List all holiday events. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#holiday/v1/get-/holidayEvents)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listHolidayEvents({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} holiday events`); + return response; + }, +}; diff --git a/components/workday/actions/list-home-contact-information-changes/list-home-contact-information-changes.mjs b/components/workday/actions/list-home-contact-information-changes/list-home-contact-information-changes.mjs new file mode 100644 index 0000000000000..610bdaeaab873 --- /dev/null +++ b/components/workday/actions/list-home-contact-information-changes/list-home-contact-information-changes.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-home-contact-information-changes", + name: "List Home Contact Information Changes", + description: "List all home contact information changes. [See the documentation]( https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/homeContactInformationChanges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listHomeContactInformationChanges({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} home contact change events`); + return response; + }, +}; diff --git a/components/workday/actions/list-interviews/list-interviews.mjs b/components/workday/actions/list-interviews/list-interviews.mjs new file mode 100644 index 0000000000000..cc85ac9e8d31b --- /dev/null +++ b/components/workday/actions/list-interviews/list-interviews.mjs @@ -0,0 +1,23 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-list-interviews", + name: "List Interviews", + description: "List all interviews. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/interviews)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listInterviews({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} interviews`); + return response; + }, +}; diff --git a/components/workday/actions/list-job-changes/list-job-changes.mjs b/components/workday/actions/list-job-changes/list-job-changes.mjs new file mode 100644 index 0000000000000..f878fefa0cd84 --- /dev/null +++ b/components/workday/actions/list-job-changes/list-job-changes.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-job-changes", + name: "List Job Changes", + description: "Retrieve a list of all job changes. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/jobChanges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listJobChanges({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} job changes`); + return response; + }, +}; diff --git a/components/workday/actions/list-job-families/list-job-families.mjs b/components/workday/actions/list-job-families/list-job-families.mjs new file mode 100644 index 0000000000000..36a8889823d28 --- /dev/null +++ b/components/workday/actions/list-job-families/list-job-families.mjs @@ -0,0 +1,23 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-list-job-families", + name: "List Job Families", + description: "List all job families. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobFamilies)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listJobFamilies({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} job families`); + return response; + }, +}; diff --git a/components/workday/actions/list-job-postings/list-job-postings.mjs b/components/workday/actions/list-job-postings/list-job-postings.mjs new file mode 100644 index 0000000000000..f8b0f62ded77e --- /dev/null +++ b/components/workday/actions/list-job-postings/list-job-postings.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-job-postings", + name: "List Job Postings", + description: "List all job postings. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/jobPostings)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listJobPostings({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} job postings`); + return response; + }, +}; diff --git a/components/workday/actions/list-job-profiles/list-job-profiles.mjs b/components/workday/actions/list-job-profiles/list-job-profiles.mjs new file mode 100644 index 0000000000000..77947ca9667e9 --- /dev/null +++ b/components/workday/actions/list-job-profiles/list-job-profiles.mjs @@ -0,0 +1,23 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-list-job-profiles", + name: "List Job Profiles", + description: "List all job profiles. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobProfiles)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listJobProfiles({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} job profiles`); + return response; + }, +}; diff --git a/components/workday/actions/list-jobs/list-jobs.mjs b/components/workday/actions/list-jobs/list-jobs.mjs new file mode 100644 index 0000000000000..ebf4b6139072b --- /dev/null +++ b/components/workday/actions/list-jobs/list-jobs.mjs @@ -0,0 +1,23 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-list-jobs", + name: "List Jobs", + description: "List all jobs. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/jobs)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listJobs({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} jobs`); + return response; + }, +}; diff --git a/components/workday/actions/list-mentorships/list-mentorships.mjs b/components/workday/actions/list-mentorships/list-mentorships.mjs new file mode 100644 index 0000000000000..1e4cff5af8d44 --- /dev/null +++ b/components/workday/actions/list-mentorships/list-mentorships.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-mentorships", + name: "List Mentorships", + description: "List all mentorships. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/get-/mentorships)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listMentorships({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} mentorships`); + return response; + }, +}; diff --git a/components/workday/actions/list-minimum-wage-rates/list-minimum-wage-rates.mjs b/components/workday/actions/list-minimum-wage-rates/list-minimum-wage-rates.mjs new file mode 100644 index 0000000000000..fa831e35d3c6d --- /dev/null +++ b/components/workday/actions/list-minimum-wage-rates/list-minimum-wage-rates.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-minimum-wage-rates", + name: "List Minimum Wage Rates", + description: "List all minimum wage rates. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/minimumWageRates)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listMinimumWageRates({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} minimum wage rates`); + return response; + }, +}; diff --git a/components/workday/actions/list-org-assignment-changes/list-org-assignment-changes.mjs b/components/workday/actions/list-org-assignment-changes/list-org-assignment-changes.mjs new file mode 100644 index 0000000000000..0ace3a3e64967 --- /dev/null +++ b/components/workday/actions/list-org-assignment-changes/list-org-assignment-changes.mjs @@ -0,0 +1,25 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-org-assignment-changes", + name: "List Organization Assignment Changes", + description: "List all organization assignment changes.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/post-/organizationAssignmentChanges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + + async run({ $ }) { + const response = await this.workday.listOrganizationAssignmentChanges({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} organization assignment changes`); + return response; + }, +}; diff --git a/components/workday/actions/list-pay-group-details/list-pay-group-details.mjs b/components/workday/actions/list-pay-group-details/list-pay-group-details.mjs new file mode 100644 index 0000000000000..a81e2a236ec84 --- /dev/null +++ b/components/workday/actions/list-pay-group-details/list-pay-group-details.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-pay-group-details", + name: "List Pay Group Details", + description: "List all pay group details. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payGroupDetails)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listPayGroupDetails({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} pay group details`); + return response; + }, +}; diff --git a/components/workday/actions/list-pay-groups/list-pay-groups.mjs b/components/workday/actions/list-pay-groups/list-pay-groups.mjs new file mode 100644 index 0000000000000..4c241e0af1bc9 --- /dev/null +++ b/components/workday/actions/list-pay-groups/list-pay-groups.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-pay-groups", + name: "List Pay Groups", + description: "List all pay groups. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payGroups)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listPayGroups({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} pay groups`); + return response; + }, +}; diff --git a/components/workday/actions/list-payroll-inputs/list-payroll-inputs.mjs b/components/workday/actions/list-payroll-inputs/list-payroll-inputs.mjs new file mode 100644 index 0000000000000..5f2a909b50603 --- /dev/null +++ b/components/workday/actions/list-payroll-inputs/list-payroll-inputs.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-payroll-inputs", + name: "List Payroll Inputs", + description: "List all payroll inputs. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/payrollInputs)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listPayrollInputs({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} payroll inputs`); + return response; + }, +}; diff --git a/components/workday/actions/list-people/list-people.mjs b/components/workday/actions/list-people/list-people.mjs new file mode 100644 index 0000000000000..462de744f5a88 --- /dev/null +++ b/components/workday/actions/list-people/list-people.mjs @@ -0,0 +1,40 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-people", + name: "List People", + description: "List all people. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/get-/people)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + maxResults: { + propDefinition: [ + workday, + "maxResults", + ], + }, + }, + async run({ $ }) { + const results = this.workday.paginate({ + fn: this.workday.listPeople, + args: { + $, + }, + max: this.maxResults, + }); + + const data = []; + for await (const result of results) { + data.push(result); + } + + $.export("$summary", `Successfully fetched ${data.length} people`); + return data; + }, +}; diff --git a/components/workday/actions/list-prospects/list-prospects.mjs b/components/workday/actions/list-prospects/list-prospects.mjs new file mode 100644 index 0000000000000..133dee3008e80 --- /dev/null +++ b/components/workday/actions/list-prospects/list-prospects.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-prospects", + name: "List Prospects", + description: "List all prospects. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/prospects/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listProspects({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} prospects`); + return response; + }, +}; diff --git a/components/workday/actions/list-succession-plans/list-succession-plans.mjs b/components/workday/actions/list-succession-plans/list-succession-plans.mjs new file mode 100644 index 0000000000000..af408d98ec5f5 --- /dev/null +++ b/components/workday/actions/list-succession-plans/list-succession-plans.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-succession-plans", + name: "List Succession Plans", + description: "List all succession plans. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/get-/successionPlans)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listSuccessionPlans({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} succession plans`); + return response; + }, +}; diff --git a/components/workday/actions/list-tax-rates/list-tax-rates.mjs b/components/workday/actions/list-tax-rates/list-tax-rates.mjs new file mode 100644 index 0000000000000..9ae6d0807f607 --- /dev/null +++ b/components/workday/actions/list-tax-rates/list-tax-rates.mjs @@ -0,0 +1,24 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-tax-rates", + name: "List Tax Rates", + description: "List all company tax rates. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/get-/taxRates)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listTaxRates({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} tax rates`); + return response; + }, +}; diff --git a/components/workday/actions/list-work-contact-information-changes/list-work-contact-information-changes.mjs b/components/workday/actions/list-work-contact-information-changes/list-work-contact-information-changes.mjs new file mode 100644 index 0000000000000..1465d970a0004 --- /dev/null +++ b/components/workday/actions/list-work-contact-information-changes/list-work-contact-information-changes.mjs @@ -0,0 +1,23 @@ +import workday from "../../workday.app.mjs"; +export default { + key: "workday-list-work-contact-information-changes", + name: "List Work Contact Information Changes", + description: "List all work contact information changes. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/workContactInformationChanges)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + async run({ $ }) { + const response = await this.workday.listWorkContactInformationChanges({ + $, + }); + $.export("$summary", `Found ${response?.data?.length || 0} changes`); + return response; + }, +}; diff --git a/components/workday/actions/list-workers/list-workers.mjs b/components/workday/actions/list-workers/list-workers.mjs new file mode 100644 index 0000000000000..ef17d9237941b --- /dev/null +++ b/components/workday/actions/list-workers/list-workers.mjs @@ -0,0 +1,25 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-list-workers", + name: "List Workers", + description: "List all workers.[See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#staffing/v7/get-/workers)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + workday, + }, + + async run({ $ }) { + const response = await this.workday.listWorkers({ + $, + }); + $.export("$summary", `Fetched ${response?.data?.length || 0} workers`); + return response; + }, +}; diff --git a/components/workday/actions/update-mentorship/update-mentorship.mjs b/components/workday/actions/update-mentorship/update-mentorship.mjs new file mode 100644 index 0000000000000..ba4708fb9ae1b --- /dev/null +++ b/components/workday/actions/update-mentorship/update-mentorship.mjs @@ -0,0 +1,72 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-update-mentorship", + name: "Update Mentorship", + description: "Update a mentorship resource. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#talentManagement/v2/post-/mentorships/-ID-/edit)", + 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: "Comment field.", + optional: true, + }, + purpose: { + type: "string", + label: "Purpose", + description: "Updated purpose of mentorship.", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Updated start date. Example: `2025-10-18T07:00:00.000Z`", + }, + endDate: { + type: "string", + label: "End Date", + description: "Updated end date (ISO 8601). Example: `2025-10-18T07:00:00.000Z`", + optional: true, + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Display name.", + optional: true, + }, + }, + async run({ $ }) { + const data = { + startDate: this.startDate, + }; + if (this.comment) data.comment = this.comment; + if (this.purpose) data.purpose = this.purpose; + if (this.endDate) data.endDate = this.endDate; + if (this.descriptor) data.descriptor = this.descriptor; + + if (Object.keys(data).length === 0) { + throw new ConfigurationError("At least one field to update must be provided."); + } + + const response = await this.workday.updateMentorship({ + id: this.mentorshipId, + data, + $, + }); + $.export("$summary", `Mentorship ${this.mentorshipId} updated`); + return response; + }, +}; diff --git a/components/workday/actions/update-payroll-input/update-payroll-input.mjs b/components/workday/actions/update-payroll-input/update-payroll-input.mjs new file mode 100644 index 0000000000000..d09c0aefcc3c1 --- /dev/null +++ b/components/workday/actions/update-payroll-input/update-payroll-input.mjs @@ -0,0 +1,65 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-update-payroll-input", + name: "Update Payroll Input", + description: "Update a payroll input. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/patch-/payrollInputs/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + + type: "action", + props: { + workday, + payrollInputId: { + propDefinition: [ + workday, + "payrollInputId", + ], + }, + worker: { + type: "object", + label: "Worker", + description: "The worker for this payroll input. Example: `{ \"id\": \"worker-id\", \"descriptor\": \"Worker Name\" }`", + optional: true, + }, + payComponent: { + type: "object", + label: "Pay Component", + description: "The pay component for this payroll input. Example: `{ \"id\": \"component-id\", \"descriptor\": \"Comp Name\", \"code\": \"COMP01\" }`", + optional: true, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Effective start date. Example: `2012-01-01T08:00:00.000Z`", + optional: true, + }, + }, + async run({ $ }) { + if (!this.payrollInputId || !this.payrollInputId.trim()) { + throw new ConfigurationError("Payroll Input ID is required."); + } + + const data = {}; + if (this.worker !== undefined) data.worker = this.worker; + if (this.payComponent !== undefined) data.payComponent = this.payComponent; + if (this.startDate !== undefined) data.startDate = this.startDate; + + if (Object.keys(data).length === 0) { + throw new ConfigurationError("At least one field (worker, payComponent, startDate) must be provided to update."); + } + + const response = await this.workday.updatePayrollInput({ + id: this.payrollInputId, + data, + $, + }); + $.export("$summary", `Payroll input ${this.payrollInputId} successfully updated`); + return response; + }, +}; diff --git a/components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs b/components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs new file mode 100644 index 0000000000000..9bf4c136f44ff --- /dev/null +++ b/components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs @@ -0,0 +1,68 @@ +import workday from "../../workday.app.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "workday-update-work-contact-information-change", + name: "Update Work Contact Information Change", + description: "Update an existing work contact information change. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/patch-/workContactInformationChanges/-ID-)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + + type: "action", + props: { + workday, + workContactInformationChangeId: { + propDefinition: [ + workday, + "workContactInformationChangeId", + ], + description: "The ID of the work contact information change.", + }, + alternateWorkLocation: { + type: "object", + label: "Alternate Work Location", + description: "Object for alternate work location. Must include at least `id`. Example: `{ id: \"...\", descriptor: \"...\"}`", + optional: true, + }, + descriptor: { + type: "string", + label: "Descriptor", + description: "Descriptor describing this change event.", + optional: true, + }, + id: { + type: "string", + label: "ID", + description: "Optional ID for the event (usually system-generated).", + optional: true, + }, + }, + async run({ $ }) { + const data = {}; + if (this.alternateWorkLocation) { + if ( + typeof this.alternateWorkLocation !== "object" + || !this.alternateWorkLocation.id + || typeof this.alternateWorkLocation.id !== "string" + || !this.alternateWorkLocation.id.length + ) { + throw new ConfigurationError("alternateWorkLocation must include a non-empty 'id' property."); + } + data.alternateWorkLocation = this.alternateWorkLocation; + } + if (this.descriptor) data.descriptor = this.descriptor; + if (this.id) data.id = this.id; + + const response = await this.workday.updateWorkContactInformationChange({ + id: this.workContactInformationChangeId, + $, + data, + }); + $.export("$summary", `Updated change ${this.workContactInformationChangeId}`); + return response; + }, +}; diff --git a/components/workday/actions/validate-phone-number/validate-phone-number.mjs b/components/workday/actions/validate-phone-number/validate-phone-number.mjs new file mode 100644 index 0000000000000..b6ab5159b65a9 --- /dev/null +++ b/components/workday/actions/validate-phone-number/validate-phone-number.mjs @@ -0,0 +1,32 @@ +import workday from "../../workday.app.mjs"; + +export default { + key: "workday-validate-phone-number", + name: "Validate Phone Number", + description: "Validate a phone number using Workday's REST API. [See documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/post-/phoneValidation)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + type: "action", + props: { + workday, + completePhoneNumber: { + type: "string", + label: "Complete Phone Number", + description: "The complete phone number including country code. Example: '+19259519000'", + }, + }, + async run({ $ }) { + const response = await this.workday.validatePhoneNumber({ + $, + data: { + completePhoneNumber: this.completePhoneNumber, + }, + }); + $.export("$summary", "Phone number validation completed."); + return response; + }, +}; diff --git a/components/workday/sources/common/utils.mjs b/components/workday/sources/common/utils.mjs new file mode 100644 index 0000000000000..cd0868241d928 --- /dev/null +++ b/components/workday/sources/common/utils.mjs @@ -0,0 +1,36 @@ +const parseObject = (obj) => { + if (!obj) return {}; + + if (typeof obj === "string") { + try { + return JSON.parse(obj); + } catch (e) { + return obj; + } + } + + if (Array.isArray(obj)) { + return obj.map((item) => parseObject(item)); + } + + if (typeof obj === "object") { + return Object.fromEntries(Object.entries(obj).map(([ + key, + value, + ]) => [ + key, + parseObject(value), + ])); + } + + return obj; +}; + +export default { + parseObject, + parseJsonInput: (value) => { + return value + ? parseObject(value) + : undefined; + }, +}; diff --git a/components/workday/workday.app.mjs b/components/workday/workday.app.mjs index 314e3243695be..2d71045c2e42b 100644 --- a/components/workday/workday.app.mjs +++ b/components/workday/workday.app.mjs @@ -56,6 +56,330 @@ export default { })) || []; }, }, + homeContactInformationChangeId: { + type: "string", + label: "Home Contact Information Change ID", + description: "The ID of a home contact information change event.", + async options({ page }) { + const { data } = await this.listHomeContactInformationChanges({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((change) => ({ + label: change.descriptor || change.id, + value: change.id, + })) || []; + }, + }, + workContactInformationChangeId: { + type: "string", + label: "Work Contact Information Change ID", + description: "The ID of a specific work contact information change event in Workday.", + async options({ page }) { + const { data } = await this.listWorkContactInformationChanges({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (data || []).map((item) => ({ + label: item?.descriptor || item?.id || String(item), + value: item?.id || String(item), + })); + }, + }, + jobPostingId: { + type: "string", + label: "Job Posting ID", + description: "The ID of the job posting.", + async options({ page }) { + const res = await this.listJobPostings({ + params: { + limit: 50, + offset: 50 * page, + }, + }); + return (res.data || []).map((posting) => ({ + label: posting?.descriptor || posting?.id || String(posting), + value: posting?.id || String(posting), + })); + }, + }, + prospectId: { + type: "string", + label: "Prospect ID", + description: "The ID of the prospect.", + async options({ page }) { + const res = await this.listProspects({ + params: { + limit: 50, + offset: 50 * page, + }, + }); + return (res.data || []).map((prospect) => ({ + label: prospect?.descriptor || prospect?.id || String(prospect), + value: prospect?.id || String(prospect), + })); + }, + }, + personId: { + type: "string", + label: "Person ID", + description: "The ID of a person record in Workday.", + async options({ page }) { + const { data } = await this.listPeople({ + params: { + limit: DEFAULT_LIMIT, + offset: page * DEFAULT_LIMIT, + }, + }); + return data?.map((person) => ({ + label: person.descriptor || person.id, + value: person.id, + })) || []; + }, + }, + jobChangeId: { + type: "string", + label: "Job Change ID", + description: "The Workday Job Change ID to retrieve details for.", + async options({ page }) { + const { data } = await this.listJobChanges({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (data || []).map((jobChange) => ({ + label: jobChange?.descriptor || jobChange?.id || String(jobChange), + value: jobChange?.id || String(jobChange), + })); + }, + }, + jobFamilyId: { + type: "string", + label: "Job Family ID", + description: "The Workday Job Family ID.", + async options({ page }) { + const res = await this.listJobFamilies({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((jf) => ({ + label: jf?.descriptor || jf?.id || String(jf), + value: jf?.id || String(jf), + })); + }, + }, + jobProfileId: { + type: "string", + label: "Job Profile ID", + description: "The Workday Job Profile ID.", + async options({ page }) { + const res = await this.listJobProfiles({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((jp) => ({ + label: jp?.descriptor || jp?.id || String(jp), + value: jp?.id || String(jp), + })); + }, + }, + jobId: { + type: "string", + label: "Job ID", + description: "Workday Job ID.", + async options({ page }) { + const res = await this.listJobs({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((j) => ({ + label: j?.descriptor || j?.id, + value: j?.id, + })); + }, + }, + organizationAssignmentChangeId: { + type: "string", + label: "Organization Assignment Change ID", + description: "ID for Organization Assignment Change.", + async options({ page }) { + const res = await this.listOrganizationAssignmentChanges({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((c) => ({ + label: c?.descriptor || c?.id, + value: c?.id, + })); + }, + }, + mentorshipId: { + type: "string", + label: "Mentorship ID", + description: "The ID of the mentorship.", + async options({ page }) { + const res = await this.listMentorships({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((m) => ({ + label: m?.descriptor || m?.id || String(m), + value: m?.id || String(m), + })); + }, + }, + successionPlanId: { + type: "string", + label: "Succession Plan ID", + description: "The ID of the succession plan.", + async options({ page }) { + const res = await this.listSuccessionPlans({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((p) => ({ + label: p?.descriptor || p?.id || String(p), + value: p?.id || String(p), + })); + }, + }, + contentId: { + type: "string", + label: "Content ID", + description: "The ID of the learning content.", + async options({ page }) { + const res = await this.listContent({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((c) => ({ + label: c?.descriptor || c?.id || String(c), + value: c?.id || String(c), + })); + }, + }, + minimumWageRateId: { + type: "string", + label: "Minimum Wage Rate ID", + description: "The ID of the minimum wage rate.", + async options({ page }) { + const res = await this.listMinimumWageRates({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((rate) => ({ + label: rate?.descriptor || rate?.id || String(rate), + value: rate?.id || String(rate), + })); + }, + }, + payGroupDetailId: { + type: "string", + label: "Pay Group Detail ID", + description: "The ID of the pay group detail.", + async options({ page }) { + const res = await this.listPayGroupDetails({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((pg) => ({ + label: pg?.descriptor || pg?.id || String(pg), + value: pg?.id || String(pg), + })); + }, + }, + payrollInputId: { + type: "string", + label: "Payroll Input ID", + description: "The ID of the payroll input.", + async options({ page }) { + const res = await this.listPayrollInputs({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((input) => ({ + label: input?.descriptor || input?.id || String(input), + value: input?.id || String(input), + })); + }, + }, + payGroupId: { + type: "string", + label: "Pay Group ID", + description: "The ID of the pay group.", + async options({ page }) { + const res = await this.listPayGroups({ + params: { + limit: 50, + offset: page * 50, + }, + }); + return (res.data || []).map((pg) => ({ + label: pg?.descriptor || pg?.id || String(pg), + value: pg?.id || String(pg), + })); + }, + }, + feedbackBadgeId: { + type: "string", + label: "Feedback Badge ID", + description: "The ID of the feedback badge.", + async options({ page }) { + const res = await this.listFeedbackBadges({ + params: { + limit: 50, + offset: 50 * page, + }, + }); + return (res.data || []).map((badge) => ({ + label: badge?.descriptor || badge?.id || String(badge), + value: badge?.id || String(badge), + })); + }, + }, + giveRequestedFeedbackEventId: { + type: "string", + label: "Requested Feedback Event ID", + description: "The ID of the give requested feedback event.", + async options({ page }) { + const res = await this.listGiveRequestedFeedbackEvents({ + params: { + limit: 50, + offset: 50 * page, + }, + }); + return (res.data || []).map((event) => ({ + label: event?.descriptor || event?.id || String(event), + value: event?.id || String(event), + })); + }, + }, + maxResults: { type: "integer", label: "Max Results", @@ -137,6 +461,545 @@ export default { ...opts, }); }, + listHomeContactInformationChanges(opts = {}) { + return this._makeRequest({ + path: "/homeContactInformationChanges", + ...opts, + }); + }, + getHomeContactInformationChange({ + homeContactInformationChangeId, ...opts + }) { + return this._makeRequest({ + path: `/homeContactInformationChanges/${homeContactInformationChangeId}`, + ...opts, + }); + }, + + async createHomeContactInformationChange({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}/homeContactInformationChanges`, + method: "POST", + ...opts, + }); + }, + + listPeople(opts = {}) { + return this._makeRequest({ + path: "/people", + ...opts, + }); + }, + + getPerson({ + id, ...opts + }) { + return this._makeRequest({ + path: `/people/${id}`, + ...opts, + }); + }, + + getPersonPhoto({ + id, ...opts + }) { + return this._makeRequest({ + path: `/people/${id}/photos`, + ...opts, + }); + }, + + validatePhoneNumber(opts = {}) { + return this._makeRequest({ + path: "/phoneValidation/validate", + method: "POST", + ...opts, + }); + }, + listWorkContactInformationChanges(opts = {}) { + return this._makeRequest({ + path: "/workContactInformationChanges", + method: "GET", + ...opts, + }); + }, + getWorkContactInformationChange({ + id, ...opts + }) { + return this._makeRequest({ + path: `/workContactInformationChanges/${id}`, + method: "GET", + ...opts, + }); + }, + + async createWorkContactInformationChange({ + workerId, ...opts + }) { + return this._makeRequest({ + path: `/workers/${workerId}/workContactInformationChanges`, + method: "POST", + ...opts, + }); + }, + + updateWorkContactInformationChange({ + id, ...opts + }) { + return this._makeRequest({ + path: `/workContactInformationChanges/${id}`, + method: "PATCH", + ...opts, + }); + }, + listInterviews(opts = {}) { + return this._makeRequest({ + path: "/interviews", + method: "GET", + ...opts, + }); + }, + getInterview({ + id, ...opts + }) { + return this._makeRequest({ + path: `/interviews/${id}`, + method: "GET", + ...opts, + }); + }, + async listJobPostings(opts = {}) { + return this._makeRequest({ + path: "/jobPostings", + method: "GET", + ...opts, + }); + }, + + async getJobPosting({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobPostings/${id}`, + method: "GET", + ...opts, + }); + }, + getProspect({ + id, ...opts + }) { + return this._makeRequest({ + path: `/prospects/${id}`, + method: "GET", + ...opts, + }); + }, + createProspect(opts = {}) { + return this._makeRequest({ + path: "/prospects", + method: "POST", + ...opts, + }); + }, + async listProspects(opts = {}) { + return this._makeRequest({ + path: "/prospects", + method: "GET", + ...opts, + }); + }, + + getJobChangeDetails({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobChanges/${id}`, + method: "GET", + ...opts, + }); + }, + listJobChanges(opts = {}) { + return this._makeRequest({ + path: "/jobChanges", + method: "GET", + ...opts, + }); + }, + listJobFamilies(opts = {}) { + return this._makeRequest({ + path: "/jobFamilies", + method: "GET", + ...opts, + }); + }, + + getJobFamily({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobFamilies/${id}`, + method: "GET", + ...opts, + }); + }, + listJobProfiles(opts = {}) { + return this._makeRequest({ + path: "/jobProfiles", + method: "GET", + ...opts, + }); + }, + getJobProfile({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobProfiles/${id}`, + method: "GET", + ...opts, + }); + }, + listJobs(opts = {}) { + return this._makeRequest({ + path: "/jobs", + method: "GET", + ...opts, + }); + }, + getJob({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobs/${id}`, + method: "GET", + ...opts, + }); + }, + + listOrganizationAssignmentChanges(opts = {}) { + return this._makeRequest({ + path: "/organizationAssignmentChanges", + method: "GET", + ...opts, + }); + }, + getOrganizationAssignmentChange({ + id, ...opts + }) { + return this._makeRequest({ + path: `/organizationAssignmentChanges/${id}`, + method: "GET", + ...opts, + }); + }, + createOrganizationAssignmentChange(opts = {}) { + return this._makeRequest({ + path: "/organizationAssignmentChanges", + method: "POST" + , ...opts, + }); + }, + getSupervisoryOrganization({ + id, ...opts + }) { + return this._makeRequest({ + path: `/supervisoryOrganizations/${id}`, + method: "GET", + ...opts, + }); + }, + getSupervisoryOrganizationMembers({ + id, ...opts + }) { + return this._makeRequest({ + path: `/supervisoryOrganizations/${id}/members`, + method: "GET", + ...opts, + }); + }, + async getWorkerGoals({ + id, ...opts + }) { + return this._makeRequest({ + path: `/workers/${id}/goals`, + method: "GET", + ...opts, + }); + }, + + async getWorkerAnytimeFeedbackEvents({ + id, ...opts + }) { + return this._makeRequest({ + path: `/workers/${id}/anytimeFeedbackEvents`, + method: "GET", + ...opts, + }); + }, + async createMentorshipForMe(opts = {}) { + return this._makeRequest({ + path: "/createMentorshipForMe", + method: "POST", + ...opts, + }); + }, + async createMentorshipForWorker(opts = {}) { + return this._makeRequest({ + path: "/createMentorshipForWorker", + method: "POST", + ...opts, + }); + }, + async listMentorships(opts = {}) { + return this._makeRequest({ + path: "/mentorships", + method: "GET", + ...opts, + }); + }, + async getMentorship({ + id, ...opts + }) { + return this._makeRequest({ + path: `/mentorships/${id}`, + method: "GET", + ...opts, + }); + }, + async updateMentorship({ + id, data, ...opts + }) { + return this._makeRequest({ + path: `/mentorships/${id}/edit`, + method: "POST", + data, + ...opts, + }); + }, + async closeMentorship({ + id, data, ...opts + }) { + return this._makeRequest({ + path: `/mentorships/${id}/close`, + method: "POST", + data, + ...opts, + }); + }, + async createSuccessionPlan(opts = {}) { + return this._makeRequest({ + path: "/successionPlans", + method: "POST", + ...opts, + }); + }, + async listSuccessionPlans(opts = {}) { + return this._makeRequest({ + path: "/successionPlans", + method: "GET", + ...opts, + }); + }, + async getSuccessionPlan({ + id, ...opts + }) { + return this._makeRequest({ + path: `/successionPlans/${id}`, + method: "GET", + ...opts, + }); + }, + async listHolidayEvents(opts = {}) { + return this._makeRequest({ + path: "/holidayEvents", + method: "GET", + ...opts, + }); + }, + async createDistributionRequest(opts = {}) { + return this._makeRequest({ + path: "/distributionRequests", + method: "POST", + ...opts, + }); + }, + async listContent(opts = {}) { + return this._makeRequest({ + path: "/content", + method: "GET", + ...opts, + }); + }, + + async getContent({ + id, ...opts + }) { + return this._makeRequest({ + path: `/content/${id}`, + method: "GET", + ...opts, + }); + }, + async createDigitalCourse(opts = {}) { + return this._makeRequest({ + path: "/manageDigitalCourses", + method: "POST", + ...opts, + }); + }, + async getJobPayGroup({ + id, ...opts + }) { + return this._makeRequest({ + path: `/jobs/${id}/payGroup`, + method: "GET", + ...opts, + }); + }, + async listMinimumWageRates(opts = {}) { + return this._makeRequest({ + path: "/minimumWageRates", + method: "GET", + ...opts, + }); + }, + + async getMinimumWageRate({ + id, ...opts + }) { + return this._makeRequest({ + path: `/minimumWageRates/${id}`, + method: "GET", + ...opts, + }); + }, + async listPayGroupDetails(opts = {}) { + return this._makeRequest({ + path: "/payGroupDetails", + method: "GET", + ...opts, + }); + }, + + async getPayGroupDetail({ + id, ...opts + }) { + return this._makeRequest({ + path: `/payGroupDetails/${id}`, + method: "GET", + ...opts, + }); + }, + async listPayGroups(opts = {}) { + return this._makeRequest({ + path: "/payGroups", + method: "GET", + ...opts, + }); + }, + + async getPayGroup({ + id, ...opts + }) { + return this._makeRequest({ + path: `/payGroups/${id}`, + method: "GET", + ...opts, + }); + }, + async createPayrollInput(opts = {}) { + return this._makeRequest({ + path: "/payrollInputs", + method: "POST", + ...opts, + }); + }, + async listPayrollInputs(opts = {}) { + return this._makeRequest({ + path: "/payrollInputs", + method: "GET", + ...opts, + }); + }, + + async getPayrollInput({ + id, ...opts + }) { + return this._makeRequest({ + path: `/payrollInputs/${id}`, + method: "GET", + ...opts, + }); + }, + async updatePayrollInput({ + id, data, ...opts + }) { + return this._makeRequest({ + path: `/payrollInputs/${id}`, + method: "PATCH", + data, + ...opts, + }); + }, + async deletePayrollInput({ + id, ...opts + }) { + return this._makeRequest({ + path: `/payrollInputs/${id}`, + method: "DELETE", + ...opts, + }); + }, + async createTaxRate(opts = {}) { + return this._makeRequest({ + path: "/taxRates", + method: "POST", + ...opts, + }); + }, + async listTaxRates(opts = {}) { + return this._makeRequest({ + path: "/taxRates", + method: "GET", + ...opts, + }); + }, + async listFeedbackBadges(opts = {}) { + return this._makeRequest({ + path: "/feedbackBadges", + method: "GET", + ...opts, + }); + }, + + async getFeedbackBadge({ + id, ...opts + }) { + return this._makeRequest({ + path: `/feedbackBadges/${id}`, + method: "GET", + ...opts, + }); + }, + async listGiveRequestedFeedbackEvents(opts = {}) { + return this._makeRequest({ + path: "/giveRequestedFeedbackEvents", + method: "GET", + ...opts, + }); + }, + + async getGiveRequestedFeedbackEvent({ + id, ...opts + }) { + return this._makeRequest({ + path: `/giveRequestedFeedbackEvents/${id}`, + method: "GET", + ...opts, + }); + }, + async *paginate({ fn, args = {}, max, }) { From 653fda092bdc8498a20bc26c6affcb02ed78d81d Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Thu, 23 Oct 2025 06:56:50 +0530 Subject: [PATCH 02/19] Version bumped --- .../actions/change-business-title/change-business-title.mjs | 2 +- .../workday/actions/create-job-change/create-job-change.mjs | 2 +- components/workday/actions/get-worker/get-worker.mjs | 2 +- .../actions/list-organization-types/list-organization-types.mjs | 2 +- .../list-supervisory-organizations.mjs | 2 +- .../actions/list-worker-payslips/list-worker-payslips.mjs | 2 +- components/workday/actions/search-workers/search-workers.mjs | 2 +- components/workday/package.json | 2 +- .../workday/sources/new-worker-created/new-worker-created.mjs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/workday/actions/change-business-title/change-business-title.mjs b/components/workday/actions/change-business-title/change-business-title.mjs index 6b42ce4ccbe29..945c7a7bb1bd0 100644 --- a/components/workday/actions/change-business-title/change-business-title.mjs +++ b/components/workday/actions/change-business-title/change-business-title.mjs @@ -4,7 +4,7 @@ export default { key: "workday-change-business-title", name: "Change Business Title", description: "Change the business title of a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/post-/workers/-ID-/businessTitleChanges)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/create-job-change/create-job-change.mjs b/components/workday/actions/create-job-change/create-job-change.mjs index 8f46fd2789cec..f0e5a086b0b98 100644 --- a/components/workday/actions/create-job-change/create-job-change.mjs +++ b/components/workday/actions/create-job-change/create-job-change.mjs @@ -4,7 +4,7 @@ export default { key: "workday-create-job-change", name: "Create Job Change", description: "Create a job change for a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/post-/workers/-ID-/jobChanges)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/get-worker/get-worker.mjs b/components/workday/actions/get-worker/get-worker.mjs index 1644f517ece2a..0b7d9af8a5ddc 100644 --- a/components/workday/actions/get-worker/get-worker.mjs +++ b/components/workday/actions/get-worker/get-worker.mjs @@ -4,7 +4,7 @@ export default { key: "workday-get-worker", name: "Get Worker", description: "Get a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers/-ID-)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/list-organization-types/list-organization-types.mjs b/components/workday/actions/list-organization-types/list-organization-types.mjs index ec18cad5378dd..40af52c55451b 100644 --- a/components/workday/actions/list-organization-types/list-organization-types.mjs +++ b/components/workday/actions/list-organization-types/list-organization-types.mjs @@ -4,7 +4,7 @@ export default { key: "workday-list-organization-types", name: "List Organization Types", description: "List organization types. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/organizationTypes)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs b/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs index 58cecfa4cc6d0..ab7e418ca9474 100644 --- a/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs +++ b/components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs @@ -4,7 +4,7 @@ export default { key: "workday-list-supervisory-organizations", name: "List Supervisory Organizations", description: "List supervisory organizations. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/supervisoryOrganizations)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs b/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs index 283be8da5a9df..ed300ca126035 100644 --- a/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs +++ b/components/workday/actions/list-worker-payslips/list-worker-payslips.mjs @@ -4,7 +4,7 @@ export default { key: "workday-list-worker-payslips", name: "List Worker Payslips", description: "List the payslips for a worker. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers/-ID-/paySlips)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/actions/search-workers/search-workers.mjs b/components/workday/actions/search-workers/search-workers.mjs index 48795cbac7f55..1d9c72acebed6 100644 --- a/components/workday/actions/search-workers/search-workers.mjs +++ b/components/workday/actions/search-workers/search-workers.mjs @@ -4,7 +4,7 @@ export default { key: "workday-search-workers", name: "Search Workers", description: "Retrieve a list of workers based on a search query. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/workday/package.json b/components/workday/package.json index 80ac89aeb9db2..4c99a9e79e80d 100644 --- a/components/workday/package.json +++ b/components/workday/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/workday", - "version": "0.1.1", + "version": "0.1.2", "description": "Pipedream Workday Components", "main": "workday.app.mjs", "keywords": [ diff --git a/components/workday/sources/new-worker-created/new-worker-created.mjs b/components/workday/sources/new-worker-created/new-worker-created.mjs index 1dcb00ac277de..6a25e1f4f3880 100644 --- a/components/workday/sources/new-worker-created/new-worker-created.mjs +++ b/components/workday/sources/new-worker-created/new-worker-created.mjs @@ -6,7 +6,7 @@ export default { key: "workday-new-worker-created", name: "New Worker Created", description: "Emit new event for each new worker created in Workday. [See the documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#common/v1/get-/workers)", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { From 5537759af49482a2d774eed3604da84b11267076 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Thu, 23 Oct 2025 06:57:40 +0530 Subject: [PATCH 03/19] lint issue fixed --- .../delete-payroll-input/delete-payroll-input.mjs | 15 +++++++++------ .../update-mentorship/update-mentorship.mjs | 7 +++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs b/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs index 17a833789d25f..b3d99dcd077ba 100644 --- a/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs +++ b/components/workday/actions/delete-payroll-input/delete-payroll-input.mjs @@ -6,16 +6,19 @@ export default { name: "Delete Payroll Input", description: "Delete a payroll input by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#payroll/v2/delete-/payrollInputs/-ID-)", version: "0.0.1", - annotations: { - destructiveHint: true, - openWorldHint: true, - readOnlyHint: false, - }, + annotations: { + destructiveHint: true, + openWorldHint: true, + readOnlyHint: false, + }, type: "action", props: { workday, payrollInputId: { - propDefinition: [workday, "payrollInputId"], + propDefinition: [ + workday, + "payrollInputId", + ], }, }, async run({ $ }) { diff --git a/components/workday/actions/update-mentorship/update-mentorship.mjs b/components/workday/actions/update-mentorship/update-mentorship.mjs index ba4708fb9ae1b..546d5481da70d 100644 --- a/components/workday/actions/update-mentorship/update-mentorship.mjs +++ b/components/workday/actions/update-mentorship/update-mentorship.mjs @@ -16,7 +16,10 @@ export default { props: { workday, mentorshipId: { - propDefinition: [workday, "mentorshipId"], + propDefinition: [ + workday, + "mentorshipId", + ], }, comment: { type: "string", @@ -50,7 +53,7 @@ export default { }, async run({ $ }) { const data = { - startDate: this.startDate, + startDate: this.startDate, }; if (this.comment) data.comment = this.comment; if (this.purpose) data.purpose = this.purpose; From 899677da4a33f8aaff1066875ffec8ad64ff54ad Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Thu, 23 Oct 2025 07:07:12 +0530 Subject: [PATCH 04/19] fixes --- .../workday/actions/update-mentorship/update-mentorship.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/workday/actions/update-mentorship/update-mentorship.mjs b/components/workday/actions/update-mentorship/update-mentorship.mjs index 546d5481da70d..5d83cc188aed4 100644 --- a/components/workday/actions/update-mentorship/update-mentorship.mjs +++ b/components/workday/actions/update-mentorship/update-mentorship.mjs @@ -37,6 +37,7 @@ export default { type: "string", label: "Start Date", description: "Updated start date. Example: `2025-10-18T07:00:00.000Z`", + optional: true, }, endDate: { type: "string", @@ -52,12 +53,11 @@ export default { }, }, async run({ $ }) { - const data = { - startDate: this.startDate, - }; + const data = {}; if (this.comment) data.comment = this.comment; if (this.purpose) data.purpose = this.purpose; if (this.endDate) data.endDate = this.endDate; + if (this.startDate) data.startDate = this.startDate; if (this.descriptor) data.descriptor = this.descriptor; if (Object.keys(data).length === 0) { From a00a3554c7c23a7b4cb4ae647ef8a482c9fe4276 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Thu, 23 Oct 2025 07:28:54 +0530 Subject: [PATCH 05/19] fixes --- .../create-home-contact-information-change.mjs | 8 ++++---- .../create-organization-assignment-change.mjs} | 0 .../create-work-contact-information-change.mjs | 8 ++++---- .../workday/actions/get-job-posting/get-job-posting.mjs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename components/workday/actions/{create-org-assignment-change/create-org-assignment-change.mjs => create-organization-assignment-change/create-organization-assignment-change.mjs} (100%) diff --git a/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs b/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs index 32fbe394d7bf4..f108b45278c4b 100644 --- a/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs +++ b/components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs @@ -2,9 +2,9 @@ import workday from "../../workday.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; export default { - key: "workday-initiate-home-contact-information-change", - name: "Initiate Home Contact Information Change", - description: "Initiates a home contact change for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4/)", + 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/)", version: "0.0.1", annotations: { destructiveHint: false, @@ -30,7 +30,7 @@ export default { data: {}, $, }); - $.export("$summary", `Home contact change event initiated for worker ID ${this.workerId}`); + $.export("$summary", `Home contact change event created for worker ID ${this.workerId}`); return response; }, }; diff --git a/components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs b/components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs similarity index 100% rename from components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs rename to components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs diff --git a/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs b/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs index dc51a5c50286e..99a717ae1c56b 100644 --- a/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs +++ b/components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs @@ -2,9 +2,9 @@ import workday from "../../workday.app.mjs"; import { ConfigurationError } from "@pipedream/platform"; export default { - key: "workday-initiate-work-contact-information-change", - name: "Initiate Work Contact Information Change", - description: "Initiate a work contact change event for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4)", + key: "workday-create-work-contact-information-change", + name: "create Work Contact Information Change", + description: "create a work contact change event for a worker. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#person/v4)", version: "0.0.1", annotations: { destructiveHint: false, @@ -30,7 +30,7 @@ export default { data: {}, $, }); - $.export("$summary", `Work contact change event initiated for worker ID ${this.workerId}`); + $.export("$summary", `Work contact change event created for worker ID ${this.workerId}`); return response; }, }; diff --git a/components/workday/actions/get-job-posting/get-job-posting.mjs b/components/workday/actions/get-job-posting/get-job-posting.mjs index a4ccf991578a1..71351d84bf5b1 100644 --- a/components/workday/actions/get-job-posting/get-job-posting.mjs +++ b/components/workday/actions/get-job-posting/get-job-posting.mjs @@ -1,8 +1,8 @@ import workday from "../../workday.app.mjs"; export default { - key: "workday-get-job-posting-details", - name: "Get Job Posting Details", + key: "workday-get-job-posting", + name: "Get Job Posting", description: "Get details for a job posting by ID. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#recruiting/v4/get-/jobPostings/-ID-)", version: "0.0.1", annotations: { From 972de83dd3b3fb37ee95cc1602a7fc3266e9d66b Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Thu, 23 Oct 2025 14:41:05 -0400 Subject: [PATCH 06/19] Update components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs --- .../get-home-contact-information-change.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs index 0adc990a88e44..e972b65c2a26c 100644 --- a/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs +++ b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs @@ -26,7 +26,7 @@ export default { homeContactInformationChangeId: this.homeContactInformationChangeId, $, }); - $.export("$summary", `Successfully fetched home contact information change with ID ${this.id}`); + $.export("$summary", `Successfully fetched home contact information change with ID ${this.homeContactInformationChangeId}`); return response; }, }; From 8175f00c212b3c6093ad667b22a47da0f9b2a4a3 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Thu, 23 Oct 2025 14:47:22 -0400 Subject: [PATCH 07/19] Update components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../get-home-contact-information-change.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs index e972b65c2a26c..1ee007465b7fe 100644 --- a/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs +++ b/components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs @@ -19,8 +19,7 @@ export default { "homeContactInformationChangeId", ], }, - } - , + }, async run({ $ }) { const response = await this.workday.getHomeContactInformationChange({ homeContactInformationChangeId: this.homeContactInformationChangeId, From 35134f50f804db6ac1e3627e056d754b198b7fdb Mon Sep 17 00:00:00 2001 From: Jorge Cortes Date: Thu, 23 Oct 2025 02:14:01 -0500 Subject: [PATCH 08/19] Merging pull request #18825 --- .../create-report-by-advertiser-account.mjs | 2 +- .../create-report-by-campaign.mjs | 2 +- .../actions/create-report/create-report.mjs | 8 +- .../send-conversion-event.mjs | 2 +- components/linkedin_ads/common/constants.mjs | 7 + components/linkedin_ads/linkedin_ads.app.mjs | 9 + components/linkedin_ads/package.json | 4 +- .../new-event-registration-form-response.mjs | 2 +- .../new-lead-gen-form-created.mjs | 2 +- pnpm-lock.yaml | 182 +++--------------- 10 files changed, 53 insertions(+), 167 deletions(-) create mode 100644 components/linkedin_ads/common/constants.mjs diff --git a/components/linkedin_ads/actions/create-report-by-advertiser-account/create-report-by-advertiser-account.mjs b/components/linkedin_ads/actions/create-report-by-advertiser-account/create-report-by-advertiser-account.mjs index 1bb0e4b30c459..e548cb2f4853d 100644 --- a/components/linkedin_ads/actions/create-report-by-advertiser-account/create-report-by-advertiser-account.mjs +++ b/components/linkedin_ads/actions/create-report-by-advertiser-account/create-report-by-advertiser-account.mjs @@ -6,7 +6,7 @@ export default { key: "linkedin_ads-create-report-by-advertiser-account", name: "Create Report By Advertiser Account", description: "Sample query using analytics finder that gets analytics for a particular account for date range starting in a given year. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#sample-request)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/linkedin_ads/actions/create-report-by-campaign/create-report-by-campaign.mjs b/components/linkedin_ads/actions/create-report-by-campaign/create-report-by-campaign.mjs index cd7a8cfb6430a..4b58c8ab2f7f1 100644 --- a/components/linkedin_ads/actions/create-report-by-campaign/create-report-by-campaign.mjs +++ b/components/linkedin_ads/actions/create-report-by-campaign/create-report-by-campaign.mjs @@ -6,7 +6,7 @@ export default { key: "linkedin_ads-create-report-by-campaign", name: "Query Analytics Finder Campaign Sample", description: "Sample query using analytics finder that gets analytics for a particular campaign in a date range starting in a given year. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/linkedin_ads/actions/create-report/create-report.mjs b/components/linkedin_ads/actions/create-report/create-report.mjs index 50c0c247e92a8..dea8c95f0b5d7 100644 --- a/components/linkedin_ads/actions/create-report/create-report.mjs +++ b/components/linkedin_ads/actions/create-report/create-report.mjs @@ -6,7 +6,7 @@ export default { key: "linkedin_ads-create-report", name: "Create A Report", description: "Queries the Analytics Finder to get analytics for the specified entity i.e company, account, campaign. [See the docs here](https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, @@ -14,6 +14,12 @@ export default { }, type: "action", props: { + // eslint-disable-next-line pipedream/props-label, pipedream/props-description + infoAlert: { + type: "alert", + alertType: "info", + content: "Please provide at least one facet to get analytics if needed. Eg. **Accounts**.", + }, ...common.props, adAccountId: { propDefinition: [ diff --git a/components/linkedin_ads/actions/send-conversion-event/send-conversion-event.mjs b/components/linkedin_ads/actions/send-conversion-event/send-conversion-event.mjs index 3fba286c56964..99e3dbc6970b5 100644 --- a/components/linkedin_ads/actions/send-conversion-event/send-conversion-event.mjs +++ b/components/linkedin_ads/actions/send-conversion-event/send-conversion-event.mjs @@ -5,7 +5,7 @@ export default { key: "linkedin_ads-send-conversion-event", name: "Send Conversion Event", description: "Sends a conversion event to LinkedIn Ads. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/conversions-api?view=li-lms-2024-01&tabs=http#streaming-conversion-events)", - version: "0.0.5", + version: "0.0.6", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/linkedin_ads/common/constants.mjs b/components/linkedin_ads/common/constants.mjs new file mode 100644 index 0000000000000..9ce474b72b72b --- /dev/null +++ b/components/linkedin_ads/common/constants.mjs @@ -0,0 +1,7 @@ +const VERSION_HEADER = "202509"; +const RESTLI_PROTOCOL_VERSION = "2.0.0"; + +export default { + VERSION_HEADER, + RESTLI_PROTOCOL_VERSION, +}; diff --git a/components/linkedin_ads/linkedin_ads.app.mjs b/components/linkedin_ads/linkedin_ads.app.mjs index f43fdf1c20bed..851eb41b4b074 100644 --- a/components/linkedin_ads/linkedin_ads.app.mjs +++ b/components/linkedin_ads/linkedin_ads.app.mjs @@ -1,5 +1,6 @@ import app from "@pipedream/linkedin"; import utils from "./common/utils.mjs"; +import constants from "./common/constants.mjs"; export default { ...app, @@ -151,6 +152,14 @@ export default { }, methods: { ...app.methods, + _getHeaders() { + return { + "Authorization": `Bearer ${this.$auth.oauth_access_token}`, + "Content-Type": "application/json", + "Linkedin-Version": constants.VERSION_HEADER, + "X-Restli-Protocol-Version": constants.RESTLI_PROTOCOL_VERSION, + }; + }, getSponsoredAccountUrn(id) { return `urn:li:sponsoredAccount:${id}`; }, diff --git a/components/linkedin_ads/package.json b/components/linkedin_ads/package.json index 8d4bb20a4e294..532ab917ad970 100644 --- a/components/linkedin_ads/package.json +++ b/components/linkedin_ads/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/linkedin_ads", - "version": "0.3.2", + "version": "0.3.3", "description": "Pipedream LinkedIn Ads Components", "main": "linkedin_ads.app.mjs", "keywords": [ @@ -14,6 +14,6 @@ }, "dependencies": { "@pipedream/linkedin": "^0.1.1", - "@pipedream/platform": "^3.0.3" + "@pipedream/platform": "^3.1.0" } } diff --git a/components/linkedin_ads/sources/new-event-registration-form-response/new-event-registration-form-response.mjs b/components/linkedin_ads/sources/new-event-registration-form-response/new-event-registration-form-response.mjs index 7b1c0947a60a3..972b32256fd5b 100644 --- a/components/linkedin_ads/sources/new-event-registration-form-response/new-event-registration-form-response.mjs +++ b/components/linkedin_ads/sources/new-event-registration-form-response/new-event-registration-form-response.mjs @@ -5,7 +5,7 @@ export default { key: "linkedin_ads-new-event-registration-form-response", name: "New Event Registration Form Response", description: "Emit new event when a fresh response is received on the event registration form. User needs to configure the prop of the specific event. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/organizations/events?view=li-lms-2024-01&tabs=http)", - version: "0.0.4", + version: "0.0.5", type: "source", dedupe: "unique", props: { diff --git a/components/linkedin_ads/sources/new-lead-gen-form-created/new-lead-gen-form-created.mjs b/components/linkedin_ads/sources/new-lead-gen-form-created/new-lead-gen-form-created.mjs index cb2996ac6238d..36e8eb7b6580c 100644 --- a/components/linkedin_ads/sources/new-lead-gen-form-created/new-lead-gen-form-created.mjs +++ b/components/linkedin_ads/sources/new-lead-gen-form-created/new-lead-gen-form-created.mjs @@ -6,7 +6,7 @@ export default { key: "linkedin_ads-new-lead-gen-form-created", name: "New Lead Gen Form Created", description: "Emit new event when a new lead is captured through a form. [See the documentation](https://learn.microsoft.com/en-us/linkedin/marketing/lead-sync/leadsync?view=li-lms-2023-07&tabs=http#find-lead-form-responses-by-owner)", - version: "0.0.3", + version: "0.0.4", type: "source", dedupe: "unique", props: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f52579af0685c..fe86285d55f0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -104,7 +104,7 @@ importers: version: 4.0.0 ts-jest: specifier: ^29.1.1 - version: 29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.6.3)))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.6.3)))(typescript@5.6.3) tsc-esm-fix: specifier: ^2.18.0 version: 2.20.27 @@ -3063,8 +3063,7 @@ importers: specifier: ^7.10.6 version: 7.14.0(@aws-sdk/client-sso-oidc@3.696.0(@aws-sdk/client-sts@3.696.0(aws-crt@1.25.0))(aws-crt@1.25.0))(aws-crt@1.25.0) - components/coinapi: - specifiers: {} + components/coinapi: {} components/coinbase: dependencies: @@ -3311,8 +3310,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/copicake: - specifiers: {} + components/copicake: {} components/copper: dependencies: @@ -3400,8 +3398,7 @@ importers: specifier: ^1.6.0 version: 1.6.6 - components/cronly: - specifiers: {} + components/cronly: {} components/crossmint: specifiers: {} @@ -8135,8 +8132,8 @@ importers: specifier: ^0.1.1 version: 0.1.1 '@pipedream/platform': - specifier: ^3.0.3 - version: 3.0.3 + specifier: ^3.1.0 + version: 3.1.0 components/linkish: dependencies: @@ -14810,8 +14807,7 @@ importers: specifier: ^0.1.4 version: 0.1.6 - components/topdesk: - specifiers: {} + components/topdesk: {} components/topmessage: dependencies: @@ -17009,7 +17005,7 @@ importers: version: 3.1.7 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.30)(typescript@5.7.2)))(typescript@5.7.2) + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.30)(typescript@5.7.2)))(typescript@5.7.2) tsup: specifier: ^8.3.6 version: 8.3.6(@microsoft/api-extractor@7.47.12(@types/node@20.17.30))(jiti@2.4.2)(postcss@8.5.6)(tsx@4.19.4)(typescript@5.7.2)(yaml@2.8.0) @@ -35845,7 +35841,7 @@ snapshots: '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -36116,45 +36112,21 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -36165,34 +36137,16 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -36203,89 +36157,41 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@8.0.0-alpha.13)': - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/helper-plugin-utils': 7.25.9 - optional: true - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -37348,7 +37254,7 @@ snapshots: '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 @@ -39854,8 +39760,6 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: @@ -42416,7 +42320,7 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.15.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) eslint: 8.57.1 optionalDependencies: typescript: 5.6.3 @@ -43310,20 +43214,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-jest@29.7.0(@babel/core@8.0.0-alpha.13): - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@8.0.0-alpha.13) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - optional: true - babel-plugin-istanbul@6.1.1: dependencies: '@babel/helper-plugin-utils': 7.25.9 @@ -43390,39 +43280,12 @@ snapshots: '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) - babel-preset-current-node-syntax@1.1.0(@babel/core@8.0.0-alpha.13): - dependencies: - '@babel/core': 8.0.0-alpha.13 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@8.0.0-alpha.13) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@8.0.0-alpha.13) - optional: true - babel-preset-jest@29.6.3(@babel/core@7.26.0): dependencies: '@babel/core': 7.26.0 babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) - babel-preset-jest@29.6.3(@babel/core@8.0.0-alpha.13): - dependencies: - '@babel/core': 8.0.0-alpha.13 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@8.0.0-alpha.13) - optional: true - backoff@2.5.0: dependencies: precond: 0.2.3 @@ -45631,7 +45494,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -47492,7 +47355,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -50073,7 +49936,7 @@ snapshots: dependencies: '@tediousjs/connection-string': 0.5.0 commander: 11.1.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) rfdc: 1.4.1 tarn: 3.0.2 tedious: 16.7.1 @@ -51822,7 +51685,7 @@ snapshots: ajv: 8.17.1 chalk: 5.3.0 ci-info: 4.1.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) deepmerge: 4.3.1 escalade: 3.2.0 fast-glob: 3.3.2 @@ -53958,7 +53821,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.30)(typescript@5.7.2)))(typescript@5.7.2): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.30)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.30)(typescript@5.7.2)))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -53976,8 +53839,9 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.26.0) + esbuild: 0.24.2 - ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.6.3)))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@20.17.6)(typescript@5.6.3)))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -53991,10 +53855,10 @@ snapshots: typescript: 5.6.3 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 8.0.0-alpha.13 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@8.0.0-alpha.13) + babel-jest: 29.7.0(@babel/core@7.26.0) ts-node@10.9.2(@types/node@20.17.30)(typescript@5.7.2): dependencies: @@ -54166,7 +54030,7 @@ snapshots: cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 @@ -54194,7 +54058,7 @@ snapshots: cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.0 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 @@ -54818,7 +54682,7 @@ snapshots: '@volar/typescript': 2.4.10 '@vue/language-core': 2.1.6(typescript@5.9.2) compare-versions: 6.1.1 - debug: 4.3.7(supports-color@9.4.0) + debug: 4.3.7(supports-color@5.5.0) kolorist: 1.8.0 local-pkg: 0.5.1 magic-string: 0.30.13 From a78b19656fcfcf9feca905d817e62cf09b1f8347 Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Thu, 23 Oct 2025 04:26:32 -0300 Subject: [PATCH 09/19] Merging pull request #18415 * Added actions * Added actions * Added actions * Added actions * Update components/etermin/etermin.app.mjs --------- Co-authored-by: michelle0927 --- .../actions/create-contact/create-contact.mjs | 86 +++++++++++++ .../actions/create-voucher/create-voucher.mjs | 78 ++++++++++++ components/etermin/etermin.app.mjs | 120 +++++++++++++++++- components/etermin/package.json | 4 +- pnpm-lock.yaml | 4 +- 5 files changed, 284 insertions(+), 8 deletions(-) create mode 100644 components/etermin/actions/create-contact/create-contact.mjs create mode 100644 components/etermin/actions/create-voucher/create-voucher.mjs diff --git a/components/etermin/actions/create-contact/create-contact.mjs b/components/etermin/actions/create-contact/create-contact.mjs new file mode 100644 index 0000000000000..09b18b2e19fb1 --- /dev/null +++ b/components/etermin/actions/create-contact/create-contact.mjs @@ -0,0 +1,86 @@ +import app from "../../etermin.app.mjs"; + +export default { + key: "etermin-create-contact", + name: "Create Contact", + description: "Create a new contact on eTermin. [See the documentation](https://app.swaggerhub.com/apis/etermin.net/eTermin-API/1.0.0#/Contact/post_contact)", + version: "0.0.1", + annotations: { + openWorldHint: true, + destructiveHint: false, + readOnlyHint: false, + }, + type: "action", + props: { + app, + updateWhenExistsgdt: { + propDefinition: [ + app, + "updateWhenExistsgdt", + ], + }, + salutation: { + propDefinition: [ + app, + "salutation", + ], + }, + title: { + propDefinition: [ + app, + "title", + ], + }, + lastname: { + propDefinition: [ + app, + "lastName", + ], + }, + firstname: { + propDefinition: [ + app, + "firstName", + ], + }, + company: { + propDefinition: [ + app, + "company", + ], + }, + birthday: { + propDefinition: [ + app, + "birthday", + ], + }, + email: { + propDefinition: [ + app, + "email", + ], + }, + }, + async run({ $ }) { + const updateWhenExistsgdt = this.updateWhenExistsgdt === true || this.updateWhenExistsgdt === "true" + ? 1 + : 0; + + const response = await this.app.createContact({ + $, + params: { + updatewhenexistsgdt: updateWhenExistsgdt, + salutation: this.salutation, + title: this.title, + lastname: this.lastname, + firstname: this.firstname, + company: this.company, + birthday: this.birthday, + email: this.email, + }, + }); + $.export("$summary", "Successfully created the new contact"); + return response; + }, +}; diff --git a/components/etermin/actions/create-voucher/create-voucher.mjs b/components/etermin/actions/create-voucher/create-voucher.mjs new file mode 100644 index 0000000000000..23671744ed764 --- /dev/null +++ b/components/etermin/actions/create-voucher/create-voucher.mjs @@ -0,0 +1,78 @@ +import app from "../../etermin.app.mjs"; + +export default { + key: "etermin-create-voucher", + name: "Create Voucher", + description: "Create a new voucher on eTermin. [See the documentation](https://app.swaggerhub.com/apis/etermin.net/eTermin-API/1.0.0#/Voucher/post_api_voucher)", + version: "0.0.1", + annotations: { + openWorldHint: true, + destructiveHint: false, + readOnlyHint: false, + }, + type: "action", + props: { + app, + id: { + propDefinition: [ + app, + "id", + ], + }, + description: { + propDefinition: [ + app, + "description", + ], + }, + priceInclVat: { + propDefinition: [ + app, + "priceInclVat", + ], + }, + isPercentage: { + propDefinition: [ + app, + "isPercentage", + ], + }, + customerEmail: { + propDefinition: [ + app, + "customerEmail", + ], + }, + validFrom: { + propDefinition: [ + app, + "validFrom", + ], + }, + validUntil: { + propDefinition: [ + app, + "validUntil", + ], + }, + }, + async run({ $ }) { + const response = await this.app.createVoucher({ + $, + params: { + id: this.id, + description: this.description, + priceinclvat: this.priceInclVat, + priceoriginal: this.priceInclVat, // Docs: Should be the same value as in priceinclvat, important with contingent + ispercentage: this.isPercentage + ? 1 + : 0, + customeremail: this.customerEmail, + validfrom: this.validFrom, + validuntil: this.validUntil, + }, + }); + $.export("$summary", "Successfully created the new voucher"); + return response; + }, +}; diff --git a/components/etermin/etermin.app.mjs b/components/etermin/etermin.app.mjs index 2a26947e945ef..12b5713b7c660 100644 --- a/components/etermin/etermin.app.mjs +++ b/components/etermin/etermin.app.mjs @@ -1,11 +1,123 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "etermin", - propDefinitions: {}, + propDefinitions: { + updateWhenExistsgdt: { + type: "boolean", + label: "Update When Exists", + description: "Set to `true` to check if the contact already exists. If found, the existing contact is updated. Requires email, or first name + last name + birthday.", + }, + salutation: { + type: "string", + label: "Salutation", + description: "Salutation or greeting prefix", + }, + title: { + type: "string", + label: "Title", + description: "Title of the contact", + }, + lastName: { + type: "string", + label: "Last Name", + description: "Contact's last name", + }, + firstName: { + type: "string", + label: "First Name", + description: "Contact's first name", + }, + company: { + type: "string", + label: "Company", + description: "Name of the company associated with the contact", + }, + birthday: { + type: "string", + label: "Birthday", + description: "Contact's date of birth in YYYY-MM-DD format", + }, + email: { + type: "string", + label: "Email", + description: "Email address of the contact", + }, + id: { + type: "string", + label: "ID", + description: "ID of the voucher", + }, + description: { + type: "string", + label: "Description", + description: "Description of the voucher", + }, + priceInclVat: { + type: "string", + label: "Price Including VAT", + description: "Price including VAT of the voucher", + }, + isPercentage: { + type: "boolean", + label: "Is Percentage", + description: "Indicates if the value of the voucher is a percentage", + }, + customerEmail: { + type: "string", + label: "Customer Email", + description: "Email address of the customer receiving the offer", + }, + validFrom: { + type: "string", + label: "Valid From", + description: "Start date of validity in YYYY-MM-DD format", + }, + validUntil: { + type: "string", + label: "Valid Until", + description: "End date of validity in YYYY-MM-DD format", + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://www.etermin.net/api"; + }, + async _makeRequest(opts = {}) { + const { + $, + path, + headers, + ...otherOpts + } = opts; + return axios($, { + ...otherOpts, + url: this._baseUrl() + path, + headers: { + "publickey": `${this.$auth.public_key}`, + "salt": `${this.$auth.salt}`, + "signature": `${this.$auth.signature}`, + "accept": "application/json", + "content-type": "application/json", + ...headers, + }, + }); + }, + + async createContact(args = {}) { + return this._makeRequest({ + path: "/contact", + method: "post", + ...args, + }); + }, + async createVoucher(args = {}) { + return this._makeRequest({ + path: "/voucher", + method: "post", + ...args, + }); }, }, }; diff --git a/components/etermin/package.json b/components/etermin/package.json index 22587b6fd5925..cad075fdf94fc 100644 --- a/components/etermin/package.json +++ b/components/etermin/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/etermin", - "version": "0.6.0", + "version": "0.7.0", "description": "Pipedream etermin Components", "main": "etermin.app.mjs", "keywords": [ @@ -13,6 +13,6 @@ "access": "public" }, "dependencies": { - "@pipedream/platform": "^3.0.0" + "@pipedream/platform": "^3.1.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe86285d55f0e..cc1b2c546bcb0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4701,8 +4701,8 @@ importers: components/etermin: dependencies: '@pipedream/platform': - specifier: ^3.0.0 - version: 3.0.3 + specifier: ^3.1.0 + version: 3.1.0 components/ethereum: {} From 6f9e60304291ad53c4ee51e1b89caaf418b0931c Mon Sep 17 00:00:00 2001 From: danhsiung <35384182+danhsiung@users.noreply.github.com> Date: Thu, 23 Oct 2025 11:33:09 -0700 Subject: [PATCH 10/19] Adding app scaffolding for ashby --- components/ashby/ashby.app.mjs | 11 +++++++++++ components/ashby/package.json | 15 +++++++++++++++ pnpm-lock.yaml | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 components/ashby/ashby.app.mjs create mode 100644 components/ashby/package.json diff --git a/components/ashby/ashby.app.mjs b/components/ashby/ashby.app.mjs new file mode 100644 index 0000000000000..1e4d025f0096d --- /dev/null +++ b/components/ashby/ashby.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "ashby", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/ashby/package.json b/components/ashby/package.json new file mode 100644 index 0000000000000..68dbd0d1dfcfe --- /dev/null +++ b/components/ashby/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/ashby", + "version": "0.0.1", + "description": "Pipedream Ashby Components", + "main": "ashby.app.mjs", + "keywords": [ + "pipedream", + "ashby" + ], + "homepage": "https://pipedream.com/apps/ashby", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc1b2c546bcb0..6e244eb6ae684 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1112,6 +1112,9 @@ importers: components/ascora: {} + components/ashby: + specifiers: {} + components/ashby_job_postings_api: {} components/asin_data_api: {} From d956cd7d80aaf18948d71008668b4b420f19953c Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Thu, 23 Oct 2025 15:18:10 -0400 Subject: [PATCH 11/19] Notion improvements - use notion-helper (#18797) * use notion-helper * pnpm-lock.yaml * versions --- .../actions/append-block/append-block.mjs | 37 +++------- .../actions/common/base-page-builder.mjs | 57 +++++++++++++++ .../complete-file-upload.mjs | 2 +- .../create-database/create-database.mjs | 2 +- .../create-file-upload/create-file-upload.mjs | 2 +- .../create-page-from-database.mjs | 44 ++++++----- .../actions/create-page/create-page.mjs | 73 ++++--------------- .../actions/delete-block/delete-block.mjs | 2 +- .../actions/duplicate-page/duplicate-page.mjs | 2 +- .../list-file-uploads/list-file-uploads.mjs | 2 +- .../retrieve-file-upload.mjs | 2 +- .../send-file-upload/send-file-upload.mjs | 2 +- .../actions/update-block/update-block.mjs | 2 +- .../update-database/update-database.mjs | 2 +- .../actions/update-page/update-page.mjs | 2 +- components/notion/package.json | 3 +- pnpm-lock.yaml | 9 +++ 17 files changed, 124 insertions(+), 121 deletions(-) diff --git a/components/notion/actions/append-block/append-block.mjs b/components/notion/actions/append-block/append-block.mjs index 2f041e613cf9b..9882fc372fa0e 100644 --- a/components/notion/actions/append-block/append-block.mjs +++ b/components/notion/actions/append-block/append-block.mjs @@ -1,13 +1,13 @@ import notion from "../../notion.app.mjs"; import base from "../common/base-page-builder.mjs"; +import { appendBlocks } from "notion-helper"; export default { ...base, key: "notion-append-block", name: "Append Block to Parent", - description: - "Append new and/or existing blocks to the specified parent. [See the documentation](https://developers.notion.com/reference/patch-block-children)", - version: "0.3.11", + description: "Append new and/or existing blocks to the specified parent. [See the documentation](https://developers.notion.com/reference/patch-block-children)", + version: "0.4.0", annotations: { destructiveHint: false, openWorldHint: true, @@ -81,16 +81,6 @@ export default { return {}; }, - methods: { - ...base.methods, - chunkArray(array, chunkSize = 100) { - const chunks = []; - for (let i = 0; i < array.length; i += chunkSize) { - chunks.push(array.slice(i, i + chunkSize)); - } - return chunks; - }, - }, async run({ $ }) { const { blockTypes } = this; const children = []; @@ -133,20 +123,13 @@ export default { return; } - const results = []; - const chunks = this.chunkArray(children); - - for (const chunk of chunks) { - const { results: payload } = await this.notion.appendBlock( - this.pageId, - chunk, - ); - results.push(payload); - } - - const totalAppended = results.reduce((sum, res) => sum + res.length, 0); + const response = await appendBlocks({ + client: await this.notion._getNotionClient(), + block_id: this.pageId, + children, + }); - $.export("$summary", `Appended ${totalAppended} block(s) successfully`); - return results.flat(); + $.export("$summary", "Appended blocks successfully"); + return response.apiResponses; }, }; diff --git a/components/notion/actions/common/base-page-builder.mjs b/components/notion/actions/common/base-page-builder.mjs index b7ac7cfa6ebdc..b0128e732e90a 100644 --- a/components/notion/actions/common/base-page-builder.mjs +++ b/components/notion/actions/common/base-page-builder.mjs @@ -5,6 +5,9 @@ import { } from "../../common/notion-meta-properties.mjs"; import NOTION_META from "../../common/notion-meta-selection.mjs"; import NOTION_PAGE_PROPERTIES from "../../common/notion-page-properties.mjs"; +import { + createPage, createNotionBuilder, +} from "notion-helper"; import { ConfigurationError } from "@pipedream/platform"; export default { @@ -299,5 +302,59 @@ export default { }); return children.filter((child) => child !== undefined); }, + async buildPageFromDataSource({ + pageContent, parentDataSourceId, parentPageId, properties = [], icon, cover, + }) { + let pageBlocks = []; + if (pageContent && pageContent.trim()) { + try { + pageBlocks = markdownToBlocks(pageContent); + } catch (error) { + throw new ConfigurationError(`Failed to convert Markdown content to Notion blocks: ${error.message}`); + } + } + + // Build the Notion page using notion-helper + let pageBuilder = createNotionBuilder({ + limitChildren: false, + limitNesting: false, + allowBlankParagraphs: true, + }); + if (parentDataSourceId) { + pageBuilder = pageBuilder.parentDataSource(parentDataSourceId); + } + if (parentPageId) { + pageBuilder = pageBuilder.parentPage(parentPageId); + } + + for (const property of properties) { + const propertyTypeCamelCase = property.type.replace(/_([a-z])/g, (_, c) => c.toUpperCase()); + pageBuilder = pageBuilder[propertyTypeCamelCase](property.label, property.value); + } + + if (icon) { + pageBuilder = pageBuilder.icon(icon); + } + + if (cover) { + pageBuilder = pageBuilder.cover(cover); + } + + if (pageBlocks.length > 0) { + pageBuilder = pageBuilder.loop( + (page, block) => { + return page.addExistingBlock(block); + }, + pageBlocks, + ); + } + + const page = pageBuilder.build(); + const response = await createPage({ + client: await this.notion._getNotionClient(), + data: page.content, + }); + return response.apiResponse; + }, }, }; diff --git a/components/notion/actions/complete-file-upload/complete-file-upload.mjs b/components/notion/actions/complete-file-upload/complete-file-upload.mjs index 08b57de467ae6..6f92291d3a250 100644 --- a/components/notion/actions/complete-file-upload/complete-file-upload.mjs +++ b/components/notion/actions/complete-file-upload/complete-file-upload.mjs @@ -6,7 +6,7 @@ export default { key: "notion-complete-file-upload", name: "Complete File Upload", description: "Use this action to finalize a `mode=multi_part` file upload after all of the parts have been sent successfully. [See the documentation](https://developers.notion.com/reference/complete-a-file-upload)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/create-database/create-database.mjs b/components/notion/actions/create-database/create-database.mjs index 24c30d1e1ddfe..efbd5abb35949 100644 --- a/components/notion/actions/create-database/create-database.mjs +++ b/components/notion/actions/create-database/create-database.mjs @@ -7,7 +7,7 @@ export default { key: "notion-create-database", name: "Create Database", description: "Create a database and its initial data source. [See the documentation](https://developers.notion.com/reference/database-create)", - version: "0.1.3", + version: "0.1.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/create-file-upload/create-file-upload.mjs b/components/notion/actions/create-file-upload/create-file-upload.mjs index 2f7f304fd947a..0d10489b4469c 100644 --- a/components/notion/actions/create-file-upload/create-file-upload.mjs +++ b/components/notion/actions/create-file-upload/create-file-upload.mjs @@ -6,7 +6,7 @@ export default { key: "notion-create-file-upload", name: "Create File Upload", description: "Create a file upload. [See the documentation](https://developers.notion.com/reference/create-a-file-upload)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/create-page-from-database/create-page-from-database.mjs b/components/notion/actions/create-page-from-database/create-page-from-database.mjs index 2d10a6393553b..2e461a0c46c45 100644 --- a/components/notion/actions/create-page-from-database/create-page-from-database.mjs +++ b/components/notion/actions/create-page-from-database/create-page-from-database.mjs @@ -9,7 +9,7 @@ export default { key: "notion-create-page-from-database", name: "Create Page from Data Source", description: "Create a page from a data source. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "1.0.4", + version: "1.1.0", annotations: { destructiveHint: false, openWorldHint: true, @@ -91,35 +91,33 @@ export default { * @returns the constructed page in Notion format */ buildPage(parentDataSource) { - const meta = this.buildDataSourceMeta(parentDataSource); this.properties = utils.parseObject(this.properties); const properties = this.buildPageProperties(parentDataSource.properties); - const children = this.createBlocks(this.pageContent); - return { - ...meta, - properties, - children, - }; + + const propertiesArray = []; + for (const property of Object.values(parentDataSource.properties)) { + if (properties[property.id]) { + propertiesArray.push({ + label: property.name, + type: property.type, + value: this[property.name] || this.properties[property.name], + }); + } + } + + return propertiesArray; }, }, async run({ $ }) { - const MAX_BLOCKS = 100; const parentPage = await this.notion.retrieveDataSource(this.parentDataSource); - const { - children, ...page - } = this.buildPage(parentPage); - const response = await this.notion.createPage({ - ...page, - children: children.slice(0, MAX_BLOCKS), - parent: { - data_source_id: this.parentDataSource, - }, + const properties = await this.buildPage(parentPage); + const response = await this.buildPageFromDataSource({ + pageContent: this.pageContent, + parentDataSourceId: this.parentDataSource, + properties, + icon: this.icon, + cover: this.cover, }); - let remainingBlocks = children.slice(MAX_BLOCKS); - while (remainingBlocks.length > 0) { - await this.notion.appendBlock(response.id, remainingBlocks.slice(0, MAX_BLOCKS)); - remainingBlocks = remainingBlocks.slice(MAX_BLOCKS); - } $.export("$summary", "Created page successfully"); return response; }, diff --git a/components/notion/actions/create-page/create-page.mjs b/components/notion/actions/create-page/create-page.mjs index 1793703e6ba59..3c4643084f358 100644 --- a/components/notion/actions/create-page/create-page.mjs +++ b/components/notion/actions/create-page/create-page.mjs @@ -1,4 +1,3 @@ -import utils from "../../common/utils.mjs"; import notion from "../../notion.app.mjs"; import base from "../common/base-page-builder.mjs"; @@ -7,7 +6,7 @@ export default { key: "notion-create-page", name: "Create Page", description: "Create a page from a parent page. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "0.2.24", + version: "0.3.0", annotations: { destructiveHint: false, openWorldHint: true, @@ -49,64 +48,20 @@ export default { meta: this.metaTypes, }); }, - methods: { - ...base.methods, - /** - * Builds a page from a parent page - * @param parentPage - the parent page - * @returns the constructed page in Notion format - */ - buildPage(parentPage) { - const meta = this.buildPageMeta(parentPage); - const children = this.createBlocks(this.pageContent); - - const properties = {}; - if (this.title) { - properties.title = { - title: utils.buildTextProperty(this.title), - }; - } - - return { - ...meta, - properties, - children, - }; - }, - splitChildrenArray(children) { - const first100Children = children.slice(0, 100); - const restOfChildren = children.slice(100); - return { - first100Children, - restOfChildren, - }; - }, - async appendChildren(pageId, children) { - while (children.length) { - const { - first100Children, restOfChildren, - } = this.splitChildrenArray(children); - await this.notion.appendBlock(pageId, first100Children); - children = restOfChildren; - } - }, - }, async run({ $ }) { - const parentPage = await this.notion.retrievePage(this.parent); - const page = this.buildPage(parentPage); - - // Notion restricts children array length to <= 100 - const { - first100Children, restOfChildren, - } = this.splitChildrenArray(page.children); - page.children = first100Children; - - const response = await this.notion.createPage(page); - - if (restOfChildren.length) { - await this.appendChildren(response.id, restOfChildren); - } - + const response = await this.buildPageFromDataSource({ + pageContent: this.pageContent, + parentPageId: this.parent, + properties: [ + { + label: "title", + type: "title", + value: this.title, + }, + ], + icon: this.icon, + cover: this.cover, + }); $.export("$summary", "Created page successfully"); return response; }, diff --git a/components/notion/actions/delete-block/delete-block.mjs b/components/notion/actions/delete-block/delete-block.mjs index 19a38cd676384..c6f85f92881ee 100644 --- a/components/notion/actions/delete-block/delete-block.mjs +++ b/components/notion/actions/delete-block/delete-block.mjs @@ -6,7 +6,7 @@ export default { key: "notion-delete-block", name: "Delete Block", description: "Sets a Block object, including page blocks, to archived: true using the ID specified. [See the documentation](https://developers.notion.com/reference/delete-a-block)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/notion/actions/duplicate-page/duplicate-page.mjs b/components/notion/actions/duplicate-page/duplicate-page.mjs index e39d96e6011cc..d426033615e5e 100644 --- a/components/notion/actions/duplicate-page/duplicate-page.mjs +++ b/components/notion/actions/duplicate-page/duplicate-page.mjs @@ -7,7 +7,7 @@ export default { key: "notion-duplicate-page", name: "Duplicate Page", description: "Create a new page copied from an existing page block. [See the documentation](https://developers.notion.com/reference/post-page)", - version: "0.0.21", + version: "0.0.22", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/list-file-uploads/list-file-uploads.mjs b/components/notion/actions/list-file-uploads/list-file-uploads.mjs index 7170b256793b7..92170e17b84f8 100644 --- a/components/notion/actions/list-file-uploads/list-file-uploads.mjs +++ b/components/notion/actions/list-file-uploads/list-file-uploads.mjs @@ -6,7 +6,7 @@ export default { key: "notion-list-file-uploads", name: "List File Uploads", description: "Use this action to list file uploads. [See the documentation](https://developers.notion.com/reference/list-file-uploads)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs b/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs index c1bd41ef71729..2369f366f6be8 100644 --- a/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs +++ b/components/notion/actions/retrieve-file-upload/retrieve-file-upload.mjs @@ -6,7 +6,7 @@ export default { key: "notion-retrieve-file-upload", name: "Retrieve File Upload", description: "Use this action to retrieve a file upload. [See the documentation](https://developers.notion.com/reference/retrieve-a-file-upload)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/send-file-upload/send-file-upload.mjs b/components/notion/actions/send-file-upload/send-file-upload.mjs index 46c3c7cdd88dc..19f1e85c97697 100644 --- a/components/notion/actions/send-file-upload/send-file-upload.mjs +++ b/components/notion/actions/send-file-upload/send-file-upload.mjs @@ -8,7 +8,7 @@ export default { key: "notion-send-file-upload", name: "Send File Upload", description: "Send a file upload. [See the documentation](https://developers.notion.com/reference/send-a-file-upload)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/notion/actions/update-block/update-block.mjs b/components/notion/actions/update-block/update-block.mjs index c573f66acbff1..f98173ca0ffab 100644 --- a/components/notion/actions/update-block/update-block.mjs +++ b/components/notion/actions/update-block/update-block.mjs @@ -7,7 +7,7 @@ export default { key: "notion-update-block", name: "Update Child Block", description: "Updates a child block object. [See the documentation](https://developers.notion.com/reference/update-a-block)", - version: "0.0.6", + version: "0.0.7", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/notion/actions/update-database/update-database.mjs b/components/notion/actions/update-database/update-database.mjs index 1fcc00e6bb89a..9c1137fa3e76d 100644 --- a/components/notion/actions/update-database/update-database.mjs +++ b/components/notion/actions/update-database/update-database.mjs @@ -7,7 +7,7 @@ export default { key: "notion-update-database", name: "Update Data Source", description: "Update a data source. [See the documentation](https://developers.notion.com/reference/update-a-data-source)", - version: "1.0.3", + version: "1.0.4", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/notion/actions/update-page/update-page.mjs b/components/notion/actions/update-page/update-page.mjs index a6bf3614a30c4..0c00a60fb543d 100644 --- a/components/notion/actions/update-page/update-page.mjs +++ b/components/notion/actions/update-page/update-page.mjs @@ -7,7 +7,7 @@ export default { key: "notion-update-page", name: "Update Page", description: "Update a page's property values. To append page content, use the *Append Block* action instead. [See the documentation](https://developers.notion.com/reference/patch-page)", - version: "2.0.3", + version: "2.0.4", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/notion/package.json b/components/notion/package.json index 9898f4a4f92b6..cd903158abb79 100644 --- a/components/notion/package.json +++ b/components/notion/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/notion", - "version": "1.0.4", + "version": "1.0.5", "description": "Pipedream Notion Components", "main": "notion.app.mjs", "keywords": [ @@ -14,6 +14,7 @@ "@pipedream/platform": "^3.1.0", "@tryfabric/martian": "^1.2.4", "lodash-es": "^4.17.21", + "notion-helper": "^1.3.27", "notion-to-md": "3.1.8" }, "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e244eb6ae684..0128f894a9cbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9700,6 +9700,9 @@ importers: lodash-es: specifier: ^4.17.21 version: 4.17.21 + notion-helper: + specifier: ^1.3.27 + version: 1.3.27 notion-to-md: specifier: 3.1.8 version: 3.1.8 @@ -29161,6 +29164,10 @@ packages: resolution: {integrity: sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==} engines: {node: '>=14.16'} + notion-helper@1.3.27: + resolution: {integrity: sha512-XA759GyxjjzPy6HTpXi1ZiJJ6Kp89ShWrLrDBME+GNEdBdx/C6dpH3vKTps9nfSoHuFMdMFXxkq5r3hbTLHQjg==} + engines: {node: '>=18.0.0'} + notion-to-md@3.1.8: resolution: {integrity: sha512-DuEslJAbmUG2IRVcoeiCdsE2tI8yXOG6NiHlzxYTcKMmkAtoj2Fgq35Gf5T8s92uzpT2ueVf3aCOq7XuVLVYOA==} engines: {node: '>=12'} @@ -50343,6 +50350,8 @@ snapshots: normalize-url@8.0.1: {} + notion-helper@1.3.27: {} + notion-to-md@3.1.8: dependencies: markdown-table: 2.0.0 From 77f64ec261e9aa48d2d35c5e7aa7bc0ddbdc0c28 Mon Sep 17 00:00:00 2001 From: danhsiung <35384182+danhsiung@users.noreply.github.com> Date: Thu, 23 Oct 2025 12:33:06 -0700 Subject: [PATCH 12/19] Adding app scaffolding for dasha_ai --- components/dasha_ai/dasha_ai.app.mjs | 11 +++++++++++ components/dasha_ai/package.json | 15 +++++++++++++++ pnpm-lock.yaml | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 components/dasha_ai/dasha_ai.app.mjs create mode 100644 components/dasha_ai/package.json diff --git a/components/dasha_ai/dasha_ai.app.mjs b/components/dasha_ai/dasha_ai.app.mjs new file mode 100644 index 0000000000000..2d6a152644e40 --- /dev/null +++ b/components/dasha_ai/dasha_ai.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "dasha_ai", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/dasha_ai/package.json b/components/dasha_ai/package.json new file mode 100644 index 0000000000000..4146f54824402 --- /dev/null +++ b/components/dasha_ai/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/dasha_ai", + "version": "0.0.1", + "description": "Pipedream Dasha AI Components", + "main": "dasha_ai.app.mjs", + "keywords": [ + "pipedream", + "dasha_ai" + ], + "homepage": "https://pipedream.com/apps/dasha_ai", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0128f894a9cbd..3833634c633c6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3595,6 +3595,9 @@ importers: components/darwinbox: {} + components/dasha_ai: + specifiers: {} + components/data247: {} components/data_axle_platform: From eb27b30dcbef767e46716afcb54c3cacf13f815c Mon Sep 17 00:00:00 2001 From: js07 <19861096+js07@users.noreply.github.com> Date: Thu, 23 Oct 2025 17:23:12 -0400 Subject: [PATCH 13/19] Add README for Slack v2 app with usage instructions and examples (#18850) --- components/slack_v2/README.md | 83 +++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 components/slack_v2/README.md diff --git a/components/slack_v2/README.md b/components/slack_v2/README.md new file mode 100644 index 0000000000000..2d08d7b6f042b --- /dev/null +++ b/components/slack_v2/README.md @@ -0,0 +1,83 @@ +# Overview + +The Pipedream app for Slack enables you to build event-driven workflows that interact with the Slack API. Once you authorize the app's access to your workspace, you can use [Pipedream workflows](/workflows/) to perform common Slack [actions](#workflow-actions) or [write your own code](/code/) against the Slack API. + +The Pipedream app for Slack is not a typical app. You don't interact with it directly as a bot, and it doesn't add custom functionality to your workspace out of the box. It makes it easier to automate anything you'd typically use the Slack API for, using Pipedream workflows. + +- Automate posting updates to your team channels +- Create a bot to answer common questions +- Integrate with your existing tools and services +- And much more! + +# Getting Started + +## Should I use the app for Slack or bot for Slack on Pipedream? + +The app for Slack is the easiest and most convenient option to get started. It installs the official Pipedream bot into your Slack workspace with just a few clicks. + +However, if you'd like to use your own bot registered with the [Slack API](https://api.slack.com), you can use the [bot for Slack](https://pipedream.com/apps/slack-bot) instead. + +The bot for Slack requires a bot token to allow your Pipedream workflows to authenticate as your bot. The extra setup steps allow you to list your custom bot on the Slack Marketplace or install the bot on other workspaces as your bot's name instead of as Pipedream. + +## Accounts + +1. Visit [https://pipedream.com/accounts](https://pipedream.com/accounts). +2. Click on the **Click Here To Connect An App** button in the top-right. +3. Search for "Slack" among the list of apps and select it. +4. This will open a new window asking you to allow Pipedream access to your Slack workspace. Choose the right workspace where you'd like to install the app, then click **Allow**. +5. That's it! You can now use this Slack account in any [actions](#workflow-actions) or [link it to any code step](/connected-accounts/#connecting-accounts). + +## Within a workflow + +1. [Create a new workflow](https://pipedream.com/new). +2. Select your trigger (HTTP, Cron, etc.). +3. Click the **+** button below the trigger step and search for "Slack". +4. Select the **Send a Message** action. +5. Click the **Connect Account** button near the top of the step. This will prompt you to select any existing Slack accounts you've previously authenticated with Pipedream, or you can select a **New** account. Clicking **New** opens a new window asking you to allow Pipedream access to your Slack workspace. Choose the right workspace where you'd like to install the app, then click **Allow**. +6. After allowing access, you can connect to the Slack API using any of the Slack actions within a Pipedream workflow. + +# Example Use Cases + +- **Automated Standup Reports**: Trigger a workflow on Pipedream to collect standup updates from team members within a Slack channel at a scheduled time. The workflow compiles updates into a formatted report and posts it to a designated channel or sends it via email using an app like SendGrid. + +- **Customer Support Ticketing**: Use Pipedream to monitor a Slack support channel for new messages. On detecting a message, the workflow creates a ticket in a customer support platform like Zendesk or Jira. It can also format and forward critical information back to the Slack channel to keep the team updated. + +- **Real-time CRM Updates**: Configure a Pipedream workflow to listen for specific trigger words in sales-related Slack channels. When mentioned, the workflow fetches corresponding data from a CRM tool like Salesforce and posts the latest deal status or customer information in the Slack conversation for quick reference. + +# Troubleshooting + +## Error Responses + +Slack's API will always return JSON, regardless if the request was successfully processed or not. + +Each JSON response includes an `ok` boolean property indicating whether the action succeeded or failed. + +Example of a successful response: + +```json +{ + "ok": true +} +``` + +If the `ok` property is false, Slack will also include an `error` property with a short machine-readable code that describes the error. + +Example of a failure: + +```json +{ + "ok": false, + "error": "invalid_parameters" +} +``` + +Additionally, if the action is successful, there's still a chance of a `warning` property in the response. This may contain a comma-separated list of warning codes. + +Example of a successful response, but with warnings: + +```json +{ + "ok": true, + "warnings": "invalid_character_set" +} +``` From caa98c3324f87b854a0baa9052867872a6e080b8 Mon Sep 17 00:00:00 2001 From: danhsiung <35384182+danhsiung@users.noreply.github.com> Date: Thu, 23 Oct 2025 16:33:05 -0700 Subject: [PATCH 14/19] Adding app scaffolding for exa --- components/exa/exa.app.mjs | 11 +++++++++++ components/exa/package.json | 15 +++++++++++++++ pnpm-lock.yaml | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 components/exa/exa.app.mjs create mode 100644 components/exa/package.json diff --git a/components/exa/exa.app.mjs b/components/exa/exa.app.mjs new file mode 100644 index 0000000000000..ca0058999ed42 --- /dev/null +++ b/components/exa/exa.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "exa", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/exa/package.json b/components/exa/package.json new file mode 100644 index 0000000000000..2f76910331878 --- /dev/null +++ b/components/exa/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/exa", + "version": "0.0.1", + "description": "Pipedream Exa Components", + "main": "exa.app.mjs", + "keywords": [ + "pipedream", + "exa" + ], + "homepage": "https://pipedream.com/apps/exa", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3833634c633c6..ca38016a18052 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4780,6 +4780,9 @@ importers: specifier: ^1.5.1 version: 1.6.6 + components/exa: + specifiers: {} + components/exact: dependencies: '@pipedream/platform': From b8dd91f13f921691b79c06598635545ae78812ca Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Fri, 24 Oct 2025 06:17:32 +0530 Subject: [PATCH 15/19] interviewId --- components/workday/workday.app.mjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/components/workday/workday.app.mjs b/components/workday/workday.app.mjs index 2d71045c2e42b..5b86e99611002 100644 --- a/components/workday/workday.app.mjs +++ b/components/workday/workday.app.mjs @@ -379,6 +379,25 @@ export default { })); }, }, + interviewId: { + type: "string", + label: "Interview ID", + description: "The ID of the interview.", + async options({ page }) { + const res = await this.listInterviews?.({ + params: { + limit: 50, + offset: 50 * page, + }, + }) || { + data: [], + }; + return (res.data || []).map((i) => ({ + label: i.descriptor || i.id, + value: i.id, + })); + }, + }, maxResults: { type: "integer", From 61047ea764768df6edda529a8ac6dd27161e7c4a Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Fri, 24 Oct 2025 06:30:00 +0530 Subject: [PATCH 16/19] added interviewId to async options --- .../get-interview-details/get-interview-details.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/workday/actions/get-interview-details/get-interview-details.mjs b/components/workday/actions/get-interview-details/get-interview-details.mjs index 6b5df31fc4316..c002c2d4908b5 100644 --- a/components/workday/actions/get-interview-details/get-interview-details.mjs +++ b/components/workday/actions/get-interview-details/get-interview-details.mjs @@ -13,9 +13,10 @@ export default { props: { workday, interviewId: { - type: "string", - label: "Interview ID", - description: "The unique identifier for the interview.", + propDefinition: [ + workday, + "interviewId", + ], }, }, async run({ $ }) { From 91833f696823ebb93d23bf2dd0264a9d9081d254 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Fri, 24 Oct 2025 11:05:05 +0530 Subject: [PATCH 17/19] fixes --- .../actions/update-mentorship/update-mentorship.mjs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/workday/actions/update-mentorship/update-mentorship.mjs b/components/workday/actions/update-mentorship/update-mentorship.mjs index 5d83cc188aed4..701098b458785 100644 --- a/components/workday/actions/update-mentorship/update-mentorship.mjs +++ b/components/workday/actions/update-mentorship/update-mentorship.mjs @@ -37,7 +37,6 @@ export default { type: "string", label: "Start Date", description: "Updated start date. Example: `2025-10-18T07:00:00.000Z`", - optional: true, }, endDate: { type: "string", @@ -53,17 +52,14 @@ export default { }, }, async run({ $ }) { - const data = {}; + const data = { + startDate: this.startDate, + }; if (this.comment) data.comment = this.comment; if (this.purpose) data.purpose = this.purpose; if (this.endDate) data.endDate = this.endDate; - if (this.startDate) data.startDate = this.startDate; if (this.descriptor) data.descriptor = this.descriptor; - if (Object.keys(data).length === 0) { - throw new ConfigurationError("At least one field to update must be provided."); - } - const response = await this.workday.updateMentorship({ id: this.mentorshipId, data, From d87e92f6f5d689da46cbfa8314ba1e460ddead34 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Fri, 24 Oct 2025 11:11:30 +0530 Subject: [PATCH 18/19] fixes --- .../workday/actions/update-mentorship/update-mentorship.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/components/workday/actions/update-mentorship/update-mentorship.mjs b/components/workday/actions/update-mentorship/update-mentorship.mjs index 701098b458785..270f6bf98221c 100644 --- a/components/workday/actions/update-mentorship/update-mentorship.mjs +++ b/components/workday/actions/update-mentorship/update-mentorship.mjs @@ -1,5 +1,4 @@ import workday from "../../workday.app.mjs"; -import { ConfigurationError } from "@pipedream/platform"; export default { key: "workday-update-mentorship", From 137016c930f7cfe9a33aac79775ca6fa1327a9a8 Mon Sep 17 00:00:00 2001 From: Lokesh chand Date: Wed, 29 Oct 2025 19:56:07 +0530 Subject: [PATCH 19/19] updated --- .../create-digital-course.mjs | 2 +- .../create-distribution-request.mjs | 80 ------------------- .../create-mentorship-for-me.mjs | 21 ++--- .../create-mentorship-for-worker.mjs | 37 +++++---- components/workday/workday.app.mjs | 7 -- 5 files changed, 32 insertions(+), 115 deletions(-) delete mode 100644 components/workday/actions/create-distribution-request/create-distribution-request.mjs diff --git a/components/workday/actions/create-digital-course/create-digital-course.mjs b/components/workday/actions/create-digital-course/create-digital-course.mjs index 6d46ab0b4e5c3..f5b079df3ebca 100644 --- a/components/workday/actions/create-digital-course/create-digital-course.mjs +++ b/components/workday/actions/create-digital-course/create-digital-course.mjs @@ -76,7 +76,7 @@ export default { const data = { topics: parsedTopics, title: this.title, - availabilityStatus: this.availabilityStatus, + availabilityStatus: utils.parseObject(this.availabilityStatus), lessons: parsedLessons, description: this.description, }; diff --git a/components/workday/actions/create-distribution-request/create-distribution-request.mjs b/components/workday/actions/create-distribution-request/create-distribution-request.mjs deleted file mode 100644 index ad044ff87cb37..0000000000000 --- a/components/workday/actions/create-distribution-request/create-distribution-request.mjs +++ /dev/null @@ -1,80 +0,0 @@ -import workday from "../../workday.app.mjs"; -import { ConfigurationError } from "@pipedream/platform"; - -export default { - key: "workday-create-distribution-request", - name: "Create Distribution Request", - description: "Create a new distribution request. [See the Documentation](https://community.workday.com/sites/default/files/file-hosting/restapi/#journeys/v1/post-/distributionRequests)", - version: "0.0.1", - annotations: { - destructiveHint: false, - openWorldHint: true, - readOnlyHint: false, - }, - type: "action", - props: { - workday, - builder: { - type: "object", - label: "Builder", - description: "A journey builder object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", - }, - category: { - type: "object", - label: "Category", - description: "A journey category object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", - }, - discoverableBuilder: { - type: "object", - label: "Discoverable Builder", - description: "A discoverable journey builder object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", - }, - includePreviousRecipients: { - type: "boolean", - label: "Include Previous Recipients", - description: "Whether to include previous recipients. Example: `true`", - optional: true, - }, - relatedRole: { - type: "object", - label: "Related Role", - description: "Related role object. Example: `{ \"id\": \"00000000000000000000000000000000\" }`", - }, - descriptor: { - type: "string", - label: "Descriptor", - description: "Display name for the instance. Example: `Distribution Request for Training`", - optional: true, - }, - }, - async run({ $ }) { - if (!this.builder || typeof this.builder !== "object" || !this.builder.id || !this.builder.id.trim()) { - throw new ConfigurationError("Builder is required and must be an object with a non-empty id property."); - } - if (!this.category || typeof this.category !== "object" || !this.category.id || !this.category.id.trim()) { - throw new ConfigurationError("Category is required and must be an object with a non-empty id property."); - } - if (this.discoverableBuilder && (typeof this.discoverableBuilder !== "object" || !this.discoverableBuilder.id || !this.discoverableBuilder.id.trim())) { - throw new ConfigurationError("Discoverable Builder (if provided) must be an object with a non-empty id property."); - } - if (this.relatedRole && (typeof this.relatedRole !== "object" || !this.relatedRole.id || !this.relatedRole.id.trim())) { - throw new ConfigurationError("Related Role (if provided) must be an object with a non-empty id property."); - } - - const data = { - builder: this.builder, - category: this.category, - }; - if (this.discoverableBuilder) data.discoverableBuilder = this.discoverableBuilder; - if (typeof this.includePreviousRecipients === "boolean") data.includePreviousRecipients = this.includePreviousRecipients; - if (this.relatedRole) data.relatedRole = this.relatedRole; - if (this.descriptor) data.descriptor = this.descriptor; - - const response = await this.workday.createDistributionRequest({ - $, - data, - }); - $.export("$summary", "Distribution request created"); - return response; - }, -}; diff --git a/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs b/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs index 852b3bda0f907..67aec5e0df39f 100644 --- a/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs +++ b/components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs @@ -30,9 +30,10 @@ export default { description: "Purpose of the mentorship.", }, mentor: { - type: "object", - label: "Mentor", - description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`", + propDefinition: [ + workday, + "workerId", + ], }, comment: { type: "string", @@ -43,8 +44,9 @@ export default { mentorType: { type: "object", label: "Mentor Type", - description: "Object with at least an `id`. Example: `{ id: \"00000000000000000000000000000000\"}`", - optional: true, + 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", @@ -57,12 +59,9 @@ export default { 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.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) { - throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property."); - } if (this.mentorType !== undefined) { if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) { - throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property."); + throw new ConfigurationError("mentorType must be an object with a non-empty id property."); } } @@ -70,7 +69,9 @@ export default { endDate: this.endDate, startDate: this.startDate, purpose: this.purpose, - mentor: this.mentor, + mentor: { + id: this.mentor, + }, }; if (this.comment) data.comment = this.comment; if (this.mentorType) data.mentorType = this.mentorType; diff --git a/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs b/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs index ca336cb85bfa4..bd2262dc9e7b7 100644 --- a/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs +++ b/components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs @@ -30,9 +30,16 @@ export default { description: "Purpose of the mentorship.", }, mentor: { - type: "object", - label: "Mentor", - description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`", + propDefinition: [ + workday, + "workerId", + ], + }, + mentee: { + propDefinition: [ + workday, + "workerId", + ], }, comment: { type: "string", @@ -43,12 +50,9 @@ export default { mentorType: { type: "object", label: "Mentor Type", - description: "Object with at least an `id` property. Example payload: `{\"id\": \"00000000000000000000000000000000\"}`", - }, - mentee: { - type: "object", - label: "Mentee", - description: "Object with at least an `id` property. Example : `{\"id\": \"00000000000000000000000000000000\"}`", + 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", @@ -61,12 +65,7 @@ export default { 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.mentor || typeof this.mentor !== "object" || !this.mentor.id || !this.mentor.id.trim()) { - throw new ConfigurationError("Mentor is required and must be an object with a non-empty id property."); - } - if (!this.mentee || typeof this.mentee !== "object" || !this.mentee.id || !this.mentee.id.trim()) { - throw new ConfigurationError("Mentee is required and must be an object with a non-empty id property."); - } + if (this.mentorType !== undefined) { if (typeof this.mentorType !== "object" || !this.mentorType.id || !this.mentorType.id.trim()) { throw new ConfigurationError("If provided, mentorType must be an object with a non-empty id property."); @@ -77,8 +76,12 @@ export default { endDate: this.endDate, startDate: this.startDate, purpose: this.purpose, - mentor: this.mentor, - mentee: this.mentee, + mentor: { + id: this.mentor, + }, + mentee: { + id: this.mentee, + }, mentorType: this.mentorType, }; if (this.comment) data.comment = this.comment; diff --git a/components/workday/workday.app.mjs b/components/workday/workday.app.mjs index 5b86e99611002..25d9f5234f800 100644 --- a/components/workday/workday.app.mjs +++ b/components/workday/workday.app.mjs @@ -836,13 +836,6 @@ export default { ...opts, }); }, - async createDistributionRequest(opts = {}) { - return this._makeRequest({ - path: "/distributionRequests", - method: "POST", - ...opts, - }); - }, async listContent(opts = {}) { return this._makeRequest({ path: "/content",