Skip to content

Conversation

@Lokeshchand33
Copy link
Contributor

@Lokeshchand33 Lokeshchand33 commented Oct 23, 2025

WHY

This PR implements the Workday API integration as described in [ACTION] Workday API #18802.

Closes #18802.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added 80+ new Workday actions for comprehensive HR operations management
    • Introduced mentorship lifecycle management (create, update, close, list, retrieve)
    • Added payroll operations (create, update, delete, and list payroll inputs)
    • Enabled contact information change management (home and work contact updates)
    • Expanded recruitment capabilities (interviews, job postings, prospects)
    • Added feedback and badge tracking features
    • Enhanced compensation management (tax rates, pay groups, wage rates)
    • Support for digital course creation and content management
  • Chores

    • Version bumps to package and existing actions

@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 29, 2025 2:26pm

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Oct 23, 2025
@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

This pull request adds 70+ new action modules and supporting infrastructure to the Workday integration, expanding coverage across person management, recruiting, staffing, talent management, learning, payroll, and performance enablement domains. It includes corresponding API method implementations, propDefinitions for resource selection, and a JSON parsing utility module.

Changes

Cohort / File(s) Summary
Contact Information Management
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs, get-home-contact-information-change/get-home-contact-information-change.mjs, list-home-contact-information-changes/list-home-contact-information-changes.mjs, create-work-contact-information-change/create-work-contact-information-change.mjs, get-work-contact-information-change/get-work-contact-information-change.mjs, list-work-contact-information-changes/list-work-contact-information-changes.mjs, update-work-contact-information-change/update-work-contact-information-change.mjs
Add CRUD actions for home and work contact information changes with workerId validation and optional fields.
Person & Photo Management
components/workday/actions/get-person/get-person.mjs, get-person-photo/get-person-photo.mjs, list-people/list-people.mjs, validate-phone-number/validate-phone-number.mjs
Add person detail retrieval, photo fetching with pagination support, and phone number validation.
Recruiting & Job Postings
components/workday/actions/list-job-postings/list-job-postings.mjs, get-job-posting/get-job-posting.mjs, create-prospect/create-prospect.mjs, get-prospect-details/get-prospect-details.mjs, list-prospects/list-prospects.mjs, list-interviews/list-interviews.mjs, get-interview-details/get-interview-details.mjs
Add job posting and prospect management with candidate structure validation; interview fetching.
Job & Staffing Operations
components/workday/actions/list-jobs/list-jobs.mjs, get-job-details/get-job-details.mjs, list-job-changes/list-job-changes.mjs, get-job-change-details/get-job-change-details.mjs, list-job-families/list-job-families.mjs, get-job-family-details/get-job-family-details.mjs, list-job-profiles/list-job-profiles.mjs, get-job-profile-details/get-job-profile-details.mjs, get-job-pay-group/get-job-pay-group.mjs
Add comprehensive job hierarchy queries and change tracking.
Organizational Structures
components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs, get-supervisory-org-details/get-supervisory-org-details.mjs, get-supervisory-org-members/get-supervisory-org-members.mjs, list-org-assignment-changes/list-org-assignment-changes.mjs, get-org-assignment-change-details/get-org-assignment-change-details.mjs, create-organization-assignment-change/create-organization-assignment-change.mjs
Add org hierarchy and assignment change management with date and field validation.
Mentorship & Succession Planning
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs, create-mentorship-for-worker/create-mentorship-for-worker.mjs, list-mentorships/list-mentorships.mjs, get-mentorship-details/get-mentorship-details.mjs, update-mentorship/update-mentorship.mjs, close-mentorship/close-mentorship.mjs, create-succession-plan/create-succession-plan.mjs, list-succession-plans/list-succession-plans.mjs, get-succession-plan-details/get-succession-plan-details.mjs
Add mentorship lifecycle management and succession planning with required field validation.
Learning & Content
components/workday/actions/list-content/list-content.mjs, get-content-details/get-content-details.mjs, create-digital-course/create-digital-course.mjs
Add content listing/retrieval and course creation with JSON parsing and topic/lesson validation.
Payroll & Compensation
components/workday/actions/create-payroll-input/create-payroll-input.mjs, list-payroll-inputs/list-payroll-inputs.mjs, get-payroll-input-details/get-payroll-input-details.mjs, update-payroll-input/update-payroll-input.mjs, delete-payroll-input/delete-payroll-input.mjs, list-pay-groups/list-pay-groups.mjs, get-pay-group/get-pay-group.mjs, list-pay-group-details/list-pay-group-details.mjs, get-pay-group-detail/get-pay-group-detail.mjs
Add payroll input lifecycle and pay group management with CRUD operations and validation.
Tax Rates & Wage Management
components/workday/actions/create-tax-rate/create-tax-rate.mjs, list-tax-rates/list-tax-rates.mjs, list-minimum-wage-rates/list-minimum-wage-rates.mjs, get-minimum-wage-rate-details/get-minimum-wage-rate-details.mjs
Add tax rate and minimum wage rate management with state instance validation.
Performance & Feedback
components/workday/actions/list-feedback-badges/list-feedback-badges.mjs, get-feedback-badge-details/get-feedback-badge-details.mjs, list-give-requested-feedback-events/list-give-requested-feedback-events.mjs, get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs, get-worker-anytime-feedback-events/get-worker-anytime-feedback-events.mjs, get-worker-goals/get-worker-goals.mjs
Add performance feedback and goal tracking retrieval.
Holiday Events
components/workday/actions/list-holiday-events/list-holiday-events.mjs
Add holiday event listing.
Core Infrastructure
components/workday/workday.app.mjs
Add 18+ propDefinitions for resource selectors and 40+ API methods (CRUD operations, list/get/create/update/delete patterns) across all domains; pagination support for list endpoints.
Utilities
components/workday/sources/common/utils.mjs
Add recursive JSON parsing utility (\parseObject\\ and \parseJsonInput\\) for input validation.
Version Updates
components/workday/actions/change-business-title/change-business-title.mjs, create-job-change/create-job-change.mjs, get-worker/get-worker.mjs, list-organization-types/list-organization-types.mjs, list-supervisory-organizations/list-supervisory-organizations.mjs, list-worker-payslips/list-worker-payslips.mjs, search-workers/search-workers.mjs, components/workday/sources/new-worker-created/new-worker-created.mjs, components/workday/package.json
Increment action/source versions from 0.0.3 → 0.0.4; package.json 0.1.1 → 0.1.2.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

