n8n-nodes-base
Version:
Base nodes of n8n
236 lines (231 loc) • 6.19 kB
text/typescript
/**
* HubSpot Node - Version 2.1
* Discriminator: resource=contact, operation=get
*/
interface Credentials {
hubspotApi: CredentialReference;
hubspotAppToken: CredentialReference;
hubspotOAuth2Api: CredentialReference;
}
/** Get a contact */
export type HubspotV21ContactGetParams = {
resource: 'contact';
operation: 'get';
authentication?: 'apiKey' | 'appToken' | 'oAuth2' | Expression<string>;
/**
* This is not a contact's email but a number like 1485
* @hint To lookup a user by their email, use the Search operation
* @default {"mode":"list","value":""}
*/
contactId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
* Options
* @default {}
*/
additionalFields?: {
/** Specify which form submissions should be fetched
* @default all
*/
formSubmissionMode?: 'all' | 'none' | 'newest' | 'oldest' | Expression<string>;
/** Whether current list memberships should be fetched for the contact
* @default true
*/
listMemberships?: boolean | Expression<boolean>;
/** <p>Used to include specific contact properties in the results. By default, the results will only include Contact ID and will not include the values for any properties for your Contact.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default {}
*/
propertiesCollection?: {
/** Contact Properties to Include
*/
propertiesValues?: {
/** Whether to include specific Contact properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
properties?: string[];
/** Specify if the current value for a property should be fetched, or the value and all the historical values for that property
* @default valueAndHistory
*/
propertyMode?: 'valueAndHistory' | 'valueOnly' | Expression<string>;
};
};
};
};
export type HubspotV21ContactGetOutput = {
'canonical-vid'?: number;
'form-submissions'?: Array<{
'conversion-id'?: string;
'form-id'?: string;
'form-type'?: string;
'portal-id'?: number;
timestamp?: number;
title?: string;
}>;
'identity-profiles'?: Array<{
'deleted-changed-timestamp'?: number;
identities?: Array<{
'is-primary'?: boolean;
timestamp?: number;
type?: string;
value?: string;
}>;
'saved-at-timestamp'?: number;
vid?: number;
}>;
'is-contact'?: boolean;
'list-memberships'?: Array<{
'internal-list-id'?: number;
'is-member'?: boolean;
'static-list-id'?: number;
timestamp?: number;
vid?: number;
}>;
'portal-id'?: number;
properties?: {
createdate?: {
value?: string;
};
email?: {
value?: string;
};
firstname?: {
value?: string;
};
hs_all_contact_vids?: {
value?: string;
};
hs_analytics_average_page_views?: {
value?: string;
};
hs_analytics_first_timestamp?: {
value?: string;
};
hs_analytics_num_event_completions?: {
value?: string;
};
hs_analytics_num_page_views?: {
value?: string;
};
hs_analytics_num_visits?: {
value?: string;
};
hs_analytics_revenue?: {
value?: string;
};
hs_analytics_source?: {
value?: string;
};
hs_analytics_source_data_1?: {
value?: string;
};
hs_analytics_source_data_2?: {
value?: string;
};
hs_associated_target_accounts?: {
value?: string;
};
hs_currently_enrolled_in_prospecting_agent?: {
value?: string;
};
hs_email_domain?: {
value?: string;
};
hs_full_name_or_email?: {
value?: string;
};
hs_is_contact?: {
value?: string;
};
hs_is_unworked?: {
value?: string;
};
hs_latest_source?: {
value?: string;
};
hs_latest_source_data_1?: {
value?: string;
};
hs_latest_source_data_2?: {
value?: string;
};
hs_latest_source_timestamp?: {
value?: string;
};
hs_lifecyclestage_lead_date?: {
value?: string;
};
hs_membership_has_accessed_private_content?: {
value?: string;
};
hs_object_id?: {
value?: string;
};
hs_object_source?: {
value?: string;
};
hs_object_source_id?: {
value?: string;
};
hs_object_source_label?: {
value?: string;
};
hs_pipeline?: {
value?: string;
};
hs_prospecting_agent_actively_enrolled_count?: {
value?: string;
};
hs_registered_member?: {
value?: string;
};
hs_sequences_actively_enrolled_count?: {
value?: string;
};
hs_social_facebook_clicks?: {
value?: string;
};
hs_social_google_plus_clicks?: {
value?: string;
};
hs_social_linkedin_clicks?: {
value?: string;
};
hs_social_num_broadcast_clicks?: {
value?: string;
};
hs_social_twitter_clicks?: {
value?: string;
};
hs_updated_by_user_id?: {
value?: string;
};
hs_v2_date_entered_lead?: {
value?: string;
};
lastmodifieddate?: {
value?: string;
};
lastname?: {
value?: string;
};
lifecyclestage?: {
value?: string;
};
num_conversion_events?: {
value?: string;
};
num_notes?: {
value?: string;
};
num_unique_conversion_events?: {
value?: string;
};
};
vid?: number;
};
export type HubspotV21ContactGetNode = {
type: 'n8n-nodes-base.hubspot';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<HubspotV21ContactGetParams>;
output?: Items<HubspotV21ContactGetOutput>;
};