@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.d.mts CHANGED
@@ -6231,7 +6231,7 @@ declare class ExtractionBuilderService {
6231
6231
  }
6232
6232
 
6233
6233
  interface RealtimeConfig {
6234
- teamApiKey: string;
6234
+ apiKey: string;
6235
6235
  heartbeatInterval?: number;
6236
6236
  reconnectDelay?: number;
6237
6237
  missedHeartbeatsLimit?: number;
@@ -6244,7 +6244,7 @@ declare class Realtime {
6244
6244
  private isConnecting;
6245
6245
  private missedHeartbeatsLimit;
6246
6246
  private missedHeartbeatCheckTimer?;
6247
- private teamApiKey?;
6247
+ private apiKey?;
6248
6248
  private eventListeners;
6249
6249
  private connectionListeners;
6250
6250
  private errorListeners;
package/dist/index.d.ts CHANGED
@@ -6231,7 +6231,7 @@ declare class ExtractionBuilderService {
6231
6231
  }
6232
6232
 
6233
6233
  interface RealtimeConfig {
6234
- teamApiKey: string;
6234
+ apiKey: string;
6235
6235
  heartbeatInterval?: number;
6236
6236
  reconnectDelay?: number;
6237
6237
  missedHeartbeatsLimit?: number;
@@ -6244,7 +6244,7 @@ declare class Realtime {
6244
6244
  private isConnecting;
6245
6245
  private missedHeartbeatsLimit;
6246
6246
  private missedHeartbeatCheckTimer?;
6247
- private teamApiKey?;
6247
+ private apiKey?;
6248
6248
  private eventListeners;
6249
6249
  private connectionListeners;
6250
6250
  private errorListeners;
package/dist/index.js CHANGED
@@ -5168,7 +5168,7 @@ var WSS_API_URI = process.env.KADOA_WSS_API_URI ?? "wss://realtime.kadoa.com";
5168
5168
  var REALTIME_API_URI = process.env.KADOA_REALTIME_API_URI ?? "https://realtime.kadoa.com";
5169
5169
 
5170
5170
  // src/version.ts
5171
- var SDK_VERSION = "0.16.1";
5171
+ var SDK_VERSION = "0.16.2";
5172
5172
  var SDK_NAME = "kadoa-node-sdk";
5173
5173
  var SDK_LANGUAGE = "node";
5174
5174
 
@@ -5184,16 +5184,7 @@ var Realtime = class {
5184
5184
  this.eventListeners = /* @__PURE__ */ new Set();
5185
5185
  this.connectionListeners = /* @__PURE__ */ new Set();
5186
5186
  this.errorListeners = /* @__PURE__ */ new Set();
5187
- if (!config.teamApiKey.startsWith("tk-")) {
5188
- throw new KadoaSdkException(
5189
- "Realtime connection requires a team API key (starting with 'tk-'). Provided key does not appear to be a team API key.",
5190
- {
5191
- code: "AUTH_ERROR",
5192
- details: { providedKeyPrefix: config.teamApiKey.substring(0, 3) }
5193
- }
5194
- );
5195
- }
5196
- this.teamApiKey = config.teamApiKey;
5187
+ this.apiKey = config.apiKey;
5197
5188
  this.heartbeatInterval = config.heartbeatInterval || 1e4;
5198
5189
  this.reconnectDelay = config.reconnectDelay || 5e3;
5199
5190
  this.missedHeartbeatsLimit = config.missedHeartbeatsLimit || 3e4;
@@ -5206,7 +5197,7 @@ var Realtime = class {
5206
5197
  method: "POST",
5207
5198
  headers: {
5208
5199
  "Content-Type": "application/json",
5209
- "x-api-key": `${this.teamApiKey}`,
5200
+ "x-api-key": `${this.apiKey}`,
5210
5201
  "x-sdk-version": SDK_VERSION
5211
5202
  }
5212
5203
  });
@@ -6120,7 +6111,7 @@ var KadoaClient = class {
6120
6111
  */
6121
6112
  connectRealtime() {
6122
6113
  if (!this._realtime) {
6123
- this._realtime = new Realtime({ teamApiKey: this._apiKey });
6114
+ this._realtime = new Realtime({ apiKey: this._apiKey });
6124
6115
  this._realtime.connect();
6125
6116
  }
6126
6117
  return this._realtime;