import { Project } from "../types/project.types.js";
import { RestEndpointMethodTypes } from "@octokit/rest";

//#region src/services/github.service.d.ts
type GitHubRepository = RestEndpointMethodTypes['repos']['listForAuthenticatedUser']['response']['data'][0];
type GitHubFileContent = RestEndpointMethodTypes['repos']['getContent']['response']['data'];
declare const getAuthorizationUrl: (redirectUri: string, login?: string) => string;
declare const exchangeCodeForToken: (code: string) => Promise<string>;
declare const getUserRepos: (accessToken: string) => Promise<GitHubRepository[]>;
/**
 * Check if valid intlayer configuration files exist in a repository (Recursively).
 * Returns an array of file paths found (e.g. ['intlayer.config.ts', 'apps/web/intlayer.config.js']).
 */
declare const checkIntlayerConfig: (accessToken: string, owner: string, repo: string, branch?: string) => Promise<string[]>;
/**
 * Get repository file contents and decode it
 */
declare const getRepositoryFileContents: (accessToken: string, owner: string, repo: string, path: string, branch?: string) => Promise<string | null>;
declare const getGitHubTokenFromUser: (userId: string) => Promise<string | null>;
type DispatchEventOptions = {
  project: Project;
  eventType?: string;
  payload?: Record<string, any>;
};
declare const triggerGithubDispatch: ({
  project,
  eventType,
  payload
}: DispatchEventOptions) => Promise<boolean>;
/**
 * Check if a GitHub workflow file exists
 */
declare const checkWorkflowFileExists: (accessToken: string, owner: string, repo: string, filename: string, branch?: string) => Promise<boolean>;
/**
 * Create or update a GitHub workflow file
 */
declare const createWorkflowFile: (accessToken: string, owner: string, repo: string, filename: string, content: string, branch?: string, message?: string) => Promise<void>;
//#endregion
export { GitHubFileContent, GitHubRepository, checkIntlayerConfig, checkWorkflowFileExists, createWorkflowFile, exchangeCodeForToken, getAuthorizationUrl, getGitHubTokenFromUser, getRepositoryFileContents, getUserRepos, triggerGithubDispatch };
//# sourceMappingURL=github.service.d.ts.map