/**
 * Trello Node - Version 1
 * Discriminator: resource=card, operation=update
 */


interface Credentials {
  trelloApi: CredentialReference;
}

/** Update a board */
export type TrelloV1CardUpdateParams = {
  resource: 'card';
  operation: 'update';
/**
 * The ID of the card
 * @default {"mode":"list","value":""}
 */
    id?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
 * Update Fields
 * @default {}
 */
    updateFields?: {
    /** The ID of the image attachment the card should use as its cover, or null for none
     */
    idAttachmentCover?: string | Expression<string> | PlaceholderValue;
    /** The ID of the board the card should be on
     */
    idBoard?: string | Expression<string> | PlaceholderValue;
    /** Whether the board is closed
     * @default false
     */
    closed?: boolean | Expression<boolean>;
    /** New description of the board
     */
    desc?: string | Expression<string> | PlaceholderValue;
    /** A due date for the card
     */
    due?: string | Expression<string>;
    /** Whether the card is completed
     * @default false
     */
    dueComplete?: boolean | Expression<boolean>;
    /** Comma-separated list of label IDs to set on card
     */
    idLabels?: string | Expression<string> | PlaceholderValue;
    /** The ID of the list the card should be in
     */
    idList?: string | Expression<string> | PlaceholderValue;
    /** Comma-separated list of member IDs to set on card
     */
    idMembers?: string | Expression<string> | PlaceholderValue;
    /** New name of the board
     */
    name?: string | Expression<string> | PlaceholderValue;
    /** The position of the card. top, bottom, or a positive float.
     * @default bottom
     */
    pos?: string | Expression<string> | PlaceholderValue;
    /** Whether the acting user is subscribed to the board
     * @default false
     */
    subscribed?: boolean | Expression<boolean>;
  };
};

export type TrelloV1CardUpdateOutput = {
  badges?: {
    attachments?: number;
    attachmentsByType?: {
      trello?: {
        board?: number;
        card?: number;
      };
    };
    checkItems?: number;
    checkItemsChecked?: number;
    checkItemsEarliestDue?: null;
    comments?: number;
    description?: boolean;
    dueComplete?: boolean;
    fogbugz?: string;
    lastUpdatedByAi?: boolean;
    location?: boolean;
    subscribed?: boolean;
    viewingMemberVoted?: boolean;
    votes?: number;
  };
  cardRole?: null;
  checkItemStates?: Array<{
    idCheckItem?: string;
    state?: string;
  }>;
  closed?: boolean;
  cover?: {
    brightness?: string;
    idPlugin?: null;
    idUploadedBackground?: null;
    size?: string;
  };
  dateLastActivity?: string;
  desc?: string;
  dueComplete?: boolean;
  email?: null;
  id?: string;
  idBoard?: string;
  idChecklists?: Array<string>;
  idLabels?: Array<string>;
  idList?: string;
  idMembers?: Array<string>;
  idShort?: number;
  isTemplate?: boolean;
  labels?: Array<{
    color?: string;
    id?: string;
    idBoard?: string;
    idOrganization?: string;
    name?: string;
    nodeId?: string;
    uses?: number;
  }>;
  manualCoverAttachment?: boolean;
  name?: string;
  pinned?: boolean;
  shortLink?: string;
  shortUrl?: string;
  subscribed?: boolean;
  url?: string;
};

export type TrelloV1CardUpdateNode = {
  type: 'n8n-nodes-base.trello';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<TrelloV1CardUpdateParams>;
  output?: Items<TrelloV1CardUpdateOutput>;
};