UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

110 lines (105 loc) 3.93 kB
/** * HubSpot Node - Version 2.1 * Discriminator: resource=contact, operation=search */ interface Credentials { hubspotApi: CredentialReference; hubspotAppToken: CredentialReference; hubspotOAuth2Api: CredentialReference; } /** Search contacts */ export type HubspotV21ContactSearchParams = { resource: 'contact'; operation: 'search'; authentication?: 'apiKey' | 'appToken' | 'oAuth2' | Expression<string>; /** * Whether to return all results or only up to a given limit * @default false */ returnAll?: boolean | Expression<boolean>; /** * Max number of results to return * @displayOptions.show { returnAll: [false] } * @default 100 */ limit?: number | Expression<number>; /** * When multiple filters are provided within a Filter Group, they will be combined using a logical AND operator. When multiple Filter Groups are provided, they will be combined using a logical OR operator. The system supports a maximum of three Filter Groups with up to three filters each. More info &lt;a href="https://developers.hubspot.com/docs/api/crm/search"&gt;here&lt;/a&gt; * @default {} */ filterGroupsUi?: { /** Filter Group */ filterGroupsValues?: Array<{ /** Use filters to limit the results to only CRM objects with matching property values. More info &lt;a href="https://developers.hubspot.com/docs/api/crm/search"&gt;here&lt;/a&gt;. * @default {} */ filtersUi?: { /** Filter */ filterValues?: Array<{ /** Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt; */ propertyName?: string | Expression<string>; /** Type * @default ={{$parameter["&propertyName"].split("|")[1]}} */ type?: unknown; /** Operator * @displayOptions.hide { type: ["number"] } * @default EQ */ operator?: 'CONTAINS_TOKEN' | 'EQ' | 'HAS_PROPERTY' | 'NOT_HAS_PROPERTY' | 'NEQ' | Expression<string>; /** Operator * @displayOptions.show { type: ["number"] } * @default EQ */ operator?: 'CONTAINS_TOKEN' | 'EQ' | 'GT' | 'GTE' | 'HAS_PROPERTY' | 'NOT_HAS_PROPERTY' | 'LT' | 'LTE' | 'NEQ' | Expression<string>; /** Value * @displayOptions.hide { operator: ["HAS_PROPERTY", "NOT_HAS_PROPERTY"] } */ value?: string | Expression<string> | PlaceholderValue; }>; }; }>; }; /** * Options * @default {} */ additionalFields?: { /** Defines the direction in which search results are ordered. Default value is Descending. * @default DESCENDING */ direction?: 'ASCENDING' | 'DESCENDING' | Expression<string>; /** Whether to include specific Contact properties in the returned results. Choose from a list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;. * @default ["firstname","lastname","email"] */ properties?: string[]; /** Perform a text search against all property values for an object type */ query?: string | Expression<string> | PlaceholderValue; /** Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt; * @default createdate */ sortBy?: string | Expression<string>; }; }; export type HubspotV21ContactSearchOutput = { archived?: boolean; createdAt?: string; id?: string; properties?: { createdate?: string; hs_object_id?: string; lastmodifieddate?: string; }; updatedAt?: string; }; export type HubspotV21ContactSearchNode = { type: 'n8n-nodes-base.hubspot'; version: 2.1; credentials?: Credentials; config: NodeConfig<HubspotV21ContactSearchParams>; output?: Items<HubspotV21ContactSearchOutput>; };