import { Disposable, Event } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; export interface ScmProvider extends Disposable { readonly id: string; readonly label: string; readonly rootUri: string; readonly handle?: number; readonly acceptInputCommand?: ScmCommand; readonly groups: ScmResourceGroup[]; readonly onDidChange: Event; readonly onDidChangeResources?: Event; readonly statusBarCommands?: ScmCommand[]; readonly onDidChangeStatusBarCommands?: Event; readonly onDidChangeCommitTemplate: Event; readonly amendSupport?: ScmAmendSupport; readonly actionButton?: ScmActionButton; readonly onDidChangeActionButton?: Event; readonly providerContextValue?: string; readonly historyProvider?: ScmHistoryProvider; } export declare const ScmResourceGroup: unique symbol; export interface ScmResourceGroup extends Disposable { readonly id: string; readonly label: string; readonly resources: ScmResource[]; readonly hideWhenEmpty?: boolean; readonly contextValue?: string; readonly provider: ScmProvider; } export interface ScmResource { /** The uri of the underlying resource inside the workspace. */ readonly sourceUri: URI; readonly decorations?: ScmResourceDecorations; open(): Promise; readonly group: ScmResourceGroup; } export interface ScmResourceDecorations { icon?: string; iconDark?: string; tooltip?: string; source?: string; letter?: string; color?: string; strikeThrough?: boolean; } export interface ScmCommand { title: string; tooltip?: string; command?: string; arguments?: any[]; } export interface ScmCommit { readonly id: string; readonly summary: string; readonly authorName: string; readonly authorEmail: string; readonly authorDateRelative: string; } export interface ScmAmendSupport { getInitialAmendingCommits(amendingHeadCommitId: string, latestCommitId: string | undefined): Promise; getMessage(commit: string): Promise; reset(commit: string): Promise; getLastCommit(): Promise; } export interface ScmActionButton { command: ScmCommand; secondaryCommands?: ScmCommand[][]; enabled?: boolean; description?: string; } export interface ScmHistoryItemRef { readonly id: string; readonly name: string; readonly description?: string; readonly revision?: string; readonly icon?: string; readonly category?: string; } export interface ScmHistoryItemRefsChangeEvent { readonly added: readonly ScmHistoryItemRef[]; readonly removed: readonly ScmHistoryItemRef[]; readonly modified: readonly ScmHistoryItemRef[]; } export interface ScmHistoryOptions { readonly skip?: number; readonly limit?: number | { id?: string; }; readonly historyItemRefs?: readonly string[]; readonly filterText?: string; } export interface ScmHistoryItemStatistics { readonly files: number; readonly insertions: number; readonly deletions: number; } export interface ScmHistoryItem { readonly id: string; readonly parentIds?: readonly string[]; readonly subject: string; readonly message?: string; readonly author?: string; readonly authorEmail?: string; readonly authorIcon?: string; readonly displayId?: string; readonly timestamp?: number; readonly tooltip?: string; readonly statistics?: ScmHistoryItemStatistics; readonly references?: readonly ScmHistoryItemRef[]; } export interface ScmHistoryItemChange { readonly uri: string; readonly originalUri?: string; readonly modifiedUri?: string; readonly renameUri?: string; } export interface ScmHistoryProvider { readonly currentHistoryItemRef?: ScmHistoryItemRef; readonly currentHistoryItemRemoteRef?: ScmHistoryItemRef; readonly currentHistoryItemBaseRef?: ScmHistoryItemRef; readonly onDidChangeCurrentHistoryItemRefs: Event; readonly onDidChangeHistoryItemRefs: Event; provideHistoryItemRefs(historyItemRefs: string[] | undefined, token: CancellationToken): Promise; provideHistoryItems(options: ScmHistoryOptions, token: CancellationToken): Promise; provideHistoryItemChanges(historyItemId: string, historyItemParentId: string | undefined, token: CancellationToken): Promise; resolveHistoryItem(historyItemId: string, token: CancellationToken): Promise; resolveHistoryItemRefsCommonAncestor(historyItemRefs: string[], token: CancellationToken): Promise; } //# sourceMappingURL=scm-provider.d.ts.map