@signalwire/core
Version:
Shared code for the SignalWire JS SDK
42 lines • 979 B
TypeScript
type WithToken = {
token: string;
jwt_token?: never;
};
type WithJWT = {
token?: never;
jwt_token: string;
};
type RPCConnectAuthentication = {
project?: string;
} & (WithToken | WithJWT);
export type RPCConnectParams = {
authentication: RPCConnectAuthentication;
version?: typeof DEFAULT_CONNECT_VERSION;
agent?: string;
protocol?: string;
authorization_state?: string;
contexts?: string[];
topics?: string[];
eventing?: string[];
event_acks?: boolean;
};
export declare const DEFAULT_CONNECT_VERSION: {
major: number;
minor: number;
revision: number;
};
export declare const UNIFIED_CONNECT_VERSION: {
major: number;
minor: number;
revision: number;
};
export declare const RPCConnect: (params: RPCConnectParams) => {
id: string;
method: import("..").JSONRPCMethod;
params: {
[key: string]: any;
};
jsonrpc: "2.0";
};
export {};
//# sourceMappingURL=RPCConnect.d.ts.map