mirror of
https://github.com/parnic/node-intellicenter.git
synced 2025-06-17 02:21:53 -05:00
I was trying to make a websocket test, but the "ws" library doesn't appear to be easily mocked and I prefer to use it over the built-in WebSocket. So we'll see what I can do in the future.
24 lines
515 B
TypeScript
24 lines
515 B
TypeScript
import { v4 as uuidv4 } from "uuid";
|
|
import { ICParam } from "./param.js";
|
|
|
|
export class ICRequestObj {
|
|
public objnam = "";
|
|
public keys: string[] = [];
|
|
public params?: ICParam;
|
|
}
|
|
|
|
export class ICRequest {
|
|
public condition?: string;
|
|
public objectList?: ICRequestObj[];
|
|
public queryName?: string;
|
|
public arguments?: string[] | string;
|
|
public command = "";
|
|
public messageID = "";
|
|
}
|
|
|
|
export function GetRequest(): ICRequest {
|
|
const req = new ICRequest();
|
|
req.messageID = uuidv4();
|
|
return req;
|
|
}
|