@kadoa/node-sdk 0.16.1 → 0.16.2

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.mjs CHANGED
@@ -5160,7 +5160,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
5160
5160
  var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
5161
5161
 
5162
5162
  // src/version.ts
5163
- var SDK_VERSION = "0.16.1";
5163
+ var SDK_VERSION = "0.16.2";
5164
5164
  var SDK_NAME = "kadoa-node-sdk";
5165
5165
  var SDK_LANGUAGE = "node";
5166
5166
 
@@ -5176,16 +5176,7 @@ var Realtime = class {
5176
5176
  this.eventListeners = /* @__PURE__ */ new Set();
5177
5177
  this.connectionListeners = /* @__PURE__ */ new Set();
5178
5178
  this.errorListeners = /* @__PURE__ */ new Set();
5179
- if (!config.teamApiKey.startsWith("tk-")) {
5180
- throw new KadoaSdkException(
5181
- "Realtime connection requires a team API key (starting with 'tk-'). Provided key does not appear to be a team API key.",
5182
- {
5183
- code: "AUTH_ERROR",
5184
- details: { providedKeyPrefix: config.teamApiKey.substring(0, 3) }
5185
- }
5186
- );
5187
- }
5188
- this.teamApiKey = config.teamApiKey;
5179
+ this.apiKey = config.apiKey;
5189
5180
  this.heartbeatInterval = config.heartbeatInterval || 1e4;
5190
5181
  this.reconnectDelay = config.reconnectDelay || 5e3;
5191
5182
  this.missedHeartbeatsLimit = config.missedHeartbeatsLimit || 3e4;
@@ -5198,7 +5189,7 @@ var Realtime = class {
5198
5189
  method: "POST",
5199
5190
  headers: {
5200
5191
  "Content-Type": "application/json",
5201
- "x-api-key": `${this.teamApiKey}`,
5192
+ "x-api-key": `${this.apiKey}`,
5202
5193
  "x-sdk-version": SDK_VERSION
5203
5194
  }
5204
5195
  });
@@ -6112,7 +6103,7 @@ var KadoaClient = class {
6112
6103
  */
6113
6104
  connectRealtime() {
6114
6105
  if (!this._realtime) {
6115
- this._realtime = new Realtime({ teamApiKey: this._apiKey });
6106
+ this._realtime = new Realtime({ apiKey: this._apiKey });
6116
6107
  this._realtime.connect();
6117
6108
  }
6118
6109
  return this._realtime;