Skip to content

[20671] feat(fraudlabspro): add new custom-api-call action#20924

Draft
ashwins01 wants to merge 5 commits into
masterfrom
issue-20671-fraudlabspro
Draft

[20671] feat(fraudlabspro): add new custom-api-call action#20924
ashwins01 wants to merge 5 commits into
masterfrom
issue-20671-fraudlabspro

Conversation

@ashwins01
Copy link
Copy Markdown
Contributor

@ashwins01 ashwins01 commented May 19, 2026

Summary

Resolves #20671
Add new custom-api-call action with /v2 baseurl for fraudlabspro

Checklist

Please check the following items before your PR can be reviewed:

Versioning

  • All components updated in this PR had their version updated (0.0.1 for new ones)
  • The app updated in this PR had its package.json's version updated

New app

If this is a new app, please submit an app integration request - the PR will only be reviewed after the app is integrated.

  • The app updated in this PR is already integrated

CodeRabbit review

After the PR is opened, and if new changes are pushed, CodeRabbit will automatically review it. Do not 'mark as resolved' CodeRabbit's comments, but reply to them instead, whether you agree (and update the PR accordingly) or disagree.

  • I have addressed or acknowledged all of CodeRabbit's review comments

Summary by CodeRabbit

  • New Features

    • Added Custom API Call action enabling authenticated HTTP requests to any FraudLabs Pro API v2 endpoint, with support for configurable HTTP methods, query parameters, and request bodies.
  • Chores

    • Updated package version to 0.6.0 and component versions for consistency.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jun 5, 2026 1:27pm

Request Review

@pipedream-component-development
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 96e47cba-2b43-44d0-b39d-bbbb77bad0eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR upgrades the FraudLabs Pro component to use API v2 by centralizing endpoint configuration in a new constants module, refactoring the app's request helpers to target the versioned endpoint with forced JSON format, introducing a new custom API call action for flexible endpoint access, and bumping all component versions accordingly.

Changes

FraudLabs Pro API v2 Upgrade

Layer / File(s) Summary
API Constants and Imports
components/fraudlabs_pro/common/constants.mjs, components/fraudlabs_pro/fraudlabs_pro.app.mjs
New constants module defines API_BASE_URL and API_VERSION; app module imports these constants for endpoint construction.
App Request Helper Methods
components/fraudlabs_pro/fraudlabs_pro.app.mjs
Adds _apiBaseUrl() and _apiRequest() methods that build versioned API endpoints and automatically include format: json in query parameters.
Custom API Call Action
components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjs
New action fraudlabs_pro-custom-api-call accepts a relative URL (validated to start with /), HTTP method, and optional body; delegates to _apiRequest() and returns the API response.
Component and Package Version Updates
components/fraudlabs_pro/package.json, components/fraudlabs_pro/actions/send-sms-verification/send-sms-verification.mjs, components/fraudlabs_pro/actions/verify-otp/verify-otp.mjs, components/fraudlabs_pro/sources/status-changed/status-changed.mjs
Package version bumped from 0.5.0 to 0.6.0; action versions incremented from 0.0.5 to 0.0.6; source version incremented from 0.0.1 to 0.0.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

User submitted

Suggested reviewers

  • GTFalcao
  • michelle0927
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a new custom-api-call action for fraudlabspro to address issue #20671.
Description check ✅ Passed The description includes a summary referencing the issue, mentions the /v2 baseurl, and the author checked the required versioning checklist items indicating completion.
Linked Issues check ✅ Passed The PR adds a custom-api-call action that uses the v2 API base URL through the updated fraudlabs_pro.app.mjs with _apiRequest and _apiBaseUrl methods, directly addressing the bug in issue #20671 where custom actions were stuck on v1.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the custom-api-call action and supporting infrastructure (constants, app methods, version bumps). The version updates to send-sms-verification, verify-otp, and status-changed components appear to be routine maintenance alongside the main feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-20671-fraudlabspro

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
Copy Markdown
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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjs`:
- Around line 35-45: Update the object schema descriptions for the params and
requestBody properties so they include concrete inline JSON examples;
specifically, modify the description text for the params property and the
requestBody property in the schema (named params and requestBody) to append
short JSON snippets showing typical shapes (e.g.,
{"key":"API_KEY","format":"json","param1":"value"} for params and
{"field1":"value","nested":{"id":123}} for requestBody) so agents have clear
examples of expected payloads.
- Line 7: Update the component description string in custom-api-call.mjs so it
ends with the required documentation-link text: replace "[See the
docs](https://www.fraudlabspro.com/developer)" with "[See the
documentation](https://www.fraudlabspro.com/developer)" ensuring the rest of the
description (including the base URL and API key note) remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d808dce7-f718-4442-8403-39f440d96c8c

📥 Commits

Reviewing files that changed from the base of the PR and between b81bbc0 and 4ff964a.

📒 Files selected for processing (7)
  • components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjs
  • components/fraudlabs_pro/actions/send-sms-verification/send-sms-verification.mjs
  • components/fraudlabs_pro/actions/verify-otp/verify-otp.mjs
  • components/fraudlabs_pro/common/constants.mjs
  • components/fraudlabs_pro/fraudlabs_pro.app.mjs
  • components/fraudlabs_pro/package.json
  • components/fraudlabs_pro/sources/status-changed/status-changed.mjs

export default {
key: "fraudlabs_pro-custom-api-call",
name: "Custom API Call",
description: "Make an authenticated request to any FraudLabs Pro v2 REST endpoint. The base URL `https://api.fraudlabspro.com/v2` and your API key are added automatically. [See the docs](https://www.fraudlabspro.com/developer).",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the required documentation-link ending in the component description.

