@openfeed/sdk-js 1.5.0 → 1.6.0

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,11 @@
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.5.0](https://github.com/openfeed-org/sdk-js/compare/1.4.1...1.5.0) (2026-01-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * randomize reconnect and watch checks. ([27bc726](https://github.com/openfeed-org/sdk-js/commit/27bc72668c07a82ecbc8a0ba5395c964edbce59b))
11
+ * regenerate files from proto ([268f23e](https://github.com/openfeed-org/sdk-js/commit/268f23ed4f0d441c0b0b91709f5511272f4322fe))
package/CHANGELOG.md CHANGED
@@ -2,10 +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.5.0](https://github.com/openfeed-org/sdk-js/compare/1.4.1...1.5.0) (2026-01-21)
5
+ ## [1.6.0](https://github.com/openfeed-org/sdk-js/compare/1.5.0...1.6.0) (2026-01-22)
6
6
 
7
7
 
8
8
  ### Features
9
9
 
10
- * randomize reconnect and watch checks. ([27bc726](https://github.com/openfeed-org/sdk-js/commit/27bc72668c07a82ecbc8a0ba5395c964edbce59b))
11
- * regenerate files from proto ([268f23e](https://github.com/openfeed-org/sdk-js/commit/268f23ed4f0d441c0b0b91709f5511272f4322fe))
10
+ * expose instruments map data ([1750d6e](https://github.com/openfeed-org/sdk-js/commit/1750d6ed768bf1d38a719c84183e923def876ce7))
@@ -1 +1 @@
1
- export declare const version = "1.5.0";
1
+ export declare const version = "1.6.0";
package/dist/index.js CHANGED
@@ -8988,7 +8988,7 @@ class OpenFeedConnection {
8988
8988
  whenDisconnected = () => this.whenDisconnectedSource.whenCompleted;
8989
8989
  dispose = () => this.disconnect(new ConnectionDisposedError("Disposed"));
8990
8990
  }
8991
- const version = "1.5.0";
8991
+ const version = "1.6.0";
8992
8992
  const getClientVersion = async (clientId) => {
8993
8993
  let platformDescription;
8994
8994
  if (typeof window !== "undefined") {
@@ -9309,6 +9309,14 @@ class OpenFeedListeners {
9309
9309
  const uniqueSymbols = Array.from(new Set(symbols?.map(([symbol2]) => symbol2) ?? []));
9310
9310
  return this.onMessageWithMetadata(message, uniqueSymbols, def);
9311
9311
  };
9312
+ getInstrumentByMarketId = (marketId) => {
9313
+ const [definition] = this.instrumentByMarketId.get(marketId.toString()) ?? [void 0];
9314
+ return definition;
9315
+ };
9316
+ getSymbolsByMarketId = (marketId) => {
9317
+ const [, symbols] = this.instrumentByMarketId.get(marketId.toString()) ?? [void 0, void 0];
9318
+ return symbols?.map(([symbol2]) => symbol2) ?? [];
9319
+ };
9312
9320
  /* eslint-disable class-methods-use-this */
9313
9321
  onCleanup = () => {
9314
9322
  };
package/dist/node.js CHANGED
@@ -12691,7 +12691,7 @@ var OpenFeedConnection = class {
12691
12691
  };
12692
12692
 
12693
12693
  // generated/version.ts
12694
- var version = "1.5.0";
12694
+ var version = "1.6.0";
12695
12695
 
12696
12696
  // src/utilities/client_version.ts
12697
12697
  var getClientVersion = async (clientId) => {
@@ -13037,6 +13037,14 @@ var OpenFeedListeners = class {
13037
13037
  const uniqueSymbols = Array.from(new Set((symbols == null ? void 0 : symbols.map(([symbol2]) => symbol2)) ?? []));
13038
13038
  return this.onMessageWithMetadata(message, uniqueSymbols, def);
13039
13039
  };
13040
+ getInstrumentByMarketId = (marketId) => {
13041
+ const [definition] = this.instrumentByMarketId.get(marketId.toString()) ?? [void 0];
13042
+ return definition;
13043
+ };
13044
+ getSymbolsByMarketId = (marketId) => {
13045
+ const [, symbols] = this.instrumentByMarketId.get(marketId.toString()) ?? [void 0, void 0];
13046
+ return (symbols == null ? void 0 : symbols.map(([symbol2]) => symbol2)) ?? [];
13047
+ };
13040
13048
  /* eslint-disable class-methods-use-this */
13041
13049
  onCleanup = () => {
13042
13050
  };
@@ -1,5 +1,6 @@
1
1
  import { OpenfeedGatewayMessage } from "@gen/openfeed_api";
2
2
  import { InstrumentDefinition } from "@gen/openfeed_instrument";
3
+ import Long from "long";
3
4
  import { HeartBeat } from "@gen/openfeed";
4
5
  import { IOpenFeedConnection } from "./interfaces";
5
6
  export declare class OpenFeedListeners {
@@ -7,6 +8,8 @@ export declare class OpenFeedListeners {
7
8
  constructor();
8
9
  private cleanUp;
9
10
  private addDetails;
11
+ getInstrumentByMarketId: (marketId: Long) => InstrumentDefinition | undefined;
12
+ getSymbolsByMarketId: (marketId: Long) => string[];
10
13
  onCleanup: () => void | Promise<void>;
11
14
  onConnected: (connection: IOpenFeedConnection) => void | Promise<void>;
12
15
  onCredentialsRejected: () => void | Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeed/sdk-js",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "JavaScript SDK for Barchart OpenFeed",
5
5
  "main": "dist/node.js",
6
6
  "browser": "dist/index.js",