/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import * as azdata from 'azdata'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { JobCacheObject, AlertsCacheObject, ProxiesCacheObject, OperatorsCacheObject } from './jobManagementService'; import { Event } from 'vs/base/common/event'; export const SERVICE_ID = 'jobManagementService'; export const IJobManagementService = createDecorator(SERVICE_ID); export interface IJobManagementService { _serviceBrand: any; onDidChange: Event; registerProvider(providerId: string, provider: azdata.AgentServicesProvider): void; fireOnDidChange(): void; getJobs(connectionUri: string): Thenable; getJobHistory(connectionUri: string, jobID: string, jobName: string): Thenable; deleteJob(connectionUri: string, job: azdata.AgentJobInfo): Thenable; deleteJobStep(connectionUri: string, step: azdata.AgentJobStepInfo): Thenable; getAlerts(connectionUri: string): Thenable; deleteAlert(connectionUri: string, alert: azdata.AgentAlertInfo): Thenable; getOperators(connectionUri: string): Thenable; deleteOperator(connectionUri: string, operator: azdata.AgentOperatorInfo): Thenable; getProxies(connectionUri: string): Thenable; deleteProxy(connectionUri: string, proxy: azdata.AgentProxyInfo): Thenable; getCredentials(connectionUri: string): Thenable; jobAction(connectionUri: string, jobName: string, action: string): Thenable; addToCache(server: string, cache: JobCacheObject | OperatorsCacheObject); jobCacheObjectMap: { [server: string]: JobCacheObject; }; operatorsCacheObjectMap: { [server: string]: OperatorsCacheObject; }; alertsCacheObjectMap: { [server: string]: AlertsCacheObject; }; proxiesCacheObjectMap: { [server: string]: ProxiesCacheObject }; addToCache(server: string, cache: JobCacheObject | ProxiesCacheObject | AlertsCacheObject | OperatorsCacheObject); }