From 4621f911d0963b918412deb18ad03423d5d980b8 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Tue, 23 Jan 2024 14:48:36 +0000 Subject: [PATCH] fix: Switch to wsdl generated WsSMC Signed-off-by: Gordon Smith --- packages/comms/src/ecl/activity.ts | 4 +- packages/comms/src/services/wsSMC.ts | 612 +--------------- .../src/services/wsdl/WsSMC/v1.27/WsSMC.ts | 670 ++++++++++++++++++ 3 files changed, 680 insertions(+), 606 deletions(-) create mode 100644 packages/comms/src/services/wsdl/WsSMC/v1.27/WsSMC.ts diff --git a/packages/comms/src/ecl/activity.ts b/packages/comms/src/ecl/activity.ts index d37b9cc0c9..c81089559c 100644 --- a/packages/comms/src/ecl/activity.ts +++ b/packages/comms/src/ecl/activity.ts @@ -66,14 +66,14 @@ export class Activity extends StateObject implem setBanner(request: Partial): Promise { return this.connection.SetBanner({ ...request - }).then((response) => { + } as WsSMC.SetBanner).then((response) => { this.set(response); return this; }); } lazyRefresh = debounce(async (): Promise => { - const response = await this.connection.Activity({}); + const response = await this.connection.Activity({} as WsSMC.Activity); this.set(response); return this; }); diff --git a/packages/comms/src/services/wsSMC.ts b/packages/comms/src/services/wsSMC.ts index 6e46fc0270..67538187f4 100644 --- a/packages/comms/src/services/wsSMC.ts +++ b/packages/comms/src/services/wsSMC.ts @@ -1,578 +1,18 @@ -import { IConnection, IOptions } from "../connection"; -import { ESPConnection } from "../espConnection"; +import { SMCServiceBase, WsSMC } from "./wsdl/WsSMC/v1.27/WsSMC"; +import { IOptions } from "../connection"; -/* - Response structures generated via: - * http://192.168.3.22:8010/WsSMC/Activity?respjson_ - * http://json2ts.com/ -*/ +export { + WsSMC +}; -export namespace WsSMC { - - export interface Activity { - ChatURL: string; - BannerContent: string; - BannerColor: string; - BannerSize: string; - BannerScroll: string; - BannerAction: number; - EnableChatURL: boolean; - FromSubmitBtn: boolean; - SortBy: string; - Descending: boolean; - } - - export interface BrowseResources { - } - - export interface ClearQueue { - Cluster: string; - QueueName: string; - Comment: string; - ServerType: string; - NetworkAddress: string; - Port: number; - } - - export interface GetBuildInfo { - } - - export interface GetStatusServerInfo { - ServerName: string; - ServerType: string; - NetworkAddress: string; - Port: number; - } - - export interface GetThorQueueAvailability { - } - - export interface Index { - } - - export interface LockQuery { - EPIP: string; - XPath: string; - DurationMSLow: number; - DurationMSHigh: number; - TimeLockedLow: string; - TimeLockedHigh: string; - Mode: string; - AllFileLocks: boolean; - } - - export interface MoveJobBack { - ClusterType: number; - Cluster: string; - QueueName: string; - Wuid: string; - } - - export interface MoveJobDown { - ClusterType: number; - Cluster: string; - QueueName: string; - Wuid: string; - } - - export interface MoveJobFront { - ClusterType: number; - Cluster: string; - QueueName: string; - Wuid: string; - } - - export interface MoveJobUp { - ClusterType: number; - Cluster: string; - QueueName: string; - Wuid: string; - } - - export interface NotInCommunityEdition { - EEPortal: string; - } - - export interface PauseQueue { - Cluster: string; - QueueName: string; - Comment: string; - ServerType: string; - NetworkAddress: string; - Port: number; - } - - export interface Ping { - } - - export interface RemoveJob { - ClusterType: number; - Cluster: string; - QueueName: string; - Wuid: string; - } - - export interface ResumeQueue { - Cluster: string; - QueueName: string; - Comment: string; - ServerType: string; - NetworkAddress: string; - Port: number; - } - - export interface RoxieControlCmd { - ProcessCluster: string; - TargetCluster: string; - Command: string; - Wait: number; - } - - export interface SetBanner { - ChatURL: string; - BannerContent: string; - BannerColor: string; - BannerSize: string; - BannerScroll: string; - BannerAction: number; - EnableChatURL: boolean; - FromSubmitBtn: boolean; - } - - export interface SMCJob { - Wuid: string; - QueueName: string; - } - - export interface SMCJobs { - SMCJob: SMCJob[]; - } - - export interface SetJobPriority { - QueueName: string; - Wuid: string; - Priority: string; - SMCJobs: SMCJobs; - } - - export interface StopQueue { - Cluster: string; - QueueName: string; - Comment: string; - ServerType: string; - NetworkAddress: string; - Port: number; - } - - export interface Exception { - Code: string; - Audience: string; - Source: string; - Message: string; - } - - export interface Exceptions { - Source: string; - Exception: Exception[]; - } - - export interface TargetCluster { - ClusterName: string; - QueueName: string; - QueueStatus: string; - StatusDetails: string; - Warning: string; - ClusterType: number; - ClusterSize: number; - ClusterStatus: number; - } - - export interface ThorClusterList { - TargetCluster: TargetCluster[]; - } - - export interface TargetCluster2 { - ClusterName: string; - QueueName: string; - QueueStatus: string; - StatusDetails: string; - Warning: string; - ClusterType: number; - ClusterSize: number; - ClusterStatus: number; - } - - export interface RoxieClusterList { - TargetCluster: TargetCluster2[]; - } - - export interface TargetCluster3 { - ClusterName: string; - QueueName: string; - QueueStatus: string; - StatusDetails: string; - Warning: string; - ClusterType: number; - ClusterSize: number; - ClusterStatus: number; - } - - export interface HThorClusterList { - TargetCluster: TargetCluster3[]; - } - - export interface DFUJob { - TimeStarted: string; - Done: number; - Total: number; - Command: string; - } - - export interface DFUJobs { - DFUJob: DFUJob[]; - } - - export interface ActiveWorkunit { - Wuid: string; - State: string; - StateID: number; - Owner: string; - Jobname: string; - Server: string; - Instance: string; - Priority: string; - Extra: string; - GraphName: string; - Duration: string; - GID: string; - QueueName: string; - MemoryBlocked: number; - IsPausing: boolean; - Warning: string; - ClusterName: string; - ClusterType: string; - ClusterQueueName: string; - TargetClusterName: string; - } - - export interface Running { - ActiveWorkunit: ActiveWorkunit[]; - } - - export interface Queues { - ServerJobQueue: any[]; - } - - export interface ServerJobQueue { - QueueName: string; - Queues: Queues; - ServerName: string; - ServerType: string; - QueueStatus: string; - StatusDetails: string; - NetworkAddress: string; - Port: number; - } - - export interface ServerJobQueues { - ServerJobQueue: ServerJobQueue[]; - } - - export interface ActivityResponse { - Exceptions: Exceptions; - Build: string; - ThorClusterList: ThorClusterList; - RoxieClusterList: RoxieClusterList; - HThorClusterList: HThorClusterList; - DFUJobs: DFUJobs; - Running: Running; - BannerContent: string; - BannerColor: string; - BannerSize: string; - BannerScroll: string; - ChatURL: string; - ShowBanner: number; - ShowChatURL: number; - SortBy: string; - Descending: boolean; - SuperUser: boolean; - AccessRight: string; - ServerJobQueues: ServerJobQueues; - ActivityTime: string; - DaliDetached: boolean; - } - - export interface HPCCResource { - Name: string; - Description: string; - FileName: string; - Version: string; - } - - export interface HPCCResources { - HPCCResource: HPCCResource[]; - } - - export interface HPCCResourceRepository { - Name: string; - Path: string; - HPCCResources: HPCCResources; - } - - export interface HPCCResourceRepositories { - HPCCResourceRepository: HPCCResourceRepository[]; - } - - export interface BrowseResourcesResponse { - Exceptions: Exceptions; - PortalURL: string; - NetAddress: string; - OS: number; - UseResource: boolean; - HPCCResourceRepositories: HPCCResourceRepositories; - } - - export interface TargetClusterInfo { - ClusterName: string; - QueueName: string; - QueueStatus: string; - StatusDetails: string; - Warning: string; - ClusterType: number; - ClusterSize: number; - ClusterStatus: number; - } - - export interface Queues2 { - ServerJobQueue: any[]; - } - - export interface ServerInfo { - QueueName: string; - Queues: Queues2; - ServerName: string; - ServerType: string; - QueueStatus: string; - StatusDetails: string; - NetworkAddress: string; - Port: number; - } - - export interface ActiveWorkunit2 { - Wuid: string; - State: string; - StateID: number; - Owner: string; - Jobname: string; - Server: string; - Instance: string; - Priority: string; - Extra: string; - GraphName: string; - Duration: string; - GID: string; - QueueName: string; - MemoryBlocked: number; - IsPausing: boolean; - Warning: string; - ClusterName: string; - ClusterType: string; - ClusterQueueName: string; - TargetClusterName: string; - } - - export interface Workunits { - ActiveWorkunit: ActiveWorkunit2[]; - } - - export interface StatusServerInfo { - TargetClusterInfo: TargetClusterInfo; - ServerInfo: ServerInfo; - Workunits: Workunits; - } - - export interface SMCQueueResponse { - Exceptions: Exceptions; - StatusServerInfo: StatusServerInfo; - } - - export interface NamedValue { - Name: string; - Value: string; - } - - export interface BuildInfo { - NamedValue: NamedValue[]; - } - - export interface GetBuildInfoResponse { - Exceptions: Exceptions; - BuildInfo: BuildInfo; - } - - export interface TargetClusterInfo2 { - ClusterName: string; - QueueName: string; - QueueStatus: string; - StatusDetails: string; - Warning: string; - ClusterType: number; - ClusterSize: number; - ClusterStatus: number; - } - - export interface Queues3 { - ServerJobQueue: any[]; - } - - export interface ServerInfo2 { - QueueName: string; - Queues: Queues3; - ServerName: string; - ServerType: string; - QueueStatus: string; - StatusDetails: string; - NetworkAddress: string; - Port: number; - } - - export interface ActiveWorkunit3 { - Wuid: string; - State: string; - StateID: number; - Owner: string; - Jobname: string; - Server: string; - Instance: string; - Priority: string; - Extra: string; - GraphName: string; - Duration: string; - GID: string; - QueueName: string; - MemoryBlocked: number; - IsPausing: boolean; - Warning: string; - ClusterName: string; - ClusterType: string; - ClusterQueueName: string; - TargetClusterName: string; - } - - export interface Workunits2 { - ActiveWorkunit: ActiveWorkunit3[]; - } - - export interface StatusServerInfo2 { - TargetClusterInfo: TargetClusterInfo2; - ServerInfo: ServerInfo2; - Workunits: Workunits2; - } - - export interface GetStatusServerInfoResponse { - Exceptions: Exceptions; - StatusServerInfo: StatusServerInfo2; - } - - export interface ThorCluster { - ClusterName: string; - QueueName: string; - QueueStatus: string; - QueueAvailable: number; - JobsRunning: number; - JobsInQueue: number; - QueueStatus2: number; - ThorLCR: string; - ClusterSize: number; - } - - export interface ThorClusters { - ThorCluster: ThorCluster[]; - } - - export interface GetThorQueueAvailabilityResponse { - Exceptions: Exceptions; - ThorClusters: ThorClusters; - } - - export interface SMCIndexResponse { - Exceptions: Exceptions; - } - - export interface ModeNames { - Item: string[]; - } - - export interface Lock { - EPIP: string; - XPath: string; - LogicalFile: string; - SessionID: number; - DurationMS: number; - TimeLocked: string; - Modes: string; - ModeNames: ModeNames; - } - - export interface Locks { - Lock: Lock[]; - } - - export interface LockQueryResponse { - Exceptions: Exceptions; - Locks: Locks; - NumLocks: number; - } - - export interface SMCJobResponse { - Exceptions: Exceptions; - } - - export interface NotInCommunityEditionResponse { - Exceptions: Exceptions; - } - - export interface WsSMCPingResponse { - } - - export interface Endpoint { - Address: string; - Attached: boolean; - StateHash: string; - Status: string; - } - - export interface Endpoints { - Endpoint: Endpoint[]; - } - - export interface RoxieControlCmdResponse { - Exceptions: Exceptions; - Endpoints: Endpoints; - } - - export interface SetBannerResponse { - Exceptions: Exceptions; - } - - export interface SMCPriorityResponse { - Exceptions: Exceptions; - } -} - -export class SMCService { - private _connection: ESPConnection; - - constructor(optsConnection: IOptions | IConnection) { - this._connection = new ESPConnection(optsConnection, "WsSMC", "1.24"); - } +export class SMCService extends SMCServiceBase { connectionOptions(): IOptions { return this._connection.opts(); } - Activity(request: Partial): Promise { - return this._connection.send("Activity", request).then(response => { + Activity(request: WsSMC.Activity): Promise { + return super.Activity(request).then(response => { return { Running: { ActiveWorkunit: [] @@ -581,40 +21,4 @@ export class SMCService { }; }); } - - BrowseResources(request: Partial): Promise { - return this._connection.send("BrowseResources", request); - } - - GetBuildInfo(request: Partial): Promise { - return this._connection.send("GetBuildInfo", request); - } - - GetStatusServerInfo(request: Partial): Promise { - return this._connection.send("GetStatusServerInfo", request); - } - - GetThorQueueAvailability(request: Partial): Promise { - return this._connection.send("GetThorQueueAvailability", request); - } - - LockQuery(request: Partial): Promise { - return this._connection.send("LockQuery", request); - } - - NotInCommunityEdition(request: Partial): Promise { - return this._connection.send("NotInCommunityEdition", request); - } - - RoxieControlCmd(request: Partial): Promise { - return this._connection.send("RoxieControlCmd", request); - } - - SetBanner(request: Partial): Promise { - return this._connection.send("SetBanner", request); - } - - SMCJob(request: Partial): Promise { - return this._connection.send("SMCJob", request); - } } diff --git a/packages/comms/src/services/wsdl/WsSMC/v1.27/WsSMC.ts b/packages/comms/src/services/wsdl/WsSMC/v1.27/WsSMC.ts new file mode 100644 index 0000000000..1ef24c04f1 --- /dev/null +++ b/packages/comms/src/services/wsdl/WsSMC/v1.27/WsSMC.ts @@ -0,0 +1,670 @@ +import { IConnection, IOptions } from "../../../../connection"; +import { Service } from "../../../../espConnection"; + +export namespace WsSMC { + + export type int = number; + export type unsignedInt = number; + export type long = number; + + export enum LockModes { + ALL = "ALL", + READ = "READ", + WRITE = "WRITE", + HOLD = "HOLD", + SUB = "SUB" + } + + export enum RoxieControlCmdType { + Attach = "Attach", + Detach = "Detach", + State = "State", + Reload = "Reload", + ReloadRetry = "ReloadRetry", + MemLock = "MemLock", + MemUnlock = "MemUnlock", + GetMemLocked = "GetMemLocked" + } + + export interface Activity { + ChatURL: string; + BannerContent: string; + BannerColor: string; + BannerSize: string; + BannerScroll: string; + BannerAction: int; + EnableChatURL: boolean; + FromSubmitBtn: boolean; + SortBy: string; + Descending: boolean; + } + + export interface Exception { + Code: string; + Audience: string; + Source: string; + Message: string; + } + + export interface Exceptions { + Source: string; + Exception: Exception[]; + } + + export interface TargetCluster { + ClusterName: string; + QueueName: string; + QueueStatus: string; + StatusDetails: string; + Warning: string; + ClusterType: int; + ClusterSize: int; + ClusterStatus: int; + } + + export interface ThorClusterList { + TargetCluster: TargetCluster[]; + } + + export interface RoxieClusterList { + TargetCluster: TargetCluster[]; + } + + export interface HThorClusterList { + TargetCluster: TargetCluster[]; + } + + export interface DFUJob { + TimeStarted: string; + Done: int; + Total: int; + Command: string; + } + + export interface DFUJobs { + DFUJob: DFUJob[]; + } + + export interface ActiveWorkunit { + Wuid: string; + State: string; + StateID: int; + Owner: string; + Jobname: string; + Server: string; + Instance: string; + Priority: string; + Extra: string; + GraphName: string; + Duration: string; + GID: string; + QueueName: string; + MemoryBlocked: int; + IsPausing: boolean; + Warning: string; + ClusterName: string; + ClusterType: string; + ClusterQueueName: string; + TargetClusterName: string; + NoAccess: boolean; + } + + export interface Running { + ActiveWorkunit: ActiveWorkunit[]; + } + + export interface Queues { + ServerJobQueue: ServerJobQueue[]; + } + + export interface ServerJobQueue { + QueueName: string; + Queues: { + ServerJobQueue: ServerJobQueue[]; + }; + ServerName: string; + ServerType: string; + QueueStatus: string; + StatusDetails: string; + NetworkAddress: string; + Port: int; + } + + export interface ServerJobQueues { + ServerJobQueue: ServerJobQueue[]; + } + + export interface ActivityResponse { + Exceptions: { + Source: string; + Exception: Exception[]; + }; + Build: string; + ThorClusterList: { + TargetCluster: TargetCluster[]; + }; + RoxieClusterList: { + TargetCluster: TargetCluster[]; + }; + HThorClusterList: { + TargetCluster: TargetCluster[]; + }; + DFUJobs: { + DFUJob: DFUJob[]; + }; + Running: { + ActiveWorkunit: ActiveWorkunit[]; + }; + BannerContent: string; + BannerColor: string; + BannerSize: string; + BannerScroll: string; + ChatURL: string; + ShowBanner: int; + ShowChatURL: int; + SortBy: string; + Descending: boolean; + SuperUser: boolean; + AccessRight: string; + ServerJobQueues: { + ServerJobQueue: ServerJobQueue[]; + }; + ActivityTime: string; + DaliDetached: boolean; + } + + export interface BrowseResources { + + } + + export interface HPCCResource { + Name: string; + Description: string; + FileName: string; + Version: string; + } + + export interface HPCCResources { + HPCCResource: HPCCResource[]; + } + + export interface HPCCResourceRepository { + Name: string; + Path: string; + HPCCResources: { + HPCCResource: HPCCResource[]; + }; + } + + export interface HPCCResourceRepositories { + HPCCResourceRepository: HPCCResourceRepository[]; + } + + export interface BrowseResourcesResponse { + Exceptions: Exceptions; + PortalURL: string; + ESPInstance: string; + OS: int; + UseResource: boolean; + HPCCResourceRepositories: { + HPCCResourceRepository: HPCCResourceRepository[]; + }; + } + + export interface ClearQueue { + Cluster: string; + QueueName: string; + Comment: string; + ServerType: string; + NetworkAddress: string; + Port: int; + } + + export interface TargetClusterInfo { + ClusterName: string; + QueueName: string; + QueueStatus: string; + StatusDetails: string; + Warning: string; + ClusterType: int; + ClusterSize: int; + ClusterStatus: int; + } + + export interface ServerInfo { + QueueName: string; + Queues: Queues; + ServerName: string; + ServerType: string; + QueueStatus: string; + StatusDetails: string; + NetworkAddress: string; + Port: int; + } + + export interface Workunits { + ActiveWorkunit: ActiveWorkunit[]; + } + + export interface StatusServerInfo { + TargetClusterInfo: { + ClusterName: string; + QueueName: string; + QueueStatus: string; + StatusDetails: string; + Warning: string; + ClusterType: int; + ClusterSize: int; + ClusterStatus: int; + }; + ServerInfo: { + QueueName: string; + Queues: Queues; + ServerName: string; + ServerType: string; + QueueStatus: string; + StatusDetails: string; + NetworkAddress: string; + Port: int; + }; + Workunits: { + ActiveWorkunit: ActiveWorkunit[]; + }; + } + + export interface SMCQueueResponse { + Exceptions: Exceptions; + StatusServerInfo: { + TargetClusterInfo: { + ClusterName: string; + QueueName: string; + QueueStatus: string; + StatusDetails: string; + Warning: string; + ClusterType: int; + ClusterSize: int; + ClusterStatus: int; + }; + ServerInfo: { + QueueName: string; + Queues: Queues; + ServerName: string; + ServerType: string; + QueueStatus: string; + StatusDetails: string; + NetworkAddress: string; + Port: int; + }; + Workunits: { + ActiveWorkunit: ActiveWorkunit[]; + }; + }; + } + + export interface GetBuildInfo { + + } + + export interface NamedValue { + Name: string; + Value: string; + } + + export interface BuildInfo { + NamedValue: NamedValue[]; + } + + export interface GetBuildInfoResponse { + Exceptions: Exceptions; + BuildInfo: { + NamedValue: NamedValue[]; + }; + } + + export interface GetStatusServerInfo { + ServerName: string; + ServerType: string; + NetworkAddress: string; + Port: int; + } + + export interface GetStatusServerInfoResponse { + Exceptions: Exceptions; + StatusServerInfo: StatusServerInfo; + } + + export interface GetThorQueueAvailability { + + } + + export interface ThorCluster { + ClusterName: string; + QueueName: string; + QueueStatus: string; + QueueAvailable: int; + JobsRunning: int; + JobsInQueue: int; + QueueStatus2: int; + ThorLCR: string; + ClusterSize: int; + } + + export interface ThorClusters { + ThorCluster: ThorCluster[]; + } + + export interface GetThorQueueAvailabilityResponse { + Exceptions: Exceptions; + ThorClusters: { + ThorCluster: ThorCluster[]; + }; + } + + export interface Index { + + } + + export interface SMCIndexResponse { + Exceptions: Exceptions; + } + + export interface LockQuery { + EPIP: string; + XPath: string; + DurationMSLow: unsignedInt; + DurationMSHigh: unsignedInt; + TimeLockedLow: string; + TimeLockedHigh: string; + Mode: LockModes; + AllFileLocks: boolean; + } + + export interface ModeNames { + Item: string[]; + } + + export interface Lock { + EPIP: string; + XPath: string; + LogicalFile: string; + SessionID: long; + DurationMS: unsignedInt; + TimeLocked: string; + Modes: string; + ModeNames: { + Item: string[]; + }; + } + + export interface Locks { + Lock: Lock[]; + } + + export interface LockQueryResponse { + Exceptions: Exceptions; + Locks: { + Lock: Lock[]; + }; + NumLocks: int; + } + + export interface MoveJobBack { + ClusterType: int; + Cluster: string; + QueueName: string; + Wuid: string; + } + + export interface SMCJobResponse { + Exceptions: Exceptions; + } + + export interface MoveJobDown { + ClusterType: int; + Cluster: string; + QueueName: string; + Wuid: string; + } + + export interface MoveJobFront { + ClusterType: int; + Cluster: string; + QueueName: string; + Wuid: string; + } + + export interface MoveJobUp { + ClusterType: int; + Cluster: string; + QueueName: string; + Wuid: string; + } + + export interface NotInCommunityEdition { + EEPortal: string; + } + + export interface NotInCommunityEditionResponse { + Exceptions: Exceptions; + } + + export interface PauseQueue { + Cluster: string; + QueueName: string; + Comment: string; + ServerType: string; + NetworkAddress: string; + Port: int; + } + + export interface Ping { + + } + + export interface WsSMCPingResponse { + + } + + export interface RemoveJob { + ClusterType: int; + Cluster: string; + QueueName: string; + Wuid: string; + } + + export interface ResumeQueue { + Cluster: string; + QueueName: string; + Comment: string; + ServerType: string; + NetworkAddress: string; + Port: int; + } + + export interface RoxieControlCmd { + ProcessCluster: string; + TargetCluster: string; + Command: RoxieControlCmdType; + Wait: int; + } + + export interface Endpoint { + Address: string; + Attached: boolean; + StateHash: string; + Status: string; + MemLocked: boolean; + } + + export interface Endpoints { + Endpoint: Endpoint[]; + } + + export interface RoxieControlCmdResponse { + Exceptions: Exceptions; + Endpoints: { + Endpoint: Endpoint[]; + }; + } + + export interface QueryIds { + Item: string[]; + } + + export interface RoxieXrefCmd { + RoxieCluster: string; + QueryIds: { + Item: string[]; + }; + CheckAllNodes: boolean; + Wait: int; + } + + export interface RoxieXrefCmdResponse { + Exceptions: Exceptions; + Result: string; + } + + export interface SetBanner { + ChatURL: string; + BannerContent: string; + BannerColor: string; + BannerSize: string; + BannerScroll: string; + BannerAction: int; + EnableChatURL: boolean; + FromSubmitBtn: boolean; + } + + export interface SetBannerResponse { + Exceptions: Exceptions; + } + + export interface SMCJob { + Wuid: string; + QueueName: string; + } + + export interface SMCJobs { + SMCJob: SMCJob[]; + } + + export interface SetJobPriority { + QueueName: string; + Wuid: string; + Priority: string; + SMCJobs: { + SMCJob: SMCJob[]; + }; + } + + export interface SMCPriorityResponse { + Exceptions: Exceptions; + } + + export interface StopQueue { + Cluster: string; + QueueName: string; + Comment: string; + ServerType: string; + NetworkAddress: string; + Port: int; + } + +} + +export class SMCServiceBase extends Service { + + constructor(optsConnection: IOptions | IConnection) { + super(optsConnection, "WsSMC", "1.27"); + } + + Activity(request: WsSMC.Activity): Promise { + return this._connection.send("Activity", request, "json", false, undefined, "ActivityResponse"); + } + + BrowseResources(request: WsSMC.BrowseResources): Promise { + return this._connection.send("BrowseResources", request, "json", false, undefined, "BrowseResourcesResponse"); + } + + ClearQueue(request: WsSMC.ClearQueue): Promise { + return this._connection.send("ClearQueue", request, "json", false, undefined, "SMCQueueResponse"); + } + + GetBuildInfo(request: WsSMC.GetBuildInfo): Promise { + return this._connection.send("GetBuildInfo", request, "json", false, undefined, "GetBuildInfoResponse"); + } + + GetStatusServerInfo(request: WsSMC.GetStatusServerInfo): Promise { + return this._connection.send("GetStatusServerInfo", request, "json", false, undefined, "GetStatusServerInfoResponse"); + } + + GetThorQueueAvailability(request: WsSMC.GetThorQueueAvailability): Promise { + return this._connection.send("GetThorQueueAvailability", request, "json", false, undefined, "GetThorQueueAvailabilityResponse"); + } + + Index(request: WsSMC.Index): Promise { + return this._connection.send("Index", request, "json", false, undefined, "SMCIndexResponse"); + } + + LockQuery(request: WsSMC.LockQuery): Promise { + return this._connection.send("LockQuery", request, "json", false, undefined, "LockQueryResponse"); + } + + MoveJobBack(request: WsSMC.MoveJobBack): Promise { + return this._connection.send("MoveJobBack", request, "json", false, undefined, "SMCJobResponse"); + } + + MoveJobDown(request: WsSMC.MoveJobDown): Promise { + return this._connection.send("MoveJobDown", request, "json", false, undefined, "SMCJobResponse"); + } + + MoveJobFront(request: WsSMC.MoveJobFront): Promise { + return this._connection.send("MoveJobFront", request, "json", false, undefined, "SMCJobResponse"); + } + + MoveJobUp(request: WsSMC.MoveJobUp): Promise { + return this._connection.send("MoveJobUp", request, "json", false, undefined, "SMCJobResponse"); + } + + NotInCommunityEdition(request: WsSMC.NotInCommunityEdition): Promise { + return this._connection.send("NotInCommunityEdition", request, "json", false, undefined, "NotInCommunityEditionResponse"); + } + + PauseQueue(request: WsSMC.PauseQueue): Promise { + return this._connection.send("PauseQueue", request, "json", false, undefined, "SMCQueueResponse"); + } + + Ping(request: WsSMC.Ping): Promise { + return this._connection.send("Ping", request, "json", false, undefined, "WsSMCPingResponse"); + } + + RemoveJob(request: WsSMC.RemoveJob): Promise { + return this._connection.send("RemoveJob", request, "json", false, undefined, "SMCJobResponse"); + } + + ResumeQueue(request: WsSMC.ResumeQueue): Promise { + return this._connection.send("ResumeQueue", request, "json", false, undefined, "SMCQueueResponse"); + } + + RoxieControlCmd(request: WsSMC.RoxieControlCmd): Promise { + return this._connection.send("RoxieControlCmd", request, "json", false, undefined, "RoxieControlCmdResponse"); + } + + RoxieXrefCmd(request: WsSMC.RoxieXrefCmd): Promise { + return this._connection.send("RoxieXrefCmd", request, "json", false, undefined, "RoxieXrefCmdResponse"); + } + + SetBanner(request: WsSMC.SetBanner): Promise { + return this._connection.send("SetBanner", request, "json", false, undefined, "SetBannerResponse"); + } + + SetJobPriority(request: WsSMC.SetJobPriority): Promise { + return this._connection.send("SetJobPriority", request, "json", false, undefined, "SMCPriorityResponse"); + } + + StopQueue(request: WsSMC.StopQueue): Promise { + return this._connection.send("StopQueue", request, "json", false, undefined, "SMCQueueResponse"); + } + +}