@fiction/sdk 1.0.10 → 1.0.11
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/dist/demo/index.d.ts +2 -0
- package/dist/sdk.js +221 -202
- package/dist/sdk.js.map +1 -1
- package/dist/sdkClient.d.ts +19 -2
- package/dist/self/SelfController.d.ts +2 -0
- package/dist/self/ui/SelfWrap.vue.d.ts +1 -0
- package/dist/self.js +244 -227
- package/dist/self.js.map +1 -1
- package/package.json +2 -2
package/dist/sdkClient.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
201
201
|
blurhash?: string | undefined;
|
|
202
202
|
}[] | undefined;
|
|
203
203
|
email?: string | null | undefined;
|
|
204
|
+
website?: string | null | undefined;
|
|
204
205
|
accounts?: Record<string, {
|
|
205
206
|
handle?: string | undefined;
|
|
206
207
|
url?: string | undefined;
|
|
@@ -430,6 +431,7 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
430
431
|
blurhash?: string | undefined;
|
|
431
432
|
}[] | undefined;
|
|
432
433
|
email?: string | null | undefined;
|
|
434
|
+
website?: string | null | undefined;
|
|
433
435
|
accounts?: Record<string, {
|
|
434
436
|
handle?: string | undefined;
|
|
435
437
|
url?: string | undefined;
|
|
@@ -550,6 +552,7 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
550
552
|
blurhash?: string | undefined;
|
|
551
553
|
}[] | undefined;
|
|
552
554
|
email?: string | null | undefined;
|
|
555
|
+
website?: string | null | undefined;
|
|
553
556
|
accounts?: Record<string, {
|
|
554
557
|
handle?: string | undefined;
|
|
555
558
|
url?: string | undefined;
|
|
@@ -675,16 +678,30 @@ export declare class FictionSDK extends SettingsObject<FictionSDKSettings> {
|
|
|
675
678
|
}): Promise<boolean>;
|
|
676
679
|
/**
|
|
677
680
|
* Start conversation session (auto-creates conversation if needed)
|
|
678
|
-
* Returns
|
|
681
|
+
* Returns conversation data for tracking messages
|
|
679
682
|
*/
|
|
680
683
|
startConversation(args: {
|
|
681
684
|
selfId: string;
|
|
682
685
|
userId?: string;
|
|
683
686
|
anonId?: string;
|
|
684
|
-
}): Promise<
|
|
687
|
+
}): Promise<{
|
|
688
|
+
conversationId: string;
|
|
689
|
+
hostParticipantId?: string;
|
|
690
|
+
visitorParticipantId?: string;
|
|
691
|
+
} | undefined>;
|
|
685
692
|
/**
|
|
686
693
|
* Generate anonymous ID for tracking unauthenticated users
|
|
687
694
|
* Stored in localStorage for persistence across sessions
|
|
688
695
|
*/
|
|
689
696
|
generateAnonId(): string;
|
|
697
|
+
/**
|
|
698
|
+
* Save message to conversation
|
|
699
|
+
* Called by SelfController to persist messages
|
|
700
|
+
*/
|
|
701
|
+
saveMessage(args: {
|
|
702
|
+
conversationId: string;
|
|
703
|
+
participantId: string;
|
|
704
|
+
content: string;
|
|
705
|
+
role: 'user' | 'agent' | 'system';
|
|
706
|
+
}): Promise<boolean>;
|
|
690
707
|
}
|
|
@@ -30,6 +30,8 @@ export declare class SelfController extends SettingsObject<SelfControllerSetting
|
|
|
30
30
|
private sessionId?;
|
|
31
31
|
private conversationStartTime?;
|
|
32
32
|
private chatCharacterCount;
|
|
33
|
+
private hostParticipantId?;
|
|
34
|
+
private visitorParticipantId?;
|
|
33
35
|
voiceState: Ref<VoiceConnectionState>;
|
|
34
36
|
textState: Ref<TextConnectionState>;
|
|
35
37
|
agentMode: Ref<AgentMode>;
|
|
@@ -24,6 +24,7 @@ declare function __VLS_template(): {
|
|
|
24
24
|
avatarId?: string | null | undefined;
|
|
25
25
|
coverId?: string | null | undefined;
|
|
26
26
|
email?: string | null | undefined;
|
|
27
|
+
website?: string | null | undefined;
|
|
27
28
|
accounts?: Record<string, {
|
|
28
29
|
handle?: string | undefined;
|
|
29
30
|
url?: string | undefined;
|