Begin request typing
This commit is contained in:
@@ -11,15 +11,10 @@ export default abstract class InterfaceConnectionObject<ConfigInterface> {
|
||||
protected abstract readonly connectionType: ConnectionType;
|
||||
protected abstract readonly supportsSubscriptions: boolean;
|
||||
|
||||
protected readonly connectionParameter: ConfigInterface;
|
||||
protected readonly endpointMetadata: EndpointMetadata;
|
||||
private readonly onResponseCallback: OnResponseCallback;
|
||||
|
||||
public constructor(connectionParameter: ConfigInterface, endpointMetadata: EndpointMetadata, onResponseCallback: OnResponseCallback) {
|
||||
this.connectionParameter = connectionParameter;
|
||||
this.endpointMetadata = endpointMetadata;
|
||||
this.onResponseCallback = onResponseCallback;
|
||||
}
|
||||
public constructor(
|
||||
protected readonly connectionParameter: ConfigInterface,
|
||||
protected readonly endpointMetadata: EndpointMetadata,
|
||||
private readonly onResponseCallback: OnResponseCallback) {}
|
||||
|
||||
public abstract connect(): boolean;
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
export type Request = "TODO"
|
||||
import { types } from "@aas-core-works/aas-core3.0-typescript";
|
||||
|
||||
export type OnRequestCallback = (request: Request) => void
|
||||
export type Request = {
|
||||
type: RequestType;
|
||||
target: types.Reference | types.Class | string[];
|
||||
extraData?: any;
|
||||
}
|
||||
|
||||
export type OnRequestCallback = (request: Request) => void
|
||||
|
||||
type RequestType = "READ" | "WRITE" | "OBSERVE" | "CALL" | "CALL-ASYNC" | "GET-OP-STATE" | "GET-OP-RESULT" | "SUBSCRIBE" | "UNSUBSCRIBE"
|
||||
Reference in New Issue
Block a user