|
8 | 8 |
|
9 | 9 | // TODO: change all the occurences where we use CbCallback<any> to supply the actual type that is returned |
10 | 10 |
|
| 11 | +declare module 'clearblade-js-client' { |
| 12 | + export interface ClearBlade { |
| 13 | + new (): IClearBlade; |
| 14 | + |
| 15 | + MESSAGING_QOS_AT_MOST_ONCE: MessagingQOS.MESSAGING_QOS_AT_MOST_ONCE; |
| 16 | + MESSAGING_QOS_AT_LEAST_ONCE: MessagingQOS.MESSAGING_QOS_AT_LEAST_ONCE; |
| 17 | + MESSAGING_QOS_EXACTLY_ONCE: MessagingQOS.MESSAGING_QOS_EXACTLY_ONCE; |
| 18 | + |
| 19 | + request(options: RequestOptions, callback: CbCallback<any>): void; |
| 20 | + getMessageTopic( |
| 21 | + destinationName: string, |
| 22 | + callbackDict: CbDictionary<string, Function> |
| 23 | + ): string; |
| 24 | + } |
| 25 | +} |
| 26 | + |
11 | 27 | declare enum MessagingQOS { |
12 | 28 | MESSAGING_QOS_AT_MOST_ONCE = 0, |
13 | 29 | MESSAGING_QOS_AT_LEAST_ONCE = 1, |
@@ -70,19 +86,6 @@ interface InvocationContext { |
70 | 86 | } |
71 | 87 |
|
72 | 88 | type CbDictionary<K extends string, T> = { [P in K]?: T }; |
73 | | -interface IClearBladeGlobal { |
74 | | - new (): IClearBlade; |
75 | | - |
76 | | - MESSAGING_QOS_AT_MOST_ONCE: MessagingQOS.MESSAGING_QOS_AT_MOST_ONCE; |
77 | | - MESSAGING_QOS_AT_LEAST_ONCE: MessagingQOS.MESSAGING_QOS_AT_LEAST_ONCE; |
78 | | - MESSAGING_QOS_EXACTLY_ONCE: MessagingQOS.MESSAGING_QOS_EXACTLY_ONCE; |
79 | | - |
80 | | - request(options: RequestOptions, callback: CbCallback<any>): void; |
81 | | - getMessageTopic( |
82 | | - destinationName: string, |
83 | | - callbackDict: CbDictionary<string, Function> |
84 | | - ): string; |
85 | | -} |
86 | 89 |
|
87 | 90 | interface IClearBlade { |
88 | 91 | systemKey: string; |
|
0 commit comments