Areas requiring extra attention:

  • components/workday/workday.app.mjs: Verify all 40+ new API method implementations follow consistent patterns and correctly map OpenAPI endpoints; confirm propDefinitions use correct list-to-option conversions with appropriate pagination handling.
  • components/workday/actions/create-digital-course/create-digital-course.mjs: Validate JSON parsing logic, topics/lessons array requirements, and error handling for malformed inputs.
  • All create-*-change actions: Ensure object-with-id validation patterns (e.g., closeMentorshipReason, position, supervisoryOrg) are consistent and correctly typed.
  • components/workday/actions/update-payroll-input/update-payroll-input.mjs and similar update actions: Verify that at least one updatable field is enforced where required.
  • components/workday/sources/common/utils.mjs: Review recursive parsing logic for edge cases (circular refs, deeply nested structures).

Possibly related PRs

  • New Components - workday #18022: Adds Workday integration with largely overlapping action files and infrastructure; may contain related implementation patterns or prior art to cross-reference for consistency.

Suggested reviewers

  • luancazarine

🐰 Hop, skip, and a leap—Workday's now complete!
Seventy actions, refactored so neat!
From mentors to tax rates, each endpoint's a treat,
This Workday expansion makes integration sweet! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The pull request title "Workday API" is extremely generic and vague, failing to communicate the specific work being done. While the title is related to the changeset—which indeed implements Workday API functionality—it lacks clarity and specificity. A teammate scanning the repository history would see "Workday API" and not understand whether this PR adds new features, fixes bugs, updates documentation, or performs a refactor. The title does not distinguish this work from other potential Workday-related changes. Descriptive alternatives would be "Add Workday API integration with 60+ actions" or "Implement Workday integration for person, recruiting, staffing, and payroll domains." Consider revising the pull request title to be more descriptive and specific, such as "Implement Workday API integration with actions and methods" or "Add Workday integration pack for multiple service domains." The title should clearly convey the primary objective of the PR and help maintainers quickly understand the scope of changes when reviewing history.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues Check ✅ Passed The PR comprehensively addresses the objectives outlined in linked issue #18802 by implementing a complete Workday API integration across all specified service domains. The changeset includes implementations for: Person domain endpoints (homeContactInformationChanges, people, personPhoto, phoneValidation, workContactInformationChanges), Recruiting domain (interviews, jobPostings, prospects), Staffing domain (jobChanges, jobFamilies, jobProfiles, jobs, organizationAssignmentChanges, supervisoryOrganizations, workers with goals and feedback), Talent Management (createMentorshipForMe, createMentorshipForWorker, mentorships, successionPlans), Holiday (holidayEvents), Learning (content, createDigitalCourse), Payroll (minimumWageRates, payGroupDetails, payGroups, payrollInputs, taxRates), and Performance Enablement (feedbackBadges, giveRequestedFeedbackEvents). Supporting infrastructure includes propDefinitions for resource IDs [#18802], pagination helpers, and JSON parsing utilities. All major endpoints specified in the issue are present with appropriate HTTP verb support (GET, POST, PATCH, DELETE).
Out of Scope Changes Check ✅ Passed
Description Check ✅ Passed The pull request description adequately meets the repository's template requirements. The template specifies only a "WHY" section, which the author has completed with a clear explanation: implementing the Workday API integration as described in the linked action item #18802, and explicitly closing that issue. The description is concise and directly addresses the purpose of the PR. While additional context sections such as "WHAT" or "HOW" could enhance clarity, they are not mandated by the template and their absence does not constitute a failure to meet requirements.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 21

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/workday/workday.app.mjs (1)

1003-1032: paginate() stops after first page — wrong destructure and hasMore logic.

