/**
 * Keap Node - Version 1
 * Discriminator: resource=contact, operation=getAll
 */


interface Credentials {
  keapOAuth2Api: CredentialReference;
}

/** Retrieve many companies */
export type KeapV1ContactGetAllParams = {
  resource: 'contact';
  operation: 'getAll';
/**
 * 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?: {
    /** Email
     */
    email?: string | Expression<string> | PlaceholderValue;
    /** Given Name
     */
    givenName?: string | Expression<string> | PlaceholderValue;
    /** Family Name
     */
    familyName?: string | Expression<string> | PlaceholderValue;
    /** Attribute to order items by
     */
    order?: 'date' | 'email' | 'id' | 'name' | Expression<string>;
    /** Order Direction
     */
    orderDirection?: 'ascending' | 'descending' | Expression<string>;
    /** Date to start searching from on LastUpdated
     */
    since?: string | Expression<string>;
    /** Date to search to on LastUpdated
     */
    until?: string | Expression<string>;
  };
};

export type KeapV1ContactGetAllOutput = {
  addresses?: Array<{
    field?: string;
    line1?: string;
    locality?: string;
    postal_code?: string;
  }>;
  date_created?: string;
  email_addresses?: Array<{
    email?: string;
    field?: string;
  }>;
  email_opted_in?: boolean;
  family_name?: string;
  given_name?: string;
  id?: number;
  last_updated?: string;
  last_updated_utc_millis?: number;
  phone_numbers?: Array<{
    field?: string;
    number?: string;
    number_e164?: null;
  }>;
  ScoreValue?: null;
};

export type KeapV1ContactGetAllNode = {
  type: 'n8n-nodes-base.keap';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<KeapV1ContactGetAllParams>;
  output?: Items<KeapV1ContactGetAllOutput>;
};