@ikonai/sdk 1.0.80 → 1.1.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/app-messaging.d.ts +1 -1
- package/assets/audio-capture-worker-D-0X2Dy8.js +1 -0
- package/assets/audio-playback-worker-DivBZPfS.js +1 -0
- package/assets/libopus-CnBCihDi.js +1 -0
- package/assets/protocol-worker-BH93CVck.js +1 -0
- package/assets/src-BKYD07QQ.js +1 -0
- package/assets/src-DOUWsCWT.js +1 -0
- package/assets/video-capture-worker-BQGOFbZt.js +1 -0
- package/assets/video-playback-worker-tC5nUVnw.js +1 -0
- package/assets/viseme-worker-Cd-JqTVM.js +1 -0
- package/capabilities-BtJblfdG.js +108 -0
- package/channel/channel-manager.d.ts +1 -1
- package/channel/channel.d.ts +1 -1
- package/client/endpoint-selector.d.ts +1 -1
- package/client/ikon-client-config.d.ts +13 -11
- package/client/ikon-client.d.ts +86 -4
- package/connection/authenticator.d.ts +3 -3
- package/connection/urls.d.ts +7 -18
- package/errors/index.d.ts +22 -13
- package/functions/browser-functions.d.ts +1 -1
- package/functions/function-registry.d.ts +1 -1
- package/functions/types.d.ts +2 -2
- package/ikon-media-zqob_QeE.js +3160 -0
- package/index.d.ts +8 -8
- package/index.js +8119 -12536
- package/media/ikon-audio-capture.d.ts +7 -3
- package/media/ikon-audio-playback.d.ts +37 -0
- package/media/ikon-video-playback.d.ts +24 -0
- package/media/media-session-helper.d.ts +8 -0
- package/media/video-constants.d.ts +11 -1
- package/media/viseme-tracker.d.ts +10 -1
- package/package.json +1 -1
- package/storage.d.ts +13 -0
- package/transport/transport.d.ts +1 -1
- package/transport/web-socket-transport.d.ts +1 -1
- package/transport/web-transport-transport.d.ts +1 -1
- package/utils/inspect-mode.d.ts +4 -0
- package/utils/log-sender.d.ts +1 -1
- package/utils/platform.d.ts +4 -0
- package/utils/query-params.d.ts +8 -4
- package/vite.config.d.ts +2 -0
- package/webrtc/webrtc-signaling.d.ts +11 -2
- package/worker/audio-playback-worker.d.ts +14 -1
- package/worker/video-capture-worker.d.ts +2 -2
- package/worker/video-playback-worker.d.ts +14 -2
- package/worker/viseme-worker.d.ts +10 -2
- package/assets/audio-capture-worker-Brmt2Z7a.js +0 -1279
- package/assets/audio-playback-worker-C9XXiFhK.js +0 -1474
- package/assets/index-Ca9sTcGt.js +0 -119
- package/assets/index-D_vz6N3U.js +0 -267
- package/assets/libopus-ChbDZJKA.js +0 -139
- package/assets/protocol-worker-1sGaGw11.js +0 -1674
- package/assets/video-capture-worker-zOxyU-q3.js +0 -1126
- package/assets/video-playback-worker-DfwfIoRw.js +0 -1005
- package/assets/viseme-worker-CFJdP6of.js +0 -831
package/connection/urls.d.ts
CHANGED
|
@@ -68,23 +68,17 @@ export declare function deriveAuthUrl(override?: string): Promise<string>;
|
|
|
68
68
|
*/
|
|
69
69
|
export declare function parseQueryParams(): Record<string, string>;
|
|
70
70
|
/**
|
|
71
|
-
* Result of parsing URL
|
|
71
|
+
* Result of parsing URL query parameters.
|
|
72
72
|
*/
|
|
73
73
|
export interface UrlParams {
|
|
74
|
-
|
|
75
|
-
channelKey?: string;
|
|
74
|
+
sessionIdentityHash?: string;
|
|
76
75
|
parameters: Record<string, string>;
|
|
77
76
|
}
|
|
78
77
|
/**
|
|
79
|
-
* Parse URL
|
|
78
|
+
* Parse URL query parameters for browser authentication.
|
|
80
79
|
*
|
|
81
|
-
*
|
|
82
|
-
* -
|
|
83
|
-
* - /c/[channelKey] → channelKey
|
|
84
|
-
*
|
|
85
|
-
* Query parameters → parameters dict (excluding OAuth-reserved params)
|
|
86
|
-
*
|
|
87
|
-
* @throws Error if both sessionId and channelKey are in the URL path
|
|
80
|
+
* `ikon-session` names the app session to join; the SDK-reserved params are kept out of the
|
|
81
|
+
* app-facing dict, along with the OAuth-reserved ones.
|
|
88
82
|
*/
|
|
89
83
|
export declare function parseUrlParams(): UrlParams;
|
|
90
84
|
/**
|
|
@@ -97,12 +91,7 @@ export declare function parseUrlParams(): UrlParams;
|
|
|
97
91
|
*/
|
|
98
92
|
export declare function isCloudEnvironment(): boolean;
|
|
99
93
|
/**
|
|
100
|
-
* Get the initial path from the browser URL,
|
|
101
|
-
* Returns
|
|
94
|
+
* Get the initial path from the browser URL — the whole path, since the app owns all of it.
|
|
95
|
+
* Returns "/" when there is no path.
|
|
102
96
|
*/
|
|
103
97
|
export declare function getInitialPath(): string;
|
|
104
|
-
/**
|
|
105
|
-
* Remove sessionId and channelKey path patterns from the URL.
|
|
106
|
-
* Replaces /s/[sessionId] or /c/[channelKey] paths with root.
|
|
107
|
-
*/
|
|
108
|
-
export declare function clearSessionParamsFromUrl(): void;
|
package/errors/index.d.ts
CHANGED
|
@@ -42,29 +42,17 @@ export declare class MaxRetriesExceededError extends ConnectionError {
|
|
|
42
42
|
constructor(maxAttempts: number);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Error thrown when cloud
|
|
45
|
+
* Error thrown when cloud app-session provisioning times out.
|
|
46
46
|
*/
|
|
47
47
|
export declare class ProvisioningTimeoutError extends AuthenticationError {
|
|
48
48
|
constructor(timeoutMs: number);
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Error thrown when a channel with the specified key is not found.
|
|
52
|
-
*/
|
|
53
|
-
export declare class ChannelNotFoundError extends AuthenticationError {
|
|
54
|
-
constructor(channelKey: string);
|
|
55
|
-
}
|
|
56
50
|
/**
|
|
57
51
|
* Error thrown when no space is found for the given domain.
|
|
58
52
|
*/
|
|
59
53
|
export declare class SpaceNotFoundError extends AuthenticationError {
|
|
60
54
|
constructor(domain: string);
|
|
61
55
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Error thrown when no channels are available in the space.
|
|
64
|
-
*/
|
|
65
|
-
export declare class NoChannelsError extends AuthenticationError {
|
|
66
|
-
constructor();
|
|
67
|
-
}
|
|
68
56
|
/**
|
|
69
57
|
* Error thrown when the server denies access (HTTP 403).
|
|
70
58
|
* For example, when a domain allowlist blocks the user's email domain.
|
|
@@ -73,6 +61,16 @@ export declare class AccessDeniedError extends AuthenticationError {
|
|
|
73
61
|
readonly reason: string;
|
|
74
62
|
constructor(message: string, reason: string);
|
|
75
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Error thrown when `?ikon-session=<hash>` names a session that is not live (HTTP 404).
|
|
66
|
+
* Terminal — the SDK must not retry, and must not fall back to starting a fresh session: a
|
|
67
|
+
* link that silently lands the user somewhere other than the session it names is worse than
|
|
68
|
+
* a visible failure.
|
|
69
|
+
*/
|
|
70
|
+
export declare class SessionNotFoundError extends AuthenticationError {
|
|
71
|
+
readonly sessionIdentityHash: string;
|
|
72
|
+
constructor(sessionIdentityHash: string);
|
|
73
|
+
}
|
|
76
74
|
/**
|
|
77
75
|
* Error thrown when the server is at capacity and rejects the connection (HTTP 429).
|
|
78
76
|
* The instance has reached its maximum client limit. This is terminal — the SDK must not
|
|
@@ -81,6 +79,17 @@ export declare class AccessDeniedError extends AuthenticationError {
|
|
|
81
79
|
export declare class ServerFullError extends AuthenticationError {
|
|
82
80
|
constructor(message: string);
|
|
83
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Error thrown when a connect-flow request fails with a server-side status (HTTP 5xx).
|
|
84
|
+
* Says the backend is having trouble and nothing about the caller's credentials — which is why
|
|
85
|
+
* it is not merely a nicer message: an AuthenticationError from connect reads as a stale session,
|
|
86
|
+
* and the response to that is to log the user out. A backend hiccup must not end a valid session.
|
|
87
|
+
* Transient, so the SDK retries it like any other connect failure.
|
|
88
|
+
*/
|
|
89
|
+
export declare class ServerUnavailableError extends AuthenticationError {
|
|
90
|
+
readonly status: number;
|
|
91
|
+
constructor(message: string, status: number);
|
|
92
|
+
}
|
|
84
93
|
/**
|
|
85
94
|
* Error thrown when the browser is missing runtime features the SDK requires (e.g. a smart-TV
|
|
86
95
|
* browser too old to run the app). Terminal — the SDK must not retry; the user needs a newer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientType } from '
|
|
1
|
+
import { ClientType } from '../../shared/protocol/src/index.ts';
|
|
2
2
|
import { FunctionRegistry } from './function-registry';
|
|
3
3
|
/**
|
|
4
4
|
* Get the effective theme (user override > stored > system preference).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProtocolMessage, ActionFunctionRegister, GlobalState, ClientInitialization } from '
|
|
1
|
+
import { ProtocolMessage, ActionFunctionRegister, GlobalState, ClientInitialization } from '../../shared/protocol/src/index.ts';
|
|
2
2
|
import { FunctionCallError, FunctionDefinition, FunctionHandler, NormalizedFunction } from './types';
|
|
3
3
|
export interface RemoteFunction {
|
|
4
4
|
id: string;
|
package/functions/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionFunctionRegister } from '
|
|
1
|
+
import { ActionFunctionRegister } from '../../shared/protocol/src/index.ts';
|
|
2
2
|
export type PrimitiveValueKind = 'boolean' | 'number' | 'string';
|
|
3
3
|
type PrimitiveDescriptor = {
|
|
4
4
|
kind: PrimitiveValueKind;
|
|
@@ -44,7 +44,7 @@ export interface FunctionDefinition {
|
|
|
44
44
|
returnType: ValueDescriptor;
|
|
45
45
|
parameters?: FunctionParameterDefinition[];
|
|
46
46
|
}
|
|
47
|
-
export type FunctionHandler = (...parameters: unknown[]) => unknown
|
|
47
|
+
export type FunctionHandler = (...parameters: unknown[]) => unknown;
|
|
48
48
|
export interface FunctionResultWithData<T = unknown> {
|
|
49
49
|
value: T;
|
|
50
50
|
data: Uint8Array;
|