/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { reposCreate } from "../funcs/reposCreate.js"; import { reposDelete } from "../funcs/reposDelete.js"; import { reposGet } from "../funcs/reposGet.js"; import { reposList } from "../funcs/reposList.js"; import { reposUpdate } from "../funcs/reposUpdate.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 Repos extends ClientSDK { /** * List the caller's org's repositories * * @remarks * Returns every repository in the caller's org (org owner/admin only). * Pure DB read. */ async list( request: operations.ListReposRequest, options?: RequestOptions, ): Promise { return unwrapAsync(reposList( this, request, options, )); } /** * Create a repository * * @remarks * Provisions a repository (org owner/admin only): DB insert * (authoritative) → Gitea create (rolled back on failure). The repository * belongs to the caller's org. */ async create( request: operations.CreateRepoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(reposCreate( this, request, options, )); } /** * Delete a repository * * @remarks * Removes a repository; org owner/admin only. The DB delete is * authoritative; the Gitea teardown is best-effort cleanup. */ async delete( request: operations.DeleteRepoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(reposDelete( this, request, options, )); } /** * Get a repository * * @remarks * Reads a single repository after the org+role access check (org * owner/admin of the repository's org only). */ async get( request: operations.GetRepoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(reposGet( this, request, options, )); } /** * Update a repository's labels * * @remarks * Applies a label-only update (name/description); org owner/admin only. * The repository id is stable, so a rename is a one-row DB update — no * Gitea write. Omitted fields are left unchanged. */ async update( request: operations.PatchRepoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(reposUpdate( this, request, options, )); } }