/**
 * X (Formerly Twitter) Node - Version 1
 * Discriminator: resource=tweet, operation=search
 */


interface Credentials {
  twitterOAuth1Api: CredentialReference;
}

/** Search tweets */
export type TwitterV1TweetSearchParams = {
  resource: 'tweet';
  operation: 'search';
/**
 * A UTF-8, URL-encoded search query of 500 characters maximum, including operators. Queries may additionally be limited by complexity. Check the searching examples &lt;a href="https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators"&gt;here&lt;/a&gt;.
 */
    searchText?: string | Expression<string> | PlaceholderValue;
/**
 * 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 50
 */
    limit?: number | Expression<number>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Whether the entities node will be included
     * @default false
     */
    includeEntities?: boolean | Expression<boolean>;
    /** Restricts tweets to the given language, given by an ISO 639-1 code. Language detection is best-effort. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     */
    lang?: string | Expression<string>;
    /** Subscriber location information.n
     * @default {}
     */
    locationFieldsUi?: {
        /** Location
     */
    locationFieldsValues?: {
      /** The location latitude
       */
      latitude?: string | Expression<string> | PlaceholderValue;
      /** The location longitude
       */
      longitude?: string | Expression<string> | PlaceholderValue;
      /** Returns tweets by users located within a given radius of the given latitude/longitude
       */
      radius?: 'mi' | 'km' | Expression<string>;
      /** Distance
       */
      distance?: number | Expression<number>;
    };
  };
    /** Specifies what type of search results you would prefer to receive
     * @default mixed
     */
    resultType?: 'mixed' | 'recent' | 'popular' | Expression<string>;
    /** When the extended mode is selected, the response contains the entire untruncated text of the Tweet
     * @default compat
     */
    tweetMode?: 'compat' | 'extended' | Expression<string>;
    /** Returns tweets created before the given date
     */
    until?: string | Expression<string>;
  };
};

export type TwitterV1TweetSearchNode = {
  type: 'n8n-nodes-base.twitter';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<TwitterV1TweetSearchParams>;
};