axios returns { data: payload }; total isn’t at top-level, so total is undefined, making hasMore false.

   async *paginate({
     fn, args = {}, max,
   }) {
@@
-      do {
-        const {
-          data, total,
-        } = await fn(args);
+      do {
+        const resp = await fn(args);
+        const payload = resp?.data ?? resp ?? {};
+        const { data, total } = payload;
         if (!data?.length) {
           return;
         }
@@
-        hasMore = count < total;
-        args.params.offset += args.params.limit;
+        const pageSize = args.params.limit ?? data.length;
+        // Prefer API-provided total; otherwise infer from page size
+        hasMore = typeof total === "number"
+          ? count < total
+          : data.length === pageSize;
+        args.params.offset += pageSize;
       } while (hasMore);
🧹 Nitpick comments (34)
components/workday/actions/get-interview-details/get-interview-details.mjs (1)

15-19: Consider using propDefinition for consistency.

The interviewId is defined inline, whereas other similar actions in this PR use propDefinition (e.g., contentId in get-content-details.mjs, mentorshipId in get-mentorship-details.mjs). Using propDefinition would improve consistency and reduce duplication if the prop definition is reusable.

If a propDefinition exists in workday.app.mjs, apply this pattern:

-    interviewId: {
-      type: "string",
-      label: "Interview ID",
-      description: "The unique identifier for the interview.",
-    },
+    interviewId: {
+      propDefinition: [
+        workday,
+        "interviewId",
+      ],
+    },
components/workday/actions/create-tax-rate/create-tax-rate.mjs (1)

64-72: Consider simplifying validation logic for readability.

The validation checks are functional but could be more readable. Line 64 combines multiple conditions in a single expression.

Consider this more readable approach:

-    if (this.stateInstance && (typeof this.stateInstance !== "object" || !this.stateInstance.id || !this.stateInstance.id.trim())) {
+    if (!this.stateInstance || typeof this.stateInstance !== "object") {
+      throw new ConfigurationError("stateInstance must be an object.");
+    }
+    if (!this.stateInstance.id || !this.stateInstance.id.trim()) {
       throw new ConfigurationError("stateInstance is required to have a non-empty id property.");
     }
components/workday/actions/list-job-profiles/list-job-profiles.mjs (1)

1-2: Consider adding blank line for consistency.

Several other action files in this PR include a blank line after the import statement. Adding one here would improve consistency across the codebase.

Apply this diff:

 import workday from "../../workday.app.mjs";
+
 export default {
components/workday/actions/get-prospect-details/get-prospect-details.mjs (1)

1-2: Consider adding blank line for consistency.

Most action files in this PR include a blank line after the import statement for better readability.

Apply this diff:

 import workday from "../../workday.app.mjs";
+
 export default {
components/workday/actions/list-jobs/list-jobs.mjs (1)

1-2: Consider adding blank line for consistency.

Adding a blank line after the import would align with the style used in most other action files.

Apply this diff:

 import workday from "../../workday.app.mjs";
+
 export default {
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)

24-27: Consider removing redundant validation.

If workerId is marked as required in the propDefinition, the Pipedream platform automatically validates its presence. This manual check creates inconsistency with other actions in the PR (e.g., get-job-pay-group.mjs, get-worker-anytime-feedback-events.mjs) that rely on propDefinition validation.

Apply this diff to align with the established pattern:

-    if (!this.workerId || !this.workerId.trim()) {
-      throw new ConfigurationError("Worker ID is required.");
-    }
     const response = await this.workday.createHomeContactInformationChange({

If the propDefinition doesn't mark workerId as required, then keep this validation but add the required: true attribute to the propDefinition for consistency.

components/workday/sources/common/utils.mjs (1)

4-10: Consider handling JSON parse errors more gracefully.

The function silently catches JSON parse errors and returns the original string. While this prevents exceptions, it may hide malformed JSON that the caller expects to be parsed.

Consider logging parse errors or adding an optional parameter to control error handling behavior, especially for debugging purposes.

components/workday/actions/get-work-contact-information-change/get-work-contact-information-change.mjs (2)

15-19: Consider using propDefinition for consistency.

While this prop uses a plain string type, other similar actions (e.g., get-succession-plan-details.mjs) use propDefinition to wire the ID prop. Using propDefinition would provide better consistency across the codebase and potentially enable dynamic options/validation from the Workday app.


21-28: Consider validating the required ID parameter.

The action doesn't validate that workContactInformationChangeId is provided before making the API call. While the Workday API will likely return an error, failing early with a clear message improves the user experience.

 async run({ $ }) {
+  if (!this.workContactInformationChangeId || !this.workContactInformationChangeId.trim()) {
+    throw new ConfigurationError("Work Contact Information Change ID is required.");
+  }
   const response = await this.workday.getWorkContactInformationChange({

Note: You'll need to import ConfigurationError from @pipedream/platform (see update-payroll-input.mjs for reference).

components/workday/actions/list-work-contact-information-changes/list-work-contact-information-changes.mjs (1)

20-20: Minor inconsistency in summary message.

The summary uses "Found" while other list actions in this PR use "Fetched" (e.g., list-feedback-badges.mjs, list-pay-group-details.mjs). Consider using "Fetched" for consistency across all list actions.

-    $.export("$summary", `Found ${response?.data?.length || 0} changes`);
+    $.export("$summary", `Fetched ${response?.data?.length || 0} work contact information changes`);
components/workday/actions/get-succession-plan-details/get-succession-plan-details.mjs (1)

23-30: Consider validating the required ID parameter.

While using propDefinition is good practice, the action doesn't validate that successionPlanId is provided before making the API call. Adding validation would improve the user experience by failing early with a clear message.

 async run({ $ }) {
+  if (!this.successionPlanId || !this.successionPlanId.trim()) {
+    throw new ConfigurationError("Succession Plan ID is required.");
+  }
   const response = await this.workday.getSuccessionPlan({

Note: You'll need to import ConfigurationError from @pipedream/platform.

components/workday/actions/get-org-assignment-change-details/get-org-assignment-change-details.mjs (1)

24-31: Consider validating the required ID parameter.

The action doesn't validate that organizationAssignmentChangeId is provided before making the API call. Adding validation would improve the user experience by failing early with a clear message.

 async run({ $ }) {
+  if (!this.organizationAssignmentChangeId || !this.organizationAssignmentChangeId.trim()) {
+    throw new ConfigurationError("Organization Assignment Change ID is required.");
+  }
   const response = await this.workday.getOrganizationAssignmentChange({

Note: You'll need to import ConfigurationError from @pipedream/platform (see update-payroll-input.mjs for reference).

components/workday/actions/validate-phone-number/validate-phone-number.mjs (1)

16-20: Consider adding input validation for the required field.

The completePhoneNumber field is required but lacks validation to ensure it's provided and non-empty. While Pipedream may enforce required fields at the platform level, explicit validation provides clearer error messages and prevents API calls with invalid data.

Consider adding validation in the run function:

  async run({ $ }) {
+   if (!this.completePhoneNumber || !this.completePhoneNumber.trim()) {
+     throw new ConfigurationError("Complete Phone Number is required and cannot be empty.");
+   }
    const response = await this.workday.validatePhoneNumber({
components/workday/actions/close-mentorship/close-mentorship.mjs (1)

52-77: Consider adding date logic validation.

While not critical for API functionality, validating that endDate is after startDate would improve user experience by catching logical errors before making the API call.

You could add after the existing validation:

+   if (new Date(this.endDate) <= new Date(this.startDate)) {
+     throw new ConfigurationError("End Date must be after Start Date.");
+   }
+
    const data = {
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (1)

56-86: Optional: Consider adding date logic validation.

Similar to the suggestion for close-mentorship, you could validate that endDate is after startDate to catch logical errors early.

    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.");
      }
    }
+   if (new Date(this.endDate) <= new Date(this.startDate)) {
+     throw new ConfigurationError("End Date must be after Start Date.");
+   }

    const data = {
components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (1)

24-27: Consider removing redundant validation.

The manual validation on lines 25-27 checks if workerId is empty, but workerId is already a required prop (not marked optional: true on line 17-22), so the Pipedream platform will enforce this before the action runs.

Apply this diff to remove the redundant validation:

   async run({ $ }) {
-    if (!this.workerId || !this.workerId.trim()) {
-      throw new ConfigurationError("Worker ID is required.");
-    }
     const response = await this.workday.createWorkContactInformationChange({

If there's a specific reason for the manual validation (e.g., checking for whitespace-only values), consider adding a comment explaining why.

components/workday/actions/create-payroll-input/create-payroll-input.mjs (1)

33-42: Consider validating for empty string IDs for consistency.

The validation checks for the existence of worker.id and payComponent.id but doesn't verify they're non-empty strings. Other similar actions in this PR (e.g., create-mentorship-for-worker at lines 64-65) include .trim() checks to ensure IDs aren't empty strings.

Apply this diff for consistency:

-if (!this.worker || typeof this.worker !== "object" || !this.worker.id) {
+if (!this.worker || typeof this.worker !== "object" || !this.worker.id || !this.worker.id.trim()) {
   throw new ConfigurationError("worker (object with non-empty id) is required.");
 }
-if (!this.payComponent || typeof this.payComponent !== "object" || !this.payComponent.id) {
+if (!this.payComponent || typeof this.payComponent !== "object" || !this.payComponent.id || !this.payComponent.id.trim()) {
   throw new ConfigurationError("payComponent (object with non-empty id) is required.");
 }
components/workday/actions/create-digital-course/create-digital-course.mjs (3)

18-22: Use object[] for structured arrays; avoid forcing JSON strings.
Typing topics and lessons as string[] then parsing JSON harms UX and validation. Prefer object[] and accept objects directly; keep parsing only as a fallback.

-    topics: {
-      type: "string[]",
+    topics: {
+      type: "object[]",
+      optional: false,
       label: "Topics",
-      description: "The topics of the learning course event. Example: `[ { \"descriptor\": \"Leadership\", \"id\": \"topic-id-1\" } ]`",
+      description: "Array of topic objects. Example: [{ \"descriptor\": \"Leadership\", \"id\": \"topic-id-1\" }]",
     },
@@
-    lessons: {
-      type: "string[]",
+    lessons: {
+      type: "object[]",
+      optional: false,
       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: "Array of lesson objects. Example: [{ \"title\": \"Lesson 1\", \"type\": { \"id\": \"type-id\" }, \"order\": 1, \"url\": \"https://...\", \"required\": true }]",
     },

Also mark other required fields as non-optional for clearer UI.

-    title: {
+    title: {
+      optional: false,
@@
-    availabilityStatus: {
+    availabilityStatus: {
+      optional: false,
@@
-    description: {
+    description: {
+      optional: false,

Also applies to: 33-37


61-63: Tighten validation for order to integer ≥ 1 and validate URL format.
Use Number.isInteger(l.order) and a basic URL check to prevent API errors earlier.

-      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`.");
+      const validOrder = Number.isInteger(l.order) && l.order >= 1;
+      let validUrl = true;
+      try { new URL(l.url); } catch { validUrl = false; }
+      if (!l.title || !l.type?.id || !validOrder || !validUrl) {
+        throw new ConfigurationError("Each lesson must include `title`, `type` (object with id), `order` (integer ≥ 1), and a valid `url`.");
       }

84-90: Improve summary with identifier when available.
If API returns an ID, include it for traceability.

-    $.export("$summary", "Digital course created");
+    $.export("$summary", `Digital course created${response?.id ? ` (ID: ${response.id})` : ""}`);
components/workday/actions/list-payroll-inputs/list-payroll-inputs.mjs (2)

21-22: Make summary resilient to response shape.
Guard for array at top-level or under items.

-    $.export("$summary", `Fetched ${response?.data?.length || 0} payroll inputs`);
+    const count = Array.isArray(response?.data)
+      ? response.data.length
+      : Array.isArray(response?.items)
+        ? response.items.length
+        : Array.isArray(response) ? response.length : 0;
+    $.export("$summary", `Fetched ${count} payroll inputs`);

13-16: Add optional pagination props to prevent large payloads.

Expose optional limit and offset props (the API uses offset, not cursor) and pass them via params to listPayrollInputs:

props: {
  workday,
  limit: {
    type: "integer",
    label: "Limit",
    description: "Maximum number of records to return",
    optional: true,
  },
  offset: {
    type: "integer",
    label: "Offset",
    description: "Number of records to skip",
    optional: true,
  },
},
async run({ $ }) {
  const response = await this.workday.listPayrollInputs({
    $,
    ...(this.limit || this.offset ? { params: { limit: this.limit, offset: this.offset } } : {}),
  });
  // ...
}

This pattern already exists in the app file's payrollInputId options (workday.app.mjs:318-323).

components/workday/actions/get-job-profile-details/get-job-profile-details.mjs (1)

3-5: Align naming/summary with other “Get …” actions.
For consistency, consider dropping “Details” and using the “for ID …” summary format.

-  name: "Get Job Profile Details",
+  name: "Get Job Profile",
@@
-    $.export("$summary", `Fetched job profile ${this.jobProfileId}`);
+    $.export("$summary", `Fetched job profile for ID ${this.jobProfileId}`);

Also applies to: 27-28

components/workday/actions/create-prospect/create-prospect.mjs (1)

17-21: Mark candidate as required for clearer UX.
Reflects server-side requirement in the UI.

     candidate: {
       type: "object",
+      optional: false,
       label: "Candidate",
       description: "The candidate object. Must include `name.country.id`. Example: { \"name\": { \"country\": { \"id\": \"USA\" } } }",
     },
components/workday/actions/create-org-assignment-change/create-org-assignment-change.mjs (3)

47-52: Harden position.id typing

Ensure id is a string before calling .trim() to prevent “trim is not a function” on non-strings.

-    if (!this.position || typeof this.position !== "object" || !this.position.id || !this.position.id.trim()) {
+    if (
+      !this.position
+      || typeof this.position !== "object"
+      || typeof this.position.id !== "string"
+      || !this.position.id.trim()
+    ) {
       throw new ConfigurationError("Position object is required, with a non-empty id property.");
     }

64-71: Align inclusion condition with validation semantics

After switching validation to != null, mirror that here so null isn’t accidentally included later.

-    if (this.massActionWorksheet) data.massActionWorksheet = this.massActionWorksheet;
-    if (this.massActionHeader) data.massActionHeader = this.massActionHeader;
+    if (this.massActionWorksheet != null) data.massActionWorksheet = this.massActionWorksheet;
+    if (this.massActionHeader != null) data.massActionHeader = this.massActionHeader;

5-6: Naming consistency (optional)

File path uses “org” while the key uses “organization.” Consider aligning to one form to ease discovery and debugging.

components/workday/actions/create-succession-plan/create-succession-plan.mjs (1)

41-54: Strengthen id typing in validations

Guard .trim() with a string check for all required object refs.

-    if (
-      !this.position || typeof this.position !== "object" || !this.position.id || !this.position.id.trim()
-    ) {
+    if (!this.position || typeof this.position !== "object"
+      || typeof this.position.id !== "string" || !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()
-    ) {
+    if (!this.supervisoryOrg || typeof this.supervisoryOrg !== "object"
+      || typeof this.supervisoryOrg.id !== "string" || !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()
-    ) {
+    if (!this.successionPlan || typeof this.successionPlan !== "object"
+      || typeof this.successionPlan.id !== "string" || !this.successionPlan.id.trim()) {
       throw new ConfigurationError("Succession Plan is required and must be an object with a non-empty id property.");
     }
components/workday/actions/create-distribution-request/create-distribution-request.mjs (1)

51-62: Type-check id strings in validations

Prevent .trim() on non-strings and keep optional fields null-safe.

-    if (!this.builder || typeof this.builder !== "object" || !this.builder.id || !this.builder.id.trim()) {
+    if (!this.builder || typeof this.builder !== "object" || typeof this.builder.id !== "string" || !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()) {
+    if (!this.category || typeof this.category !== "object" || typeof this.category.id !== "string" || !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())) {
+    if (this.discoverableBuilder && (typeof this.discoverableBuilder !== "object"
+      || typeof this.discoverableBuilder.id !== "string" || !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())) {
+    if (this.relatedRole && (typeof this.relatedRole !== "object"
+      || typeof this.relatedRole.id !== "string" || !this.relatedRole.id.trim())) {
       throw new ConfigurationError("Related Role (if provided) must be an object with a non-empty id property.");
     }
components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs (1)

25-31: Accept object or JSON string for alternateWorkLocation for consistency with other actions.

Other actions use parseJsonInput; support both object and stringified JSON.

+import { parseJsonInput } from "../../sources/common/utils.mjs";
@@
-    alternateWorkLocation: {
-      type: "object",
+    alternateWorkLocation: {
+      type: "string",
       label: "Alternate Work Location",
-      description: "Object for alternate work location. Must include at least `id`. Example: `{ id: \"...\", descriptor: \"...\"}`",
+      description: "Alternate work location as object or JSON. Must include `id`. Example: `{ \"id\": \"...\", \"descriptor\": \"...\"}`",
       optional: true,
     },
@@
-    if (this.alternateWorkLocation) {
+    if (this.alternateWorkLocation) {
+      const alt = parseJsonInput(this.alternateWorkLocation);
       if (
-        typeof this.alternateWorkLocation !== "object"
-        || !this.alternateWorkLocation.id
-        || typeof this.alternateWorkLocation.id !== "string"
-        || !this.alternateWorkLocation.id.length
+        typeof alt !== "object"
+        || !alt?.id
+        || typeof alt.id !== "string"
+        || !alt.id.trim().length
       ) {
         throw new ConfigurationError("alternateWorkLocation must include a non-empty 'id' property.");
       }
-      data.alternateWorkLocation = this.alternateWorkLocation;
+      data.alternateWorkLocation = alt;
     }

If you prefer to keep the UI as an object prop, still parse and trim id. Based on patterns in other Workday actions. [Based on learnings]

Also applies to: 46-56

components/workday/workday.app.mjs (4)

395-405: Harden requests: set headers and a sane timeout.

Add JSON Accept/Content-Type and a default timeout to improve reliability.

     _makeRequest({
       $ = this, path, ...opts
     }) {
       return axios($, {
-        url: `${this._baseUrl()}${path}`,
-        headers: {
-          Authorization: `Bearer ${this.$auth.oauth_access_token}`,
-        },
+        url: `${this._baseUrl()}${path}`,
+        headers: {
+          Authorization: `Bearer ${this.$auth.oauth_access_token}`,
+          Accept: "application/json",
+          "Content-Type": "application/json",
+        },
+        timeout: 30000,
         ...opts,
       });
     },

81-85: Use DEFAULT_LIMIT consistently for option paging.

Keep paging uniform across props.

-          params: {
-            limit: 50,
-            offset: page * 50,
-          },
+          params: {
+            limit: DEFAULT_LIMIT,
+            offset: page * DEFAULT_LIMIT,
+          },

505-512: Binary responses: ensure callers set responseType.

/people/{id}/photos likely returns binary. Confirm downstream actions pass { responseType: "arraybuffer" } via opts, or default it here.


59-75: Option mappers: minor resiliency tweak.

Where possible, prefer item.descriptor || item.id for labels (with fallback to String(item)) across all option loaders for consistency.

Also applies to: 76-92, 93-109, 110-126, 127-143, 144-160

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
components/workday/actions/update-mentorship/update-mentorship.mjs (1)

54-65: Dead validation code: startDate makes the check impossible.

The validation on line 63 checks if data has zero keys, but data is initialized with startDate on line 56, and startDate is a required field (lines 36-40). This means data will always have at least one key, making the validation on lines 63-65 unreachable dead code that can never execute.

This issue was previously flagged. Apply one of these fixes:

Option A: Remove the dead validation (if startDate should remain required):

     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.");
-    }

Option B: Make startDate optional and enforce at-least-one-field semantics:

     const data = {};
+    if (this.startDate) 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.");
     }

And mark startDate as optional in the prop definition (line 40):

     startDate: {
       type: "string",
       label: "Start Date",
       description: "Updated start date. Example: `2025-10-18T07:00:00.000Z`",
+      optional: true,
     },
🧹 Nitpick comments (2)
components/workday/sources/new-worker-created/new-worker-created.mjs (1)

32-43: Suggest adding bounds to previousIds tracking.

The previousIds object grows indefinitely as new workers are tracked, which could lead to memory issues in long-running sources with high worker turnover.

Consider implementing one of the following strategies:

  • Time-based expiry: Remove IDs older than a certain threshold (e.g., 30 days)
  • Size limit: Cap the object size and evict oldest entries (LRU pattern)
  • Sliding window: Only track IDs from the last N workers

Example with size limit:

     const previousIds = this._getPreviousIds();
+    const maxTrackedIds = 10000; // Adjust based on expected volume
     let workers = [];

     for await (const worker of results) {
       if (previousIds[worker.id]) {
         continue;
       }
       workers.push(worker);
       previousIds[worker.id] = true;
     }

+    // Prune old IDs if exceeding limit
+    const idKeys = Object.keys(previousIds);
+    if (idKeys.length > maxTrackedIds) {
+      const excess = idKeys.length - maxTrackedIds;
+      idKeys.slice(0, excess).forEach(id => delete previousIds[id]);
+    }
+
     this._setPreviousIds(previousIds);
components/workday/actions/list-organization-types/list-organization-types.mjs (1)

32-35: Optional: Consider simplifying array collection.

The manual for-await loop works correctly. If desired, this pattern could be condensed in the future, though the current implementation is clear and maintainable.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3473117 and 5537759.

📒 Files selected for processing (11)
  • components/workday/actions/change-business-title/change-business-title.mjs (1 hunks)
  • components/workday/actions/create-job-change/create-job-change.mjs (1 hunks)
  • components/workday/actions/delete-payroll-input/delete-payroll-input.mjs (1 hunks)
  • components/workday/actions/get-worker/get-worker.mjs (1 hunks)
  • components/workday/actions/list-organization-types/list-organization-types.mjs (1 hunks)
  • components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs (1 hunks)
  • components/workday/actions/list-worker-payslips/list-worker-payslips.mjs (1 hunks)
  • components/workday/actions/search-workers/search-workers.mjs (1 hunks)
  • components/workday/actions/update-mentorship/update-mentorship.mjs (1 hunks)
  • components/workday/package.json (1 hunks)
  • components/workday/sources/new-worker-created/new-worker-created.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • components/workday/actions/list-supervisory-organizations/list-supervisory-organizations.mjs
  • components/workday/actions/list-worker-payslips/list-worker-payslips.mjs
  • components/workday/actions/create-job-change/create-job-change.mjs
  • components/workday/actions/change-business-title/change-business-title.mjs
  • components/workday/package.json
  • components/workday/actions/search-workers/search-workers.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/workday/actions/delete-payroll-input/delete-payroll-input.mjs (2)
components/workday/actions/create-payroll-input/create-payroll-input.mjs (1)
  • response (50-53)
components/workday/actions/get-content-details/get-content-details.mjs (1)
  • response (24-27)
components/workday/actions/update-mentorship/update-mentorship.mjs (3)
components/workday/actions/close-mentorship/close-mentorship.mjs (2)
  • data (62-66)
  • response (70-74)
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (2)
  • data (76-83)
  • response (87-90)
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (2)
  • data (69-74)
  • response (79-82)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (10)
components/workday/actions/get-worker/get-worker.mjs (1)

7-7: LGTM! Version bump is appropriate.

The patch version increment from 0.0.3 to 0.0.4 aligns with the broader Workday integration update in this PR. No functional changes are required for this action.

components/workday/sources/new-worker-created/new-worker-created.mjs (1)

9-9: LGTM: Version bump is appropriate.

The patch-level version increment is consistent with the broader Workday integration expansion in this PR.

components/workday/actions/list-organization-types/list-organization-types.mjs (1)

7-7: Version bump aligns with package update.

The version increment to "0.0.4" is appropriate given the broader package update (0.1.1 → 0.1.2) and substantial changes to the underlying workday.app.mjs dependencies.

components/workday/actions/delete-payroll-input/delete-payroll-input.mjs (4)

1-2: LGTM!

The imports are appropriate for a Pipedream action that performs validation and calls the Workday API.


4-13: LGTM!

The metadata is well-structured and the destructiveHint: true annotation correctly indicates that this action performs a destructive operation.


15-23: LGTM!

The props are correctly defined using the recommended propDefinition pattern.


24-34: The review comment is incorrect—the validation should not be removed.

The payrollInputId propDefinition in components/workday/workday.app.mjs (lines 314–330) does not include required: true. The manual validation at lines 25–27 is necessary and defensive; it prevents both empty strings and whitespace-only values from reaching the API call. Removing it would allow invalid input to proceed.

Likely an incorrect or invalid review comment.

components/workday/actions/update-mentorship/update-mentorship.mjs (3)

1-3: LGTM!

Imports are clean and appropriate for the action's requirements.


4-13: LGTM!

Action metadata follows Pipedream conventions with appropriate key naming, clear description, and documentation reference.


67-74: LGTM!

The API call structure and response handling follow standard Pipedream patterns and are consistent with related mentorship actions in the codebase.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

♻️ Duplicate comments (1)
components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs (1)

53-62: Null-safe validation for optional objects still needed.

The concerns raised in the previous review regarding null-safety and type checking for massActionWorksheet and massActionHeader remain unaddressed. These validations should guard against null and verify that id is a string before calling .trim().

🧹 Nitpick comments (1)
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)

25-27: Consider whether workerId validation is necessary.

The explicit validation for workerId may be redundant if the propDefinition already makes it a required field. However, the trim check does provide additional protection against whitespace-only values.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 899677d and a00a355.

📒 Files selected for processing (4)
  • components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1 hunks)
  • components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs (1 hunks)
  • components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (1 hunks)
  • components/workday/actions/get-job-posting/get-job-posting.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)
components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (1)
  • response (28-32)
components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs (2)
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)
  • response (28-32)
components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (1)
  • response (28-32)
components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (1)
components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)
  • response (28-32)
components/workday/actions/get-job-posting/get-job-posting.mjs (3)
components/workday/actions/delete-payroll-input/delete-payroll-input.mjs (1)
  • response (28-31)
components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs (1)
  • response (24-27)
components/workday/actions/get-give-requested-feedback-event-details/get-give-requested-feedback-event-details.mjs (1)
  • response (24-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (7)
components/workday/actions/get-job-posting/get-job-posting.mjs (3)

1-12: LGTM! Clean action metadata and structure.

The import, key naming, description, and annotations are all well-formed. The documentation link provides helpful reference, and the annotations correctly reflect this as a non-destructive, read-only operation.


14-22: LGTM! Proper use of propDefinition pattern.

The props correctly leverage propDefinition to reference the jobPostingId from the workday app file, following Pipedream best practices for prop reusability.


23-30: LGTM! Clean implementation following established patterns.

The run method correctly delegates to the workday app's getJobPosting method and exports a helpful summary. The implementation is consistent with other similar actions in this PR (e.g., get-feedback-badge-details, get-give-requested-feedback-event-details).

components/workday/actions/create-home-contact-information-change/create-home-contact-information-change.mjs (1)

1-2: LGTM!

The imports are appropriate for this action.

components/workday/actions/create-organization-assignment-change/create-organization-assignment-change.mjs (1)

64-78: LGTM!

The payload construction correctly includes required fields and conditionally adds optional fields. The API delegation and response handling follow the established pattern.

components/workday/actions/create-work-contact-information-change/create-work-contact-information-change.mjs (2)

1-2: LGTM!

The imports are appropriate and both are used in the code.


25-27: Good defensive validation.

The validation correctly checks for missing or empty workerId values, providing clear error messaging.

@Lokeshchand33
Copy link
Contributor Author

Hi @michelle0927,Could you please verify this PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a00a355 and 972de83.

📒 Files selected for processing (1)
  • components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs (4)
components/workday/actions/get-job-posting/get-job-posting.mjs (1)
  • response (24-27)
components/workday/actions/delete-payroll-input/delete-payroll-input.mjs (1)
  • response (28-31)
components/workday/actions/get-content-details/get-content-details.mjs (1)
  • response (24-27)
components/workday/actions/get-feedback-badge-details/get-feedback-badge-details.mjs (1)
  • response (24-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/workday/actions/get-home-contact-information-change/get-home-contact-information-change.mjs (2)

29-29: Previous issue resolved correctly.

The summary now correctly uses this.homeContactInformationChangeId instead of this.id. Nice fix!


25-27: The review comment is incorrect; no changes needed.

The parameter naming in the action file is correct. The Workday app method getHomeContactInformationChange explicitly expects the parameter homeContactInformationChangeId (workday.app.mjs, line 471), not id. While other methods like getJobPosting, getContent, and getFeedbackBadge use id, this is because their underlying API signatures are different. The action code accurately matches the Workday app method signature.

Likely an incorrect or invalid review comment.

…/get-home-contact-information-change.mjs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

@Lokeshchand33 Thank you so much for your contribution! Looks good. I just left one comment/question above about async options for interviewId.

@michelle0927 michelle0927 moved this from In Review to Changes Required in Component (Source and Action) Backlog Oct 23, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
components/workday/workday.app.mjs (3)

540-631: Remove redundant method: "GET" specifications.

Many new methods explicitly specify method: "GET" (lines 543, 552, 579, 588, 595, 605, 614, 628, and others), but this is unnecessary since GET is the default HTTP method for axios requests. The existing methods in lines 433-456 demonstrate the preferred pattern of omitting this.

Apply this diff pattern to all GET methods:

 listWorkContactInformationChanges(opts = {}) {
   return this._makeRequest({
     path: "/workContactInformationChanges",
-    method: "GET",
     ...opts,
   });
 }

592-608: Remove unnecessary async keywords.

Several methods are declared async but don't use await internally (e.g., listJobPostings, getJobPosting, listProspects at lines 592, 600, 625). Since _makeRequest returns a Promise directly, the async keyword is unnecessary unless you're using await.

-async listJobPostings(opts = {}) {
+listJobPostings(opts = {}) {
   return this._makeRequest({
     path: "/jobPostings",
-    method: "GET",
     ...opts,
   });
 }

715-721: Fix unconventional comma placement.

Line 718-719 has unusual formatting where the comma appears at the start of the next line. This is inconsistent with the formatting used throughout the rest of the file.

 createOrganizationAssignmentChange(opts = {}) {
   return this._makeRequest({
     path: "/organizationAssignmentChanges",
-    method: "POST"
-    , ...opts,
+    method: "POST",
+    ...opts,
   });
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8175f00 and 8978c7c.

📒 Files selected for processing (1)
  • components/workday/workday.app.mjs (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/workday/workday.app.mjs (1)

483-1021: Implementation successfully covers required Workday API endpoints.

The added methods comprehensively implement the endpoints specified in issue #18802:

  • Person-related: homeContactInformationChanges, people, phoneValidation, workContactInformationChanges ✓
  • Recruiting: interviews, jobPostings, prospects ✓
  • Staffing: jobChanges, jobFamilies, jobProfiles, jobs, organizationAssignmentChanges, supervisoryOrganizations, workers ✓
  • Talent Management: mentorships (CRUD), successionPlans ✓
  • Holiday, Journeys, Learning, Payroll, Performance Enablement: all covered ✓

The methods follow the existing _makeRequest pattern and integrate well with the authentication flow.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/workday/actions/update-mentorship/update-mentorship.mjs (1)

2-2: Remove unused import.

The ConfigurationError import is no longer used after the validation code was removed in the previous iteration.

Apply this diff to remove the unused import:

-import { ConfigurationError } from "@pipedream/platform";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61047ea and 91833f6.

📒 Files selected for processing (1)
  • components/workday/actions/update-mentorship/update-mentorship.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/workday/actions/update-mentorship/update-mentorship.mjs (3)
components/workday/actions/close-mentorship/close-mentorship.mjs (2)
  • data (62-66)
  • response (70-74)
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (2)
  • data (76-83)
  • response (87-90)
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (2)
  • data (69-74)
  • response (79-82)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish

michelle0927
michelle0927 previously approved these changes Oct 24, 2025
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM! Ready for QA

@michelle0927 michelle0927 moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog Oct 24, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from In QA to Ready for QA in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to Changes Required in Component (Source and Action) Backlog Oct 27, 2025
@vunguyenhung
Copy link
Collaborator

Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.

Please check the test report below for more information
https://vunguyenhung.notion.site/Workday-API-299bf548bb5e813f8e1adf9b5e76fa60

@michelle0927
Copy link
Collaborator

Hi @vunguyenhung. Danny and Tod have been working with Workday to set up the proper permissions for the account in 1PW to access additional endpoints. For now, Danny's account there is limited in what it can access without error. I think we'll need @Lokeshchand33 to help with testing this one.

@Lokeshchand33 Can you take a look at QA's requests about updating some of the props (adding async options, updating descriptions) and about parsing JSON strings?
It would also be a good idea to catch 404 errors and display something like this for the error: "Not found. Please verify that your Workday account has permission to access this endpoint."
Let me know if you'd like help or have any questions.

@Lokeshchand33
Copy link
Contributor Author

Hi @michelle0927 , I also don’t have the required Workday permissions, so I won’t be able to directly test the endpoint. However, I’ll work on QA’s requests for async props, updated descriptions, JSON parsing, and 404 error handling.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/workday/workday.app.mjs (1)

414-424: Implement 404 error handling in _makeRequest method

Per QA request: add async/await wrapper with try/catch to surface user-friendly message for 404 responses, helping users diagnose permission issues.

-    _makeRequest({
-      $ = this, path, ...opts
-    }) {
-      return axios($, {
-        url: `${this._baseUrl()}${path}`,
-        headers: {
-          Authorization: `Bearer ${this.$auth.oauth_access_token}`,
-        },
-        ...opts,
-      });
-    },
+    async _makeRequest({
+      $ = this, path, ...opts
+    }) {
+      try {
+        return await axios($, {
+          url: `${this._baseUrl()}${path}`,
+          headers: {
+            Authorization: `Bearer ${this.$auth.oauth_access_token}`,
+          },
+          ...opts,
+        });
+      } catch (err) {
+        const status = err?.response?.status;
+        if (status === 404) {
+          throw new Error("Not found. Please verify that your Workday account has permission to access this endpoint.");
+        }
+        throw err;
+      }
+    },
♻️ Duplicate comments (5)
components/workday/workday.app.mjs (3)

81-86: Standardize propDefinition pagination to DEFAULT_LIMIT.

Use DEFAULT_LIMIT consistently and a single offset expression. This reduces drift and aligns with paginate().

Apply representative diffs (repeat pattern for all listed ranges):

-            limit: 50,
-            offset: page * 50,
+            limit: DEFAULT_LIMIT,
+            offset: DEFAULT_LIMIT * page,
#!/bin/bash
# Find hardcoded 50-based pagination in workday.app.mjs
rg -n -C1 -e 'limit:\s*50' -e 'offset:\s*(?:page\s*\*\s*50|50\s*\*\s*page)' components/workday/workday.app.mjs

Also applies to: 98-103, 115-120, 151-153, 168-170, 185-187, 202-204, 219-221, 236-238, 253-255, 270-272, 287-289, 304-306, 321-323, 338-340, 355-357, 372-374, 389-391


387-394: Remove unnecessary optional chaining on listInterviews.

listInterviews is defined in this module; the optional chaining can mask errors and isn’t needed.

-        const res = await this.listInterviews?.({
+        const res = await this.listInterviews({
           params: {
-            limit: 50,
-            offset: 50 * page,
+            limit: DEFAULT_LIMIT,
+            offset: DEFAULT_LIMIT * page,
           },
-        }) || {
-          data: [],
-        };
+        });
#!/bin/bash
# Ensure no remaining optional chaining on list* calls
rg -nP '\blist\w+\?\.' components/workday/workday.app.mjs

483-986: Add JSDoc for public methods (brief summary + params + returns).

Improves maintainability and aligns with Pipedream guidelines.

Example to apply above each method:

+/**
+ * List job postings.
+ * @param {object} [opts] Axios options incl. params (limit, offset, filters)
+ * @returns {Promise<object>} Workday list response { data, total, ... }
+ */
 listJobPostings(opts = {}) {
   return this._makeRequest({
     path: "/jobPostings",
     method: "GET",
     ...opts,
   });
 }
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (1)

50-56: Mark mentorType optional and omit from payload when unset.

Schema treats mentorType as optional in validation; payload currently sends mentorType: undefined.

     mentorType: {
       type: "object",
       label: "Mentor Type",
       description: `Object containing at least an \`id\` property. Example: \`{"id": "00000000000000000000000000000000"}\`.
 
 **Note:** These values are configured within your Workday tenant and can typically be retrieved using a **Workday Report-as-a-Service (RaaS)** or **SOAP API** integration. Please contact your Workday administrator to obtain the valid mentor type IDs available in your environment.`,
+      optional: true,
     },
-      mentorType: this.mentorType,
     };
+    if (this.mentorType) data.mentorType = this.mentorType;

Also applies to: 75-86

components/workday/actions/create-digital-course/create-digital-course.mjs (1)

66-71: Ensure availabilityStatus.id is a non-empty string.

Prevents blank/non-string IDs.

-    if (!this.availabilityStatus || typeof this.availabilityStatus !== "object" || !this.availabilityStatus.id) {
+    if (!this.availabilityStatus || typeof this.availabilityStatus !== "object"
+      || typeof this.availabilityStatus.id !== "string"
+      || !this.availabilityStatus.id.trim()) {
       throw new ConfigurationError("`availabilityStatus` is required and must be an object with a non-empty 'id'.");
     }
🧹 Nitpick comments (3)
components/workday/workday.app.mjs (1)

1015-1044: Make paginate resilient when total is absent.

Some Workday endpoints omit total; fallback to length-based paging.

-        hasMore = count < total;
-        args.params.offset += args.params.limit;
+        const limit = args.params.limit;
+        const pageHad = data.length;
+        hasMore = (typeof total === "number")
+          ? (count < total)
+          : (pageHad === limit);
+        args.params.offset += limit;
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (1)

64-73: Tighten basic input validation for IDs and dates.

Optional but recommended: assert mentor/mentee are non-empty strings; ensure ISO dates; check startDate <= endDate.

   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 || !String(this.mentor).trim()) throw new ConfigurationError("Mentor is required.");
+    if (!this.mentee || !String(this.mentee).trim()) throw new ConfigurationError("Mentee is required.");
+    const start = new Date(this.startDate); const end = new Date(this.endDate);
+    if (Number.isNaN(start.valueOf()) || Number.isNaN(end.valueOf())) {
+      throw new ConfigurationError("Dates must be valid ISO-8601 strings.");
+    }
+    if (start > end) throw new ConfigurationError("Start Date must be before or equal to End Date.");

Also applies to: 75-84

components/workday/actions/create-digital-course/create-digital-course.mjs (1)

60-63: Optionally enforce integer order and valid lesson URLs.

Small guardrails to catch common input errors.

-      if (!l.title || !l.type?.id || typeof l.order !== "number" || !l.url) {
+      if (!l.title || !l.type?.id || !Number.isInteger(l.order) || !l.url) {
         throw new ConfigurationError("Each lesson must include `title`, `type` (object with id), `order` (integer), and `url`.");
       }
+      try { new URL(l.url); } catch { throw new ConfigurationError("Each lesson `url` must be a valid URL."); }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d87e92f and 137016c.

📒 Files selected for processing (4)
  • components/workday/actions/create-digital-course/create-digital-course.mjs (1 hunks)
  • components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (1 hunks)
  • components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (1 hunks)
  • components/workday/workday.app.mjs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs
🧰 Additional context used
🧬 Code graph analysis (3)
components/workday/actions/create-digital-course/create-digital-course.mjs (3)
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (2)
  • data (68-75)
  • response (80-83)
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (2)
  • data (75-86)
  • response (90-93)
components/workday/actions/create-prospect/create-prospect.mjs (2)
  • data (36-38)
  • response (39-42)
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (1)
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (1)
  • data (68-75)
components/workday/workday.app.mjs (10)
components/workday/actions/create-digital-course/create-digital-course.mjs (1)
  • data (76-82)
components/workday/actions/create-mentorship-for-me/create-mentorship-for-me.mjs (1)
  • data (68-75)
components/workday/actions/create-mentorship-for-worker/create-mentorship-for-worker.mjs (1)
  • data (75-86)
components/workday/actions/close-mentorship/close-mentorship.mjs (1)
  • data (62-66)
components/workday/actions/create-payroll-input/create-payroll-input.mjs (1)
  • data (44-48)
components/workday/actions/create-prospect/create-prospect.mjs (1)
  • data (36-38)
components/workday/actions/create-succession-plan/create-succession-plan.mjs (1)
  • data (56-60)
components/workday/actions/create-tax-rate/create-tax-rate.mjs (1)
  • data (74-78)
components/workday/actions/update-payroll-input/update-payroll-input.mjs (1)
  • data (48-48)
components/workday/actions/update-work-contact-information-change/update-work-contact-information-change.mjs (1)
  • data (45-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/workday/actions/create-digital-course/create-digital-course.mjs (1)

18-37: Issue resolved: parseJsonInput correctly handles both JSON strings and arrays of objects.

The workday component's utils.parseJsonInput() wraps parseObject(), which explicitly handles multiple input types:

  • JSON strings: Parsed via JSON.parse(), with fallback to return the string unchanged
  • Arrays: Processed via Array.isArray() branch, mapping parseObject() recursively over items
  • Objects: Recursively parsed via Object.fromEntries()

Both topics and lessons props (typed as string[]) are compatible with parseJsonInput, which accepts JSON string representations or already-structured arrays from the UI. No prop type correction or JSON requirement change is necessary.

@michelle0927
Copy link
Collaborator

Hi @Lokeshchand33, I've confirmed with @dannyroosevelt that we'll need to be able to test these components before publishing. I'm marking this as blocked for the time being.

@michelle0927 michelle0927 added the blocked Issue is blocked pending a resolution label Oct 29, 2025
@michelle0927 michelle0927 moved this from Changes Required to Blocked in Component (Source and Action) Backlog Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Issue is blocked pending a resolution User submitted Submitted by a user

Development

Successfully merging this pull request may close these issues.

[ACTION] Workday API

9 participants