@kadoa/node-sdk 0.19.4-beta.2 → 0.19.4-beta.3
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/browser/index.global.js +1 -1
- package/dist/browser/index.global.js.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -7841,6 +7841,8 @@ interface KadoaClientConfig {
|
|
|
7841
7841
|
reconnectDelay?: number;
|
|
7842
7842
|
/** Heartbeat interval in ms (default: 10000) */
|
|
7843
7843
|
heartbeatInterval?: number;
|
|
7844
|
+
/** Subscribe source mode. Use 'stream' for CloudEvents mode. */
|
|
7845
|
+
source?: "stream";
|
|
7844
7846
|
};
|
|
7845
7847
|
}
|
|
7846
7848
|
interface NotificationDomain {
|
|
@@ -7876,6 +7878,7 @@ declare class KadoaClient {
|
|
|
7876
7878
|
private readonly _timeout;
|
|
7877
7879
|
private readonly _apiKey;
|
|
7878
7880
|
private _realtime?;
|
|
7881
|
+
private _realtimeConfig?;
|
|
7879
7882
|
private _extractionBuilderService;
|
|
7880
7883
|
readonly extraction: ExtractionService;
|
|
7881
7884
|
readonly workflow: WorkflowsCoreService;
|
package/dist/index.d.ts
CHANGED
|
@@ -7841,6 +7841,8 @@ interface KadoaClientConfig {
|
|
|
7841
7841
|
reconnectDelay?: number;
|
|
7842
7842
|
/** Heartbeat interval in ms (default: 10000) */
|
|
7843
7843
|
heartbeatInterval?: number;
|
|
7844
|
+
/** Subscribe source mode. Use 'stream' for CloudEvents mode. */
|
|
7845
|
+
source?: "stream";
|
|
7844
7846
|
};
|
|
7845
7847
|
}
|
|
7846
7848
|
interface NotificationDomain {
|
|
@@ -7876,6 +7878,7 @@ declare class KadoaClient {
|
|
|
7876
7878
|
private readonly _timeout;
|
|
7877
7879
|
private readonly _apiKey;
|
|
7878
7880
|
private _realtime?;
|
|
7881
|
+
private _realtimeConfig?;
|
|
7879
7882
|
private _extractionBuilderService;
|
|
7880
7883
|
readonly extraction: ExtractionService;
|
|
7881
7884
|
readonly workflow: WorkflowsCoreService;
|
package/dist/index.js
CHANGED
|
@@ -6993,6 +6993,7 @@ var KadoaClient = class {
|
|
|
6993
6993
|
};
|
|
6994
6994
|
this.validation = createValidationDomain(coreService, rulesService);
|
|
6995
6995
|
this.crawler = createCrawlerDomain(this);
|
|
6996
|
+
this._realtimeConfig = config.realtimeConfig;
|
|
6996
6997
|
if (config.enableRealtime && config.realtimeConfig?.autoConnect !== false) {
|
|
6997
6998
|
this.connectRealtime();
|
|
6998
6999
|
}
|
|
@@ -7091,7 +7092,18 @@ var KadoaClient = class {
|
|
|
7091
7092
|
*/
|
|
7092
7093
|
connectRealtime() {
|
|
7093
7094
|
if (!this._realtime) {
|
|
7094
|
-
this._realtime = new Realtime({
|
|
7095
|
+
this._realtime = new Realtime({
|
|
7096
|
+
apiKey: this._apiKey,
|
|
7097
|
+
...this._realtimeConfig?.reconnectDelay != null && {
|
|
7098
|
+
reconnectDelay: this._realtimeConfig.reconnectDelay
|
|
7099
|
+
},
|
|
7100
|
+
...this._realtimeConfig?.heartbeatInterval != null && {
|
|
7101
|
+
heartbeatInterval: this._realtimeConfig.heartbeatInterval
|
|
7102
|
+
},
|
|
7103
|
+
...this._realtimeConfig?.source && {
|
|
7104
|
+
source: this._realtimeConfig.source
|
|
7105
|
+
}
|
|
7106
|
+
});
|
|
7095
7107
|
this._realtime.connect();
|
|
7096
7108
|
}
|
|
7097
7109
|
return this._realtime;
|