/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AcceptInvitationParams } from '../models/AcceptInvitationParams';
import type { AddDeployKeyParams } from '../models/AddDeployKeyParams';
import type { AddRepoMemberParams } from '../models/AddRepoMemberParams';
import type { ApiResponse_Branch } from '../models/ApiResponse_Branch';
import type { ApiResponse_BranchMergeCheck } from '../models/ApiResponse_BranchMergeCheck';
import type { ApiResponse_BranchProtectionRule } from '../models/ApiResponse_BranchProtectionRule';
import type { ApiResponse_ListBranchesResponse } from '../models/ApiResponse_ListBranchesResponse';
import type { ApiResponse_ListTagsResponse } from '../models/ApiResponse_ListTagsResponse';
import type { ApiResponse_Option_BranchProtectionRule } from '../models/ApiResponse_Option_BranchProtectionRule';
import type { ApiResponse_RepoCommitComment } from '../models/ApiResponse_RepoCommitComment';
import type { ApiResponse_RepoCommitStatus } from '../models/ApiResponse_RepoCommitStatus';
import type { ApiResponse_RepoDeployKey } from '../models/ApiResponse_RepoDeployKey';
import type { ApiResponse_RepoDetail } from '../models/ApiResponse_RepoDetail';
import type { ApiResponse_RepoInvitation } from '../models/ApiResponse_RepoInvitation';
import type { ApiResponse_RepoMember } from '../models/ApiResponse_RepoMember';
import type { ApiResponse_RepoRelease } from '../models/ApiResponse_RepoRelease';
import type { ApiResponse_RepoStats } from '../models/ApiResponse_RepoStats';
import type { ApiResponse_RepoWebhook } from '../models/ApiResponse_RepoWebhook';
import type { ApiResponse_String } from '../models/ApiResponse_String';
import type { ApiResponse_Tag } from '../models/ApiResponse_Tag';
import type { ApiResponse_Vec_BranchProtectionRule } from '../models/ApiResponse_Vec_BranchProtectionRule';
import type { ApiResponse_Vec_RepoCommitComment } from '../models/ApiResponse_Vec_RepoCommitComment';
import type { ApiResponse_Vec_RepoCommitStatus } from '../models/ApiResponse_Vec_RepoCommitStatus';
import type { ApiResponse_Vec_RepoDeployKey } from '../models/ApiResponse_Vec_RepoDeployKey';
import type { ApiResponse_Vec_RepoDetail } from '../models/ApiResponse_Vec_RepoDetail';
import type { ApiResponse_Vec_RepoFork } from '../models/ApiResponse_Vec_RepoFork';
import type { ApiResponse_Vec_RepoInvitation } from '../models/ApiResponse_Vec_RepoInvitation';
import type { ApiResponse_Vec_RepoMember } from '../models/ApiResponse_Vec_RepoMember';
import type { ApiResponse_Vec_RepoRelease } from '../models/ApiResponse_Vec_RepoRelease';
import type { ApiResponse_Vec_RepoStar } from '../models/ApiResponse_Vec_RepoStar';
import type { ApiResponse_Vec_RepoWatch } from '../models/ApiResponse_Vec_RepoWatch';
import type { ApiResponse_Vec_RepoWebhook } from '../models/ApiResponse_Vec_RepoWebhook';
import type { CreateBranchBody } from '../models/CreateBranchBody';
import type { CreateCommitCommentParams } from '../models/CreateCommitCommentParams';
import type { CreateCommitStatusParams } from '../models/CreateCommitStatusParams';
import type { CreateProtectionRuleParams } from '../models/CreateProtectionRuleParams';
import type { CreateReleaseParams } from '../models/CreateReleaseParams';
import type { CreateRepoInvitationParams } from '../models/CreateRepoInvitationParams';
import type { CreateRepoParams } from '../models/CreateRepoParams';
import type { CreateTagBody } from '../models/CreateTagBody';
import type { CreateWebhookParams } from '../models/CreateWebhookParams';
import type { ForkRepoParams } from '../models/ForkRepoParams';
import type { SetBranchProtectionParams } from '../models/SetBranchProtectionParams';
import type { TransferOwnerParams } from '../models/TransferOwnerParams';
import type { UpdateCommitCommentParams } from '../models/UpdateCommitCommentParams';
import type { UpdateProtectionRuleParams } from '../models/UpdateProtectionRuleParams';
import type { UpdateReleaseParams } from '../models/UpdateReleaseParams';
import type { UpdateRepoMemberRoleParams } from '../models/UpdateRepoMemberRoleParams';
import type { UpdateRepoParams } from '../models/UpdateRepoParams';
import type { UpdateTagBody } from '../models/UpdateTagBody';
import type { UpdateWebhookParams } from '../models/UpdateWebhookParams';
import type { WatchParams } from '../models/WatchParams';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ReposService {
	/**
	 * Accept a repository invitation
	 * Accepts a pending repository invitation using the token received via email.
	 * Requires authentication and a verified email address matching the invitation.
	 *
	 * Effects:
	 * - User is added as a repository member with the invited role
	 * - User is added to the workspace if not already a member
	 * - Invitation is marked as accepted
	 *
	 * Returns the accepted invitation with full metadata.
	 * @returns ApiResponse_RepoInvitation Invitation accepted successfully. User is now a member of the repository.
	 * @throws ApiError
	 */
	public static repoAcceptInvitation({
		requestBody,
	}: {
		/**
		 * Invitation acceptance parameters
		 */
		requestBody: AcceptInvitationParams,
	}): CancelablePromise<ApiResponse_RepoInvitation> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/repos/invitations/accept',
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid or expired token, or email doesn't match invitation`,
				401: `Authentication required or session expired`,
				404: `Invitation not found`,
				409: `User is already a member of this repository`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List repositories in a workspace
	 * Returns a paginated list of repositories that the current user has access to within the specified workspace.
	 * Access is determined by:
	 * - Public repositories: accessible to all authenticated users
	 * - Private repositories: accessible only to repository members and workspace owners
	 * - Internal repositories: accessible to all workspace members
	 *
	 * The results are sorted by creation date in descending order (newest first).
	 * @returns ApiResponse_Vec_RepoDetail Repositories listed successfully. Returns an array of repository objects with metadata.
	 * @throws ApiError
	 */
	public static repoList({
		workspaceName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Maximum number of repositories to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of repositories to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoDetail> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos',
			path: {
				'workspace_name': workspaceName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this workspace`,
				404: `Workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a new repository
	 * Creates a new Git repository within the specified workspace. The authenticated user becomes the repository owner.
	 *
	 * Requirements:
	 * - User must have at least Member role in the workspace
	 * - Repository name must be unique within the workspace
	 * - Name must be 1-100 characters, alphanumeric, hyphens, underscores, and dots allowed
	 *
	 * Optional parameters:
	 * - description: Repository description (max 500 characters)
	 * - visibility: "public", "private", or "internal" (defaults to workspace setting)
	 * - default_branch: Default branch name (defaults to "main")
	 *
	 * Returns the created repository with full metadata.
	 * @returns ApiResponse_RepoDetail Repository created successfully. Returns the newly created repository with full metadata.
	 * @throws ApiError
	 */
	public static repoCreate({
		workspaceName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository creation parameters
		 */
		requestBody: CreateRepoParams,
	}): CancelablePromise<ApiResponse_RepoDetail> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos',
			path: {
				'workspace_name': workspaceName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: name too long, invalid characters, or invalid visibility`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to create repositories in this workspace`,
				404: `Workspace not found`,
				409: `Repository with this name already exists in the workspace`,
				500: `Internal server error or Git initialization failed`,
			},
		});
	}
	/**
	 * Get a specific repository
	 * Returns detailed information about a specific repository identified by workspace and repository name.
	 * Access is determined by repository visibility:
	 * - Public repositories: accessible to all authenticated users
	 * - Private repositories: accessible only to repository members and workspace owners
	 * - Internal repositories: accessible to all workspace members
	 *
	 * Returns 404 if the repository doesn't exist or the user lacks access permissions.
	 * @returns ApiResponse_RepoDetail Repository retrieved successfully. Returns complete repository metadata including visibility, default branch, creation date, and statistics.
	 * @throws ApiError
	 */
	public static repoGet({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_RepoDetail> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository not found or access denied`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a repository
	 * Updates repository metadata such as name, description, visibility, and default branch.
	 * Requires Admin role or higher in the repository.
	 *
	 * Update rules:
	 * - name: Must be unique within workspace if changed (1-100 characters)
	 * - description: Max 500 characters
	 * - visibility: "public", "private", or "internal" (workspace owners can restrict public repos)
	 * - default_branch: Must be an existing branch name
	 *
	 * All fields are optional; only provided fields are updated.
	 * Returns the updated repository with full metadata.
	 * @returns ApiResponse_RepoDetail Repository updated successfully. Returns the updated repository with full metadata.
	 * @throws ApiError
	 */
	public static repoUpdate({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Repository update parameters (all fields optional)
		 */
		requestBody: UpdateRepoParams,
	}): CancelablePromise<ApiResponse_RepoDetail> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: name too long, invalid characters, default branch doesn't exist, or public repos disabled`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				409: `Repository name already exists in the workspace`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a repository
	 * Permanently deletes a repository and all associated data including:
	 * - Git repository and all commits
	 * - Branches, tags, and releases
	 * - Issues, pull requests, and comments
	 * - Webhooks, deploy keys, and protection rules
	 * - Stars, watches, and forks
	 *
	 * Requires Owner role in the repository. This action is irreversible.
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Repository deleted successfully. All repository data has been permanently removed.
	 * @throws ApiError
	 */
	public static repoDelete({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Owner role)`,
				404: `Repository or workspace not found`,
				500: `Internal server error or Git deletion failed`,
			},
		});
	}
	/**
	 * Archive a repository
	 * Marks a repository as archived, making it read-only. All write operations (push, create issues, etc.) are disabled.
	 * Requires Owner role in the repository.
	 *
	 * Effects:
	 * - Repository status changes to "archived"
	 * - All write operations are blocked
	 * - Repository remains visible based on its visibility setting
	 * - Can be unarchived later by repository owners
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Repository archived successfully. Repository is now read-only.
	 * @throws ApiError
	 */
	public static repoArchive({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/archive',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Owner role)`,
				404: `Repository or workspace not found`,
				409: `Repository is already archived`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_ListBranchesResponse Branches listed successfully
	 * @throws ApiError
	 */
	public static repoListBranches({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		workspaceName: string,
		repoName: string,
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_ListBranchesResponse> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required`,
				404: `Repository not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_Branch Branch created
	 * @throws ApiError
	 */
	public static repoCreateBranch({
		workspaceName,
		repoName,
		requestBody,
	}: {
		workspaceName: string,
		repoName: string,
		requestBody: CreateBranchBody,
	}): CancelablePromise<ApiResponse_Branch> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters`,
				401: `Authentication required`,
				404: `Repository not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_Branch Branch retrieved
	 * @throws ApiError
	 */
	public static repoGetBranch({
		workspaceName,
		repoName,
		branchName,
	}: {
		workspaceName: string,
		repoName: string,
		branchName: string,
	}): CancelablePromise<ApiResponse_Branch> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'branch_name': branchName,
			},
			errors: {
				401: `Authentication required`,
				404: `Branch not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Branch deleted
	 * @throws ApiError
	 */
	public static repoDeleteBranch({
		workspaceName,
		repoName,
		branchName,
	}: {
		workspaceName: string,
		repoName: string,
		branchName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'branch_name': branchName,
			},
			errors: {
				400: `Cannot delete default branch`,
				401: `Authentication required`,
				404: `Branch not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Default branch set
	 * @throws ApiError
	 */
	public static repoSetDefaultBranch({
		workspaceName,
		repoName,
		branchName,
	}: {
		workspaceName: string,
		repoName: string,
		branchName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}/default',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'branch_name': branchName,
			},
			errors: {
				401: `Authentication required`,
				404: `Branch not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Branch protection set
	 * @throws ApiError
	 */
	public static repoSetBranchProtection({
		workspaceName,
		repoName,
		branchName,
		requestBody,
	}: {
		workspaceName: string,
		repoName: string,
		branchName: string,
		requestBody: SetBranchProtectionParams,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}/protection',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'branch_name': branchName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required`,
				404: `Branch not found`,
			},
		});
	}
	/**
	 * Check if a branch meets merge requirements
	 * @returns ApiResponse_BranchMergeCheck Merge check completed successfully
	 * @throws ApiError
	 */
	public static checkBranchMerge({
		workspaceName,
		repoName,
		targetBranch,
		prNumber,
	}: {
		workspaceName: string,
		repoName: string,
		targetBranch: string,
		prNumber: number,
	}): CancelablePromise<ApiResponse_BranchMergeCheck> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{target_branch}/merge-check',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'target_branch': targetBranch,
			},
			query: {
				'pr_number': prNumber,
			},
			errors: {
				401: `Unauthorized`,
				403: `Forbidden`,
				404: `Repository or pull request not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a commit comment
	 * Creates a new comment on a specific commit. Comments can be general or inline (attached to a specific file and line).
	 * Requires Write role or higher in the repository.
	 *
	 * Parameters:
	 * - commit_sha: Commit SHA to comment on (must exist in repository)
	 * - body: Comment body in markdown format (1-10000 characters)
	 * - path: File path for inline comments (optional)
	 * - line: Line number for inline comments (optional, requires path)
	 *
	 * Effects:
	 * - Comment is attached to the commit
	 * - Comment author receives notifications for replies
	 * - Inline comments appear in code review interfaces
	 *
	 * Returns the created comment with metadata including ID and timestamps.
	 * @returns ApiResponse_RepoCommitComment Commit comment created successfully. Returns the newly created comment with metadata.
	 * @throws ApiError
	 */
	public static repoCreateCommitComment({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Commit comment creation parameters
		 */
		requestBody: CreateCommitCommentParams,
	}): CancelablePromise<ApiResponse_RepoCommitComment> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/comments',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: body too long, line without path, or commit doesn't exist`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, commit, or file path not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Resolve a commit comment
	 * Marks a commit comment as resolved, indicating the issue has been addressed.
	 * Requires Write role or higher in the repository.
	 *
	 * Effects:
	 * - Comment is marked as resolved
	 * - Resolved comments are visually distinguished in code review interfaces
	 * - Resolution is recorded with the resolver's user ID and timestamp
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Commit comment resolved successfully.
	 * @throws ApiError
	 */
	public static repoResolveCommitComment({
		workspaceName,
		repoName,
		commentId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Comment ID (UUID)
		 */
		commentId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/comments/{comment_id}/resolve',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'comment_id': commentId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or comment not found`,
				409: `Comment is already resolved`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoCommitComment Commit comment updated successfully
	 * @throws ApiError
	 */
	public static repoUpdateCommitComment({
		workspaceName,
		repoName,
		commentId,
		requestBody,
	}: {
		workspaceName: string,
		repoName: string,
		commentId: string,
		/**
		 * Commit comment update parameters
		 */
		requestBody: UpdateCommitCommentParams,
	}): CancelablePromise<ApiResponse_RepoCommitComment> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commit-comments/{comment_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'comment_id': commentId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters`,
				401: `Authentication required`,
				404: `Commit comment not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List commit comments
	 * Returns a paginated list of all comments on a specific commit, sorted by creation date (newest first).
	 * Includes comment metadata such as:
	 * - Comment body in markdown format
	 * - Author information
	 * - File path and line number (for inline comments)
	 * - Resolved status
	 * - Creation and update timestamps
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoCommitComment Commit comments listed successfully. Returns an array of comment objects with metadata.
	 * @throws ApiError
	 */
	public static repoListCommitComments({
		workspaceName,
		repoName,
		pushCommitId,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Push commit ID (UUID)
		 */
		pushCommitId: string,
		/**
		 * Maximum number of comments to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of comments to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoCommitComment> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{commit_sha}/comments',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'push_commit_id': pushCommitId,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository, workspace, or commit not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List commit statuses
	 * Returns a paginated list of all status checks for a specific commit, sorted by creation date (newest first).
	 * Includes status metadata such as:
	 * - Status state (pending, success, failure, error)
	 * - Context name (e.g., "ci/build", "ci/test")
	 * - Description and target URL
	 * - Creator information
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoCommitStatus Commit statuses listed successfully. Returns an array of status objects with metadata.
	 * @throws ApiError
	 */
	public static repoListCommitStatuses({
		workspaceName,
		repoName,
		pushCommitId,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Push commit ID (UUID)
		 */
		pushCommitId: string,
		/**
		 * Maximum number of statuses to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of statuses to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoCommitStatus> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{commit_sha}/statuses',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'push_commit_id': pushCommitId,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository, workspace, or commit not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoCommitStatus Commit status retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetCommitStatus({
		workspaceName,
		repoName,
		pushCommitId,
		statusId,
	}: {
		workspaceName: string,
		repoName: string,
		pushCommitId: string,
		statusId: string,
	}): CancelablePromise<ApiResponse_RepoCommitStatus> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{push_commit_id}/statuses/{status_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'push_commit_id': pushCommitId,
				'status_id': statusId,
			},
			errors: {
				401: `Authentication required`,
				404: `Commit status not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List deploy keys in a repository
	 * Returns a paginated list of all deploy keys in the repository, sorted by creation date (newest first).
	 * Includes deploy key metadata such as:
	 * - Key title and fingerprint
	 * - Read-only status
	 * - Creator information
	 * - Creation date and last used date
	 *
	 * Requires Admin role or higher in the repository.
	 * @returns ApiResponse_Vec_RepoDeployKey Deploy keys listed successfully. Returns an array of deploy key objects with metadata.
	 * @throws ApiError
	 */
	public static repoListDeployKeys({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of deploy keys to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of deploy keys to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoDeployKey> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Add a deploy key to a repository
	 * Adds an SSH public key for automated deployments and CI/CD access to the repository.
	 * Requires Admin role or higher in the repository.
	 *
	 * Parameters:
	 * - title: Human-readable name for the deploy key (1-100 characters)
	 * - key: SSH public key in OpenSSH format (e.g., "ssh-rsa AAAA...")
	 * - read_only: Whether the key has read-only access (default: true)
	 *
	 * Effects:
	 * - Deploy key is added to the repository
	 * - Key can be used for Git operations (clone, fetch, push if not read-only)
	 * - Key fingerprint is calculated and stored
	 *
	 * Returns the created deploy key with metadata including fingerprint.
	 * @returns ApiResponse_RepoDeployKey Deploy key added successfully. Returns the newly created deploy key with metadata.
	 * @throws ApiError
	 */
	public static repoAddDeployKey({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Deploy key addition parameters
		 */
		requestBody: AddDeployKeyParams,
	}): CancelablePromise<ApiResponse_RepoDeployKey> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: title too long or invalid SSH key format`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				409: `Deploy key with this fingerprint already exists`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoDeployKey Deploy key retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetDeployKey({
		workspaceName,
		repoName,
		keyId,
	}: {
		workspaceName: string,
		repoName: string,
		keyId: string,
	}): CancelablePromise<ApiResponse_RepoDeployKey> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys/{key_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'key_id': keyId,
			},
			errors: {
				401: `Authentication required`,
				404: `Deploy key not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a deploy key from a repository
	 * Removes an SSH deploy key from the repository, revoking its access.
	 * Requires Admin role or higher in the repository.
	 *
	 * Effects:
	 * - Deploy key is permanently removed from the repository
	 * - Key can no longer be used for Git operations
	 * - Automated systems using this key will lose access
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Deploy key deleted successfully.
	 * @throws ApiError
	 */
	public static repoDeleteDeployKey({
		workspaceName,
		repoName,
		keyId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Deploy key ID (UUID)
		 */
		keyId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys/{key_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'key_id': keyId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or deploy key not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Fork a repository
	 * Creates a copy of the repository in the specified workspace or the current user's workspace.
	 * Requires read access to the source repository and write access to the target workspace.
	 *
	 * Effects:
	 * - Creates a new repository with all branches, tags, and commit history
	 * - Establishes a parent-child relationship between source and fork
	 * - Fork is initially set to private visibility
	 * - Current user becomes the owner of the fork
	 *
	 * Returns the created fork repository with full metadata.
	 * @returns ApiResponse_RepoDetail Repository forked successfully. Returns the newly created fork with full metadata.
	 * @throws ApiError
	 */
	public static repoFork({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Fork parameters (all fields optional)
		 */
		requestBody: ForkRepoParams,
	}): CancelablePromise<ApiResponse_RepoDetail> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/fork',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: target name conflicts or invalid characters`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to fork or create in target workspace`,
				404: `Source repository or target workspace not found`,
				409: `Fork with this name already exists in target workspace`,
				500: `Internal server error or Git operation failed`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Fork deleted successfully
	 * @throws ApiError
	 */
	public static repoDeleteFork({
		workspaceName,
		repoName,
	}: {
		workspaceName: string,
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/fork',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required`,
				404: `Fork not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List forks of a repository
	 * Returns a paginated list of all repositories that have been forked from this repository.
	 * Includes fork metadata such as:
	 * - Fork repository information
	 * - Fork owner and workspace
	 * - Fork creation date
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoFork Forks listed successfully. Returns an array of fork objects with metadata.
	 * @throws ApiError
	 */
	public static repoListForks({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of forks to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of forks to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoFork> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/forks',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List repository invitations
	 * Returns a paginated list of all pending invitations for the repository, sorted by creation date (newest first).
	 * Includes invitation metadata such as:
	 * - Invitee email address
	 * - Invited role
	 * - Inviter information
	 * - Expiration date
	 * - Creation date
	 *
	 * Requires Admin role or higher in the repository.
	 * @returns ApiResponse_Vec_RepoInvitation Invitations listed successfully. Returns an array of invitation objects with metadata.
	 * @throws ApiError
	 */
	public static repoListInvitations({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of invitations to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of invitations to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoInvitation> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a repository invitation
	 * Sends an invitation email to a user to join the repository with a specific role.
	 * Requires Admin role or higher in the repository.
	 *
	 * Parameters:
	 * - email: Email address of the invitee (must be a valid email)
	 * - role: Role to assign when invitation is accepted ("read", "write", "admin")
	 *
	 * Effects:
	 * - Invitation email is sent to the invitee
	 * - Invitation expires after 7 days
	 * - Invitee must have a verified email to accept
	 *
	 * Returns the created invitation with metadata including expiration date.
	 * @returns ApiResponse_RepoInvitation Invitation created successfully. Returns the newly created invitation with metadata.
	 * @throws ApiError
	 */
	public static repoCreateInvitation({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Invitation creation parameters
		 */
		requestBody: CreateRepoInvitationParams,
	}): CancelablePromise<ApiResponse_RepoInvitation> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid email format or invalid role`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				409: `User is already a member or has a pending invitation`,
				500: `Internal server error or email sending failed`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoInvitation Invitation retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetInvitation({
		workspaceName,
		repoName,
		invitationId,
	}: {
		workspaceName: string,
		repoName: string,
		invitationId: string,
	}): CancelablePromise<ApiResponse_RepoInvitation> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations/{invitation_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'invitation_id': invitationId,
			},
			errors: {
				401: `Authentication required`,
				404: `Invitation not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Revoke a repository invitation
	 * Cancels a pending invitation, preventing the invitee from accepting it.
	 * Requires Admin role or higher in the repository.
	 *
	 * Effects:
	 * - Invitation is marked as revoked
	 * - Invitee can no longer accept the invitation
	 * - Invitation email link becomes invalid
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Invitation revoked successfully.
	 * @throws ApiError
	 */
	public static repoRevokeInvitation({
		workspaceName,
		repoName,
		invitationId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Invitation ID (UUID)
		 */
		invitationId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations/{invitation_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'invitation_id': invitationId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or invitation not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Leave a repository
	 * Removes the current user's access to the repository.
	 * Requires the user to be a member of the repository.
	 *
	 * Restrictions:
	 * - Repository owner cannot leave (use transfer_owner instead)
	 *
	 * Effects:
	 * - User loses all access to the repository
	 * - User is removed from all repository activities
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Left repository successfully.
	 * @throws ApiError
	 */
	public static repoLeave({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/leave',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				400: `Repository owner cannot leave the repository`,
				401: `Authentication required or session expired`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List repository members
	 * Returns a paginated list of all members with access to the repository, sorted by join date (oldest first).
	 * Includes member metadata such as:
	 * - User information (ID, username, display name)
	 * - Role (owner, admin, write, read)
	 * - Join date and last activity
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoMember Members listed successfully. Returns an array of member objects with user information and roles.
	 * @throws ApiError
	 */
	public static repoListMembers({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of members to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of members to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoMember> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Add a member to a repository
	 * Grants a user access to the repository with a specific role.
	 * Requires Admin role or higher in the repository.
	 *
	 * Requirements:
	 * - User must exist in the system
	 * - User must be a member of the workspace
	 * - Role must be one of: "read", "write", "admin" (cannot assign "owner")
	 *
	 * Returns the created member record with user information and role.
	 * @returns ApiResponse_RepoMember Member added successfully. Returns the newly created member record with user information and role.
	 * @throws ApiError
	 */
	public static repoAddMember({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Member addition parameters
		 */
		requestBody: AddRepoMemberParams,
	}): CancelablePromise<ApiResponse_RepoMember> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid role or user doesn't exist`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or user not found`,
				409: `User is already a member of this repository`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoMember Member retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetMember({
		workspaceName,
		repoName,
		memberId,
	}: {
		workspaceName: string,
		repoName: string,
		memberId: string,
	}): CancelablePromise<ApiResponse_RepoMember> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members/{member_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'member_id': memberId,
			},
			errors: {
				401: `Authentication required`,
				404: `Member not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Remove a member from a repository
	 * Revokes a user's access to the repository.
	 * Requires Admin role or higher in the repository.
	 *
	 * Restrictions:
	 * - Cannot remove the repository owner (use transfer_owner instead)
	 * - Cannot remove members with equal or higher role than your own
	 *
	 * Effects:
	 * - Member loses all access to the repository
	 * - Member is removed from all repository activities
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Member removed successfully.
	 * @throws ApiError
	 */
	public static repoRemoveMember({
		workspaceName,
		repoName,
		memberId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Member ID (UUID)
		 */
		memberId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members/{member_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'member_id': memberId,
			},
			errors: {
				400: `Cannot remove the repository owner or member with higher role`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or member not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a member's role in a repository
	 * Changes the access level of an existing repository member.
	 * Requires Admin role or higher in the repository.
	 *
	 * Role restrictions:
	 * - Cannot change the owner's role (use transfer_owner instead)
	 * - Cannot assign "owner" role (use transfer_owner instead)
	 * - Can only assign roles equal to or lower than your own
	 * - Valid roles: "read", "write", "admin"
	 *
	 * Returns the updated member record with new role information.
	 * @returns ApiResponse_RepoMember Member role updated successfully. Returns the updated member record with new role.
	 * @throws ApiError
	 */
	public static repoUpdateMemberRole({
		workspaceName,
		repoName,
		memberId,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Member ID (UUID)
		 */
		memberId: string,
		/**
		 * Role update parameters
		 */
		requestBody: UpdateRepoMemberRoleParams,
	}): CancelablePromise<ApiResponse_RepoMember> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members/{member_id}/role',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'member_id': memberId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid role or attempting to change owner role`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or member not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List branch protection rules in a repository
	 * Returns a paginated list of all branch protection rules in the repository, sorted by pattern alphabetically.
	 * Includes protection rule metadata such as:
	 * - Branch name pattern (supports wildcards like "feature*")
	 * - Required approvals count
	 * - Required status checks
	 * - Restrictions on pushes and deletions
	 * - Creator information
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_BranchProtectionRule Protection rules listed successfully. Returns an array of protection rule objects with metadata.
	 * @throws ApiError
	 */
	public static repoListProtectionRules({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of protection rules to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of protection rules to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_BranchProtectionRule> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a branch protection rule
	 * Creates a new branch protection rule that enforces policies on matching branches.
	 * Requires Admin role or higher in the repository.
	 *
	 * Parameters:
	 * - pattern: Branch name pattern (supports wildcards like "feature*", "release**")
	 * - required_approvals: Number of required approvals before merging (0-10)
	 * - require_status_checks: Whether status checks must pass
	 * - required_status_checks: List of required status check contexts
	 * - restrict_pushes: Restrict who can push to matching branches
	 * - allow_force_pushes: Allow force pushes (only if restrict_pushes is false)
	 * - allow_deletions: Allow branch deletion (only if restrict_pushes is false)
	 *
	 * Returns the created protection rule with full configuration.
	 * @returns ApiResponse_BranchProtectionRule Protection rule created successfully. Returns the newly created protection rule with full configuration.
	 * @throws ApiError
	 */
	public static repoCreateProtectionRule({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Protection rule creation parameters
		 */
		requestBody: CreateProtectionRuleParams,
	}): CancelablePromise<ApiResponse_BranchProtectionRule> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid pattern, negative approvals count, or conflicting settings`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				409: `Protection rule with this pattern already exists`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Get a specific branch protection rule
	 * Returns detailed information about a specific branch protection rule.
	 * Requires read access to the repository.
	 *
	 * Returns the complete protection rule with all configuration details including:
	 * - Branch name pattern
	 * - Required approvals and status checks
	 * - Push and deletion restrictions
	 * - Creator information and timestamps
	 * @returns ApiResponse_BranchProtectionRule Protection rule retrieved successfully. Returns complete protection rule with all configuration details.
	 * @throws ApiError
	 */
	public static repoGetProtectionRule({
		workspaceName,
		repoName,
		ruleId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Protection rule ID (UUID)
		 */
		ruleId: string,
	}): CancelablePromise<ApiResponse_BranchProtectionRule> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules/{rule_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'rule_id': ruleId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository, workspace, or protection rule not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a branch protection rule
	 * Updates an existing branch protection rule's configuration.
	 * Requires Admin role or higher in the repository.
	 *
	 * Updatable fields:
	 * - required_approvals: Number of required approvals before merging (0-10)
	 * - require_status_checks: Whether status checks must pass
	 * - required_status_checks: List of required status check contexts
	 * - restrict_pushes: Restrict who can push to matching branches
	 * - allow_force_pushes: Allow force pushes (only if restrict_pushes is false)
	 * - allow_deletions: Allow branch deletion (only if restrict_pushes is false)
	 *
	 * All fields are optional; only provided fields are updated.
	 * Returns the updated protection rule with full configuration.
	 * @returns ApiResponse_BranchProtectionRule Protection rule updated successfully. Returns the updated protection rule with full configuration.
	 * @throws ApiError
	 */
	public static repoUpdateProtectionRule({
		workspaceName,
		repoName,
		ruleId,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Protection rule ID (UUID)
		 */
		ruleId: string,
		/**
		 * Protection rule update parameters (all fields optional)
		 */
		requestBody: UpdateProtectionRuleParams,
	}): CancelablePromise<ApiResponse_BranchProtectionRule> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules/{rule_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'rule_id': ruleId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: negative approvals count or conflicting settings`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or protection rule not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a branch protection rule
	 * Permanently removes a branch protection rule from the repository.
	 * Requires Admin role or higher in the repository.
	 *
	 * Effects:
	 * - Protection rule is permanently removed
	 * - Branches matching the pattern are no longer protected by this rule
	 * - Pushes and merges to matching branches are no longer restricted
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Protection rule deleted successfully.
	 * @throws ApiError
	 */
	public static repoDeleteProtectionRule({
		workspaceName,
		repoName,
		ruleId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Protection rule ID (UUID)
		 */
		ruleId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules/{rule_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'rule_id': ruleId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or protection rule not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Match a branch name against protection rules
	 * Checks if a branch name matches any protection rule in the repository.
	 * Requires read access to the repository.
	 *
	 * Returns the matching protection rule if found, or null if no rules match.
	 * Useful for determining what protections apply to a specific branch before performing operations.
	 * @returns ApiResponse_Option_BranchProtectionRule Branch protection check completed. Returns matching protection rule or null if no rules match.
	 * @throws ApiError
	 */
	public static repoMatchProtection({
		workspaceName,
		repoName,
		branchName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Branch name to check against protection rules
		 */
		branchName: string,
	}): CancelablePromise<ApiResponse_Option_BranchProtectionRule> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection/match',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'branch_name': branchName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List releases in a repository
	 * Returns a paginated list of all releases in the repository, sorted by creation date (newest first).
	 * Includes release metadata such as:
	 * - Release name and tag
	 * - Release notes and description
	 * - Author and creation date
	 * - Draft and prerelease status
	 * - Asset download URLs
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoRelease Releases listed successfully. Returns an array of release objects with metadata.
	 * @throws ApiError
	 */
	public static repoListReleases({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of releases to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of releases to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoRelease> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a new release
	 * Creates a new release in the repository, optionally creating a tag if it doesn't exist.
	 * Requires Write role or higher in the repository.
	 *
	 * Parameters:
	 * - tag_name: Tag name for the release (will be created if it doesn't exist)
	 * - name: Release name/title (required)
	 * - body: Release notes in markdown format (optional, max 10000 characters)
	 * - draft: Whether this is a draft release (default: false)
	 * - prerelease: Whether this is a prerelease (default: false)
	 * - target_commitish: Commit SHA or branch name to tag (defaults to default branch)
	 *
	 * Returns the created release with metadata including download URLs for assets.
	 * @returns ApiResponse_RepoRelease Release created successfully. Returns the newly created release with metadata.
	 * @throws ApiError
	 */
	public static repoCreateRelease({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Release creation parameters
		 */
		requestBody: CreateReleaseParams,
	}): CancelablePromise<ApiResponse_RepoRelease> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: name too long, invalid tag name, or target commit doesn't exist`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or target commit not found`,
				409: `Release with this tag already exists`,
				500: `Internal server error or Git operation failed`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoRelease Release retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetRelease({
		workspaceName,
		repoName,
		releaseId,
	}: {
		workspaceName: string,
		repoName: string,
		releaseId: string,
	}): CancelablePromise<ApiResponse_RepoRelease> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases/{release_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'release_id': releaseId,
			},
			errors: {
				401: `Authentication required`,
				404: `Release not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a release
	 * Updates release metadata such as name, description, draft status, and prerelease flag.
	 * Requires Write role or higher in the repository.
	 *
	 * Updatable fields:
	 * - name: Release name/title (max 255 characters)
	 * - body: Release notes in markdown format (max 10000 characters)
	 * - draft: Whether this is a draft release
	 * - prerelease: Whether this is a prerelease
	 *
	 * All fields are optional; only provided fields are updated.
	 * Returns the updated release with full metadata.
	 * @returns ApiResponse_RepoRelease Release updated successfully. Returns the updated release with full metadata.
	 * @throws ApiError
	 */
	public static repoUpdateRelease({
		workspaceName,
		repoName,
		releaseId,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Release ID (UUID)
		 */
		releaseId: string,
		/**
		 * Release update parameters (all fields optional)
		 */
		requestBody: UpdateReleaseParams,
	}): CancelablePromise<ApiResponse_RepoRelease> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases/{release_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'release_id': releaseId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: name too long or invalid characters`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or release not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a release
	 * Permanently deletes a release from the repository. The associated tag and commits are not deleted.
	 * Requires Write role or higher in the repository.
	 *
	 * Effects:
	 * - Release metadata is permanently removed
	 * - Release assets are deleted
	 * - The associated tag remains in the repository
	 * - The tagged commits remain in the repository history
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Release deleted successfully. The release and its assets have been permanently removed.
	 * @throws ApiError
	 */
	public static repoDeleteRelease({
		workspaceName,
		repoName,
		releaseId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Release ID (UUID)
		 */
		releaseId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases/{release_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'release_id': releaseId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or release not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Star a repository
	 * Adds the current user to the repository's stargazers list.
	 * Requires read access to the repository.
	 *
	 * Effects:
	 * - User is added to the repository's stargazers
	 * - Repository star count is incremented
	 * - User can unstar later to remove themselves
	 *
	 * Returns success message on completion. Idempotent operation (starring an already starred repository is a no-op).
	 * @returns ApiResponse_String Repository starred successfully.
	 * @throws ApiError
	 */
	public static repoStar({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/star',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Unstar a repository
	 * Removes the current user from the repository's stargazers list.
	 * Requires read access to the repository.
	 *
	 * Effects:
	 * - User is removed from the repository's stargazers
	 * - Repository star count is decremented
	 *
	 * Returns success message on completion. Idempotent operation (unstarring an unstarred repository is a no-op).
	 * @returns ApiResponse_String Repository unstarred successfully.
	 * @throws ApiError
	 */
	public static repoUnstar({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/star',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List stargazers of a repository
	 * Returns a paginated list of users who have starred the repository, sorted by star date (newest first).
	 * Includes stargazer metadata such as:
	 * - User information (ID, username, display name)
	 * - Star timestamp
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoStar Stargazers listed successfully. Returns an array of stargazer objects with user information.
	 * @throws ApiError
	 */
	public static repoListStargazers({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of stargazers to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of stargazers to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoStar> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stargazers',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Get repository statistics
	 * Returns comprehensive statistics for a repository including:
	 * - Star count and watcher count
	 * - Fork count
	 * - Branch and tag counts
	 * - Commit count
	 * - Release count
	 * - Open issues and pull requests count
	 * - Storage size and bandwidth usage
	 * - Last push timestamp
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_RepoStats Repository statistics retrieved successfully. Returns comprehensive repository metrics.
	 * @throws ApiError
	 */
	public static repoGetStats({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_RepoStats> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stats',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Refresh repository statistics
	 * Recalculates and updates repository statistics from the current state of the repository.
	 * Requires Admin role or higher in the repository.
	 *
	 * Effects:
	 * - Recalculates star, watcher, and fork counts
	 * - Recalculates branch and tag counts
	 * - Recalculates commit count from Git history
	 * - Recalculates release count
	 * - Recalculates open issues and pull requests count
	 * - Updates storage size and bandwidth usage
	 * - Updates last push timestamp
	 *
	 * Returns the refreshed statistics with all updated values.
	 * @returns ApiResponse_RepoStats Repository statistics refreshed successfully. Returns all updated metrics.
	 * @throws ApiError
	 */
	public static repoRefreshStats({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_RepoStats> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stats/refresh',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				500: `Internal server error or Git operation failed`,
			},
		});
	}
	/**
	 * Create a commit status
	 * Creates a new status check for a specific commit, typically used by CI/CD systems.
	 * Requires Write role or higher in the repository.
	 *
	 * Parameters:
	 * - commit_sha: Commit SHA to attach the status to (must exist in repository)
	 * - state: Status state ("pending", "success", "failure", "error")
	 * - context: Status context name (e.g., "ci/build", "ci/test") - must be unique per commit
	 * - description: Human-readable description of the status (optional, max 500 characters)
	 * - target_url: URL with detailed information about the status (optional)
	 *
	 * Effects:
	 * - Status is attached to the commit
	 * - Can be used by branch protection rules to enforce status checks
	 * - Multiple statuses can exist for the same commit with different contexts
	 *
	 * Returns the created status with metadata including ID and timestamps.
	 * @returns ApiResponse_RepoCommitStatus Commit status created successfully. Returns the newly created status with metadata.
	 * @throws ApiError
	 */
	public static repoCreateCommitStatus({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Commit status creation parameters
		 */
		requestBody: CreateCommitStatusParams,
	}): CancelablePromise<ApiResponse_RepoCommitStatus> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/statuses',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid state, context too long, or commit doesn't exist`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or commit not found`,
				409: `Status with this context already exists for this commit (use update instead)`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Sync a fork with upstream
	 * Synchronizes a forked repository with the latest changes from the parent repository.
	 * Requires Write role or higher in the fork repository.
	 *
	 * Effects:
	 * - Merges changes from the parent repository's default branch into the fork
	 * - Creates a merge commit if there are conflicts
	 * - Updates the fork's commit history
	 *
	 * Only works on repositories that are forks (have a parent repository).
	 * Returns success message on completion.
	 * @returns ApiResponse_String Fork synchronized successfully with upstream repository.
	 * @throws ApiError
	 */
	public static repoSyncFork({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/sync',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				400: `Repository is not a fork or has merge conflicts that require manual resolution`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Write role or higher)`,
				404: `Repository, workspace, or parent repository not found`,
				409: `Merge conflicts detected; manual resolution required`,
				500: `Internal server error or Git operation failed`,
			},
		});
	}
	/**
	 * @returns ApiResponse_ListTagsResponse Tags listed
	 * @throws ApiError
	 */
	public static repoListTags({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		workspaceName: string,
		repoName: string,
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_ListTagsResponse> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required`,
				404: `Repository not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_Tag Tag created
	 * @throws ApiError
	 */
	public static repoCreateTag({
		workspaceName,
		repoName,
		requestBody,
	}: {
		workspaceName: string,
		repoName: string,
		requestBody: CreateTagBody,
	}): CancelablePromise<ApiResponse_Tag> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters`,
				401: `Authentication required`,
				404: `Repository not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_Tag Tag retrieved
	 * @throws ApiError
	 */
	public static repoGetTag({
		workspaceName,
		repoName,
		tagName,
	}: {
		workspaceName: string,
		repoName: string,
		tagName: string,
	}): CancelablePromise<ApiResponse_Tag> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags/{tag_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'tag_name': tagName,
			},
			errors: {
				401: `Authentication required`,
				404: `Tag not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_Tag Tag updated (delete+recreate if renamed)
	 * @throws ApiError
	 */
	public static repoUpdateTag({
		workspaceName,
		repoName,
		tagName,
		requestBody,
	}: {
		workspaceName: string,
		repoName: string,
		tagName: string,
		requestBody: UpdateTagBody,
	}): CancelablePromise<ApiResponse_Tag> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags/{tag_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'tag_name': tagName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters`,
				401: `Authentication required`,
				404: `Tag not found`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Tag deleted
	 * @throws ApiError
	 */
	public static repoDeleteTag({
		workspaceName,
		repoName,
		tagName,
	}: {
		workspaceName: string,
		repoName: string,
		tagName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags/{tag_name}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'tag_name': tagName,
			},
			errors: {
				401: `Authentication required`,
				404: `Tag not found`,
			},
		});
	}
	/**
	 * Transfer repository ownership
	 * Transfers ownership of a repository to another user. The new owner must be an existing repository member.
	 * Requires Owner role in the repository.
	 *
	 * Effects:
	 * - Current owner becomes an Admin
	 * - New owner gains full Owner permissions
	 * - Repository URL remains unchanged
	 * - All forks and stars are preserved
	 *
	 * Returns the updated repository with new owner information.
	 * @returns ApiResponse_RepoDetail Ownership transferred successfully. Returns the repository with updated owner information.
	 * @throws ApiError
	 */
	public static repoTransferOwner({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Transfer ownership parameters
		 */
		requestBody: TransferOwnerParams,
	}): CancelablePromise<ApiResponse_RepoDetail> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/transfer-owner',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid new owner ID or user is not a repository member`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Owner role)`,
				404: `Repository, workspace, or new owner not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Unarchive a repository
	 * Restores an archived repository to active status, re-enabling all write operations.
	 * Requires Owner role in the repository.
	 *
	 * Effects:
	 * - Repository status changes from "archived" to "active"
	 * - All write operations are re-enabled
	 * - Previous visibility and settings are preserved
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Repository unarchived successfully. All write operations are now enabled.
	 * @throws ApiError
	 */
	public static repoUnarchive({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/unarchive',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Owner role)`,
				404: `Repository or workspace not found`,
				409: `Repository is not archived`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Watch a repository
	 * Subscribes the current user to notifications for repository activities.
	 * Requires read access to the repository.
	 *
	 * Watch levels:
	 * - "participating": Notifications for issues/PRs you're involved in
	 * - "watching": All repository notifications (default)
	 * - "ignoring": No notifications
	 *
	 * Returns success message on completion. Idempotent operation.
	 * @returns ApiResponse_String Repository watch subscription updated successfully.
	 * @throws ApiError
	 */
	public static repoWatch({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Watch parameters (level is optional, defaults to 'watching')
		 */
		requestBody: WatchParams,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/watch',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid watch level (must be 'participating', 'watching', or 'ignoring')`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Unwatch a repository
	 * Removes the current user's watch subscription from the repository.
	 * Requires read access to the repository.
	 *
	 * Effects:
	 * - User is removed from the repository's watchers
	 * - User will no longer receive notifications for repository activities
	 *
	 * Returns success message on completion. Idempotent operation (unwatching an unwatched repository is a no-op).
	 * @returns ApiResponse_String Repository watch subscription removed successfully.
	 * @throws ApiError
	 */
	public static repoUnwatch({
		workspaceName,
		repoName,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/watch',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List watchers of a repository
	 * Returns a paginated list of users who are watching the repository, sorted by watch date (newest first).
	 * Includes watcher metadata such as:
	 * - User information (ID, username, display name)
	 * - Watch level (participating, watching, or ignoring)
	 * - Watch timestamp
	 *
	 * Requires read access to the repository.
	 * @returns ApiResponse_Vec_RepoWatch Watchers listed successfully. Returns an array of watcher objects with user information and watch level.
	 * @throws ApiError
	 */
	public static repoListWatchers({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of watchers to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of watchers to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoWatch> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/watchers',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions to access this repository`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List webhooks in a repository
	 * Returns a paginated list of all webhooks in the repository, sorted by creation date (newest first).
	 * Includes webhook metadata such as:
	 * - Webhook URL and events
	 * - Active status
	 * - Last delivery status and timestamp
	 * - Creator information
	 *
	 * Requires Admin role or higher in the repository.
	 * @returns ApiResponse_Vec_RepoWebhook Webhooks listed successfully. Returns an array of webhook objects with metadata.
	 * @throws ApiError
	 */
	public static repoListWebhooks({
		workspaceName,
		repoName,
		limit,
		offset,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Maximum number of webhooks to return (default: 50, max: 100)
		 */
		limit?: number | null,
		/**
		 * Number of webhooks to skip for pagination (default: 0)
		 */
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_RepoWebhook> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a webhook in a repository
	 * Creates a new webhook that receives HTTP POST notifications for repository events.
	 * Requires Admin role or higher in the repository.
	 *
	 * Parameters:
	 * - url: Webhook endpoint URL (must be HTTPS in production)
	 * - events: List of events to subscribe to (e.g., "push", "pull_request", "issue")
	 * - secret: Optional secret for webhook signature verification
	 * - active: Whether the webhook is active (default: true)
	 *
	 * Effects:
	 * - Webhook is created and starts receiving events
	 * - Webhook deliveries are logged and can be retried on failure
	 *
	 * Returns the created webhook with metadata including ID and configuration.
	 * @returns ApiResponse_RepoWebhook Webhook created successfully. Returns the newly created webhook with metadata.
	 * @throws ApiError
	 */
	public static repoCreateWebhook({
		workspaceName,
		repoName,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Webhook creation parameters
		 */
		requestBody: CreateWebhookParams,
	}): CancelablePromise<ApiResponse_RepoWebhook> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid URL format or empty events list`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository or workspace not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_RepoWebhook Webhook retrieved successfully
	 * @throws ApiError
	 */
	public static repoGetWebhook({
		workspaceName,
		repoName,
		webhookId,
	}: {
		workspaceName: string,
		repoName: string,
		webhookId: string,
	}): CancelablePromise<ApiResponse_RepoWebhook> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'webhook_id': webhookId,
			},
			errors: {
				401: `Authentication required`,
				404: `Webhook not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a webhook in a repository
	 * Updates webhook configuration such as URL, events, secret, and active status.
	 * Requires Admin role or higher in the repository.
	 *
	 * Updatable fields:
	 * - url: Webhook endpoint URL (must be HTTPS in production)
	 * - events: List of events to subscribe to
	 * - secret: Secret for webhook signature verification
	 * - active: Whether the webhook is active
	 *
	 * All fields are optional; only provided fields are updated.
	 * Returns the updated webhook with full metadata.
	 * @returns ApiResponse_RepoWebhook Webhook updated successfully. Returns the updated webhook with full metadata.
	 * @throws ApiError
	 */
	public static repoUpdateWebhook({
		workspaceName,
		repoName,
		webhookId,
		requestBody,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Webhook ID (UUID)
		 */
		webhookId: string,
		/**
		 * Webhook update parameters (all fields optional)
		 */
		requestBody: UpdateWebhookParams,
	}): CancelablePromise<ApiResponse_RepoWebhook> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'webhook_id': webhookId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				400: `Invalid parameters: invalid URL format or empty events list`,
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or webhook not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a webhook from a repository
	 * Permanently removes a webhook from the repository, stopping all event notifications.
	 * Requires Admin role or higher in the repository.
	 *
	 * Effects:
	 * - Webhook is permanently removed from the repository
	 * - Webhook stops receiving event notifications immediately
	 * - Webhook delivery history is deleted
	 *
	 * Returns success message on completion.
	 * @returns ApiResponse_String Webhook deleted successfully.
	 * @throws ApiError
	 */
	public static repoDeleteWebhook({
		workspaceName,
		repoName,
		webhookId,
	}: {
		/**
		 * Workspace name (unique identifier)
		 */
		workspaceName: string,
		/**
		 * Repository name (unique within the workspace)
		 */
		repoName: string,
		/**
		 * Webhook ID (UUID)
		 */
		webhookId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'webhook_id': webhookId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `Insufficient permissions (requires Admin role or higher)`,
				404: `Repository, workspace, or webhook not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Webhook deliveries listed successfully
	 * @throws ApiError
	 */
	public static repoListWebhookDeliveries({
		workspaceName,
		repoName,
		webhookId,
		limit,
		offset,
	}: {
		workspaceName: string,
		repoName: string,
		webhookId: string,
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}/deliveries',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'webhook_id': webhookId,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required`,
				404: `Webhook not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * @returns ApiResponse_String Webhook delivery retried successfully
	 * @throws ApiError
	 */
	public static repoRetryWebhookDelivery({
		workspaceName,
		repoName,
		webhookId,
		deliveryId,
	}: {
		workspaceName: string,
		repoName: string,
		webhookId: string,
		deliveryId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry',
			path: {
				'workspace_name': workspaceName,
				'repo_name': repoName,
				'webhook_id': webhookId,
				'delivery_id': deliveryId,
			},
			errors: {
				401: `Authentication required`,
				404: `Webhook or delivery not found`,
				500: `Internal server error`,
			},
		});
	}
}
