/**
 * HubSpot Node - Version 2.1
 * Discriminator: resource=company, operation=getAll
 */


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

/** Get many contacts */
export type HubspotV21CompanyGetAllParams = {
  resource: 'company';
  operation: 'getAll';
  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>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Whether to return any merge history if a company has been previously merged with another company record. Defaults to false.
     * @default false
     */
    includeMergeAudits?: boolean | Expression<boolean>;
    /** Whether to include specific Company 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;.
     * @default {}
     */
    propertiesCollection?: {
        /** Companies Properties to Include
     */
    propertiesValues?: {
      /** Whether to include specific Company 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 []
       */
      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 HubspotV21CompanyGetAllOutput = {
  companyId?: number;
  isDeleted?: boolean;
  portalId?: number;
  properties?: {
    name?: {
      source?: string;
      timestamp?: number;
      value?: string;
      versions?: Array<{
        name?: string;
        requestId?: string;
        source?: string;
        sourceId?: string;
        timestamp?: number;
        updatedByUserId?: number;
        useTimestampAsPersistenceTimestamp?: boolean;
        value?: string;
      }>;
    };
  };
  stateChanges?: Array<{
    changeFlag?: string;
    timestamp?: number;
  }>;
};

export type HubspotV21CompanyGetAllNode = {
  type: 'n8n-nodes-base.hubspot';
  version: 2.1;
  credentials?: Credentials;
  config: NodeConfig<HubspotV21CompanyGetAllParams>;
  output?: Items<HubspotV21CompanyGetAllOutput>;
};