diff --git a/nodes/OnlyFans/OnlyFans.node.ts b/nodes/OnlyFans/OnlyFans.node.ts index d9588cc..c31d3da 100644 --- a/nodes/OnlyFans/OnlyFans.node.ts +++ b/nodes/OnlyFans/OnlyFans.node.ts @@ -4,7 +4,6 @@ import { type INodeTypeDescription, type IExecuteFunctions, type INodeExecutionData, - type IDataObject, type INodeProperties, NodeOperationError } from 'n8n-workflow'; @@ -95,9 +94,9 @@ export class OnlyFans implements INodeType { return properties; } - async execute(this: IExecuteFunctions): Promise { +async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const returnData: IDataObject[] = []; + const returnData: INodeExecutionData[] = []; for (let i = 0; i < items.length; i++) { try { @@ -115,16 +114,30 @@ export class OnlyFans implements INodeType { } const results = await executeResourceOperation.call(this, resource, operation, i); - returnData.push(...results); + for (const result of results) { + returnData.push({ + json: result, + pairedItem: { + item: i, + }, + }); + } } catch (error) { if (this.continueOnFail()) { - returnData.push({ error: error.message }); + returnData.push({ + json: { + error: (error as Error).message, + }, + pairedItem: { + item: i, + }, + }); } else { throw error; } } } - return [this.helpers.returnJsonArray(returnData)]; + return [returnData]; } } diff --git a/nodes/OnlyFans/resources/account/accounts.ts b/nodes/OnlyFans/resources/account/accounts.ts index 48400fe..16fad05 100644 --- a/nodes/OnlyFans/resources/account/accounts.ts +++ b/nodes/OnlyFans/resources/account/accounts.ts @@ -1,24 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listAccountsResource: INodeProperties[] = [ - { - displayName: 'Optionally, Filter by the OnlyFans ID', - name: 'onlyfans_id', - type: 'string', - default: '1234567890', - }, - { - displayName: 'Optionally, Filter by the OnlyFans Username', - name: 'onlyfans_username', - type: 'string', - default: 'username', - }, - { - displayName: 'Optionally, Filter by the OnlyFans Email', - name: 'onlyfans_email', - type: 'string', - default: 'creator@example.com', - }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters to refine the account list', + placeholder: 'Add Field', + options: [ + { + displayName: 'OnlyFans ID', + name: 'onlyfans_id', + type: 'string', + default: '', + description: 'Optionally, filter by the OnlyFans ID', + }, + { + displayName: 'OnlyFans Username', + name: 'onlyfans_username', + type: 'string', + default: '', + description: 'Optionally, filter by the OnlyFans username', + }, + { + displayName: 'OnlyFans Email', + name: 'onlyfans_email', + type: 'string', + default: '', + description: 'Optionally, filter by the OnlyFans email', + }, + ], + }, ]; export const listAccountsOperation = { diff --git a/nodes/OnlyFans/resources/chargebacks/chargebacks.ts b/nodes/OnlyFans/resources/chargebacks/chargebacks.ts index 99dba6e..614c984 100644 --- a/nodes/OnlyFans/resources/chargebacks/chargebacks.ts +++ b/nodes/OnlyFans/resources/chargebacks/chargebacks.ts @@ -1,40 +1,51 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listChargebacksResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Chargebacks', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The start date for the chargebacks. Keep empty to get all.', - }, - { - displayName: 'The End Date for the Chargebacks', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the chargebacks. Keep empty to get all.', - }, - { - displayName: 'Number of Chargebacks to Return (1-100)', - name: 'limit', - type: 'string', - default: '50', - description: 'Number of chargebacks to return (1-100). Default = 10.', - }, - { - displayName: 'Number of Chargebacks to Skip, Used for Pagination', - name: 'offset', - type: 'string', - default: '', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters for listing chargebacks', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + description: 'The start date for the chargebacks. Keep empty to get all.', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '2025-03-31 23:59:59', + description: 'The end date for the chargebacks. Keep empty to get all.', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '50', + description: 'Number of chargebacks to return (1-100). Default = 10.', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of chargebacks to skip, used for pagination', + }, + ], + }, ]; export const listChargebacksOperation = { diff --git a/nodes/OnlyFans/resources/chargebacks/ratio.ts b/nodes/OnlyFans/resources/chargebacks/ratio.ts index 2e4ba7c..447beef 100644 --- a/nodes/OnlyFans/resources/chargebacks/ratio.ts +++ b/nodes/OnlyFans/resources/chargebacks/ratio.ts @@ -1,27 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const calculateChargebackRatioResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Chargeback Ratio', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The start date for the chargeback ratio. Keep empty to get all.', - }, - { - displayName: 'The End Date for the Chargeback Ratio', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the chargeback ratio. Keep empty to get all.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters for calculating chargeback ratio', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + description: 'The start date for the chargeback ratio. Keep empty to get all.', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '2025-03-31 23:59:59', + description: 'The end date for the chargeback ratio. Keep empty to get all.', + }, + ], + }, ]; export const calculateChargebackRatioOperation = { diff --git a/nodes/OnlyFans/resources/chargebacks/statistics.ts b/nodes/OnlyFans/resources/chargebacks/statistics.ts index d389787..e2dbef0 100644 --- a/nodes/OnlyFans/resources/chargebacks/statistics.ts +++ b/nodes/OnlyFans/resources/chargebacks/statistics.ts @@ -1,27 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listChargebackStatisticsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Chargebacks', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The start date for the chargebacks. Keep empty to get all.', - }, - { - displayName: 'The End Date for the Chargebacks', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the chargebacks. Keep empty to get all.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters for listing chargeback statistics', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + description: 'The start date for the chargebacks. Keep empty to get all.', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '2025-03-31 23:59:59', + description: 'The end date for the chargebacks. Keep empty to get all.', + }, + ], + }, ]; export const listChargebackStatisticsOperation = { diff --git a/nodes/OnlyFans/resources/chatMessages/messages.ts b/nodes/OnlyFans/resources/chatMessages/messages.ts index 23f8e76..1095444 100644 --- a/nodes/OnlyFans/resources/chatMessages/messages.ts +++ b/nodes/OnlyFans/resources/chatMessages/messages.ts @@ -1,54 +1,66 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listChatMessagesResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Chat ID', - name: 'chat_id', - type: 'string', - default: '', - required: true, - description: 'The chat ID', - }, - { - displayName: 'Filter by Certain Messages', - name: 'filter', - type: 'string', - default: 'pinned', - description: 'Filter by certain messages. Currently, only pins are filterable.', - }, - { - displayName: 'ID of the Last Message From Previous Page', - name: 'id', - type: 'string', - default: '123', - description: 'ID of the last message from previous page. Used for pagination.', - }, - { - displayName: 'Include This Message ID as the First Message in the Results', - name: 'first_id', - type: 'string', - default: '123', - description: 'Include this message ID as the first message in the results. Used to retrieve messages from e.g. the Search Chat Messages endpoint IDs.', - }, - { - displayName: 'Sort Order for Messages (Desc or Asc)', - name: 'order', - type: 'string', - default: 'desc', - }, - { - displayName: 'Whether to Skip User Details (All or None)', - name: 'skip_users', - type: 'string', - default: 'all', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Chat ID', + name: 'chat_id', + type: 'string', + default: '', + required: true, + description: 'The chat ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to filter and paginate chat messages', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: 'pinned', + description: 'Filter by certain messages. Currently, only pins are filterable.', + }, + { + displayName: 'First Message ID', + name: 'first_id', + type: 'string', + default: '', + description: 'Include this message ID as the first message in the results', + }, + { + displayName: 'Last Message ID', + name: 'id', + type: 'string', + default: '', + description: 'ID of the last message from previous page, used for pagination', + }, + { + displayName: 'Order', + name: 'order', + type: 'string', + default: 'desc', + description: 'Sort order for messages (desc or asc)', + }, + { + displayName: 'Skip Users', + name: 'skip_users', + type: 'string', + default: 'all', + description: 'Whether to skip user details (all or none)', + }, + ], + }, ]; export const listChatMessagesOperation = { @@ -66,68 +78,81 @@ export const listChatMessagesOperation = { }; export const sendMessageResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Chat ID', - name: 'chat_id', - type: 'string', - default: '', - required: true, - description: 'The chat ID', - }, - { - displayName: 'The Message Text Content', - name: 'text', - type: 'string', - default: 'Hello!', - required: true, - description: 'The message text content', - }, - { - displayName: 'Mark This Message as a Reply to Another (Can Be Either Your Own, or the Recipient\'s)', - name: 'replyToMessageId', - type: 'number', - default: 123456789, - }, - { - displayName: 'Whether the Text Should Be Shown or Hidden', - name: 'lockedText', - type: 'boolean', - default: true, - }, - { - displayName: 'Price for Paid Content (0 or Between 3-200)', - name: 'price', - type: 'number', - default: 10, - description: 'Price for paid content (0 or between 3-200). In case this is not zero, **mediaFiles** is required.', - }, - { - displayName: 'Array of Media File Upload Prefixed_ids, or OF Media IDs (Required if Price Is Not 0)', - name: 'mediaFiles', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - description: 'Array of media file upload prefixed_ids, or OF media IDs (required if price is not 0). Will be hidden if `price` is provided.', - }, - { - displayName: 'Array of Media File Upload Prefixed_ids, or OF Media IDs (Required if Price Is Not 0)', - name: 'previews', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - description: 'Array of media file upload prefixed_ids, or OF media IDs (required if price is not 0). Will be shown if `price` is provided. All `previews` values must also exist in the `mediaFiles` array.', - }, - { - displayName: 'Array OnlyFans Creator User IDs to Tag in Your Message', - name: 'rfTag', - type: 'string', - default: '123', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Chat ID', + name: 'chat_id', + type: 'string', + default: '', + required: true, + description: 'The chat ID', + }, + { + displayName: 'The Message Text Content', + name: 'text', + type: 'string', + default: 'Hello!', + required: true, + description: 'The message text content', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when sending a message', + placeholder: 'Add Field', + options: [ + { + displayName: 'Locked Text', + name: 'lockedText', + type: 'boolean', + default: false, + description: 'Whether the text should be shown or hidden', + }, + { + displayName: 'Media Files', + name: 'mediaFiles', + type: 'string', + default: '', + description: 'Array of media file upload prefixed_ids, or OF media IDs. Hidden if price is provided.', + }, + { + displayName: 'Previews', + name: 'previews', + type: 'string', + default: '', + description: 'Array of media IDs used as previews. All values must also exist in mediaFiles.', + }, + { + displayName: 'Price', + name: 'price', + type: 'number', + default: 0, + description: 'Price for paid content (0 or between 3-200). If not zero, mediaFiles is required.', + }, + { + displayName: 'Reply To Message ID', + name: 'replyToMessageId', + type: 'number', + default: 0, + description: 'Mark this message as a reply to another message', + }, + { + displayName: 'Tagged User IDs', + name: 'rfTag', + type: 'string', + default: '', + description: 'Array of OnlyFans creator user IDs to tag in your message', + }, + ], + }, ]; export const sendMessageOperation = { diff --git a/nodes/OnlyFans/resources/chatMessages/search.ts b/nodes/OnlyFans/resources/chatMessages/search.ts index 3cde7ed..c66c942 100644 --- a/nodes/OnlyFans/resources/chatMessages/search.ts +++ b/nodes/OnlyFans/resources/chatMessages/search.ts @@ -1,36 +1,29 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const searchChatMessagesResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Chat ID', - name: 'chat_id', - type: 'string', - default: '', - required: true, - description: 'The chat ID', - }, - { - displayName: 'The Query Search in Messages', - name: 'query', - type: 'string', - default: 'Hello', - required: true, - description: 'The query search in messages', - }, - { - displayName: 'Query', - name: 'query', - type: 'string', - default: 'suscipit', - required: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Chat ID', + name: 'chat_id', + type: 'string', + default: '', + required: true, + description: 'The chat ID', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + required: true, + description: 'The query search in messages', + }, ]; export const searchChatMessagesOperation = { diff --git a/nodes/OnlyFans/resources/chats/chats.ts b/nodes/OnlyFans/resources/chats/chats.ts index 5b22f02..1b0c421 100644 --- a/nodes/OnlyFans/resources/chats/chats.ts +++ b/nodes/OnlyFans/resources/chats/chats.ts @@ -1,52 +1,65 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listChatsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Chats to Return (1 - 100)', - name: 'limit', - type: 'string', - default: '10', - description: 'Number of chats to return (1 - 100). Default = 10.', - }, - { - displayName: 'Number of Chats to Skip for Pagination', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Whether to Skip User Details in Response (All or None)', - name: 'skip_users', - type: 'string', - default: 'all', - description: 'Whether to skip user details in response (all or none). Default = all.', - }, - { - displayName: 'Sort Order for Chats (Recent or Old)', - name: 'order', - type: 'string', - default: 'recent', - description: 'Sort order for chats (recent or old). Default = recent.', - }, - { - displayName: 'Optionally, Filter the Chats by Type', - name: 'filter', - type: 'string', - default: 'with_tips', - }, - { - displayName: 'Search Query to Filter Chats', - name: 'query', - type: 'string', - default: 'John', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to refine the chat list', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: 'with_tips', + description: 'Optionally, filter the chats by type', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '10', + description: 'Number of chats to return (1 - 100). Default = 10.', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of chats to skip for pagination', + }, + { + displayName: 'Order', + name: 'order', + type: 'string', + default: 'recent', + description: 'Sort order for chats (recent or old). Default = recent.', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Search query to filter chats', + }, + { + displayName: 'Skip Users', + name: 'skip_users', + type: 'string', + default: 'all', + description: 'Whether to skip user details in response (all or none). Default = all.', + }, + ], + }, ]; export const listChatsOperation = { diff --git a/nodes/OnlyFans/resources/chats/media.ts b/nodes/OnlyFans/resources/chats/media.ts index 761f001..813623f 100644 --- a/nodes/OnlyFans/resources/chats/media.ts +++ b/nodes/OnlyFans/resources/chats/media.ts @@ -1,48 +1,59 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listChatMediaGalleryResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Chat ID', - name: 'chat_id', - type: 'string', - default: '', - required: true, - description: 'The chat ID', - }, - { - displayName: 'Filter by Specific Media Types', - name: 'type', - type: 'string', - default: 'claims', - description: 'Filter by specific media types. Keep empty to return all.', - }, - { - displayName: 'Number of Medias to Return', - name: 'limit', - type: 'string', - default: '20', - description: 'Number of medias to return. Default = 20.', - }, - { - displayName: 'Number of Medias to Skip for Pagination', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Whether to Skip User Details in Response (All or None)', - name: 'skip_users', - type: 'string', - default: 'all', - description: 'Whether to skip user details in response (all or none). Default = all.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Chat ID', + name: 'chat_id', + type: 'string', + default: '', + required: true, + description: 'The chat ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to filter and paginate chat media', + placeholder: 'Add Field', + options: [ + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'claims', + description: 'Filter by specific media types. Keep empty to return all.', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '20', + description: 'Number of medias to return. Default = 20.', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of medias to skip for pagination', + }, + { + displayName: 'Skip Users', + name: 'skip_users', + type: 'string', + default: 'all', + description: 'Whether to skip user details in response (all or none). Default = all.', + }, + ], + }, ]; export const listChatMediaGalleryOperation = { diff --git a/nodes/OnlyFans/resources/clientSessions/clientSessions.ts b/nodes/OnlyFans/resources/clientSessions/clientSessions.ts index 2b54942..6fe8504 100644 --- a/nodes/OnlyFans/resources/clientSessions/clientSessions.ts +++ b/nodes/OnlyFans/resources/clientSessions/clientSessions.ts @@ -1,25 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const createClientSessionResource: INodeProperties[] = [ - { - displayName: 'Display Name of the Account Visible in Your OnlyFansAPI Console Dashboard', - name: 'display_name', - type: 'string', - default: 'STRLCxGLVC Agency / Model: Stella', - required: true, - }, - { - displayName: 'Your Internal Reference ID for the Connected Account', - name: 'client_reference_id', - type: 'string', - default: 'my_crm_model_12345', - }, - { - displayName: 'Proxy Country', - name: 'proxy_country', - type: 'string', - default: 'uk', - }, + { + displayName: 'Display Name of the Account Visible in Your OnlyFansAPI Console Dashboard', + name: 'display_name', + type: 'string', + default: 'STRLCxGLVC Agency / Model: Stella', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when creating a client session', + placeholder: 'Add Field', + options: [ + { + displayName: 'Client Reference ID', + name: 'client_reference_id', + type: 'string', + default: '', + description: 'Your internal reference ID for the connected account', + }, + { + displayName: 'Proxy Country', + name: 'proxy_country', + type: 'string', + default: '', + description: 'Proxy country to use for the client session', + }, + ], + }, ]; export const createClientSessionOperation = { diff --git a/nodes/OnlyFans/resources/connectAccount/authenticate.ts b/nodes/OnlyFans/resources/connectAccount/authenticate.ts deleted file mode 100644 index c6f5ef2..0000000 --- a/nodes/OnlyFans/resources/connectAccount/authenticate.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { INodeProperties, IDataObject } from 'n8n-workflow'; - -export const startAuthenticationResource: INodeProperties[] = [ - { - displayName: 'The Email Address of the OnlyFans Account', - name: 'email', - type: 'string', - placeholder: 'name@email.com', - default: 'afton07@example.com', - required: true, - description: 'The email address of the OnlyFans account', - }, - { - displayName: 'The Password of the OnlyFans Account', - name: 'password', - type: 'string', - typeOptions: { password: true }, - default: 'W"BQ)T;S', - required: true, - description: 'The password of the OnlyFans account', - }, - { - displayName: 'The Country of the Proxy Server You Want to Use', - name: 'proxyCountry', - type: 'string', - default: 'it', - required: true, - description: 'The country of the proxy server you want to use. Eg. "us" for United States', - }, -]; - -export const startAuthenticationOperation = { - name: 'startAuthentication', - displayName: 'Start Authentication', - method: 'POST' as const, - parameters: startAuthenticationResource, - processResponse: (responseData: unknown) => { - if (responseData && typeof responseData === 'object' && 'data' in responseData) { - const data = responseData.data; - return Array.isArray(data) ? data as IDataObject[] : [data as IDataObject]; - } - return Array.isArray(responseData) ? responseData as IDataObject[] : [responseData as IDataObject]; - } -}; - diff --git a/nodes/OnlyFans/resources/connectAccount/index.ts b/nodes/OnlyFans/resources/connectAccount/index.ts index 40aa15c..39d53a5 100644 --- a/nodes/OnlyFans/resources/connectAccount/index.ts +++ b/nodes/OnlyFans/resources/connectAccount/index.ts @@ -1,15 +1,5 @@ import type { EndpointResource } from '../index'; -import { startAuthenticationOperation } from './authenticate'; - -export const authenticateResource: EndpointResource = { - name: 'authenticate', - displayName: 'Authenticate', - description: 'Start the authentication process for a new account. Our systems will bypass Captcha and also ask you for 2FA code if required. All credentials are stored securely using bcrypt and only used during login.', - endpoint: '/authenticate', - operations: [startAuthenticationOperation], -}; - import { pollAuthenticationStatusOperation, submit2FAOperation } from './attemptId'; export const attemptIdResource: EndpointResource = { @@ -31,7 +21,6 @@ export const reauthenticateResource: EndpointResource = { }; export const connectAccountResources: EndpointResource[] = [ - authenticateResource, attemptIdResource, reauthenticateResource ]; diff --git a/nodes/OnlyFans/resources/fans/active.ts b/nodes/OnlyFans/resources/fans/active.ts index b732f83..d9d5cf5 100644 --- a/nodes/OnlyFans/resources/fans/active.ts +++ b/nodes/OnlyFans/resources/fans/active.ts @@ -1,61 +1,75 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listActiveFansResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Fans to Return (1-50)', - name: 'limit', - type: 'string', - default: '20', - }, - { - displayName: 'Number of Fans to Skip', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Fan Type', - name: 'type', - type: 'string', - default: 'active', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online)', - name: 'filter.online', - type: 'string', - default: '1', - }, - { - displayName: 'Filter by Minimum Total Spent', - name: 'filter.total_spent', - type: 'string', - default: '100', - }, - { - displayName: 'Filter by Minimum Tips', - name: 'filter.tips', - type: 'string', - default: '50', - }, - { - displayName: 'Filter by Minimum Subscription Duration (Days)', - name: 'filter.duration', - type: 'string', - default: '30', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing active fans', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '20', + description: 'Number of fans to return (1-50)', + }, + { + displayName: 'Minimum Subscription Duration (Days)', + name: 'filter.duration', + type: 'string', + default: '30', + }, + { + displayName: 'Minimum Tips', + name: 'filter.tips', + type: 'string', + default: '50', + }, + { + displayName: 'Minimum Total Spent', + name: 'filter.total_spent', + type: 'string', + default: '100', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of fans to skip', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'string', + default: '1', + description: 'Filter by online status (1 for online)', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'active', + description: 'Filter by fan type', + }, + ], + }, ]; export const listActiveFansOperation = { diff --git a/nodes/OnlyFans/resources/fans/all.ts b/nodes/OnlyFans/resources/fans/all.ts index 974a124..2950295 100644 --- a/nodes/OnlyFans/resources/fans/all.ts +++ b/nodes/OnlyFans/resources/fans/all.ts @@ -1,61 +1,75 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listAllFansResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Fans to Return (1-50)', - name: 'limit', - type: 'string', - default: '20', - }, - { - displayName: 'Number of Fans to Skip', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Fan Type', - name: 'type', - type: 'string', - default: 'active', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online)', - name: 'filter.online', - type: 'string', - default: '1', - }, - { - displayName: 'Filter by Minimum Total Spent', - name: 'filter.total_spent', - type: 'string', - default: '100', - }, - { - displayName: 'Filter by Minimum Tips', - name: 'filter.tips', - type: 'string', - default: '50', - }, - { - displayName: 'Filter by Minimum Subscription Duration (Days)', - name: 'filter.duration', - type: 'string', - default: '30', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing all fans', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '20', + description: 'Number of fans to return (1-50)', + }, + { + displayName: 'Minimum Subscription Duration (Days)', + name: 'filter.duration', + type: 'string', + default: '30', + }, + { + displayName: 'Minimum Tips', + name: 'filter.tips', + type: 'string', + default: '50', + }, + { + displayName: 'Minimum Total Spent', + name: 'filter.total_spent', + type: 'string', + default: '100', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of fans to skip', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'string', + default: '1', + description: 'Filter by online status (1 for online)', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'active', + description: 'Filter by fan type', + }, + ], + }, ]; export const listAllFansOperation = { diff --git a/nodes/OnlyFans/resources/fans/expired.ts b/nodes/OnlyFans/resources/fans/expired.ts index 16311af..a21e7a9 100644 --- a/nodes/OnlyFans/resources/fans/expired.ts +++ b/nodes/OnlyFans/resources/fans/expired.ts @@ -1,61 +1,75 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listExpiredFansResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Fans to Return (1-50)', - name: 'limit', - type: 'string', - default: '20', - }, - { - displayName: 'Number of Fans to Skip', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Fan Type', - name: 'type', - type: 'string', - default: 'expired', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online)', - name: 'filter.online', - type: 'string', - default: '1', - }, - { - displayName: 'Filter by Minimum Total Spent', - name: 'filter.total_spent', - type: 'string', - default: '100', - }, - { - displayName: 'Filter by Minimum Tips', - name: 'filter.tips', - type: 'string', - default: '50', - }, - { - displayName: 'Filter by Minimum Subscription Duration (Days)', - name: 'filter.duration', - type: 'string', - default: '30', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing expired fans', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '20', + description: 'Number of fans to return (1-50)', + }, + { + displayName: 'Minimum Subscription Duration (Days)', + name: 'filter.duration', + type: 'string', + default: '30', + }, + { + displayName: 'Minimum Tips', + name: 'filter.tips', + type: 'string', + default: '50', + }, + { + displayName: 'Minimum Total Spent', + name: 'filter.total_spent', + type: 'string', + default: '100', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of fans to skip', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'string', + default: '1', + description: 'Filter by online status (1 for online)', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'expired', + description: 'Filter by fan type', + }, + ], + }, ]; export const listExpiredFansOperation = { diff --git a/nodes/OnlyFans/resources/fans/latest.ts b/nodes/OnlyFans/resources/fans/latest.ts index e0b34c0..fb36986 100644 --- a/nodes/OnlyFans/resources/fans/latest.ts +++ b/nodes/OnlyFans/resources/fans/latest.ts @@ -1,77 +1,61 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listLatestFansResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Start Date for Filtering (Required with End_date)', - name: 'start_date', - type: 'string', - default: '2024-01-01', - }, - { - displayName: 'End Date for Filtering (Required with Start_date)', - name: 'end_date', - type: 'string', - default: '2024-12-31', - }, - { - displayName: 'Filter by Type: Total, Renew, or New', - name: 'type', - type: 'string', - default: 'total', - }, - { - displayName: 'Number of Fans to Skip', - name: 'offset', - type: 'string', - default: '', - }, - { - displayName: 'Number of Fans to Return (1-100)', - name: 'limit', - type: 'string', - default: '50', - }, - { - displayName: 'This Field Is Required when end_date Is Present', - name: 'start_date', - type: 'string', - default: '', - }, - { - displayName: 'This Field Is Required when start_date Is Present', - name: 'end_date', - type: 'string', - default: '', - }, - { - displayName: 'Type', - name: 'type', - type: 'string', - default: 'total', - }, - { - displayName: 'Must Be at Least 0', - name: 'offset', - type: 'number', - default: 12, - }, - { - displayName: 'Must Be at Least 1', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing latest fans', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'End date for filtering. Required when start_date is present.', }, - default: 50, - description: 'Max number of results to return', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Must be at least 0', + }, + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '', + description: 'Start date for filtering. Required when end_date is present.', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'total', + description: 'Filter by type: total, renew, or new', + }, + ], + }, ]; export const listLatestFansOperation = { diff --git a/nodes/OnlyFans/resources/following/active.ts b/nodes/OnlyFans/resources/following/active.ts index ae2460d..6d30dc2 100644 --- a/nodes/OnlyFans/resources/following/active.ts +++ b/nodes/OnlyFans/resources/following/active.ts @@ -1,48 +1,60 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listActiveFollowingsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Followings to Return (1-50)', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing active followings', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'Pagination Offset', - name: 'offset', - type: 'number', - default: 0, - description: 'Pagination offset. Must be at least 0.', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online, 0 for Offline, Null for All)', - name: 'filter.online', - type: 'number', - default: 1, - }, - { - displayName: 'Filter by Paid Status (1 for Paid, 0 for Free, Null for All)', - name: 'filter.paid', - type: 'number', - default: 1, - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Pagination offset, must be at least 0', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'number', + default: 1, + description: 'Filter by online status (1 for online, 0 for offline, null for all)', + }, + { + displayName: 'Paid Status', + name: 'filter.paid', + type: 'number', + default: 1, + description: 'Filter by paid status (1 for paid, 0 for free, null for all)', + }, + ], + }, ]; export const listActiveFollowingsOperation = { diff --git a/nodes/OnlyFans/resources/following/all.ts b/nodes/OnlyFans/resources/following/all.ts index b797eb1..17c1bac 100644 --- a/nodes/OnlyFans/resources/following/all.ts +++ b/nodes/OnlyFans/resources/following/all.ts @@ -1,48 +1,60 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listAllFollowingsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Followings to Return (1-50)', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing all followings', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'Pagination Offset', - name: 'offset', - type: 'number', - default: 0, - description: 'Pagination offset. Must be at least 0.', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online, 0 for Offline, Null for All)', - name: 'filter.online', - type: 'number', - default: 1, - }, - { - displayName: 'Filter by Paid Status (1 for Paid, 0 for Free, Null for All)', - name: 'filter.paid', - type: 'number', - default: 1, - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Pagination offset, must be at least 0', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'number', + default: 1, + description: 'Filter by online status (1 for online, 0 for offline, null for all)', + }, + { + displayName: 'Paid Status', + name: 'filter.paid', + type: 'number', + default: 1, + description: 'Filter by paid status (1 for paid, 0 for free, null for all)', + }, + ], + }, ]; export const listAllFollowingsOperation = { diff --git a/nodes/OnlyFans/resources/following/expired.ts b/nodes/OnlyFans/resources/following/expired.ts index 09ea1ce..63a5398 100644 --- a/nodes/OnlyFans/resources/following/expired.ts +++ b/nodes/OnlyFans/resources/following/expired.ts @@ -1,48 +1,60 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listExpiredFollowingsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Followings to Return (1-50)', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing expired followings', + placeholder: 'Add Field', + options: [ + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: '', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'Pagination Offset', - name: 'offset', - type: 'number', - default: 0, - description: 'Pagination offset. Must be at least 0.', - }, - { - displayName: 'Filter', - name: 'filter', - type: 'string', - default: '', - }, - { - displayName: 'Filter by Online Status (1 for Online, 0 for Offline, Null for All)', - name: 'filter.online', - type: 'number', - default: 1, - }, - { - displayName: 'Filter by Paid Status (1 for Paid, 0 for Free, Null for All)', - name: 'filter.paid', - type: 'number', - default: 1, - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Pagination offset, must be at least 0', + }, + { + displayName: 'Online Status', + name: 'filter.online', + type: 'number', + default: 1, + description: 'Filter by online status (1 for online, 0 for offline, null for all)', + }, + { + displayName: 'Paid Status', + name: 'filter.paid', + type: 'number', + default: 1, + description: 'Filter by paid status (1 for paid, 0 for free, null for all)', + }, + ], + }, ]; export const listExpiredFollowingsOperation = { diff --git a/nodes/OnlyFans/resources/freeTrialLinks/spenders.ts b/nodes/OnlyFans/resources/freeTrialLinks/spenders.ts index 16b1602..11579d8 100644 --- a/nodes/OnlyFans/resources/freeTrialLinks/spenders.ts +++ b/nodes/OnlyFans/resources/freeTrialLinks/spenders.ts @@ -1,45 +1,55 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listFreeTrialLinkSpendersResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Trial Link ID', - name: 'trial_link_id', - type: 'string', - default: '', - required: true, - description: 'The trial link ID', - }, - { - displayName: 'The Number of Spenders to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Trial Link ID', + name: 'trial_link_id', + type: 'string', + default: '', + required: true, + description: 'The trial link ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing free trial link spenders', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - description: 'The offset used for pagination. Default `0`.', - }, - { - displayName: 'Minimal Spend of a Fan', - name: 'minSpend', - type: 'number', - default: 1, - description: 'Minimal spend of a fan. Default `1`. Must be at least 1.', - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'The offset used for pagination. Default `0`.', + }, + { + displayName: 'Minimum Spend', + name: 'minSpend', + type: 'number', + default: 1, + description: 'Minimal spend of a fan. Default `1`. Must be at least 1.', + }, + ], + }, ]; export const listFreeTrialLinkSpendersOperation = { diff --git a/nodes/OnlyFans/resources/freeTrialLinks/subscribers.ts b/nodes/OnlyFans/resources/freeTrialLinks/subscribers.ts index b292bcf..132c1fd 100644 --- a/nodes/OnlyFans/resources/freeTrialLinks/subscribers.ts +++ b/nodes/OnlyFans/resources/freeTrialLinks/subscribers.ts @@ -1,40 +1,48 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listFreeTrialLinkSubscribersResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Trial Link ID', - name: 'trial_link_id', - type: 'string', - default: '', - required: true, - description: 'The trial link ID', - }, - { - displayName: 'The Number of Subscribers to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Trial Link ID', + name: 'trial_link_id', + type: 'string', + default: '', + required: true, + description: 'The trial link ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing free trial link subscribers', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', }, - default: 50, - required: true, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - required: true, - description: 'The offset used for pagination. Default `0`.', - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'The offset used for pagination. Default `0`.', + }, + ], + }, ]; export const listFreeTrialLinkSubscribersOperation = { diff --git a/nodes/OnlyFans/resources/freeTrialLinks/trialLinks.ts b/nodes/OnlyFans/resources/freeTrialLinks/trialLinks.ts index 0567ece..76f38c2 100644 --- a/nodes/OnlyFans/resources/freeTrialLinks/trialLinks.ts +++ b/nodes/OnlyFans/resources/freeTrialLinks/trialLinks.ts @@ -1,53 +1,61 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listFreeTrialLinksResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Number of Trial Links to Return', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when listing free trial links', + placeholder: 'Add Field', + options: [ + { + displayName: 'Field', + name: 'field', + type: 'string', + default: 'create_date', + description: 'Sort the results by a field. Default `create_date`.', }, - default: 50, - required: true, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - required: true, - description: 'The offset used for pagination. Default `0`.', - }, - { - displayName: 'Sort the Results', - name: 'sort', - type: 'string', - default: 'desc', - description: 'Sort the results. Default `desc`.', - }, - { - displayName: 'Sort the Results by a Field', - name: 'field', - type: 'string', - default: 'create_date', - description: 'Sort the results by a field. Default `create_date`.', - }, - { - displayName: 'Wait for the Revenue Data to Finish Processing, Instead of Processing in the Background', - name: 'synchronous', - type: 'boolean', - default: false, - description: 'Whether to wait for the revenue data to finish processing, instead of processing in the background. **Will result in longer response times, use with caution**. Default `false`', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'The offset used for pagination. Default `0`.', + }, + { + displayName: 'Sort', + name: 'sort', + type: 'string', + default: 'desc', + description: 'Sort the results. Default `desc`.', + }, + { + displayName: 'Synchronous', + name: 'synchronous', + type: 'boolean', + default: false, + description: 'Whether to wait for revenue data to finish processing instead of background processing', + }, + ], + }, ]; export const listFreeTrialLinksOperation = { diff --git a/nodes/OnlyFans/resources/index.ts b/nodes/OnlyFans/resources/index.ts index b876e98..8a2f433 100644 --- a/nodes/OnlyFans/resources/index.ts +++ b/nodes/OnlyFans/resources/index.ts @@ -150,7 +150,6 @@ const resourceGroups: ResourceGroup[] = [ displayName: 'Connect OnlyFans Account', description: 'Authenticate OnlyFans accounts and manage login attempts.', operations: [ - 'startAuthentication', 'pollAuthenticationStatus', 'submit2FA', 'reAuthenticateAccount' diff --git a/nodes/OnlyFans/resources/massMessaging/massMessaging.ts b/nodes/OnlyFans/resources/massMessaging/massMessaging.ts index 4175fa6..3d9d7a8 100644 --- a/nodes/OnlyFans/resources/massMessaging/massMessaging.ts +++ b/nodes/OnlyFans/resources/massMessaging/massMessaging.ts @@ -1,13 +1,13 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listMassMessageQueueResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, ]; export const listMassMessageQueueOperation = { @@ -25,72 +25,87 @@ export const listMassMessageQueueOperation = { }; export const sendMassMessageResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Array of User List IDs that the Mass Message Will Be Sent To', - name: 'userLists', - type: 'string', - default: 'fans,recent,following,rebill_off,tagged,1234567890', - }, - { - displayName: 'Array of User IDs that the Mass Message Will Be Sent To', - name: 'userIds', - type: 'string', - default: '1234567890', - }, - { - displayName: 'The Message Text Content', - name: 'text', - type: 'string', - default: 'Hello!', - required: true, - description: 'The message text content', - }, - { - displayName: 'Whether the Text Should Be Shown or Hidden', - name: 'lockedText', - type: 'boolean', - default: true, - }, - { - displayName: 'Price for Paid Content (0 or Between 3-200)', - name: 'price', - type: 'number', - default: 100, - description: 'Price for paid content (0 or between 3-200). In case this is not zero, **mediaFiles** is required.', - }, - { - displayName: 'Array of Media File Upload Prefixed_ids, or OF Media IDs (Required if Price Is Not 0)', - name: 'mediaFiles', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - description: 'Array of media file upload prefixed_ids, or OF media IDs (required if price is not 0). Will be hidden if `price` is provided.', - }, - { - displayName: 'Array of Media File Upload Prefixed_ids, or OF Media IDs (Required if Price Is Not 0)', - name: 'previews', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - description: 'Array of media file upload prefixed_ids, or OF media IDs (required if price is not 0). Will be shown if `price` is provided. All `previews` values must also exist in the `mediaFiles` array.', - }, - { - displayName: 'Schedule the Chat Message in the Future (UTC Timezone)', - name: 'scheduledDate', - type: 'string', - default: '2025-01-01T00:00:00.000Z', - }, - { - displayName: 'Add Your Message to the "Saved for Later" Queue', - name: 'saveForLater', - type: 'boolean', - default: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Message Text Content', + name: 'text', + type: 'string', + default: 'Hello!', + required: true, + description: 'The message text content', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when sending a mass message', + placeholder: 'Add Field', + options: [ + { + displayName: 'Locked Text', + name: 'lockedText', + type: 'boolean', + default: false, + description: 'Whether the text should be shown or hidden', + }, + { + displayName: 'Media Files', + name: 'mediaFiles', + type: 'string', + default: '', + description: 'Array of media file upload prefixed_ids, or OF media IDs', + }, + { + displayName: 'Previews', + name: 'previews', + type: 'string', + default: '', + description: 'Array of media IDs used as previews; all values must also exist in mediaFiles', + }, + { + displayName: 'Price', + name: 'price', + type: 'number', + default: 0, + description: 'Price for paid content (0 or between 3-200). If not zero, mediaFiles is required.', + }, + { + displayName: 'Save For Later', + name: 'saveForLater', + type: 'boolean', + default: false, + description: 'Whether to add your message to the "Saved for Later" queue', + }, + { + displayName: 'Scheduled Date', + name: 'scheduledDate', + type: 'string', + default: '', + description: 'Schedule the chat message in the future (UTC timezone)', + }, + { + displayName: 'User IDs', + name: 'userIds', + type: 'string', + default: '', + description: 'Array of user IDs that the mass message will be sent to', + }, + { + displayName: 'User Lists', + name: 'userLists', + type: 'string', + default: '', + description: 'Array of user list IDs that the mass message will be sent to', + }, + ], + }, ]; export const sendMassMessageOperation = { diff --git a/nodes/OnlyFans/resources/massMessaging/overview.ts b/nodes/OnlyFans/resources/massMessaging/overview.ts index f6c4580..479d364 100644 --- a/nodes/OnlyFans/resources/massMessaging/overview.ts +++ b/nodes/OnlyFans/resources/massMessaging/overview.ts @@ -1,49 +1,61 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getMassMessageOverviewResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Earliest Mass Message to Retrieve', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The earliest mass message to retrieve. Keep empty to get all.', - }, - { - displayName: 'The Latest Mass Message to Retrieve', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The latest mass message to retrieve. Keep empty to get all.', - }, - { - displayName: 'Number of Mass Messages to Return (Default = 10)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to filter and paginate mass messages', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The latest mass message to retrieve. Keep empty to get all.', }, - default: 50, - }, - { - displayName: 'Number of Mass Messages to Skip for Pagination', - name: 'offset', - type: 'number', - default: 0, - }, - { - displayName: 'Optionally, Find a Mass Message by the Message Text', - name: 'query', - type: 'string', - default: 'My message text', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Number of mass messages to skip for pagination', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Optionally, find a mass message by the message text', + }, + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '', + description: 'The earliest mass message to retrieve. Keep empty to get all.', + }, + ], + }, ]; export const getMassMessageOverviewOperation = { diff --git a/nodes/OnlyFans/resources/media/scrape.ts b/nodes/OnlyFans/resources/media/scrape.ts index 23e2e99..d66540a 100644 --- a/nodes/OnlyFans/resources/media/scrape.ts +++ b/nodes/OnlyFans/resources/media/scrape.ts @@ -1,48 +1,58 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const scrapeMediaFromTheOnlyFansCDNResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The CDN URL to Scrape', - name: 'url', - type: 'string', - default: 'https://cdn2.onlyfans.com/files/e/e5/123/600x400_123.jpg?Tag=2&u=123&Policy=123&Signature=signature&Key-Pair-Id=123', - description: 'The CDN URL to scrape. **Keep in mind that these URLs expire fast.**.', - }, - { - displayName: 'The OnlyFans Vault Media ID', - name: 'media_id', - type: 'number', - default: 1234567890, - description: 'The OnlyFans Vault Media ID. **Can be used instead of the `URL`.**.', - }, - { - displayName: 'The File Type to Scrape', - name: 'file_type', - type: 'string', - default: 'full', - description: 'The file type to scrape. Only allowed when using `media_id`.', - }, - { - displayName: 'The Expiration Date of Our Returned `Temporary_url`', - name: 'expiration_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The expiration date of our returned `temporary_url`. Default of 5 minutes. Must be null if `public` is true.', - }, - { - displayName: 'Set to True if You Want to Have the File Uploaded to Our Public CDN (No Signed URL Needed to Access)', - name: 'public', - type: 'boolean', - default: false, - description: 'Whether to have the file uploaded to our public CDN (no signed URL needed to access). Default is false. Must be null if `expiration_date` is set.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when scraping media from the CDN', + placeholder: 'Add Field', + options: [ + { + displayName: 'CDN URL', + name: 'url', + type: 'string', + default: '', + description: 'The CDN URL to scrape. Keep in mind that these URLs expire fast.', + }, + { + displayName: 'Expiration Date', + name: 'expiration_date', + type: 'string', + default: '', + description: 'Expiration date of the returned temporary_url. Default ~5 minutes. Must be null if public is true.', + }, + { + displayName: 'File Type', + name: 'file_type', + type: 'string', + default: 'full', + description: 'The file type to scrape. Only allowed when using media_id.', + }, + { + displayName: 'Media ID', + name: 'media_id', + type: 'number', + default: 0, + description: 'The OnlyFans Vault media ID. Can be used instead of the URL.', + }, + { + displayName: 'Public', + name: 'public', + type: 'boolean', + default: false, + description: 'Whether to upload the file to the public CDN (no signed URL needed). Must be null if expiration_date is set.', + }, + ], + }, ]; export const scrapeMediaFromTheOnlyFansCDNOperation = { diff --git a/nodes/OnlyFans/resources/media/upload.ts b/nodes/OnlyFans/resources/media/upload.ts index 7af49b2..b4f96ac 100644 --- a/nodes/OnlyFans/resources/media/upload.ts +++ b/nodes/OnlyFans/resources/media/upload.ts @@ -1,27 +1,38 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const uploadMediaToTheOnlyFansCDNResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The File to Upload', - name: 'file', - type: 'string', - default: 'file.jpg', - required: true, - description: 'The file to upload', - }, - { - displayName: 'Set to `Avatar` if This File Will Be Used as a Profile Picture, `Header` for a Profile Banner, or Keep Empty if This File Will Be for Anything Else', - name: 'type', - type: 'string', - default: 'avatar', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The File to Upload', + name: 'file', + type: 'string', + default: 'file.jpg', + required: true, + description: 'The file to upload', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when uploading media', + placeholder: 'Add Field', + options: [ + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'avatar', + description: 'Set to avatar if used as a profile picture, header for a profile banner, or leave empty', + }, + ], + }, ]; export const uploadMediaToTheOnlyFansCDNOperation = { diff --git a/nodes/OnlyFans/resources/mediaVault/vault.ts b/nodes/OnlyFans/resources/mediaVault/vault.ts index e0be90f..370ad40 100644 --- a/nodes/OnlyFans/resources/mediaVault/vault.ts +++ b/nodes/OnlyFans/resources/mediaVault/vault.ts @@ -1,64 +1,75 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listVaultMediaResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Optionally, Search for a Text Query', - name: 'query', - type: 'string', - default: 'Hi', - }, - { - displayName: 'Sort the Results by a Field', - name: 'field', - type: 'string', - default: 'recent', - description: 'Sort the results by a field. Default `recent`.', - }, - { - displayName: 'Filter the Results by a Media Type', - name: 'type', - type: 'string', - default: 'photo', - description: 'Filter the results by a media type. Keep empty to show all media.', - }, - { - displayName: 'Only Show Media Items From a Specific List (Category)', - name: 'list', - type: 'number', - default: 123456789, - description: 'Only show media items from a specific list (category). **Refer to our Media Vault Lists endpoints.**.', - }, - { - displayName: 'Sort the Results', - name: 'sort', - type: 'string', - default: 'desc', - description: 'Sort the results. Default `desc`.', - }, - { - displayName: 'Number of Media to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to filter and sort vault media', + placeholder: 'Add Field', + options: [ + { + displayName: 'Field', + name: 'field', + type: 'string', + default: 'recent', + description: 'Sort the results by a field. Default `recent`.', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - description: 'The offset used for pagination. Default `0`.', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'List', + name: 'list', + type: 'number', + default: '', + description: 'Only show media items from a specific list (category). Refer to Media Vault Lists endpoints.', + }, + { + displayName: 'Media Type', + name: 'type', + type: 'string', + default: '', + description: 'Filter the results by a media type. Keep empty to show all media.', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'The offset used for pagination. Default `0`.', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Optionally, search for a text query', + }, + { + displayName: 'Sort', + name: 'sort', + type: 'string', + default: 'desc', + description: 'Sort the results. Default `desc`.', + }, + ], + }, ]; export const listVaultMediaOperation = { diff --git a/nodes/OnlyFans/resources/mediaVaultLists/lists.ts b/nodes/OnlyFans/resources/mediaVaultLists/lists.ts index 3687bf5..771e6b2 100644 --- a/nodes/OnlyFans/resources/mediaVaultLists/lists.ts +++ b/nodes/OnlyFans/resources/mediaVaultLists/lists.ts @@ -1,36 +1,47 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listVaultListsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Optionally, Find a List by Its Name', - name: 'query', - type: 'string', - default: 'My list name', - }, - { - displayName: 'Number of Media to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to filter and paginate vault lists', + placeholder: 'Add Field', + options: [ + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Optionally, find a list by its name', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - description: 'The offset used for pagination. Default `0`.', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'The offset used for pagination. Default `0`.', + }, + ], + }, ]; export const listVaultListsOperation = { diff --git a/nodes/OnlyFans/resources/notifications/notifications.ts b/nodes/OnlyFans/resources/notifications/notifications.ts index e4f1e68..d6def50 100644 --- a/nodes/OnlyFans/resources/notifications/notifications.ts +++ b/nodes/OnlyFans/resources/notifications/notifications.ts @@ -1,43 +1,54 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listNotificationsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Filter Notifications by a Specific Type', - name: 'type', - type: 'string', - default: 'mentions', - }, - { - displayName: 'The Number of Notifications', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing notifications', + placeholder: 'Add Field', + options: [ + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'mentions', + description: 'Filter notifications by a specific type', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'Used for Pagination', - name: 'from_id', - type: 'number', - default: 123, - description: 'Used for pagination. This value should be the ID of the previous response\'s last notification.', - }, - { - displayName: 'Whether to Skip User Details', - name: 'skip_users', - type: 'string', - default: 'all', - description: 'Whether to skip user details. Default `all`.', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'From ID', + name: 'from_id', + type: 'number', + default: 0, + description: 'Used for pagination; set to the last notification ID from the previous response', + }, + { + displayName: 'Skip Users', + name: 'skip_users', + type: 'string', + default: 'all', + description: 'Whether to skip user details. Default all.', + }, + ], + }, ]; export const listNotificationsOperation = { diff --git a/nodes/OnlyFans/resources/payouts/earningStatistics.ts b/nodes/OnlyFans/resources/payouts/earningStatistics.ts index ec57881..284d101 100644 --- a/nodes/OnlyFans/resources/payouts/earningStatistics.ts +++ b/nodes/OnlyFans/resources/payouts/earningStatistics.ts @@ -1,27 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getEarningStatisticsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for Earning Statistics', - name: 'startDate', - type: 'string', - default: '2025-01-01 00:00:00, -30days', - description: 'The start date for earning statistics. Keep empty to get all earnings.', - }, - { - displayName: 'The End Date for Earning Statistics', - name: 'endDate', - type: 'string', - default: '2025-01-01 00:00:00, +30days', - description: 'The end date for earning statistics. Keep empty to get all earnings.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving earning statistics', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'startDate', + type: 'string', + default: '', + description: 'The start date for earning statistics. Keep empty to get all earnings.', + }, + { + displayName: 'End Date', + name: 'endDate', + type: 'string', + default: '', + description: 'The end date for earning statistics. Keep empty to get all earnings.', + }, + ], + }, ]; export const getEarningStatisticsOperation = { diff --git a/nodes/OnlyFans/resources/payouts/payoutRequests.ts b/nodes/OnlyFans/resources/payouts/payoutRequests.ts index 371aac6..3b8bcea 100644 --- a/nodes/OnlyFans/resources/payouts/payoutRequests.ts +++ b/nodes/OnlyFans/resources/payouts/payoutRequests.ts @@ -1,25 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listPayoutRequestsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Payout Requests to Return', - name: 'limit', - type: 'string', - default: '10', - }, - { - displayName: 'Number of Payout Requests to Skip for Pagination', - name: 'offset', - type: 'string', - default: '', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing payout requests', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '10', + description: 'Number of payout requests to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of payout requests to skip for pagination', + }, + ], + }, ]; export const listPayoutRequestsOperation = { diff --git a/nodes/OnlyFans/resources/payouts/transactions.ts b/nodes/OnlyFans/resources/payouts/transactions.ts index 2ac99a1..f6af597 100644 --- a/nodes/OnlyFans/resources/payouts/transactions.ts +++ b/nodes/OnlyFans/resources/payouts/transactions.ts @@ -1,26 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listTransactionsEarningsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Transactions to Return', - name: 'limit', - type: 'string', - default: '10', - }, - { - displayName: 'The Marker Used for Pagination', - name: 'marker', - type: 'string', - default: '1739155047', - description: 'The marker used for pagination. Default: `null`.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing payout transactions', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '10', + description: 'Number of transactions to return', + }, + { + displayName: 'Marker', + name: 'marker', + type: 'string', + default: '', + description: 'Marker used for pagination. Default null.', + }, + ], + }, ]; export const listTransactionsEarningsOperation = { diff --git a/nodes/OnlyFans/resources/postComments/comments.ts b/nodes/OnlyFans/resources/postComments/comments.ts index 1a35e23..78f9b3a 100644 --- a/nodes/OnlyFans/resources/postComments/comments.ts +++ b/nodes/OnlyFans/resources/postComments/comments.ts @@ -1,43 +1,55 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listPostCommentsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Post ID', - name: 'post_id', - type: 'string', - default: '', - required: true, - description: 'The post ID', - }, - { - displayName: 'Number of Comments to Return (Default = 10)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Post ID', + name: 'post_id', + type: 'string', + default: '', + required: true, + description: 'The post ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing post comments', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, }, - default: 50, - }, - { - displayName: 'Number of Comments to Skip for Pagination', - name: 'offset', - type: 'number', - default: 0, - }, - { - displayName: 'Sort the Returned Comments (Default = Desc)', - name: 'sort', - type: 'string', - default: 'desc', - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Number of comments to skip for pagination', + }, + { + displayName: 'Sort', + name: 'sort', + type: 'string', + default: 'desc', + description: 'Sort the returned comments (default desc)', + }, + ], + }, ]; export const listPostCommentsOperation = { diff --git a/nodes/OnlyFans/resources/postLabels/labels.ts b/nodes/OnlyFans/resources/postLabels/labels.ts index 68109cf..09657f4 100644 --- a/nodes/OnlyFans/resources/postLabels/labels.ts +++ b/nodes/OnlyFans/resources/postLabels/labels.ts @@ -1,25 +1,37 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listLabelsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Number of Labels to Return (Default = 10)', - name: 'limit', - type: 'string', - default: '10', - }, - { - displayName: 'Number of Labels to Skip for Pagination', - name: 'offset', - type: 'string', - default: '', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing post labels', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '10', + description: 'Number of labels to return (default 10)', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'string', + default: '', + description: 'Number of labels to skip for pagination', + }, + ], + }, ]; export const listLabelsOperation = { diff --git a/nodes/OnlyFans/resources/posts/archive.ts b/nodes/OnlyFans/resources/posts/archive.ts index 67363a4..c145511 100644 --- a/nodes/OnlyFans/resources/posts/archive.ts +++ b/nodes/OnlyFans/resources/posts/archive.ts @@ -1,27 +1,38 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const archivePostResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Post ID', - name: 'post_id', - type: 'string', - default: '', - required: true, - description: 'The post ID', - }, - { - displayName: 'Set to `True` to Move This Post to the Private Archive', - name: 'private_archive', - type: 'boolean', - default: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Post ID', + name: 'post_id', + type: 'string', + default: '', + required: true, + description: 'The post ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when archiving a post', + placeholder: 'Add Field', + options: [ + { + displayName: 'Private Archive', + name: 'private_archive', + type: 'boolean', + default: true, + description: 'Whether to move this post to the private archive', + }, + ], + }, ]; export const archivePostOperation = { diff --git a/nodes/OnlyFans/resources/posts/postId.ts b/nodes/OnlyFans/resources/posts/postId.ts index 5646736..24a26a1 100644 --- a/nodes/OnlyFans/resources/posts/postId.ts +++ b/nodes/OnlyFans/resources/posts/postId.ts @@ -33,115 +33,130 @@ export const getPostOperation = { }; export const updatePostResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Post ID', - name: 'post_id', - type: 'string', - default: '', - required: true, - description: 'The post ID', - }, - { - displayName: 'The Post Text Content', - name: 'text', - type: 'string', - default: 'Hello!', - required: true, - description: 'The post text content', - }, - { - displayName: 'Array of OF Label IDs', - name: 'labelIds', - type: 'string', - default: '123', - description: 'Array of OF label IDs. Refer to our `/posts/labels` endpoint.', - }, - { - displayName: 'Price for Paid Content (0 or Between 3-100)', - name: 'price', - type: 'number', - default: 10, - description: 'Price for paid content (0 or between 3-100). In case this is not zero, **mediaFiles** is required.', - }, - { - displayName: 'Array of OFAPI `Ofapi_media_` IDs, or OF Media IDs', - name: 'mediaFiles', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - }, - { - displayName: 'Array OnlyFans Creator User IDs to Tag in Your Post', - name: 'rfTag', - type: 'string', - default: '123', - }, - { - displayName: 'Number of Days After Which the Post Will Expire', - name: 'expireDays', - type: 'number', - default: 3, - description: 'Number of days after which the post will expire. Can be 1, 3, 7 or 30 days. Keep empty for no expiration.', - }, - { - displayName: 'Schedule Your Post in the Future (UTC Timezone)', - name: 'scheduledDate', - type: 'string', - default: '2025-01-01T00:00:00.000Z', - }, - { - displayName: 'Add Your Post to the "Saved for Later" Queue', - name: 'saveForLater', - type: 'boolean', - default: true, - }, - { - displayName: 'Add a Fundraising Target to Your Post', - name: 'fundRaisingTargetAmount', - type: 'number', - default: 30, - description: 'Add a fundraising target to your post. If present, value must be at least 10.', - }, - { - displayName: 'Specify Which Tip Amounts Will Be Listed Under the Fundraising Card', - name: 'fundRaisingTipsPresets', - type: 'string', - default: '5,10,15', - description: 'Specify which tip amounts will be listed under the fundraising card. Required with `fundRaisingTargetAmount`, and you must provide at least 1 option. Array items cannot be higher than the `fundRaisingTargetAmount`.', - }, - { - displayName: 'Include a Poll or Quiz Within Your Post', - name: 'votingType', - type: 'string', - default: 'poll', - }, - { - displayName: 'The Due Date (in Days) of Your Poll/quiz', - name: 'votingDue', - type: 'number', - default: 3, - description: 'The due date (in days) of your poll/quiz. Can be 1, 3, 7 or 30 days. Can only be filled with `votingType`.', - }, - { - displayName: 'The Options of Your Poll/quiz', - name: 'votingOptions', - type: 'string', - default: 'First option,Second option', - description: 'The options of your poll/quiz. Required with `votingType`.', - }, - { - displayName: 'The Array Key of Your Quiz\' Correct Answer', - name: 'votingCorrectIndex', - type: 'number', - default: 0, - description: 'The array key of your quiz\' correct answer. Required when `votingType` is "quiz". Keep in mind that arrays start at `0`', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Post ID', + name: 'post_id', + type: 'string', + default: '', + required: true, + description: 'The post ID', + }, + { + displayName: 'The Post Text Content', + name: 'text', + type: 'string', + default: 'Hello!', + required: true, + description: 'The post text content', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when updating a post', + placeholder: 'Add Field', + options: [ + { + displayName: 'Expire Days', + name: 'expireDays', + type: 'number', + default: 0, + description: 'Number of days after which the post will expire (1, 3, 7 or 30). Empty for no expiration.', + }, + { + displayName: 'Fundraising Target Amount', + name: 'fundRaisingTargetAmount', + type: 'number', + default: 0, + description: 'Add a fundraising target to your post; must be at least 10 when present', + }, + { + displayName: 'Fundraising Tips Presets', + name: 'fundRaisingTipsPresets', + type: 'string', + default: '', + description: 'Tip amounts listed under the fundraising card; required with fundRaisingTargetAmount', + }, + { + displayName: 'Label IDs', + name: 'labelIds', + type: 'string', + default: '', + description: 'Array of OF label IDs. Refer to the /posts/labels endpoint.', + }, + { + displayName: 'Media Files', + name: 'mediaFiles', + type: 'string', + default: '', + description: 'Array of OFAPI ofapi_media_ IDs, or OF media IDs', + }, + { + displayName: 'Price', + name: 'price', + type: 'number', + default: 0, + description: 'Price for paid content (0 or between 3-100). If not zero, mediaFiles is required.', + }, + { + displayName: 'Save For Later', + name: 'saveForLater', + type: 'boolean', + default: false, + description: 'Whether to add your post to the "Saved for Later" queue', + }, + { + displayName: 'Scheduled Date', + name: 'scheduledDate', + type: 'string', + default: '', + description: 'Schedule your post in the future (UTC timezone)', + }, + { + displayName: 'Tagged User IDs', + name: 'rfTag', + type: 'string', + default: '', + description: 'Array of OnlyFans creator user IDs to tag in your post', + }, + { + displayName: 'Voting Correct Index', + name: 'votingCorrectIndex', + type: 'number', + default: 0, + description: 'Array key of your quiz\' correct answer; required when votingType is quiz (arrays start at 0)', + }, + { + displayName: 'Voting Due', + name: 'votingDue', + type: 'number', + default: 0, + description: 'Due date (in days) of your poll/quiz (1, 3, 7 or 30). Only with votingType.', + }, + { + displayName: 'Voting Options', + name: 'votingOptions', + type: 'string', + default: '', + description: 'Options of your poll/quiz. Required with votingType.', + }, + { + displayName: 'Voting Type', + name: 'votingType', + type: 'string', + default: '', + description: 'Include a poll or quiz within your post', + }, + ], + }, ]; export const updatePostOperation = { diff --git a/nodes/OnlyFans/resources/posts/posts.ts b/nodes/OnlyFans/resources/posts/posts.ts index 204ce50..4d6a784 100644 --- a/nodes/OnlyFans/resources/posts/posts.ts +++ b/nodes/OnlyFans/resources/posts/posts.ts @@ -1,65 +1,82 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listPostsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Search Query to Filter Posts', - name: 'query', - type: 'string', - default: 'Hello', - }, - { - displayName: 'Number of Posts to Return (Default = 10)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, - }, - default: 50, - }, - { - displayName: 'Number of Posts to Skip for Pagination', - name: 'offset', - type: 'number', - default: 0, - }, - { - displayName: 'Order the Returned Posts (Default = Publish_date)', - name: 'order', - type: 'string', - default: 'publish_date', - }, - { - displayName: 'Sort the Returned Posts (Default = Desc)', - name: 'sort', - type: 'string', - default: 'desc', - }, - { - displayName: 'Set to True to only Show Pinned Posts', - name: 'pinned', - type: 'boolean', - default: true, - }, - { - displayName: 'Set to True to Include an Array of Counters (See Example Responses)', - name: 'counters', - type: 'boolean', - default: true, - }, - { - displayName: 'Filter Posts by Minimum Publish Date', - name: 'minimumPublishDate', - type: 'string', - default: '2025-06-26', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing posts', + placeholder: 'Add Field', + options: [ + { + displayName: 'Include Counters', + name: 'counters', + type: 'boolean', + default: true, + description: 'Whether to include an array of counters', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, + }, + { + displayName: 'Minimum Publish Date', + name: 'minimumPublishDate', + type: 'string', + default: '', + description: 'Filter posts by minimum publish date', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Number of posts to skip for pagination', + }, + { + displayName: 'Order', + name: 'order', + type: 'string', + default: 'publish_date', + description: 'Order the returned posts (default publish_date)', + }, + { + displayName: 'Pinned Only', + name: 'pinned', + type: 'boolean', + default: true, + description: 'Whether to only show pinned posts', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Search query to filter posts', + }, + { + displayName: 'Sort', + name: 'sort', + type: 'string', + default: 'desc', + description: 'Sort the returned posts (default desc)', + }, + ], + }, ]; export const listPostsOperation = { @@ -77,107 +94,122 @@ export const listPostsOperation = { }; export const sendPostResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Post Text Content', - name: 'text', - type: 'string', - default: 'Hello!', - required: true, - description: 'The post text content', - }, - { - displayName: 'Array of OF Label IDs', - name: 'labelIds', - type: 'string', - default: '123', - description: 'Array of OF label IDs. Refer to our `/posts/labels` endpoint.', - }, - { - displayName: 'Array of OFAPI `Ofapi_media_` IDs, or OF Media IDs', - name: 'mediaFiles', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - }, - { - displayName: 'Array of Media File Upload Prefixed_ids, or OF Media IDs (Required if Price Is Not 0)', - name: 'previews', - type: 'string', - default: 'ofapi_media_abc123,1234567890', - description: 'Array of media file upload prefixed_ids, or OF media IDs (required if price is not 0). Will be shown if `price` is provided. All `previews` values must also exist in the `mediaFiles` array.', - }, - { - displayName: 'Array OnlyFans Creator User IDs to Tag in Your Post', - name: 'rfTag', - type: 'string', - default: '123', - }, - { - displayName: 'Number of Days After Which the Post Will Expire', - name: 'expireDays', - type: 'number', - default: 3, - description: 'Number of days after which the post will expire. Can be 1, 3, 7 or 30 days. Keep empty for no expiration.', - }, - { - displayName: 'Schedule Your Post in the Future (UTC Timezone)', - name: 'scheduledDate', - type: 'string', - default: '2025-01-01T00:00:00.000Z', - }, - { - displayName: 'Add Your Post to the "Saved for Later" Queue', - name: 'saveForLater', - type: 'boolean', - default: true, - }, - { - displayName: 'Add a Fundraising Target to Your Post', - name: 'fundRaisingTargetAmount', - type: 'number', - default: 30, - description: 'Add a fundraising target to your post. If present, value must be at least 10.', - }, - { - displayName: 'Specify Which Tip Amounts Will Be Listed Under the Fundraising Card', - name: 'fundRaisingTipsPresets', - type: 'string', - default: '5,10,15', - description: 'Specify which tip amounts will be listed under the fundraising card. Required with `fundRaisingTargetAmount`, and you must provide at least 1 option. Array items cannot be higher than the `fundRaisingTargetAmount`.', - }, - { - displayName: 'Include a Poll or Quiz Within Your Post', - name: 'votingType', - type: 'string', - default: 'poll', - }, - { - displayName: 'The Due Date (in Days) of Your Poll/quiz', - name: 'votingDue', - type: 'number', - default: 3, - description: 'The due date (in days) of your poll/quiz. Can be 1, 3, 7 or 30 days. Can only be filled with `votingType`.', - }, - { - displayName: 'The Options of Your Poll/quiz', - name: 'votingOptions', - type: 'string', - default: 'First option,Second option', - description: 'The options of your poll/quiz. Required with `votingType`.', - }, - { - displayName: 'The Array Key of Your Quiz\' Correct Answer', - name: 'votingCorrectIndex', - type: 'number', - default: 0, - description: 'The array key of your quiz\' correct answer. Required when `votingType` is "quiz". Keep in mind that arrays start at `0`', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Post Text Content', + name: 'text', + type: 'string', + default: 'Hello!', + required: true, + description: 'The post text content', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when sending a post', + placeholder: 'Add Field', + options: [ + { + displayName: 'Expire Days', + name: 'expireDays', + type: 'number', + default: 0, + description: 'Number of days after which the post will expire (1, 3, 7, or 30). Empty for no expiration.', + }, + { + displayName: 'Fundraising Target Amount', + name: 'fundRaisingTargetAmount', + type: 'number', + default: 0, + description: 'Add a fundraising target to your post; must be at least 10 when present', + }, + { + displayName: 'Fundraising Tips Presets', + name: 'fundRaisingTipsPresets', + type: 'string', + default: '', + description: 'Tip amounts shown under the fundraising card; required with fundRaisingTargetAmount', + }, + { + displayName: 'Label IDs', + name: 'labelIds', + type: 'string', + default: '', + description: 'Array of OF label IDs. Refer to the /posts/labels endpoint.', + }, + { + displayName: 'Media Files', + name: 'mediaFiles', + type: 'string', + default: '', + description: 'Array of OFAPI ofapi_media_ IDs, or OF media IDs', + }, + { + displayName: 'Previews', + name: 'previews', + type: 'string', + default: '', + description: 'Array of media IDs to show as previews; must also exist in mediaFiles', + }, + { + displayName: 'Save For Later', + name: 'saveForLater', + type: 'boolean', + default: false, + description: 'Whether to add your post to the "Saved for Later" queue', + }, + { + displayName: 'Scheduled Date', + name: 'scheduledDate', + type: 'string', + default: '', + description: 'Schedule your post in the future (UTC timezone)', + }, + { + displayName: 'Tagged User IDs', + name: 'rfTag', + type: 'string', + default: '', + description: 'Array of OnlyFans creator user IDs to tag in your post', + }, + { + displayName: 'Voting Correct Index', + name: 'votingCorrectIndex', + type: 'number', + default: 0, + description: 'Array key of your quiz\' correct answer; required when votingType is quiz (arrays start at 0)', + }, + { + displayName: 'Voting Due', + name: 'votingDue', + type: 'number', + default: 0, + description: 'Due date (in days) of your poll/quiz (1, 3, 7 or 30). Only with votingType.', + }, + { + displayName: 'Voting Options', + name: 'votingOptions', + type: 'string', + default: '', + description: 'Options of your poll/quiz. Required with votingType.', + }, + { + displayName: 'Voting Type', + name: 'votingType', + type: 'string', + default: '', + description: 'Include a poll or quiz within your post', + }, + ], + }, ]; export const sendPostOperation = { diff --git a/nodes/OnlyFans/resources/posts/stats.ts b/nodes/OnlyFans/resources/posts/stats.ts index cf350f7..006a79d 100644 --- a/nodes/OnlyFans/resources/posts/stats.ts +++ b/nodes/OnlyFans/resources/posts/stats.ts @@ -1,27 +1,38 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const showPostStatisticsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Post ID', - name: 'post_id', - type: 'string', - default: '', - required: true, - description: 'The post ID', - }, - { - displayName: 'Set to `True` to Include Historical Data for a Post', - name: 'with_historical_data', - type: 'boolean', - default: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Post ID', + name: 'post_id', + type: 'string', + default: '', + required: true, + description: 'The post ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving post statistics', + placeholder: 'Add Field', + options: [ + { + displayName: 'With Historical Data', + name: 'with_historical_data', + type: 'boolean', + default: true, + description: 'Whether to include historical data for a post', + }, + ], + }, ]; export const showPostStatisticsOperation = { diff --git a/nodes/OnlyFans/resources/publicProfiles/search.ts b/nodes/OnlyFans/resources/publicProfiles/search.ts index 6de2edc..56b2b3e 100644 --- a/nodes/OnlyFans/resources/publicProfiles/search.ts +++ b/nodes/OnlyFans/resources/publicProfiles/search.ts @@ -1,92 +1,71 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const searchProfilesResource: INodeProperties[] = [ - { - displayName: 'Query for Full Text Search in Username, Display Name, Bio', - name: 'query', - type: 'string', - default: 'milf', - required: true, - }, - { - displayName: 'The Number of Profiles to Return', - name: 'limit', - type: 'string', - default: '10', - description: 'The number of profiles to return. For each returned profile we charge your account 1 credit. Default: `10`', - }, - { - displayName: 'Minimum Subscribe Price', - name: 'min_subscribe_price', - type: 'string', - default: '', - }, - { - displayName: 'Maximum Subscribe Price', - name: 'max_subscribe_price', - type: 'string', - default: '1000000', - }, - { - displayName: 'Location', - name: 'location', - type: 'string', - default: 'New York', - }, - { - displayName: 'Must Be at Least 3 Characters', - name: 'query', - type: 'string', - default: 'uqjqinuhdkglladpqjkfvriwptwvsrchqcaipeyyaafamwxidfyedfgsmkubjvgslfjh', - }, - { - displayName: 'Must Be at Least 0', - name: 'min_subscribe_price', - type: 'number', - default: 81, - description: 'Must be at least 0.00', - }, - { - displayName: 'Must Be at Least 0', - name: 'max_subscribe_price', - type: 'number', - default: 57, - description: 'Must be at least 0.00', - }, - { - displayName: 'Location', - name: 'location', - type: 'string', - default: 'eveniet', - }, - { - displayName: 'Website', - name: 'website', - type: 'string', - default: 'expedita', - }, - { - displayName: 'Instagram', - name: 'instagram', - type: 'string', - default: 'reiciendis', - }, - { - displayName: 'Tiktok', - name: 'tiktok', - type: 'string', - default: 'cum', - }, - { - displayName: 'Must Be at Least 1', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional filters when searching public profiles', + placeholder: 'Add Field', + options: [ + { + displayName: 'Instagram', + name: 'instagram', + type: 'string', + default: '', }, - default: 50, - description: 'Max number of results to return', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Location', + name: 'location', + type: 'string', + default: '', + }, + { + displayName: 'Maximum Subscribe Price', + name: 'max_subscribe_price', + type: 'number', + default: 0, + description: 'Maximum subscribe price; must be at least 0.00', + }, + { + displayName: 'Minimum Subscribe Price', + name: 'min_subscribe_price', + type: 'number', + default: 0, + description: 'Minimum subscribe price; must be at least 0.00', + }, + { + displayName: 'Query', + name: 'query', + type: 'string', + default: '', + description: 'Full text search in username, display name, and bio (min 3 characters recommended)', + }, + { + displayName: 'TikTok', + name: 'tiktok', + type: 'string', + default: '', + }, + { + displayName: 'Website', + name: 'website', + type: 'string', + default: '', + }, + ], + }, ]; export const searchProfilesOperation = { diff --git a/nodes/OnlyFans/resources/queue/queue.ts b/nodes/OnlyFans/resources/queue/queue.ts index 89c5896..dbf03a1 100644 --- a/nodes/OnlyFans/resources/queue/queue.ts +++ b/nodes/OnlyFans/resources/queue/queue.ts @@ -1,46 +1,54 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listQueueItemsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Earliest Publish Date to Return (Must Be at Least Today)', - name: 'publishDateStart', - type: 'string', - default: '2025-01-01', - required: true, - }, - { - displayName: 'Latest Publish Date to Return', - name: 'publishDateEnd', - type: 'string', - default: '2025-01-01', - required: true, - }, - { - displayName: 'Time Timezone of the Provided Dates', - name: 'timezone', - type: 'string', - default: 'Europe/Prague', - required: true, - description: 'Time timezone of the provided dates. [View available timezone values](https://www.php.net/manual/en/timezones.php).', - }, - { - displayName: 'Maximum Number of Queue Items to Return (Default = 20)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing queue items', + placeholder: 'Add Field', + options: [ + { + displayName: 'Publish Date Start', + name: 'publishDateStart', + type: 'string', + default: '', + description: 'Earliest publish date to return (must be at least today)', }, - default: 50, - required: true, - }, + { + displayName: 'Publish Date End', + name: 'publishDateEnd', + type: 'string', + default: '', + description: 'Latest publish date to return', + }, + { + displayName: 'Timezone', + name: 'timezone', + type: 'string', + default: '', + description: 'Timezone of the provided dates (see PHP timezone list)', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, + }, + ], + }, ]; export const listQueueItemsOperation = { diff --git a/nodes/OnlyFans/resources/savedForLaterMessages/messages.ts b/nodes/OnlyFans/resources/savedForLaterMessages/messages.ts index 5976c1a..0dc705e 100644 --- a/nodes/OnlyFans/resources/savedForLaterMessages/messages.ts +++ b/nodes/OnlyFans/resources/savedForLaterMessages/messages.ts @@ -1,31 +1,40 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listSavedForLaterMessagesResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Maximum Number of Messages to Return (Default = 10)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing saved-for-later messages', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, }, - default: 50, - required: true, - }, - { - displayName: 'Offset for Pagination (Default = 0)', - name: 'offset', - type: 'number', - default: 0, - required: true, - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset for pagination (default 0)', + }, + ], + }, ]; export const listSavedForLaterMessagesOperation = { diff --git a/nodes/OnlyFans/resources/savedForLaterPosts/posts.ts b/nodes/OnlyFans/resources/savedForLaterPosts/posts.ts index 7959b34..0e81be2 100644 --- a/nodes/OnlyFans/resources/savedForLaterPosts/posts.ts +++ b/nodes/OnlyFans/resources/savedForLaterPosts/posts.ts @@ -1,31 +1,40 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listSavedForLaterPostsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'Maximum Number of Posts to Return (Default = 10)', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing saved-for-later posts', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, }, - default: 50, - required: true, - }, - { - displayName: 'Offset for Pagination (Default = 0)', - name: 'offset', - type: 'number', - default: 0, - required: true, - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset for pagination (default 0)', + }, + ], + }, ]; export const listSavedForLaterPostsOperation = { diff --git a/nodes/OnlyFans/resources/settings/profile.ts b/nodes/OnlyFans/resources/settings/profile.ts index 1c61857..23795aa 100644 --- a/nodes/OnlyFans/resources/settings/profile.ts +++ b/nodes/OnlyFans/resources/settings/profile.ts @@ -1,69 +1,79 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const updateProfileResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The New Username to Use', - name: 'username', - type: 'string', - default: 'MyNewUsername', - description: 'The new username to use. Make sure to first check if it exists using our `/settings/username-exists` endpoint.', - }, - { - displayName: 'The New Display Name to Use', - name: 'name', - type: 'string', - default: 'u1234', - description: 'The new display name to use. Set to `null` to use the default display name.', - }, - { - displayName: 'The New Avatar to Use', - name: 'avatar', - type: 'string', - default: 'ofapi_media_abc123', - description: 'The new avatar to use. Must be a `ofapi_media_` ID. Refer to our `/media/upload` endpoint on how to get this.', - }, - { - displayName: 'The New Header (Banner) to Use', - name: 'header', - type: 'string', - default: 'ofapi_media_abc123', - description: 'The new header (banner) to use. Must be a `ofapi_media_` ID. Refer to our `/media/upload` endpoint on how to get this.', - }, - { - displayName: 'The New Bio to Use', - name: 'about', - type: 'string', - default: 'Hey there!', - description: 'The new bio to use. Set to `null` to empty it.', - }, - { - displayName: 'The New Location to Use', - name: 'location', - type: 'string', - default: 'Europe', - description: 'The new location to use. Set to `null` to empty it.', - }, - { - displayName: 'The New Website URL to Use', - name: 'website', - type: 'string', - default: 'https://example.com', - description: 'The new website URL to use. Must be a valid URL. Set to `null` to empty it.', - }, - { - displayName: 'The New Amazon Wishlist URL to Use', - name: 'wishlist', - type: 'string', - default: 'https://example.com', - description: 'The new Amazon Wishlist URL to use. Must be a valid URL. Set to `null` to empty it.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional fields to update on the OnlyFans profile', + placeholder: 'Add Field', + options: [ + { + displayName: 'Amazon Wishlist URL', + name: 'wishlist', + type: 'string', + default: '', + description: 'New Amazon Wishlist URL to use. Must be a valid URL. Set to null to empty it.', + }, + { + displayName: 'Avatar', + name: 'avatar', + type: 'string', + default: '', + description: 'New avatar to use (ofapi_media_ ID from /media/upload)', + }, + { + displayName: 'Bio', + name: 'about', + type: 'string', + default: '', + description: 'New bio to use. Set to null to empty it.', + }, + { + displayName: 'Display Name', + name: 'name', + type: 'string', + default: '', + description: 'New display name to use. Set to null to use the default display name.', + }, + { + displayName: 'Header', + name: 'header', + type: 'string', + default: '', + description: 'New header/banner to use (ofapi_media_ ID from /media/upload)', + }, + { + displayName: 'Location', + name: 'location', + type: 'string', + default: '', + description: 'New location to use. Set to null to empty it.', + }, + { + displayName: 'Username', + name: 'username', + type: 'string', + default: '', + description: 'New username to use. First check if it exists using /settings/username-exists.', + }, + { + displayName: 'Website URL', + name: 'website', + type: 'string', + default: '', + description: 'New website URL to use. Must be a valid URL. Set to null to empty it.', + }, + ], + }, ]; export const updateProfileOperation = { diff --git a/nodes/OnlyFans/resources/statistics/earnings.ts b/nodes/OnlyFans/resources/statistics/earnings.ts index ecf81b1..97bfc90 100644 --- a/nodes/OnlyFans/resources/statistics/earnings.ts +++ b/nodes/OnlyFans/resources/statistics/earnings.ts @@ -1,34 +1,45 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getEarningsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Period', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - required: true, - description: 'The start date for the period', - }, - { - displayName: 'The End Date for the Period', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the period', - }, - { - displayName: 'Filter by All / Subscriptions / Tips / Posts / Messages / Streams', - name: 'type', - type: 'string', - default: 'total', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Start Date for the Period', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + required: true, + description: 'The start date for the period', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving earnings', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The end date for the period', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'total', + description: 'Filter by all / subscriptions / tips / posts / messages / streams', + }, + ], + }, ]; export const getEarningsOperation = { diff --git a/nodes/OnlyFans/resources/statistics/overview.ts b/nodes/OnlyFans/resources/statistics/overview.ts index b2b483e..7158738 100644 --- a/nodes/OnlyFans/resources/statistics/overview.ts +++ b/nodes/OnlyFans/resources/statistics/overview.ts @@ -1,34 +1,44 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const statisticsOverviewResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Statistics', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The start date for the statistics. Keep empty to retrieve from the model\'s start date.', - }, - { - displayName: 'The End Date for the Statistics', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the statistics. Keep empty to retrieve until now.', - }, - { - displayName: 'The Type of Statistics to Retrieve (Default = Empty)', - name: 'type', - type: 'string', - default: 'fans', - description: 'The type of statistics to retrieve (default = empty)', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving statistics overview', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '', + description: 'The start date for the statistics. Keep empty to retrieve from the model\'s start date.', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The end date for the statistics. Keep empty to retrieve until now.', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: '', + description: 'The type of statistics to retrieve (e.g. fans)', + }, + ], + }, ]; export const statisticsOverviewOperation = { diff --git a/nodes/OnlyFans/resources/statistics/profileVisitors.ts b/nodes/OnlyFans/resources/statistics/profileVisitors.ts index e1d212b..8c71ef5 100644 --- a/nodes/OnlyFans/resources/statistics/profileVisitors.ts +++ b/nodes/OnlyFans/resources/statistics/profileVisitors.ts @@ -1,52 +1,63 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getProfileVisitorsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Period', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - required: true, - description: 'The start date for the period', - }, - { - displayName: 'The End Date for the Period', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - required: true, - description: 'The end date for the period', - }, - { - displayName: 'Filter All / Users / Guests', - name: 'type', - type: 'string', - default: 'total', - }, - { - displayName: 'Optionally, Filter the Results by `Chart` or `topCountries`', - name: 'filter', - type: 'string', - default: 'chart', - description: 'Optionally, filter the results by `chart` or `topCountries`. See example responses.', - }, - { - displayName: 'Number of Results to Return', - name: 'limit', - type: 'number', - description: 'Max number of results to return', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + required: true, + description: 'The start date for the period', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '2025-03-31 23:59:59', + required: true, + description: 'The end date for the period', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to refine the visitor statistics', + placeholder: 'Add Field', + options: [ + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'total', + description: 'Filter all / users / guests', }, - default: 50, - }, + { + displayName: 'Filter', + name: 'filter', + type: 'string', + default: 'chart', + description: 'Optionally, filter the results by `chart` or `topCountries`. See example responses.', + }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + description: 'Max number of results to return', + typeOptions: { + minValue: 1, + }, + default: 50, + }, + ], + }, ]; export const getProfileVisitorsOperation = { diff --git a/nodes/OnlyFans/resources/statistics/statistics.ts b/nodes/OnlyFans/resources/statistics/statistics.ts index a41d79f..2f2deb1 100644 --- a/nodes/OnlyFans/resources/statistics/statistics.ts +++ b/nodes/OnlyFans/resources/statistics/statistics.ts @@ -1,33 +1,44 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getSubscriberStatisticsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Period', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - description: 'The start date for the period. Keep empty to calculate everything.', - }, - { - displayName: 'The End Date for the Period', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - description: 'The end date for the period. Keep empty to calculate everything.', - }, - { - displayName: 'Filter the Subscriber Statistics (Default = Total)', - name: 'type', - type: 'string', - default: 'total', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving subscriber statistics', + placeholder: 'Add Field', + options: [ + { + displayName: 'Start Date', + name: 'start_date', + type: 'string', + default: '', + description: 'The start date for the period. Keep empty to calculate everything.', + }, + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The end date for the period. Keep empty to calculate everything.', + }, + { + displayName: 'Type', + name: 'type', + type: 'string', + default: 'total', + description: 'Filter the subscriber statistics (default total)', + }, + ], + }, ]; export const getSubscriberStatisticsOperation = { diff --git a/nodes/OnlyFans/resources/statistics/subscriberMetrics.ts b/nodes/OnlyFans/resources/statistics/subscriberMetrics.ts index ddfd9dc..65c9459 100644 --- a/nodes/OnlyFans/resources/statistics/subscriberMetrics.ts +++ b/nodes/OnlyFans/resources/statistics/subscriberMetrics.ts @@ -1,36 +1,45 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const getSubscriberMetricsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Metrics', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - required: true, - description: 'The start date for the metrics', - }, - { - displayName: 'The End Date for the Metrics', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - required: true, - description: 'The end date for the metrics', - }, - { - displayName: 'Include Paid and Free Fan Metrics', - name: 'detailed', - type: 'boolean', - default: false, - description: 'Whether to include paid and free fan metrics. Will slow down the response time, and might time out if timeframe is too large. Default = `false`', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Start Date for the Metrics', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + required: true, + description: 'The start date for the metrics', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when retrieving subscriber metrics', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The end date for the metrics', + }, + { + displayName: 'Detailed', + name: 'detailed', + type: 'boolean', + default: false, + description: 'Whether to include paid and free fan metrics; may slow responses or time out for large time frames', + }, + ], + }, ]; export const getSubscriberMetricsOperation = { diff --git a/nodes/OnlyFans/resources/statistics/totalTransactions.ts b/nodes/OnlyFans/resources/statistics/totalTransactions.ts index 272eb59..48cb673 100644 --- a/nodes/OnlyFans/resources/statistics/totalTransactions.ts +++ b/nodes/OnlyFans/resources/statistics/totalTransactions.ts @@ -1,29 +1,38 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const calculateTotalTransactionsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for the Period', - name: 'start_date', - type: 'string', - default: '2025-01-01 00:00:00', - required: true, - description: 'The start date for the period. Keep empty to calculate everything.', - }, - { - displayName: 'The End Date for the Period', - name: 'end_date', - type: 'string', - default: '2025-03-31 23:59:59', - required: true, - description: 'The end date for the period. Keep empty to calculate everything.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Start Date for the Period', + name: 'start_date', + type: 'string', + default: '2025-01-01 00:00:00', + required: true, + description: 'The start date for the period. Keep empty to calculate everything.', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when calculating total transactions', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'end_date', + type: 'string', + default: '', + description: 'The end date for the period. Keep empty to calculate everything.', + }, + ], + }, ]; export const calculateTotalTransactionsOperation = { diff --git a/nodes/OnlyFans/resources/trackingLinks/spenders.ts b/nodes/OnlyFans/resources/trackingLinks/spenders.ts index edd3ef8..d6853d1 100644 --- a/nodes/OnlyFans/resources/trackingLinks/spenders.ts +++ b/nodes/OnlyFans/resources/trackingLinks/spenders.ts @@ -1,45 +1,55 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listTrackingLinkSpendersResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Tracking Link ID', - name: 'tracking_link_id', - type: 'string', - default: '', - required: true, - description: 'The tracking link ID', - }, - { - displayName: 'The Number of Spenders to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Tracking Link ID', + name: 'tracking_link_id', + type: 'string', + default: '', + required: true, + description: 'The tracking link ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing tracking link spenders', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - description: 'The offset used for pagination. Default `0`.', - }, - { - displayName: 'Minimal Spend of a Fan', - name: 'minSpend', - type: 'number', - default: 1, - description: 'Minimal spend of a fan. Default `1`. Must be at least 1.', - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset used for pagination. Default 0.', + }, + { + displayName: 'Minimum Spend', + name: 'minSpend', + type: 'number', + default: 1, + description: 'Minimal spend of a fan. Default 1. Must be at least 1.', + }, + ], + }, ]; export const listTrackingLinkSpendersOperation = { diff --git a/nodes/OnlyFans/resources/trackingLinks/subscribers.ts b/nodes/OnlyFans/resources/trackingLinks/subscribers.ts index bd128d5..80a54f1 100644 --- a/nodes/OnlyFans/resources/trackingLinks/subscribers.ts +++ b/nodes/OnlyFans/resources/trackingLinks/subscribers.ts @@ -1,40 +1,48 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listTrackingLinkSubscribersResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Tracking Link ID', - name: 'tracking_link_id', - type: 'string', - default: '', - required: true, - description: 'The tracking link ID', - }, - { - displayName: 'The Number of Subscribers to Return per Page', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The Tracking Link ID', + name: 'tracking_link_id', + type: 'string', + default: '', + required: true, + description: 'The tracking link ID', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing tracking link subscribers', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', }, - default: 50, - required: true, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - required: true, - description: 'The offset used for pagination. Default `0`.', - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset used for pagination. Default 0.', + }, + ], + }, ]; export const listTrackingLinkSubscribersOperation = { diff --git a/nodes/OnlyFans/resources/trackingLinks/trackingLinks.ts b/nodes/OnlyFans/resources/trackingLinks/trackingLinks.ts index a664ac3..f3c8a96 100644 --- a/nodes/OnlyFans/resources/trackingLinks/trackingLinks.ts +++ b/nodes/OnlyFans/resources/trackingLinks/trackingLinks.ts @@ -1,71 +1,82 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listTrackingLinksResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Start Date for Tracking Links', - name: 'startDate', - type: 'string', - default: '2025-01-01 00:00:00, -30days', - description: 'The start date for Tracking Links. Keep empty to get all.', - }, - { - displayName: 'The End Date for Tracking Links', - name: 'endDate', - type: 'string', - default: '2025-01-01 00:00:00, now', - description: 'The end date for Tracking Links. Keep empty to get all.', - }, - { - displayName: 'Whether or Not to Include Deleted Tracking Links in the Response', - name: 'with_deleted', - type: 'boolean', - default: false, - description: 'Whether or not to include deleted tracking links in the response. Default `false`.', - }, - { - displayName: 'Sort by Subscriber Count (Claims), or Creation Date', - name: 'sortby', - type: 'string', - default: 'claims', - }, - { - displayName: 'Sort the Results', - name: 'sort', - type: 'string', - default: 'desc', - description: 'Sort the results. Default `desc`.', - }, - { - displayName: 'The Number of Tracking Links to Return', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing tracking links', + placeholder: 'Add Field', + options: [ + { + displayName: 'End Date', + name: 'endDate', + type: 'string', + default: '', + description: 'The end date for tracking links. Keep empty to get all.', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'The Offset Used for Pagination', - name: 'offset', - type: 'number', - default: 0, - description: 'The offset used for pagination. Default `0`.', - }, - { - displayName: 'Wait for the Revenue Data to Finish Processing, Instead of Processing in the Background', - name: 'synchronous', - type: 'boolean', - default: false, - description: 'Whether to wait for the revenue data to finish processing, instead of processing in the background. **Will result in longer response times, use with caution**. Default `false`', - }, + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', + }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset used for pagination. Default 0.', + }, + { + displayName: 'Sort', + name: 'sort', + type: 'string', + default: 'desc', + description: 'Sort the results. Default desc.', + }, + { + displayName: 'Sort By', + name: 'sortby', + type: 'string', + default: 'claims', + description: 'Sort by subscriber count (claims) or creation date', + }, + { + displayName: 'Start Date', + name: 'startDate', + type: 'string', + default: '', + description: 'The start date for tracking links. Keep empty to get all.', + }, + { + displayName: 'Synchronous', + name: 'synchronous', + type: 'boolean', + default: false, + description: 'Whether to wait for revenue data to finish processing instead of background processing', + }, + { + displayName: 'With Deleted', + name: 'with_deleted', + type: 'boolean', + default: false, + description: 'Whether to include deleted tracking links in the response. Default false.', + }, + ], + }, ]; export const listTrackingLinksOperation = { diff --git a/nodes/OnlyFans/resources/transactions/transactions.ts b/nodes/OnlyFans/resources/transactions/transactions.ts index 4d42bec..fe260bc 100644 --- a/nodes/OnlyFans/resources/transactions/transactions.ts +++ b/nodes/OnlyFans/resources/transactions/transactions.ts @@ -1,34 +1,44 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listTransactionsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The Number of Transactions to Return', - name: 'limit', - type: 'string', - default: '10', - description: 'The number of transactions to return. Recommended: `10`.', - }, - { - displayName: 'The Start Date for Transactions List', - name: 'startDate', - type: 'string', - default: '2025-01-01 00:00:00, -30days', - description: 'The start date for transactions list. Default: `-30days`.', - }, - { - displayName: 'The Marker Used for Pagination', - name: 'marker', - type: 'string', - default: '1739155047', - description: 'The marker used for pagination. Default: `null`.', - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing transactions', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'string', + default: '10', + description: 'The number of transactions to return. Recommended 10.', + }, + { + displayName: 'Start Date', + name: 'startDate', + type: 'string', + default: '', + description: 'The start date for the transactions list. Default -30days.', + }, + { + displayName: 'Marker', + name: 'marker', + type: 'string', + default: '', + description: 'Marker used for pagination. Default null.', + }, + ], + }, ]; export const listTransactionsOperation = { diff --git a/nodes/OnlyFans/resources/userListCollections/userListId.ts b/nodes/OnlyFans/resources/userListCollections/userListId.ts index da3787a..a63e868 100644 --- a/nodes/OnlyFans/resources/userListCollections/userListId.ts +++ b/nodes/OnlyFans/resources/userListCollections/userListId.ts @@ -33,35 +33,46 @@ export const getUserListOperation = { }; export const updateUserListResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'The userListId', - name: 'userListId', - type: 'string', - default: '', - required: true, - description: 'The userListId', - }, - { - displayName: 'The New Name for the User List', - name: 'name', - type: 'string', - default: 'My Updated List Name', - required: true, - description: 'The new name for the User List', - }, - { - displayName: 'Whether to Pin the User List to Feed to the OnlyFans Homepage or Not', - name: 'isPinnedToFeed', - type: 'boolean', - default: true, - }, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'The userListId', + name: 'userListId', + type: 'string', + default: '', + required: true, + description: 'The userListId', + }, + { + displayName: 'The New Name for the User List', + name: 'name', + type: 'string', + default: 'My Updated List Name', + required: true, + description: 'The new name for the User List', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when updating a user list', + placeholder: 'Add Field', + options: [ + { + displayName: 'Pinned to Feed', + name: 'isPinnedToFeed', + type: 'boolean', + default: true, + description: 'Whether to pin the user list to feed on the OnlyFans homepage or not', + }, + ], + }, ]; export const updateUserListOperation = { diff --git a/nodes/OnlyFans/resources/userListCollections/userLists.ts b/nodes/OnlyFans/resources/userListCollections/userLists.ts index d938052..85e6656 100644 --- a/nodes/OnlyFans/resources/userListCollections/userLists.ts +++ b/nodes/OnlyFans/resources/userListCollections/userLists.ts @@ -1,29 +1,40 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const listUserListsResource: INodeProperties[] = [ - { - displayName: 'Account ID', - name: 'account', - type: 'string', - default: '', - required: true, - }, - { - displayName: 'How Many Results to Return in the Request', - name: 'limit', - type: 'number', - typeOptions: { - minValue: 1, + { + displayName: 'Account ID', + name: 'account', + type: 'string', + default: '', + required: true, + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters when listing user lists', + placeholder: 'Add Field', + options: [ + { + displayName: 'Limit', + name: 'limit', + type: 'number', + typeOptions: { + minValue: 1, + }, + default: 50, + description: 'Max number of results to return', }, - default: 50, - description: 'Max number of results to return', - }, - { - displayName: 'Must Be at Least 0', - name: 'offset', - type: 'number', - default: 0, - }, + { + displayName: 'Offset', + name: 'offset', + type: 'number', + default: 0, + description: 'Offset for pagination (must be at least 0)', + }, + ], + }, ]; export const listUserListsOperation = { diff --git a/nodes/OnlyFans/resources/webhooks/webhookId.ts b/nodes/OnlyFans/resources/webhooks/webhookId.ts index 7cb99ae..8d99080 100644 --- a/nodes/OnlyFans/resources/webhooks/webhookId.ts +++ b/nodes/OnlyFans/resources/webhooks/webhookId.ts @@ -1,14 +1,14 @@ import type { INodeProperties, IDataObject } from 'n8n-workflow'; export const showWebhookResource: INodeProperties[] = [ - { - displayName: 'The Webhook ID', - name: 'webhook_id', - type: 'string', - default: '', - required: true, - description: 'The webhook ID', - }, + { + displayName: 'The Webhook ID', + name: 'webhook_id', + type: 'string', + default: '', + required: true, + description: 'The webhook ID', + }, ]; export const showWebhookOperation = { @@ -26,37 +26,47 @@ export const showWebhookOperation = { }; export const updateWebhookResource: INodeProperties[] = [ - { - displayName: 'The Webhook ID', - name: 'webhook_id', - type: 'string', - default: '', - required: true, - description: 'The webhook ID', - }, - { - displayName: 'The URL of Your Webhook Endpoint', - name: 'endpoint_url', - type: 'string', - default: 'https://example.com', - required: true, - description: 'The URL of your webhook endpoint', - }, - { - displayName: 'An Array of Webhook Events to Subscribe To', - name: 'events', - type: 'string', - default: 'accounts.connected,subscriptions.new', - required: true, - description: 'An array of webhook events to subscribe to. For all options, refer to our **List Available Events** endpoint.', - }, - { - displayName: 'Optionally, Enabled/disable the Webhook', - name: 'enabled', - type: 'boolean', - default: true, - description: 'Whether to enable/disable the webhook. This will stop/resume the sending of events, without having to delete the webhook.', - }, + { + displayName: 'The Webhook ID', + name: 'webhook_id', + type: 'string', + default: '', + required: true, + description: 'The webhook ID', + }, + { + displayName: 'The URL of Your Webhook Endpoint', + name: 'endpoint_url', + type: 'string', + default: 'https://example.com', + required: true, + description: 'The URL of your webhook endpoint', + }, + { + displayName: 'An Array of Webhook Events to Subscribe To', + name: 'events', + type: 'string', + default: 'accounts.connected,subscriptions.new', + required: true, + description: 'An array of webhook events to subscribe to. For all options, refer to our **List Available Events** endpoint.', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to include in the request', + placeholder: 'Add Field', + options: [ + { + displayName: 'Enabled', + name: 'enabled', + type: 'boolean', + default: true, + description: 'Whether to enable or disable the webhook. This will stop/resume the sending of events, without having to delete the webhook.', + }, + ], + }, ]; export const updateWebhookOperation = { @@ -74,14 +84,14 @@ export const updateWebhookOperation = { }; export const deleteWebhookResource: INodeProperties[] = [ - { - displayName: 'The Webhook ID', - name: 'webhook_id', - type: 'string', - default: '', - required: true, - description: 'The webhook ID', - }, + { + displayName: 'The Webhook ID', + name: 'webhook_id', + type: 'string', + default: '', + required: true, + description: 'The webhook ID', + }, ]; export const deleteWebhookOperation = { diff --git a/nodes/OnlyFans/resources/webhooks/webhooks.ts b/nodes/OnlyFans/resources/webhooks/webhooks.ts index a529d17..f296509 100644 --- a/nodes/OnlyFans/resources/webhooks/webhooks.ts +++ b/nodes/OnlyFans/resources/webhooks/webhooks.ts @@ -18,29 +18,40 @@ export const listWebhooksOperation = { }; export const createWebhookResource: INodeProperties[] = [ - { - displayName: 'The URL of Your Webhook Endpoint', - name: 'endpoint_url', - type: 'string', - default: 'https://example.com', - required: true, - description: 'The URL of your webhook endpoint', - }, - { - displayName: 'Optionally, Add a Signing Secret to Protect Your Webhook', - name: 'signing_secret', - type: 'string', - typeOptions: { password: true }, - default: '7', - }, - { - displayName: 'An Array of Webhook Events to Subscribe To', - name: 'events', - type: 'string', - default: 'accounts.connected,subscriptions.new', - required: true, - description: 'An array of webhook events to subscribe to. For all options, refer to our **List Available Events** endpoint.', - }, + { + displayName: 'The URL of Your Webhook Endpoint', + name: 'endpoint_url', + type: 'string', + default: 'https://example.com', + required: true, + description: 'The URL of your webhook endpoint', + }, + { + displayName: 'An Array of Webhook Events to Subscribe To', + name: 'events', + type: 'string', + default: 'accounts.connected,subscriptions.new', + required: true, + description: 'An array of webhook events to subscribe to. For all options, refer to our **List Available Events** endpoint.', + }, + { + displayName: 'Additional Fields', + name: 'additionalFields', + type: 'collection', + default: {}, + description: 'Optional parameters to include in the request', + placeholder: 'Add Field', + options: [ + { + displayName: 'Signing Secret', + name: 'signing_secret', + type: 'string', + typeOptions: { password: true }, + default: '', + description: 'Optionally, add a signing secret to protect your webhook', + }, + ], + }, ]; export const createWebhookOperation = { diff --git a/nodes/OnlyFans/shared/utils.ts b/nodes/OnlyFans/shared/utils.ts index 7865ed8..40b262d 100644 --- a/nodes/OnlyFans/shared/utils.ts +++ b/nodes/OnlyFans/shared/utils.ts @@ -18,8 +18,22 @@ export async function executeResourceOperation( // Get parameters from the node const params: IDataObject = {}; const pathParams: string[] = []; - + for (const param of parameters) { + // Collections contain optional, nested fields that should be flattened + if (param.type === 'collection') { + const collectionValues = this.getNodeParameter(param.name, itemIndex, {}) as IDataObject; + for (const [key, value] of Object.entries(collectionValues)) { + if (value !== undefined && value !== '') { + params[key] = value; + if (endpointPath.includes(`{${key}}`)) { + pathParams.push(key); + } + } + } + continue; + } + const value = this.getNodeParameter(param.name, itemIndex); if (value !== undefined && value !== '') { params[param.name] = value;