Skip to content

n8n staff review improvements - #1

Merged
iDiegoNL merged 4 commits into
mainfrom
n8n-staff-review-improvements
Dec 15, 2025
Merged

iDiegoNL merged 4 commits into
mainfrom
n8n-staff-review-improvements

Conversation

@iDiegoNL

@iDiegoNL iDiegoNL commented Dec 15, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Refactoring

    • Reorganized optional parameters in OnlyFans operations into grouped "Additional Fields" collections for improved user interface and cleaner parameter management.
  • Removals

    • Removed the authentication flow operation from OnlyFans account connection.
  • Improvements

    • Enhanced error handling and resource validation for OnlyFans operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@iDiegoNL
iDiegoNL merged commit 330913e into main Dec 15, 2025
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Dec 15, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request restructures the OnlyFans node to reorganize optional input parameters into "Additional Fields" collections across ~50 resource definitions. Additionally, it modifies the main node's data handling from IDataObject[] to INodeExecutionData[], removes the authentication operation, and adds support for flattening nested collection parameters in the utils layer.

Changes

Cohort / File(s) Summary
Core node data handling
nodes/OnlyFans/OnlyFans.node.ts
Replaced IDataObject import with internal use of INodeExecutionData[]; changed return format from this.helpers.returnJsonArray(returnData) to [returnData]; added resource validation with NodeOperationError for unknown resources; updated error handling on continueOnFail to push INodeExecutionData with json.error and pairedItem.
Authentication removal
nodes/OnlyFans/resources/connectAccount/authenticate.ts, nodes/OnlyFans/resources/connectAccount/index.ts
Removed startAuthenticationResource, startAuthenticationOperation, and authenticateResource from connectAccount resources, reducing public API surface.
Account & chargeback resources
nodes/OnlyFans/resources/account/accounts.ts, nodes/OnlyFans/resources/chargebacks/*.ts (3 files)
Consolidated filter fields (onlyfans_id, onlyfans_username, onlyfans_email, start_date, end_date, limit, offset) into single "Additional Fields" collections with nested options and updated defaults.
Chat resources
nodes/OnlyFans/resources/chatMessages/*.ts (3 files), nodes/OnlyFans/resources/chats/*.ts (2 files)
Reorganized query/filter/pagination parameters (filter, id, order, skip_users, limit, offset, etc.) into "Additional Fields" collections; updated field names and descriptions to reflect new grouping.
Client session & media resources
nodes/OnlyFans/resources/clientSessions/clientSessions.ts, nodes/OnlyFans/resources/media/scrape.ts, nodes/OnlyFans/resources/media/upload.ts
Moved optional parameters (proxy_country, client_reference_id, url, expiration_date, media_id, etc.) into "Additional Fields" collections with empty/zero defaults.
Fan resources
nodes/OnlyFans/resources/fans/*.ts (4 files)
Replaced flat filter fields (limit, offset, filter, type, tips, total_spent, duration, online) with "Additional Fields" collections containing same nested options with updated metadata.
Following resources
nodes/OnlyFans/resources/following/*.ts (3 files)
Consolidated pagination and filter fields (limit, offset, filter, filter.online, filter.paid) into "Additional Fields" collections with minValue constraints and standardized defaults.
Free trial & tracking link resources
nodes/OnlyFans/resources/freeTrialLinks/*.ts (3 files), nodes/OnlyFans/resources/trackingLinks/*.ts (3 files)
Grouped limit, offset, sort, synchronous, minSpend fields into "Additional Fields" collections with updated descriptions and defaults (e.g., limit default 50, minValue 1).
Mass messaging & notification resources
nodes/OnlyFans/resources/massMessaging/*.ts (2 files), nodes/OnlyFans/resources/notifications/notifications.ts
Moved optional/pagination parameters (userLists, userIds, mediaFiles, limit, from_id, skip_users, type) into "Additional Fields" collections; preserved required fields (account, text) at top level.
Post & payout resources
nodes/OnlyFans/resources/posts/*.ts (4 files), nodes/OnlyFans/resources/payouts/*.ts (3 files)
Consolidated optional post/payout fields (labels, price, media, voting, dates, limit, offset, marker) into "Additional Fields" collections with nested options and empty/zero defaults.
Queue & statistics resources
nodes/OnlyFans/resources/queue/queue.ts, nodes/OnlyFans/resources/statistics/*.ts (6 files)
Moved date range, type, limit, and other optional filters into "Additional Fields" collections; preserved required fields (account, start_date where applicable) at top level.
Remaining resources
nodes/OnlyFans/resources/publicProfiles/search.ts, nodes/OnlyFans/resources/savedForLater*/*, nodes/OnlyFans/resources/mediaVault*/.ts, nodes/OnlyFans/resources/postComments/.ts, nodes/OnlyFans/resources/postLabels/.ts, nodes/OnlyFans/resources/settings/profile.ts, nodes/OnlyFans/resources/transactions/.ts, nodes/OnlyFans/resources/userListCollections/.ts, nodes/OnlyFans/resources/webhooks/.ts`
Applied consistent "Additional Fields" collection pattern: grouped optional/pagination parameters (query, limit, offset, type, filter, etc.) into collections with updated defaults, descriptions, and metadata.
Utils & index updates
nodes/OnlyFans/shared/utils.ts, nodes/OnlyFans/resources/index.ts
Added logic to flatten nested collection parameters (extract key-value pairs, handle path substitution); removed startAuthentication from resource groups.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25–30 minutes

  • Highly repetitive refactoring pattern across ~50 resource files (same transformation applied consistently: move optional fields into "Additional Fields" collections).
  • Limited heterogeneity: While many files are affected, the changes follow a single well-defined schema reorganization pattern.
  • Key areas warranting close attention:
    • nodes/OnlyFans/OnlyFans.node.ts — verify data format change from IDataObject[] to INodeExecutionData[], error handling logic, and resource validation.
    • nodes/OnlyFans/shared/utils.ts — confirm collection parameter flattening logic correctly handles path substitution and empty values.
    • nodes/OnlyFans/resources/connectAccount/{authenticate,index}.ts — verify authentication removal doesn't break existing workflows or dependencies.
    • Spot-check 3–5 resource files (e.g., one from each major category: chats, fans, posts, statistics) to confirm collection structure, defaults, and descriptions are correct.

Poem

🐰 Hoppity-hop, fields take flight,
Nested collections, snuggled tight,
Optional params in folders tucked,
UI cleaner—refactoring struck!
OnlyFans node now organized, indexed, and true,
This rabbit approves of your structured view! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch n8n-staff-review-improvements

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c968c64 and c35c9fc.

📒 Files selected for processing (59)
  • nodes/OnlyFans/OnlyFans.node.ts (2 hunks)
  • nodes/OnlyFans/resources/account/accounts.ts (1 hunks)
  • nodes/OnlyFans/resources/chargebacks/chargebacks.ts (1 hunks)
  • nodes/OnlyFans/resources/chargebacks/ratio.ts (1 hunks)
  • nodes/OnlyFans/resources/chargebacks/statistics.ts (1 hunks)
  • nodes/OnlyFans/resources/chatMessages/messages.ts (2 hunks)
  • nodes/OnlyFans/resources/chatMessages/search.ts (1 hunks)
  • nodes/OnlyFans/resources/chats/chats.ts (1 hunks)
  • nodes/OnlyFans/resources/chats/media.ts (1 hunks)
  • nodes/OnlyFans/resources/clientSessions/clientSessions.ts (1 hunks)
  • nodes/OnlyFans/resources/connectAccount/authenticate.ts (0 hunks)
  • nodes/OnlyFans/resources/connectAccount/index.ts (0 hunks)
  • nodes/OnlyFans/resources/fans/active.ts (1 hunks)
  • nodes/OnlyFans/resources/fans/all.ts (1 hunks)
  • nodes/OnlyFans/resources/fans/expired.ts (1 hunks)
  • nodes/OnlyFans/resources/fans/latest.ts (1 hunks)
  • nodes/OnlyFans/resources/following/active.ts (1 hunks)
  • nodes/OnlyFans/resources/following/all.ts (1 hunks)
  • nodes/OnlyFans/resources/following/expired.ts (1 hunks)
  • nodes/OnlyFans/resources/freeTrialLinks/spenders.ts (1 hunks)
  • nodes/OnlyFans/resources/freeTrialLinks/subscribers.ts (1 hunks)
  • nodes/OnlyFans/resources/freeTrialLinks/trialLinks.ts (1 hunks)
  • nodes/OnlyFans/resources/index.ts (0 hunks)
  • nodes/OnlyFans/resources/massMessaging/massMessaging.ts (2 hunks)
  • nodes/OnlyFans/resources/massMessaging/overview.ts (1 hunks)
  • nodes/OnlyFans/resources/media/scrape.ts (1 hunks)
  • nodes/OnlyFans/resources/media/upload.ts (1 hunks)
  • nodes/OnlyFans/resources/mediaVault/vault.ts (1 hunks)
  • nodes/OnlyFans/resources/mediaVaultLists/lists.ts (1 hunks)
  • nodes/OnlyFans/resources/notifications/notifications.ts (1 hunks)
  • nodes/OnlyFans/resources/payouts/earningStatistics.ts (1 hunks)
  • nodes/OnlyFans/resources/payouts/payoutRequests.ts (1 hunks)
  • nodes/OnlyFans/resources/payouts/transactions.ts (1 hunks)
  • nodes/OnlyFans/resources/postComments/comments.ts (1 hunks)
  • nodes/OnlyFans/resources/postLabels/labels.ts (1 hunks)
  • nodes/OnlyFans/resources/posts/archive.ts (1 hunks)
  • nodes/OnlyFans/resources/posts/postId.ts (1 hunks)
  • nodes/OnlyFans/resources/posts/posts.ts (2 hunks)
  • nodes/OnlyFans/resources/posts/stats.ts (1 hunks)
  • nodes/OnlyFans/resources/publicProfiles/search.ts (1 hunks)
  • nodes/OnlyFans/resources/queue/queue.ts (1 hunks)
  • nodes/OnlyFans/resources/savedForLaterMessages/messages.ts (1 hunks)
  • nodes/OnlyFans/resources/savedForLaterPosts/posts.ts (1 hunks)
  • nodes/OnlyFans/resources/settings/profile.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/earnings.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/overview.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/profileVisitors.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/statistics.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/subscriberMetrics.ts (1 hunks)
  • nodes/OnlyFans/resources/statistics/totalTransactions.ts (1 hunks)
  • nodes/OnlyFans/resources/trackingLinks/spenders.ts (1 hunks)
  • nodes/OnlyFans/resources/trackingLinks/subscribers.ts (1 hunks)
  • nodes/OnlyFans/resources/trackingLinks/trackingLinks.ts (1 hunks)
  • nodes/OnlyFans/resources/transactions/transactions.ts (1 hunks)
  • nodes/OnlyFans/resources/userListCollections/userListId.ts (1 hunks)
  • nodes/OnlyFans/resources/userListCollections/userLists.ts (1 hunks)
  • nodes/OnlyFans/resources/webhooks/webhookId.ts (3 hunks)
  • nodes/OnlyFans/resources/webhooks/webhooks.ts (1 hunks)
  • nodes/OnlyFans/shared/utils.ts (1 hunks)

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.

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.

1 participant