/**
 * Grafana Node - Version 1
 * Discriminator: resource=dashboard, operation=get
 */


interface Credentials {
  grafanaApi: CredentialReference;
}

/** Get a dashboard */
export type GrafanaV1DashboardGetParams = {
  resource: 'dashboard';
  operation: 'get';
/**
 * Unique alphabetic identifier or URL of the dashboard to retrieve
 */
    dashboardUidOrUrl?: string | Expression<string> | PlaceholderValue;
};

export type GrafanaV1DashboardGetOutput = {
  dashboard?: {
    annotations?: {
      list?: Array<{
        builtIn?: number;
        datasource?: {
          type?: string;
          uid?: string;
        };
        enable?: boolean;
        hide?: boolean;
        iconColor?: string;
        name?: string;
        target?: {
          limit?: number;
          matchAny?: boolean;
          type?: string;
        };
        type?: string;
      }>;
    };
    editable?: boolean;
    fiscalYearStartMonth?: number;
    graphTooltip?: number;
    id?: number;
    links?: Array<{
      asDropdown?: boolean;
      icon?: string;
      includeVars?: boolean;
      keepTime?: boolean;
      targetBlank?: boolean;
      title?: string;
      tooltip?: string;
      type?: string;
      url?: string;
    }>;
    panels?: Array<{
      datasource?: {
        type?: string;
        uid?: string;
      };
      description?: string;
      fieldConfig?: {
        defaults?: {
          color?: {
            fixedColor?: string;
            mode?: string;
          };
          custom?: {
            axisBorderShow?: boolean;
            axisCenteredZero?: boolean;
            axisColorMode?: string;
            axisGridShow?: boolean;
            axisLabel?: string;
            axisPlacement?: string;
            barAlignment?: number;
            barWidthFactor?: number;
            drawStyle?: string;
            fillOpacity?: number;
            gradientMode?: string;
            hideFrom?: {
              legend?: boolean;
              tooltip?: boolean;
              viz?: boolean;
            };
            insertNulls?: boolean;
            lineInterpolation?: string;
            lineStyle?: {
              fill?: string;
            };
            lineWidth?: number;
            pointSize?: number;
            scaleDistribution?: {
              type?: string;
            };
            showPoints?: string;
            spanNulls?: boolean;
            stacking?: {
              group?: string;
              mode?: string;
            };
            thresholdsStyle?: {
              mode?: string;
            };
          };
          min?: number;
          thresholds?: {
            mode?: string;
            steps?: Array<{
              color?: string;
            }>;
          };
          unit?: string;
        };
        overrides?: Array<{
          matcher?: {
            id?: string;
            options?: string;
          };
          properties?: Array<{
            id?: string;
          }>;
        }>;
      };
      gridPos?: {
        h?: number;
        w?: number;
        x?: number;
        y?: number;
      };
      id?: number;
      interval?: string;
      options?: {
        legend?: {
          calcs?: Array<string>;
          displayMode?: string;
          placement?: string;
          showLegend?: boolean;
        };
        tooltip?: {
          mode?: string;
          sort?: string;
        };
      };
      pluginVersion?: string;
      targets?: Array<{
        datasource?: {
          type?: string;
          uid?: string;
        };
        disableTextWrap?: boolean;
        editorMode?: string;
        expr?: string;
        format?: string;
        fullMetaSearch?: boolean;
        hide?: boolean;
        includeNullMetadata?: boolean;
        instant?: boolean;
        interval?: string;
        intervalFactor?: number;
        legendFormat?: string;
        refId?: string;
        useBackend?: boolean;
      }>;
      title?: string;
      transparent?: boolean;
      type?: string;
    }>;
    preload?: boolean;
    schemaVersion?: number;
    tags?: Array<string>;
    templating?: {
      list?: Array<{
        current?: {
          selected?: boolean;
        };
        datasource?: {
          type?: string;
          uid?: string;
        };
        definition?: string;
        hide?: number;
        includeAll?: boolean;
        label?: string;
        multi?: boolean;
        name?: string;
        options?: Array<{
          selected?: boolean;
          text?: string;
          value?: string;
        }>;
        query?: {
          query?: string;
        };
        refresh?: number;
        regex?: string;
        skipUrlSync?: boolean;
        sort?: number;
        type?: string;
      }>;
    };
    time?: {
      from?: string;
      to?: string;
    };
    timezone?: string;
    title?: string;
    uid?: string;
    version?: number;
    weekStart?: string;
  };
  meta?: {
    annotationsPermissions?: {
      dashboard?: {
        canAdd?: boolean;
        canDelete?: boolean;
        canEdit?: boolean;
      };
      organization?: {
        canAdd?: boolean;
        canDelete?: boolean;
        canEdit?: boolean;
      };
    };
    canAdmin?: boolean;
    canDelete?: boolean;
    canEdit?: boolean;
    canSave?: boolean;
    canStar?: boolean;
    created?: string;
    createdBy?: string;
    expires?: string;
    folderId?: number;
    folderTitle?: string;
    folderUid?: string;
    folderUrl?: string;
    hasAcl?: boolean;
    isFolder?: boolean;
    provisioned?: boolean;
    provisionedExternalId?: string;
    slug?: string;
    type?: string;
    updated?: string;
    updatedBy?: string;
    url?: string;
    version?: number;
  };
};

export type GrafanaV1DashboardGetNode = {
  type: 'n8n-nodes-base.grafana';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GrafanaV1DashboardGetParams>;
  output?: Items<GrafanaV1DashboardGetOutput>;
};