@sebspark/tradeinsight 0.3.0 → 0.5.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 +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- 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,8 +12,8 @@ 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;
|
|
@@ -39,9 +39,9 @@ declare const parseId: (id: string) => {
|
|
|
39
39
|
toCurrency?: string;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
declare const
|
|
43
|
-
type
|
|
44
|
-
[
|
|
42
|
+
declare const TickersTopic = "tradeinsight.tickers";
|
|
43
|
+
type TickersPubSubChannels = {
|
|
44
|
+
[TickersTopic]: TickerMessage;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export { CloudSchema, type InstrumentPrice, type
|
|
47
|
+
export { CloudSchema, type InstrumentPrice, 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,8 +12,8 @@ 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;
|
|
@@ -39,9 +39,9 @@ declare const parseId: (id: string) => {
|
|
|
39
39
|
toCurrency?: string;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
declare const
|
|
43
|
-
type
|
|
44
|
-
[
|
|
42
|
+
declare const TickersTopic = "tradeinsight.tickers";
|
|
43
|
+
type TickersPubSubChannels = {
|
|
44
|
+
[TickersTopic]: TickerMessage;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export { CloudSchema, type InstrumentPrice, type
|
|
47
|
+
export { CloudSchema, type InstrumentPrice, type Ticker, type TickerMessage, type TickersPubSubChannels, TickersTopic, createForexId, createStockId, parseId };
|
package/dist/index.js
CHANGED
|
@@ -21,19 +21,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
CloudSchema: () => CloudSchema,
|
|
24
|
-
|
|
24
|
+
TickersTopic: () => TickersTopic,
|
|
25
25
|
createForexId: () => createForexId,
|
|
26
26
|
createStockId: () => createStockId,
|
|
27
27
|
parseId: () => parseId
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(index_exports);
|
|
30
30
|
|
|
31
|
-
// src/generated/
|
|
31
|
+
// src/generated/tickerMessage.ts
|
|
32
32
|
var CloudSchema = {
|
|
33
|
-
schemaId: "
|
|
33
|
+
schemaId: "ticker-v1",
|
|
34
34
|
avroDefinition: `{
|
|
35
35
|
"type": "record",
|
|
36
|
-
"name": "
|
|
36
|
+
"name": "TickerMessage",
|
|
37
37
|
"namespace": "com.financial.api",
|
|
38
38
|
"doc": "Real-time update containing the latest pricing details of financial instruments.",
|
|
39
39
|
"fields": [
|
|
@@ -43,13 +43,13 @@ var CloudSchema = {
|
|
|
43
43
|
"type": "array",
|
|
44
44
|
"items": {
|
|
45
45
|
"type": "record",
|
|
46
|
-
"name": "
|
|
46
|
+
"name": "Ticker",
|
|
47
47
|
"doc": "A real-time update containing the latest pricing details of a financial instrument.",
|
|
48
48
|
"fields": [
|
|
49
49
|
{
|
|
50
50
|
"name": "id",
|
|
51
51
|
"type": "string",
|
|
52
|
-
"doc": "Unique identifier of the instrument
|
|
52
|
+
"doc": "Unique identifier of the instrument. Consists of type followed by the least common denominators making it unique. Example: STOCK-SE0000148884;XSTO;SEK"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "mic",
|
|
@@ -160,11 +160,11 @@ var parseId = (id) => {
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
// src/pubsub/main.ts
|
|
163
|
-
var
|
|
163
|
+
var TickersTopic = "tradeinsight.tickers";
|
|
164
164
|
// Annotate the CommonJS export names for ESM import in node:
|
|
165
165
|
0 && (module.exports = {
|
|
166
166
|
CloudSchema,
|
|
167
|
-
|
|
167
|
+
TickersTopic,
|
|
168
168
|
createForexId,
|
|
169
169
|
createStockId,
|
|
170
170
|
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",
|
|
@@ -130,10 +130,10 @@ var parseId = (id) => {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
// src/pubsub/main.ts
|
|
133
|
-
var
|
|
133
|
+
var TickersTopic = "tradeinsight.tickers";
|
|
134
134
|
export {
|
|
135
135
|
CloudSchema,
|
|
136
|
-
|
|
136
|
+
TickersTopic,
|
|
137
137
|
createForexId,
|
|
138
138
|
createStockId,
|
|
139
139
|
parseId
|