[20671] feat(fraudlabspro): add new custom-api-call action#20924
[20671] feat(fraudlabspro): add new custom-api-call action#20924ashwins01 wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe 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. ChangesFraudLabs Pro API v2 Upgrade
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
components/fraudlabs_pro/actions/custom-api-call/custom-api-call.mjscomponents/fraudlabs_pro/actions/send-sms-verification/send-sms-verification.mjscomponents/fraudlabs_pro/actions/verify-otp/verify-otp.mjscomponents/fraudlabs_pro/common/constants.mjscomponents/fraudlabs_pro/fraudlabs_pro.app.mjscomponents/fraudlabs_pro/package.jsoncomponents/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).", |
There was a problem hiding this comment.
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)",📝 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.
| 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.
| 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, |
There was a problem hiding this comment.
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,
},📝 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.
| 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.
Summary
Resolves #20671
Add new
custom-api-callaction with/v2baseurl for fraudlabsproChecklist
Please check the following items before your PR can be reviewed:
Versioning
0.0.1for new ones)package.json's version updatedNew app
If this is a new app, please submit an app integration request - the PR will only be reviewed after the app is 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.
Summary by CodeRabbit
New Features
Chores