The description should end with [See the documentation](https://...), not [See the docs](...).

Suggested fix
-  description: "Make an authenticated request to any FraudLabs Pro v2 REST endpoint. The base URL `https://api.fraudlabspro.com/v2` and your API key are added automatically. [See the docs](https://www.fraudlabspro.com/developer).",
+  description: "Make an authenticated request to any FraudLabs Pro v2 REST endpoint. The base URL `https://api.fraudlabspro.com/v2` and your API key are added automatically. [See the documentation](https://www.fraudlabspro.com/developer)",
As per coding guidelines, component `description` must end with a documentation link in the format `[See the documentation](https://...)`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: "Make an authenticated request to any FraudLabs Pro v2 REST endpoint. The base URL `https://api.fraudlabspro.com/v2` and your API key are added automatically. [See the docs](https://www.fraudlabspro.com/developer).",
description: "Make an authenticated request to any FraudLabs Pro v2 REST endpoint. The base URL `https://api.fraudlabspro.com/v2` and your API key are added automatically. [See the documentation](https://www.fraudlabspro.com/developer)",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjs` at line
7, Update the component description string in custom-api-call.mjs so it ends
with the required documentation-link text: replace "[See the
docs](https://www.fraudlabspro.com/developer)" with "[See the
documentation](https://www.fraudlabspro.com/developer)" ensuring the rest of the
description (including the base URL and API key note) remains unchanged.

Comment on lines +35 to +45
params: {
type: "object",
label: "Query Parameters",
description: "Query parameters to send with the request. Authentication (`key`) and response format (`format=json`) are added automatically.",
optional: true,
},
requestBody: {
type: "object",
label: "Request Body",
description: "Body of the request, for POST/PUT/PATCH calls.",
optional: true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add concrete JSON examples for object props.

params and requestBody descriptions should include inline JSON examples for agent usage.

Suggested fix
     params: {
       type: "object",
       label: "Query Parameters",
-      description: "Query parameters to send with the request. Authentication (`key`) and response format (`format=json`) are added automatically.",
+      description: "Query parameters to send with the request. Example: `{ \"ip\": \"8.8.8.8\", \"country_code\": \"US\" }`. Authentication (`key`) and response format (`format=json`) are added automatically.",
       optional: true,
     },
     requestBody: {
       type: "object",
       label: "Request Body",
-      description: "Body of the request, for POST/PUT/PATCH calls.",
+      description: "Body of the request for POST/PUT/PATCH calls. Example: `{ \"email\": \"user@example.com\", \"amount\": \"99.95\" }`.",
       optional: true,
     },
As per coding guidelines, prop descriptions for dynamic object inputs must include concrete inline JSON examples.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
params: {
type: "object",
label: "Query Parameters",
description: "Query parameters to send with the request. Authentication (`key`) and response format (`format=json`) are added automatically.",
optional: true,
},
requestBody: {
type: "object",
label: "Request Body",
description: "Body of the request, for POST/PUT/PATCH calls.",
optional: true,
params: {
type: "object",
label: "Query Parameters",
description: "Query parameters to send with the request. Example: `{ \"ip\": \"8.8.8.8\", \"country_code\": \"US\" }`. Authentication (`key`) and response format (`format=json`) are added automatically.",
optional: true,
},
requestBody: {
type: "object",
label: "Request Body",
description: "Body of the request for POST/PUT/PATCH calls. Example: `{ \"email\": \"user@example.com\", \"amount\": \"99.95\" }`.",
optional: true,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjs` around
lines 35 - 45, Update the object schema descriptions for the params and
requestBody properties so they include concrete inline JSON examples;
specifically, modify the description text for the params property and the
requestBody property in the schema (named params and requestBody) to append
short JSON snippets showing typical shapes (e.g.,
{"key":"API_KEY","format":"json","param1":"value"} for params and
{"field1":"value","nested":{"id":123}} for requestBody) so agents have clear
examples of expected payloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The endpoint of the FraudLabs Pro API in the Use any FraudLabs Pro API in Python still in v1

4 participants