/**
 * Notion Node - Version 2.1
 * Discriminator: resource=database, operation=get
 */


interface Credentials {
  notionApi: CredentialReference;
}

/** Get a database */
export type NotionV21DatabaseGetParams = {
  resource: 'database';
  operation: 'get';
/**
 * The Notion Database to get
 * @default {"mode":"list","value":""}
 */
    databaseId?: { __rl: true; mode: 'list' | 'url' | 'id'; value: string; cachedResultName?: string };
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simple?: boolean | Expression<boolean>;
};

export type NotionV21DatabaseGetOutput = {
  archived?: boolean;
  created_by?: {
    id?: string;
    object?: string;
  };
  created_time?: string;
  description?: Array<{
    annotations?: {
      bold?: boolean;
      code?: boolean;
      color?: string;
      italic?: boolean;
      strikethrough?: boolean;
      underline?: boolean;
    };
    href?: null;
    plain_text?: string;
    text?: {
      content?: string;
      link?: null;
    };
    type?: string;
  }>;
  id?: string;
  in_trash?: boolean;
  is_inline?: boolean;
  last_edited_by?: {
    id?: string;
    object?: string;
  };
  last_edited_time?: string;
  name?: string;
  object?: string;
  parent?: {
    page_id?: string;
    type?: string;
    workspace?: boolean;
  };
  properties?: {
    ''?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    answer?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    Author?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    'Dateien und Medien'?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    department?: {
      description?: null;
      id?: string;
      multi_select?: {
        options?: Array<{
          color?: string;
          description?: null;
          id?: string;
          name?: string;
        }>;
      };
      name?: string;
      type?: string;
    };
    Name?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    'Produkt-ID'?: {
      description?: null;
      id?: string;
      name?: string;
      number?: {
        format?: string;
      };
      type?: string;
    };
    question?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    Tag?: {
      description?: null;
      id?: string;
      multi_select?: {
        options?: Array<{
          color?: string;
          description?: null;
          id?: string;
          name?: string;
        }>;
      };
      name?: string;
      type?: string;
    };
    tags?: {
      description?: null;
      id?: string;
      multi_select?: {
        options?: Array<{
          color?: string;
          description?: null;
          id?: string;
          name?: string;
        }>;
      };
      name?: string;
      type?: string;
    };
    updated_at?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
    'Zuletzt aktualisiert'?: {
      description?: null;
      id?: string;
      name?: string;
      type?: string;
    };
  };
  public_url?: null;
  request_id?: string;
  title?: Array<{
    annotations?: {
      bold?: boolean;
      code?: boolean;
      color?: string;
      italic?: boolean;
      strikethrough?: boolean;
      underline?: boolean;
    };
    href?: null;
    plain_text?: string;
    text?: {
      content?: string;
      link?: null;
    };
    type?: string;
  }>;
  url?: string;
};

export type NotionV21DatabaseGetNode = {
  type: 'n8n-nodes-base.notion';
  version: 2.1;
  credentials?: Credentials;
  config: NodeConfig<NotionV21DatabaseGetParams>;
  output?: Items<NotionV21DatabaseGetOutput>;
};