/**
 * Wordpress Node - Version 1
 * Discriminator: resource=page, operation=getAll
 */


interface Credentials {
  wordpressApi: CredentialReference;
}

/** Get many posts */
export type WordpressV1PageGetAllParams = {
  resource: 'page';
  operation: 'getAll';
/**
 * Whether to return all results or only up to a given limit
 * @default false
 */
    returnAll?: boolean | Expression<boolean>;
/**
 * Max number of results to return
 * @displayOptions.show { returnAll: [false] }
 * @default 5
 */
    limit?: number | Expression<number>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Limit response to pages published after a given ISO8601 compliant date
     */
    after?: string | Expression<string>;
    /** Limit result set to pages assigned to specific authors. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
     * @default []
     */
    author?: string[];
    /** Limit response to pages published before a given ISO8601 compliant date
     */
    before?: string | Expression<string>;
    /** Scope under which the request is made; determines fields present in response
     * @default view
     */
    context?: 'view' | 'embed' | 'edit' | Expression<string>;
    /** Limit result set to items with a specific menu order value
     * @default 0
     */
    menuOrder?: number | Expression<number>;
    /** Order sort attribute ascending or descending
     * @default desc
     */
    order?: 'asc' | 'desc' | Expression<string>;
    /** Sort collection by object attribute
     * @default id
     */
    orderBy?: 'author' | 'date' | 'id' | 'include' | 'include_slugs' | 'modified' | 'parent' | 'relevance' | 'slug' | 'title' | Expression<string>;
    /** Current page of the collection
     * @default 1
     */
    page?: number | Expression<number>;
    /** Limit result set to items with a particular parent page ID
     */
    parent?: number | Expression<number>;
    /** Limit results to those matching a string
     */
    search?: string | Expression<string> | PlaceholderValue;
    /** The status of the page
     * @default publish
     */
    status?: 'draft' | 'future' | 'pending' | 'private' | 'publish' | Expression<string>;
  };
};

export type WordpressV1PageGetAllOutput = {
  _links?: {
    about?: Array<{
      href?: string;
    }>;
    author?: Array<{
      embeddable?: boolean;
      href?: string;
    }>;
    collection?: Array<{
      href?: string;
    }>;
    curies?: Array<{
      href?: string;
      name?: string;
      templated?: boolean;
    }>;
    'predecessor-version'?: Array<{
      href?: string;
      id?: number;
    }>;
    replies?: Array<{
      embeddable?: boolean;
      href?: string;
    }>;
    self?: Array<{
      href?: string;
      targetHints?: {
        allow?: Array<string>;
      };
    }>;
    'version-history'?: Array<{
      count?: number;
      href?: string;
    }>;
    'wp:attachment'?: Array<{
      href?: string;
    }>;
  };
  author?: number;
  comment_status?: string;
  content?: {
    protected?: boolean;
    rendered?: string;
  };
  date?: string;
  date_gmt?: string;
  excerpt?: {
    protected?: boolean;
    rendered?: string;
  };
  featured_media?: number;
  guid?: {
    rendered?: string;
  };
  id?: number;
  link?: string;
  menu_order?: number;
  meta?: {
    footnotes?: string;
  };
  modified?: string;
  modified_gmt?: string;
  parent?: number;
  ping_status?: string;
  slug?: string;
  status?: string;
  template?: string;
  title?: {
    rendered?: string;
  };
  type?: string;
};

export type WordpressV1PageGetAllNode = {
  type: 'n8n-nodes-base.wordpress';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<WordpressV1PageGetAllParams>;
  output?: Items<WordpressV1PageGetAllOutput>;
};