@ariva-mds/mds 2.14.0 → 2.16.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.
package/lib/cjs/index.js CHANGED
@@ -24,10 +24,12 @@ class MdsConnectionState {
24
24
  constructor() {
25
25
  this.isConnected = false;
26
26
  this.isAuthenticated = false;
27
+ this.lastUpdate = new Date();
27
28
  }
28
29
  connectionOpened() {
29
30
  this.isConnected = true;
30
31
  this.isAuthenticated = false;
32
+ this.lastUpdate = new Date();
31
33
  }
32
34
  connectionClosed() {
33
35
  this.isConnected = false;
@@ -39,6 +41,15 @@ class MdsConnectionState {
39
41
  authenticationEnded() {
40
42
  this.isAuthenticated = false;
41
43
  }
44
+ messageReceived() {
45
+ this.lastUpdate = new Date();
46
+ }
47
+ isTimedOut() {
48
+ return Date.now() - this.lastUpdate.getTime() < 20000; // 20 seconds timeout
49
+ }
50
+ forcedDisconnect() {
51
+ this.lastUpdate = new Date();
52
+ }
42
53
  }
43
54
  exports.MdsConnectionState = MdsConnectionState;
44
55
  class RunningRequest {
@@ -57,6 +68,9 @@ class RunningRequest {
57
68
  }
58
69
  }
59
70
  class MdsConnection {
71
+ /**
72
+ * construct an MdsCoonnection
73
+ */
60
74
  constructor(websocketUrl, authdataCallback, options = { debug: false }) {
61
75
  this.state = new MdsConnectionState();
62
76
  this.waitingForAuthentification = [];
@@ -67,71 +81,93 @@ class MdsConnection {
67
81
  this.authdataCallback = authdataCallback;
68
82
  this.isDebug = options.debug ? true : false;
69
83
  this.websocket = new reconnecting_websocket_1.default(websocketUrl, [], options.wsOptions);
70
- this.stayAuthenticated();
71
84
  const outer = this;
85
+ // open-handler -> resend open requests from previous connection
72
86
  this.websocket.onopen = function () {
87
+ outer.debug("websocket open, resending " + JSON.stringify(outer.waitingForReconnect));
73
88
  outer.state.connectionOpened();
74
89
  // @ts-ignore
75
90
  for (const request of outer.waitingForReconnect) {
76
- if (!request.request.subscribeAuthentication) {
77
- outer.sendWhenAuthenticated(request.request);
78
- }
79
- else {
80
- outer.websocket.send(JSON.stringify(request.request));
81
- }
91
+ outer.sendAsSoonAsAuthenticationPermits(request.request);
82
92
  }
83
93
  };
94
+ // close handler -> store open requests for resending on reconnect
84
95
  this.websocket.onclose = function () {
96
+ outer.debug("websocket closed, queuing " + JSON.stringify(outer.waitingForReconnect));
85
97
  outer.state.connectionClosed();
86
98
  outer.waitingForReconnect = Array.from(outer.runningRequests.values());
87
- outer.debug("close");
88
99
  };
89
100
  this.websocket.onmessage = function (e) {
90
101
  outer.processWebsocketMessageEvent(e);
91
102
  };
103
+ this.stayAuthenticated();
104
+ setInterval(() => {
105
+ if (!outer.state.isTimedOut()) {
106
+ outer.debug("websocket timed out, calling reconnect");
107
+ outer.state.forcedDisconnect();
108
+ outer.websocket.reconnect();
109
+ }
110
+ }, 1000);
92
111
  }
112
+ /**
113
+ * create a hearbeat observable that can be subscribed to
114
+ */
93
115
  heartbeat() {
94
116
  return this.observable({ 'heartbeat': {} }, true)
95
117
  .pipe((0, rxjs_1.map)((x) => x.dataHeartbeat));
96
118
  }
119
+ /**
120
+ * create a MarketstateUpdate observable that can be subscribed to, contains both full state and delta for every marketstate
121
+ */
97
122
  marketstates(marketstateQueries) {
98
123
  const full = new Map();
99
124
  return this.marketstateUpdates(marketstateQueries)
100
125
  .pipe((0, rxjs_1.map)((update) => {
101
126
  let existingEntry = update.marketstateId ? full.get(update.marketstateId) : null;
102
- if (existingEntry) {
103
- const existingJson = (0, MarketstateWithId_1.MarketstateWithIdToJSON)(existingEntry);
104
- const updateJson = (0, MarketstateWithId_1.MarketstateWithIdToJSON)(update);
105
- for (let key in updateJson) {
106
- if (!(updateJson[key] == undefined)) {
107
- existingJson[key] = updateJson[key];
108
- }
109
- }
110
- existingEntry = (0, MarketstateWithId_1.MarketstateWithIdFromJSON)(existingJson);
111
- if (update.marketstateId) {
127
+ if (update.marketstateId) {
128
+ if (existingEntry) {
129
+ existingEntry = this.updateExistingMarketstateWithDeltaUpdate(existingEntry, update);
112
130
  full.set(update.marketstateId, existingEntry);
113
131
  }
114
- }
115
- else {
116
- existingEntry = update;
117
- if (update.marketstateId) {
132
+ else {
133
+ existingEntry = update;
118
134
  full.set(update.marketstateId, existingEntry);
119
135
  }
120
136
  }
121
137
  return new MarketstateUpdate(existingEntry, update);
122
138
  }));
123
139
  }
140
+ /**
141
+ * create a Marketstate observable that can be subscribed to, contains only delta for every marketstate
142
+ */
124
143
  marketstateUpdates(marketstateQueries) {
125
144
  return this.observable({ 'subscribeMarketstates': { 'marketstateQueries': marketstateQueries } }, true)
126
145
  .pipe((0, rxjs_1.map)((x) => (0, MarketstateWithId_1.MarketstateWithIdFromJSON)(x.dataMarketstate)));
127
146
  }
147
+ /**
148
+ * create a Marketstate observable that can be subscribed to, contains only full state for every marketstate
149
+ */
128
150
  marketstatesStates(marketstateQueries) {
129
151
  return this.marketstates(marketstateQueries).pipe((0, rxjs_1.map)((x) => x.state));
130
152
  }
153
+ /**
154
+ * sets the priority for sources
155
+ */
131
156
  priority(sources) {
132
157
  return this.promise({ 'priority': { 'sources': sources } });
133
158
  }
134
- sendWhenAuthenticated(json) {
159
+ updateExistingMarketstateWithDeltaUpdate(existingEntry, update) {
160
+ const existingJson = (0, MarketstateWithId_1.MarketstateWithIdToJSON)(existingEntry);
161
+ const updateJson = (0, MarketstateWithId_1.MarketstateWithIdToJSON)(update);
162
+ for (let key in updateJson) {
163
+ if (!(updateJson[key] == undefined)) {
164
+ existingJson[key] = updateJson[key];
165
+ }
166
+ }
167
+ existingEntry = (0, MarketstateWithId_1.MarketstateWithIdFromJSON)(existingJson);
168
+ return existingEntry;
169
+ }
170
+ sendAsSoonAsAuthenticationPermits(json) {
135
171
  if (this.state.isAuthenticated || json.subscribeAuthentication) {
136
172
  this.websocket.send(JSON.stringify(json));
137
173
  }
@@ -175,7 +211,7 @@ class MdsConnection {
175
211
  const outer = this;
176
212
  const observable = new rxjs_1.Observable((subscriber) => {
177
213
  outer.runningRequests.set(requestId, RunningRequest.withObservable(req, subscriber));
178
- outer.sendWhenAuthenticated(req);
214
+ outer.sendAsSoonAsAuthenticationPermits(req);
179
215
  // Provide a way of canceling and disposing the resources
180
216
  return function unsubscribe() {
181
217
  let runningRequest = outer.runningRequests.get(requestId);
@@ -195,7 +231,7 @@ class MdsConnection {
195
231
  const outer = this;
196
232
  const promise = new Promise((resolve, reject) => {
197
233
  outer.runningRequests.set(requestId, RunningRequest.withPromise(req, resolve, reject));
198
- outer.sendWhenAuthenticated(req);
234
+ outer.sendAsSoonAsAuthenticationPermits(req);
199
235
  });
200
236
  return promise;
201
237
  }
@@ -203,6 +239,7 @@ class MdsConnection {
203
239
  const msg = JSON.parse(e.data);
204
240
  this.debug("we received " + JSON.stringify(msg));
205
241
  const request = this.runningRequests.get(msg.requestId);
242
+ this.state.messageReceived();
206
243
  if (request && request.promiseResolve) {
207
244
  if (msg.isError) {
208
245
  request.promiseReject(msg.errorMessage);
@@ -40,7 +40,6 @@ function MarketstateWithIdFromJSONTyped(json, ignoreDiscriminator) {
40
40
  return json;
41
41
  }
42
42
  return {
43
- 'test22': !(0, runtime_1.exists)(json, 'test22') ? undefined : json['test22'],
44
43
  'marketstateId': !(0, runtime_1.exists)(json, 'marketstateId') ? undefined : json['marketstateId'],
45
44
  'instrumentId': !(0, runtime_1.exists)(json, 'instrumentId') ? undefined : json['instrumentId'],
46
45
  'sourceId': !(0, runtime_1.exists)(json, 'sourceId') ? undefined : json['sourceId'],
@@ -72,7 +71,6 @@ function MarketstateWithIdToJSON(value) {
72
71
  return null;
73
72
  }
74
73
  return {
75
- 'test22': value.test22,
76
74
  'marketstateId': value.marketstateId,
77
75
  'instrumentId': value.instrumentId,
78
76
  'sourceId': value.sourceId,
@@ -13,12 +13,16 @@ export declare class MarketstateUpdate {
13
13
  export declare class MdsConnectionState {
14
14
  isConnected: boolean;
15
15
  isAuthenticated: boolean;
16
+ lastUpdate: Date;
16
17
  connectionOpened(): void;
17
18
  connectionClosed(): void;
18
19
  authenticationAccepted(): void;
19
20
  authenticationEnded(): void;
21
+ messageReceived(): void;
22
+ isTimedOut(): boolean;
23
+ forcedDisconnect(): void;
20
24
  }
21
- export type Options = {
25
+ export type MdsOptions = {
22
26
  debug?: boolean;
23
27
  wsOptions?: ReconnectingWebSocketOptions;
24
28
  };
@@ -31,13 +35,32 @@ export declare class MdsConnection {
31
35
  private nextGeneratedRequestId;
32
36
  private readonly runningRequests;
33
37
  private isDebug;
34
- constructor(websocketUrl: string, authdataCallback: () => Promise<MdsAuthdata>, options?: Options);
38
+ /**
39
+ * construct an MdsCoonnection
40
+ */
41
+ constructor(websocketUrl: string, authdataCallback: () => Promise<MdsAuthdata>, options?: MdsOptions);
42
+ /**
43
+ * create a hearbeat observable that can be subscribed to
44
+ */
35
45
  heartbeat(): Observable<String>;
46
+ /**
47
+ * create a MarketstateUpdate observable that can be subscribed to, contains both full state and delta for every marketstate
48
+ */
36
49
  marketstates(marketstateQueries: String[]): Observable<MarketstateUpdate>;
50
+ /**
51
+ * create a Marketstate observable that can be subscribed to, contains only delta for every marketstate
52
+ */
37
53
  marketstateUpdates(marketstateQueries: String[]): Observable<MarketstateWithId>;
54
+ /**
55
+ * create a Marketstate observable that can be subscribed to, contains only full state for every marketstate
56
+ */
38
57
  marketstatesStates(marketstateQueries: String[]): Observable<MarketstateWithId>;
58
+ /**
59
+ * sets the priority for sources
60
+ */
39
61
  priority(sources: string[]): Promise<void>;
40
- private sendWhenAuthenticated;
62
+ private updateExistingMarketstateWithDeltaUpdate;
63
+ private sendAsSoonAsAuthenticationPermits;
41
64
  private stayAuthenticated;
42
65
  private generateNextRequestId;
43
66
  private observable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAA8B,EAAC,OAAO,IAAI,4BAA4B,EAAC,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAM,UAAU,EAAqB,MAAM,MAAM,CAAC;AACzD,OAAO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0BAA0B,CAAa;IAC/C,OAAO,CAAC,mBAAmB,CAAwB;IAEnD,OAAO,CAAC,sBAAsB,CAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0C;IAE1E,OAAO,CAAC,OAAO,CAAkB;IAGjC;;OAEG;gBAES,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,GAAE,UAA2B;IA0CpH;;OAEG;IAEI,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC;IAKtC;;OAEG;IAEI,YAAY,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAmBhF;;OAEG;IAEI,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAKtF;;OAEG;IAEI,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAMtF;;OAEG;IAEI,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjD,OAAO,CAAC,wCAAwC;IAehD,OAAO,CAAC,iCAAiC;IASzC,OAAO,CAAC,iBAAiB;IAuCzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,UAAU;IA2BlB,OAAO,CAAC,OAAO;IAgBf,OAAO,CAAC,4BAA4B;IA6BpC,OAAO,CAAC,KAAK;CAKhB"}
@@ -24,13 +24,7 @@ import type { Total } from './Total';
24
24
  */
25
25
  export interface MarketstateWithId {
26
26
  /**
27
- *
28
- * @type {string}
29
- * @memberof MarketstateWithId
30
- */
31
- test22?: string;
32
- /**
33
- * Id TODO for the Marketstate of an Instrument that is listed on a Source. <p> Format: InstrumentId "," ListingVariant "," Source <p>InstrumentId: The InstrumentID in one of the defined formats, see <a href="#model-InstrumentId">InstrumentId</a></p> <p>ListingVariant: Normally the listing variant is only determined by the trading currency, in that case the ListingVariant is named after the Currency (e.g. EUR). But other variant types might be possible!</p> <p>Source: The Source or Exchange. </p>
27
+ * Id for the Marketstate of an Instrument that is listed on a Source. <p> Format: InstrumentId "," ListingVariant "," Source <p>InstrumentId: The InstrumentID in one of the defined formats, see <a href="#model-InstrumentId">InstrumentId</a></p> <p>ListingVariant: Normally the listing variant is only determined by the trading currency, in that case the ListingVariant is named after the Currency (e.g. EUR). But other variant types might be possible!</p> <p>Source: The Source or Exchange. </p>
34
28
  * <p> Any MarketstateId is also a valid MarketstateQuery.</bold></p>
35
29
  * @type {string}
36
30
  * @memberof MarketstateWithId
@@ -1 +1 @@
1
- {"version":3,"file":"MarketstateWithId.d.ts","sourceRoot":"","sources":["../../../../src/models/MarketstateWithId.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOrC;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CA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IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,WAAW,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEtE;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,iBAAiB,CA2BzG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,GAAG,CA8B7E"}
package/lib/esm/index.mjs CHANGED
@@ -18,9 +18,11 @@ export class MarketstateUpdate {
18
18
  export class MdsConnectionState {
19
19
  isConnected = false;
20
20
  isAuthenticated = false;
21
+ lastUpdate = new Date();
21
22
  connectionOpened() {
22
23
  this.isConnected = true;
23
24
  this.isAuthenticated = false;
25
+ this.lastUpdate = new Date();
24
26
  }
25
27
  connectionClosed() {
26
28
  this.isConnected = false;
@@ -32,6 +34,15 @@ export class MdsConnectionState {
32
34
  authenticationEnded() {
33
35
  this.isAuthenticated = false;
34
36
  }
37
+ messageReceived() {
38
+ this.lastUpdate = new Date();
39
+ }
40
+ isTimedOut() {
41
+ return Date.now() - this.lastUpdate.getTime() < 20000; // 20 seconds timeout
42
+ }
43
+ forcedDisconnect() {
44
+ this.lastUpdate = new Date();
45
+ }
35
46
  }
36
47
  class RunningRequest {
37
48
  observableSubscriber;
@@ -61,75 +72,100 @@ export class MdsConnection {
61
72
  nextGeneratedRequestId = 0;
62
73
  runningRequests = new Map();
63
74
  isDebug = false;
75
+ /**
76
+ * construct an MdsCoonnection
77
+ */
64
78
  constructor(websocketUrl, authdataCallback, options = { debug: false }) {
65
79
  this.authdataCallback = authdataCallback;
66
80
  this.isDebug = options.debug ? true : false;
67
81
  this.websocket = new ReconnectingWebSocket(websocketUrl, [], options.wsOptions);
68
- this.stayAuthenticated();
69
82
  const outer = this;
83
+ // open-handler -> resend open requests from previous connection
70
84
  this.websocket.onopen = function () {
85
+ outer.debug("websocket open, resending " + JSON.stringify(outer.waitingForReconnect));
71
86
  outer.state.connectionOpened();
72
87
  // @ts-ignore
73
88
  for (const request of outer.waitingForReconnect) {
74
- if (!request.request.subscribeAuthentication) {
75
- outer.sendWhenAuthenticated(request.request);
76
- }
77
- else {
78
- outer.websocket.send(JSON.stringify(request.request));
79
- }
89
+ outer.sendAsSoonAsAuthenticationPermits(request.request);
80
90
  }
81
91
  };
92
+ // close handler -> store open requests for resending on reconnect
82
93
  this.websocket.onclose = function () {
94
+ outer.debug("websocket closed, queuing " + JSON.stringify(outer.waitingForReconnect));
83
95
  outer.state.connectionClosed();
84
96
  outer.waitingForReconnect = Array.from(outer.runningRequests.values());
85
- outer.debug("close");
86
97
  };
87
98
  this.websocket.onmessage = function (e) {
88
99
  outer.processWebsocketMessageEvent(e);
89
100
  };
101
+ this.stayAuthenticated();
102
+ setInterval(() => {
103
+ if (!outer.state.isTimedOut()) {
104
+ outer.debug("websocket timed out, calling reconnect");
105
+ outer.state.forcedDisconnect();
106
+ outer.websocket.reconnect();
107
+ }
108
+ }, 1000);
90
109
  }
110
+ /**
111
+ * create a hearbeat observable that can be subscribed to
112
+ */
91
113
  heartbeat() {
92
114
  return this.observable({ 'heartbeat': {} }, true)
93
115
  .pipe(map((x) => x.dataHeartbeat));
94
116
  }
117
+ /**
118
+ * create a MarketstateUpdate observable that can be subscribed to, contains both full state and delta for every marketstate
119
+ */
95
120
  marketstates(marketstateQueries) {
96
121
  const full = new Map();
97
122
  return this.marketstateUpdates(marketstateQueries)
98
123
  .pipe(map((update) => {
99
124
  let existingEntry = update.marketstateId ? full.get(update.marketstateId) : null;
100
- if (existingEntry) {
101
- const existingJson = MarketstateWithIdToJSON(existingEntry);
102
- const updateJson = MarketstateWithIdToJSON(update);
103
- for (let key in updateJson) {
104
- if (!(updateJson[key] == undefined)) {
105
- existingJson[key] = updateJson[key];
106
- }
107
- }
108
- existingEntry = MarketstateWithIdFromJSON(existingJson);
109
- if (update.marketstateId) {
125
+ if (update.marketstateId) {
126
+ if (existingEntry) {
127
+ existingEntry = this.updateExistingMarketstateWithDeltaUpdate(existingEntry, update);
110
128
  full.set(update.marketstateId, existingEntry);
111
129
  }
112
- }
113
- else {
114
- existingEntry = update;
115
- if (update.marketstateId) {
130
+ else {
131
+ existingEntry = update;
116
132
  full.set(update.marketstateId, existingEntry);
117
133
  }
118
134
  }
119
135
  return new MarketstateUpdate(existingEntry, update);
120
136
  }));
121
137
  }
138
+ /**
139
+ * create a Marketstate observable that can be subscribed to, contains only delta for every marketstate
140
+ */
122
141
  marketstateUpdates(marketstateQueries) {
123
142
  return this.observable({ 'subscribeMarketstates': { 'marketstateQueries': marketstateQueries } }, true)
124
143
  .pipe(map((x) => MarketstateWithIdFromJSON(x.dataMarketstate)));
125
144
  }
145
+ /**
146
+ * create a Marketstate observable that can be subscribed to, contains only full state for every marketstate
147
+ */
126
148
  marketstatesStates(marketstateQueries) {
127
149
  return this.marketstates(marketstateQueries).pipe(map((x) => x.state));
128
150
  }
151
+ /**
152
+ * sets the priority for sources
153
+ */
129
154
  priority(sources) {
130
155
  return this.promise({ 'priority': { 'sources': sources } });
131
156
  }
132
- sendWhenAuthenticated(json) {
157
+ updateExistingMarketstateWithDeltaUpdate(existingEntry, update) {
158
+ const existingJson = MarketstateWithIdToJSON(existingEntry);
159
+ const updateJson = MarketstateWithIdToJSON(update);
160
+ for (let key in updateJson) {
161
+ if (!(updateJson[key] == undefined)) {
162
+ existingJson[key] = updateJson[key];
163
+ }
164
+ }
165
+ existingEntry = MarketstateWithIdFromJSON(existingJson);
166
+ return existingEntry;
167
+ }
168
+ sendAsSoonAsAuthenticationPermits(json) {
133
169
  if (this.state.isAuthenticated || json.subscribeAuthentication) {
134
170
  this.websocket.send(JSON.stringify(json));
135
171
  }
@@ -173,7 +209,7 @@ export class MdsConnection {
173
209
  const outer = this;
174
210
  const observable = new Observable((subscriber) => {
175
211
  outer.runningRequests.set(requestId, RunningRequest.withObservable(req, subscriber));
176
- outer.sendWhenAuthenticated(req);
212
+ outer.sendAsSoonAsAuthenticationPermits(req);
177
213
  // Provide a way of canceling and disposing the resources
178
214
  return function unsubscribe() {
179
215
  let runningRequest = outer.runningRequests.get(requestId);
@@ -193,7 +229,7 @@ export class MdsConnection {
193
229
  const outer = this;
194
230
  const promise = new Promise((resolve, reject) => {
195
231
  outer.runningRequests.set(requestId, RunningRequest.withPromise(req, resolve, reject));
196
- outer.sendWhenAuthenticated(req);
232
+ outer.sendAsSoonAsAuthenticationPermits(req);
197
233
  });
198
234
  return promise;
199
235
  }
@@ -201,6 +237,7 @@ export class MdsConnection {
201
237
  const msg = JSON.parse(e.data);
202
238
  this.debug("we received " + JSON.stringify(msg));
203
239
  const request = this.runningRequests.get(msg.requestId);
240
+ this.state.messageReceived();
204
241
  if (request && request.promiseResolve) {
205
242
  if (msg.isError) {
206
243
  request.promiseReject(msg.errorMessage);
@@ -35,7 +35,6 @@ export function MarketstateWithIdFromJSONTyped(json, ignoreDiscriminator) {
35
35
  return json;
36
36
  }
37
37
  return {
38
- 'test22': !exists(json, 'test22') ? undefined : json['test22'],
39
38
  'marketstateId': !exists(json, 'marketstateId') ? undefined : json['marketstateId'],
40
39
  'instrumentId': !exists(json, 'instrumentId') ? undefined : json['instrumentId'],
41
40
  'sourceId': !exists(json, 'sourceId') ? undefined : json['sourceId'],
@@ -66,7 +65,6 @@ export function MarketstateWithIdToJSON(value) {
66
65
  return null;
67
66
  }
68
67
  return {
69
- 'test22': value.test22,
70
68
  'marketstateId': value.marketstateId,
71
69
  'instrumentId': value.instrumentId,
72
70
  'sourceId': value.sourceId,
@@ -13,12 +13,16 @@ export declare class MarketstateUpdate {
13
13
  export declare class MdsConnectionState {
14
14
  isConnected: boolean;
15
15
  isAuthenticated: boolean;
16
+ lastUpdate: Date;
16
17
  connectionOpened(): void;
17
18
  connectionClosed(): void;
18
19
  authenticationAccepted(): void;
19
20
  authenticationEnded(): void;
21
+ messageReceived(): void;
22
+ isTimedOut(): boolean;
23
+ forcedDisconnect(): void;
20
24
  }
21
- export type Options = {
25
+ export type MdsOptions = {
22
26
  debug?: boolean;
23
27
  wsOptions?: ReconnectingWebSocketOptions;
24
28
  };
@@ -31,13 +35,32 @@ export declare class MdsConnection {
31
35
  private nextGeneratedRequestId;
32
36
  private readonly runningRequests;
33
37
  private isDebug;
34
- constructor(websocketUrl: string, authdataCallback: () => Promise<MdsAuthdata>, options?: Options);
38
+ /**
39
+ * construct an MdsCoonnection
40
+ */
41
+ constructor(websocketUrl: string, authdataCallback: () => Promise<MdsAuthdata>, options?: MdsOptions);
42
+ /**
43
+ * create a hearbeat observable that can be subscribed to
44
+ */
35
45
  heartbeat(): Observable<String>;
46
+ /**
47
+ * create a MarketstateUpdate observable that can be subscribed to, contains both full state and delta for every marketstate
48
+ */
36
49
  marketstates(marketstateQueries: String[]): Observable<MarketstateUpdate>;
50
+ /**
51
+ * create a Marketstate observable that can be subscribed to, contains only delta for every marketstate
52
+ */
37
53
  marketstateUpdates(marketstateQueries: String[]): Observable<MarketstateWithId>;
54
+ /**
55
+ * create a Marketstate observable that can be subscribed to, contains only full state for every marketstate
56
+ */
38
57
  marketstatesStates(marketstateQueries: String[]): Observable<MarketstateWithId>;
58
+ /**
59
+ * sets the priority for sources
60
+ */
39
61
  priority(sources: string[]): Promise<void>;
40
- private sendWhenAuthenticated;
62
+ private updateExistingMarketstateWithDeltaUpdate;
63
+ private sendAsSoonAsAuthenticationPermits;
41
64
  private stayAuthenticated;
42
65
  private generateNextRequestId;
43
66
  private observable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAA8B,EAAC,OAAO,IAAI,4BAA4B,EAAC,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAM,UAAU,EAAqB,MAAM,MAAM,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAqD,MAAM,4BAA4B,CAAA;AAEhH,qBAAa,WAAW;IAEb,KAAK,EAAE,MAAM,CAAC;gBAET,KAAK,EAAE,MAAM;CAI5B;AAGD,qBAAa,iBAAiB;IAEnB,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAA;gBAEpB,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG;CAKtC;AAGD,qBAAa,kBAAkB;IACpB,WAAW,EAAE,OAAO,CAAS;IAC7B,eAAe,EAAE,OAAO,CAAS;IAExC,gBAAgB;IAKhB,gBAAgB;IAKhB,sBAAsB;IAItB,mBAAmB;CAGtB;AAID,MAAM,MAAM,OAAO,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,4BAA4B,CAAC;CAC5C,CAAC;AAyBF,qBAAa,aAAa;IAEtB,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D,OAAO,CAAC,KAAK,CAAgD;IAE7D,OAAO,CAAC,0BAA0B,CAAa;IAC/C,OAAO,CAAC,mBAAmB,CAAwB;IAEnD,OAAO,CAAC,sBAAsB,CAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0C;IAE1E,OAAO,CAAC,OAAO,CAAkB;gBAIrB,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,GAAE,OAAwB;IAmC1G,SAA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
  */
25
25
  export interface MarketstateWithId {
26
26
  /**
27
- *
28
- * @type {string}
29
- * @memberof MarketstateWithId
30
- */
31
- test22?: string;
32
- /**
33
- * Id TODO for the Marketstate of an Instrument that is listed on a Source. <p> Format: InstrumentId "," ListingVariant "," Source <p>InstrumentId: The InstrumentID in one of the defined formats, see <a href="#model-InstrumentId">InstrumentId</a></p> <p>ListingVariant: Normally the listing variant is only determined by the trading currency, in that case the ListingVariant is named after the Currency (e.g. EUR). But other variant types might be possible!</p> <p>Source: The Source or Exchange. </p>
27
+ * Id for the Marketstate of an Instrument that is listed on a Source. <p> Format: InstrumentId "," ListingVariant "," Source <p>InstrumentId: The InstrumentID in one of the defined formats, see <a href="#model-InstrumentId">InstrumentId</a></p> <p>ListingVariant: Normally the listing variant is only determined by the trading currency, in that case the ListingVariant is named after the Currency (e.g. EUR). But other variant types might be possible!</p> <p>Source: The Source or Exchange. </p>
34
28
  * <p> Any MarketstateId is also a valid MarketstateQuery.</bold></p>
35
29
  * @type {string}
36
30
  * @memberof MarketstateWithId
@@ -1 +1 @@
1
- {"version":3,"file":"MarketstateWithId.d.ts","sourceRoot":"","sources":["../../../../src/models/MarketstateWithId.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOrC;;;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;;;;OAIG;IACH,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;OAIG;IACH,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,WAAW,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEtE;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,iBAAiB,CA2BzG;AAED,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,GAAG,CA8B7E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariva-mds/mds",
3
- "version": "2.14.0",
3
+ "version": "2.16.0",
4
4
  "description": "Stock market data",
5
5
  "license": "MIT",
6
6
  "main": "./lib/cjs/index.js",