@ikonai/sdk 1.3.7 → 1.3.9

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.
@@ -1,4 +1,4 @@
1
- import { AuthResponse } from '../../shared/protocol/src/index.ts';
1
+ import { AuthResponse, ClientEnvironment } from '../../shared/protocol/src/index.ts';
2
2
  import { ApiKeyConfig, LocalConfig, SessionTokenConfig } from '../client/ikon-client-config';
3
3
  import { ProxyMode } from '../client/endpoint-selector';
4
4
  /**
@@ -14,8 +14,14 @@ export interface AuthResult {
14
14
  }
15
15
  /**
16
16
  * Common authentication logic - fetch the connect URL and decode the AuthResponse.
17
+ *
18
+ * Every path that reaches an Ikon server goes through here — local, cloud, and the shareable URL a
19
+ * preview hands out — so this is where the client environment is attached. A caller that knows more
20
+ * than ambient browser state (its configured product id, description, locale) passes `environment`;
21
+ * the shareable-URL path has no config and gets the ambient one, which is what it would have been
22
+ * given anyway.
17
23
  */
18
- export declare function authenticateWithUrl(connectUrl: string, signal?: AbortSignal, timeoutMs?: number): Promise<AuthResult>;
24
+ export declare function authenticateWithUrl(connectUrl: string, signal?: AbortSignal, timeoutMs?: number, environment?: ClientEnvironment): Promise<AuthResult>;
19
25
  /**
20
26
  * Probe server health by fetching the /health endpoint.
21
27
  * Returns true if the server responds with HTTP 200 within the timeout.
package/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { abortSignalTimeout, abortSignalAny } from './utils/abort-signal';
20
20
  export { createPkceChallenge, takePkceVerifier, restorePkceVerifier, isPkceSupported } from './utils/pkce';
21
21
  export { isEmbedded, startEmbeddedOAuthSignIn, adoptPkceVerifierFromUrl, onEmbeddedOAuthResult, PKCE_URL_PARAM, type EmbeddedOAuthResult } from './utils/embedded-oauth';
22
22
  export { initializeInspectMode, isInspectModeEnabled, enableInspectMode, IKON_INSPECT_MODE_CHANGED_EVENT } from './utils/inspect-mode';
23
- export { getLangParam, getProxyParam, getWebSocketParam, getWebTransportParam, getDebugParam, getServerUrlParam, getAudioParam, getVideoParam, getWebRtcParam, getInspectParam, getDebugOverlayParam, getAuthSameOriginParam, getRetryParam, setSdkUrlParam, IKON_PARAM_PROXY, IKON_PARAM_WEBSOCKET, IKON_PARAM_WEBTRANSPORT, IKON_PARAM_DEBUG, IKON_PARAM_LANG, IKON_PARAM_SERVER_URL, IKON_PARAM_AUDIO, IKON_PARAM_VIDEO, IKON_PARAM_WEBRTC, IKON_PARAM_INSPECT, IKON_PARAM_DEBUG_OVERLAY, IKON_PARAM_AUTH, IKON_PARAM_RETRY } from './utils/query-params';
23
+ export { getLangParam, getProxyParam, getWebSocketParam, getWebTransportParam, getDebugParam, getServerUrlParam, getConnectParam, getAudioParam, getVideoParam, getWebRtcParam, getInspectParam, getDebugOverlayParam, getAuthSameOriginParam, getRetryParam, setSdkUrlParam, IKON_PARAM_PROXY, IKON_PARAM_WEBSOCKET, IKON_PARAM_WEBTRANSPORT, IKON_PARAM_DEBUG, IKON_PARAM_LANG, IKON_PARAM_SERVER_URL, IKON_PARAM_CONNECT, IKON_PARAM_AUDIO, IKON_PARAM_VIDEO, IKON_PARAM_WEBRTC, IKON_PARAM_INSPECT, IKON_PARAM_DEBUG_OVERLAY, IKON_PARAM_AUTH, IKON_PARAM_RETRY } from './utils/query-params';
24
24
  export { getOpcodeName } from './utils/opcode-names';
25
25
  export { initializeLogSink, setSendLogsCallback, getBufferedLogs, takeBufferedLogs, flushLogs, clearLogBuffer, getLogBufferSize } from './utils/log-sink';
26
26
  export type { LogSinkConfig } from './utils/log-sink';