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


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

/** Edit an issue */
export type GitlabV1IssueEditParams = {
  resource: 'issue';
  operation: 'edit';
  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 edit
 * @default 0
 */
    issueNumber?: number | Expression<number>;
/**
 * Edit Fields
 * @default {}
 */
    editFields?: {
    /** The title of the issue
     */
    title?: string | Expression<string> | PlaceholderValue;
    /** The body of the issue
     */
    description?: string | Expression<string> | PlaceholderValue;
    /** The state to set
     * @default open
     */
    state?: 'closed' | 'open' | Expression<string>;
    /** Labels
     * @default {"label":""}
     */
    labels?: {
    /** Label to add to issue
     */
    label?: string | Expression<string> | PlaceholderValue;
  };
    /** Assignees
     * @default {"assignee":""}
     */
    assignee_ids?: {
    /** User to assign issue too
     */
    assignee?: string | Expression<string> | PlaceholderValue;
  };
    /** Due Date for issue
     */
    due_date?: string | Expression<string>;
  };
};

export type GitlabV1IssueEditOutput = {
  _links?: {
    award_emoji?: string;
    closed_as_duplicate_of?: null;
    notes?: string;
    project?: string;
    self?: string;
  };
  assignees?: Array<{
    avatar_url?: string;
    id?: number;
    locked?: boolean;
    name?: string;
    state?: string;
    username?: string;
    web_url?: string;
  }>;
  author?: {
    avatar_url?: string;
    id?: number;
    locked?: boolean;
    name?: string;
    state?: string;
    username?: string;
    web_url?: string;
  };
  blocking_issues_count?: number;
  confidential?: boolean;
  created_at?: string;
  description?: string;
  downvotes?: number;
  epic?: null;
  epic_iid?: null;
  has_tasks?: boolean;
  id?: number;
  iid?: number;
  issue_type?: string;
  iteration?: null;
  labels?: Array<string>;
  merge_requests_count?: number;
  milestone?: null;
  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?: {
    human_time_estimate?: null;
    human_total_time_spent?: null;
    time_estimate?: number;
    total_time_spent?: number;
  };
  title?: string;
  type?: string;
  updated_at?: string;
  upvotes?: number;
  user_notes_count?: number;
  web_url?: string;
  weight?: null;
};

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