emotiv-ts
Version:
A Typescript library that wraps the Cortex API functionalities to communicate with Emotiv headsets
18 lines (17 loc) • 977 B
TypeScript
import type { w3cwebsocket } from 'websocket';
import type { Application } from "../models/application";
import { Access } from "../models/responses/authentication/access";
import { Authorisation } from "../models/responses/authentication/authorisation";
import { License } from "../models/responses/authentication/license";
import type { CortexRequest } from "../models/internal/cortex-request";
import type { CortexResponse } from "../models/internal/cortex-response";
export declare class AuthenticationService {
socket: w3cwebsocket;
private static authorisation;
constructor(socket: w3cwebsocket);
requestAccess(application: Application): Promise<Access>;
authorize(application: Application): Promise<Authorisation>;
getLicenseInfo(): Promise<License>;
static getAuthToken(): string;
requestCortexAPI<R extends CortexResponse>(context: any, request: CortexRequest, onSuccess: (data: any) => R, onError?: (error: any) => any): Promise<R>;
}