@heycharles/browser-sdk
Advanced tools
Comparing version 2.31.0 to 2.32.0
@@ -0,1 +1,8 @@ | ||
# [2.32.0](https://github.com/c-commerce/charles-browser-sdk/compare/v2.31.0...v2.32.0) (2020-03-27) | ||
### Features | ||
* **feed:** unsubscribe feed ([e812e94](https://github.com/c-commerce/charles-browser-sdk/commit/e812e9458cdbaab012d3ffa566e207e6b8c89d5f)) | ||
# [2.31.0](https://github.com/c-commerce/charles-browser-sdk/compare/v2.30.0...v2.31.0) (2020-03-27) | ||
@@ -2,0 +9,0 @@ |
@@ -198,11 +198,19 @@ "use strict"; | ||
}; | ||
Object.defineProperty(Feed.prototype, "defaultSubscriptions", { | ||
get: function () { | ||
return [ | ||
topics_1.default.api.feedMessages.generateTopic(this.serialize()), | ||
topics_1.default.api.feedEvents.generateTopic(this.serialize()) | ||
]; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Feed.prototype.deinitialize = function () { | ||
this.removeAllListeners(); | ||
this.getMqttClient().unsubscribe(this.defaultSubscriptions); | ||
}; | ||
Feed.prototype.subscibeDefaults = function () { | ||
this.getMqttClient() | ||
.subscribe([ | ||
topics_1.default.api.feedMessages.generateTopic(this.serialize()), | ||
topics_1.default.api.feedEvents.generateTopic(this.serialize()) | ||
]); | ||
.subscribe(this.defaultSubscriptions); | ||
}; | ||
@@ -209,0 +217,0 @@ /** |
@@ -76,2 +76,3 @@ /// <reference types="node" /> | ||
init(): Promise<Feed | undefined>; | ||
private get defaultSubscriptions(); | ||
deinitialize(): void; | ||
@@ -78,0 +79,0 @@ private subscibeDefaults; |
@@ -92,3 +92,3 @@ /// <reference types="node" /> | ||
subscribe(topic: string | string[], cb?: Function): RealtimeClient; | ||
unsubscribe(topic: string): RealtimeClient; | ||
unsubscribe(topic: string | string[]): RealtimeClient; | ||
publish(topic: string, payload?: any): RealtimeClient; | ||
@@ -95,0 +95,0 @@ } |
{ | ||
"name": "@heycharles/browser-sdk", | ||
"version": "2.31.0", | ||
"version": "2.32.0", | ||
"description": "The Browser SDK for the Charles APIs.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1156052
26374