/**
 * Perplexity Node - Version 2
 * Discriminator: resource=search, operation=search
 */


interface Credentials {
  perplexityApi: CredentialReference;
}

/** Get raw, ranked web search results */
export type PerplexityV2SearchSearchParams = {
  resource: 'search';
  operation: 'search';
/**
 * The search query string
 */
    query?: string | Expression<string> | PlaceholderValue;
/**
 * Whether to return only the ID and results array
 * @default false
 */
    simplify?: boolean | Expression<boolean>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** 2-character ISO 3166-1 alpha-2 country code to localize search results
     */
    country?: string | Expression<string> | PlaceholderValue;
    /** Filter results last updated after this date (MM/DD/YYYY)
     */
    lastUpdatedAfter?: string | Expression<string> | PlaceholderValue;
    /** Filter results last updated before this date (MM/DD/YYYY)
     */
    lastUpdatedBefore?: string | Expression<string> | PlaceholderValue;
    /** Maximum number of search results to return (1-20)
     * @default 10
     */
    maxResults?: number | Expression<number>;
    /** Maximum number of tokens in the response
     * @default 10000
     */
    maxTokens?: number | Expression<number>;
    /** Maximum number of tokens per page of results
     * @default 4096
     */
    maxTokensPerPage?: number | Expression<number>;
    /** Filter results published after this date (MM/DD/YYYY)
     */
    searchAfterDate?: string | Expression<string> | PlaceholderValue;
    /** Filter results published before this date (MM/DD/YYYY)
     */
    searchBeforeDate?: string | Expression<string> | PlaceholderValue;
    /** Comma-separated list of domains to limit search results to (max 20)
     */
    searchDomainFilter?: string | Expression<string> | PlaceholderValue;
    /** Comma-separated list of ISO 639-1 language codes to filter results by (max 20)
     */
    searchLanguageFilter?: string | Expression<string> | PlaceholderValue;
    /** Filter search results by publication recency
     * @default month
     */
    searchRecencyFilter?: 'day' | 'hour' | 'month' | 'week' | 'year' | Expression<string>;
  };
  requestOptions?: {
    /** Batching
     * @default {"batch":{}}
     */
    batching?: {
        /** Batching
     */
    batch?: {
      /** Input will be split in batches to throttle requests. -1 for disabled. 0 will be treated as 1.
       * @default 50
       */
      batchSize?: number | Expression<number>;
      /** Time (in milliseconds) between each batch of requests. 0 for disabled.
       * @default 1000
       */
      batchInterval?: number | Expression<number>;
    };
  };
    /** Whether to accept the response even if SSL certificate validation is not possible
     * @default false
     */
    allowUnauthorizedCerts?: boolean;
    /** HTTP proxy to use. If authentication is required it can be defined as follow: http://username:password@myproxy:3128
     */
    proxy?: string | Expression<string> | PlaceholderValue;
    /** Time in ms to wait for the server to send response headers (and start the response body) before aborting the request
     * @default 10000
     */
    timeout?: number | Expression<number>;
  };
};

export type PerplexityV2SearchSearchNode = {
  type: 'n8n-nodes-base.perplexity';
  version: 2;
  credentials?: Credentials;
  config: NodeConfig<PerplexityV2SearchSearchParams>;
};