@homaiohq/napi-quickfix 0.0.0-stage → 0.1.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.
Files changed (131) hide show
  1. package/CMakeLists.txt +131 -0
  2. package/LICENSE +21 -0
  3. package/README.md +421 -2
  4. package/THIRD_PARTY_LICENSES +48 -0
  5. package/cpp/acceptor_wrap.cpp +234 -0
  6. package/cpp/acceptor_wrap.h +57 -0
  7. package/cpp/addon.cpp +83 -0
  8. package/cpp/application_bridge.cpp +382 -0
  9. package/cpp/application_bridge.h +151 -0
  10. package/cpp/data_dictionary_wrap.cpp +79 -0
  11. package/cpp/data_dictionary_wrap.h +37 -0
  12. package/cpp/engine_common.cpp +5 -0
  13. package/cpp/engine_common.h +19 -0
  14. package/cpp/engine_workers.h +86 -0
  15. package/cpp/enums.cpp +66 -0
  16. package/cpp/errors.h +142 -0
  17. package/cpp/initiator_wrap.cpp +255 -0
  18. package/cpp/initiator_wrap.h +69 -0
  19. package/cpp/message_wrap.cpp +195 -0
  20. package/cpp/message_wrap.h +53 -0
  21. package/cpp/session_id_wrap.cpp +91 -0
  22. package/cpp/session_id_wrap.h +46 -0
  23. package/cpp/session_settings_wrap.cpp +98 -0
  24. package/cpp/session_settings_wrap.h +40 -0
  25. package/cpp/session_static.cpp +93 -0
  26. package/dist/cjs/acceptor.d.ts +30 -0
  27. package/dist/cjs/acceptor.d.ts.map +1 -0
  28. package/dist/cjs/acceptor.js +39 -0
  29. package/dist/cjs/acceptor.js.map +1 -0
  30. package/dist/cjs/application.d.ts +116 -0
  31. package/dist/cjs/application.d.ts.map +1 -0
  32. package/dist/cjs/application.js +63 -0
  33. package/dist/cjs/application.js.map +1 -0
  34. package/dist/cjs/data-dictionary.d.ts +49 -0
  35. package/dist/cjs/data-dictionary.d.ts.map +1 -0
  36. package/dist/cjs/data-dictionary.js +77 -0
  37. package/dist/cjs/data-dictionary.js.map +1 -0
  38. package/dist/cjs/engine.d.ts +114 -0
  39. package/dist/cjs/engine.d.ts.map +1 -0
  40. package/dist/cjs/engine.js +138 -0
  41. package/dist/cjs/engine.js.map +1 -0
  42. package/dist/cjs/enums.d.ts +22 -0
  43. package/dist/cjs/enums.d.ts.map +1 -0
  44. package/dist/cjs/enums.js +49 -0
  45. package/dist/cjs/enums.js.map +1 -0
  46. package/dist/cjs/generated/fields.d.ts +6123 -0
  47. package/dist/cjs/generated/fields.d.ts.map +1 -0
  48. package/dist/cjs/generated/fields.js +6128 -0
  49. package/dist/cjs/generated/fields.js.map +1 -0
  50. package/dist/cjs/index.d.ts +47 -0
  51. package/dist/cjs/index.d.ts.map +1 -0
  52. package/dist/cjs/index.js +73 -0
  53. package/dist/cjs/index.js.map +1 -0
  54. package/dist/cjs/initiator.d.ts +30 -0
  55. package/dist/cjs/initiator.d.ts.map +1 -0
  56. package/dist/cjs/initiator.js +39 -0
  57. package/dist/cjs/initiator.js.map +1 -0
  58. package/dist/cjs/load-native.cjs +5 -0
  59. package/dist/cjs/message.d.ts +114 -0
  60. package/dist/cjs/message.d.ts.map +1 -0
  61. package/dist/cjs/message.js +162 -0
  62. package/dist/cjs/message.js.map +1 -0
  63. package/dist/cjs/native.d.ts +163 -0
  64. package/dist/cjs/native.d.ts.map +1 -0
  65. package/dist/cjs/native.js +23 -0
  66. package/dist/cjs/native.js.map +1 -0
  67. package/dist/cjs/package.json +1 -0
  68. package/dist/cjs/session-id.d.ts +40 -0
  69. package/dist/cjs/session-id.d.ts.map +1 -0
  70. package/dist/cjs/session-id.js +67 -0
  71. package/dist/cjs/session-id.js.map +1 -0
  72. package/dist/cjs/session-settings.d.ts +47 -0
  73. package/dist/cjs/session-settings.d.ts.map +1 -0
  74. package/dist/cjs/session-settings.js +76 -0
  75. package/dist/cjs/session-settings.js.map +1 -0
  76. package/dist/esm/acceptor.d.ts +30 -0
  77. package/dist/esm/acceptor.d.ts.map +1 -0
  78. package/dist/esm/acceptor.js +35 -0
  79. package/dist/esm/acceptor.js.map +1 -0
  80. package/dist/esm/application.d.ts +116 -0
  81. package/dist/esm/application.d.ts.map +1 -0
  82. package/dist/esm/application.js +58 -0
  83. package/dist/esm/application.js.map +1 -0
  84. package/dist/esm/data-dictionary.d.ts +49 -0
  85. package/dist/esm/data-dictionary.d.ts.map +1 -0
  86. package/dist/esm/data-dictionary.js +73 -0
  87. package/dist/esm/data-dictionary.js.map +1 -0
  88. package/dist/esm/engine.d.ts +114 -0
  89. package/dist/esm/engine.d.ts.map +1 -0
  90. package/dist/esm/engine.js +134 -0
  91. package/dist/esm/engine.js.map +1 -0
  92. package/dist/esm/enums.d.ts +22 -0
  93. package/dist/esm/enums.d.ts.map +1 -0
  94. package/dist/esm/enums.js +45 -0
  95. package/dist/esm/enums.js.map +1 -0
  96. package/dist/esm/generated/fields.d.ts +6123 -0
  97. package/dist/esm/generated/fields.d.ts.map +1 -0
  98. package/dist/esm/generated/fields.js +6125 -0
  99. package/dist/esm/generated/fields.js.map +1 -0
  100. package/dist/esm/index.d.ts +47 -0
  101. package/dist/esm/index.d.ts.map +1 -0
  102. package/dist/esm/index.js +52 -0
  103. package/dist/esm/index.js.map +1 -0
  104. package/dist/esm/initiator.d.ts +30 -0
  105. package/dist/esm/initiator.d.ts.map +1 -0
  106. package/dist/esm/initiator.js +35 -0
  107. package/dist/esm/initiator.js.map +1 -0
  108. package/dist/esm/load-native.cjs +5 -0
  109. package/dist/esm/message.d.ts +114 -0
  110. package/dist/esm/message.d.ts.map +1 -0
  111. package/dist/esm/message.js +156 -0
  112. package/dist/esm/message.js.map +1 -0
  113. package/dist/esm/native.d.ts +163 -0
  114. package/dist/esm/native.d.ts.map +1 -0
  115. package/dist/esm/native.js +17 -0
  116. package/dist/esm/native.js.map +1 -0
  117. package/dist/esm/session-id.d.ts +40 -0
  118. package/dist/esm/session-id.d.ts.map +1 -0
  119. package/dist/esm/session-id.js +63 -0
  120. package/dist/esm/session-id.js.map +1 -0
  121. package/dist/esm/session-settings.d.ts +47 -0
  122. package/dist/esm/session-settings.d.ts.map +1 -0
  123. package/dist/esm/session-settings.js +72 -0
  124. package/dist/esm/session-settings.js.map +1 -0
  125. package/package.json +83 -4
  126. package/prebuilds/darwin-arm64/node.napi.node +0 -0
  127. package/prebuilds/darwin-x64/node.napi.node +0 -0
  128. package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  129. package/prebuilds/linux-x64/node.napi.musl.node +0 -0
  130. package/prebuilds/win32-x64/node.napi.node +0 -0
  131. package/src/load-native.cjs +5 -0
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SessionSettings = void 0;
4
+ /**
5
+ * Ergonomic wrapper around the native `FIX::SessionSettings`.
6
+ */
7
+ const native_js_1 = require("./native.js");
8
+ const session_id_js_1 = require("./session-id.js");
9
+ /**
10
+ * Parsed QuickFIX session settings (the `.cfg` configuration).
11
+ *
12
+ * Construct via {@link SessionSettings.fromString} or
13
+ * {@link SessionSettings.fromFile}; direct construction is not supported.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const settings = SessionSettings.fromString(`
18
+ * [DEFAULT]
19
+ * ConnectionType=initiator
20
+ * ...
21
+ * `);
22
+ * for (const id of settings.getSessions()) console.log(id.toString());
23
+ * ```
24
+ */
25
+ class SessionSettings {
26
+ /** @internal Underlying native handle. */
27
+ #native;
28
+ /** @internal Use {@link SessionSettings.fromString} / {@link SessionSettings.fromFile}. */
29
+ constructor(handle) {
30
+ this.#native = handle;
31
+ }
32
+ /**
33
+ * Parse settings from an in-memory config string.
34
+ *
35
+ * @param cfg The QuickFIX `.cfg` contents.
36
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) on invalid config.
37
+ */
38
+ static fromString(cfg) {
39
+ // The native `fromString` may be a module-level fn or a class static;
40
+ // prefer the module-level fn, fall back to the static.
41
+ const handle = native_js_1.native.sessionSettingsFromString?.(cfg) ??
42
+ native_js_1.native.SessionSettingsWrap.fromString?.(cfg);
43
+ if (!handle) {
44
+ throw new Error('native SessionSettings.fromString is unavailable');
45
+ }
46
+ return new SessionSettings(handle);
47
+ }
48
+ /**
49
+ * Load settings from a `.cfg` file on disk.
50
+ *
51
+ * @param path Path to the QuickFIX `.cfg` file.
52
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) on invalid config.
53
+ */
54
+ static fromFile(path) {
55
+ const handle = native_js_1.native.sessionSettingsFromFile?.(path) ??
56
+ native_js_1.native.SessionSettingsWrap.fromFile?.(path);
57
+ if (!handle) {
58
+ throw new Error('native SessionSettings.fromFile is unavailable');
59
+ }
60
+ return new SessionSettings(handle);
61
+ }
62
+ /** @internal Wrap an existing native handle. */
63
+ static fromNative(handle) {
64
+ return new SessionSettings(handle);
65
+ }
66
+ /** @internal The native handle backing these settings. */
67
+ get nativeHandle() {
68
+ return this.#native;
69
+ }
70
+ /** The sessions declared by this configuration. */
71
+ getSessions() {
72
+ return this.#native.getSessions().map((h) => session_id_js_1.SessionID.fromNative(h));
73
+ }
74
+ }
75
+ exports.SessionSettings = SessionSettings;
76
+ //# sourceMappingURL=session-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-settings.js","sourceRoot":"","sources":["../../src/session-settings.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,2CAAiE;AACjE,mDAA4C;AAE5C;;;;;;;;;;;;;;;GAeG;AACH;IACE,0CAA0C;IACjC,OAAO,CAAwB;IAExC,2FAA2F;IAC3F,YAAoB,MAA6B;QAC/C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,sEAAsE;QACtE,uDAAuD;QACvD,MAAM,MAAM,GACV,kBAAM,CAAC,yBAAyB,EAAE,CAAC,GAAG,CAAC;YACvC,kBAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAY;QAC1B,MAAM,MAAM,GACV,kBAAM,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC;YACtC,kBAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,gDAAgD;IAChD,MAAM,CAAC,UAAU,CAAC,MAA6B;QAC7C,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,0DAA0D;IAC1D,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,mDAAmD;IACnD,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,yBAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ import { Engine, type EngineOptions } from './engine.js';
2
+ export type { EngineOptions } from './engine.js';
3
+ /**
4
+ * A FIX session acceptor (wraps `FIX::SocketAcceptor`). Acceptors listen for
5
+ * inbound connections from initiators as configured in
6
+ * {@link EngineOptions.settings}.
7
+ *
8
+ * Extends {@link Engine} (an {@link import('node:events').EventEmitter}), so you
9
+ * can observe lifecycle/message events in addition to supplying `handlers`.
10
+ * Remember: only `handlers` may mutate outbound messages or reject inbound ones;
11
+ * events are observe-only.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const acceptor = new Acceptor({
16
+ * settings: SessionSettings.fromString(cfg),
17
+ * handlers: {
18
+ * fromApp: (msg, id) => { void sendToTarget(makeReply(msg), id); },
19
+ * },
20
+ * });
21
+ * await acceptor.start();
22
+ * // ... later
23
+ * await acceptor.stop();
24
+ * ```
25
+ */
26
+ export declare class Acceptor extends Engine {
27
+ /** @param options Engine options. */
28
+ constructor(options: EngineOptions);
29
+ }
30
+ //# sourceMappingURL=acceptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptor.d.ts","sourceRoot":"","sources":["../../src/acceptor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEzD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,QAAS,SAAQ,MAAM;IAClC,qCAAqC;IACrC,YAAY,OAAO,EAAE,aAAa,EAEjC;CACF"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * FIX session acceptor (server side — listens for initiators).
3
+ */
4
+ import { native } from './native.js';
5
+ import { Engine } from './engine.js';
6
+ /**
7
+ * A FIX session acceptor (wraps `FIX::SocketAcceptor`). Acceptors listen for
8
+ * inbound connections from initiators as configured in
9
+ * {@link EngineOptions.settings}.
10
+ *
11
+ * Extends {@link Engine} (an {@link import('node:events').EventEmitter}), so you
12
+ * can observe lifecycle/message events in addition to supplying `handlers`.
13
+ * Remember: only `handlers` may mutate outbound messages or reject inbound ones;
14
+ * events are observe-only.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const acceptor = new Acceptor({
19
+ * settings: SessionSettings.fromString(cfg),
20
+ * handlers: {
21
+ * fromApp: (msg, id) => { void sendToTarget(makeReply(msg), id); },
22
+ * },
23
+ * });
24
+ * await acceptor.start();
25
+ * // ... later
26
+ * await acceptor.stop();
27
+ * ```
28
+ */
29
+ export class Acceptor extends Engine {
30
+ /** @param options Engine options. */
31
+ constructor(options) {
32
+ super(native.AcceptorWrap, options);
33
+ }
34
+ }
35
+ //# sourceMappingURL=acceptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptor.js","sourceRoot":"","sources":["../../src/acceptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAIzD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,QAAS,SAAQ,MAAM;IAClC,qCAAqC;IACrC,YAAY,OAAsB;QAChC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Application-callback types for the session engine.
3
+ *
4
+ * Handlers are invoked **synchronously** by QuickFIX on its own threads via the
5
+ * native bridge. Two callbacks may mutate their message argument in place
6
+ * (`toAdmin`/`toApp`), and several may reject a message by **throwing** a typed
7
+ * rejection (`toApp`/`fromApp`/`fromAdmin`). Throwing anything else surfaces as
8
+ * a generic rejection.
9
+ *
10
+ * The {@link Initiator}/{@link Acceptor} also emit observe-only EventEmitter
11
+ * events mirroring these callbacks — but events cannot mutate or reject; that
12
+ * MUST go through the handlers.
13
+ */
14
+ import type { Message } from './message.js';
15
+ import type { SessionID } from './session-id.js';
16
+ /**
17
+ * User-supplied FIX application callbacks.
18
+ *
19
+ * All are optional. Runtime semantics:
20
+ * - `onCreate`/`onLogon`/`onLogout` — fire-and-forget notifications.
21
+ * - `toAdmin`/`toApp` — invoked before an outbound message is sent; may **mutate**
22
+ * the message in place (e.g. add credentials to a Logon in `toAdmin`).
23
+ * - `toApp` — additionally may **throw** {@link FixReject} with kind `'DoNotSend'`
24
+ * to suppress sending.
25
+ * - `fromAdmin`/`fromApp` — invoked for inbound messages; may **throw**
26
+ * {@link FixReject} to reject (e.g. `'RejectLogon'`, `'UnsupportedMessageType'`).
27
+ */
28
+ export interface ApplicationHandlers {
29
+ /** A new session was created. */
30
+ onCreate?(sessionID: SessionID): void;
31
+ /** A session successfully logged on. */
32
+ onLogon?(sessionID: SessionID): void;
33
+ /** A session logged out (or was disconnected). */
34
+ onLogout?(sessionID: SessionID): void;
35
+ /**
36
+ * About to send an admin (session-level) message. May mutate `message`.
37
+ * @param message The outbound message (mutable).
38
+ */
39
+ toAdmin?(message: Message, sessionID: SessionID): void;
40
+ /**
41
+ * About to send an application message. May mutate `message`, or throw a
42
+ * {@link FixReject} with kind `'DoNotSend'` to suppress it.
43
+ */
44
+ toApp?(message: Message, sessionID: SessionID): void;
45
+ /**
46
+ * Received an admin (session-level) message. May throw a {@link FixReject}
47
+ * (e.g. `'RejectLogon'`) to reject it.
48
+ */
49
+ fromAdmin?(message: Message, sessionID: SessionID): void;
50
+ /**
51
+ * Received an application message. May throw a {@link FixReject} (e.g.
52
+ * `'UnsupportedMessageType'`, `'DoNotSend'`) to reject it.
53
+ */
54
+ fromApp?(message: Message, sessionID: SessionID): void;
55
+ }
56
+ /**
57
+ * The kinds of rejection the native bridge understands. Throwing a
58
+ * {@link FixReject} with one of these maps to the matching QuickFIX behaviour:
59
+ * - `'DoNotSend'` → `FIX::DoNotSend` (from `toApp`)
60
+ * - `'RejectLogon'` → `FIX::RejectLogon` (from `fromAdmin`)
61
+ * - `'UnsupportedMessageType'` → `FIX::UnsupportedMessageType` (from `fromApp`)
62
+ * - `'IncorrectDataFormat'` → `FIX::IncorrectDataFormat`
63
+ * - `'IncorrectTagValue'` → `FIX::IncorrectTagValue`
64
+ * - `'FieldNotFound'` → `FIX::FieldNotFound`
65
+ */
66
+ export type FixRejectKind = 'DoNotSend' | 'RejectLogon' | 'UnsupportedMessageType' | 'IncorrectDataFormat' | 'IncorrectTagValue' | 'FieldNotFound';
67
+ /**
68
+ * A typed rejection error to throw from an {@link ApplicationHandlers} callback.
69
+ *
70
+ * The native bridge inspects a thrown error's `fixError` property (a
71
+ * {@link FixRejectKind}) to decide which QuickFIX exception to raise on the
72
+ * engine thread. Throwing any error without a recognized `fixError` results in a
73
+ * generic rejection.
74
+ *
75
+ * For symmetry with errors flowing the OTHER way (native → JS
76
+ * {@link import('./native.js').QuickFixError}), a `FixReject` also carries a
77
+ * `fixErrorName` set to the same stable {@link FixRejectKind} discriminator.
78
+ * Here `fixError` and `fixErrorName` are identical (the kinds are already
79
+ * space-free); the pair exists so both directions expose the same shape.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * handlers: {
84
+ * fromApp(msg) {
85
+ * if (msg.getMsgType() === 'X') throw new FixReject('UnsupportedMessageType');
86
+ * },
87
+ * }
88
+ * ```
89
+ */
90
+ export declare class FixReject extends Error {
91
+ /**
92
+ * Discriminator read by the native bridge to map to a FIX exception. The
93
+ * bridge maps rejections by THIS property.
94
+ */
95
+ readonly fixError: FixRejectKind;
96
+ /**
97
+ * Stable, space-free discriminator (equal to {@link FixReject.fixError}).
98
+ * Mirrors {@link import('./native.js').QuickFixError.fixErrorName} so both
99
+ * error directions share one shape.
100
+ */
101
+ readonly fixErrorName: FixRejectKind;
102
+ /** Optional extra detail forwarded to the engine where supported. */
103
+ readonly detail?: string;
104
+ constructor(kind: FixRejectKind, message?: string, detail?: string);
105
+ }
106
+ /**
107
+ * Convenience factory for a {@link FixReject}. Equivalent to
108
+ * `new FixReject(kind, message, detail)`.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * throw fixReject('DoNotSend');
113
+ * ```
114
+ */
115
+ export declare function fixReject(kind: FixRejectKind, message?: string, detail?: string): FixReject;
116
+ //# sourceMappingURL=application.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,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MAAM,GAAG,SAAS,CAE3F"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * A typed rejection error to throw from an {@link ApplicationHandlers} callback.
3
+ *
4
+ * The native bridge inspects a thrown error's `fixError` property (a
5
+ * {@link FixRejectKind}) to decide which QuickFIX exception to raise on the
6
+ * engine thread. Throwing any error without a recognized `fixError` results in a
7
+ * generic rejection.
8
+ *
9
+ * For symmetry with errors flowing the OTHER way (native → JS
10
+ * {@link import('./native.js').QuickFixError}), a `FixReject` also carries a
11
+ * `fixErrorName` set to the same stable {@link FixRejectKind} discriminator.
12
+ * Here `fixError` and `fixErrorName` are identical (the kinds are already
13
+ * space-free); the pair exists so both directions expose the same shape.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * handlers: {
18
+ * fromApp(msg) {
19
+ * if (msg.getMsgType() === 'X') throw new FixReject('UnsupportedMessageType');
20
+ * },
21
+ * }
22
+ * ```
23
+ */
24
+ export class FixReject extends Error {
25
+ /**
26
+ * Discriminator read by the native bridge to map to a FIX exception. The
27
+ * bridge maps rejections by THIS property.
28
+ */
29
+ fixError;
30
+ /**
31
+ * Stable, space-free discriminator (equal to {@link FixReject.fixError}).
32
+ * Mirrors {@link import('./native.js').QuickFixError.fixErrorName} so both
33
+ * error directions share one shape.
34
+ */
35
+ fixErrorName;
36
+ /** Optional extra detail forwarded to the engine where supported. */
37
+ detail;
38
+ constructor(kind, message, detail) {
39
+ super(message ?? kind);
40
+ this.name = 'FixReject';
41
+ this.fixError = kind;
42
+ this.fixErrorName = kind;
43
+ this.detail = detail;
44
+ }
45
+ }
46
+ /**
47
+ * Convenience factory for a {@link FixReject}. Equivalent to
48
+ * `new FixReject(kind, message, detail)`.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * throw fixReject('DoNotSend');
53
+ * ```
54
+ */
55
+ export function fixReject(kind, message, detail) {
56
+ return new FixReject(kind, message, detail);
57
+ }
58
+ //# sourceMappingURL=application.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/application.ts"],"names":[],"mappings":"AA2EA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClC;;;OAGG;IACM,QAAQ,CAAgB;IACjC;;;;OAIG;IACM,YAAY,CAAgB;IACrC,qEAAqE;IAC5D,MAAM,CAAU;IAEzB,YAAY,IAAmB,EAAE,OAAgB,EAAE,MAAe;QAChE,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,IAAmB,EAAE,OAAgB,EAAE,MAAe;IAC9E,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Ergonomic wrapper around the native `FIX::DataDictionary`.
3
+ */
4
+ import { type NativeDataDictionary } from './native.js';
5
+ import type { Message } from './message.js';
6
+ /**
7
+ * A FIX data dictionary, used to validate messages against a FIX spec XML.
8
+ *
9
+ * Construct via {@link DataDictionary.fromFile} or
10
+ * {@link DataDictionary.fromString}; direct construction is not supported.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const dd = DataDictionary.fromFile('./spec/FIX44.xml');
15
+ * dd.validate(msg); // throws QuickFixError if invalid
16
+ * ```
17
+ */
18
+ export declare class DataDictionary {
19
+ #private;
20
+ /** @internal Use {@link DataDictionary.fromFile} / {@link DataDictionary.fromString}. */
21
+ private constructor();
22
+ /**
23
+ * Load a data dictionary from a FIX spec XML file.
24
+ *
25
+ * @param xmlPath Path to the FIX spec XML (e.g. `FIX44.xml`).
26
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) if the file is invalid.
27
+ */
28
+ static fromFile(xmlPath: string): DataDictionary;
29
+ /**
30
+ * Load a data dictionary from FIX spec XML held in memory.
31
+ *
32
+ * @param xml The FIX spec XML contents.
33
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) if the XML is invalid.
34
+ */
35
+ static fromString(xml: string): DataDictionary;
36
+ /** @internal Wrap an existing native handle. */
37
+ static fromNative(handle: NativeDataDictionary): DataDictionary;
38
+ /** @internal The native handle backing this dictionary. */
39
+ get nativeHandle(): NativeDataDictionary;
40
+ /**
41
+ * Validate a message against this dictionary.
42
+ *
43
+ * @param msg The message to validate.
44
+ * @throws A `QuickFixError` on any validation failure (e.g.
45
+ * `fixError: 'InvalidMessage'` / `'FieldNotFound'` / `'IncorrectTagValue'`).
46
+ */
47
+ validate(msg: Message): void;
48
+ }
49
+ //# sourceMappingURL=data-dictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-dictionary.d.ts","sourceRoot":"","sources":["../../src/data-dictionary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAU,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;;IAIzB,yFAAyF;IACzF,OAAO,eAEN;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAU/C;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAQ7C;IAED,gDAAgD;IAChD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAE9D;IAED,2DAA2D;IAC3D,IAAI,YAAY,IAAI,oBAAoB,CAEvC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAE3B;CACF"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Ergonomic wrapper around the native `FIX::DataDictionary`.
3
+ */
4
+ import { native } from './native.js';
5
+ /**
6
+ * A FIX data dictionary, used to validate messages against a FIX spec XML.
7
+ *
8
+ * Construct via {@link DataDictionary.fromFile} or
9
+ * {@link DataDictionary.fromString}; direct construction is not supported.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const dd = DataDictionary.fromFile('./spec/FIX44.xml');
14
+ * dd.validate(msg); // throws QuickFixError if invalid
15
+ * ```
16
+ */
17
+ export class DataDictionary {
18
+ /** @internal Underlying native handle. */
19
+ #native;
20
+ /** @internal Use {@link DataDictionary.fromFile} / {@link DataDictionary.fromString}. */
21
+ constructor(handle) {
22
+ this.#native = handle;
23
+ }
24
+ /**
25
+ * Load a data dictionary from a FIX spec XML file.
26
+ *
27
+ * @param xmlPath Path to the FIX spec XML (e.g. `FIX44.xml`).
28
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) if the file is invalid.
29
+ */
30
+ static fromFile(xmlPath) {
31
+ // The native `fromFile` may be a module-level fn or a class static;
32
+ // prefer the module-level fn, fall back to the static.
33
+ const handle = native.dataDictionaryFromFile?.(xmlPath) ??
34
+ native.DataDictionaryWrap.fromFile?.(xmlPath);
35
+ if (!handle) {
36
+ throw new Error('native DataDictionary.fromFile is unavailable');
37
+ }
38
+ return new DataDictionary(handle);
39
+ }
40
+ /**
41
+ * Load a data dictionary from FIX spec XML held in memory.
42
+ *
43
+ * @param xml The FIX spec XML contents.
44
+ * @throws A `QuickFixError` (`fixError: 'ConfigError'`) if the XML is invalid.
45
+ */
46
+ static fromString(xml) {
47
+ const handle = native.dataDictionaryFromString?.(xml) ??
48
+ native.DataDictionaryWrap.fromString?.(xml);
49
+ if (!handle) {
50
+ throw new Error('native DataDictionary.fromString is unavailable');
51
+ }
52
+ return new DataDictionary(handle);
53
+ }
54
+ /** @internal Wrap an existing native handle. */
55
+ static fromNative(handle) {
56
+ return new DataDictionary(handle);
57
+ }
58
+ /** @internal The native handle backing this dictionary. */
59
+ get nativeHandle() {
60
+ return this.#native;
61
+ }
62
+ /**
63
+ * Validate a message against this dictionary.
64
+ *
65
+ * @param msg The message to validate.
66
+ * @throws A `QuickFixError` on any validation failure (e.g.
67
+ * `fixError: 'InvalidMessage'` / `'FieldNotFound'` / `'IncorrectTagValue'`).
68
+ */
69
+ validate(msg) {
70
+ this.#native.validate(msg.nativeHandle);
71
+ }
72
+ }
73
+ //# sourceMappingURL=data-dictionary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-dictionary.js","sourceRoot":"","sources":["../../src/data-dictionary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAA6B,MAAM,aAAa,CAAC;AAGhE;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,cAAc;IACzB,0CAA0C;IACjC,OAAO,CAAuB;IAEvC,yFAAyF;IACzF,YAAoB,MAA4B;QAC9C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAe;QAC7B,oEAAoE;QACpE,uDAAuD;QACvD,MAAM,MAAM,GACV,MAAM,CAAC,sBAAsB,EAAE,CAAC,OAAO,CAAC;YACxC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,MAAM,MAAM,GACV,MAAM,CAAC,wBAAwB,EAAE,CAAC,GAAG,CAAC;YACtC,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,gDAAgD;IAChD,MAAM,CAAC,UAAU,CAAC,MAA4B;QAC5C,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,2DAA2D;IAC3D,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,GAAY;QACnB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Shared implementation for {@link Initiator} and {@link Acceptor}.
3
+ *
4
+ * Both are thin subclasses of {@link Engine} that differ only in which native
5
+ * constructor they instantiate.
6
+ */
7
+ import { EventEmitter } from 'node:events';
8
+ import { type NativeEngineConstructor } from './native.js';
9
+ import { Message } from './message.js';
10
+ import { SessionID } from './session-id.js';
11
+ import type { ApplicationHandlers } from './application.js';
12
+ import type { SessionSettings } from './session-settings.js';
13
+ /** Options for constructing an {@link Initiator} or {@link Acceptor}. */
14
+ export interface EngineOptions {
15
+ /** Parsed session settings ({@link SessionSettings.fromString}/`fromFile`). */
16
+ settings: SessionSettings;
17
+ /**
18
+ * Synchronous application callbacks. These may mutate outbound messages and
19
+ * throw to reject inbound ones (see {@link ApplicationHandlers}).
20
+ */
21
+ handlers?: ApplicationHandlers;
22
+ /** Message-store factory. Defaults to the engine's default (`'file'`). */
23
+ store?: 'file' | 'memory';
24
+ /** Log factory. Defaults to the engine's default. */
25
+ log?: 'screen' | 'file' | 'none';
26
+ }
27
+ /**
28
+ * Events emitted (observe-only) by an {@link Engine}. Each mirrors a callback in
29
+ * {@link ApplicationHandlers} but CANNOT mutate or reject — do that via
30
+ * `handlers`.
31
+ */
32
+ export interface EngineEvents {
33
+ create: [sessionID: SessionID];
34
+ logon: [sessionID: SessionID];
35
+ logout: [sessionID: SessionID];
36
+ toAdmin: [message: Message, sessionID: SessionID];
37
+ fromAdmin: [message: Message, sessionID: SessionID];
38
+ toApp: [message: Message, sessionID: SessionID];
39
+ fromApp: [message: Message, sessionID: SessionID];
40
+ }
41
+ /**
42
+ * Base class for the FIX session engines.
43
+ *
44
+ * Extends Node's {@link EventEmitter}: in addition to invoking your `handlers`,
45
+ * the engine emits an observe-only event for each callback
46
+ * (`'create' | 'logon' | 'logout' | 'toAdmin' | 'fromAdmin' | 'toApp' | 'fromApp'`).
47
+ *
48
+ * **Important:** mutation of outbound messages and rejection of inbound ones
49
+ * MUST be done in `handlers` (which run synchronously and can throw); event
50
+ * listeners run after and cannot affect the message or reject it.
51
+ */
52
+ export declare abstract class Engine extends EventEmitter {
53
+ #private;
54
+ /**
55
+ * @param Native The native engine constructor (`InitiatorWrap`/`AcceptorWrap`).
56
+ * @param options Engine options.
57
+ */
58
+ protected constructor(Native: NativeEngineConstructor, options: EngineOptions);
59
+ /**
60
+ * Start the engine (begins connecting / listening).
61
+ *
62
+ * Runs off the main thread, so the Node.js event loop stays free to service
63
+ * the application callbacks/events the engine fires. The returned Promise
64
+ * resolves once startup completes.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * await initiator.start();
69
+ * ```
70
+ */
71
+ start(): Promise<void>;
72
+ /**
73
+ * Stop the engine.
74
+ *
75
+ * Runs off the main thread and resolves once shutdown completes, keeping the
76
+ * event loop free for any in-flight callbacks.
77
+ *
78
+ * @param force When `true`, aborts immediately instead of draining gracefully.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * await initiator.stop();
83
+ * ```
84
+ */
85
+ stop(force?: boolean): Promise<void>;
86
+ /** Whether any session is currently logged on. */
87
+ isLoggedOn(): boolean;
88
+ /**
89
+ * Keep the Node.js event loop alive while the engine is running (default once
90
+ * started). Pair with {@link Engine.unref} to let a short script exit.
91
+ */
92
+ ref(): void;
93
+ /** Allow the process to exit even while the engine is running. */
94
+ unref(): void;
95
+ }
96
+ export interface Engine {
97
+ /** Register a listener for an engine event (typed per {@link EngineEvents}). */
98
+ on<E extends keyof EngineEvents>(event: E, listener: (...args: EngineEvents[E]) => void): this;
99
+ /** Register a one-shot listener for an engine event. */
100
+ once<E extends keyof EngineEvents>(event: E, listener: (...args: EngineEvents[E]) => void): this;
101
+ /** Alias of {@link Engine.on}. */
102
+ addListener<E extends keyof EngineEvents>(event: E, listener: (...args: EngineEvents[E]) => void): this;
103
+ /** Remove a previously registered listener. */
104
+ off<E extends keyof EngineEvents>(event: E, listener: (...args: EngineEvents[E]) => void): this;
105
+ /** Alias of {@link Engine.off}. */
106
+ removeListener<E extends keyof EngineEvents>(event: E, listener: (...args: EngineEvents[E]) => void): this;
107
+ /** Remove all listeners (optionally for a single event). */
108
+ removeAllListeners<E extends keyof EngineEvents>(event?: E): this;
109
+ /** Emit an engine event with its typed arguments. */
110
+ emit<E extends keyof EngineEvents>(event: E, ...args: EngineEvents[E]): boolean;
111
+ /** List the listeners registered for an event. */
112
+ listeners<E extends keyof EngineEvents>(event: E): Array<(...args: EngineEvents[E]) => void>;
113
+ }
114
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAEL,KAAK,uBAAuB,EAI7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,yE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