Skip to content

Commit 2fe055c

Browse files
authored
Merge pull request #4376 from jeclrsg/bump-ws-logaccess-1.08
chore(comms): bump WsLogAccess wsdl to 1.08
2 parents 4055a0f + 1296b80 commit 2fe055c

File tree

3 files changed

+269
-2
lines changed

3 files changed

+269
-2
lines changed

packages/comms/src/services/wsLogaccess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { scopedLogger } from "@hpcc-js/util";
2-
import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.05/ws_logaccess";
2+
import { LogaccessServiceBase, WsLogaccess } from "./wsdl/ws_logaccess/v1.08/ws_logaccess";
33

44
const logger = scopedLogger("@hpcc-js/comms/services/wsLogaccess.ts");
55

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
import { IConnection, IOptions } from "../../../../connection";
2+
import { Service } from "../../../../espConnection";
3+
4+
export namespace WsLogaccess {
5+
6+
export type dateTime = string;
7+
export type unsignedInt = number;
8+
export type long = number;
9+
10+
export enum LogColumnType {
11+
global = "global",
12+
workunits = "workunits",
13+
components = "components",
14+
audience = "audience",
15+
class = "class",
16+
instance = "instance",
17+
node = "node",
18+
message = "message",
19+
logid = "logid",
20+
processid = "processid",
21+
threadid = "threadid",
22+
timestamp = "timestamp",
23+
pod = "pod",
24+
traceid = "traceid",
25+
spanid = "spanid"
26+
}
27+
28+
export enum LogColumnValueType {
29+
string = "string",
30+
numeric = "numeric",
31+
datetime = "datetime",
32+
enum = "enum",
33+
epoch = "epoch"
34+
}
35+
36+
export enum LogAccessType {
37+
All = 0,
38+
ByJobID = 1,
39+
ByComponent = 2,
40+
ByLogType = 3,
41+
ByTargetAudience = 4,
42+
BySourceInstance = 5,
43+
BySourceNode = 6,
44+
ByFieldName = 7,
45+
ByPod = 8,
46+
ByTraceID = 9,
47+
BySpanID = 10
48+
}
49+
50+
export enum LogAccessStatusCode {
51+
Success = 0,
52+
Warning = 1,
53+
Fail = 2
54+
}
55+
56+
export enum LogAccessFilterOperator {
57+
NONE = 0,
58+
AND = 1,
59+
OR = 2
60+
}
61+
62+
export enum LogSelectColumnMode {
63+
MIN = 0,
64+
DEFAULT = 1,
65+
ALL = 2,
66+
CUSTOM = 3
67+
}
68+
69+
export enum SortColumType {
70+
ByDate = 0,
71+
ByJobID = 1,
72+
ByComponent = 2,
73+
ByLogType = 3,
74+
ByTargetAudience = 4,
75+
BySourceInstance = 5,
76+
BySourceNode = 6,
77+
ByFieldName = 7,
78+
ByPod = 8,
79+
ByTraceID = 9,
80+
BySpanID = 10
81+
}
82+
83+
export enum SortDirection {
84+
ASC = 0,
85+
DSC = 1
86+
}
87+
88+
export interface GetHealthReportRequest {
89+
IncludeConfiguration?: boolean;
90+
IncludeDebugReport?: boolean;
91+
IncludeSampleQuery?: boolean;
92+
}
93+
94+
export interface Exception {
95+
Code: string;
96+
Audience: string;
97+
Source: string;
98+
Message: string;
99+
}
100+
101+
export interface Exceptions {
102+
Source: string;
103+
Exception: Exception[];
104+
}
105+
106+
export interface Messages {
107+
Item: string[];
108+
}
109+
110+
export interface Status {
111+
Code: LogAccessStatusCode;
112+
Messages: Messages;
113+
}
114+
115+
export interface DebugReport {
116+
SampleQueryReport: string;
117+
PluginDebugReport: string;
118+
ServerDebugReport: string;
119+
}
120+
121+
export interface GetHealthReportResponse {
122+
Exceptions: Exceptions;
123+
Status: Status;
124+
DebugReport: DebugReport;
125+
Configuration: string;
126+
}
127+
128+
export interface GetLogAccessInfoRequest {
129+
130+
}
131+
132+
export interface EnumeratedValues {
133+
Item: string[];
134+
}
135+
136+
export interface Column {
137+
Name: string;
138+
LogType: LogColumnType;
139+
EnumeratedValues: EnumeratedValues;
140+
ColumnMode: LogSelectColumnMode;
141+
ColumnType: LogColumnValueType;
142+
}
143+
144+
export interface Columns {
145+
Column: Column[];
146+
}
147+
148+
export interface GetLogAccessInfoResponse {
149+
Exceptions: Exceptions;
150+
Columns: Columns;
151+
RemoteLogManagerType: string;
152+
RemoteLogManagerConnectionString: string;
153+
SupportsResultPaging: boolean;
154+
}
155+
156+
export interface leftFilter {
157+
LogCategory: LogAccessType;
158+
SearchByValue: string;
159+
SearchField: string;
160+
}
161+
162+
export interface rightFilter {
163+
LogCategory: LogAccessType;
164+
SearchByValue: string;
165+
SearchField: string;
166+
}
167+
168+
export interface rightBinaryFilter {
169+
BinaryLogFilter: BinaryLogFilter[];
170+
}
171+
172+
export interface BinaryLogFilter {
173+
leftFilter: leftFilter;
174+
leftBinaryFilter: leftBinaryFilter;
175+
Operator: LogAccessFilterOperator;
176+
rightFilter: {
177+
LogCategory: LogAccessType;
178+
SearchByValue: string;
179+
SearchField: string;
180+
};
181+
rightBinaryFilter: {
182+
BinaryLogFilter: BinaryLogFilter[];
183+
};
184+
}
185+
186+
export interface leftBinaryFilter {
187+
BinaryLogFilter: BinaryLogFilter[];
188+
}
189+
190+
export interface Filter {
191+
leftFilter?: leftFilter;
192+
leftBinaryFilter?: leftBinaryFilter;
193+
Operator?: LogAccessFilterOperator;
194+
rightFilter?: rightFilter;
195+
rightBinaryFilter?: rightBinaryFilter;
196+
}
197+
198+
export interface Range {
199+
StartDate?: dateTime;
200+
EndDate?: dateTime;
201+
}
202+
203+
export interface Columns2 {
204+
Item: string[];
205+
}
206+
207+
export interface SortCondition {
208+
BySortType: SortColumType;
209+
ColumnName: string;
210+
Direction: SortDirection;
211+
}
212+
213+
export interface SortBy {
214+
SortCondition: SortCondition[];
215+
}
216+
217+
export interface GetLogsRequest {
218+
Filter?: Filter;
219+
Range?: Range;
220+
LogLineLimit?: unsignedInt;
221+
LogLineStartFrom?: long;
222+
SelectColumnMode?: LogSelectColumnMode;
223+
Columns?: Columns2;
224+
Format?: string;
225+
SortBy?: SortBy;
226+
}
227+
228+
export interface GetLogsResponse {
229+
Exceptions: Exceptions;
230+
LogLines: string;
231+
LogLineCount: unsignedInt;
232+
TotalLogLinesAvailable: unsignedInt;
233+
}
234+
235+
export interface ws_logaccessPingRequest {
236+
237+
}
238+
239+
export interface ws_logaccessPingResponse {
240+
241+
}
242+
243+
}
244+
245+
export class LogaccessServiceBase extends Service {
246+
247+
constructor(optsConnection: IOptions | IConnection) {
248+
super(optsConnection, "ws_logaccess", "1.08");
249+
}
250+
251+
GetHealthReport(request: Partial<WsLogaccess.GetHealthReportRequest>): Promise<WsLogaccess.GetHealthReportResponse> {
252+
return this._connection.send("GetHealthReport", request, "json", false, undefined, "GetHealthReportResponse");
253+
}
254+
255+
GetLogAccessInfo(request: Partial<WsLogaccess.GetLogAccessInfoRequest>): Promise<WsLogaccess.GetLogAccessInfoResponse> {
256+
return this._connection.send("GetLogAccessInfo", request, "json", false, undefined, "GetLogAccessInfoResponse");
257+
}
258+
259+
GetLogs(request: Partial<WsLogaccess.GetLogsRequest>): Promise<WsLogaccess.GetLogsResponse> {
260+
return this._connection.send("GetLogs", request, "json", false, undefined, "GetLogsResponse");
261+
}
262+
263+
Ping(request: Partial<WsLogaccess.ws_logaccessPingRequest>): Promise<WsLogaccess.ws_logaccessPingResponse> {
264+
return this._connection.send("Ping", request, "json", false, undefined, "ws_logaccessPingResponse");
265+
}
266+
267+
}

packages/comms/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ wsdlToTs(args.url)
246246
}
247247
}
248248

249-
const serviceVersion = `v${methods[0]?.version}` ?? "";
249+
const serviceVersion = `v${methods[0]?.version ?? "0"}`;
250250
const finalPath = path.join(outDir, origNS.replace(/^WS/, "Ws"), serviceVersion);
251251
const relativePath = path.relative(path.join(cwd, finalPath), path.join(cwd, "./src")).replace(/\\/g, "/");
252252
lines.unshift("\n\n");

0 commit comments

Comments
 (0)