Files
node-intellicenter/messages/request.ts
Parnic c7e2ab7675 Initial request/response object structure
No idea if this will be the best way to represent this stuff long-term, but it's working at the moment. I have some reservations about attempting to list all the possible ResponseParam keys, but I'm already this far in and it would be nice if it worked out...
2025-01-03 10:57:54 -06:00

22 lines
450 B
TypeScript

import { v4 as uuidv4 } from "uuid";
export class ICRequestObj {
public objnam = "";
public keys: string[] = [];
}
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;
}