@liforma/client 0.4.0 → 0.4.1
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/CHANGELOG.md +11 -0
- package/dist/next/index.js +1024 -4273
- package/dist/next/index.js.map +1 -1
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts +3 -1
- package/dist/next/next/createLiformaSessionRouteHandler.d.ts.map +1 -1
- package/dist/next/v2/api/mintPublicSession.d.ts +21 -15
- package/dist/next/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/next/v2/api/sessionEndpointRequest.d.ts +8 -3
- package/dist/next/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/next/v2/embed/iframeHost.d.ts +8 -0
- package/dist/next/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/next/v2/embed/protocol.d.ts +20 -0
- package/dist/next/v2/embed/protocol.d.ts.map +1 -1
- package/dist/next/v2/experience.d.ts +52 -44
- package/dist/next/v2/experience.d.ts.map +1 -1
- package/dist/next/v2/experienceEvents.d.ts +3 -0
- package/dist/next/v2/experienceEvents.d.ts.map +1 -1
- package/dist/next/v2/types/sessionLaunch.d.ts +43 -0
- package/dist/next/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/next/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/next/widget/types.d.ts +6 -1
- package/dist/next/widget/types.d.ts.map +1 -1
- package/dist/npm/index.js +851 -4103
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/v2/api/mintPublicSession.d.ts +21 -15
- package/dist/npm/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts +8 -3
- package/dist/npm/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/npm/v2/embed/iframeHost.d.ts +8 -0
- package/dist/npm/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/npm/v2/embed/protocol.d.ts +20 -0
- package/dist/npm/v2/embed/protocol.d.ts.map +1 -1
- package/dist/npm/v2/experience.d.ts +52 -44
- package/dist/npm/v2/experience.d.ts.map +1 -1
- package/dist/npm/v2/experienceEvents.d.ts +3 -0
- package/dist/npm/v2/experienceEvents.d.ts.map +1 -1
- package/dist/npm/v2/index.d.ts +1 -0
- package/dist/npm/v2/index.d.ts.map +1 -1
- package/dist/npm/v2/liforma-experience.d.ts.map +1 -1
- package/dist/npm/v2/npm.d.ts +1 -0
- package/dist/npm/v2/npm.d.ts.map +1 -1
- package/dist/npm/v2/types/index.d.ts +2 -0
- package/dist/npm/v2/types/index.d.ts.map +1 -1
- package/dist/npm/v2/types/sessionLaunch.d.ts +43 -0
- package/dist/npm/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/npm/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/npm/widget/types.d.ts +6 -1
- package/dist/npm/widget/types.d.ts.map +1 -1
- package/dist/react/component/experienceComponentLaunch.d.ts +1 -0
- package/dist/react/component/experienceComponentLaunch.d.ts.map +1 -1
- package/dist/react/component/experienceComponentRuntime.d.ts +11 -1
- package/dist/react/component/experienceComponentRuntime.d.ts.map +1 -1
- package/dist/react/component/experienceComponentTypes.d.ts +25 -10
- package/dist/react/component/experienceComponentTypes.d.ts.map +1 -1
- package/dist/react/index.js +1149 -4386
- package/dist/react/index.js.map +1 -1
- package/dist/react/react/Experience.d.ts.map +1 -1
- package/dist/react/v2/api/mintPublicSession.d.ts +21 -15
- package/dist/react/v2/api/mintPublicSession.d.ts.map +1 -1
- package/dist/react/v2/api/sessionEndpointRequest.d.ts +8 -3
- package/dist/react/v2/api/sessionEndpointRequest.d.ts.map +1 -1
- package/dist/react/v2/embed/iframeHost.d.ts +8 -0
- package/dist/react/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/react/v2/embed/protocol.d.ts +20 -0
- package/dist/react/v2/embed/protocol.d.ts.map +1 -1
- package/dist/react/v2/experience.d.ts +52 -44
- package/dist/react/v2/experience.d.ts.map +1 -1
- package/dist/react/v2/experienceEvents.d.ts +3 -0
- package/dist/react/v2/experienceEvents.d.ts.map +1 -1
- package/dist/react/v2/types/sessionLaunch.d.ts +43 -0
- package/dist/react/v2/types/sessionLaunch.d.ts.map +1 -0
- package/dist/react/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/react/widget/types.d.ts +6 -1
- package/dist/react/widget/types.d.ts.map +1 -1
- package/dist/sdk/v2/client.js +6 -69
- package/dist/sdk/v2/client.js.map +1 -1
- package/dist/svelte/Experience.svelte +54 -38
- package/dist/svelte/Experience.svelte.d.ts +2 -1
- package/package.json +1 -1
- package/dist/next/v2/speechOnlyManifest.d.ts +0 -7
- package/dist/next/v2/speechOnlyManifest.d.ts.map +0 -1
- package/dist/next/v2/types/sessionManifestSchema.d.ts +0 -183
- package/dist/next/v2/types/sessionManifestSchema.d.ts.map +0 -1
- package/dist/react/v2/speechOnlyManifest.d.ts +0 -7
- package/dist/react/v2/speechOnlyManifest.d.ts.map +0 -1
- package/dist/react/v2/types/sessionManifestSchema.d.ts +0 -183
- package/dist/react/v2/types/sessionManifestSchema.d.ts.map +0 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
type ExperienceEventName,
|
|
12
12
|
type ExperienceSession,
|
|
13
13
|
type ListenOnceOptions,
|
|
14
|
+
type Session,
|
|
14
15
|
type SessionManifest,
|
|
15
16
|
type StartSessionOptions,
|
|
16
17
|
type UtteranceResult
|
|
@@ -47,13 +48,17 @@
|
|
|
47
48
|
let {
|
|
48
49
|
experienceId,
|
|
49
50
|
sessionEndpoint,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
launch: launchToken,
|
|
52
|
+
session: launchSessionSummary,
|
|
53
|
+
locale,
|
|
54
|
+
secondaryLocale,
|
|
55
|
+
learningLocale,
|
|
52
56
|
language,
|
|
53
57
|
mode,
|
|
54
58
|
responseMode,
|
|
55
59
|
speechInputMode,
|
|
56
60
|
startButton,
|
|
61
|
+
closeButton,
|
|
57
62
|
conversationProcessor,
|
|
58
63
|
speechOnly = false,
|
|
59
64
|
fit,
|
|
@@ -72,8 +77,10 @@
|
|
|
72
77
|
onConversationUpdate,
|
|
73
78
|
onMessage,
|
|
74
79
|
onListeningState,
|
|
80
|
+
onActivityChange,
|
|
75
81
|
onModeChange,
|
|
76
82
|
onConversationProcessorError,
|
|
83
|
+
onPlayerStatusChange,
|
|
77
84
|
onStateUpdate,
|
|
78
85
|
onClose,
|
|
79
86
|
onError
|
|
@@ -87,21 +94,19 @@
|
|
|
87
94
|
let activeGeneration: Generation | null = null;
|
|
88
95
|
const launchIdentities = new WeakMap<object, number>();
|
|
89
96
|
|
|
90
|
-
const startButtonKey = $derived(stableSerialize(startButton));
|
|
91
97
|
const launchKey = $derived(
|
|
92
98
|
stableSerialize([
|
|
93
99
|
experienceId,
|
|
94
100
|
sessionEndpoint,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
language,
|
|
101
|
+
launchToken,
|
|
102
|
+
launchSessionSummary ? identityKey(launchSessionSummary) : 0,
|
|
103
|
+
locale ?? language,
|
|
104
|
+
secondaryLocale ?? learningLocale,
|
|
98
105
|
mode,
|
|
99
106
|
responseMode,
|
|
100
107
|
speechInputMode,
|
|
101
|
-
startButtonKey,
|
|
102
108
|
conversationProcessor ? identityKey(conversationProcessor) : 0,
|
|
103
109
|
speechOnly,
|
|
104
|
-
fit,
|
|
105
110
|
avatarId,
|
|
106
111
|
locationId,
|
|
107
112
|
embedBaseUrl,
|
|
@@ -190,12 +195,10 @@
|
|
|
190
195
|
const id = (options as { readonly experienceId?: string }).experienceId;
|
|
191
196
|
if (typeof id === 'string' && id.trim()) return id;
|
|
192
197
|
}
|
|
193
|
-
if ('
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if (typeof id === 'string' && id.trim()) return id;
|
|
198
|
-
}
|
|
198
|
+
if ('session' in options) {
|
|
199
|
+
const id = (options as { readonly session?: { readonly experienceId?: unknown } }).session
|
|
200
|
+
?.experienceId;
|
|
201
|
+
if (typeof id === 'string' && id.trim()) return id;
|
|
199
202
|
}
|
|
200
203
|
return experienceId?.trim() || undefined;
|
|
201
204
|
}
|
|
@@ -268,6 +271,7 @@
|
|
|
268
271
|
);
|
|
269
272
|
subscribe(generation, session, 'message', (event) => onMessage?.(event));
|
|
270
273
|
subscribe(generation, session, 'listeningState', (event) => onListeningState?.(event));
|
|
274
|
+
subscribe(generation, session, 'activityChange', (event) => onActivityChange?.(event));
|
|
271
275
|
subscribe(generation, session, 'modeChange', (event) => onModeChange?.(event));
|
|
272
276
|
subscribe(generation, session, 'conversationProcessorError', (event) =>
|
|
273
277
|
onConversationProcessorError?.(event)
|
|
@@ -276,17 +280,31 @@
|
|
|
276
280
|
|
|
277
281
|
function buildStartOptions(): StartSessionOptions {
|
|
278
282
|
const hasSessionEndpoint = Boolean(sessionEndpoint?.trim());
|
|
283
|
+
const hasLaunch = Boolean(launchToken?.trim());
|
|
279
284
|
if (hasSessionEndpoint && !experienceId?.trim()) {
|
|
280
285
|
throw new Error('sessionEndpoint requires experienceId.');
|
|
281
286
|
}
|
|
282
|
-
if (!hasSessionEndpoint && !
|
|
283
|
-
throw new Error('Experience requires experienceId or
|
|
287
|
+
if (!hasSessionEndpoint && !hasLaunch && !experienceId) {
|
|
288
|
+
throw new Error('Experience requires experienceId, sessionEndpoint, or launch.');
|
|
284
289
|
}
|
|
285
290
|
|
|
291
|
+
if (hasLaunch && launchToken) {
|
|
292
|
+
return {
|
|
293
|
+
launch: launchToken,
|
|
294
|
+
session: launchSessionSummary,
|
|
295
|
+
embedBaseUrl,
|
|
296
|
+
debug,
|
|
297
|
+
speechOnly,
|
|
298
|
+
conversationProcessor
|
|
299
|
+
};
|
|
300
|
+
}
|
|
286
301
|
if (hasSessionEndpoint && experienceId && sessionEndpoint) {
|
|
287
302
|
return {
|
|
288
303
|
experienceId,
|
|
289
304
|
sessionEndpoint,
|
|
305
|
+
locale,
|
|
306
|
+
secondaryLocale,
|
|
307
|
+
learningLocale,
|
|
290
308
|
language,
|
|
291
309
|
locationId,
|
|
292
310
|
avatarId,
|
|
@@ -296,26 +314,15 @@
|
|
|
296
314
|
responseMode,
|
|
297
315
|
speechInputMode,
|
|
298
316
|
speechOnly,
|
|
299
|
-
fit,
|
|
300
|
-
startButton: untrack(() => startButton),
|
|
301
|
-
conversationProcessor
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
if (manifest) {
|
|
305
|
-
return {
|
|
306
|
-
manifest,
|
|
307
|
-
acceptCredentialExposure,
|
|
308
|
-
embedBaseUrl,
|
|
309
|
-
debug,
|
|
310
|
-
speechOnly,
|
|
311
|
-
fit,
|
|
312
|
-
startButton: untrack(() => startButton),
|
|
313
317
|
conversationProcessor
|
|
314
318
|
};
|
|
315
319
|
}
|
|
316
320
|
if (experienceId) {
|
|
317
321
|
return {
|
|
318
322
|
experienceId,
|
|
323
|
+
locale,
|
|
324
|
+
secondaryLocale,
|
|
325
|
+
learningLocale,
|
|
319
326
|
language,
|
|
320
327
|
locationId,
|
|
321
328
|
avatarId,
|
|
@@ -325,12 +332,10 @@
|
|
|
325
332
|
responseMode,
|
|
326
333
|
speechInputMode,
|
|
327
334
|
speechOnly,
|
|
328
|
-
fit,
|
|
329
|
-
startButton: untrack(() => startButton),
|
|
330
335
|
conversationProcessor
|
|
331
336
|
};
|
|
332
337
|
}
|
|
333
|
-
throw new Error('Experience requires experienceId or
|
|
338
|
+
throw new Error('Experience requires experienceId, sessionEndpoint, or launch.');
|
|
334
339
|
}
|
|
335
340
|
|
|
336
341
|
function snapshotLaunch(): LaunchSnapshot {
|
|
@@ -341,7 +346,7 @@
|
|
|
341
346
|
}
|
|
342
347
|
}
|
|
343
348
|
|
|
344
|
-
async function
|
|
349
|
+
async function runLaunch(
|
|
345
350
|
generation: Generation,
|
|
346
351
|
container: HTMLDivElement,
|
|
347
352
|
options: StartSessionOptions
|
|
@@ -357,9 +362,15 @@
|
|
|
357
362
|
subscribeToEvents(generation, session);
|
|
358
363
|
const player = await session.attach({
|
|
359
364
|
container,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
365
|
+
fit: untrack(() => fit),
|
|
366
|
+
startButton: untrack(() => startButton),
|
|
367
|
+
closeButton: untrack(() => closeButton),
|
|
368
|
+
returnUrl: untrack(() => returnUrl),
|
|
369
|
+
showClose: Boolean(onClose || returnUrl?.trim() || closeButton),
|
|
370
|
+
onPlayerStatusChange: (state: EmbedState) => {
|
|
371
|
+
if (generation.destroyed) return;
|
|
372
|
+
onPlayerStatusChange?.(state);
|
|
373
|
+
onStateUpdate?.(state);
|
|
363
374
|
}
|
|
364
375
|
});
|
|
365
376
|
assertCurrent(generation);
|
|
@@ -437,6 +448,11 @@
|
|
|
437
448
|
return withSession((session) => session.listenOnce(options));
|
|
438
449
|
}
|
|
439
450
|
|
|
451
|
+
export function getSession(): Session | null {
|
|
452
|
+
return activeGeneration?.instance?.getSession() ?? null;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** @deprecated Prefer getSession(). */
|
|
440
456
|
export function getManifest(): SessionManifest | null {
|
|
441
457
|
return activeGeneration?.instance?.getManifest() ?? null;
|
|
442
458
|
}
|
|
@@ -462,7 +478,7 @@
|
|
|
462
478
|
generation.ready.reject(error);
|
|
463
479
|
generation.started.reject(error);
|
|
464
480
|
} else {
|
|
465
|
-
void
|
|
481
|
+
void runLaunch(generation, container, snapshot.options);
|
|
466
482
|
}
|
|
467
483
|
|
|
468
484
|
return () => cancelGeneration(generation);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ExperienceEvents, type ExperienceSession, type ListenOnceOptions, type SessionManifest, type UtteranceResult } from '@liforma/client';
|
|
1
|
+
import { type ExperienceEvents, type ExperienceSession, type ListenOnceOptions, type Session, type SessionManifest, type UtteranceResult } from '@liforma/client';
|
|
2
2
|
import type { ExperienceProps } from './types';
|
|
3
3
|
declare const Experience: import("svelte").Component<ExperienceProps, {
|
|
4
4
|
ready: () => Promise<ExperienceEvents["ready"]>;
|
|
@@ -12,6 +12,7 @@ declare const Experience: import("svelte").Component<ExperienceProps, {
|
|
|
12
12
|
startListening: () => Promise<void>;
|
|
13
13
|
stopListening: () => Promise<UtteranceResult>;
|
|
14
14
|
listenOnce: (options?: ListenOnceOptions) => Promise<UtteranceResult>;
|
|
15
|
+
getSession: () => Session | null;
|
|
15
16
|
getManifest: () => SessionManifest | null;
|
|
16
17
|
getConversation: () => ReturnType<ExperienceSession["getConversation"]>;
|
|
17
18
|
end: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SessionManifest } from './types/sessionManifest';
|
|
2
|
-
/**
|
|
3
|
-
* Strip avatar rendering and location scene assets from a Session Manifest.
|
|
4
|
-
* Used when integrators request voice-only mode without authoring a separate experience.
|
|
5
|
-
*/
|
|
6
|
-
export declare function applySpeechOnlyManifest(manifest: SessionManifest): SessionManifest;
|
|
7
|
-
//# sourceMappingURL=speechOnlyManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speechOnlyManifest.d.ts","sourceRoot":"","sources":["../../../src/v2/speechOnlyManifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU/D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAiBlF"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { SessionManifest } from './sessionManifest';
|
|
3
|
-
export declare const sessionManifestSchema: z.ZodObject<{
|
|
4
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
-
sessionId: z.ZodString;
|
|
6
|
-
experienceId: z.ZodString;
|
|
7
|
-
expiresAt: z.ZodString;
|
|
8
|
-
sessionToken: z.ZodString;
|
|
9
|
-
experience: z.ZodObject<{
|
|
10
|
-
title: z.ZodString;
|
|
11
|
-
slug: z.ZodString;
|
|
12
|
-
mode: z.ZodEnum<{
|
|
13
|
-
conversation: "conversation";
|
|
14
|
-
presenter: "presenter";
|
|
15
|
-
}>;
|
|
16
|
-
responseMode: z.ZodEnum<{
|
|
17
|
-
manual: "manual";
|
|
18
|
-
managed: "managed";
|
|
19
|
-
custom: "custom";
|
|
20
|
-
}>;
|
|
21
|
-
speechInputMode: z.ZodEnum<{
|
|
22
|
-
auto: "auto";
|
|
23
|
-
manual: "manual";
|
|
24
|
-
off: "off";
|
|
25
|
-
}>;
|
|
26
|
-
startButton: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
label: z.ZodOptional<z.ZodString>;
|
|
28
|
-
ariaLabel: z.ZodOptional<z.ZodString>;
|
|
29
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
center: "center";
|
|
31
|
-
"bottom-center": "bottom-center";
|
|
32
|
-
"bottom-left": "bottom-left";
|
|
33
|
-
"bottom-right": "bottom-right";
|
|
34
|
-
}>>;
|
|
35
|
-
variant: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
primary: "primary";
|
|
37
|
-
secondary: "secondary";
|
|
38
|
-
minimal: "minimal";
|
|
39
|
-
}>>;
|
|
40
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
41
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
42
|
-
textColor: z.ZodOptional<z.ZodString>;
|
|
43
|
-
borderColor: z.ZodOptional<z.ZodString>;
|
|
44
|
-
borderRadiusPx: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
size: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
small: "small";
|
|
47
|
-
medium: "medium";
|
|
48
|
-
large: "large";
|
|
49
|
-
}>>;
|
|
50
|
-
shadow: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
strong: "strong";
|
|
52
|
-
none: "none";
|
|
53
|
-
soft: "soft";
|
|
54
|
-
}>>;
|
|
55
|
-
}, z.core.$strip>>;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
openingMessage: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>;
|
|
59
|
-
transport: z.ZodObject<{
|
|
60
|
-
type: z.ZodLiteral<"http">;
|
|
61
|
-
config: z.ZodObject<{
|
|
62
|
-
apiBaseUrl: z.ZodString;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
}, z.core.$strip>;
|
|
65
|
-
runtime: z.ZodObject<{
|
|
66
|
-
cdnBaseUrl: z.ZodString;
|
|
67
|
-
input: z.ZodLiteral<"browserStt">;
|
|
68
|
-
renderer: z.ZodLiteral<"morph2d">;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
pipeline: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
stt: z.ZodObject<{
|
|
72
|
-
placement: z.ZodEnum<{
|
|
73
|
-
browser: "browser";
|
|
74
|
-
cloud: "cloud";
|
|
75
|
-
}>;
|
|
76
|
-
provider: z.ZodString;
|
|
77
|
-
model: z.ZodOptional<z.ZodString>;
|
|
78
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
llm: z.ZodObject<{
|
|
81
|
-
placement: z.ZodEnum<{
|
|
82
|
-
browser: "browser";
|
|
83
|
-
cloud: "cloud";
|
|
84
|
-
}>;
|
|
85
|
-
provider: z.ZodString;
|
|
86
|
-
model: z.ZodOptional<z.ZodString>;
|
|
87
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
tts: z.ZodObject<{
|
|
90
|
-
placement: z.ZodEnum<{
|
|
91
|
-
browser: "browser";
|
|
92
|
-
cloud: "cloud";
|
|
93
|
-
}>;
|
|
94
|
-
provider: z.ZodString;
|
|
95
|
-
model: z.ZodOptional<z.ZodString>;
|
|
96
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
animation: z.ZodObject<{
|
|
99
|
-
enabled: z.ZodBoolean;
|
|
100
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
101
|
-
browser: "browser";
|
|
102
|
-
cloud: "cloud";
|
|
103
|
-
}>>;
|
|
104
|
-
source: z.ZodEnum<{
|
|
105
|
-
none: "none";
|
|
106
|
-
azureViseme: "azureViseme";
|
|
107
|
-
speechToAnimation: "speechToAnimation";
|
|
108
|
-
}>;
|
|
109
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
110
|
-
model: z.ZodOptional<z.ZodString>;
|
|
111
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
}, z.core.$strip>>;
|
|
114
|
-
capabilities: z.ZodArray<z.ZodString>;
|
|
115
|
-
characters: z.ZodArray<z.ZodObject<{
|
|
116
|
-
characterId: z.ZodString;
|
|
117
|
-
displayName: z.ZodString;
|
|
118
|
-
avatarId: z.ZodString;
|
|
119
|
-
voiceId: z.ZodString;
|
|
120
|
-
sttLang: z.ZodString;
|
|
121
|
-
agentId: z.ZodString;
|
|
122
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
123
|
-
costume: z.ZodOptional<z.ZodString>;
|
|
124
|
-
costumeClothes: z.ZodOptional<z.ZodString>;
|
|
125
|
-
hair: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, z.core.$strip>>;
|
|
127
|
-
}, z.core.$strip>>;
|
|
128
|
-
activeCharacterId: z.ZodString;
|
|
129
|
-
location: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
locationId: z.ZodString;
|
|
131
|
-
title: z.ZodString;
|
|
132
|
-
scene: z.ZodOptional<z.ZodObject<{
|
|
133
|
-
type: z.ZodLiteral<"image">;
|
|
134
|
-
layers: z.ZodArray<z.ZodString>;
|
|
135
|
-
assets: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
136
|
-
}, z.core.$strip>>;
|
|
137
|
-
placement: z.ZodOptional<z.ZodObject<{
|
|
138
|
-
cx: z.ZodNumber;
|
|
139
|
-
cy: z.ZodNumber;
|
|
140
|
-
scale: z.ZodNumber;
|
|
141
|
-
distanceM: z.ZodNumber;
|
|
142
|
-
}, z.core.$strip>>;
|
|
143
|
-
metersPerDepth: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
hasZoomVariant: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
world: z.ZodOptional<z.ZodObject<{
|
|
147
|
-
worldId: z.ZodString;
|
|
148
|
-
rulesetVersion: z.ZodNumber;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
state: z.ZodObject<{
|
|
151
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
152
|
-
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
153
|
-
}, z.core.$strip>;
|
|
154
|
-
tools: z.ZodArray<z.ZodUnknown>;
|
|
155
|
-
integration: z.ZodOptional<z.ZodObject<{
|
|
156
|
-
returnUrl: z.ZodOptional<z.ZodString>;
|
|
157
|
-
navigateOnClose: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
}, z.core.$strip>>;
|
|
159
|
-
closeButton: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
-
visible: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
-
style: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
text: "text";
|
|
163
|
-
icon: "icon";
|
|
164
|
-
}>>;
|
|
165
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
-
position: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, z.core.$strip>>>;
|
|
168
|
-
billing: z.ZodOptional<z.ZodObject<{
|
|
169
|
-
payer: z.ZodLiteral<"creator">;
|
|
170
|
-
meterId: z.ZodString;
|
|
171
|
-
}, z.core.$strip>>;
|
|
172
|
-
language: z.ZodOptional<z.ZodEnum<{
|
|
173
|
-
en: "en";
|
|
174
|
-
es: "es";
|
|
175
|
-
}>>;
|
|
176
|
-
languagePackRevision: z.ZodOptional<z.ZodString>;
|
|
177
|
-
processorId: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, z.core.$strip>;
|
|
179
|
-
/** Apply API defaults for interaction modes omitted by older mint paths. */
|
|
180
|
-
export declare function normalizeSessionManifestInput(data: unknown): unknown;
|
|
181
|
-
export declare function parseSessionManifest(data: unknown): SessionManifest;
|
|
182
|
-
export declare function manifestHasSessionCredential(manifest: SessionManifest): boolean;
|
|
183
|
-
//# sourceMappingURL=sessionManifestSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionManifestSchema.d.ts","sourceRoot":"","sources":["../../../../src/v2/types/sessionManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0FzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwEhC,CAAC;AAEH,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAgBpE;AAWD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CAMnE;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAE/E"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SessionManifest } from './types/sessionManifest';
|
|
2
|
-
/**
|
|
3
|
-
* Strip avatar rendering and location scene assets from a Session Manifest.
|
|
4
|
-
* Used when integrators request voice-only mode without authoring a separate experience.
|
|
5
|
-
*/
|
|
6
|
-
export declare function applySpeechOnlyManifest(manifest: SessionManifest): SessionManifest;
|
|
7
|
-
//# sourceMappingURL=speechOnlyManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speechOnlyManifest.d.ts","sourceRoot":"","sources":["../../../src/v2/speechOnlyManifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU/D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAiBlF"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { SessionManifest } from './sessionManifest';
|
|
3
|
-
export declare const sessionManifestSchema: z.ZodObject<{
|
|
4
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
-
sessionId: z.ZodString;
|
|
6
|
-
experienceId: z.ZodString;
|
|
7
|
-
expiresAt: z.ZodString;
|
|
8
|
-
sessionToken: z.ZodString;
|
|
9
|
-
experience: z.ZodObject<{
|
|
10
|
-
title: z.ZodString;
|
|
11
|
-
slug: z.ZodString;
|
|
12
|
-
mode: z.ZodEnum<{
|
|
13
|
-
conversation: "conversation";
|
|
14
|
-
presenter: "presenter";
|
|
15
|
-
}>;
|
|
16
|
-
responseMode: z.ZodEnum<{
|
|
17
|
-
managed: "managed";
|
|
18
|
-
custom: "custom";
|
|
19
|
-
manual: "manual";
|
|
20
|
-
}>;
|
|
21
|
-
speechInputMode: z.ZodEnum<{
|
|
22
|
-
manual: "manual";
|
|
23
|
-
auto: "auto";
|
|
24
|
-
off: "off";
|
|
25
|
-
}>;
|
|
26
|
-
startButton: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
label: z.ZodOptional<z.ZodString>;
|
|
28
|
-
ariaLabel: z.ZodOptional<z.ZodString>;
|
|
29
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
30
|
-
center: "center";
|
|
31
|
-
"bottom-center": "bottom-center";
|
|
32
|
-
"bottom-left": "bottom-left";
|
|
33
|
-
"bottom-right": "bottom-right";
|
|
34
|
-
}>>;
|
|
35
|
-
variant: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
primary: "primary";
|
|
37
|
-
secondary: "secondary";
|
|
38
|
-
minimal: "minimal";
|
|
39
|
-
}>>;
|
|
40
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
41
|
-
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
42
|
-
textColor: z.ZodOptional<z.ZodString>;
|
|
43
|
-
borderColor: z.ZodOptional<z.ZodString>;
|
|
44
|
-
borderRadiusPx: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
size: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
small: "small";
|
|
47
|
-
medium: "medium";
|
|
48
|
-
large: "large";
|
|
49
|
-
}>>;
|
|
50
|
-
shadow: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
none: "none";
|
|
52
|
-
soft: "soft";
|
|
53
|
-
strong: "strong";
|
|
54
|
-
}>>;
|
|
55
|
-
}, z.core.$strip>>;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
openingMessage: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>;
|
|
59
|
-
transport: z.ZodObject<{
|
|
60
|
-
type: z.ZodLiteral<"http">;
|
|
61
|
-
config: z.ZodObject<{
|
|
62
|
-
apiBaseUrl: z.ZodString;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
}, z.core.$strip>;
|
|
65
|
-
runtime: z.ZodObject<{
|
|
66
|
-
cdnBaseUrl: z.ZodString;
|
|
67
|
-
input: z.ZodLiteral<"browserStt">;
|
|
68
|
-
renderer: z.ZodLiteral<"morph2d">;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
pipeline: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
stt: z.ZodObject<{
|
|
72
|
-
placement: z.ZodEnum<{
|
|
73
|
-
browser: "browser";
|
|
74
|
-
cloud: "cloud";
|
|
75
|
-
}>;
|
|
76
|
-
provider: z.ZodString;
|
|
77
|
-
model: z.ZodOptional<z.ZodString>;
|
|
78
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
llm: z.ZodObject<{
|
|
81
|
-
placement: z.ZodEnum<{
|
|
82
|
-
browser: "browser";
|
|
83
|
-
cloud: "cloud";
|
|
84
|
-
}>;
|
|
85
|
-
provider: z.ZodString;
|
|
86
|
-
model: z.ZodOptional<z.ZodString>;
|
|
87
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
tts: z.ZodObject<{
|
|
90
|
-
placement: z.ZodEnum<{
|
|
91
|
-
browser: "browser";
|
|
92
|
-
cloud: "cloud";
|
|
93
|
-
}>;
|
|
94
|
-
provider: z.ZodString;
|
|
95
|
-
model: z.ZodOptional<z.ZodString>;
|
|
96
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
animation: z.ZodObject<{
|
|
99
|
-
enabled: z.ZodBoolean;
|
|
100
|
-
placement: z.ZodOptional<z.ZodEnum<{
|
|
101
|
-
browser: "browser";
|
|
102
|
-
cloud: "cloud";
|
|
103
|
-
}>>;
|
|
104
|
-
source: z.ZodEnum<{
|
|
105
|
-
none: "none";
|
|
106
|
-
azureViseme: "azureViseme";
|
|
107
|
-
speechToAnimation: "speechToAnimation";
|
|
108
|
-
}>;
|
|
109
|
-
provider: z.ZodOptional<z.ZodString>;
|
|
110
|
-
model: z.ZodOptional<z.ZodString>;
|
|
111
|
-
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
}, z.core.$strip>>;
|
|
114
|
-
capabilities: z.ZodArray<z.ZodString>;
|
|
115
|
-
characters: z.ZodArray<z.ZodObject<{
|
|
116
|
-
characterId: z.ZodString;
|
|
117
|
-
displayName: z.ZodString;
|
|
118
|
-
avatarId: z.ZodString;
|
|
119
|
-
voiceId: z.ZodString;
|
|
120
|
-
sttLang: z.ZodString;
|
|
121
|
-
agentId: z.ZodString;
|
|
122
|
-
appearance: z.ZodOptional<z.ZodObject<{
|
|
123
|
-
costume: z.ZodOptional<z.ZodString>;
|
|
124
|
-
costumeClothes: z.ZodOptional<z.ZodString>;
|
|
125
|
-
hair: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, z.core.$strip>>;
|
|
127
|
-
}, z.core.$strip>>;
|
|
128
|
-
activeCharacterId: z.ZodString;
|
|
129
|
-
location: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
locationId: z.ZodString;
|
|
131
|
-
title: z.ZodString;
|
|
132
|
-
scene: z.ZodOptional<z.ZodObject<{
|
|
133
|
-
type: z.ZodLiteral<"image">;
|
|
134
|
-
layers: z.ZodArray<z.ZodString>;
|
|
135
|
-
assets: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
136
|
-
}, z.core.$strip>>;
|
|
137
|
-
placement: z.ZodOptional<z.ZodObject<{
|
|
138
|
-
cx: z.ZodNumber;
|
|
139
|
-
cy: z.ZodNumber;
|
|
140
|
-
scale: z.ZodNumber;
|
|
141
|
-
distanceM: z.ZodNumber;
|
|
142
|
-
}, z.core.$strip>>;
|
|
143
|
-
metersPerDepth: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
hasZoomVariant: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
world: z.ZodOptional<z.ZodObject<{
|
|
147
|
-
worldId: z.ZodString;
|
|
148
|
-
rulesetVersion: z.ZodNumber;
|
|
149
|
-
}, z.core.$strip>>;
|
|
150
|
-
state: z.ZodObject<{
|
|
151
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
152
|
-
values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
153
|
-
}, z.core.$strip>;
|
|
154
|
-
tools: z.ZodArray<z.ZodUnknown>;
|
|
155
|
-
integration: z.ZodOptional<z.ZodObject<{
|
|
156
|
-
returnUrl: z.ZodOptional<z.ZodString>;
|
|
157
|
-
navigateOnClose: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
}, z.core.$strip>>;
|
|
159
|
-
closeButton: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
-
visible: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
-
style: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
text: "text";
|
|
163
|
-
icon: "icon";
|
|
164
|
-
}>>;
|
|
165
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
-
position: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, z.core.$strip>>>;
|
|
168
|
-
billing: z.ZodOptional<z.ZodObject<{
|
|
169
|
-
payer: z.ZodLiteral<"creator">;
|
|
170
|
-
meterId: z.ZodString;
|
|
171
|
-
}, z.core.$strip>>;
|
|
172
|
-
language: z.ZodOptional<z.ZodEnum<{
|
|
173
|
-
en: "en";
|
|
174
|
-
es: "es";
|
|
175
|
-
}>>;
|
|
176
|
-
languagePackRevision: z.ZodOptional<z.ZodString>;
|
|
177
|
-
processorId: z.ZodOptional<z.ZodString>;
|
|
178
|
-
}, z.core.$strip>;
|
|
179
|
-
/** Apply API defaults for interaction modes omitted by older mint paths. */
|
|
180
|
-
export declare function normalizeSessionManifestInput(data: unknown): unknown;
|
|
181
|
-
export declare function parseSessionManifest(data: unknown): SessionManifest;
|
|
182
|
-
export declare function manifestHasSessionCredential(manifest: SessionManifest): boolean;
|
|
183
|
-
//# sourceMappingURL=sessionManifestSchema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionManifestSchema.d.ts","sourceRoot":"","sources":["../../../../src/v2/types/sessionManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0FzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwEhC,CAAC;AAEH,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAgBpE;AAWD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CAMnE;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAE/E"}
|