diff --git a/packages/comms/src/services/wsLogaccess.ts b/packages/comms/src/services/wsLogaccess.ts index 558e92146d..b93a0f2c37 100644 --- a/packages/comms/src/services/wsLogaccess.ts +++ b/packages/comms/src/services/wsLogaccess.ts @@ -1,5 +1,5 @@ import { scopedLogger } from "@hpcc-js/util"; -import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.04/ws_logaccess"; +import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.05/ws_logaccess"; const logger = scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts"); @@ -17,6 +17,7 @@ export interface GetLogsExRequest { threadid?: string; timestamp?: string; components?: string; + instance?: string; StartDate?: Date; EndDate?: Date; LogLineStartFrom: number, @@ -50,6 +51,7 @@ export interface LogLine { threadid?: number; timestamp?: string; components?: string; + instance?: string; } export interface GetLogsExResponse { diff --git a/packages/comms/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts b/packages/comms/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts new file mode 100644 index 0000000000..ae87d420fe --- /dev/null +++ b/packages/comms/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts @@ -0,0 +1,219 @@ +import { IConnection, IOptions } from "../../../../connection"; +import { Service } from "../../../../espConnection"; + +export namespace WsLogaccess { + + export type dateTime = string; + export type unsignedInt = number; + export type long = number; + + export enum LogColumnType { + global = "global", + workunits = "workunits", + components = "components", + audience = "audience", + class = "class", + instance = "instance", + node = "node", + message = "message", + logid = "logid", + processid = "processid", + threadid = "threadid", + timestamp = "timestamp", + pod = "pod" + } + + export enum LogColumnValueType { + string = "string", + numeric = "numeric", + datetime = "datetime", + enum = "enum" + } + + export enum LogAccessType { + All = 0, + ByJobID = 1, + ByComponent = 2, + ByLogType = 3, + ByTargetAudience = 4, + BySourceInstance = 5, + BySourceNode = 6, + ByFieldName = 7, + ByPod = 8 + } + + export enum LogAccessFilterOperator { + NONE = 0, + AND = 1, + OR = 2 + } + + export enum LogSelectColumnMode { + MIN = 0, + DEFAULT = 1, + ALL = 2, + CUSTOM = 3 + } + + export enum SortColumType { + ByDate = 0, + ByJobID = 1, + ByComponent = 2, + ByLogType = 3, + ByTargetAudience = 4, + BySourceInstance = 5, + BySourceNode = 6, + ByFieldName = 7, + ByPod = 8 + } + + export enum SortDirection { + ASC = 0, + DSC = 1 + } + + export interface GetLogAccessInfoRequest { + + } + + export interface EnumeratedValues { + Item: string[]; + } + + export interface Column { + Name: string; + LogType: LogColumnType; + EnumeratedValues: { + Item: string[]; + }; + ColumnMode: LogSelectColumnMode; + ColumnType: LogColumnValueType; + } + + export interface Columns { + Column: Column[]; + } + + export interface GetLogAccessInfoResponse { + Columns: { + Column: Column[]; + }; + RemoteLogManagerType: string; + RemoteLogManagerConnectionString: string; + SupportsResultPaging: boolean; + } + + export interface leftFilter { + LogCategory: LogAccessType; + SearchByValue: string; + SearchField: string; + } + + export interface rightFilter { + LogCategory: LogAccessType; + SearchByValue: string; + SearchField: string; + } + + export interface rightBinaryFilter { + BinaryLogFilter: BinaryLogFilter[]; + } + + export interface BinaryLogFilter { + leftFilter: leftFilter; + leftBinaryFilter: leftBinaryFilter; + Operator: LogAccessFilterOperator; + rightFilter: { + LogCategory: LogAccessType; + SearchByValue: string; + SearchField: string; + }; + rightBinaryFilter: { + BinaryLogFilter: BinaryLogFilter[]; + }; + } + + export interface leftBinaryFilter { + BinaryLogFilter: BinaryLogFilter[]; + } + + export interface Filter { + leftFilter: leftFilter; + leftBinaryFilter: leftBinaryFilter; + Operator: LogAccessFilterOperator; + rightFilter: rightFilter; + rightBinaryFilter: rightBinaryFilter; + } + + export interface Range { + StartDate: dateTime; + EndDate: dateTime; + } + + export interface SortCondition { + BySortType: SortColumType; + ColumnName: string; + Direction: SortDirection; + } + + export interface SortBy { + SortCondition: SortCondition[]; + } + + export interface GetLogsRequest { + Filter?: { + leftFilter?: leftFilter; + leftBinaryFilter?: leftBinaryFilter; + Operator?: LogAccessFilterOperator; + rightFilter?: rightFilter; + rightBinaryFilter?: rightBinaryFilter; + }; + Range?: { + StartDate?: dateTime; + EndDate?: dateTime; + }; + LogLineLimit?: unsignedInt; + LogLineStartFrom?: long; + SelectColumnMode?: LogSelectColumnMode; + Columns?: Columns; + Format?: string; + SortBy?: { + SortCondition?: SortCondition[]; + }; + } + + export interface GetLogsResponse { + LogLines: string; + LogLineCount: unsignedInt; + TotalLogLinesAvailable: unsignedInt; + } + + export interface ws_logaccessPingRequest { + + } + + export interface ws_logaccessPingResponse { + + } + +} + +export class LogaccessServiceBase extends Service { + + constructor(optsConnection: IOptions | IConnection) { + super(optsConnection, "ws_logaccess", "1.05"); + } + + GetLogAccessInfo(request: WsLogaccess.GetLogAccessInfoRequest): Promise { + return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse"); + } + + GetLogs(request: WsLogaccess.GetLogsRequest): Promise { + return this._connection.send("GetLogs", request, "json", false, undefined, "GetLogsResponse"); + } + + Ping(request: WsLogaccess.ws_logaccessPingRequest): Promise { + return this._connection.send("Ping", request, "json", false, undefined, "ws_logaccessPingResponse"); + } + +}