@ikonai/sdk 1.0.26 → 1.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonai/sdk",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -6,6 +6,7 @@ import { Transport, TransportConfig } from './transport';
6
6
  export declare class WebSocketTransport implements Transport {
7
7
  private ws;
8
8
  private keepaliveTimeout;
9
+ private isClosed;
9
10
  private keepaliveResponseMessage;
10
11
  private readonly keepaliveTimeoutMs;
11
12
  private readonly callbacks;
@@ -21,6 +21,7 @@ export declare class WebTransportTransport implements Transport {
21
21
  private writer;
22
22
  private keepaliveTimeout;
23
23
  private readLoopActive;
24
+ private isClosed;
24
25
  private receiveBuffer;
25
26
  private receiveBufferOffset;
26
27
  private receiveBufferLength;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Initialize debug mode based on URL params (?debug=true).
2
+ * Initialize debug mode based on URL params (?ikon-debug=true or ?debug=true).
3
3
  * Call this early in SDK initialization.
4
4
  * Returns true if debug mode is enabled.
5
5
  */
@@ -10,6 +10,6 @@ export declare function initializeDebugMode(): boolean;
10
10
  export declare function isDebugModeEnabled(): boolean;
11
11
  /**
12
12
  * Enable debug mode programmatically (e.g., from server's GlobalState.DebugMode).
13
- * Also updates the URL to contain debug=true query param.
13
+ * Also updates the URL to contain ikon-debug=true query param.
14
14
  */
15
15
  export declare function enableDebugMode(): void;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * SDK Query Parameters
3
+ *
4
+ * All SDK-internal query params use the "ikon-" prefix to avoid conflicts with
5
+ * client application query params. Both "-" and "_" word separators are accepted
6
+ * (e.g., "ikon-proxy" and "ikon_proxy" both work).
7
+ *
8
+ * Supported parameters:
9
+ * - ikon-proxy Force proxy mode on (true) or off (false)
10
+ * - ikon-websocket Force WebSocket transport on (true) or off (false)
11
+ * - ikon-webtransport Force WebTransport on (true) or off (false)
12
+ * - ikon-debug Enable SDK debug logging (true)
13
+ * - ikon-lang Override language detection (e.g., "en", "fi")
14
+ * - ikon-server-url External connect URL for shareable preview links
15
+ * - ikon-git-source Enable Git source deployment mode (true)
16
+ * - ikon-git-branch Git branch for Git source deployment (e.g., "main")
17
+ */
18
+ export declare const IKON_PARAM_PROXY = "ikon-proxy";
19
+ export declare const IKON_PARAM_WEBSOCKET = "ikon-websocket";
20
+ export declare const IKON_PARAM_WEBTRANSPORT = "ikon-webtransport";
21
+ export declare const IKON_PARAM_DEBUG = "ikon-debug";
22
+ export declare const IKON_PARAM_LANG = "ikon-lang";
23
+ export declare const IKON_PARAM_SERVER_URL = "ikon-server-url";
24
+ export declare const IKON_PARAM_GIT_SOURCE = "ikon-git-source";
25
+ export declare const IKON_PARAM_GIT_BRANCH = "ikon-git-branch";
26
+ /**
27
+ * Set an SDK query parameter in the URL via history.replaceState.
28
+ */
29
+ export declare function setSdkUrlParam(canonicalName: string, value: string): void;
30
+ export declare function getProxyParam(): boolean | null;
31
+ export declare function getWebSocketParam(): boolean | null;
32
+ export declare function getWebTransportParam(): boolean | null;
33
+ export declare function getDebugParam(): boolean;
34
+ export declare function getLangParam(): string | null;
35
+ export declare function getServerUrlParam(): string | null;