/**
 * GitLab Node - Version 1
 * Discriminator: resource=file, operation=list
 */


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

/** List contents of a folder */
export type GitlabV1FileListParams = {
  resource: 'file';
  operation: 'list';
  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;
/**
 * 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 20
 */
    limit?: number | Expression<number>;
/**
 * The file path of the file. Has to contain the full path or leave it empty for root folder.
 */
    filePath?: string | Expression<string> | PlaceholderValue;
/**
 * Page of results to display
 * @displayOptions.show { returnAll: [false] }
 * @default 1
 */
    page?: number | Expression<number>;
/**
 * Additional fields to add
 * @default {}
 */
    additionalParameters?: {
    /** The name of the commit/branch/tag. Default: the repository’s default branch (usually main).
     */
    ref?: string | Expression<string> | PlaceholderValue;
    /** Whether or not to get a recursive file tree. Default is false.
     * @default false
     */
    recursive?: boolean | Expression<boolean>;
  };
};

export type GitlabV1FileListOutput = {
  id?: string;
  mode?: string;
  name?: string;
  path?: string;
  type?: string;
};

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