@sebspark/tradeinsight 0.3.0 → 0.4.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/dist/index.d.mts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +8 -5
- package/dist/index.mjs +7 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ interface InstrumentPrice {
|
|
|
4
4
|
last: null | number;
|
|
5
5
|
lastInSek: null | number;
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
7
|
+
interface Ticker {
|
|
8
8
|
id: string;
|
|
9
9
|
mic: string;
|
|
10
10
|
isin: string;
|
|
@@ -12,14 +12,32 @@ interface StockTicker {
|
|
|
12
12
|
currencyCode: string;
|
|
13
13
|
price: InstrumentPrice;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
16
|
-
tickers:
|
|
15
|
+
interface TickerMessage {
|
|
16
|
+
tickers: Ticker[];
|
|
17
17
|
}
|
|
18
18
|
declare const CloudSchema: {
|
|
19
19
|
schemaId: string;
|
|
20
20
|
avroDefinition: string;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use the Ticker type instead.
|
|
25
|
+
*/
|
|
26
|
+
interface StockTicker {
|
|
27
|
+
id: string;
|
|
28
|
+
mic: string;
|
|
29
|
+
isin: string;
|
|
30
|
+
ticker: string;
|
|
31
|
+
currencyCode: string;
|
|
32
|
+
price: InstrumentPrice;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use the TickerMessage type instead.
|
|
36
|
+
*/
|
|
37
|
+
interface StockTickerMessage {
|
|
38
|
+
tickers: StockTicker[];
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
declare const createStockId: ({ isin, mic, currency, }: {
|
|
24
42
|
isin: string;
|
|
25
43
|
currency: string;
|
|
@@ -39,9 +57,19 @@ declare const parseId: (id: string) => {
|
|
|
39
57
|
toCurrency?: string;
|
|
40
58
|
};
|
|
41
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use TickersTopic instead
|
|
62
|
+
*/
|
|
42
63
|
declare const StockTickerTopic = "tradeinsight.stockticker";
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use TickersPubSubChannels instead
|
|
66
|
+
*/
|
|
43
67
|
type StockTickerPubSubChannels = {
|
|
44
68
|
[StockTickerTopic]: StockTickerMessage;
|
|
45
69
|
};
|
|
70
|
+
declare const TickersTopic = "tradeinsight.tickers";
|
|
71
|
+
type TickersPubSubChannels = {
|
|
72
|
+
[TickersTopic]: TickerMessage;
|
|
73
|
+
};
|
|
46
74
|
|
|
47
|
-
export { CloudSchema, type InstrumentPrice, type StockTicker, type StockTickerMessage, type StockTickerPubSubChannels, StockTickerTopic, createForexId, createStockId, parseId };
|
|
75
|
+
export { CloudSchema, type InstrumentPrice, type StockTicker, type StockTickerMessage, type StockTickerPubSubChannels, StockTickerTopic, type Ticker, type TickerMessage, type TickersPubSubChannels, TickersTopic, createForexId, createStockId, parseId };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ interface InstrumentPrice {
|
|
|
4
4
|
last: null | number;
|
|
5
5
|
lastInSek: null | number;
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
7
|
+
interface Ticker {
|
|
8
8
|
id: string;
|
|
9
9
|
mic: string;
|
|
10
10
|
isin: string;
|
|
@@ -12,14 +12,32 @@ interface StockTicker {
|
|
|
12
12
|
currencyCode: string;
|
|
13
13
|
price: InstrumentPrice;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
16
|
-
tickers:
|
|
15
|
+
interface TickerMessage {
|
|
16
|
+
tickers: Ticker[];
|
|
17
17
|
}
|
|
18
18
|
declare const CloudSchema: {
|
|
19
19
|
schemaId: string;
|
|
20
20
|
avroDefinition: string;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use the Ticker type instead.
|
|
25
|
+
*/
|
|
26
|
+
interface StockTicker {
|
|
27
|
+
id: string;
|
|
28
|
+
mic: string;
|
|
29
|
+
isin: string;
|
|
30
|
+
ticker: string;
|
|
31
|
+
currencyCode: string;
|
|
32
|
+
price: InstrumentPrice;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use the TickerMessage type instead.
|
|
36
|
+
*/
|
|
37
|
+
interface StockTickerMessage {
|
|
38
|
+
tickers: StockTicker[];
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
declare const createStockId: ({ isin, mic, currency, }: {
|
|
24
42
|
isin: string;
|
|
25
43
|
currency: string;
|
|
@@ -39,9 +57,19 @@ declare const parseId: (id: string) => {
|
|
|
39
57
|
toCurrency?: string;
|
|
40
58
|
};
|
|
41
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use TickersTopic instead
|
|
62
|
+
*/
|
|
42
63
|
declare const StockTickerTopic = "tradeinsight.stockticker";
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use TickersPubSubChannels instead
|
|
66
|
+
*/
|
|
43
67
|
type StockTickerPubSubChannels = {
|
|
44
68
|
[StockTickerTopic]: StockTickerMessage;
|
|
45
69
|
};
|
|
70
|
+
declare const TickersTopic = "tradeinsight.tickers";
|
|
71
|
+
type TickersPubSubChannels = {
|
|
72
|
+
[TickersTopic]: TickerMessage;
|
|
73
|
+
};
|
|
46
74
|
|
|
47
|
-
export { CloudSchema, type InstrumentPrice, type StockTicker, type StockTickerMessage, type StockTickerPubSubChannels, StockTickerTopic, createForexId, createStockId, parseId };
|
|
75
|
+
export { CloudSchema, type InstrumentPrice, type StockTicker, type StockTickerMessage, type StockTickerPubSubChannels, StockTickerTopic, type Ticker, type TickerMessage, type TickersPubSubChannels, TickersTopic, createForexId, createStockId, parseId };
|
package/dist/index.js
CHANGED
|
@@ -22,18 +22,19 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
CloudSchema: () => CloudSchema,
|
|
24
24
|
StockTickerTopic: () => StockTickerTopic,
|
|
25
|
+
TickersTopic: () => TickersTopic,
|
|
25
26
|
createForexId: () => createForexId,
|
|
26
27
|
createStockId: () => createStockId,
|
|
27
28
|
parseId: () => parseId
|
|
28
29
|
});
|
|
29
30
|
module.exports = __toCommonJS(index_exports);
|
|
30
31
|
|
|
31
|
-
// src/generated/
|
|
32
|
+
// src/generated/tickerMessage.ts
|
|
32
33
|
var CloudSchema = {
|
|
33
|
-
schemaId: "
|
|
34
|
+
schemaId: "ticker-v1",
|
|
34
35
|
avroDefinition: `{
|
|
35
36
|
"type": "record",
|
|
36
|
-
"name": "
|
|
37
|
+
"name": "TickerMessage",
|
|
37
38
|
"namespace": "com.financial.api",
|
|
38
39
|
"doc": "Real-time update containing the latest pricing details of financial instruments.",
|
|
39
40
|
"fields": [
|
|
@@ -43,13 +44,13 @@ var CloudSchema = {
|
|
|
43
44
|
"type": "array",
|
|
44
45
|
"items": {
|
|
45
46
|
"type": "record",
|
|
46
|
-
"name": "
|
|
47
|
+
"name": "Ticker",
|
|
47
48
|
"doc": "A real-time update containing the latest pricing details of a financial instrument.",
|
|
48
49
|
"fields": [
|
|
49
50
|
{
|
|
50
51
|
"name": "id",
|
|
51
52
|
"type": "string",
|
|
52
|
-
"doc": "Unique identifier of the instrument
|
|
53
|
+
"doc": "Unique identifier of the instrument. Consists of type followed by the least common denominators making it unique. Example: STOCK-SE0000148884;XSTO;SEK"
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
"name": "mic",
|
|
@@ -161,10 +162,12 @@ var parseId = (id) => {
|
|
|
161
162
|
|
|
162
163
|
// src/pubsub/main.ts
|
|
163
164
|
var StockTickerTopic = "tradeinsight.stockticker";
|
|
165
|
+
var TickersTopic = "tradeinsight.tickers";
|
|
164
166
|
// Annotate the CommonJS export names for ESM import in node:
|
|
165
167
|
0 && (module.exports = {
|
|
166
168
|
CloudSchema,
|
|
167
169
|
StockTickerTopic,
|
|
170
|
+
TickersTopic,
|
|
168
171
|
createForexId,
|
|
169
172
|
createStockId,
|
|
170
173
|
parseId
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// src/generated/
|
|
1
|
+
// src/generated/tickerMessage.ts
|
|
2
2
|
var CloudSchema = {
|
|
3
|
-
schemaId: "
|
|
3
|
+
schemaId: "ticker-v1",
|
|
4
4
|
avroDefinition: `{
|
|
5
5
|
"type": "record",
|
|
6
|
-
"name": "
|
|
6
|
+
"name": "TickerMessage",
|
|
7
7
|
"namespace": "com.financial.api",
|
|
8
8
|
"doc": "Real-time update containing the latest pricing details of financial instruments.",
|
|
9
9
|
"fields": [
|
|
@@ -13,13 +13,13 @@ var CloudSchema = {
|
|
|
13
13
|
"type": "array",
|
|
14
14
|
"items": {
|
|
15
15
|
"type": "record",
|
|
16
|
-
"name": "
|
|
16
|
+
"name": "Ticker",
|
|
17
17
|
"doc": "A real-time update containing the latest pricing details of a financial instrument.",
|
|
18
18
|
"fields": [
|
|
19
19
|
{
|
|
20
20
|
"name": "id",
|
|
21
21
|
"type": "string",
|
|
22
|
-
"doc": "Unique identifier of the instrument
|
|
22
|
+
"doc": "Unique identifier of the instrument. Consists of type followed by the least common denominators making it unique. Example: STOCK-SE0000148884;XSTO;SEK"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "mic",
|
|
@@ -131,9 +131,11 @@ var parseId = (id) => {
|
|
|
131
131
|
|
|
132
132
|
// src/pubsub/main.ts
|
|
133
133
|
var StockTickerTopic = "tradeinsight.stockticker";
|
|
134
|
+
var TickersTopic = "tradeinsight.tickers";
|
|
134
135
|
export {
|
|
135
136
|
CloudSchema,
|
|
136
137
|
StockTickerTopic,
|
|
138
|
+
TickersTopic,
|
|
137
139
|
createForexId,
|
|
138
140
|
createStockId,
|
|
139
141
|
parseId
|