/**
 * GitLab Node - Version 1
 * Discriminator: resource=issue, operation=get
 */


interface Credentials {
  gitlabApi: CredentialReference;
  gitlabOAuth2Api: CredentialReference;
}

/** Get the data of a single issue */
export type GitlabV1IssueGetParams = {
  resource: 'issue';
  operation: 'get';
  authentication?: 'accessToken' | 'oAuth2' | Expression<string>;
/**
 * User, group or namespace of the project
 */
    owner?: string | Expression<string> | PlaceholderValue;
/**
 * The name of the project
 * @displayOptions.hide { resource: ["user"], operation: ["getRepositories"] }
 */
    repository?: string | Expression<string> | PlaceholderValue;
/**
 * The number of the issue get data of
 * @default 0
 */
    issueNumber?: number | Expression<number>;
};

export type GitlabV1IssueGetOutput = {
  _links?: {
    award_emoji?: string;
    closed_as_duplicate_of?: null;
    notes?: string;
    project?: string;
    self?: string;
  };
  assignee?: {
    avatar_url?: string;
    id?: number;
    locked?: boolean;
    name?: string;
    state?: string;
    username?: string;
    web_url?: string;
  };
  assignees?: Array<{
    avatar_url?: string;
    id?: number;
    locked?: boolean;
    name?: string;
    state?: string;
    username?: string;
    web_url?: string;
  }>;
  author?: {
    id?: number;
    locked?: boolean;
    name?: string;
    state?: string;
    username?: string;
    web_url?: string;
  };
  blocking_issues_count?: number;
  confidential?: boolean;
  created_at?: string;
  downvotes?: number;
  epic?: {
    group_id?: number;
    id?: number;
    iid?: number;
    title?: string;
    url?: string;
  };
  has_tasks?: boolean;
  id?: number;
  iid?: number;
  imported?: boolean;
  imported_from?: string;
  issue_type?: string;
  iteration?: {
    created_at?: string;
    description?: string;
    due_date?: string;
    group_id?: number;
    id?: number;
    iid?: number;
    sequence?: number;
    start_date?: string;
    state?: number;
    title?: string;
    updated_at?: string;
    web_url?: string;
  };
  labels?: Array<string>;
  merge_requests_count?: number;
  moved_to_id?: null;
  project_id?: number;
  references?: {
    full?: string;
    relative?: string;
    short?: string;
  };
  service_desk_reply_to?: null;
  severity?: string;
  state?: string;
  subscribed?: boolean;
  task_completion_status?: {
    completed_count?: number;
    count?: number;
  };
  task_status?: string;
  time_stats?: {
    time_estimate?: number;
    total_time_spent?: number;
  };
  title?: string;
  type?: string;
  updated_at?: string;
  upvotes?: number;
  user_notes_count?: number;
  web_url?: string;
};

export type GitlabV1IssueGetNode = {
  type: 'n8n-nodes-base.gitlab';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GitlabV1IssueGetParams>;
  output?: Items<GitlabV1IssueGetOutput>;
};