mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 17:22:29 -05:00
remove agent from old apis (#5064)
This commit is contained in:
377
src/sql/sqlops.d.ts
vendored
377
src/sql/sqlops.d.ts
vendored
@@ -35,8 +35,6 @@ declare module 'sqlops' {
|
||||
|
||||
export function registerAdminServicesProvider(provider: AdminServicesProvider): vscode.Disposable;
|
||||
|
||||
export function registerAgentServicesProvider(provider: AgentServicesProvider): vscode.Disposable;
|
||||
|
||||
export function registerCapabilitiesServiceProvider(provider: CapabilitiesProvider): vscode.Disposable;
|
||||
|
||||
export function registerDacFxServicesProvider(provider: DacFxServicesProvider): vscode.Disposable;
|
||||
@@ -1257,386 +1255,11 @@ declare module 'sqlops' {
|
||||
getDatabaseInfo(connectionUri: string): Thenable<DatabaseInfo>;
|
||||
}
|
||||
|
||||
// Agent Services types
|
||||
export enum WeekDays {
|
||||
sunday = 1,
|
||||
monday = 2,
|
||||
tuesday = 4,
|
||||
wednesday = 8,
|
||||
thursday = 16,
|
||||
friday = 32,
|
||||
weekDays = 62,
|
||||
saturday = 64,
|
||||
weekEnds = 65,
|
||||
everyDay = 127
|
||||
}
|
||||
|
||||
export enum NotifyMethods {
|
||||
none = 0,
|
||||
notifyEmail = 1,
|
||||
pager = 2,
|
||||
netSend = 4,
|
||||
notifyAll = 7
|
||||
}
|
||||
|
||||
export enum AlertType {
|
||||
sqlServerEvent = 1,
|
||||
sqlServerPerformanceCondition = 2,
|
||||
nonSqlServerEvent = 3,
|
||||
wmiEvent = 4
|
||||
}
|
||||
|
||||
export enum JobCompletionActionCondition {
|
||||
Never = 0,
|
||||
OnSuccess = 1,
|
||||
OnFailure = 2,
|
||||
Always = 3
|
||||
}
|
||||
|
||||
export enum FrequencyTypes {
|
||||
Unknown,
|
||||
OneTime = 1 << 1,
|
||||
Daily = 1 << 2,
|
||||
Weekly = 1 << 3,
|
||||
Monthly = 1 << 4,
|
||||
MonthlyRelative = 1 << 5,
|
||||
AutoStart = 1 << 6,
|
||||
OnIdle = 1 << 7
|
||||
}
|
||||
|
||||
export enum FrequencySubDayTypes {
|
||||
Unknown = 0,
|
||||
Once = 1,
|
||||
Second = 2,
|
||||
Minute = 4,
|
||||
Hour = 8
|
||||
}
|
||||
|
||||
export enum FrequencyRelativeIntervals {
|
||||
First = 1,
|
||||
Second = 2,
|
||||
Third = 4,
|
||||
Fourth = 8,
|
||||
Last = 16
|
||||
}
|
||||
|
||||
export enum JobExecutionStatus {
|
||||
Executing = 1,
|
||||
WaitingForWorkerThread = 2,
|
||||
BetweenRetries = 3,
|
||||
Idle = 4,
|
||||
Suspended = 5,
|
||||
WaitingForStepToFinish = 6,
|
||||
PerformingCompletionAction = 7
|
||||
}
|
||||
|
||||
export interface AgentJobInfo {
|
||||
name: string;
|
||||
owner: string;
|
||||
description: string;
|
||||
currentExecutionStatus: number;
|
||||
lastRunOutcome: number;
|
||||
currentExecutionStep: string;
|
||||
enabled: boolean;
|
||||
hasTarget: boolean;
|
||||
hasSchedule: boolean;
|
||||
hasStep: boolean;
|
||||
runnable: boolean;
|
||||
category: string;
|
||||
categoryId: number;
|
||||
categoryType: number;
|
||||
lastRun: string;
|
||||
nextRun: string;
|
||||
jobId: string;
|
||||
startStepId: number;
|
||||
emailLevel: JobCompletionActionCondition;
|
||||
pageLevel: JobCompletionActionCondition;
|
||||
eventLogLevel: JobCompletionActionCondition;
|
||||
deleteLevel: JobCompletionActionCondition;
|
||||
operatorToEmail: string;
|
||||
operatorToPage: string;
|
||||
jobSteps: AgentJobStepInfo[];
|
||||
jobSchedules: AgentJobScheduleInfo[];
|
||||
alerts: AgentAlertInfo[];
|
||||
}
|
||||
|
||||
export interface AgentJobScheduleInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
jobName: string;
|
||||
isEnabled: boolean;
|
||||
frequencyTypes: FrequencyTypes;
|
||||
frequencySubDayTypes: FrequencySubDayTypes;
|
||||
frequencySubDayInterval: number;
|
||||
frequencyRelativeIntervals: FrequencyRelativeIntervals;
|
||||
frequencyRecurrenceFactor: number;
|
||||
frequencyInterval: number;
|
||||
dateCreated: string;
|
||||
activeStartTimeOfDay: string;
|
||||
activeStartDate: string;
|
||||
activeEndTimeOfDay: string;
|
||||
jobCount: number;
|
||||
activeEndDate: string;
|
||||
scheduleUid: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface AgentJobStep {
|
||||
jobId: string;
|
||||
stepId: string;
|
||||
stepName: string;
|
||||
message: string;
|
||||
runDate: string;
|
||||
runStatus: number;
|
||||
stepDetails: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface AgentJobStepInfo {
|
||||
jobId: string;
|
||||
jobName: string;
|
||||
script: string;
|
||||
scriptName: string;
|
||||
stepName: string;
|
||||
subSystem: string;
|
||||
id: number;
|
||||
failureAction: string;
|
||||
successAction: string;
|
||||
failStepId: number;
|
||||
successStepId: number;
|
||||
command: string;
|
||||
commandExecutionSuccessCode: number;
|
||||
databaseName: string;
|
||||
databaseUserName: string;
|
||||
server: string;
|
||||
outputFileName: string;
|
||||
appendToLogFile: boolean;
|
||||
appendToStepHist: boolean;
|
||||
writeLogToTable: boolean;
|
||||
appendLogToTable: boolean;
|
||||
retryAttempts: number;
|
||||
retryInterval: number;
|
||||
proxyName: string;
|
||||
}
|
||||
|
||||
export interface AgentJobHistoryInfo {
|
||||
instanceId: number;
|
||||
sqlMessageId: string;
|
||||
message: string;
|
||||
stepId: string;
|
||||
stepName: string;
|
||||
sqlSeverity: string;
|
||||
jobId: string;
|
||||
jobName: string;
|
||||
runStatus: number;
|
||||
runDate: string;
|
||||
runDuration: string;
|
||||
operatorEmailed: string;
|
||||
operatorNetsent: string;
|
||||
operatorPaged: string;
|
||||
retriesAttempted: string;
|
||||
server: string;
|
||||
steps: AgentJobStep[];
|
||||
}
|
||||
|
||||
export interface AgentProxyInfo {
|
||||
id: number;
|
||||
accountName: string;
|
||||
description: string;
|
||||
credentialName: string;
|
||||
credentialIdentity: string;
|
||||
credentialId: number;
|
||||
isEnabled: boolean;
|
||||
}
|
||||
|
||||
export interface AgentAlertInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
delayBetweenResponses: number;
|
||||
eventDescriptionKeyword: string;
|
||||
eventSource: string;
|
||||
hasNotification: number;
|
||||
includeEventDescription: NotifyMethods;
|
||||
isEnabled: boolean;
|
||||
jobId: string;
|
||||
jobName: string;
|
||||
lastOccurrenceDate: string;
|
||||
lastResponseDate: string;
|
||||
messageId: number;
|
||||
notificationMessage: string;
|
||||
occurrenceCount: number;
|
||||
performanceCondition: string;
|
||||
severity: number;
|
||||
databaseName: string;
|
||||
countResetDate: string;
|
||||
categoryName: string;
|
||||
alertType: AlertType;
|
||||
wmiEventNamespace: string;
|
||||
wmiEventQuery: string;
|
||||
}
|
||||
|
||||
export interface AgentOperatorInfo {
|
||||
name: string;
|
||||
id: number;
|
||||
emailAddress: string;
|
||||
enabled: boolean;
|
||||
lastEmailDate: string;
|
||||
lastNetSendDate: string;
|
||||
lastPagerDate: string;
|
||||
pagerAddress: string;
|
||||
categoryName: string;
|
||||
pagerDays: WeekDays;
|
||||
saturdayPagerEndTime: string;
|
||||
saturdayPagerStartTime: string;
|
||||
sundayPagerEndTime: string;
|
||||
sundayPagerStartTime: string;
|
||||
netSendAddress: string;
|
||||
weekdayPagerStartTime: string;
|
||||
weekdayPagerEndTime: string;
|
||||
}
|
||||
|
||||
export interface ResultStatus {
|
||||
success: boolean;
|
||||
errorMessage: string;
|
||||
}
|
||||
|
||||
export interface AgentJobsResult extends ResultStatus {
|
||||
jobs: AgentJobInfo[];
|
||||
}
|
||||
|
||||
export interface AgentJobHistoryResult extends ResultStatus {
|
||||
histories: AgentJobHistoryInfo[];
|
||||
steps: AgentJobStepInfo[];
|
||||
schedules: AgentJobScheduleInfo[];
|
||||
alerts: AgentAlertInfo[];
|
||||
}
|
||||
|
||||
export interface CreateAgentJobResult extends ResultStatus {
|
||||
job: AgentJobInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentJobResult extends ResultStatus {
|
||||
job: AgentJobInfo;
|
||||
}
|
||||
|
||||
export interface AgentJobCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AgentJobDefaultsResult extends ResultStatus {
|
||||
owner: string;
|
||||
categories: AgentJobCategory[];
|
||||
}
|
||||
|
||||
export interface CreateAgentJobStepResult extends ResultStatus {
|
||||
step: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentJobStepResult extends ResultStatus {
|
||||
step: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface CreateAgentProxyResult extends ResultStatus {
|
||||
step: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentProxyResult extends ResultStatus {
|
||||
step: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface AgentAlertsResult extends ResultStatus {
|
||||
alerts: AgentAlertInfo[];
|
||||
}
|
||||
|
||||
export interface CreateAgentAlertResult extends ResultStatus {
|
||||
alert: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentAlertResult extends ResultStatus {
|
||||
alert: AgentJobStepInfo;
|
||||
}
|
||||
|
||||
export interface AgentOperatorsResult extends ResultStatus {
|
||||
operators: AgentOperatorInfo[];
|
||||
}
|
||||
|
||||
export interface CreateAgentOperatorResult extends ResultStatus {
|
||||
operator: AgentOperatorInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentOperatorResult extends ResultStatus {
|
||||
operator: AgentOperatorInfo;
|
||||
}
|
||||
|
||||
export interface AgentProxiesResult extends ResultStatus {
|
||||
proxies: AgentProxyInfo[];
|
||||
}
|
||||
|
||||
export interface CreateAgentProxyResult extends ResultStatus {
|
||||
proxy: AgentProxyInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentProxyResult extends ResultStatus {
|
||||
proxy: AgentProxyInfo;
|
||||
}
|
||||
|
||||
export interface AgentJobSchedulesResult extends ResultStatus {
|
||||
schedules: AgentJobScheduleInfo[];
|
||||
}
|
||||
|
||||
export interface CreateAgentJobScheduleResult extends ResultStatus {
|
||||
schedule: AgentJobScheduleInfo;
|
||||
}
|
||||
|
||||
export interface UpdateAgentJobScheduleResult extends ResultStatus {
|
||||
schedule: AgentJobScheduleInfo;
|
||||
}
|
||||
|
||||
export interface AgentServicesProvider extends DataProvider {
|
||||
// Job management methods
|
||||
getJobs(ownerUri: string): Thenable<AgentJobsResult>;
|
||||
getJobHistory(ownerUri: string, jobId: string, jobName: string): Thenable<AgentJobHistoryResult>;
|
||||
jobAction(ownerUri: string, jobName: string, action: string): Thenable<ResultStatus>;
|
||||
createJob(ownerUri: string, jobInfo: AgentJobInfo): Thenable<CreateAgentJobResult>;
|
||||
updateJob(ownerUri: string, originalJobName: string, jobInfo: AgentJobInfo): Thenable<UpdateAgentJobResult>;
|
||||
deleteJob(ownerUri: string, jobInfo: AgentJobInfo): Thenable<ResultStatus>;
|
||||
getJobDefaults(ownerUri: string): Thenable<AgentJobDefaultsResult>;
|
||||
|
||||
// Job Step management methods
|
||||
createJobStep(ownerUri: string, stepInfo: AgentJobStepInfo): Thenable<CreateAgentJobStepResult>;
|
||||
updateJobStep(ownerUri: string, originalJobStepName: string, stepInfo: AgentJobStepInfo): Thenable<UpdateAgentJobStepResult>;
|
||||
deleteJobStep(ownerUri: string, stepInfo: AgentJobStepInfo): Thenable<ResultStatus>;
|
||||
|
||||
// Alert management methods
|
||||
getAlerts(ownerUri: string): Thenable<AgentAlertsResult>;
|
||||
createAlert(ownerUri: string, alertInfo: AgentAlertInfo): Thenable<CreateAgentAlertResult>;
|
||||
updateAlert(ownerUri: string, originalAlertName: string, alertInfo: AgentAlertInfo): Thenable<UpdateAgentAlertResult>;
|
||||
deleteAlert(ownerUri: string, alertInfo: AgentAlertInfo): Thenable<ResultStatus>;
|
||||
|
||||
// Operator management methods
|
||||
getOperators(ownerUri: string): Thenable<AgentOperatorsResult>;
|
||||
createOperator(ownerUri: string, operatorInfo: AgentOperatorInfo): Thenable<CreateAgentOperatorResult>;
|
||||
updateOperator(ownerUri: string, originalOperatorName: string, operatorInfo: AgentOperatorInfo): Thenable<UpdateAgentOperatorResult>;
|
||||
deleteOperator(ownerUri: string, operatorInfo: AgentOperatorInfo): Thenable<ResultStatus>;
|
||||
|
||||
// Proxy management methods
|
||||
getProxies(ownerUri: string): Thenable<AgentProxiesResult>;
|
||||
createProxy(ownerUri: string, proxyInfo: AgentProxyInfo): Thenable<CreateAgentOperatorResult>;
|
||||
updateProxy(ownerUri: string, originalProxyName: string, proxyInfo: AgentProxyInfo): Thenable<UpdateAgentOperatorResult>;
|
||||
deleteProxy(ownerUri: string, proxyInfo: AgentProxyInfo): Thenable<ResultStatus>;
|
||||
|
||||
// Credential method
|
||||
getCredentials(ownerUri: string): Thenable<GetCredentialsResult>;
|
||||
|
||||
// Job Schedule management methods
|
||||
getJobSchedules(ownerUri: string): Thenable<AgentJobSchedulesResult>;
|
||||
createJobSchedule(ownerUri: string, scheduleInfo: AgentJobScheduleInfo): Thenable<CreateAgentJobScheduleResult>;
|
||||
updateJobSchedule(ownerUri: string, originalScheduleName: string, scheduleInfo: AgentJobScheduleInfo): Thenable<UpdateAgentJobScheduleResult>;
|
||||
deleteJobSchedule(ownerUri: string, scheduleInfo: AgentJobScheduleInfo): Thenable<ResultStatus>;
|
||||
|
||||
registerOnUpdated(handler: () => any): void;
|
||||
}
|
||||
|
||||
// DacFx interfaces -----------------------------------------------------------------------
|
||||
export interface DacFxResult extends ResultStatus {
|
||||
operationId: string;
|
||||
|
||||
Reference in New Issue
Block a user