/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import { codeReferencesListRepositories } from "../funcs/codeReferencesListRepositories.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import * as operations from "../models/operations/index.js";
import { unwrapAsync } from "../types/fp.js";

export class CodeReferences extends ClientSDK {
  /**
   * List repositories
   *
   * @remarks
   * Get a list of connected repositories. Optionally, you can include branch metadata with the `withBranches` query parameter. Embed references for the default branch with `ReferencesForDefaultBranch`. You can also filter the list of code references by project key and flag key.
   */
  async listRepositories(
    request: operations.GetRepositoriesRequest,
    options?: RequestOptions,
  ): Promise<components.RepositoryCollectionRep> {
    return unwrapAsync(codeReferencesListRepositories(
      this,
      request,
      options,
    ));
  }
}
