@openfeed/sdk-js 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ### [1.2.2](https://github.com/openfeed-org/sdk-js/compare/1.2.1...1.2.2) (2024-07-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * return promise on unsubscribe. ([d37061e](https://github.com/openfeed-org/sdk-js/commit/d37061e4444dde8a65a3636b3e3493fa332dcf4b))
package/CHANGELOG.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.2.2](https://github.com/openfeed-org/sdk-js/compare/1.2.1...1.2.2) (2024-07-12)
5
+ ### [1.2.3](https://github.com/openfeed-org/sdk-js/compare/1.2.2...1.2.3) (2024-12-09)
6
6
 
7
7
 
8
- ### Bug Fixes
8
+ ### Features
9
9
 
10
- * return promise on unsubscribe. ([d37061e](https://github.com/openfeed-org/sdk-js/commit/d37061e4444dde8a65a3636b3e3493fa332dcf4b))
10
+ * Added heartbeat listener. ([960bd7a](https://github.com/openfeed-org/sdk-js/commit/960bd7ad27b0cd1c5dfe9714a315d72fdad588b0))
@@ -1 +1 @@
1
- export declare const version = "1.2.2";
1
+ export declare const version = "1.2.3";
package/dist/index.js CHANGED
@@ -8213,7 +8213,7 @@ class ResolutionSource {
8213
8213
  return this.onError;
8214
8214
  }
8215
8215
  }
8216
- const version = "1.2.2";
8216
+ const version = "1.2.3";
8217
8217
  const send = (socket, message) => {
8218
8218
  socket.send(OpenfeedGatewayRequestEncode.encode(toT(message)).finish());
8219
8219
  };
@@ -8294,6 +8294,7 @@ class OpenFeedConnection {
8294
8294
  const messages = receive(event);
8295
8295
  for (const message of messages) {
8296
8296
  if (message.heartBeat) {
8297
+ this.listeners.onHeartBeat(message.heartBeat);
8297
8298
  continue;
8298
8299
  }
8299
8300
  if (((_b = (_a = message.logoutResponse) == null ? void 0 : _a.status) == null ? void 0 : _b.result) === Result.DUPLICATE_LOGIN) {
@@ -8892,6 +8893,8 @@ class OpenFeedListeners {
8892
8893
  });
8893
8894
  __publicField(this, "onMessageWithMetadata", () => {
8894
8895
  });
8896
+ __publicField(this, "onHeartBeat", () => {
8897
+ });
8895
8898
  this.onMessage = this.addDetails;
8896
8899
  }
8897
8900
  /* eslint-enable class-methods-use-this */
package/dist/node.js CHANGED
@@ -11837,7 +11837,7 @@ var ResolutionSource = class {
11837
11837
  };
11838
11838
 
11839
11839
  // generated/version.ts
11840
- var version = "1.2.2";
11840
+ var version = "1.2.3";
11841
11841
 
11842
11842
  // src/connection/connection.ts
11843
11843
  var send = (socket, message) => {
@@ -11928,6 +11928,7 @@ var OpenFeedConnection = class {
11928
11928
  const messages = receive(event);
11929
11929
  for (const message of messages) {
11930
11930
  if (message.heartBeat) {
11931
+ this.listeners.onHeartBeat(message.heartBeat);
11931
11932
  continue;
11932
11933
  }
11933
11934
  if (((_b = (_a = message.logoutResponse) == null ? void 0 : _a.status) == null ? void 0 : _b.result) === 115 /* DUPLICATE_LOGIN */) {
@@ -12521,6 +12522,8 @@ var OpenFeedListeners = class {
12521
12522
  };
12522
12523
  onMessageWithMetadata = () => {
12523
12524
  };
12525
+ onHeartBeat = () => {
12526
+ };
12524
12527
  /* eslint-enable class-methods-use-this */
12525
12528
  };
12526
12529
  export {
@@ -1,5 +1,6 @@
1
1
  import { OpenfeedGatewayMessage } from "@gen/openfeed_api";
2
2
  import { InstrumentDefinition } from "@gen/openfeed_instrument";
3
+ import { HeartBeat } from "@gen/openfeed";
3
4
  import { IOpenFeedConnection } from "./connection_interfaces";
4
5
  export declare class OpenFeedListeners {
5
6
  private readonly instrumentBySymbol;
@@ -11,4 +12,5 @@ export declare class OpenFeedListeners {
11
12
  onDisconnected: () => void | Promise<void>;
12
13
  onMessage: (message: OpenfeedGatewayMessage) => void | Promise<void>;
13
14
  onMessageWithMetadata: (message: OpenfeedGatewayMessage, symbolNames: string[], instrument?: InstrumentDefinition) => void | Promise<void>;
15
+ onHeartBeat: (heartBeat: HeartBeat) => void | Promise<void>;
14
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeed/sdk-js",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "JavaScript SDK for Barchart OpenFeed",
5
5
  "main": "dist/node.js",
6
6
  "browser": "dist/index.js",