11
2- export class factory {
3- createClient ( ) : client ;
2+ export class Factory {
3+ createClient ( ) : Client ;
44}
55
6- export interface subscribeOptions {
6+ export interface SubscribeOptions {
77 channel : string ;
88 subscribeOnReconnected ?: boolean ;
99 filter ?: string ;
1010 subscriberId ?: string ;
1111}
1212
13- export interface messageOptions {
13+ export interface MessageOptions {
1414 channel : string ;
1515 seqId : string ;
1616 filtered : boolean ;
1717 message : string ;
1818}
1919
20- export interface presenceParameters {
20+ export interface PresenceParameters {
2121 applicationKey ?: string ;
2222 authenticationToken ?: string ;
2323 channel : string ;
2424 isCluster ?: boolean ;
2525 url ?: string ;
2626}
2727
28- export interface presenceResult {
28+ export interface PresenceResult {
2929 metadata ?: { [ metadata : string ] : number } ;
3030 subscriptions : number ;
3131}
3232
33- export class client {
33+ export class Client {
3434 setClusterUrl ( url : string ) : void ;
3535 getAnnouncementSubChannel ( ) : string ;
3636 getClusterUrl ( ) : string ;
@@ -45,7 +45,7 @@ export class client {
4545 getUrl ( ) : string ;
4646 getIsConnected ( ) : boolean ;
4747 isSubscribed ( channel : string ) : boolean ;
48- presence ( params : presenceParameters , callback : ( error : string , result : presenceResult ) => void ) : void ;
48+ presence ( params : PresenceParameters , callback : ( error : string , result : PresenceResult ) => void ) : void ;
4949 setAnnouncementSubChannel ( channel : string ) : void ;
5050 setConnectionMetadata ( connectionMetadata : string ) : void ;
5151 setConnectionTimeout ( connectionTimeout : number ) : void ;
@@ -58,21 +58,21 @@ export class client {
5858 getPublishTimeout ( ) : number ;
5959 setPublishTimeout ( newTimeout : number ) : void ;
6060
61- onConnected ( ortc : client ) : void ;
62- onDisconnected ( ortc : client ) : void ;
63- onException ( ortc : client , exception : string ) : void ;
64- onReconnected ( ortc : client ) : void ;
65- onReconnecting ( ortc : client ) : void ;
66- onSubscribed ( ortc : client , channel : string ) : void ;
67- onUnsubscribed ( ortc : client , channel : string ) : void ;
61+ onConnected ( ortc : Client ) : void ;
62+ onDisconnected ( ortc : Client ) : void ;
63+ onException ( ortc : Client , exception : string ) : void ;
64+ onReconnected ( ortc : Client ) : void ;
65+ onReconnecting ( ortc : Client ) : void ;
66+ onSubscribed ( ortc : Client , channel : string ) : void ;
67+ onUnsubscribed ( ortc : Client , channel : string ) : void ;
6868
6969 connect ( appkey : string , token : string ) : void ;
70- subscribe ( channel : string , subscribeOnReconnected : boolean , onMessageCallback : ( ortc : client , channel : string , message : string ) => void ) : void ;
71- subscribeWithFilter ( channel : string , subscribeOnReconnected : boolean , filter : string , onMessageWithFilter : ( ortc : client , channel :string , filtered : boolean , message : string ) => void ) : void ;
70+ subscribe ( channel : string , subscribeOnReconnected : boolean , onMessageCallback : ( ortc : Client , channel : string , message : string ) => void ) : void ;
71+ subscribeWithFilter ( channel : string , subscribeOnReconnected : boolean , filter : string , onMessageWithFilter : ( ortc : Client , channel :string , filtered : boolean , message : string ) => void ) : void ;
7272
73- subscribeWithBuffer ( channel : string , subscriberId : string , onMessageWithBuffer : ( ortc : client , channel : string , seqId : string , message : string ) => void ) : void ;
73+ subscribeWithBuffer ( channel : string , subscriberId : string , onMessageWithBuffer : ( ortc : Client , channel : string , seqId : string , message : string ) => void ) : void ;
7474
75- subscribeWithOptions ( options : subscribeOptions , onMessageWithOptions : ( ortc : client , msgOptions : messageOptions ) => void ) : void ;
75+ subscribeWithOptions ( options : SubscribeOptions , onMessageWithOptions : ( ortc : Client , msgOptions : MessageOptions ) => void ) : void ;
7676
7777 send ( channel : string , message : string ) : void ;
7878 publish ( channel : string , message : string , ttl : number , resultCallback : ( err : string , seqId : string ) => void ) : void ;
@@ -83,5 +83,5 @@ export class client {
8383}
8484
8585export const IbtRealTimeSJType : string ;
86- export function createClient ( ) : client ;
87- export function loadOrtcFactory ( type : string , callback : ( factory : factory , error : string ) => void ) : void ;
86+ export function createClient ( ) : Client ;
87+ export function loadOrtcFactory ( type : string , callback : ( factory : Factory , error : string ) => void ) : void ;
0 commit comments