@boarteam/fix-dict-fix44 1.0.0 → 2.0.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/README.md +27 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3673 -2
- package/dist/index.d.ts +3673 -2
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,6 +16,23 @@ const fix = createFixEngine(dictionary);
|
|
|
16
16
|
const wire = fix.encode({ msgType: MsgType.NewOrderSingle, fields: { [Tags.ClOrdID]: 'A1' } });
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Or build the same message with the **typed `message` factory** — statically typed to each
|
|
20
|
+
message's fields/groups, rendering byte-identical to `encode`:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { message, MsgType } from '@boarteam/fix-dict-fix44';
|
|
24
|
+
|
|
25
|
+
const wire = message(MsgType.NewOrderSingle)
|
|
26
|
+
.set('ClOrdID', 'A1')
|
|
27
|
+
.set('Side', '1') // typed to the Side value union
|
|
28
|
+
.render({
|
|
29
|
+
SenderCompID: 'ME',
|
|
30
|
+
TargetCompID: 'YOU',
|
|
31
|
+
MsgSeqNum: 1,
|
|
32
|
+
SendingTime: '20260716-12:00:00',
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
19
36
|
Exports: `dictionary` (the data), `Tags` (field name → tag), `TagNames` (tag → field
|
|
20
37
|
name), `MsgType` (message name → MsgType value), `MsgTypeNames` (MsgType value →
|
|
21
38
|
message name), `Enums` (field name → spec value name → wire string, e.g.
|
|
@@ -26,6 +43,16 @@ per-field const are also same-name types — unions of their wire values — so
|
|
|
26
43
|
field without a top-level const is `MsgType` (tag 35), whose name belongs to the
|
|
27
44
|
message-type map: use `Enums.MsgType`.
|
|
28
45
|
|
|
46
|
+
For the typed encode side it also exports `message` (a factory bound to this dictionary),
|
|
47
|
+
`MessageBodies` (the `MsgType` value → body-type registry), and a named body type per message
|
|
48
|
+
(`NewOrderSingleBody`, `MarketDataSnapshotFullRefreshBody`, …) plus augmentable per-container
|
|
49
|
+
group/component `interface`s (`SecListGrp_NoRelatedSymEntry`, `InstrumentFields`, …) that venue
|
|
50
|
+
extensions patch via declaration merging. For the read side it exports `isMessageType` — a type
|
|
51
|
+
guard that narrows a `MessageView<any>` of unknown type to a specific message's body keyed on its
|
|
52
|
+
`MsgType` value (so `get()` becomes typed) — and `MessageOf<M>`, the matching annotation alias.
|
|
53
|
+
See the [`@boarteam/fix` README](https://www.npmjs.com/package/@boarteam/fix) for the
|
|
54
|
+
typed-message API.
|
|
55
|
+
|
|
29
56
|
Requires `@boarteam/fix` as a peer dependency.
|
|
30
57
|
|
|
31
58
|
## License
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var fix = require('@boarteam/fix');
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
|
|
3
7
|
// src/dictionary.json
|
|
4
8
|
var dictionary_default = {
|
|
5
9
|
version: "FIX.4.4",
|
|
@@ -37821,6 +37825,8 @@ var Enums = {
|
|
|
37821
37825
|
"WorkingIndicator": WorkingIndicator,
|
|
37822
37826
|
"YieldType": YieldType
|
|
37823
37827
|
};
|
|
37828
|
+
var message = fix.messageFactory(dictionary);
|
|
37829
|
+
var isMessageType = fix.messageTypeGuard();
|
|
37824
37830
|
|
|
37825
37831
|
exports.AccountType = AccountType;
|
|
37826
37832
|
exports.AcctIDSource = AcctIDSource;
|
|
@@ -38073,5 +38079,7 @@ exports.UserStatus = UserStatus;
|
|
|
38073
38079
|
exports.WorkingIndicator = WorkingIndicator;
|
|
38074
38080
|
exports.YieldType = YieldType;
|
|
38075
38081
|
exports.dictionary = dictionary;
|
|
38082
|
+
exports.isMessageType = isMessageType;
|
|
38083
|
+
exports.message = message;
|
|
38076
38084
|
//# sourceMappingURL=index.cjs.map
|
|
38077
38085
|
//# sourceMappingURL=index.cjs.map
|