@sermas/api-client 1.0.0-alpha.29 → 1.0.0-alpha.31
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/index.cjs +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +165 -73
- package/index.d.ts +165 -73
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.cts
CHANGED
|
@@ -425,6 +425,54 @@ type DialogueDocumentDto = {
|
|
|
425
425
|
metadata: DialogueDocumentMetadataDto;
|
|
426
426
|
};
|
|
427
427
|
|
|
428
|
+
type DialogueMessageDto = {
|
|
429
|
+
appId: string;
|
|
430
|
+
/**
|
|
431
|
+
* Reference to the authenticated client the request originated from
|
|
432
|
+
*/
|
|
433
|
+
clientId?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Reference to the user interacting with the system
|
|
436
|
+
*/
|
|
437
|
+
userId?: string;
|
|
438
|
+
/**
|
|
439
|
+
* User session identifier
|
|
440
|
+
*/
|
|
441
|
+
sessionId?: string;
|
|
442
|
+
/**
|
|
443
|
+
* Unique identifier of the message
|
|
444
|
+
*/
|
|
445
|
+
messageId?: string;
|
|
446
|
+
/**
|
|
447
|
+
* Actor providing the text, can be user or agent
|
|
448
|
+
*/
|
|
449
|
+
actor?: 'user' | 'agent';
|
|
450
|
+
/**
|
|
451
|
+
* Indicate a chunck identifier as timestamp, usually indicating it is part of a stream.
|
|
452
|
+
*/
|
|
453
|
+
text: string;
|
|
454
|
+
/**
|
|
455
|
+
* Assistant gender (M or F)
|
|
456
|
+
*/
|
|
457
|
+
gender?: string;
|
|
458
|
+
/**
|
|
459
|
+
* Text language
|
|
460
|
+
*/
|
|
461
|
+
language?: string;
|
|
462
|
+
/**
|
|
463
|
+
* User emotion, if available
|
|
464
|
+
*/
|
|
465
|
+
emotion?: string;
|
|
466
|
+
/**
|
|
467
|
+
* LLM engine to use
|
|
468
|
+
*/
|
|
469
|
+
llm?: string;
|
|
470
|
+
/**
|
|
471
|
+
* Indicate a chunck identifier as timestamp, usually indicating it is part of a stream.
|
|
472
|
+
*/
|
|
473
|
+
chunkId?: number;
|
|
474
|
+
};
|
|
475
|
+
|
|
428
476
|
type DialogueTextToSpeechDto = {
|
|
429
477
|
appId: string;
|
|
430
478
|
/**
|
|
@@ -436,18 +484,36 @@ type DialogueTextToSpeechDto = {
|
|
|
436
484
|
*/
|
|
437
485
|
userId?: string;
|
|
438
486
|
/**
|
|
439
|
-
*
|
|
487
|
+
* User session identifier
|
|
440
488
|
*/
|
|
441
489
|
sessionId?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Unique identifier of the message
|
|
492
|
+
*/
|
|
442
493
|
messageId?: string;
|
|
443
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Actor providing the text, can be user or agent
|
|
496
|
+
*/
|
|
497
|
+
actor?: 'user' | 'agent';
|
|
444
498
|
/**
|
|
445
499
|
* Text to convert to speech. If emotion field is set, it will be converted to SSML. If also `ssml` field is set, this field will be ignored
|
|
446
500
|
*/
|
|
447
501
|
text?: string;
|
|
448
|
-
|
|
449
|
-
|
|
502
|
+
/**
|
|
503
|
+
* Assistant gender (M or F)
|
|
504
|
+
*/
|
|
505
|
+
gender?: string;
|
|
506
|
+
/**
|
|
507
|
+
* Text language
|
|
508
|
+
*/
|
|
509
|
+
language?: string;
|
|
510
|
+
/**
|
|
511
|
+
* User emotion, if available
|
|
512
|
+
*/
|
|
450
513
|
emotion?: string;
|
|
514
|
+
/**
|
|
515
|
+
* LLM engine to use
|
|
516
|
+
*/
|
|
451
517
|
llm?: string;
|
|
452
518
|
/**
|
|
453
519
|
* Indicate a chunck identifier as timestamp, usually indicating it is part of a stream.
|
|
@@ -459,17 +525,6 @@ type DialogueTextToSpeechDto = {
|
|
|
459
525
|
ssml?: string;
|
|
460
526
|
};
|
|
461
527
|
|
|
462
|
-
type DialogueUserMessageDto = {
|
|
463
|
-
messageId?: string;
|
|
464
|
-
appId?: string;
|
|
465
|
-
sessionId?: string;
|
|
466
|
-
gender?: string;
|
|
467
|
-
language?: string;
|
|
468
|
-
llm?: string;
|
|
469
|
-
message: string;
|
|
470
|
-
actor?: string;
|
|
471
|
-
};
|
|
472
|
-
|
|
473
528
|
declare class DialogueService {
|
|
474
529
|
readonly httpRequest: BaseHttpRequest;
|
|
475
530
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -504,29 +559,22 @@ declare class DialogueService {
|
|
|
504
559
|
/**
|
|
505
560
|
* @param appId
|
|
506
561
|
* @param sessionId
|
|
507
|
-
* @param language
|
|
508
|
-
* @param gender
|
|
509
|
-
* @param llm
|
|
510
562
|
* @param sampleRate
|
|
511
563
|
* @param formData
|
|
512
564
|
* @returns any
|
|
513
565
|
* @throws ApiError
|
|
514
566
|
*/
|
|
515
|
-
text(appId: string, sessionId: string,
|
|
567
|
+
text(appId: string, sessionId: string, sampleRate: number, formData: {
|
|
516
568
|
file?: Blob;
|
|
517
569
|
}): CancelablePromise<any>;
|
|
518
570
|
/**
|
|
519
571
|
* @param appId
|
|
520
572
|
* @param sessionId
|
|
521
|
-
* @param language
|
|
522
|
-
* @param gender
|
|
523
|
-
* @param llm
|
|
524
|
-
* @param actor
|
|
525
573
|
* @param requestBody
|
|
526
574
|
* @returns any
|
|
527
575
|
* @throws ApiError
|
|
528
576
|
*/
|
|
529
|
-
chatMessage(appId: string, sessionId: string,
|
|
577
|
+
chatMessage(appId: string, sessionId: string, requestBody: DialogueMessageDto): CancelablePromise<any>;
|
|
530
578
|
/**
|
|
531
579
|
* @param appId
|
|
532
580
|
* @param sessionId
|
|
@@ -539,6 +587,14 @@ declare class DialogueService {
|
|
|
539
587
|
* @throws ApiError
|
|
540
588
|
*/
|
|
541
589
|
import1(): CancelablePromise<any>;
|
|
590
|
+
/**
|
|
591
|
+
* @param appId
|
|
592
|
+
* @param sessionId
|
|
593
|
+
* @param requestBody
|
|
594
|
+
* @returns any
|
|
595
|
+
* @throws ApiError
|
|
596
|
+
*/
|
|
597
|
+
getToolsfFromAppId(appId: string, sessionId: string, requestBody: Array<string>): CancelablePromise<any>;
|
|
542
598
|
}
|
|
543
599
|
|
|
544
600
|
type AccessTokenRequestDto = {
|
|
@@ -1291,9 +1347,21 @@ declare class SessionService {
|
|
|
1291
1347
|
deleteRecord(storageId: string): CancelablePromise<any>;
|
|
1292
1348
|
}
|
|
1293
1349
|
|
|
1350
|
+
type Buffer$1 = {};
|
|
1351
|
+
|
|
1294
1352
|
type UIContentOptionsDto = {
|
|
1353
|
+
/**
|
|
1354
|
+
* Clear the UI screen
|
|
1355
|
+
*/
|
|
1295
1356
|
clearScreen?: boolean;
|
|
1357
|
+
/**
|
|
1358
|
+
* Enable agent reading the content (text to speech)
|
|
1359
|
+
*/
|
|
1296
1360
|
ttsEnabled?: boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* Stop the agent speech
|
|
1363
|
+
*/
|
|
1364
|
+
stopSpeech?: boolean;
|
|
1297
1365
|
};
|
|
1298
1366
|
|
|
1299
1367
|
type UIContentDto = {
|
|
@@ -1358,6 +1426,38 @@ declare class UiService {
|
|
|
1358
1426
|
* @throws ApiError
|
|
1359
1427
|
*/
|
|
1360
1428
|
uiModelControllerMapBlendShapes(requestBody: UIModelMapBlendShapesRequestDto): CancelablePromise<UIModelMapBlendShapesResponseDto>;
|
|
1429
|
+
/**
|
|
1430
|
+
* Retrieve an asset
|
|
1431
|
+
* @param path
|
|
1432
|
+
* @param appId
|
|
1433
|
+
* @returns Buffer Download an asset by url
|
|
1434
|
+
* @throws ApiError
|
|
1435
|
+
*/
|
|
1436
|
+
getAsset(path: string, appId: string): CancelablePromise<Buffer$1>;
|
|
1437
|
+
/**
|
|
1438
|
+
* @param formData
|
|
1439
|
+
* @returns any
|
|
1440
|
+
* @throws ApiError
|
|
1441
|
+
*/
|
|
1442
|
+
saveModel(formData: {
|
|
1443
|
+
file?: Blob;
|
|
1444
|
+
}): CancelablePromise<any>;
|
|
1445
|
+
/**
|
|
1446
|
+
* @param formData
|
|
1447
|
+
* @returns any
|
|
1448
|
+
* @throws ApiError
|
|
1449
|
+
*/
|
|
1450
|
+
saveBackground(formData: {
|
|
1451
|
+
file?: Blob;
|
|
1452
|
+
}): CancelablePromise<any>;
|
|
1453
|
+
/**
|
|
1454
|
+
* @param formData
|
|
1455
|
+
* @returns any
|
|
1456
|
+
* @throws ApiError
|
|
1457
|
+
*/
|
|
1458
|
+
saveDocuments(formData: {
|
|
1459
|
+
file?: Blob;
|
|
1460
|
+
}): CancelablePromise<any>;
|
|
1361
1461
|
}
|
|
1362
1462
|
|
|
1363
1463
|
type XRMarkerDto = {
|
|
@@ -1543,33 +1643,6 @@ type ClearUIContentDto = {
|
|
|
1543
1643
|
messageId?: string;
|
|
1544
1644
|
};
|
|
1545
1645
|
|
|
1546
|
-
type DialogueMessageDto = {
|
|
1547
|
-
appId: string;
|
|
1548
|
-
/**
|
|
1549
|
-
* Reference to the authenticated client the request originated from
|
|
1550
|
-
*/
|
|
1551
|
-
clientId?: string;
|
|
1552
|
-
/**
|
|
1553
|
-
* Reference to the user interacting with the system
|
|
1554
|
-
*/
|
|
1555
|
-
userId?: string;
|
|
1556
|
-
/**
|
|
1557
|
-
* Track the interaction session, if available
|
|
1558
|
-
*/
|
|
1559
|
-
sessionId?: string;
|
|
1560
|
-
messageId?: string;
|
|
1561
|
-
actor: string;
|
|
1562
|
-
text: string;
|
|
1563
|
-
gender: string;
|
|
1564
|
-
language: string;
|
|
1565
|
-
emotion?: string;
|
|
1566
|
-
llm?: string;
|
|
1567
|
-
/**
|
|
1568
|
-
* Indicate a chunck identifier as timestamp, usually indicating it is part of a stream.
|
|
1569
|
-
*/
|
|
1570
|
-
chunkId?: number;
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
1646
|
type DialogueMessageUIContentDto = {
|
|
1574
1647
|
appId: string;
|
|
1575
1648
|
/**
|
|
@@ -1822,19 +1895,24 @@ type TextUIContentDto = {
|
|
|
1822
1895
|
messageId?: string;
|
|
1823
1896
|
};
|
|
1824
1897
|
|
|
1825
|
-
type
|
|
1898
|
+
type UIAssetMetadataDto = {};
|
|
1899
|
+
|
|
1900
|
+
type UIAssetDto = {
|
|
1901
|
+
filename: string;
|
|
1826
1902
|
appId: string;
|
|
1827
|
-
|
|
1828
|
-
* Reference to the authenticated client the request originated from
|
|
1829
|
-
*/
|
|
1830
|
-
clientId?: string;
|
|
1831
|
-
/**
|
|
1832
|
-
* Reference to the user interacting with the system
|
|
1833
|
-
*/
|
|
1903
|
+
type?: 'models' | 'backgrounds' | 'animations' | 'documents';
|
|
1834
1904
|
userId?: string;
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1905
|
+
ts?: string;
|
|
1906
|
+
metadata?: UIAssetMetadataDto;
|
|
1907
|
+
};
|
|
1908
|
+
|
|
1909
|
+
type UIModelAssetDto = {
|
|
1910
|
+
filename: string;
|
|
1911
|
+
appId: string;
|
|
1912
|
+
type?: 'models' | 'backgrounds' | 'animations' | 'documents';
|
|
1913
|
+
userId?: string;
|
|
1914
|
+
ts?: string;
|
|
1915
|
+
metadata?: UIAssetMetadataDto;
|
|
1838
1916
|
};
|
|
1839
1917
|
|
|
1840
1918
|
type VideoContentDto = {
|
|
@@ -2066,7 +2144,13 @@ interface DialogueToolTriggeredEventDto {
|
|
|
2066
2144
|
sessionId?: string;
|
|
2067
2145
|
name: string;
|
|
2068
2146
|
}
|
|
2069
|
-
type
|
|
2147
|
+
type anonymous_schema_174 = 'user' | 'agent';
|
|
2148
|
+
interface SermasSessionDto {
|
|
2149
|
+
appId: string;
|
|
2150
|
+
clientId?: string;
|
|
2151
|
+
userId?: string;
|
|
2152
|
+
sessionId?: string;
|
|
2153
|
+
}
|
|
2070
2154
|
interface SessionChangedDto {
|
|
2071
2155
|
appId: string;
|
|
2072
2156
|
clientId?: string;
|
|
@@ -2079,10 +2163,10 @@ interface AgentDto {
|
|
|
2079
2163
|
clientId?: string;
|
|
2080
2164
|
userId?: string;
|
|
2081
2165
|
agentId: string;
|
|
2082
|
-
status:
|
|
2166
|
+
status: anonymous_schema_203;
|
|
2083
2167
|
modules: string[];
|
|
2084
2168
|
}
|
|
2085
|
-
type
|
|
2169
|
+
type anonymous_schema_203 = 'unavailable' | 'error' | 'not_ready' | 'ready' | 'loading' | 'interacting' | 'waiting' | 'processing';
|
|
2086
2170
|
interface AgentChangedDto {
|
|
2087
2171
|
appId: string;
|
|
2088
2172
|
clientId?: string;
|
|
@@ -2108,15 +2192,15 @@ interface SessionStorageEventDto {
|
|
|
2108
2192
|
operation: string;
|
|
2109
2193
|
record: SessionStorageRecordDto;
|
|
2110
2194
|
}
|
|
2111
|
-
interface
|
|
2195
|
+
interface UIAssetChangedDto {
|
|
2112
2196
|
appId: string;
|
|
2113
2197
|
clientId?: string;
|
|
2114
2198
|
userId?: string;
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
visible: boolean;
|
|
2199
|
+
operation: string;
|
|
2200
|
+
record: UIAssetDto;
|
|
2118
2201
|
}
|
|
2119
|
-
type anonymous_schema_235 = '
|
|
2202
|
+
type anonymous_schema_235 = 'models' | 'backgrounds' | 'animations' | 'documents';
|
|
2203
|
+
type anonymous_schema_242 = 'video' | 'image' | 'pdf' | 'webpage' | 'object' | 'text' | 'email' | 'html' | 'link' | 'dialogue-message' | 'navigation' | 'buttons' | 'quiz' | 'clear-screen';
|
|
2120
2204
|
interface UIInteractionEventDto {
|
|
2121
2205
|
appId: string;
|
|
2122
2206
|
clientId?: string;
|
|
@@ -2288,6 +2372,14 @@ declare class Dialogue {
|
|
|
2288
2372
|
sessionId?: string;
|
|
2289
2373
|
chunkId?: string;
|
|
2290
2374
|
}): Promise<() => void>;
|
|
2375
|
+
agentStopSpeech(event: SermasSessionDto, params?: {
|
|
2376
|
+
appId?: string;
|
|
2377
|
+
sessionId?: string;
|
|
2378
|
+
}): Promise<boolean>;
|
|
2379
|
+
onAgentStopSpeech(fn: (event: SermasSessionDto) => void | Promise<void>, params?: {
|
|
2380
|
+
appId?: string;
|
|
2381
|
+
sessionId?: string;
|
|
2382
|
+
}): Promise<() => void>;
|
|
2291
2383
|
}
|
|
2292
2384
|
|
|
2293
2385
|
declare class Session {
|
|
@@ -2340,10 +2432,10 @@ declare class Session {
|
|
|
2340
2432
|
declare class Ui {
|
|
2341
2433
|
private readonly broker;
|
|
2342
2434
|
constructor(broker: Broker);
|
|
2343
|
-
|
|
2435
|
+
assetChanged(event: UIAssetChangedDto, params?: {
|
|
2344
2436
|
appId?: string;
|
|
2345
2437
|
}): Promise<boolean>;
|
|
2346
|
-
|
|
2438
|
+
onAssetChanged(fn: (event: UIAssetChangedDto) => void | Promise<void>, params?: {
|
|
2347
2439
|
appId?: string;
|
|
2348
2440
|
}): Promise<() => void>;
|
|
2349
2441
|
content(event: UIContentDto, params?: {
|
|
@@ -2505,4 +2597,4 @@ declare class SermasApiClient {
|
|
|
2505
2597
|
login(username: any, password: any, appId?: string): Promise<LoginResponseDto>;
|
|
2506
2598
|
}
|
|
2507
2599
|
|
|
2508
|
-
export { type AccessTokenRequestDto, type ActuationEventDto, type AgentChangedDto, type AgentDto, type AgentHeartBeatEventDto, type AppClientDto, type AppModuleConfigDto, type AppPromptDto, type AppSettingsDto, type AppToolsDTO, type AudioClassificationEventDto, type AudioClassificationValue, type AuthJwtUser, type AuthorizationUser, type AvatarCameraConfig, type BoundingBox, Broker, type Buffer$1 as Buffer, type ButtonDto, type ButtonsContentDto, type ButtonsUIContentDto, type ClearScreenDto, type ClearUIContentDto, type CreatePlatformAppDto, type DialogueDocumentDto, type DialogueDocumentMetadataDto, type DialogueMessageDto, type DialogueMessageUIContentDto, type DialogueTextToSpeechDto, type DialogueToolTriggeredEventDto, type
|
|
2600
|
+
export { type AccessTokenRequestDto, type ActuationEventDto, type AgentChangedDto, type AgentDto, type AgentHeartBeatEventDto, type AppClientDto, type AppModuleConfigDto, type AppPromptDto, type AppSettingsDto, type AppToolsDTO, type AudioClassificationEventDto, type AudioClassificationValue, type AuthJwtUser, type AuthorizationUser, type AvatarCameraConfig, type BoundingBox, Broker, type Buffer$1 as Buffer, type ButtonDto, type ButtonsContentDto, type ButtonsUIContentDto, type ClearScreenDto, type ClearUIContentDto, type CreatePlatformAppDto, type DialogueDocumentDto, type DialogueDocumentMetadataDto, type DialogueMessageDto, type DialogueMessageUIContentDto, type DialogueTextToSpeechDto, type DialogueToolTriggeredEventDto, type EmailContentDto, type EmailUIContentDto, type HtmlContentDto, type HtmlUIContentDto, type ImageContentDto, type ImageUIContentDto, type InitialPoseDto, type InitialPoseEventDto, type JwtTokenDto, type KeycloakJwtTokenResourceAccess, type LinearVelocityDto, type LinkContentDto, type LinkUIContentDto, type LoginRequestDto, type LoginResponseDto, type ModuleConfigEventDto, type ModuleResourceDto, type ModuleSettingsDto, type MovementDto, type MovementEventDto, type NoiseEventDto, type ObjectContentDto, type ObjectDetectionDto, type ObjectDetectionEventDto, type ObjectUIContentDto, type OrientationDto, type PdfContentDto, type PdfUIContentDto, type PlatformAppChangedDto, type PlatformAppClientChangedDto, type PlatformAppDto, type PlatformAppExportFilterDto, type PlatformAppModuleConfigEventDto, type PlatformModuleConfigDto, type PlatformSettingsDto, type PlatformTokenDto, type Point3D, type PoseDto, type PositionDto, type QRCodeEventDto, type QuizAnswerDto, type QuizContentDto, type QuizUIContentDto, type RefreshTokenRequestDto, type RegistrationRequestDto, type RegistrationResponseDto, type RepositoryAvatarModelDto, type RepositoryBackgroundMetadataDto, type RepositoryBackgroundModelDto, type RepositoryConfigDto, type RepositoryMapModelDto, type RepositoryRobotModelDto, type SentimentAnalysisRequest, SermasApiClient, type SermasApiClientConfig, type SermasBaseDto, type SermasEnvType, type SermasSessionDto, type SessionChangedDto, type SessionDto, type SessionStorageEventDto, type SessionStorageRecordDto, type SessionStorageSearchDto, type SessionSupportEventDto, type SessionSupportRequestDto, type SessionSupportResponseDto, type StatusDto, type StatusEventDto, type StringInferenceValue, type TextContentDto, type TextUIContentDto, type ToolsRequestSchema, type ToolsRequestSchemaAuthBasic, type ToolsRequestSchemaAuthBearer, type UIAssetChangedDto, type UIAssetDto, type UIAssetMetadataDto, type UIContentDto, type UIContentOptionsDto, type UIInteractionDTO, type UIInteractionEventDto, type UIModelAssetDto, type UIModelMapBlendShapesRequestDto, type UIModelMapBlendShapesResponseDto, type UpdateUserEventDto, type UpdateUserRequestDto, type UserAgeValue, type UserCharacterizationDto, type UserCharacterizationEventDto, type UserDetectionDto, type UserDetectionEventDto, type UserEmotionValue, type UserInteractionIntentionDto, type VelocityDto, type VideoContentDto, type VideoUIContentDto, type ViewLogsRequestDto, type WebpageContentDto, type WebpageUIContentDto, type XRMarkerChangedDto, type XRMarkerDto, type XRMarkerListRequestDto, type XROcclusionDto, type XROcclusionResponseDto, type anonymous_schema_125, type anonymous_schema_174, type anonymous_schema_203, type anonymous_schema_235, type anonymous_schema_242, type anonymous_schema_60, type anonymous_schema_63, sleep };
|