/**
 * Spotify Node - Version 1
 * Discriminator: resource=artist, operation=getTopTracks
 */


interface Credentials {
  spotifyOAuth2Api: CredentialReference;
}

/** Get an artist's top tracks by URI or ID */
export type SpotifyV1ArtistGetTopTracksParams = {
  resource: 'artist';
  operation: 'getTopTracks';
/**
 * The artist's Spotify URI or ID
 * @displayOptions.hide { operation: ["search"] }
 */
    id?: string | Expression<string> | PlaceholderValue;
/**
 * Top tracks in which country? Enter the postal abbreviation
 * @default US
 */
    country?: string | Expression<string> | PlaceholderValue;
};

export type SpotifyV1ArtistGetTopTracksOutput = {
  album?: {
    album_type?: string;
    artists?: Array<{
      external_urls?: {
        spotify?: string;
      };
      href?: string;
      id?: string;
      name?: string;
      type?: string;
      uri?: string;
    }>;
    available_markets?: Array<string>;
    external_urls?: {
      spotify?: string;
    };
    href?: string;
    id?: string;
    images?: Array<{
      height?: number;
      url?: string;
      width?: number;
    }>;
    is_playable?: boolean;
    name?: string;
    release_date?: string;
    release_date_precision?: string;
    total_tracks?: number;
    type?: string;
    uri?: string;
  };
  artists?: Array<{
    external_urls?: {
      spotify?: string;
    };
    href?: string;
    id?: string;
    name?: string;
    type?: string;
    uri?: string;
  }>;
  available_markets?: Array<string>;
  disc_number?: number;
  duration_ms?: number;
  explicit?: boolean;
  external_ids?: {
    isrc?: string;
  };
  external_urls?: {
    spotify?: string;
  };
  href?: string;
  id?: string;
  is_local?: boolean;
  is_playable?: boolean;
  name?: string;
  popularity?: number;
  track_number?: number;
  type?: string;
  uri?: string;
};

export type SpotifyV1ArtistGetTopTracksNode = {
  type: 'n8n-nodes-base.spotify';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<SpotifyV1ArtistGetTopTracksParams>;
  output?: Items<SpotifyV1ArtistGetTopTracksOutput>;
};