@openfeed/sdk-js 1.6.1 → 1.6.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.6.
|
|
1
|
+
export declare const version = "1.6.2";
|
package/dist/index.js
CHANGED
|
@@ -8920,8 +8920,8 @@ class OpenFeedConnection {
|
|
|
8920
8920
|
this.subscriptionRequests.delete(originalRequest.correlationId.toString());
|
|
8921
8921
|
}
|
|
8922
8922
|
}
|
|
8923
|
-
send = (msg) => {
|
|
8924
|
-
|
|
8923
|
+
send = (msg, correlationId) => {
|
|
8924
|
+
correlationId ??= CorrelationId.create();
|
|
8925
8925
|
const token = this.connectionToken;
|
|
8926
8926
|
const msg2 = {};
|
|
8927
8927
|
if (msg.exchangeRequest !== void 0) msg2.exchangeRequest = { ...msg.exchangeRequest, correlationId, token };
|
|
@@ -9000,7 +9000,7 @@ class OpenFeedConnection {
|
|
|
9000
9000
|
whenDisconnected = () => this.whenDisconnectedSource.whenCompleted;
|
|
9001
9001
|
dispose = () => this.disconnect(new ConnectionDisposedError("Disposed"));
|
|
9002
9002
|
}
|
|
9003
|
-
const version = "1.6.
|
|
9003
|
+
const version = "1.6.2";
|
|
9004
9004
|
const getClientVersion = async (clientId) => {
|
|
9005
9005
|
let platformDescription;
|
|
9006
9006
|
if (typeof window !== "undefined") {
|
package/dist/node.js
CHANGED
|
@@ -12618,8 +12618,8 @@ var OpenFeedConnection = class {
|
|
|
12618
12618
|
this.subscriptionRequests.delete(originalRequest.correlationId.toString());
|
|
12619
12619
|
}
|
|
12620
12620
|
}
|
|
12621
|
-
send = (msg) => {
|
|
12622
|
-
|
|
12621
|
+
send = (msg, correlationId) => {
|
|
12622
|
+
correlationId ??= CorrelationId.create();
|
|
12623
12623
|
const token = this.connectionToken;
|
|
12624
12624
|
const msg2 = {};
|
|
12625
12625
|
if (msg.exchangeRequest !== void 0) msg2.exchangeRequest = { ...msg.exchangeRequest, correlationId, token };
|
|
@@ -12703,7 +12703,7 @@ var OpenFeedConnection = class {
|
|
|
12703
12703
|
};
|
|
12704
12704
|
|
|
12705
12705
|
// generated/version.ts
|
|
12706
|
-
var version = "1.6.
|
|
12706
|
+
var version = "1.6.2";
|
|
12707
12707
|
|
|
12708
12708
|
// src/utilities/client_version.ts
|
|
12709
12709
|
var getClientVersion = async (clientId) => {
|
|
@@ -26,7 +26,7 @@ export declare class OpenFeedConnection implements IOpenFeedConnection {
|
|
|
26
26
|
subscribe: (service: Service, subscriptionType: SubscriptionType, snapshotIntervalSeconds: number, symbols?: string[] | null, marketIds?: Long[] | null, exchanges?: string[] | null, channels?: number[] | null) => Long;
|
|
27
27
|
unsubscribe: (subscriptionId: Long) => void;
|
|
28
28
|
private fireUnsubscribeWhenReady;
|
|
29
|
-
send: (msg: OpenfeedRequest) => Long;
|
|
29
|
+
send: (msg: OpenfeedRequest, correlationId?: Long) => Long;
|
|
30
30
|
getExchanges: () => Promise<ExchangeResponse_Exchange[]>;
|
|
31
31
|
getInstrument: (request: OpenFeedInstrumentRequest) => Promise<InstrumentDefinition[]>;
|
|
32
32
|
getInstrumentReference: (request: OpenFeedInstrumentReferenceRequest) => Promise<InstrumentReferenceResponse>;
|
|
@@ -5,13 +5,13 @@ import { OptionalUndefined } from "@src/utilities/messages";
|
|
|
5
5
|
import type { InstrumentDefinition } from "@gen/openfeed_instrument";
|
|
6
6
|
export type OpenFeedInstrumentRequest = Omit<OptionalUndefined<InstrumentRequest>, "correlationId" | "token" | "version">;
|
|
7
7
|
export type OpenFeedInstrumentReferenceRequest = Omit<OptionalUndefined<InstrumentReferenceRequest>, "correlationId" | "token">;
|
|
8
|
-
type OmitDistributive<T, K extends PropertyKey> = T extends any ? (T extends object ?
|
|
8
|
+
type OmitDistributive<T, K extends PropertyKey> = T extends any ? (T extends object ? Id<Omit<T, K>> : T) : never;
|
|
9
9
|
type Id<T> = {} & {
|
|
10
10
|
[P in keyof T]: T[P];
|
|
11
11
|
};
|
|
12
|
-
type OmitRecursively<T, K extends PropertyKey> =
|
|
12
|
+
type OmitRecursively<T, K extends PropertyKey> = {
|
|
13
13
|
[P in keyof T]: OmitDistributive<T[P], K>;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
export type OpenfeedRequest = OmitRecursively<Omit<OpenfeedGatewayRequest, "loginRequest" | "logoutRequest">, "correlationId" | "token">;
|
|
16
16
|
export interface IOpenFeedConnection {
|
|
17
17
|
subscribe: (service: Service, subscriptionType: SubscriptionType, snapshotIntervalSeconds: number, symbols: string[] | null, marketIds: Long[] | null, exchanges: string[] | null, channels: number[] | null) => Long;
|
|
@@ -20,7 +20,7 @@ export interface IOpenFeedConnection {
|
|
|
20
20
|
getExchanges: () => Promise<ExchangeResponse_Exchange[]>;
|
|
21
21
|
getInstrument: (request: OpenFeedInstrumentRequest) => Promise<InstrumentDefinition[]>;
|
|
22
22
|
getInstrumentReference: (request: OpenFeedInstrumentReferenceRequest) => Promise<InstrumentReferenceResponse>;
|
|
23
|
-
send(msg: OpenfeedRequest): Long;
|
|
23
|
+
send(msg: OpenfeedRequest, correlationId?: Long): Long;
|
|
24
24
|
}
|
|
25
25
|
export interface IOpenFeedClient {
|
|
26
26
|
get connection(): Promise<IOpenFeedConnection>;
|