1 | import { Error } from "./types.js";
|
2 | export declare function auth(accessToken: string): {
|
3 | type: string;
|
4 | access_token: string;
|
5 | };
|
6 | export declare function states(): {
|
7 | type: string;
|
8 | };
|
9 | export declare function config(): {
|
10 | type: string;
|
11 | };
|
12 | export declare function services(): {
|
13 | type: string;
|
14 | };
|
15 | export declare function user(): {
|
16 | type: string;
|
17 | };
|
18 | declare type ServiceCallMessage = {
|
19 | type: "call_service";
|
20 | domain: string;
|
21 | service: string;
|
22 | service_data?: object;
|
23 | };
|
24 | export declare function callService(domain: string, service: string, serviceData?: object): ServiceCallMessage;
|
25 | declare type SubscribeEventMessage = {
|
26 | type: "subscribe_events";
|
27 | event_type?: string;
|
28 | };
|
29 | export declare function subscribeEvents(eventType?: string): SubscribeEventMessage;
|
30 | export declare function unsubscribeEvents(subscription: number): {
|
31 | type: string;
|
32 | subscription: number;
|
33 | };
|
34 | export declare function ping(): {
|
35 | type: string;
|
36 | };
|
37 | export declare function error(code: Error, message: string): {
|
38 | type: string;
|
39 | success: boolean;
|
40 | error: {
|
41 | code: Error;
|
42 | message: string;
|
43 | };
|
44 | };
|
45 | export {};
|