@estuary-ai/sdk 0.2.0 → 0.3.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/dist/index.mjs CHANGED
@@ -30870,7 +30870,7 @@ var SocketManager = class extends TypedEventEmitter {
30870
30870
  const authPayload = {
30871
30871
  character_id: this.config.characterId,
30872
30872
  player_id: this.config.playerId,
30873
- audio_sample_rate: this.config.audioSampleRate ?? 16e3,
30873
+ audio_sample_rate: this.config.audioSampleRate ?? 24e3,
30874
30874
  realtime_memory: this.config.realtimeMemory ?? false
30875
30875
  };
30876
30876
  if (this.config.sessionToken) {
@@ -31509,6 +31509,26 @@ var EstuaryClient = class extends TypedEventEmitter {
31509
31509
  }
31510
31510
  return this._character.getCharacter(characterId ?? this.config.characterId);
31511
31511
  }
31512
+ /**
31513
+ * Open a permanent share link. Calls the backend's /open endpoint to mint a
31514
+ * fresh session token and resolve character metadata (including modelUrl).
31515
+ * Use the returned fields to construct an EstuaryClient with sessionToken auth.
31516
+ */
31517
+ static async openShare(serverUrl, shareId) {
31518
+ const url2 = `${serverUrl.replace(/\/+$/, "")}/api/v1/share/${shareId}/open`;
31519
+ const res = await fetch(url2, {
31520
+ method: "POST",
31521
+ headers: { "Content-Type": "application/json" }
31522
+ });
31523
+ if (!res.ok) {
31524
+ const detail = await res.text().catch(() => "");
31525
+ throw new EstuaryError(
31526
+ "REST_ERROR" /* REST_ERROR */,
31527
+ `Share open failed (${res.status}): ${detail}`
31528
+ );
31529
+ }
31530
+ return res.json();
31531
+ }
31512
31532
  /** Current session info (null if not connected) */
31513
31533
  get session() {
31514
31534
  return this._sessionInfo;