@factset/frontgate-js-sdk 7.1.4 → 7.1.6
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/CHANGELOG.md +50 -24
- package/dist/lib/esnext/common/errors.js +4 -5
- package/dist/lib/esnext/index.js +1 -0
- package/dist/lib/esnext/message/interfaces/PtlMessage.js +4 -0
- package/dist/lib/esnext/message/interfaces/index.js +1 -0
- package/dist/lib/esnext/message/request/AuthenticationByTokenRequest.js +2 -2
- package/dist/lib/esnext/message/request/AuthenticationRequest.js +2 -0
- package/dist/lib/esnext/message/request/ConfigurationRequest.js +3 -3
- package/dist/lib/esnext/message/response/AuthenticationTokenResponse.js +3 -11
- package/dist/lib/esnext/message/response/HTTPProxyResponse.js +3 -0
- package/dist/lib/esnext/message/response/Mdg2Response.js +4 -1
- package/dist/lib/esnext/message/response/PingResponse.js +0 -6
- package/dist/lib/esnext/message/response/index.js +0 -3
- package/dist/lib/esnext/mixins/AuthTokenRequestMixin.js +1 -1
- package/dist/lib/esnext/mixins/EndpointRequestMixin.js +7 -7
- package/dist/lib/esnext/mixins/HTTPProxyRequestMixin.js +1 -1
- package/dist/lib/esnext/mixins/OpenTelemetryMixin.js +2 -1
- package/dist/lib/esnext/mixins/PingMixin.js +5 -1
- package/dist/lib/esnext/mixins/RequestMixin.js +6 -1
- package/dist/lib/esnext/mixins/auth/AppAuthMixin.js +3 -3
- package/dist/lib/esnext/mixins/auth/SessionAuthMixin.js +4 -4
- package/dist/lib/esnext/mixins/auth/UserCredentialAuthMixin.js +3 -3
- package/dist/lib/esnext/mixins/auth/UserPasswordAuthMixin.js +3 -3
- package/dist/lib/esnext/mixins/connection/FrontgateWSMixin.js +11 -9
- package/dist/lib/esnext/mixins/subscription/DataObserver.js +1 -2
- package/dist/lib/esnext/mixins/subscription/EndpointSubscriptionMixin.js +13 -12
- package/dist/lib/esnext/mixins/subscription/RawSubscriptionMixin.js +28 -15
- package/dist/lib/esnext/version.js +1 -1
- package/dist/lib/node/common/errors.js +6 -7
- package/dist/lib/node/index.js +1 -0
- package/dist/lib/node/message/interfaces/PtlMessage.js +11 -0
- package/dist/lib/node/message/interfaces/index.js +1 -0
- package/dist/lib/node/message/request/AuthenticationByTokenRequest.js +2 -2
- package/dist/lib/node/message/request/AuthenticationRequest.js +2 -0
- package/dist/lib/node/message/request/ConfigurationRequest.js +3 -3
- package/dist/lib/node/message/response/AuthenticationTokenResponse.js +3 -11
- package/dist/lib/node/message/response/HTTPProxyResponse.js +3 -0
- package/dist/lib/node/message/response/Mdg2Response.js +4 -1
- package/dist/lib/node/message/response/PingResponse.js +0 -6
- package/dist/lib/node/message/response/index.js +0 -3
- package/dist/lib/node/mixins/AuthTokenRequestMixin.js +1 -1
- package/dist/lib/node/mixins/EndpointRequestMixin.js +7 -7
- package/dist/lib/node/mixins/HTTPProxyRequestMixin.js +1 -1
- package/dist/lib/node/mixins/OpenTelemetryMixin.js +2 -1
- package/dist/lib/node/mixins/PingMixin.js +5 -1
- package/dist/lib/node/mixins/RequestMixin.js +6 -1
- package/dist/lib/node/mixins/auth/AppAuthMixin.js +3 -3
- package/dist/lib/node/mixins/auth/SessionAuthMixin.js +4 -4
- package/dist/lib/node/mixins/auth/UserCredentialAuthMixin.js +3 -3
- package/dist/lib/node/mixins/auth/UserPasswordAuthMixin.js +3 -3
- package/dist/lib/node/mixins/connection/FrontgateWSMixin.js +11 -9
- package/dist/lib/node/mixins/subscription/DataObserver.js +1 -2
- package/dist/lib/node/mixins/subscription/EndpointSubscriptionMixin.js +12 -11
- package/dist/lib/node/mixins/subscription/RawSubscriptionMixin.js +27 -14
- package/dist/lib/node/version.js +1 -1
- package/dist/lib/types/common/errors.d.ts +4 -8
- package/dist/lib/types/common/interfaces/index.d.ts +0 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/message/interfaces/PtlMessage.d.ts +486 -0
- package/dist/lib/types/message/interfaces/index.d.ts +1 -0
- package/dist/lib/types/message/request/AbstractMdg2Request.d.ts +3 -3
- package/dist/lib/types/message/request/AuthenticationByTokenRequest.d.ts +5 -2
- package/dist/lib/types/message/request/AuthenticationRequest.d.ts +10 -9
- package/dist/lib/types/message/request/AuthenticationTokenRequest.d.ts +2 -1
- package/dist/lib/types/message/request/CancelSubscriptionRequest.d.ts +2 -1
- package/dist/lib/types/message/request/ConfigurationRequest.d.ts +7 -2
- package/dist/lib/types/message/request/HTTPProxyRequest.d.ts +2 -2
- package/dist/lib/types/message/request/HighLevelRequest.d.ts +2 -2
- package/dist/lib/types/message/request/PingRequest.d.ts +2 -8
- package/dist/lib/types/message/request/TransportLayerClientRequestHeader.d.ts +3 -26
- package/dist/lib/types/message/response/AuthenticationTokenResponse.d.ts +3 -3
- package/dist/lib/types/message/response/HTTPProxyResponse.d.ts +6 -3
- package/dist/lib/types/message/response/HighLevelResponse.d.ts +3 -1
- package/dist/lib/types/message/response/Mdg2Response.d.ts +6 -4
- package/dist/lib/types/message/response/PingResponse.d.ts +2 -1
- package/dist/lib/types/message/response/index.d.ts +0 -3
- package/dist/lib/types/message/update/HighLevelUpdate.d.ts +3 -1
- package/dist/lib/types/mixins/connection/index.d.ts +9 -3
- package/dist/lib/types/mixins/subscription/DataObserver.d.ts +2 -3
- package/dist/lib/umd/mdg2.client.min.umd.js +1 -1
- package/dist/lib/umd/mdg2.client.umd.js +172 -150
- package/package.json +2 -2
- package/dist/lib/esnext/common/interfaces/PtlMessage.js +0 -1
- package/dist/lib/esnext/message/response/AuthenticationResponse.js +0 -1
- package/dist/lib/esnext/message/response/ConfigurationResponse.js +0 -1
- package/dist/lib/esnext/message/response/DisconnectionMessage.js +0 -1
- package/dist/lib/esnext/message/response/ErrorResponse.js +0 -9
- package/dist/lib/node/common/interfaces/PtlMessage.js +0 -2
- package/dist/lib/node/message/response/AuthenticationResponse.js +0 -2
- package/dist/lib/node/message/response/ConfigurationResponse.js +0 -2
- package/dist/lib/node/message/response/DisconnectionMessage.js +0 -2
- package/dist/lib/node/message/response/ErrorResponse.js +0 -13
- package/dist/lib/types/common/interfaces/PtlMessage.d.ts +0 -5
- package/dist/lib/types/message/response/AuthenticationResponse.d.ts +0 -37
- package/dist/lib/types/message/response/ConfigurationResponse.d.ts +0 -44
- package/dist/lib/types/message/response/DisconnectionMessage.d.ts +0 -7
- package/dist/lib/types/message/response/ErrorResponse.d.ts +0 -5
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import type { Time } from '../types/Time';
|
|
2
|
+
type Microseconds = Time;
|
|
3
|
+
interface TransportLayerClientResponseHeaderPtlType {
|
|
4
|
+
id_job: number;
|
|
5
|
+
id_service: number;
|
|
6
|
+
expiry: {
|
|
7
|
+
microseconds: Microseconds;
|
|
8
|
+
};
|
|
9
|
+
flags: number;
|
|
10
|
+
cache_key: {
|
|
11
|
+
value: {
|
|
12
|
+
b64: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
response_hash: {
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
processing_time: number;
|
|
19
|
+
}
|
|
20
|
+
export interface TransportLayerClientRequestHeaderPtlType {
|
|
21
|
+
dataset: {
|
|
22
|
+
id_dataset: number;
|
|
23
|
+
};
|
|
24
|
+
id_job: number;
|
|
25
|
+
flags_r2: number;
|
|
26
|
+
resend_counter: number;
|
|
27
|
+
timeout: number;
|
|
28
|
+
authentication_identifiers: {
|
|
29
|
+
id_application: number;
|
|
30
|
+
id_user: number;
|
|
31
|
+
};
|
|
32
|
+
cache_key: {
|
|
33
|
+
value: number[];
|
|
34
|
+
};
|
|
35
|
+
previous_response_hash: {
|
|
36
|
+
value: number[];
|
|
37
|
+
};
|
|
38
|
+
tracing: {
|
|
39
|
+
value: {
|
|
40
|
+
value: number[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface FoundationHighLevelResponsePtlMessage {
|
|
45
|
+
Message: 'HighLevelResponse' | 'Foundation::HighLevelResponse';
|
|
46
|
+
Version: number;
|
|
47
|
+
header: TransportLayerClientResponseHeaderPtlType;
|
|
48
|
+
body: {
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
51
|
+
[prop: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
export interface TransportLayerClientJobSubscriptionUpdateHeader {
|
|
54
|
+
id_job: number;
|
|
55
|
+
processing_time: number;
|
|
56
|
+
}
|
|
57
|
+
export interface FoundationHighLevelUpdatePtlMessage {
|
|
58
|
+
Message: 'Foundation::HighLevelUpdate' | 'HighLevelUpdate';
|
|
59
|
+
Version: number;
|
|
60
|
+
header: TransportLayerClientJobSubscriptionUpdateHeader;
|
|
61
|
+
body: {
|
|
62
|
+
value: string;
|
|
63
|
+
};
|
|
64
|
+
[prop: string]: unknown;
|
|
65
|
+
}
|
|
66
|
+
export interface FoundationErrorResponsePtlMessage {
|
|
67
|
+
Message: 'Foundation::ErrorResponse';
|
|
68
|
+
Version: number;
|
|
69
|
+
header: Record<string, never>;
|
|
70
|
+
id_job: number;
|
|
71
|
+
processing_time: number;
|
|
72
|
+
reason: {
|
|
73
|
+
value: number;
|
|
74
|
+
};
|
|
75
|
+
details: string;
|
|
76
|
+
encrypted_details?: string;
|
|
77
|
+
payload_specific_data?: {
|
|
78
|
+
value: string;
|
|
79
|
+
};
|
|
80
|
+
[prop: string]: unknown;
|
|
81
|
+
}
|
|
82
|
+
export interface FoundationPingResponsePtlMessage {
|
|
83
|
+
Message: 'Foundation::PingResponse';
|
|
84
|
+
Version: number;
|
|
85
|
+
time_at_sender: {
|
|
86
|
+
microseconds: Microseconds;
|
|
87
|
+
};
|
|
88
|
+
time_from_request: {
|
|
89
|
+
microseconds: Microseconds;
|
|
90
|
+
};
|
|
91
|
+
[prop: string]: unknown;
|
|
92
|
+
}
|
|
93
|
+
export interface FoundationSubscriptionLossPtlMessage {
|
|
94
|
+
Message: 'Foundation::SubscriptionLoss';
|
|
95
|
+
Version: number;
|
|
96
|
+
reason: {
|
|
97
|
+
value: number;
|
|
98
|
+
};
|
|
99
|
+
header: {
|
|
100
|
+
id_job: number;
|
|
101
|
+
[prop: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
[prop: string]: unknown;
|
|
104
|
+
}
|
|
105
|
+
export interface FoundationOrderbookPriceResponsePtlMessage {
|
|
106
|
+
Message: 'Foundation::OrderbookPriceResponse';
|
|
107
|
+
Version: number;
|
|
108
|
+
header: TransportLayerClientResponseHeaderPtlType;
|
|
109
|
+
[prop: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
export interface FoundationOrderbookPriceRequestPtlMessage {
|
|
112
|
+
Message: 'Foundation::OrderbookPriceRequest';
|
|
113
|
+
Version: number;
|
|
114
|
+
header: TransportLayerClientRequestHeaderPtlType;
|
|
115
|
+
id_notation: number;
|
|
116
|
+
max_levels: number;
|
|
117
|
+
[prop: string]: unknown;
|
|
118
|
+
}
|
|
119
|
+
export interface FoundationOrderbookPriceEntryUpdatePtlMessage {
|
|
120
|
+
Message: 'Foundation::OrderbookPriceEntryUpdate';
|
|
121
|
+
Version: number;
|
|
122
|
+
id_notation: number;
|
|
123
|
+
header: {
|
|
124
|
+
id_service: number;
|
|
125
|
+
processing_time: number;
|
|
126
|
+
[prop: string]: unknown;
|
|
127
|
+
};
|
|
128
|
+
[prop: string]: unknown;
|
|
129
|
+
}
|
|
130
|
+
export interface FoundationAuthenticationResponsePtlMessage {
|
|
131
|
+
Message: 'Foundation::AuthenticationResponse';
|
|
132
|
+
Version: number;
|
|
133
|
+
result: {
|
|
134
|
+
responses: {
|
|
135
|
+
salt: {
|
|
136
|
+
value: {
|
|
137
|
+
b64: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
salted_hash_1: string;
|
|
141
|
+
salted_hash_2: string;
|
|
142
|
+
salted_hash_3: string;
|
|
143
|
+
}[];
|
|
144
|
+
};
|
|
145
|
+
challenge: {
|
|
146
|
+
challenge: {
|
|
147
|
+
b64: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
id_user: number;
|
|
151
|
+
authentication: {
|
|
152
|
+
salt: {
|
|
153
|
+
value: {
|
|
154
|
+
b64: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
encrypted_secrets: {
|
|
158
|
+
encrypted_secret: {
|
|
159
|
+
b64: string;
|
|
160
|
+
};
|
|
161
|
+
}[];
|
|
162
|
+
};
|
|
163
|
+
[prop: string]: unknown;
|
|
164
|
+
}
|
|
165
|
+
export interface FoundationAuthenticationTokenResponsePtlMessage {
|
|
166
|
+
Message: 'Foundation::AuthenticationTokenResponse';
|
|
167
|
+
Version: number;
|
|
168
|
+
header: TransportLayerClientResponseHeaderPtlType;
|
|
169
|
+
token: {
|
|
170
|
+
value: {
|
|
171
|
+
b64: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
expiry: {
|
|
175
|
+
microseconds: Microseconds;
|
|
176
|
+
};
|
|
177
|
+
[prop: string]: unknown;
|
|
178
|
+
}
|
|
179
|
+
export interface FoundationHTTPProxyResponsePtlMessage {
|
|
180
|
+
Message: 'Foundation::HTTPProxyResponse';
|
|
181
|
+
Version: number;
|
|
182
|
+
header: TransportLayerClientResponseHeaderPtlType;
|
|
183
|
+
response: {
|
|
184
|
+
status_code: {
|
|
185
|
+
value: number;
|
|
186
|
+
};
|
|
187
|
+
status_reason: string;
|
|
188
|
+
headers: {
|
|
189
|
+
values: {
|
|
190
|
+
key: string;
|
|
191
|
+
value: string;
|
|
192
|
+
}[];
|
|
193
|
+
};
|
|
194
|
+
body: {
|
|
195
|
+
value: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
info: {
|
|
199
|
+
api: string;
|
|
200
|
+
source_host: string;
|
|
201
|
+
source_port: number;
|
|
202
|
+
};
|
|
203
|
+
[prop: string]: unknown;
|
|
204
|
+
}
|
|
205
|
+
export interface AuthenticationByTokenResponsePtlMessage {
|
|
206
|
+
Message: 'AuthenticationByTokenResponse';
|
|
207
|
+
Version: number;
|
|
208
|
+
[prop: string]: unknown;
|
|
209
|
+
}
|
|
210
|
+
export interface FoundationConfigurationResponsePtlMessage {
|
|
211
|
+
Message: 'Foundation::ConfigurationResponse';
|
|
212
|
+
Version: number;
|
|
213
|
+
server_info: {
|
|
214
|
+
description: string;
|
|
215
|
+
software: string;
|
|
216
|
+
os: string;
|
|
217
|
+
uuid: {
|
|
218
|
+
id_1: string;
|
|
219
|
+
id_2: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
payload_info: {
|
|
223
|
+
payload_type: {
|
|
224
|
+
value: number;
|
|
225
|
+
};
|
|
226
|
+
payload_content: string;
|
|
227
|
+
stripe_set: {
|
|
228
|
+
number_stripes: number;
|
|
229
|
+
bit_array: number[];
|
|
230
|
+
};
|
|
231
|
+
deployment_stage: {
|
|
232
|
+
value: number | string;
|
|
233
|
+
};
|
|
234
|
+
payload_details: {
|
|
235
|
+
payload: unknown[];
|
|
236
|
+
};
|
|
237
|
+
location: string;
|
|
238
|
+
operation_mode: {
|
|
239
|
+
value: number;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
feature_flags_granted: {
|
|
243
|
+
value: string;
|
|
244
|
+
};
|
|
245
|
+
load: {
|
|
246
|
+
capacity: number;
|
|
247
|
+
idle: number;
|
|
248
|
+
};
|
|
249
|
+
maximum_idle_interval: number;
|
|
250
|
+
maximum_receivable_message_size: number;
|
|
251
|
+
time_at_server: {
|
|
252
|
+
microseconds: number;
|
|
253
|
+
};
|
|
254
|
+
[prop: string]: unknown;
|
|
255
|
+
}
|
|
256
|
+
export interface FoundationTransportLayerClientConfigurationResponsePtlMessage {
|
|
257
|
+
Message: 'Foundation::TransportLayerClientConfigurationResponse';
|
|
258
|
+
Version: number;
|
|
259
|
+
[prop: string]: unknown;
|
|
260
|
+
}
|
|
261
|
+
export interface FoundationDisconnectionMessagePtlMessage {
|
|
262
|
+
Message: 'Foundation::DisconnectionMessage';
|
|
263
|
+
Version: number;
|
|
264
|
+
reason: {
|
|
265
|
+
value: number;
|
|
266
|
+
};
|
|
267
|
+
details: string;
|
|
268
|
+
[prop: string]: unknown;
|
|
269
|
+
}
|
|
270
|
+
export interface PingRequestPtlMessage {
|
|
271
|
+
Message: 'PingRequest';
|
|
272
|
+
Version: number;
|
|
273
|
+
time_at_sender: {
|
|
274
|
+
microseconds: Microseconds;
|
|
275
|
+
};
|
|
276
|
+
[prop: string]: unknown;
|
|
277
|
+
}
|
|
278
|
+
export interface AuthenticationRequestPtlMessage {
|
|
279
|
+
Message: 'AuthenticationRequest';
|
|
280
|
+
Version: number;
|
|
281
|
+
challenge: {
|
|
282
|
+
challenge: number[];
|
|
283
|
+
};
|
|
284
|
+
id_peer: number;
|
|
285
|
+
id_application: number;
|
|
286
|
+
username: string;
|
|
287
|
+
authentication: {
|
|
288
|
+
salt: {
|
|
289
|
+
value: number[];
|
|
290
|
+
};
|
|
291
|
+
encrypted_secrets: {
|
|
292
|
+
encrypted_secret: number[];
|
|
293
|
+
}[];
|
|
294
|
+
};
|
|
295
|
+
[prop: string]: unknown;
|
|
296
|
+
}
|
|
297
|
+
export interface AuthenticationByTokenRequestPtlMessage {
|
|
298
|
+
Message: 'AuthenticationByTokenRequest';
|
|
299
|
+
Version: number;
|
|
300
|
+
token: {
|
|
301
|
+
value: {
|
|
302
|
+
b64: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
software: string;
|
|
306
|
+
os: string;
|
|
307
|
+
feature_flags_wanted: {
|
|
308
|
+
value: number;
|
|
309
|
+
};
|
|
310
|
+
maximum_idle_interval: number;
|
|
311
|
+
maximum_receivable_message_size: number;
|
|
312
|
+
flags: number;
|
|
313
|
+
cache_authentication_salt: {
|
|
314
|
+
value: {
|
|
315
|
+
b64: string;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
cache_authentication_encrypted_secret: {
|
|
319
|
+
encrypted_secret: {
|
|
320
|
+
b64: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
[prop: string]: unknown;
|
|
324
|
+
}
|
|
325
|
+
export interface ConfigurationRequestPtlMessage {
|
|
326
|
+
Message: 'ConfigurationRequest';
|
|
327
|
+
Version: number;
|
|
328
|
+
result: {
|
|
329
|
+
responses: {
|
|
330
|
+
salt: {
|
|
331
|
+
value: number[];
|
|
332
|
+
};
|
|
333
|
+
salted_hash_1: string;
|
|
334
|
+
salted_hash_2: string;
|
|
335
|
+
salted_hash_3: string;
|
|
336
|
+
}[];
|
|
337
|
+
};
|
|
338
|
+
client_info: {
|
|
339
|
+
description: string;
|
|
340
|
+
software: string;
|
|
341
|
+
os: string;
|
|
342
|
+
uuid: {
|
|
343
|
+
id_1: number;
|
|
344
|
+
id_2: number;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
payload_info: {
|
|
348
|
+
payload_type: {
|
|
349
|
+
value: number;
|
|
350
|
+
};
|
|
351
|
+
payload_content: string;
|
|
352
|
+
stripe_set: {
|
|
353
|
+
number_stripes: number;
|
|
354
|
+
bit_array: number[];
|
|
355
|
+
};
|
|
356
|
+
deployment_stage: {
|
|
357
|
+
value: number;
|
|
358
|
+
};
|
|
359
|
+
payload_details: {
|
|
360
|
+
payload: unknown[];
|
|
361
|
+
};
|
|
362
|
+
location: string;
|
|
363
|
+
operation_mode: {
|
|
364
|
+
value: number;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
feature_flags_wanted: {
|
|
368
|
+
value: number;
|
|
369
|
+
};
|
|
370
|
+
maximum_idle_interval: number;
|
|
371
|
+
maximum_receivable_message_size: number;
|
|
372
|
+
time_at_client: {
|
|
373
|
+
microseconds: number;
|
|
374
|
+
};
|
|
375
|
+
[prop: string]: unknown;
|
|
376
|
+
}
|
|
377
|
+
export interface AuthenticationTokenRequestPtlMessage {
|
|
378
|
+
Message: 'AuthenticationTokenRequest';
|
|
379
|
+
Version: number;
|
|
380
|
+
header: TransportLayerClientRequestHeaderPtlType;
|
|
381
|
+
lifetime_seconds_r2: number;
|
|
382
|
+
flags: number;
|
|
383
|
+
[prop: string]: unknown;
|
|
384
|
+
}
|
|
385
|
+
export interface CancelSubscriptionRequestPtlMessage {
|
|
386
|
+
Message: 'CancelSubscriptionRequest';
|
|
387
|
+
Version: number;
|
|
388
|
+
header: TransportLayerClientRequestHeaderPtlType;
|
|
389
|
+
id_job_subscription: number;
|
|
390
|
+
[prop: string]: unknown;
|
|
391
|
+
}
|
|
392
|
+
export interface TransportLayerClientConfigurationRequestPtlMessage {
|
|
393
|
+
Message: 'TransportLayerClientConfigurationRequest';
|
|
394
|
+
Version: number;
|
|
395
|
+
flags: number;
|
|
396
|
+
[prop: string]: unknown;
|
|
397
|
+
}
|
|
398
|
+
export interface HighLevelRequestPtlMessage {
|
|
399
|
+
Message: 'HighLevelRequest';
|
|
400
|
+
Version: number;
|
|
401
|
+
header: TransportLayerClientRequestHeaderPtlType;
|
|
402
|
+
accept: string;
|
|
403
|
+
content_type: string;
|
|
404
|
+
body: {
|
|
405
|
+
value: string[];
|
|
406
|
+
};
|
|
407
|
+
path: string;
|
|
408
|
+
query: string;
|
|
409
|
+
method: {
|
|
410
|
+
value: number;
|
|
411
|
+
};
|
|
412
|
+
[prop: string]: unknown;
|
|
413
|
+
}
|
|
414
|
+
export interface HttpProxyRequestPtlMessage {
|
|
415
|
+
Message: 'HTTPProxyRequest';
|
|
416
|
+
Version: number;
|
|
417
|
+
header: TransportLayerClientRequestHeaderPtlType;
|
|
418
|
+
request: {
|
|
419
|
+
headers: {
|
|
420
|
+
values: {
|
|
421
|
+
key: string;
|
|
422
|
+
value: string;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
protocol: {
|
|
426
|
+
value: number;
|
|
427
|
+
};
|
|
428
|
+
host: string;
|
|
429
|
+
port: string;
|
|
430
|
+
path: string;
|
|
431
|
+
query: string;
|
|
432
|
+
body: {
|
|
433
|
+
value: string[];
|
|
434
|
+
};
|
|
435
|
+
method: {
|
|
436
|
+
value: number;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
[prop: string]: unknown;
|
|
440
|
+
}
|
|
441
|
+
export interface KeepAliveMessagePtlMessage {
|
|
442
|
+
Message: 'KeepAliveMessage';
|
|
443
|
+
Version: number;
|
|
444
|
+
[prop: string]: unknown;
|
|
445
|
+
}
|
|
446
|
+
export interface GenericHeaderPtlMessage {
|
|
447
|
+
Message: never;
|
|
448
|
+
header: object;
|
|
449
|
+
[prop: string]: unknown;
|
|
450
|
+
}
|
|
451
|
+
export interface GenericAuthenticatedPtlMessage {
|
|
452
|
+
Message: never;
|
|
453
|
+
header?: {
|
|
454
|
+
authentication_identifiers?: {
|
|
455
|
+
id_application?: number;
|
|
456
|
+
id_user?: number;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
[prop: string]: unknown;
|
|
460
|
+
}
|
|
461
|
+
export interface GenericJobInRootPtlMessage {
|
|
462
|
+
Message: never;
|
|
463
|
+
id_job: number;
|
|
464
|
+
[prop: string]: unknown;
|
|
465
|
+
}
|
|
466
|
+
export interface GenericJobInHeaderPtlMessage {
|
|
467
|
+
Message: never;
|
|
468
|
+
header: {
|
|
469
|
+
id_job: number;
|
|
470
|
+
};
|
|
471
|
+
[prop: string]: unknown;
|
|
472
|
+
}
|
|
473
|
+
export interface GenericServiceAndNotationPtlMessage {
|
|
474
|
+
Message: never;
|
|
475
|
+
id_notation: number;
|
|
476
|
+
header: {
|
|
477
|
+
id_service: number;
|
|
478
|
+
};
|
|
479
|
+
[prop: string]: unknown;
|
|
480
|
+
}
|
|
481
|
+
export type PtlMessage = FoundationHighLevelResponsePtlMessage | FoundationHighLevelUpdatePtlMessage | FoundationErrorResponsePtlMessage | FoundationPingResponsePtlMessage | FoundationSubscriptionLossPtlMessage | FoundationOrderbookPriceResponsePtlMessage | FoundationOrderbookPriceRequestPtlMessage | FoundationOrderbookPriceEntryUpdatePtlMessage | FoundationAuthenticationResponsePtlMessage | FoundationAuthenticationTokenResponsePtlMessage | FoundationHTTPProxyResponsePtlMessage | AuthenticationByTokenResponsePtlMessage | AuthenticationTokenRequestPtlMessage | FoundationConfigurationResponsePtlMessage | FoundationTransportLayerClientConfigurationResponsePtlMessage | FoundationDisconnectionMessagePtlMessage | PingRequestPtlMessage | AuthenticationRequestPtlMessage | AuthenticationByTokenRequestPtlMessage | ConfigurationRequestPtlMessage | CancelSubscriptionRequestPtlMessage | TransportLayerClientConfigurationRequestPtlMessage | HttpProxyRequestPtlMessage | HighLevelRequestPtlMessage | KeepAliveMessagePtlMessage | GenericHeaderPtlMessage | GenericAuthenticatedPtlMessage | GenericJobInRootPtlMessage | GenericJobInHeaderPtlMessage | GenericServiceAndNotationPtlMessage;
|
|
482
|
+
export declare const hasJobIdInRoot: (msg: PtlMessage) => msg is GenericJobInRootPtlMessage;
|
|
483
|
+
export declare const hasJobIdInHeader: (msg: PtlMessage) => msg is GenericJobInHeaderPtlMessage;
|
|
484
|
+
export declare const isServiceAndNotationBased: (msg: PtlMessage) => msg is GenericServiceAndNotationPtlMessage;
|
|
485
|
+
export declare const isPtlMessageWithHeader: (msg: PtlMessage) => msg is GenericHeaderPtlMessage;
|
|
486
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransportLayerClientRequestHeader } from './TransportLayerClientRequestHeader';
|
|
2
|
-
import type { PtlMessage } from '
|
|
3
|
-
export declare abstract class AbstractMdg2Request {
|
|
2
|
+
import type { PtlMessage } from '../interfaces';
|
|
3
|
+
export declare abstract class AbstractMdg2Request<Message = PtlMessage> {
|
|
4
4
|
header: TransportLayerClientRequestHeader;
|
|
5
5
|
protected coreMembers: {
|
|
6
6
|
Version: number;
|
|
@@ -8,5 +8,5 @@ export declare abstract class AbstractMdg2Request {
|
|
|
8
8
|
};
|
|
9
9
|
protected members: Record<string, any>;
|
|
10
10
|
protected constructor(message: string, version: number);
|
|
11
|
-
getPtlMessage():
|
|
11
|
+
getPtlMessage(): Message;
|
|
12
12
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { PtlMessage } from '../interfaces';
|
|
1
2
|
export declare class AuthenticationByTokenRequest {
|
|
2
3
|
private readonly token;
|
|
3
4
|
private readonly maximumIdleInterval;
|
|
4
|
-
constructor(token:
|
|
5
|
-
|
|
5
|
+
constructor(token: {
|
|
6
|
+
b64: string;
|
|
7
|
+
}, maximumIdleInterval: number);
|
|
8
|
+
toJson(): PtlMessage;
|
|
6
9
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
encryptedSecrets
|
|
4
|
-
encrypted_secret:
|
|
1
|
+
import type { AuthenticationRequestPtlMessage } from '../interfaces';
|
|
2
|
+
interface AuthenticationRequestOptions {
|
|
3
|
+
encryptedSecrets: {
|
|
4
|
+
encrypted_secret: number[];
|
|
5
5
|
}[];
|
|
6
|
-
idPeer
|
|
7
|
-
username
|
|
8
|
-
salt
|
|
6
|
+
idPeer: number;
|
|
7
|
+
username: string;
|
|
8
|
+
salt: number[];
|
|
9
9
|
challenge: number[];
|
|
10
10
|
idApplication: number;
|
|
11
11
|
}
|
|
12
12
|
export declare class AuthenticationRequest {
|
|
13
13
|
private static readonly DEFAULT_OPTIONS;
|
|
14
14
|
private readonly options;
|
|
15
|
-
constructor(options: AuthenticationRequestOptions);
|
|
16
|
-
toJson():
|
|
15
|
+
constructor(options: Partial<AuthenticationRequestOptions>);
|
|
16
|
+
toJson(): AuthenticationRequestPtlMessage;
|
|
17
17
|
}
|
|
18
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { AuthenticationTokenRequestPtlMessage } from '../interfaces';
|
|
1
2
|
import { AbstractMdg2Request } from './AbstractMdg2Request';
|
|
2
|
-
export declare class AuthenticationTokenRequest extends AbstractMdg2Request {
|
|
3
|
+
export declare class AuthenticationTokenRequest extends AbstractMdg2Request<AuthenticationTokenRequestPtlMessage> {
|
|
3
4
|
static NAME: string;
|
|
4
5
|
static VERSION: number;
|
|
5
6
|
static LIFETIME_SECONDS_DEFAULT: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { CancelSubscriptionRequestPtlMessage } from '../interfaces';
|
|
1
2
|
import { AbstractMdg2Request } from './AbstractMdg2Request';
|
|
2
|
-
export declare class CancelSubscriptionRequest extends AbstractMdg2Request {
|
|
3
|
+
export declare class CancelSubscriptionRequest extends AbstractMdg2Request<CancelSubscriptionRequestPtlMessage> {
|
|
3
4
|
static readonly NAME = "CancelSubscriptionRequest";
|
|
4
5
|
static readonly VERSION = 6;
|
|
5
6
|
constructor(jobId: number);
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { DeploymentStage } from '../../connection';
|
|
2
|
+
import type { ConfigurationRequestPtlMessage } from '../interfaces';
|
|
2
3
|
export interface ConfigurationRequestOptions {
|
|
3
4
|
shared_secret: Buffer;
|
|
4
5
|
payload_content: string;
|
|
5
6
|
deployment_stage: DeploymentStage;
|
|
6
7
|
maximum_idle_interval: number;
|
|
7
8
|
}
|
|
9
|
+
type Challenge = string | {
|
|
10
|
+
b64: string;
|
|
11
|
+
} | number[];
|
|
8
12
|
export declare class ConfigurationRequest {
|
|
9
13
|
private readonly challenge;
|
|
10
14
|
private readonly options;
|
|
11
|
-
constructor(challenge:
|
|
12
|
-
toJson():
|
|
15
|
+
constructor(challenge: Challenge, options: ConfigurationRequestOptions);
|
|
16
|
+
toJson(): ConfigurationRequestPtlMessage;
|
|
13
17
|
private static readChallenge;
|
|
14
18
|
}
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbstractMdg2Request } from './AbstractMdg2Request';
|
|
2
|
-
import type { HTTPProxyRequestOptions, HTTPMethod } from '../interfaces';
|
|
2
|
+
import type { HTTPProxyRequestOptions, HTTPMethod, HttpProxyRequestPtlMessage } from '../interfaces';
|
|
3
3
|
export type HTTPProxyRequestBody = string | Record<string, unknown> | unknown[];
|
|
4
|
-
export declare class HTTPProxyRequest extends AbstractMdg2Request {
|
|
4
|
+
export declare class HTTPProxyRequest extends AbstractMdg2Request<HttpProxyRequestPtlMessage> {
|
|
5
5
|
static readonly NAME = "HTTPProxyRequest";
|
|
6
6
|
static readonly VERSION = 2;
|
|
7
7
|
static readonly PROTOCOL: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { HighLevelRequestMethod, HighLevelRequestOptions } from '../interfaces';
|
|
1
|
+
import type { HighLevelRequestMethod, HighLevelRequestOptions, HighLevelRequestPtlMessage } from '../interfaces';
|
|
2
2
|
import { AbstractMdg2Request } from './AbstractMdg2Request';
|
|
3
|
-
export declare class HighLevelRequest extends AbstractMdg2Request {
|
|
3
|
+
export declare class HighLevelRequest extends AbstractMdg2Request<HighLevelRequestPtlMessage> {
|
|
4
4
|
static readonly NAME = "HighLevelRequest";
|
|
5
5
|
static readonly VERSION = 3;
|
|
6
6
|
static readonly METHOD: {
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PtlMessage } from '../../common/interfaces';
|
|
3
|
-
export interface PingRequestMessage extends PtlMessage {
|
|
4
|
-
time_at_sender: {
|
|
5
|
-
microseconds: Time;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
1
|
+
import type { PingRequestPtlMessage } from '../interfaces';
|
|
8
2
|
export declare class PingRequest {
|
|
9
3
|
static readonly NAME = "PingRequest";
|
|
10
4
|
static readonly VERSION = 3;
|
|
11
5
|
private _timeAtSender;
|
|
12
6
|
constructor();
|
|
13
|
-
getPtlMessage():
|
|
7
|
+
getPtlMessage(): PingRequestPtlMessage;
|
|
14
8
|
resetTimeAtSender(): void;
|
|
15
9
|
get timeAtSender(): number;
|
|
16
10
|
}
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
import type { Quality } from '../../common/types';
|
|
2
2
|
import type { TransportLayerClientRequestHeaderFlag } from '../types';
|
|
3
3
|
import { type SpanContext } from '@opentelemetry/api';
|
|
4
|
+
import type { TransportLayerClientRequestHeaderPtlType } from '../interfaces';
|
|
4
5
|
export declare const DEFAULT_TIMEOUT_IN_MS = 6000;
|
|
5
|
-
export interface PtlTransportLayerClientRequestHeader {
|
|
6
|
-
dataset: {
|
|
7
|
-
id_dataset: number;
|
|
8
|
-
};
|
|
9
|
-
id_job: number;
|
|
10
|
-
flags_r2: number;
|
|
11
|
-
resend_counter: number;
|
|
12
|
-
timeout: number;
|
|
13
|
-
authentication_identifiers: {
|
|
14
|
-
id_application: number;
|
|
15
|
-
id_user: number;
|
|
16
|
-
};
|
|
17
|
-
cache_key: {
|
|
18
|
-
value: number[];
|
|
19
|
-
};
|
|
20
|
-
previous_response_hash: {
|
|
21
|
-
value: number[];
|
|
22
|
-
};
|
|
23
|
-
tracing: {
|
|
24
|
-
value: {
|
|
25
|
-
value: number[];
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
6
|
export declare class TransportLayerClientRequestHeader {
|
|
30
7
|
static PRICE_QUALITY: {
|
|
31
8
|
RLT: number;
|
|
@@ -35,7 +12,7 @@ export declare class TransportLayerClientRequestHeader {
|
|
|
35
12
|
private static readonly FLAG_VALUE;
|
|
36
13
|
private readonly headerMembers;
|
|
37
14
|
private readonly flags;
|
|
38
|
-
getPtlMessage():
|
|
15
|
+
getPtlMessage(): TransportLayerClientRequestHeaderPtlType;
|
|
39
16
|
getQuality(): Quality;
|
|
40
17
|
setQuality(quality: Quality): void;
|
|
41
18
|
setIdApplication(idApplication: number, replaceValueIfSet?: boolean): void;
|
|
@@ -43,7 +20,7 @@ export declare class TransportLayerClientRequestHeader {
|
|
|
43
20
|
setFlag(flag: TransportLayerClientRequestHeaderFlag, enable?: boolean): void;
|
|
44
21
|
getFlagsValue(): number;
|
|
45
22
|
isFlagValueSet(flagValue: TransportLayerClientRequestHeaderFlag): boolean;
|
|
46
|
-
setJobId(jobId:
|
|
23
|
+
setJobId(jobId: number): void;
|
|
47
24
|
getJobId(): number;
|
|
48
25
|
countResend(): void;
|
|
49
26
|
getResendCounter(): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class AuthenticationTokenResponse
|
|
1
|
+
import type { FoundationAuthenticationTokenResponsePtlMessage } from '../interfaces';
|
|
2
|
+
export declare class AuthenticationTokenResponse {
|
|
3
3
|
private readonly token;
|
|
4
4
|
private readonly expiry;
|
|
5
|
-
constructor(raw:
|
|
5
|
+
constructor(raw: FoundationAuthenticationTokenResponsePtlMessage);
|
|
6
6
|
getToken(): string;
|
|
7
7
|
getExpiry(): number;
|
|
8
8
|
}
|