/**
 * HubSpot Node - Version 1
 * Discriminator: resource=contact, operation=search
 */


interface Credentials {
  hubspotApi: CredentialReference;
  hubspotAppToken: CredentialReference;
  hubspotOAuth2Api: CredentialReference;
}

/** Search contacts */
export type HubspotV1ContactSearchParams = {
  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 filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups 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>;
      /** Operator
       * @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;
    }>;
  };
    }>;
  };
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Defines the direction in which search results are ordered. Default value is DESC.
     * @default DESCENDING
     */
    direction?: 'ASCENDING' | 'DESCENDING' | Expression<string>;
    /** &lt;p&gt;Used to include specific company properties in the results. By default, the results will only include company ID and will not include the values for any properties for your company.&lt;/p&gt;&lt;p&gt;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: &lt;code&gt;,&lt;/code&gt;.&lt;/p&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 HubspotV1ContactSearchNode = {
  type: 'n8n-nodes-base.hubspot';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<HubspotV1ContactSearchParams>;
};